Mainsail doesn't connect to Moonraker after Klipper update

manual_stepper.zip (1.8 KB)

Okay, dealers choice, the previous one reverts back to before the change.

This one actually corrects the issue.

@koconnor - Sorry for the double tag, but I can confirm the newest update to manual_stepper (the status function) causes Mainsail to hang when the webhooks try to get the stepper status cause there is an error.

I’ve messed with my branch of Klipper so don’t want to put in a PR and have to mess with another branch and making sure I take out unintentional changes.

I changed the following lines…

34         self.stepper_enable = self.printer.lookup_object('stepper_enable')

45-55

    def do_enable(self, enable):
        self.sync_print_time()
        if enable:
            for s in self.steppers:
                se = self.stepper_enable.lookup_enable(s.get_name())
                se.motor_enable(self.next_cmd_time)
        else:
            for s in self.steppers:
                se = self.stepper_enable.lookup_enable(s.get_name())
                se.motor_disable(self.next_cmd_time)
        self.sync_print_time()

108-110

    def get_status(self, eventtime):
        return {'position': self.rail.get_commanded_position(),
                'enabled': self.stepper_enable.lookup_enable(self.steppers[0].get_name()).is_motor_enabled()}