diff --git a/.circleci/config.yml b/.circleci/config.yml index 44a0cec29..4be003906 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -114,10 +114,11 @@ jobs: export DEBIAN_FRONTEND=noninteractive export FORCED_ROOT=1 ./software/common/common.sh install + ./software/common/common.sh generate - run: name: Run unit tests command: | - cd software/debug + cd software/tools poetry install --no-interaction poetry run pytest -v diff --git a/manufacturing/internals/electronics/README.md b/manufacturing/internals/electronics/README.md index d352670d5..7bf7a49b0 100644 --- a/manufacturing/internals/electronics/README.md +++ b/manufacturing/internals/electronics/README.md @@ -67,7 +67,7 @@ Make sure the PEM nuts `[A2]` are installed properly into the support frame `[A1 The Raspberry Pi serves as the user interface computer for the ventilator. It should be installed onto the PCB **before** attaching the PCB to the support frame. * install a heat sinks `[A6]` onto the Raspberry Pi `[A5]` -* set up the memory card `[A7]` with the appropriate operating system and software as described in the [software deployment instructions](../../../software/utils/rpi_config). +* set up the memory card `[A7]` with the appropriate operating system and software as described in the [software deployment instructions](../../../software/bootstrap). * install memory card into the RaspberryPi * Install the 22mm spacers `[A10]` onto the PCB `[A3]` at the location where the Raspberry Pi should be mounted. * Install the Raspberry Pi `[A5]` onto the PCB `[A3]` using bolts and washers `[A11-12]`. diff --git a/quality-assurance/testing/README.md b/quality-assurance/testing/README.md index 15b021291..14f78f417 100644 --- a/quality-assurance/testing/README.md +++ b/quality-assurance/testing/README.md @@ -125,4 +125,4 @@ scenarios. As of writing, we have used the tool for automating the collection of We plan to expand its use to more automated tests and apply it as part of the shared hardware-in-the-loop testing infrastructure described above. -More information about the debug interface is available [here](../../software/utils/debug). +More information about the debug interface is available [here](../../software/tools). diff --git a/software/README.md b/software/README.md index ddfcfb07f..10e1e230f 100644 --- a/software/README.md +++ b/software/README.md @@ -7,15 +7,9 @@ These are utilities for bench testing with mechanical lung simulators only. It i ## Contents +* [bootstrap](bootstrap) - initial deployment scripts for all software directly via the Raspberry pi integrated in a ventilator. Can also be used to configure a linux machine for software development or integration testing. * [design](design) - documents on software architecture and requirements * [common](common) - code common to both controller and GUI executables * [controller](controller) - code for pneumatic system controller (stm32) -* [debug](debug) - controller debug client for examining and manipulating low level variables, calibration, and testing +* [debug](debug) - controller debug client and other tools for calibration, configuration and testing * [gui](gui) - code for the ventilator graphical interface (Qt) -* [utils](utils) - scripts for debugging controller and mocking communications interface - -## Quick start - -If a proper enclosed unit is built as described under [manufacturing](../manufacturing), it should be possible to deploy all GUI and controller software directly via the Raspberry pi that is integrated into the ventilator unit. - -Scripts for doing so are available under [utils/rpi_config](utils/rpi_config). diff --git a/software/utils/rpi_config/README.md b/software/bootstrap/README.md similarity index 97% rename from software/utils/rpi_config/README.md rename to software/bootstrap/README.md index 6ecf6a8bd..4d34f3fba 100644 --- a/software/utils/rpi_config/README.md +++ b/software/bootstrap/README.md @@ -36,7 +36,7 @@ Whether by `ssh` or attached keyboard, copy and paste this command into a termin ```shell -bash <(wget -qO- https://github.com/RespiraWorks/Ventilator/raw/master/software/utils/rpi_config/bootstrap.sh) +bash <(wget -qO- https://github.com/RespiraWorks/Ventilator/raw/master/software/bootstrap/bootstrap.sh) ``` Follow the onscreen directions. When the initial installation is complete, the system will reboot. @@ -51,7 +51,7 @@ This is a good time to: When the machine boots, you should see an icon that says `Ventilator update` on the desktop. Either double-click or use the touch screen to run this shortcut. This will build the graphical interface and controller software, and deploy the latter to the STM32. -**NOTE:** You may also want to check that audio is set to be piped to `HDMI` rather than the `AV Jack` by right clicking on the volume icon in the task bar. +**NOTE:** You may also want to check that audio is set to be piped to `HDMI` rather than the `AV Jack` by right-clicking on the volume icon in the task bar. ## What you have available diff --git a/software/utils/rpi_config/bootstrap.sh b/software/bootstrap/bootstrap.sh similarity index 88% rename from software/utils/rpi_config/bootstrap.sh rename to software/bootstrap/bootstrap.sh index cfc1157f3..dee24ed39 100755 --- a/software/utils/rpi_config/bootstrap.sh +++ b/software/bootstrap/bootstrap.sh @@ -24,11 +24,10 @@ if [ -n "$VERBOSE" ]; then fi EXIT_FAILURE=1 -EXIT_SUCCESS=0 # Check if Linux PLATFORM="$(uname -s)" -if [ $PLATFORM != "Linux" ]; then +if [ "$PLATFORM" != "Linux" ]; then echo "Error: This script only supports 'Linux'. You have $PLATFORM." exit $EXIT_FAILURE fi @@ -56,7 +55,7 @@ if [ -z "$VERBOSE" ]; then echo " THIS WILL MESS WITH YOUR SYSTEM CONFIGURATION." echo " THIS IS FOR RASPBERRY-PI ONLY!" echo " " - read -n1 -s -r -p $'Press any key to continue...\n' key + read -n1 -s -r -p $'Press any key to continue...\n' _ fi ### Install git-lfs and update the system @@ -73,7 +72,7 @@ sudo raspi-config nonint do_blanking 1 # disable screen blanking sudo raspi-config nonint do_boot_splash 1 # disable splash screen ### Clone repository without LFS and go in -cd ${HOME} +cd "${HOME}" GIT_LFS_SKIP_SMUDGE=1 git clone https://github.com/RespiraWorks/Ventilator.git ventilator cd ventilator @@ -89,24 +88,24 @@ cd ventilator git lfs pull -I "software/**" ### Desktop shortcuts -/bin/cp -rf software/utils/rpi_config/user/Desktop/* ${HOME}/Desktop +/bin/cp -rf software/bootstrap/user/Desktop/* "${HOME}/Desktop" ### On-screen keyboard, in case its needed -sudo cp -f software/utils/rpi_config/keyboard.xml /usr/share/matchbox-keyboard/ +sudo cp -f software/bootstrap/keyboard.xml /usr/share/matchbox-keyboard/ ### Execute desktop shortcuts without bitching -mkdir -p ${HOME}/.config/libfm && cp -f software/utils/rpi_config/user/.config/libfm.conf ${HOME}/.config/libfm +mkdir -p "${HOME}/.config/libfm" && cp -f software/bootstrap/user/.config/libfm.conf "${HOME}/.config/libfm" # Install dependencies and do initial configuration for build toolchains ./software/gui/gui.sh install -./software/controller/controller.sh install +./software/common/common.sh install ./software/controller/controller.sh configure if [ -z "$VERBOSE" ]; then echo "Installation complete. Please check that this terminated with no errors." echo "Upon restart, please run the 'Update' app from your desktop to complete deployment." echo " " - read -n1 -s -r -p $'Press any key to restart the machine\n' key + read -n1 -s -r -p $'Press any key to restart the machine\n' _ sudo shutdown -r now fi diff --git a/software/utils/rpi_config/desktop_background.jpg b/software/bootstrap/desktop_background.jpg similarity index 100% rename from software/utils/rpi_config/desktop_background.jpg rename to software/bootstrap/desktop_background.jpg diff --git a/software/utils/icons/rw_debug.png b/software/bootstrap/icons/rw_debug.png similarity index 100% rename from software/utils/icons/rw_debug.png rename to software/bootstrap/icons/rw_debug.png diff --git a/software/utils/icons/rw_inhale.png b/software/bootstrap/icons/rw_inhale.png similarity index 100% rename from software/utils/icons/rw_inhale.png rename to software/bootstrap/icons/rw_inhale.png diff --git a/software/utils/icons/rw_logo.png b/software/bootstrap/icons/rw_logo.png similarity index 100% rename from software/utils/icons/rw_logo.png rename to software/bootstrap/icons/rw_logo.png diff --git a/software/utils/icons/rw_logo_reverse.png b/software/bootstrap/icons/rw_logo_reverse.png similarity index 100% rename from software/utils/icons/rw_logo_reverse.png rename to software/bootstrap/icons/rw_logo_reverse.png diff --git a/software/utils/icons/rw_logo_transparent.png b/software/bootstrap/icons/rw_logo_transparent.png similarity index 100% rename from software/utils/icons/rw_logo_transparent.png rename to software/bootstrap/icons/rw_logo_transparent.png diff --git a/software/utils/rpi_config/keyboard.xml b/software/bootstrap/keyboard.xml similarity index 100% rename from software/utils/rpi_config/keyboard.xml rename to software/bootstrap/keyboard.xml diff --git a/software/utils/rpi_config/update.sh b/software/bootstrap/update.sh similarity index 94% rename from software/utils/rpi_config/update.sh rename to software/bootstrap/update.sh index 85dd0b474..3a3e5aaf3 100755 --- a/software/utils/rpi_config/update.sh +++ b/software/bootstrap/update.sh @@ -68,10 +68,10 @@ cd "$(dirname "$0")"/../.. git pull ### Set RW background - must be done in Desktop mode, thus not in boostrap.sh -pcmanfm --set-wallpaper ${HOME}/ventilator/software/utils/rpi_config/desktop_background.jpg +pcmanfm --set-wallpaper ${HOME}/ventilator/software/bootstrap/desktop_background.jpg ### Update Desktop shortcuts -/bin/cp -rf ${HOME}/ventilator/software/utils/rpi_config/user/Desktop/* ${HOME}/Desktop +/bin/cp -rf ${HOME}/ventilator/software/bootstrap/user/Desktop/* ${HOME}/Desktop if zenity --question --no-wrap --title="PIO Update" \ --text "Update PlatformIO and libraries?" diff --git a/software/utils/rpi_config/user/.config/libfm.conf b/software/bootstrap/user/.config/libfm.conf similarity index 100% rename from software/utils/rpi_config/user/.config/libfm.conf rename to software/bootstrap/user/.config/libfm.conf diff --git a/software/utils/rpi_config/user/Desktop/Github b/software/bootstrap/user/Desktop/Github similarity index 66% rename from software/utils/rpi_config/user/Desktop/Github rename to software/bootstrap/user/Desktop/Github index 17360eb2e..0ecbed058 100755 --- a/software/utils/rpi_config/user/Desktop/Github +++ b/software/bootstrap/user/Desktop/Github @@ -2,5 +2,5 @@ Type=Link Name=Github repo Comment=RespiraWorks ventilator repository on Github -Icon=/home/admin/ventilator/software/utils/icons/rw_logo_reverse.png +Icon=/home/admin/ventilator/software/bootstrap/icons/rw_logo_reverse.png URL=https://github.com/RespiraWorks/Ventilator diff --git a/software/common/common.sh b/software/common/common.sh index 85395d232..371f08659 100755 --- a/software/common/common.sh +++ b/software/common/common.sh @@ -70,7 +70,7 @@ update_platformio() { generate_network_protocols() { PROTOCOLS_DIR=generated_libs/protocols - PYTHON_LIB_PATH=../debug/protocols + PYTHON_LIB_PATH=../tools/protocols GUI_LIB_PATH=../gui/src/protocols NANOPB_PLUGIN=${HOME}/.local/bin/protoc-gen-nanopb @@ -186,14 +186,6 @@ elif [ "$1" == "install" ]; then install_common_tooling exit_good -########### -# INSTALL # -########### -elif [ "$1" == "install" ]; then - ensure_not_root - install_linux - exit_good - ########## # UPDATE # ########## diff --git a/software/controller/README.md b/software/controller/README.md index 584a95f87..cb9396532 100644 --- a/software/controller/README.md +++ b/software/controller/README.md @@ -4,7 +4,7 @@ Here resides the code for the ventilator controller. Please also see the [Software design pages](../design/controller_architecture.md) for more information on controller architecture. -If you are not actively working on the controller code but simply need it for prototype testing, you will probably want to use the [automated deployment scripts](../utils/rpi_config). +If you are not actively working on the controller code but simply need it for prototype testing, you will probably want to use the [automated deployment scripts](../bootstrap). ## Rationale and structure @@ -29,7 +29,7 @@ The controller shares the [common code](../common) with the GUI. The part of the * building and uploading/deployment of controller firmware * running unit tests, static checks, integration tests * generating test coverage reports locally - * shortcut to [debug interface](../utils/debug) + * shortcut to [debug interface](../tools) * self-documented if you run it without parameters or with `--help` * [platfomio.ini](platformio.ini) - the equivalent of a "make file" which governs how platformio builds targets * [.ycm_extra_conf.py](.ycm_extra_conf.py) - configuration for [YouCompleteMe](https://github.com/ycm-core/YouCompleteMe) (for some IDEs) diff --git a/software/controller/controller.sh b/software/controller/controller.sh index 04b7f67a9..72fa84c60 100755 --- a/software/controller/controller.sh +++ b/software/controller/controller.sh @@ -181,7 +181,7 @@ generate_coverage_reports() { } function run_debug() { - ../debug/debug.sh "$@" + ../tools/debug.sh "$@" } # prints info from device manifest, if SN is defined in environment diff --git a/software/controller/lib/debug/README.md b/software/controller/lib/debug/README.md index 87144875b..b4a288e53 100644 --- a/software/controller/lib/debug/README.md +++ b/software/controller/lib/debug/README.md @@ -7,7 +7,7 @@ production system. **#TODO** How? The Python CLI interface can be accessed via the common controller utilities script at [software/controller/controller.sh](../../controller.sh) -There is also a [brief tutorial](../../../debug) on how to use it. +There is also a [brief tutorial](../../../tools) on how to use it. ## Controller side architecture [![Debug Interface Architecture diagram](images/architecture.png)](https://docs.google.com/drawings/d/18oN96yqyU3Ky_Kb82zGym1iXULxy9IW3KtIfMk-IDdI/edit?usp=sharing) diff --git a/software/gui/README.md b/software/gui/README.md index 57665b601..61b117ae7 100644 --- a/software/gui/README.md +++ b/software/gui/README.md @@ -18,7 +18,7 @@ To deploy it as intended for the ventilator you will need: A more complete list of hardware components is on the [Electronics sub-assembly page](../../manufacturing/internals/electronics). -If you are not actively working on the code for this application but simply need it for prototype testing, you will probably want to use the [automated deployment scripts](../utils/rpi_config). +If you are not actively working on the code for this application but simply need it for prototype testing, you will probably want to use the [automated deployment scripts](../bootstrap). ## Building the GUI diff --git a/software/debug/.gitignore b/software/tools/.gitignore similarity index 65% rename from software/debug/.gitignore rename to software/tools/.gitignore index 4adbb7927..ac1546bc9 100644 --- a/software/debug/.gitignore +++ b/software/tools/.gitignore @@ -1,2 +1,2 @@ # generated network protocol code -debug/protocols/* +protocols/* diff --git a/software/debug/README.md b/software/tools/README.md similarity index 92% rename from software/debug/README.md rename to software/tools/README.md index fd49971aa..27c762a04 100644 --- a/software/debug/README.md +++ b/software/tools/README.md @@ -1,16 +1,20 @@ # Debug serial interface -The controller debug interface should be run using [debug.sh](debug.sh) wrapper or from the common controller utilities script at [software/controller/controller.sh](../../controller/controller.sh) +The controller debug interface should be run using [debug.sh](debug.sh) wrapper or from the common controller utilities script at [software/controller/controller.sh](../controller/controller.sh) This Python script can be used to interface with the controller via the virtual serial port that is created when you plug a USB cable into the controller's debug port. The command line interface allows you to examine and directly manipulate a number of low level variables, as well as run calibration routines and automated performance tests. -To use this debug tool you will need to have Python 3.x installed on your development computer, as well as a number of python packages. Necessary dependencies will be installed by the [controller.sh](../../controller/controller.sh) script. +To use this debug tool you will need to have Python 3.x installed on your development computer, as well as a number of python packages. Necessary dependencies will be installed by the [controller.sh](../controller/controller.sh) script. The debug tool was developed and tested using Linux, but it should be possible to use it with other operating systems. The command line interface will allow you to discover available commands using `help`. Some commands provide an "autocomplete" feature you can access with `TAB`. To get help on a specific command, enter help _command name_. For example, to get a description of the `get` command: ``` [sn:v03e2] help get ``` +## Regenerating python proto bindings + +Use the [common.sh](../common/common.sh) with the `generate` command. + ## Connecting To use the debug tool you will first need to connect your development computer to the controller's debug port using a USB cable. This should create a virtual serial port. @@ -120,18 +124,18 @@ To retrieve save data and view it, you may type: test read 2021-08-15-23-23-23_john_test.json --plot ``` -Test scenarios are defined in `json` files in the [test_scenarios](test_scenarios) directory. All files in that directory should be loaded when the script starts. You may also see additional commands provided by this interface with `help test`. +Test scenarios are defined in `json` files in the [scenarios](scenarios) directory. All files in that directory should be loaded when the script starts. You may also see additional commands provided by this interface with `help test`. ### run This command takes the name of a python script and executes it in the same environment that the debug program runs in. This allows the script to use functions defined in the debug tool to do things like get or set variables. The debug tool will search for scripts in the [scripts](scripts) subdirectory. These scripts may take additional parameters. ## Unit Tests ### Local Setup -The unit tests for the debug interface were created using pytest. Necessary dependencies will be installed by the [controller.sh](../../controller/controller.sh) script. +The unit tests for the debug interface were created using pytest. Necessary dependencies will be installed by the [controller.sh](../controller/controller.sh) script. ### Running Unit Tests Locally -To run the unit tests, run the following command in Bash (not in the debug interface) within this working directory (`Ventilator/software/utils/debug`): +To run the unit tests, run the following command in Bash (not in the debug interface) within this working directory (`Ventilator/software/tools`): ```bash -python3 -m pytest --verbose unit_test.py +poetry run pytest --verbose ``` Omit the verbose flag if you only need to see failed tests. diff --git a/software/debug/debug.sh b/software/tools/debug.sh similarity index 100% rename from software/debug/debug.sh rename to software/tools/debug.sh diff --git a/software/debug/debug/__init__.py b/software/tools/debug/__init__.py similarity index 100% rename from software/debug/debug/__init__.py rename to software/tools/debug/__init__.py diff --git a/software/debug/debug/debug_cli.py b/software/tools/debug/debug_cli.py similarity index 99% rename from software/debug/debug/debug_cli.py rename to software/tools/debug/debug_cli.py index 2143e246c..bf4823613 100755 --- a/software/debug/debug/debug_cli.py +++ b/software/tools/debug/debug_cli.py @@ -45,7 +45,7 @@ import debug.debug_funcs as debug_funcs MANIFEST_URL = "https://docs.google.com/spreadsheets/d/e/2PACX-1vRduOfterWmAy_xrc356rRhjz4QDLgOScgG1VPx2-KNeH8zYEe29SCw_DKOJG-5hqSO6BXmG1BumUul/pub?gid=0&single=true&output=tsv" -LOCAL_DATA_PATH = "../../../local_data" +LOCAL_DATA_PATH = "../../local_data" class ArgparseShowHelpError(Exception): @@ -88,10 +88,10 @@ class CmdLine(cmd.Cmd): test_data_dir: Path def __init__(self, connect_to): - super(CmdLine, self).__init__() + super().__init__() script_path = Path(__file__).parent.resolve() self.scripts_directory = "scripts" - self.test_scenarios_dir = (script_path / "test_scenarios").resolve() + self.test_scenarios_dir = (script_path.parent / "scenarios").resolve() self.local_data_dir = (script_path / LOCAL_DATA_PATH).resolve(strict=False) self.test_data_dir = (self.local_data_dir / "test_data").resolve(strict=False) self.device_finder = DeviceScanner(self.local_data_dir / "device_manifest.tsv") diff --git a/software/debug/debug/debug_funcs.py b/software/tools/debug/debug_funcs.py similarity index 100% rename from software/debug/debug/debug_funcs.py rename to software/tools/debug/debug_funcs.py diff --git a/software/debug/debug/debug_lib/__init__.py b/software/tools/debug/debug_lib/__init__.py similarity index 100% rename from software/debug/debug/debug_lib/__init__.py rename to software/tools/debug/debug_lib/__init__.py diff --git a/software/debug/debug/debug_lib/controller_debug.py b/software/tools/debug/debug_lib/controller_debug.py similarity index 100% rename from software/debug/debug/debug_lib/controller_debug.py rename to software/tools/debug/debug_lib/controller_debug.py diff --git a/software/debug/debug/debug_lib/debug_types.py b/software/tools/debug/debug_lib/debug_types.py similarity index 100% rename from software/debug/debug/debug_lib/debug_types.py rename to software/tools/debug/debug_lib/debug_types.py diff --git a/software/debug/debug/debug_lib/test_data.py b/software/tools/debug/debug_lib/test_data.py similarity index 100% rename from software/debug/debug/debug_lib/test_data.py rename to software/tools/debug/debug_lib/test_data.py diff --git a/software/debug/debug/debug_lib/test_scenario.py b/software/tools/debug/debug_lib/test_scenario.py similarity index 100% rename from software/debug/debug/debug_lib/test_scenario.py rename to software/tools/debug/debug_lib/test_scenario.py diff --git a/software/debug/debug/debug_lib/var_info.py b/software/tools/debug/debug_lib/var_info.py similarity index 100% rename from software/debug/debug/debug_lib/var_info.py rename to software/tools/debug/debug_lib/var_info.py diff --git a/software/debug/debug/scripts/README.md b/software/tools/debug/scripts/README.md similarity index 100% rename from software/debug/debug/scripts/README.md rename to software/tools/debug/scripts/README.md diff --git a/software/debug/debug/scripts/peek_dma.py b/software/tools/debug/scripts/peek_dma.py similarity index 100% rename from software/debug/debug/scripts/peek_dma.py rename to software/tools/debug/scripts/peek_dma.py diff --git a/software/debug/debug/scripts/valve_calibration.py b/software/tools/debug/scripts/valve_calibration.py similarity index 100% rename from software/debug/debug/scripts/valve_calibration.py rename to software/tools/debug/scripts/valve_calibration.py diff --git a/software/debug/debug/util/__init__.py b/software/tools/debug/util/__init__.py similarity index 100% rename from software/debug/debug/util/__init__.py rename to software/tools/debug/util/__init__.py diff --git a/software/debug/debug/util/colors.py b/software/tools/debug/util/colors.py similarity index 100% rename from software/debug/debug/util/colors.py rename to software/tools/debug/util/colors.py diff --git a/software/debug/debug/util/error.py b/software/tools/debug/util/error.py similarity index 100% rename from software/debug/debug/util/error.py rename to software/tools/debug/util/error.py diff --git a/software/debug/debug/util/serial_detect.py b/software/tools/debug/util/serial_detect.py similarity index 100% rename from software/debug/debug/util/serial_detect.py rename to software/tools/debug/util/serial_detect.py diff --git a/software/tools/miscellaneous/README.md b/software/tools/miscellaneous/README.md new file mode 100644 index 000000000..33ca6dcf1 --- /dev/null +++ b/software/tools/miscellaneous/README.md @@ -0,0 +1,4 @@ +# Miscellaneous stand-alone tools + +* [decoder.py](decoder.py) - decoder of serial packets sent from controller to GUI. +* [mock_cycle_controller.py](mock_cycle_controller.py) - primitive controller emulator to test communications protocols diff --git a/software/utils/decoder.py b/software/tools/miscellaneous/decoder.py similarity index 90% rename from software/utils/decoder.py rename to software/tools/miscellaneous/decoder.py index c48193444..abf90368b 100755 --- a/software/utils/decoder.py +++ b/software/tools/miscellaneous/decoder.py @@ -1,6 +1,5 @@ import serial # pip install pySerial -import struct -from debug.lib.protocols import network_protocol_pb2 +from protocols import network_protocol_pb2 import time p = serial.Serial("/dev/ttyACM0", 115200) diff --git a/software/utils/mock_cycle_controller.py b/software/tools/miscellaneous/mock_cycle_controller.py similarity index 96% rename from software/utils/mock_cycle_controller.py rename to software/tools/miscellaneous/mock_cycle_controller.py index 4fcb74a40..a119bb264 100755 --- a/software/utils/mock_cycle_controller.py +++ b/software/tools/miscellaneous/mock_cycle_controller.py @@ -12,8 +12,7 @@ # and specify the other one for ventillator GUI import serial -import struct -from debug.lib.protocols import network_protocol_pb2 +from protocols import network_protocol_pb2 import time import argparse import math diff --git a/software/debug/poetry.lock b/software/tools/poetry.lock similarity index 100% rename from software/debug/poetry.lock rename to software/tools/poetry.lock diff --git a/software/tools/poetry.toml b/software/tools/poetry.toml new file mode 100644 index 000000000..ab1033bd3 --- /dev/null +++ b/software/tools/poetry.toml @@ -0,0 +1,2 @@ +[virtualenvs] +in-project = true diff --git a/software/debug/pyproject.toml b/software/tools/pyproject.toml similarity index 87% rename from software/debug/pyproject.toml rename to software/tools/pyproject.toml index afe6304b5..ff560c2da 100644 --- a/software/debug/pyproject.toml +++ b/software/tools/pyproject.toml @@ -5,7 +5,9 @@ description = "RespiraWorks ventilator debug interface" authors = ["Martin Shetty <1972005+martukas@users.noreply.github.com>"] readme = "README.md" packages = [ - {include = "debug"} + {include = "debug"}, + {include = "miscellaneous"}, + {include = "protocols"} ] [tool.poetry.dependencies] diff --git a/software/debug/debug/test_scenarios/dummy.json b/software/tools/scenarios/dummy.json similarity index 100% rename from software/debug/debug/test_scenarios/dummy.json rename to software/tools/scenarios/dummy.json diff --git a/software/debug/debug/test_scenarios/iso_pressure_tests.csv b/software/tools/scenarios/iso_pressure_tests.csv similarity index 100% rename from software/debug/debug/test_scenarios/iso_pressure_tests.csv rename to software/tools/scenarios/iso_pressure_tests.csv diff --git a/software/debug/debug/test_scenarios/iso_pressure_tests.json b/software/tools/scenarios/iso_pressure_tests.json similarity index 100% rename from software/debug/debug/test_scenarios/iso_pressure_tests.json rename to software/tools/scenarios/iso_pressure_tests.json diff --git a/software/debug/debug/test_scenarios/iso_volume_tests.csv b/software/tools/scenarios/iso_volume_tests.csv similarity index 100% rename from software/debug/debug/test_scenarios/iso_volume_tests.csv rename to software/tools/scenarios/iso_volume_tests.csv diff --git a/software/debug/debug/test_scenarios/iso_volume_tests.json b/software/tools/scenarios/iso_volume_tests.json similarity index 100% rename from software/debug/debug/test_scenarios/iso_volume_tests.json rename to software/tools/scenarios/iso_volume_tests.json diff --git a/software/debug/tests/__init__.py b/software/tools/tests/__init__.py similarity index 100% rename from software/debug/tests/__init__.py rename to software/tools/tests/__init__.py diff --git a/software/debug/tests/unit_test.py b/software/tools/tests/unit_test.py similarity index 100% rename from software/debug/tests/unit_test.py rename to software/tools/tests/unit_test.py diff --git a/software/utils/README.md b/software/utils/README.md deleted file mode 100644 index 5a235a67c..000000000 --- a/software/utils/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Utilities - -## Raspberry pi deployment scripts - -If a proper enclosed unit is built as described under [manufacturing](../../manufacturing), it should be possible to deploy all GUI and controller software directly via the Raspberry pi that is integrated into the ventilator unit. - -Scripts for doing so are available under [rpi_config](rpi_config). - -## decoder - -[decoder.py](decoder.py) - -This is a decoder of serial packets sent from controller to GUI. - -## Regenerating python proto bindings - -Use the [common.sh](../common/common.sh) with the `generate` command. diff --git a/software/utils/nanopb_pb2.py b/software/utils/nanopb_pb2.py deleted file mode 100644 index a742b8afb..000000000 --- a/software/utils/nanopb_pb2.py +++ /dev/null @@ -1,768 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: nanopb.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) -from google.protobuf.internal import enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -from google.protobuf import descriptor_pb2 - -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name="nanopb.proto", - package="", - syntax="proto2", - serialized_pb=_b( - '\n\x0cnanopb.proto\x1a google/protobuf/descriptor.proto"\xd9\x06\n\rNanoPBOptions\x12\x10\n\x08max_size\x18\x01 \x01(\x05\x12\x12\n\nmax_length\x18\x0e \x01(\x05\x12\x11\n\tmax_count\x18\x02 \x01(\x05\x12&\n\x08int_size\x18\x07 \x01(\x0e\x32\x08.IntSize:\nIS_DEFAULT\x12$\n\x04type\x18\x03 \x01(\x0e\x32\n.FieldType:\nFT_DEFAULT\x12\x18\n\nlong_names\x18\x04 \x01(\x08:\x04true\x12\x1c\n\rpacked_struct\x18\x05 \x01(\x08:\x05\x66\x61lse\x12\x1a\n\x0bpacked_enum\x18\n \x01(\x08:\x05\x66\x61lse\x12\x1b\n\x0cskip_message\x18\x06 \x01(\x08:\x05\x66\x61lse\x12\x18\n\tno_unions\x18\x08 \x01(\x08:\x05\x66\x61lse\x12\r\n\x05msgid\x18\t \x01(\r\x12\x1e\n\x0f\x61nonymous_oneof\x18\x0b \x01(\x08:\x05\x66\x61lse\x12\x15\n\x06proto3\x18\x0c \x01(\x08:\x05\x66\x61lse\x12#\n\x14proto3_singular_msgs\x18\x15 \x01(\x08:\x05\x66\x61lse\x12\x1d\n\x0e\x65num_to_string\x18\r \x01(\x08:\x05\x66\x61lse\x12\x1b\n\x0c\x66ixed_length\x18\x0f \x01(\x08:\x05\x66\x61lse\x12\x1a\n\x0b\x66ixed_count\x18\x10 \x01(\x08:\x05\x66\x61lse\x12\x1e\n\x0fsubmsg_callback\x18\x16 \x01(\x08:\x05\x66\x61lse\x12/\n\x0cmangle_names\x18\x11 \x01(\x0e\x32\x11.TypenameMangling:\x06M_NONE\x12(\n\x11\x63\x61llback_datatype\x18\x12 \x01(\t:\rpb_callback_t\x12\x34\n\x11\x63\x61llback_function\x18\x13 \x01(\t:\x19pb_default_field_callback\x12\x30\n\x0e\x64\x65scriptorsize\x18\x14 \x01(\x0e\x32\x0f.DescriptorSize:\x07\x44S_AUTO\x12\x1a\n\x0b\x64\x65\x66\x61ult_has\x18\x17 \x01(\x08:\x05\x66\x61lse\x12\x0f\n\x07include\x18\x18 \x03(\t\x12\x0f\n\x07\x65xclude\x18\x1a \x03(\t\x12\x0f\n\x07package\x18\x19 \x01(\t\x12\x41\n\rtype_override\x18\x1b \x01(\x0e\x32*.google.protobuf.FieldDescriptorProto.Type*i\n\tFieldType\x12\x0e\n\nFT_DEFAULT\x10\x00\x12\x0f\n\x0b\x46T_CALLBACK\x10\x01\x12\x0e\n\nFT_POINTER\x10\x04\x12\r\n\tFT_STATIC\x10\x02\x12\r\n\tFT_IGNORE\x10\x03\x12\r\n\tFT_INLINE\x10\x05*D\n\x07IntSize\x12\x0e\n\nIS_DEFAULT\x10\x00\x12\x08\n\x04IS_8\x10\x08\x12\t\n\x05IS_16\x10\x10\x12\t\n\x05IS_32\x10 \x12\t\n\x05IS_64\x10@*Z\n\x10TypenameMangling\x12\n\n\x06M_NONE\x10\x00\x12\x13\n\x0fM_STRIP_PACKAGE\x10\x01\x12\r\n\tM_FLATTEN\x10\x02\x12\x16\n\x12M_PACKAGE_INITIALS\x10\x03*E\n\x0e\x44\x65scriptorSize\x12\x0b\n\x07\x44S_AUTO\x10\x00\x12\x08\n\x04\x44S_1\x10\x01\x12\x08\n\x04\x44S_2\x10\x02\x12\x08\n\x04\x44S_4\x10\x04\x12\x08\n\x04\x44S_8\x10\x08:E\n\x0enanopb_fileopt\x12\x1c.google.protobuf.FileOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:G\n\rnanopb_msgopt\x12\x1f.google.protobuf.MessageOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:E\n\x0enanopb_enumopt\x12\x1c.google.protobuf.EnumOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:>\n\x06nanopb\x12\x1d.google.protobuf.FieldOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptionsB\x1a\n\x18\x66i.kapsi.koti.jpa.nanopb' - ), - dependencies=[google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR,], -) -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -_FIELDTYPE = _descriptor.EnumDescriptor( - name="FieldType", - full_name="FieldType", - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name="FT_DEFAULT", index=0, number=0, options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="FT_CALLBACK", index=1, number=1, options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="FT_POINTER", index=2, number=4, options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="FT_STATIC", index=3, number=2, options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="FT_IGNORE", index=4, number=3, options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="FT_INLINE", index=5, number=5, options=None, type=None - ), - ], - containing_type=None, - options=None, - serialized_start=910, - serialized_end=1015, -) -_sym_db.RegisterEnumDescriptor(_FIELDTYPE) - -FieldType = enum_type_wrapper.EnumTypeWrapper(_FIELDTYPE) -_INTSIZE = _descriptor.EnumDescriptor( - name="IntSize", - full_name="IntSize", - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name="IS_DEFAULT", index=0, number=0, options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="IS_8", index=1, number=8, options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="IS_16", index=2, number=16, options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="IS_32", index=3, number=32, options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="IS_64", index=4, number=64, options=None, type=None - ), - ], - containing_type=None, - options=None, - serialized_start=1017, - serialized_end=1085, -) -_sym_db.RegisterEnumDescriptor(_INTSIZE) - -IntSize = enum_type_wrapper.EnumTypeWrapper(_INTSIZE) -_TYPENAMEMANGLING = _descriptor.EnumDescriptor( - name="TypenameMangling", - full_name="TypenameMangling", - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name="M_NONE", index=0, number=0, options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="M_STRIP_PACKAGE", index=1, number=1, options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="M_FLATTEN", index=2, number=2, options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="M_PACKAGE_INITIALS", index=3, number=3, options=None, type=None - ), - ], - containing_type=None, - options=None, - serialized_start=1087, - serialized_end=1177, -) -_sym_db.RegisterEnumDescriptor(_TYPENAMEMANGLING) - -TypenameMangling = enum_type_wrapper.EnumTypeWrapper(_TYPENAMEMANGLING) -_DESCRIPTORSIZE = _descriptor.EnumDescriptor( - name="DescriptorSize", - full_name="DescriptorSize", - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name="DS_AUTO", index=0, number=0, options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="DS_1", index=1, number=1, options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="DS_2", index=2, number=2, options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="DS_4", index=3, number=4, options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="DS_8", index=4, number=8, options=None, type=None - ), - ], - containing_type=None, - options=None, - serialized_start=1179, - serialized_end=1248, -) -_sym_db.RegisterEnumDescriptor(_DESCRIPTORSIZE) - -DescriptorSize = enum_type_wrapper.EnumTypeWrapper(_DESCRIPTORSIZE) -FT_DEFAULT = 0 -FT_CALLBACK = 1 -FT_POINTER = 4 -FT_STATIC = 2 -FT_IGNORE = 3 -FT_INLINE = 5 -IS_DEFAULT = 0 -IS_8 = 8 -IS_16 = 16 -IS_32 = 32 -IS_64 = 64 -M_NONE = 0 -M_STRIP_PACKAGE = 1 -M_FLATTEN = 2 -M_PACKAGE_INITIALS = 3 -DS_AUTO = 0 -DS_1 = 1 -DS_2 = 2 -DS_4 = 4 -DS_8 = 8 - -NANOPB_FILEOPT_FIELD_NUMBER = 1010 -nanopb_fileopt = _descriptor.FieldDescriptor( - name="nanopb_fileopt", - full_name="nanopb_fileopt", - index=0, - number=1010, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=True, - extension_scope=None, - options=None, -) -NANOPB_MSGOPT_FIELD_NUMBER = 1010 -nanopb_msgopt = _descriptor.FieldDescriptor( - name="nanopb_msgopt", - full_name="nanopb_msgopt", - index=1, - number=1010, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=True, - extension_scope=None, - options=None, -) -NANOPB_ENUMOPT_FIELD_NUMBER = 1010 -nanopb_enumopt = _descriptor.FieldDescriptor( - name="nanopb_enumopt", - full_name="nanopb_enumopt", - index=2, - number=1010, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=True, - extension_scope=None, - options=None, -) -NANOPB_FIELD_NUMBER = 1010 -nanopb = _descriptor.FieldDescriptor( - name="nanopb", - full_name="nanopb", - index=3, - number=1010, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=True, - extension_scope=None, - options=None, -) - - -_NANOPBOPTIONS = _descriptor.Descriptor( - name="NanoPBOptions", - full_name="NanoPBOptions", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="max_size", - full_name="NanoPBOptions.max_size", - index=0, - number=1, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="max_length", - full_name="NanoPBOptions.max_length", - index=1, - number=14, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="max_count", - full_name="NanoPBOptions.max_count", - index=2, - number=2, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="int_size", - full_name="NanoPBOptions.int_size", - index=3, - number=7, - type=14, - cpp_type=8, - label=1, - has_default_value=True, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="type", - full_name="NanoPBOptions.type", - index=4, - number=3, - type=14, - cpp_type=8, - label=1, - has_default_value=True, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="long_names", - full_name="NanoPBOptions.long_names", - index=5, - number=4, - type=8, - cpp_type=7, - label=1, - has_default_value=True, - default_value=True, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="packed_struct", - full_name="NanoPBOptions.packed_struct", - index=6, - number=5, - type=8, - cpp_type=7, - label=1, - has_default_value=True, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="packed_enum", - full_name="NanoPBOptions.packed_enum", - index=7, - number=10, - type=8, - cpp_type=7, - label=1, - has_default_value=True, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="skip_message", - full_name="NanoPBOptions.skip_message", - index=8, - number=6, - type=8, - cpp_type=7, - label=1, - has_default_value=True, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="no_unions", - full_name="NanoPBOptions.no_unions", - index=9, - number=8, - type=8, - cpp_type=7, - label=1, - has_default_value=True, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="msgid", - full_name="NanoPBOptions.msgid", - index=10, - number=9, - type=13, - cpp_type=3, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="anonymous_oneof", - full_name="NanoPBOptions.anonymous_oneof", - index=11, - number=11, - type=8, - cpp_type=7, - label=1, - has_default_value=True, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="proto3", - full_name="NanoPBOptions.proto3", - index=12, - number=12, - type=8, - cpp_type=7, - label=1, - has_default_value=True, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="proto3_singular_msgs", - full_name="NanoPBOptions.proto3_singular_msgs", - index=13, - number=21, - type=8, - cpp_type=7, - label=1, - has_default_value=True, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="enum_to_string", - full_name="NanoPBOptions.enum_to_string", - index=14, - number=13, - type=8, - cpp_type=7, - label=1, - has_default_value=True, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="fixed_length", - full_name="NanoPBOptions.fixed_length", - index=15, - number=15, - type=8, - cpp_type=7, - label=1, - has_default_value=True, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="fixed_count", - full_name="NanoPBOptions.fixed_count", - index=16, - number=16, - type=8, - cpp_type=7, - label=1, - has_default_value=True, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="submsg_callback", - full_name="NanoPBOptions.submsg_callback", - index=17, - number=22, - type=8, - cpp_type=7, - label=1, - has_default_value=True, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="mangle_names", - full_name="NanoPBOptions.mangle_names", - index=18, - number=17, - type=14, - cpp_type=8, - label=1, - has_default_value=True, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="callback_datatype", - full_name="NanoPBOptions.callback_datatype", - index=19, - number=18, - type=9, - cpp_type=9, - label=1, - has_default_value=True, - default_value=_b("pb_callback_t").decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="callback_function", - full_name="NanoPBOptions.callback_function", - index=20, - number=19, - type=9, - cpp_type=9, - label=1, - has_default_value=True, - default_value=_b("pb_default_field_callback").decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="descriptorsize", - full_name="NanoPBOptions.descriptorsize", - index=21, - number=20, - type=14, - cpp_type=8, - label=1, - has_default_value=True, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="default_has", - full_name="NanoPBOptions.default_has", - index=22, - number=23, - type=8, - cpp_type=7, - label=1, - has_default_value=True, - default_value=False, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="include", - full_name="NanoPBOptions.include", - index=23, - number=24, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="exclude", - full_name="NanoPBOptions.exclude", - index=24, - number=26, - type=9, - cpp_type=9, - label=3, - has_default_value=False, - default_value=[], - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="package", - full_name="NanoPBOptions.package", - index=25, - number=25, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=_b("").decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - _descriptor.FieldDescriptor( - name="type_override", - full_name="NanoPBOptions.type_override", - index=26, - number=27, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=1, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - options=None, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - options=None, - is_extendable=False, - syntax="proto2", - extension_ranges=[], - oneofs=[], - serialized_start=51, - serialized_end=908, -) - -_NANOPBOPTIONS.fields_by_name["int_size"].enum_type = _INTSIZE -_NANOPBOPTIONS.fields_by_name["type"].enum_type = _FIELDTYPE -_NANOPBOPTIONS.fields_by_name["mangle_names"].enum_type = _TYPENAMEMANGLING -_NANOPBOPTIONS.fields_by_name["descriptorsize"].enum_type = _DESCRIPTORSIZE -_NANOPBOPTIONS.fields_by_name[ - "type_override" -].enum_type = google_dot_protobuf_dot_descriptor__pb2._FIELDDESCRIPTORPROTO_TYPE -DESCRIPTOR.message_types_by_name["NanoPBOptions"] = _NANOPBOPTIONS -DESCRIPTOR.enum_types_by_name["FieldType"] = _FIELDTYPE -DESCRIPTOR.enum_types_by_name["IntSize"] = _INTSIZE -DESCRIPTOR.enum_types_by_name["TypenameMangling"] = _TYPENAMEMANGLING -DESCRIPTOR.enum_types_by_name["DescriptorSize"] = _DESCRIPTORSIZE -DESCRIPTOR.extensions_by_name["nanopb_fileopt"] = nanopb_fileopt -DESCRIPTOR.extensions_by_name["nanopb_msgopt"] = nanopb_msgopt -DESCRIPTOR.extensions_by_name["nanopb_enumopt"] = nanopb_enumopt -DESCRIPTOR.extensions_by_name["nanopb"] = nanopb - -NanoPBOptions = _reflection.GeneratedProtocolMessageType( - "NanoPBOptions", - (_message.Message,), - dict( - DESCRIPTOR=_NANOPBOPTIONS, - __module__="nanopb_pb2" - # @@protoc_insertion_point(class_scope:NanoPBOptions) - ), -) -_sym_db.RegisterMessage(NanoPBOptions) - -nanopb_fileopt.message_type = _NANOPBOPTIONS -google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(nanopb_fileopt) -nanopb_msgopt.message_type = _NANOPBOPTIONS -google_dot_protobuf_dot_descriptor__pb2.MessageOptions.RegisterExtension(nanopb_msgopt) -nanopb_enumopt.message_type = _NANOPBOPTIONS -google_dot_protobuf_dot_descriptor__pb2.EnumOptions.RegisterExtension(nanopb_enumopt) -nanopb.message_type = _NANOPBOPTIONS -google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(nanopb) - -DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions( - descriptor_pb2.FileOptions(), _b("\n\030fi.kapsi.koti.jpa.nanopb") -) -# @@protoc_insertion_point(module_scope) diff --git a/software/utils/rpi_config/user/Desktop/vent-debug.desktop b/software/utils/rpi_config/user/Desktop/vent-debug.desktop deleted file mode 100755 index fb15bc7e2..000000000 --- a/software/utils/rpi_config/user/Desktop/vent-debug.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=Debug -Path=/home/admin/ventilator/software/utils -Exec=lxterminal -t "Vent debug" --working-directory=/home/admin/ventilator/software/controller -e "source ~/.profile && ./controller.sh debug" -Icon=/home/admin/ventilator/software/utils/icons/rw_debug.png -Encoding=UTF-8 -Terminal=false -Type=Application -Categories=Application; diff --git a/software/utils/rpi_config/user/Desktop/vent-demo.desktop b/software/utils/rpi_config/user/Desktop/vent-demo.desktop deleted file mode 100755 index 4e3ae949e..000000000 --- a/software/utils/rpi_config/user/Desktop/vent-demo.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=GUI Demo -Path=/home/admin/ventilator/software/gui -Exec=lxterminal -t "Ventilator GUI" --working-directory=/home/admin/ventilator/software/gui -e "./gui.sh run" -Icon=/home/admin/ventilator/software/utils/icons/rw_logo_transparent.png -Terminal=true -Type=Application -Categories=Application diff --git a/software/utils/rpi_config/user/Desktop/vent-gui.desktop b/software/utils/rpi_config/user/Desktop/vent-gui.desktop deleted file mode 100755 index 37242619e..000000000 --- a/software/utils/rpi_config/user/Desktop/vent-gui.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=Ventilator GUI -Path=/home/admin/ventilator/software/gui -Exec=lxterminal -t "Ventilator GUI" --working-directory=/home/admin/ventilator/software/gui -e "./gui.sh run --serial-port /dev/ttyS0" -Icon=/home/admin/ventilator/software/utils/icons/rw_logo_transparent.png -Terminal=true -Type=Application -Categories=Application diff --git a/software/utils/rpi_config/user/Desktop/vent-update.desktop b/software/utils/rpi_config/user/Desktop/vent-update.desktop deleted file mode 100755 index 67c0349f8..000000000 --- a/software/utils/rpi_config/user/Desktop/vent-update.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=Update -Path=/home/admin/ventilator/software/utils/rpi_config -Exec=lxterminal -t "Ventilator update" --working-directory=/home/admin/ventilator/software/utils/rpi_config -e "source ~/.profile && ./update.sh" -Icon=/home/admin/ventilator/software/utils/icons/rw_inhale.png -Terminal=true -Type=Application -Categories=Application