aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-12-22 23:47:46 -0500
committerKevin O'Connor <kevin@koconnor.net>2016-12-23 17:06:10 -0500
commitfe95ea221b2b88e9cb52a6378ff2018ee752094b (patch)
tree2223d604cc7d5bdf2c771b05e15834dd418b3823 /klippy
parent4e8674d5df46841e68b72b83911b28ec71079bf1 (diff)
downloadkutter-fe95ea221b2b88e9cb52a6378ff2018ee752094b.tar.gz
kutter-fe95ea221b2b88e9cb52a6378ff2018ee752094b.tar.xz
kutter-fe95ea221b2b88e9cb52a6378ff2018ee752094b.zip
build: Define DECL_CONSTANT mechanism for defining exported constants
Add a DECL_CONSTANT macro to allow the firmware to define constants that are to be exported to the host during the "identify" phase. This replaces the existing hardcoded mechanism of scanning the Kconfig header file for certain constants. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy')
-rwxr-xr-xklippy/console.py2
-rw-r--r--klippy/serialhdl.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/klippy/console.py b/klippy/console.py
index 94476007..1dd99ca9 100755
--- a/klippy/console.py
+++ b/klippy/console.py
@@ -27,7 +27,7 @@ class KeyboardReader:
self.reactor.unregister_timer(self.connect_timer)
return self.reactor.NEVER
def update_evals(self, eventtime):
- f = self.ser.msgparser.config.get('CLOCK_FREQ', 1)
+ f = int(self.ser.msgparser.config.get('CLOCK_FREQ', 1))
c = self.ser.get_clock(eventtime)
self.eval_globals['freq'] = f
self.eval_globals['clock'] = int(c)
diff --git a/klippy/serialhdl.py b/klippy/serialhdl.py
index 2a539cf1..2e4bc467 100644
--- a/klippy/serialhdl.py
+++ b/klippy/serialhdl.py
@@ -101,7 +101,7 @@ class SerialReader:
self.msgparser.process_identify(dictionary, decompress=False)
est_clock = 1000000000000.
if pace:
- est_clock = self.msgparser.config['CLOCK_FREQ']
+ est_clock = float(self.msgparser.config['CLOCK_FREQ'])
self.serialqueue = self.ffi_lib.serialqueue_alloc(self.ser.fileno(), 1)
self.est_clock = est_clock
self.last_ack_time = time.time()