mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-04-26 12:17:56 +00:00
Some final adjustments
This commit is contained in:
@@ -19,12 +19,25 @@ void KmpCommunicator::configure(MeterConfig& meterConfig) {
|
|||||||
bool KmpCommunicator::loop() {
|
bool KmpCommunicator::loop() {
|
||||||
uint64_t now = millis64();
|
uint64_t now = millis64();
|
||||||
bool ret = talker->loop();
|
bool ret = talker->loop();
|
||||||
|
int lastError = getLastError();
|
||||||
if(ret) {
|
if(ret) {
|
||||||
#if defined(AMS_REMOTE_DEBUG)
|
#if defined(AMS_REMOTE_DEBUG)
|
||||||
if (debugger->isActive(RemoteDebug::VERBOSE))
|
if (debugger->isActive(RemoteDebug::VERBOSE))
|
||||||
#endif
|
#endif
|
||||||
debugger->printf_P(PSTR("Successful loop\n"));
|
debugger->printf_P(PSTR("Successful loop\n"));
|
||||||
Serial.flush();
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ platform = https://github.com/tasmota/platform-espressif32/releases/download/202
|
|||||||
framework = arduino
|
framework = arduino
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
board_build.f_cpu = 160000000L
|
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_ldf_mode = off
|
||||||
lib_compat_mode = off
|
lib_compat_mode = off
|
||||||
lib_deps = ${esp32.lib_deps}
|
lib_deps = ${esp32.lib_deps}
|
||||||
@@ -57,7 +57,12 @@ board_build.variant = esp32s2
|
|||||||
board_build.flash_mode = qio
|
board_build.flash_mode = qio
|
||||||
board_build.f_cpu = 160000000L
|
board_build.f_cpu = 160000000L
|
||||||
board_build.f_flash = 40000000L
|
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_ldf_mode = off
|
||||||
lib_compat_mode = off
|
lib_compat_mode = off
|
||||||
lib_deps = ${esp32.lib_deps}
|
lib_deps = ${esp32.lib_deps}
|
||||||
@@ -69,7 +74,13 @@ platform = https://github.com/tasmota/platform-espressif32/releases/download/202
|
|||||||
framework = arduino
|
framework = arduino
|
||||||
board = esp32-solo1
|
board = esp32-solo1
|
||||||
board_build.f_cpu = 160000000L
|
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_ldf_mode = off
|
||||||
lib_compat_mode = off
|
lib_compat_mode = off
|
||||||
lib_deps = ${esp32.lib_deps}
|
lib_deps = ${esp32.lib_deps}
|
||||||
@@ -93,7 +104,12 @@ platform = https://github.com/tasmota/platform-espressif32/releases/download/202
|
|||||||
framework = arduino
|
framework = arduino
|
||||||
board = esp32-s3-devkitc-1
|
board = esp32-s3-devkitc-1
|
||||||
board_build.mcu = esp32s3
|
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_ldf_mode = off
|
||||||
lib_compat_mode = off
|
lib_compat_mode = off
|
||||||
lib_deps = ${esp32.lib_deps}
|
lib_deps = ${esp32.lib_deps}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user