Skip to content

Commit

Permalink
Any command change is a change, including idle
Browse files Browse the repository at this point in the history
  • Loading branch information
netmindz committed Oct 2, 2024
1 parent 84086eb commit 25acd80
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sensor/src/sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,8 @@ void setup() {
haTime.setName("Time");

rawData.setName("Raw data");
rawData2.setName("CMD");
rawData3.setName("post temp: ");
rawData2.setName("Non-Temp");
rawData3.setName("CMD");
fbData.setName("FB");
commandQueueSize.setName("Command Queue");
timeSinceMsgStartSensor.setName("Command Time");
Expand Down Expand Up @@ -811,20 +811,20 @@ void handleMessage(size_t len, uint8_t buf[]) {
telnetSend("CMD: " + cmd);
}
if (!lastRaw3.equals(cmd)) {
// Controller responded to command
// Controller accepted command
if(commandPending) {
commandPending = false;
sendBuffer.dequeue();
Serial.printf("YAY: command response : %u\n", timeSinceMsgStart);
timeSinceMsgStartSensor.setValue((int) timeSinceMsgStart);
}
}

if (!lastRaw3.equals(cmd) && cmd != "0000000000") { // ignore idle command
lastRaw3 = cmd;
rawData3.setValue(lastRaw3.c_str());
if(cmd != "0000000000") { // ignore idle command
rawData3.setValue(lastRaw3.c_str());
}
}


if (result.substring(10, 12) == "43" || result.substring(10, 12) == "46") { // "C" or "F"
double tmp = (HexString2ASCIIString(result.substring(4, 10)).toDouble() / 10);
if (menu == "46") {
Expand Down

0 comments on commit 25acd80

Please sign in to comment.