Index: firmware/App/Monitors/Voltages.c =================================================================== diff -u -r32db7b5bf5d7713108915e8da499e37bd064976e -r862bea855cd392328aad1f4a93a275980ee17f26 --- firmware/App/Monitors/Voltages.c (.../Voltages.c) (revision 32db7b5bf5d7713108915e8da499e37bd064976e) +++ firmware/App/Monitors/Voltages.c (.../Voltages.c) (revision 862bea855cd392328aad1f4a93a275980ee17f26) @@ -37,9 +37,9 @@ #define VOLTAGES_ALARM_PERSISTENCE_MS ( 1 * MS_PER_SECOND ) ///< Alarm persistence period for voltage monitor alarms in milliseconds. #define POWER_LOSS_VOLTAGE_PERSISTENCE_MS 500 ///< Power supply voltage out of range persistence in milliseconds. #define DATA_PUBLISH_COUNTER_START_COUNT 14 ///< Data publish counter start count. -#define MAX_COUNT_AC_MONITORS 55000.0F ///< Max count value for power monitors -#define COUNT_TO_CURRENT( count ) ( ( count / MAX_COUNT_AC_MONITORS ) * 30.0F ) ///< Count to current conversion -#define COUNT_TO_VOLTAGE( count ) ( ( ( count / MAX_COUNT_AC_MONITORS ) / 4.0F ) * 1534.0F ) ///< Count to voltage conversion +#define MAX_COUNT_AC_MONITORS 55000.0F ///< Max count value for power monitors. The valid range is 0 to 55,000 counts, which equates to 0 to 30A. +#define COUNT_TO_CURRENT( count ) ( ( (F32)count / MAX_COUNT_AC_MONITORS ) * 30.0F ) ///< Count to current conversion +#define COUNT_TO_VOLTAGE( count ) ( ( ( (F32)count / MAX_COUNT_AC_MONITORS ) / 4.0F ) * 1534.0F ) ///< Count to voltage conversion /// Defined states for the voltage monitor state machine. typedef enum Voltages_States @@ -284,8 +284,8 @@ data.fpgaVcc = getMonitoredLineLevel( MONITORED_VOLTAGE_FPGA_VCC_V ); data.fpgaVaux = getMonitoredLineLevel( MONITORED_VOLTAGE_FPGA_AUX_V ); data.fpgaVpvn = getMonitoredLineLevel( MONITORED_VOLTAGE_FPGA_PVN_V ); - data.fpgaACDCVoltage = COUNT_TO_VOLTAGE(getFPGAACDCPowerSupplyVoltage()); - data.fpgaACDCCurrent = COUNT_TO_CURRENT(getFPGAACDCPowerSupplyCurrent()); + data.fpgaACDCVoltage = COUNT_TO_VOLTAGE(getFPGAACToDCPowerSupplyVoltage()); + data.fpgaACDCCurrent = COUNT_TO_CURRENT(getFPGAACToDCPowerSupplyCurrent()); data.fpgaACHeaterVoltage = COUNT_TO_VOLTAGE(getFPGAACHeaterVoltage()); data.fpgaACHeaterCurrent = COUNT_TO_CURRENT(getFPGAACHeaterCurrent()); Index: firmware/App/Services/FpgaDD.c =================================================================== diff -u -rd3443d6a118d1d2565e86d95b5c7013d91145fea -r862bea855cd392328aad1f4a93a275980ee17f26 --- firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision d3443d6a118d1d2565e86d95b5c7013d91145fea) +++ firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 862bea855cd392328aad1f4a93a275980ee17f26) @@ -463,7 +463,6 @@ U16 fpgaACDCPMonVrms; ///< Reg 824. AC DC Power Supply RMS Voltage U16 fpgaACHeaterPMonIrms; ///< Reg 826. AC Heater RMS Current U16 fpgaACHeaterPMonVrms; ///< Reg 828. AC Heater RMS Voltage. - } DD_FPGA_SENSORS_T; // TODO: Remove when Beta 1.9 is obsolete @@ -4023,24 +4022,24 @@ /*********************************************************************//** * @brief - * The getFPGAACDCPowerSupplyCurrent function gets AC/DC Power Supply Current + * The getFPGAACToDCPowerSupplyCurrent function gets AC/DC Power Supply Current * @details \b Inputs: fpgaACDCPMonIrms * @details \b Outputs: none * @return power supply current in counts. *************************************************************************/ -U16 getFPGAACDCPowerSupplyCurrent( void ) +U16 getFPGAACToDCPowerSupplyCurrent( void ) { return fpgaSensorReadings.fpgaACDCPMonIrms; } /*********************************************************************//** * @brief - * The getFPGAACDCPowerSupplyCurrent function gets AC/DC Power Supply Voltage + * The getFPGAACToDCPowerSupplyVoltage function gets AC/DC Power Supply Voltage * @details \b Inputs: fpgaACDCPMonVrms * @details \b Outputs: none * @return power supply voltage in counts. *************************************************************************/ -U16 getFPGAACDCPowerSupplyVoltage( void ) +U16 getFPGAACToDCPowerSupplyVoltage( void ) { return fpgaSensorReadings.fpgaACDCPMonVrms; } Index: firmware/App/Services/FpgaDD.h =================================================================== diff -u -rd3443d6a118d1d2565e86d95b5c7013d91145fea -r862bea855cd392328aad1f4a93a275980ee17f26 --- firmware/App/Services/FpgaDD.h (.../FpgaDD.h) (revision d3443d6a118d1d2565e86d95b5c7013d91145fea) +++ firmware/App/Services/FpgaDD.h (.../FpgaDD.h) (revision 862bea855cd392328aad1f4a93a275980ee17f26) @@ -249,8 +249,8 @@ void setFPGAD79RinsePumpPWMControl( U08 value ); U16 getFPGAD79RinsePumpPulseWidth( void ); -U16 getFPGAACDCPowerSupplyCurrent( void ); -U16 getFPGAACDCPowerSupplyVoltage( void ); +U16 getFPGAACToDCPowerSupplyCurrent( void ); +U16 getFPGAACToDCPowerSupplyVoltage( void ); U16 getFPGAACHeaterCurrent( void ); U16 getFPGAACHeaterVoltage( void ); @@ -328,8 +328,6 @@ U16 getFPGAP40PumpPWM( void ); U16 getFPGAP40PumpTachCount( void ); - - /**@}*/ #endif