SHA256
Добавлен умный поиск в каналах
This commit is contained in:
@@ -47,6 +47,7 @@ case "${MODE}" in
|
||||
lvgl-official-based-test) SKETCH_DIR="${ROOT_DIR}/test_sketches/lvgl_official_based_test" ;;
|
||||
lvgl-subserver-touch-test) SKETCH_DIR="${ROOT_DIR}/test_sketches/lvgl_subserver_touch_test" ;;
|
||||
lvgl-russian-font-test) SKETCH_DIR="${ROOT_DIR}/test_sketches/lvgl_russian_font_test" ;;
|
||||
breath-dual-mode-monitor) SKETCH_DIR="${ROOT_DIR}/test_sketches/breath_dual_mode_monitor" ;;
|
||||
usb-contact-test) SKETCH_DIR="${ROOT_DIR}/test_sketches/usb_contact_sensor_test" ;;
|
||||
usb-contact-debug-test) SKETCH_DIR="${ROOT_DIR}/test_sketches/usb_contact_sensor_debug_test" ;;
|
||||
usb-contact-resistance-test) SKETCH_DIR="${ROOT_DIR}/test_sketches/usb_contact_resistance_test" ;;
|
||||
@@ -54,7 +55,7 @@ case "${MODE}" in
|
||||
lvgl-nav-minimal-test) SKETCH_DIR="${ROOT_DIR}/shine_homeserver_main" ;;
|
||||
*)
|
||||
echo "Unknown mode: ${MODE}" >&2
|
||||
echo "Use one of: hello, widgets, audio, simple, argon2, homeserver-ui, shine-homeserver-main, shine-homeserver-ui-main, legacy-homeserver-ui, text-test, gfx-text-test, gfx-layout-test, lvgl-basic-test, lvgl-interaction-test, lvgl-touch-debug-test, lvgl-official-based-test, lvgl-subserver-touch-test, lvgl-russian-font-test, usb-contact-test, usb-contact-debug-test, usb-contact-resistance-test, usb-contact-screen-start-stub" >&2
|
||||
echo "Use one of: hello, widgets, audio, simple, argon2, homeserver-ui, shine-homeserver-main, shine-homeserver-ui-main, legacy-homeserver-ui, text-test, gfx-text-test, gfx-layout-test, lvgl-basic-test, lvgl-interaction-test, lvgl-touch-debug-test, lvgl-official-based-test, lvgl-subserver-touch-test, lvgl-russian-font-test, breath-dual-mode-monitor, usb-contact-test, usb-contact-debug-test, usb-contact-resistance-test, usb-contact-screen-start-stub" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
- `lvgl_official_based_test/` - минимальный наш экран поверх максимально близкой к официальному `05_LVGL_Widgets` инициализации
|
||||
- `lvgl_subserver_touch_test/` - старый гибридный тест: `LVGL`-экран с инициализацией дисплея и чтением touch из старого `shine_homeserver_ui`; подтверждён на реальном устройстве
|
||||
- `lvgl_russian_font_test/` - тест кастомного кириллического `LVGL`-шрифта с русскими кнопками, длинными строками и рабочим touch
|
||||
- `breath_dual_mode_monitor/` - dual-mode breath monitor в стиле GFX-скетча: старт USB-датчика или внешних кнопок `KEY3/BOOT`, настройки лимита и громкости, повторяющиеся звуковые предупреждения
|
||||
- `usb_contact_sensor_test/` - тест переключения нативных USB D-/D+ (`GPIO19/20`) в режим простого замыкаемого контакта после нажатия Start; после перезагрузки снова обычный USB
|
||||
- `usb_contact_sensor_debug_test/` - debug-версия теста замыкания контакта: экранная кнопка проверяет touch, а переход в sensor mode выполняется физической кнопкой BOOT
|
||||
- `usb_contact_resistance_test/` - тест измерения сопротивления между USB D-/D+ через ADC на GPIO20; рассчитан на внешний известный резистор 10 kΩ с D+ на GND
|
||||
@@ -32,6 +33,7 @@
|
||||
- `./burn.sh lvgl-official-based-test`
|
||||
- `./burn.sh lvgl-subserver-touch-test`
|
||||
- `./burn.sh lvgl-russian-font-test`
|
||||
- `./burn.sh breath-dual-mode-monitor`
|
||||
- `./burn.sh usb-contact-test`
|
||||
- `./burn.sh usb-contact-debug-test`
|
||||
- `./burn.sh usb-contact-resistance-test`
|
||||
|
||||
@@ -4,6 +4,7 @@ Diagnostic sketches:
|
||||
|
||||
- `main-device/test_sketches/usb_contact_sensor_test/usb_contact_sensor_test.ino`
|
||||
- `main-device/test_sketches/usb_contact_sensor_debug_test/usb_contact_sensor_debug_test.ino`
|
||||
- `main-device/test_sketches/breath_dual_mode_monitor/breath_dual_mode_monitor.ino`
|
||||
- `main-device/test_sketches/usb_contact_resistance_test/usb_contact_resistance_test.ino`
|
||||
- `main-device/test_sketches/usb_contact_screen_start_stub/usb_contact_screen_start_stub.ino`
|
||||
|
||||
@@ -114,3 +115,45 @@ After tapping `START`:
|
||||
- reset/power cycle restores ordinary native USB boot
|
||||
|
||||
This version is intended to monitor breathing cadence from a dry-contact USB D-/D+ sensor.
|
||||
|
||||
## Dual-mode GFX breath monitor version
|
||||
|
||||
The `breath_dual_mode_monitor` sketch reuses the production-style `Arduino_GFX` visual approach, audio path, settings sliders, and average-cycle alert behavior from the USB contact breath monitor. It supports two start modes on one firmware: USB contact sensor mode and external button mode.
|
||||
|
||||
Initial screen:
|
||||
|
||||
- title: `BREATH MONITOR`
|
||||
- state: `READY`
|
||||
- action button: `START USB SENSOR`
|
||||
- action button: `START BUTTONS`
|
||||
|
||||
After `START USB SENSOR`:
|
||||
|
||||
- GPIO19 / USB `D-` is configured as `OUTPUT LOW`
|
||||
- GPIO20 / USB `D+` is configured as `INPUT_PULLUP`
|
||||
- closed contact is treated as `EXHALE`
|
||||
- open contact is treated as `INHALE`
|
||||
- USB sensor cycles shorter than 3 seconds are ignored without resetting the current cycle timer
|
||||
- a short `KEY3 / GPIO18` press opens or closes settings in USB sensor mode
|
||||
- the bottom line shows the durations of the last 5 accepted USB sensor cycles
|
||||
|
||||
After `START BUTTONS`:
|
||||
|
||||
- `KEY3 / GPIO18` is the external `INHALE` button, active LOW
|
||||
- `BOOT / GPIO0` is the external `EXHALE` button, active LOW
|
||||
- do not hold `BOOT` while booting or resetting the board
|
||||
- the working screen does not show touch `INHALE`/`EXHALE` buttons
|
||||
- long-holding `KEY3 / INHALE` for about 850 ms opens settings; the long press still counts as an inhale press
|
||||
- while settings are open, the next `KEY3 / INHALE` press closes settings and also counts as an inhale press
|
||||
|
||||
In both modes:
|
||||
|
||||
- one breathing cycle is measured from one `EXHALE` tap to the next `EXHALE` tap
|
||||
- inhale before any exhale does not create a cycle
|
||||
- button-mode cycles shorter than 1.5 seconds are ignored
|
||||
- USB sensor cycles shorter than 3 seconds are ignored
|
||||
- the UI shows current cycle time, arithmetic average over the last 5 completed cycles, elapsed session time, selected limit, long-pause count, short-average count, and current short-average streak
|
||||
- the lower numeric fields use a larger font than before
|
||||
- if the average of the last up to 5 completed cycles is shorter than the selected limit, warning beeps are played like in the USB contact breath monitor
|
||||
- if the current cycle reaches 60 seconds, 5 loud warning beeps are played, then after 5 seconds another 5 loud warning beeps are played, repeating until the user changes phase / exits the long cycle
|
||||
- settings keep the same sliders: limit `5/7/10/15/20` seconds, quiet cycle tick volume `0..10`, and alert volume `0..10`
|
||||
|
||||
Reference in New Issue
Block a user