Skip to content

Commit 32f1aac

Browse files
committed
update
1 parent fd3c64b commit 32f1aac

7 files changed

+12
-5
lines changed

release/aqualinkd-amd64

562 KB
Binary file not shown.

release/aqualinkd-arm64

48 Bytes
Binary file not shown.

release/aqualinkd-armhf

4.04 KB
Binary file not shown.

release/serial_logger-amd64

72.4 KB
Binary file not shown.

source/allbutton.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ void _processMessage(char *message, struct aqualinkdata *aq_data, bool reset)
196196
//static int boost_msg_count = 0;
197197
static int16_t msg_loop = 0;
198198
static aqledstate default_frz_protect_state = OFF;
199+
static bool boostInLastLoop = false;
199200
// NSF replace message with msg
200201
#ifdef AQ_RS16
201202
int16_t rs16;
@@ -284,14 +285,15 @@ void _processMessage(char *message, struct aqualinkdata *aq_data, bool reset)
284285
}
285286
*/
286287
if ((msg_loop & MSG_BOOST) != MSG_BOOST) {
287-
if (aq_data->boost == true) {
288+
if (aq_data->boost == true || boostInLastLoop == true) {
288289
LOG(ALLB_LOG,LOG_INFO, "Boost turned off\n");
289290
event_happened_set_device_state(AQS_BOOST_OFF, aq_data);
290291
// Add code to check Pump if to turn it on (was scheduled) ie time now is inbetween ON / OFF schedule
291292
}
292293
aq_data->boost = false;
293294
aq_data->boost_msg[0] = '\0';
294295
aq_data->boost_duration = 0;
296+
boostInLastLoop = false;
295297
//if (aq_data->swg_percent >= 101)
296298
// aq_data->swg_percent = 0;
297299
}
@@ -578,6 +580,7 @@ void _processMessage(char *message, struct aqualinkdata *aq_data, bool reset)
578580
aq_data->boost = true;
579581
msg_loop |= MSG_BOOST;
580582
msg_loop |= MSG_SWG;
583+
boostInLastLoop = true;
581584
//convert_boost_to_duration(aq_data->boost_msg)
582585
//if (aq_data->ar_swg_status != SWG_STATUS_ON) {aq_data->ar_swg_status = SWG_STATUS_ON;}
583586
if (aq_data->swg_percent != 101) {changeSWGpercent(aq_data, 101);}

source/aq_scheduler.c

+7-3
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,9 @@ int build_schedules_js(char* buffer, int size)
258258
// Group 9 is URL
259259
// Group 10 is value
260260
if (groupArray[8].rm_so == (size_t)-1) {
261-
LOG(SCHD_LOG,LOG_ERR, "No matching information from cron file\n");
261+
if (size > 0) {
262+
LOG(SCHD_LOG,LOG_ERR, "No matching information from cron file\n");
263+
}
262264
} else {
263265
cline.enabled = (line[groupArray[1].rm_so] == '#')?false:true;
264266
sprintf(cline.minute, "%.*s", (groupArray[2].rm_eo - groupArray[2].rm_so), (line + groupArray[2].rm_so));
@@ -268,8 +270,8 @@ int build_schedules_js(char* buffer, int size)
268270
sprintf(cline.dayw, "%.*s", (groupArray[6].rm_eo - groupArray[6].rm_so), (line + groupArray[6].rm_so));
269271
sprintf(cline.url, "%.*s", (groupArray[9].rm_eo - groupArray[9].rm_so), (line + groupArray[9].rm_so));
270272
sprintf(cline.value, "%.*s", (groupArray[10].rm_eo - groupArray[10].rm_so), (line + groupArray[10].rm_so));
271-
LOG(SCHD_LOG,LOG_INFO, "Read from cron. Enabled:%d Min:%s Hour:%s DayM:%s Month:%s DayW:%s URL:%s Value:%s\n",cline.enabled,cline.minute,cline.hour,cline.daym,cline.month,cline.dayw,cline.url,cline.value);
272273
if (size > 0) {
274+
LOG(SCHD_LOG,LOG_INFO, "Read from cron. Enabled:%d Min:%s Hour:%s DayM:%s Month:%s DayW:%s URL:%s Value:%s\n",cline.enabled,cline.minute,cline.hour,cline.daym,cline.month,cline.dayw,cline.url,cline.value);
273275
length += sprintf(buffer+length, "{\"enabled\":\"%d\", \"min\":\"%s\",\"hour\":\"%s\",\"daym\":\"%s\",\"month\":\"%s\",\"dayw\":\"%s\",\"url\":\"%s\",\"value\":\"%s\"},",
274276
cline.enabled,
275277
cline.minute,
@@ -300,7 +302,9 @@ int build_schedules_js(char* buffer, int size)
300302
}
301303
}
302304
} else {
303-
LOG(SCHD_LOG,LOG_DEBUG, "regexp no match (%d) %s\n", rc, line);
305+
if (size > 0) {
306+
LOG(SCHD_LOG,LOG_DEBUG, "regexp no match (%d) %s", rc, line);
307+
}
304308
}
305309
}
306310

source/aq_scheduler.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ typedef struct aqs_cron
2626

2727
int build_schedules_js(char* buffer, int size);
2828
int save_schedules_js(const char* inBuf, int inSize, char* outBuf, int outSize);
29-
29+
void get_cron_pump_times();
3030

3131
#define AQS_PUMP_URL BTN_PUMP "/set"
3232

0 commit comments

Comments
 (0)