Skip to content

Commit 4903cd9

Browse files
committed
feat: do not use nvs if in qa
1 parent 166d354 commit 4903cd9

File tree

2 files changed

+17
-20
lines changed

2 files changed

+17
-20
lines changed

Cargo.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,7 @@ async fn main(spawner: Spawner) {
142142
));
143143

144144
#[cfg(feature = "qa")]
145-
{
146-
_ = nvs.invalidate_key(WIFI_NVS_KEY).await;
147-
spawner.must_spawn(qa::qa_processor(global_state.clone()));
148-
}
145+
spawner.must_spawn(qa::qa_processor(global_state.clone()));
149146

150147
let mut wm_settings = esp_hal_wifimanager::WmSettings::default();
151148
wm_settings.ssid.clear();
@@ -172,7 +169,10 @@ async fn main(spawner: Spawner) {
172169
let wifi_res = esp_hal_wifimanager::init_wm(
173170
wm_settings,
174171
&spawner,
175-
&nvs,
172+
#[cfg(feature = "qa")]
173+
None,
174+
#[cfg(not(feature = "qa"))]
175+
Some(&nvs),
176176
board.rng,
177177
board.timg0.timer0,
178178
board.radio_clk,
@@ -189,10 +189,7 @@ async fn main(spawner: Spawner) {
189189
};
190190

191191
#[cfg(feature = "qa")]
192-
{
193-
_ = nvs.invalidate_key(WIFI_NVS_KEY).await;
194-
crate::qa::send_qa_resp(crate::qa::QaSignal::WifiSetup);
195-
}
192+
crate::qa::send_qa_resp(crate::qa::QaSignal::WifiSetup);
196193

197194
let conn_settings: ConnSettings = wifi_res
198195
.data

0 commit comments

Comments
 (0)