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 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. float pvEncoderX;
  23. float pvEncoderY;
  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. };
  42. typedef struct _RESMeasurements RESMeasurements;
  43. typedef struct _SesnorsInfo SesnorsInfo;
  44. extern RESMeasurements resMeasurements;
  45. extern SesnorsInfo sensorsInfo;
  46. #endif /* INC_MEASUREMENTS_H_ */