Skip to content

Commit eb77fec

Browse files
committed
Moved reboot required message for some settings to reporting by using a settings flag.
1 parent b34a991 commit eb77fec

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

thc.c

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -423,26 +423,26 @@ static const setting_group_detail_t plasma_groups [] = {
423423
};
424424

425425
static const setting_detail_t plasma_settings[] = {
426-
{ Setting_THC_Mode, Group_Plasma, "Plasma mode", NULL, Format_RadioButtons, "Off,Voltage,Up/down", NULL, NULL, Setting_NonCore, &plasma.mode, NULL, NULL },
427-
{ Setting_THC_Delay, Group_Plasma, "Plasma THC delay", "s", Format_Decimal, "#0.0", NULL, NULL, Setting_NonCore, &plasma.thc_delay, NULL, NULL },
428-
{ Setting_THC_Threshold, Group_Plasma, "Plasma THC threshold", "V", Format_Decimal, "#0.00", NULL, NULL, Setting_NonCore, &plasma.thc_threshold, NULL, NULL },
429-
{ Setting_THC_PGain, Group_Plasma, "Plasma THC P-gain", NULL, Format_Decimal, "###0.000", NULL, NULL, Setting_NonCore, &plasma.pid.p_gain, NULL, NULL },
430-
{ Setting_THC_IGain, Group_Plasma, "Plasma THC I-gain", NULL, Format_Decimal, "###0.000", NULL, NULL, Setting_NonCore, &plasma.pid.i_gain, NULL, NULL },
431-
{ Setting_THC_DGain, Group_Plasma, "Plasma THC D-gain", NULL, Format_Decimal, "###0.000", NULL, NULL, Setting_NonCore, &plasma.pid.d_gain, NULL, NULL },
432-
{ Setting_THC_VADThreshold, Group_Plasma, "Plasma THC VAD threshold", "percent", Format_Integer, "##0", "0", "100", Setting_NonCore, &plasma.vad_threshold, NULL, NULL },
433-
{ Setting_THC_VoidOverride, Group_Plasma, "Plasma THC Void override", "percent", Format_Integer, "##0", "0", "100", Setting_NonCore, &plasma.thc_override, NULL, NULL },
434-
{ Setting_Arc_FailTimeout, Group_Plasma, "Plasma Arc fail timeout", "seconds", Format_Decimal, "#0.0", NULL, NULL, Setting_NonCore, &plasma.arc_fail_timeout, NULL, NULL },
435-
{ Setting_Arc_RetryDelay, Group_Plasma, "Plasma Arc retry delay", "seconds", Format_Decimal, "#0.0", NULL, NULL, Setting_NonCore, &plasma.arc_retry_delay, NULL, NULL },
436-
{ Setting_Arc_MaxRetries, Group_Plasma, "Plasma Arc max retries", NULL, Format_Int8, "#0", NULL, NULL, Setting_NonCore, &plasma.arc_retries, NULL, NULL },
437-
{ Setting_Arc_VoltageScale, Group_Plasma, "Plasma Arc voltage scale", NULL, Format_Decimal, "###0.000", NULL, NULL, Setting_NonCore, &plasma.arc_voltage_scale, NULL, NULL },
438-
{ Setting_Arc_VoltageOffset, Group_Plasma, "Plasma Arc voltage offset", NULL, Format_Decimal, "###0.000", NULL, NULL, Setting_NonCore, &plasma.arc_voltage_offset, NULL, NULL },
439-
{ Setting_Arc_HeightPerVolt, Group_Plasma, "Plasma Arc height per volt", "mm", Format_Decimal, "###0.000", NULL, NULL, Setting_NonCore, &plasma.arc_height_per_volt, NULL, NULL },
440-
{ Setting_Arc_OkHighVoltage, Group_Plasma, "Plasma Arc ok high volts", "V", Format_Decimal, "###0.000", NULL, NULL, Setting_NonCore, &plasma.arc_high_low_voltage, NULL, NULL },
441-
{ Setting_Arc_OkLowVoltage, Group_Plasma, "Plasma Arc ok low volts", "V", Format_Decimal, "###0.000", NULL, NULL, Setting_NonCore, &plasma.arc_ok_low_voltage, NULL, NULL },
442-
{ Setting_Arc_VoltagePort, Group_AuxPorts, "Arc voltage port", NULL, Format_Int8, "#0", "0", max_aport, Setting_NonCore, &plasma.port_arc_voltage, NULL, NULL },
443-
{ Setting_Arc_OkPort, Group_AuxPorts, "Arc ok port", NULL, Format_Int8, "#0", "0", max_dport, Setting_NonCore, &plasma.port_arc_ok, NULL, NULL },
444-
{ Setting_THC_CutterDownPort, Group_AuxPorts, "Cutter down port", NULL, Format_Int8, "#0", "0", max_dport, Setting_NonCore, &plasma.port_cutter_down, NULL, NULL },
445-
{ Setting_THC_CutterUpPort, Group_AuxPorts, "Cutter up port", NULL, Format_Int8, "#0", "0", max_dport, Setting_NonCore, &plasma.port_cutter_up, NULL, NULL }
426+
{ Setting_THC_Mode, Group_Plasma, "Plasma mode", NULL, Format_RadioButtons, "Off,Voltage,Up/down", NULL, NULL, Setting_NonCore, &plasma.mode, NULL, NULL, false },
427+
{ Setting_THC_Delay, Group_Plasma, "Plasma THC delay", "s", Format_Decimal, "#0.0", NULL, NULL, Setting_NonCore, &plasma.thc_delay, NULL, NULL, false },
428+
{ Setting_THC_Threshold, Group_Plasma, "Plasma THC threshold", "V", Format_Decimal, "#0.00", NULL, NULL, Setting_NonCore, &plasma.thc_threshold, NULL, NULL, false },
429+
{ Setting_THC_PGain, Group_Plasma, "Plasma THC P-gain", NULL, Format_Decimal, "###0.000", NULL, NULL, Setting_NonCore, &plasma.pid.p_gain, NULL, NULL, false },
430+
{ Setting_THC_IGain, Group_Plasma, "Plasma THC I-gain", NULL, Format_Decimal, "###0.000", NULL, NULL, Setting_NonCore, &plasma.pid.i_gain, NULL, NULL, false },
431+
{ Setting_THC_DGain, Group_Plasma, "Plasma THC D-gain", NULL, Format_Decimal, "###0.000", NULL, NULL, Setting_NonCore, &plasma.pid.d_gain, NULL, NULL, false },
432+
{ Setting_THC_VADThreshold, Group_Plasma, "Plasma THC VAD threshold", "percent", Format_Integer, "##0", "0", "100", Setting_NonCore, &plasma.vad_threshold, NULL, NULL, false },
433+
{ Setting_THC_VoidOverride, Group_Plasma, "Plasma THC Void override", "percent", Format_Integer, "##0", "0", "100", Setting_NonCore, &plasma.thc_override, NULL, NULL, false },
434+
{ Setting_Arc_FailTimeout, Group_Plasma, "Plasma Arc fail timeout", "seconds", Format_Decimal, "#0.0", NULL, NULL, Setting_NonCore, &plasma.arc_fail_timeout, NULL, NULL, false },
435+
{ Setting_Arc_RetryDelay, Group_Plasma, "Plasma Arc retry delay", "seconds", Format_Decimal, "#0.0", NULL, NULL, Setting_NonCore, &plasma.arc_retry_delay, NULL, NULL, false },
436+
{ Setting_Arc_MaxRetries, Group_Plasma, "Plasma Arc max retries", NULL, Format_Int8, "#0", NULL, NULL, Setting_NonCore, &plasma.arc_retries, NULL, NULL, false },
437+
{ Setting_Arc_VoltageScale, Group_Plasma, "Plasma Arc voltage scale", NULL, Format_Decimal, "###0.000", NULL, NULL, Setting_NonCore, &plasma.arc_voltage_scale, NULL, NULL, false },
438+
{ Setting_Arc_VoltageOffset, Group_Plasma, "Plasma Arc voltage offset", NULL, Format_Decimal, "###0.000", NULL, NULL, Setting_NonCore, &plasma.arc_voltage_offset, NULL, NULL, false },
439+
{ Setting_Arc_HeightPerVolt, Group_Plasma, "Plasma Arc height per volt", "mm", Format_Decimal, "###0.000", NULL, NULL, Setting_NonCore, &plasma.arc_height_per_volt, NULL, NULL, false },
440+
{ Setting_Arc_OkHighVoltage, Group_Plasma, "Plasma Arc ok high volts", "V", Format_Decimal, "###0.000", NULL, NULL, Setting_NonCore, &plasma.arc_high_low_voltage, NULL, NULL, false },
441+
{ Setting_Arc_OkLowVoltage, Group_Plasma, "Plasma Arc ok low volts", "V", Format_Decimal, "###0.000", NULL, NULL, Setting_NonCore, &plasma.arc_ok_low_voltage, NULL, NULL, false },
442+
{ Setting_Arc_VoltagePort, Group_AuxPorts, "Arc voltage port", NULL, Format_Int8, "#0", "0", max_aport, Setting_NonCore, &plasma.port_arc_voltage, NULL, NULL, true },
443+
{ Setting_Arc_OkPort, Group_AuxPorts, "Arc ok port", NULL, Format_Int8, "#0", "0", max_dport, Setting_NonCore, &plasma.port_arc_ok, NULL, NULL, true },
444+
{ Setting_THC_CutterDownPort, Group_AuxPorts, "Cutter down port", NULL, Format_Int8, "#0", "0", max_dport, Setting_NonCore, &plasma.port_cutter_down, NULL, NULL, true },
445+
{ Setting_THC_CutterUpPort, Group_AuxPorts, "Cutter up port", NULL, Format_Int8, "#0", "0", max_dport, Setting_NonCore, &plasma.port_cutter_up, NULL, NULL, true }
446446
};
447447

448448
#ifndef NO_SETTINGS_DESCRIPTIONS
@@ -468,10 +468,10 @@ static const setting_descr_t plasma_settings_descr[] = {
468468
},
469469
{ Setting_Arc_OkHighVoltage, "High voltage threshold for Arc OK." },
470470
{ Setting_Arc_OkLowVoltage, "Low voltage threshold for Arc OK." },
471-
{ Setting_Arc_VoltagePort, "Aux port number to use for arc voltage." SETTINGS_HARD_RESET_REQUIRED },
472-
{ Setting_Arc_OkPort, "Aux port number to use for arc ok signal." SETTINGS_HARD_RESET_REQUIRED },
473-
{ Setting_THC_CutterDownPort, "Aux port number to use for cutter down signal." SETTINGS_HARD_RESET_REQUIRED },
474-
{ Setting_THC_CutterUpPort, "Aux port number to use for cutter up signal." SETTINGS_HARD_RESET_REQUIRED }
471+
{ Setting_Arc_VoltagePort, "Aux port number to use for arc voltage." },
472+
{ Setting_Arc_OkPort, "Aux port number to use for arc ok signal." },
473+
{ Setting_THC_CutterDownPort, "Aux port number to use for cutter down signal." },
474+
{ Setting_THC_CutterUpPort, "Aux port number to use for cutter up signal." }
475475
};
476476

477477
#endif
@@ -568,9 +568,9 @@ static setting_details_t setting_details = {
568568
.restore = plasma_settings_restore
569569
};
570570

571-
static void enumeratePins (bool low_level, pin_info_ptr pin_info)
571+
static void enumeratePins (bool low_level, pin_info_ptr pin_info, void *data)
572572
{
573-
enumerate_pins(low_level, pin_info);
573+
enumerate_pins(low_level, pin_info, data);
574574

575575

576576
/* static xbar_t pin = {0};
@@ -654,7 +654,7 @@ bool plasma_init (void)
654654
control_interrupt_callback = hal.control_interrupt_callback;
655655
hal.control_interrupt_callback = trap_control_interrupts;
656656
*/
657-
hal.driver_cap.spindle_at_speed = Off;
657+
hal.spindle.cap.at_speed = Off; // TODO: only disable if PWM spindle active
658658

659659
pidf_init(&pid, &plasma.pid);
660660

0 commit comments

Comments
 (0)