mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-14 07:26:53 +03:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbd14a267f | ||
|
|
81a57d32a8 |
@@ -1,8 +1,8 @@
|
|||||||
## [15.2.2] - 2023-05-01
|
## [15.2.4] - 2023-05-02
|
||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
|
|
||||||
For a full list of changes see [Full list of changes](https://github.com/jomjol/AI-on-the-edge-device/compare/v15.2.1...v15.2.2)
|
For a full list of changes see [Full list of changes](https://github.com/jomjol/AI-on-the-edge-device/compare/v15.2.1...v15.2.4)
|
||||||
|
|
||||||
#### Changed
|
#### Changed
|
||||||
- Updated PlatformIO to `6.2.0`
|
- Updated PlatformIO to `6.2.0`
|
||||||
@@ -10,6 +10,7 @@ For a full list of changes see [Full list of changes](https://github.com/jomjol/
|
|||||||
|
|
||||||
#### Fixed
|
#### Fixed
|
||||||
- [#2373](https://github.com/jomjol/AI-on-the-edge-device/pull/2373) Allow the Alignment Mark step while status is "Initializing" or "Initialization (delayed)" or while in setup mode
|
- [#2373](https://github.com/jomjol/AI-on-the-edge-device/pull/2373) Allow the Alignment Mark step while status is "Initializing" or "Initialization (delayed)" or while in setup mode
|
||||||
|
- [#2381](https://github.com/jomjol/AI-on-the-edge-device/pull/2381) Fix broken sysinfo REST API
|
||||||
|
|
||||||
|
|
||||||
## [15.2.1] - 2023-04-27
|
## [15.2.1] - 2023-04-27
|
||||||
@@ -984,7 +985,7 @@ External Illumination
|
|||||||
- Initial Version
|
- Initial Version
|
||||||
|
|
||||||
|
|
||||||
[15.2.2]: https://github.com/jomjol/AI-on-the-edge-device/compare/v15.2.1...v15.2.2
|
[15.2.4]: https://github.com/jomjol/AI-on-the-edge-device/compare/v15.2.1...v15.2.4
|
||||||
[15.2.1]: https://github.com/jomjol/AI-on-the-edge-device/compare/v15.2.0...v15.2.1
|
[15.2.1]: https://github.com/jomjol/AI-on-the-edge-device/compare/v15.2.0...v15.2.1
|
||||||
[15.2.0]: https://github.com/jomjol/AI-on-the-edge-device/compare/v15.1.1...v15.2.0
|
[15.2.0]: https://github.com/jomjol/AI-on-the-edge-device/compare/v15.1.1...v15.2.0
|
||||||
[15.1.1]: https://github.com/jomjol/AI-on-the-edge-device/compare/v15.1.0...v15.1.1
|
[15.1.1]: https://github.com/jomjol/AI-on-the-edge-device/compare/v15.1.0...v15.1.1
|
||||||
|
|||||||
@@ -147,12 +147,6 @@ bool SDCardCheckFolderFilePresence()
|
|||||||
bRetval = false;
|
bRetval = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check if file exists: gethost.js */
|
|
||||||
if (stat("/sdcard/html/gethost.js", &sb) != 0) {
|
|
||||||
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Folder/file check: File /html/gethost.js not found");
|
|
||||||
bRetval = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check if file exists: version.txt */
|
/* check if file exists: version.txt */
|
||||||
if (stat("/sdcard/html/version.txt", &sb) != 0) {
|
if (stat("/sdcard/html/version.txt", &sb) != 0) {
|
||||||
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Folder/file check: File /html/version.txt not found");
|
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Folder/file check: File /html/version.txt not found");
|
||||||
|
|||||||
@@ -49,14 +49,13 @@
|
|||||||
#define ets_delay_us(a) esp_rom_delay_us(a)
|
#define ets_delay_us(a) esp_rom_delay_us(a)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
esp_netif_t *sta_netif = NULL;
|
|
||||||
|
|
||||||
static const char *TAG = "WIFI";
|
static const char *TAG = "WIFI";
|
||||||
|
|
||||||
static bool APWithBetterRSSI = false;
|
static bool APWithBetterRSSI = false;
|
||||||
static bool WIFIConnected = false;
|
static bool WIFIConnected = false;
|
||||||
static int WIFIReconnectCnt = 0;
|
static int WIFIReconnectCnt = 0;
|
||||||
|
|
||||||
|
esp_netif_t *my_sta;
|
||||||
|
|
||||||
|
|
||||||
void strinttoip4(const char *ip, int &a, int &b, int &c, int &d) {
|
void strinttoip4(const char *ip, int &a, int &b, int &c, int &d) {
|
||||||
@@ -531,7 +530,7 @@ esp_err_t wifi_init_sta(void)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_netif_t *my_sta = esp_netif_create_default_wifi_sta();
|
my_sta = esp_netif_create_default_wifi_sta();
|
||||||
|
|
||||||
if (!wlan_config.ipaddress.empty() && !wlan_config.gateway.empty() && !wlan_config.netmask.empty())
|
if (!wlan_config.ipaddress.empty() && !wlan_config.gateway.empty() && !wlan_config.netmask.empty())
|
||||||
{
|
{
|
||||||
@@ -674,6 +673,20 @@ int get_WIFI_RSSI()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*std::string getIp() {
|
||||||
|
esp_netif_ip_info_t ip_info;
|
||||||
|
ESP_ERROR_CHECK(esp_netif_get_ip_info(my_sta, ip_info));
|
||||||
|
char ipFormated[4*3+3+1];
|
||||||
|
sprintf(ipFormated, IPSTR, IP2STR(&ip_info.ip));
|
||||||
|
return std::string(ipFormated);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
std::string* getHostname() {
|
||||||
|
return &wlan_config.hostname;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool getWIFIisConnected()
|
bool getWIFIisConnected()
|
||||||
{
|
{
|
||||||
return WIFIConnected;
|
return WIFIConnected;
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ int wifi_init_sta(void);
|
|||||||
std::string* getIPAddress();
|
std::string* getIPAddress();
|
||||||
std::string* getSSID();
|
std::string* getSSID();
|
||||||
int get_WIFI_RSSI();
|
int get_WIFI_RSSI();
|
||||||
|
std::string* getHostname();
|
||||||
|
|
||||||
bool getWIFIisConnected();
|
bool getWIFIisConnected();
|
||||||
void WIFIDestroy();
|
void WIFIDestroy();
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,6 @@
|
|||||||
httpd_handle_t server = NULL;
|
httpd_handle_t server = NULL;
|
||||||
std::string starttime = "";
|
std::string starttime = "";
|
||||||
|
|
||||||
extern esp_netif_t *sta_netif;
|
|
||||||
|
|
||||||
static const char *TAG = "MAIN SERVER";
|
static const char *TAG = "MAIN SERVER";
|
||||||
|
|
||||||
/* An HTTP GET handler */
|
/* An HTTP GET handler */
|
||||||
@@ -353,15 +351,6 @@ esp_err_t sysinfo_handler(httpd_req_t *req)
|
|||||||
char freeheapmem[11];
|
char freeheapmem[11];
|
||||||
sprintf(freeheapmem, "%lu", (long) getESPHeapSize());
|
sprintf(freeheapmem, "%lu", (long) getESPHeapSize());
|
||||||
|
|
||||||
esp_netif_ip_info_t ip_info;
|
|
||||||
ESP_ERROR_CHECK(esp_netif_get_ip_info(sta_netif, &ip_info));
|
|
||||||
const char *hostname;
|
|
||||||
ESP_ERROR_CHECK(esp_netif_get_hostname(sta_netif, &hostname));
|
|
||||||
|
|
||||||
char ipFormated[4*3+3+1];
|
|
||||||
|
|
||||||
sprintf(ipFormated, IPSTR, IP2STR(&ip_info.ip));
|
|
||||||
|
|
||||||
zw = string("[{") +
|
zw = string("[{") +
|
||||||
"\"firmware\": \"" + gitversion + "\"," +
|
"\"firmware\": \"" + gitversion + "\"," +
|
||||||
"\"buildtime\": \"" + buildtime + "\"," +
|
"\"buildtime\": \"" + buildtime + "\"," +
|
||||||
@@ -370,8 +359,8 @@ esp_err_t sysinfo_handler(httpd_req_t *req)
|
|||||||
"\"gitrevision\": \"" + gitrevision + "\"," +
|
"\"gitrevision\": \"" + gitrevision + "\"," +
|
||||||
"\"html\": \"" + htmlversion + "\"," +
|
"\"html\": \"" + htmlversion + "\"," +
|
||||||
"\"cputemp\": \"" + cputemp + "\"," +
|
"\"cputemp\": \"" + cputemp + "\"," +
|
||||||
"\"hostname\": \"" + hostname + "\"," +
|
"\"hostname\": \"" + *getHostname() + "\"," +
|
||||||
"\"IPv4\": \"" + string(ipFormated) + "\"," +
|
"\"IPv4\": \"" + *getIPAddress() + "\"," +
|
||||||
"\"freeHeapMem\": \"" + freeheapmem + "\"" +
|
"\"freeHeapMem\": \"" + freeheapmem + "\"" +
|
||||||
"}]";
|
"}]";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user