@@ -370,6 +370,7 @@ static status_code_t set_g92_disable_persistence (setting_id_t id, uint_fast16_t
370370static  float  get_float  (setting_id_t  setting );
371371static  uint32_t  get_int  (setting_id_t  id );
372372static  bool  is_setting_available  (const  setting_detail_t  * setting );
373+ static  bool  is_group_available  (const  setting_detail_t  * setting );
373374
374375static  char  control_signals [] =  "Reset,Feed hold,Cycle start,Safety door,Block delete,Optional stop,EStop,Probe connected,Motor fault" ;
375376static  char  spindle_signals [] =  "Spindle enable,Spindle direction,PWM" ;
@@ -469,15 +470,15 @@ PROGMEM static const setting_detail_t setting_detail[] = {
469470     { Setting_LinearSpindlePiece3 , Group_Spindle , "Spindle linearisation, third point" , NULL , Format_String , "x30" , NULL , "30" , Setting_IsExtendedFn , set_linear_piece , get_linear_piece , NULL  },
470471     { Setting_LinearSpindlePiece4 , Group_Spindle , "Spindle linearisation, fourth point" , NULL , Format_String , "x30" , NULL , "30" , Setting_IsExtendedFn , set_linear_piece , get_linear_piece , NULL  },
471472#endif 
472-      { Setting_SpindlePGain , Group_Spindle_ClosedLoop , "Spindle P-gain" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .spindle .pid .p_gain , NULL , is_setting_available  },
473-      { Setting_SpindleIGain , Group_Spindle_ClosedLoop , "Spindle I-gain" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .spindle .pid .i_gain , NULL , is_setting_available  },
474-      { Setting_SpindleDGain , Group_Spindle_ClosedLoop , "Spindle D-gain" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .spindle .pid .d_gain , NULL , is_setting_available  },
475-      { Setting_SpindleMaxError , Group_Spindle_ClosedLoop , "Spindle PID max error" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .spindle .pid .max_error , NULL , is_setting_available  },
476-      { Setting_SpindleIMaxError , Group_Spindle_ClosedLoop , "Spindle PID max I error" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .spindle .pid .i_max_error , NULL , is_setting_available  },
477-      { Setting_PositionPGain , Group_Spindle_Sync , "Spindle sync P-gain" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .position .pid .p_gain , NULL , is_setting_available  },
478-      { Setting_PositionIGain , Group_Spindle_Sync , "Spindle sync I-gain" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .position .pid .i_gain , NULL , is_setting_available  },
479-      { Setting_PositionDGain , Group_Spindle_Sync , "Spindle sync D-gain" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .position .pid .d_gain , NULL , is_setting_available  },
480-      { Setting_PositionIMaxError , Group_Spindle_Sync , "Spindle sync PID max I error" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .position .pid .i_max_error , NULL , is_setting_available  },
473+      { Setting_SpindlePGain , Group_Spindle_ClosedLoop , "Spindle P-gain" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .spindle .pid .p_gain , NULL , is_group_available  },
474+      { Setting_SpindleIGain , Group_Spindle_ClosedLoop , "Spindle I-gain" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .spindle .pid .i_gain , NULL , is_group_available  },
475+      { Setting_SpindleDGain , Group_Spindle_ClosedLoop , "Spindle D-gain" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .spindle .pid .d_gain , NULL , is_group_available  },
476+      { Setting_SpindleMaxError , Group_Spindle_ClosedLoop , "Spindle PID max error" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .spindle .pid .max_error , NULL , is_group_available  },
477+      { Setting_SpindleIMaxError , Group_Spindle_ClosedLoop , "Spindle PID max I error" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .spindle .pid .i_max_error , NULL , is_group_available  },
478+      { Setting_PositionPGain , Group_Spindle_Sync , "Spindle sync P-gain" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .position .pid .p_gain , NULL , is_group_available  },
479+      { Setting_PositionIGain , Group_Spindle_Sync , "Spindle sync I-gain" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .position .pid .i_gain , NULL , is_group_available  },
480+      { Setting_PositionDGain , Group_Spindle_Sync , "Spindle sync D-gain" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .position .pid .d_gain , NULL , is_group_available  },
481+      { Setting_PositionIMaxError , Group_Spindle_Sync , "Spindle sync PID max I error" , NULL , Format_Decimal , "###0.000" , NULL , NULL , Setting_IsExtended , & settings .position .pid .i_max_error , NULL , is_group_available  },
481482     { Setting_AxisStepsPerMM , Group_Axis0 , "?-axis travel resolution" , "step/mm" , Format_Decimal , "#####0.000" , NULL , NULL , Setting_IsLegacyFn , set_axis_setting , get_float , NULL  },
482483     { Setting_AxisMaxRate , Group_Axis0 , "?-axis maximum rate" , "mm/min" , Format_Decimal , "#####0.000" , NULL , NULL , Setting_IsLegacyFn , set_axis_setting , get_float , NULL  },
483484     { Setting_AxisAcceleration , Group_Axis0 , "?-axis acceleration" , "mm/sec^2" , Format_Decimal , "#####0.000" , NULL , NULL , Setting_IsLegacyFn , set_axis_setting , get_float , NULL  },
@@ -508,6 +509,8 @@ PROGMEM static const setting_detail_t setting_detail[] = {
508509#ifdef  ENABLE_SAFETY_DOOR_INPUT_PIN 
509510     { Setting_DoorSpindleOnDelay , Group_SafetyDoor , "Spindle on delay" , "s" , Format_Decimal , "#0.0" , "0.5" , "20" , Setting_IsExtended , & settings .safety_door .spindle_on_delay , NULL , NULL  },
510511     { Setting_DoorCoolantOnDelay , Group_SafetyDoor , "Coolant on delay" , "s" , Format_Decimal , "#0.0" , "0.5" , "20" , Setting_IsExtended , & settings .safety_door .coolant_on_delay , NULL , NULL  },
512+ #else 
513+      { Setting_DoorSpindleOnDelay , Group_Spindle , "Spindle on delay" , "s" , Format_Decimal , "#0.0" , "0.5" , "20" , Setting_IsExtended , & settings .safety_door .spindle_on_delay , NULL , is_setting_available  },
511514#endif 
512515};
513516
@@ -625,7 +628,9 @@ PROGMEM static const setting_descr_t setting_descr[] = {
625628    { Setting_AxisBacklash , "Backlash distance to compensate for."  },
626629#endif 
627630    { Setting_AxisAutoSquareOffset , "Offset between sides to compensate for homing switches inaccuracies."  },
628-     { Setting_SpindleAtSpeedTolerance , "Spindle at speed"  },
631+     { Setting_SpindleAtSpeedTolerance , "Spindle at speed tolerance as percentage deviation from programmed speed, set to 0 to disable.\\n" 
632+                                        "If not within tolerance when checked after spindle on delay ($392) alarm 14 is raised." 
633+     },
629634    { Setting_ToolChangeMode , "Normal: allows jogging for manual touch off. Set new position manually.\\n\\n" 
630635                              "Manual touch off: retracts tool axis to home position for tool change, use jogging or $TPW for touch off.\\n\\n" 
631636                              "Manual touch off @ G59.3: retracts tool axis to home position then to G59.3 position for tool change, use jogging or $TPW for touch off.\\n\\n" 
@@ -645,6 +650,8 @@ PROGMEM static const setting_descr_t setting_descr[] = {
645650#ifdef  ENABLE_SAFETY_DOOR_INPUT_PIN 
646651    { Setting_DoorSpindleOnDelay , "Delay to allow spindle to spin up after safety door is opened."  },
647652    { Setting_DoorCoolantOnDelay , "Delay to allow coolant to restart after safety door is opened."  },
653+ #else 
654+     { Setting_DoorSpindleOnDelay , "Delay to allow spindle to spin up when spindle at speed tolerance is > 0."  },
648655#endif 
649656};
650657
@@ -1380,7 +1387,7 @@ char *setting_get_value (const setting_detail_t *setting, uint_fast16_t offset)
13801387
13811388static  bool  is_setting_available  (const  setting_detail_t  * setting )
13821389{
1383-     bool  available  =  false;  // settings_is_group_available(setting->group); 
1390+     bool  available  =  false;
13841391
13851392    if (setting ) switch (normalize_id (setting -> id )) {
13861393
@@ -1406,6 +1413,7 @@ static bool is_setting_available (const setting_detail_t *setting)
14061413            break ;
14071414
14081415        case  Setting_SpindleAtSpeedTolerance :
1416+         case  Setting_DoorSpindleOnDelay :
14091417            available  =  hal .driver_cap .spindle_at_speed ;
14101418            break ;
14111419
@@ -1632,6 +1640,11 @@ inline static bool is_available (const setting_detail_t *setting)
16321640    return  setting -> is_available  ==  NULL  ||  setting -> is_available (setting );
16331641}
16341642
1643+ static  bool  is_group_available  (const  setting_detail_t  * setting )
1644+ {
1645+     return  settings_is_group_available (setting -> group );
1646+ }
1647+ 
16351648bool  settings_is_group_available  (setting_group_t  group )
16361649{
16371650    bool  available  =  false;
0 commit comments