mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 04:26:58 +03:00
Rolling 20220208
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <sstream>
|
||||
#include "ClassFlowMQTT.h"
|
||||
#include "Helper.h"
|
||||
#include "connect_wlan.h"
|
||||
|
||||
#include "time_sntp.h"
|
||||
#include "interface_mqtt.h"
|
||||
@@ -156,6 +157,12 @@ bool ClassFlowMQTT::doFlow(string zwtime)
|
||||
sprintf(freeheapmem, "%zu", esp_get_free_heap_size());
|
||||
MQTTPublish(zw, freeheapmem);
|
||||
|
||||
zw = maintopic + "/" + "Wifi RSSI";
|
||||
char rssi[11];
|
||||
sprintf(rssi, "%d", get_WIFI_RSSI());
|
||||
MQTTPublish(zw, rssi);
|
||||
|
||||
|
||||
if (flowpostprocessing)
|
||||
{
|
||||
std::vector<NumberPost*>* NUMBERS = flowpostprocessing->GetNumbers();
|
||||
|
||||
@@ -343,6 +343,12 @@ void wifi_init_sta(const char *_ssid, const char *_password, const char *_hostna
|
||||
*/
|
||||
}
|
||||
|
||||
int get_WIFI_RSSI()
|
||||
{
|
||||
wifi_ap_record_t ap;
|
||||
esp_wifi_sta_get_ap_info(&ap);
|
||||
return ap.rssi;
|
||||
}
|
||||
|
||||
void wifi_init_sta(const char *_ssid, const char *_password, const char *_hostname)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ void wifi_init_sta(const char *_ssid, const char *_password);
|
||||
|
||||
std::string* getIPAddress();
|
||||
std::string* getSSID();
|
||||
int get_WIFI_RSSI();
|
||||
|
||||
extern std::string hostname;
|
||||
extern std::string std_hostname;
|
||||
|
||||
Reference in New Issue
Block a user