802.11-TX: Reduce transmit power, add notes about legal requirements
This commit is contained in:
parent
4d7bef58a1
commit
2c50668e7e
2 changed files with 24 additions and 0 deletions
|
|
@ -51,6 +51,7 @@ mod screen;
|
|||
mod v2x_tx;
|
||||
|
||||
const WIFI_CHANNEL: radio::Channel = 180;
|
||||
const WIFI_TXPOWER: i8 = 10; // dBm, 2..20
|
||||
#[cfg(feature = "spat")]
|
||||
const SPAT_RATE_LIMIT: u8 = 5; // keep every n-th message
|
||||
#[cfg(any(feature = "cam_tx", feature = "uart"))]
|
||||
|
|
@ -163,9 +164,13 @@ async fn main(spawner: Spawner) -> ! {
|
|||
esp_radio::wifi::ControllerConfig::default(),
|
||||
)
|
||||
.expect("Failed to initialize Wi-Fi controller");
|
||||
|
||||
if let Err(err) = wifi_controller.set_band_mode(esp_radio::wifi::BandMode::_5G) {
|
||||
error!("Failed to set WiFi to 5GHz only: {err}");
|
||||
}
|
||||
if let Err(err) = wifi_controller.set_max_tx_power(WIFI_TXPOWER * 4) {
|
||||
error!("Failed to set WiFi TX power: {err}");
|
||||
}
|
||||
|
||||
critical_section::with(|cs| {
|
||||
WIFI_RX_QUEUE.borrow(cs).replace(Some(ArrayQueue::new(2)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue