rebuilt HTTP request module

This commit is contained in:
strawmanbobi
2022-03-13 17:49:22 +08:00
parent eaa005904b
commit d815f4ad94
9 changed files with 188 additions and 122 deletions

View File

@@ -28,6 +28,7 @@
#include "IRbabyGlobal.h"
#include "IRbabySerial.h"
#include "IRbabyUserSettings.h"
#include "IRbabyIRIS.h"
#include "IRbabyHttp.h"
#include "IRbabyIR.h"
@@ -71,8 +72,10 @@ bool sendIR(String file_name) {
void sendStatus(String file, t_remote_ac_status status) {
String save_path = SAVE_PATH + file;
String url = String(DOWNLOAD_PREFIX) + file + String(DOWNLOAD_SUFFIX);
if (!LittleFS.exists(save_path)) {
downLoadFile(file, SAVE_PATH);
downLoadFile(url, file, SAVE_PATH);
}
if (LittleFS.exists(save_path)) {