diff --git a/Firmware/MotorControl/endstop.hpp b/Firmware/MotorControl/endstop.hpp index 7c7fa8b4..6983fa6c 100644 --- a/Firmware/MotorControl/endstop.hpp +++ b/Firmware/MotorControl/endstop.hpp @@ -10,7 +10,7 @@ class Endstop { uint16_t gpio_num = 0; bool enabled = false; bool is_active_high = false; - bool pullup = false; + bool pullup = true; }; explicit Endstop(Endstop::Config_t& config); diff --git a/docs/endstops.md b/docs/endstops.md index 87455825..fb165965 100644 --- a/docs/endstops.md +++ b/docs/endstops.md @@ -12,10 +12,11 @@ Each axis supports two endstops: `min_endstop` and `max_endstop`. For each ends Name | Type | Default --- | -- | -- gpio_num | int | 0 -enabled | boolean | False -offset | int | 0 -debounce_ms | float | 100.0 -is_active_high | boolean | False +offset | float | 0.0 +debounce_ms | float | 50.0 +enabled | boolean | false +is_active_high | boolean | false +pullup | boolean | true ### gpio_num The GPIO pin number, according to the silkscreen labels on ODrive. Set with these commands: @@ -53,6 +54,9 @@ This is how you configure the endstop to be either "NPN" or "PNP". An "NPN" con 3D printer endstops (like those that come with a RAMPS 1.4) are typically configuration **4**. +### pullup +Match the pullup value to the configuration. If `true`, it enables the GPIO pullup resistor. If `false`, it enables the GPIO pull*down* resistor. + ![Endstop configuration](Endstop_configuration.png)