Proto commits in RespiraWorks/Ventilator

These 43 commits are when the Protocol Buffers files have changed:

Commit:0cb1aca
Author:Martin Shetty
Committer:GitHub

Automated generation of communications protocol bindings "fixed bad link and updated dependencies; updates #1263" "dependencies; updates #1263" "dependencies; updates #1263" "script should work now; updates #1263" "show pip locations; updates #1263" "get dir a different way; updates #1263" "get dir a different way; updates #1263" "make dir for python lib; updates #1263" "simplify; updates #1263" "controller and gui should build; updates #1263" "controller and gui should build; updates #1263" fix gui common.cmake "gui should build now, and coverage fixes; updates #1263" "compactified comments in proto definition, updated precommit versions; updates #1263" "fixed proto autoformatting, enabled python filename checking; updates #1263" "updated dragged-in nanopb code; updates #1263" Update software/common/README.md Co-authored-by: Jérôme Travert <asmodai27@users.noreply.github.com> "streamlined installation and made protocol generation automatic; updates #1263" "optional conversion of enum values; updates #1263" "some documentation updates and todo; updates #1263"

The documentation is generated from this commit.

Commit:fa43620
Author:Martin Shetty
Committer:Martin Shetty

proto reformat

Commit:c66015d
Author:subhashr2
Committer:Martin Shetty

Added new modes in firmware & in GUI, tetsed basically. Committing to git for backup purpose

Commit:3c18ff0
Author:asmodai27
Committer:Martin Shetty

Add oxygen sensor support Add unit tests and fix broken ones change dbg_fio2 to 0-1 instead of 0-100% Adress @Martukas review: - Apply Google style for constant names in the files I am modifying - use enum class for Sensor enum - add O2 sensor datasheet More Google style formatting of constants added doc as source for 0.06V/fio2 sensor sensitivity (also changed from 0.061V/fio2 to match doc). Note, this is a stand in value for sensitivity until we have a self-test calibration procedure. This is captured in issue https://github.com/RespiraWorks/Ventilator/issues/859 fix unit test with consistent O2 sensor sensitivity Feed fio2 to the GUI small change to coverage script

Commit:ae46c85
Author:asmodai27
Committer:Martin Shetty

Add oxygen sensor support Add unit tests and fix broken ones change dbg_fio2 to 0-1 instead of 0-100% Adress @Martukas review: - Apply Google style for constant names in the files I am modifying - use enum class for Sensor enum - add O2 sensor datasheet More Google style formatting of constants added doc as source for 0.06V/fio2 sensor sensitivity (also changed from 0.061V/fio2 to match doc). Note, this is a stand in value for sensitivity until we have a self-test calibration procedure. This is captured in issue https://github.com/RespiraWorks/Ventilator/issues/859 fix unit test with consistent O2 sensor sensitivity Feed fio2 to the GUI small change to coverage script

Commit:11930a5
Author:Grace Canfield
Committer:Martin Shetty

Adds consolidated CoVent links to root README Puts software in its own folder; Updates root README Moves system-design folder contents into repo root adds pre-commit formatting Fixes borked links fixes more borked links Converts PCBreathe & SysDesign repo links Changes build to assembly to avoid some sort of conflict Fixes borked links Adds link to status report Covent doc Separates requirements & moves status report to design folder changes assemlby to manufacturing forgot to save a thing fixed submodule issue and updated paths in circleci script moved controller test script and updated dirs more dir updates in scripts updte controller tests docker script dirs cleaned up main readme typos, badges and other readme updates moved platformio.ini and .clang-tidy updated references after repository rename/merge and references to tickets added screenshot of GUI to software docs

Commit:c081518
Author:Grace Canfield
Committer:Martin Shetty

Adds consolidated CoVent links to root README Puts software in its own folder; Updates root README Moves system-design folder contents into repo root adds pre-commit formatting Fixes borked links fixes more borked links Converts PCBreathe & SysDesign repo links Changes build to assembly to avoid some sort of conflict Fixes borked links Adds link to status report Covent doc Separates requirements & moves status report to design folder changes assemlby to manufacturing forgot to save a thing fixed submodule issue and updated paths in circleci script moved controller test script and updated dirs more dir updates in scripts updte controller tests docker script dirs cleaned up main readme typos, badges and other readme updates moved platformio.ini and .clang-tidy updated references after repository rename/merge and references to tickets added screenshot of GUI to software docs

Commit:8b65c91
Author:Justin Lebar
Committer:Justin Lebar

Send flow correction ml/s to GUI. Will be used for disconnect detection. I observe with the fan that a leak is about -1600ml/s. Even when I set PIP/PEEP to 5, we still open up the valve all the way. I think it would be safe to set the disconnect detection threshold around -500ml/s. GPC: flow-correction-in-proto

Commit:bcb7263
Author:Justin Lebar
Committer:Justin Lebar

Send flow correction ml/s to GUI. Will be used for disconnect detection. I observe with the fan that a leak is about -1600ml/s. Even when I set PIP/PEEP to 5, we still open up the valve all the way. I think it would be safe to set the disconnect detection threshold around -500ml/s. GPC: flow-correction-in-proto

Commit:1da8b57
Author:Eugene Kirpichov
Committer:Eugene Kirpichov

Allows setting FiO2 % from GUI

Commit:919247a
Author:Eugene Kirpichov
Committer:Eugene Kirpichov

Allows setting FiO2 % from GUI

Commit:f9c8cad
Author:Eugene Kirpichov
Committer:Eugene Kirpichov

Adds FiO2 to the proto

Commit:e2787cd
Author:Eugene Kirpichov
Committer:Eugene Kirpichov

Adds FiO2 to the proto

Commit:e929010
Author:Eugene Kirpichov
Committer:Eugene Kirpichov

Changes ventilation mode property to be an enum. Adds HFNC mode to the proto as a formality.

Commit:92eb720
Author:Eugene Kirpichov
Committer:Eugene Kirpichov

Changes ventilation mode property to be an enum. Adds HFNC mode to the proto as a formality.

Commit:12c7724
Author:Eugene Kirpichov
Committer:Eugene Kirpichov

Change breath_id to uint64 based on uptime

Commit:06c56f5
Author:Eugene Kirpichov
Committer:Eugene Kirpichov

Change breath_id to uint64 based on uptime

Commit:783103a
Author:Eugene Kirpichov
Committer:Eugene Kirpichov

Adds breath_id to network protocol

Commit:e37c2aa
Author:Eugene Kirpichov
Committer:Eugene Kirpichov

Adds breath_id to network protocol

Commit:1c5d297
Author:Eugene Kirpichov

Removes alarms from network protocol

Commit:3943783
Author:Eugene Kirpichov

Removes alarms from network protocol

Commit:52ebc2c
Author:Justin Lebar
Committer:Justin Lebar

Delete unused VentParams.rise_time_ms. I didn't realize that we had this param and, in an earlier change, hardcoded it to 100. I guess that's...fine? We don't expect to change it from the GUI. GPC: delete-rise-time

Commit:0e838ac
Author:Justin Lebar
Committer:Justin Lebar

Delete unused VentParams.rise_time_ms. I didn't realize that we had this param and, in an earlier change, hardcoded it to 100. I guess that's...fine? We don't expect to change it from the GUI. GPC: delete-rise-time

Commit:2e58595
Author:Justin Lebar
Committer:Justin Lebar

ControllerStatus.fan_setpoint -> pressure_setpoint. Simple rename, no functional change. GPC: fan-setpoint

Commit:24444d8
Author:Justin Lebar
Committer:Justin Lebar

ControllerStatus.fan_setpoint -> pressure_setpoint. Simple rename, no functional change. GPC: fan-setpoint

Commit:14f4a70
Author:asmodai27
Committer:asmodai27

First pass at Pressure Assist Mode. Note: updated proto file but also updated network_protocol.pb.h manually (couldn't get nanopb to run...)

Commit:d8602b6
Author:asmodai27
Committer:asmodai27

First pass at Pressure Assist Mode. Note: updated proto file but also updated network_protocol.pb.h manually (couldn't get nanopb to run...)

Commit:a206320
Author:Justin Lebar
Committer:Justin Lebar

Rename SensorReadings proto -> SensorsProto. Preparation for reclaiming the name "SensorReadings" as a C++ class. This is inconsistent with the names of the other proto messages, but given that we're going to have this C++ class, I think it will be really hard to remember which is which if one of them doesn't include the word "proto". GPC: rename-sensor-readings

Commit:8e2d2a1
Author:Justin Lebar
Committer:Justin Lebar

Rename SensorReadings proto -> SensorsProto. Preparation for reclaiming the name "SensorReadings" as a C++ class. This is inconsistent with the names of the other proto messages, but given that we're going to have this C++ class, I think it will be really hard to remember which is which if one of them doesn't include the word "proto". GPC: rename-sensor-readings

Commit:fb9765c
Author:Justin Lebar
Committer:Justin Lebar

Tweak SensorReadings proto. - Rename pressure_cm_h2o -> patient_pressure_cm_h2o - Add {inflow,outflow}_pressure_cm_h2o. These values are primarily useful for debugging, but it's fine to send them everywhere. - Tweak the DEV_MODE serial printf. Now it's a series of printfs, so that it's easy to comment one out. Volume is commented out in the printf because without something to fix the linear component of the volume, it quickly overwhelms the other values in the graph, rendering everything else out-of-scale. GPC: sensor-readings

Commit:4a36b95
Author:Justin Lebar
Committer:Justin Lebar

Tweak SensorReadings proto. - Rename pressure_cm_h2o -> patient_pressure_cm_h2o - Add {inflow,outflow}_pressure_cm_h2o. These values are primarily useful for debugging, but it's fine to send them everywhere. - Tweak the DEV_MODE serial printf. Now it's a series of printfs, so that it's easy to comment one out. Volume is commented out in the printf because without something to fix the linear component of the volume, it quickly overwhelms the other values in the graph, rendering everything else out-of-scale. GPC: sensor-readings

Commit:68ff83c
Author:Justin Lebar
Committer:Justin Lebar

New blower FSM. The moment we've all been waiting for... - Create blower_fsm, which separates out controlling the pressure setpoint from the PID loop that drives the fan to achieve this setpoint. - Rename control to blower_pid now that its role is smaller. - Add setpoint field to ControllerStatus proto so the GUI can observe the pressure we're trying to drive. Fixes issue #17. GPC: blower-fsm

Commit:8ef34d7
Author:Justin Lebar
Committer:Justin Lebar

New blower FSM. The moment we've all been waiting for... - Create blower_fsm, which separates out controlling the pressure setpoint from the PID loop that drives the fan to achieve this setpoint. - Rename control to blower_pid now that its role is smaller. - Add setpoint field to ControllerStatus proto so the GUI can observe the pressure we're trying to drive. Fixes issue #17. GPC: blower-fsm

Commit:fbf9f2e
Author:Justin Lebar
Committer:Justin Lebar

Remove some unused options in network_protocol.proto. - Remove FiO2 control. Ethan said that he anticipates FiO2 will be controlled externally from the ventilator. - Remove PRESSURE_ASSIST / PRESSURE_SUPPORT ventilation modes. I am writing code that wants to switch() on ventilator modes, and getting rid of the unused modes means the switch() can cover all modes without a `default` case. That way when we add a new mode, we'll get a compile error showing everything we have to change. GPC: protobuf-unused

Commit:42d11c1
Author:Justin Lebar
Committer:Justin Lebar

Remove some unused options in network_protocol.proto. - Remove FiO2 control. Ethan said that he anticipates FiO2 will be controlled externally from the ventilator. - Remove PRESSURE_ASSIST / PRESSURE_SUPPORT ventilation modes. I am writing code that wants to switch() on ventilator modes, and getting rid of the unused modes means the switch() can cover all modes without a `default` case. That way when we add a new mode, we'll get a compile error showing everything we have to change. GPC: protobuf-unused

Commit:859a972
Author:Eugene Kirpichov
Committer:Eugene Kirpichov

Resurrects clang-tidy excluding generated code. Moves generated code to common/generated_libs. Fixes up some clang-tidy warnings that popped up while it was disabled.

Commit:589d553
Author:Eugene Kirpichov
Committer:Eugene Kirpichov

Resurrects clang-tidy excluding generated code. Moves generated code to common/generated_libs. Fixes up some clang-tidy warnings that popped up while it was disabled.

Commit:74c8bb1
Author:Justin Lebar
Committer:Justin Lebar

Send and receive only a single proto message. Switch from a command-based system to a system where each side periodically sends its status to the other. This has a few benefits. - No longer do we have to worry about packets arriving out of order (e.g. due to the first one having a checksum failure) and causing an invalid vent state. - No longer do we have to handle ACKs and retransmits. - We can have more confidence that if we change the GUI, it won't affect the controller, because in all cases, the GUI is sending down exactly the same messages to the controller. - Easier to test, since more of the state of the controller is encapsulated in this one struct. - Easier to add a new parameter -- just add it to the struct, instead of having to add getters/setters for it. - Simpler state machine: Now modules like pid just read whatever is the current state, rather than having to update their internal state whenever something changes. This is the culmination of a lot of work by - Lee Matthews - Albertas Mickėnas - Sarah Evans - Eugene Kirpichov - verityRF - and others

Commit:a048287
Author:Justin Lebar
Committer:Justin Lebar

Send and receive only a single proto message. Switch from a command-based system to a system where each side periodically sends its status to the other. This has a few benefits. - No longer do we have to worry about packets arriving out of order (e.g. due to the first one having a checksum failure) and causing an invalid vent state. - No longer do we have to handle ACKs and retransmits. - We can have more confidence that if we change the GUI, it won't affect the controller, because in all cases, the GUI is sending down exactly the same messages to the controller. - Easier to test, since more of the state of the controller is encapsulated in this one struct. - Easier to add a new parameter -- just add it to the struct, instead of having to add getters/setters for it. - Simpler state machine: Now modules like pid just read whatever is the current state, rather than having to update their internal state whenever something changes. This is the culmination of a lot of work by - Lee Matthews - Albertas Mickėnas - Sarah Evans - Eugene Kirpichov - verityRF - and others

Commit:e784041
Author:miceuz
Committer:miceuz

clean up comments, variable and type names add small fixes related to review - comments, var names and types rename ack_handler, improve command message decoder, fix bugs related to it where message length was incorrectly specified convert comment to TODO apply formatting rules to the proto file add comments explaining Commands VentilatorController handles rename AlertLevel type, also add more comments on usage of different data packets pass objects by reference to command and gui ack handlers. Demote command handlers to comms library Consolidate all serdes code to a single file pull ControllerStatus and network-protocol dependency up to pid.c. migrate tests to gtest

Commit:6549a90
Author:miceuz
Committer:miceuz

clean up comments, variable and type names add small fixes related to review - comments, var names and types rename ack_handler, improve command message decoder, fix bugs related to it where message length was incorrectly specified convert comment to TODO apply formatting rules to the proto file add comments explaining Commands VentilatorController handles rename AlertLevel type, also add more comments on usage of different data packets pass objects by reference to command and gui ack handlers. Demote command handlers to comms library Consolidate all serdes code to a single file pull ControllerStatus and network-protocol dependency up to pid.c. migrate tests to gtest

Commit:8739024
Author:miceuz
Committer:miceuz

Changes communication protocol to use Nanopb

Commit:4f051ae
Author:miceuz
Committer:miceuz

Changes communication protocol to use Nanopb