aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/util.py
Commit message (Collapse)AuthorAgeFilesLines
* util: Don't crash when calling get_cpu_info on OS X (#1102)Víctor Martínez2019-01-111-1/+1
| | | Signed-off-by: Víctor Martínez <knoopx@gmail.com>
* util: Fix versioning when gitdir is absent (#809)lf2018-10-271-11/+24
| | | | | | | | | | | | | The gitdir previously could be absent and produce a version of "" in spite of checks for it. Fixed. Parent directories with shlex-interpreted characters in their names could be misinterpreted. Removed shlex parsing. Packagers may want to remove the git history to slim down the package size, so add an option for using a file 'version' in the klippy directory to set version without using git. Signed-Off-By: Lucas Fink <software@lfcode.ca>
* util: Change the /tmp/printer pty to be group readableKevin O'Connor2018-05-161-1/+3
| | | | | | | | For some reason, Linux creates the pseudo tty with group writable permissions, but not group readable. Use chmod to allow the device to also be group readable. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Use git describe --alwaysKevin O'Connor2018-02-261-1/+1
| | | | | | | | Add --always flag to "git describe" command to get a build identifier even if one checks out the repo with a depth parameter that prunes out the last tagged version. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* util: Call set_nonblock() in create_pty()Kevin O'Connor2018-02-021-2/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Avoid using '%' syntax when calling logging moduleKevin O'Connor2017-09-271-3/+3
| | | | | | | The logging module can build strings directly from printf syntax - no need to build the string first. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* util: Fix reporting of git version of klippy codeKevin O'Connor2017-09-071-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Log the type of cpu the host is running onKevin O'Connor2017-02-121-0/+15
| | | | | | | | Report in the log the host CPU type and count. This helps distinguish between different rpi versions when debugging the log from a problem report. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* util: Use path of script instead of current directory for git versionKevin O'Connor2017-01-091-3/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Add support for M115 commandKevin O'Connor2016-12-281-5/+4
| | | | | | Support querying the firmware type and version. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Log the host software git version at startupKevin O'Connor2016-12-241-2/+17
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Clear "hupcl" bit from serial portKevin O'Connor2016-12-091-0/+6
| | | | | | | | The arduino style serial port interfaces can reset the MCU when the serial port is opened. Clearing the HUPCL flag makes this less likely. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-251-0/+32
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>