New UI lib, OOP refactoring, new frames added #1

Merged
didinst merged 15 commits from refactor-2 into main 2023-08-24 21:52:33 +00:00
2 changed files with 8 additions and 3 deletions
Showing only changes of commit 515a8db2c5 - Show all commits
+6 -1
View File
@@ -387,9 +387,14 @@ func initialize() {
protocolMap[key] = action{fields: fields, interval: 1000, name: PConverterDebug, object: cd}
}
// set "null" values
for _, element := range protocolMap {
var from uint8 = 0
for _, f := range element.fields {
f.value = ^uint64(0)
var mask uint64 = ^(ALL_BITS << f.length)
mask = mask << from
f.value = mask
from += f.length
}
}
}
+2 -2
View File
@@ -197,11 +197,11 @@ func (c *CpuErrors) setGridVoltageLowErr(val uint64) {
}
func (c *CpuErrors) setGridVoltageLow(val uint64) {
c.GridVoltageLow = Voltage11BitType(val)
c.GridVoltageLow = Voltage11BitType(val / 100)
}
func (c *CpuErrors) setGridVoltageHigh(val uint64) {
c.GridVoltageHigh = Voltage11BitType(val)
c.GridVoltageHigh = Voltage11BitType(val / 100)
}
func (c *CpuErrors) setGridVoltageEmpty(val uint64) {