Merge remote-tracking branch 'lepshiy/master' into для_киры
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user