Index: leahi_dialin/common/fp_defs.py =================================================================== diff -u -r18c90a1b2b6c7339bdd192a2d2fac32f2b8a35df -ra291930ba38e329e2b373f6d2b2a7564a6b7a09a --- leahi_dialin/common/fp_defs.py (.../fp_defs.py) (revision 18c90a1b2b6c7339bdd192a2d2fac32f2b8a35df) +++ leahi_dialin/common/fp_defs.py (.../fp_defs.py) (revision a291930ba38e329e2b373f6d2b2a7564a6b7a09a) @@ -8,14 +8,18 @@ # @file fp_defs.py # # @author (last) Zoltan Miskolci -# @date (last) 04-Dec-2025 +# @date (last) 09-Jan-2026 # @author (original) Peter Lucia # @date (original) 22-Jun-2021 # ############################################################################ + from enum import unique + +from .dd_defs import DDConductivitySensorNames, DDPressureNames, DDValveNames from ..utils.base import DialinEnum + @unique class FPOpModes(DialinEnum): MODE_FAUL = 0 # Fault mode @@ -163,6 +167,8 @@ P17_PRES = 3 # Pressure before the RO filter P46_PRES = 4 # Pressure after the RO filter NUM_OF_FP_PRES_SENSORS = 5 # Number of Pressure Sensors + FIRST_FP_SENSOR = P8_PRES # First FP Sensor + LAST_FP_SENSOR = P46_PRES # Last FP Sensor @unique class ROPumpNames(DialinEnum): @@ -182,31 +188,30 @@ FB_DUTY_CYCLE_PCT = 8 # Feedback Duty Cycle Percentage attribute for pumps NUM_OF_RO_PUMP_ATTRIBUTES = 9 # Number of pump attributes -BETA_CONDUCTIVITY_SENSOR_OFFSET = 3 # Offset to translate Dialin FPTemperaturesNames to DD firmware ConductivitySensors enum -BETA_FLOW_SENSOR_OFFSET = 7 # Offset to translate Dialin FPTemperaturesNames to DD firmware FlowSensors enum -BETA_IO_PRES_SENSOR_OFFSET = 5 # Offset to translate Dialin FPTemperaturesNames to DD firmware PressureSensors enum -BETA_FP_PRES_SENSOR_OFFSET = 3 # Offset to translate Dialin FPTemperaturesNames to DD firmware PressureSensors enum - @unique class FPTemperaturesNames(DialinEnum): M3_TEMP = 0 # Temperature after pressure regulator (M3) - P10_TEMP = 1 # P10 temperature from inlet conductivity sensor. - P19_TEMP = 2 # P19 temperature from outlet conductivity sensor. - P8_TEMP = 3 # Temperature before inlet conductivity sensor (P8) - P13_TEMP = 4 # Temperature before RO filter (P13) - P17_TEMP = 5 # Temperature after RO filter (P17) - P7_TEMP = 6 # Temperature at p7 flow meter - P16_TEMP = 7 # Temperature at p16 flow meter - P46_TEMP = 8 # Temperature after sediment filter (P46) + P8_TEMP = 1 # Temperature before inlet conductivity sensor (P8) + P13_TEMP = 2 # Temperature before RO filter (P13) + P17_TEMP = 3 # Temperature after RO filter (P17) + P46_TEMP = 4 # Temperature after sediment filter (P46) + P10_TEMP = 5 # P10 temperature from inlet conductivity sensor. + P19_TEMP = 6 # P19 temperature from outlet conductivity sensor. + P7_TEMP = 7 # Temperature at p7 flow meter + P16_TEMP = 8 # Temperature at p16 flow meter NUM_OF_TEMPERATURE_SENSORS = 9 # Number of Temperature Sensors + FIRST_PRESSURE_SENSOR = M3_TEMP # First Pressure Sensor + LAST_PRESSURE_SENSOR = P46_TEMP # Last Pressure Sensor + FIRST_CONDUCTIVITY_SENSOR = P10_TEMP # First Conductivity Sensor + LAST_CONDUCTIVITY_SENSOR = P19_TEMP # Last Conductivity Sensor + FIRST_FLOW_SENSOR = P7_TEMP # First FLow Sensor + LAST_FLOW_SENSOR = P16_TEMP # Last Flow Sensor @unique class FPValveStates(DialinEnum): VALVE_STATE_CLOSED = 0 # Valve Closed State VALVE_STATE_OPEN = 1 # Valve Open State -BETA_IOFP_VALVE_OFFSET = 32 # Offset to translate Dialin FPValveNames to DD firmware DD_Valves - @unique class FPValveNames(DialinEnum): M4_VALV = 0 # Valve (M4 VWi) @@ -222,4 +227,10 @@ @unique class FPPumpNames(DialinEnum): P12_PUMP_RO = 0 # RO Pump - P40_PUMP_BOOSTER = 1 # Booster Pump \ No newline at end of file + P40_PUMP_BOOSTER = 1 # Booster Pump + + +# To offset the FP enums with the DD values, as they lsited after the DD in the FW +BETA_IOFP_COND_SENSOR_OFFSET = DDConductivitySensorNames.NUM_OF_CONDUCTIVITY_SENSORS.value # Offset to translate Dialin FPTemperaturesNames to DD firmware PressureSensors enum +BETA_IOFP_PRES_SENSOR_OFFSET = DDPressureNames.NUM_OF_PRESSURE_SENSORS.value # Offset to translate Dialin FPTemperaturesNames to DD firmware PressureSensors enum +BETA_IOFP_VALVE_OFFSET = DDValveNames.NUM_OF_DD_VALVES.value # Offset to translate Dialin FPValveNames to DD firmware DD_Valves