aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/console.py
Commit message (Collapse)AuthorAgeFilesLines
* console: Wrap code to 80 columnsKevin O'Connor2019-02-271-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* console: Try to improve the description of the SUPPRESS commandKevin O'Connor2018-11-161-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* console: Use reactor register_callback() mechanismKevin O'Connor2018-09-021-2/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* console: Report timestamp on each read messageKevin O'Connor2018-05-211-1/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* console: Fix handling of bad commandsKevin O'Connor2018-05-081-1/+0
| | | | | | | Don't return early on a command error - continue to process remaining commands and pop commands from the queue. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Automatically clear rollover_info on each restartKevin O'Connor2018-04-031-2/+8
| | | | | | | Automatically clear the information printed at the start of each log file rollover on a klippy internal restart. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Add a wrapper around the results of lookup_command()Kevin O'Connor2018-02-271-17/+15
| | | | | | | | Add a lookup_command() method to the SerialReader class that provides a wrapper that stores the serial and commandqueue references. This makes it easier to run the send() method. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Check if the same pin is referenced via different aliasesKevin O'Connor2018-01-101-5/+4
| | | | | | | | Change the update_command() call to use a new PinResolver class. In that new class, verify that the same pin isn't referenced in two different parts of the config using different aliases for the pin. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* clocksync: Move clock synchronization code into new fileKevin O'Connor2017-09-191-5/+8
| | | | | | | Move the low-level clock synchronization code from serialhdl.py to a new file clocksync.py. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Don't pass mcu_freq to update_command()Kevin O'Connor2017-09-131-2/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* console: Add support for SUPPRESS commandKevin O'Connor2017-09-071-2/+15
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* console: Add support for a FLOOD commandKevin O'Connor2017-09-071-2/+23
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* console: Add support for a STATS commandKevin O'Connor2017-08-081-1/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* console: Add LIST command that shows available commands and variablesKevin O'Connor2017-08-081-2/+16
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* console: Add a HELP commandKevin O'Connor2017-08-081-4/+26
| | | | | | Show available features at startup. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Request python2 for all directly executed python binariesKevin O'Connor2017-06-271-1/+1
| | | | | | | Some systems point python to python3 instead of python2 - explicitly request python2 to avoid conflicts. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* console: Support new artificial DELAY commandKevin O'Connor2017-06-221-1/+15
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Use newer "except XYZError as e" python syntaxKevin O'Connor2017-06-101-1/+1
| | | | | | Use the newer syntax for python exceptions. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* msgproto: Rework dump() so it also works with paramsKevin O'Connor2017-04-251-0/+3
| | | | | | | | | Always call the regular .parse() method for each message type during dump() - add a new .format_params() method for dumping a verbose representation of the parsed message. This allows the new format_params() to also be used with data already parsed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* console: Automatically convert float values to int during evaluationKevin O'Connor2017-04-251-8/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* console: Use stdout.write() instead of printKevin O'Connor2017-04-251-5/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Support config mechanism for translating seconds to clock ticksKevin O'Connor2017-03-131-5/+6
| | | | | | | Introduce a TICKS() macro during config parsing that will translate time in seconds to time in clock ticks. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Simplify pin map alias setupKevin O'Connor2017-03-131-8/+4
| | | | | | | | Use map_pins() to obtain the pin mapping - don't export mcu_to_pins(). The functionality of mcu_to_pins() can be obtained by calling map_pins() with name=None. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Define DECL_CONSTANT mechanism for defining exported constantsKevin O'Connor2016-12-231-1/+1
| | | | | | | | | 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>
* serialhdl: Make SerialReader.connect() blockingKevin O'Connor2016-11-291-2/+6
| | | | | | | Use the greenlet mechanism to wait for the connection to come up in the serial connect() method. This simplifies the calling code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* console: Update the debugging console to support setting local varablesKevin O'Connor2016-06-131-2/+12
| | | | | | Add a "SET varname value" local command to the console.py script. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-251-0/+102
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>