Skip to content

Commit c47a822

Browse files
committed
Some code cleanup.
1 parent 4dae491 commit c47a822

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

thc.c

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
55
Part of grblHAL
66
7-
Copyright (c) 2020-2024 Terje Io
7+
Copyright (c) 2020-2025 Terje Io
88
9-
Grbl is free software: you can redistribute it and/or modify
9+
grblHAL is free software: you can redistribute it and/or modify
1010
it under the terms of the GNU General Public License as published by
1111
the Free Software Foundation, either version 3 of the License, or
1212
(at your option) any later version.
1313
14-
Grbl is distributed in the hope that it will be useful,
14+
grblHAL is distributed in the hope that it will be useful,
1515
but WITHOUT ANY WARRANTY; without even the implied warranty of
16-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1717
GNU General Public License for more details.
1818
1919
You should have received a copy of the GNU General Public License
20-
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
20+
along with grblHAL. If not, see <http://www.gnu.org/licenses/>.
2121
2222
*/
2323

@@ -642,21 +642,6 @@ static void on_settings_changed (settings_t *settings, settings_changed_flags_t
642642
pidf_init(&pid, &plasma.pid);
643643
}
644644

645-
static setting_details_t setting_details = {
646-
.groups = plasma_groups,
647-
.n_groups = sizeof(plasma_groups) / sizeof(setting_group_detail_t),
648-
.settings = plasma_settings,
649-
.n_settings = sizeof(plasma_settings) / sizeof(setting_detail_t),
650-
#ifndef NO_SETTINGS_DESCRIPTIONS
651-
.descriptions = plasma_settings_descr,
652-
.n_descriptions = sizeof(plasma_settings_descr) / sizeof(setting_descr_t),
653-
#endif
654-
.save = plasma_settings_save,
655-
.load = plasma_settings_load,
656-
.restore = plasma_settings_restore,
657-
.on_changed = on_settings_changed
658-
};
659-
660645
static void enumeratePins (bool low_level, pin_info_ptr pin_info, void *data)
661646
{
662647
enumerate_pins(low_level, pin_info, data);
@@ -696,13 +681,28 @@ static void onReportOptions (bool newopt)
696681
on_report_options(newopt);
697682

698683
if(!newopt)
699-
hal.stream.write("[PLUGIN:PLASMA v0.13]" ASCII_EOL);
684+
report_plugin("PLASMA", "0.14");
700685
else if(driver_reset) // non-null when successfully enabled
701686
hal.stream.write(",THC");
702687
}
703688

704689
void plasma_init (void)
705690
{
691+
static setting_details_t setting_details = {
692+
.groups = plasma_groups,
693+
.n_groups = sizeof(plasma_groups) / sizeof(setting_group_detail_t),
694+
.settings = plasma_settings,
695+
.n_settings = sizeof(plasma_settings) / sizeof(setting_detail_t),
696+
#ifndef NO_SETTINGS_DESCRIPTIONS
697+
.descriptions = plasma_settings_descr,
698+
.n_descriptions = sizeof(plasma_settings_descr) / sizeof(setting_descr_t),
699+
#endif
700+
.save = plasma_settings_save,
701+
.load = plasma_settings_load,
702+
.restore = plasma_settings_restore,
703+
.on_changed = on_settings_changed
704+
};
705+
706706
bool ok;
707707

708708
if((ok = hal.stepper.output_step != NULL)) {
@@ -764,4 +764,4 @@ void plasma_init (void)
764764
protocol_enqueue_foreground_task(report_warning, "Plasma mode failed to initialize!");
765765
}
766766

767-
#endif
767+
#endif // PLASMA_ENABLE

0 commit comments

Comments
 (0)