Commit Graph

876 Commits

Author SHA1 Message Date
Arksine b261d31ec5 bed_mesh: Add ability to save mesh state to persistent memory
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2018-10-02 16:26:35 -04:00
Arksine 144868c600 bed_mesh: Extend BED_MESH_MAP to provide more information
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2018-10-02 16:26:35 -04:00
Kevin O'Connor 5c267e4f69 docs: Update Features.md document with tmc2660 support
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-02 14:07:33 -04:00
Janar Sööt 50d1ad9019 menu.cfg: add fan glyph to __screen2004_static & __screen2004_input
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2018-10-02 12:49:12 -04:00
Janar Sööt b2691d4730 hd44780: new text glyph - fan
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2018-10-02 12:49:12 -04:00
Kevin O'Connor 0820394e13 toolhead: M204 must update max_accel_to_decel
The max_accel_to_decel variable must not be greater than the max_accel
variable.  Make sure to check this when M204 changes max_accel.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 22:02:33 -04:00
Kevin O'Connor 820dd0b5e3 display: Don't error if M73 is missing a P parameter
Try to avoid raising an error on an M73 command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 12:31:31 -04:00
Kevin O'Connor f49f298003 probe: Merge ProbeVirtualEndstop and ProbeEndstopWrapper wrapper classes
No need to have two wrappers around the mcu_endstop class.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:14:23 -04:00
Kevin O'Connor c5d4e14298 probe: Infer position_endstop when using probe:z_virtual_offset
Don't require (or permit) the user to specify a stepper_z
position_endstop when using the probe:z_virtual_offset mechanism.  In
that case the position_endstop should always equal the probe's
z_offset - so no need to have the user specify it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:12:30 -04:00
Kevin O'Connor a9a0bb87fa probe: Verify the toolhead moves at least some distance on a probe
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:12:30 -04:00
Kevin O'Connor 43f2eac239 z_tilt: Wrap lines to 80 columns
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:12:30 -04:00
Kevin O'Connor c3550158bb z_tilt: Take into account probe xy offset when calculating z_adjust
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:12:30 -04:00
Kevin O'Connor 19d18c2bc1 bed_tilt: Take into account probe xy offset when calculating z_adjust
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:12:30 -04:00
Kevin O'Connor 348a41c325 bed_tilt: Remove special probe:z_virtual_endstop handling
Remove the code to calculate and track the z_offset via
position_endstop updates.  It's simpler to always save and restore the
calculated z_adjust.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:12:30 -04:00
Kevin O'Connor 33887b8c39 probe: Support manual probing at runtime
Don't require the config file to specify manual probing.  Instead,
allow the user to select manual probing on each ProbePointsHelper
invocation.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:12:30 -04:00
Kevin O'Connor 0e9b8abde2 probe: Perform multi-sample averaging in ProbePointsHelper class
Now that all the callers of ProbePointsHelper take a cartesian
coordinate for the probe locations, it's possible to perform averaging
of multi-sample probes within the class.  This simplifies the callers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:12:30 -04:00
Kevin O'Connor e5ef15ad0f probe: Separate out manual probing from automatic probing code
Only call cmd_NEXT() for manual probing.  This simplifies the code as
the automatic probing and manual probing have slightly different
probing mechanisms.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:12:30 -04:00
Kevin O'Connor cb3fede19a probe: Move move_next() method within ProbePointsHelper class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:12:30 -04:00
Kevin O'Connor 8e7eac9b08 probe: Implement ProbePointsHelper get_probed_position() locally
Now that all users of ProbePointsHelper use the same
get_probed_position() code, it is possible to implement that locally
within the ProbePointsHelper class.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:12:30 -04:00
Kevin O'Connor ae4eb35a70 delta_calibrate: Use kin.calc_position() in get_probed_position() callback
It's possible (and a little simpler) to use cartesian coordinates when
calculating a stable position.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-10-01 11:12:30 -04:00
Kevin O'Connor de7c1f76db gcode_macro: Provide more information on a formatting error
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 12:43:54 -04:00
Janar Sööt 68dc28580f gcode_macro: default parameter values
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 11:53:10 -04:00
Janar Sööt d9e35481be configfile: add get_prefix_options method
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2018-09-30 11:51:26 -04:00
Kevin O'Connor 8c2991ceac tmc2208: Improve error handling
Configure the tmc2208 during the 'connect' phase so that a problem
during configuration is properly raised as a config error.  Catch
errors during DUMP_TMC and raise them as g-code errors.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 10:57:47 -04:00
Kevin O'Connor 864918b1f9 verify_heater: Don't report a heater error if printer is shutdown
Don't log a heater verification error if that error is due to the
printer being shutdown for some other reason.  Those spurious error
reports can be confusing.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-30 10:40:44 -04:00
Janar Sööt d22b30342a gcode_macro: 2 lines wrapped at 80 chars
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2018-09-26 08:03:39 -04:00
Janar Sööt 51d64ad7f8 gcode_macro: macro improvement with parameters
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2018-09-26 08:03:39 -04:00
Kevin O'Connor 170b9678fb display: Don't error on an out of range M73 request
No need to report an error if the M73 is not between 0 and 100 - just
display the nearest valid value.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 20:51:51 -04:00
Kevin O'Connor 364faf497b toolhead: Update look-ahead flush comment
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 15:44:45 -04:00
Janar Sööt 18b56c3cda menu: vsdcard - scroll long filenames (#694)
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2018-09-25 14:52:23 -04:00
Kevin O'Connor 0b2c89ecaf delta_calibrate: Initial support for enhanced delta calibration
Add support for an enhanced delta calibration routine that performs XY
dimension calibration.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 13:48:46 -04:00
Kevin O'Connor 929733f0a7 delta_calibrate: Support save/restore of delta_calibrate state
Support using SAVE_CONFIG to store the results of DELTA_CALIBRATE to
the printer config file.  Store the low level probe measurements in
the config as well.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 13:48:46 -04:00
Kevin O'Connor ed0882dc10 delta: Move "stable position" logic to delta_calibrate.py
Move the "stable position" logic from the delta.py kinematics code to
the delta_calibrate.py calibration code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 13:48:46 -04:00
Kevin O'Connor d48e8ea162 bed_tilt: Support saving calibration data via SAVE_CONFIG command
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 13:48:46 -04:00
Kevin O'Connor 5a1b2d61ae pid_calibrate: Support saving calibration data via SAVE_CONFIG
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 13:48:46 -04:00
Kevin O'Connor 531134f092 configfile: Add support for rewriting the printer config file
Add support for writing back the main printer config file with
additional calibration data stored in it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 13:48:46 -04:00
Kevin O'Connor f80456a698 configfile: Move config file code from klippy.py to new file
Add a klippy/configfile.py file with the code needed to read the main
printer config file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-25 13:48:46 -04:00
Janar Sööt 5144c5f01e menu: new fast step rate feature
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2018-09-21 19:29:30 -04:00
Kevin O'Connor 1379a59085 st7920: No need to clear glyph framebuffer before programming glyphs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 7cca8d970a hd44780: Simplify framebuffer access
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 742d6481a9 st7920: Simplify framebuffer access
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 05ba62600c st7920: Support writing degrees symbol
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor a4e2540f14 uc1701: Support writing degrees symbol
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 30a49d3186 display: Use write_glyph() when writing special characters
Always use the write_glyph() method when writing special characters
during status screen updates.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor c8d9d575a1 display: Support writing single character glyphs using write_glyph()
Add write_glyph() support to hd44780.py.  Update uc1701.py and
st7920.py to support writing single character glyphs via
write_glyph().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 2a5778be3a display: Move icon drawing from display.py to lcd_chip code
Move the st7920 icon rendering optimizations from display.py to
st7920.py.  This simplifies the code for other displays.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 2857255ef1 icons: Add the bed to the bed heating animations
It isn't necessary to use the st7920's xor capabilities when drawing
the bed heating animations.  This makes it easier to use the icons for
other displays.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-21 16:39:38 -04:00
Kevin O'Connor 174754299a heater: Add new TURN_OFF_HEATERS command
Add a command that will turn off all heaters in the printer.  Run this
command in the default idle_timeout action.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-18 16:01:07 -04:00
Janar Sööt 7b6a44e8f9 menu: New Tune submenu (#653)
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2018-09-17 08:26:59 -04:00
Janar Sööt f7f78433a2 gcode: modify get_status method to output more info (#651)
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2018-09-17 08:25:28 -04:00
Maks Zolin a9f2a1375a quad_gantry_level: Fix typo, add floating point error protection
Signed-off-by: Maks Zolin <mzolin@vorondesign.com>
2018-09-14 10:45:28 -04:00
Kevin O'Connor 390d549c0c delta: Fix maximum halt velocity calculation
If an arm is nearly parallel to the bed then that tower's carriage may
have a velocity up to 3 times greater than the toolhead's maximum
velocity (relative to the print).  Take that into account when
calculating the stepper's maximum halt velocity.

This fixes some rare "No next step" shutdowns on delta printers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-12 22:29:18 -04:00
Kevin O'Connor 094b9de69e gcode: Send proactive state messages
Send a g-code info message on printer state changes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-12 21:31:27 -04:00
Kevin O'Connor 91691afdcf gcode: Catch errors on fd read and write
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-12 21:06:54 -04:00
Kevin O'Connor d1da6100a6 klippy: Remove unneeded loop in run() method
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-12 21:06:54 -04:00
Maks Zolin e3a49dc692 quad_gantry_level: Add gantry leveling (ruled hyperbolic parabola correction) (#631)
Signed-off-by: Maks Zolin <mzolin@vorondesign.com>
2018-09-12 08:33:20 -04:00
Kevin O'Connor 5791a4d8c4 toolhead: Set commanded_pos[] to move.end_pos
Commit 4573932f allowed move.end_pos to differ from the requested end
position - the toolhead class should use the updated position when
storing its commanded position.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-11 13:45:33 -04:00
Kevin O'Connor 4573932f89 toolhead: Handle rounding errors with extrude only moves
It's possible that a g-code transform class may make an extrude only
move appear as a kinematic move due to limitations of double precision
math.  Handle this by checking for an inconsequential move distance
instead of checking for a move distance of exactly zero.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-11 13:40:52 -04:00
Florian Heilmann 947a7b2b0f tmc2660: Implementation of TMC2660 extra (#621)
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2018-09-11 12:34:05 -04:00
Arksine d6f72eefa1 bed_mesh: Cache last position when get_position() is called.
Fixes issue #626.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2018-09-10 15:10:43 -04:00
Kevin O'Connor ef6068dc42 mcu: Log MCU information before configuring
Log the details of the MCU prior to attempting to configure the MCU.
This way, the log contains the MCU information even if a configuration
error occurs.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-03 18:34:10 -04:00
Kevin O'Connor 5801e6f4d0 pins: Verify the pin_map setting
Raise an error if pin_map is not set to a valid value.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-03 18:16:44 -04:00
Kevin O'Connor 30013a1fb8 mcu: Rename add_config_object() to register_config_callback()
Change the name of the config registration method and pass an explicit
reference to the callback to the new method.  This makes the
relationship between mcu registration and build_config() more clear in
the calling code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-03 11:48:22 -04:00
Kevin O'Connor 8fe8a6deb3 statistics: Move stats handling to new "extras" module
Move the generation of statistics to its own module.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-02 13:46:19 -04:00
Kevin O'Connor 18b04ffe68 klippy: Rename lookup_module_objects() to lookup_objects()
Rename the method and support returning all known objects.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-02 12:53:34 -04:00
Kevin O'Connor 50196c7141 klippy: Use reactor register_callback() mechanism
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-02 12:43:40 -04:00
Kevin O'Connor ab4060e145 console: Use reactor register_callback() mechanism
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-02 12:31:36 -04:00
Kevin O'Connor 165317e33f toolhead: Support M204 with P and T instead of S
Recent versions of Slic3r now send M204 with P and T instead of with
S, so support that.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-02 12:22:43 -04:00
Kevin O'Connor 5632cf6d77 serialqueue: Increase receive message debug queue to 100 messages
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-02 12:16:13 -04:00
Kevin O'Connor ce79b6ca00 menu: Queue g-code commands to avoid command reordering
The gcode.run_script() code can pause which can result in the menu
code being called reentrant - avoid that by queuing the gcode commands
within the menu code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-09-02 12:14:27 -04:00
Kevin O'Connor cf4f23ebf2 probe: Use probe speed for initial move to the Z height
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-30 16:20:23 -04:00
Kevin O'Connor f3edea2943 toolhead: Forward original config error if raised in kinematics class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-30 10:19:08 -04:00
Arksine 40b7ba5111 probe: Add ability to multi-sample points to ProbePointsHelper
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2018-08-29 12:01:19 -04:00
Arksine 1588426229 probe: Refactor z lift code to its own function.
Call lift-z prior to the first move.  This prevents the nozzle from hitting the build surface in situations that home the nozzle off and below the bed.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2018-08-29 12:01:14 -04:00
Kevin O'Connor ca7a80a946 tmc2208: Initial support for configuring TMC2208 drivers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-27 12:51:27 -04:00
Kevin O'Connor afd5d55c00 tmc2130: Minor code cleanup
Rework the code to use set_register() with the string name of the
desired register to set.  Add a get_register() method.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-27 12:47:24 -04:00
Kevin O'Connor ad480bd470 mcu: Avoid adding the same stepper multiple times to an endstop
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-26 23:06:32 -04:00
Romain “Artefact2” Dal Maso 11e9bb286e probe: Allow restarting an incomplete probe set
Signed-off-by: Romain “Artefact2” Dal Maso <artefact2@gmail.com>
2018-08-24 13:20:55 -04:00
Arksine e94f3b7827 gcode: M117 fix
Resolves issue where M117 is not correctly executed when the message begins with numeric or special character.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2018-08-22 12:53:42 -04:00
Janar Sööt 65f0fd6238 display menu module for klipper
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
2018-08-20 22:33:05 -04:00
Arksine 3387cccdcf bed_mesh: move probe x and y offsets to the [probe] module
All probe offsets are now passed to the finalize() callback in the ProbePointsHelper Class.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2018-08-19 16:52:23 -04:00
Arksine 52df40dfbb bed_mesh: update z_offset check
Only check the probe's z_offset against the stepper_z endstop position if the probe is used as a virtual endstop.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2018-08-19 16:52:23 -04:00
Kevin O'Connor 1b07be070b heater_fan: Allow multiple heaters to be defined for a heater_fan
Support the case where a single cooling fan is used with multiple
extruders.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-17 10:20:12 -04:00
Arksine e0bd221c57 bed_mesh: mesh bed leveling for Klipper
Initial implementation of configurable Mesh Bed Leveling.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2018-08-17 09:22:55 -04:00
Florian Heilmann 64e6d85898 sam4e8e: Add the SAM4e8e port
This can be flashed to e.g. the duet wifi using bossac. It requires a
later version as is currently included in the klipper repo (1.8
vs. 1.2). Comms are currently via UART0 only, USB serial is still TBD

Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
2018-08-08 10:44:49 -04:00
Kevin O'Connor cf2393efc8 samd21: Add support for gpio pins
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-07 00:03:21 -04:00
Kevin O'Connor 7783767c35 klippy: Move tracking of accessed config items into _read_config() method
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-03 18:54:23 -04:00
Kevin O'Connor 82738955d2 virtual_sdcard: Check if other events need to run after each file read
Periodically check if other events need to run - this prevents the
virtual_sdcard processing from starving other events.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-02 20:27:34 -04:00
Kevin O'Connor f2d232ef77 force_move: Provide defaults for SET_KINEMATIC_POSITION parameters
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-08-02 08:58:18 -04:00
Kevin O'Connor c0c892d524 force_move: Add support for FORCE_MOVE command
Add initial support for commands that will forcibly move a stepper
(without updating the kinematic classes with the new position).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 12:44:07 -04:00
Kevin O'Connor a434341aa9 force_move: Simplify STEPPER_BUZZ code
Separate the setup and movement parts of cmd_STEPPER_BUZZ() into their
own functions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 11:45:18 -04:00
Kevin O'Connor 2c5eba44ee force_move: Rename stepper_buzz.py to force_move.py
This is in preparation for extending the ability to make manual moves.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 11:15:51 -04:00
Kevin O'Connor 13ccb1a46f mcu: Minor whitespace changes
Wrap lines at 80 columns.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 10:54:31 -04:00
Kevin O'Connor 98580ac1c2 adc_temperature: Minor whitespace changes
Wrap lines at 80 columns.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 10:51:48 -04:00
Kevin O'Connor 334a839123 stepper: Minor whitespace changes
Wrap lines at 80 columns.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 10:18:10 -04:00
Kevin O'Connor 273a98d39a pins: Explicitly pass can_invert and can_pullup to lookup_pin()
Don't pass pin_type to lookup_pin() - instead, if a pin can be
inverted or can have a pullup, then the caller must explicitly specify
that when calling lookup_pin().  This simplifies the code for the
cases where it is not valid to invert or pullup.

Explicitly pass the pin_type to setup_pin() and have ppins.setup_pin()
apply default pullup and invert flags.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-26 09:44:45 -04:00
Kevin O'Connor 7d0f3649f3 spi_temperature: The query_thermocouple command is an init command
Make sure to use is_init=True when sending query_thermocouple -
otherwise, the config CRC is likely to mismatch on every connection.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 19:50:11 -04:00
Kevin O'Connor 63dffd9307 spi_temperature: Provide a default value for spi_speed
All of the Maxim chips support a 4Mhz spi transfer rate, so use that
as a default spi speed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 15:49:14 -04:00
Kevin O'Connor 5b124d59f2 spi_temperature: Remove spi_mode parameter
All of the Maxim chips can use SPI mode 1, so no need to configure it.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 15:47:17 -04:00
Kevin O'Connor 70f765f62f spi_temperature: Don't raise error on a fault - invoke a shutdown
Raising an error from the background message reception thread isn't
well defined.  Instead, on a temperature fault, invoke a printer
shutdown.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 15:20:45 -04:00