Skip to content

Commit

Permalink
test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
softwarecrash committed Dec 25, 2023
1 parent 12e4f12 commit 84a6b50
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
platform = espressif8266@4.2.1
framework = arduino
monitor_speed = 115200
custom_prog_version = 1.1.4
custom_prog_version = 1.1.4A2
build_flags =
-DVERSION=${this.custom_prog_version}
-DPIO_SRC_NAM="Solar2MQTT"
Expand Down
8 changes: 8 additions & 0 deletions src/PI_Serial/PI_Serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,25 +77,32 @@ bool PI_Serial::loop()
switch (requestCounter)
{
case 0:
PI_DEBUG_PRINTLN("Serial request>"+(String)requestCounter+"<:>6<");
requestCounter = PIXX_QPIGS() ? (requestCounter + 1) : 0;
break;
case 1:
PI_DEBUG_PRINTLN("Serial request>"+(String)requestCounter+"<:>6<");
requestCounter = PIXX_QPIGS2() ? (requestCounter + 1) : 0;
break;
case 2:
PI_DEBUG_PRINTLN("Serial request>"+(String)requestCounter+"<:>6<");
requestCounter = PIXX_QMOD() ? (requestCounter + 1) : 0;
break;
case 3:
PI_DEBUG_PRINTLN("Serial request>"+(String)requestCounter+"<:>6<");
requestCounter = PIXX_Q1() ? (requestCounter + 1) : 0;
break;
case 4:
PI_DEBUG_PRINTLN("Serial request>"+(String)requestCounter+"<:>6<");
// requestCounter = PIXX_QALL() ? (requestCounter + 1) : 0;
requestCounter++;
break;
case 5:
PI_DEBUG_PRINTLN("Serial request>"+(String)requestCounter+"<:>6<");
requestCounter = PIXX_QEX() ? (requestCounter + 1) : 0;
break;
case 6:
PI_DEBUG_PRINTLN("Serial request>"+(String)requestCounter+"<:>6<");
// sendCustomCommand();
requestCallback();
requestCounter = 0;
Expand All @@ -118,6 +125,7 @@ bool PI_Serial::loop()

void PI_Serial::callback(std::function<void()> func)
{
PI_DEBUG_PRINTLN("Data Collect complete, fire up callback");
requestCallback = func;
}

Expand Down
2 changes: 1 addition & 1 deletion src/PI_Serial/QPIGS2.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bool PI_Serial::PIXX_QPIGS2()
get.raw.qpigs2 = commandAnswer;
byte commandAnswerLength = commandAnswer.length();
String strs[30]; // buffer for string splitting
if (commandAnswer == "NAK")
if (commandAnswer == "NAK" || commandAnswer == "")
{
return true;
}
Expand Down

0 comments on commit 84a6b50

Please sign in to comment.