diff --git a/release/aqualinkd-arm64 b/release/aqualinkd-arm64 index d719d08..e6f8c59 100755 Binary files a/release/aqualinkd-arm64 and b/release/aqualinkd-arm64 differ diff --git a/release/aqualinkd-armhf b/release/aqualinkd-armhf index 782ddf8..9b1237b 100755 Binary files a/release/aqualinkd-armhf and b/release/aqualinkd-armhf differ diff --git a/source/aq_scheduler.c b/source/aq_scheduler.c index 74ed57d..6956d53 100644 --- a/source/aq_scheduler.c +++ b/source/aq_scheduler.c @@ -172,9 +172,12 @@ int save_schedules_js(const char* inBuf, int inSize, char* outBuf, int outSize) //fclose(fp); // if we created file, change the permissions - if (!fileexists) - if ( chmod(CRON_FILE, S_IRUSR | S_IWUSR ) < 0 ) + if (!fileexists) { + LOG(SCHD_LOG,LOG_NOTICE, "Created %s, setting permissions\n",CRON_FILE); + if ( chmod(CRON_FILE, S_IRUSR | S_IWUSR ) < 0 ) { LOG(SCHD_LOG,LOG_ERR, "Could not change permissions on cron file %s, scheduling may not work\n",CRON_FILE); + } + } //remount_root_ro(fs); aq_close_file(fp, fs); diff --git a/source/color_lights.c b/source/color_lights.c index 1b7d30f..cbc5080 100644 --- a/source/color_lights.c +++ b/source/color_lights.c @@ -446,6 +446,7 @@ const char* lightTypeName(clight_type type) return "unknown"; } +/* // Used for dynamic config JS int build_color_lights_js(struct aqualinkdata *aqdata, char* buffer, int size) { @@ -474,7 +475,8 @@ int build_color_lights_js(struct aqualinkdata *aqdata, char* buffer, int size) return length; } - +*/ +// Used for dynamic config JSON int build_color_lights_json(struct aqualinkdata *aqdata, char* buffer, int size) { memset(&buffer[0], 0, size); @@ -503,6 +505,13 @@ int build_color_lights_json(struct aqualinkdata *aqdata, char* buffer, int size) buffer[--length] = '\0'; length += sprintf(buffer+length, "}"); + length += sprintf(buffer+length, ",\"light_types\": {"); + for (i=0; i < NUMBER_LIGHT_COLOR_TYPES; i++) { + length += sprintf(buffer+length, "\"%d\": \"%s\",", i, lightTypeName(i)); + } + buffer[--length] = '\0'; + length += sprintf(buffer+length, "}"); + return length; } diff --git a/source/color_lights.h b/source/color_lights.h index 714c89c..7e7b4b2 100644 --- a/source/color_lights.h +++ b/source/color_lights.h @@ -34,7 +34,7 @@ typedef enum clight_type { //const char *light_mode_name(clight_type type, int index); const char *get_currentlight_mode_name(clight_detail light, emulation_type protocol); const char *light_mode_name(clight_type type, int index, emulation_type protocol); -int build_color_lights_js(struct aqualinkdata *aqdata, char* buffer, int size); +//int build_color_lights_js(struct aqualinkdata *aqdata, char* buffer, int size); int build_color_lights_json(struct aqualinkdata *aqdata, char* buffer, int size); int build_color_light_jsonarray(int index, char* buffer, int size); int dimmer_percent_to_mode_index(int value); diff --git a/source/json_messages.c b/source/json_messages.c index 4ebf964..0a8a679 100644 --- a/source/json_messages.c +++ b/source/json_messages.c @@ -1523,6 +1523,7 @@ int build_aqualink_config_JSON(char* buffer, int size, struct aqualinkdata *aqda } else if (isPLIGHT(aqdata->aqbuttons[i].special_mask)) { if (((clight_detail *)aqdata->aqbuttons[i].special_mask_ptr)->lightType >= 0) { sprintf(buf,"%s_lightMode", prefix); + //if ((result = json_cfg_element(buffer+length, size-length, buf, &((clight_detail *)aqdata->aqbuttons[i].special_mask_ptr)->lightType, CFG_INT, 0, "[\"\", \"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"10\",\"11\"]", 0)) <= 0) { if ((result = json_cfg_element(buffer+length, size-length, buf, &((clight_detail *)aqdata->aqbuttons[i].special_mask_ptr)->lightType, CFG_INT, 0, NULL, 0)) <= 0) { LOG(NET_LOG,LOG_ERR, "Config json buffer full in, result truncated! size=%d curently used=%d\n",size,length); return length; diff --git a/source/web_config.c b/source/web_config.c index 6dd3d61..02065ae 100644 --- a/source/web_config.c +++ b/source/web_config.c @@ -28,6 +28,7 @@ #define WEBCONFIGFILE "/config.json" void fprintf_json(FILE *fp,const char *json_string); +/* // This should be called dynamic web config, not webconfig to avoid confusion. int build_dynamic_webconfig_js(struct aqualinkdata *aqdata, char* buffer, int size) { @@ -40,6 +41,7 @@ int build_dynamic_webconfig_js(struct aqualinkdata *aqdata, char* buffer, int si return length; } +*/ int build_dynamic_webconfig_json(struct aqualinkdata *aqdata, char* buffer, int size) { diff --git a/source/web_config.h b/source/web_config.h index 6854661..f3c1e37 100644 --- a/source/web_config.h +++ b/source/web_config.h @@ -3,7 +3,7 @@ -int build_dynamic_webconfig_js(struct aqualinkdata *aqdata, char* buffer, int size); +//int build_dynamic_webconfig_js(struct aqualinkdata *aqdata, char* buffer, int size); int build_dynamic_webconfig_json(struct aqualinkdata *aqdata, char* buffer, int size); int save_web_config_json(const char* inBuf, int inSize, char* outBuf, int outSize, struct aqualinkdata *aqdata); diff --git a/web/index.html b/web/index.html index b34eddb..38276f1 100644 --- a/web/index.html +++ b/web/index.html @@ -256,8 +256,8 @@ padding: 5px; height: var(--tile-width); width: var(--tile-width); - filter: opacity(90%); - opacity: 0.9; + filter: opacity(95%); + opacity: 0.95; } .on { @@ -749,8 +749,6 @@ var _config = {}; var _dynamicconfig = {}; - - //'{"enable_schedules" : "false","light_programs": {"0":[], ' var _aq_display_tile_size = 'small';