mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-09-01 02:21:46 +02:00
Deleted obsolete spindle settings
This commit is contained in:
@@ -111,58 +111,10 @@
|
||||
# define SPINDLE_TYPE SpindleType::NONE
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_SPINDLE_RPM_MIN // $31
|
||||
# define DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_LASER_FULL_POWER
|
||||
# define DEFAULT_LASER_FULL_POWER 1000
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_SPINDLE_RPM_MAX // $30
|
||||
# define DEFAULT_SPINDLE_RPM_MAX 1000.0 // rpm
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_SPINDLE_FREQ
|
||||
# define DEFAULT_SPINDLE_FREQ 5000.0 // $33 Hz (extended set)
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_SPINDLE_OFF_VALUE
|
||||
# define DEFAULT_SPINDLE_OFF_VALUE 0.0 // $34 Percent of full period(extended set)
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_SPINDLE_MIN_VALUE
|
||||
# define DEFAULT_SPINDLE_MIN_VALUE 0.0 // $35 Percent of full period (extended set)
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_SPINDLE_MAX_VALUE
|
||||
# define DEFAULT_SPINDLE_MAX_VALUE 100.0 // $36 Percent of full period (extended set)
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_SPINDLE_DELAY_SPINUP
|
||||
# define DEFAULT_SPINDLE_DELAY_SPINUP 0
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_COOLANT_DELAY_TURNON
|
||||
# define DEFAULT_COOLANT_DELAY_TURNON 1.0
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_SPINDLE_DELAY_SPINDOWN
|
||||
# define DEFAULT_SPINDLE_DELAY_SPINDOWN 0
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_INVERT_SPINDLE_OUTPUT_PIN
|
||||
# define DEFAULT_INVERT_SPINDLE_OUTPUT_PIN 0
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_INVERT_SPINDLE_ENABLE_PIN
|
||||
# define DEFAULT_INVERT_SPINDLE_ENABLE_PIN 0
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_SPINDLE_ENABLE_OFF_WITH_ZERO_SPEED
|
||||
# define DEFAULT_SPINDLE_ENABLE_OFF_WITH_ZERO_SPEED 0
|
||||
#endif
|
||||
|
||||
// ================ user settings =====================
|
||||
#ifndef DEFAULT_USER_INT_80
|
||||
# define DEFAULT_USER_INT_80 0 // $80 User integer setting
|
||||
@@ -223,18 +175,6 @@
|
||||
# define SERVO_TIMER_INTERVAL 75.0 // Hz This is the update inveral in milliseconds
|
||||
#endif
|
||||
|
||||
#ifndef DYNAMIXEL_TXD
|
||||
# define DYNAMIXEL_TXD UNDEFINED_PIN
|
||||
#endif
|
||||
|
||||
#ifndef DYNAMIXEL_RXD
|
||||
# define DYNAMIXEL_RXD UNDEFINED_PIN
|
||||
#endif
|
||||
|
||||
#ifndef DYNAMIXEL_RTS
|
||||
# define DYNAMIXEL_RTS UNDEFINED_PIN
|
||||
#endif
|
||||
|
||||
// ================ User Digital I/O ==============================
|
||||
|
||||
#ifndef USER_DIGITAL_PIN_0
|
||||
|
@@ -64,18 +64,6 @@ const char* MACRO_BUTTON_2_PIN_DEFAULT = MACRO_BUTTON_2_PIN;
|
||||
# define MACRO_BUTTON_3_PIN UNDEFINED_PIN
|
||||
#endif
|
||||
const char* MACRO_BUTTON_3_PIN_DEFAULT = MACRO_BUTTON_3_PIN;
|
||||
#ifndef DYNAMIXEL_TXD
|
||||
# define DYNAMIXEL_TXD UNDEFINED_PIN
|
||||
#endif
|
||||
const char* DYNAMIXEL_TXD_DEFAULT = DYNAMIXEL_TXD;
|
||||
#ifndef DYNAMIXEL_RXD
|
||||
# define DYNAMIXEL_RXD UNDEFINED_PIN
|
||||
#endif
|
||||
const char* DYNAMIXEL_RXD_DEFAULT = DYNAMIXEL_RXD;
|
||||
#ifndef DYNAMIXEL_RTS
|
||||
# define DYNAMIXEL_RTS UNDEFINED_PIN
|
||||
#endif
|
||||
const char* DYNAMIXEL_RTS_DEFAULT = DYNAMIXEL_RTS;
|
||||
|
||||
#ifndef USER_DIGITAL_PIN_0
|
||||
# define USER_DIGITAL_PIN_0 UNDEFINED_PIN
|
||||
@@ -117,56 +105,6 @@ const char* USER_ANALOG_PIN_2_DEFAULT = USER_ANALOG_PIN_2;
|
||||
#endif
|
||||
const char* USER_ANALOG_PIN_3_DEFAULT = USER_ANALOG_PIN_3;
|
||||
|
||||
#ifndef SPINDLE_OUTPUT_PIN
|
||||
# define SPINDLE_OUTPUT_PIN UNDEFINED_PIN
|
||||
#endif
|
||||
const char* SPINDLE_OUTPUT_PIN_DEFAULT = SPINDLE_OUTPUT_PIN;
|
||||
|
||||
#ifndef SPINDLE_ENABLE_PIN
|
||||
# define SPINDLE_ENABLE_PIN UNDEFINED_PIN
|
||||
#endif
|
||||
const char* SPINDLE_ENABLE_PIN_DEFAULT = SPINDLE_ENABLE_PIN;
|
||||
|
||||
#ifndef SPINDLE_DIRECTION_PIN
|
||||
# define SPINDLE_DIRECTION_PIN UNDEFINED_PIN
|
||||
#endif
|
||||
const char* SPINDLE_DIRECTION_PIN_DEFAULT = SPINDLE_DIRECTION_PIN;
|
||||
|
||||
#ifndef SPINDLE_FORWARD_PIN
|
||||
# define SPINDLE_FORWARD_PIN UNDEFINED_PIN
|
||||
#endif
|
||||
const char* SPINDLE_FORWARD_PIN_DEFAULT = SPINDLE_FORWARD_PIN;
|
||||
|
||||
#ifndef SPINDLE_REVERSE_PIN
|
||||
# define SPINDLE_REVERSE_PIN UNDEFINED_PIN
|
||||
#endif
|
||||
const char* SPINDLE_REVERSE_PIN_DEFAULT = SPINDLE_REVERSE_PIN;
|
||||
|
||||
#ifndef LASER_OUTPUT_PIN
|
||||
# define LASER_OUTPUT_PIN UNDEFINED_PIN
|
||||
#endif
|
||||
const char* LASER_OUTPUT_PIN_DEFAULT = LASER_OUTPUT_PIN;
|
||||
|
||||
#ifndef LASER_ENABLE_PIN
|
||||
# define LASER_ENABLE_PIN UNDEFINED_PIN
|
||||
#endif
|
||||
const char* LASER_ENABLE_PIN_DEFAULT = LASER_ENABLE_PIN;
|
||||
|
||||
#ifndef VFD_RS485_TXD_PIN
|
||||
# define VFD_RS485_TXD_PIN UNDEFINED_PIN
|
||||
#endif
|
||||
const char* VFD_RS485_TXD_PIN_DEFAULT = VFD_RS485_TXD_PIN;
|
||||
|
||||
#ifndef VFD_RS485_RXD_PIN
|
||||
# define VFD_RS485_RXD_PIN UNDEFINED_PIN
|
||||
#endif
|
||||
const char* VFD_RS485_RXD_PIN_DEFAULT = VFD_RS485_RXD_PIN;
|
||||
|
||||
#ifndef VFD_RS485_RTS_PIN
|
||||
# define VFD_RS485_RTS_PIN UNDEFINED_PIN
|
||||
#endif
|
||||
const char* VFD_RS485_RTS_PIN_DEFAULT = VFD_RS485_RTS_PIN;
|
||||
|
||||
// We need settings.h for the settings classes
|
||||
#include "Grbl.h"
|
||||
#include "Settings.h"
|
||||
@@ -188,19 +126,6 @@ PinSetting* UserAnalogPin[4];
|
||||
|
||||
PinSetting* SDCardDetPin; // SDCARD_DET_PIN
|
||||
|
||||
PinSetting* SpindleForwardPin;
|
||||
PinSetting* SpindleReversePin;
|
||||
PinSetting* SpindleOutputPin;
|
||||
PinSetting* SpindleEnablePin;
|
||||
PinSetting* SpindleDirectionPin;
|
||||
|
||||
PinSetting* LaserOutputPin;
|
||||
PinSetting* LaserEnablePin;
|
||||
|
||||
PinSetting* VFDRS485TXDPin;
|
||||
PinSetting* VFDRS485RXDPin;
|
||||
PinSetting* VFDRS485RTSPin;
|
||||
|
||||
#include "Pin.h"
|
||||
|
||||
// Initialize the pin settings
|
||||
@@ -225,20 +150,4 @@ void make_pin_settings() {
|
||||
UserAnalogPin[3] = new PinSetting("UserAnalog/3/Pin", USER_ANALOG_PIN_3_DEFAULT);
|
||||
|
||||
SDCardDetPin = new PinSetting("SDCardDet/Pin", SDCARD_DET_PIN_DEFAULT);
|
||||
|
||||
SpindleForwardPin = new PinSetting("Spindle/Forward/Pin", SPINDLE_FORWARD_PIN_DEFAULT);
|
||||
SpindleReversePin = new PinSetting("Spindle/Reverse/Pin", SPINDLE_REVERSE_PIN_DEFAULT);
|
||||
|
||||
// Spindles:
|
||||
SpindleOutputPin = new PinSetting("Spindle/Output/Pin", SPINDLE_OUTPUT_PIN_DEFAULT);
|
||||
SpindleEnablePin = new PinSetting("Spindle/Enable/Pin", SPINDLE_ENABLE_PIN_DEFAULT);
|
||||
SpindleDirectionPin = new PinSetting("Spindle/Direction/Pin", SPINDLE_DIRECTION_PIN_DEFAULT);
|
||||
|
||||
LaserOutputPin = new PinSetting("Spindle/Laser/Output/Pin", LASER_OUTPUT_PIN_DEFAULT);
|
||||
LaserEnablePin = new PinSetting("Spindle/Laser/Enable/Pin", LASER_ENABLE_PIN_DEFAULT);
|
||||
|
||||
// XXX Move to VFD class
|
||||
VFDRS485TXDPin = new PinSetting("Spindle/VFD/TxD/Pin", VFD_RS485_TXD_PIN_DEFAULT); // VFD_RS485_TXD_PIN
|
||||
VFDRS485RXDPin = new PinSetting("Spindle/VFD/RxD/Pin", VFD_RS485_RXD_PIN_DEFAULT); // VFD_RS485_RXD_PIN
|
||||
VFDRS485RTSPin = new PinSetting("Spindle/VFD/RTS/Pin", VFD_RS485_RTS_PIN_DEFAULT); // VFD_RS485_RTS_PIN
|
||||
}
|
||||
|
@@ -16,8 +16,6 @@ FlagSetting* report_inches;
|
||||
|
||||
// TODO Settings - need to call limits_init;
|
||||
FlagSetting* homing_enable;
|
||||
// TODO Settings - also need to call my_spindle->init;
|
||||
IntSetting* laser_full_power;
|
||||
|
||||
IntSetting* status_mask;
|
||||
|
||||
@@ -26,20 +24,7 @@ FloatSetting* homing_seek_rate;
|
||||
FloatSetting* homing_debounce;
|
||||
FloatSetting* homing_pulloff;
|
||||
AxisMaskSetting* homing_cycle[MAX_N_AXIS];
|
||||
FloatSetting* spindle_pwm_freq;
|
||||
FloatSetting* rpm_max;
|
||||
FloatSetting* rpm_min;
|
||||
FloatSetting* spindle_delay_spinup;
|
||||
FloatSetting* spindle_delay_spindown;
|
||||
FloatSetting* coolant_start_delay;
|
||||
FlagSetting* spindle_enbl_off_with_zero_speed;
|
||||
FlagSetting* spindle_enable_invert;
|
||||
FlagSetting* spindle_output_invert;
|
||||
|
||||
FloatSetting* spindle_pwm_off_value;
|
||||
FloatSetting* spindle_pwm_min_value;
|
||||
FloatSetting* spindle_pwm_max_value;
|
||||
IntSetting* spindle_pwm_bit_precision;
|
||||
|
||||
EnumSetting* spindle_type;
|
||||
|
||||
@@ -107,14 +92,6 @@ static bool postMotorSetting(char* value) {
|
||||
|
||||
static bool checkSpindleChange(char* val) {
|
||||
if (!val) {
|
||||
// if not in disable (M5) ...
|
||||
if (gc_state.modal.spindle != SpindleState::Disable) {
|
||||
gc_state.modal.spindle = SpindleState::Disable;
|
||||
if (spindle->use_delays && spindle_delay_spindown->get() != 0) { // old spindle
|
||||
vTaskDelay(spindle_delay_spindown->get() * 1000);
|
||||
}
|
||||
grbl_msg_sendf(CLIENT_ALL, MsgLevel::Info, "Spindle turned off with setting change");
|
||||
}
|
||||
gc_state.spindle_speed = 0; // Set S value to 0
|
||||
Spindles::Spindle::select(); // get new spindle
|
||||
return true;
|
||||
@@ -163,38 +140,13 @@ void make_settings() {
|
||||
spindle_type =
|
||||
new EnumSetting(NULL, EXTENDED, WG, NULL, "Spindle/Type", static_cast<int8_t>(SPINDLE_TYPE), &spindleTypes, checkSpindleChange);
|
||||
|
||||
spindle_pwm_max_value =
|
||||
new FloatSetting(EXTENDED, WG, "36", "Spindle/PWM/Max", DEFAULT_SPINDLE_MAX_VALUE, 0.0, 100.0, checkSpindleChange);
|
||||
spindle_pwm_min_value =
|
||||
new FloatSetting(EXTENDED, WG, "35", "Spindle/PWM/Min", DEFAULT_SPINDLE_MIN_VALUE, 0.0, 100.0, checkSpindleChange);
|
||||
spindle_pwm_off_value = new FloatSetting(
|
||||
EXTENDED, WG, "34", "Spindle/PWM/Off", DEFAULT_SPINDLE_OFF_VALUE, 0.0, 100.0, checkSpindleChange); // these are percentages
|
||||
// IntSetting spindle_pwm_bit_precision(EXTENDED, WG, "Spindle/PWM/Precision", DEFAULT_SPINDLE_BIT_PRECISION, 1, 16);
|
||||
spindle_pwm_freq = new FloatSetting(EXTENDED, WG, "33", "Spindle/PWM/Frequency", DEFAULT_SPINDLE_FREQ, 0, 100000, checkSpindleChange);
|
||||
spindle_output_invert = new FlagSetting(GRBL, WG, NULL, "Spindle/PWM/Invert", DEFAULT_INVERT_SPINDLE_OUTPUT_PIN, checkSpindleChange);
|
||||
|
||||
spindle_delay_spinup =
|
||||
new FloatSetting(EXTENDED, WG, NULL, "Spindle/Delay/SpinUp", DEFAULT_SPINDLE_DELAY_SPINUP, 0, 30, checkSpindleChange);
|
||||
spindle_delay_spindown =
|
||||
new FloatSetting(EXTENDED, WG, NULL, "Spindle/Delay/SpinDown", DEFAULT_SPINDLE_DELAY_SPINUP, 0, 30, checkSpindleChange);
|
||||
coolant_start_delay = new FloatSetting(EXTENDED, WG, NULL, "Coolant/Delay/TurnOn", DEFAULT_COOLANT_DELAY_TURNON, 0, 30);
|
||||
|
||||
spindle_enbl_off_with_zero_speed =
|
||||
new FlagSetting(GRBL, WG, NULL, "Spindle/Enable/OffWithSpeed", DEFAULT_SPINDLE_ENABLE_OFF_WITH_ZERO_SPEED, checkSpindleChange);
|
||||
|
||||
spindle_enable_invert = new FlagSetting(GRBL, WG, NULL, "Spindle/Enable/Invert", DEFAULT_INVERT_SPINDLE_ENABLE_PIN, checkSpindleChange);
|
||||
|
||||
// GRBL Non-numbered settings
|
||||
startup_line_0 = new StringSetting(EXTENDED, WG, "N0", "GCode/Line0", "", checkStartupLine);
|
||||
startup_line_1 = new StringSetting(EXTENDED, WG, "N1", "GCode/Line1", "", checkStartupLine);
|
||||
|
||||
// GRBL Numbered Settings
|
||||
laser_full_power = new IntSetting(EXTENDED, WG, NULL, "Laser/FullPower", DEFAULT_LASER_FULL_POWER, 0, 10000, checkSpindleChange);
|
||||
|
||||
// TODO Settings - also need to call my_spindle->init();
|
||||
rpm_min = new FloatSetting(GRBL, WG, "31", "GCode/MinS", DEFAULT_SPINDLE_RPM_MIN, 0, 100000, checkSpindleChange);
|
||||
rpm_max = new FloatSetting(GRBL, WG, "30", "GCode/MaxS", DEFAULT_SPINDLE_RPM_MAX, 0, 100000, checkSpindleChange);
|
||||
|
||||
homing_pulloff = new FloatSetting(GRBL, WG, "27", "Homing/Pulloff", DEFAULT_HOMING_PULLOFF, 0, 1000);
|
||||
homing_debounce = new FloatSetting(GRBL, WG, "26", "Homing/Debounce", DEFAULT_HOMING_DEBOUNCE_DELAY, 0, 10000);
|
||||
homing_seek_rate = new FloatSetting(GRBL, WG, "25", "Homing/Seek", DEFAULT_HOMING_SEEK_RATE, 0, 10000);
|
||||
|
@@ -14,7 +14,6 @@ extern AxisMaskSetting* homing_cycle[MAX_N_AXIS];
|
||||
|
||||
extern FlagSetting* report_inches;
|
||||
extern FlagSetting* homing_enable;
|
||||
extern IntSetting* laser_full_power;
|
||||
|
||||
extern IntSetting* status_mask;
|
||||
|
||||
@@ -22,20 +21,9 @@ extern FloatSetting* homing_feed_rate;
|
||||
extern FloatSetting* homing_seek_rate;
|
||||
extern FloatSetting* homing_debounce;
|
||||
extern FloatSetting* homing_pulloff;
|
||||
extern FloatSetting* spindle_pwm_freq;
|
||||
extern FloatSetting* rpm_max;
|
||||
extern FloatSetting* rpm_min;
|
||||
extern FloatSetting* spindle_delay_spinup;
|
||||
extern FloatSetting* spindle_delay_spindown;
|
||||
extern FloatSetting* coolant_start_delay;
|
||||
extern FlagSetting* spindle_enbl_off_with_zero_speed;
|
||||
extern FlagSetting* spindle_enable_invert;
|
||||
extern FlagSetting* spindle_output_invert;
|
||||
|
||||
extern FloatSetting* spindle_pwm_off_value;
|
||||
extern FloatSetting* spindle_pwm_min_value;
|
||||
extern FloatSetting* spindle_pwm_max_value;
|
||||
extern IntSetting* spindle_pwm_bit_precision;
|
||||
extern IntSetting* spindle_pwm_bit_precision;
|
||||
|
||||
extern EnumSetting* spindle_type;
|
||||
|
||||
@@ -60,17 +48,3 @@ extern PinSetting* UserDigitalPin[4];
|
||||
extern PinSetting* UserAnalogPin[4];
|
||||
|
||||
extern PinSetting* SDCardDetPin; // SDCARD_DET_PIN
|
||||
|
||||
// Spindle pins:
|
||||
extern PinSetting* SpindleOutputPin;
|
||||
extern PinSetting* SpindleEnablePin;
|
||||
extern PinSetting* SpindleDirectionPin;
|
||||
extern PinSetting* SpindleForwardPin;
|
||||
extern PinSetting* SpindleReversePin;
|
||||
|
||||
extern PinSetting* LaserOutputPin;
|
||||
extern PinSetting* LaserEnablePin;
|
||||
|
||||
extern PinSetting* VFDRS485TXDPin; // VFD_RS485_TXD_PIN
|
||||
extern PinSetting* VFDRS485RXDPin; // VFD_RS485_RXD_PIN
|
||||
extern PinSetting* VFDRS485RTSPin; // VFD_RS485_RTS_PIN
|
||||
|
Reference in New Issue
Block a user