jomjol 4 роки тому
батько
коміт
45a71981c8

+ 8 - 2
README.md

@@ -52,9 +52,15 @@ In other cases you can contact the developer via email: <img src="https://raw.gi
 
 ------
 
-##### Rolling (2022-02-06)
 
-- Graphical configuration: select availalbe neural network files (*.tfl, *.tflite) from drop down menue
+
+##### Rolling (2022-02-08)
+
+- added Wifi RSSI to MQTT information
+
+Rolling (2022-02-06)
+
+- Graphical configuration: select available neural network files (*.tfl, *.tflite) from drop down menu
 - OTA-update: add option to upload tfl / tflite files to the correct locatioin (`/config/`)
   - in future the new files will also be copied to the `firmware` directory of the repository
 - Updated digital neural network file (`dig-s1-q-20220102.tflite`)

+ 7 - 0
code/components/jomjol_flowcontroll/ClassFlowMQTT.cpp

@@ -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();

+ 6 - 0
code/components/jomjol_wlan/connect_wlan.cpp

@@ -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)
 {

+ 1 - 0
code/components/jomjol_wlan/connect_wlan.h

@@ -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;

+ 2 - 2
code/main/version.cpp

@@ -1,4 +1,4 @@
-const char* GIT_REV="641cc86";
+const char* GIT_REV="ac3409f";
 const char* GIT_TAG="";
 const char* GIT_BRANCH="rolling";
-const char* BUILD_TIME="2022-02-06 18:35";
+const char* BUILD_TIME="2022-02-08 19:19";

+ 2 - 2
code/version.cpp

@@ -1,4 +1,4 @@
-const char* GIT_REV="641cc86";
+const char* GIT_REV="ac3409f";
 const char* GIT_TAG="";
 const char* GIT_BRANCH="rolling";
-const char* BUILD_TIME="2022-02-06 18:35";
+const char* BUILD_TIME="2022-02-08 19:19";

BIN
firmware/ana-s1-q-20220129.tflite


BIN
firmware/bootloader.bin


BIN
firmware/firmware.bin