Version | Last Changelog | Ready? | Release |
---|---|---|---|
V1.1.x | Operational initial release | โ | none |
V1.2.x | Crashes fixed + smoother graph + implemented medical staff feedbacks | โ | none |
V1.3.x | Improve text readability, by increasing font sizes | โ | view |
V1.4.x | Added internationalization capabilities | โ | view |
V1.5.x | Improve UI readability + allow to change MakAir's settings | โ | view |
V2.0.x | Telemetry protocol version update to V2 + large code rework + improved UI/UX + reduced CPU usage + translated alarms + regulatory compliance | โ | view |
V2.1.x | Ventilation modes + flow sensing + new options + new plot renderer | โ | view |
V2.2.x | Patient configuration modal + new error messages + UX improvements | โ | view |
V2.3.x | Factory calibration utility + show more errors from the firmware | โ | view |
V2.4.x | Store user configurations in firmware EEPROM, eg. locale | โ | none |
In order to setup your environment and build the code, please follow these steps:
- Install Rustup
- Ensure you are using the Rust stable toolchain:
rustup default stable
- On Linux, make sure you have
cmake
installed and those libraries (debian):libxcb-shape0 libxcb-shape0-dev libxcb-xfixes0 libxcb-xfixes0-dev libfontconfig libfontconfig1-dev libudev-dev
- Build the project:
cargo build
Wayland support may be available but it hasn't been tested. You need a working X11 server.
As well, please make sure that you have at least 2GB of RAM for the build to complete. Running the UI requires less than 40MB of RAM afterwards (in release
mode).
Tested with Rust version: rustc 1.52.1 (9bc8c42bb 2021-05-09)
Note: as the MakAir Control UI currently targets a single 7" touch display, the UI only supports a static resolution of 800 x 480 pixels.
Building directly on a ventilator is convenient for testing purposes while developing. The Raspberry Pi boards in ventilators run ArchLinux. To build on a ventilator:
- Make sure
glibc
is up to date (e.g. by runningpacman -S glibc
as root) - Install the following packages:
git gcc make cmake pkg-config
- Enable NTP by running
timedatectl set-ntp TRUE
- Install Rustup
- Ensure you are using the Rust stable toolchain:
rustup default stable
- Clone the repository and build the project:
cargo build --release
Warning: Do NOT perform a full system upgrade. This has been observed to break the software.
To run the Control UI, please ensure that your device first has an open serial connection with the motherboard.
Note that the Control UI relies on the MakAir Telemetry library, which gets pulled from the makair-telemetry repository.
Take note of the serial port used as an input on your Control UI board, and call:
- Run:
./makair-control --port=0
(where--port
is your serial port ID, maybe /dev/ttyUSB0)
You may also play a pre-recorded file, by passing it as an input (this is handy while developing; example records are available in the telemetry library repository):
- Pull the telemetry library (in the parent directory):
git pull https://github.com/makers-for-life/makair-telemetry.git
- Run an example (from the Control UI directory):
./makair-control --input=../makair-telemetry/records/v2/short.record
(where--input
is an UNIX file path)
The following options can be passed to the Control UI upon running it:
--log={level}
: log level, where{level}
is one of:debug
,info
,warn
,error
(defaults towarn
inrelease
mode, elsedebug
);--port={id}
: serial port identifier to connect to the firmware via the telemetry protocol, where{id}
is a serial port ID, eg.1
;--input={file}
: path to a telemetry record to play in the UI, where{file}
is a record file (all UI controls will be inactive);--output={directory}
: path to directory in which telemetry records should be stored, where{directory}
is a path (disabled by default);--fullscreen
: enables fullscreen mode (used on the final ventilator display only);--translation={locale}
: locale to use in the UI, where{locale}
is a supported locale code (defaults toen
; overrides user settings);--disable-lora
: disables LoRa telemetry broadcasts (lora
build feature);--lora-device={device}
: LoRa device path, where{device}
is a path eg./dev/ttyAMA0
(lora
build feature; defaults to/dev/ttyAMA0
);
As MakAir was designed to be used internationally, we have made sure that the Control UI was fully translated in major languages.
You can pass the desired locale code when running the makair-control
binary, using the --translation
argument. Make sure to pass the locale ISO code, eg. for French: --translation=fr
.
By default, you do not need to pass the target locale, as it is read from user settings and can be changed by the end-user through the UI. If the --translation
argument is used, then user settings are ignored and the passed locale is forcibly used.
โก๏ธ You can find the list of supported languages, with their ISO language codes below:
- ๐ฌ๐ง English:
en
- ๐ซ๐ท French:
fr
- ๐ฉ๐ช German:
de
- ๐ฎ๐น Italian:
it
- ๐ช๐ธ Spanish:
es
- ๐ต๐น Portuguese:
pt
- ๐ฑ๐ป Latvian:
lv
- ๐ท๐บ Russian:
ru
- ๐บ๐ฆ Ukrainian:
uk
โก๏ธ Some CJK languages require building with the fonts-cjk
feature in order to render properly:
- ๐จ๐ณ Chinese (Simplified):
zh
โน๏ธ If your language does not appear in the list above, you may translate the base English file, then open a Pull Request.
To cross-compile a new release for an ARM target (using MUSL; statically-linked libraries), you can call the release_binaries.sh
script:
- Run:
./scripts/release_binaries.sh --version=1.0.0
Make sure to replace the version
script argument with the current release version. This is used for file naming purposes only.
The Control UI behavior can be tuned at compile time, by enabling some optional features while building the binary:
-
Support for CJK languages (eg. Chinese):
- Feature name:
fonts-cjk
- Build command:
cargo build --features=fonts-cjk
- Purpose: enables font support for CJK languages. As the CJK font weights 10MB+, and given that all assets get bundled in the final release binary, this feature is disabled by default as an optimization on binary size. If you need to use CJK languages in your MakAir ventilator, please build the Control UI with this feature enabled. Note that with this feature disabled, you will still be able to run with a CJK font, though all its glyphs will render as squares.
- Feature name:
-
Radio broadcasting of metrics over LoRa / LoRaWAN:
- Feature name:
lora
- Build command:
cargo build --features=lora
- Purpose: enables periodic radio broadcasts of metrics, using an attached LoRa transmitter chip. This is an experimental feature, that is turned off by default. It aims at helping us build a central monitoring dashboard for hospitals, nesting all running MakAir metrics together.
- Feature name:
Prepared system images that run on a Raspberry Pi and pack the Control UI are available in the makair-files repository (over Git LFS). They can be flashed to a microSD card and ran in a MakAir in a matter of minutes.
You may use a base system image and update it with any newer version of the UI (compiled on the same image, with additional build tools installed). Image update and flash instructions are available within this repository.
In case of an issue, please review the following points and check if any could help:
- If you are on Linux, you need to be a member of the
dialout
group for your user to be able to use the device created by the serial port.