Исправления. КАПС РПБ переписан под наследование от unit. Добавлена tx_len для модулей, где не было. ЭМС отлажено чтение состояния ячеек.

This commit is contained in:
MaD_CaT
2024-11-06 08:41:07 +03:00
parent 071352b9e4
commit d18dc1aa9f
3 changed files with 8 additions and 9 deletions

View File

@@ -98,6 +98,7 @@ class Sch3 extends unit.Unit:
if cmd_state != CmdState.DONE: return false
var json_dict = {'code': 'write', 'data': [addr] + data}
tx_data = JSON.stringify(json_dict).to_utf8_buffer()
tx_len = len(tx_data)
cmd_state = CmdState.SEND
return true
@@ -108,6 +109,7 @@ class Sch3 extends unit.Unit:
if cmd_state != CmdState.DONE: return false
var json_dict = {'code': 'read_holding', 'data': [addr, count]}
tx_data = JSON.stringify(json_dict).to_utf8_buffer()
tx_len = len(tx_data)
cmd_state = CmdState.SEND
return true
@@ -118,5 +120,6 @@ class Sch3 extends unit.Unit:
if cmd_state != CmdState.DONE: return false
var json_dict = {'code': 'read_input', 'data': [addr, count]}
tx_data = JSON.stringify(json_dict).to_utf8_buffer()
tx_len = len(tx_data)
cmd_state = CmdState.SEND
return true