diff --git a/canopen/profiles/p402.py b/canopen/profiles/p402.py index dd3ac9eb..b7269add 100644 --- a/canopen/profiles/p402.py +++ b/canopen/profiles/p402.py @@ -289,11 +289,9 @@ def is_homed(self, restore_op_mode=False): self.op_mode = previous_op_mode return homingstatus in ('TARGET REACHED', 'ATTAINED') - def homing(self, timeout=TIMEOUT_HOMING_DEFAULT, set_new_home=True): + def homing(self, timeout=TIMEOUT_HOMING_DEFAULT): """Function to execute the configured Homing Method on the node :param int timeout: Timeout value (default: 30) - :param bool set_new_home: Defines if the node should set the home offset - object (0x607C) to the current position after the homing procedure (default: true) :return: If the homing was complete with success :rtype: bool """ @@ -319,10 +317,6 @@ def homing(self, timeout=TIMEOUT_HOMING_DEFAULT, set_new_home=True): time.sleep(self.INTERVAL_CHECK_STATE) if time.monotonic() > t: raise RuntimeError('Unable to home, timeout reached') - if set_new_home: - actual_position = self.sdo[0x6063].raw - self.sdo[0x607C].raw = actual_position # Home Offset - logger.info('Homing offset set to {0}'.format(actual_position)) logger.info('Homing mode carried out successfully.') return True except RuntimeError as e: