updating scheduled tasks

This commit is contained in:
jakani24
2024-02-17 15:09:25 +01:00
parent f21276fd5c
commit 57cf07b679
19 changed files with 118 additions and 77 deletions

View File

@@ -5,6 +5,7 @@
#include "well_known.h"
#include "scan.h"
#include "app_ctrl.h"
#include "update.h"
void split(char* input,const char delimiter, char* out1, char* out2) {
//split a string at the delimiter. the delimiter only occurs once. so the first part is out1 and the second part is out2
int i = 0;
@@ -48,6 +49,11 @@ int start_thread(const char* command) {
std::thread t1(action_scanfolder, out2);
t1.detach();
}
else if (strcmp(out1, "update_settings") == 0) {
//start a new thread with the scanfolder function
std::thread t1(action_update_settings);
t1.detach();
}
while (can_run_thread()) {
//delay a bit, in order to wait until the thread is started