ota.cpp: WIFI_STA mode; lorawan.cpp: rssi negative display
This commit is contained in:
parent
589e185153
commit
54dea2e505
@ -214,11 +214,17 @@ void onEvent(ev_t ev) {
|
|||||||
: PSTR("TX_COMPLETE"));
|
: PSTR("TX_COMPLETE"));
|
||||||
sprintf(display_line6, " "); // clear previous lmic status
|
sprintf(display_line6, " "); // clear previous lmic status
|
||||||
|
|
||||||
|
// if (LMIC.dataLen) {
|
||||||
|
// ESP_LOGI(TAG, "Received %d bytes of payload, RSSI %d SNR %d",
|
||||||
|
// LMIC.dataLen, (signed char)LMIC.rssi, (signed
|
||||||
|
// char)LMIC.snr);
|
||||||
|
// sprintf(display_line6, "RSSI %d SNR %d", (signed char)LMIC.rssi,
|
||||||
|
// (signed char)LMIC.snr);
|
||||||
|
|
||||||
if (LMIC.dataLen) {
|
if (LMIC.dataLen) {
|
||||||
ESP_LOGI(TAG, "Received %d bytes of payload, RSSI %d SNR %d",
|
ESP_LOGI(TAG, "Received %d bytes of payload, RSSI -%d SNR %d",
|
||||||
LMIC.dataLen, (signed char)LMIC.rssi, (signed char)LMIC.snr);
|
LMIC.dataLen, LMIC.rssi, LMIC.snr / 4);
|
||||||
sprintf(display_line6, "RSSI %d SNR %d", (signed char)LMIC.rssi,
|
sprintf(display_line6, "RSSI -%d SNR %d", LMIC.rssi, LMIC.snr / 4);
|
||||||
(signed char)LMIC.snr);
|
|
||||||
|
|
||||||
// check if command is received on command port, then call interpreter
|
// check if command is received on command port, then call interpreter
|
||||||
if ((LMIC.txrxFlags & TXRX_PORT) &&
|
if ((LMIC.txrxFlags & TXRX_PORT) &&
|
||||||
|
@ -68,7 +68,7 @@ void start_ota_update() {
|
|||||||
ESP_LOGI(TAG, "Starting Wifi OTA update");
|
ESP_LOGI(TAG, "Starting Wifi OTA update");
|
||||||
display(1, "**", WIFI_SSID);
|
display(1, "**", WIFI_SSID);
|
||||||
|
|
||||||
WiFi.mode(WIFI_AP_STA);
|
WiFi.mode(WIFI_STA);
|
||||||
WiFi.begin(WIFI_SSID, WIFI_PASS);
|
WiFi.begin(WIFI_SSID, WIFI_PASS);
|
||||||
|
|
||||||
int i = WIFI_MAX_TRY, j = OTA_MAX_TRY;
|
int i = WIFI_MAX_TRY, j = OTA_MAX_TRY;
|
||||||
|
Loading…
Reference in New Issue
Block a user