Added suppression of blue wire recycling warnings for when not connected to blue wire <W> toggles
This commit is contained in:
parent
17f044b544
commit
5db72af511
2 changed files with 22 additions and 13 deletions
|
@ -158,6 +158,7 @@ bool bHasOEMController = false;
|
||||||
bool bHasHtrData = false;
|
bool bHasHtrData = false;
|
||||||
bool bReportBlueWireData = REPORT_RAW_DATA;
|
bool bReportBlueWireData = REPORT_RAW_DATA;
|
||||||
bool bReportJSONData = REPORT_JSON_TRANSMIT;
|
bool bReportJSONData = REPORT_JSON_TRANSMIT;
|
||||||
|
bool bReportRecyleEvents = REPORT_BLUEWIRE_RECYCLES;
|
||||||
|
|
||||||
CProtocolPackage HeaterData;
|
CProtocolPackage HeaterData;
|
||||||
|
|
||||||
|
@ -375,23 +376,25 @@ void loop()
|
||||||
|
|
||||||
if(RxTimeElapsed >= moderator) {
|
if(RxTimeElapsed >= moderator) {
|
||||||
moderator += 10;
|
moderator += 10;
|
||||||
|
if(bReportRecyleEvents) {
|
||||||
DebugPort.print(RxTimeElapsed);
|
DebugPort.print(RxTimeElapsed);
|
||||||
DebugPort.print("ms - ");
|
DebugPort.print("ms - ");
|
||||||
|
}
|
||||||
if(CommState.is(CommStates::OEMCtrlRx)) {
|
if(CommState.is(CommStates::OEMCtrlRx)) {
|
||||||
DebugPort.println("Timeout collecting OEM controller data, returning to Idle State");
|
|
||||||
bHasOEMController = false;
|
bHasOEMController = false;
|
||||||
|
if(bReportRecyleEvents) DebugPort.println("Timeout collecting OEM controller data, returning to Idle State");
|
||||||
}
|
}
|
||||||
else if(CommState.is(CommStates::HeaterRx1)) {
|
else if(CommState.is(CommStates::HeaterRx1)) {
|
||||||
DebugPort.println("Timeout collecting OEM heater response data, returning to Idle State");
|
|
||||||
bHasHtrData = false;
|
bHasHtrData = false;
|
||||||
|
if(bReportRecyleEvents) DebugPort.println("Timeout collecting OEM heater response data, returning to Idle State");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DebugPort.println("Timeout collecting BTC heater response data, returning to Idle State");
|
|
||||||
bHasHtrData = false;
|
bHasHtrData = false;
|
||||||
|
if(bReportRecyleEvents) DebugPort.println("Timeout collecting BTC heater response data, returning to Idle State");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DebugPort.println("Recycling blue wire serial interface");
|
if(bReportRecyleEvents) DebugPort.println("Recycling blue wire serial interface");
|
||||||
initBlueWireSerial();
|
initBlueWireSerial();
|
||||||
CommState.set(CommStates::TemperatureRead); // revert to idle mode, after passing thru temperature mode
|
CommState.set(CommStates::TemperatureRead); // revert to idle mode, after passing thru temperature mode
|
||||||
}
|
}
|
||||||
|
@ -829,12 +832,13 @@ void checkDebugCommands()
|
||||||
if(rxVal == ' ') { // SPACE to bring up menu
|
if(rxVal == ' ') { // SPACE to bring up menu
|
||||||
DebugPort.print("\014");
|
DebugPort.print("\014");
|
||||||
DebugPort.println("MENU options");
|
DebugPort.println("MENU options");
|
||||||
DebugPort.println("<+> - request heater turns ON");
|
|
||||||
DebugPort.println("<-> - request heater turns OFF");
|
|
||||||
DebugPort.println("<B> - toggle raw blue wire data reporting");
|
|
||||||
DebugPort.println("<J> - toggle output JSON reporting");
|
|
||||||
DebugPort.println("<R> - restart the ESP");
|
|
||||||
DebugPort.println("");
|
DebugPort.println("");
|
||||||
|
DebugPort.print(" <B> - toggle raw blue wire data reporting, currently "); DebugPort.println(bReportBlueWireData ? "ON" : "OFF");
|
||||||
|
DebugPort.print(" <J> - toggle output JSON reporting, currently "); DebugPort.println(bReportJSONData ? "ON" : "OFF");
|
||||||
|
DebugPort.print(" <W> - toggle reporting of blue wire recycling event, currently "); DebugPort.println(bReportRecyleEvents ? "ON" : "OFF");
|
||||||
|
DebugPort.println(" <+> - request heater turns ON");
|
||||||
|
DebugPort.println(" <-> - request heater turns OFF");
|
||||||
|
DebugPort.println(" <R> - restart the ESP");
|
||||||
DebugPort.println("");
|
DebugPort.println("");
|
||||||
DebugPort.println("");
|
DebugPort.println("");
|
||||||
DebugPort.println("");
|
DebugPort.println("");
|
||||||
|
@ -869,12 +873,16 @@ void checkDebugCommands()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else if(rxVal == 'b') {
|
else if(rxVal == 'b') {
|
||||||
DebugPort.println("Toggling raw blue wire data reporting");
|
|
||||||
bReportBlueWireData = !bReportBlueWireData;
|
bReportBlueWireData = !bReportBlueWireData;
|
||||||
|
DebugPort.print("Toggled raw blue wire data reporting "); DebugPort.println(bReportBlueWireData ? "ON" : "OFF");
|
||||||
}
|
}
|
||||||
else if(rxVal == 'j') {
|
else if(rxVal == 'j') {
|
||||||
DebugPort.println("Toggling JSON data reporting");
|
|
||||||
bReportJSONData = !bReportJSONData;
|
bReportJSONData = !bReportJSONData;
|
||||||
|
DebugPort.print("Toggled JSON data reporting "); DebugPort.println(bReportJSONData ? "ON" : "OFF");
|
||||||
|
}
|
||||||
|
else if(rxVal == 'w') {
|
||||||
|
bReportRecyleEvents = !bReportRecyleEvents;
|
||||||
|
DebugPort.print("Toggled blue wire recycling event reporting "); DebugPort.println(bReportRecyleEvents ? "ON" : "OFF");
|
||||||
}
|
}
|
||||||
else if(rxVal == '+') {
|
else if(rxVal == '+') {
|
||||||
TxManage.queueOnRequest();
|
TxManage.queueOnRequest();
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
#define TERMINATE_BTC_LINE 0 /* when an OEM controller does not exist */
|
#define TERMINATE_BTC_LINE 0 /* when an OEM controller does not exist */
|
||||||
#define REPORT_OEM_RESYNC 0 /* report idle time if OEM controller detected */
|
#define REPORT_OEM_RESYNC 0 /* report idle time if OEM controller detected */
|
||||||
#define SHOW_STATE_MACHINE_TRANSITIONS 0 /* state machine changes reported to DebugPort */
|
#define SHOW_STATE_MACHINE_TRANSITIONS 0 /* state machine changes reported to DebugPort */
|
||||||
|
#define REPORT_BLUEWIRE_RECYCLES 1 /* best default on as this is abnormal behaviour can toggle using <W> on debug console */
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// LED monitoring
|
// LED monitoring
|
||||||
|
|
Loading…
Reference in a new issue