moved some Strings to Flash

This commit is contained in:
Marcel Peterkau 2022-02-10 22:31:11 +01:00
parent e6fa1e1ccd
commit 8b4e55d2dd
4 changed files with 13 additions and 13 deletions

View File

@ -6,9 +6,9 @@ void Init_CAN()
{
if (CAN0.begin(MCP_STDEXT, CAN_500KBPS, MCP_16MHZ) == CAN_OK)
Serial.println("MCP2515 Initialized Successfully!");
Serial.println(PSTR("MCP2515 Initialized Successfully!"));
else
Serial.println("Error Initializing MCP2515...");
Serial.println(PSTR("Error Initializing MCP2515..."));
CAN0.init_Mask(0, 0, 0x07FF0000); // Init first mask...
CAN0.init_Mask(1, 0, 0x07FF0000); // Init second mask...

View File

@ -18,7 +18,7 @@ void InitEEPROM()
{
ee.begin();
if (!ee.isConnected())
Serial.println("ERROR: Can't find eeprom...");
Serial.println(PSTR("ERROR: Can't find eeprom..."));
}
#endif
@ -78,7 +78,7 @@ void GetConfig_EEPROM()
if (Checksum_EEPROM((uint8_t *)&LubeConfig, sizeof(LubeConfig)) != checksum)
{
Serial.printf("CFG EEPROM Checksum BAD\n");
Serial.printf(PSTR("CFG EEPROM Checksum BAD\n"));
FormatConfig_EEPROM();
}
LubeConfig.checksum = checksum;
@ -131,7 +131,7 @@ void GetPersistence_EEPROM()
if (Checksum_EEPROM((uint8_t *)&PersistenceData, sizeof(PersistenceData)) != checksum)
{
Serial.printf("Persistance EEPROM Checksum BAD\n");
Serial.printf(PSTR("Persistance EEPROM Checksum BAD\n"));
FormatPersistence_EEPROM();
}
PersistenceData.checksum = checksum;
@ -191,7 +191,7 @@ void dumpEEPROM(uint16_t memoryAddress, uint16_t length)
char ascii_buf[BLOCK_TO_LENGTH + 1];
sprintf(ascii_buf, "%*s", BLOCK_TO_LENGTH, "ASCII");
Serial.print("\nAddress ");
Serial.print(PSTR("\nAddress "));
for (int x = 0; x < BLOCK_TO_LENGTH; x++)
Serial.printf("%3d", x);

View File

@ -54,22 +54,22 @@ void RunLubeApp(uint32_t add_milimeters)
switch (globals.systemStatus)
{
case sysStat_Normal:
strcpy(globals.systemStatustxt, "Normal");
strcpy(globals.systemStatustxt, PSTR("Normal"));
break;
case sysStat_Purge:
strcpy(globals.systemStatustxt, "Purge");
strcpy(globals.systemStatustxt, PSTR("Purge"));
break;
case sysStat_Rain:
strcpy(globals.systemStatustxt, "Rain");
strcpy(globals.systemStatustxt, PSTR("Rain"));
break;
case sysStat_Startup:
strcpy(globals.systemStatustxt, "Startup");
strcpy(globals.systemStatustxt, PSTR("Startup"));
break;
case sysStat_Error:
strcpy(globals.systemStatustxt, "Error");
strcpy(globals.systemStatustxt, PSTR("Error"));
break;
case sysStat_Shutdown:
strcpy(globals.systemStatustxt, "Shutdown");
strcpy(globals.systemStatustxt, PSTR("Shutdown"));
break;
}

View File

@ -689,7 +689,7 @@ void toggleWiFiAP(boolean shutdown)
WiFiMaintainConnectionTicker.stop();
debugV("WiFi AP started, stopped Maintain-Timer");
#else
debugV("WiFi AP started");
debugV(PSTR("WiFi AP started"));
#endif
}
}