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