some improvements
This commit is contained in:
parent
4d535f1217
commit
3333d937ed
4 changed files with 42 additions and 37 deletions
|
@ -1,6 +1,4 @@
|
|||
#include <stdint.h>
|
||||
#include <avr/pgmspace.h>
|
||||
//!?! #include "Configuration.h"
|
||||
#include "Configuration.h"
|
||||
#include "Configuration_prusa.h"
|
||||
|
||||
const uint16_t _nPrinterType PROGMEM=PRINTER_TYPE;
|
|
@ -307,6 +307,7 @@ bool wait_for_unclick;
|
|||
#endif
|
||||
|
||||
bool bMain; // flag (i.e. 'fake parameter') for 'lcd_sdcard_menu()' function
|
||||
bool bSettings; // flag (i.e. 'fake parameter') for 'lcd_checkink_menu()' function
|
||||
|
||||
|
||||
|
||||
|
@ -5492,8 +5493,7 @@ while (0)
|
|||
void lcd_checking_menu()
|
||||
{
|
||||
MENU_BEGIN();
|
||||
//-//MENU_ITEM_BACK_P(_T(MSG_SETTINGS));
|
||||
MENU_ITEM_BACK_P(_T(MSG_BACK));
|
||||
MENU_ITEM_BACK_P(_T(bSettings?MSG_SETTINGS:MSG_BACK)); // i.e. default menu-item / menu-item after checking mismatch
|
||||
SETTINGS_NOZZLE;
|
||||
MENU_ITEM_TEXT_P(STR_SEPARATOR);
|
||||
MENU_ITEM_TEXT_P(_i("Checks:"));
|
||||
|
@ -5556,7 +5556,10 @@ static void lcd_settings_menu()
|
|||
#endif //(LANG_MODE != 0)
|
||||
|
||||
if (!farm_mode)
|
||||
{
|
||||
bSettings=true; // flag ('fake parameter') for 'lcd_checking_menu()' function
|
||||
MENU_ITEM_SUBMENU_P(_i("Print checking"), lcd_checking_menu);
|
||||
}
|
||||
|
||||
SETTINGS_SD;
|
||||
SETTINGS_SOUND;
|
||||
|
|
|
@ -137,6 +137,9 @@ void lcd_ignore_click(bool b=true);
|
|||
void lcd_commands();
|
||||
|
||||
|
||||
extern bool bSettings; // flag (i.e. 'fake parameter') for 'lcd_checkink_menu()' function
|
||||
|
||||
|
||||
void change_extr(int extr);
|
||||
|
||||
#ifdef SNMM
|
||||
|
|
|
@ -384,12 +384,12 @@ if(oCheckMode==ClCheckMode::_None)
|
|||
nDiameter_um=eeprom_read_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM);
|
||||
if(nDiameter==nDiameter_um)
|
||||
return;
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHOLNPGM("Nozzle diameter doesn't match ...");
|
||||
SERIAL_ECHOPGM("actual : ");
|
||||
SERIAL_ECHOLN((float)(nDiameter_um/1000.0));
|
||||
SERIAL_ECHOPGM("expected: ");
|
||||
SERIAL_ECHOLN((float)(nDiameter/1000.0));
|
||||
//SERIAL_ECHO_START;
|
||||
//SERIAL_ECHOLNPGM("Nozzle diameter doesn't match ...");
|
||||
//SERIAL_ECHOPGM("actual : ");
|
||||
//SERIAL_ECHOLN((float)(nDiameter_um/1000.0));
|
||||
//SERIAL_ECHOPGM("expected: ");
|
||||
//SERIAL_ECHOLN((float)(nDiameter/1000.0));
|
||||
switch(oCheckMode)
|
||||
{
|
||||
case ClCheckMode::_Warn:
|
||||
|
@ -400,6 +400,7 @@ switch(oCheckMode)
|
|||
lcd_print_stop();
|
||||
break;
|
||||
}
|
||||
bSettings=false; // flag ('fake parameter') for 'lcd_checking_menu()' function
|
||||
menu_submenu(lcd_checking_menu);
|
||||
}
|
||||
|
||||
|
@ -409,12 +410,12 @@ if(oCheckModel==ClCheckModel::_None)
|
|||
return;
|
||||
if(nPrinterModel==nPrinterType)
|
||||
return;
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHOLNPGM("Printer model doesn't match ...");
|
||||
SERIAL_ECHOPGM("actual : ");
|
||||
SERIAL_ECHOLN(nPrinterType);
|
||||
SERIAL_ECHOPGM("expected: ");
|
||||
SERIAL_ECHOLN(nPrinterModel);
|
||||
//SERIAL_ECHO_START;
|
||||
//SERIAL_ECHOLNPGM("Printer model doesn't match ...");
|
||||
//SERIAL_ECHOPGM("actual : ");
|
||||
//SERIAL_ECHOLN(nPrinterType);
|
||||
//SERIAL_ECHOPGM("expected: ");
|
||||
//SERIAL_ECHOLN(nPrinterModel);
|
||||
switch(oCheckModel)
|
||||
{
|
||||
case ClCheckModel::_Warn:
|
||||
|
@ -452,12 +453,12 @@ if(nCompareValueResult==COMPARE_VALUE_EQUAL)
|
|||
return;
|
||||
if((nCompareValueResult<COMPARE_VALUE_EQUAL)&&oCheckVersion==ClCheckVersion::_Warn)
|
||||
return;
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHOLNPGM("FW version doesn't match ...");
|
||||
SERIAL_ECHOPGM("actual : ");
|
||||
SERIAL_ECHOLN(FW_VERSION);
|
||||
SERIAL_ECHOPGM("expected: ");
|
||||
SERIAL_ECHOLN(pVersion);
|
||||
//SERIAL_ECHO_START;
|
||||
//SERIAL_ECHOLNPGM("FW version doesn't match ...");
|
||||
//SERIAL_ECHOPGM("actual : ");
|
||||
//SERIAL_ECHOLN(FW_VERSION);
|
||||
//SERIAL_ECHOPGM("expected: ");
|
||||
//SERIAL_ECHOLN(pVersion);
|
||||
switch(oCheckVersion)
|
||||
{
|
||||
case ClCheckVersion::_Warn:
|
||||
|
@ -478,12 +479,12 @@ if(nGcodeLevel==(uint16_t)GCODE_LEVEL)
|
|||
return;
|
||||
if((nGcodeLevel<(uint16_t)GCODE_LEVEL)&&(oCheckGcode==ClCheckGcode::_Warn))
|
||||
return;
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHOLNPGM("G-code level doesn't match ...");
|
||||
SERIAL_ECHOPGM("actual : ");
|
||||
SERIAL_ECHOLN(GCODE_LEVEL);
|
||||
SERIAL_ECHOPGM("expected: ");
|
||||
SERIAL_ECHOLN(nGcodeLevel);
|
||||
//SERIAL_ECHO_START;
|
||||
//SERIAL_ECHOLNPGM("G-code level doesn't match ...");
|
||||
//SERIAL_ECHOPGM("actual : ");
|
||||
//SERIAL_ECHOLN(GCODE_LEVEL);
|
||||
//SERIAL_ECHOPGM("expected: ");
|
||||
//SERIAL_ECHOLN(nGcodeLevel);
|
||||
switch(oCheckGcode)
|
||||
{
|
||||
case ClCheckGcode::_Warn:
|
||||
|
@ -535,14 +536,14 @@ if(pResult!=NULL)
|
|||
if(bCheckOK&&(!strncasecmp_P(pResult,::sPrinterName,nLength))) // i.e. string compare execute only if lengths are same
|
||||
return;
|
||||
}
|
||||
SERIAL_ECHO_START;
|
||||
SERIAL_ECHOLNPGM("Printer model doesn't match ...");
|
||||
SERIAL_ECHOPGM("actual : \"");
|
||||
serialprintPGM(::sPrinterName);
|
||||
SERIAL_ECHOLNPGM("\"");
|
||||
SERIAL_ECHOPGM("expected: \"");
|
||||
SERIAL_ECHO(sPrinterName);
|
||||
SERIAL_ECHOLNPGM("\"");
|
||||
//SERIAL_ECHO_START;
|
||||
//SERIAL_ECHOLNPGM("Printer model doesn't match ...");
|
||||
//SERIAL_ECHOPGM("actual : \"");
|
||||
//serialprintPGM(::sPrinterName);
|
||||
//SERIAL_ECHOLNPGM("\"");
|
||||
//SERIAL_ECHOPGM("expected: \"");
|
||||
////SERIAL_ECHO(sPrinterName);
|
||||
//SERIAL_ECHOLNPGM("\"");
|
||||
switch(oCheckModel)
|
||||
{
|
||||
case ClCheckModel::_Warn:
|
||||
|
|
Loading…
Reference in a new issue