From 91f88603201f2b5f0b0585f85c5124e1509d8fb6 Mon Sep 17 00:00:00 2001 From: sanjayk03-dev Date: Sun, 31 Aug 2025 17:53:08 +0530 Subject: [PATCH] removed logs --- src/js/motor-view.js | 13 ------------- src/py/bbctrl/Web.py | 9 --------- 2 files changed, 22 deletions(-) diff --git a/src/js/motor-view.js b/src/js/motor-view.js index b99111d..b21af38 100644 --- a/src/js/motor-view.js +++ b/src/js/motor-view.js @@ -122,20 +122,7 @@ module.exports = { attached: function() { // Sync all state values with motor config when component mounts // This ensures UI shows correct values even if rotary was toggled on another page - - // Debug: Log current state values before sync - console.log(`DEBUG: Motor ${this.index} state values on mount:`); - console.log(` current_step_angle (${this.index}sa):`, this.current_step_angle); - console.log(` current_microsteps (${this.index}mi):`, this.current_microsteps); - console.log(` current_travel_per_rev (${this.index}tr):`, this.current_travel_per_rev); - this.syncStateToConfig(); - - // Debug: Log motor config values after sync - console.log(`DEBUG: Motor ${this.index} config values after sync:`); - console.log(` motor step-angle:`, this.motor['step-angle']); - console.log(` motor microsteps:`, this.motor['microsteps']); - console.log(` motor travel-per-rev:`, this.motor['travel-per-rev']); }, watch: { diff --git a/src/py/bbctrl/Web.py b/src/py/bbctrl/Web.py index 49b37dc..47f1d57 100644 --- a/src/py/bbctrl/Web.py +++ b/src/py/bbctrl/Web.py @@ -740,18 +740,9 @@ class RotaryHandler(bbctrl.APIHandler): # Force a complete reload to ensure all values are properly encoded and sent to frontend config.reload() - # Debug: Log the current state values for motor 2 to verify they're being set - log.info("DEBUG: After reload - Motor 2 state values:") - log.info(" 2sa (step-angle): {}".format(ctrl.state.get('2sa'))) - log.info(" 2mi (microsteps): {}".format(ctrl.state.get('2mi'))) - log.info(" 2tr (travel-per-rev): {}".format(ctrl.state.get('2tr'))) - - # TARGETED FIX: Explicitly ensure microsteps gets sent to state # This addresses potential issues with microsteps being treated as machine variable motor_2_final = motors[2] ctrl.state.set('2mi', motor_2_final.get('microsteps')) - ctrl.state.set('2sa', motor_2_final.get('step-angle')) - ctrl.state.set('2tr', motor_2_final.get('travel-per-rev')) # Explicitly trigger state notification to ensure frontend gets updates # This forces immediate WebSocket notification of all state changes