From 84a6b507e66cf6c6a2ec4066ee7fafb6e9f0b363 Mon Sep 17 00:00:00 2001 From: softwarecrash Date: Mon, 25 Dec 2023 10:58:53 +0100 Subject: [PATCH] test changes --- platformio.ini | 2 +- src/PI_Serial/PI_Serial.cpp | 8 ++++++++ src/PI_Serial/QPIGS2.h | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 25c7087..a20df09 100644 --- a/platformio.ini +++ b/platformio.ini @@ -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" diff --git a/src/PI_Serial/PI_Serial.cpp b/src/PI_Serial/PI_Serial.cpp index 8bc21dd..a1c1a8b 100644 --- a/src/PI_Serial/PI_Serial.cpp +++ b/src/PI_Serial/PI_Serial.cpp @@ -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; @@ -118,6 +125,7 @@ bool PI_Serial::loop() void PI_Serial::callback(std::function func) { + PI_DEBUG_PRINTLN("Data Collect complete, fire up callback"); requestCallback = func; } diff --git a/src/PI_Serial/QPIGS2.h b/src/PI_Serial/QPIGS2.h index 23b8511..354a820 100644 --- a/src/PI_Serial/QPIGS2.h +++ b/src/PI_Serial/QPIGS2.h @@ -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; }