mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-09-09 13:50:51 +02:00
adjustable settings.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
// !!! For initial testing, start with test_drive.h which disables
|
||||
// all I/O pins
|
||||
// #include "Machines/atari_1020.h"
|
||||
# include "Machines/test_drive.h"
|
||||
# include "Machines/spi_daisy_4axis_xyza.h"
|
||||
|
||||
// !!! For actual use, change the line above to select a board
|
||||
// from Machines/, for example:
|
||||
|
@@ -204,11 +204,11 @@ namespace Motors {
|
||||
//grbl_msg_sendf(CLIENT_SERIAL, MSG_LEVEL_INFO, "TRINAMIC_MODE_COOLSTEP");
|
||||
tmcstepper->en_pwm_mode(false);
|
||||
tmcstepper->pwm_autoscale(false);
|
||||
tmcstepper->TCOOLTHRS(NORMAL_TCOOLTHRS); // when to turn on coolstep
|
||||
tmcstepper->TCOOLTHRS(trinamic_tcoolthrs->get()); // when to turn on coolstep
|
||||
tmcstepper->THIGH(NORMAL_THIGH);
|
||||
tmcstepper->toff(TRINAMIC_TOFF_COOLSTEP);
|
||||
tmcstepper->hend(TRINAMIC_TOFF_COOLSTEP);
|
||||
tmcstepper->hstrt(TRINAMIC_HSTRT_COOLSTEP);
|
||||
tmcstepper->toff(trinamic_toff->get());
|
||||
tmcstepper->hend(trinamic_hend->get());
|
||||
tmcstepper->hstrt(trinamic_hstrt->get());
|
||||
break;
|
||||
case TRINAMIC_MODE_STALLGUARD:
|
||||
//grbl_msg_sendf(CLIENT_SERIAL, MSG_LEVEL_INFO, "TRINAMIC_MODE_STALLGUARD");
|
||||
|
@@ -53,6 +53,11 @@ IntSetting* spindle_pwm_bit_precision;
|
||||
|
||||
EnumSetting* spindle_type;
|
||||
|
||||
IntSetting* trinamic_toff;
|
||||
IntSetting* trinamic_hend;
|
||||
IntSetting* trinamic_hstrt;
|
||||
IntSetting* trinamic_tcoolthrs;
|
||||
|
||||
enum_opt_t spindleTypes = {
|
||||
// clang-format off
|
||||
{ "NONE", SPINDLE_TYPE_NONE },
|
||||
@@ -323,4 +328,12 @@ void make_settings() {
|
||||
pulse_microseconds = new IntSetting(GRBL, WG, "0", "Stepper/Pulse", DEFAULT_STEP_PULSE_MICROSECONDS, 3, 1000);
|
||||
spindle_type = new EnumSetting(NULL, EXTENDED, WG, NULL, "Spindle/Type", SPINDLE_TYPE, &spindleTypes);
|
||||
stallguard_debug_mask = new AxisMaskSetting(EXTENDED, WG, NULL, "Report/StallGuard", 0, checkStallguardDebugMask);
|
||||
|
||||
|
||||
trinamic_toff = new IntSetting(GRBL, WG, NULL, "Trinamic/toff", 4, 0, 255);
|
||||
trinamic_hend = new IntSetting(GRBL, WG, NULL, "Trinamic/hend", 5, 0, 255);
|
||||
trinamic_hstrt = new IntSetting(GRBL, WG, NULL, "Trinamic/hstrt", 0, 0, 255);
|
||||
trinamic_tcoolthrs = new IntSetting(GRBL, WG, NULL, "Trinamic/tcoolthrs", 0, 1000, 0xFFFFF);
|
||||
//trinamic_s2vs = new IntSetting(GRBL, WG, NULL, "Trinamic/s2vs", 0, 1000, 0xFFFFF);
|
||||
//trinamic_s2g = new IntSetting(GRBL, WG, NULL, "Trinamic/s2g", 0, 1000, 0xFFFFF);
|
||||
}
|
||||
|
@@ -56,3 +56,8 @@ extern IntSetting* spindle_pwm_bit_precision;
|
||||
extern EnumSetting* spindle_type;
|
||||
|
||||
extern AxisMaskSetting* stallguard_debug_mask;
|
||||
|
||||
extern IntSetting* trinamic_toff;
|
||||
extern IntSetting* trinamic_hend;
|
||||
extern IntSetting* trinamic_hstrt;
|
||||
extern IntSetting* trinamic_tcoolthrs;
|
||||
|
Reference in New Issue
Block a user