ESPectre SDK 2.8.0-280-gac7af68
Wi-Fi CSI motion sensing for ESP32 firmware
Loading...
Searching...
No Matches
runtime_sensing_kconfig.h
Go to the documentation of this file.
1/*
2 * ESPectre - Runtime Sensing Kconfig
3 *
4 * Builds the default sensing runtime configuration from Kconfig values.
5 *
6 * Author: Francesco Pace <francesco.pace@gmail.com>
7 * SPDX-License-Identifier: GPL-3.0-only
8 * Commercial licensing available under separate agreement; see LICENSING.md.
9 */
10#pragma once
11
12#include "runtime_interface.h"
13
14namespace espectre {
15
16/**
17 * Build a `RuntimeConfig` from the `ESPECTRE_*` menuconfig options.
18 *
19 * This is the ergonomic path on ESP-IDF: expose the sensing settings in
20 * menuconfig, call this at boot, and override only the fields your product
21 * computes at runtime.
22 *
23 * @code
24 * espectre::RuntimeConfig config = espectre::make_runtime_sensing_config_from_kconfig();
25 * config.device_id = my_device_id();
26 * controller.set_config(config);
27 * @endcode
28 *
29 * Every value is range-checked against the schema in
30 * `runtime_sensing_schema.h`. An out-of-range or unparseable option falls back
31 * to the documented default and logs a warning rather than failing the boot,
32 * so a bad `sdkconfig` degrades instead of bricking the device.
33 *
34 * Options absent from the build, for instance when the SDK Kconfig is not
35 * sourced, compile to their defaults. Fields with no Kconfig option, such as
36 * `device_id` and the stream settings, keep their `RuntimeConfig` defaults.
37 *
38 * @return A validated configuration, ready for
39 * `RuntimeFrontendController::set_config()`.
40 */
42
43} // namespace espectre
RuntimeConfig make_runtime_sensing_config_from_kconfig()
Build a RuntimeConfig from the ESPECTRE_* menuconfig options.
Runtime configuration and the backend contract behind it.
Everything the runtime needs to know before setup().