|
|
|
@ -96,7 +96,7 @@ void setup(void) {
@@ -96,7 +96,7 @@ void setup(void) {
|
|
|
|
|
lora_config.sync_word = 0x34; |
|
|
|
|
lora_config.crc = SX127X_CRC_ENABLED; |
|
|
|
|
|
|
|
|
|
sx127x_t* lora; |
|
|
|
|
sx127x_t *lora; |
|
|
|
|
esp_err_t ret = sx127x_init(&lora_config, &lora); |
|
|
|
|
if (ret != ESP_OK) { |
|
|
|
|
const char *err_name = esp_err_to_name(ret); |
|
|
|
@ -178,8 +178,12 @@ void loop(void) {
@@ -178,8 +178,12 @@ void loop(void) {
|
|
|
|
|
u8g2_DrawStr(&u8g2, 4, 8 + 8, buf); |
|
|
|
|
|
|
|
|
|
if (packet.buffer_len) { |
|
|
|
|
ESP_LOGI(TAG, "lora received packet (len %d, rssi: %d, snr: %f): %s\n", packet.buffer_len, packet.rssi, |
|
|
|
|
packet.snr, packet.buffer); |
|
|
|
|
ESP_LOGI(TAG, |
|
|
|
|
"lora received packet (len %d, rssi: %d, snr: %f): %s\n", |
|
|
|
|
packet.buffer_len, |
|
|
|
|
packet.rssi, |
|
|
|
|
packet.snr, |
|
|
|
|
packet.buffer); |
|
|
|
|
u8g2_SetFont(&u8g2, u8g2_font_4x6_mf); |
|
|
|
|
snprintf(buf, 40, "lora pkt(rssi: %d, snr: %f)", packet.rssi, packet.snr); |
|
|
|
|
u8g2_DrawStr(&u8g2, 4, 8 + 8 + 8, buf); |
|
|
|
|