Toggle SpoolJoin

This commit is contained in:
leptun 2019-08-29 15:40:04 +03:00
parent 5eea8d26fe
commit 1937cf2074
8 changed files with 21 additions and 76 deletions

View file

@ -5106,30 +5106,29 @@ static void auto_deplete_switch()
eeprom_update_byte((unsigned char *)EEPROM_AUTO_DEPLETE, lcd_autoDeplete); eeprom_update_byte((unsigned char *)EEPROM_AUTO_DEPLETE, lcd_autoDeplete);
} }
static bool settingsAutoDeplete() static void settingsAutoDeplete()
{ {
if (mmu_enabled) if (mmu_enabled)
{ {
if (!fsensor_enabled) if (!fsensor_enabled)
{ {
if (menu_item_text_P(_i("SpoolJoin [N/A]"))) return true; MENU_ITEM_TOGGLE_P(_i("SpoolJoin"), _T(MSG_NA), NULL);
} }
else if (lcd_autoDeplete) else if (lcd_autoDeplete)
{ {
if (menu_item_function_P(_i("SpoolJoin [on]"), auto_deplete_switch)) return true; MENU_ITEM_TOGGLE_P(_i("SpoolJoin"), _T(MSG_ON), auto_deplete_switch);
} }
else else
{ {
if (menu_item_function_P(_i("SpoolJoin [off]"), auto_deplete_switch)) return true; MENU_ITEM_TOGGLE_P(_i("SpoolJoin"), _T(MSG_OFF), auto_deplete_switch);
} }
} }
return false;
} }
#define SETTINGS_AUTO_DEPLETE \ #define SETTINGS_AUTO_DEPLETE \
do\ do\
{\ {\
if(settingsAutoDeplete()) return;\ settingsAutoDeplete();\
}\ }\
while(0)\ while(0)\

View file

@ -34,14 +34,8 @@
#MSG_CONFIRM_CARRIAGE_AT_THE_TOP c=20 r=2 #MSG_CONFIRM_CARRIAGE_AT_THE_TOP c=20 r=2
"Are left and right Z~carriages all up?" "Are left and right Z~carriages all up?"
#MSG_AUTO_DEPLETE_ON c=17 r=1 #MSG_AUTO_DEPLETE c=17 r=1
"SpoolJoin [on]" "SpoolJoin"
#
"SpoolJoin [N/A]"
#MSG_AUTO_DEPLETE_OFF c=17 r=1
"SpoolJoin [off]"
#MSG_AUTO_HOME #MSG_AUTO_HOME
"Auto home" "Auto home"

View file

@ -46,18 +46,10 @@
"Are left and right Z~carriages all up?" "Are left and right Z~carriages all up?"
"Dojely oba Z voziky k~hornimu dorazu?" "Dojely oba Z voziky k~hornimu dorazu?"
#MSG_AUTO_DEPLETE_ON c=17 r=1 #MSG_AUTO_DEPLETE c=17 r=1
"SpoolJoin [on]" "SpoolJoin"
"SpoolJoin [zap]"
#
"SpoolJoin [N/A]"
"\x00" "\x00"
#MSG_AUTO_DEPLETE_OFF c=17 r=1
"SpoolJoin [off]"
"SpoolJoin [vyp]"
#MSG_AUTO_HOME #MSG_AUTO_HOME
"Auto home" "Auto home"
"\x00" "\x00"

View file

@ -46,17 +46,9 @@
"Are left and right Z~carriages all up?" "Are left and right Z~carriages all up?"
"Sind linke+rechte Z- Schlitten ganz oben?" "Sind linke+rechte Z- Schlitten ganz oben?"
#MSG_AUTO_DEPLETE_ON c=17 r=1 #MSG_AUTO_DEPLETE c=17 r=1
"SpoolJoin [on]" "SpoolJoin"
"SpoolJoin [an]" "\x00"
#
"SpoolJoin [N/A]"
"SpoolJoin [N/V]"
#MSG_AUTO_DEPLETE_OFF c=17 r=1
"SpoolJoin [off]"
"SpoolJoin [aus]"
#MSG_AUTO_HOME #MSG_AUTO_HOME
"Auto home" "Auto home"

View file

@ -46,16 +46,8 @@
"Are left and right Z~carriages all up?" "Are left and right Z~carriages all up?"
"Carros Z izq./der. estan arriba maximo?" "Carros Z izq./der. estan arriba maximo?"
#MSG_AUTO_DEPLETE_ON c=17 r=1 #MSG_AUTO_DEPLETE c=17 r=1
"SpoolJoin [on]" "SpoolJoin"
"\x00"
#
"SpoolJoin [N/A]"
"\x00"
#MSG_AUTO_DEPLETE_OFF c=17 r=1
"SpoolJoin [off]"
"\x00" "\x00"
#MSG_AUTO_HOME #MSG_AUTO_HOME

View file

@ -46,16 +46,8 @@
"Are left and right Z~carriages all up?" "Are left and right Z~carriages all up?"
"Z~carriages gauche + droite tout en haut?" "Z~carriages gauche + droite tout en haut?"
#MSG_AUTO_DEPLETE_ON c=17 r=1 #MSG_AUTO_DEPLETE c=17 r=1
"SpoolJoin [on]" "SpoolJoin"
"\x00"
#
"SpoolJoin [N/A]"
"\x00"
#MSG_AUTO_DEPLETE_OFF c=17 r=1
"SpoolJoin [off]"
"\x00" "\x00"
#MSG_AUTO_HOME #MSG_AUTO_HOME

View file

@ -46,16 +46,8 @@
"Are left and right Z~carriages all up?" "Are left and right Z~carriages all up?"
"I carrelli Z sin/des sono altezza max?" "I carrelli Z sin/des sono altezza max?"
#MSG_AUTO_DEPLETE_ON c=17 r=1 #MSG_AUTO_DEPLETE c=17 r=1
"SpoolJoin [on]" "SpoolJoin"
"\x00"
#
"SpoolJoin [N/A]"
"\x00"
#MSG_AUTO_DEPLETE_OFF c=17 r=1
"SpoolJoin [off]"
"\x00" "\x00"
#MSG_AUTO_HOME #MSG_AUTO_HOME

View file

@ -46,17 +46,9 @@
"Are left and right Z~carriages all up?" "Are left and right Z~carriages all up?"
"Obydwa konce osi dojechaly do gornych ogranicznikow?" "Obydwa konce osi dojechaly do gornych ogranicznikow?"
#MSG_AUTO_DEPLETE_ON c=17 r=1 #MSG_AUTO_DEPLETE c=17 r=1
"SpoolJoin [on]" "SpoolJoin"
"SpoolJoin [wl]" "\x00"
#
"SpoolJoin [N/A]"
"SpoolJoin [nd]"
#MSG_AUTO_DEPLETE_OFF c=17 r=1
"SpoolJoin [off]"
"SpoolJoin [wyl]"
#MSG_AUTO_HOME #MSG_AUTO_HOME
"Auto home" "Auto home"