mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-16 03:07:56 -06:00
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>
This commit is contained in:
parent
4e8674d5df
commit
fe95ea221b
11 changed files with 54 additions and 37 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue