Skip to content

Commit

Permalink
Merge pull request #658 from Paciente8159/fix-spindle-relay-tool
Browse files Browse the repository at this point in the history
Fix spindle relay tool
  • Loading branch information
Paciente8159 authored Mar 26, 2024
2 parents 327d70f + ed3fd0b commit ca2cd5e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion uCNC/src/hal/tools/tools/spindle_relay.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,18 @@ void set_coolant(uint8_t value)
#endif
}

static int16_t range_speed(int16_t value, uint8_t conv)
{
// binary output
value = (value) ? 1 : 0;
return value;
}

const tool_t spindle_relay = {
.startup_code = NULL,
.shutdown_code = NULL,
.pid_update = NULL,
.range_speed = NULL,
.range_speed = &range_speed,
.get_speed = NULL,
.set_speed = &set_speed,
.set_coolant = &set_coolant};

0 comments on commit ca2cd5e

Please sign in to comment.