Issue with sync_command #16

Merged
VadymMelnychuk merged 20 commits from main into main 2023-10-12 16:43:41 +02:00
2 changed files with 5 additions and 1 deletions
Showing only changes of commit 1ebd83b70d - Show all commits

View File

@ -307,6 +307,10 @@ class HonAppliance:
target.max = main.max target.max = main.max
target.min = main.min target.min = main.min
target.step = main.step target.step = main.step
elif isinstance(target, HonParameterRange):
target.max = int(main.value)
target.min = int(main.value)
target.step = 1
elif isinstance(target, HonParameterEnum): elif isinstance(target, HonParameterEnum):
target.values = main.values target.values = main.values
target.value = main.value target.value = main.value

View File

@ -132,7 +132,7 @@ class HonCommand:
async def send_specific(self, param_names: List[str]) -> bool: async def send_specific(self, param_names: List[str]) -> bool:
params: Dict[str, str | float] = {} params: Dict[str, str | float] = {}
for key, parameter in self._parameters.items(): for key, parameter in self._parameters.items():
if key in param_names: if key in param_names or parameter.mandatory:
params[key] = parameter.value params[key] = parameter.value
return await self.send_parameters(params) return await self.send_parameters(params)