Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
cziter15 committed Jun 19, 2024
1 parent 7c735a3 commit a7aef5d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
21 changes: 12 additions & 9 deletions src/ksf/comp/ksDevicePortal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,25 @@

#if defined(ESP32) || defined(ESP8266)
#if ESP8266
#include "flash_hal.h"
#include "ESP8266WiFi.h"
#include "WiFiClient.h"
#include "ESP8266WebServer.h"
#define HARDWARE "ESP8266"

#include "flash_hal.h"
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>

using WebServerClass = ESP8266WebServer;

uint8_t ESP_getFlashVendor() { return ESP.getFlashChipVendorId(); }
uint32_t ESP_getFlashSizeKB() { return ESP.getFlashChipRealSize()/1024; }
#elif ESP32
#include "WiFi.h"
#include "WiFiClient.h"
#include "WebServer.h"
#include "nvs_flash.h"
#define WebServerClass WebServer
#define HARDWARE "ESP32"

#include <WiFi.h>
#include <WebServer.h>
#include "nvs_flash.h"

using WebServerClass = WebServer;

extern uint32_t ESP_getFlashChipId(void);
uint8_t ESP_getFlashVendor() { return ESP_getFlashChipId() & 0xFF; }
uint32_t ESP_getFlashSizeKB() { return ESP.getFlashChipSize()/1024; }
Expand Down
8 changes: 5 additions & 3 deletions src/ksf/comp/ksMqttConfigProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ namespace ksf::comps

const char MQTT_BROKER_ADDRESS_TEXT[] PROGMEM {"MQTT Address"};
const char MQTT_BROKER_PORT_TEXT[] PROGMEM {"MQTT Port"};
#ifdef ESP8266

#ifdef ESP8266
const auto MQTT_SSL_FP_LEN{40};
const char MQTT_BROKER_SSL_FINGERPRINT_TEXT[] PROGMEM {"MQTT SSL Fingerprint (SHA1)"};
#else
#else
const auto MQTT_SSL_FP_LEN{64};
const char MQTT_BROKER_SSL_FINGERPRINT_TEXT[] PROGMEM {"MQTT SSL Fingerprint (SHA256)"};
#endif
#endif

const char MQTT_BROKER_USER_TEXT[] PROGMEM {"MQTT Username"};
const char MQTT_BROKER_PASSWORD_TEXT[] PROGMEM {"MQTT Password"};
const char MQTT_BROKER_PREFIX_TEXT[] PROGMEM {"MQTT Topic Prefix"};
Expand Down

0 comments on commit a7aef5d

Please sign in to comment.