mirror of
https://github.com/Andre0512/pyhOn.git
synced 2024-12-22 18:55:32 +00:00
Update device.py trying to set fixed value from history
This commit is contained in:
parent
fde41ac456
commit
318e60e91e
|
@ -1,6 +1,7 @@
|
||||||
import importlib
|
import importlib
|
||||||
|
|
||||||
from pyhon.commands import HonCommand
|
from pyhon.commands import HonCommand
|
||||||
|
from pyhon.parameter import HonParameterFixed
|
||||||
|
|
||||||
|
|
||||||
class HonDevice:
|
class HonDevice:
|
||||||
|
@ -93,7 +94,7 @@ class HonDevice:
|
||||||
command.set_program(parameters.pop("program").split(".")[-1].lower())
|
command.set_program(parameters.pop("program").split(".")[-1].lower())
|
||||||
command = self.commands[name]
|
command = self.commands[name]
|
||||||
for key, data in command.settings.items():
|
for key, data in command.settings.items():
|
||||||
if parameters.get(key) is not None:
|
if not isinstance(data, HonParameterFixed) and parameters.get(key) is not None:
|
||||||
data.value = parameters.get(key)
|
data.value = parameters.get(key)
|
||||||
|
|
||||||
async def load_commands(self):
|
async def load_commands(self):
|
||||||
|
|
Loading…
Reference in a new issue