Skip to content

Commit

Permalink
Make (un)bypass input available for all firmware versions
Browse files Browse the repository at this point in the history
  • Loading branch information
rrooggiieerr committed Jun 20, 2024
1 parent 9419c50 commit d145fb3
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions unii/unii.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,15 +390,21 @@ def _handle_equipment_information(self, data: UNiiEquipmentInformation):

self.equipment_information = data

# Set the supported features of the equipment
self.features = []

# Feature that applies to all versions of the firmware
self.features.append(UNiiFeature.BYPASS_INPUT)

# Get capabilities based on firmware version number
software_version = (
self.equipment_information.software_version.finalize_version()
)
if software_version.match(">=2.17.0"):
# self.features.append(UNiiFeature.ARM_SECTION)
self.features.append(UNiiFeature.BYPASS_INPUT)
# self.features.append(UNiiFeature.BYPASS_ZONE)
# self.features.append(UNiiFeature.SET_OUTPUT)
# Library doesn't distinct between versions yet, so disabled for now
# software_version = (
# self.equipment_information.software_version.finalize_version()
# )
# if software_version.match(">=2.17.0"):
# self.features.append(UNiiFeature.ARM_SECTION)
# self.features.append(UNiiFeature.BYPASS_ZONE)
# self.features.append(UNiiFeature.SET_OUTPUT)

def _handle_section_arrangement(self, data: UNiiSectionArrangement):
for _, section in data.items():
Expand Down

0 comments on commit d145fb3

Please sign in to comment.