mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* wifi power max
This commit is contained in:
parent
8355543366
commit
1220c69aa9
2 changed files with 6 additions and 3 deletions
|
|
@ -544,9 +544,9 @@ void setup() {
|
||||||
fast_rng.begin(radio.random(0x7FFFFFFF));
|
fast_rng.begin(radio.random(0x7FFFFFFF));
|
||||||
#else
|
#else
|
||||||
char c = 0;
|
char c = 0;
|
||||||
while (c != '\n') { // wait for ENTER to be pressed
|
// while (c != '\n') { // wait for ENTER to be pressed
|
||||||
if (Serial.available()) c = Serial.read();
|
// if (Serial.available()) c = Serial.read();
|
||||||
}
|
// }
|
||||||
fast_rng.begin(millis());
|
fast_rng.begin(millis());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#include "ESPNOWRadio.h"
|
#include "ESPNOWRadio.h"
|
||||||
#include <esp_now.h>
|
#include <esp_now.h>
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
|
#include <esp_wifi.h>
|
||||||
|
|
||||||
static uint8_t broadcastAddress[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
|
static uint8_t broadcastAddress[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
|
||||||
static esp_now_peer_info_t peerInfo;
|
static esp_now_peer_info_t peerInfo;
|
||||||
|
|
@ -31,6 +32,8 @@ void ESPNOWRadio::begin() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
esp_wifi_set_max_tx_power(80); // should be 20dBm
|
||||||
|
|
||||||
esp_now_register_send_cb(OnDataSent);
|
esp_now_register_send_cb(OnDataSent);
|
||||||
esp_now_register_recv_cb(OnDataRecv);
|
esp_now_register_recv_cb(OnDataRecv);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue