From ed91419186837221c060983250437ddcba06a05d Mon Sep 17 00:00:00 2001 From: rbeard-ewa <102390145+rbeard-ewa@users.noreply.github.com> Date: Thu, 4 Jun 2026 22:35:37 -1000 Subject: [PATCH] Fix unhandled ValueError causing WHB04 pendant feedrate crash --- carveracontroller/addons/pendant/pendant.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/carveracontroller/addons/pendant/pendant.py b/carveracontroller/addons/pendant/pendant.py index 1bcf7422..a0271b7e 100644 --- a/carveracontroller/addons/pendant/pendant.py +++ b/carveracontroller/addons/pendant/pendant.py @@ -143,7 +143,15 @@ def _handle_display_update(self, daemon: whb04.Daemon) -> None: daemon.set_display_position(whb04.Axis.Y, self._cnc.vars["wy"]) daemon.set_display_position(whb04.Axis.Z, self._cnc.vars["wz"]) daemon.set_display_position(whb04.Axis.A, self._cnc.vars["wa"]) - daemon.set_display_feedrate(self._cnc.vars["curfeed"]) + # daemon.set_display_feedrate(self._cnc.vars["curfeed"]) + # rbeard-ewa fix unhandled exception for bad feedrate + try: + raw_feed = float(self._cnc.vars.get("curfeed", 0)) + safe_feed = max(0.0, min(raw_feed, 9999.0)) + daemon.set_display_feedrate(safe_feed) + except ValueError: + pass + # end of feedrate fix daemon.set_display_spindle_speed(self._cnc.vars["curspindle"]) # Update the step indicator to reflect current jog mode