Index: leahi_dialin/common/fp_defs.py =================================================================== diff -u -r144020fa422bc5d0db1bd62647c29022a887206e -r11e7bd014a4b44e94c055a15881b1e01b35f5749 --- leahi_dialin/common/fp_defs.py (.../fp_defs.py) (revision 144020fa422bc5d0db1bd62647c29022a887206e) +++ leahi_dialin/common/fp_defs.py (.../fp_defs.py) (revision 11e7bd014a4b44e94c055a15881b1e01b35f5749) @@ -146,7 +146,7 @@ P34_VALV = 3 # Valve (P34 VCb) P37_VALV = 4 # Valve (P37 VCd) P39_VALV = 5 # Valve (P39 VROd) - P43_VALV = 6 # Valve (P43) + M12_VALV = 6 # Valve (M12) P6_VALV = 7 # Valve (P6 VFF) NUM_OF_FP_VALVES = 8 # Number of valves Index: leahi_dialin/fp/modules/valves.py =================================================================== diff -u -r00412d78bda4176d5c45a3778cb90ad907928965 -r11e7bd014a4b44e94c055a15881b1e01b35f5749 --- leahi_dialin/fp/modules/valves.py (.../valves.py) (revision 00412d78bda4176d5c45a3778cb90ad907928965) +++ leahi_dialin/fp/modules/valves.py (.../valves.py) (revision 11e7bd014a4b44e94c055a15881b1e01b35f5749) @@ -66,7 +66,7 @@ self.p34_valv = {"id": FPValveNames.P34_VALV.value, "state": DEENERGIZED} self.p37_valv = {"id": FPValveNames.P37_VALV.value, "state": DEENERGIZED} self.p39_valv = {"id": FPValveNames.P39_VALV.value, "state": DEENERGIZED} - self.p43_valv = {"id": FPValveNames.P43_VALV.value, "state": DEENERGIZED} + self.m12_valv = {"id": FPValveNames.M12_VALV.value, "state": DEENERGIZED} self.p6_valv = {"id": FPValveNames.P6_VALV.value, "state": DEENERGIZED} # NOTE: The len function counts the enums with the same number only once. @@ -88,7 +88,7 @@ self.p34_valv.get("state"), self.p37_valv.get("state"), self.p39_valv.get("state"), - self.p43_valv.get("state"), + self.m12_valv.get("state"), self.p6_valv.get("state") ] @@ -131,7 +131,7 @@ "p34_valv", "p37_valv", "p39_valv", - "p43_valv", + "m12_valv", "p6_valv", "valve_states_enum", "fp_valves_states_timestamp" @@ -153,7 +153,7 @@ self.p34_valv["state"] = self._binary_to_valve_state(vst[0] & 8) self.p37_valv["state"] = self._binary_to_valve_state(vst[0] & 16) self.p39_valv["state"] = self._binary_to_valve_state(vst[0] & 32) - self.p43_valv["state"] = self._binary_to_valve_state(vst[0] & 64) + self.m12_valv["state"] = self._binary_to_valve_state(vst[0] & 64) self.p6_valv["state"] = self._binary_to_valve_state(vst[0] & 128) start = self.END_POS_VALVES_STATES Index: leahi_dialin/ui/fp_messaging.py =================================================================== diff -u -re8a6ae1277d26e72f7e9f7b39d15bac75a860d01 -r11e7bd014a4b44e94c055a15881b1e01b35f5749 --- leahi_dialin/ui/fp_messaging.py (.../fp_messaging.py) (revision e8a6ae1277d26e72f7e9f7b39d15bac75a860d01) +++ leahi_dialin/ui/fp_messaging.py (.../fp_messaging.py) (revision 11e7bd014a4b44e94c055a15881b1e01b35f5749) @@ -108,16 +108,16 @@ self.can_interface.send(message, 0) def fp_valves(self, M4_VALV : bool, - P39_VALV : bool, - P6_VALV : bool, - P11_VALV : bool, - P33_VALV : bool, - P34_VALV : bool, - P37_VALV : bool, - M7_VALV : bool, - P20_VALV : bool, - P43_VALV : bool, - valvesensedState: list): + P39_VALV : bool, + P6_VALV : bool, + P11_VALV : bool, + P33_VALV : bool, + P34_VALV : bool, + P37_VALV : bool, + M7_VALV : bool, + P20_VALV : bool, + M12_VALV : bool, + valvesensedState: list): """ Broadcasts the current FP Valve data (Msg ID: 0x31, 49) Args: @@ -130,27 +130,27 @@ P37_VALV (bool ): Valves (P37) M7_VALV (bool ): Valves (M7) P20_VALV (bool ): Valves (P20) - P43_VALV (bool ): Valves (P43) + M12_VALV (bool ): Valves (P43) valvesensedState[10] (list[int] ): Sense state of valves @return: None """ # final 6 bits are unused and left as 0 - hydraulic_valves = (M4_VALV << 0 )|\ - (P39_VALV << 1 )|\ - (P6_VALV << 2 )|\ - (P11_VALV << 3 )|\ - (P33_VALV << 4 )|\ - (P34_VALV << 5 )|\ - (P37_VALV << 6 )|\ - (M7_VALV << 7 )|\ - (P20_VALV << 8 )|\ - (P43_VALV << 9 )|\ - (0 << 10)|\ - (0 << 11)|\ - (0 << 12)|\ - (0 << 13)|\ - (0 << 14)|\ - (0 << 15) + hydraulic_valves = (M4_VALV << 0 ) | \ + (P39_VALV << 1 ) | \ + (P6_VALV << 2 ) | \ + (P11_VALV << 3 ) | \ + (P33_VALV << 4 ) | \ + (P34_VALV << 5 ) | \ + (P37_VALV << 6 ) | \ + (M7_VALV << 7 ) | \ + (P20_VALV << 8 ) | \ + (M12_VALV << 9) | \ + (0 << 10) | \ + (0 << 11) | \ + (0 << 12) | \ + (0 << 13) | \ + (0 << 14) | \ + (0 << 15) payload = conversions.unsigned_short_to_bytearray(hydraulic_valves ) for i in range(len(valvesensedState)):