2 Commits
Author SHA1 Message Date
swaits 027ac5eb04 chore: release 1.1.0 2026-04-22 11:47:42 -06:00
swaits b7d9b37bb0 feat: auto-resume RX across SET_CONFIG (protocol v1.1 §3.5)
Inside state Receiving, override the parent Configured state chart handler on(ConfigApplied) => Idle with on(ConfigApplied) => ResumingRx. ResumingRx entry (try_start_rx_hw) re-enables RX on the chip with the new modulation once apply_set_config has finished the SPI write + calibration, and transitions back to Receiving on StartRxOk.


Net effect: SET_CONFIG issued while the radio is in continuous RX no longer kicks the radio (and therefore the OLED) out to idle. The RX ring is still cleared by apply_set_config; callers never need to re-issue RX_START after SET_CONFIG.


This matches donglora-protocol 1.1.0 §3.5 and §6.3 normative behavior.
2026-04-22 11:47:14 -06:00
4 changed files with 50 additions and 9 deletions

No files matched your search

+33
View File
@@ -7,6 +7,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
## [Unreleased]
## [1.1.0] - 2026-04-22
Small but high-value behavior change: `SET_CONFIG` issued while the
radio is in continuous RX no longer drops the radio (and the OLED)
back to idle. The radio now auto-re-arms RX with the new modulation
once reconfiguration completes, matching DongLoRa Protocol 1.1's
§3.5 / §6.3 amendments.
### Changed
- `src/radio.rs`: inside `state Receiving`, add `on(ConfigApplied)
=> ResumingRx` to shadow the parent `Configured` state's
`on(ConfigApplied) => Idle` handler. The reconfigure path now
runs `apply_set_config` → `ConfigApplied` → `ResumingRx.entry:
try_start_rx_hw` → `StartRxOk` → `Receiving` without ever
entering `Idle`.
- The OLED's `Dashboard → Splash` transition was previously driven
by `RadioEvent::Idle` firing on `Configured.Idle.entry`. That
event no longer fires during a SET_CONFIG-from-Receiving
sequence, so the display stays on Dashboard.
### Dependencies
- `donglora-protocol` bumped to `1.1.0` (spec-only change; matches
the new normative text the firmware now implements).
### Use-case unlock
- Scanner / time-division / dynamic-modulation workflows that
rotate LoRa parameters mid-RX no longer need to re-issue
`RX_START` after every `SET_CONFIG`. One call, radio continues
to receive.
## [1.0.0] - 2026-04-22
The 1.0 release. Firmware now speaks DongLoRa Protocol v2 end to end,
Generated
+3 -3
View File
@@ -486,7 +486,7 @@ dependencies = [
[[package]]
name = "donglora"
version = "1.0.0"
version = "1.1.0"
dependencies = [
"cfg-if",
"cortex-m",
@@ -527,9 +527,9 @@ dependencies = [
[[package]]
name = "donglora-protocol"
version = "1.0.0"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8f2743ac7668845500e3686890917cdf5b0a09d17ec099bde2db4d3fae2a4a4"
checksum = "6bae9e9e5a8cebc6b4167f9ef696b61ce25b94c6d8283dbe1b2e97075a481b9d"
dependencies = [
"defmt 1.0.1",
"heapless 0.9.2",
+2 -2
View File
@@ -3,7 +3,7 @@ members = ["."]
[package]
name = "donglora"
version = "1.0.0"
version = "1.1.0"
edition = "2021"
build = "build.rs"
authors = ["Stephen Waits <steve@waits.net>"]
@@ -30,7 +30,7 @@ embassy-usb = { version = "0.6", features = ["defmt"] }
embassy-usb-driver = "0.2"
ucobs = { version = "0.3", features = ["legacy-msrv"] }
heapless = "0.9"
donglora-protocol = "1.0.0"
donglora-protocol = "1.1.0"
hsmc = { version = "0.1.0", default-features = false, features = ["embassy"] }
lora-phy = "3.0"
portable-atomic = { version = "1", optional = true, default-features = false, features = ["critical-section"] }
+12 -4
View File
@@ -170,10 +170,11 @@ statechart! {
state Configured {
on(CmdSetConfig(m: Modulation)) => apply_set_config;
on(ConfigFailedRadio) => Unconfigured;
// Re-configure from any substate (Receiving, Transmitting, …)
// drops back to Idle. Spec §3.5: "Any continuous RX is
// stopped. RX ring is cleared." Only successful applies
// emit ConfigApplied, so validation failures keep state.
// Default post-reconfigure landing is Idle. The RX ring is
// always cleared as part of apply_set_config. Receiving
// overrides this handler to auto-resume RX with the new
// parameters (spec §3.5) so callers do not need to re-issue
// RX_START after SET_CONFIG.
on(ConfigApplied) => Idle;
default(Idle);
@@ -202,6 +203,13 @@ statechart! {
on(CmdRxStop) => stop_rx_hw, respond_ok;
on(CmdRxStop) => Idle;
on(CmdTx) => TransmittingFromRx;
// Spec §3.5: a SET_CONFIG issued while receiving clears
// the RX ring (already handled by apply_set_config) but
// auto-rearms RX with the new parameters — the caller
// does not need to send a fresh RX_START. Override the
// parent's `on(ConfigApplied) => Idle` by landing in
// ResumingRx, whose entry kicks the chip back into RX.
on(ConfigApplied) => ResumingRx;
}
state ResumingRx {