mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-23 11:16:45 +00:00
Add includes
This commit is contained in:
parent
74f1bccc9d
commit
7cb4ea601d
@ -2,6 +2,8 @@
|
|||||||
For full license information read the LICENSE file in the project folder */
|
For full license information read the LICENSE file in the project folder */
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include "StreamUtils.h" // For ReadBufferingStream
|
||||||
|
|
||||||
//#include "ArduinoLog.h"
|
//#include "ArduinoLog.h"
|
||||||
#include "hasplib.h"
|
#include "hasplib.h"
|
||||||
@ -653,6 +655,8 @@ void dispatch_parse_jsonl(const char*, const char* payload, uint8_t source)
|
|||||||
void dispatch_exec(const char*, const char* payload, uint8_t source)
|
void dispatch_exec(const char*, const char* payload, uint8_t source)
|
||||||
{
|
{
|
||||||
#if ARDUINO
|
#if ARDUINO
|
||||||
|
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
|
||||||
|
|
||||||
if(!HASP_FS.exists(payload)) {
|
if(!HASP_FS.exists(payload)) {
|
||||||
LOG_WARNING(TAG_MSGR, F(D_FILE_NOT_FOUND ": %s"), payload);
|
LOG_WARNING(TAG_MSGR, F(D_FILE_NOT_FOUND ": %s"), payload);
|
||||||
return;
|
return;
|
||||||
@ -693,6 +697,9 @@ void dispatch_exec(const char*, const char* payload, uint8_t source)
|
|||||||
|
|
||||||
cmdfile.close();
|
cmdfile.close();
|
||||||
LOG_INFO(TAG_MSGR, F(D_FILE_LOADED), payload);
|
LOG_INFO(TAG_MSGR, F(D_FILE_LOADED), payload);
|
||||||
|
#else
|
||||||
|
LOG_INFO(TAG_MSGR, F(D_FILE_LOAD_FAILED), payload);
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
char path[strlen(payload) + 4];
|
char path[strlen(payload) + 4];
|
||||||
path[0] = '.';
|
path[0] = '.';
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "hasplib.h"
|
#include "hasplib.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include "StreamUtils.h" // For EEPromStream
|
||||||
|
|
||||||
namespace hasp {
|
namespace hasp {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user