This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new 39d5e594cb feat(plc4go/cbus): add more tracing, increase receive
timeout
39d5e594cb is described below
commit 39d5e594cb2ea14fe0fbf999649aa2c240c7d88e
Author: Sebastian Rühl <[email protected]>
AuthorDate: Tue Mar 28 11:08:20 2023 +0200
feat(plc4go/cbus): add more tracing, increase receive timeout
---
plc4go/internal/cbus/MessageCodec.go | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/plc4go/internal/cbus/MessageCodec.go
b/plc4go/internal/cbus/MessageCodec.go
index 8fd7e10937..b58ecbd2cc 100644
--- a/plc4go/internal/cbus/MessageCodec.go
+++ b/plc4go/internal/cbus/MessageCodec.go
@@ -187,19 +187,23 @@ lookingForTheEnd:
if newPackageHash == m.lastPackageHash {
m.hashEncountered++
}
+ log.Trace().Msgf("new hash %x, last hash %x, seen %d times",
newPackageHash, m.lastPackageHash, m.hashEncountered)
m.lastPackageHash = newPackageHash
- if m.hashEncountered < 9 {
+ if m.hashEncountered < 11 {
+ log.Trace().Msg("Waiting for more data")
return nil, nil
} else {
- // after 90ms we give up finding a lf
+ // after 110ms we give up finding a lf
m.lastPackageHash, m.hashEncountered = 0, 0
if indexOfCR >= 0 {
+ log.Trace().Msg("setting requestToPci")
requestToPci = true
}
}
}
if !pciResponse && !requestToPci && !confirmation {
// Apparently we have not found any message yet
+ log.Trace().Msg("no message found yet")
return nil, nil
}