Index: leahi_dialin/fp/proxies/dd_proxy.py =================================================================== diff -u -r89bc63999a581c9bf99c68f20ad05b30b6dcf0cb -r9bfb4b489a4608541017c05660e111d8ef6b8b5f --- leahi_dialin/fp/proxies/dd_proxy.py (.../dd_proxy.py) (revision 89bc63999a581c9bf99c68f20ad05b30b6dcf0cb) +++ leahi_dialin/fp/proxies/dd_proxy.py (.../dd_proxy.py) (revision 9bfb4b489a4608541017c05660e111d8ef6b8b5f) @@ -7,8 +7,8 @@ # # @file dd_proxy.py # -# @author (last) Micahel Garthwaite -# @date (last) 18-Aug-2023 +# @author (last) Zoltan Miskolci +# @date (last) 09-Jan-2026 # @author (original) Peter Lucia # @date (original) 02-Apr-2020 # @@ -17,7 +17,7 @@ from logging import Logger from leahi_dialin.common.msg_defs import MsgIds -from leahi_dialin.common.fp_defs import FPOpModes +from leahi_dialin.common.fp_defs import fp_enum_repository from leahi_dialin.protocols.CAN import DenaliMessage, DenaliCanMessenger, DenaliChannels from leahi_dialin.utils.base import AbstractSubSystem from leahi_dialin.utils.conversions import integer_to_bytearray, float_to_bytearray @@ -34,14 +34,14 @@ @param can_interface: the Denali CAN interface object """ - super().__init__() self._fp = fp self.can_interface = can_interface self.logger = logger # no current registered call back methods + def cmd_dd_send_ro_start_stop_request(self, cmdID: int = 0, start: bool = 0, ro_rate: float = 0): """ Constructs and sends a DD command request to the FP. @@ -55,6 +55,7 @@ stt = integer_to_bytearray(start) rtt = float_to_bytearray(ro_rate) payload = cmd + stt + rtt + message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_fp_ch_id, message_id=MsgIds.MSG_ID_DD_FP_START_STOP_CMD_REQUEST.value, payload=payload) @@ -77,9 +78,9 @@ """ target_opmode = op_mode - if op_mode in [FPOpModes.MODE_PRE_GENP, FPOpModes.MODE_DPGP]: - target_opmode = FPOpModes.MODE_DPGP if self._fp.fp_defeaturized else FPOpModes.MODE_PRE_GENP - elif op_mode in [FPOpModes.MODE_GENP, FPOpModes.MODE_DEGP]: - target_opmode = FPOpModes.MODE_DEGP if self._fp.fp_defeaturized else FPOpModes.MODE_GENP + if op_mode in [fp_enum_repository.FPOpModes.MODE_PRE_GENP, fp_enum_repository.FPOpModes.MODE_DPGP]: + target_opmode = fp_enum_repository.FPOpModes.MODE_DPGP if self._fp.fp_defeaturized else fp_enum_repository.FPOpModes.MODE_PRE_GENP + elif op_mode in [fp_enum_repository.FPOpModes.MODE_GENP, fp_enum_repository.FPOpModes.MODE_DEGP]: + target_opmode = fp_enum_repository.FPOpModes.MODE_DEGP if self._fp.fp_defeaturized else fp_enum_repository.FPOpModes.MODE_GENP return self._fp.cmd_fp_set_operation_mode(target_opmode)