[update] fix stop error & relative_time
This commit is contained in:
@@ -9,7 +9,6 @@ class Action():
|
||||
self._duration = action.get('duration', None)
|
||||
self._goto = action.get('goto', None)
|
||||
self._cycle = action.get('cycle', None)
|
||||
|
||||
self._instruction = None
|
||||
|
||||
self.update_instruction()
|
||||
@@ -19,12 +18,16 @@ class Action():
|
||||
return self._type
|
||||
|
||||
def update_instruction(self):
|
||||
instruction_type = self._type
|
||||
if instruction_type == 'stop':
|
||||
instruction_type = 'interrupt'
|
||||
|
||||
self._instruction = {
|
||||
"device_instruction": {
|
||||
"header": "call_instruction",
|
||||
"device": self._target,
|
||||
"arguments": {
|
||||
"instruction": self._type,
|
||||
"instruction": instruction_type,
|
||||
}
|
||||
},
|
||||
"device_parameter": {
|
||||
|
||||
Reference in New Issue
Block a user