Rebuilt currentpage engine
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -12,6 +12,12 @@ Page blank
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
|
printh 92
|
||||||
|
prints "currentpage",0
|
||||||
|
printh 00
|
||||||
|
prints "blank",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
dim=100
|
dim=100
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "nspanelevent",0
|
||||||
|
|||||||
@@ -12,13 +12,19 @@ Page screensaver
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
|
printh 92
|
||||||
|
prints "currentpage",0
|
||||||
|
printh 00
|
||||||
|
prints "blank-screensaver",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
|
dim=0
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "nspanelevent",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"blank-screensaver\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"version\": \"2023.09.19\"}",0
|
prints "{\"page\": \"blank-screensaver\", \"component\": \"currentpage\", \"value\": \"pagechange\", \"version\": \"2023.09.19\"}",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
dim=0
|
|
||||||
|
|
||||||
Touch Press Event
|
Touch Press Event
|
||||||
page blank
|
page blank
|
||||||
|
|||||||
@@ -1108,15 +1108,17 @@ text_sensor:
|
|||||||
##### Current page name #####
|
##### Current page name #####
|
||||||
- name: ${device_name} Current page
|
- name: ${device_name} Current page
|
||||||
id: current_page
|
id: current_page
|
||||||
platform: template
|
#platform: template
|
||||||
#platform: nextion
|
platform: nextion
|
||||||
#nextion_id: disp1
|
nextion_id: disp1
|
||||||
#component_name: currentpage
|
component_name: currentpage
|
||||||
|
icon: mdi:tablet-dashboard
|
||||||
internal: false
|
internal: false
|
||||||
disabled_by_default: false
|
disabled_by_default: false
|
||||||
on_value:
|
on_value:
|
||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
|
// Reset globals
|
||||||
if (x != "climate" and x != "cover" and x != "fan" and x != "light" and x != "media_player" and x != "confirm" and x != "keyb_num") id(entity_id) = "";
|
if (x != "climate" and x != "cover" and x != "fan" and x != "light" and x != "media_player" and x != "confirm" and x != "keyb_num") id(entity_id) = "";
|
||||||
if (x != "media_player")
|
if (x != "media_player")
|
||||||
{
|
{
|
||||||
@@ -1124,10 +1126,108 @@ text_sensor:
|
|||||||
id(last_media_duration) = -1;
|
id(last_media_duration) = -1;
|
||||||
id(last_media_position) = -1;
|
id(last_media_position) = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Report new page to logs
|
||||||
ESP_LOGD("text_sensor.current_page", "New page: %s", x.c_str());
|
ESP_LOGD("text_sensor.current_page", "New page: %s", x.c_str());
|
||||||
if (!id(entity_id).empty()) ESP_LOGD("text_sensor.current_page", "Entity shown: %s", id(entity_id).c_str());
|
if (!id(entity_id).empty()) ESP_LOGD("text_sensor.current_page", "Entity shown: %s", id(entity_id).c_str());
|
||||||
|
|
||||||
|
// Reset timers
|
||||||
id(timer_reset_all).execute(x.c_str());
|
id(timer_reset_all).execute(x.c_str());
|
||||||
|
|
||||||
|
// Report new page to Home Assistant
|
||||||
|
ESP_LOGV("text_sensor.localevent", "Trigger HA event");
|
||||||
|
ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint",
|
||||||
|
{
|
||||||
|
{"type", "page_changed"},
|
||||||
|
{"page", x.c_str()},
|
||||||
|
{"entity", id(entity_id)}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Report new page to add-ons
|
||||||
|
ESP_LOGV("text_sensor.localevent", "Call add-ons scripts for new page");
|
||||||
|
id(addon_climate_set_climate).execute(page=="climate" and id(entity_id) == "embedded_climate");
|
||||||
|
|
||||||
|
// Construct new page
|
||||||
|
ESP_LOGV("text_sensor.localevent", "Construct new page");
|
||||||
|
if (x=="home")
|
||||||
|
{
|
||||||
|
ESP_LOGV("text_sensor.nspanelevent", "Construct home page");
|
||||||
|
id(update_page_home).execute();
|
||||||
|
}
|
||||||
|
else if (x=="screensaver")
|
||||||
|
{
|
||||||
|
ESP_LOGV("text_sensor.nspanelevent", "Construct screensaver page");
|
||||||
|
id(update_page_screensaver).execute();
|
||||||
|
}
|
||||||
|
else if (x=="climate")
|
||||||
|
{
|
||||||
|
ESP_LOGV("text_sensor.nspanelevent", "Construct climate page");
|
||||||
|
id(disp1).set_component_text_printf("climate.button01_icon", "%s", "\uEE8D"); //mdi:calendar-sync
|
||||||
|
id(disp1).set_component_text_printf("climate.button02_icon", "%s", "\uE069"); //mdi:autorenew
|
||||||
|
id(disp1).set_component_text_printf("climate.button03_icon", "%s", "\uE237"); //mdi:fire
|
||||||
|
id(disp1).set_component_text_printf("climate.button04_icon", "%s", "\uE716"); //mdi:snowflake
|
||||||
|
id(disp1).set_component_text_printf("climate.button05_icon", "%s", "\uE58D"); //mdi:water-percent
|
||||||
|
id(disp1).set_component_text_printf("climate.button06_icon", "%s", "\uE20F"); //mdi:fan
|
||||||
|
id(disp1).set_component_text_printf("climate.button07_icon", "%s", "\uE424"); //mdi:power
|
||||||
|
id(addon_climate_update_page_climate).execute();
|
||||||
|
}
|
||||||
|
else if (x=="cover") // To do: Should be moved to Blueprint
|
||||||
|
{
|
||||||
|
ESP_LOGV("text_sensor.nspanelevent", "Construct cover page");
|
||||||
|
id(disp1).set_component_text_printf("cover.cover_stop", "%s", "\uE666"); //mdi:stop-circle-outline
|
||||||
|
// In the future this will be dynamically contructed based on the device_class
|
||||||
|
id(disp1).set_component_text_printf("cover.cover_open", "%s", "\uF11D"); //mdi:window-shutter-open
|
||||||
|
id(disp1).set_component_text_printf("cover.cover_close", "%s", "\uF11B"); //mdi:window-shutter
|
||||||
|
}
|
||||||
|
else if (x=="fan") // To do: Should be moved to Blueprint
|
||||||
|
{
|
||||||
|
ESP_LOGV("text_sensor.nspanelevent", "Construct fan page");
|
||||||
|
id(disp1).set_component_text_printf("fan.button_on", "%s", "\uE20F"); //mdi:fan
|
||||||
|
id(disp1).set_component_text_printf("fan.button_off", "%s", "\uE81C"); //mdi:fan-off
|
||||||
|
id(disp1).set_component_text_printf("fan.button_up", "%s", "\uF46D"); //mdi:fan-chevron-up
|
||||||
|
id(disp1).set_component_text_printf("fan.button_down", "%s", "\uF46C"); //mdi:fan-chevron-down
|
||||||
|
}
|
||||||
|
else if (x=="keyb_num")
|
||||||
|
{
|
||||||
|
ESP_LOGV("text_sensor.nspanelevent", "Construct keyb_num page");
|
||||||
|
id(disp1).set_component_text_printf("keyb_num.bview", "%s", "\uE207"); //mdi:eye
|
||||||
|
id(disp1).set_component_text_printf("keyb_num.bclose", "%s", "\uE158"); //mdi:close-circle
|
||||||
|
id(disp1).set_component_text_printf("keyb_num.bclear", "%s", "\uE641"); //mdi:eraser-variant
|
||||||
|
id(disp1).set_component_text_printf("keyb_num.benter", "%s", "\uE12B"); //mdi:check
|
||||||
|
}
|
||||||
|
else if (x=="weather01") id(disp1).set_component_text_printf("page_index", "%s", "●○○○○"); // 1/5 // To do: Should be moved to Blueprint
|
||||||
|
else if (x=="weather02") id(disp1).set_component_text_printf("page_index", "%s", "○●○○○"); // 2/5 // To do: Should be moved to Blueprint
|
||||||
|
else if (x=="weather03") id(disp1).set_component_text_printf("page_index", "%s", "○○●○○"); // 3/5 // To do: Should be moved to Blueprint
|
||||||
|
else if (x=="weather04") id(disp1).set_component_text_printf("page_index", "%s", "○○○●○"); // 4/5 // To do: Should be moved to Blueprint
|
||||||
|
else if (x=="weather05") id(disp1).set_component_text_printf("page_index", "%s", "○○○○●"); // 5/5 // To do: Should be moved to Blueprint
|
||||||
|
else if (x=="buttonpage01" or x=="entitypage01") id(disp1).set_component_text_printf("page_index", "%s", "●○○○"); // 1/4 // To do: Should be moved to Blueprint
|
||||||
|
else if (x=="buttonpage02" or x=="entitypage02") id(disp1).set_component_text_printf("page_index", "%s", "○●○○"); // 2/4 // To do: Should be moved to Blueprint
|
||||||
|
else if (x=="buttonpage03" or x=="entitypage03") id(disp1).set_component_text_printf("page_index", "%s", "○○●○"); // 3/4 // To do: Should be moved to Blueprint
|
||||||
|
else if (x=="buttonpage04" or x=="entitypage04") id(disp1).set_component_text_printf("page_index", "%s", "○○○●"); // 4/4 // To do: Should be moved to Blueprint
|
||||||
|
else if (x=="settings") // To do: Add timers on TFT?
|
||||||
|
{
|
||||||
|
//id(disp1).set_component_text_printf("bt_sleep", "%s", (id(sleep_mode).state) ? "\uEA19" : "\uEA18"); //mdi:toggle-switch-outline or mdi:toggle-switch-off-outline
|
||||||
|
id(disp1).hide_component("lbl_sleep");
|
||||||
|
id(disp1).hide_component("bt_sleep");
|
||||||
|
}
|
||||||
|
else if (x=="notification")
|
||||||
|
{
|
||||||
|
id(disp1).set_component_text_printf("notification.notifi_label", "%s", id(notification_label).state.c_str());
|
||||||
|
id(display_wrapped_text).execute("notification.notifi_text01", id(notification_text).state.c_str(), id(display_mode) == 2 ? 23 : 32);
|
||||||
|
}
|
||||||
|
else if (x=="media_player") // To do: Should be moved to Blueprint
|
||||||
|
{
|
||||||
|
ESP_LOGV("text_sensor.nspanelevent", "Construct media_player page");
|
||||||
|
id(disp1).set_component_text_printf("bt_on_off", "%s", "\uE424"); //mdi:power
|
||||||
|
id(disp1).set_component_text_printf("bt_prev", "%s", "\uE4AD"); //mdi:skip-previous
|
||||||
|
id(disp1).set_component_text_printf("bt_next", "%s", "\uE4AC"); //mdi:skip-next
|
||||||
|
id(disp1).set_component_text_printf("bt_play_pause", "%s", "\uE40D"); //mdi:play-pause
|
||||||
|
//id(disp1).set_component_text_printf("bt_stop", "%s", "\uE4DA"); //mdi:stop
|
||||||
|
id(disp1).set_component_text_printf("bt_mute", "%s", "\uE75E"); //mdi:volume-mute
|
||||||
|
id(disp1).set_component_text_printf("bt_vol_down", "%s", "\uE75D"); //mdi:volume-minus
|
||||||
|
id(disp1).set_component_text_printf("bt_vol_up", "%s", "\uE75C"); //mdi:volume-plus
|
||||||
|
}
|
||||||
|
|
||||||
##### ESPhome version used to compile the app #####
|
##### ESPhome version used to compile the app #####
|
||||||
- name: ${device_name} ESPhome Version
|
- name: ${device_name} ESPhome Version
|
||||||
platform: version
|
platform: version
|
||||||
@@ -1168,7 +1268,7 @@ text_sensor:
|
|||||||
on_value:
|
on_value:
|
||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "Starting");
|
ESP_LOGE("text_sensor.nspanelevent", "Starting");
|
||||||
DynamicJsonDocument doc(1024);
|
DynamicJsonDocument doc(1024);
|
||||||
deserializeJson(doc, x);
|
deserializeJson(doc, x);
|
||||||
std::string page = doc["page"];
|
std::string page = doc["page"];
|
||||||
@@ -1176,10 +1276,10 @@ text_sensor:
|
|||||||
if (not (component == "currentpage" and (page == "screensaver" or page == "home"))) id(timer_reset_all).execute(page.c_str());
|
if (not (component == "currentpage" and (page == "screensaver" or page == "home"))) id(timer_reset_all).execute(page.c_str());
|
||||||
std::string value = doc["value"];
|
std::string value = doc["value"];
|
||||||
std::string entity = id(entity_id); //doc["entity"];
|
std::string entity = id(entity_id); //doc["entity"];
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "page: %s", page.c_str());
|
ESP_LOGE("text_sensor.nspanelevent", "page: %s", page.c_str());
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "component: %s", component.c_str());
|
ESP_LOGE("text_sensor.nspanelevent", "component: %s", component.c_str());
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "value: %s", value.c_str());
|
ESP_LOGE("text_sensor.nspanelevent", "value: %s", value.c_str());
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "entity: %s", entity.c_str());
|
ESP_LOGE("text_sensor.nspanelevent", "entity: %s", entity.c_str());
|
||||||
auto ha_event = new esphome::api::CustomAPIDevice();
|
auto ha_event = new esphome::api::CustomAPIDevice();
|
||||||
ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint",
|
ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint",
|
||||||
{
|
{
|
||||||
@@ -1189,100 +1289,6 @@ text_sensor:
|
|||||||
{"value", value},
|
{"value", value},
|
||||||
{"entity", entity}
|
{"entity", entity}
|
||||||
});
|
});
|
||||||
if (component=="currentpage")
|
|
||||||
{
|
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "New page: %s", page.c_str());
|
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "Trigger HA event");
|
|
||||||
ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint",
|
|
||||||
{
|
|
||||||
{"type", "page_changed"},
|
|
||||||
{"page", page},
|
|
||||||
{"entity", entity}
|
|
||||||
});
|
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "Call add-ons scripts for new page");
|
|
||||||
id(addon_climate_set_climate).execute(page=="climate" and entity == "embedded_climate");
|
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "Publish current_page sensor");
|
|
||||||
id(current_page).publish_state(page);
|
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "Construct new page");
|
|
||||||
if (page=="home")
|
|
||||||
{
|
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "Construct home page");
|
|
||||||
id(update_page_home).execute();
|
|
||||||
}
|
|
||||||
else if (page=="screensaver")
|
|
||||||
{
|
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "Construct screensaver page");
|
|
||||||
id(update_page_screensaver).execute();
|
|
||||||
}
|
|
||||||
else if (page=="climate")
|
|
||||||
{
|
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "Construct climate page");
|
|
||||||
id(disp1).set_component_text_printf("climate.button01_icon", "%s", "\uEE8D"); //mdi:calendar-sync
|
|
||||||
id(disp1).set_component_text_printf("climate.button02_icon", "%s", "\uE069"); //mdi:autorenew
|
|
||||||
id(disp1).set_component_text_printf("climate.button03_icon", "%s", "\uE237"); //mdi:fire
|
|
||||||
id(disp1).set_component_text_printf("climate.button04_icon", "%s", "\uE716"); //mdi:snowflake
|
|
||||||
id(disp1).set_component_text_printf("climate.button05_icon", "%s", "\uE58D"); //mdi:water-percent
|
|
||||||
id(disp1).set_component_text_printf("climate.button06_icon", "%s", "\uE20F"); //mdi:fan
|
|
||||||
id(disp1).set_component_text_printf("climate.button07_icon", "%s", "\uE424"); //mdi:power
|
|
||||||
id(addon_climate_update_page_climate).execute();
|
|
||||||
}
|
|
||||||
else if (page=="cover")
|
|
||||||
{
|
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "Construct cover page");
|
|
||||||
id(disp1).set_component_text_printf("cover.cover_stop", "%s", "\uE666"); //mdi:stop-circle-outline
|
|
||||||
// In the future this will be dynamically contructed based on the device_class
|
|
||||||
id(disp1).set_component_text_printf("cover.cover_open", "%s", "\uF11D"); //mdi:window-shutter-open
|
|
||||||
id(disp1).set_component_text_printf("cover.cover_close", "%s", "\uF11B"); //mdi:window-shutter
|
|
||||||
}
|
|
||||||
else if (page=="fan")
|
|
||||||
{
|
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "Construct fan page");
|
|
||||||
id(disp1).set_component_text_printf("fan.button_on", "%s", "\uE20F"); //mdi:fan
|
|
||||||
id(disp1).set_component_text_printf("fan.button_off", "%s", "\uE81C"); //mdi:fan-off
|
|
||||||
id(disp1).set_component_text_printf("fan.button_up", "%s", "\uF46D"); //mdi:fan-chevron-up
|
|
||||||
id(disp1).set_component_text_printf("fan.button_down", "%s", "\uF46C"); //mdi:fan-chevron-down
|
|
||||||
}
|
|
||||||
else if (page=="keyb_num")
|
|
||||||
{
|
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "Construct keyb_num page");
|
|
||||||
id(disp1).set_component_text_printf("keyb_num.bview", "%s", "\uE207"); //mdi:eye
|
|
||||||
id(disp1).set_component_text_printf("keyb_num.bclose", "%s", "\uE158"); //mdi:close-circle
|
|
||||||
id(disp1).set_component_text_printf("keyb_num.bclear", "%s", "\uE641"); //mdi:eraser-variant
|
|
||||||
id(disp1).set_component_text_printf("keyb_num.benter", "%s", "\uE12B"); //mdi:check
|
|
||||||
}
|
|
||||||
else if (page=="weather01") id(disp1).set_component_text_printf("page_index", "%s", "●○○○○"); // 1/5
|
|
||||||
else if (page=="weather02") id(disp1).set_component_text_printf("page_index", "%s", "○●○○○"); // 2/5
|
|
||||||
else if (page=="weather03") id(disp1).set_component_text_printf("page_index", "%s", "○○●○○"); // 3/5
|
|
||||||
else if (page=="weather04") id(disp1).set_component_text_printf("page_index", "%s", "○○○●○"); // 4/5
|
|
||||||
else if (page=="weather05") id(disp1).set_component_text_printf("page_index", "%s", "○○○○●"); // 5/5
|
|
||||||
else if (page=="buttonpage01" or page=="entitypage01") id(disp1).set_component_text_printf("page_index", "%s", "●○○○"); // 1/4
|
|
||||||
else if (page=="buttonpage02" or page=="entitypage02") id(disp1).set_component_text_printf("page_index", "%s", "○●○○"); // 2/4
|
|
||||||
else if (page=="buttonpage03" or page=="entitypage03") id(disp1).set_component_text_printf("page_index", "%s", "○○●○"); // 3/4
|
|
||||||
else if (page=="buttonpage04" or page=="entitypage04") id(disp1).set_component_text_printf("page_index", "%s", "○○○●"); // 4/4
|
|
||||||
else if (page=="settings")
|
|
||||||
{
|
|
||||||
//id(disp1).set_component_text_printf("bt_sleep", "%s", (id(sleep_mode).state) ? "\uEA19" : "\uEA18"); //mdi:toggle-switch-outline or mdi:toggle-switch-off-outline
|
|
||||||
id(disp1).hide_component("lbl_sleep");
|
|
||||||
id(disp1).hide_component("bt_sleep");
|
|
||||||
}
|
|
||||||
else if (page=="notification")
|
|
||||||
{
|
|
||||||
id(disp1).set_component_text_printf("notification.notifi_label", "%s", id(notification_label).state.c_str());
|
|
||||||
id(display_wrapped_text).execute("notification.notifi_text01", id(notification_text).state.c_str(), id(display_mode) == 2 ? 23 : 32);
|
|
||||||
}
|
|
||||||
else if (page=="media_player")
|
|
||||||
{
|
|
||||||
ESP_LOGV("text_sensor.nspanelevent", "Construct media_player page");
|
|
||||||
id(disp1).set_component_text_printf("bt_on_off", "%s", "\uE424"); //mdi:power
|
|
||||||
id(disp1).set_component_text_printf("bt_prev", "%s", "\uE4AD"); //mdi:skip-previous
|
|
||||||
id(disp1).set_component_text_printf("bt_next", "%s", "\uE4AC"); //mdi:skip-next
|
|
||||||
id(disp1).set_component_text_printf("bt_play_pause", "%s", "\uE40D"); //mdi:play-pause
|
|
||||||
//id(disp1).set_component_text_printf("bt_stop", "%s", "\uE4DA"); //mdi:stop
|
|
||||||
id(disp1).set_component_text_printf("bt_mute", "%s", "\uE75E"); //mdi:volume-mute
|
|
||||||
id(disp1).set_component_text_printf("bt_vol_down", "%s", "\uE75D"); //mdi:volume-minus
|
|
||||||
id(disp1).set_component_text_printf("bt_vol_up", "%s", "\uE75C"); //mdi:volume-plus
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
##### NSPanel event - Execute actions from ESPHome - NO push to HA #####
|
##### NSPanel event - Execute actions from ESPHome - NO push to HA #####
|
||||||
- name: ${device_name} NSPanel local event
|
- name: ${device_name} NSPanel local event
|
||||||
@@ -1303,7 +1309,6 @@ text_sensor:
|
|||||||
deserializeJson(doc, x);
|
deserializeJson(doc, x);
|
||||||
std::string page = doc["page"];
|
std::string page = doc["page"];
|
||||||
std::string event = doc["event"];
|
std::string event = doc["event"];
|
||||||
if (not (event == "pagechanged" and (page == "screensaver" or page == "home"))) id(timer_reset_all).execute(page.c_str());
|
|
||||||
std::string component = doc["component"];
|
std::string component = doc["component"];
|
||||||
std::string key = doc["key"];
|
std::string key = doc["key"];
|
||||||
std::string value = doc["value"];
|
std::string value = doc["value"];
|
||||||
@@ -1313,23 +1318,7 @@ text_sensor:
|
|||||||
|
|
||||||
// send event to Home Assistant
|
// send event to Home Assistant
|
||||||
auto ha_event = new esphome::api::CustomAPIDevice();
|
auto ha_event = new esphome::api::CustomAPIDevice();
|
||||||
if (event=="pagechanged")
|
if (event=="short_click" or event=="long_click") id(ha_button).execute(page.c_str(), component.c_str(), event.c_str());
|
||||||
{
|
|
||||||
ESP_LOGV("text_sensor.localevent", "New page: %s", page.c_str());
|
|
||||||
ESP_LOGV("text_sensor.localevent", "Trigger HA event");
|
|
||||||
ha_event->fire_homeassistant_event("esphome.nspanel_ha_blueprint",
|
|
||||||
{
|
|
||||||
{"type", "page_changed"},
|
|
||||||
{"page", page},
|
|
||||||
{"entity", entity}
|
|
||||||
});
|
|
||||||
ESP_LOGV("text_sensor.localevent", "Call add-ons scripts for new page");
|
|
||||||
id(addon_climate_set_climate).execute(page=="climate" and id(entity_id) == "embedded_climate");
|
|
||||||
ESP_LOGV("text_sensor.localevent", "Publish current_page sensor");
|
|
||||||
id(current_page).publish_state(page);
|
|
||||||
ESP_LOGV("text_sensor.localevent", "Construct new page");
|
|
||||||
}
|
|
||||||
else if (event=="short_click" or event=="long_click") id(ha_button).execute(page.c_str(), component.c_str(), event.c_str());
|
|
||||||
else if (event=="click")
|
else if (event=="click")
|
||||||
{
|
{
|
||||||
if (page == "home" and component == "climate")
|
if (page == "home" and component == "climate")
|
||||||
|
|||||||
BIN
nspanel_eu.HMI
BIN
nspanel_eu.HMI
Binary file not shown.
BIN
nspanel_eu.tft
BIN
nspanel_eu.tft
Binary file not shown.
@@ -18,9 +18,9 @@ Page alarm
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"alarm\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "alarm",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis bt_home,0
|
vis bt_home,0
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ Page boot
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
|
printh 92
|
||||||
|
prints "currentpage",0
|
||||||
|
printh 00
|
||||||
|
prints "boot",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
dim=0
|
dim=0
|
||||||
vis bt_reboot,0
|
vis bt_reboot,0
|
||||||
covx display_mode,aux2.txt,0,0
|
covx display_mode,aux2.txt,0,0
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page buttonpage01
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"buttonpage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "buttonpage01",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis 255,0
|
vis 255,0
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page buttonpage02
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"buttonpage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "buttonpage02",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis 255,0
|
vis 255,0
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page buttonpage03
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"buttonpage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "buttonpage03",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis 255,0
|
vis 255,0
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page buttonpage04
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"buttonpage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "buttonpage04",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis 255,0
|
vis 255,0
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ Page climate
|
|||||||
if(api==1||embedded.val==1)
|
if(api==1||embedded.val==1)
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "climate",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis target_icon,0
|
vis target_icon,0
|
||||||
|
|||||||
@@ -1,689 +0,0 @@
|
|||||||
Page climate_backup
|
|
||||||
Attributes
|
|
||||||
ID : 0
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Locked : no
|
|
||||||
Swide up page ID : disabled
|
|
||||||
Swide down page ID : disabled
|
|
||||||
Swide left page ID : disabled
|
|
||||||
Swide right page ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Preinitialize Event
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Press Event
|
|
||||||
printh 92
|
|
||||||
prints "touchevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"press\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
printh 92
|
|
||||||
prints "touchevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"climate\", \"component\": \"touchevent\", \"value\": \"release\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Variable (int32) climateslider
|
|
||||||
Attributes
|
|
||||||
ID : 7
|
|
||||||
Scope: local
|
|
||||||
Value: 0
|
|
||||||
|
|
||||||
Variable (int32) va0
|
|
||||||
Attributes
|
|
||||||
ID : 21
|
|
||||||
Scope: local
|
|
||||||
Value: 0
|
|
||||||
|
|
||||||
Variable (string) climatesetting
|
|
||||||
Attributes
|
|
||||||
ID : 24
|
|
||||||
Scope : local
|
|
||||||
Text :
|
|
||||||
Max. Text Size: 100
|
|
||||||
|
|
||||||
Number sliderval
|
|
||||||
Attributes
|
|
||||||
ID : 22
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Value : 0
|
|
||||||
|
|
||||||
Text current_temp
|
|
||||||
Attributes
|
|
||||||
ID : 8
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 6
|
|
||||||
|
|
||||||
Text target_temp
|
|
||||||
Attributes
|
|
||||||
ID : 9
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 6
|
|
||||||
|
|
||||||
Text outdoor_temp
|
|
||||||
Attributes
|
|
||||||
ID : 10
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 6
|
|
||||||
|
|
||||||
Text hotwater_temp
|
|
||||||
Attributes
|
|
||||||
ID : 11
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 6
|
|
||||||
|
|
||||||
Text heating_state
|
|
||||||
Attributes
|
|
||||||
ID : 16
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 20
|
|
||||||
|
|
||||||
Text climate_label
|
|
||||||
Attributes
|
|
||||||
ID : 23
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 30
|
|
||||||
|
|
||||||
Picture climate_left
|
|
||||||
Attributes
|
|
||||||
ID : 3
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: on press and release
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
slider.en=1
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
slider.en=0
|
|
||||||
|
|
||||||
Picture climate_middle
|
|
||||||
Attributes
|
|
||||||
ID : 4
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: on press and release
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
slider.en=1
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
slider.en=0
|
|
||||||
|
|
||||||
Picture climate_right
|
|
||||||
Attributes
|
|
||||||
ID : 5
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: on press and release
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
slider.en=1
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
slider.en=0
|
|
||||||
|
|
||||||
Picture climate_exit
|
|
||||||
Attributes
|
|
||||||
ID : 14
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Picture hotw_bt_pic
|
|
||||||
Attributes
|
|
||||||
ID : 17
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Picture heating_bt_pic
|
|
||||||
Attributes
|
|
||||||
ID : 19
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Hotspot decrease_temp
|
|
||||||
Attributes
|
|
||||||
ID : 12
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"decreasetemp\", \"value\": \"press\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"decreasetemp\", \"value\": \"release\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Hotspot increase_temp
|
|
||||||
Attributes
|
|
||||||
ID : 13
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"increasetemp\", \"value\": \"press\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"increasetemp\", \"value\": \"release\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Hotspot climate_back
|
|
||||||
Attributes
|
|
||||||
ID : 15
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"close\", \"value\": \"press\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"close\", \"value\": \"release\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Hotspot hotwater_bt
|
|
||||||
Attributes
|
|
||||||
ID : 18
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"hotwater\", \"value\": \"press\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"hotwater\", \"value\": \"release\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Hotspot heating_bt
|
|
||||||
Attributes
|
|
||||||
ID : 20
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"heating\", \"value\": \"press\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"heating\", \"value\": \"release\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Timer swipestore
|
|
||||||
Attributes
|
|
||||||
ID : 2
|
|
||||||
Scope : local
|
|
||||||
Period (ms): 50
|
|
||||||
Enabled : no
|
|
||||||
|
|
||||||
Events
|
|
||||||
Timer Event
|
|
||||||
swipex=tch0
|
|
||||||
swipey=tch1
|
|
||||||
|
|
||||||
Timer slider
|
|
||||||
Attributes
|
|
||||||
ID : 6
|
|
||||||
Scope : local
|
|
||||||
Period (ms): 50
|
|
||||||
Enabled : no
|
|
||||||
|
|
||||||
Events
|
|
||||||
Timer Event
|
|
||||||
// Left hand images vertical
|
|
||||||
if(tch0>=111&&tch0<169) // Left Hand images L/R coords
|
|
||||||
{
|
|
||||||
if(tch1>221&&tch1<=235) // step 0
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider0"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 0}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>206&&tch1<=221) // step 1
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider1"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 1}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>192&&tch1<=206) // step 2
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider2"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 2}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>177&&tch1<=192) // step 3
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider3"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 3}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>162&&tch1<=177) // step 4
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider4"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 4}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>148&&tch1<=162) // step 5 up
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider5"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 5}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>133&&tch1<=148) // step 6 up
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider6"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 6}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>119&&tch1<=133) // step 7 up
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider7"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 7}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>105&&tch1<=119) // step 8 up
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider8"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 8}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>90&&tch1<=105) // step 9 up
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider9"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 9}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>70&&tch1<=90) // step 10 up
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider10"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 10}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>60&&tch1<=70) // step 11 up
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider11"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 11}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}
|
|
||||||
// middle images horizontal
|
|
||||||
}else if(tch1>=35&&tch1<=80) // middle image U/D coords
|
|
||||||
{
|
|
||||||
if(tch0>169&&tch0<=188) // step 12 across
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider12"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 12}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch0>188&&tch0<=207) // step 13
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider13"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 13}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch0>207&&tch0<=226) // step 14
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider14"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 14}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch0>226&&tch0<=245) // step 15
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider15"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 15}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch0>245&&tch0<=264) // step 16
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider16"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 16}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch0>264&&tch0<=283) // step 17
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider17"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 17}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}
|
|
||||||
// right hand images vertical
|
|
||||||
}else if(tch0>=283&&tch0<=341) // right image L/R coords
|
|
||||||
{
|
|
||||||
if(tch1>60&&tch1<=80) // step 18 across
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider18"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 18}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>80&&tch1<=94) // step 19
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider19"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 19}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>94&&tch1<=109) // step 20
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider20"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 20}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>109&&tch1<=123) // step 21
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider21"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 21}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>123&&tch1<=138) // step 22
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider22"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 22}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>138&&tch1<=152) // step 23
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider23"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 23}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>152&&tch1<=167) // step 24
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider24"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 24}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>167&&tch1<=181) // step 25
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider25"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 25}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>181&&tch1<=197) // step 26
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider26"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 26}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>197&&tch1<=215) // step 27
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider27"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 27}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}else if(tch1>215&&tch1<=235) // step 28
|
|
||||||
{
|
|
||||||
// climatesetting.txt="climateslider28"
|
|
||||||
climatesetting.txt="{\"page\": \"climate\", \"component\": \"climateslider\", \"value\": 28}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints climatesetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// pass climateslider.val
|
|
||||||
|
|
||||||
TouchCap swipe
|
|
||||||
Attributes
|
|
||||||
ID : 1
|
|
||||||
Scope: local
|
|
||||||
Value: 0
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
swipestore.en=1 // Start swipestore timer
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
swipestore.en=0
|
|
||||||
// Touch has ended, x
|
|
||||||
if(tch0==0)
|
|
||||||
{
|
|
||||||
swipec=swipex-tch2
|
|
||||||
// From Left to Right
|
|
||||||
if(swipec>swipedx)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
// Right to Left
|
|
||||||
swipec2=0-swipedx
|
|
||||||
if(swipec<swipec2)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Touch has ended, y
|
|
||||||
if(tch1==0)
|
|
||||||
{
|
|
||||||
swipec=swipey-tch3
|
|
||||||
// From Up to Down
|
|
||||||
if(swipec>100)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
// Down to Up
|
|
||||||
swipec2=0-swipedy
|
|
||||||
if(swipec<-100)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -18,9 +18,9 @@ Page confirm
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"confirm\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "confirm",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page cover
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "cover",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,273 +0,0 @@
|
|||||||
Page coversettings
|
|
||||||
Attributes
|
|
||||||
ID : 0
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Locked : no
|
|
||||||
Swide up page ID : disabled
|
|
||||||
Swide down page ID : disabled
|
|
||||||
Swide left page ID : disabled
|
|
||||||
Swide right page ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Preinitialize Event
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"coversettings\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Press Event
|
|
||||||
printh 92
|
|
||||||
prints "touchevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"coversettings\", \"component\": \"touchevent\", \"value\": \"press\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
printh 92
|
|
||||||
prints "touchevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"coversettings\", \"component\": \"touchevent\", \"value\": \"release\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Variable (string) va1
|
|
||||||
Attributes
|
|
||||||
ID : 9
|
|
||||||
Scope : local
|
|
||||||
Text : newtxt
|
|
||||||
Max. Text Size: 10
|
|
||||||
|
|
||||||
Variable (string) coversetting
|
|
||||||
Attributes
|
|
||||||
ID : 15
|
|
||||||
Scope : local
|
|
||||||
Text :
|
|
||||||
Max. Text Size: 100
|
|
||||||
|
|
||||||
Text battery_value
|
|
||||||
Attributes
|
|
||||||
ID : 1
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Text cover_value
|
|
||||||
Attributes
|
|
||||||
ID : 2
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Text cover_name
|
|
||||||
Attributes
|
|
||||||
ID : 3
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 25
|
|
||||||
|
|
||||||
Text icon_state
|
|
||||||
Attributes
|
|
||||||
ID : 13
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Text battery_icon
|
|
||||||
Attributes
|
|
||||||
ID : 14
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Picture cover_exit
|
|
||||||
Attributes
|
|
||||||
ID : 11
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Slider coverslider
|
|
||||||
Attributes
|
|
||||||
ID : 6
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
Position : 0
|
|
||||||
Upper range limit: 100
|
|
||||||
Lower range limit: 0
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Release Event
|
|
||||||
covx coverslider.val,va1.txt,0,0
|
|
||||||
cover_value.txt=va1.txt+"%"
|
|
||||||
coversetting.txt="{\"page\": \"coversettings\", \"component\": \"cover_position\", \"value\": "+va1.txt+"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints coversetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Button cover_open
|
|
||||||
Attributes
|
|
||||||
ID : 4
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
State : unpressed
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
coversetting.txt="{\"page\": \"coversettings\", \"component\": \"open_cover\", \"value\": \"press\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints coversetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Button cover_close
|
|
||||||
Attributes
|
|
||||||
ID : 5
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
State : unpressed
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
coversetting.txt="{\"page\": \"coversettings\", \"component\": \"close_cover\", \"value\": \"press\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints coversetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Button cover_stop
|
|
||||||
Attributes
|
|
||||||
ID : 10
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
State : unpressed
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
coversetting.txt="{\"page\": \"coversettings\", \"component\": \"stop_cover\", \"value\": \"press\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints coversetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Hotspot cover_back
|
|
||||||
Attributes
|
|
||||||
ID : 12
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
coversetting.txt="{\"page\": \"coversettings\", \"component\": \"close\", \"value\": \"press\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints coversetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
coversetting.txt="{\"page\": \"coversettings\", \"component\": \"close\", \"value\": \"release\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints coversetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Timer swipestore
|
|
||||||
Attributes
|
|
||||||
ID : 8
|
|
||||||
Scope : local
|
|
||||||
Period (ms): 50
|
|
||||||
Enabled : no
|
|
||||||
|
|
||||||
Events
|
|
||||||
Timer Event
|
|
||||||
swipex=tch0
|
|
||||||
swipey=tch1
|
|
||||||
|
|
||||||
TouchCap swipe
|
|
||||||
Attributes
|
|
||||||
ID : 7
|
|
||||||
Scope: local
|
|
||||||
Value: 0
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
swipestore.en=1 // Start swipestore timer
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
swipestore.en=0
|
|
||||||
// Touch has ended, x
|
|
||||||
if(tch0==0)
|
|
||||||
{
|
|
||||||
swipec=swipex-tch2
|
|
||||||
// From Left to Right
|
|
||||||
if(swipec>swipedx)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
// Right to Left
|
|
||||||
swipec2=0-swipedx
|
|
||||||
if(swipec<swipec2)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Touch has ended, y
|
|
||||||
if(tch1==0)
|
|
||||||
{
|
|
||||||
swipec=swipey-tch3
|
|
||||||
// From Up to Down
|
|
||||||
if(swipec>100)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
// Down to Up
|
|
||||||
swipec2=0-swipedy
|
|
||||||
if(swipec<-100)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -18,9 +18,9 @@ Page entitypage01
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"entitypage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "entitypage01",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,16 +12,15 @@ Page entitypage02
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
dim=brightness
|
|
||||||
if(api==0)
|
if(api==0)
|
||||||
{
|
{
|
||||||
page home
|
page home
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"entitypage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "entitypage02",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page entitypage03
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"entitypage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "entitypage03",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page entitypage04
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"entitypage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "entitypage04",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page fan
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "fan",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ Page home
|
|||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"home\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "home",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis bt_notific,is_notification
|
vis bt_notific,is_notification
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page keyb_num
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"keyb_num\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "keyb_num",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page light
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "light",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis light_b_press,1
|
vis light_b_press,1
|
||||||
|
|||||||
@@ -1,674 +0,0 @@
|
|||||||
Page lightsettings
|
|
||||||
Attributes
|
|
||||||
ID : 0
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Locked : no
|
|
||||||
Swide up page ID : disabled
|
|
||||||
Swide down page ID : disabled
|
|
||||||
Swide left page ID : disabled
|
|
||||||
Swide right page ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Preinitialize Event
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"lightsettings\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
vis light_b_press,1
|
|
||||||
vis lightslider,1
|
|
||||||
vis light_value,1
|
|
||||||
vis temp_value_2,1
|
|
||||||
// #### OFF Button #####
|
|
||||||
vis temp_b_press,0
|
|
||||||
vis color_b_pres,0
|
|
||||||
// #### OFF Value #####
|
|
||||||
vis temp_value,0
|
|
||||||
vis light_value_2,0
|
|
||||||
// #### OFF Slider #####
|
|
||||||
vis tempslider,0
|
|
||||||
vis colorwheel,0
|
|
||||||
|
|
||||||
Touch Press Event
|
|
||||||
printh 92
|
|
||||||
prints "touchevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"lightsettings\", \"component\": \"touchevent\", \"value\": \"press\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
printh 92
|
|
||||||
prints "touchevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"lightsettings\", \"component\": \"touchevent\", \"value\": \"release\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Variable (int32) rgb565
|
|
||||||
Attributes
|
|
||||||
ID : 22
|
|
||||||
Scope: local
|
|
||||||
Value: 0
|
|
||||||
|
|
||||||
Variable (string) va1
|
|
||||||
Attributes
|
|
||||||
ID : 23
|
|
||||||
Scope : local
|
|
||||||
Text : newtxt
|
|
||||||
Max. Text Size: 20
|
|
||||||
|
|
||||||
Variable (string) va2
|
|
||||||
Attributes
|
|
||||||
ID : 24
|
|
||||||
Scope : local
|
|
||||||
Text : newtxt
|
|
||||||
Max. Text Size: 10
|
|
||||||
|
|
||||||
Variable (string) va3
|
|
||||||
Attributes
|
|
||||||
ID : 25
|
|
||||||
Scope : local
|
|
||||||
Text : newtxt
|
|
||||||
Max. Text Size: 10
|
|
||||||
|
|
||||||
Variable (int32) currenttab
|
|
||||||
Attributes
|
|
||||||
ID : 26
|
|
||||||
Scope: local
|
|
||||||
Value: 0
|
|
||||||
|
|
||||||
Variable (string) lightsetting
|
|
||||||
Attributes
|
|
||||||
ID : 32
|
|
||||||
Scope : local
|
|
||||||
Text :
|
|
||||||
Max. Text Size: 100
|
|
||||||
|
|
||||||
Number ring
|
|
||||||
Attributes
|
|
||||||
ID : 4
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Value : 0
|
|
||||||
|
|
||||||
Number field
|
|
||||||
Attributes
|
|
||||||
ID : 5
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Value : 0
|
|
||||||
|
|
||||||
Text light_value
|
|
||||||
Attributes
|
|
||||||
ID : 1
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Text light_name
|
|
||||||
Attributes
|
|
||||||
ID : 2
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 25
|
|
||||||
|
|
||||||
Text temp_value
|
|
||||||
Attributes
|
|
||||||
ID : 14
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Text light_value_2
|
|
||||||
Attributes
|
|
||||||
ID : 27
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Text temp_value_2
|
|
||||||
Attributes
|
|
||||||
ID : 28
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Text icon_state
|
|
||||||
Attributes
|
|
||||||
ID : 31
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Picture light_button
|
|
||||||
Attributes
|
|
||||||
ID : 8
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Picture color_button
|
|
||||||
Attributes
|
|
||||||
ID : 9
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Picture temp_button
|
|
||||||
Attributes
|
|
||||||
ID : 10
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Picture light_b_press
|
|
||||||
Attributes
|
|
||||||
ID : 11
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Picture temp_b_press
|
|
||||||
Attributes
|
|
||||||
ID : 12
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Picture color_b_pres
|
|
||||||
Attributes
|
|
||||||
ID : 13
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Picture colorwheel
|
|
||||||
Attributes
|
|
||||||
ID : 16
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
// Circular Color Picker for Nextion (c) Max Zuidberg 2022
|
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
//
|
|
||||||
// Put this code in the touch press or release
|
|
||||||
// event of the pic component with the color wheel.
|
|
||||||
// Requires the two variables field.val and ring.val
|
|
||||||
//
|
|
||||||
// sya0 = x, sya1 = sya1
|
|
||||||
// Note the usage of the hidden sya0, sya1 variables
|
|
||||||
// within event code as local, temporary variable is fine.
|
|
||||||
sya0=tch0
|
|
||||||
sya1=tch1
|
|
||||||
//
|
|
||||||
// Convert absolute coordinates to coordinates relative to
|
|
||||||
// the color wheel center.
|
|
||||||
// sys0 = x_center, sys1 = y_center
|
|
||||||
sys0=colorwheel.w/2
|
|
||||||
sys0+=colorwheel.x
|
|
||||||
sys1=colorwheel.h/2
|
|
||||||
sys1+=colorwheel.y
|
|
||||||
sya0-=sys0
|
|
||||||
sya1-=sys1
|
|
||||||
//
|
|
||||||
// Determine ring
|
|
||||||
ring.val=0
|
|
||||||
// sys0 = r^2 = x^2 + y^2
|
|
||||||
sys0=sya0*sya0
|
|
||||||
sys1=sya1*sya1
|
|
||||||
sys0+=sys1
|
|
||||||
// repeat for all rings
|
|
||||||
if(sys0>=156)
|
|
||||||
{
|
|
||||||
ring.val++
|
|
||||||
}
|
|
||||||
if(sys0>=625)
|
|
||||||
{
|
|
||||||
ring.val++
|
|
||||||
}
|
|
||||||
if(sys0>=1406)
|
|
||||||
{
|
|
||||||
ring.val++
|
|
||||||
}
|
|
||||||
if(sys0>=2500)
|
|
||||||
{
|
|
||||||
ring.val++
|
|
||||||
}
|
|
||||||
if(sys0>=3906)
|
|
||||||
{
|
|
||||||
ring.val++
|
|
||||||
}
|
|
||||||
if(sys0>=5625)
|
|
||||||
{
|
|
||||||
ring.val++
|
|
||||||
}
|
|
||||||
if(sys0>=7656)
|
|
||||||
{
|
|
||||||
ring.val++
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// Determine quadrant (0-3). Note: pixel y coords are inverted
|
|
||||||
// compared to mathematical y coords. But we want math. quadrants.
|
|
||||||
sya1*=-1
|
|
||||||
sys2=0
|
|
||||||
if(sya1<0)
|
|
||||||
{
|
|
||||||
sys2+=2
|
|
||||||
}
|
|
||||||
sys0=sya0*sya1
|
|
||||||
if(sys0<0)
|
|
||||||
{
|
|
||||||
sys2+=1
|
|
||||||
// In this case we also want to swap x and y otherwise the
|
|
||||||
// atan(abs(x/y)) (calculated below) gives values running
|
|
||||||
// "the wrong way" (cw instead of ccw).
|
|
||||||
sys1=sya1
|
|
||||||
sya1=sya0
|
|
||||||
sya0=sys1
|
|
||||||
}
|
|
||||||
//
|
|
||||||
field.val=sys2*6
|
|
||||||
//
|
|
||||||
// x,y sign is not required anymore
|
|
||||||
if(sya0<0)
|
|
||||||
{
|
|
||||||
sya0*=-1
|
|
||||||
}
|
|
||||||
if(sya1<0)
|
|
||||||
{
|
|
||||||
sya1*=-1
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// Determine field in ring quadrant
|
|
||||||
// Factor 100000 chosen more or less arbitrarily.
|
|
||||||
// sys0 = 100000 * tan_a = 100000 * y / x
|
|
||||||
sys0=100000*sya1
|
|
||||||
sys0/=sya0
|
|
||||||
// repeat for all fields
|
|
||||||
if(sys0>=26794)
|
|
||||||
{
|
|
||||||
field.val++
|
|
||||||
}
|
|
||||||
if(sys0>=57735)
|
|
||||||
{
|
|
||||||
field.val++
|
|
||||||
}
|
|
||||||
if(sys0>=99999)
|
|
||||||
{
|
|
||||||
field.val++
|
|
||||||
}
|
|
||||||
if(sys0>=173205)
|
|
||||||
{
|
|
||||||
field.val++
|
|
||||||
}
|
|
||||||
if(sys0>=373205)
|
|
||||||
{
|
|
||||||
field.val++
|
|
||||||
}
|
|
||||||
covx r,va1.txt,0,0
|
|
||||||
covx g,va2.txt,0,0
|
|
||||||
covx b,va3.txt,0,0
|
|
||||||
va1.txt=""
|
|
||||||
va2.txt=""
|
|
||||||
va3.txt=""
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
// Adjust field.val "orientation" and offset to match the h value of the colors in the wheel
|
|
||||||
h=23-field.val// 0 <= field.val <= 23
|
|
||||||
// h is expected to be 0-6*256 (see hsv2rgb)
|
|
||||||
h*=6*256
|
|
||||||
h/=24// Number of fields
|
|
||||||
//
|
|
||||||
// s is expected to be 0-256 (see hsv2rgb)
|
|
||||||
s=ring.val*256
|
|
||||||
s/=8// Number of rings
|
|
||||||
// no "value" selectable; fix it to the maximum (matching the colors in the wheels shown.
|
|
||||||
v=255
|
|
||||||
click hsv2rgb,0
|
|
||||||
click rgb888to565,0
|
|
||||||
//colPreview.bco=rgb565.val
|
|
||||||
covx r,va1.txt,0,0
|
|
||||||
covx g,va2.txt,0,0
|
|
||||||
covx b,va3.txt,0,0
|
|
||||||
lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+","+va2.txt+","+va3.txt+"]}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints lightsetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
va1.txt=""
|
|
||||||
va2.txt=""
|
|
||||||
va3.txt=""
|
|
||||||
|
|
||||||
Picture light_exit
|
|
||||||
Attributes
|
|
||||||
ID : 29
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Slider lightslider
|
|
||||||
Attributes
|
|
||||||
ID : 3
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
Position : 0
|
|
||||||
Upper range limit: 100
|
|
||||||
Lower range limit: 0
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Release Event
|
|
||||||
covx lightslider.val,va1.txt,0,0
|
|
||||||
light_value.txt=va1.txt+"%"
|
|
||||||
light_value_2.txt=va1.txt+"%"
|
|
||||||
lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"brightness_pct\", \"value\": "+va1.txt+"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints lightsetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Slider tempslider
|
|
||||||
Attributes
|
|
||||||
ID : 15
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
Position : 0
|
|
||||||
Upper range limit: 500
|
|
||||||
Lower range limit: 153
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Release Event
|
|
||||||
covx tempslider.val,va1.txt,0,0
|
|
||||||
temp_value.txt=va1.txt
|
|
||||||
temp_value_2.txt=va1.txt
|
|
||||||
lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"color_temp\", \"value\": "+va1.txt+"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints lightsetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Hotspot hsv2rgb
|
|
||||||
Attributes
|
|
||||||
ID : 6
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Release Event
|
|
||||||
// https://de.wikipedia.org/wiki/HSV-Farbraum#Umrechnung_HSV_in_RGB
|
|
||||||
// The values range from 0..255 instead of 0..1
|
|
||||||
// h ranges from 0..(6*256)
|
|
||||||
if(s>=256)
|
|
||||||
{
|
|
||||||
s=255
|
|
||||||
}else if(s<0)
|
|
||||||
{
|
|
||||||
s=0
|
|
||||||
}
|
|
||||||
if(v>=256)
|
|
||||||
{
|
|
||||||
v=255
|
|
||||||
}else if(v<0)
|
|
||||||
{
|
|
||||||
v=0
|
|
||||||
}
|
|
||||||
f=h&0xff
|
|
||||||
p=256-s
|
|
||||||
p*=v
|
|
||||||
p=p>>8// / 256
|
|
||||||
q=s*f// 0-256*256 = 0-65536
|
|
||||||
q=65536-q
|
|
||||||
q*=v
|
|
||||||
q=q>>16
|
|
||||||
t=256-f
|
|
||||||
t*=s
|
|
||||||
t=65536-t
|
|
||||||
t*=v
|
|
||||||
t=t>>16
|
|
||||||
//
|
|
||||||
f=h>>8
|
|
||||||
if(f==1)
|
|
||||||
{
|
|
||||||
r=q
|
|
||||||
g=v
|
|
||||||
b=p
|
|
||||||
}else if(f==2)
|
|
||||||
{
|
|
||||||
r=p
|
|
||||||
g=v
|
|
||||||
b=t
|
|
||||||
}else if(f==3)
|
|
||||||
{
|
|
||||||
r=p
|
|
||||||
g=q
|
|
||||||
b=v
|
|
||||||
}else if(f==4)
|
|
||||||
{
|
|
||||||
r=t
|
|
||||||
g=p
|
|
||||||
b=v
|
|
||||||
}else if(f==5)
|
|
||||||
{
|
|
||||||
r=v
|
|
||||||
g=p
|
|
||||||
b=q
|
|
||||||
}else
|
|
||||||
{
|
|
||||||
r=v
|
|
||||||
g=t
|
|
||||||
b=p
|
|
||||||
}
|
|
||||||
|
|
||||||
Hotspot rgb888to565
|
|
||||||
Attributes
|
|
||||||
ID : 7
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Release Event
|
|
||||||
r=r&0xff
|
|
||||||
g=g&0xff
|
|
||||||
b=b&0xff
|
|
||||||
sys1=r>>3
|
|
||||||
sys2=sys1<<6
|
|
||||||
sys1=g>>2
|
|
||||||
sys2+=sys1
|
|
||||||
sys2=sys2<<5
|
|
||||||
sys1=b>>3
|
|
||||||
sys2+=sys1
|
|
||||||
rgb565.val=sys2
|
|
||||||
|
|
||||||
Hotspot light_touch
|
|
||||||
Attributes
|
|
||||||
ID : 17
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
vis light_b_press,1
|
|
||||||
vis lightslider,1
|
|
||||||
vis light_value,1
|
|
||||||
vis temp_value_2,1
|
|
||||||
// #### OFF Button #####
|
|
||||||
vis temp_b_press,0
|
|
||||||
vis color_b_pres,0
|
|
||||||
// #### OFF Value #####
|
|
||||||
vis temp_value,0
|
|
||||||
vis light_value_2,0
|
|
||||||
// #### OFF Slider #####
|
|
||||||
vis tempslider,0
|
|
||||||
vis colorwheel,0
|
|
||||||
|
|
||||||
Hotspot temp_touch
|
|
||||||
Attributes
|
|
||||||
ID : 18
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
vis temp_b_press,1
|
|
||||||
vis tempslider,1
|
|
||||||
vis temp_value,1
|
|
||||||
vis light_value_2,1
|
|
||||||
// #### OFF Button #####
|
|
||||||
vis light_b_press,0
|
|
||||||
vis color_b_pres,0
|
|
||||||
// #### OFF Value #####
|
|
||||||
vis light_value,0
|
|
||||||
vis temp_value_2,0
|
|
||||||
// #### OFF Slider #####
|
|
||||||
vis lightslider,0
|
|
||||||
vis colorwheel,0
|
|
||||||
|
|
||||||
Hotspot color_touch
|
|
||||||
Attributes
|
|
||||||
ID : 19
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
vis color_b_pres,1
|
|
||||||
vis colorwheel,1
|
|
||||||
vis light_value_2,1
|
|
||||||
// #### OFF Button #####
|
|
||||||
vis light_b_press,0
|
|
||||||
vis temp_b_press,0
|
|
||||||
// #### OFF Value #####
|
|
||||||
vis light_value,0
|
|
||||||
vis temp_value,0
|
|
||||||
vis temp_value_2,0
|
|
||||||
// #### OFF Slider #####
|
|
||||||
vis lightslider,0
|
|
||||||
vis tempslider,0
|
|
||||||
// #### OFF Color #####
|
|
||||||
|
|
||||||
Hotspot light_back
|
|
||||||
Attributes
|
|
||||||
ID : 30
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"close\", \"value\": \"press\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints lightsetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"close\", \"value\": \"release\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints lightsetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Timer swipestore
|
|
||||||
Attributes
|
|
||||||
ID : 21
|
|
||||||
Scope : local
|
|
||||||
Period (ms): 50
|
|
||||||
Enabled : no
|
|
||||||
|
|
||||||
Events
|
|
||||||
Timer Event
|
|
||||||
swipex=tch0
|
|
||||||
swipey=tch1
|
|
||||||
|
|
||||||
TouchCap swipe
|
|
||||||
Attributes
|
|
||||||
ID : 20
|
|
||||||
Scope: local
|
|
||||||
Value: 0
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
swipestore.en=1 // Start swipestore timer
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
swipestore.en=0
|
|
||||||
// Touch has ended, x
|
|
||||||
if(tch0==0)
|
|
||||||
{
|
|
||||||
swipec=swipex-tch2
|
|
||||||
// From Left to Right
|
|
||||||
if(swipec>swipedx)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
// Right to Left
|
|
||||||
swipec2=0-swipedx
|
|
||||||
if(swipec<swipec2)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Touch has ended, y
|
|
||||||
if(tch1==0)
|
|
||||||
{
|
|
||||||
swipec=swipey-tch3
|
|
||||||
// From Up to Down
|
|
||||||
if(swipec>100)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
// Down to Up
|
|
||||||
swipec2=0-swipedy
|
|
||||||
if(swipec<-100)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -18,9 +18,9 @@ Page media_player
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"media_player\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "media_player",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page notification
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"notification\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "notification",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,98 +0,0 @@
|
|||||||
Program.s
|
|
||||||
0 Component(s)
|
|
||||||
9 Line(s) of event code
|
|
||||||
9 Unique line(s) of event code
|
|
||||||
screensaver
|
|
||||||
3 Component(s)
|
|
||||||
9 Line(s) of event code
|
|
||||||
8 Unique line(s) of event code
|
|
||||||
qrcode
|
|
||||||
6 Component(s)
|
|
||||||
46 Line(s) of event code
|
|
||||||
28 Unique line(s) of event code
|
|
||||||
notification
|
|
||||||
11 Component(s)
|
|
||||||
60 Line(s) of event code
|
|
||||||
31 Unique line(s) of event code
|
|
||||||
weather03
|
|
||||||
19 Component(s)
|
|
||||||
47 Line(s) of event code
|
|
||||||
29 Unique line(s) of event code
|
|
||||||
weather04
|
|
||||||
19 Component(s)
|
|
||||||
47 Line(s) of event code
|
|
||||||
29 Unique line(s) of event code
|
|
||||||
weather05
|
|
||||||
19 Component(s)
|
|
||||||
47 Line(s) of event code
|
|
||||||
29 Unique line(s) of event code
|
|
||||||
settings
|
|
||||||
15 Component(s)
|
|
||||||
65 Line(s) of event code
|
|
||||||
32 Unique line(s) of event code
|
|
||||||
entitypage02
|
|
||||||
29 Component(s)
|
|
||||||
47 Line(s) of event code
|
|
||||||
29 Unique line(s) of event code
|
|
||||||
entitypage04
|
|
||||||
29 Component(s)
|
|
||||||
48 Line(s) of event code
|
|
||||||
29 Unique line(s) of event code
|
|
||||||
boot
|
|
||||||
11 Component(s)
|
|
||||||
6 Line(s) of event code
|
|
||||||
5 Unique line(s) of event code
|
|
||||||
coversettings
|
|
||||||
16 Component(s)
|
|
||||||
90 Line(s) of event code
|
|
||||||
35 Unique line(s) of event code
|
|
||||||
weather01
|
|
||||||
19 Component(s)
|
|
||||||
47 Line(s) of event code
|
|
||||||
29 Unique line(s) of event code
|
|
||||||
weather02
|
|
||||||
19 Component(s)
|
|
||||||
47 Line(s) of event code
|
|
||||||
29 Unique line(s) of event code
|
|
||||||
lightsettings
|
|
||||||
33 Component(s)
|
|
||||||
306 Line(s) of event code
|
|
||||||
164 Unique line(s) of event code
|
|
||||||
entitypage01
|
|
||||||
29 Component(s)
|
|
||||||
49 Line(s) of event code
|
|
||||||
30 Unique line(s) of event code
|
|
||||||
entitypage03
|
|
||||||
29 Component(s)
|
|
||||||
48 Line(s) of event code
|
|
||||||
30 Unique line(s) of event code
|
|
||||||
buttonpage01
|
|
||||||
46 Component(s)
|
|
||||||
161 Line(s) of event code
|
|
||||||
48 Unique line(s) of event code
|
|
||||||
climate
|
|
||||||
25 Component(s)
|
|
||||||
391 Line(s) of event code
|
|
||||||
105 Unique line(s) of event code
|
|
||||||
buttonpage04
|
|
||||||
46 Component(s)
|
|
||||||
161 Line(s) of event code
|
|
||||||
48 Unique line(s) of event code
|
|
||||||
buttonpage02
|
|
||||||
46 Component(s)
|
|
||||||
162 Line(s) of event code
|
|
||||||
49 Unique line(s) of event code
|
|
||||||
buttonpage03
|
|
||||||
46 Component(s)
|
|
||||||
162 Line(s) of event code
|
|
||||||
49 Unique line(s) of event code
|
|
||||||
home
|
|
||||||
55 Component(s)
|
|
||||||
130 Line(s) of event code
|
|
||||||
51 Unique line(s) of event code
|
|
||||||
|
|
||||||
Total
|
|
||||||
22 Page(s)
|
|
||||||
570 Component(s)
|
|
||||||
2185 Line(s) of event code
|
|
||||||
432 Unique line(s) of event code
|
|
||||||
@@ -13,9 +13,9 @@ Page qrcode
|
|||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"qrcode\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "qrcode",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
|
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ Page screensaver
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
dim=0
|
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"screensaver\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "screensaver",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
|
dim=0
|
||||||
|
|
||||||
Touch Release Event
|
Touch Release Event
|
||||||
page orign.val
|
page orign.val
|
||||||
|
|||||||
@@ -12,16 +12,16 @@ Page settings
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
|
printh 92
|
||||||
|
prints "currentpage",0
|
||||||
|
printh 00
|
||||||
|
prints "settings",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
covx brightslider.val,bright_text.txt,0,0
|
covx brightslider.val,bright_text.txt,0,0
|
||||||
bright_text.txt+="%"
|
bright_text.txt+="%"
|
||||||
covx dimslider.val,dim_text.txt,0,0
|
covx dimslider.val,dim_text.txt,0,0
|
||||||
dim_text.txt+="%"
|
dim_text.txt+="%"
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"settings\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
vis lbl_sleep,0
|
vis lbl_sleep,0
|
||||||
vis bt_sleep,0
|
vis bt_sleep,0
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page weather01
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"weather01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "weather01",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page weather02
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"weather02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "weather02",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page weather03
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"weather03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "weather03",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page weather04
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"weather04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "weather04",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page weather05
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"weather05\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "weather05",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
nspanel_us.HMI
BIN
nspanel_us.HMI
Binary file not shown.
BIN
nspanel_us.tft
BIN
nspanel_us.tft
Binary file not shown.
@@ -18,9 +18,9 @@ Page alarm
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"alarm\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "alarm",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis bt_home,0
|
vis bt_home,0
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ Page boot
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
|
printh 92
|
||||||
|
prints "currentpage",0
|
||||||
|
printh 00
|
||||||
|
prints "boot",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
dim=0
|
dim=0
|
||||||
vis bt_reboot,0
|
vis bt_reboot,0
|
||||||
covx display_mode,aux2.txt,0,0
|
covx display_mode,aux2.txt,0,0
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page buttonpage01
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"buttonpage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "buttonpage01",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis 255,0
|
vis 255,0
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page buttonpage02
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"buttonpage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "buttonpage02",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis 255,0
|
vis 255,0
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page buttonpage03
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"buttonpage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "buttonpage03",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis 255,0
|
vis 255,0
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page buttonpage04
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"buttonpage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "buttonpage04",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis 255,0
|
vis 255,0
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ Page climate
|
|||||||
if(api==1||embedded.val==1)
|
if(api==1||embedded.val==1)
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "climate",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis target_icon,0
|
vis target_icon,0
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page confirm
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"confirm\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "confirm",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page cover
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "cover",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,273 +0,0 @@
|
|||||||
Page coversettings
|
|
||||||
Attributes
|
|
||||||
ID : 0
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Locked : no
|
|
||||||
Swide up page ID : disabled
|
|
||||||
Swide down page ID : disabled
|
|
||||||
Swide left page ID : disabled
|
|
||||||
Swide right page ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Preinitialize Event
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"coversettings\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Press Event
|
|
||||||
printh 92
|
|
||||||
prints "touchevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"coversettings\", \"component\": \"touchevent\", \"value\": \"press\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
printh 92
|
|
||||||
prints "touchevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"coversettings\", \"component\": \"touchevent\", \"value\": \"release\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Variable (string) va1
|
|
||||||
Attributes
|
|
||||||
ID : 9
|
|
||||||
Scope : local
|
|
||||||
Text : newtxt
|
|
||||||
Max. Text Size: 10
|
|
||||||
|
|
||||||
Variable (string) coversetting
|
|
||||||
Attributes
|
|
||||||
ID : 15
|
|
||||||
Scope : local
|
|
||||||
Text :
|
|
||||||
Max. Text Size: 100
|
|
||||||
|
|
||||||
Text battery_value
|
|
||||||
Attributes
|
|
||||||
ID : 1
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Text cover_value
|
|
||||||
Attributes
|
|
||||||
ID : 2
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Text cover_name
|
|
||||||
Attributes
|
|
||||||
ID : 3
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 25
|
|
||||||
|
|
||||||
Text icon_state
|
|
||||||
Attributes
|
|
||||||
ID : 13
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Text battery_icon
|
|
||||||
Attributes
|
|
||||||
ID : 14
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Picture cover_exit
|
|
||||||
Attributes
|
|
||||||
ID : 11
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Slider coverslider
|
|
||||||
Attributes
|
|
||||||
ID : 6
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
Position : 0
|
|
||||||
Upper range limit: 100
|
|
||||||
Lower range limit: 0
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Release Event
|
|
||||||
covx coverslider.val,va1.txt,0,0
|
|
||||||
cover_value.txt=va1.txt+"%"
|
|
||||||
coversetting.txt="{\"page\": \"coversettings\", \"component\": \"cover_position\", \"value\": "+va1.txt+"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints coversetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Button cover_open
|
|
||||||
Attributes
|
|
||||||
ID : 4
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
State : unpressed
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
coversetting.txt="{\"page\": \"coversettings\", \"component\": \"open_cover\", \"value\": \"press\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints coversetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Button cover_close
|
|
||||||
Attributes
|
|
||||||
ID : 5
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
State : unpressed
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
coversetting.txt="{\"page\": \"coversettings\", \"component\": \"close_cover\", \"value\": \"press\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints coversetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Button cover_stop
|
|
||||||
Attributes
|
|
||||||
ID : 10
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
State : unpressed
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
coversetting.txt="{\"page\": \"coversettings\", \"component\": \"stop_cover\", \"value\": \"press\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints coversetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Hotspot cover_back
|
|
||||||
Attributes
|
|
||||||
ID : 12
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
coversetting.txt="{\"page\": \"coversettings\", \"component\": \"close\", \"value\": \"press\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints coversetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
coversetting.txt="{\"page\": \"coversettings\", \"component\": \"close\", \"value\": \"release\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints coversetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Timer swipestore
|
|
||||||
Attributes
|
|
||||||
ID : 8
|
|
||||||
Scope : local
|
|
||||||
Period (ms): 50
|
|
||||||
Enabled : no
|
|
||||||
|
|
||||||
Events
|
|
||||||
Timer Event
|
|
||||||
swipex=tch0
|
|
||||||
swipey=tch1
|
|
||||||
|
|
||||||
TouchCap swipe
|
|
||||||
Attributes
|
|
||||||
ID : 7
|
|
||||||
Scope: local
|
|
||||||
Value: 0
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
swipestore.en=1 // Start swipestore timer
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
swipestore.en=0
|
|
||||||
// Touch has ended, x
|
|
||||||
if(tch0==0)
|
|
||||||
{
|
|
||||||
swipec=swipex-tch2
|
|
||||||
// From Left to Right
|
|
||||||
if(swipec>swipedx)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
// Right to Left
|
|
||||||
swipec2=0-swipedx
|
|
||||||
if(swipec<swipec2)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Touch has ended, y
|
|
||||||
if(tch1==0)
|
|
||||||
{
|
|
||||||
swipec=swipey-tch3
|
|
||||||
// From Up to Down
|
|
||||||
if(swipec>100)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
// Down to Up
|
|
||||||
swipec2=0-swipedy
|
|
||||||
if(swipec<-100)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -18,9 +18,9 @@ Page entitypage01
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"entitypage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "entitypage01",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page entitypage02
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"entitypage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "entitypage02",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page entitypage03
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"entitypage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "entitypage03",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page entitypage04
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"entitypage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "entitypage04",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page fan
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "fan",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ Page home
|
|||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"home\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "home",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis bt_notific,is_notification
|
vis bt_notific,is_notification
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page keyb_num
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"keyb_num\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "keyb_num",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page light
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "light",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis light_b_press,1
|
vis light_b_press,1
|
||||||
|
|||||||
@@ -1,674 +0,0 @@
|
|||||||
Page lightsettings
|
|
||||||
Attributes
|
|
||||||
ID : 0
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Locked : no
|
|
||||||
Swide up page ID : disabled
|
|
||||||
Swide down page ID : disabled
|
|
||||||
Swide left page ID : disabled
|
|
||||||
Swide right page ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Preinitialize Event
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"lightsettings\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
vis light_b_press,1
|
|
||||||
vis lightslider,1
|
|
||||||
vis light_value,1
|
|
||||||
vis temp_value_2,1
|
|
||||||
// #### OFF Button #####
|
|
||||||
vis temp_b_press,0
|
|
||||||
vis color_b_pres,0
|
|
||||||
// #### OFF Value #####
|
|
||||||
vis temp_value,0
|
|
||||||
vis light_value_2,0
|
|
||||||
// #### OFF Slider #####
|
|
||||||
vis tempslider,0
|
|
||||||
vis colorwheel,0
|
|
||||||
|
|
||||||
Touch Press Event
|
|
||||||
printh 92
|
|
||||||
prints "touchevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"lightsettings\", \"component\": \"touchevent\", \"value\": \"press\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
printh 92
|
|
||||||
prints "touchevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"lightsettings\", \"component\": \"touchevent\", \"value\": \"release\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Variable (int32) rgb565
|
|
||||||
Attributes
|
|
||||||
ID : 22
|
|
||||||
Scope: local
|
|
||||||
Value: 0
|
|
||||||
|
|
||||||
Variable (string) va1
|
|
||||||
Attributes
|
|
||||||
ID : 23
|
|
||||||
Scope : local
|
|
||||||
Text : newtxt
|
|
||||||
Max. Text Size: 20
|
|
||||||
|
|
||||||
Variable (string) va2
|
|
||||||
Attributes
|
|
||||||
ID : 24
|
|
||||||
Scope : local
|
|
||||||
Text : newtxt
|
|
||||||
Max. Text Size: 10
|
|
||||||
|
|
||||||
Variable (string) va3
|
|
||||||
Attributes
|
|
||||||
ID : 25
|
|
||||||
Scope : local
|
|
||||||
Text : newtxt
|
|
||||||
Max. Text Size: 10
|
|
||||||
|
|
||||||
Variable (int32) currenttab
|
|
||||||
Attributes
|
|
||||||
ID : 26
|
|
||||||
Scope: local
|
|
||||||
Value: 0
|
|
||||||
|
|
||||||
Variable (string) lightsetting
|
|
||||||
Attributes
|
|
||||||
ID : 32
|
|
||||||
Scope : local
|
|
||||||
Text :
|
|
||||||
Max. Text Size: 100
|
|
||||||
|
|
||||||
Number ring
|
|
||||||
Attributes
|
|
||||||
ID : 4
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Value : 0
|
|
||||||
|
|
||||||
Number field
|
|
||||||
Attributes
|
|
||||||
ID : 5
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Value : 0
|
|
||||||
|
|
||||||
Text light_value
|
|
||||||
Attributes
|
|
||||||
ID : 1
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Text light_name
|
|
||||||
Attributes
|
|
||||||
ID : 2
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 25
|
|
||||||
|
|
||||||
Text temp_value
|
|
||||||
Attributes
|
|
||||||
ID : 14
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Text light_value_2
|
|
||||||
Attributes
|
|
||||||
ID : 27
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Text temp_value_2
|
|
||||||
Attributes
|
|
||||||
ID : 28
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Text icon_state
|
|
||||||
Attributes
|
|
||||||
ID : 31
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID : disabled
|
|
||||||
Associated Keyboard: none
|
|
||||||
Text :
|
|
||||||
Max. Text Size : 10
|
|
||||||
|
|
||||||
Picture light_button
|
|
||||||
Attributes
|
|
||||||
ID : 8
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Picture color_button
|
|
||||||
Attributes
|
|
||||||
ID : 9
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Picture temp_button
|
|
||||||
Attributes
|
|
||||||
ID : 10
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Picture light_b_press
|
|
||||||
Attributes
|
|
||||||
ID : 11
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Picture temp_b_press
|
|
||||||
Attributes
|
|
||||||
ID : 12
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Picture color_b_pres
|
|
||||||
Attributes
|
|
||||||
ID : 13
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Picture colorwheel
|
|
||||||
Attributes
|
|
||||||
ID : 16
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
// Circular Color Picker for Nextion (c) Max Zuidberg 2022
|
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
//
|
|
||||||
// Put this code in the touch press or release
|
|
||||||
// event of the pic component with the color wheel.
|
|
||||||
// Requires the two variables field.val and ring.val
|
|
||||||
//
|
|
||||||
// sya0 = x, sya1 = sya1
|
|
||||||
// Note the usage of the hidden sya0, sya1 variables
|
|
||||||
// within event code as local, temporary variable is fine.
|
|
||||||
sya0=tch0
|
|
||||||
sya1=tch1
|
|
||||||
//
|
|
||||||
// Convert absolute coordinates to coordinates relative to
|
|
||||||
// the color wheel center.
|
|
||||||
// sys0 = x_center, sys1 = y_center
|
|
||||||
sys0=colorwheel.w/2
|
|
||||||
sys0+=colorwheel.x
|
|
||||||
sys1=colorwheel.h/2
|
|
||||||
sys1+=colorwheel.y
|
|
||||||
sya0-=sys0
|
|
||||||
sya1-=sys1
|
|
||||||
//
|
|
||||||
// Determine ring
|
|
||||||
ring.val=0
|
|
||||||
// sys0 = r^2 = x^2 + y^2
|
|
||||||
sys0=sya0*sya0
|
|
||||||
sys1=sya1*sya1
|
|
||||||
sys0+=sys1
|
|
||||||
// repeat for all rings
|
|
||||||
if(sys0>=156)
|
|
||||||
{
|
|
||||||
ring.val++
|
|
||||||
}
|
|
||||||
if(sys0>=625)
|
|
||||||
{
|
|
||||||
ring.val++
|
|
||||||
}
|
|
||||||
if(sys0>=1406)
|
|
||||||
{
|
|
||||||
ring.val++
|
|
||||||
}
|
|
||||||
if(sys0>=2500)
|
|
||||||
{
|
|
||||||
ring.val++
|
|
||||||
}
|
|
||||||
if(sys0>=3906)
|
|
||||||
{
|
|
||||||
ring.val++
|
|
||||||
}
|
|
||||||
if(sys0>=5625)
|
|
||||||
{
|
|
||||||
ring.val++
|
|
||||||
}
|
|
||||||
if(sys0>=7656)
|
|
||||||
{
|
|
||||||
ring.val++
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// Determine quadrant (0-3). Note: pixel y coords are inverted
|
|
||||||
// compared to mathematical y coords. But we want math. quadrants.
|
|
||||||
sya1*=-1
|
|
||||||
sys2=0
|
|
||||||
if(sya1<0)
|
|
||||||
{
|
|
||||||
sys2+=2
|
|
||||||
}
|
|
||||||
sys0=sya0*sya1
|
|
||||||
if(sys0<0)
|
|
||||||
{
|
|
||||||
sys2+=1
|
|
||||||
// In this case we also want to swap x and y otherwise the
|
|
||||||
// atan(abs(x/y)) (calculated below) gives values running
|
|
||||||
// "the wrong way" (cw instead of ccw).
|
|
||||||
sys1=sya1
|
|
||||||
sya1=sya0
|
|
||||||
sya0=sys1
|
|
||||||
}
|
|
||||||
//
|
|
||||||
field.val=sys2*6
|
|
||||||
//
|
|
||||||
// x,y sign is not required anymore
|
|
||||||
if(sya0<0)
|
|
||||||
{
|
|
||||||
sya0*=-1
|
|
||||||
}
|
|
||||||
if(sya1<0)
|
|
||||||
{
|
|
||||||
sya1*=-1
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// Determine field in ring quadrant
|
|
||||||
// Factor 100000 chosen more or less arbitrarily.
|
|
||||||
// sys0 = 100000 * tan_a = 100000 * y / x
|
|
||||||
sys0=100000*sya1
|
|
||||||
sys0/=sya0
|
|
||||||
// repeat for all fields
|
|
||||||
if(sys0>=26794)
|
|
||||||
{
|
|
||||||
field.val++
|
|
||||||
}
|
|
||||||
if(sys0>=57735)
|
|
||||||
{
|
|
||||||
field.val++
|
|
||||||
}
|
|
||||||
if(sys0>=99999)
|
|
||||||
{
|
|
||||||
field.val++
|
|
||||||
}
|
|
||||||
if(sys0>=173205)
|
|
||||||
{
|
|
||||||
field.val++
|
|
||||||
}
|
|
||||||
if(sys0>=373205)
|
|
||||||
{
|
|
||||||
field.val++
|
|
||||||
}
|
|
||||||
covx r,va1.txt,0,0
|
|
||||||
covx g,va2.txt,0,0
|
|
||||||
covx b,va3.txt,0,0
|
|
||||||
va1.txt=""
|
|
||||||
va2.txt=""
|
|
||||||
va3.txt=""
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
// Adjust field.val "orientation" and offset to match the h value of the colors in the wheel
|
|
||||||
h=23-field.val// 0 <= field.val <= 23
|
|
||||||
// h is expected to be 0-6*256 (see hsv2rgb)
|
|
||||||
h*=6*256
|
|
||||||
h/=24// Number of fields
|
|
||||||
//
|
|
||||||
// s is expected to be 0-256 (see hsv2rgb)
|
|
||||||
s=ring.val*256
|
|
||||||
s/=8// Number of rings
|
|
||||||
// no "value" selectable; fix it to the maximum (matching the colors in the wheels shown.
|
|
||||||
v=255
|
|
||||||
click hsv2rgb,0
|
|
||||||
click rgb888to565,0
|
|
||||||
//colPreview.bco=rgb565.val
|
|
||||||
covx r,va1.txt,0,0
|
|
||||||
covx g,va2.txt,0,0
|
|
||||||
covx b,va3.txt,0,0
|
|
||||||
lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"rgb_color\", \"value\": ["+va1.txt+","+va2.txt+","+va3.txt+"]}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints lightsetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
va1.txt=""
|
|
||||||
va2.txt=""
|
|
||||||
va3.txt=""
|
|
||||||
|
|
||||||
Picture light_exit
|
|
||||||
Attributes
|
|
||||||
ID : 29
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Slider lightslider
|
|
||||||
Attributes
|
|
||||||
ID : 3
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
Position : 0
|
|
||||||
Upper range limit: 100
|
|
||||||
Lower range limit: 0
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Release Event
|
|
||||||
covx lightslider.val,va1.txt,0,0
|
|
||||||
light_value.txt=va1.txt+"%"
|
|
||||||
light_value_2.txt=va1.txt+"%"
|
|
||||||
lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"brightness_pct\", \"value\": "+va1.txt+"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints lightsetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Slider tempslider
|
|
||||||
Attributes
|
|
||||||
ID : 15
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
Position : 0
|
|
||||||
Upper range limit: 500
|
|
||||||
Lower range limit: 153
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Release Event
|
|
||||||
covx tempslider.val,va1.txt,0,0
|
|
||||||
temp_value.txt=va1.txt
|
|
||||||
temp_value_2.txt=va1.txt
|
|
||||||
lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"color_temp\", \"value\": "+va1.txt+"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints lightsetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Hotspot hsv2rgb
|
|
||||||
Attributes
|
|
||||||
ID : 6
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Release Event
|
|
||||||
// https://de.wikipedia.org/wiki/HSV-Farbraum#Umrechnung_HSV_in_RGB
|
|
||||||
// The values range from 0..255 instead of 0..1
|
|
||||||
// h ranges from 0..(6*256)
|
|
||||||
if(s>=256)
|
|
||||||
{
|
|
||||||
s=255
|
|
||||||
}else if(s<0)
|
|
||||||
{
|
|
||||||
s=0
|
|
||||||
}
|
|
||||||
if(v>=256)
|
|
||||||
{
|
|
||||||
v=255
|
|
||||||
}else if(v<0)
|
|
||||||
{
|
|
||||||
v=0
|
|
||||||
}
|
|
||||||
f=h&0xff
|
|
||||||
p=256-s
|
|
||||||
p*=v
|
|
||||||
p=p>>8// / 256
|
|
||||||
q=s*f// 0-256*256 = 0-65536
|
|
||||||
q=65536-q
|
|
||||||
q*=v
|
|
||||||
q=q>>16
|
|
||||||
t=256-f
|
|
||||||
t*=s
|
|
||||||
t=65536-t
|
|
||||||
t*=v
|
|
||||||
t=t>>16
|
|
||||||
//
|
|
||||||
f=h>>8
|
|
||||||
if(f==1)
|
|
||||||
{
|
|
||||||
r=q
|
|
||||||
g=v
|
|
||||||
b=p
|
|
||||||
}else if(f==2)
|
|
||||||
{
|
|
||||||
r=p
|
|
||||||
g=v
|
|
||||||
b=t
|
|
||||||
}else if(f==3)
|
|
||||||
{
|
|
||||||
r=p
|
|
||||||
g=q
|
|
||||||
b=v
|
|
||||||
}else if(f==4)
|
|
||||||
{
|
|
||||||
r=t
|
|
||||||
g=p
|
|
||||||
b=v
|
|
||||||
}else if(f==5)
|
|
||||||
{
|
|
||||||
r=v
|
|
||||||
g=p
|
|
||||||
b=q
|
|
||||||
}else
|
|
||||||
{
|
|
||||||
r=v
|
|
||||||
g=t
|
|
||||||
b=p
|
|
||||||
}
|
|
||||||
|
|
||||||
Hotspot rgb888to565
|
|
||||||
Attributes
|
|
||||||
ID : 7
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Release Event
|
|
||||||
r=r&0xff
|
|
||||||
g=g&0xff
|
|
||||||
b=b&0xff
|
|
||||||
sys1=r>>3
|
|
||||||
sys2=sys1<<6
|
|
||||||
sys1=g>>2
|
|
||||||
sys2+=sys1
|
|
||||||
sys2=sys2<<5
|
|
||||||
sys1=b>>3
|
|
||||||
sys2+=sys1
|
|
||||||
rgb565.val=sys2
|
|
||||||
|
|
||||||
Hotspot light_touch
|
|
||||||
Attributes
|
|
||||||
ID : 17
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
vis light_b_press,1
|
|
||||||
vis lightslider,1
|
|
||||||
vis light_value,1
|
|
||||||
vis temp_value_2,1
|
|
||||||
// #### OFF Button #####
|
|
||||||
vis temp_b_press,0
|
|
||||||
vis color_b_pres,0
|
|
||||||
// #### OFF Value #####
|
|
||||||
vis temp_value,0
|
|
||||||
vis light_value_2,0
|
|
||||||
// #### OFF Slider #####
|
|
||||||
vis tempslider,0
|
|
||||||
vis colorwheel,0
|
|
||||||
|
|
||||||
Hotspot temp_touch
|
|
||||||
Attributes
|
|
||||||
ID : 18
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
vis temp_b_press,1
|
|
||||||
vis tempslider,1
|
|
||||||
vis temp_value,1
|
|
||||||
vis light_value_2,1
|
|
||||||
// #### OFF Button #####
|
|
||||||
vis light_b_press,0
|
|
||||||
vis color_b_pres,0
|
|
||||||
// #### OFF Value #####
|
|
||||||
vis light_value,0
|
|
||||||
vis temp_value_2,0
|
|
||||||
// #### OFF Slider #####
|
|
||||||
vis lightslider,0
|
|
||||||
vis colorwheel,0
|
|
||||||
|
|
||||||
Hotspot color_touch
|
|
||||||
Attributes
|
|
||||||
ID : 19
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
vis color_b_pres,1
|
|
||||||
vis colorwheel,1
|
|
||||||
vis light_value_2,1
|
|
||||||
// #### OFF Button #####
|
|
||||||
vis light_b_press,0
|
|
||||||
vis temp_b_press,0
|
|
||||||
// #### OFF Value #####
|
|
||||||
vis light_value,0
|
|
||||||
vis temp_value,0
|
|
||||||
vis temp_value_2,0
|
|
||||||
// #### OFF Slider #####
|
|
||||||
vis lightslider,0
|
|
||||||
vis tempslider,0
|
|
||||||
// #### OFF Color #####
|
|
||||||
|
|
||||||
Hotspot light_back
|
|
||||||
Attributes
|
|
||||||
ID : 30
|
|
||||||
Scope : local
|
|
||||||
Dragging : 0
|
|
||||||
Send Component ID: disabled
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"close\", \"value\": \"press\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints lightsetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
lightsetting.txt="{\"page\": \"lightsettings\", \"component\": \"close\", \"value\": \"release\"}"
|
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints lightsetting.txt,0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
|
|
||||||
Timer swipestore
|
|
||||||
Attributes
|
|
||||||
ID : 21
|
|
||||||
Scope : local
|
|
||||||
Period (ms): 50
|
|
||||||
Enabled : no
|
|
||||||
|
|
||||||
Events
|
|
||||||
Timer Event
|
|
||||||
swipex=tch0
|
|
||||||
swipey=tch1
|
|
||||||
|
|
||||||
TouchCap swipe
|
|
||||||
Attributes
|
|
||||||
ID : 20
|
|
||||||
Scope: local
|
|
||||||
Value: 0
|
|
||||||
|
|
||||||
Events
|
|
||||||
Touch Press Event
|
|
||||||
swipestore.en=1 // Start swipestore timer
|
|
||||||
|
|
||||||
Touch Release Event
|
|
||||||
swipestore.en=0
|
|
||||||
// Touch has ended, x
|
|
||||||
if(tch0==0)
|
|
||||||
{
|
|
||||||
swipec=swipex-tch2
|
|
||||||
// From Left to Right
|
|
||||||
if(swipec>swipedx)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
// Right to Left
|
|
||||||
swipec2=0-swipedx
|
|
||||||
if(swipec<swipec2)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Touch has ended, y
|
|
||||||
if(tch1==0)
|
|
||||||
{
|
|
||||||
swipec=swipey-tch3
|
|
||||||
// From Up to Down
|
|
||||||
if(swipec>100)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
// Down to Up
|
|
||||||
swipec2=0-swipedy
|
|
||||||
if(swipec<-100)
|
|
||||||
{
|
|
||||||
//page
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -18,9 +18,9 @@ Page media_player
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"media_player\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "media_player",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page notification
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"notification\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "notification",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ Page qrcode
|
|||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"qrcode\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "qrcode",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
|
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ Page screensaver
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
dim=0
|
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"screensaver\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "screensaver",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
|
dim=0
|
||||||
|
|
||||||
Touch Release Event
|
Touch Release Event
|
||||||
page orign.val
|
page orign.val
|
||||||
|
|||||||
@@ -12,16 +12,16 @@ Page settings
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
|
printh 92
|
||||||
|
prints "currentpage",0
|
||||||
|
printh 00
|
||||||
|
prints "settings",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
covx brightslider.val,bright_text.txt,0,0
|
covx brightslider.val,bright_text.txt,0,0
|
||||||
bright_text.txt+="%"
|
bright_text.txt+="%"
|
||||||
covx dimslider.val,dim_text.txt,0,0
|
covx dimslider.val,dim_text.txt,0,0
|
||||||
dim_text.txt+="%"
|
dim_text.txt+="%"
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"settings\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
vis lbl_sleep,0
|
vis lbl_sleep,0
|
||||||
vis bt_sleep,0
|
vis bt_sleep,0
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page weather01
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"weather01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "weather01",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page weather02
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"weather02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "weather02",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page weather03
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"weather03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "weather03",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page weather04
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"weather04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "weather04",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page weather05
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"weather05\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "weather05",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -18,9 +18,9 @@ Page alarm
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"alarm\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "alarm",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis bt_home,0
|
vis bt_home,0
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ Page boot
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
|
printh 92
|
||||||
|
prints "currentpage",0
|
||||||
|
printh 00
|
||||||
|
prints "boot",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
dim=0
|
dim=0
|
||||||
vis bt_reboot,0
|
vis bt_reboot,0
|
||||||
covx display_mode,aux2.txt,0,0
|
covx display_mode,aux2.txt,0,0
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page buttonpage01
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"buttonpage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "buttonpage01",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis 255,0
|
vis 255,0
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page buttonpage02
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"buttonpage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "buttonpage02",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis 255,0
|
vis 255,0
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page buttonpage03
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"buttonpage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "buttonpage03",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis 255,0
|
vis 255,0
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page buttonpage04
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"buttonpage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "buttonpage04",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis 255,0
|
vis 255,0
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ Page climate
|
|||||||
if(api==1||embedded.val==1)
|
if(api==1||embedded.val==1)
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"climate\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "climate",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis target_icon,0
|
vis target_icon,0
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page confirm
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"confirm\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "confirm",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page cover
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"cover\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "cover",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page entitypage01
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"entitypage01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "entitypage01",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,16 +12,15 @@ Page entitypage02
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
dim=brightness
|
|
||||||
if(api==0)
|
if(api==0)
|
||||||
{
|
{
|
||||||
page home
|
page home
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"entitypage02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "entitypage02",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page entitypage03
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"entitypage03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "entitypage03",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page entitypage04
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"entitypage04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "entitypage04",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page fan
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"fan\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "fan",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ Page home
|
|||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"home\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "home",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis bt_notific,is_notification
|
vis bt_notific,is_notification
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page keyb_num
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"keyb_num\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "keyb_num",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page light
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"light\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "light",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
vis light_b_press,1
|
vis light_b_press,1
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page media_player
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"media_player\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "media_player",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page notification
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"notification\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "notification",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ Page qrcode
|
|||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"qrcode\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "qrcode",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
|
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ Page screensaver
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
dim=0
|
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"screensaver\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "screensaver",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
|
dim=0
|
||||||
|
|
||||||
Touch Release Event
|
Touch Release Event
|
||||||
page orign.val
|
page orign.val
|
||||||
|
|||||||
@@ -12,16 +12,16 @@ Page settings
|
|||||||
|
|
||||||
Events
|
Events
|
||||||
Preinitialize Event
|
Preinitialize Event
|
||||||
|
printh 92
|
||||||
|
prints "currentpage",0
|
||||||
|
printh 00
|
||||||
|
prints "settings",0
|
||||||
|
printh 00
|
||||||
|
printh FF FF FF
|
||||||
covx brightslider.val,bright_text.txt,0,0
|
covx brightslider.val,bright_text.txt,0,0
|
||||||
bright_text.txt+="%"
|
bright_text.txt+="%"
|
||||||
covx dimslider.val,dim_text.txt,0,0
|
covx dimslider.val,dim_text.txt,0,0
|
||||||
dim_text.txt+="%"
|
dim_text.txt+="%"
|
||||||
printh 92
|
|
||||||
prints "nspanelevent",0
|
|
||||||
printh 00
|
|
||||||
prints "{\"page\": \"settings\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
|
||||||
printh 00
|
|
||||||
printh FF FF FF
|
|
||||||
vis lbl_sleep,0
|
vis lbl_sleep,0
|
||||||
vis bt_sleep,0
|
vis bt_sleep,0
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page weather01
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"weather01\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "weather01",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page weather02
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"weather02\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "weather02",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page weather03
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"weather03\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "weather03",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page weather04
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"weather04\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "weather04",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ Page weather05
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
printh 92
|
printh 92
|
||||||
prints "nspanelevent",0
|
prints "currentpage",0
|
||||||
printh 00
|
printh 00
|
||||||
prints "{\"page\": \"weather05\", \"component\": \"currentpage\", \"value\": \"pagechange\"}",0
|
prints "weather05",0
|
||||||
printh 00
|
printh 00
|
||||||
printh FF FF FF
|
printh FF FF FF
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user