measurements.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 MASTER_BOARD 1
  10. #define SLAVES_COUNT 4
  11. #define PHASES_QTY 3
  12. #define TEMPERATURE_QTY 2
  13. struct _RESMeasurements {
  14. float voltageRMS[PHASES_QTY];
  15. float voltagePeak[PHASES_QTY];
  16. float currentRMS[PHASES_QTY];
  17. float currentPeak[PHASES_QTY];
  18. float power[PHASES_QTY];
  19. };
  20. struct _SesnorsInfo {
  21. float pvTemperature[TEMPERATURE_QTY];
  22. float fanVoltage;
  23. int32_t pvEncoderXraw;
  24. int32_t pvEncoderYraw;
  25. uint8_t motorXStatus;
  26. uint8_t motorYStatus;
  27. float motorXAveCurrent;
  28. float motorYAveCurrent;
  29. float motorXPeakCurrent;
  30. float motorYPeakCurrent;
  31. uint8_t limitXSwitchUp;
  32. uint8_t limitXSwitchDown;
  33. uint8_t limitXSwitchCenter;
  34. uint8_t limitYSwitchUp;
  35. uint8_t limitYSwitchDown;
  36. uint8_t limitYSwitchCenter;
  37. uint8_t powerSupplyFailMask;
  38. float currentXPosition;
  39. float currentYPosition;
  40. uint8_t positionXWeak;
  41. uint8_t positionYWeak;
  42. float positionXOffset;
  43. float positionYOffset;
  44. };
  45. typedef struct _RESMeasurements RESMeasurements;
  46. typedef struct _SesnorsInfo SesnorsInfo;
  47. #endif /* INC_MEASUREMENTS_H_ */