Bugfix in reading
This commit is contained in:
+1
-1
@@ -116,7 +116,6 @@ func StartProtocolParsing(frames <-chan *can.CanFrame) <-chan *Event {
|
||||
var start uint8 = 0
|
||||
for _, f := range param.fields {
|
||||
if val, found := get(start, f.length, frame.Payload); found {
|
||||
start += f.length
|
||||
f.last = now
|
||||
if f.value != val {
|
||||
f.value = val
|
||||
@@ -130,6 +129,7 @@ func StartProtocolParsing(frames <-chan *can.CanFrame) <-chan *Event {
|
||||
}
|
||||
}
|
||||
}
|
||||
start += f.length
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -197,11 +197,11 @@ func (c *CpuErrors) setGridVoltageLowErr(val uint64) {
|
||||
}
|
||||
|
||||
func (c *CpuErrors) setGridVoltageLow(val uint64) {
|
||||
c.GridVoltageLow = Voltage11BitType(val / 100)
|
||||
c.GridVoltageLow = Voltage11BitType(val)
|
||||
}
|
||||
|
||||
func (c *CpuErrors) setGridVoltageHigh(val uint64) {
|
||||
c.GridVoltageHigh = Voltage11BitType(val / 100)
|
||||
c.GridVoltageHigh = Voltage11BitType(val)
|
||||
}
|
||||
|
||||
func (c *CpuErrors) setGridVoltageEmpty(val uint64) {
|
||||
|
||||
Reference in New Issue
Block a user