|
4 | 4 |
|
5 | 5 | Part of grblHAL |
6 | 6 |
|
7 | | - Copyright (c) 2020-2024 Terje Io |
| 7 | + Copyright (c) 2020-2025 Terje Io |
8 | 8 |
|
9 | | - Grbl is free software: you can redistribute it and/or modify |
| 9 | + grblHAL is free software: you can redistribute it and/or modify |
10 | 10 | it under the terms of the GNU General Public License as published by |
11 | 11 | the Free Software Foundation, either version 3 of the License, or |
12 | 12 | (at your option) any later version. |
13 | 13 |
|
14 | | - Grbl is distributed in the hope that it will be useful, |
| 14 | + grblHAL is distributed in the hope that it will be useful, |
15 | 15 | 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 |
17 | 17 | GNU General Public License for more details. |
18 | 18 |
|
19 | 19 | 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/>. |
21 | 21 |
|
22 | 22 | */ |
23 | 23 |
|
@@ -642,21 +642,6 @@ static void on_settings_changed (settings_t *settings, settings_changed_flags_t |
642 | 642 | pidf_init(&pid, &plasma.pid); |
643 | 643 | } |
644 | 644 |
|
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 | | - |
660 | 645 | static void enumeratePins (bool low_level, pin_info_ptr pin_info, void *data) |
661 | 646 | { |
662 | 647 | enumerate_pins(low_level, pin_info, data); |
@@ -696,13 +681,28 @@ static void onReportOptions (bool newopt) |
696 | 681 | on_report_options(newopt); |
697 | 682 |
|
698 | 683 | if(!newopt) |
699 | | - hal.stream.write("[PLUGIN:PLASMA v0.13]" ASCII_EOL); |
| 684 | + report_plugin("PLASMA", "0.14"); |
700 | 685 | else if(driver_reset) // non-null when successfully enabled |
701 | 686 | hal.stream.write(",THC"); |
702 | 687 | } |
703 | 688 |
|
704 | 689 | void plasma_init (void) |
705 | 690 | { |
| 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 | + |
706 | 706 | bool ok; |
707 | 707 |
|
708 | 708 | if((ok = hal.stepper.output_step != NULL)) { |
@@ -764,4 +764,4 @@ void plasma_init (void) |
764 | 764 | protocol_enqueue_foreground_task(report_warning, "Plasma mode failed to initialize!"); |
765 | 765 | } |
766 | 766 |
|
767 | | -#endif |
| 767 | +#endif // PLASMA_ENABLE |
0 commit comments