mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-26 04:36:38 +00:00
Fix compiler errors for file.open
This commit is contained in:
parent
f72e3f3439
commit
e7fc913dd7
@ -1161,7 +1161,8 @@ void dispatch_service(const char*, const char* payload)
|
|||||||
|
|
||||||
void dispatch_exec(const char*, const char* payload)
|
void dispatch_exec(const char*, const char* payload)
|
||||||
{
|
{
|
||||||
File cmdfile = HASP_FS.open(payload, FILE_READ);
|
#if ARDUINO
|
||||||
|
File cmdfile = HASP_FS.open(payload, "r");
|
||||||
if(!cmdfile) return;
|
if(!cmdfile) return;
|
||||||
|
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
@ -1186,6 +1187,7 @@ void dispatch_exec(const char*, const char* payload)
|
|||||||
|
|
||||||
cmdfile.close();
|
cmdfile.close();
|
||||||
LOG_VERBOSE(TAG_MSGR, F("running %s complete"), payload);
|
LOG_VERBOSE(TAG_MSGR, F("running %s complete"), payload);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************* Commands builder *******************************************/
|
/******************************************* Commands builder *******************************************/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user