Partial
This commit is contained in:
parent
6dfbdd3735
commit
487c7d63e1
|
|
@ -8233,11 +8233,17 @@ Sigma_Exit:
|
|||
/*!
|
||||
### M914 - Set TMC2130 normal mode <a href="https://reprap.org/wiki/G-code#M914:_Set_TMC2130_normal_mode">M914: Set TMC2130 normal mode</a>
|
||||
*/
|
||||
#ifdef TMC2130
|
||||
case 914:
|
||||
{
|
||||
tmc2130_mode = TMC2130_MODE_NORMAL;
|
||||
printf_P(_n("tmc2130mode/smm/eep: %d %d %d\n"),tmc2130_mode,SilentModeMenu,eeprom_read_byte((uint8_t*)EEPROM_SILENT));
|
||||
if (tmc2130_mode != TMC2130_MODE_NORMAL)
|
||||
{
|
||||
tmc2130_mode = TMC2130_MODE_NORMAL;
|
||||
update_mode_profile();
|
||||
tmc2130_init(TMCInitParams(false, FarmOrUserECool()));
|
||||
printf_P(_n("tmc2130mode/smm/eep: %d %d %d\n"),tmc2130_mode,SilentModeMenu,eeprom_read_byte((uint8_t*)EEPROM_SILENT));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -8246,13 +8252,23 @@ Sigma_Exit:
|
|||
Not active in default, only if `TMC2130_SERVICE_CODES_M910_M918` is defined in source code.
|
||||
*/
|
||||
case 915:
|
||||
{
|
||||
tmc2130_mode = TMC2130_MODE_SILENT;
|
||||
update_mode_profile();
|
||||
tmc2130_init(TMCInitParams(false, FarmOrUserECool()));
|
||||
{
|
||||
printf_P(_n("tmc2130mode/smm/eep: %d %d %d\n"),tmc2130_mode,SilentModeMenu,eeprom_read_byte((uint8_t*)EEPROM_SILENT));
|
||||
if (tmc2130_mode != TMC2130_MODE_SILENT)
|
||||
{ // This is basically the equivalent of force_high_power_mode for silent mode.
|
||||
st_synchronize();
|
||||
cli();
|
||||
tmc2130_mode = TMC2130_MODE_SILENT;
|
||||
update_mode_profile();
|
||||
tmc2130_init(TMCInitParams(false, FarmOrUserECool()));
|
||||
printf_P(_n("tmc2130mode/smm/eep: %d %d %d\n"),tmc2130_mode,SilentModeMenu,eeprom_read_byte((uint8_t*)EEPROM_SILENT));
|
||||
st_reset_timer();
|
||||
sei();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
#endif // TMC2130
|
||||
#ifdef TMC2130_SERVICE_CODES_M910_M918
|
||||
/*!
|
||||
### M916 - Set TMC2130 Stallguard sensitivity threshold <a href="https://reprap.org/wiki/G-code#M916:_Set_TMC2130_Stallguard_sensitivity_threshold">M916: Set TMC2130 Stallguard sensitivity threshold</a>
|
||||
|
|
|
|||
|
|
@ -4223,20 +4223,22 @@ do\
|
|||
{\
|
||||
if(!farm_mode)\
|
||||
{\
|
||||
bool bDesync = SilentModeMenu != tmc2130_mode; \
|
||||
if (SilentModeMenu == SILENT_MODE_NORMAL && bDesync) \
|
||||
{\
|
||||
MENU_ITEM_TOGGLE_P(_T(MSG_MODE), PSTR("M915"), lcd_silent_mode_set);\
|
||||
}\
|
||||
else if (bDesync) \
|
||||
{\
|
||||
MENU_ITEM_TOGGLE_P(_T(MSG_MODE), PSTR("M914") , lcd_silent_mode_set);\
|
||||
}\
|
||||
else if (SilentModeMenu == SILENT_MODE_NORMAL)\
|
||||
/* M914/5 do not update eeprom, only tmc2130_mode */\
|
||||
bool bDesync = tmc2130_mode ^ eeprom_read_byte((uint8_t*)EEPROM_SILENT);\
|
||||
if (SilentModeMenu == SILENT_MODE_NORMAL) \
|
||||
{\
|
||||
MENU_ITEM_TOGGLE_P(_T(MSG_MODE), _T(MSG_NORMAL), lcd_silent_mode_set);\
|
||||
if (bDesync)\
|
||||
MENU_ITEM_TOGGLE_P(_T(MSG_MODE), PSTR("M915"), lcd_silent_mode_set);\
|
||||
else\
|
||||
MENU_ITEM_TOGGLE_P(_T(MSG_MODE), _T(MSG_NORMAL), lcd_silent_mode_set);\
|
||||
}\
|
||||
else MENU_ITEM_TOGGLE_P(_T(MSG_MODE), _T(MSG_STEALTH), lcd_silent_mode_set);\
|
||||
else\
|
||||
{\
|
||||
if (bDesync)\
|
||||
MENU_ITEM_TOGGLE_P(_T(MSG_MODE), PSTR("M914") , lcd_silent_mode_set);\
|
||||
else\
|
||||
MENU_ITEM_TOGGLE_P(_T(MSG_MODE), _T(MSG_STEALTH), lcd_silent_mode_set);\
|
||||
}\
|
||||
if (SilentModeMenu == SILENT_MODE_NORMAL)\
|
||||
{\
|
||||
if (lcd_crash_detect_enabled()) MENU_ITEM_TOGGLE_P(_T(MSG_CRASHDETECT), _T(MSG_ON), crash_mode_switch);\
|
||||
|
|
|
|||
Loading…
Reference in New Issue