From 211e34e62ba47b9c37d4d8300b3e51ad46619f85 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 12 Jul 2018 12:19:04 -0400 Subject: [PATCH] mcu: Add leading underscore to handle_shutdown() and handle_mcu_stats() Signed-off-by: Kevin O'Connor --- klippy/mcu.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/klippy/mcu.py b/klippy/mcu.py index 56c28b4b..e2dba287 100644 --- a/klippy/mcu.py +++ b/klippy/mcu.py @@ -446,7 +446,7 @@ class MCU: self._mcu_tick_stddev = 0. self._mcu_tick_awake = 0. # Serial callbacks - def handle_mcu_stats(self, params): + def _handle_mcu_stats(self, params): count = params['count'] tick_sum = params['sum'] c = 1.0 / (count * self._mcu_freq) @@ -454,7 +454,7 @@ class MCU: tick_sumsq = params['sumsq'] * self._stats_sumsq_base self._mcu_tick_stddev = c * math.sqrt(count*tick_sumsq - tick_sum**2) self._mcu_tick_awake = tick_sum / self._mcu_freq - def handle_shutdown(self, params): + def _handle_shutdown(self, params): if self._is_shutdown: return self._is_shutdown = True @@ -597,9 +597,9 @@ class MCU: and self._serial.msgparser.get_constant( 'SERIAL_BAUD', None) is None): self._restart_method = 'command' - self.register_msg(self.handle_shutdown, 'shutdown') - self.register_msg(self.handle_shutdown, 'is_shutdown') - self.register_msg(self.handle_mcu_stats, 'stats') + self.register_msg(self._handle_shutdown, 'shutdown') + self.register_msg(self._handle_shutdown, 'is_shutdown') + self.register_msg(self._handle_mcu_stats, 'stats') self._build_config() self._send_config() # Config creation helpers