Closed enelson1001 closed 3 years ago
I've always used the master branch of IDF, but since I'm currently spending my free time on things outside the world of microprocessors I've not kept tabs on what has changed and updated accordingly.
SDCard: So they have broken the API again? Maybe it'd be better to break out the initialization into a separate object that is passed to the different drivers (sdcard and display) so that it is initialized in a single place?
concerning Wifi.cpp:
esp_wifi_set_config(WIFI_IF_AP, &config);
. Otherwise it will not compile in V4.3.Wifi::wifi_event_callback
for the event IP_EVENT
starting in line in line 193 you can add wifi->ip_info = reinterpret_cast<ip_event_got_ip_t *>(event_data)->ip_info;
because the ip_info is included in the event data. Then you can add to Wifi.h:
esp_ip4_addr_t *get_ip() { return &ip_info.ip; };
esp_ip4_addr_t *get_netmask() { return &ip_info.netmask; };
esp_ip4_addr_t *get_gateway() { return &ip_info.gw; };
in order to get the needed info.
void set_host_name(const std::string& name);
. After that the router shows the name as expected.concerning SDCard.cpp: unfortunately I am not so familiar with SPI.
@squonk11 As you can see from my somewhat slow response, my priorities are currently elsewhere. I'd go with IDF 4.2 for now. I'm happy to look at a PR for on update to IDF-master, but I won't be making the updating myself in the near future.
I am also quite busy these days but I can try to make a PR as soon as possible.
Closing in favor of #145
I hope you are doing well and still maintaining Smooth.
I guess the first question before getting into the issues is which version of esp-idf should be used with Smooth. The Requirements section on your README.md just states esp-idf-v4.x.
Wifi.cpp
esp_wifi_set_config(WIFI_IF_AP, &config);
esp_netif_get_ip_info(esp_netif_t *esp_netif, esp_netif_ip_info_t *ip_info)
but don't know how to do this with existing implementation.SDCard.cpp
I ran into issues using esp-idf-Master and esp-idf-v4.2 where SDCard.cpp will not compile. The SDCard.ccp looks like the init method needs to be updated to something like the following based on esp-idf example - examples/storage/sd_card/main/sd_card_example_main.c
But the spibus needs to be initialized. For me I am using the M5Stack which has the display and SDCard on the same spi bus. I am initializing the spi bus in my DisplayDriver class, so that is why you see the spi_bus_initialize commented out. Not sure how to handle this use case in the SDCard.cpp. I did have to implement a 1 sec Thread:Sleep between the DisplayDriverTask.start() and the SDCard.init() but that seemed reasonable to me.