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>
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>
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>
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>
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>
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>
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>
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>
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>
This reverts commit ac61f8b726.
Many temperature sensors are capitalized, so don't make this chaneg to
the bme280.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
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>
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>
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>
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>
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>
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>
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>