Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/test_model_cleanup' into test_mo…
Browse files Browse the repository at this point in the history
…del_cleanup
emcek committed Oct 26, 2023
2 parents 1898d26 + 1f20be7 commit 7fff0fa
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions dcspy/models.py
Original file line number Diff line number Diff line change
@@ -235,12 +235,6 @@ class BiosValueStr(BaseModel):
value: Union[int, str]


class BiosValue(RootModel):
"""BIOS values model."""
root: Dict[str, Union[BiosValueStr, BiosValueInt]]
# ---------------- DCS-BIOS ----------------


class ControlKeyData:
"""Describes input data for cockpit controller."""

@@ -316,6 +310,7 @@ def request(self) -> Union[str, Dict[str, Union[str, Iterator]]]:
:return: str or dict with iterator
"""
# fixme: check if is needed save/load airplane.yaml in GUI
if self.is_cycle:
return {'bios': self.name, 'iter': iter([0])}
elif self.one_input and self.has_fixed_step:
@@ -333,6 +328,7 @@ def cycle_data(self):
:return: tuple with max value and suggested step
"""
# fixme: usage only in test
return self.max_value, self.suggested_step

@property
@@ -342,6 +338,7 @@ def is_cycle(self) -> bool:
:return: bool if input is cycle button, False otherwise.
"""
# fixme: usage only in request clean up after
if self.has_set_state and self.max_value > 0:
return True
elif self.has_variable_step:

0 comments on commit 7fff0fa

Please sign in to comment.