Examples¶
Every app you can build from examples/esp32. Each app is one entry .cpp file in
examples/esp32/main/, selected by its name (APP_TYPE); the build defines EXAMPLE_TYPE_<name>=1 for it.
Run one¶
cd examples/esp32
./scripts/build_app.sh <app> Release
./scripts/flash_app.sh flash_monitor <app> Release
./scripts/build_app.sh list prints the names. See Get started for the toolchain.
Which one first
flux_api_test initialises everything and checks each manager, so it is the quickest way to see whether a board
is healthy. Then pick the documentation example for the manager you care about.
Where the manifold application lives
The examples bring up the HAL: one manager or chip at a time, no product logic. The valve, pressure-sensor and
self-test application that used to sit in examples/esp32/main/manifold_valves_pressure_control/ was an older
copy of the product middleware and has been removed. The maintained version is in the product firmware,
hardfoc-flux-v1 (main/middleware/utils/valves/ and
main/middleware/utils/hardware/).
Catalogue¶
From examples/esp32/app_config.yml
and each source file's @brief; do not edit.
14 apps, 5 built by CI on every pull request. Target esp32s3, ESP-IDF release/v5.5.
Start here¶
App (APP_TYPE) |
What it does | CI | Source |
|---|---|---|---|
flux_api_test |
Comprehensive Flux HAL API test suite for ESP32 (noexcept) | yes | flux_api_test.cpp |
Manager tests¶
App (APP_TYPE) |
What it does | CI | Source |
|---|---|---|---|
valve_cycling_test |
Valve manager focused cycling test for ESP32 | yes | valve_cycling_test.cpp |
gpio_adc_test |
GPIO & ADC focused test for Flux ESP32 | yes | gpio_adc_test.cpp |
led_temp_test |
LED & Temperature focused test for Flux ESP32 | yes | led_temp_test.cpp |
Documentation examples¶
App (APP_TYPE) |
What it does | CI | Source |
|---|---|---|---|
flux_nvs_example |
Flux NvsManager — App/Cal/Config namespaces, boot counter, blob, string | yes | flux_nvs_example.cpp |
adc_manager_example |
Documentation example: ADC reading on Flux V1. | - | AdcManagerExample.cpp |
comm_channels_example |
Documentation example: Communication channels usage on Flux V1. | - | CommChannelsManagerExample.cpp |
flux_api_example |
Comprehensive documentation example: Full Flux API on Flux V1. | - | FluxApiExample.cpp |
gpio_manager_example |
Documentation example: GPIO management on Flux V1. | - | GpioManagerExample.cpp |
led_manager_example |
Documentation example: WS2812 LED control on Flux V1. | - | LedManagerExample.cpp |
temperature_example |
Documentation example: Temperature monitoring on Flux V1. | - | TemperatureManagerExample.cpp |
valve_manager_example |
Documentation example: Unified valve control on Flux V1. | - | ValveManagerExample.cpp |
ads7952_example |
Documentation example: ADS7952 12-channel ADC on Flux V1. | - | Ads7952Example.cpp |
alicat_basis2_example |
Comprehensive Flux V1 example exercising the Alicat BASIS-2 driver and AlicatBasis2Handler over an ESP32-S3 UART configured for RS-485 half-duplex. |
- | AlicatBasis2Example.cpp |
Adding an app¶
- Add the
.cppfile underexamples/esp32/main/with a Doxygen@briefon its first comment block (the catalogue reads it). - Add an entry under
apps:inapp_config.yml(source_file,category,ci_enabled). - Run
hardfoc-docs gento refresh this page, and commit both.