tweaks & "Pi now ON" LCD message
This commit is contained in:
parent
2a7b05768c
commit
1472d9d475
|
|
@ -317,18 +317,14 @@ void handleSerialInput() {
|
||||||
|
|
||||||
if (inputLen > 0)
|
if (inputLen > 0)
|
||||||
{
|
{
|
||||||
|
DEBUG("GTWCMD:");DEBUGln(temp);
|
||||||
inputstr = String(temp);
|
inputstr = String(temp);
|
||||||
inputstr.toUpperCase();
|
inputstr.toUpperCase();
|
||||||
|
|
||||||
if (inputstr.equals("BEEP")) Beep(5, false);
|
if (inputstr.equals("BEEP")) Beep(5, false);
|
||||||
if (inputstr.equals("BEEP2")) Beep(10, true);
|
if (inputstr.equals("BEEP2")) Beep(10, true);
|
||||||
if (inputstr.equals("RAM")) { DEBUG(F("Free RAM bytes: "));DEBUGln(checkFreeRAM()); }
|
if (inputstr.equals("RAM")) { DEBUG(F("Free RAM bytes: "));DEBUGln(checkFreeRAM()); }
|
||||||
|
if (inputstr.equals("KEY?")) { Serial.print(F("ENCRYPTKEY:"));Serial.println(ENCRYPTKEY); }
|
||||||
if (inputstr.equals("KEY?"))
|
|
||||||
{
|
|
||||||
Serial.print(F("ENCRYPTKEY:"));
|
|
||||||
Serial.print(ENCRYPTKEY);
|
|
||||||
}
|
|
||||||
|
|
||||||
byte targetId = inputstr.toInt(); //extract ID if any
|
byte targetId = inputstr.toInt(); //extract ID if any
|
||||||
byte colonIndex = inputstr.indexOf(":"); //find position of first colon
|
byte colonIndex = inputstr.indexOf(":"); //find position of first colon
|
||||||
|
|
@ -337,9 +333,9 @@ void handleSerialInput() {
|
||||||
{
|
{
|
||||||
inputstr.getBytes((byte*)temp, 61);
|
inputstr.getBytes((byte*)temp, 61);
|
||||||
if (radio.sendWithRetry(targetId, (byte*)temp, inputstr.length()))
|
if (radio.sendWithRetry(targetId, (byte*)temp, inputstr.length()))
|
||||||
Serial.println(F("ACK:OK"));
|
DEBUGln(F("ACK:OK"));
|
||||||
else
|
else
|
||||||
Serial.println(F("ACK:NOK"));
|
DEBUGln(F("ACK:NOK"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -405,7 +401,6 @@ void handlePowerControl() {
|
||||||
digitalWrite(SIG_SHUTOFF, HIGH);
|
digitalWrite(SIG_SHUTOFF, HIGH);
|
||||||
delay(RESETPULSETIME);
|
delay(RESETPULSETIME);
|
||||||
digitalWrite(SIG_SHUTOFF, LOW);
|
digitalWrite(SIG_SHUTOFF, LOW);
|
||||||
//DEBUGln("SIG_SHUTOFF - HIGH>delay>LOW");
|
|
||||||
|
|
||||||
NOW = millis();
|
NOW = millis();
|
||||||
boolean recycleDetected=false;
|
boolean recycleDetected=false;
|
||||||
|
|
@ -563,6 +558,10 @@ void handlePowerControl() {
|
||||||
PowerState = ON;
|
PowerState = ON;
|
||||||
batteryLowShutdown=false;
|
batteryLowShutdown=false;
|
||||||
POWER(PowerState);
|
POWER(PowerState);
|
||||||
|
#ifdef ENABLE_LCD
|
||||||
|
sprintf(lcdbuff, "Pi is now ON");
|
||||||
|
refreshLCD();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue