Skip to content

Commit

Permalink
Some final adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
gskjold committed Aug 6, 2024
1 parent de63263 commit 569a0dd
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 4 deletions.
13 changes: 13 additions & 0 deletions lib/MeterCommunicators/src/KmpCommunicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,25 @@ void KmpCommunicator::configure(MeterConfig& meterConfig) {
bool KmpCommunicator::loop() {
uint64_t now = millis64();
bool ret = talker->loop();
int lastError = getLastError();
if(ret) {
#if defined(AMS_REMOTE_DEBUG)
if (debugger->isActive(RemoteDebug::VERBOSE))
#endif
debugger->printf_P(PSTR("Successful loop\n"));
Serial.flush();
} else if(lastError < 0 && lastError != DATA_PARSE_INCOMPLETE) {
#if defined(AMS_REMOTE_DEBUG)
if (debugger->isActive(RemoteDebug::DEBUG))
#endif
debugger->printf_P(PSTR("Error code: %d\n"), getLastError());
#if defined(AMS_REMOTE_DEBUG)
if (debugger->isActive(RemoteDebug::VERBOSE))
#endif
{
debugger->printf_P(PSTR(" payload:\n"));
debugPrint(hanBuffer, 0, hanBufferSize);
}
}
return ret;
}
Expand Down
24 changes: 20 additions & 4 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ platform = https://github.com/tasmota/platform-espressif32/releases/download/202
framework = arduino
board = esp32dev
board_build.f_cpu = 160000000L
build_flags = ${common.build_flags} -D AMS_REMOTE_DEBUG=1
build_flags = ${common.build_flags}
lib_ldf_mode = off
lib_compat_mode = off
lib_deps = ${esp32.lib_deps}
Expand All @@ -57,7 +57,12 @@ board_build.variant = esp32s2
board_build.flash_mode = qio
board_build.f_cpu = 160000000L
board_build.f_flash = 40000000L
build_flags = ${common.build_flags} -D AMS_REMOTE_DEBUG=1
build_flags =
${common.build_flags}
-D AMS_REMOTE_DEBUG=1
-D AMS_KMP=1
-L precompiled/esp32s2
-lKmpTalker
lib_ldf_mode = off
lib_compat_mode = off
lib_deps = ${esp32.lib_deps}
Expand All @@ -69,7 +74,13 @@ platform = https://github.com/tasmota/platform-espressif32/releases/download/202
framework = arduino
board = esp32-solo1
board_build.f_cpu = 160000000L
build_flags = ${common.build_flags} -DFRAMEWORK_ARDUINO_SOLO1 -D AMS_REMOTE_DEBUG=1
build_flags =
${common.build_flags}
-DFRAMEWORK_ARDUINO_SOLO1
-D AMS_REMOTE_DEBUG=1
-D AMS_KMP=1
-L precompiled/esp32
-lKmpTalker
lib_ldf_mode = off
lib_compat_mode = off
lib_deps = ${esp32.lib_deps}
Expand All @@ -93,7 +104,12 @@ platform = https://github.com/tasmota/platform-espressif32/releases/download/202
framework = arduino
board = esp32-s3-devkitc-1
board_build.mcu = esp32s3
build_flags = ${common.build_flags} -D AMS_REMOTE_DEBUG=1
build_flags =
${common.build_flags}
-D AMS_REMOTE_DEBUG=1
-D AMS_KMP=1
-L precompiled/esp32s3
-lKmpTalker
lib_ldf_mode = off
lib_compat_mode = off
lib_deps = ${esp32.lib_deps}
Expand Down
Binary file modified precompiled/esp32/libKmpTalker.a
Binary file not shown.
Binary file modified precompiled/esp32c3/libKmpTalker.a
Binary file not shown.
Binary file modified precompiled/esp32s2/libKmpTalker.a
Binary file not shown.
Binary file modified precompiled/esp32s3/libKmpTalker.a
Binary file not shown.
Binary file modified precompiled/esp8266/libKmpTalker.a
Binary file not shown.

0 comments on commit 569a0dd

Please sign in to comment.