Skip to content

Pre beta fixups#5605

Open
MabezDev wants to merge 6 commits into
esp-rs:mainfrom
MabezDev:pre-beta-fixups
Open

Pre beta fixups#5605
MabezDev wants to merge 6 commits into
esp-rs:mainfrom
MabezDev:pre-beta-fixups

Conversation

@MabezDev
Copy link
Copy Markdown
Member

@MabezDev MabezDev commented May 26, 2026

Please review commit by commit.

Copilot AI review requested due to automatic review settings May 26, 2026 15:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR performs a set of pre-beta API and documentation cleanups in esp-radio, primarily restructuring the Wi-Fi controller construction API and reorganizing Wi-Fi event/info types, with corresponding updates across examples and test binaries.

Changes:

  • Replace the free function esp_radio::wifi::new() with the associated constructor WifiController::new().
  • Move station/AP connection event/info types into wifi::sta and wifi::ap modules, updating call sites accordingly.
  • Gate AccessPointConfig builder methods with_max_connections() and with_dtim_period() behind the unstable feature and refresh crate-level documentation.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.

Show a summary per file
File Description
qa-test/src/bin/wifi_syslog.rs Update Wi-Fi controller creation to WifiController::new().
qa-test/src/bin/wifi_survives_ble_drop.rs Update Wi-Fi controller creation to WifiController::new().
qa-test/src/bin/embassy_wifi_stress.rs Update Wi-Fi controller creation to WifiController::new() (with formatting changes).
qa-test/src/bin/embassy_wifi_i2s.rs Update Wi-Fi controller creation to WifiController::new().
qa-test/src/bin/embassy_wifi_drop.rs Update Wi-Fi controller creation to WifiController::new() in both test sections.
qa-test/src/bin/embassy_wifi_csi.rs Update Wi-Fi controller creation to WifiController::new().
qa-test/src/bin/embassy_wifi_bench.rs Update Wi-Fi controller creation to WifiController::new().
qa-test/src/bin/embassy_scan_after_sleep.rs Update Wi-Fi controller creation to WifiController::new() (with formatting changes).
hil-test/src/bin/esp_radio/wifi_controller.rs Update Wi-Fi init in HIL tests to WifiController::new().
hil-test/src/bin/esp_radio/init_tests.rs Update init/teardown tests to WifiController::new() (including CS/interrupt-free cases).
examples/wifi/sniffer/src/main.rs Update Wi-Fi controller creation to WifiController::new().
examples/wifi/embassy_sntp/src/main.rs Update Wi-Fi controller creation to WifiController::new().
examples/wifi/embassy_dhcp/src/main.rs Update Wi-Fi controller creation to WifiController::new().
examples/wifi/embassy_coex/src/main.rs Update Wi-Fi controller creation to WifiController::new().
examples/wifi/embassy_access_point/src/main.rs Update Wi-Fi controller creation + AP station event type paths (wifi::ap::...).
examples/wifi/embassy_access_point_with_sta/src/main.rs Update Wi-Fi controller creation + AP station event type paths (wifi::ap::...).
examples/wifi/80211_tx/src/main.rs Update Wi-Fi controller creation to WifiController::new().
examples/esp-now/embassy_esp_now/src/main.rs Update Wi-Fi controller creation to WifiController::new() for ESP-NOW setup.
examples/esp-now/embassy_esp_now_duplex/src/main.rs Update Wi-Fi controller creation to WifiController::new() inside mk_static!.
esp-radio/src/wifi/sta/mod.rs Relocate station connected/disconnected info types into wifi::sta.
esp-radio/src/wifi/mod.rs Move new() into WifiController::new(), reorganize imports, and update docs/examples in rustdoc.
esp-radio/src/wifi/event.rs Update rustdoc references to the new constructor path.
esp-radio/src/wifi/ap.rs Gate AP config builder methods behind unstable and relocate AP station event/info types into wifi::ap.
esp-radio/src/lib.rs Restructure crate-level docs (overview/quick start/examples/links) and update Wi-Fi snippet to WifiController::new().

Copilot AI review requested due to automatic review settings May 26, 2026 15:55
@bjoernQ
Copy link
Copy Markdown
Contributor

bjoernQ commented May 26, 2026

It's maybe just me but somehow this reads confusing 🤔 :

                esp_radio::wifi::ap::EventInfo::Connected(info) => {
                    println!("Station connected: {:?}", info);
                }
                esp_radio::wifi::ap::EventInfo::Disconnected(info) => {
                    println!("Station disconnected: {:?}", info);
                }

i.e. ap;:...::Connected means a station connected (to the AP) - but if everyone else likes it I can live with this

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 5 comments.

Comment on lines +165 to +168
/// The SSID of the connected station.
pub ssid: Ssid,
/// The BSSID of the connected station.
pub bssid: [u8; 6],
Comment on lines +182 to +185
/// The SSID of the disconnected station.
pub ssid: Ssid,
/// The BSSID of the disconnected station.
pub bssid: [u8; 6],
Comment thread hil-test/src/bin/esp_radio/wifi_controller.rs
Comment thread hil-test/src/bin/esp_radio/init_tests.rs
Comment thread esp-radio/src/wifi/mod.rs
Comment thread esp-radio/src/lib.rs
//! ## Optimization level
//!
//! To make it work also for your debug builds add this to your `Cargo.toml`
//! The radio blobs require optimization level 2 or 3 to function correctly.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The blobs are precompiled, what actually requires the high optimization level?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect its actually the scheduler, not really the blobs but haven't tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants