From 36769952bbf2cd26aa692ec42ad02962b4114cb2 Mon Sep 17 00:00:00 2001 From: Torsten Oltmanns Date: Tue, 26 Dec 2023 12:41:56 +0800 Subject: [PATCH] added logging when no data was received --- .../bms/daly/rs485/DalyBmsRS485Processor.java | 2 ++ docs/index.html | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 docs/index.html diff --git a/bms-daly-rs485/src/main/java/com/airepublic/bmstoinverter/bms/daly/rs485/DalyBmsRS485Processor.java b/bms-daly-rs485/src/main/java/com/airepublic/bmstoinverter/bms/daly/rs485/DalyBmsRS485Processor.java index fe79658e..2c785de5 100644 --- a/bms-daly-rs485/src/main/java/com/airepublic/bmstoinverter/bms/daly/rs485/DalyBmsRS485Processor.java +++ b/bms-daly-rs485/src/main/java/com/airepublic/bmstoinverter/bms/daly/rs485/DalyBmsRS485Processor.java @@ -62,6 +62,8 @@ protected List sendMessage(final int bmsNo, final DalyCommand cmd, f if (receiveBuffer != null && receiveBuffer.capacity() < port.getFrameLength()) { LOG.debug("Wrong number of bytes received! {}", Port.printBuffer(receiveBuffer)); + } else { + LOG.warn("No bytes received: " + failureCount + "times!"); } if (failureCount > 10) { diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 00000000..d1bb9dc5 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,10 @@ + + + + +BMS-to-Inverter + + + + + \ No newline at end of file