aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
Commit message (Collapse)AuthorAgeFilesLines
* tmc_uart: Minor change - make the baud rate setting more clearKevin O'Connor2021-02-271-1/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc: Add support for periodic checking of driver statusKevin O'Connor2021-02-272-2/+78
| | | | | | | | Check the status of all Trinamic stepper motor drivers once a second. If the driver reports an error then invoke a shutdown. Also log any serious warnings. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc: Reinitialize on every driver enableKevin O'Connor2021-02-271-32/+36
| | | | | | | | | | | | | Send the full TMC stepper motor driver initialization sequence every time the driver is enabled. Don't raise an error on startup if unable to contact a tmc2208/tmc2209 driver. If the driver is still unavailable when it is enabled then a shutdown will be issued. This allows users to troubleshoot (and possibly bring up communication to the driver) prior to enabling the driver. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2660: Fix tmc register readingKevin O'Connor2021-02-271-30/+35
| | | | | | | | | The tmc2660 appears to send responses as soon as the clk starts toggling. That means the 20 bit response is at the top of the 24bit sent message. Also, this implies that RDSEL must already have the correct value in the prior message. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2660: Use common warning/error flag names and descriptionsKevin O'Connor2021-02-271-43/+30
| | | | | | | | Where the tmc2660 flags match other drivers, use lowercase so that the same monitoring code can be used for all the tmc drivers. Also, use the same field formatters where applicable. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc5160: Merge field formatters into tmc2130.pyKevin O'Connor2021-02-272-5/+1
| | | | | | | | The tmc5160 field formatters were mostly duplicates of the tmc2130 - add the "reset" field to tmc2130.py so both drivers have similar reporting. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc: Always report values after a SET_TMC_CURRENT commandKevin O'Connor2021-02-271-14/+15
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc: Move SET_TMC_CURRENT command to TMCCommandHelper()Kevin O'Connor2021-02-276-68/+37
| | | | | | | Refactor the tmc driver implementations so that there is a single implementation of the SET_TMC_CURRENT command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2660: Add set_current()/get_current() helpers to TMC2660CurrentHelperKevin O'Connor2021-02-271-9/+15
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc5160: Add set_current()/get_current() helpers to TMC5160CurrentHelperKevin O'Connor2021-02-271-14/+18
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Add set_current()/get_current() helper functions to TMCCurrentHelperKevin O'Connor2021-02-271-16/+20
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Raise a command_error on a command timeout eventKevin O'Connor2021-02-271-4/+6
| | | | | | | | Raise a printer.command_error() instead of an mcu.error() if a query command does not succeed. That error is less likely to result in an unhandled exception error. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* virtual_sdcard: exact filename match before case insensitive oneAndre LeBlanc2021-02-261-1/+3
| | | | | | | | | currently, if there are 2 files on the virtual sd card whose names differ only in case (eg. MyFile.gcode vs myfile.gcode) the actual file that gets loaded is at best unpredictable. this patch checks for an exact match before attempting a case-insensitive one. Signed-off-by: Andre LeBlanc <andrepleblanc@gmail.com>
* extruder: Make sure to flush steps during sync_stepper()Kevin O'Connor2021-02-261-0/+2
| | | | | | | | The stepper positions will only be in sync after the step generation code has been flushed. This fixes an "internal error in stepcompress" error during a SYNC_STEPPER_TO_EXTRUDER command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Add spi daisy chain supportMarco D'Alessio2021-02-262-16/+61
| | | | | | | | This patch adds the ability to daisy-chain multiple tmc2130 and tmc5160 drivers. Signed-off-by: Marco D'Alessio <marco@wrecklab.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc: Improve error message on missing microsteps configKevin O'Connor2021-02-231-1/+2
| | | | | | | If microsteps is missing, warn about it in the stepper config section, not the tmc config section. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Improve error messages on missing rotation_distanceKevin O'Connor2021-02-231-5/+8
| | | | | | | | If neither rotation_distance nor step_distance is present, then generate an error saying rotation_distance is needed (instead of an error about step_distance). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Revert "bme280: Rename sensor_type from BME280 to bme280"Kevin O'Connor2021-02-201-1/+1
| | | | | | | | | This reverts commit ac61f8b72603e9d08832250026e48093dd66aec4. Many temperature sensors are capitalized, so don't make this chaneg to the bme280. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* menu: Default menu should check extruders have heaters (#3969)Janar Sööt2021-02-201-2/+2
| | | | | | For the hotend targets check also available heaters. It'll solve crash when using shared heaters. Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* menu: redesigned name scroller & menu rendering (#3837)Janar Sööt2021-02-202-93/+95
| | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* bme280: Rename sensor_type from BME280 to bme280Kevin O'Connor2021-02-201-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* temperature_host: Rename "path" config to "sensor_path"Kevin O'Connor2021-02-201-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* temperature_host: Improve backwards compatibility checkKevin O'Connor2021-02-191-2/+5
| | | | | | Don't register two names for the same instance of the sensor. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* temperature_host: Rename rpi_temperature and add support for custom pathsEvgenii2021-02-192-13/+16
| | | | | Signed-off-by: Evgenii Shavrin <shavrin0591@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Add last_z_result to get the latest z result in an Macro (#3835)Christian S2021-02-181-1/+4
| | | Signed-off-by: Christian Schnellrieder <schnello.android@gmail.com>
* idle_timeout: Add help to SET_IDLE_TIMEOUT (#3945)Arjan Mels2021-02-181-1/+3
| | | Signed-off-by: Arjan Mels <github@mels.email>
* stepper: Don't cache ffi_lib object in the stepperKevin O'Connor2021-02-181-20/+25
| | | | | | | It's easier to just call chelper.get_ffi() if the ffi_lib object is needed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* buildcommands: Extend number of available mcu messages from 96 to 128Kevin O'Connor2021-02-187-31/+35
| | | | | | | | | | | Some internal code treats the message ids as encoded "variable length quantities", while other internal code assumes the message id is always one byte long. Continue using this scheme, but convert the VLQ users to use the name "msgtag" while the 1-byte users use "msgid". Increase the number of available msgids from 96 to 127 - the higher values get encoded as negative "msgtags". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* msgproto: Avoid peeking into the msgproto class membersKevin O'Connor2021-02-183-42/+61
| | | | | | | Update callers to only use exported methods of the msgproto objects. This makes it easier to make internal changes to the code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialqueue: Batch multiple message blocks in a single write()Kevin O'Connor2021-02-121-29/+38
| | | | | | | | Some communication protocols are more efficient if fewer write() calls are invoked. If multiple message blocks can be sent at the same time then batch them into a single write() call. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialqueue: Improve timing of sleep durationsKevin O'Connor2021-02-121-4/+10
| | | | | | | | If any callback is invoked from the pollreactor then obtain a new eventtime before calculating a sleep duration. This improves the timing of events. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* chelper: Fix check for failed code buildKevin O'Connor2021-02-071-2/+11
| | | | | | | Commit 73b78af6 inadvertently removed the check for a successful gcc compilation. Add the check back in. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* ds18b20: new module for 1-wire temperature sensor (#3462)Alan Lord2021-02-022-1/+79
| | | | | | | | | Initial commit of code to support 1-wire (Dallas) sensors such as the DS18B20. Requires Linux kernel drivers to create a file in /sysfs which is read by this module, and temperature typically returned to a temperature_fan. Signed-off-by: Alan Lord <alanslists@gmail.com> Signed-off-by: Josh Headapohl <joshhead@gmail.com>
* temperature_fan: Add MAX_SPEED and MIN_SPEED to SET_TEMPERATURE_FAN_TARGET ↵Lane Roberts2021-02-021-6/+34
| | | | | | | command (#3873) Allows setting min_speed and max_speed at runtime, rather than updating the config and restarting. Signed-off-by Lane Roberts <nolatari@vandarin.net>
* resonance_tester: Increase test max_accel to 10K and max_freq to 133 HzDmitry Butyugin2021-02-021-2/+3
| | | | Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* resonance_tester: Disable input shaping for resonance testingDmitry Butyugin2021-02-021-0/+11
| | | | Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* adxl345: Add accelerometer chip name to the raw data file nameDmitry Butyugin2021-02-021-6/+9
| | | | Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* serialqueue: Improve checking of out-of-order messagesKevin O'Connor2021-02-011-15/+23
| | | | | | | Consider any message block that acks a message never sent as an out-of-order block and discard it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* htu21d: Implement support for min_temp/max_temp checksKevin O'Connor2021-02-011-2/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bme280: Implement support for min_temp/max_temp checksKevin O'Connor2021-02-011-1/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* spi_temperature: Improve handling of min_temp/max_temp overflowsKevin O'Connor2021-02-011-3/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lm75: Implement support for min_temp/max_temp checksKevin O'Connor2021-02-011-2/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lm75: Use getfloat() for reading the lm75_report_time parameterKevin O'Connor2021-02-011-10/+4
| | | | | | Reported by @theopensourcer. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* hd44780: Add hd44780 protocol init configThomas Kroll2021-01-311-1/+6
| | | | | | | LDO OLED needs a different init string. Fixes: #3722 Signed-off-by: Thomas Kroll <t.kroll@outlook.com>
* htu21d: Fix time reporting of temperature measurementsKevin O'Connor2021-01-241-1/+2
| | | | | | The temperature callback takes a "print time" not a "system time". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rpi_temperature: Fix time reporting of temperature measurementsKevin O'Connor2021-01-241-1/+2
| | | | | | The temperature callback takes a "print time" not a "system time". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* temperature_mcu: Improve handling when in debug output modeKevin O'Connor2021-01-241-0/+2
| | | | | | | Call mcu_adc.setup_minmax() even in debug output mode so that the debugging output contains a more accurate configuration. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bme280: Disable bme280 when using debug outputKevin O'Connor2021-01-241-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rpi_temperature: Fix missing get_report_time_delta() callbackKevin O'Connor2021-01-241-0/+3
| | | | | | Reported by @ronald5555. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rpi_temperature: Disable rpi_temperature when using debug outputKevin O'Connor2021-01-241-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>