mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-28 04:07:47 +00:00
[ArduinoIDE] Make it compile again
Some small changes to make it compile again on Arduino IDE for esp8266 as well as esp32.
This commit is contained in:
@@ -4,3 +4,5 @@ sentence=Cron expression parsing in ANSI C
|
||||
paragraph=
|
||||
url=https://github.com/staticlibs/ccronexpr
|
||||
architectures=esp8266,esp32,esp32s2
|
||||
author=
|
||||
maintainer=
|
||||
|
||||
+17
-18
@@ -60,6 +60,23 @@
|
||||
# define P001_LP_MIN_INT PCONFIG_FLOAT(2)
|
||||
# define P001_SAFE_BTN PCONFIG_FLOAT(3)
|
||||
|
||||
// TD-er: Needed to fix a mistake in earlier fixes.
|
||||
uint8_t P001_getSwitchType(struct EventStruct *event) {
|
||||
uint8_t choice = PCONFIG(0);
|
||||
|
||||
switch (choice) {
|
||||
case 2: // Old implementation for Dimmer
|
||||
case PLUGIN_001_TYPE_DIMMER:
|
||||
choice = PLUGIN_001_TYPE_DIMMER;
|
||||
break;
|
||||
case 1: // Old implementation for switch
|
||||
case PLUGIN_001_TYPE_SWITCH:
|
||||
default:
|
||||
choice = PLUGIN_001_TYPE_SWITCH;
|
||||
break;
|
||||
}
|
||||
return choice;
|
||||
}
|
||||
|
||||
boolean Plugin_001(uint8_t function, struct EventStruct *event, String& string)
|
||||
{
|
||||
@@ -715,22 +732,4 @@ boolean Plugin_001(uint8_t function, struct EventStruct *event, String& string)
|
||||
return success;
|
||||
}
|
||||
|
||||
// TD-er: Needed to fix a mistake in earlier fixes.
|
||||
uint8_t P001_getSwitchType(struct EventStruct *event) {
|
||||
uint8_t choice = PCONFIG(0);
|
||||
|
||||
switch (choice) {
|
||||
case 2: // Old implementation for Dimmer
|
||||
case PLUGIN_001_TYPE_DIMMER:
|
||||
choice = PLUGIN_001_TYPE_DIMMER;
|
||||
break;
|
||||
case 1: // Old implementation for switch
|
||||
case PLUGIN_001_TYPE_SWITCH:
|
||||
default:
|
||||
choice = PLUGIN_001_TYPE_SWITCH;
|
||||
break;
|
||||
}
|
||||
return choice;
|
||||
}
|
||||
|
||||
#endif // USES_P001
|
||||
|
||||
@@ -9,8 +9,12 @@
|
||||
#include "../Helpers/StringGenerator_WiFi.h"
|
||||
#include "../../ESPEasy_common.h"
|
||||
|
||||
|
||||
|
||||
#if defined(ESP8266)
|
||||
# include <ESP8266WiFi.h>
|
||||
#endif // if defined(ESP8266)
|
||||
#if defined(ESP32)
|
||||
# include <WiFi.h>
|
||||
#endif // if defined(ESP32)
|
||||
|
||||
#define WIFI_AP_CANDIDATE_MAX_AGE 300000 // 5 minutes in msec
|
||||
|
||||
|
||||
@@ -19,6 +19,13 @@
|
||||
#include "../Helpers/StringConverter.h"
|
||||
|
||||
|
||||
#if defined(ESP8266)
|
||||
# include <ESP8266WiFi.h>
|
||||
#endif // if defined(ESP8266)
|
||||
#if defined(ESP32)
|
||||
# include <WiFi.h>
|
||||
#endif // if defined(ESP32)
|
||||
|
||||
// #include "../../ESPEasy-Globals.h"
|
||||
|
||||
#ifdef ESP32
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "../Helpers/StringGenerator_System.h"
|
||||
#include "../Helpers/ESPEasy_time_calc.h"
|
||||
|
||||
|
||||
/*********************************************************************************************\
|
||||
|
||||
@@ -31,6 +31,14 @@
|
||||
#include "../Helpers/StringProvider.h"
|
||||
|
||||
|
||||
#if defined(ESP8266)
|
||||
# include <ESP8266WiFi.h>
|
||||
#endif // if defined(ESP8266)
|
||||
#if defined(ESP32)
|
||||
# include <WiFi.h>
|
||||
#endif // if defined(ESP32)
|
||||
|
||||
|
||||
String getReplacementString(const String& format, String& s) {
|
||||
int startpos = s.indexOf(format);
|
||||
int endpos = s.indexOf('%', startpos + 1);
|
||||
|
||||
@@ -7,6 +7,13 @@
|
||||
#include "../Helpers/Misc.h"
|
||||
|
||||
|
||||
#if defined(ESP8266)
|
||||
# include <ESP8266WiFi.h>
|
||||
#endif // if defined(ESP8266)
|
||||
#if defined(ESP32)
|
||||
# include <WiFi.h>
|
||||
#endif // if defined(ESP32)
|
||||
|
||||
#define WIFI_CUSTOM_DEPLOYMENT_KEY_INDEX 3
|
||||
#define WIFI_CUSTOM_SUPPORT_KEY_INDEX 4
|
||||
#define WIFI_CREDENTIALS_FALLBACK_SSID_INDEX 5
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#ifdef WEBSERVER_DOWNLOAD
|
||||
|
||||
//#include "../WebServer/ESPEasy_WebServer.h"
|
||||
#include "../WebServer/ESPEasy_WebServer.h"
|
||||
#include "../Globals/ESPEasy_time.h"
|
||||
#include "../Globals/Settings.h"
|
||||
#include "../Helpers/ESPEasy_Storage.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "../Helpers/StringConverter.h"
|
||||
|
||||
#include "..//Globals/Settings.h"
|
||||
|
||||
// ********************************************************************************
|
||||
// HTML string re-use to keep the executable smaller
|
||||
|
||||
Reference in New Issue
Block a user