Skip to content

Commit

Permalink
Fixing issues with "speeds:" defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
bdring committed Aug 28, 2021
1 parent 27235c7 commit 963f00e
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 2 deletions.
2 changes: 1 addition & 1 deletion FluidNC/src/NutsBolts.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ T mapConstrain(T x, T in_min, T in_max, T out_min, T out_max) {
template <typename T>
bool constrain_with_message(T &value, T min, T max) {
if (value < min || value > max) {
log_error("Value " << value << " constrained to range (" << min << "," << max << ")");
log_warn("Value " << value << " constrained to range (" << min << "," << max << ")");
value = myConstrain(value, min, max);
return false;
}
Expand Down
3 changes: 3 additions & 0 deletions FluidNC/src/Spindles/DacSpindle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ namespace Spindles {

is_reversable = _direction_pin.defined();

if (_speeds.size() == 0) {
linearSpeeds(10000, 100.0f);
}
setupSpeeds(255);

config_message();
Expand Down
2 changes: 1 addition & 1 deletion FluidNC/src/Spindles/OnOffSpindle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Spindles {
// The default speed map for an On/Off spindle is off - 0% -
// for speed 0 and on - 100% - for any nonzero speedl
// In other words there is a step transition right at 0.
linearSpeeds(0, 100.0f);
linearSpeeds(1, 100.0f);
}
setupSpeeds(1);
config_message();
Expand Down
119 changes: 119 additions & 0 deletions example_configs/dac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: "ESP32 Dev Controller V4"
board: "ESP32 Dev Controller V4"

stepping:
engine: RMT
idle_ms: 250
dir_delay_us: 1
pulse_us: 2
disable_delay_us: 0

axes:
shared_stepper_disable: gpio.13:low

x:
steps_per_mm: 800
max_rate: 2000
acceleration: 25
max_travel: 1000
steps_per_mm: 800.000
max_rate: 5000.000
acceleration: 100.000
max_travel: 300.000
soft_limits: false
homing:
cycle: 2
positive_direction: false
mpos: 150.000
feed_rate: 100.000
seek_rate: 200.000
debounce_ms: 500
seek_scaler: 1.100
feed_scaler: 1.100

motor0:
limit_all: gpio.17:low:pu
stepstick:
direction: gpio.14
step: gpio.12
motor1:
null_motor:

y:
steps_per_mm: 800
max_rate: 2000
acceleration: 25
max_travel: 1000
steps_per_mm: 800.000
max_rate: 5000.000
acceleration: 100.000
max_travel: 300.000
soft_limits: false
homing:
cycle: 2
positive_direction: false
mpos: 150.000
feed_rate: 100.000
seek_rate: 200.000
debounce_ms: 500
seek_scaler: 1.100
feed_scaler: 1.100

motor0:
limit_all: gpio.4:low:pu
stepstick:
direction: gpio.15
step: gpio.26
motor1:
null_motor:

z:
steps_per_mm: 800
max_rate: 2000
acceleration: 25
max_travel: 1000
steps_per_mm: 800.000
max_rate: 5000.000
acceleration: 100.000
max_travel: 300.000
soft_limits: false
homing:
cycle: 1
positive_direction: false
mpos: 150.000
feed_rate: 100.000
seek_rate: 200.000
debounce_ms: 500
seek_scaler: 1.100
feed_scaler: 1.100

motor0:
limit_all: gpio.16:low:pu
stepstick:
direction: gpio.33
step: gpio.27
motor1:
null_motor:

coolant:
flood: NO_PIN
mist: NO_PIN

comms:
wifi_ap:
ip_address: "192.168.0.1"
ssid: FluidNC

probe:
pin: gpio.32:low:pu

DAC:
output_pin: gpio.25
enable_pin: NO_PIN
direction_pin: NO_PIN
disable_with_zero_speed: false
zero_speed_with_disable: true
spinup_ms: 0
spindown_ms: 0
tool: 100
speeds: 0=0.000% 10000=100.000%

0 comments on commit 963f00e

Please sign in to comment.