mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-10-15 18:50:14 +00:00
- CadController (stats, window, re-anchor, visits, staircase, safety, starvation relax) and NoiseFloorEstimator split out of LoRaRadioBase behind a 4-call CadHw interface; Zephyr-free, host unit tests added - prefs mandatory: setPrefs() before begin(), LoRaConfig fallbacks and the companion/observer placeholder prefs removed; LoRaConfig is the one defaults source (invalid-prefs fallback now uses the board TX default) - TX-wait thread stack owned by the base; reconfigureWithParams removed - driver extension headers on the public include path (zephyr/drivers/lora/*.h); patch 0003 include updated - comment diet (image-identical); rationale moved to devdocs LLD 03
29 lines
954 B
C++
29 lines
954 B
C++
/*
|
|
* SPDX-License-Identifier: MIT
|
|
* ZephCore LoRa default parameters
|
|
*
|
|
* The one source of radio defaults. They only seed NodePrefs (initNodePrefs(),
|
|
* RepeaterDataStore's invalid-prefs fallback); the radio itself always reads
|
|
* prefs. Units match NodePrefs.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
namespace mesh {
|
|
|
|
struct LoRaConfig {
|
|
static constexpr float FREQ_MHZ = 869.618f; /* MeshCore default channel (EU 869 MHz ISM) */
|
|
static constexpr float BANDWIDTH_KHZ = 62.5f; /* MeshCore default */
|
|
static constexpr uint8_t SPREADING_FACTOR = 7; /* SF7: HU regional default since 2026-08 */
|
|
static constexpr uint8_t CODING_RATE = 5; /* CR 4/5: lowest overhead */
|
|
#ifdef CONFIG_ZEPHCORE_DEFAULT_TX_POWER_DBM
|
|
static constexpr int8_t TX_POWER_DBM = CONFIG_ZEPHCORE_DEFAULT_TX_POWER_DBM; /* per board (external PAs) */
|
|
#else
|
|
static constexpr int8_t TX_POWER_DBM = 22; /* SX1262 max */
|
|
#endif
|
|
};
|
|
|
|
} /* namespace mesh */
|