Web UI and OLED: adding Support Devices (#666)

* Use the comparison operator that Python3 likes.

* Add SUPPORT_DEVICE_TYPES category, and add Host Service to it.

* Add webapp UI for attaching a support device.

* Make the OLED screen aware of the support device type.

* Tweak test to make it clear that this is experimental functionality.

* Tweak device type names
This commit is contained in:
Daniel Markstedt
2022-02-15 04:06:27 -08:00
committed by GitHub
parent 46d23a0d5d
commit b3bdd07fa7
5 changed files with 94 additions and 16 deletions
+3 -2
View File
@@ -46,6 +46,7 @@ from rascsi.socket_cmds import SocketCmds
from rascsi.common_settings import (
REMOVABLE_DEVICE_TYPES,
NETWORK_DEVICE_TYPES,
SUPPORT_DEVICE_TYPES,
)
parser = argparse.ArgumentParser(description="RaSCSI OLED Monitor script")
@@ -186,8 +187,8 @@ def formatted_output():
f"{line['file']} {line['status']}")
else:
output.append(f"{line['id']} {line['device_type'][2:4]} {line['status']}")
# Special handling for network devices
elif line["device_type"] in NETWORK_DEVICE_TYPES:
# Special handling of devices that don't use image files
elif line["device_type"] in (NETWORK_DEVICE_TYPES + SUPPORT_DEVICE_TYPES):
output.append(f"{line['id']} {line['device_type'][2:4]} {line['vendor']} "
f"{line['product']}")
# Print only the Vendor/Product info if it's not generic RaSCSI