measurements.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * measurements.h
  3. *
  4. * Created on: Aug 22, 2024
  5. * Author: jakubski
  6. */
  7. #ifndef INC_MEASUREMENTS_H_
  8. #define INC_MEASUREMENTS_H_
  9. #define SLAVES_COUNT 4
  10. #define PHASES_QTY 3
  11. #define TEMPERATURE_QTY 2
  12. struct _RESMeasurements {
  13. float voltageRMS[PHASES_QTY];
  14. float voltagePeak[PHASES_QTY];
  15. float currentRMS[PHASES_QTY];
  16. float currentPeak[PHASES_QTY];
  17. float power[PHASES_QTY];
  18. };
  19. struct _SesnorsInfo {
  20. float pvTemperature[TEMPERATURE_QTY];
  21. float fanVoltage;
  22. int32_t pvEncoderXraw;
  23. int32_t pvEncoderYraw;
  24. uint8_t motorXStatus;
  25. uint8_t motorYStatus;
  26. float motorXAveCurrent;
  27. float motorYAveCurrent;
  28. float motorXPeakCurrent;
  29. float motorYPeakCurrent;
  30. uint8_t limitXSwitchUp;
  31. uint8_t limitXSwitchDown;
  32. uint8_t limitXSwitchCenter;
  33. uint8_t limitYSwitchUp;
  34. uint8_t limitYSwitchDown;
  35. uint8_t limitYSwitchCenter;
  36. uint8_t powerSupplyFailMask;
  37. float currentXPosition;
  38. float currentYPosition;
  39. uint8_t positionXWeak;
  40. uint8_t positionYWeak;
  41. float positionXOffset;
  42. float positionYOffset;
  43. };
  44. typedef struct _RESMeasurements RESMeasurements;
  45. typedef struct _SesnorsInfo SesnorsInfo;
  46. extern RESMeasurements resMeasurements;
  47. extern SesnorsInfo sensorsInfo;
  48. #endif /* INC_MEASUREMENTS_H_ */