diff --git a/.github/workflows/validate_esphome.yml b/.github/workflows/validate_esphome.yml index 360d77443..f12503e79 100644 --- a/.github/workflows/validate_esphome.yml +++ b/.github/workflows/validate_esphome.yml @@ -65,7 +65,7 @@ jobs: ~/.esphome/cache ~/.platformio/packages ~/.platformio/platforms - key: ${{ runner.os }}-esp-idf-v5-${{ hashFiles('**/esphome_idf5_basic.yaml') }} + key: ${{ runner.os }}-esp-idf-v5-${{ hashFiles('**/esphome_idf53_basic.yaml') }} restore-keys: | ${{ runner.os }}-esp-idf-v5- @@ -108,11 +108,11 @@ jobs: fail-fast: false matrix: include: - - id: idf_v4 + - id: idf_v51 yaml_file: ".test/esphome_idf_basic.yaml" cache-hit: ${{ needs.setup_dependencies.outputs.cache-hit-idf-v4 }} - - id: idf_v5 - yaml_file: ".test/esphome_idf5_basic.yaml" + - id: idf_v53 + yaml_file: ".test/esphome_idf53_basic.yaml" cache-hit: ${{ needs.setup_dependencies.outputs.cache-hit-idf-v5 }} - id: ard yaml_file: ".test/esphome_ard_basic.yaml" @@ -136,12 +136,12 @@ jobs: strategy: matrix: include: - - id: idf_v4 - base: idf_v4 + - id: idf_v51 + base: idf_v51 yaml-file: ".test/esphome_idf_core.yaml" - - id: idf_v5 - base: idf_v5 - yaml-file: ".test/esphome_idf5_core.yaml" + - id: idf_v53 + base: idf_v53 + yaml-file: ".test/esphome_idf53_core.yaml" - id: ard base: ard yaml-file: ".test/esphome_ard_core.yaml" @@ -163,12 +163,12 @@ jobs: strategy: matrix: include: - - id: idf_v4 - base: idf_v4 + - id: idf_v51 + base: idf_v51 yaml-file: ".test/esphome_idf_advanced.yaml" - - id: idf_v5 - base: idf_v5 - yaml-file: ".test/esphome_idf5_advanced.yaml" + - id: idf_v53 + base: idf_v53 + yaml-file: ".test/esphome_idf53_advanced.yaml" - id: ard base: ard yaml-file: ".test/esphome_ard_advanced.yaml" @@ -190,12 +190,12 @@ jobs: strategy: matrix: include: - - id: idf_v4 - base: idf_v4 + - id: idf_v51 + base: idf_v51 yaml-file: ".test/esphome_idf_ble_tracker.yaml" - - id: idf_v5 - base: idf_v5 - yaml-file: ".test/esphome_idf5_ble_tracker.yaml" + - id: idf_v53 + base: idf_v53 + yaml-file: ".test/esphome_idf53_ble_tracker.yaml" steps: - name: Checkout repository @@ -214,12 +214,12 @@ jobs: strategy: matrix: include: - - id: idf_v4 - base: idf_v4 + - id: idf_v51 + base: idf_v51 yaml-file: ".test/esphome_idf_bluetooth_proxy.yaml" - - id: idf_v5 - base: idf_v5 - yaml-file: ".test/esphome_idf5_bluetooth_proxy.yaml" + - id: idf_v53 + base: idf_v53 + yaml-file: ".test/esphome_idf53_bluetooth_proxy.yaml" steps: - name: Checkout repository @@ -238,12 +238,12 @@ jobs: strategy: matrix: include: - - id: idf_v4 - base: idf_v4 + - id: idf_v51 + base: idf_v51 yaml-file: ".test/esphome_idf_climate_cool.yaml" - - id: idf_v5 - base: idf_v5 - yaml-file: ".test/esphome_idf5_climate_cool.yaml" + - id: idf_v53 + base: idf_v53 + yaml-file: ".test/esphome_idf53_climate_cool.yaml" - id: ard base: ard yaml-file: ".test/esphome_ard_climate_cool.yaml" @@ -265,12 +265,12 @@ jobs: strategy: matrix: include: - - id: idf_v4 - base: idf_v4 + - id: idf_v51 + base: idf_v51 yaml-file: ".test/esphome_idf_climate_heat.yaml" - - id: idf_v5 - base: idf_v5 - yaml-file: ".test/esphome_idf5_climate_heat.yaml" + - id: idf_v53 + base: idf_v53 + yaml-file: ".test/esphome_idf53_climate_heat.yaml" - id: ard base: ard yaml-file: ".test/esphome_ard_climate_heat.yaml" @@ -292,12 +292,12 @@ jobs: strategy: matrix: include: - - id: idf_v4 - base: idf_v4 + - id: idf_v51 + base: idf_v51 yaml-file: ".test/esphome_idf_climate_dual.yaml" - - id: idf_v5 - base: idf_v5 - yaml-file: ".test/esphome_idf5_climate_dual.yaml" + - id: idf_v53 + base: idf_v53 + yaml-file: ".test/esphome_idf53_climate_dual.yaml" - id: ard base: ard yaml-file: ".test/esphome_ard_climate_dual.yaml" @@ -321,8 +321,8 @@ jobs: strategy: matrix: include: - - id: idf_v4 - base: idf_v4 + - id: idf_v51 + base: idf_v51 yaml-file: ".test/esphome_idf_advanced_climate_heat_customizations.yaml" - id: ard base: ard @@ -347,8 +347,8 @@ jobs: strategy: matrix: include: - - id: idf_v4 - base: idf_v4 + - id: idf_v51 + base: idf_v51 yaml-file: ".test/esphome_idf_climate_cool_bluetooth_proxy.yaml" steps: @@ -369,12 +369,12 @@ jobs: strategy: matrix: include: - - id: idf_v4 - base: idf_v4 + - id: idf_v51 + base: idf_v51 yaml-file: ".test/esphome_idf_cover.yaml" - - id: idf_v5 - base: idf_v5 - yaml-file: ".test/esphome_idf5_cover.yaml" + - id: idf_v53 + base: idf_v53 + yaml-file: ".test/esphome_idf53_cover.yaml" - id: ard base: ard yaml-file: ".test/esphome_ard_cover.yaml" diff --git a/.test/esphome_idf5_advanced.yaml b/.test/esphome_idf53_advanced.yaml similarity index 61% rename from .test/esphome_idf5_advanced.yaml rename to .test/esphome_idf53_advanced.yaml index 70f69e32f..3a75738ff 100644 --- a/.test/esphome_idf5_advanced.yaml +++ b/.test/esphome_idf53_advanced.yaml @@ -12,7 +12,6 @@ packages: esp32: framework: type: esp-idf - version: 5.1.5 - source: https://github.com/pioarduino/esp-idf/releases/download/v5.1.5/esp-idf-v5.1.5.zip - platform_version: https://github.com/pioarduino/platform-espressif32/releases/download/51.03.07/platform-espressif32.zip + version: 5.3.1 + platform_version: 6.9.0 ... diff --git a/.test/esphome_idf5_basic.yaml b/.test/esphome_idf53_basic.yaml similarity index 56% rename from .test/esphome_idf5_basic.yaml rename to .test/esphome_idf53_basic.yaml index 18d07db53..27d119bb8 100644 --- a/.test/esphome_idf5_basic.yaml +++ b/.test/esphome_idf53_basic.yaml @@ -11,7 +11,6 @@ packages: esp32: framework: type: esp-idf - version: 5.1.5 - source: https://github.com/pioarduino/esp-idf/releases/download/v5.1.5/esp-idf-v5.1.5.zip - platform_version: https://github.com/pioarduino/platform-espressif32/releases/download/51.03.07/platform-espressif32.zip + version: 5.3.1 + platform_version: 6.9.0 ... diff --git a/.test/esphome_idf5_ble_tracker.yaml b/.test/esphome_idf53_ble_tracker.yaml similarity index 61% rename from .test/esphome_idf5_ble_tracker.yaml rename to .test/esphome_idf53_ble_tracker.yaml index 97c1a13d2..476b42f06 100644 --- a/.test/esphome_idf5_ble_tracker.yaml +++ b/.test/esphome_idf53_ble_tracker.yaml @@ -12,7 +12,6 @@ packages: esp32: framework: type: esp-idf - version: 5.1.5 - source: https://github.com/pioarduino/esp-idf/releases/download/v5.1.5/esp-idf-v5.1.5.zip - platform_version: https://github.com/pioarduino/platform-espressif32/releases/download/51.03.07/platform-espressif32.zip + version: 5.3.1 + platform_version: 6.9.0 ... diff --git a/.test/esphome_idf5_bluetooth_proxy.yaml b/.test/esphome_idf53_bluetooth_proxy.yaml similarity index 62% rename from .test/esphome_idf5_bluetooth_proxy.yaml rename to .test/esphome_idf53_bluetooth_proxy.yaml index d44b0264b..27146ac85 100644 --- a/.test/esphome_idf5_bluetooth_proxy.yaml +++ b/.test/esphome_idf53_bluetooth_proxy.yaml @@ -12,7 +12,6 @@ packages: esp32: framework: type: esp-idf - version: 5.1.5 - source: https://github.com/pioarduino/esp-idf/releases/download/v5.1.5/esp-idf-v5.1.5.zip - platform_version: https://github.com/pioarduino/platform-espressif32/releases/download/51.03.07/platform-espressif32.zip + version: 5.3.1 + platform_version: 6.9.0 ... diff --git a/.test/esphome_idf5_climate_cool.yaml b/.test/esphome_idf53_climate_cool.yaml similarity index 61% rename from .test/esphome_idf5_climate_cool.yaml rename to .test/esphome_idf53_climate_cool.yaml index ede2eec64..e5587b8eb 100644 --- a/.test/esphome_idf5_climate_cool.yaml +++ b/.test/esphome_idf53_climate_cool.yaml @@ -12,7 +12,6 @@ packages: esp32: framework: type: esp-idf - version: 5.1.5 - source: https://github.com/pioarduino/esp-idf/releases/download/v5.1.5/esp-idf-v5.1.5.zip - platform_version: https://github.com/pioarduino/platform-espressif32/releases/download/51.03.07/platform-espressif32.zip + version: 5.3.1 + platform_version: 6.9.0 ... diff --git a/.test/esphome_idf5_climate_dual.yaml b/.test/esphome_idf53_climate_dual.yaml similarity index 61% rename from .test/esphome_idf5_climate_dual.yaml rename to .test/esphome_idf53_climate_dual.yaml index 84d905d33..34d6550af 100644 --- a/.test/esphome_idf5_climate_dual.yaml +++ b/.test/esphome_idf53_climate_dual.yaml @@ -12,7 +12,6 @@ packages: esp32: framework: type: esp-idf - version: 5.1.5 - source: https://github.com/pioarduino/esp-idf/releases/download/v5.1.5/esp-idf-v5.1.5.zip - platform_version: https://github.com/pioarduino/platform-espressif32/releases/download/51.03.07/platform-espressif32.zip + version: 5.3.1 + platform_version: 6.9.0 ... diff --git a/.test/esphome_idf5_climate_heat.yaml b/.test/esphome_idf53_climate_heat.yaml similarity index 61% rename from .test/esphome_idf5_climate_heat.yaml rename to .test/esphome_idf53_climate_heat.yaml index fb2f0945a..c323172be 100644 --- a/.test/esphome_idf5_climate_heat.yaml +++ b/.test/esphome_idf53_climate_heat.yaml @@ -12,7 +12,6 @@ packages: esp32: framework: type: esp-idf - version: 5.1.5 - source: https://github.com/pioarduino/esp-idf/releases/download/v5.1.5/esp-idf-v5.1.5.zip - platform_version: https://github.com/pioarduino/platform-espressif32/releases/download/51.03.07/platform-espressif32.zip + version: 5.3.1 + platform_version: 6.9.0 ... diff --git a/.test/esphome_idf5_core.yaml b/.test/esphome_idf53_core.yaml similarity index 57% rename from .test/esphome_idf5_core.yaml rename to .test/esphome_idf53_core.yaml index 55726673b..d177d5a3b 100644 --- a/.test/esphome_idf5_core.yaml +++ b/.test/esphome_idf53_core.yaml @@ -11,7 +11,6 @@ packages: esp32: framework: type: esp-idf - version: 5.1.5 - source: https://github.com/pioarduino/esp-idf/releases/download/v5.1.5/esp-idf-v5.1.5.zip - platform_version: https://github.com/pioarduino/platform-espressif32/releases/download/51.03.07/platform-espressif32.zip + version: 5.3.1 + platform_version: 6.9.0 ... diff --git a/.test/esphome_idf5_cover.yaml b/.test/esphome_idf53_cover.yaml similarity index 61% rename from .test/esphome_idf5_cover.yaml rename to .test/esphome_idf53_cover.yaml index 1b3a0cee5..0aa01753e 100644 --- a/.test/esphome_idf5_cover.yaml +++ b/.test/esphome_idf53_cover.yaml @@ -12,7 +12,6 @@ packages: esp32: framework: type: esp-idf - version: 5.1.5 - source: https://github.com/pioarduino/esp-idf/releases/download/v5.1.5/esp-idf-v5.1.5.zip - platform_version: https://github.com/pioarduino/platform-espressif32/releases/download/51.03.07/platform-espressif32.zip + version: 5.3.1 + platform_version: 6.9.0 ... diff --git a/ReleaseNotes.md b/ReleaseNotes.md index cd820a5c2..dd811d1a6 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,12 +1,41 @@ # v4.4 - Dynamic QR Codes, Improved Usability, and More ## General -Version 4.4 focuses on enhancing the usability and functionality of your NSPanel. The device page has been +Version 4.4 focuses on enhancing the usability and functionality of your NSPanel. The device page has been refined for a cleaner, more user-friendly experience, now allowing you to control the panel as a light. -In addition to improved performance, this release introduces dynamic QR codes, automatic TFT updates, and +In addition to improved performance, this release introduces dynamic QR codes, automatic TFT updates, and new features like buzzer volume control and configurable wake-up settings, making your panel more versatile. +## ESPHome Adopts ESP-IDF v5.1.5 (Starting in ESPHome v2024.12.0) +With ESPHome v2024.12.0, the standard framework version has been updated from ESP-IDF v4.4.8 to v5.1.5. +This update introduces significant improvements but also comes with considerations for memory usage. + +### Advantages of ESP-IDF v5.1.5 +- **Bug Fixes and Stability:** + The new version includes a wide range of bug fixes, enhancing system reliability and performance. +- **Improved Features and Compatibility:** + Upgrades to the framework ensure better support for modern hardware and streamlined development processes. +- **Enhanced Developer Experience:** + New debugging tools and improvements in the framework simplify the development and troubleshooting process. + +### Concerns and Impact +- **Increased Memory Usage:** + ESP-IDF v5.1.5 requires slightly more memory, reducing the space available for additional features. + This may limit the scope of customizations or add-ons for users with resource-intensive setups. + +### NSPanel Preparedness +- Pre-built firmware and Wall Display variant will continue using ESP-IDF v4.4.8 to maintain full functionality including improv, captive portal, and OTA HTTP +- Regular installations benefit from v5.1.5 improvements +- We have fully tested the NSPanel setup with ESP-IDF v5.1.5 under ESPHome v2024.12.0 to ensure compatibility and smooth operation + +### Recommendations +- **Advanced Users:** + If you have a heavily customized configuration or multiple add-ons, consider reviewing your setup to ensure + it remains within the available memory constraints. +- **All Users:** + Stay updated with ESPHome releases and monitor their compatibility notes to make the most of these enhancements. + ## Breaking Changes and Guidance ### Home Assistant v2024.11.0 and ESPHome v2024.11.0 are required @@ -49,7 +78,7 @@ All actions now use a unified method to transfer information, reducing overhead between ESPHome and Nextion. Visit the updated [API documentation](docs/api.md) for details. #### Key API Changes: -1. **Deprecated actions** +1. **Deprecated actions** | Deprecated action | Replacement | Previous use | | :--------------------------------- | :----------------------- | :----------------------------- | @@ -59,20 +88,22 @@ between ESPHome and Nextion. Visit the updated [API documentation](docs/api.md) | `component_text`, `icon`, etc. | [`component`](docs/api.md#component-action-component) | Set display components | -2. **Sensor `blueprint_status` removed** - Boot info is now transferred via events. +2. **Sensors `blueprint_status` and `device_name` removed** + Device's and boot info is now transferred via events. 3. **Notification unread switch replaced** The "**Notification unread**" switch is now a binary sensor. -4. **Selector "Update TFT display - Baud rate" removed** - The baud rate selector has been removed as full support for all baud rates used by Nextion makes it redundant. - Communication now adapts automatically to the required baud rate, simplifying configuration. +4. **Baud rate selectors removed** + Communication now detects the Nextion display's current baud rate + and changes it to 921,600bps (default target rate). + Therefore the baud rate selectors have been removed, simplifying configuration. + A substitution named `BAUD_RATE` can be used by advanced users to change the target baud rate. -5. **New "Display delay" control** - A new control called **Display delay** has been introduced to manage the delay between commands sent to the Nextion display. +5. **New "Display Command Spacing" control** + A new control called **Display Command Spacing** has been introduced to manage the delay between commands sent to the Nextion display. This helps avoid buffer overflows, which can lead to a device restart if not managed properly. - You can find more details in the [Performance Settings for NSPanel Project](docs/performance.md#2-esphome-performance-setting-display-delay). + You can find more details in the [Performance Settings for NSPanel Project](docs/performance.md#2-esphome-performance-setting-display-command-spacing). ### Customizations Updated scripts require adjustments to these customizations: @@ -92,14 +123,14 @@ certain functionalities to free up resources for other uses. #### Background Previously, we introduced the concept of `add-ons`, which allowed your panel to act as a Bluetooth proxy, local thermostat, or cover control, extending its capabilities beyond the core functionality. -Now, we’re taking a step further by splitting the core functionality into "Core" and "Standard" categories: +Now, we're taking a step further by splitting the core functionality into "Core" and "Standard" categories: - **Core Functionality:** Essential features required for any panel installation. - **Standard Functionality:** Common features included by default in regular installations, but optional for advanced users. #### Benefits of the Split 1. **Resource Optimization:** Advanced users can remove unused functionalities, freeing up memory for custom uses unrelated to this project. - - Example: If you’re not using hardware relays, you can remove the package for Hardware Relays to free up resources. + - Example: If you're not using hardware relays, you can remove the package for Hardware Relays to free up resources. - Similarly, if cover control is not used, you can exclude the related code. 2. **Improved Code Management:** @@ -110,18 +141,6 @@ Now, we’re taking a step further by splitting the core functionality into "Cor While currently targeted at advanced users, this split lays the groundwork for making functionality selection more accessible for all users, including entry-level users, in future releases. -#### Example Use Case -To customize your installation and include only the functionalities you need: -```yaml -packages: - # Include only the features you need: - standard_relay: !include packages/standard_relay.yaml # Remove this line if relays are not needed - standard_cover: !include packages/standard_cover.yaml # Remove this line if cover control is not needed - core: !include packages/core.yaml # Core functionality (mandatory) -``` -This split not only optimizes resources but also simplifies customization, troubleshooting, and development, -making it easier to focus on specific areas of the code without affecting others. - #### What's Next While this change is currently focused on advanced users, we are working towards making it easier for all users, allowing everyone to select what functionalities they want during installation in a more intuitive way. @@ -178,7 +197,7 @@ Automatic TFT updates now trigger when an outdated version is detected, minimizi All components (Blueprint, ESPHome, and TFT) now enforce patch-level version consistency, ensuring reliability. ### Panel display control via light entity -Added a light entity for controlling the display’s brightness, waking it up, or putting it to sleep. +Added a light entity for controlling the display's brightness, waking it up, or putting it to sleep. Remove any existing custom YAML configuration for display control. **Related Issues:** diff --git a/components/nspanel_ha_blueprint/core_boot.h b/components/nspanel_ha_blueprint/core_boot.h index 3c0cefb7b..c4e4e6bb8 100644 --- a/components/nspanel_ha_blueprint/core_boot.h +++ b/components/nspanel_ha_blueprint/core_boot.h @@ -26,7 +26,7 @@ namespace nspanel_ha_blueprint { }; // Fixed array to store the boot steps - static constexpr size_t MAX_BOOT_STEPS = 32; + static constexpr size_t MAX_BOOT_STEPS = 35; extern BootStep boot_steps[MAX_BOOT_STEPS]; // Function to set up the boot steps array diff --git a/components/nspanel_ha_blueprint/core_hw_wifi.h b/components/nspanel_ha_blueprint/core_hw_wifi.h new file mode 100644 index 000000000..16b30860c --- /dev/null +++ b/components/nspanel_ha_blueprint/core_hw_wifi.h @@ -0,0 +1,74 @@ +// core_hw_wifi.h + +#pragma once + +#ifdef NSPANEL_HA_BLUEPRINT_CORE_HW_WIFI + +#ifndef CORE_HW_WIFI_H +#define CORE_HW_WIFI_H + +#include +#include +#include +#include "esphome/core/log.h" + +namespace nspanel_ha_blueprint { + + // Method to slugify a raw name + std::string slugify(const std::string &raw_name) { + std::string result; + bool last_was_underscore = false; + + for (const char& c : raw_name) { + if (isalnum(c)) { + result += tolower(c); // Add alphanumeric characters as lowercase + last_was_underscore = false; + } else if (!last_was_underscore) { // Replace non-alphanumeric with '_', avoiding consecutive '_' + result += '_'; + last_was_underscore = true; + } + } + + // Trim leading and trailing underscores + if (!result.empty() && result.front() == '_') result.erase(0, 1); + if (!result.empty() && result.back() == '_') result.pop_back(); + + return result; + } + + /** + * Generate a device name based on a raw name, optionally appending a MAC address suffix. + * + * This function constructs a device name by taking the provided `raw_name` and appending + * the last three bytes of the Wi-Fi MAC address as a suffix if available. If the MAC + * address cannot be fetched or if Wi-Fi is not used, the function returns the raw name + * unchanged. + * + * @param raw_name The base name for the device, provided as input. + * @return A slugified string representing the generated device name. + */ + std::string generate_device_name(const std::string &raw_name) { + std::string full_name = raw_name; // Start with the raw name + +#ifdef ESP_MAC_WIFI_STA + uint8_t mac[6]; + if (esp_read_mac(mac, ESP_MAC_WIFI_STA) == ESP_OK) { + // Add MAC suffix if it can be read + char hex_suffix[7]; + snprintf(hex_suffix, sizeof(hex_suffix), "%02X%02X%02X", mac[3], mac[4], mac[5]); + full_name += "-" + std::string(hex_suffix); +#if ESPHOME_LOG_LEVEL >= ESPHOME_LOG_LEVEL_WARNING + } else { + esphome::ESP_LOGW("generate_device_name", "Failed to read MAC address! Suffix not added."); +#endif // ESPHOME_LOG_LEVEL + } +#endif // ESP_MAC_WIFI_STA + + return slugify(full_name); // Slugify the name + } + +} // namespace nspanel_ha_blueprint + +#endif // CORE_HW_WIFI_H + +#endif // NSPANEL_HA_BLUEPRINT_CORE_HW_WIFI diff --git a/components/nspanel_ha_blueprint/standard_page_buttons.h b/components/nspanel_ha_blueprint/standard_page_buttons.h index e27f835ca..20ad3cce4 100644 --- a/components/nspanel_ha_blueprint/standard_page_buttons.h +++ b/components/nspanel_ha_blueprint/standard_page_buttons.h @@ -30,6 +30,13 @@ namespace nspanel_ha_blueprint { // Pointer to the static button's array, allocated in PSRAM if possible PageButtonsButton* buttonpage_buttons; + char* get_button_name(const uint8_t button_id) { + // Determine the base component name + static char base_component[9]; + snprintf(base_component, sizeof(base_component), "button%02d", (button_id % 8) + 1); + return base_component; + } + // Function to set up all buttons in the PSRAM void setup_pagebuttons_buttons() { if (!PageButtonsButtonInitilized) { @@ -52,18 +59,14 @@ namespace nspanel_ha_blueprint { // Calculate page and button identifiers const uint8_t page_id = (i / 8) + 12; // PAGE_ID_BUTTONPAGE01: '12' - // Determine the base component name - char base_component[15]; - snprintf(base_component, sizeof(base_component), "button%02d", (i % 8) + 1); - // Use the component ID to identify each component in the Nextion, with suffixes char bri_component[20]; char icon_component[20]; char label_component[20]; - snprintf(bri_component, sizeof(bri_component), "%sbri", base_component); - snprintf(icon_component, sizeof(icon_component), "%sicon", base_component); - snprintf(label_component, sizeof(label_component), "%stext", base_component); + snprintf(bri_component, sizeof(bri_component), "%sbri", get_button_name(i)); + snprintf(icon_component, sizeof(icon_component), "%sicon", get_button_name(i)); + snprintf(label_component, sizeof(label_component), "%stext", get_button_name(i)); // Assign pointers to the respective DisplayComponent using get_component buttonpage_buttons[i].bri = get_component(page_id, bri_component); @@ -84,7 +87,7 @@ namespace nspanel_ha_blueprint { return (index % 8) + 1; // Calculate the button ID within the page (1-based button numbering) } - bool is_page_enabled(const uint8_t buttonpage_index, const uint32_t mask) { + bool is_button_page_enabled(const uint8_t buttonpage_index, const uint32_t mask) { // Ensure the buttonpage_index is within the valid range (1-4) if (buttonpage_index < 1 || buttonpage_index > 4) { return false; diff --git a/components/nspanel_ha_blueprint/text.cpp b/components/nspanel_ha_blueprint/text.cpp index 41ea66505..b391d0020 100644 --- a/components/nspanel_ha_blueprint/text.cpp +++ b/components/nspanel_ha_blueprint/text.cpp @@ -61,4 +61,30 @@ namespace nspanel_ha_blueprint { return processed_time_format; } + uint32_t decode_utf8(const char* bytes) { + if (!bytes || bytes[0] == '\0') { + return 0; + } + uint32_t code_point = 0; + unsigned char byte = static_cast(bytes[0]); + if ((byte & 0x80) == 0x00) { + code_point = byte; + } else if ((byte & 0xE0) == 0xC0 && bytes[1] != '\0') { + code_point = ((byte & 0x1F) << 6) | (static_cast(bytes[1]) & 0x3F); + } else if ((byte & 0xF0) == 0xE0 && bytes[1] != '\0' && bytes[2] != '\0') { + code_point = ((byte & 0x0F) << 12) | + ((static_cast(bytes[1]) & 0x3F) << 6) | + (static_cast(bytes[2]) & 0x3F); + } else if ((byte & 0xF8) == 0xF0 && bytes[1] != '\0' && bytes[2] != '\0' && bytes[3] != '\0') { + code_point = ((byte & 0x07) << 18) | + ((static_cast(bytes[1]) & 0x3F) << 12) | + ((static_cast(bytes[2]) & 0x3F) << 6) | + (static_cast(bytes[3]) & 0x3F); + } else { + code_point = 0; + } + return code_point; + } + + } // namespace nspanel_ha_blueprint diff --git a/components/nspanel_ha_blueprint/text.h b/components/nspanel_ha_blueprint/text.h index 8927fce2e..1914dc59a 100644 --- a/components/nspanel_ha_blueprint/text.h +++ b/components/nspanel_ha_blueprint/text.h @@ -37,30 +37,7 @@ namespace nspanel_ha_blueprint { std::string process_time_format(const std::string &time_format, int current_hour, const std::string &meridiem_am, const std::string &meridiem_pm); - inline uint32_t decode_utf8(const char* bytes) { - if (!bytes || bytes[0] == '\0') { - return 0; - } - uint32_t code_point = 0; - unsigned char byte = static_cast(bytes[0]); - if ((byte & 0x80) == 0x00) { - code_point = byte; - } else if ((byte & 0xE0) == 0xC0 && bytes[1] != '\0') { - code_point = ((byte & 0x1F) << 6) | (static_cast(bytes[1]) & 0x3F); - } else if ((byte & 0xF0) == 0xE0 && bytes[1] != '\0' && bytes[2] != '\0') { - code_point = ((byte & 0x0F) << 12) | - ((static_cast(bytes[1]) & 0x3F) << 6) | - (static_cast(bytes[2]) & 0x3F); - } else if ((byte & 0xF8) == 0xF0 && bytes[1] != '\0' && bytes[2] != '\0' && bytes[3] != '\0') { - code_point = ((byte & 0x07) << 18) | - ((static_cast(bytes[1]) & 0x3F) << 12) | - ((static_cast(bytes[2]) & 0x3F) << 6) | - (static_cast(bytes[3]) & 0x3F); - } else { - code_point = 0; - } - return code_point; - } + uint32_t decode_utf8(const char* bytes); inline std::string get_page_and_component(const std::string& page, const std::string& component) { return page + "." + component; diff --git a/docs/performance.md b/docs/performance.md index d88fc2580..86099ec6f 100644 --- a/docs/performance.md +++ b/docs/performance.md @@ -29,7 +29,7 @@ This delay helps prevent consecutive calls from overloading both the WLAN and th Adjusting this delay can help manage the network load and ensure that the commands are spaced out properly, allowing the NSPanel and WLAN to process them without being overwhelmed. -## 2. ESPHome Performance Setting: Display Delay +## 2. ESPHome Performance Setting: Display Command Spacing On the ESPHome side, the performance setting involves configuring a delay when sending commands to the Nextion display. This delay is critical in preventing the "Buffer overload" issue that can occur on the Nextion display. @@ -37,23 +37,23 @@ This delay is critical in preventing the "Buffer overload" issue that can occur ### Where to Find It - Integrations - **Location:** This setting can be found on the ESPHome device's page under `Settings > Devices & Services > ESPHome`. - **Configuration Group:** Look for the setting under the "Configuration" group. -- **Name:** The setting is named **"Display delay"**. +- **Name:** The setting is named **"Display Command Spacing"**. Note that this setting may be hidden or disabled in some systems. You may need to enable it before you can adjust its value. ### Purpose -The **Display Delay** setting prevents buffer overload on the Nextion display, which occurs when too many commands are received and cannot be processed in time. +The **Display Command Spacing** setting prevents buffer overload on the Nextion display, which occurs when too many commands are received and cannot be processed in time. If the buffer overloads, the Nextion queue will fall out of sync, leading to a device restart. Each time this restart occurs, the delay will automatically increase one step in the delay interval (measured in milliseconds). ## Combining Delays: Impact on Responsiveness The two delay settings (Blueprint and ESPHome) are combined, which can lead to a slower response time on the panel. You can reduce these intervals to improve the panel's responsiveness. -However, it's important to note that reducing the **Display Delay** on the ESPHome side too much can lead to buffer overflows, causing instability. +However, it's important to note that reducing the **Display Command Spacing** on the ESPHome side too much can lead to buffer overflows, causing instability. ### Recommendations - **Fine-Tune the Blueprint Delay** to manage WLAN and command pacing effectively. -- **Adjust ESPHome Display Delay Carefully**: Lowering it too much can lead to buffer issues. +- **Adjust ESPHome Display Command Spacing Carefully**: Lowering it too much can lead to buffer issues. Start with a conservative value and decrease it slowly while monitoring performance. Maintaining a balance between the two settings is essential to ensure a responsive and stable NSPanel experience. diff --git a/esphome/nspanel_esphome_addon_climate_base.yaml b/esphome/nspanel_esphome_addon_climate_base.yaml index bff2bda23..9b50bea6d 100644 --- a/esphome/nspanel_esphome_addon_climate_base.yaml +++ b/esphome/nspanel_esphome_addon_climate_base.yaml @@ -25,6 +25,7 @@ substitutions: cool_overrun: "0.5" # Temperature delta before disengaging cooling heat_deadband: "0.5" # Temperature delta before engaging heat heat_overrun: "0.5" # Temperature delta before disengaging heat + BOOT_STEP_ADDON_CLIMATE: '32' esphome: platformio_options: @@ -105,6 +106,10 @@ switch: optimistic: true script: + - id: !extend boot_package_register + then: + - lambda: boot_package_register_add->execute(${BOOT_STEP_ADDON_CLIMATE}, "ADDON_CLIMATE", "Add-on Climate"); + - id: !extend boot_sequence then: - lambda: |- diff --git a/esphome/nspanel_esphome_addon_ota_http.yaml b/esphome/nspanel_esphome_addon_ota_http.yaml new file mode 100644 index 000000000..68a335f05 --- /dev/null +++ b/esphome/nspanel_esphome_addon_ota_http.yaml @@ -0,0 +1,79 @@ +##################################################################################################### +##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint ##### +##### ESPHome Add-on for OTA over HTTP (Used by pre-built versions) ##### +##### PLEASE only make changes if it is necessary and also the required knowledge is available. ##### +##### For normal use with the Blueprint, no changes are necessary. ##### +##################################################################################################### +##### ATTENTION: This will add climate elements to the core system and requires the core part. ##### +##################################################################################################### +--- +substitutions: + firmware_bin: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/prebuilt/nspanel_esphome_prebuilt.bin" + firmware_manifest: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/prebuilt/nspanel_esphome_prebuilt.manifest.json" + +esphome: + platformio_options: + build_flags: + - -D NSPANEL_HA_BLUEPRINT_ADDON_OTA_HTTP + +api: + actions: + - action: firmware_update + variables: + url: string + then: + - ota.http_request.flash: + md5_url: !lambda return fw_url->state + ".md5"; + url: !lambda return fw_url->state; + - logger.log: + format: "Firmware update failed!" + level: ERROR + +button: + - id: bt_firmware_update + name: Firmware update + platform: template + on_press: + then: + - ota.http_request.flash: + md5_url: !lambda return fw_url->state + ".md5"; + url: !lambda return fw_url->state; + - logger.log: + format: "Firmware update failed!" + level: ERROR + +http_request: + +ota: + - id: ota_web + platform: http_request + +script: + - id: !extend dump_config_packages # Defined by nspanel_esphome_core_base.yaml + then: + - lambda: |- + ESP_LOGCONFIG("${project_tag}", " - Add-on OTA HTTP"); + +text: + - id: fw_url + name: Firmware URL + platform: template + icon: mdi:cloud-download + mode: text + optimistic: true + entity_category: config + internal: false + update_interval: never + restore_value: true + initial_value: ${firmware_bin} + on_value: + then: + - lambda: |- + ESP_LOGI("text.fw_url", "New Firmware URL set: %s", x.c_str()); + +update: + - id: update_std + platform: http_request + name: Firmware Update + source: ${firmware_manifest} +... diff --git a/esphome/nspanel_esphome_core.yaml b/esphome/nspanel_esphome_core.yaml index c78174818..d513db7a5 100644 --- a/esphome/nspanel_esphome_core.yaml +++ b/esphome/nspanel_esphome_core.yaml @@ -12,18 +12,17 @@ esphome: packages: # yamllint disable rule:colons - versioning: !include nspanel_esphome_core_versioning.yaml - api: !include nspanel_esphome_core_api.yaml - base: !include nspanel_esphome_core_base.yaml - boot: !include nspanel_esphome_core_boot.yaml - datetime: !include nspanel_esphome_core_datetime.yaml - hw_buttons: !include nspanel_esphome_core_hw_buttons.yaml - hw_display: !include nspanel_esphome_core_hw_display.yaml - hw_display_timers: !include nspanel_esphome_core_hw_display_timers.yaml - hw_memory: !include nspanel_esphome_core_hw_memory.yaml - hw_wifi: !include nspanel_esphome_core_hw_wifi.yaml - page_boot: !include nspanel_esphome_core_page_boot.yaml - page_home: !include nspanel_esphome_core_page_home.yaml - page_screensaver: !include nspanel_esphome_core_page_screensaver.yaml + versioning: !include nspanel_esphome_core_versioning.yaml + api: !include nspanel_esphome_core_api.yaml + base: !include nspanel_esphome_core_base.yaml + boot: !include nspanel_esphome_core_boot.yaml + datetime: !include nspanel_esphome_core_datetime.yaml + hw_buttons: !include nspanel_esphome_core_hw_buttons.yaml + hw_display: !include nspanel_esphome_core_hw_display.yaml + hw_memory: !include nspanel_esphome_core_hw_memory.yaml + hw_wifi: !include nspanel_esphome_core_hw_wifi.yaml + page_boot: !include nspanel_esphome_core_page_boot.yaml + page_home: !include nspanel_esphome_core_page_home.yaml + page_screensaver: !include nspanel_esphome_core_page_screensaver.yaml # yamllint enable rule:colons ... diff --git a/esphome/nspanel_esphome_core_api.yaml b/esphome/nspanel_esphome_core_api.yaml index 7efae6002..4a9adbe19 100644 --- a/esphome/nspanel_esphome_core_api.yaml +++ b/esphome/nspanel_esphome_core_api.yaml @@ -118,7 +118,7 @@ script: - homeassistant.event: event: esphome.nspanel_ha_blueprint data: - device_name: !lambda return device_name->state.c_str(); + device_name: !lambda return id(device_name).c_str(); esphome_version: ${version} type: button_click page: !lambda return page_names[page_id]; @@ -136,7 +136,7 @@ script: - homeassistant.event: event: esphome.nspanel_ha_blueprint data: - device_name: !lambda return device_name->state.c_str(); + device_name: !lambda return id(device_name).c_str(); esphome_version: ${version} type: action_call action: !lambda return action.c_str(); diff --git a/esphome/nspanel_esphome_core_base.yaml b/esphome/nspanel_esphome_core_base.yaml index dacb8c8c2..bdbee616e 100644 --- a/esphome/nspanel_esphome_core_base.yaml +++ b/esphome/nspanel_esphome_core_base.yaml @@ -40,7 +40,6 @@ esphome: name: ${name} friendly_name: ${friendly_name} comment: NSPanel HA Blueprint - min_version: 2024.8.0 project: name: esphome.NSPanel_HA_Blueprint platformio_options: @@ -63,11 +62,6 @@ globals: restore_value: false initial_value: 'false' -# - id: max_loop_time -# type: uint32_t -# restore_value: true -# initial_value: '0' - logger: id: logger_std baud_rate: 0 # Disable serial logger to save some memory and CPU @@ -196,8 +190,8 @@ script: - lambda: return not id(is_safe_mode); then: - lambda: id(is_safe_mode) = true; - - switch.turn_off: screen_power - - delay: 30s + - switch.toggle: screen_power + - delay: 10s - id: stop_all mode: restart diff --git a/esphome/nspanel_esphome_core_boot.yaml b/esphome/nspanel_esphome_core_boot.yaml index 884cf34fa..1f47386cb 100644 --- a/esphome/nspanel_esphome_core_boot.yaml +++ b/esphome/nspanel_esphome_core_boot.yaml @@ -23,7 +23,7 @@ display: then: - lambda: |- disp1->send_command("esphome=0"); - set_brightness->execute(100); + disp1->set_backlight_brightness(1); nextion_init->publish_state(disp1->is_setup()); on_touch: @@ -52,27 +52,20 @@ esphome: then: - script.execute: boot_initialize - - priority: 600.1 + - priority: 400.1 then: - - script.execute: - id: boot_sequence - show_boot_page: true + - script.execute: boot_sequence_start script: - id: boot_event mode: restart then: - - lambda: |- - ESP_LOGW("DEBUG", "boot_event called"); + - script.wait: scan_baud_rate - delay: 20s - - lambda: |- - ESP_LOGW("DEBUG", "boot_event checking"); - while: condition: - lambda: return not is_boot_complete(); then: - - lambda: |- - ESP_LOGW("DEBUG", "boot_event informing HA"); - script.execute: id: boot_event_ha step_name: timeout @@ -83,13 +76,13 @@ script: parameters: step_name: string then: + - script.wait: scan_baud_rate - lambda: |- - ESP_LOGW("DEBUG", "boot_event_ha called with step_name: '%s'", step_name.c_str()); esphome::api::CustomAPIDevice ha_event; std::map event_data; // Adding static data to the event - event_data["device_name"] = device_name->state.c_str(); + event_data["device_name"] = id(device_name).c_str(); event_data["esphome_version"] = "${version}"; event_data["type"] = "boot"; event_data["step"] = step_name.c_str(); @@ -127,7 +120,7 @@ script: then: - lambda: |- const bool package_registered = register_application(package_id, package_key.c_str(), package_name.c_str()); - ESP_LOGI("script", "Package '%s' (id %" PRIu32 "/%s) %s.", package_name.c_str(), + ESP_LOGI("script", "Package '%s' (id %" PRIu8 "/%s) %s.", package_name.c_str(), package_id, package_key.c_str(), package_registered ? "registered" : "FAILED TO REGISTER"); - id: boot_progress @@ -147,19 +140,15 @@ script: mode: queued then: - lambda: |- - ESP_LOGI("script", "Boot progress: %" PRIu8 "%% (%" PRIu32 ")", + ESP_LOGI("script", "Boot progress: %" PRIu8 "%% (%" PRIu8 ")", get_boot_progress_percentage(), get_completed_boot_steps()); - if (boot_steps != nullptr) { - for (size_t i = 0; i < MAX_BOOT_STEPS; ++i) { - if (boot_steps[i].registered) { - // Calculate padding based on the actual length of the name - const int8_t padding = std::max(0, 21 - static_cast(strlen(boot_steps[i].name))); - ESP_LOGI("script", " - %s:%*s%s", boot_steps[i].name, padding, "", - boot_steps[i].completed ? "Completed" : "PENDING"); - } + for (size_t i = 0; i < MAX_BOOT_STEPS; ++i) { + if (boot_steps[i].registered) { + // Calculate padding based on the actual length of the name + const int8_t padding = std::max(0, 21 - static_cast(strlen(boot_steps[i].name))); + ESP_LOGI("script", " - %s:%*s%s", boot_steps[i].name, padding, "", + boot_steps[i].completed ? "Completed" : "PENDING"); } - } else { - ESP_LOGE("script", "Boot steps have not been initialized."); } - id: boot_progress_dump_timer @@ -176,6 +165,7 @@ script: parameters: show_boot_page: bool then: + - script.wait: scan_baud_rate - lambda: |- page_boot_log->execute("Boot", "Starting boot sequence"); if (!show_boot_page) @@ -187,7 +177,7 @@ script: - wait_until: condition: - lambda: return disp1->is_setup(); - timeout: 10s + - lambda: return (tf_uart->get_baud_rate() == ${BAUD_RATE}); - if: condition: - lambda: return show_boot_page; @@ -218,10 +208,18 @@ script: timeout: 10s - lambda: |- page_boot_log->execute("Boot", "Report to Blueprint"); - boot_event_ha->execute("start"); + boot_event_ha->execute("ready"); boot_progress->execute(${BOOT_STEP_BOOT}); boot_event->execute(); + - id: boot_sequence_start + mode: restart + then: + - script.wait: scan_baud_rate + - script.execute: + id: boot_sequence + show_boot_page: true + - id: !extend dump_config then: - lambda: |- @@ -229,7 +227,7 @@ script: ESP_LOGI("${project_tag}", "Boot steps: %" PRIu8 "/%" PRIu8 " (100%%)", get_completed_boot_steps(), get_total_registered_boot_steps()); else { - ESP_LOGW("${project_tag}", "Boot steps: %" PRIu8 "/%" PRIu8 " (%" PRIu8 "%% - %" PRIu32 ")", + ESP_LOGW("${project_tag}", "Boot steps: %" PRIu8 "/%" PRIu8 " (%" PRIu8 "%% - %" PRIu8 ")", get_completed_boot_steps(), get_total_registered_boot_steps(), get_boot_progress_percentage(), get_completed_boot_steps()); ESP_LOGW("${project_tag}", " State: %s", @@ -266,4 +264,6 @@ script: boot_package_register->stop(); boot_progress->stop(); boot_progress_dump_timer->stop(); + boot_sequence->stop(); + boot_sequence_start->stop(); ... diff --git a/esphome/nspanel_esphome_core_hw_display.yaml b/esphome/nspanel_esphome_core_hw_display.yaml index a5ffe6b2f..914b942db 100644 --- a/esphome/nspanel_esphome_core_hw_display.yaml +++ b/esphome/nspanel_esphome_core_hw_display.yaml @@ -11,6 +11,12 @@ substitutions: DISPLAY_CHARSET_INTERNATIONAL: '1' DISPLAY_CHARSET_CJK: '2' +packages: + # yamllint disable rule:colons + hw_display_timers: !include nspanel_esphome_core_hw_display_timers.yaml + hw_display_uart: !include nspanel_esphome_core_hw_display_uart.yaml + # yamllint enable rule:colons + api: actions: # Sends custom commands directly to the display for dynamic interactions and updates. @@ -75,23 +81,23 @@ binary_sensor: display: - id: disp1 platform: nextion - uart_id: tf_uart + command_spacing: 1 on_buffer_overflow: then: - - script.execute: display_delay_increment + - script.execute: display_command_spacing_increment on_page: then: - - lambda: page_changed->execute(x); + - lambda: |- + if (x != current_page_id) + page_changed->execute(x); on_setup: - then: - - lambda: |- - // Set the current baud rate into the display - disp1->send_command_printf("bauds=%" PRIu32, tf_uart->get_baud_rate()); + then: # There's nothing here so far # Extended by: # - nspanel_esphome_core_boot.yaml + # - nspanel_esphome_core_hw_display_uart.yaml # - nspanel_esphome_core_page_boot.yaml on_touch: @@ -111,41 +117,15 @@ esphome: build_flags: - -D NSPANEL_HA_BLUEPRINT_CORE_HW_DISPLAY on_boot: - - priority: 600.5 + - priority: 700.${BOOT_STEP_HW_DISPLAY} then: - - if: + - wait_until: condition: - - lambda: return not id(is_safe_mode); - then: - - wait_until: - condition: - - lambda: return (not isnan(stoi(baud_rate->state))); - timeout: 60s - - script.execute: - id: page_boot_log - category: on_boot - log_message: Set baud rate - - lambda: |- - if (stoi(baud_rate->state) != tf_uart->get_baud_rate()) - set_baud_rate->execute(stoi(baud_rate->state), true); - - wait_until: - condition: - - lambda: return disp1->is_setup(); - timeout: 60s - - if: - condition: - - lambda: return (not disp1->is_detected()); - then: - - script.execute: - id: page_boot_log - category: on_boot - log_message: Restart Nextion - - switch.turn_off: screen_power - - delay: 2s - - switch.turn_on: screen_power + - lambda: return (display_command_spacing->state >= 0 and display_command_spacing->state <= UINT8_MAX); + - lambda: disp1->set_command_spacing(static_cast(display_command_spacing->state)); on_shutdown: - - priority: 600.5 + - priority: 600.${BOOT_STEP_HW_DISPLAY} then: - switch.turn_off: screen_power - priority: 0.5 @@ -154,11 +134,12 @@ esphome: id: nextion_init state: false -external_components: # Remove this when PR#7772 is merged +external_components: # To-do: Remove this when both PR#7948 and PR#7961 are merged and released (v2025.1.0?) - source: type: git url: https://github.com/edwardtfn/esphome - ref: nextion-on-buffer-overflow + ref: nextion-47 + refresh: 300s components: - nextion @@ -229,8 +210,8 @@ number: then: - lambda: |- set_variable_value->execute("brightness_dim", static_cast(x)); - if (current_page_id != ${PAGE_ID_SCREENSAVER} and current_brightness->state != x) - set_brightness->execute(static_cast(x)); + if (current_page_id != ${PAGE_ID_SCREENSAVER}) + disp1->set_backlight_brightness(x / 100.0f); - id: display_sleep_brightness # SCREEN BRIGHTNESS SLEEP name: Brightness - Sleep @@ -254,20 +235,23 @@ number: val: !lambda return static_cast(x); - script.execute: page_screensaver - - id: display_delay - name: Display delay + - id: display_command_spacing + name: Display Command Spacing platform: template entity_category: config min_value: 0 - max_value: 250 - initial_value: 35 - step: 5 + max_value: 255 + initial_value: 0 + step: 1 unit_of_measurement: msec restore_value: true optimistic: true internal: false icon: mdi:gauge-empty disabled_by_default: true + on_value: + then: + - lambda: disp1->set_command_spacing(static_cast(x)); script: - id: !extend boot_package_register @@ -281,6 +265,7 @@ script: - id: !extend boot_sequence then: + - script.wait: scan_baud_rate - wait_until: condition: - lambda: return not isnan(display_sleep_brightness->state); @@ -295,7 +280,9 @@ script: set_variable_value->execute("brightness_dim", static_cast(display_dim_brightness->state)); if (not isnan(display_brightness->state)) { set_variable_value->execute("brightness", static_cast(display_brightness->state)); - set_brightness->execute(display_brightness->state); + disp1->set_backlight_brightness(((current_page_id == ${PAGE_ID_SCREENSAVER}) ? + display_sleep_brightness->state : + display_brightness->state) / 100.0f); } page_boot_log->execute("Boot", "Display settings completed"); @@ -377,7 +364,6 @@ script: - lambda: return (display_component->page_id == current_page_id or display_component->global); - lambda: return not display_component->color_is_updated; then: - - delay: !lambda return display_delay->state; - lambda: |- if ((display_component->global or display_component->page_id == current_page_id) and !display_component->color_is_updated) { @@ -400,7 +386,6 @@ script: - lambda: return display_component->font != UINT8_MAX; - lambda: return not display_component->font_is_updated; then: - - delay: !lambda return display_delay->state; - lambda: |- if ((display_component->global or display_component->page_id == current_page_id) and !display_component->font_is_updated) { @@ -422,7 +407,6 @@ script: - lambda: return (display_component->page_id == current_page_id or display_component->global); - lambda: return not display_component->text_is_updated; then: - - delay: !lambda return display_delay->state; - lambda: |- if ((display_component->global or display_component->page_id == current_page_id) and !display_component->text_is_updated) { @@ -444,7 +428,6 @@ script: - lambda: return display_component->page_id == current_page_id; - lambda: return not display_component->visible_is_updated; then: - - delay: !lambda return display_delay->state; - lambda: |- if (display_component->page_id == current_page_id and !display_component->visible_is_updated) { disp1->send_command_printf("vis %s,%i", display_component->component, @@ -508,24 +491,26 @@ script: if (!display_component->visible_is_updated) display_component_send_visibility->execute(display_component); - - id: display_delay_increment + - id: display_command_spacing_increment mode: restart then: - lambda: |- screen_power->turn_off(); ESP_LOGE("script", "Nextion reported a buffer overflow"); - ESP_LOGE("script", "Increasing the delay factor..."); + ESP_LOGE("script", "Increasing the display command spacing..."); - number.increment: - id: display_delay + id: display_command_spacing cycle: false - if: condition: - lambda: return global_preferences->sync(); then: - lambda: |- - ESP_LOGE("script", "Restarting ESP to avoid getting out of sync with Nextion"); - - delay: 2s - - lambda: arch_restart(); + ESP_LOGE("script", "Restarting ESP in 15s to avoid getting out of sync with Nextion"); + - delay: 15s + - lambda: |- + ESP_LOGE("script", "Restarting ESP now"); + arch_restart(); - id: display_wrapped_text mode: queued @@ -568,31 +553,27 @@ script: - id: !extend dump_config then: - lambda: |- - // Report UART - ESP_LOGI("${project_tag}", "UART:"); - ESP_LOGI("${project_tag}", " Baud rate: %" PRIu32 " bps", tf_uart->get_baud_rate()); - ESP_LOGI("${project_tag}", " Queue size: %d", tf_uart->available()); - // Report Nextion status nextion_init->publish_state(nextion_init->state and disp1->is_setup()); ESP_LOGI("${project_tag}", "Nextion:"); - ESP_LOGI("${project_tag}", " Delay factor: %" PRIu8, static_cast(display_delay->state)); - ESP_LOGI("${project_tag}", " Queue size: %d", disp1->queue_size()); + ESP_LOGI("${project_tag}", " Command spacing: %" PRIu8, + static_cast(display_command_spacing->state)); + ESP_LOGI("${project_tag}", " Queue size: %d", disp1->queue_size()); if (disp1->is_setup()) - ESP_LOGI("${project_tag}", " Is setup: True"); + ESP_LOGI("${project_tag}", " Is setup: True"); else { - ESP_LOGW("${project_tag}", " Is setup: False"); - ESP_LOGW("${project_tag}", " Is detected: %s", YESNO(disp1->is_detected())); + ESP_LOGW("${project_tag}", " Is setup: False"); + ESP_LOGW("${project_tag}", " Is detected: %s", YESNO(disp1->is_detected())); //exit_reparse->execute(); } if (nextion_init->state) { - ESP_LOGI("${project_tag}", " Init: True"); + ESP_LOGI("${project_tag}", " Init: True"); } else - ESP_LOGW("${project_tag}", " Init: False"); + ESP_LOGW("${project_tag}", " Init: False"); if (id(version_tft).empty()) - ESP_LOGW("${project_tag}", " TFT: UNKNOWN"); + ESP_LOGW("${project_tag}", " TFT: UNKNOWN"); else - ESP_LOGI("${project_tag}", " TFT: %s", id(version_tft).c_str()); + ESP_LOGI("${project_tag}", " TFT: %s", id(version_tft).c_str()); - id: entity_details_show_action mode: restart @@ -636,7 +617,7 @@ script: if (event == "short_click" or event == "long_click") { // Button click event ha_event.fire_homeassistant_event("esphome.nspanel_ha_blueprint", { - {"device_name", device_name->state.c_str()}, + {"device_name", id(device_name).c_str()}, {"esphome_version", "${version}"}, {"type", "button_click"}, {"page", page.c_str()}, @@ -653,7 +634,7 @@ script: } else { // Generic event ha_event.fire_homeassistant_event("esphome.nspanel_ha_blueprint", { - {"device_name", device_name->state.c_str()}, + {"device_name", id(device_name).c_str()}, {"esphome_version", "${version}"}, {"type", "button_click"}, {"page", page.c_str()}, @@ -715,7 +696,7 @@ script: // Inform Home Assistant about the page change esphome::api::CustomAPIDevice ha_event; ha_event.fire_homeassistant_event("esphome.nspanel_ha_blueprint", { - {"device_name", device_name->state.c_str()}, + {"device_name", id(device_name).c_str()}, {"esphome_version", "${version}"}, {"type", "page_changed"}, {"page", page_names[new_page_id]}, @@ -737,49 +718,6 @@ script: display_component_send->execute(display_component); } - - id: set_baud_rate - mode: restart - parameters: - baud_rate: uint32_t - definitive: bool - then: - - if: - condition: - - lambda: return (tf_uart->get_baud_rate() != baud_rate); - then: - - lambda: |- - ESP_LOGI("script", "Baud rate changing from %" PRIu32 " to %" PRIu32 " bps", - tf_uart->get_baud_rate(), baud_rate); - ESP_LOGD("script", "Flush UART"); - - wait_until: - condition: - - lambda: return (tf_uart->available() < 1); - timeout: 5s - - lambda: |- - ESP_LOGD("script", "Sending instruction '%s=%" PRIu32 "' to Nextion", - definitive ? "bauds" : "baud", baud_rate); - disp1->send_command_printf("%s=%" PRIu32, definitive ? "bauds" : "baud", baud_rate); - ESP_LOGD("script", "Flush UART"); - - wait_until: - condition: - - lambda: return (tf_uart->available() < 1); - timeout: 5s - - lambda: |- - ESP_LOGD("script", "Set ESPHome new baud rate to %" PRIu32 " bps", baud_rate); - tf_uart->set_baud_rate(baud_rate); - tf_uart->load_settings(); - ESP_LOGI("script", "Current baud rate: %" PRIu32 " bps", tf_uart->get_baud_rate()); - - - id: set_brightness - mode: restart - parameters: - brightness: uint8_t - then: - - delay: !lambda return display_delay->state; - - lambda: |- - disp1->set_backlight_brightness(brightness / 100.0f); - current_brightness->update(); - - id: set_component_font mode: parallel parameters: @@ -787,7 +725,6 @@ script: component: string font: uint8_t then: - - delay: !lambda return display_delay->state; - lambda: |- if (page_id == current_page_id) disp1->set_component_font(component.c_str(), font); @@ -799,7 +736,6 @@ script: component: string color: uint16_t then: - - delay: !lambda return display_delay->state; - lambda: |- if (page_id == current_page_id) disp1->set_component_font_color(component.c_str(), color); @@ -811,7 +747,6 @@ script: component: string picc: uint8_t then: - - delay: !lambda return display_delay->state; - lambda: |- if (page_id == current_page_id) disp1->set_component_picc(component.c_str(), picc); @@ -832,7 +767,6 @@ script: component: string pic: uint8_t then: - - delay: !lambda return display_delay->state; - lambda: |- if (page_id == current_page_id) disp1->set_component_pic(component.c_str(), pic); @@ -844,7 +778,6 @@ script: component: string text: string then: - - delay: !lambda return display_delay->state; - lambda: |- if (page_id == current_page_id) disp1->set_component_text(component.c_str(), text.c_str()); @@ -856,7 +789,6 @@ script: component: string val: int then: - - delay: !lambda return display_delay->state; - lambda: |- if (page_id == current_page_id) disp1->set_component_value(component.c_str(), val); @@ -868,7 +800,6 @@ script: component: string show: bool then: - - delay: !lambda return display_delay->state; - lambda: |- if (page_id == current_page_id) disp1->send_command_printf("vis %s,%i", component.c_str(), show ? 1 : 0); @@ -891,11 +822,6 @@ script: variable: string val: int then: - - if: - condition: - - lambda: return not isnan(display_delay->state); - then: - - delay: !lambda return display_delay->state; - lambda: |- disp1->send_command_printf("%s=%i", variable.c_str(), val); @@ -913,46 +839,12 @@ script: event_from_display->stop(); goto_page_id->stop(); page_changed->stop(); - set_baud_rate->stop(); - set_brightness->stop(); set_component_font_color->stop(); set_component_pic->stop(); set_component_picc->stop(); set_component_text->stop(); set_component_visibility->stop(); -select: - - id: baud_rate - name: Baud rate - platform: template - options: - - "2400" - - "4800" - - "9600" - - "19200" - - "31250" - - "38400" - - "57600" - - "115200" - - "230400" - - "250000" - - "256000" - - "512000" - - "921600" - initial_option: "921600" - optimistic: true - restore_value: true - internal: false - entity_category: config - disabled_by_default: true - icon: mdi:swap-horizontal - on_value: - then: - - script.execute: - id: set_baud_rate - baud_rate: !lambda return stoi(x); - definitive: true - sensor: - id: brightslider # Display Brightness GET VALUE FROM NSPanel SLIDER name: brightness Slider @@ -966,18 +858,6 @@ sensor: variable_name: dimslider internal: true - - id: current_brightness # Display Brightness - Current value (%) - name: Brightness - Current - platform: nextion - variable_name: dim - precision: 0 - accuracy_decimals: 0 - unit_of_measurement: "%" - icon: mdi:brightness-percent - internal: false - disabled_by_default: true - update_interval: 60s - switch: - name: Nextion display - Power # DISPLAY ALWAYS ON platform: gpio @@ -1023,10 +903,4 @@ text_sensor: const std::string page = json["page"]; event_from_display->execute(json, page.c_str()); } - -uart: ## UART for Nextion display - - id: tf_uart - tx_pin: 16 - rx_pin: 17 - baud_rate: 921600 ... diff --git a/esphome/nspanel_esphome_core_hw_display_timers.yaml b/esphome/nspanel_esphome_core_hw_display_timers.yaml index bd2f77973..b6c1ea43b 100644 --- a/esphome/nspanel_esphome_core_hw_display_timers.yaml +++ b/esphome/nspanel_esphome_core_hw_display_timers.yaml @@ -54,7 +54,7 @@ number: then: - lambda: |- if (current_page_id != ${PAGE_ID_SCREENSAVER}) { - set_brightness->execute(int(x)); + disp1->set_backlight_brightness(x / 100.0f); timer_dim->execute(); timer_sleep->execute(); } @@ -138,7 +138,7 @@ script: then: - lambda: |- if (current_page_id != ${PAGE_ID_SCREENSAVER} and current_page_id != ${PAGE_ID_BOOT}) { - if (!timer_dim->is_running() and current_brightness->state != display_dim_brightness->state) + if (!timer_dim->is_running()) timer_dim->execute(); if (!timer_page->is_running() and current_page_id != ${PAGE_ID_HOME}) timer_page->execute(); @@ -173,11 +173,10 @@ script: mode: restart then: - lambda: |- - if (current_brightness->state <= display_dim_brightness->state - and current_page_id != ${PAGE_ID_SCREENSAVER} - and current_page_id != ${PAGE_ID_BOOT}) { + if (current_page_id != ${PAGE_ID_SCREENSAVER} and + current_page_id != ${PAGE_ID_BOOT}) { ESP_LOGD("script", "Waking up on page: %s", page_names[current_page_id]); - set_brightness->execute(display_brightness->state); + disp1->set_backlight_brightness(display_brightness->state / 100.0f); } - if: condition: @@ -187,10 +186,10 @@ script: then: - delay: !lambda return (timeout_dim->state *1000); - lambda: |- - if (timeout_dim->state > 0 - and current_page_id != ${PAGE_ID_SCREENSAVER} - and current_page_id != ${PAGE_ID_BOOT}) - set_brightness->execute(display_dim_brightness->state); + if (timeout_dim->state > 0 and + current_page_id != ${PAGE_ID_SCREENSAVER} and + current_page_id != ${PAGE_ID_BOOT}) + disp1->set_backlight_brightness(display_dim_brightness->state / 100.0f); - id: timer_sleep # Handles the sleep (go to screensaver page) after a timeout mode: restart @@ -202,12 +201,12 @@ script: then: - delay: !lambda return (timeout_sleep->state *1000); - lambda: |- - if (timeout_sleep->state >= 1 - and current_page_id != ${PAGE_ID_SCREENSAVER} - and current_page_id != ${PAGE_ID_BOOT}) { + if (timeout_sleep->state >= 1 and + current_page_id != ${PAGE_ID_SCREENSAVER} and + current_page_id != ${PAGE_ID_BOOT}) { ESP_LOGI("script", "Going to sleep from page %s", page_names[current_page_id]); goto_page_id->execute(${PAGE_ID_SCREENSAVER}, false); - set_brightness->execute(display_sleep_brightness->state); + disp1->set_backlight_brightness(display_sleep_brightness->state / 100.0f); } select: diff --git a/esphome/nspanel_esphome_core_hw_display_uart.yaml b/esphome/nspanel_esphome_core_hw_display_uart.yaml new file mode 100644 index 000000000..0746423b3 --- /dev/null +++ b/esphome/nspanel_esphome_core_hw_display_uart.yaml @@ -0,0 +1,247 @@ +##################################################################################################### +##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint ##### +##### ESPHOME CORE - HARDWARE - Display - UART ##### +##### PLEASE only make changes if it is necessary and also the required knowledge is available. ##### +##### For normal use with the Blueprint, no changes are necessary. ##### +##################################################################################################### + +--- +substitutions: + BAUD_RATE: '921600' + MAX_SCAN_RETRIES: '255' # Maximum number of complete scan cycles, limited to 255 (UINT8_MAX) + SCAN_INTERVAL: '500' # Interval between connection checks in ms + VERIFY_DELAY: '1000' # Delay before verifying connection in ms + WAIT_TIME: '10000' # Time to wait for the Nextion display to respond + +display: + - id: !extend disp1 + uart_id: tf_uart + on_setup: + then: + - lambda: |- + // Set the current baud rate into the display + disp1->send_command_printf("bauds=%" PRIu32, tf_uart->get_baud_rate()); + +esphome: + on_boot: + - priority: 600.${BOOT_STEP_HW_DISPLAY} # Before other display initialization + then: + - script.execute: boot_scan_baud_rate + +globals: + - id: DEBUG_step + type: uint8_t + restore_value: false + initial_value: '0' + + - id: baud_error_count + type: uint8_t + restore_value: true + initial_value: '0' + + - id: baud_scan_started + type: bool + restore_value: false + initial_value: 'false' + + - id: baud_scan_index + type: uint8_t + restore_value: false + initial_value: '0' + + - id: baud_scan_retries + type: uint8_t + restore_value: false + initial_value: '0' + + - id: baud_rates + type: const std::vector + restore_value: false + initial_value: > # Target rate first, then most common rates, standard rated and then uncommon rates + { + ${BAUD_RATE}, 921600, 115200, + 57600, 38400, 19200, 9600, + 512000, 256000, 250000, + 31250, 4800, 2400 + } + +script: + - id: boot_scan_baud_rate + mode: restart + then: + - wait_until: + condition: + - lambda: return not isnan(tf_uart->get_baud_rate()); + timeout: 15s + - wait_until: + condition: &nextion_is_connected + - lambda: return disp1->is_connected(); + timeout: 5s + - if: + condition: *nextion_is_connected + then: + - lambda: |- + ESP_LOGI("script", "Display connected at boot with baud rate %" PRIu32, tf_uart->get_baud_rate()); + - if: + condition: + - lambda: return (tf_uart->get_baud_rate() != ${BAUD_RATE}); + then: + - lambda: |- + ESP_LOGW("script", "Attempting to switch to target baud rate ${BAUD_RATE} bps"); + tf_uart->write_str("bauds=${BAUD_RATE}"); + tf_uart->write_array((const uint8_t[]){0xFF, 0xFF, 0xFF}, 3); + disp1->send_command("bauds=${BAUD_RATE}"); + - delay: 2s + - lambda: |- + set_baud_rate->execute(${BAUD_RATE}, true); + ESP_LOGW("script", "Scanning..."); + scan_baud_rate->execute(); + else: + - script.execute: scan_baud_rate + + - id: !extend dump_config + then: + - script.execute: dump_config_uart + + - id: dump_config_uart + then: + - lambda: |- + // Report UART + ESP_LOGI("${project_tag}", "UART:"); + ESP_LOGI("${project_tag}", " Baud rate: %" PRIu32 " bps", tf_uart->get_baud_rate()); + ESP_LOGI("${project_tag}", " Queue size: %d", tf_uart->available()); + ESP_LOGI("${project_tag}", " Error count: %u", id(baud_error_count)); + + - id: scan_baud_rate + mode: restart + then: + - globals.set: + id: baud_scan_started + value: 'true' + - while: + condition: + or: + - lambda: return not disp1->is_connected(); + - lambda: return (tf_uart->get_baud_rate() != ${BAUD_RATE}); + then: + - repeat: + count: 5 + then: + - if: + condition: &nextion_is_NOT_connected + - lambda: return not disp1->is_connected(); + then: + - logger.log: Waiting for Nextion + - wait_until: + condition: *nextion_is_connected + timeout: 1s # ${WAIT_TIME}ms + - if: + condition: + - lambda: return disp1->is_connected(); + then: + - lambda: |- + ESP_LOGI("script", "Nextion detected at %" PRIu32 "bps", tf_uart->get_baud_rate()); + - if: + condition: + - lambda: return (tf_uart->get_baud_rate() != ${BAUD_RATE}); + then: + - lambda: |- + ESP_LOGW("script", "Attempting to switch to target baud rate ${BAUD_RATE} bps"); + - delay: 2s + - lambda: |- + disp1->send_command("bauds=${BAUD_RATE}"); + - delay: 2s + - lambda: |- + tf_uart->write_str("bauds=${BAUD_RATE}"); + tf_uart->write_array((const uint8_t[]){0xFF, 0xFF, 0xFF}, 3); + - delay: 2s + - lambda: |- + set_baud_rate->execute(${BAUD_RATE}, true); + else: + - lambda: |- + ESP_LOGW("script", "Nextion was not detected at %" PRIu32 "bps", tf_uart->get_baud_rate()); + id(baud_scan_index)++; + // Check if we need to start over + if (id(baud_scan_index) >= id(baud_rates).size()) { + id(baud_scan_index) = 0; + if (id(baud_scan_retries) < UINT8_MAX) { + id(baud_scan_retries)++; + } + if (id(baud_error_count) < UINT8_MAX) { + id(baud_error_count)++; + } + ESP_LOGW("script", "Starting new scan cycle %u", id(baud_scan_retries)); + } + const uint32_t current_baud = id(baud_rates)[id(baud_scan_index)]; + ESP_LOGW("script", "Searching for Nextion at %" PRIu32, current_baud); + set_baud_rate->execute(current_baud, (current_baud == ${BAUD_RATE})); + - script.wait: set_baud_rate + - if: + condition: + - lambda: return disp1->is_connected(); + - lambda: return (tf_uart->get_baud_rate() == ${BAUD_RATE}); + then: + - lambda: |- + ESP_LOGI("script", "Nextion detected at %" PRIu32 "bps", tf_uart->get_baud_rate()); + if (not disp1->is_setup()) + disp1->setup(); + - wait_until: + condition: &nextion_is_setup + - lambda: return disp1->is_setup(); + timeout: 5s + - if: + condition: &nextion_is_NOT_setup + - lambda: return not disp1->is_setup(); + then: + - switch.turn_off: screen_power + - delay: 2s + - switch.turn_on: screen_power + + - id: set_baud_rate + mode: restart + parameters: + baud_rate: uint32_t + definitive: bool + then: + - if: + condition: + - lambda: return (baud_rate > 0); + - lambda: return (baud_rate != tf_uart->get_baud_rate()); + then: + - lambda: |- + ESP_LOGW("script", "Baud rate changing from %" PRIu32 " to %" PRIu32 " bps", + tf_uart->get_baud_rate(), baud_rate); + ESP_LOGW("script", "Flush UART"); + - wait_until: + condition: + - lambda: return (tf_uart->available() < 1); + timeout: 5s + - lambda: |- + ESP_LOGW("script", "Sending instruction '%s=%" PRIu32 "' to Nextion", + definitive ? "bauds" : "baud", baud_rate); + disp1->send_command_printf("%s=%" PRIu32, definitive ? "bauds" : "baud", baud_rate); + ESP_LOGW("script", "Flush UART"); + - wait_until: + condition: + - lambda: return (tf_uart->available() < 1); + timeout: 5s + - lambda: |- + ESP_LOGW("script", "Set ESPHome new baud rate to %" PRIu32 " bps", baud_rate); + tf_uart->set_baud_rate(baud_rate); + tf_uart->load_settings(); + ESP_LOGW("script", "Current baud rate: %" PRIu32 " bps", tf_uart->get_baud_rate()); + + - id: !extend stop_all + then: + - lambda: |- + boot_scan_baud_rate->stop(); + dump_config_uart->stop(); + scan_baud_rate->stop(); + set_baud_rate->stop(); + +uart: + - id: tf_uart + tx_pin: 16 + rx_pin: 17 + baud_rate: ${BAUD_RATE} +... diff --git a/esphome/nspanel_esphome_core_hw_wifi.yaml b/esphome/nspanel_esphome_core_hw_wifi.yaml index 22f2bab42..87d20210d 100644 --- a/esphome/nspanel_esphome_core_hw_wifi.yaml +++ b/esphome/nspanel_esphome_core_hw_wifi.yaml @@ -32,19 +32,24 @@ esphome: build_flags: - -D NSPANEL_HA_BLUEPRINT_CORE_HW_WIFI on_boot: - - priority: 600.4 # This is where most sensors are set up. + - priority: 600.9 # This is where most sensors are set up. then: - - text_sensor.template.publish: - id: device_name - state: ${name} + - lambda: |- + id(device_name) = generate_device_name("${name}"); on_shutdown: - - priority: 0.1 + - priority: 0.9 then: # Update Wi-Fi icon - lambda: |- set_component_text->execute(${PAGE_ID_HOME}, "wifi_icon", "${MDI_ICON_RESTART}"); set_component_font_color->execute(${PAGE_ID_HOME}, "wifi_icon", 63488); +globals: + - id: device_name + type: std::string + restore_value: false + initial_value: '"${name}"' + script: - id: !extend boot_package_register then: @@ -64,8 +69,10 @@ script: if (rssi > -70) ESP_LOGI("${project_tag}", "Wi-Fi: %s (%.0f dBm)", rssi_status, rssi); else if (rssi > -80) ESP_LOGW("${project_tag}", "Wi-Fi: %s (%.0f dBm)", rssi_status, rssi); else ESP_LOGE("${project_tag}", "Wi-Fi: %s (%.0f dBm)", rssi_status, rssi); - } else + } else { ESP_LOGE("${project_tag}", "Wi-Fi: DISCONNECTED"); + } + ESP_LOGI("${project_tag}", "Device name: %s", id(device_name).c_str()); - id: !extend page_boot then: @@ -128,10 +135,11 @@ script: display_component_update_text->execute(wifi_icon, new_wifi_icon); if (blueprint_is_connected and api_is_connected and wifi_is_connected) { - ESP_LOGI("script", "Wi-Fi icon changed to %s (\\u%04X)", new_wifi_icon, decode_utf8(new_wifi_icon)); + ESP_LOGI("script", "Wi-Fi icon changed to %s (\\u%04" PRIx32 ")", + new_wifi_icon, decode_utf8(new_wifi_icon)); set_variable_value->execute("api", 1); } else { - ESP_LOGW("script", "Wi-Fi icon changed to %s (\\u%04X)", + ESP_LOGW("script", "Wi-Fi icon changed to %s (\\u%04" PRIx32 ")", new_wifi_icon, decode_utf8(new_wifi_icon)); set_variable_value->execute("api", 0); } @@ -172,49 +180,6 @@ sensor: icon: mdi:wifi entity_category: diagnostic -text_sensor: - ##### Device name - Used by bluepring to find action's names ##### - - id: device_name - name: Device Name - platform: template - icon: mdi:identifier - entity_category: diagnostic - internal: false - disabled_by_default: false - lambda: |- - return {"${name}"}; - filters: - - lambda: |- - #ifdef ESP_MAC_WIFI_STA - std::string suffix = "00ERROR"; // Default suffix in case of an error - uint8_t mac[6] = {0,0,0,0,0,0}; - if (esp_read_mac(mac, ESP_MAC_WIFI_STA) == ESP_OK) { - suffix.clear(); // Clear the default error suffix - for (int i = 3; i < 6; ++i) { // Use last 3 bytes of MAC - char hex[3]; - snprintf(hex, sizeof(hex), "%02X", mac[i]); - suffix += hex; - } - } - // Proceed with suffix (either MAC-based or default error indicator) - const std::string raw_name = (x + "-" + suffix); - #else - const std::string raw_name = x; - #endif - - std::string result; - bool last_was_underscore = false; - for (const char& c : raw_name) { - if (isalnum(c)) { - result += tolower(c); // Add alphanumeric characters as lowercase - last_was_underscore = false; - } else if (!last_was_underscore) { // Replace non-alphanumeric with '_' but avoid consecutive '_' - result += '_'; - last_was_underscore = true; - } - } - return result; - ##### WIFI SETUP ##### wifi: id: wifi_component diff --git a/esphome/nspanel_esphome_core_page_boot.yaml b/esphome/nspanel_esphome_core_page_boot.yaml index 4e2773891..46ef77ee8 100644 --- a/esphome/nspanel_esphome_core_page_boot.yaml +++ b/esphome/nspanel_esphome_core_page_boot.yaml @@ -14,6 +14,7 @@ display: - id: !extend disp1 on_setup: then: + - script.wait: scan_baud_rate - lambda: |- page_changed->execute(${PAGE_ID_BOOT}); diff --git a/esphome/nspanel_esphome_core_page_home.yaml b/esphome/nspanel_esphome_core_page_home.yaml index ac71c9329..432b6025d 100644 --- a/esphome/nspanel_esphome_core_page_home.yaml +++ b/esphome/nspanel_esphome_core_page_home.yaml @@ -104,14 +104,14 @@ script: - id: page_home mode: restart then: - # Extended by: - # - nspanel_esphome_core_datetime.yaml - # - nspanel_esphome_core_hw_relays.yaml - # - nspanel_esphome_core_hw_wifi.yaml - # - nspanel_esphome_core_page_entities.yaml - # - nspanel_esphome_core_page_notification.yaml - # - nspanel_esphome_core_page_qrcode.yaml - # - nspanel_esphome_core_page_weather.yaml + - script.execute: refresh_datetime + # Extended by: + # - nspanel_esphome_core_hw_relays.yaml + # - nspanel_esphome_core_hw_wifi.yaml + # - nspanel_esphome_core_page_entities.yaml + # - nspanel_esphome_core_page_notification.yaml + # - nspanel_esphome_core_page_qrcode.yaml + # - nspanel_esphome_core_page_weather.yaml - id: !extend refresh_datetime # Defined by nspanel_esphome_core_datetime.yaml mode: restart diff --git a/esphome/nspanel_esphome_core_page_screensaver.yaml b/esphome/nspanel_esphome_core_page_screensaver.yaml index a66b5950d..fb49350a1 100644 --- a/esphome/nspanel_esphome_core_page_screensaver.yaml +++ b/esphome/nspanel_esphome_core_page_screensaver.yaml @@ -60,6 +60,8 @@ script: id(screensaver_display_time_format) = txt; id(screensaver_display_time_font) = font; id(screensaver_display_time_color) = color565(color); + if (current_page_id == ${PAGE_ID_SCREENSAVER}) + refresh_datetime->execute(); } - id: !extend page_changed @@ -73,7 +75,9 @@ script: then: - lambda: |- refresh_datetime->execute(); - set_brightness->execute(display_sleep_brightness->state); + disp1->set_backlight_brightness(display_sleep_brightness->state / 100.0f); + - delay: 5s + - lambda: disp1->set_backlight_brightness(display_sleep_brightness->state / 100.0f); - id: !extend refresh_datetime # Defined by nspanel_esphome_core_datetime.yaml mode: restart @@ -95,4 +99,11 @@ script: - id: !extend stop_all then: - script.stop: page_screensaver + +time: + - id: !extend time_provider + on_time: + - seconds: ${BOOT_STEP_PAGE_SCREENSAVER} # Every minute + then: + - lambda: disp1->set_backlight_brightness(display_sleep_brightness->state / 100.0f); ... diff --git a/esphome/nspanel_esphome_core_versioning.yaml b/esphome/nspanel_esphome_core_versioning.yaml index e7ecb8af9..624e37b5d 100644 --- a/esphome/nspanel_esphome_core_versioning.yaml +++ b/esphome/nspanel_esphome_core_versioning.yaml @@ -7,16 +7,17 @@ --- substitutions: ##### DON'T CHANGE THIS ###### - version: 4.4.0.dev8 + version: 4.4.0.dev9 ############################## BOOT_STEP_VERSIONING: '26' esphome: + min_version: 2024.11.0 + project: + version: "${version}" platformio_options: build_flags: - -D NSPANEL_HA_BLUEPRINT_CORE_VERSIONING - project: - version: "${version}" globals: - id: version_blueprint @@ -55,7 +56,7 @@ script: - homeassistant.event: event: esphome.nspanel_ha_blueprint data: - device_name: !lambda return device_name->state.c_str(); + device_name: !lambda return id(device_name).c_str(); esphome_version: ${version} type: version tft: !lambda return id(version_tft).c_str(); diff --git a/esphome/nspanel_esphome_standard.yaml b/esphome/nspanel_esphome_standard.yaml index 4e4fd474b..00b77cf77 100644 --- a/esphome/nspanel_esphome_standard.yaml +++ b/esphome/nspanel_esphome_standard.yaml @@ -12,25 +12,25 @@ esphome: packages: # yamllint disable rule:colons - hw_buzzer: !include nspanel_esphome_standard_hw_buzzer.yaml - hw_relays: !include nspanel_esphome_standard_hw_relays.yaml - hw_temperature: !include nspanel_esphome_standard_hw_temperature.yaml - page_alarm: !include nspanel_esphome_standard_page_alarm.yaml - page_blank: !include nspanel_esphome_standard_page_blank.yaml - page_buttons: !include nspanel_esphome_standard_page_buttons.yaml - page_climate: !include nspanel_esphome_standard_page_climate.yaml - page_confirm: !include nspanel_esphome_standard_page_confirm.yaml - page_cover: !include nspanel_esphome_standard_page_cover.yaml - page_entities: !include nspanel_esphome_standard_page_entities.yaml - page_fan: !include nspanel_esphome_standard_page_fan.yaml - page_keyb_num: !include nspanel_esphome_standard_page_keyb_num.yaml - page_light: !include nspanel_esphome_standard_page_light.yaml - page_media_player: !include nspanel_esphome_standard_page_media_player.yaml - page_notification: !include nspanel_esphome_standard_page_notification.yaml - page_qrcode: !include nspanel_esphome_standard_page_qrcode.yaml - page_settings: !include nspanel_esphome_standard_page_settings.yaml - page_utilities: !include nspanel_esphome_standard_page_utilities.yaml - page_weather: !include nspanel_esphome_standard_page_weather.yaml - upload_tft: !include nspanel_esphome_standard_upload_tft.yaml + hw_buzzer: !include nspanel_esphome_standard_hw_buzzer.yaml + hw_relays: !include nspanel_esphome_standard_hw_relays.yaml + hw_temperature: !include nspanel_esphome_standard_hw_temperature.yaml + page_alarm: !include nspanel_esphome_standard_page_alarm.yaml + page_blank: !include nspanel_esphome_standard_page_blank.yaml + page_buttons: !include nspanel_esphome_standard_page_buttons.yaml + page_climate: !include nspanel_esphome_standard_page_climate.yaml + page_confirm: !include nspanel_esphome_standard_page_confirm.yaml + page_cover: !include nspanel_esphome_standard_page_cover.yaml + page_entities: !include nspanel_esphome_standard_page_entities.yaml + page_fan: !include nspanel_esphome_standard_page_fan.yaml + page_keyb_num: !include nspanel_esphome_standard_page_keyb_num.yaml + page_light: !include nspanel_esphome_standard_page_light.yaml + page_media_player: !include nspanel_esphome_standard_page_media_player.yaml + page_notification: !include nspanel_esphome_standard_page_notification.yaml + page_qrcode: !include nspanel_esphome_standard_page_qrcode.yaml + page_settings: !include nspanel_esphome_standard_page_settings.yaml + page_utilities: !include nspanel_esphome_standard_page_utilities.yaml + page_weather: !include nspanel_esphome_standard_page_weather.yaml + upload_tft: !include nspanel_esphome_standard_upload_tft.yaml # yamllint enable rule:colons ... diff --git a/esphome/nspanel_esphome_standard_hw_temperature.yaml b/esphome/nspanel_esphome_standard_hw_temperature.yaml index 5a4b47f97..bb5d1ec5e 100644 --- a/esphome/nspanel_esphome_standard_hw_temperature.yaml +++ b/esphome/nspanel_esphome_standard_hw_temperature.yaml @@ -22,9 +22,13 @@ esphome: build_flags: - -D NSPANEL_HA_BLUEPRINT_STANDARD_HW_TEMPERATURE +external_components: # To-do: Remove this when PR#7942 is merged and released (v2025.1.0?) + - source: github://pr#7942 + components: + - adc + globals: - ##### Is embedded sensor used for indoor temperature? ##### - - id: embedded_indoor_temp + - id: embedded_indoor_temp # Is embedded sensor used for indoor temperature? type: bool restore_value: true initial_value: 'true' diff --git a/esphome/nspanel_esphome_standard_page_buttons.yaml b/esphome/nspanel_esphome_standard_page_buttons.yaml index 0c2e9e7f3..cb5ea56e9 100644 --- a/esphome/nspanel_esphome_standard_page_buttons.yaml +++ b/esphome/nspanel_esphome_standard_page_buttons.yaml @@ -34,7 +34,7 @@ api: label: string # Main text label for the button. then: - lambda: |- - ESP_LOGD("api.actions.button", "Received data for button %i", id); + ESP_LOGD("api.actions.button", "Received data for button %" PRIu8, static_cast(id)); if (id >= 1 and id <= 32) { const uint8_t index = static_cast(id) - 1; @@ -66,8 +66,9 @@ api: display_component_update_visibility->execute(buttonpage_buttons[index].label, true); // Rendering button - const uint8_t page_id = get_page_id(page.c_str()); - page_buttonpage_button_renderer->execute(index, page_id, component.c_str()); + if (is_button_in_mask(index, PageButtonsMaskEnabled)) { + page_buttonpage_button_renderer->execute(index, get_page_id(page.c_str()), component.c_str()); + } } display: @@ -76,13 +77,13 @@ display: then: - lambda: |- if (is_page_in_group(BUTTONS_PAGE_MASK, page_id)) { // Button's pages - if (component_id >= 42 and component_id <= 49) { // Buttons - const uint8_t button_id = (8*(page_id-${PAGE_ID_BUTTONPAGE01}))+(component_id-41); + if (component_id >= 38 and component_id <= 45) { // Buttons + const uint8_t button_id = (8*(page_id-${PAGE_ID_BUTTONPAGE01}))+(component_id-37); ESP_LOGI("display", "Button %" PRIu8 " %s", button_id, touch_event ? "pressed" : "released"); if (touch_event) - button_press->execute(button_id); + button_press->execute(page_id, button_id); else - button_release->execute(button_id); + button_release->execute(page_id, button_id); } } @@ -100,28 +101,40 @@ script: - id: button_click_long mode: parallel parameters: + page_id: uint8_t button_id: uint8_t then: + - lambda: |- + ha_button->execute(page_id, get_button_name(button_id), "long_click"); - id: button_click_short mode: parallel parameters: + page_id: uint8_t button_id: uint8_t then: + # Extended by: + # nspanel_esphome_standard_page_confirm.yaml + - lambda: |- + if (not is_button_in_mask(button_id, PageButtonsMaskConfirm)) + ha_button->execute(page_id, get_button_name(button_id), "short_click"); - id: button_press mode: restart parameters: + page_id: uint8_t button_id: uint8_t then: - delay: ${BUTTON_LONG_PRESS_DELAY} - script.execute: id: button_click_long + page_id: !lambda return page_id; button_id: !lambda return button_id; - id: button_release mode: parallel parameters: + page_id: uint8_t button_id: uint8_t then: - if: @@ -131,24 +144,32 @@ script: - script.stop: button_press - script.execute: id: button_click_short + page_id: !lambda return page_id; button_id: !lambda return button_id; - id: !extend boot_package_register then: - lambda: boot_package_register_add->execute(${BOOT_STEP_PAGE_BUTTONS}, "PAGE_BUTTONS", "Page Buttons"); + - id: !extend dump_config + then: + - lambda: |- + // Check for requirements + #if !defined(NSPANEL_HA_BLUEPRINT_STANDARD_PAGE_BUTTONS) + #error "The package nspanel_esphome_standard_page_buttons.yaml is required." + #endif + - id: page_buttonpage mode: restart then: - repeat: count: 8 then: - - delay: !lambda return display_delay->state; - lambda: |- const uint8_t index = (current_page_id-${PAGE_ID_BUTTONPAGE01})*8 + iteration; - if (buttonpage_buttons[index].icon->visible) { + if (is_button_in_mask(index, PageButtonsMaskEnabled)) { char component[10]; - sprintf(component, "button%02d", iteration+1); + snprintf(component, sizeof(component), "button%02" PRIu8, static_cast(iteration + 1)); ESP_LOGD("script.page_buttonpage", "Updating state of %s - %s", current_page->state.c_str(), component); page_buttonpage_button_renderer->execute(index, current_page_id, component); @@ -162,8 +183,10 @@ script: component: string then: - lambda: |- - page_buttonpage_button_renderer_state->execute(index, page_id, component.c_str()); - page_buttonpage_button_renderer_visibility->execute(index, page_id, component.c_str()); + if (is_button_in_mask(index, PageButtonsMaskEnabled)) { + page_buttonpage_button_renderer_state->execute(index, page_id, component.c_str()); + page_buttonpage_button_renderer_visibility->execute(index, page_id, component.c_str()); + } - id: page_buttonpage_button_renderer_state mode: parallel @@ -197,10 +220,9 @@ script: then: - lambda: |- if (page_id == current_page_id) { - set_component_visibility->execute(page_id, (component + "pic").c_str(), - buttonpage_buttons[index].icon->visible); - set_component_visibility->execute(page_id, component.c_str(), - buttonpage_buttons[index].icon->visible); + const bool is_button_visible = is_button_in_mask(index, PageButtonsMaskEnabled); + set_component_visibility->execute(page_id, (component + "pic").c_str(), is_button_visible); + set_component_visibility->execute(page_id, component.c_str(), is_button_visible); } - id: !extend page_changed @@ -215,35 +237,43 @@ script: if (component == "buttonpage01MaskEnabled") { PageButtonsMaskEnabled &= 0xFFFFFF00; // Clear bits 0-7 PageButtonsMaskEnabled |= static_cast(val) << 0; // Set bits 0-7 with Page 1 value - ESP_LOGD("script", "Got buttons enabled settings for buttonpage01: %" PRIu8, val); + ESP_LOGD("script", "Got buttons enabled settings for buttonpage01: %" PRIu8 " (%" PRIu32 ")", + val, PageButtonsMaskEnabled); } else if (component == "buttonpage02MaskEnabled") { PageButtonsMaskEnabled &= 0xFFFF00FF; // Clear bits 8-15 PageButtonsMaskEnabled |= static_cast(val) << 8; // Set bits 8-15 with Page 2 value - ESP_LOGD("script", "Got buttons enabled settings for buttonpage02: %" PRIu8, val); + ESP_LOGD("script", "Got buttons enabled settings for buttonpage02: %" PRIu8 " (%" PRIu32 ")", + val, PageButtonsMaskEnabled); } else if (component == "buttonpage03MaskEnabled") { PageButtonsMaskEnabled &= 0xFF00FFFF; // Clear bits 16-23 PageButtonsMaskEnabled |= static_cast(val) << 16; // Set bits 16-23 with Page 3 value - ESP_LOGD("script", "Got buttons enabled settings for buttonpage03: %" PRIu8, val); + ESP_LOGD("script", "Got buttons enabled settings for buttonpage03: %" PRIu8 " (%" PRIu32 ")", + val, PageButtonsMaskEnabled); } else if (component == "buttonpage04MaskEnabled") { PageButtonsMaskEnabled &= 0x00FFFFFF; // Clear bits 24-31 PageButtonsMaskEnabled |= static_cast(val) << 24; // Set bits 24-31 with Page 4 value - ESP_LOGD("script", "Got buttons enabled settings for buttonpage04: %" PRIu8, val); + ESP_LOGD("script", "Got buttons enabled settings for buttonpage04: %" PRIu8 " (%" PRIu32 ")", + val, PageButtonsMaskEnabled); } else if (component == "buttonpage01MaskConfirm") { PageButtonsMaskConfirm &= 0xFFFFFF00; // Clear bits 0-7 PageButtonsMaskConfirm |= static_cast(val) << 0; // Set bits 0-7 with Page 1 value - ESP_LOGD("script", "Got buttons confirm settings for buttonpage01: %" PRIu8, val); + ESP_LOGD("script", "Got buttons confirm settings for buttonpage01: %" PRIu8 " (%" PRIu32 ")", + val, PageButtonsMaskConfirm); } else if (component == "buttonpage02MaskConfirm") { PageButtonsMaskConfirm &= 0xFFFF00FF; // Clear bits 8-15 PageButtonsMaskConfirm |= static_cast(val) << 8; // Set bits 8-15 with Page 2 value - ESP_LOGD("script", "Got buttons confirm settings for buttonpage02: %" PRIu8, val); + ESP_LOGD("script", "Got buttons confirm settings for buttonpage02: %" PRIu8 " (%" PRIu32 ")", + val, PageButtonsMaskConfirm); } else if (component == "buttonpage03MaskConfirm") { PageButtonsMaskConfirm &= 0xFF00FFFF; // Clear bits 16-23 PageButtonsMaskConfirm |= static_cast(val) << 16; // Set bits 16-23 with Page 3 value - ESP_LOGD("script", "Got buttons confirm settings for buttonpage03: %" PRIu8, val); + ESP_LOGD("script", "Got buttons confirm settings for buttonpage03: %" PRIu8 " (%" PRIu32 ")", + val, PageButtonsMaskConfirm); } else if (component == "buttonpage04MaskConfirm") { PageButtonsMaskConfirm &= 0x00FFFFFF; // Clear bits 24-31 PageButtonsMaskConfirm |= static_cast(val) << 24; // Set bits 24-31 with Page 4 value - ESP_LOGD("script", "Got buttons confirm settings for buttonpage04: %" PRIu8, val); + ESP_LOGD("script", "Got buttons confirm settings for buttonpage04: %" PRIu8 " (%" PRIu32 ")", + val, PageButtonsMaskConfirm); } - id: !extend stop_all diff --git a/esphome/nspanel_esphome_standard_page_confirm.yaml b/esphome/nspanel_esphome_standard_page_confirm.yaml index 4cb18d8a1..022062f84 100644 --- a/esphome/nspanel_esphome_standard_page_confirm.yaml +++ b/esphome/nspanel_esphome_standard_page_confirm.yaml @@ -34,6 +34,18 @@ script: then: - lambda: boot_package_register_add->execute(${BOOT_STEP_PAGE_CONFIRM}, "PAGE_CONFIRM", "Page Confirm"); + - id: !extend button_click_short + then: + - lambda: |- + if (is_button_in_mask(button_id, PageButtonsMaskConfirm)) { + goto_page_id->execute(${PAGE_ID_CONFIRM}, true); + set_component_value->execute(${PAGE_ID_CONFIRM}, "page_id", page_id); + set_component_text->execute(${PAGE_ID_CONFIRM}, "page_name", page_names[page_id]); + set_component_text->execute(${PAGE_ID_CONFIRM}, "component", get_button_name(button_id)); + static DisplayComponent* confirm_body = get_component(${PAGE_ID_CONFIRM}, "body"); + display_component_update_text->execute(confirm_body, buttonpage_buttons[button_id-1].label->text); + } + - id: !extend page_changed then: - lambda: |- diff --git a/esphome/nspanel_esphome_standard_page_entities.yaml b/esphome/nspanel_esphome_standard_page_entities.yaml index 4ea8e171d..1547079a6 100644 --- a/esphome/nspanel_esphome_standard_page_entities.yaml +++ b/esphome/nspanel_esphome_standard_page_entities.yaml @@ -53,7 +53,6 @@ script: - repeat: count: 8 then: - - delay: !lambda return display_delay->state; - lambda: |- disp1->send_command_printf("value%02" PRIu32 ".xcen=%" PRIu8, iteration, id(page_entity_value_horizontal_alignment)); diff --git a/esphome/nspanel_esphome_standard_page_light.yaml b/esphome/nspanel_esphome_standard_page_light.yaml index 3c64d7bd2..e65bc2110 100644 --- a/esphome/nspanel_esphome_standard_page_light.yaml +++ b/esphome/nspanel_esphome_standard_page_light.yaml @@ -49,7 +49,7 @@ script: if (rgb_color.size() == 3) { esphome::api::CustomAPIDevice ha_event; ha_event.fire_homeassistant_event("esphome.nspanel_ha_blueprint", { - {"device_name", device_name->state.c_str()}, + {"device_name", id(device_name).c_str()}, {"esphome_version", "${version}"}, {"type", "action_call"}, {"action", "light.turn_on"}, diff --git a/esphome/nspanel_esphome_standard_page_notification.yaml b/esphome/nspanel_esphome_standard_page_notification.yaml index c4d42a160..865215c56 100644 --- a/esphome/nspanel_esphome_standard_page_notification.yaml +++ b/esphome/nspanel_esphome_standard_page_notification.yaml @@ -176,7 +176,7 @@ text_sensor: - homeassistant.event: event: esphome.nspanel_ha_blueprint data: - device_name: !lambda return device_name->state.c_str(); + device_name: !lambda return id(device_name).c_str(); esphome_version: ${version} type: notification_changed component: notification_label @@ -193,7 +193,7 @@ text_sensor: - homeassistant.event: event: esphome.nspanel_ha_blueprint data: - device_name: !lambda return device_name->state.c_str(); + device_name: !lambda return id(device_name).c_str(); esphome_version: ${version} type: notification_changed component: notification_text diff --git a/hmi/dev/nspanel_CJK_eu_code/boot.txt b/hmi/dev/nspanel_CJK_eu_code/boot.txt index b65fc1d99..82b2bc920 100644 --- a/hmi/dev/nspanel_CJK_eu_code/boot.txt +++ b/hmi/dev/nspanel_CJK_eu_code/boot.txt @@ -21,7 +21,7 @@ Variable (string) version Attributes ID : 7 Scope : global - Text : 4.4.0.dev8 + Text : 4.4.0.dev9 Max. Text Size: 16 Variable (int32) log_len @@ -74,22 +74,16 @@ Variable (int32) log_max_lines Scope: local Value: 14 -Variable (int32) counter - Attributes - ID : 26 - Scope: local - Value: 0 - Variable (string) json Attributes - ID : 28 + ID : 27 Scope : local Text : Max. Text Size: 100 Variable (string) num_to_str Attributes - ID : 29 + ID : 28 Scope : local Text : Max. Text Size: 10 @@ -330,23 +324,13 @@ Dual-state Button bt_reboot Timer tm_esphome Attributes - ID : 27 + ID : 26 Scope : local Period (ms): 10000 Enabled : yes Events Timer Event - counter.val++ - if(counter.val>360) - { - rest - } - sys0=counter.val%60 - if(sys0==0) - { - bauds=921600 - } click sys_baudrate,1 click initializing,0 doevents diff --git a/hmi/dev/nspanel_CJK_eu_code/buttonpage01.txt b/hmi/dev/nspanel_CJK_eu_code/buttonpage01.txt index ca86df955..ed536f370 100644 --- a/hmi/dev/nspanel_CJK_eu_code/buttonpage01.txt +++ b/hmi/dev/nspanel_CJK_eu_code/buttonpage01.txt @@ -42,33 +42,6 @@ Page buttonpage01 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage01 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_CJK_eu_code/buttonpage02.txt b/hmi/dev/nspanel_CJK_eu_code/buttonpage02.txt index 8bd74a465..cf0dbf491 100644 --- a/hmi/dev/nspanel_CJK_eu_code/buttonpage02.txt +++ b/hmi/dev/nspanel_CJK_eu_code/buttonpage02.txt @@ -42,33 +42,6 @@ Page buttonpage02 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage02 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_CJK_eu_code/buttonpage03.txt b/hmi/dev/nspanel_CJK_eu_code/buttonpage03.txt index 58a440cce..4728540e8 100644 --- a/hmi/dev/nspanel_CJK_eu_code/buttonpage03.txt +++ b/hmi/dev/nspanel_CJK_eu_code/buttonpage03.txt @@ -42,33 +42,6 @@ Page buttonpage03 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage03 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_CJK_eu_code/buttonpage04.txt b/hmi/dev/nspanel_CJK_eu_code/buttonpage04.txt index c95656561..9e2579ead 100644 --- a/hmi/dev/nspanel_CJK_eu_code/buttonpage04.txt +++ b/hmi/dev/nspanel_CJK_eu_code/buttonpage04.txt @@ -42,33 +42,6 @@ Page buttonpage04 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage04 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_CJK_eu_code/confirm.txt b/hmi/dev/nspanel_CJK_eu_code/confirm.txt index b63e61f47..73234df8e 100644 --- a/hmi/dev/nspanel_CJK_eu_code/confirm.txt +++ b/hmi/dev/nspanel_CJK_eu_code/confirm.txt @@ -22,7 +22,7 @@ Page confirm Variable (int32) page_id Attributes ID : 3 - Scope: global + Scope: local Value: 0 Variable (string) aux @@ -35,14 +35,14 @@ Variable (string) aux Variable (string) page_name Attributes ID : 9 - Scope : global + Scope : local Text : Max. Text Size: 12 Variable (string) component Attributes ID : 10 - Scope : global + Scope : local Text : Max. Text Size: 10 @@ -59,7 +59,7 @@ Text t0 Text title Attributes ID : 4 - Scope : global + Scope : local Dragging : 0 Send Component ID : on press and release Associated Keyboard: none @@ -69,7 +69,7 @@ Text title Text body Attributes ID : 8 - Scope : global + Scope : local Dragging : 0 Send Component ID : on press and release Associated Keyboard: none diff --git a/hmi/dev/nspanel_CJK_us_code/boot.txt b/hmi/dev/nspanel_CJK_us_code/boot.txt index 9af90fc51..a677af89b 100644 --- a/hmi/dev/nspanel_CJK_us_code/boot.txt +++ b/hmi/dev/nspanel_CJK_us_code/boot.txt @@ -21,7 +21,7 @@ Variable (string) version Attributes ID : 7 Scope : global - Text : 4.4.0.dev8 + Text : 4.4.0.dev9 Max. Text Size: 16 Variable (int32) log_len @@ -74,22 +74,16 @@ Variable (int32) log_max_lines Scope: local Value: 7 -Variable (int32) counter - Attributes - ID : 26 - Scope: local - Value: 0 - Variable (string) json Attributes - ID : 28 + ID : 27 Scope : local Text : Max. Text Size: 100 Variable (string) num_to_str Attributes - ID : 29 + ID : 28 Scope : local Text : Max. Text Size: 10 @@ -330,23 +324,13 @@ Dual-state Button bt_reboot Timer tm_esphome Attributes - ID : 27 + ID : 26 Scope : local Period (ms): 10000 Enabled : yes Events Timer Event - counter.val++ - if(counter.val>360) - { - rest - } - sys0=counter.val%60 - if(sys0==0) - { - bauds=921600 - } click sys_baudrate,1 click initializing,0 doevents diff --git a/hmi/dev/nspanel_CJK_us_code/buttonpage01.txt b/hmi/dev/nspanel_CJK_us_code/buttonpage01.txt index ca86df955..ed536f370 100644 --- a/hmi/dev/nspanel_CJK_us_code/buttonpage01.txt +++ b/hmi/dev/nspanel_CJK_us_code/buttonpage01.txt @@ -42,33 +42,6 @@ Page buttonpage01 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage01 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_CJK_us_code/buttonpage02.txt b/hmi/dev/nspanel_CJK_us_code/buttonpage02.txt index 8bd74a465..cf0dbf491 100644 --- a/hmi/dev/nspanel_CJK_us_code/buttonpage02.txt +++ b/hmi/dev/nspanel_CJK_us_code/buttonpage02.txt @@ -42,33 +42,6 @@ Page buttonpage02 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage02 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_CJK_us_code/buttonpage03.txt b/hmi/dev/nspanel_CJK_us_code/buttonpage03.txt index 58a440cce..4728540e8 100644 --- a/hmi/dev/nspanel_CJK_us_code/buttonpage03.txt +++ b/hmi/dev/nspanel_CJK_us_code/buttonpage03.txt @@ -42,33 +42,6 @@ Page buttonpage03 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage03 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_CJK_us_code/buttonpage04.txt b/hmi/dev/nspanel_CJK_us_code/buttonpage04.txt index d788f45c1..f98a19d2f 100644 --- a/hmi/dev/nspanel_CJK_us_code/buttonpage04.txt +++ b/hmi/dev/nspanel_CJK_us_code/buttonpage04.txt @@ -42,33 +42,6 @@ Page buttonpage04 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage04 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_CJK_us_code/confirm.txt b/hmi/dev/nspanel_CJK_us_code/confirm.txt index b63e61f47..73234df8e 100644 --- a/hmi/dev/nspanel_CJK_us_code/confirm.txt +++ b/hmi/dev/nspanel_CJK_us_code/confirm.txt @@ -22,7 +22,7 @@ Page confirm Variable (int32) page_id Attributes ID : 3 - Scope: global + Scope: local Value: 0 Variable (string) aux @@ -35,14 +35,14 @@ Variable (string) aux Variable (string) page_name Attributes ID : 9 - Scope : global + Scope : local Text : Max. Text Size: 12 Variable (string) component Attributes ID : 10 - Scope : global + Scope : local Text : Max. Text Size: 10 @@ -59,7 +59,7 @@ Text t0 Text title Attributes ID : 4 - Scope : global + Scope : local Dragging : 0 Send Component ID : on press and release Associated Keyboard: none @@ -69,7 +69,7 @@ Text title Text body Attributes ID : 8 - Scope : global + Scope : local Dragging : 0 Send Component ID : on press and release Associated Keyboard: none diff --git a/hmi/dev/nspanel_CJK_us_land_code/boot.txt b/hmi/dev/nspanel_CJK_us_land_code/boot.txt index b65fc1d99..82b2bc920 100644 --- a/hmi/dev/nspanel_CJK_us_land_code/boot.txt +++ b/hmi/dev/nspanel_CJK_us_land_code/boot.txt @@ -21,7 +21,7 @@ Variable (string) version Attributes ID : 7 Scope : global - Text : 4.4.0.dev8 + Text : 4.4.0.dev9 Max. Text Size: 16 Variable (int32) log_len @@ -74,22 +74,16 @@ Variable (int32) log_max_lines Scope: local Value: 14 -Variable (int32) counter - Attributes - ID : 26 - Scope: local - Value: 0 - Variable (string) json Attributes - ID : 28 + ID : 27 Scope : local Text : Max. Text Size: 100 Variable (string) num_to_str Attributes - ID : 29 + ID : 28 Scope : local Text : Max. Text Size: 10 @@ -330,23 +324,13 @@ Dual-state Button bt_reboot Timer tm_esphome Attributes - ID : 27 + ID : 26 Scope : local Period (ms): 10000 Enabled : yes Events Timer Event - counter.val++ - if(counter.val>360) - { - rest - } - sys0=counter.val%60 - if(sys0==0) - { - bauds=921600 - } click sys_baudrate,1 click initializing,0 doevents diff --git a/hmi/dev/nspanel_CJK_us_land_code/buttonpage01.txt b/hmi/dev/nspanel_CJK_us_land_code/buttonpage01.txt index ca86df955..ed536f370 100644 --- a/hmi/dev/nspanel_CJK_us_land_code/buttonpage01.txt +++ b/hmi/dev/nspanel_CJK_us_land_code/buttonpage01.txt @@ -42,33 +42,6 @@ Page buttonpage01 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage01 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_CJK_us_land_code/buttonpage02.txt b/hmi/dev/nspanel_CJK_us_land_code/buttonpage02.txt index 8bd74a465..cf0dbf491 100644 --- a/hmi/dev/nspanel_CJK_us_land_code/buttonpage02.txt +++ b/hmi/dev/nspanel_CJK_us_land_code/buttonpage02.txt @@ -42,33 +42,6 @@ Page buttonpage02 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage02 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_CJK_us_land_code/buttonpage03.txt b/hmi/dev/nspanel_CJK_us_land_code/buttonpage03.txt index 58a440cce..4728540e8 100644 --- a/hmi/dev/nspanel_CJK_us_land_code/buttonpage03.txt +++ b/hmi/dev/nspanel_CJK_us_land_code/buttonpage03.txt @@ -42,33 +42,6 @@ Page buttonpage03 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage03 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_CJK_us_land_code/buttonpage04.txt b/hmi/dev/nspanel_CJK_us_land_code/buttonpage04.txt index c95656561..9e2579ead 100644 --- a/hmi/dev/nspanel_CJK_us_land_code/buttonpage04.txt +++ b/hmi/dev/nspanel_CJK_us_land_code/buttonpage04.txt @@ -42,33 +42,6 @@ Page buttonpage04 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage04 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_CJK_us_land_code/confirm.txt b/hmi/dev/nspanel_CJK_us_land_code/confirm.txt index b63e61f47..73234df8e 100644 --- a/hmi/dev/nspanel_CJK_us_land_code/confirm.txt +++ b/hmi/dev/nspanel_CJK_us_land_code/confirm.txt @@ -22,7 +22,7 @@ Page confirm Variable (int32) page_id Attributes ID : 3 - Scope: global + Scope: local Value: 0 Variable (string) aux @@ -35,14 +35,14 @@ Variable (string) aux Variable (string) page_name Attributes ID : 9 - Scope : global + Scope : local Text : Max. Text Size: 12 Variable (string) component Attributes ID : 10 - Scope : global + Scope : local Text : Max. Text Size: 10 @@ -59,7 +59,7 @@ Text t0 Text title Attributes ID : 4 - Scope : global + Scope : local Dragging : 0 Send Component ID : on press and release Associated Keyboard: none @@ -69,7 +69,7 @@ Text title Text body Attributes ID : 8 - Scope : global + Scope : local Dragging : 0 Send Component ID : on press and release Associated Keyboard: none diff --git a/hmi/dev/nspanel_blank_code/Program.s.txt b/hmi/dev/nspanel_blank_code/Program.s.txt index 42a7a1f2b..8aeb4d3f6 100644 --- a/hmi/dev/nspanel_blank_code/Program.s.txt +++ b/hmi/dev/nspanel_blank_code/Program.s.txt @@ -6,6 +6,5 @@ Program.s int charset=1 dim=100//Configure backlight recmod=0//Serial data parsing mode:0-Passive mode;1-Active mode - bauds=921600 printh 00 00 00 ff ff ff 88 ff ff ff//Output power on information to serial port page 0 //Power on start page 0 diff --git a/hmi/dev/nspanel_blank_code/blank.txt b/hmi/dev/nspanel_blank_code/blank.txt index 2dcfaa6df..4a64a6e37 100644 --- a/hmi/dev/nspanel_blank_code/blank.txt +++ b/hmi/dev/nspanel_blank_code/blank.txt @@ -24,43 +24,37 @@ Page blank dim=100 tm0.en=1 -Variable (int32) counter - Attributes - ID : 9 - Scope: local - Value: 0 - Variable (string) aux1 Attributes - ID : 10 + ID : 9 Scope : local Text : Max. Text Size: 10 Variable (string) json Attributes - ID : 11 + ID : 10 Scope : local Text : Max. Text Size: 100 Variable (string) num_to_str Attributes - ID : 12 + ID : 11 Scope : local Text : Max. Text Size: 10 Variable (string) version Attributes - ID : 13 + ID : 12 Scope : global Text : 2024.10.2 Max. Text Size: 15 Variable (string) tmp_baudrate Attributes - ID : 14 + ID : 13 Scope : local Text : Max. Text Size: 8 @@ -232,15 +226,5 @@ Timer tm_esphome Events Timer Event - counter.val++ - if(counter.val>360) - { - rest - } - sys0=counter.val%60 - if(sys0==0) - { - bauds=921600 - } click qr0,0 diff --git a/hmi/dev/nspanel_eu_code/boot.txt b/hmi/dev/nspanel_eu_code/boot.txt index b65fc1d99..82b2bc920 100644 --- a/hmi/dev/nspanel_eu_code/boot.txt +++ b/hmi/dev/nspanel_eu_code/boot.txt @@ -21,7 +21,7 @@ Variable (string) version Attributes ID : 7 Scope : global - Text : 4.4.0.dev8 + Text : 4.4.0.dev9 Max. Text Size: 16 Variable (int32) log_len @@ -74,22 +74,16 @@ Variable (int32) log_max_lines Scope: local Value: 14 -Variable (int32) counter - Attributes - ID : 26 - Scope: local - Value: 0 - Variable (string) json Attributes - ID : 28 + ID : 27 Scope : local Text : Max. Text Size: 100 Variable (string) num_to_str Attributes - ID : 29 + ID : 28 Scope : local Text : Max. Text Size: 10 @@ -330,23 +324,13 @@ Dual-state Button bt_reboot Timer tm_esphome Attributes - ID : 27 + ID : 26 Scope : local Period (ms): 10000 Enabled : yes Events Timer Event - counter.val++ - if(counter.val>360) - { - rest - } - sys0=counter.val%60 - if(sys0==0) - { - bauds=921600 - } click sys_baudrate,1 click initializing,0 doevents diff --git a/hmi/dev/nspanel_eu_code/buttonpage01.txt b/hmi/dev/nspanel_eu_code/buttonpage01.txt index ca86df955..ed536f370 100644 --- a/hmi/dev/nspanel_eu_code/buttonpage01.txt +++ b/hmi/dev/nspanel_eu_code/buttonpage01.txt @@ -42,33 +42,6 @@ Page buttonpage01 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage01 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_eu_code/buttonpage02.txt b/hmi/dev/nspanel_eu_code/buttonpage02.txt index 8bd74a465..cf0dbf491 100644 --- a/hmi/dev/nspanel_eu_code/buttonpage02.txt +++ b/hmi/dev/nspanel_eu_code/buttonpage02.txt @@ -42,33 +42,6 @@ Page buttonpage02 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage02 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_eu_code/buttonpage03.txt b/hmi/dev/nspanel_eu_code/buttonpage03.txt index 58a440cce..4728540e8 100644 --- a/hmi/dev/nspanel_eu_code/buttonpage03.txt +++ b/hmi/dev/nspanel_eu_code/buttonpage03.txt @@ -42,33 +42,6 @@ Page buttonpage03 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage03 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_eu_code/buttonpage04.txt b/hmi/dev/nspanel_eu_code/buttonpage04.txt index c95656561..9e2579ead 100644 --- a/hmi/dev/nspanel_eu_code/buttonpage04.txt +++ b/hmi/dev/nspanel_eu_code/buttonpage04.txt @@ -42,33 +42,6 @@ Page buttonpage04 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage04 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_eu_code/confirm.txt b/hmi/dev/nspanel_eu_code/confirm.txt index b63e61f47..73234df8e 100644 --- a/hmi/dev/nspanel_eu_code/confirm.txt +++ b/hmi/dev/nspanel_eu_code/confirm.txt @@ -22,7 +22,7 @@ Page confirm Variable (int32) page_id Attributes ID : 3 - Scope: global + Scope: local Value: 0 Variable (string) aux @@ -35,14 +35,14 @@ Variable (string) aux Variable (string) page_name Attributes ID : 9 - Scope : global + Scope : local Text : Max. Text Size: 12 Variable (string) component Attributes ID : 10 - Scope : global + Scope : local Text : Max. Text Size: 10 @@ -59,7 +59,7 @@ Text t0 Text title Attributes ID : 4 - Scope : global + Scope : local Dragging : 0 Send Component ID : on press and release Associated Keyboard: none @@ -69,7 +69,7 @@ Text title Text body Attributes ID : 8 - Scope : global + Scope : local Dragging : 0 Send Component ID : on press and release Associated Keyboard: none diff --git a/hmi/dev/nspanel_us_code/boot.txt b/hmi/dev/nspanel_us_code/boot.txt index 9af90fc51..a677af89b 100644 --- a/hmi/dev/nspanel_us_code/boot.txt +++ b/hmi/dev/nspanel_us_code/boot.txt @@ -21,7 +21,7 @@ Variable (string) version Attributes ID : 7 Scope : global - Text : 4.4.0.dev8 + Text : 4.4.0.dev9 Max. Text Size: 16 Variable (int32) log_len @@ -74,22 +74,16 @@ Variable (int32) log_max_lines Scope: local Value: 7 -Variable (int32) counter - Attributes - ID : 26 - Scope: local - Value: 0 - Variable (string) json Attributes - ID : 28 + ID : 27 Scope : local Text : Max. Text Size: 100 Variable (string) num_to_str Attributes - ID : 29 + ID : 28 Scope : local Text : Max. Text Size: 10 @@ -330,23 +324,13 @@ Dual-state Button bt_reboot Timer tm_esphome Attributes - ID : 27 + ID : 26 Scope : local Period (ms): 10000 Enabled : yes Events Timer Event - counter.val++ - if(counter.val>360) - { - rest - } - sys0=counter.val%60 - if(sys0==0) - { - bauds=921600 - } click sys_baudrate,1 click initializing,0 doevents diff --git a/hmi/dev/nspanel_us_code/buttonpage01.txt b/hmi/dev/nspanel_us_code/buttonpage01.txt index ca86df955..ed536f370 100644 --- a/hmi/dev/nspanel_us_code/buttonpage01.txt +++ b/hmi/dev/nspanel_us_code/buttonpage01.txt @@ -42,33 +42,6 @@ Page buttonpage01 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage01 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_us_code/buttonpage02.txt b/hmi/dev/nspanel_us_code/buttonpage02.txt index 8bd74a465..cf0dbf491 100644 --- a/hmi/dev/nspanel_us_code/buttonpage02.txt +++ b/hmi/dev/nspanel_us_code/buttonpage02.txt @@ -42,33 +42,6 @@ Page buttonpage02 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage02 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_us_code/buttonpage03.txt b/hmi/dev/nspanel_us_code/buttonpage03.txt index 58a440cce..4728540e8 100644 --- a/hmi/dev/nspanel_us_code/buttonpage03.txt +++ b/hmi/dev/nspanel_us_code/buttonpage03.txt @@ -42,33 +42,6 @@ Page buttonpage03 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage03 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_us_code/buttonpage04.txt b/hmi/dev/nspanel_us_code/buttonpage04.txt index d788f45c1..f98a19d2f 100644 --- a/hmi/dev/nspanel_us_code/buttonpage04.txt +++ b/hmi/dev/nspanel_us_code/buttonpage04.txt @@ -42,33 +42,6 @@ Page buttonpage04 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage04 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_us_code/confirm.txt b/hmi/dev/nspanel_us_code/confirm.txt index b63e61f47..73234df8e 100644 --- a/hmi/dev/nspanel_us_code/confirm.txt +++ b/hmi/dev/nspanel_us_code/confirm.txt @@ -22,7 +22,7 @@ Page confirm Variable (int32) page_id Attributes ID : 3 - Scope: global + Scope: local Value: 0 Variable (string) aux @@ -35,14 +35,14 @@ Variable (string) aux Variable (string) page_name Attributes ID : 9 - Scope : global + Scope : local Text : Max. Text Size: 12 Variable (string) component Attributes ID : 10 - Scope : global + Scope : local Text : Max. Text Size: 10 @@ -59,7 +59,7 @@ Text t0 Text title Attributes ID : 4 - Scope : global + Scope : local Dragging : 0 Send Component ID : on press and release Associated Keyboard: none @@ -69,7 +69,7 @@ Text title Text body Attributes ID : 8 - Scope : global + Scope : local Dragging : 0 Send Component ID : on press and release Associated Keyboard: none diff --git a/hmi/dev/nspanel_us_land_code/boot.txt b/hmi/dev/nspanel_us_land_code/boot.txt index b65fc1d99..82b2bc920 100644 --- a/hmi/dev/nspanel_us_land_code/boot.txt +++ b/hmi/dev/nspanel_us_land_code/boot.txt @@ -21,7 +21,7 @@ Variable (string) version Attributes ID : 7 Scope : global - Text : 4.4.0.dev8 + Text : 4.4.0.dev9 Max. Text Size: 16 Variable (int32) log_len @@ -74,22 +74,16 @@ Variable (int32) log_max_lines Scope: local Value: 14 -Variable (int32) counter - Attributes - ID : 26 - Scope: local - Value: 0 - Variable (string) json Attributes - ID : 28 + ID : 27 Scope : local Text : Max. Text Size: 100 Variable (string) num_to_str Attributes - ID : 29 + ID : 28 Scope : local Text : Max. Text Size: 10 @@ -330,23 +324,13 @@ Dual-state Button bt_reboot Timer tm_esphome Attributes - ID : 27 + ID : 26 Scope : local Period (ms): 10000 Enabled : yes Events Timer Event - counter.val++ - if(counter.val>360) - { - rest - } - sys0=counter.val%60 - if(sys0==0) - { - bauds=921600 - } click sys_baudrate,1 click initializing,0 doevents diff --git a/hmi/dev/nspanel_us_land_code/buttonpage01.txt b/hmi/dev/nspanel_us_land_code/buttonpage01.txt index ca86df955..ed536f370 100644 --- a/hmi/dev/nspanel_us_land_code/buttonpage01.txt +++ b/hmi/dev/nspanel_us_land_code/buttonpage01.txt @@ -42,33 +42,6 @@ Page buttonpage01 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage01 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_us_land_code/buttonpage02.txt b/hmi/dev/nspanel_us_land_code/buttonpage02.txt index 8bd74a465..cf0dbf491 100644 --- a/hmi/dev/nspanel_us_land_code/buttonpage02.txt +++ b/hmi/dev/nspanel_us_land_code/buttonpage02.txt @@ -42,33 +42,6 @@ Page buttonpage02 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage02 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_us_land_code/buttonpage03.txt b/hmi/dev/nspanel_us_land_code/buttonpage03.txt index 58a440cce..4728540e8 100644 --- a/hmi/dev/nspanel_us_land_code/buttonpage03.txt +++ b/hmi/dev/nspanel_us_land_code/buttonpage03.txt @@ -42,33 +42,6 @@ Page buttonpage03 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage03 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_us_land_code/buttonpage04.txt b/hmi/dev/nspanel_us_land_code/buttonpage04.txt index c95656561..9e2579ead 100644 --- a/hmi/dev/nspanel_us_land_code/buttonpage04.txt +++ b/hmi/dev/nspanel_us_land_code/buttonpage04.txt @@ -42,33 +42,6 @@ Page buttonpage04 } sendme -Variable (string) lastclick - Attributes - ID : 4 - Scope : local - Text : - Max. Text Size: 100 - -Variable (string) click_comp - Attributes - ID : 7 - Scope : local - Text : - Max. Text Size: 8 - -Variable (string) page_name - Attributes - ID : 9 - Scope : local - Text : buttonpage04 - Max. Text Size: 12 - -Variable (int32) confirm - Attributes - ID : 10 - Scope: local - Value: 0 - Text page_label Attributes ID : 3 @@ -81,7 +54,7 @@ Text page_label Text page_index Attributes - ID : 5 + ID : 4 Scope : local Dragging : 0 Send Component ID : on press and release @@ -91,7 +64,7 @@ Text page_index Text button01pic Attributes - ID : 11 + ID : 6 Scope : local Dragging : 0 Send Component ID : disabled @@ -101,7 +74,7 @@ Text button01pic Text button02pic Attributes - ID : 12 + ID : 7 Scope : local Dragging : 0 Send Component ID : disabled @@ -111,7 +84,7 @@ Text button02pic Text button03pic Attributes - ID : 13 + ID : 8 Scope : local Dragging : 0 Send Component ID : disabled @@ -121,7 +94,7 @@ Text button03pic Text button04pic Attributes - ID : 14 + ID : 9 Scope : local Dragging : 0 Send Component ID : disabled @@ -131,7 +104,7 @@ Text button04pic Text button05pic Attributes - ID : 15 + ID : 10 Scope : local Dragging : 0 Send Component ID : disabled @@ -141,7 +114,7 @@ Text button05pic Text button06pic Attributes - ID : 16 + ID : 11 Scope : local Dragging : 0 Send Component ID : disabled @@ -151,7 +124,7 @@ Text button06pic Text button07pic Attributes - ID : 17 + ID : 12 Scope : local Dragging : 0 Send Component ID : disabled @@ -161,7 +134,7 @@ Text button07pic Text button08pic Attributes - ID : 18 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -171,7 +144,7 @@ Text button08pic Text button01text Attributes - ID : 19 + ID : 14 Scope : local Dragging : 0 Send Component ID : disabled @@ -181,7 +154,7 @@ Text button01text Text button02text Attributes - ID : 20 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -191,7 +164,7 @@ Text button02text Text button03text Attributes - ID : 21 + ID : 16 Scope : local Dragging : 0 Send Component ID : disabled @@ -201,7 +174,7 @@ Text button03text Text button04text Attributes - ID : 22 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled @@ -211,7 +184,7 @@ Text button04text Text button05text Attributes - ID : 23 + ID : 18 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +194,7 @@ Text button05text Text button06text Attributes - ID : 24 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +204,7 @@ Text button06text Text button07text Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +214,7 @@ Text button07text Text button08text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +224,7 @@ Text button08text Text button01icon Attributes - ID : 27 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +234,7 @@ Text button01icon Text button02icon Attributes - ID : 28 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -271,7 +244,7 @@ Text button02icon Text button03icon Attributes - ID : 29 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -281,7 +254,7 @@ Text button03icon Text button04icon Attributes - ID : 30 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -291,7 +264,7 @@ Text button04icon Text button05icon Attributes - ID : 31 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -301,7 +274,7 @@ Text button05icon Text button06icon Attributes - ID : 32 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -311,7 +284,7 @@ Text button06icon Text button07icon Attributes - ID : 33 + ID : 28 Scope : local Dragging : 0 Send Component ID : disabled @@ -321,7 +294,7 @@ Text button07icon Text button08icon Attributes - ID : 34 + ID : 29 Scope : local Dragging : 0 Send Component ID : disabled @@ -331,7 +304,7 @@ Text button08icon Text button01bri Attributes - ID : 35 + ID : 30 Scope : local Dragging : 0 Send Component ID : disabled @@ -341,7 +314,7 @@ Text button01bri Text button02bri Attributes - ID : 36 + ID : 31 Scope : local Dragging : 0 Send Component ID : disabled @@ -351,7 +324,7 @@ Text button02bri Text button03bri Attributes - ID : 37 + ID : 32 Scope : local Dragging : 0 Send Component ID : disabled @@ -361,7 +334,7 @@ Text button03bri Text button04bri Attributes - ID : 38 + ID : 33 Scope : local Dragging : 0 Send Component ID : disabled @@ -371,7 +344,7 @@ Text button04bri Text button05bri Attributes - ID : 39 + ID : 34 Scope : local Dragging : 0 Send Component ID : disabled @@ -381,7 +354,7 @@ Text button05bri Text button06bri Attributes - ID : 40 + ID : 35 Scope : local Dragging : 0 Send Component ID : disabled @@ -391,7 +364,7 @@ Text button06bri Text button07bri Attributes - ID : 41 + ID : 36 Scope : local Dragging : 0 Send Component ID : disabled @@ -401,7 +374,7 @@ Text button07bri Text button08bri Attributes - ID : 42 + ID : 37 Scope : local Dragging : 0 Send Component ID : disabled @@ -411,7 +384,7 @@ Text button08bri Button button_back Attributes - ID : 6 + ID : 5 Scope : local Dragging : 0 Send Component ID: on press and release @@ -425,292 +398,60 @@ Button button_back Hotspot button01 Attributes - ID : 43 + ID : 38 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button01" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&1 - if(sys0>0) - { - confirm.body.txt=button01text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button02 Attributes - ID : 44 + ID : 39 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button02" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&2 - if(sys0>0) - { - confirm.body.txt=button02text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button03 Attributes - ID : 45 + ID : 40 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button03" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&4 - if(sys0>0) - { - confirm.body.txt=button03text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button04 Attributes - ID : 46 + ID : 41 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button04" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&8 - if(sys0>0) - { - confirm.body.txt=button04text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button05 Attributes - ID : 47 + ID : 42 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button05" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&16 - if(sys0>0) - { - confirm.body.txt=button05text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button06 Attributes - ID : 48 + ID : 43 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button06" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&32 - if(sys0>0) - { - confirm.body.txt=button06text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button07 Attributes - ID : 49 + ID : 44 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button07" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&64 - if(sys0>0) - { - confirm.body.txt=button07text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Hotspot button08 Attributes - ID : 50 + ID : 45 Scope : local Dragging : 0 Send Component ID: on press and release - Events - Touch Press Event - click_comp.txt="button08" - click_timer.en=1 - - Touch Release Event - if(click_timer.en==1) - { - click_timer.en=0 - sys0=confirm.val&128 - if(sys0>0) - { - confirm.body.txt=button08text.txt - confirm.page_id.val=dp - confirm.page_name.txt=page_name.txt - confirm.component.txt=click_comp.txt - page confirm - }else - { - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"short_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - } - } - Timer swipestore Attributes ID : 2 @@ -723,24 +464,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer click_timer - Attributes - ID : 8 - Scope : local - Period (ms): 800 - Enabled : no - - Events - Timer Event - lastclick.txt="{\"page\": \""+page_name.txt+"\", \"event\": \"long_click\", \"component\": \""+click_comp.txt+"\"}" - printh 92 - prints "localevent",0 - printh 00 - prints lastclick.txt,0 - printh 00 - printh FF FF FF - click_timer.en=0 - TouchCap swipe Attributes ID : 1 diff --git a/hmi/dev/nspanel_us_land_code/confirm.txt b/hmi/dev/nspanel_us_land_code/confirm.txt index b63e61f47..73234df8e 100644 --- a/hmi/dev/nspanel_us_land_code/confirm.txt +++ b/hmi/dev/nspanel_us_land_code/confirm.txt @@ -22,7 +22,7 @@ Page confirm Variable (int32) page_id Attributes ID : 3 - Scope: global + Scope: local Value: 0 Variable (string) aux @@ -35,14 +35,14 @@ Variable (string) aux Variable (string) page_name Attributes ID : 9 - Scope : global + Scope : local Text : Max. Text Size: 12 Variable (string) component Attributes ID : 10 - Scope : global + Scope : local Text : Max. Text Size: 10 @@ -59,7 +59,7 @@ Text t0 Text title Attributes ID : 4 - Scope : global + Scope : local Dragging : 0 Send Component ID : on press and release Associated Keyboard: none @@ -69,7 +69,7 @@ Text title Text body Attributes ID : 8 - Scope : global + Scope : local Dragging : 0 Send Component ID : on press and release Associated Keyboard: none diff --git a/hmi/nspanel_CJK_eu.HMI b/hmi/nspanel_CJK_eu.HMI index d2b005722..f3ab67225 100644 Binary files a/hmi/nspanel_CJK_eu.HMI and b/hmi/nspanel_CJK_eu.HMI differ diff --git a/hmi/nspanel_CJK_eu.tft b/hmi/nspanel_CJK_eu.tft index 496f316a1..1048028c8 100644 Binary files a/hmi/nspanel_CJK_eu.tft and b/hmi/nspanel_CJK_eu.tft differ diff --git a/hmi/nspanel_CJK_us.HMI b/hmi/nspanel_CJK_us.HMI index 65d4fd4a7..0d13f0f39 100644 Binary files a/hmi/nspanel_CJK_us.HMI and b/hmi/nspanel_CJK_us.HMI differ diff --git a/hmi/nspanel_CJK_us.tft b/hmi/nspanel_CJK_us.tft index 4adfc0208..1126f7751 100644 Binary files a/hmi/nspanel_CJK_us.tft and b/hmi/nspanel_CJK_us.tft differ diff --git a/hmi/nspanel_CJK_us_land.HMI b/hmi/nspanel_CJK_us_land.HMI index aea1e9d0f..9f29fc826 100644 Binary files a/hmi/nspanel_CJK_us_land.HMI and b/hmi/nspanel_CJK_us_land.HMI differ diff --git a/hmi/nspanel_CJK_us_land.tft b/hmi/nspanel_CJK_us_land.tft index b72366f85..d9050d4f1 100644 Binary files a/hmi/nspanel_CJK_us_land.tft and b/hmi/nspanel_CJK_us_land.tft differ diff --git a/hmi/nspanel_blank.HMI b/hmi/nspanel_blank.HMI index f393d4af3..17bcb1733 100644 Binary files a/hmi/nspanel_blank.HMI and b/hmi/nspanel_blank.HMI differ diff --git a/hmi/nspanel_blank.tft b/hmi/nspanel_blank.tft index 9063d4643..96dacd8d5 100644 Binary files a/hmi/nspanel_blank.tft and b/hmi/nspanel_blank.tft differ diff --git a/hmi/nspanel_eu.HMI b/hmi/nspanel_eu.HMI index 4abd8937f..9a782b229 100644 Binary files a/hmi/nspanel_eu.HMI and b/hmi/nspanel_eu.HMI differ diff --git a/hmi/nspanel_eu.tft b/hmi/nspanel_eu.tft index b6e6f1712..ed7dffff8 100644 Binary files a/hmi/nspanel_eu.tft and b/hmi/nspanel_eu.tft differ diff --git a/hmi/nspanel_us.HMI b/hmi/nspanel_us.HMI index a8f429be6..dfb7808de 100644 Binary files a/hmi/nspanel_us.HMI and b/hmi/nspanel_us.HMI differ diff --git a/hmi/nspanel_us.tft b/hmi/nspanel_us.tft index 0f4227aa3..e55d4b698 100644 Binary files a/hmi/nspanel_us.tft and b/hmi/nspanel_us.tft differ diff --git a/hmi/nspanel_us_land.HMI b/hmi/nspanel_us_land.HMI index 439a15ad0..7f569ddad 100644 Binary files a/hmi/nspanel_us_land.HMI and b/hmi/nspanel_us_land.HMI differ diff --git a/hmi/nspanel_us_land.tft b/hmi/nspanel_us_land.tft index 330e64e0a..68c03a0b8 100644 Binary files a/hmi/nspanel_us_land.tft and b/hmi/nspanel_us_land.tft differ diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 06108933e..899790f25 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -10,7 +10,7 @@ blueprint: description: > # NSPanel Configuration via Blueprint: Complete UI-Based Setup - **Version**: v4.4.0.dev8 + **Version**: v4.4.0.dev9 This project enables comprehensive configuration of your NSPanel through a Blueprint featuring a user interface. @@ -3807,16 +3807,9 @@ trigger_variables: ).split(".")[1].split("_nextion_display")[0] }} {%- elif nspanel_deviceid is string %} - {{ nspanel_deviceid | regex_replace("[^a-zA-Z0-9]", "_") | regex_replace("_+", "_") | lower }} + {{ nspanel_deviceid | slugify }} {%- endif %} - device_name_sensor: > - {{ - nspanel_entities | selectattr(None, "search", "sensor.*_device_name") | list | last - if nspanel_entities | selectattr(None, "search", "sensor.*_device_name") | list | count > 0 - else ("sensor." ~ device_name ~ "_device_name") - }} - relay01_entity: > {{ nspanel_entities | selectattr(None, "search", "switch.*_relay_1") | list | last @@ -3869,7 +3862,7 @@ trigger_variables: }} variables: - blueprint_version: 4.4.0.dev8 + blueprint_version: 4.4.0.dev9 pages: current: '{{ states(currentpage) }}' home: "home" @@ -4615,7 +4608,7 @@ conditions: - > # Trigger is coming from panel's event or Nextion display must be connected {{ trigger.id in ["automation_reloaded", "ha_started", "nspanel_event"] or - (states(nextion_display_sensor) | default(false) and has_value(device_name_sensor)) + states(nextion_display_sensor) | default(false) }} - > # Update page Home only when visible or home_page_background_update is enabled {{ @@ -4672,6 +4665,7 @@ conditions: actions: - variables: ##### GENERAL ##### + nspanel_name_from_device_attr: '{{ device_attr(nspanel_deviceid, "name") }}' nspanel_name: > {{ trigger.event.data.device_name @@ -4680,37 +4674,18 @@ actions: trigger.event is defined and trigger.event.data is defined and trigger.event.data.device_name is defined and - trigger.event.data.device_name is string and trigger.event.data.device_name | length > 0 + trigger.event.data.device_name is string and + trigger.event.data.device_name | length > 0 else ( - states(device_name_sensor) - if has_value(device_name_sensor) + nspanel_name_from_device_attr | slugify + if + nspanel_name_from_device_attr is string and + nspanel_name_from_device_attr | length > 0 else device_name ) }} - # esphome_version: > - # {% - # set esphome_version_sensor = - # nspanel_entities | selectattr(None, "search", "sensor.*_esphome_version") | list | last - # if nspanel_entities | selectattr(None, "search", "sensor.*_esphome_version") | list | count > 0 - # else ("sensor." ~ device_name ~ "_esphome_version") - # %} - # {{ - # version(trigger.event.data.esphome_version) - # if - # trigger is defined and - # trigger.event is defined and - # trigger.event.data is defined and - # trigger.event.data.esphome_version is defined and - # trigger.event.data.esphome_version is string and trigger.event.data.esphome_version | length > 0 - # else - # ( - # version(states(esphome_version_sensor)) - # if has_value(esphome_version_sensor) - # else version("0.0.0") - # ) - # }} date_format_temp: !input 'date_format' # Avoid breaking change for existing users with legacy type format date_format: > @@ -8591,15 +8566,10 @@ actions: - alias: Boot init conditions: - '{{ nspanel_event.type == "boot"}}' - - '{{ nspanel_event.step is defined and nspanel_event.step in ["start", "timeout"]}}' sequence: # Boot init - variables: is_boot: true - - if: '{{ nspanel_event.step == "timeout" }}' - then: - - delay: 15 - - alias: Boot sequence sequence: - alias: Logbook - Boot sequence @@ -8611,7 +8581,9 @@ actions: message: 'NSPanel requested boot parameters: {{ nspanel_event }}' - alias: BOOT_STEP_VERSIONING - if: '{{ nspanel_event.BOOT_STEP_VERSIONING is defined and nspanel_event.BOOT_STEP_VERSIONING }}' + if: + - '{{ nspanel_event.BOOT_STEP_VERSIONING is defined }}' + - '{{ nspanel_event.BOOT_STEP_VERSIONING }}' then: - alias: Send the blueprint version sequence: @@ -9123,7 +9095,7 @@ actions: continue_on_error: true - alias: BOOT_STEP_HW_TEMPERATURE - if: > + if: - '{{ nspanel_event.BOOT_STEP_HW_TEMPERATURE is defined }}' - '{{ nspanel_event.BOOT_STEP_HW_TEMPERATURE }}' then: @@ -9206,7 +9178,7 @@ actions: continue_on_error: true - alias: BOOT_STEP_PAGE_BUTTONS - if: > + if: - '{{ nspanel_event.BOOT_STEP_PAGE_BUTTONS is defined }}' - '{{ nspanel_event.BOOT_STEP_PAGE_BUTTONS }}' then: @@ -9487,7 +9459,7 @@ actions: continue_on_error: true - alias: BOOT_STEP_PAGE_CLIMATE - if: > + if: - '{{ nspanel_event.BOOT_STEP_PAGE_CLIMATE is defined }}' - '{{ nspanel_event.BOOT_STEP_PAGE_CLIMATE }}' then: @@ -9524,7 +9496,7 @@ actions: continue_on_error: true - alias: BOOT_STEP_PAGE_CONFIRM - if: > + if: - '{{ nspanel_event.BOOT_STEP_PAGE_CONFIRM is defined }}' - '{{ nspanel_event.BOOT_STEP_PAGE_CONFIRM }}' then: @@ -9565,7 +9537,7 @@ actions: continue_on_error: true - alias: BOOT_STEP_PAGE_ENTITIES - if: > + if: - '{{ nspanel_event.BOOT_STEP_PAGE_ENTITIES is defined }}' - '{{ nspanel_event.BOOT_STEP_PAGE_ENTITIES }}' then: @@ -10163,7 +10135,7 @@ actions: continue_on_error: true - alias: BOOT_STEP_PAGE_KEYBOARD_NUM - if: > + if: - '{{ nspanel_event.BOOT_STEP_PAGE_KEYBOARD_NUM is defined }}' - '{{ nspanel_event.BOOT_STEP_PAGE_KEYBOARD_NUM }}' then: # There's nothing here so far @@ -10193,7 +10165,7 @@ actions: continue_on_error: true - alias: BOOT_STEP_PAGE_MEDIA_PLAYER - if: > + if: - '{{ nspanel_event.BOOT_STEP_PAGE_MEDIA_PLAYER is defined }}' - '{{ nspanel_event.BOOT_STEP_PAGE_MEDIA_PLAYER }}' then: # There's nothing here so far @@ -10209,7 +10181,7 @@ actions: continue_on_error: true - alias: BOOT_STEP_PAGE_NOTIFICATION - if: > + if: - '{{ nspanel_event.BOOT_STEP_PAGE_NOTIFICATION is defined }}' - '{{ nspanel_event.BOOT_STEP_PAGE_NOTIFICATION }}' then: # There's nothing here so far @@ -10225,7 +10197,7 @@ actions: continue_on_error: true - alias: BOOT_STEP_PAGE_QRCODE - if: > + if: - '{{ nspanel_event.BOOT_STEP_PAGE_QRCODE is defined }}' - '{{ nspanel_event.BOOT_STEP_PAGE_QRCODE }}' then: @@ -10307,7 +10279,7 @@ actions: continue_on_error: true - alias: BOOT_STEP_PAGE_SCREENSAVER - if: > + if: - '{{ nspanel_event.BOOT_STEP_PAGE_SCREENSAVER is defined }}' - '{{ nspanel_event.BOOT_STEP_PAGE_SCREENSAVER }}' then: @@ -10351,7 +10323,7 @@ actions: continue_on_error: true - alias: BOOT_STEP_PAGE_SETTINGS - if: > + if: - '{{ nspanel_event.BOOT_STEP_PAGE_SETTINGS is defined }}' - '{{ nspanel_event.BOOT_STEP_PAGE_SETTINGS }}' then: @@ -10407,7 +10379,7 @@ actions: continue_on_error: true - alias: BOOT_STEP_PAGE_UTILITIES - if: > + if: - '{{ nspanel_event.BOOT_STEP_PAGE_UTILITIES is defined }}' - '{{ nspanel_event.BOOT_STEP_PAGE_UTILITIES }}' then: @@ -10447,7 +10419,7 @@ actions: continue_on_error: true - alias: BOOT_STEP_PAGE_WEATHER - if: > + if: - '{{ nspanel_event.BOOT_STEP_PAGE_WEATHER is defined }}' - '{{ nspanel_event.BOOT_STEP_PAGE_WEATHER }}' then: @@ -10490,11 +10462,15 @@ actions: val: 30 continue_on_error: true - - &ADD_ON - sequence: - - &ADD_ON_CLIMATE + - alias: BOOT_STEP_ADDON_CLIMATE + if: + - '{{ BOOT_STEP_ADDON_CLIMATE in nspanel_event }}' + - '{{ nspanel_event.BOOT_STEP_ADDON_CLIMATE }}' + then: # There's nothing here so far + - *boot_delay + + - alias: Set climate friendly name sequence: - - *boot_delay - variables: climate_friendly_name: '{{ state_attr(climate, "friendly_name") }}' - *delay_default @@ -10504,6 +10480,16 @@ actions: val: '{{ climate_friendly_name if climate_friendly_name else "" }}' continue_on_error: true + - alias: Set BOOT_STEP_ADDON_CLIMATE + sequence: + - *delay_default + - alias: set_bool.BOOT_STEP_ADDON_CLIMATE + action: 'esphome.{{ nspanel_name }}_set_int' + data: + component: BOOT_STEP + val: 32 + continue_on_error: true + ##### Update Date & Time before showing the Home page ##### - *refresh_date diff --git a/prebuilt/nspanel_esphome_prebuilt.yaml b/prebuilt/nspanel_esphome_prebuilt.yaml index 757ded715..ddb3f5362 100644 --- a/prebuilt/nspanel_esphome_prebuilt.yaml +++ b/prebuilt/nspanel_esphome_prebuilt.yaml @@ -15,34 +15,41 @@ substitutions: wifi_password: NSPanel_Blueprint packages: - core_package: !include ../esphome/nspanel_esphome_core.yaml - standard_package: !include ../esphome/nspanel_esphome_standard.yaml - -api: - actions: - - action: firmware_update - variables: - url: string - then: - - ota.http_request.flash: - md5_url: !lambda return fw_url->state + ".md5"; - url: !lambda return fw_url->state; - - logger.log: - format: "Firmware update failed!" - level: ERROR - -button: - - id: bt_firmware_update - name: Firmware update - platform: template - on_press: - then: - - ota.http_request.flash: - md5_url: !lambda return fw_url->state + ".md5"; - url: !lambda return fw_url->state; - - logger.log: - format: "Firmware update failed!" - level: ERROR + # yamllint disable rule:colons + # Core packages + core_package: !include ../esphome/nspanel_esphome_core.yaml # Core configuration for basic functionality + standard_package: !include ../esphome/nspanel_esphome_standard.yaml # Standard (includes packages listed) + ota_http: !include ../esphome/nspanel_esphome_addon_ota_http.yaml # Required for pre-built firmware + # Optional (and recommended) packages + # hw_buzzer: !include ../esphome/nspanel_esphome_standard_hw_buzzer.yaml + # hw_relays: !include ../esphome/nspanel_esphome_standard_hw_relays.yaml + # hw_temperature: !include ../esphome/nspanel_esphome_standard_hw_temperature.yaml + # page_alarm: !include ../esphome/nspanel_esphome_standard_page_alarm.yaml + # page_blank: !include ../esphome/nspanel_esphome_standard_page_blank.yaml + # page_buttons: !include ../esphome/nspanel_esphome_standard_page_buttons.yaml + # page_climate: !include ../esphome/nspanel_esphome_standard_page_climate.yaml + # page_confirm: !include ../esphome/nspanel_esphome_standard_page_confirm.yaml + # page_cover: !include ../esphome/nspanel_esphome_standard_page_cover.yaml + # page_entities: !include ../esphome/nspanel_esphome_standard_page_entities.yaml + # page_fan: !include ../esphome/nspanel_esphome_standard_page_fan.yaml + # page_keyb_num: !include ../esphome/nspanel_esphome_standard_page_keyb_num.yaml + # page_light: !include ../esphome/nspanel_esphome_standard_page_light.yaml + # page_media_player: !include ../esphome/nspanel_esphome_standard_page_media_player.yaml + # page_notification: !include ../esphome/nspanel_esphome_standard_page_notification.yaml + # page_qrcode: !include ../esphome/nspanel_esphome_standard_page_qrcode.yaml + # page_settings: !include ../esphome/nspanel_esphome_standard_page_settings.yaml + # page_utilities: !include ../esphome/nspanel_esphome_standard_page_utilities.yaml + # page_weather: !include ../esphome/nspanel_esphome_standard_page_weather.yaml + # upload_tft: !include ../esphome/nspanel_esphome_standard_upload_tft.yaml + # Optional advanced and add-on configurations + # addon_advanced: !include ../esphome/nspanel_esphome_advanced.yaml + # addon_ble_tracker: !include ../esphome/nspanel_esphome_addon_ble_tracker.yaml + # addon_ble_proxy: !include ../esphome/nspanel_esphome_addon_bluetooth_proxy.yaml + # addon_climate_cool: !include ../esphome/nspanel_esphome_addon_climate_cool.yaml + # addon_climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml + # addon_climate_dual: !include ../esphome/nspanel_esphome_addon_climate_dual.yaml + # addon_cover: !include ../esphome/nspanel_esphome_addon_cover.yaml + # yamllint enable rule:colons captive_portal: id: ap_captive_portal @@ -51,6 +58,12 @@ dashboard_import: package_import_url: github://Blackymas/NSPanel_HA_Blueprint/prebuilt/nspanel_esphome_prebuilt.yaml@main import_full_config: false +esp32: + framework: + type: esp-idf + version: 4.4.8 + platform_version: 5.4.0 + esp32_ble: id: ble @@ -67,8 +80,6 @@ esphome: build_flags: - -D NSPANEL_HA_BLUEPRINT_PREBUILT -http_request: - improv_serial: id: serial_improv @@ -78,8 +89,6 @@ logger: ota: - id: !extend ota_std password: !remove - - id: ota_web - platform: http_request script: - id: !extend dump_config_packages # Defined by nspanel_esphome_core_base.yaml @@ -87,29 +96,6 @@ script: - lambda: |- ESP_LOGCONFIG("${project_tag}", " - Pre-built"); -text: - - id: fw_url - name: Firmware URL - platform: template - icon: mdi:cloud-download - mode: text - optimistic: true - entity_category: config - internal: false - update_interval: never - restore_value: true - initial_value: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/prebuilt/nspanel_esphome_prebuilt.bin" - on_value: - then: - - lambda: |- - ESP_LOGI("text.fw_url", "New Firmware URL set: %s", x.c_str()); - -update: - - id: update_std - platform: http_request - name: Firmware Update - source: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/prebuilt/nspanel_esphome_prebuilt.manifest.json" - wifi: networks: !remove ap: {} diff --git a/prebuilt/wall-display-esp32/manifest.json b/prebuilt/wall-display-esp32/manifest.json index 46b79834b..72bac9ddf 100644 --- a/prebuilt/wall-display-esp32/manifest.json +++ b/prebuilt/wall-display-esp32/manifest.json @@ -2,7 +2,7 @@ "chipFamily": "ESP32", "ota": { "path": "wall-display-esp32.ota.bin", - "md5": "4fe8b4fc16d9f02db19978dd77919c71" + "md5": "391baa1e618d74b8567cd02efe638e69" }, "parts": [ { @@ -11,12 +11,12 @@ } ], "name": "Wall Display", - "version": "4.4.0.dev8", + "version": "4.3.12", "builds": { "chipFamily": "ESP32", "ota": { "path": "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/prebuilt/wall_display.bin", - "release_url": "https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.4.0.dev8" + "release_url": "https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.12" } } } \ No newline at end of file diff --git a/prebuilt/wall-display-esp32/wall-display-esp32.factory.bin b/prebuilt/wall-display-esp32/wall-display-esp32.factory.bin index 37427828c..187a976de 100644 Binary files a/prebuilt/wall-display-esp32/wall-display-esp32.factory.bin and b/prebuilt/wall-display-esp32/wall-display-esp32.factory.bin differ diff --git a/prebuilt/wall-display-esp32/wall-display-esp32.ota.bin b/prebuilt/wall-display-esp32/wall-display-esp32.ota.bin index a9efd242f..fd8dc4a82 100644 Binary files a/prebuilt/wall-display-esp32/wall-display-esp32.ota.bin and b/prebuilt/wall-display-esp32/wall-display-esp32.ota.bin differ diff --git a/prebuilt/wall_display.bin b/prebuilt/wall_display.bin index a9efd242f..fd8dc4a82 100644 Binary files a/prebuilt/wall_display.bin and b/prebuilt/wall_display.bin differ diff --git a/prebuilt/wall_display.bin.md5 b/prebuilt/wall_display.bin.md5 index 6ef7da488..fdd3ddaec 100644 --- a/prebuilt/wall_display.bin.md5 +++ b/prebuilt/wall_display.bin.md5 @@ -1 +1 @@ -4fe8b4fc16d9f02db19978dd77919c71 prebuilt/wall_display.bin +391baa1e618d74b8567cd02efe638e69 prebuilt/wall_display.bin diff --git a/prebuilt/wall_display.factory.bin b/prebuilt/wall_display.factory.bin index 37427828c..187a976de 100644 Binary files a/prebuilt/wall_display.factory.bin and b/prebuilt/wall_display.factory.bin differ diff --git a/prebuilt/wall_display.factory.bin.md5 b/prebuilt/wall_display.factory.bin.md5 index 6dfca8d18..512c733b4 100644 --- a/prebuilt/wall_display.factory.bin.md5 +++ b/prebuilt/wall_display.factory.bin.md5 @@ -1 +1 @@ -966034d6fa32258792ae82fe6801d727 prebuilt/wall_display.factory.bin +7f27de2296979005184c8f14521c923f prebuilt/wall_display.factory.bin diff --git a/prebuilt/wall_display.manifest.json b/prebuilt/wall_display.manifest.json index 46b79834b..72bac9ddf 100644 --- a/prebuilt/wall_display.manifest.json +++ b/prebuilt/wall_display.manifest.json @@ -2,7 +2,7 @@ "chipFamily": "ESP32", "ota": { "path": "wall-display-esp32.ota.bin", - "md5": "4fe8b4fc16d9f02db19978dd77919c71" + "md5": "391baa1e618d74b8567cd02efe638e69" }, "parts": [ { @@ -11,12 +11,12 @@ } ], "name": "Wall Display", - "version": "4.4.0.dev8", + "version": "4.3.12", "builds": { "chipFamily": "ESP32", "ota": { "path": "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/prebuilt/wall_display.bin", - "release_url": "https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.4.0.dev8" + "release_url": "https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.12" } } } \ No newline at end of file diff --git a/prebuilt/wall_display.yaml b/prebuilt/wall_display.yaml index c9f093088..397be63ac 100644 --- a/prebuilt/wall_display.yaml +++ b/prebuilt/wall_display.yaml @@ -12,37 +12,103 @@ substitutions: device_name: "wall-display" friendly_name: "Wall Display" + wifi_password: NSPanel_Wall_Display + + firmware_bin: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/prebuilt/wall_display.bin" + firmware_manifest: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/prebuilt/wall_display.manifest.json" + heater_relay: "1" # Possible values: 1/2 temp_min: "16" # Min supported temperature is 40°F temp_max: "26" # Max supported temperature is 80°F temp_step: "0.5" # Temperature granularity is 1°F packages: - prebuilt_package: !include nspanel_esphome_prebuilt.yaml - climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml + # yamllint disable rule:colons + # Core packages + core_package: !include ../esphome/nspanel_esphome_core.yaml # Core configuration for basic functionality + standard_package: !include ../esphome/nspanel_esphome_standard.yaml # Standard (includes packages listed) + ota_http: !include ../esphome/nspanel_esphome_addon_ota_http.yaml # Required for pre-built firmware + addon_climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml + # Optional (and recommended) packages + # hw_buzzer: !include ../esphome/nspanel_esphome_standard_hw_buzzer.yaml + # hw_relays: !include ../esphome/nspanel_esphome_standard_hw_relays.yaml + # hw_temperature: !include ../esphome/nspanel_esphome_standard_hw_temperature.yaml + # page_alarm: !include ../esphome/nspanel_esphome_standard_page_alarm.yaml + # page_blank: !include ../esphome/nspanel_esphome_standard_page_blank.yaml + # page_buttons: !include ../esphome/nspanel_esphome_standard_page_buttons.yaml + # page_climate: !include ../esphome/nspanel_esphome_standard_page_climate.yaml + # page_confirm: !include ../esphome/nspanel_esphome_standard_page_confirm.yaml + # page_cover: !include ../esphome/nspanel_esphome_standard_page_cover.yaml + # page_entities: !include ../esphome/nspanel_esphome_standard_page_entities.yaml + # page_fan: !include ../esphome/nspanel_esphome_standard_page_fan.yaml + # page_keyb_num: !include ../esphome/nspanel_esphome_standard_page_keyb_num.yaml + # page_light: !include ../esphome/nspanel_esphome_standard_page_light.yaml + # page_media_player: !include ../esphome/nspanel_esphome_standard_page_media_player.yaml + # page_notification: !include ../esphome/nspanel_esphome_standard_page_notification.yaml + # page_qrcode: !include ../esphome/nspanel_esphome_standard_page_qrcode.yaml + # page_settings: !include ../esphome/nspanel_esphome_standard_page_settings.yaml + # page_utilities: !include ../esphome/nspanel_esphome_standard_page_utilities.yaml + # page_weather: !include ../esphome/nspanel_esphome_standard_page_weather.yaml + # upload_tft: !include ../esphome/nspanel_esphome_standard_upload_tft.yaml + # Optional advanced and add-on configurations + # addon_advanced: !include ../esphome/nspanel_esphome_advanced.yaml + # addon_ble_tracker: !include ../esphome/nspanel_esphome_addon_ble_tracker.yaml + # addon_ble_proxy: !include ../esphome/nspanel_esphome_addon_bluetooth_proxy.yaml + # addon_climate_cool: !include ../esphome/nspanel_esphome_addon_climate_cool.yaml + # addon_climate_heat: !include ../esphome/nspanel_esphome_addon_climate_heat.yaml + # addon_climate_dual: !include ../esphome/nspanel_esphome_addon_climate_dual.yaml + # addon_cover: !include ../esphome/nspanel_esphome_addon_cover.yaml + # yamllint enable rule:colons + +captive_portal: + id: ap_captive_portal dashboard_import: package_import_url: github://Blackymas/NSPanel_HA_Blueprint/prebuilt/wall_display.yaml@main import_full_config: false +esp32: + framework: + type: esp-idf + version: 4.4.8 + platform_version: 5.4.0 + +esp32_ble: + id: ble + +esp32_improv: + id: ble_improv + authorizer: none + +esp32_ble_server: + id: ble_server + esphome: + name_add_mac_suffix: true project: name: esphome.Wall_Display platformio_options: build_flags: - -D NSPANEL_HA_BLUEPRINT_PREBUILT_WALL_DISPLAY +improv_serial: + id: serial_improv + +logger: + baud_rate: 115200 + +ota: + - id: !extend ota_std + password: !remove + script: - id: !extend dump_config_packages # Defined by nspanel_esphome_core_base.yaml then: - lambda: |- ESP_LOGCONFIG("${project_tag}", " - Pre-built (Wall Display)"); -text: - - id: !extend fw_url - initial_value: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/prebuilt/wall_display.bin" - -update: - - id: !extend update_std - source: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/prebuilt/wall_display.manifest.json" +wifi: + networks: !remove + ap: {} + power_save_mode: LIGHT # To make it compatible with BLE ...