From 5bd6e1077a920ec0387a4bc2e8028d7179742c89 Mon Sep 17 00:00:00 2001 From: "Morgan 'ARR\\!' Allen" Date: Fri, 29 Dec 2023 21:11:43 -0800 Subject: [PATCH] updated readme --- README.md | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 482306e..155d476 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# `esp_netif_now` +# `esp_netif_lora` An ESP-NETIF driver for ESP-Now @@ -9,7 +9,7 @@ This could also be the basis for using any other system that is capable of using Install with ``` -git clone https://git.oit.cloud/morgan/esp_netif_now/ components/esp_netif_now +git clone https://git.oit.cloud/morgan/esp_netif_lora/ components/esp_netif_lora ``` ## complete example @@ -19,27 +19,18 @@ git clone https://git.oit.cloud/morgan/esp_netif_now/ components/esp_netif_now #include "nvs_flash.h" -#include "esp_netif_now.h" +#include "esp_netif_lora.h" void app_main() { - esp_netif_now_config_t config; + esp_netif_lora_config_t config; esp_efuse_mac_get_default((uint8_t*)&config.mac); - ESP_ERROR_CHECK(nvs_flash_init()); - ESP_ERROR_CHECK(esp_netif_init()); - ESP_ERROR_CHECK(esp_event_loop_create_default()); - wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); - ESP_ERROR_CHECK(esp_wifi_init(&cfg)); - ESP_ERROR_CHECK(esp_wifi_set_storage(WIFI_STORAGE_RAM)); - ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA)); - ESP_ERROR_CHECK(esp_wifi_start()); - ESP_ERROR_CHECK(esp_wifi_set_channel(1, WIFI_SECOND_CHAN_NONE)); - - esp_netif_set_ip4_addr(&config.ip_info.ip, 10, 10 , 0, config.mac[5]); - esp_netif_set_ip4_addr(&config.ip_info.gw, 10, 10 , 0, 1); + esp_netif_set_ip4_addr(&config.ip_info.ip, 10, 20 , 0, config.mac[5]); + esp_netif_set_ip4_addr(&config.ip_info.gw, 10, 20 , 0, 1); esp_netif_set_ip4_addr(&config.ip_info.netmask, 255, 255 , 255, 0); - esp_netif_now_init(&config); + esp_log_level_set("LoRa32", ESP_LOG_INFO); + esp_netif_lora_init(&config); } ```