mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-12-16 05:09:56 +01:00
mcu: Rework formatting of MAX_SCHEDULE_TICKS error string
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -1001,10 +1001,10 @@ class MCUConfigHelper:
|
|||||||
pin_resolver.reserve_pin(pin, cname[13:])
|
pin_resolver.reserve_pin(pin, cname[13:])
|
||||||
if MAX_NOMINAL_DURATION * self._mcu_freq > MAX_SCHEDULE_TICKS:
|
if MAX_NOMINAL_DURATION * self._mcu_freq > MAX_SCHEDULE_TICKS:
|
||||||
max_possible = MAX_SCHEDULE_TICKS * 1 / self._mcu_freq
|
max_possible = MAX_SCHEDULE_TICKS * 1 / self._mcu_freq
|
||||||
raise error("Too high clock speed for MCU '%s' " % (self._name,) +
|
raise error("Too high clock speed for MCU '%s'"
|
||||||
"to be able to resolve a maximum nominal duration " +
|
" to be able to resolve a maximum nominal duration"
|
||||||
"of %ds. " % (MAX_NOMINAL_DURATION) +
|
" of %ds. Max possible duration: %ds"
|
||||||
"Max possible duration: %ds" % (max_possible))
|
% (self._name, MAX_NOMINAL_DURATION, max_possible))
|
||||||
# Config creation helpers
|
# Config creation helpers
|
||||||
def setup_pin(self, pin_type, pin_params):
|
def setup_pin(self, pin_type, pin_params):
|
||||||
pcs = {'endstop': MCU_endstop,
|
pcs = {'endstop': MCU_endstop,
|
||||||
|
|||||||
Reference in New Issue
Block a user