grblHAL core  20241107
settings.h File Reference
#include "config.h"
#include "system.h"
#include "plugins.h"

Go to the source code of this file.

Data Structures

union  settings_restore_t
 
union  settingflags_t
 
union  probeflags_t
 
union  reportmask_t
 
union  safety_door_setting_flags_t
 
struct  safety_door_settings_t
 
union  parking_setting_flags_t
 
struct  parking_settings_t
 
struct  position_pid_t
 
union  homing_settings_flags_t
 
union  homing_flags_t
 
struct  homing_dual_axis_t
 
struct  homing_settings_t
 
struct  stepper_settings_t
 
struct  axis_settings_t
 
union  limit_settings_flags_t
 
struct  limit_settings_t
 
union  fs_options_t
 
union  offset_lock_t
 
union  ioport_bus_t
 
struct  ioport_signals_t
 
struct  tool_change_settings_t
 
struct  settings_t
 
struct  setting_group_detail
 
union  setting_limit_t
 
union  setting_detail_flags_t
 
struct  setting_detail
 
struct  setting_descr_t
 
union  settings_changed_flags_t
 
struct  setting_details
 

Macros

#define SETTINGS_VERSION   22
 
#define AXIS_SETTINGS_INCREMENT   10
 
#define ENCODER_N_SETTINGS_MAX   5
 
#define ENCODER_SETTINGS_INCREMENT   10
 
#define SETTINGS_HARD_RESET_REQUIRED   "\\n\\nNOTE: A hard reset of the controller is required after changing this setting."
 
#define PASSWORD_MASK   "********"
 

Typedefs

typedef char stored_line_t[MAX_STORED_LINE_LENGTH]
 
typedef struct setting_group_detail setting_group_detail_t
 
typedef struct setting_detail setting_detail_t
 
typedef status_code_t(* setting_set_int_ptr) (setting_id_t id, uint_fast16_t value)
 
typedef status_code_t(* setting_set_float_ptr) (setting_id_t id, float value)
 
typedef status_code_t(* setting_set_string_ptr) (setting_id_t id, char *value)
 
typedef uint32_t(* setting_get_int_ptr) (setting_id_t id)
 
typedef float(* setting_get_float_ptr) (setting_id_t id)
 
typedef char *(* setting_get_string_ptr) (setting_id_t id)
 
typedef bool(* setting_output_ptr) (const setting_detail_t *setting, uint_fast16_t offset, void *data)
 
typedef void(* setting_changed_ptr) (setting_id_t id)
 
typedef void(* settings_changed_ptr) (settings_t *settings, settings_changed_flags_t changed)
 Pointer to callback function to be called when settings are loaded or changed. More...
 
typedef void(* driver_settings_load_ptr) (void)
 
typedef void(* driver_settings_save_ptr) (void)
 
typedef void(* driver_settings_restore_ptr) (void)
 
typedef bool(* driver_settings_iterator_ptr) (const setting_detail_t *setting, setting_output_ptr callback, void *data)
 
typedef struct setting_details setting_details_t
 
typedef setting_details_t *(* on_get_settings_ptr) (void)
 

Enumerations

enum  setting_id_t {
  Setting_PulseMicroseconds = 0 , Setting_StepperIdleLockTime = 1 , Setting_StepInvertMask = 2 , Setting_DirInvertMask = 3 ,
  Setting_InvertStepperEnable = 4 , Setting_LimitPinsInvertMask = 5 , Setting_InvertProbePin = 6 , Setting_SpindlePWMBehaviour = 7 ,
  Setting_GangedDirInvertMask = 8 , Setting_SpindlePWMOptions = 9 , Setting_StatusReportMask = 10 , Setting_JunctionDeviation = 11 ,
  Setting_ArcTolerance = 12 , Setting_ReportInches = 13 , Setting_ControlInvertMask = 14 , Setting_CoolantInvertMask = 15 ,
  Setting_SpindleInvertMask = 16 , Setting_ControlPullUpDisableMask = 17 , Setting_LimitPullUpDisableMask = 18 , Setting_ProbePullUpDisable = 19 ,
  Setting_SoftLimitsEnable = 20 , Setting_HardLimitsEnable = 21 , Setting_HomingEnable = 22 , Setting_HomingDirMask = 23 ,
  Setting_HomingFeedRate = 24 , Setting_HomingSeekRate = 25 , Setting_HomingDebounceDelay = 26 , Setting_HomingPulloff = 27 ,
  Setting_G73Retract = 28 , Setting_PulseDelayMicroseconds = 29 , Setting_RpmMax = 30 , Setting_RpmMin = 31 ,
  Setting_Mode = 32 , Setting_PWMFreq = 33 , Setting_PWMOffValue = 34 , Setting_PWMMinValue = 35 ,
  Setting_PWMMaxValue = 36 , Setting_SteppersEnergize = 37 , Setting_SpindlePPR = 38 , Setting_EnableLegacyRTCommands = 39 ,
  Setting_JogSoftLimited = 40 , Setting_ParkingEnable = 41 , Setting_ParkingAxis = 42 , Setting_HomingLocateCycles = 43 ,
  Setting_HomingCycle_1 = 44 , Setting_HomingCycle_2 = 45 , Setting_HomingCycle_3 = 46 , Setting_HomingCycle_4 = 47 ,
  Setting_HomingCycle_5 = 48 , Setting_HomingCycle_6 = 49 , Setting_JogStepSpeed = 50 , Setting_JogSlowSpeed = 51 ,
  Setting_JogFastSpeed = 52 , Setting_JogStepDistance = 53 , Setting_JogSlowDistance = 54 , Setting_JogFastDistance = 55 ,
  Setting_ParkingPulloutIncrement = 56 , Setting_ParkingPulloutRate = 57 , Setting_ParkingTarget = 58 , Setting_ParkingFastRate = 59 ,
  Setting_RestoreOverrides = 60 , Setting_DoorOptions = 61 , Setting_SleepEnable = 62 , Setting_HoldActions = 63 ,
  Setting_ForceInitAlarm = 64 , Setting_ProbingFeedOverride = 65 , Setting_LinearSpindlePiece1 = 66 , Setting_LinearSpindlePiece2 = 67 ,
  Setting_LinearSpindlePiece3 = 68 , Setting_LinearSpindlePiece4 = 69 , Setting_NetworkServices = 70 , Setting_BlueToothDeviceName = 71 ,
  Setting_BlueToothServiceName = 72 , Setting_WifiMode = 73 , Setting_WiFi_STA_SSID = 74 , Setting_WiFi_STA_Password = 75 ,
  Setting_WiFi_AP_SSID = 76 , Setting_WiFi_AP_Password = 77 , Setting_Wifi_AP_Country = 78 , Setting_Wifi_AP_Channel = 79 ,
  Setting_SpindlePGain = 80 , Setting_SpindleIGain = 81 , Setting_SpindleDGain = 82 , Setting_SpindleDeadband = 83 ,
  Setting_SpindleMaxError = 84 , Setting_SpindleIMaxError = 85 , Setting_SpindleDMaxError = 86 , Setting_PositionPGain = 90 ,
  Setting_PositionIGain = 91 , Setting_PositionDGain = 92 , Setting_PositionDeadband = 93 , Setting_PositionMaxError = 94 ,
  Setting_PositionIMaxError = 95 , Setting_PositionDMaxError = 96 , Setting_AxisSettingsBase = 100 , Setting_AxisSettingsMax = Setting_AxisSettingsBase + AXIS_SETTINGS_INCREMENT * 9 + N_AXIS ,
  Setting_AxisSettingsBase2 = 200 , Setting_AxisSettingsMax2 = Setting_AxisSettingsBase2 + AXIS_SETTINGS_INCREMENT * 9 + N_AXIS , Setting_Hostname = 300 , Setting_IpMode = 301 ,
  Setting_IpAddress = 302 , Setting_Gateway = 303 , Setting_NetMask = 304 , Setting_TelnetPort = 305 ,
  Setting_HttpPort = 306 , Setting_WebSocketPort = 307 , Setting_FtpPort = 308 , Setting_Hostname2 = 310 ,
  Setting_IpMode2 = 311 , Setting_IpAddress2 = 312 , Setting_Gateway2 = 313 , Setting_NetMask2 = 314 ,
  Setting_TelnetPort2 = 315 , Setting_HttpPort2 = 316 , Setting_WebSocketPort2 = 317 , Setting_FtpPort2 = 318 ,
  Setting_Hostname3 = 320 , Setting_IpMode3 = 321 , Setting_IpAddress3 = 322 , Setting_Gateway3 = 323 ,
  Setting_NetMask3 = 324 , Setting_TelnetPort3 = 325 , Setting_HttpPort3 = 326 , Setting_WebSocketPort3 = 327 ,
  Setting_FtpPort3 = 328 , Setting_AdminPassword = 330 , Setting_UserPassword = 331 , Setting_NTPServerURI = 332 ,
  Setting_NTPServerURI_2 = 333 , Setting_NTPServerURI_3 = 334 , Setting_Timezone = 335 , Setting_DSTActive = 336 ,
  Setting_Wifi_AP_BSSID = 337 , Setting_TrinamicDriver = 338 , Setting_TrinamicHoming = 339 , Setting_SpindleAtSpeedTolerance = 340 ,
  Setting_ToolChangeMode = 341 , Setting_ToolChangeProbingDistance = 342 , Setting_ToolChangeFeedRate = 343 , Setting_ToolChangeSeekRate = 344 ,
  Setting_ToolChangePulloffRate = 345 , Setting_ToolChangeRestorePosition = 346 , Setting_DualAxisLengthFailPercent = 347 , Setting_DualAxisLengthFailMin = 348 ,
  Setting_DualAxisLengthFailMax = 349 , Setting_THC_Mode = 350 , Setting_THC_Delay = 351 , Setting_THC_Threshold = 352 ,
  Setting_THC_PGain = 353 , Setting_THC_IGain = 354 , Setting_THC_DGain = 355 , Setting_THC_VADThreshold = 356 ,
  Setting_THC_VoidOverride = 357 , Setting_Arc_FailTimeout = 358 , Setting_Arc_RetryDelay = 359 , Setting_Arc_MaxRetries = 360 ,
  Setting_Arc_VoltageScale = 361 , Setting_Arc_VoltageOffset = 362 , Setting_Arc_HeightPerVolt = 363 , Setting_Arc_OkHighVoltage = 364 ,
  Setting_Arc_OkLowVoltage = 365 , Setting_Arc_VoltagePort = 366 , Setting_Arc_OkPort = 367 , Setting_THC_CutterDownPort = 368 ,
  Setting_THC_CutterUpPort = 369 , Settings_IoPort_InvertIn = 370 , Settings_IoPort_Pullup_Disable = 371 , Settings_IoPort_InvertOut = 372 ,
  Settings_IoPort_OD_Enable = 373 , Settings_ModBus_BaudRate = 374 , Settings_ModBus_RXTimeout = 375 , Settings_RotaryAxes = 376 ,
  Setting_BlueToothInitOK = 377 , Setting_CoolantOnDelay = 378 , Setting_CoolantOffDelay = 379 , Setting_CoolantMinTemp = 380 ,
  Setting_CoolantMaxTemp = 381 , Setting_CoolantOffset = 382 , Setting_CoolantGain = 383 , Setting_DisableG92Persistence = 384 ,
  Setting_BlueToothStateInput = 385 , Setting_FanPort0 = 386 , Setting_FanPort1 = 387 , Setting_FanPort2 = 388 ,
  Setting_FanPort3 = 389 , Setting_CoolantTempPort = 390 , Setting_CoolantOkPort = 391 , Setting_DoorSpindleOnDelay = 392 ,
  Setting_DoorCoolantOnDelay = 393 , Setting_SpindleOnDelay = 394 , Setting_SpindleType = 395 , Setting_WebUiTimeout = 396 ,
  Setting_WebUiAutoReportInterval = 397 , Setting_PlannerBlocks = 398 , Setting_CANbus_BaudRate = 399 , Setting_EncoderSettingsBase = 400 ,
  Setting_EncoderSettingsMax = 449 , Setting_UserDefined_0 = 450 , Setting_UserDefined_1 = 451 , Setting_UserDefined_2 = 452 ,
  Setting_UserDefined_3 = 453 , Setting_UserDefined_4 = 454 , Setting_UserDefined_5 = 455 , Setting_UserDefined_6 = 456 ,
  Setting_UserDefined_7 = 457 , Setting_UserDefined_8 = 458 , Setting_UserDefined_9 = 459 , Setting_VFD_ModbusAddress = 460 ,
  Setting_VFD_RPM_Hz = 461 , Setting_VFD_10 = 462 , Setting_VFD_11 = 463 , Setting_VFD_12 = 464 ,
  Setting_VFD_13 = 465 , Setting_VFD_14 = 466 , Setting_VFD_15 = 467 , Setting_VFD_16 = 468 ,
  Setting_VFD_17 = 469 , Setting_VFD_18 = 470 , Setting_VFD_19 = 471 , Setting_VFD_20 = 472 ,
  Setting_VFD_21 = 473 , Setting_VFD_ModbusAddress0 = 476 , Setting_VFD_ModbusAddress1 = 477 , Setting_VFD_ModbusAddress2 = 478 ,
  Setting_VFD_ModbusAddress3 = 479 , Setting_Fan0OffDelay = 480 , Setting_AutoReportInterval = 481 , Setting_TimeZoneOffset = 482 ,
  Setting_FanToSpindleLink = 483 , Setting_UnlockAfterEStop = 484 , Setting_EnableToolPersistence = 485 , Setting_OffsetLock = 486 ,
  Setting_Spindle_OnPort = 487 , Setting_Spindle_DirPort = 488 , Setting_Spindle_PWMPort = 489 , Setting_Macro0 = 490 ,
  Setting_MacroBase = Setting_Macro0 , Setting_Macro1 = 491 , Setting_Macro2 = 492 , Setting_Macro3 = 493 ,
  Setting_Macro4 = 494 , Setting_Macro5 = 495 , Setting_Macro6 = 496 , Setting_Macro7 = 497 ,
  Setting_Macro8 = 498 , Setting_Macro9 = 499 , Setting_MacroPort0 = 500 , Setting_MacroPortBase = Setting_MacroPort0 ,
  Setting_MacroPort1 = 501 , Setting_MacroPort2 = 502 , Setting_MacroPort3 = 503 , Setting_MacroPort4 = 504 ,
  Setting_MacroPort5 = 505 , Setting_MacroPort6 = 506 , Setting_MacroPort7 = 507 , Setting_MacroPort8 = 508 ,
  Setting_MacroPort9 = 509 , Setting_SpindleEnable0 = 510 , Setting_SpindleEnable1 = 511 , Setting_SpindleEnable2 = 512 ,
  Setting_SpindleEnable3 = 513 , Setting_SpindleEnable4 = 514 , Setting_SpindleEnable5 = 515 , Setting_SpindleEnable6 = 516 ,
  Setting_SpindleEnable7 = 517 , Setting_EncoderSpindle = 519 , Setting_SpindleToolStart0 = 520 , Setting_SpindleToolStart1 = 521 ,
  Setting_SpindleToolStart2 = 522 , Setting_SpindleToolStart3 = 523 , Setting_SpindleToolStart4 = 524 , Setting_SpindleToolStart5 = 525 ,
  Setting_SpindleToolStart6 = 526 , Setting_SpindleToolStart7 = 527 , Setting_MQTTBrokerIpAddress = 530 , Setting_MQTTBrokerPort = 531 ,
  Setting_MQTTBrokerUserName = 532 , Setting_MQTTBrokerPassword = 533 , Setting_NGCDebugOut = 534 , Setting_NetworkMAC = 535 ,
  Setting_RGB_StripLengt0 = 536 , Setting_RGB_StripLengt1 = 537 , Setting_RotaryWrap = 538 , Setting_Panel_SpindleSpeed = 540 ,
  Setting_Panel_ModbusAddress = 541 , Setting_Panel_UpdateInterval = 542 , Setting_Panel_JogSpeed_x1 = 543 , Setting_Panel_JogSpeed_x10 = 544 ,
  Setting_Panel_JogSpeed_x100 = 545 , Setting_Panel_JogSpeed_Keypad = 546 , Setting_Panel_JogDistance_x1 = 547 , Setting_Panel_JogDistance_x10 = 548 ,
  Setting_Panel_JogDistance_x100 = 549 , Setting_Panel_JogDistance_Keypad = 550 , Setting_Panel_JogAccelRamp = 551 , Setting_Panel_Encoder0_Mode = 552 ,
  Setting_Panel_Encoder0_Cpd = 553 , Setting_Panel_Encoder1_Mode = 554 , Setting_Panel_Encoder1_Cpd = 555 , Setting_Panel_Encoder2_Mode = 556 ,
  Setting_Panel_Encoder2_Cpd = 557 , Setting_Panel_Encoder3_Mode = 558 , Setting_Panel_Encoder3_Cpd = 559 , Setting_Panel_SettingsMax = 579 ,
  Setting_ButtonAction0 = 590 , Setting_ButtonActionBase = Setting_ButtonAction0 , Setting_ButtonAction1 = 591 , Setting_ButtonAction2 = 592 ,
  Setting_ButtonAction3 = 593 , Setting_ButtonAction4 = 594 , Setting_ButtonAction5 = 595 , Setting_ButtonAction6 = 596 ,
  Setting_ButtonAction7 = 597 , Setting_ButtonAction8 = 598 , Setting_ButtonAction9 = 599 , Setting_ModbusTCPBase = 600 ,
  Setting_ModbusIpAddressBase = Setting_ModbusTCPBase + Setting_ModbusIpAddress , Setting_ModbusPortBase = Setting_ModbusTCPBase + Setting_ModbusPort , Setting_ModbusIdBase = Setting_ModbusTCPBase + Setting_ModbusId , Setting_ModbusTCPMax = 639 ,
  Setting_Kinematics0 = 640 , Setting_Kinematics1 = 641 , Setting_Kinematics2 = 642 , Setting_Kinematics3 = 643 ,
  Setting_Kinematics4 = 644 , Setting_Kinematics5 = 645 , Setting_Kinematics6 = 646 , Setting_Kinematics7 = 647 ,
  Setting_Kinematics8 = 648 , Setting_Kinematics9 = 649 , Setting_FSOptions = 650 , Setting_Stepper1 = 651 ,
  Setting_Stepper2 = 652 , Setting_Stepper3 = 653 , Setting_Stepper4 = 654 , Setting_Stepper5 = 655 ,
  Setting_Stepper6 = 656 , Setting_Stepper7 = 657 , Setting_Stepper8 = 658 , Setting_Stepper9 = 659 ,
  Setting_Stepper10 = 660 , Setting_Stepper11 = 661 , Setting_Stepper12 = 662 , Setting_Stepper13 = 663 ,
  Setting_Stepper14 = 664 , Setting_Stepper15 = 665 , Setting_Stepper16 = 666 , Setting_Stepper17 = 667 ,
  Setting_Stepper18 = 668 , Setting_Stepper19 = 669 , Setting_Stepper20 = 670 , Setting_HomePinsInvertMask = 671 ,
  Setting_Reserved672 = 672 , Setting_HoldCoolantOnDelay = 673 , Setting_SpindleInvertMask1 = 716 , Setting_RpmMax1 = 730 ,
  Setting_RpmMin1 = 731 , Setting_Mode1 = 732 , Setting_PWMFreq1 = 733 , Setting_PWMOffValue1 = 734 ,
  Setting_PWMMinValue1 = 735 , Setting_PWMMaxValue1 = 736 , Setting_LinearSpindle1Piece1 = 737 , Setting_LinearSpindle1Piece2 = 738 ,
  Setting_LinearSpindle1Piece3 = 739 , Setting_LinearSpindle1Piece4 = 740 , Setting_Action0 = 750 , Setting_ActionBase = Setting_Action0 ,
  Setting_Action1 = 751 , Setting_Action2 = 752 , Setting_Action3 = 753 , Setting_Action4 = 754 ,
  Setting_Action5 = 755 , Setting_Action6 = 756 , Setting_Action7 = 757 , Setting_Action8 = 758 ,
  Setting_Action9 = 759 , Setting_ActionPort0 = 760 , Setting_ActionPortBase = Setting_ActionPort0 , Setting_ActionPort1 = 761 ,
  Setting_ActionPort2 = 762 , Setting_ActionPort3 = 763 , Setting_ActionPort4 = 764 , Setting_ActionPort5 = 765 ,
  Setting_ActionPort6 = 766 , Setting_ActionPort7 = 767 , Setting_ActionPort8 = 768 , Setting_ActionPort9 = 769 ,
  Setting_SpindleOffsetX = 770 , Setting_SpindleOffsetY = 771 , Setting_SettingsMax , Setting_SettingsAll = Setting_SettingsMax ,
  Setting_AxisStepsPerMM = Setting_AxisSettingsBase , Setting_AxisMaxRate = Setting_AxisSettingsBase + AXIS_SETTINGS_INCREMENT , Setting_AxisAcceleration = Setting_AxisSettingsBase + 2 * AXIS_SETTINGS_INCREMENT , Setting_AxisMaxTravel = Setting_AxisSettingsBase + 3 * AXIS_SETTINGS_INCREMENT ,
  Setting_AxisStepperCurrent = Setting_AxisSettingsBase + 4 * AXIS_SETTINGS_INCREMENT , Setting_AxisMicroSteps = Setting_AxisSettingsBase + 5 * AXIS_SETTINGS_INCREMENT , Setting_AxisBacklash = Setting_AxisSettingsBase + 6 * AXIS_SETTINGS_INCREMENT , Setting_AxisAutoSquareOffset = Setting_AxisSettingsBase + 7 * AXIS_SETTINGS_INCREMENT ,
  Setting_AxisHomingFeedRate = Setting_AxisSettingsBase + 8 * AXIS_SETTINGS_INCREMENT , Setting_AxisHomingSeekRate = Setting_AxisSettingsBase + 9 * AXIS_SETTINGS_INCREMENT , Setting_AxisExtended0 = Setting_AxisSettingsBase2 , Setting_AxisExtended1 = Setting_AxisSettingsBase2 + AXIS_SETTINGS_INCREMENT ,
  Setting_AxisExtended2 = Setting_AxisSettingsBase2 + 2 * AXIS_SETTINGS_INCREMENT , Setting_AxisExtended3 = Setting_AxisSettingsBase2 + 3 * AXIS_SETTINGS_INCREMENT , Setting_AxisExtended4 = Setting_AxisSettingsBase2 + 4 * AXIS_SETTINGS_INCREMENT , Setting_AxisExtended5 = Setting_AxisSettingsBase2 + 5 * AXIS_SETTINGS_INCREMENT ,
  Setting_AxisExtended6 = Setting_AxisSettingsBase2 + 6 * AXIS_SETTINGS_INCREMENT , Setting_AxisExtended7 = Setting_AxisSettingsBase2 + 7 * AXIS_SETTINGS_INCREMENT , Setting_AxisExtended8 = Setting_AxisSettingsBase2 + 8 * AXIS_SETTINGS_INCREMENT , Setting_AxisExtended9 = Setting_AxisSettingsBase2 + 9 * AXIS_SETTINGS_INCREMENT ,
  Setting_EncoderModeBase = Setting_EncoderSettingsBase + Setting_EncoderMode , Setting_EncoderCPRBase = Setting_EncoderSettingsBase + Setting_EncoderCPR , Setting_EncoderCPDBase = Setting_EncoderSettingsBase + Setting_EncoderCPD , Setting_EncoderDblClickWindowBase = Setting_EncoderSettingsBase + Setting_EncoderDblClickWindow
}
 
enum  toolchange_mode_t {
  ToolChange_Disabled = 0 , ToolChange_Manual , ToolChange_Manual_G59_3 , ToolChange_SemiAutomatic ,
  ToolChange_Ignore
}
 
enum  setting_group_t {
  Group_Root = 0 , Group_General , Group_ControlSignals , Group_Limits ,
  Group_Limits_DualAxis , Group_Coolant , Group_Spindle , Group_Spindle_Sync ,
  Group_Spindle_ClosedLoop , Group_Toolchange , Group_Plasma , Group_Homing ,
  Group_Probing , Group_SafetyDoor , Group_Jogging , Group_Networking ,
  Group_Networking_Wifi , Group_Bluetooth , Group_AuxPorts , Group_ModBus ,
  Group_ModBusUnit0 , Group_ModBusUnit1 , Group_ModBusUnit2 , Group_ModBusUnit3 ,
  Group_ModBusUnit4 , Group_ModBusUnit5 , Group_ModBusUnit6 , Group_ModBusUnit7 ,
  Group_Encoders , Group_Encoder0 , Group_Encoder1 , Group_Encoder2 ,
  Group_Encoder3 , Group_Encoder4 , Group_UserSettings , Group_Stepper ,
  Group_MotorDriver , Group_VFD , Group_CANbus , Group_Embroidery ,
  Group_Panel , Group_Kinematics , Group_Axis , Group_Axis0 ,
  Group_XAxis = Group_Axis0 , Group_YAxis , Group_ZAxis , Group_Unknown = 99 ,
  Group_All = Group_Root
}
 
enum  setting_datatype_t {
  Format_Bool = 0 , Format_Bitfield , Format_XBitfield , Format_RadioButtons ,
  Format_AxisMask , Format_Integer , Format_Decimal , Format_String ,
  Format_Password , Format_IPv4 , Format_Int8 , Format_Int16
}
 
enum  setting_type_t {
  Setting_NonCore = 0 , Setting_NonCoreFn , Setting_IsExtended , Setting_IsExtendedFn ,
  Setting_IsLegacy , Setting_IsLegacyFn , Setting_IsExpanded , Setting_IsExpandedFn
}
 

Functions

void settings_clear (void)
 
void settings_init ()
 
void settings_write_global (void)
 
void settings_restore (settings_restore_t restore_flags)
 
status_code_t settings_store_setting (setting_id_t setting, char *svalue)
 
void settings_write_startup_line (uint8_t idx, char *line)
 
bool settings_read_startup_line (uint8_t idx, char *line)
 
void settings_write_build_info (char *line)
 
bool settings_read_build_info (char *line)
 
void settings_write_coord_data (coord_system_id_t id, float(*coord_data)[N_AXIS])
 
bool settings_read_coord_data (coord_system_id_t id, float(*coord_data)[N_AXIS])
 
bool settings_override_acceleration (uint8_t axis, float acceleration)
 
void settings_register (setting_details_t *details)
 
setting_details_tsettings_get_details (void)
 
bool settings_is_group_available (setting_group_t group)
 
bool settings_iterator (const setting_detail_t *setting, setting_output_ptr callback, void *data)
 
const setting_detail_tsetting_get_details (setting_id_t id, setting_details_t **set)
 
const char * setting_get_description (setting_id_t id)
 
setting_datatype_t setting_datatype_to_external (setting_datatype_t datatype)
 
setting_group_t settings_normalize_group (setting_group_t group)
 
const setting_group_detail_tsetting_get_group_details (setting_group_t id)
 
char * setting_get_value (const setting_detail_t *setting, uint_fast16_t offset)
 
uint32_t setting_get_int_value (const setting_detail_t *setting, uint_fast16_t offset)
 
float setting_get_float_value (const setting_detail_t *setting, uint_fast16_t offset)
 
setting_id_t settings_get_axis_base (setting_id_t id, uint_fast8_t *idx)
 
bool setting_is_list (const setting_detail_t *setting)
 
bool setting_is_integer (const setting_detail_t *setting)
 
void setting_remove_elements (setting_id_t id, uint32_t mask)
 
bool settings_add_spindle_type (const char *type)
 
limit_signals_t settings_get_homing_source (void)
 

Variables

const settings_restore_t settings_all
 
settings_t settings
 

Macro Definition Documentation

◆ AXIS_SETTINGS_INCREMENT

#define AXIS_SETTINGS_INCREMENT   10

◆ ENCODER_N_SETTINGS_MAX

#define ENCODER_N_SETTINGS_MAX   5

◆ ENCODER_SETTINGS_INCREMENT

#define ENCODER_SETTINGS_INCREMENT   10

◆ PASSWORD_MASK

#define PASSWORD_MASK   "********"

◆ SETTINGS_HARD_RESET_REQUIRED

#define SETTINGS_HARD_RESET_REQUIRED   "\\n\\nNOTE: A hard reset of the controller is required after changing this setting."

◆ SETTINGS_VERSION

#define SETTINGS_VERSION   22

Typedef Documentation

◆ driver_settings_iterator_ptr

typedef bool(* driver_settings_iterator_ptr) (const setting_detail_t *setting, setting_output_ptr callback, void *data)

◆ driver_settings_load_ptr

typedef void(* driver_settings_load_ptr) (void)

◆ driver_settings_restore_ptr

typedef void(* driver_settings_restore_ptr) (void)

◆ driver_settings_save_ptr

typedef void(* driver_settings_save_ptr) (void)

◆ on_get_settings_ptr

typedef setting_details_t*(* on_get_settings_ptr) (void)

◆ setting_changed_ptr

typedef void(* setting_changed_ptr) (setting_id_t id)

◆ setting_detail_t

◆ setting_details_t

◆ setting_get_float_ptr

typedef float(* setting_get_float_ptr) (setting_id_t id)

◆ setting_get_int_ptr

typedef uint32_t(* setting_get_int_ptr) (setting_id_t id)

◆ setting_get_string_ptr

typedef char*(* setting_get_string_ptr) (setting_id_t id)

◆ setting_group_detail_t

◆ setting_output_ptr

typedef bool(* setting_output_ptr) (const setting_detail_t *setting, uint_fast16_t offset, void *data)

◆ setting_set_float_ptr

typedef status_code_t(* setting_set_float_ptr) (setting_id_t id, float value)

◆ setting_set_int_ptr

typedef status_code_t(* setting_set_int_ptr) (setting_id_t id, uint_fast16_t value)

◆ setting_set_string_ptr

typedef status_code_t(* setting_set_string_ptr) (setting_id_t id, char *value)

◆ settings_changed_ptr

typedef void(* settings_changed_ptr) (settings_t *settings, settings_changed_flags_t changed)

Pointer to callback function to be called when settings are loaded or changed.

Parameters
settingspointer to settings_t struct containing the settings.
changeda settings_changed_flags_t union containing the changed setting groups.

◆ stored_line_t

typedef char stored_line_t[MAX_STORED_LINE_LENGTH]

Enumeration Type Documentation

◆ setting_datatype_t

Enumerator
Format_Bool 
Format_Bitfield 
Format_XBitfield 
Format_RadioButtons 
Format_AxisMask 
Format_Integer 
Format_Decimal 
Format_String 
Format_Password 
Format_IPv4 
Format_Int8 
Format_Int16 

◆ setting_group_t

Enumerator
Group_Root 

0

Group_General 

1

Group_ControlSignals 

2

Group_Limits 

3

Group_Limits_DualAxis 

4

Group_Coolant 

5

Group_Spindle 

6

Group_Spindle_Sync 

7

Group_Spindle_ClosedLoop 

8

Group_Toolchange 

9

Group_Plasma 

10

Group_Homing 

11

Group_Probing 

12

Group_SafetyDoor 

13

Group_Jogging 

14

Group_Networking 

15

Group_Networking_Wifi 

16

Group_Bluetooth 

17

Group_AuxPorts 

18

Group_ModBus 

19

Group_ModBusUnit0 

20

Group_ModBusUnit1 

21

Group_ModBusUnit2 

22

Group_ModBusUnit3 

23

Group_ModBusUnit4 

24

Group_ModBusUnit5 

25

Group_ModBusUnit6 

26

Group_ModBusUnit7 

27

Group_Encoders 

28

Group_Encoder0 

29

Group_Encoder1 

30

Group_Encoder2 

31

Group_Encoder3 

32

Group_Encoder4 

33

Group_UserSettings 

34

Group_Stepper 

35

Group_MotorDriver 

36

Group_VFD 

37

Group_CANbus 

38

Group_Embroidery 

39

Group_Panel 

40

Group_Kinematics 

41

Group_Axis 

42

Group_Axis0 

43

Group_XAxis 

44

Group_YAxis 

45

Group_ZAxis 

46

Group_Unknown 

99

Group_All 

0

◆ setting_id_t

Enumerator
Setting_PulseMicroseconds 
Setting_StepperIdleLockTime 
Setting_StepInvertMask 
Setting_DirInvertMask 
Setting_InvertStepperEnable 
Setting_LimitPinsInvertMask 
Setting_InvertProbePin 
Setting_SpindlePWMBehaviour 
Setting_GangedDirInvertMask 
Setting_SpindlePWMOptions 
Setting_StatusReportMask 
Setting_JunctionDeviation 
Setting_ArcTolerance 
Setting_ReportInches 
Setting_ControlInvertMask 
Setting_CoolantInvertMask 
Setting_SpindleInvertMask 
Setting_ControlPullUpDisableMask 
Setting_LimitPullUpDisableMask 
Setting_ProbePullUpDisable 
Setting_SoftLimitsEnable 
Setting_HardLimitsEnable 
Setting_HomingEnable 
Setting_HomingDirMask 
Setting_HomingFeedRate 
Setting_HomingSeekRate 
Setting_HomingDebounceDelay 
Setting_HomingPulloff 
Setting_G73Retract 
Setting_PulseDelayMicroseconds 
Setting_RpmMax 
Setting_RpmMin 
Setting_Mode 
Setting_PWMFreq 
Setting_PWMOffValue 
Setting_PWMMinValue 
Setting_PWMMaxValue 
Setting_SteppersEnergize 
Setting_SpindlePPR 
Setting_EnableLegacyRTCommands 
Setting_JogSoftLimited 
Setting_ParkingEnable 
Setting_ParkingAxis 
Setting_HomingLocateCycles 
Setting_HomingCycle_1 
Setting_HomingCycle_2 
Setting_HomingCycle_3 
Setting_HomingCycle_4 
Setting_HomingCycle_5 
Setting_HomingCycle_6 
Setting_JogStepSpeed 
Setting_JogSlowSpeed 
Setting_JogFastSpeed 
Setting_JogStepDistance 
Setting_JogSlowDistance 
Setting_JogFastDistance 
Setting_ParkingPulloutIncrement 
Setting_ParkingPulloutRate 
Setting_ParkingTarget 
Setting_ParkingFastRate 
Setting_RestoreOverrides 
Setting_DoorOptions 
Setting_SleepEnable 
Setting_HoldActions 
Setting_ForceInitAlarm 
Setting_ProbingFeedOverride 
Setting_LinearSpindlePiece1 
Setting_LinearSpindlePiece2 
Setting_LinearSpindlePiece3 
Setting_LinearSpindlePiece4 
Setting_NetworkServices 
Setting_BlueToothDeviceName 
Setting_BlueToothServiceName 
Setting_WifiMode 
Setting_WiFi_STA_SSID 
Setting_WiFi_STA_Password 
Setting_WiFi_AP_SSID 
Setting_WiFi_AP_Password 
Setting_Wifi_AP_Country 
Setting_Wifi_AP_Channel 
Setting_SpindlePGain 
Setting_SpindleIGain 
Setting_SpindleDGain 
Setting_SpindleDeadband 
Setting_SpindleMaxError 
Setting_SpindleIMaxError 
Setting_SpindleDMaxError 
Setting_PositionPGain 
Setting_PositionIGain 
Setting_PositionDGain 
Setting_PositionDeadband 
Setting_PositionMaxError 
Setting_PositionIMaxError 
Setting_PositionDMaxError 
Setting_AxisSettingsBase 
Setting_AxisSettingsMax 
Setting_AxisSettingsBase2 
Setting_AxisSettingsMax2 
Setting_Hostname 
Setting_IpMode 
Setting_IpAddress 
Setting_Gateway 
Setting_NetMask 
Setting_TelnetPort 
Setting_HttpPort 
Setting_WebSocketPort 
Setting_FtpPort 
Setting_Hostname2 
Setting_IpMode2 
Setting_IpAddress2 
Setting_Gateway2 
Setting_NetMask2 
Setting_TelnetPort2 
Setting_HttpPort2 
Setting_WebSocketPort2 
Setting_FtpPort2 
Setting_Hostname3 
Setting_IpMode3 
Setting_IpAddress3 
Setting_Gateway3 
Setting_NetMask3 
Setting_TelnetPort3 
Setting_HttpPort3 
Setting_WebSocketPort3 
Setting_FtpPort3 
Setting_AdminPassword 
Setting_UserPassword 
Setting_NTPServerURI 
Setting_NTPServerURI_2 
Setting_NTPServerURI_3 
Setting_Timezone 
Setting_DSTActive 
Setting_Wifi_AP_BSSID 
Setting_TrinamicDriver 
Setting_TrinamicHoming 
Setting_SpindleAtSpeedTolerance 
Setting_ToolChangeMode 
Setting_ToolChangeProbingDistance 
Setting_ToolChangeFeedRate 
Setting_ToolChangeSeekRate 
Setting_ToolChangePulloffRate 
Setting_ToolChangeRestorePosition 
Setting_DualAxisLengthFailPercent 
Setting_DualAxisLengthFailMin 
Setting_DualAxisLengthFailMax 
Setting_THC_Mode 
Setting_THC_Delay 
Setting_THC_Threshold 
Setting_THC_PGain 
Setting_THC_IGain 
Setting_THC_DGain 
Setting_THC_VADThreshold 
Setting_THC_VoidOverride 
Setting_Arc_FailTimeout 
Setting_Arc_RetryDelay 
Setting_Arc_MaxRetries 
Setting_Arc_VoltageScale 
Setting_Arc_VoltageOffset 
Setting_Arc_HeightPerVolt 
Setting_Arc_OkHighVoltage 
Setting_Arc_OkLowVoltage 
Setting_Arc_VoltagePort 
Setting_Arc_OkPort 
Setting_THC_CutterDownPort 
Setting_THC_CutterUpPort 
Settings_IoPort_InvertIn 
Settings_IoPort_Pullup_Disable 
Settings_IoPort_InvertOut 
Settings_IoPort_OD_Enable 
Settings_ModBus_BaudRate 
Settings_ModBus_RXTimeout 
Settings_RotaryAxes 
Setting_BlueToothInitOK 
Setting_CoolantOnDelay 
Setting_CoolantOffDelay 
Setting_CoolantMinTemp 
Setting_CoolantMaxTemp 
Setting_CoolantOffset 
Setting_CoolantGain 
Setting_DisableG92Persistence 
Setting_BlueToothStateInput 
Setting_FanPort0 
Setting_FanPort1 
Setting_FanPort2 
Setting_FanPort3 
Setting_CoolantTempPort 
Setting_CoolantOkPort 
Setting_DoorSpindleOnDelay 
Setting_DoorCoolantOnDelay 
Setting_SpindleOnDelay 
Setting_SpindleType 
Setting_WebUiTimeout 
Setting_WebUiAutoReportInterval 
Setting_PlannerBlocks 
Setting_CANbus_BaudRate 
Setting_EncoderSettingsBase 
Setting_EncoderSettingsMax 
Setting_UserDefined_0 
Setting_UserDefined_1 
Setting_UserDefined_2 
Setting_UserDefined_3 
Setting_UserDefined_4 
Setting_UserDefined_5 
Setting_UserDefined_6 
Setting_UserDefined_7 
Setting_UserDefined_8 
Setting_UserDefined_9 
Setting_VFD_ModbusAddress 
Setting_VFD_RPM_Hz 
Setting_VFD_10 
Setting_VFD_11 
Setting_VFD_12 
Setting_VFD_13 
Setting_VFD_14 
Setting_VFD_15 
Setting_VFD_16 
Setting_VFD_17 
Setting_VFD_18 
Setting_VFD_19 
Setting_VFD_20 
Setting_VFD_21 
Setting_VFD_ModbusAddress0 
Setting_VFD_ModbusAddress1 
Setting_VFD_ModbusAddress2 
Setting_VFD_ModbusAddress3 
Setting_Fan0OffDelay 
Setting_AutoReportInterval 
Setting_TimeZoneOffset 
Setting_FanToSpindleLink 
Setting_UnlockAfterEStop 
Setting_EnableToolPersistence 
Setting_OffsetLock 
Setting_Spindle_OnPort 
Setting_Spindle_DirPort 
Setting_Spindle_PWMPort 
Setting_Macro0 
Setting_MacroBase 
Setting_Macro1 
Setting_Macro2 
Setting_Macro3 
Setting_Macro4 
Setting_Macro5 
Setting_Macro6 
Setting_Macro7 
Setting_Macro8 
Setting_Macro9 
Setting_MacroPort0 
Setting_MacroPortBase 
Setting_MacroPort1 
Setting_MacroPort2 
Setting_MacroPort3 
Setting_MacroPort4 
Setting_MacroPort5 
Setting_MacroPort6 
Setting_MacroPort7 
Setting_MacroPort8 
Setting_MacroPort9 
Setting_SpindleEnable0 
Setting_SpindleEnable1 
Setting_SpindleEnable2 
Setting_SpindleEnable3 
Setting_SpindleEnable4 
Setting_SpindleEnable5 
Setting_SpindleEnable6 
Setting_SpindleEnable7 
Setting_EncoderSpindle 
Setting_SpindleToolStart0 
Setting_SpindleToolStart1 
Setting_SpindleToolStart2 
Setting_SpindleToolStart3 
Setting_SpindleToolStart4 
Setting_SpindleToolStart5 
Setting_SpindleToolStart6 
Setting_SpindleToolStart7 
Setting_MQTTBrokerIpAddress 
Setting_MQTTBrokerPort 
Setting_MQTTBrokerUserName 
Setting_MQTTBrokerPassword 
Setting_NGCDebugOut 
Setting_NetworkMAC 
Setting_RGB_StripLengt0 
Setting_RGB_StripLengt1 
Setting_RotaryWrap 
Setting_Panel_SpindleSpeed 
Setting_Panel_ModbusAddress 
Setting_Panel_UpdateInterval 
Setting_Panel_JogSpeed_x1 
Setting_Panel_JogSpeed_x10 
Setting_Panel_JogSpeed_x100 
Setting_Panel_JogSpeed_Keypad 
Setting_Panel_JogDistance_x1 
Setting_Panel_JogDistance_x10 
Setting_Panel_JogDistance_x100 
Setting_Panel_JogDistance_Keypad 
Setting_Panel_JogAccelRamp 
Setting_Panel_Encoder0_Mode 
Setting_Panel_Encoder0_Cpd 
Setting_Panel_Encoder1_Mode 
Setting_Panel_Encoder1_Cpd 
Setting_Panel_Encoder2_Mode 
Setting_Panel_Encoder2_Cpd 
Setting_Panel_Encoder3_Mode 
Setting_Panel_Encoder3_Cpd 
Setting_Panel_SettingsMax 
Setting_ButtonAction0 
Setting_ButtonActionBase 
Setting_ButtonAction1 
Setting_ButtonAction2 
Setting_ButtonAction3 
Setting_ButtonAction4 
Setting_ButtonAction5 
Setting_ButtonAction6 
Setting_ButtonAction7 
Setting_ButtonAction8 
Setting_ButtonAction9 
Setting_ModbusTCPBase 
Setting_ModbusIpAddressBase 
Setting_ModbusPortBase 
Setting_ModbusIdBase 
Setting_ModbusTCPMax 
Setting_Kinematics0 
Setting_Kinematics1 
Setting_Kinematics2 
Setting_Kinematics3 
Setting_Kinematics4 
Setting_Kinematics5 
Setting_Kinematics6 
Setting_Kinematics7 
Setting_Kinematics8 
Setting_Kinematics9 
Setting_FSOptions 
Setting_Stepper1 
Setting_Stepper2 
Setting_Stepper3 
Setting_Stepper4 
Setting_Stepper5 
Setting_Stepper6 
Setting_Stepper7 
Setting_Stepper8 
Setting_Stepper9 
Setting_Stepper10 
Setting_Stepper11 
Setting_Stepper12 
Setting_Stepper13 
Setting_Stepper14 
Setting_Stepper15 
Setting_Stepper16 
Setting_Stepper17 
Setting_Stepper18 
Setting_Stepper19 
Setting_Stepper20 
Setting_HomePinsInvertMask 
Setting_Reserved672 
Setting_HoldCoolantOnDelay 
Setting_SpindleInvertMask1 
Setting_RpmMax1 
Setting_RpmMin1 
Setting_Mode1 
Setting_PWMFreq1 
Setting_PWMOffValue1 
Setting_PWMMinValue1 
Setting_PWMMaxValue1 
Setting_LinearSpindle1Piece1 
Setting_LinearSpindle1Piece2 
Setting_LinearSpindle1Piece3 
Setting_LinearSpindle1Piece4 
Setting_Action0 
Setting_ActionBase 
Setting_Action1 
Setting_Action2 
Setting_Action3 
Setting_Action4 
Setting_Action5 
Setting_Action6 
Setting_Action7 
Setting_Action8 
Setting_Action9 
Setting_ActionPort0 
Setting_ActionPortBase 
Setting_ActionPort1 
Setting_ActionPort2 
Setting_ActionPort3 
Setting_ActionPort4 
Setting_ActionPort5 
Setting_ActionPort6 
Setting_ActionPort7 
Setting_ActionPort8 
Setting_ActionPort9 
Setting_SpindleOffsetX 
Setting_SpindleOffsetY 
Setting_SettingsMax 
Setting_SettingsAll 
Setting_AxisStepsPerMM 
Setting_AxisMaxRate 
Setting_AxisAcceleration 
Setting_AxisMaxTravel 
Setting_AxisStepperCurrent 
Setting_AxisMicroSteps 
Setting_AxisBacklash 
Setting_AxisAutoSquareOffset 
Setting_AxisHomingFeedRate 
Setting_AxisHomingSeekRate 
Setting_AxisExtended0 
Setting_AxisExtended1 
Setting_AxisExtended2 
Setting_AxisExtended3 
Setting_AxisExtended4 
Setting_AxisExtended5 
Setting_AxisExtended6 
Setting_AxisExtended7 
Setting_AxisExtended8 
Setting_AxisExtended9 
Setting_EncoderModeBase 
Setting_EncoderCPRBase 
Setting_EncoderCPDBase 
Setting_EncoderDblClickWindowBase 

◆ setting_type_t

Enumerator
Setting_NonCore 
Setting_NonCoreFn 
Setting_IsExtended 
Setting_IsExtendedFn 
Setting_IsLegacy 
Setting_IsLegacyFn 
Setting_IsExpanded 
Setting_IsExpandedFn 

◆ toolchange_mode_t

Enumerator
ToolChange_Disabled 
ToolChange_Manual 
ToolChange_Manual_G59_3 
ToolChange_SemiAutomatic 
ToolChange_Ignore 

Function Documentation

◆ setting_datatype_to_external()

setting_datatype_t setting_datatype_to_external ( setting_datatype_t  datatype)

◆ setting_get_description()

const char* setting_get_description ( setting_id_t  id)

◆ setting_get_details()

const setting_detail_t* setting_get_details ( setting_id_t  id,
setting_details_t **  set 
)

◆ setting_get_float_value()

float setting_get_float_value ( const setting_detail_t setting,
uint_fast16_t  offset 
)

◆ setting_get_group_details()

const setting_group_detail_t* setting_get_group_details ( setting_group_t  id)

◆ setting_get_int_value()

uint32_t setting_get_int_value ( const setting_detail_t setting,
uint_fast16_t  offset 
)

◆ setting_get_value()

char* setting_get_value ( const setting_detail_t setting,
uint_fast16_t  offset 
)

◆ setting_is_integer()

bool setting_is_integer ( const setting_detail_t setting)

◆ setting_is_list()

bool setting_is_list ( const setting_detail_t setting)

◆ setting_remove_elements()

void setting_remove_elements ( setting_id_t  id,
uint32_t  mask 
)

◆ settings_add_spindle_type()

bool settings_add_spindle_type ( const char *  type)

◆ settings_clear()

void settings_clear ( void  )

◆ settings_get_axis_base()

setting_id_t settings_get_axis_base ( setting_id_t  id,
uint_fast8_t *  idx 
)

◆ settings_get_details()

setting_details_t* settings_get_details ( void  )

◆ settings_get_homing_source()

limit_signals_t settings_get_homing_source ( void  )

◆ settings_init()

void settings_init ( )

◆ settings_is_group_available()

bool settings_is_group_available ( setting_group_t  group)

◆ settings_iterator()

bool settings_iterator ( const setting_detail_t setting,
setting_output_ptr  callback,
void *  data 
)

◆ settings_normalize_group()

setting_group_t settings_normalize_group ( setting_group_t  group)

◆ settings_override_acceleration()

bool settings_override_acceleration ( uint8_t  axis,
float  acceleration 
)

◆ settings_read_build_info()

bool settings_read_build_info ( char *  line)

◆ settings_read_coord_data()

bool settings_read_coord_data ( coord_system_id_t  id,
float(*)  coord_data[N_AXIS] 
)

◆ settings_read_startup_line()

bool settings_read_startup_line ( uint8_t  idx,
char *  line 
)

◆ settings_register()

void settings_register ( setting_details_t details)

◆ settings_restore()

void settings_restore ( settings_restore_t  restore_flags)

◆ settings_store_setting()

status_code_t settings_store_setting ( setting_id_t  setting,
char *  svalue 
)

◆ settings_write_build_info()

void settings_write_build_info ( char *  line)

◆ settings_write_coord_data()

void settings_write_coord_data ( coord_system_id_t  id,
float(*)  coord_data[N_AXIS] 
)

◆ settings_write_global()

void settings_write_global ( void  )

◆ settings_write_startup_line()

void settings_write_startup_line ( uint8_t  idx,
char *  line 
)

Variable Documentation

◆ settings

settings_t settings
extern

◆ settings_all

const settings_restore_t settings_all
extern