invert logic cutoff register
This commit is contained in:
@@ -28,7 +28,7 @@ DEYE_REG_GRID_EXPORT_TOTAL_LO = 524
|
||||
DEYE_REG_GRID_EXPORT_TOTAL_HI = 525
|
||||
DEYE_REG_PV1_POWER = 672
|
||||
DEYE_REG_PV2_POWER = 673
|
||||
# Solar sell (0 = přebytek řiditelné FVE nesmí do sítě) a GEN/MI cut-off (bits0–1 == 2 → cut-off ON); viz modbus-registers.md
|
||||
# Solar sell (0 = přebytek řiditelné FVE nesmí do sítě) a GEN/MI cut-off (bits0–1 == 3 → cut-off ON); viz modbus-registers.md
|
||||
DEYE_REG_SOLAR_SELL = 145
|
||||
DEYE_REG_CONTROL_BOARD_SPECIAL1 = 179
|
||||
|
||||
@@ -48,7 +48,7 @@ def _export_limit_flags_from_deye_regs(reg145: int | None, reg179: int | None) -
|
||||
flags = 0
|
||||
if reg145 is not None and int(reg145) == 0:
|
||||
flags |= 1
|
||||
if reg179 is not None and (int(reg179) & 3) == 2:
|
||||
if reg179 is not None and (int(reg179) & 3) == 3:
|
||||
flags |= 2
|
||||
return (flags != 0), flags
|
||||
|
||||
|
||||
Reference in New Issue
Block a user