Compare commits

...

2 Commits

Author SHA1 Message Date
b5f0c0d86f fix lsn50 data format
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2024-02-09 14:13:27 +01:00
17b2b362a0 fix in error output
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2024-02-09 14:05:14 +01:00
2 changed files with 4 additions and 4 deletions

View File

@ -36,7 +36,7 @@ func (self *CommonHandler) GetId() string {
} }
func (self *CommonHandler) Lost(msg string, err error, message MessageT) { func (self *CommonHandler) Lost(msg string, err error, message MessageT) {
if err != nil { if err == nil {
log.Printf("Error: %s, message %s is lost", msg, message) log.Printf("Error: %s, message %s is lost", msg, message)
} else { } else {
log.Printf("Error: %s (%s), message %s is lost", msg, err, message) log.Printf("Error: %s (%s), message %s is lost", msg, err, message)

View File

@ -20,9 +20,9 @@ type message struct {
ALARM_status string `json:"ALARM_status"` ALARM_status string `json:"ALARM_status"`
Bat float32 `json:"BatV"` Bat float32 `json:"BatV"`
Work_mode string `json:"Work_mode"` Work_mode string `json:"Work_mode"`
Temp_Black string `json:"Temp_Black"` Temp_Black float32 `json:"Temp_Black"`
Temp_Red string `json:"Temp_Red"` Temp_Red float32 `json:"Temp_Red"`
Temp_White string `json:"Temp_White"` Temp_White float32 `json:"Temp_White"`
} }
func Parse(fPort int, decodedPayload []byte, _ string, variables *map[string]database.VariableType, attributes *map[string]interface{}, device *database.Device) error { func Parse(fPort int, decodedPayload []byte, _ string, variables *map[string]database.VariableType, attributes *map[string]interface{}, device *database.Device) error {