Skip to content

Commit

Permalink
add more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
softwarecrash committed Mar 27, 2024
1 parent 1c9ddad commit 1ed8763
Show file tree
Hide file tree
Showing 2 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 @@ -18,7 +18,7 @@ monitor_filters = esp8266_exception_decoder, default, time, printable, colorize
board_build.ldscript = eagle.flash.4m.ld ; 4MB (FS:4MB OTA:~3600KB)
upload_speed = 921600

custom_prog_version = 1.1.5A4
custom_prog_version = 1.1.5A5

build_flags =
-DVERSION=${this.custom_prog_version}
Expand Down
10 changes: 9 additions & 1 deletion src/VeDirectFrameHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void VeDirectFrameHandler::rxData(uint8_t inbyte)
{
Serial.write(inbyte);
// if (mStop) return;
if ((inbyte == ':') && (mState != CHECKSUM))
if ((inbyte == ':') /*&& (mState != CHECKSUM)*/)
{
mState = RECORD_HEX;
}
Expand Down Expand Up @@ -109,6 +109,8 @@ void VeDirectFrameHandler::rxData(uint8_t inbyte)
mTextPointer = mValue; /* Reset value pointer */
mState = RECORD_VALUE;
break;


default:
// add byte to name, but do no overflow
if (mTextPointer < (mName + sizeof(mName)))
Expand Down Expand Up @@ -140,6 +142,12 @@ void VeDirectFrameHandler::rxData(uint8_t inbyte)
break;
case CHECKSUM:
{
Serial.println();
Serial.print("Calcula CHK: ");
Serial.println(mChecksum, HEX);
Serial.print("Recived CHK: ");
Serial.println(inbyte, HEX);

bool valid = mChecksum == 0;
// Serial.println(mChecksum);
if (!valid)
Expand Down

0 comments on commit 1ed8763

Please sign in to comment.