diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 0b3b15674..4fa824a5f 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -7,7 +7,7 @@
- [ ] Only relevant files were touched
- [ ] Only one feature/fix was added per PR and the code change compiles without warnings
- [ ] The code change is tested and works with Tasmota core ESP8266 V.2.7.8
- - [ ] The code change is tested and works with Tasmota core ESP32 V.3.1.0.240926
+ - [ ] The code change is tested and works with Tasmota core ESP32 V.3.1.0.241206
- [ ] I accept the [CLA](https://github.com/arendst/Tasmota/blob/development/CONTRIBUTING.md#contributor-license-agreement-cla).
_NOTE: The code change must pass CI tests. **Your PR cannot be merged unless tests pass**_
diff --git a/.github/workflows/build_all_the_things.yml b/.github/workflows/build_all_the_things.yml
index 365b1ca81..aa80aa913 100644
--- a/.github/workflows/build_all_the_things.yml
+++ b/.github/workflows/build_all_the_things.yml
@@ -25,7 +25,7 @@ jobs:
fail-fast: true
matrix:
variant:
- - tasmota32solo1-safeboot
+ - tasmota32-webcam
steps:
- uses: actions/checkout@v4
- name: Set up Python
@@ -53,7 +53,7 @@ jobs:
fail-fast: true
matrix:
variant:
- - tasmota32-webcam
+ - tasmota32solo1-safeboot
steps:
- uses: actions/checkout@v4
- name: Set up Python
diff --git a/BUILDS.md b/BUILDS.md
index b8f12a5f6..91294c5e1 100644
--- a/BUILDS.md
+++ b/BUILDS.md
@@ -283,7 +283,7 @@ Note: the `minimal` variant is not listed as it shouldn't be used outside of the
| USE_SONOFF_SPM | | / x | | | | |
| USE_DISPLAY_TM1621_SONOFF | | / x | | | | |
| USE_SHELLY_PRO | | / x | | | | |
-| USE_DALI | | / - | | | | |
+| USE_DALI | | / x | | | | |
| USE_DINGTIAN_RELAY | | / - | | | | |
| USE_MATTER_DEVICE | | / x | | | | | See SetOption151 |
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 285760fb6..a4b54209a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,147 @@ All notable changes to this project will be documented in this file.
## [Released]
+## [14.4.0] 20241212
+- Release Rudolph
+
+## [14.3.0.7] 20241212
+### Added
+- Support for TM1640 based IoTTimer by Stefan Oskamp (#21376)
+- Command `SetOption161 1` to disable display of state text (#22515)
+- ESP32 new BLE filters by name and minimum RSSI (#22530)
+- ESP32 Hybrid compile take custom boards settings in account (#22542)
+- ESP32 ULP lp_core to Berry ULP module (#22567)
+- Shelly 1 Gen3 template {"NAME":"Shelly 1 Gen3","GPIO":[0,0,0,4736,0,224,0,0,1,1,192,0,0,0,0,0,0,0,0,576,1,1],"FLAG":0,"BASE":1,"CMND":"AdcGpio3 10000,10000,4000"}
+- Shelly 1PM Gen3 template {"NAME":"Shelly 1PM Gen3","GPIO":[0,32,0,4736,224,0,3200,8161,576,1,192,0,0,0,0,0,0,0,0,1,1,1],"FLAG":0,"BASE":1,"CMND":"AdcGpio3 10000,10000,4000"}
+- Shelly 2PM Gen3 template {"NAME":"Shelly 2PM Gen3","GPIO":[9472,3458,576,225,4736,224,640,608,1,1,193,0,0,0,0,0,0,0,192,32,1,1],"FLAG":0,"BASE":1,"CMND":"AdcGpio4 10000,10000,4000"}
+- Shelly i4 Gen3 template {"NAME":"Shelly i4 Gen3","GPIO":[0,0,0,4736,32,195,194,193,1,1,192,0,0,0,0,0,0,0,0,0,1,1],"FLAG":0,"BASE":1,"CMND":"AdcGpio3 10000,10000,4000}
+- Show Active Power Total with any multi-phase energy monitoring (#22579)
+- Command `SetOption162 1` to disable adding export energy to energy today (#22578)
+- ESP32 support for WPA2/3 Enterprise conditional in core v3.1.0.241206 (#22600)
+- Support for Sonoff POWCT Energy Export Active (#22596)
+
+### Breaking Changed
+- ESP32 ArtNet switches from GRB to RGB encoding (#22556)
+
+### Changed
+- ESP32 max number of supported switches/buttons/relays from 28 to 32
+- ESP32 max number of interlocks from 14 to 16
+- ESP32 Platform from 2024.11.30 to 2024.11.31, Framework (Arduino Core) from v3.1.0.241030 to v3.1.0.241117 and IDF to 5.3.1.241024 (#22504)
+- Prevent active BLE operations with unencrypted MI-format beacons (#22453)
+- ESP32 replaced NeoPixelBus with TasmotaLED (#22556)
+- ESP32 Platform from 2024.11.31 to 2024.12.30, Framework (Arduino Core) from v3.1.0.241117 to v3.1.0.241206 and IDF to 5.3.2 (#22600)
+
+### Fixed
+- ESP32 upgrade by file upload response based on file size (#22500)
+- Wrong GUI Module and Template drop down list indexes regression
+- Use HTML escape on File System Edit File load (#22492)
+- Magic switch applying masking window to any power change (#22535)
+- Shift595 output offsets and restart relay toggles
+- Shutter wrong power ON state (#22548)
+- ESP32-C2 TasmotaLED from not present I2S to SPI (#22575)
+- KNX Scenes index change regression from v14.2.0.4 (#22405)
+- Add GUI submenu headers and refresh configuration button text (#22592)
+
+### Removed
+
+## [14.3.0.6] 20241116
+### Added
+- Add command ``WebColor20`` to control color of Button when Off
+
+### Fixed
+- Matter provisioning with matter.js controller (#22470)
+- Prevent crashing when `display.ini` is missing end `#` (#22471)
+
+## [14.3.0.5] 20241111
+### Added
+- ESP32 MI32 legacy add config operations (#22458)
+
+### Changed
+- Redesign GUI adding feedback to buttons, shutters and lights
+- Use command `WebButton1` to change GUI shutter 1 name
+
+### Removed
+- Command ``SetOption161 1`` to disable web page slider updates by commands
+
+## [14.3.0.4] 20241111
+### Added
+- DALI command `DaliGroupSliders 0..16` to show GUI group sliders with feedback disabling `DaliLight`
+- Support for I2C over Serial (#22444)
+- Support KNX for scripts (#22429)
+- Support deep sleep (standby) for VL53L0X (#22441)
+- Support for MS5837 pressure and temperature sensor (#22376)
+- Berry add I2C read16/write16 supporting Little Endian (#22448)
+- Berry drivers for PCA9535 (generic and in SenseCAP D1) (#22451)
+- Shelly DALI Dimmer Gen3 template {"NAME":"Shelly DALI Dimmer Gen3","GPIO":[34,4736,0,3840,11360,11392,128,129,0,1,576,0,0,0,0,0,0,0,0,1,1,1],"FLAG":0,"BASE":1,"CMND":"AdcGpio1 10000,10000,4000}
+
+### Changed
+- AHT1X/AHT2X/AHT3X ready for virtual I2C (#22427)
+- SGP4X ready for virtual I2C (#22427)
+- SCD40 reduce logging levels (#22443)
+- SCD40 ready for virtual I2C (#22443)
+- Unit (k)VAr(h) to (k)var(h) (#22435)
+
+### Fixed
+- ESP32-S3 UART output mode for Tx (#22426)
+- Mitsubishi Electric HVAC Standby Stage for MiElHVAC (#22430)
+- FUNC_COMMAND linked list command buffer corruption by shutter driver
+- ESP32, ESP32-S2 and ESP32-S3 re-enable touch buttons (#22446)
+
+## [14.3.0.3] 20241031
+### Added
+- Support for I2C over Serial, preliminary stub (#22388)
+
+### Changed
+- ESP32 Platform from 2024.10.30 to 2024.11.30, Framework (Arduino Core) from v3.1.0.241023 to v3.1.0.241030 and IDF to 5.3.1.241024 (#22384)
+- ESP32 LVGL library from v9.2.0 to v9.2.2 (#22385)
+- Refactored `i2c_enabled` as array (#22387)
+
+### Fixed
+- ESP32 Arduino Core IPv6 zones used by Matter (#22378)
+
+## [14.3.0.2] 20241030
+### Added
+- DALI command `DaliGear` to set max found gear to speed up scan response
+- DALI command `DaliGroup` to add gear to groups
+- DALI command `DaliTarget` to set light control broadcast, group number or gear number
+- Mitsubishi Electric HVAC Operation time for MiElHVAC (#22334)
+- Mitsubishi Electric HVAC Outdoor Temperature for MiElHVAC (#22345)
+- Mitsubishi Electric HVAC Compressor Frequency for MiElHVAC (#22347)
+- SolaxX1 Meter mode (#22330)
+- DALI inverted signal configuration using GPIO DALI RX_i/TX_i
+- Support for Shelly DALI Dimmer Gen3 (See tips and template in file xdrv_75_dali.ino)
+- HASPmota `haspmota.get_pages()` to get the sorted list of pages (#22358)
+- Support for US AQI and EPA AQI in PMS5003x sensors (#22294)
+- HLK-LD2410 Engineering mode (#21880)
+- Support for HLK-LD2410S 24GHz smart wave motion sensor (#22253)
+- Mitsubishi Electric HVAC Auto Clear Remote Temp for MiElHVAC (#22370)
+- Command ``SetOption161 1`` to disable web page slider updates by commands
+
+### Changed
+- DALI renamed commands `DaliCommission` to `DaliScan` and `DaliWeb` to `DaliLight`
+- DALI set Tasmota light control as default
+- ESP32 Framework (Arduino Core) from v3.1.0.241015 to v3.1.0.241023 (#22351)
+- Shutter optimized behavior to publish shutter data with sensor request (#22353)
+
+### Fixed
+- Ethernet on -DFRAMEWORK_ARDUINO_ITEAD framework regression from v14.3.0 (#22367)
+- Alexa Hue with multiple devices (#22383)
+
+### Removed
+- DALI inverted signal configuration using compile time defines
+
+## [14.3.0.1] 20241022
+### Added
+- BLE track devices with RPA (#22300)
+- DALI support for short addresses and groups
+
+### Changed
+- ESP32 platform update from 2024.09.30 to 2024.10.30 and Framework (Arduino Core) from v3.1.0.240926 to v3.1.0.241015 (#22299)
+- HASPmota support for page delete and object updates (#22311)
+
+### Fixed
+- EQ3 TRV firmware version 1.46 fails if the default true is used in subscribe on the notify characteristic (#22328)
+
## [14.3.0] 20241015
- Release Robert
@@ -16,11 +157,11 @@ All notable changes to this project will be documented in this file.
- Command ``DaliSend
|,`` to send command (address+256 is repeat) on DALI bus
- Command ``DaliQuery |,`` to send command (address+256 is repeat) on DALI bus and wait up to DALI_TIMEOUT ms for response
- Berry Serial `config` to change parity on-the-fly for RS-485 (#22285)
-- Misubishi Electric HVAC Heat/Dry/Cool Auto operation mode (#22216)
-- Misubishi Electric HVAC Bridge to HomeBridge/Homekit locally (#22236)
-- Misubishi Electric HVAC Air Direction Control (#22241)
-- Misubishi Electric HVAC prohibit function (#22269)
-- Misubishi Electric HVAC compressor map and operation power and energy (#22290)
+- Mitsubishi Electric HVAC Heat/Dry/Cool Auto operation mode (#22216)
+- Mitsubishi Electric HVAC Bridge to HomeBridge/Homekit locally (#22236)
+- Mitsubishi Electric HVAC Air Direction Control (#22241)
+- Mitsubishi Electric HVAC prohibit function (#22269)
+- Mitsubishi Electric HVAC compressor map and operation power and energy (#22290)
### Changed
- ESP32 platform update from 2024.09.10 to 2024.09.30 and Framework (Arduino Core) from v3.0.5 to v3.1.0.240926 (#22203)
diff --git a/FIRMWARE.md b/FIRMWARE.md
index ab98d6916..1c3ce9791 100644
--- a/FIRMWARE.md
+++ b/FIRMWARE.md
@@ -14,7 +14,7 @@ If you like **Tasmota**, give it a star, or fork it and contribute!
[](https://github.com/arendst/Tasmota/network)
[](https://paypal.me/tasmota)
-See [CHANGELOG.md](https://github.com/arendst/Tasmota/blob/development/tasmota/CHANGELOG.md) for changes since last release.
+See [CHANGELOG.md](https://github.com/arendst/Tasmota/blob/development/CHANGELOG.md) for changes since last release.
## Development
diff --git a/I2CDEVICES.md b/I2CDEVICES.md
index d873bbd59..79a2bf81a 100644
--- a/I2CDEVICES.md
+++ b/I2CDEVICES.md
@@ -128,5 +128,6 @@ Index | Define | Driver | Device | Address(es) | Bus2 | Descrip
88 | USE_QMP6988 | xsns_28 | QMP6988 | 0x56, 0x70 | Yes | Pressure and temperature sensor
89 | USE_HX711_M5SCALES | xsns_34 | M5SCALES | 0x26 | Yes | M5Unit (Mini)Scales(HX711 STM32) U177
90 | USE_RX8010 | xdrv_56 | RX8010 | 0x32 | Yes | RX8010 RTC from IOTTIMER
+ 91 | USE_MS5837 | xsns_116 | MS5837 | 0x76 | | Pressure and temperature sensor
NOTE: Bus2 supported on ESP32 only.
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index d65aa4e13..60ed5154e 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -36,9 +36,9 @@ While fallback or downgrading is common practice it was never supported due to S
This release will be supported from ESP8266/Arduino library Core version **2.7.8** due to reported security and stability issues on previous Core version. This will also support gzipped binaries.
-This release will be supported from ESP32/Arduino library Core version **v3.1.0.240926**.
+This release will be supported from ESP32/Arduino library Core version **v3.1.0.241206**.
-Support of ESP8266 Core versions before 2.7.8 and ESP32 Core versions before v3.1.0.240926 have been removed.
+Support of ESP8266 Core versions before 2.7.8 and ESP32 Core versions before v3.1.0.241206 have been removed.
## Support of TLS
@@ -75,12 +75,12 @@ Latest released binaries can be downloaded from
- http://ota.tasmota.com/tasmota/release
Historical binaries can be downloaded from
-- http://ota.tasmota.com/tasmota/release-14.3.0
+- http://ota.tasmota.com/tasmota/release-14.4.0
The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota/release/tasmota.bin.gz``
### ESP32, ESP32-C2, ESP32-C3, ESP32-C6, ESP32-S2 and ESP32-S3 based
-The following binary downloads have been compiled with ESP32/Arduino library core version **v3.1.0.240926**.
+The following binary downloads have been compiled with ESP32/Arduino library core version **v3.1.0.241206**.
- **tasmota32.bin** = The Tasmota version with most drivers including additional sensors and KNX for 4M+ flash. **RECOMMENDED RELEASE BINARY**
- **tasmota32solo1.bin** = The Tasmota version with most drivers including additional sensors and KNX for single core ESP32 and 4M+ flash.
@@ -104,7 +104,7 @@ Latest released binaries can be downloaded from
- https://ota.tasmota.com/tasmota32/release
Historical binaries can be downloaded from
-- https://ota.tasmota.com/tasmota32/release-14.3.0
+- https://ota.tasmota.com/tasmota32/release-14.4.0
The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasmota.com/tasmota32/release/tasmota32.bin``
@@ -114,96 +114,83 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
[Complete list](BUILDS.md) of available feature and sensors.
-## Changelog v14.3.0 Robert
+## Changelog v14.4.0 Rudolph
### Added
-- Command ``SetOption69 1`` to enable Serial Bridge inverted Receive [#22000](https://github.com/arendst/Tasmota/issues/22000)
-- Command ``DaliWeb 1`` to enable light control for DALI broadcast address
-- Command ``DaliSend |,`` to send command (address+256 is repeat) on DALI bus
-- Command ``DaliQuery |,`` to send command (address+256 is repeat) on DALI bus and wait up to DALI_TIMEOUT ms for response
-- HX711 optional calibration precision option on command ``Sensor34 2 `` where `` is 1 to 20 [#13983](https://github.com/arendst/Tasmota/issues/13983)
-- ESP8266 support for one-wire M1601 temperature sensor on DS18x20 GPIO [#21376](https://github.com/arendst/Tasmota/issues/21376)
-- ESP8266 support for I2C CLK on GPIO16 [#22199](https://github.com/arendst/Tasmota/issues/22199)
-- Support for I2C M5Unit (Mini)Scales using HX711 driver
-- Support for DALI on ESP8266
-- Support for RX8010 RTC as used in IOTTIMER [#21376](https://github.com/arendst/Tasmota/issues/21376)
-- Support for BL0906 up to 6 channel energy monitor as used in Athom EM2/EM6 [#22167](https://github.com/arendst/Tasmota/issues/22167)
-- Support for Sonoff SPM v1.3.0 [#13447](https://github.com/arendst/Tasmota/issues/13447)
-- Energy command ``PowerSet 60,230`` to calibrate both Current and Power with known resistive load of 60W at 230V using calibrated Voltage
-- Energy command ``CurrentSet 60,230`` to calibrate both Power and Current with known resistive load of 60W at 230V using calibrated Voltage
-- ESP8266 experimental support for second I2C bus
-- MQTT warning if trying to connect without TLS on a port that normally uses TLS [#22175](https://github.com/arendst/Tasmota/issues/22175)
-- Energy Log level 4 message when (Calculated) Apparent Power is less than Active Power indicating wrong calibration [#20653](https://github.com/arendst/Tasmota/issues/20653)
-- Support nexus protocol and calculation of separation limit to rc-switch library [#21886](https://github.com/arendst/Tasmota/issues/21886)
-- KNX additional KnxTx functions and define KNX_USE_DPT9 [#22071](https://github.com/arendst/Tasmota/issues/22071)
-- SML multi TRX line [#22056](https://github.com/arendst/Tasmota/issues/22056)
-- Misubishi Electric HVAC Heat/Dry/Cool Auto operation mode [#22216](https://github.com/arendst/Tasmota/issues/22216)
-- Misubishi Electric HVAC Bridge to HomeBridge/Homekit locally [#22236](https://github.com/arendst/Tasmota/issues/22236)
-- Misubishi Electric HVAC Air Direction Control [#22241](https://github.com/arendst/Tasmota/issues/22241)
-- Misubishi Electric HVAC prohibit function [#22269](https://github.com/arendst/Tasmota/issues/22269)
-- Misubishi Electric HVAC compressor map and operation power and energy [#22290](https://github.com/arendst/Tasmota/issues/22290)
-- Zigbee Koenkk firmware 20240710 for Sonoff Zigbee ZBPro [#22076](https://github.com/arendst/Tasmota/issues/22076)
-- Berry Zigbee improvements to prepare Matter [#22083](https://github.com/arendst/Tasmota/issues/22083)
-- Berry virtual Energy driver [#22134](https://github.com/arendst/Tasmota/issues/22134)
-- Berry improve `int64` constructor [#22172](https://github.com/arendst/Tasmota/issues/22172)
-- Berry Serial `config` to change parity on-the-fly for RS-485 [#22285](https://github.com/arendst/Tasmota/issues/22285)
-- LVGL port `colorwheel` from LVGL 8 [#22244](https://github.com/arendst/Tasmota/issues/22244)
-- HASPmota `cpicker` and `msgbox` [#22244](https://github.com/arendst/Tasmota/issues/22244)
-- Matter support for Zigbee Temperature, Humidity and Pressure sensors [#22084](https://github.com/arendst/Tasmota/issues/22084)
-- Matter support for Zigbee Occupancy and Light 0/1/2 (OnOff / Dimmer / White Color Temperature) [#22110](https://github.com/arendst/Tasmota/issues/22110)
+- Command `WebColor20` to control color of Button when Off
+- Command `SetOption161 1` to disable display of state text [#22515](https://github.com/arendst/Tasmota/issues/22515)
+- Command `SetOption162 1` to disable adding export energy to energy today [#22578](https://github.com/arendst/Tasmota/issues/22578)
+- DALI support for short addresses (gear) and groups
+- DALI command `DaliGear` to set max found gear to speed up scan response
+- DALI command `DaliGroup` to add gear to groups
+- DALI command `DaliTarget` to set light control broadcast, group number or gear number
+- DALI command `DaliGroupSliders 0..16` to show GUI group sliders with feedback disabling `DaliLight`
+- DALI inverted signal configuration using GPIO DALI RX_i/TX_i
+- Support for I2C over Serial [#22444](https://github.com/arendst/Tasmota/issues/22444)
+- Support KNX for scripts [#22429](https://github.com/arendst/Tasmota/issues/22429)
+- Support deep sleep (standby) for VL53L0X [#22441](https://github.com/arendst/Tasmota/issues/22441)
+- Support for Shelly DALI Dimmer Gen3
+- Support for HLK-LD2410S 24GHz smart wave motion sensor [#22253](https://github.com/arendst/Tasmota/issues/22253)
+- Support for US AQI and EPA AQI in PMS5003x sensors [#22294](https://github.com/arendst/Tasmota/issues/22294)
+- Support for MS5837 pressure and temperature sensor [#22376](https://github.com/arendst/Tasmota/issues/22376)
+- Support for TM1640 based IoTTimer by Stefan Oskamp [#21376](https://github.com/arendst/Tasmota/issues/21376)
+- Support for Sonoff POWCT Energy Export Active [#22596](https://github.com/arendst/Tasmota/issues/22596)
+- HLK-LD2410 Engineering mode [#21880](https://github.com/arendst/Tasmota/issues/21880)
+- Mitsubishi Electric HVAC Operation time for MiElHVAC [#22334](https://github.com/arendst/Tasmota/issues/22334)
+- Mitsubishi Electric HVAC Outdoor Temperature for MiElHVAC [#22345](https://github.com/arendst/Tasmota/issues/22345)
+- Mitsubishi Electric HVAC Compressor Frequency for MiElHVAC [#22347](https://github.com/arendst/Tasmota/issues/22347)
+- Mitsubishi Electric HVAC Auto Clear Remote Temp for MiElHVAC [#22370](https://github.com/arendst/Tasmota/issues/22370)
+- SolaxX1 Meter mode [#22330](https://github.com/arendst/Tasmota/issues/22330)
+- Show Active Power Total with any multi-phase energy monitoring [#22579](https://github.com/arendst/Tasmota/issues/22579)
+- ESP32 support for WPA2/3 Enterprise conditional in core v3.1.0.241206 [#22600](https://github.com/arendst/Tasmota/issues/22600)
+- ESP32 ULP lp_core to Berry ULP module (#22567)[#22567](https://github.com/arendst/Tasmota/issues/22567)
+- ESP32 new BLE filters by name and minimum RSSI [#22530](https://github.com/arendst/Tasmota/issues/22530)
+- ESP32 Hybrid compile take custom boards settings in account [#22542](https://github.com/arendst/Tasmota/issues/22542)
+- ESP32 MI32 legacy add config operations [#22458](https://github.com/arendst/Tasmota/issues/22458)
+- BLE track devices with RPA [#22300](https://github.com/arendst/Tasmota/issues/22300)
+- Berry add I2C read16/write16 supporting Little Endian [#22448](https://github.com/arendst/Tasmota/issues/22448)
+- Berry drivers for PCA9535 (generic and in SenseCAP D1) [#22451](https://github.com/arendst/Tasmota/issues/22451)
+- HASPmota `haspmota.get_pages()` to get the sorted list of pages [#22358](https://github.com/arendst/Tasmota/issues/22358)
### Breaking Changed
-- Berry make `energy` modules changes from #21887 backwards compatible [#22046](https://github.com/arendst/Tasmota/issues/22046)
+- ESP32 ArtNet switches from GRB to RGB encoding [#22556](https://github.com/arendst/Tasmota/issues/22556)
### Changed
-- ESP8266 platform update from 2024.06.00 to 2024.09.00 and Framework (Arduino Core) from v2.7.7 to v2.7.8 [#22199](https://github.com/arendst/Tasmota/issues/22199)
-- ESP32 platform update from 2024.08.10 to 2024.09.30 and Framework (Arduino Core) from v3.0.4 to v3.1.0.240926 [#22203](https://github.com/arendst/Tasmota/issues/22203)
-- ESP32 LVGL library from v9.1.0 to v9.2.0 [#22031](https://github.com/arendst/Tasmota/issues/22031)
-- GPIOViewer from v1.5.5 to v1.5.6
-- Add command entered to command error and command unknown message
-- Refactored I2C drivers HTU21, BH1750, SHT3x, iAQ and HYT
-- Energy BL09xx command ``CurrentSet`` input changed from Ampere to milliAmpere
-- Command ``DaliDimmer`` range from 0..254 to 0..100
-- Energy force Apparent Power equals Active Power when (Calculated) Apparent Power is less than Active Power [#20653](https://github.com/arendst/Tasmota/issues/20653)
-- Refactor and fix PID sensor (PID_USE_LOCAL_SENSOR) read race condition [#22162](https://github.com/arendst/Tasmota/issues/22162)
-- SCD30 Lowered I2C clock from 100k to 50k [#15438](https://github.com/arendst/Tasmota/issues/15438)
-- HASPmota `delete` instead of `delete()` [#22245](https://github.com/arendst/Tasmota/issues/22245)
+- ESP32 Platform from 2024.09.30 to 2024.12.30, Framework (Arduino Core) from v3.1.0.240926 to v3.1.0.241206 and IDF to 5.3.2 [#22600](https://github.com/arendst/Tasmota/issues/22600)
+- ESP32 LVGL library from v9.2.0 to v9.2.2 [#22385](https://github.com/arendst/Tasmota/issues/22385)
+- ESP32 replaced NeoPixelBus with TasmotaLED [#22556](https://github.com/arendst/Tasmota/issues/22556)
+- Redesign GUI adding feedback to buttons, shutters and lights
+- Add GUI submenu headers and refresh configuration button text (#22592)
+- Use command `WebButton1` to change GUI shutter 1 name
+- Unit (k)VAr(h) to (k)var(h) [#22435](https://github.com/arendst/Tasmota/issues/22435)
+- AHT1X/AHT2X/AHT3X ready for virtual I2C [#22427](https://github.com/arendst/Tasmota/issues/22427)
+- SGP4X ready for virtual I2C [#22427](https://github.com/arendst/Tasmota/issues/22427)
+- SCD40 reduce logging levels [#22443](https://github.com/arendst/Tasmota/issues/22443)
+- SCD40 ready for virtual I2C [#22443](https://github.com/arendst/Tasmota/issues/22443)
+- Refactored `i2c_enabled` as array [#22387](https://github.com/arendst/Tasmota/issues/22387)
+- DALI renamed commands `DaliCommission` to `DaliScan` and `DaliWeb` to `DaliLight`
+- DALI set Tasmota light control as default
+- Shutter optimized behavior to publish shutter data with sensor request [#22353](https://github.com/arendst/Tasmota/issues/22353)
+- Prevent active BLE operations with unencrypted MI-format beacons [#22453](https://github.com/arendst/Tasmota/issues/22453)
+- ESP32 max number of supported switches/buttons/relays from 28 to 32
+- ESP32 max number of interlocks from 14 to 16
+- HASPmota support for page delete and object updates [#22311](https://github.com/arendst/Tasmota/issues/22311)
### Fixed
-- DALI received data decoding
-- Compilation exception when metrics not found [#22170](https://github.com/arendst/Tasmota/issues/22170)
-- Crash when calling TasmotaSerial destructor when initialized with incorrect arguments [#22036](https://github.com/arendst/Tasmota/issues/22036)
-- Energy calculation [#20653](https://github.com/arendst/Tasmota/issues/20653)
-- SML trx pin error [#22119](https://github.com/arendst/Tasmota/issues/22119)
-- Shutter timing registers overflow [#21966](https://github.com/arendst/Tasmota/issues/21966)
-- Shutter missing HOLD on shutterbutton [#22108](https://github.com/arendst/Tasmota/issues/22108)
-- Shutter remaining issues on shutterinvert [#22120](https://github.com/arendst/Tasmota/issues/22120)
-- PZEM continue energy monitoring when one phase fails [#21968](https://github.com/arendst/Tasmota/issues/21968)
-- BearSSL panic on ESP8266 in rare conditions [#22017](https://github.com/arendst/Tasmota/issues/22017)
-- ModbusBridge request and response logic [#22075](https://github.com/arendst/Tasmota/issues/22075)
-- Sonoff WTS01 temperature sensor shows incorrect negative temperature [#19373](https://github.com/arendst/Tasmota/issues/19373)
-- Autoconf prevent 'init.bat' from stopping on empty lines [#22158](https://github.com/arendst/Tasmota/issues/22158)
-- Zigbee extend timeout for MCU reboot from 5s to 10s [#22009](https://github.com/arendst/Tasmota/issues/22009)
-- Zigbee avoid disabling console serial on ESP32 and improved log messages [#22082](https://github.com/arendst/Tasmota/issues/22082)
-- Zigbee flashing CC2562P with latest firmware [#22117](https://github.com/arendst/Tasmota/issues/22117)
-- ESP32 Range Extender compile error with core 3.x [#22205](https://github.com/arendst/Tasmota/issues/22205)
-- ESP32 DALI compile error with core 3.x [#22214](https://github.com/arendst/Tasmota/issues/22214)
-- ESP32 Ethernet using EthClockMode 3 [#22248](https://github.com/arendst/Tasmota/issues/22248)
-- ESP32 disable SPI DMA for uDisplay (broken since esp-idf 5.3 (core 3.1.0)) [#22264](https://github.com/arendst/Tasmota/issues/22264)
-- Berry avoid `readbytes()` from crashing when file is too large [#22057](https://github.com/arendst/Tasmota/issues/22057)
-- Berry energy missing attributes [#22116](https://github.com/arendst/Tasmota/issues/22116)
-- Berry I2C to prepare M5Stack I2C STM32 based devices [#22143](https://github.com/arendst/Tasmota/issues/22143)
-- Berry improve `persist` dirty data handling [#22246](https://github.com/arendst/Tasmota/issues/22246)
-- ESP32-S3 uDisplay force cache writes to RGB display [#22222](https://github.com/arendst/Tasmota/issues/22222)
-- LVGL Added OpenHASP icons to font `montserrat-28` [#22048](https://github.com/arendst/Tasmota/issues/22048)
-- LVGL compilation of lv_menu [#22188](https://github.com/arendst/Tasmota/issues/22188)
-- HASPmota broken `changed` event [#22194](https://github.com/arendst/Tasmota/issues/22194)
-- HASPmota error when page '1' is not defined [#22220](https://github.com/arendst/Tasmota/issues/22220)
-- Matter fixed UI bug when no endpoints configured [#22008](https://github.com/arendst/Tasmota/issues/22008)
-- Matter fix when Rules are disabled [#22016](https://github.com/arendst/Tasmota/issues/22016)
-- Matter fail to report Shutter status if no shutter is configured in Tasmota [#22049](https://github.com/arendst/Tasmota/issues/22049)
-- Matter fix Waterleak broken after Berry solidification optimisation #21885 [#22052](https://github.com/arendst/Tasmota/issues/22052)
+- FUNC_COMMAND linked list command buffer corruption by shutter driver
+- Shift595 output offsets and restart relay toggles
+- Use HTML escape on File System Edit File load [#22492](https://github.com/arendst/Tasmota/issues/22492)
+- Prevent crashing when `display.ini` is missing end `#` [#22471](https://github.com/arendst/Tasmota/issues/22471)
+- KNX Scenes index change regression from v14.2.0.4 [#22405](https://github.com/arendst/Tasmota/issues/22405)
+- Magic switch applying masking window to any power change [#22535](https://github.com/arendst/Tasmota/issues/22535)
+- Shutter wrong power ON state [#22548](https://github.com/arendst/Tasmota/issues/22548)
+- Alexa Hue with multiple devices [#22383](https://github.com/arendst/Tasmota/issues/22383)
+- Mitsubishi Electric HVAC Standby Stage for MiElHVAC [#22430](https://github.com/arendst/Tasmota/issues/22430)
+- EQ3 TRV firmware version 1.46 fails if the default true is used in subscribe on the notify characteristic [#22328](https://github.com/arendst/Tasmota/issues/22328)
+- Ethernet on -DFRAMEWORK_ARDUINO_ITEAD framework regression from v14.3.0 [#22367](https://github.com/arendst/Tasmota/issues/22367)
+- ESP32 Upgrade by file upload response based on file size [#22500](https://github.com/arendst/Tasmota/issues/22500)
+- ESP32 Arduino Core IPv6 zones used by Matter [#22378](https://github.com/arendst/Tasmota/issues/22378)
+- ESP32, ESP32-S2 and ESP32-S3 re-enable touch buttons [#22446](https://github.com/arendst/Tasmota/issues/22446)
+- ESP32-S3 UART output mode for Tx [#22426](https://github.com/arendst/Tasmota/issues/22426)
+- Matter provisioning with matter.js controller [#22470](https://github.com/arendst/Tasmota/issues/22470)
### Removed
-- ESP8266 Analog input support using energy driver as only one channel is available
-- Berry remove reuse of methods for interface-like code reuse #21500 [#22055](https://github.com/arendst/Tasmota/issues/22055)
-- Berry Zigbee removed test code [#22263](https://github.com/arendst/Tasmota/issues/22263)
diff --git a/TEMPLATES.md b/TEMPLATES.md
index e6ce340d4..997e02d80 100644
--- a/TEMPLATES.md
+++ b/TEMPLATES.md
@@ -5,7 +5,7 @@
# Templates
-Find below the available templates as of October 2024. More template information can be found in the [Tasmota Device Templates Repository](http://blakadder.github.io/templates)
+Find below the available templates as of December 2024. More template information can be found in the [Tasmota Device Templates Repository](http://blakadder.github.io/templates)
## Adapter Board
```
diff --git a/boards/esp32_solo1.json b/boards/esp32-solo1.json
similarity index 100%
rename from boards/esp32_solo1.json
rename to boards/esp32-solo1.json
diff --git a/lib/default/WiFiHelper/src/WiFiHelper.h b/lib/default/WiFiHelper/src/WiFiHelper.h
index 6abcf583a..e9c404b86 100644
--- a/lib/default/WiFiHelper/src/WiFiHelper.h
+++ b/lib/default/WiFiHelper/src/WiFiHelper.h
@@ -59,7 +59,7 @@ typedef enum WiFiPhyMode
class WiFiHelper {
public:
#ifdef ESP32
- static wl_status_t begin(const char* wpa2_ssid, wpa2_auth_method_t method, const char* wpa2_identity=NULL, const char* wpa2_username=NULL, const char *wpa2_password=NULL, const char* ca_pem=NULL, const char* client_crt=NULL, const char* client_key=NULL, int32_t channel=0, const uint8_t* bssid=0, bool connect=true);
+ static wl_status_t begin(const char* wpa2_ssid, wpa2_auth_method_t method, const char* wpa2_identity=NULL, const char* wpa2_username=NULL, const char *wpa2_password=NULL, const char* ca_pem=NULL, const char* client_crt=NULL, const char* client_key=NULL, int ttls_phase2_type=-1, int32_t channel=0, const uint8_t* bssid=0, bool connect=true);
#endif
static wl_status_t begin(const char* ssid, const char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
static wl_status_t begin(char* ssid, char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
@@ -94,4 +94,4 @@ public:
-#endif // WIFIHELPER_H
\ No newline at end of file
+#endif // WIFIHELPER_H
diff --git a/lib/default/WiFiHelper/src/WiFiHelper_ESP32.cpp b/lib/default/WiFiHelper/src/WiFiHelper_ESP32.cpp
index 000840e81..6ecf3d7d2 100644
--- a/lib/default/WiFiHelper/src/WiFiHelper_ESP32.cpp
+++ b/lib/default/WiFiHelper/src/WiFiHelper_ESP32.cpp
@@ -34,12 +34,14 @@ ip_addr_t dns_save6[DNS_MAX_SERVERS] = {}; // IPv6 DNS servers
#include "tasmota_options.h"
#include "lwip/dns.h"
-wl_status_t WiFiHelper::begin(const char* wpa2_ssid, wpa2_auth_method_t method, const char* wpa2_identity, const char* wpa2_username, const char *wpa2_password, const char* ca_pem, const char* client_crt, const char* client_key, int32_t channel, const uint8_t* bssid, bool connect) {
+#if CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT
+wl_status_t WiFiHelper::begin(const char *wpa2_ssid, wpa2_auth_method_t method, const char *wpa2_identity, const char *wpa2_username, const char *wpa2_password, const char *ca_pem, const char *client_crt, const char *client_key, int ttls_phase2_type, int32_t channel, const uint8_t *bssid, bool connect) {
WiFiHelper::scrubDNS();
- wl_status_t ret = WiFi.begin(wpa2_ssid, method, wpa2_identity, wpa2_username, wpa2_password, ca_pem, client_crt, client_key, channel, bssid, connect);
+ wl_status_t ret = WiFi.begin(wpa2_ssid, method, wpa2_identity, wpa2_username, wpa2_password, ca_pem, client_crt, client_key, ttls_phase2_type, channel, bssid, connect);
WiFiHelper::scrubDNS();
return ret;
}
+#endif // CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT
wl_status_t WiFiHelper::begin(const char* ssid, const char *passphrase, int32_t channel, const uint8_t* bssid, bool connect) {
WiFiHelper::scrubDNS();
diff --git a/lib/lib_audio/ESP8266Audio/src/AudioGeneratorMIDI.cpp b/lib/lib_audio/ESP8266Audio/src/AudioGeneratorMIDI.cpp
index 5f1c5f3a3..0c41afa61 100644
--- a/lib/lib_audio/ESP8266Audio/src/AudioGeneratorMIDI.cpp
+++ b/lib/lib_audio/ESP8266Audio/src/AudioGeneratorMIDI.cpp
@@ -58,6 +58,10 @@
#include "AudioGeneratorMIDI.h"
+#if defined(ESP32)
+// Do not build, Espressif's GCC8+ has a compiler bug
+#else // __GNUC__ == 8
+
#pragma GCC optimize ("O3")
#define TSF_NO_STDIO
@@ -637,3 +641,4 @@ void AudioGeneratorMIDI::MakeStreamFromAFS(AudioFileSource *src, tsf_stream *afs
afs->size = &afs_size;
}
+#endif //__GNUC__ == 8
diff --git a/lib/lib_audio/ESP8266Audio/src/AudioGeneratorMIDI.h b/lib/lib_audio/ESP8266Audio/src/AudioGeneratorMIDI.h
index 8a1ac3f9a..c9fc61bb2 100644
--- a/lib/lib_audio/ESP8266Audio/src/AudioGeneratorMIDI.h
+++ b/lib/lib_audio/ESP8266Audio/src/AudioGeneratorMIDI.h
@@ -21,6 +21,10 @@
#ifndef _AUDIOGENERATORMIDI_H
#define _AUDIOGENERATORMIDI_H
+#if defined(ESP32)
+// Do not build, Espressif's GCC8+ has a compiler bug
+#else // __GNUC__ == 8
+
#include "AudioGenerator.h"
#define TSF_NO_STDIO
@@ -90,7 +94,7 @@ class AudioGeneratorMIDI : public AudioGenerator
unsigned long earliest_time = 0;
struct tonegen_status { /* current status of a tone generator */
- bool playing; /* is it playing? */
+ bool playing; /* is it playing? */
char track; /* if so, which track is the note from? */
char note; /* what note is playing? */
char instrument; /* what instrument? */
@@ -176,6 +180,7 @@ class AudioGeneratorMIDI : public AudioGenerator
short samplesRendered[256];
};
+#endif //__GNUC__ == 8
#endif
diff --git a/lib/lib_audio/ESP8266Audio/src/libtinysoundfont/tsf.h b/lib/lib_audio/ESP8266Audio/src/libtinysoundfont/tsf.h
index 45d7b97a5..cdc1f6863 100644
--- a/lib/lib_audio/ESP8266Audio/src/libtinysoundfont/tsf.h
+++ b/lib/lib_audio/ESP8266Audio/src/libtinysoundfont/tsf.h
@@ -42,6 +42,16 @@
*/
+// ESP32 as of 3.x has a compiler bug in this section, with the G++ generated assembly
+// being illegal. There's nothing wrong with the code here, it just looks like an
+// Xtensa backend issue. Until that's fixed, no MIDI for you!
+///home/earle/Arduino/libraries/ESP8266Audio/src/libtinysoundfont/tsf.h: In function 'void tsf_channel_midi_control(tsf*, int, int, int)':
+// /home/earle/Arduino/libraries/ESP8266Audio/src/libtinysoundfont/tsf.h:2101:1: error: insn does not satisfy its constraints:
+// 2101 | }
+// | ^
+
+#if !defined(ESP32)
+
#ifndef TSF_INCLUDE_TSF_INL
#define TSF_INCLUDE_TSF_INL
@@ -2149,3 +2159,5 @@ TSFDEF float tsf_channel_get_tuning(tsf* f, int channel)
#endif
#endif //TSF_IMPLEMENTATION
+
+#endif // ! ESP32
diff --git a/lib/lib_basic/NeoPixelBus/src/internal/NeoEsp32RmtMethod_idf5.h b/lib/lib_basic/NeoPixelBus/src/internal/NeoEsp32RmtMethod_idf5.h
index a86b05330..d26aece56 100644
--- a/lib/lib_basic/NeoPixelBus/src/internal/NeoEsp32RmtMethod_idf5.h
+++ b/lib/lib_basic/NeoPixelBus/src/internal/NeoEsp32RmtMethod_idf5.h
@@ -69,7 +69,7 @@ typedef struct {
rmt_symbol_word_t reset_code;
} rmt_led_strip_encoder_t;
-static size_t rmt_encode_led_strip(rmt_encoder_t *encoder, rmt_channel_handle_t channel, const void *primary_data, size_t data_size, rmt_encode_state_t *ret_state)
+static IRAM_ATTR size_t rmt_encode_led_strip(rmt_encoder_t *encoder, rmt_channel_handle_t channel, const void *primary_data, size_t data_size, rmt_encode_state_t *ret_state)
{
rmt_led_strip_encoder_t *led_encoder = __containerof(encoder, rmt_led_strip_encoder_t, base);
rmt_encoder_handle_t bytes_encoder = led_encoder->bytes_encoder;
diff --git a/lib/lib_basic/TasmotaLED/library.json b/lib/lib_basic/TasmotaLED/library.json
new file mode 100644
index 000000000..8ee6079f5
--- /dev/null
+++ b/lib/lib_basic/TasmotaLED/library.json
@@ -0,0 +1,17 @@
+{
+ "name": "TasmotaLED",
+ "version": "0.1",
+ "keywords": [
+ "ws2816", "sk6812", "leds"
+ ],
+ "description": "Lightweight implementation for adressable leds.",
+ "repository":
+ {
+ "type": "git",
+ "url": "https://github.com/arendst/Tasmota/lib/lib_basic/TasmotaLED"
+ },
+ "frameworks": "arduino",
+ "platforms": [
+ "espressif32"
+ ]
+}
diff --git a/lib/lib_basic/TasmotaLED/src/TasmotaLED.cpp b/lib/lib_basic/TasmotaLED/src/TasmotaLED.cpp
new file mode 100644
index 000000000..d323c20ab
--- /dev/null
+++ b/lib/lib_basic/TasmotaLED/src/TasmotaLED.cpp
@@ -0,0 +1,237 @@
+/*
+ TasmotaLED.cpp - Lightweight implementation for adressable leds.
+
+ Copyright (C) 2024 Stephan Hadinger
+
+ This library is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#include
+#ifdef ESP32
+
+#include "TasmotaLEDPusher.h"
+#include "TasmotaLED.h"
+
+// DRAM_ATTR to force in IRAM because we use this in show loop
+static const DRAM_ATTR uint8_t TASMOTALED_CHANNEL_ORDERS[6][3] = {
+ {1, 0, 2}, // GRB (0)
+ {2, 0, 1}, // GBR (1)
+ {0, 1, 2}, // RGB (2)
+ {0, 2, 1}, // RBG (3)
+ {2, 1, 0}, // BRG (4)
+ {1, 2, 0} // BGR (5)
+};
+
+static const TasmotaLED_Timing TasmotaLED_Timings[] = {
+ // WS2812
+ // RmtBit0 0x00228010 RmtBit1 0x00128020 RmtReset 0x800207D0
+ {
+ .T0H = 400,
+ .T0L = 850,
+ .T1H = 800,
+ .T1L = 450,
+ .Reset = 80000 // it is 50000 for WS2812, but for compatibility with SK6812, we raise to 80000
+ },
+ // SK6812
+ // RmtBit0 0x0024800C RmtBit1 0x00188018 RmtReset 0x80020C80
+ {
+ .T0H = 300,
+ .T0L = 900,
+ .T1H = 600,
+ .T1L = 600,
+ .Reset = 80000
+ },
+};
+
+// enable AddLog
+extern void AddLog(uint32_t loglevel, PGM_P formatP, ...);
+enum LoggingLevels {LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE};
+
+
+TasmotaLED::TasmotaLED(uint16_t type, uint16_t num_leds) :
+ _type(type),
+ _pixel_order((type >> 4) & 0x07),
+ _w_before(type & 0x08),
+ _timing((type >> 8) & 0xFF),
+ _started(false),
+ _dirty(true),
+ _raw_format(false),
+ _pixel_count(num_leds),
+ _buf_work(nullptr),
+ _buf_show(nullptr),
+ _pixel_matrix(&TASMOTALED_CHANNEL_ORDERS[0]),
+ _pusher(nullptr)
+{
+ if (_timing > (TasmotaLed_TimingEnd >> 8)) {
+ _timing = 0;
+ }
+ switch (_type & 0x0F) {
+ // case TasmotaLed_1_W:
+ // _pixel_size = 1;
+ // break;
+ case TasmotaLed_4_WRGB:
+ _pixel_size = 4;
+ break;
+ case TasmotaLed_3_RGB:
+ default: // fallback
+ _pixel_size = 3;
+ break;
+ }
+
+ _pixel_matrix = &TASMOTALED_CHANNEL_ORDERS[_pixel_order];
+
+ _buf_work = new uint8_t[_pixel_count * _pixel_size];
+ memset(_buf_work, 0, _pixel_count * _pixel_size);
+ _buf_show = new uint8_t[_pixel_count * _pixel_size];
+ memset(_buf_show, 0, _pixel_count * _pixel_size);
+ // AddLog(LOG_LEVEL_DEBUG, "LED: type=0x%04X pixel_order=0x%02X _timing=%i ", _type, _pixel_order, _timing);
+}
+
+TasmotaLED::~TasmotaLED() {
+ if (_pusher) {
+ delete _pusher;
+ _pusher = nullptr;
+ }
+ delete _buf_work;
+ _buf_work = nullptr;
+ delete _buf_show;
+ _buf_show = nullptr;
+}
+
+// Color is passed as 0xWWRRGGBB and copied as WWRRGGBB in _buf_work
+void TasmotaLED::ClearTo(uint32_t wrgb, int32_t first, int32_t last) {
+ // adjust first and last to be in range of 0 to _pixel_count-1
+ if (first <0) { first += _pixel_count; }
+ if (last <0) { last += _pixel_count; }
+ if (first < 0) { first = 0; }
+ if (last >= _pixel_count) { last = _pixel_count - 1; }
+ if (first > last) { return; }
+ // adjust to pixel format
+ uint8_t b0 = (wrgb >> 24) & 0xFF;
+ uint8_t b1 = (wrgb >> 16) & 0xFF;
+ uint8_t b2 = (wrgb >> 8) & 0xFF;
+ uint8_t b3 = (wrgb ) & 0xFF;
+
+ if ((b0 | b1 | b2 | b3) == 0) {
+ // special version for clearing to black
+ memset(_buf_work + first * _pixel_size, 0, (last - first + 1) * _pixel_size);
+ } else {
+ // fill sub-buffer with RRGGBB or WWRRGGBB (or raw)
+ uint8_t *buf = _buf_work + first * _pixel_size;
+ for (uint32_t i = first; i <= last; i++) {
+ if (_pixel_size == 4) { *buf++ = b0;}
+ *buf++ = b1;
+ *buf++ = b2;
+ *buf++ = b3;
+ }
+ }
+}
+
+void TasmotaLED::Show(void) {
+ if (_pusher) {
+ _dirty = false; // we don't use the _dirty attribute and always show
+
+ // copy the input buffer to the work buffer in format to be understood by LED strip
+ if (_raw_format) {
+ memmove(_buf_show, _buf_work, _pixel_count * _pixel_size); // copy buffer in next buffer so we start with the current content
+ } else {
+ uint8_t *buf_from = _buf_work;
+ uint8_t *buf_to = _buf_show;
+ if (_pixel_size == 3) {
+ // copying with swapping 512 pixels (1536 bytes) takes 124 microseconds to copy, so it's negligeable
+ for (uint32_t i = 0; i < _pixel_count; i++) {
+ buf_to[(*_pixel_matrix)[0]] = buf_from[0]; // R
+ buf_to[(*_pixel_matrix)[1]] = buf_from[1]; // G
+ buf_to[(*_pixel_matrix)[2]] = buf_from[2]; // B
+ buf_to += 3;
+ buf_from += 3;
+ }
+ } else if (_pixel_size == 4) {
+ for (uint32_t i = 0; i < _pixel_count; i++) {
+ if (_w_before) { *buf_to++ = buf_from[3]; }
+ buf_to[(*_pixel_matrix)[0]] = buf_from[0]; // R
+ buf_to[(*_pixel_matrix)[1]] = buf_from[1]; // G
+ buf_to[(*_pixel_matrix)[2]] = buf_from[2]; // B
+ if (!_w_before) { *buf_to++ = buf_from[3]; }
+ buf_to += 3; // one increment already happened
+ buf_from += 4;
+ }
+ }
+ }
+ _pusher->Push(_buf_show); // push to leds
+ }
+}
+
+void TasmotaLED::SetPixelColor(int32_t index, uint32_t wrgb) {
+ if (index < 0) { index += _pixel_count; }
+ if ((index >= 0) && (index < _pixel_count)) {
+ uint8_t *buf = _buf_work + index * _pixel_size;
+ uint8_t b0 = (wrgb >> 24) & 0xFF;
+ uint8_t b1 = (wrgb >> 16) & 0xFF;
+ uint8_t b2 = (wrgb >> 8) & 0xFF;
+ uint8_t b3 = (wrgb ) & 0xFF;
+
+ if (_pixel_size == 4) { *buf++ = b0;}
+ *buf++ = b1;
+ *buf++ = b2;
+ *buf++ = b3;
+ _dirty = true;
+ }
+}
+
+uint32_t TasmotaLED::GetPixelColor(int32_t index) {
+ if (index < 0) { index += _pixel_count; }
+ if ((index >= 0) && (index < _pixel_count)) {
+ uint8_t *buf = _buf_work + index * _pixel_size;
+ uint32_t wrgb = 0;
+ if (_pixel_size == 4) { wrgb = (*buf++) << 24; }
+ wrgb |= (*buf++) << 16;
+ wrgb |= (*buf++) << 8;
+ wrgb |= (*buf++);
+ return wrgb;
+ } else {
+ return 0;
+ }
+}
+
+void TasmotaLED::SetPusher(TasmotaLEDPusher *pusher) {
+ if (_pusher) {
+ delete _pusher;
+ }
+ _pusher = pusher;
+ _started = false;
+}
+
+bool TasmotaLED::Begin(void) {
+ if (_pusher) {
+ if (_started) {
+ return true;
+ } else {
+ const TasmotaLED_Timing * timing = &TasmotaLED_Timings[_timing];
+ // AddLog(LOG_LEVEL_DEBUG, "LED: T0H=%i T0L=%i T1H=%i T1L=%i Reset=%i", timing.T0H, timing.T0L, timing.T1H, timing.T1L, timing.Reset);
+ return _pusher->Begin(_pixel_count, _pixel_size, timing);
+ }
+ } else {
+ return false;
+ }
+}
+
+bool TasmotaLED::CanShow(void) const {
+ if (_pusher) {
+ return _pusher->CanShow();
+ }
+ return false;
+}
+
+#endif // ESP32
diff --git a/lib/lib_basic/TasmotaLED/src/TasmotaLED.h b/lib/lib_basic/TasmotaLED/src/TasmotaLED.h
new file mode 100644
index 000000000..ac1b78c1e
--- /dev/null
+++ b/lib/lib_basic/TasmotaLED/src/TasmotaLED.h
@@ -0,0 +1,129 @@
+/*
+ TasmotaLED.h - Lightweight implementation for adressable leds.
+
+ Copyright (C) 2024 Stephan Hadinger
+
+ This library is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#ifndef __TASMOTALED_H__
+#define __TASMOTALED_H__
+
+enum TasmotaLEDTypesEncoding : uint16_t {
+ // bits 0..3 encode for number of bytes per pixel
+ TasmotaLed_1_W = 0x0, // 1 byte per pixel (not used yet)
+ TasmotaLed_3_RGB = 0x1, // 3 bytes per pixel
+ TasmotaLed_4_WRGB = 0x2, // 4 bytes per pixel
+ // bits 4..6 encode for pixel order
+ TasmotaLed_GRB = 0b000 << 4,
+ TasmotaLed_GBR = 0b001 << 4,
+ TasmotaLed_RGB = 0b010 << 4,
+ TasmotaLed_RBG = 0b011 << 4,
+ TasmotaLed_BRG = 0b100 << 4,
+ TasmotaLed_BGR = 0b101 << 4,
+ // bit 7 sets the position for W channel
+ TasmotaLed_xxxW = 0b0 << 7, // W channel after color
+ TasmotaLed_Wxxx = 0b1 << 7, // W channel before color
+ // bits 8..15 encode for timing specifics
+ TasmotaLed_WS2812 = 0 << 8,
+ TasmotaLed_SK6812 = 1 << 8,
+ TasmotaLed_TimingEnd = 2 << 8,
+};
+
+enum TasmotaLEDHardware : uint32_t {
+ // low-order bits are reserved for channels numbers and hardware flags - currenlty not useds
+ // bits 16..23
+ TasmotaLed_HW_Default = 0x0 << 16,
+ TasmotaLed_RMT = 1 << 16,
+ TasmotaLed_SPI = 2 << 16,
+ TasmotaLed_I2S = 3 << 16,
+ TasmotaLed_HW_None = 0xFF << 16, // indicates that the specified HW is not supported
+};
+
+// Below is the encoding for full strips
+// We need to keep backwards compatibility so:
+// 0 = WS2812 (GRB)
+// 1 = SK6812 with White (GRBW)
+enum TasmotaLEDTypes : uint16_t {
+ ws2812_grb = TasmotaLed_3_RGB | TasmotaLed_GRB | TasmotaLed_WS2812, // 1 for backwards compatibility
+ sk6812_grbw = TasmotaLed_4_WRGB | TasmotaLed_GRB | TasmotaLed_xxxW | TasmotaLed_SK6812, // 2 for backwards compatibility
+ sk6812_grb = TasmotaLed_3_RGB | TasmotaLed_GRB | TasmotaLed_SK6812,
+};
+
+#ifdef __cplusplus
+
+/*******************************************************************************************\
+ * class TasmotaLED
+ *
+ * This class is a lightweight replacement for NeoPixelBus library with a smaller
+ * implementation focusing only on pushing a buffer to the leds.
+ *
+ * It supports:
+ * - RMT and I2S hardware support
+ * Possible enhancements could be considered with SPI and Serial
+ * - Led size of 3 bytes (GRB) and 4 bytes (GRBW)
+ * APIs take 0xRRGGBB or 0xRRGGBBWW as input
+ * but Internal buffers use GGRRBB and GGRRBBWW
+ * - Led type of WS2812 and SK6812
+ * - There is no buffer swapping, the working buffer is copied to an internal
+ * buffer just before display, so you can keep a reference to the buffer
+ * and modify it without having to worry about the display
+ * - buffer is cleared at start
+ * - "Dirty" is kept for API compatibility with NeoPixelBus but is glbally ignored
+ * so any call to `Show()` pushes the pixels even if they haven't changed.
+ * Control for dirty pixels should be done by the caller if required.
+ * - We tried to keep as close as possible to NeoPixelBus method names to ease transition
+\*******************************************************************************************/
+class TasmotaLEDPusher; // forward definition
+class TasmotaLED {
+public:
+ TasmotaLED(uint16_t type, uint16_t num_leds);
+ ~TasmotaLED();
+
+ bool Begin(void);
+ void SetPusher(TasmotaLEDPusher *pusher); // needs to be called before `Begin()`, sets the hardware implementation
+ void Show(void); // pushes the pixels to the LED strip
+ inline void SetRawFormat(bool raw_format) { _raw_format = raw_format; }
+
+ void ClearTo(uint32_t rgbw, int32_t first = 0, int32_t last = -1);
+ void SetPixelColor(int32_t index, uint32_t wrgb);
+ uint32_t GetPixelColor(int32_t index);
+
+ uint8_t GetType(void) const { return _type; }
+ uint16_t PixelCount(void) const { return _pixel_count; }
+ uint8_t PixelSize(void) const { return _pixel_size; }
+ inline uint8_t * Pixels(void) const { return _buf_work; }
+ inline bool IsDirty(void) const { return _dirty; }
+ inline void Dirty(void) { _dirty = true; }
+
+ bool CanShow(void) const;
+
+protected:
+ uint16_t _type; // the composite type
+ uint8_t _pixel_order; // permutation between RGB and position of W
+ bool _w_before; // true if W channel comes first (4 channels only)
+ uint8_t _timing; // timing code for strip, 0=WS2812, 1=SK6812...
+ bool _started; // true if the hardware implementation is configured
+ bool _dirty; // for NeoPixelBus compatibility, but ignored by `Push()`
+ bool _raw_format; // if true, copy raw to leds, if false, convert from RGB to GRB or LED format
+ uint16_t _pixel_count; // how many pixels in the strip
+ uint8_t _pixel_size; // how many bytes per pixels, only 3 and 4 are supported
+ uint8_t *_buf_work; // buffer used to draw into, can be modified directly by the caller
+ uint8_t *_buf_show; // copy of the buffer used to push to leds, private to this class
+ const uint8_t (*_pixel_matrix)[3]; // pointer to the pixer_order_matrix
+ TasmotaLEDPusher *_pusher; // pixels pusher implementation based on hardware (RMT, I2S...)
+};
+
+#endif // __cplusplus
+#endif // __TASMOTALED_H__
diff --git a/lib/lib_basic/TasmotaLED/src/TasmotaLEDPusher.cpp b/lib/lib_basic/TasmotaLED/src/TasmotaLEDPusher.cpp
new file mode 100644
index 000000000..d765703e5
--- /dev/null
+++ b/lib/lib_basic/TasmotaLED/src/TasmotaLEDPusher.cpp
@@ -0,0 +1,97 @@
+/*
+ TasmotaLEDPusher.cpp - Implementation to push Leds via hardware acceleration
+
+ Copyright (C) 2024 Stephan Hadinger
+
+ This library is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#ifdef ESP32
+
+#include "TasmotaLEDPusher.h"
+#include "TasmotaLED.h"
+
+//**************************************************************************************************************
+// enable AddLog support within a C++ library
+extern void AddLog(uint32_t loglevel, PGM_P formatP, ...);
+enum LoggingLevels {LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE};
+//**************************************************************************************************************
+
+
+// convert to the appropriate hardware acceleration based on capacities of the SOC
+uint32_t TasmotaLEDPusher::ResolveHardware(uint32_t hw) {
+uint32_t hw_orig = hw;
+ // Step 1. discard any unsupported hardware, and replace with TasmotaLed_HW_Default
+ uint32_t hw_type = hw & 0xFF0000; // discard bits 0..15
+#if !TASMOTALED_HARDWARE_RMT
+ if (hw_type == TasmotaLed_RMT) {
+ hw = TasmotaLed_HW_None;
+ }
+#endif // TASMOTALED_HARDWARE_RMT
+#if !TASMOTALED_HARDWARE_SPI
+ if (hw_type == TasmotaLed_SPI) {
+ hw = TasmotaLed_HW_None;
+ }
+#endif // TASMOTALED_HARDWARE_SPI
+#if !TASMOTALED_HARDWARE_I2S
+ if (hw_type == TasmotaLed_I2S) {
+ hw = TasmotaLed_HW_None;
+ }
+#endif // TASMOTALED_HARDWARE_I2S
+
+ // Step 2. If TasmotaLed_HW_Default, find a suitable scheme, RMT preferred
+#if TASMOTALED_HARDWARE_RMT
+ if ((hw & 0xFF0000) == TasmotaLed_HW_Default) {
+ hw = TasmotaLed_RMT;
+ }
+#endif // TASMOTALED_HARDWARE_RMT
+#if TASMOTALED_HARDWARE_I2S
+ if ((hw & 0xFF0000) == TasmotaLed_HW_Default) {
+ hw = TasmotaLed_I2S;
+ }
+#endif // TASMOTALED_HARDWARE_I2S
+#if TASMOTALED_HARDWARE_SPI
+ if ((hw & 0xFF0000) == TasmotaLed_HW_Default) {
+ hw = TasmotaLed_SPI;
+ }
+#endif // TASMOTALED_HARDWARE_SPI
+ return hw;
+}
+
+
+TasmotaLEDPusher * TasmotaLEDPusher::Create(uint32_t hw, int8_t gpio) {
+ TasmotaLEDPusher * pusher = nullptr;
+
+ hw = TasmotaLEDPusher::ResolveHardware(hw);
+
+ switch (hw & 0XFF0000) {
+#if TASMOTALED_HARDWARE_RMT
+ case TasmotaLed_RMT:
+ pusher = new TasmotaLEDPusherRMT(gpio);
+ AddLog(LOG_LEVEL_DEBUG, "LED: RMT gpio %i", gpio);
+ break;
+#endif // TASMOTALED_HARDWARE_RMT
+#if TASMOTALED_HARDWARE_SPI
+ case TasmotaLed_SPI:
+ pusher = new TasmotaLEDPusherSPI(gpio);
+ AddLog(LOG_LEVEL_DEBUG, "LED: SPI gpio %i", gpio);
+ break;
+#endif // TASMOTALED_HARDWARE_SPI
+ default:
+ break;
+ }
+ return pusher;
+}
+
+#endif // ESP32
diff --git a/lib/lib_basic/TasmotaLED/src/TasmotaLEDPusher.h b/lib/lib_basic/TasmotaLED/src/TasmotaLEDPusher.h
new file mode 100644
index 000000000..2b8eb4896
--- /dev/null
+++ b/lib/lib_basic/TasmotaLED/src/TasmotaLEDPusher.h
@@ -0,0 +1,161 @@
+/*
+ TasmotaLEDPusher.h - Abstract class for Leds pusher (RMT, SPI, I2S...)
+
+ Copyright (C) 2024 Stephan Hadinger
+
+ This library is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#ifndef __TASMOTALEDPUSHER_H__
+#define __TASMOTALEDPUSHER_H__
+
+#include
+
+// Below are flags to enable of disable each hardware support: RMT, I2S, SPI
+// By default, only enable RMT support, and SPI is used as fallback if no protocol works
+//
+// Use de defines below:
+// #define TASMOTALED_HARDWARE_RMT 0/1
+// #define TASMOTALED_HARDWARE_I2S 0/1
+// #define TASMOTALED_HARDWARE_SPI 0/1
+//
+#ifndef TASMOTALED_HARDWARE_RMT
+ #define TASMOTALED_HARDWARE_RMT 1
+#endif
+
+#ifndef TASMOTALED_HARDWARE_I2S
+ #define TASMOTALED_HARDWARE_I2S 0
+#endif
+
+#ifndef TASMOTALED_HARDWARE_SPI
+ #define TASMOTALED_HARDWARE_SPI 0
+#endif
+
+// Disable any hardware if not supported by the SOC
+#if TASMOTALED_HARDWARE_RMT && !defined(SOC_RMT_SUPPORTED)
+ #undef TASMOTALED_HARDWARE_RMT
+ #define TASMOTALED_HARDWARE_RMT 0
+#endif
+
+#if TASMOTALED_HARDWARE_I2S && !defined(SOC_I2S_SUPPORTED)
+ #undef TASMOTALED_HARDWARE_I2S
+ #define TASMOTALED_HARDWARE_I2S 0
+#endif
+
+#if TASMOTALED_HARDWARE_SPI && !defined(SOC_GPSPI_SUPPORTED)
+ #undef TASMOTALED_HARDWARE_SPI
+ #define TASMOTALED_HARDWARE_SPI 0
+#endif
+
+// if no protocol is defined, use SPI as fallback
+#if !TASMOTALED_HARDWARE_RMT && !TASMOTALED_HARDWARE_I2S && !TASMOTALED_HARDWARE_SPI
+ #undef TASMOTALED_HARDWARE_SPI
+ #define TASMOTALED_HARDWARE_SPI 1
+#endif
+
+// Timing structure for LEDS - in nanoseconds
+// It is passed by TasmotaLed to the pushers
+typedef struct TasmotaLED_Timing {
+ uint16_t T0H, T0L, T1H, T1L;
+ uint32_t Reset;
+} TasmotaLED_Timing;
+
+/*******************************************************************************************\
+ * class TasmotaLEDPusher
+ *
+ * This is an virtual abstract class for Leds pusher (RMT, SPI, I2S...)
+ *
+ * Below are interfaces for current implementations
+\*******************************************************************************************/
+class TasmotaLEDPusher {
+public:
+ TasmotaLEDPusher() : _pixel_count(0), _pixel_size(0), _led_timing(nullptr) {};
+ virtual ~TasmotaLEDPusher() {};
+
+ virtual bool Begin(uint16_t pixel_count, uint16_t pixel_size, const TasmotaLED_Timing * led_timing) {
+ _pixel_count = pixel_count;
+ _pixel_size = pixel_size;
+ _led_timing = led_timing;
+ return true;
+ }
+ virtual bool Push(uint8_t *buf) = 0;
+ virtual bool CanShow(void) = 0;
+
+ static uint32_t ResolveHardware(uint32_t hw); // convert to the appropriate hardware acceleration based on capacities of the SOC
+ static TasmotaLEDPusher * Create(uint32_t hw, int8_t gpio); // create instance for the provided type, or nullptr if failed
+
+protected:
+ uint16_t _pixel_count;
+ uint16_t _pixel_size;
+ const TasmotaLED_Timing * _led_timing;
+};
+
+/*******************************************************************************************\
+ * class TasmotaLEDPusherRMT
+ *
+ * Implementation based on RMT driver
+\*******************************************************************************************/
+#if TASMOTALED_HARDWARE_RMT
+#include "driver/rmt_tx.h"
+class TasmotaLEDPusherRMT : public TasmotaLEDPusher {
+public:
+ TasmotaLEDPusherRMT(int8_t pin) : _pin(pin) {};
+ ~TasmotaLEDPusherRMT();
+
+ bool Begin(uint16_t pixel_count, uint16_t pixel_size, const TasmotaLED_Timing * led_timing) override;
+
+ bool Push(uint8_t *buf) override;
+ bool CanShow(void) override;
+protected:
+ int8_t _pin;
+ rmt_transmit_config_t _tx_config = {};
+ rmt_channel_handle_t _channel = nullptr;;
+ rmt_encoder_handle_t _led_encoder = nullptr;
+};
+#endif // TASMOTALED_HARDWARE_RMT
+
+/*******************************************************************************************\
+ * class TasmotaLEDPusherSPI
+ *
+ * Implementation based on SPI driver, mandatory for C2
+\*******************************************************************************************/
+#if TASMOTALED_HARDWARE_SPI
+#include
+
+typedef struct led_strip_spi_obj_t {
+ uint8_t * pixel_buf;
+ uint16_t strip_len;
+ uint8_t bytes_per_pixel;
+ spi_host_device_t spi_host;
+ spi_device_handle_t spi_device;
+ spi_transaction_t tx_conf; // transaction in process if any
+} led_strip_spi_obj;
+
+class TasmotaLEDPusherSPI : public TasmotaLEDPusher {
+public:
+ TasmotaLEDPusherSPI(int8_t pin) : _pin(pin), _spi_strip({}) {};
+ ~TasmotaLEDPusherSPI();
+
+ bool Begin(uint16_t pixel_count, uint16_t pixel_size, const TasmotaLED_Timing * led_timing) override;
+
+ bool Push(uint8_t *buf) override;
+ bool CanShow(void) override;
+
+protected:
+ int8_t _pin;
+ struct led_strip_spi_obj_t _spi_strip;
+};
+#endif // TASMOTALED_HARDWARE_SPI
+
+#endif // __TASMOTALEDPUSHER_H__
diff --git a/lib/lib_basic/TasmotaLED/src/TasmotaLEDPusherRMT.cpp b/lib/lib_basic/TasmotaLED/src/TasmotaLEDPusherRMT.cpp
new file mode 100644
index 000000000..747985008
--- /dev/null
+++ b/lib/lib_basic/TasmotaLED/src/TasmotaLEDPusherRMT.cpp
@@ -0,0 +1,240 @@
+/*
+ TasmotaLEDPusherRMT.cpp - Implementation to push Leds via RMT channel
+
+ Copyright (C) 2024 Stephan Hadinger
+
+ This library is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#ifdef ESP32
+
+#include "TasmotaLEDPusher.h"
+#include "TasmotaLED.h"
+
+#if TASMOTALED_HARDWARE_RMT
+#include
+#include
+
+//**************************************************************************************************************
+// enable AddLog support within a C++ library
+extern void AddLog(uint32_t loglevel, PGM_P formatP, ...);
+enum LoggingLevels {LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE};
+//**************************************************************************************************************
+
+/*******************************************************************************************\
+ * Implementation for TasmotaLEDPusherRMT
+ *
+ * Code mostly copied from Tasmota patch to NeoPixelBus applied to support esp-idf 5.x
+ * itself inspired from esp-idf example for RMT encoder from
+ * https://github.com/espressif/esp-idf/tree/v5.3.1/examples/peripherals/rmt/ir_nec_transceiver
+\*******************************************************************************************/
+#define RMT_LED_STRIP_RESOLUTION_HZ 40000000 // 40MHz resolution, steps of 25 nanoseconds
+
+// structure used to pass arguments to `rmt_new_led_strip_encoder`
+// currently only the encoder resolution in Hz
+typedef struct {
+ uint32_t resolution; /*!< Encoder resolution, in Hz */
+} led_strip_encoder_config_t;
+
+// structure used to store all the necessary information for the RMT encoder
+typedef struct {
+ rmt_encoder_t base;
+ rmt_encoder_t *bytes_encoder;
+ rmt_encoder_t *copy_encoder;
+ int32_t state;
+ rmt_symbol_word_t reset_code;
+} rmt_led_strip_encoder_t;
+
+static IRAM_ATTR size_t rmt_encode_led_strip(rmt_encoder_t *encoder, rmt_channel_handle_t channel, const void *primary_data, size_t data_size, rmt_encode_state_t *ret_state)
+{
+ rmt_led_strip_encoder_t *led_encoder = __containerof(encoder, rmt_led_strip_encoder_t, base);
+ rmt_encoder_handle_t bytes_encoder = led_encoder->bytes_encoder;
+ rmt_encoder_handle_t copy_encoder = led_encoder->copy_encoder;
+ rmt_encode_state_t session_state = RMT_ENCODING_RESET;
+ rmt_encode_state_t state = RMT_ENCODING_RESET;
+ size_t encoded_symbols = 0;
+ switch (led_encoder->state) {
+ case 0: // send RGB data
+ encoded_symbols += bytes_encoder->encode(bytes_encoder, channel, primary_data, data_size, &session_state);
+ if (session_state & RMT_ENCODING_COMPLETE) {
+ led_encoder->state = 1; // switch to next state when current encoding session finished
+ }
+ if (session_state & RMT_ENCODING_MEM_FULL) {
+ state = static_cast(static_cast(state) | static_cast(RMT_ENCODING_MEM_FULL));
+ goto out; // yield if there's no free space for encoding artifacts
+ }
+ // fall-through
+ case 1: // send reset code
+ encoded_symbols += copy_encoder->encode(copy_encoder, channel, &led_encoder->reset_code, sizeof(led_encoder->reset_code), &session_state);
+ if (session_state & RMT_ENCODING_COMPLETE) {
+ led_encoder->state = RMT_ENCODING_RESET; // back to the initial encoding session
+ state = static_cast(static_cast(state) | static_cast(RMT_ENCODING_COMPLETE));
+ }
+ if (session_state & RMT_ENCODING_MEM_FULL) {
+ state = static_cast(static_cast(state) | static_cast(RMT_ENCODING_MEM_FULL));
+ goto out; // yield if there's no free space for encoding artifacts
+ }
+ }
+out:
+ *ret_state = state;
+ return encoded_symbols;
+}
+
+static esp_err_t rmt_del_led_strip_encoder(rmt_encoder_t *encoder) {
+ rmt_led_strip_encoder_t *led_encoder = __containerof(encoder, rmt_led_strip_encoder_t, base);
+ rmt_del_encoder(led_encoder->bytes_encoder);
+ rmt_del_encoder(led_encoder->copy_encoder);
+ delete led_encoder;
+ return ESP_OK;
+}
+
+static esp_err_t rmt_led_strip_encoder_reset(rmt_encoder_t *encoder) {
+ rmt_led_strip_encoder_t *led_encoder = __containerof(encoder, rmt_led_strip_encoder_t, base);
+ rmt_encoder_reset(led_encoder->bytes_encoder);
+ rmt_encoder_reset(led_encoder->copy_encoder);
+ led_encoder->state = RMT_ENCODING_RESET;
+ return ESP_OK;
+}
+
+static esp_err_t rmt_new_led_strip_encoder(const led_strip_encoder_config_t *config, rmt_encoder_handle_t *ret_encoder, rmt_symbol_word_t bit0, rmt_symbol_word_t bit1, rmt_symbol_word_t reset_code) {
+ static const char* TAG = "TASMOTA_RMT";
+ esp_err_t ret = ESP_OK;
+ rmt_led_strip_encoder_t *led_encoder = NULL;
+ rmt_bytes_encoder_config_t bytes_encoder_config;
+ rmt_copy_encoder_config_t copy_encoder_config = {};
+
+ ESP_GOTO_ON_FALSE(config && ret_encoder, ESP_ERR_INVALID_ARG, err, TAG, "invalid argument");
+ led_encoder = new rmt_led_strip_encoder_t();
+ ESP_GOTO_ON_FALSE(led_encoder, ESP_ERR_NO_MEM, err, TAG, "no mem for led strip encoder");
+ led_encoder->base.encode = rmt_encode_led_strip;
+ led_encoder->base.del = rmt_del_led_strip_encoder;
+ led_encoder->base.reset = rmt_led_strip_encoder_reset;
+ led_encoder->reset_code = reset_code;
+
+ bytes_encoder_config.bit0 = bit0;
+ bytes_encoder_config.bit1 = bit1;
+ bytes_encoder_config.flags.msb_first = 1; // WS2812 transfer bit order: G7...G0R7...R0B7...B0 - TODO: more checks
+
+ ESP_GOTO_ON_ERROR(rmt_new_bytes_encoder(&bytes_encoder_config, &led_encoder->bytes_encoder), err, TAG, "create bytes encoder failed");
+ ESP_GOTO_ON_ERROR(rmt_new_copy_encoder(©_encoder_config, &led_encoder->copy_encoder), err, TAG, "create copy encoder failed");
+
+ *ret_encoder = &led_encoder->base;
+ return ret;
+err:
+ AddLog(LOG_LEVEL_INFO, "RMT: could not init led encoder");
+ if (led_encoder) {
+ if (led_encoder->bytes_encoder) { rmt_del_encoder(led_encoder->bytes_encoder); }
+ if (led_encoder->copy_encoder) { rmt_del_encoder(led_encoder->copy_encoder); }
+ delete led_encoder;
+ }
+ return ret;
+}
+
+TasmotaLEDPusherRMT::~TasmotaLEDPusherRMT() {
+ if (_channel) {
+ rmt_tx_wait_all_done(_channel, 10000 / portTICK_PERIOD_MS);
+ rmt_del_channel(_channel);
+ _channel = nullptr;
+ }
+
+ if (_pin >= 0) {
+ gpio_matrix_out(_pin, 0x100, false, false);
+ pinMode(_pin, INPUT);
+ _pin = -1;
+ }
+}
+
+bool TasmotaLEDPusherRMT::Begin(uint16_t pixel_count, uint16_t pixel_size, const TasmotaLED_Timing * led_timing) {
+ TasmotaLEDPusher::Begin(pixel_count, pixel_size, led_timing);
+
+ esp_err_t ret = ESP_OK;
+ rmt_tx_channel_config_t config = {};
+ config.clk_src = RMT_CLK_SRC_DEFAULT;
+ config.gpio_num = static_cast(_pin);
+ config.mem_block_symbols = 192; // memory block size, 64 * 4 = 256 Bytes
+ config.resolution_hz = RMT_LED_STRIP_RESOLUTION_HZ; // 40 MHz tick resolution, i.e., 1 tick = 0.025 µs or 25 ns
+ config.trans_queue_depth = 4; // set the number of transactions that can pend in the background
+ config.flags.invert_out = false; // do not invert output signal
+ config.flags.with_dma = false; // do not need DMA backend
+
+ ret = rmt_new_tx_channel(&config, &_channel);
+ if (ret != ESP_OK) {
+ AddLog(LOG_LEVEL_INFO, "RMT: cannot initialize Gpio %i err=%i", _pin, ret);
+ return false;
+ }
+ led_strip_encoder_config_t encoder_config = {
+ .resolution = RMT_LED_STRIP_RESOLUTION_HZ,
+ };
+
+ _tx_config.loop_count = 0; // no loop
+
+ rmt_symbol_word_t RmtBit0 = {
+ .duration0 = (uint16_t) (led_timing->T0H * (RMT_LED_STRIP_RESOLUTION_HZ / 1000000) / 1000),
+ .level0 = 1,
+ .duration1 = (uint16_t) (led_timing->T0L * (RMT_LED_STRIP_RESOLUTION_HZ / 1000000) / 1000),
+ .level1 = 0,
+ };
+ rmt_symbol_word_t RmtBit1 = {
+ .duration0 = (uint16_t) (led_timing->T1H * (RMT_LED_STRIP_RESOLUTION_HZ / 1000000) / 1000),
+ .level0 = 1,
+ .duration1 = (uint16_t) (led_timing->T1L * (RMT_LED_STRIP_RESOLUTION_HZ / 1000000) / 1000),
+ .level1 = 0,
+ };
+ rmt_symbol_word_t RmtReset = {
+ .duration0 = (uint16_t) (led_timing->Reset * (RMT_LED_STRIP_RESOLUTION_HZ / 1000000) / 1000),
+ .level0 = 0,
+ .duration1 = 50 * (RMT_LED_STRIP_RESOLUTION_HZ / 1000000) / 1000,
+ .level1 = 1,
+ };
+ // AddLog(LOG_LEVEL_INFO, "RMT: RmtBit0 0x%08X RmtBit1 0x%08X RmtReset 0x%08X", RmtBit0.val, RmtBit1.val, RmtReset.val);
+ ret = rmt_new_led_strip_encoder(&encoder_config, &_led_encoder, RmtBit0, RmtBit1, RmtReset);
+ if (ret != ESP_OK) {
+ // AddLog(LOG_LEVEL_INFO, "RMT: cannot initialize led strip encoder err=%i", ret);
+ return false;
+ }
+ ret = rmt_enable(_channel);
+ if (ret != ESP_OK) {
+ // AddLog(LOG_LEVEL_INFO, "RMT: cannot enable channel err=%i", ret);
+ return false;
+ }
+ return true;
+}
+
+bool TasmotaLEDPusherRMT::CanShow(void) {
+ if (_channel) {
+ return (ESP_OK == rmt_tx_wait_all_done(_channel, 0));
+ } else {
+ return false;
+ }
+}
+
+bool TasmotaLEDPusherRMT::Push(uint8_t *buf) {
+
+ // wait for not actively sending data
+ // this will time out at 1 second, an arbitrarily long period of time
+ // and do nothing if this happens
+ esp_err_t ret = rmt_tx_wait_all_done(_channel, 1000 / portTICK_PERIOD_MS);
+ if (ESP_OK == ret) {
+ // now start the RMT transmit with the editing buffer before we swap
+ ret = rmt_transmit(_channel, _led_encoder, buf, _pixel_count * _pixel_size, &_tx_config);
+ if (ESP_OK != ret) {
+ AddLog(LOG_LEVEL_DEBUG, "RMT: cannot transmit err=%i", ret);
+ return false;
+ }
+ }
+ return true;
+}
+
+#endif // TASMOTALED_HARDWARE_RMT
+#endif // ESP32
diff --git a/lib/lib_basic/TasmotaLED/src/TasmotaLEDPusherSPI.cpp b/lib/lib_basic/TasmotaLED/src/TasmotaLEDPusherSPI.cpp
new file mode 100644
index 000000000..72ea342ef
--- /dev/null
+++ b/lib/lib_basic/TasmotaLED/src/TasmotaLEDPusherSPI.cpp
@@ -0,0 +1,191 @@
+/*
+ TasmotaLEDPusherRMT.cpp - Implementation to push Leds via SPI channel
+
+ Copyright (C) 2024 Stephan Hadinger
+
+ This library is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#ifdef ESP32
+
+#include "TasmotaLEDPusher.h"
+#include "TasmotaLED.h"
+
+#if TASMOTALED_HARDWARE_SPI
+#include
+
+//**************************************************************************************************************
+// enable AddLog support within a C++ library
+extern void AddLog(uint32_t loglevel, PGM_P formatP, ...);
+enum LoggingLevels {LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE};
+//**************************************************************************************************************
+
+/*******************************************************************************************\
+ * Implementation for TasmotaLEDPusherSPI
+ *
+\*******************************************************************************************/
+
+#define LED_STRIP_SPI_DEFAULT_RESOLUTION (25 * 100 * 1000) // 2.5MHz resolution
+#define LED_STRIP_SPI_DEFAULT_TRANS_QUEUE_SIZE 4
+
+#define SPI_BYTES_PER_COLOR_BYTE 3
+#define SPI_BITS_PER_COLOR_BYTE (SPI_BYTES_PER_COLOR_BYTE * 8)
+
+static void __led_strip_spi_bit(uint8_t data, uint8_t *buf)
+{
+ // Each color of 1 bit is represented by 3 bits of SPI, low_level:100 ,high_level:110
+ // So a color byte occupies 3 bytes of SPI.
+ buf[0] = (data & BIT(5) ? BIT(1) | BIT(0) : BIT(1)) | (data & BIT(6) ? BIT(4) | BIT(3) : BIT(4)) | (data & BIT(7) ? BIT(7) | BIT(6) : BIT(7));
+ buf[1] = (BIT(0)) | (data & BIT(3) ? BIT(3) | BIT(2) : BIT(3)) | (data & BIT(4) ? BIT(6) | BIT(5) : BIT(6));
+ buf[2] = (data & BIT(0) ? BIT(2) | BIT(1) : BIT(2)) | (data & BIT(1) ? BIT(5) | BIT(4) : BIT(5)) | (data & BIT(2) ? BIT(7) : 0x00);
+}
+
+esp_err_t led_strip_spi_refresh(led_strip_spi_obj * spi_strip)
+{
+ spi_strip->tx_conf.length = spi_strip->strip_len * spi_strip->bytes_per_pixel * SPI_BITS_PER_COLOR_BYTE;
+ spi_strip->tx_conf.tx_buffer = spi_strip->pixel_buf;
+ spi_strip->tx_conf.rx_buffer = NULL;
+ spi_device_transmit(spi_strip->spi_device, &spi_strip->tx_conf);
+ return ESP_OK;
+}
+
+void led_strip_transmit_buffer(led_strip_spi_obj * spi_strip, uint8_t * buffer_rgbw) {
+ // Timing for 512 pixels (extreme test)
+ // Copying to buffer: 418 us
+ // sending pixels: 16.2 ms
+ uint8_t * buf = buffer_rgbw;
+ uint8_t * pix_buf = spi_strip->pixel_buf;
+ for (int i = 0; i < spi_strip->strip_len; i++) {
+ // LED_PIXEL_FORMAT_GRB takes 72bits(9bytes)
+ __led_strip_spi_bit(*buf++, pix_buf); pix_buf += SPI_BYTES_PER_COLOR_BYTE;
+ __led_strip_spi_bit(*buf++, pix_buf); pix_buf += SPI_BYTES_PER_COLOR_BYTE;
+ __led_strip_spi_bit(*buf++, pix_buf); pix_buf += SPI_BYTES_PER_COLOR_BYTE;
+ if (spi_strip->bytes_per_pixel > 3) {
+ __led_strip_spi_bit(*buf++, pix_buf); pix_buf += SPI_BYTES_PER_COLOR_BYTE;
+ }
+ }
+ /* Refresh the strip to send data */
+ led_strip_spi_refresh(spi_strip);
+}
+
+
+TasmotaLEDPusherSPI::~TasmotaLEDPusherSPI() {
+ if (_spi_strip.spi_device) {
+ spi_bus_remove_device(_spi_strip.spi_device);
+ }
+ if (_spi_strip.spi_host) {
+ spi_bus_free(_spi_strip.spi_host);
+ }
+
+ if (_pin >= 0) {
+ gpio_matrix_out(_pin, 0x100, false, false);
+ pinMode(_pin, INPUT);
+ _pin = -1;
+ }
+}
+
+bool TasmotaLEDPusherSPI::Begin(uint16_t pixel_count, uint16_t pixel_size, const TasmotaLED_Timing * led_timing) {
+ TasmotaLEDPusher::Begin(pixel_count, pixel_size, led_timing);
+ _spi_strip.bytes_per_pixel = _pixel_size;
+ _spi_strip.strip_len = _pixel_count;
+
+ esp_err_t err = ESP_OK;
+ uint32_t mem_caps = MALLOC_CAP_DEFAULT;
+ // spi_clock_source_t clk_src = SPI_CLK_SRC_DEFAULT;
+ spi_bus_config_t spi_bus_cfg;
+ spi_device_interface_config_t spi_dev_cfg;
+ spi_host_device_t spi_host = SPI2_HOST;
+ bool with_dma = true; /// TODO: pass value or compute based on pixelcount
+ int clock_resolution_khz = 0;
+
+ if (with_dma) { // TODO
+ // DMA buffer must be placed in internal SRAM
+ mem_caps |= MALLOC_CAP_INTERNAL | MALLOC_CAP_DMA;
+ }
+ _spi_strip.pixel_buf = (uint8_t *)heap_caps_calloc(1, _pixel_count * _pixel_size * SPI_BYTES_PER_COLOR_BYTE, mem_caps);
+ if (_spi_strip.pixel_buf == nullptr) {
+ AddLog(LOG_LEVEL_INFO, PSTR("LED: Error no mem for spi strip"));
+ goto err;
+ }
+
+ spi_bus_cfg = {
+ .mosi_io_num = _pin,
+ //Only use MOSI to generate the signal, set -1 when other pins are not used.
+ .miso_io_num = -1,
+ .sclk_io_num = -1,
+ .quadwp_io_num = -1,
+ .quadhd_io_num = -1,
+ .max_transfer_sz = _pixel_count * _pixel_size * SPI_BYTES_PER_COLOR_BYTE,
+ };
+ err = spi_bus_initialize(spi_host, &spi_bus_cfg, with_dma ? SPI_DMA_CH_AUTO : SPI_DMA_DISABLED);
+ if (err != ESP_OK) {
+ AddLog(LOG_LEVEL_INFO, PSTR("LED: Error create SPI bus failed"));
+ goto err;
+ }
+ _spi_strip.spi_host = spi_host; // confirmed working, so keep it's value to free it later
+
+ spi_dev_cfg = {
+ .command_bits = 0,
+ .address_bits = 0,
+ .dummy_bits = 0,
+ .mode = 0,
+ //set -1 when CS is not used
+ .clock_source = SPI_CLK_SRC_DEFAULT, // clk_src,
+ .clock_speed_hz = LED_STRIP_SPI_DEFAULT_RESOLUTION,
+ .spics_io_num = -1,
+ .queue_size = LED_STRIP_SPI_DEFAULT_TRANS_QUEUE_SIZE,
+ };
+ err = spi_bus_add_device(_spi_strip.spi_host, &spi_dev_cfg, &_spi_strip.spi_device);
+ if (err != ESP_OK) {
+ // AddLog(LOG_LEVEL_INFO, "LED: Error failed to add spi device");
+ goto err;
+ }
+
+ spi_device_get_actual_freq(_spi_strip.spi_device, &clock_resolution_khz);
+ if (err != ESP_OK) {
+ // AddLog(LOG_LEVEL_INFO, "LED: Error failed to get spi frequency");
+ goto err;
+ }
+ // TODO: ideally we should decide the SPI_BYTES_PER_COLOR_BYTE by the real clock resolution
+ // But now, let's fixed the resolution, the downside is, we don't support a clock source whose frequency is not multiple of LED_STRIP_SPI_DEFAULT_RESOLUTION
+ if (clock_resolution_khz != LED_STRIP_SPI_DEFAULT_RESOLUTION / 1000) {
+ // AddLog(LOG_LEVEL_INFO, "LED: Error unsupported clock resolution: %dKHz", clock_resolution_khz);
+ goto err;
+ }
+
+ return true;
+err:
+ if (_spi_strip.spi_device) {
+ spi_bus_remove_device(_spi_strip.spi_device);
+ }
+ if (_spi_strip.spi_host) {
+ spi_bus_free(_spi_strip.spi_host);
+ }
+ return false;
+}
+
+bool TasmotaLEDPusherSPI::CanShow(void) {
+ return true; // TODO
+}
+
+bool TasmotaLEDPusherSPI::Push(uint8_t *buf) {
+
+ if (CanShow()) {
+ led_strip_transmit_buffer(&_spi_strip, buf);
+ }
+ return true;
+}
+
+#endif // TASMOTALED_HARDWARE_SPI
+#endif // ESP32
diff --git a/lib/lib_display/UDisplay/uDisplay.cpp b/lib/lib_display/UDisplay/uDisplay.cpp
index 4af702125..96b59e3dd 100755
--- a/lib/lib_display/UDisplay/uDisplay.cpp
+++ b/lib/lib_display/UDisplay/uDisplay.cpp
@@ -680,14 +680,15 @@ uDisplay::uDisplay(char *lp) : Renderer(800, 600) {
if (*lp == '\n' || *lp == ' ') { // Add space char
lp++;
} else {
- lp = strchr(lp, '\n');
- if (!lp) {
- lp = strchr(lp, ' ');
- if (!lp) {
+ char *lp1;
+ lp1 = strchr(lp, '\n');
+ if (!lp1) {
+ lp1 = strchr(lp, ' ');
+ if (!lp1) {
break;
}
}
- lp++;
+ lp = lp1 + 1;
}
}
diff --git a/lib/lib_div/esp-knx-ip-0.5.2/src/esp-knx-ip.cpp b/lib/lib_div/esp-knx-ip-0.5.2/src/esp-knx-ip.cpp
index cc2bbf49a..77abc7428 100644
--- a/lib/lib_div/esp-knx-ip-0.5.2/src/esp-knx-ip.cpp
+++ b/lib/lib_div/esp-knx-ip-0.5.2/src/esp-knx-ip.cpp
@@ -558,6 +558,8 @@ void ESPKNXIP::__loop_knx()
DEBUG_PRINTLN(F(""));
+ udp.flush();
+
knx_ip_pkt_t *knx_pkt = (knx_ip_pkt_t *)buf;
DEBUG_PRINT(F("ST: 0x"));
diff --git a/lib/lib_i2c/Adafruit_TSL2591_Library/Adafruit_TSL2591.h b/lib/lib_i2c/Adafruit_TSL2591_Library/Adafruit_TSL2591.h
index bb4f846e5..2ae83f8d8 100644
--- a/lib/lib_i2c/Adafruit_TSL2591_Library/Adafruit_TSL2591.h
+++ b/lib/lib_i2c/Adafruit_TSL2591_Library/Adafruit_TSL2591.h
@@ -1,6 +1,6 @@
/**************************************************************************/
-/*!
- @file Adafruit_TSL2591.h
+/*!
+ @file Adafruit_TSL2591.h
@author KT0WN (adafruit.com)
This is a library for the Adafruit TSL2591 breakout board
diff --git a/lib/lib_i2c/BlueRobotics_MS5837_Library/MS5837.cpp b/lib/lib_i2c/BlueRobotics_MS5837_Library/MS5837.cpp
new file mode 100644
index 000000000..a8e33284e
--- /dev/null
+++ b/lib/lib_i2c/BlueRobotics_MS5837_Library/MS5837.cpp
@@ -0,0 +1,258 @@
+#include "MS5837.h"
+#include
+
+const uint8_t MS5837_ADDR = 0x76;
+const uint8_t MS5837_RESET = 0x1E;
+const uint8_t MS5837_ADC_READ = 0x00;
+const uint8_t MS5837_PROM_READ = 0xA0;
+const uint8_t MS5837_CONVERT_D1_8192 = 0x4A;
+const uint8_t MS5837_CONVERT_D2_8192 = 0x5A;
+
+const float MS5837::Pa = 100.0f;
+const float MS5837::bar = 0.001f;
+const float MS5837::mbar = 1.0f;
+
+const uint8_t MS5837::MS5837_30BA = 0;
+const uint8_t MS5837::MS5837_02BA = 1;
+const uint8_t MS5837::MS5837_UNRECOGNISED = 255;
+
+const uint8_t MS5837_02BA01 = 0x00; // Sensor version: From MS5837_02BA datasheet Version PROM Word 0
+const uint8_t MS5837_02BA21 = 0x15; // Sensor version: From MS5837_02BA datasheet Version PROM Word 0
+const uint8_t MS5837_30BA26 = 0x1A; // Sensor version: From MS5837_30BA datasheet Version PROM Word 0
+
+MS5837::MS5837() {
+ fluidDensity = 1029;
+}
+
+bool MS5837::begin(TwoWire &wirePort) {
+ return (init(wirePort));
+}
+
+bool MS5837::init(TwoWire &wirePort) {
+ _i2cPort = &wirePort; //Grab which port the user wants us to use
+
+ // Reset the MS5837, per datasheet
+ _i2cPort->beginTransmission(MS5837_ADDR);
+ _i2cPort->write(MS5837_RESET);
+ _i2cPort->endTransmission();
+
+ // Wait for reset to complete
+ delay(10);
+
+ // Read calibration values and CRC
+ for ( uint8_t i = 0 ; i < 7 ; i++ ) {
+ _i2cPort->beginTransmission(MS5837_ADDR);
+ _i2cPort->write(MS5837_PROM_READ+i*2);
+ _i2cPort->endTransmission();
+
+ _i2cPort->requestFrom(MS5837_ADDR, (uint8_t)2);
+ C[i] = (_i2cPort->read() << 8) | _i2cPort->read();
+ }
+
+ // Verify that data is correct with CRC
+ uint8_t crcRead = C[0] >> 12;
+ uint8_t crcCalculated = crc4(C);
+
+ if ( crcCalculated != crcRead ) {
+ return false; // CRC fail
+ }
+
+ uint8_t version = (C[0] >> 5) & 0x7F; // Extract the sensor version from PROM Word 0
+
+ // Set _model according to the sensor version
+ if (version == MS5837_02BA01)
+ {
+ _model = MS5837_02BA;
+ }
+ else if (version == MS5837_02BA21)
+ {
+ _model = MS5837_02BA;
+ }
+ else if (version == MS5837_30BA26)
+ {
+ _model = MS5837_30BA;
+ }
+ else
+ {
+ _model = MS5837_UNRECOGNISED;
+ }
+ // The sensor has passed the CRC check, so we should return true even if
+ // the sensor version is unrecognised.
+ // (The MS5637 has the same address as the MS5837 and will also pass the CRC check)
+ // (but will hopefully be unrecognised.)
+ return true;
+}
+
+void MS5837::setModel(uint8_t model) {
+ _model = model;
+}
+
+uint8_t MS5837::getModel() {
+ return (_model);
+}
+
+void MS5837::setFluidDensity(float density) {
+ fluidDensity = density;
+}
+
+void MS5837::read() {
+ //Check that _i2cPort is not NULL (i.e. has the user forgoten to call .init or .begin?)
+ if (_i2cPort == NULL)
+ {
+ return;
+ }
+
+ // Request D1 conversion
+ _i2cPort->beginTransmission(MS5837_ADDR);
+ _i2cPort->write(MS5837_CONVERT_D1_8192);
+ _i2cPort->endTransmission();
+
+ delay(20); // Max conversion time per datasheet
+
+ _i2cPort->beginTransmission(MS5837_ADDR);
+ _i2cPort->write(MS5837_ADC_READ);
+ _i2cPort->endTransmission();
+
+ _i2cPort->requestFrom(MS5837_ADDR, (uint8_t)3);
+ D1_pres = 0;
+ D1_pres = _i2cPort->read();
+ D1_pres = (D1_pres << 8) | _i2cPort->read();
+ D1_pres = (D1_pres << 8) | _i2cPort->read();
+
+ // Request D2 conversion
+ _i2cPort->beginTransmission(MS5837_ADDR);
+ _i2cPort->write(MS5837_CONVERT_D2_8192);
+ _i2cPort->endTransmission();
+
+ delay(20); // Max conversion time per datasheet
+
+ _i2cPort->beginTransmission(MS5837_ADDR);
+ _i2cPort->write(MS5837_ADC_READ);
+ _i2cPort->endTransmission();
+
+ _i2cPort->requestFrom(MS5837_ADDR, (uint8_t)3);
+ D2_temp = 0;
+ D2_temp = _i2cPort->read();
+ D2_temp = (D2_temp << 8) | _i2cPort->read();
+ D2_temp = (D2_temp << 8) | _i2cPort->read();
+
+ calculate();
+}
+
+void MS5837::calculate() {
+ // Given C1-C6 and D1, D2, calculated TEMP and P
+ // Do conversion first and then second order temp compensation
+
+ int32_t dT = 0;
+ int64_t SENS = 0;
+ int64_t OFF = 0;
+ int32_t SENSi = 0;
+ int32_t OFFi = 0;
+ int32_t Ti = 0;
+ int64_t OFF2 = 0;
+ int64_t SENS2 = 0;
+
+ // Terms called
+ dT = D2_temp-uint32_t(C[5])*256l;
+ if ( _model == MS5837_02BA ) {
+ SENS = int64_t(C[1])*65536l+(int64_t(C[3])*dT)/128l;
+ OFF = int64_t(C[2])*131072l+(int64_t(C[4])*dT)/64l;
+ P = (D1_pres*SENS/(2097152l)-OFF)/(32768l);
+ } else {
+ SENS = int64_t(C[1])*32768l+(int64_t(C[3])*dT)/256l;
+ OFF = int64_t(C[2])*65536l+(int64_t(C[4])*dT)/128l;
+ P = (D1_pres*SENS/(2097152l)-OFF)/(8192l);
+ }
+
+ // Temp conversion
+ TEMP = 2000l+int64_t(dT)*C[6]/8388608LL;
+
+ //Second order compensation
+ if ( _model == MS5837_02BA ) {
+ if((TEMP/100)<20){ //Low temp
+ Ti = (11*int64_t(dT)*int64_t(dT))/(34359738368LL);
+ OFFi = (31*(TEMP-2000)*(TEMP-2000))/8;
+ SENSi = (63*(TEMP-2000)*(TEMP-2000))/32;
+ }
+ } else {
+ if((TEMP/100)<20){ //Low temp
+ Ti = (3*int64_t(dT)*int64_t(dT))/(8589934592LL);
+ OFFi = (3*(TEMP-2000)*(TEMP-2000))/2;
+ SENSi = (5*(TEMP-2000)*(TEMP-2000))/8;
+ if((TEMP/100)<-15){ //Very low temp
+ OFFi = OFFi+7*(TEMP+1500l)*(TEMP+1500l);
+ SENSi = SENSi+4*(TEMP+1500l)*(TEMP+1500l);
+ }
+ }
+ else if((TEMP/100)>=20){ //High temp
+ Ti = 2*(dT*dT)/(137438953472LL);
+ OFFi = (1*(TEMP-2000)*(TEMP-2000))/16;
+ SENSi = 0;
+ }
+ }
+
+ OFF2 = OFF-OFFi; //Calculate pressure and temp second order
+ SENS2 = SENS-SENSi;
+
+ TEMP = (TEMP-Ti);
+
+ if ( _model == MS5837_02BA ) {
+ P = (((D1_pres*SENS2)/2097152l-OFF2)/32768l);
+ } else {
+ P = (((D1_pres*SENS2)/2097152l-OFF2)/8192l);
+ }
+}
+
+float MS5837::pressure(float conversion) {
+ if ( _model == MS5837_02BA ) {
+ return P*conversion/100.0f;
+ }
+ else {
+ return P*conversion/10.0f;
+ }
+}
+
+float MS5837::temperature() {
+ return TEMP/100.0f;
+}
+
+// The pressure sensor measures absolute pressure, so it will measure the atmospheric pressure + water pressure
+// We subtract the atmospheric pressure to calculate the depth with only the water pressure
+// The average atmospheric pressure of 101300 pascal is used for the calcuation, but atmospheric pressure varies
+// If the atmospheric pressure is not 101300 at the time of reading, the depth reported will be offset
+// In order to calculate the correct depth, the actual atmospheric pressure should be measured once in air, and
+// that value should subtracted for subsequent depth calculations.
+float MS5837::depth() {
+ return (pressure(MS5837::Pa)-101300)/(fluidDensity*9.80665f);
+}
+
+float MS5837::altitude() {
+ return (1-pow((pressure()/1013.25f),.190284f))*145366.45f*.3048f;
+}
+
+
+uint8_t MS5837::crc4(uint16_t n_prom[]) {
+ uint16_t n_rem = 0;
+
+ n_prom[0] = ((n_prom[0]) & 0x0FFF);
+ n_prom[7] = 0;
+
+ for ( uint8_t i = 0 ; i < 16; i++ ) {
+ if ( i%2 == 1 ) {
+ n_rem ^= (uint16_t)((n_prom[i>>1]) & 0x00FF);
+ } else {
+ n_rem ^= (uint16_t)(n_prom[i>>1] >> 8);
+ }
+ for ( uint8_t n_bit = 8 ; n_bit > 0 ; n_bit-- ) {
+ if ( n_rem & 0x8000 ) {
+ n_rem = (n_rem << 1) ^ 0x3000;
+ } else {
+ n_rem = (n_rem << 1);
+ }
+ }
+ }
+
+ n_rem = ((n_rem >> 12) & 0x000F);
+
+ return n_rem ^ 0x00;
+}
\ No newline at end of file
diff --git a/lib/lib_i2c/BlueRobotics_MS5837_Library/MS5837.h b/lib/lib_i2c/BlueRobotics_MS5837_Library/MS5837.h
new file mode 100644
index 000000000..8787de1b6
--- /dev/null
+++ b/lib/lib_i2c/BlueRobotics_MS5837_Library/MS5837.h
@@ -0,0 +1,113 @@
+/* Blue Robotics Arduino MS5837-30BA Pressure/Temperature Sensor Library
+------------------------------------------------------------
+
+Title: Blue Robotics Arduino MS5837-30BA Pressure/Temperature Sensor Library
+
+Description: This library provides utilities to communicate with and to
+read data from the Measurement Specialties MS5837-30BA pressure/temperature
+sensor.
+
+Authors: Rustom Jehangir, Blue Robotics Inc.
+ Adam Šimko, Blue Robotics Inc.
+
+-------------------------------
+The MIT License (MIT)
+
+Copyright (c) 2015 Blue Robotics Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+-------------------------------*/
+
+#ifndef MS5837_H_BLUEROBOTICS
+#define MS5837_H_BLUEROBOTICS
+
+#include "Arduino.h"
+#include
+
+class MS5837 {
+public:
+ static const float Pa;
+ static const float bar;
+ static const float mbar;
+
+ static const uint8_t MS5837_30BA;
+ static const uint8_t MS5837_02BA;
+ static const uint8_t MS5837_UNRECOGNISED;
+
+ MS5837();
+
+ bool init(TwoWire &wirePort = Wire);
+ bool begin(TwoWire &wirePort = Wire); // Calls init()
+
+ /** Set model of MS5837 sensor. Valid options are MS5837::MS5837_30BA (default)
+ * and MS5837::MS5837_02BA.
+ */
+ void setModel(uint8_t model);
+ uint8_t getModel();
+
+ /** Provide the density of the working fluid in kg/m^3. Default is for
+ * seawater. Should be 997 for freshwater.
+ */
+ void setFluidDensity(float density);
+
+ /** The read from I2C takes up to 40 ms, so use sparingly is possible.
+ */
+ void read();
+
+ /** Pressure returned in mbar or mbar*conversion rate.
+ */
+ float pressure(float conversion = 1.0f);
+
+ /** Temperature returned in deg C.
+ */
+ float temperature();
+
+ /** Depth returned in meters (valid for operation in incompressible
+ * liquids only. Uses density that is set for fresh or seawater.
+ */
+ float depth();
+
+ /** Altitude returned in meters (valid for operation in air only).
+ */
+ float altitude();
+
+ uint8_t crc4(uint16_t n_prom[]);
+
+private:
+
+ //This stores the requested i2c port
+ TwoWire * _i2cPort;
+
+ uint16_t C[8];
+ uint32_t D1_pres, D2_temp;
+ int32_t TEMP;
+ int32_t P;
+ uint8_t _model;
+
+ float fluidDensity;
+
+ /** Performs calculations per the sensor data sheet for conversion and
+ * second order compensation.
+ */
+ void calculate();
+
+ //uint8_t crc4(uint16_t n_prom[]);
+};
+
+#endif
diff --git a/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.cpp b/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.cpp
index 540d37420..afbe3602e 100755
--- a/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.cpp
+++ b/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.cpp
@@ -47,7 +47,9 @@
#include "c_types.h"
#endif
-#include
+#if __has_include("core_version.h") // ESP32 Stage has no core_version.h file. Disable include via PlatformIO Option
+#include // Arduino_Esp8266 version information (ARDUINO_ESP8266_RELEASE and ARDUINO_ESP8266_RELEASE_2_7_1)
+#endif // ESP32_STAGE
#undef DEBUG_TLS
#ifdef DEBUG_TLS
diff --git a/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.h b/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.h
index 3f0a892a5..2c675d154 100755
--- a/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.h
+++ b/lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.h
@@ -20,7 +20,9 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include
+#if __has_include("core_version.h") // ESP32 Stage has no core_version.h file. Disable include via PlatformIO Option
+#include // Arduino_Esp8266 version information (ARDUINO_ESP8266_RELEASE and ARDUINO_ESP8266_RELEASE_2_7_1)
+#endif // ESP32_STAGE
#ifndef wificlientlightbearssl_h
#define wificlientlightbearssl_h
diff --git a/lib/libesp32/ESP-Mail-Client/src/extras/Networks_Provider.h b/lib/libesp32/ESP-Mail-Client/src/extras/Networks_Provider.h
index 8e55a735d..a891eb1bf 100644
--- a/lib/libesp32/ESP-Mail-Client/src/extras/Networks_Provider.h
+++ b/lib/libesp32/ESP-Mail-Client/src/extras/Networks_Provider.h
@@ -75,7 +75,7 @@
#if !defined(ESP_MAIL_DISABLE_NATIVE_ETHERNET)
-#if defined(ESP32) && __has_include()
+#if defined(ESP32) && defined(CONFIG_ETH_ENABLED)
#include
#define ESP_MAIL_ETH_IS_AVAILABLE
#elif defined(ESP8266) && defined(ESP8266_CORE_SDK_V3_X_X)
@@ -128,4 +128,4 @@
#define WiFI_CONNECTED false
#endif
-#endif
\ No newline at end of file
+#endif
diff --git a/lib/libesp32/berry/default/be_modtab.c b/lib/libesp32/berry/default/be_modtab.c
index e4f60edcc..f6a695145 100644
--- a/lib/libesp32/berry/default/be_modtab.c
+++ b/lib/libesp32/berry/default/be_modtab.c
@@ -152,7 +152,7 @@ BERRY_LOCAL const bntvmodule_t* const be_module_table[] = {
&be_native_module(unishox),
#endif // USE_UNISHOX_COMPRESSION
-#ifdef USE_WS2812
+#if defined(USE_WS2812) && !defined(USE_WS2812_FORCE_NEOPIXELBUS)
&be_native_module(animate),
#endif // USE_WS2812
@@ -178,7 +178,7 @@ BERRY_LOCAL const bntvmodule_t* const be_module_table[] = {
&be_native_module(partition_core),
&be_native_module(crc),
&be_native_module(crypto),
-#if defined(USE_BERRY_ULP) && ((CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3))
+#if defined(USE_BERRY_ULP) && defined(CONFIG_ULP_COPROC_ENABLED)
&be_native_module(ULP),
#endif // USE_BERRY_ULP
#if defined(USE_BERRY_TF_LITE)
@@ -293,7 +293,7 @@ BERRY_LOCAL bclass_array be_class_table = {
#ifdef USE_BERRY_TCPSERVER
&be_native_class(tcpserver),
#endif // USE_BERRY_TCPSERVER
-#ifdef USE_WS2812
+#if defined(USE_WS2812) && !defined(USE_WS2812_FORCE_NEOPIXELBUS)
&be_native_class(Leds_ntv),
&be_native_class(Leds),
#endif // USE_WS2812
diff --git a/lib/libesp32/berry_animate/src/be_berry_leds_frame.cpp b/lib/libesp32/berry_animate/src/be_berry_leds_frame.cpp
index 70917593f..65ab158cc 100644
--- a/lib/libesp32/berry_animate/src/be_berry_leds_frame.cpp
+++ b/lib/libesp32/berry_animate/src/be_berry_leds_frame.cpp
@@ -45,10 +45,10 @@ extern "C" {
uint32_t g2 = (color_b >> 8) & 0xFF;
uint32_t b2 = (color_b ) & 0xFF;
uint32_t a2 = (color_b >> 24) & 0xFF;
- uint32_t r3 = changeUIntScale(alpha, 0, 255, r2, r);
- uint32_t g3 = changeUIntScale(alpha, 0, 255, g2, g);
- uint32_t b3 = changeUIntScale(alpha, 0, 255, b2, b);
- uint32_t a3 = changeUIntScale(alpha, 0, 255, a2, a);
+ uint8_t r3 = changeUIntScale(alpha, 0, 255, r2, r);
+ uint8_t g3 = changeUIntScale(alpha, 0, 255, g2, g);
+ uint8_t b3 = changeUIntScale(alpha, 0, 255, b2, b);
+ uint8_t a3 = changeUIntScale(alpha, 0, 255, a2, a);
uint32_t rgb = (a3 << 24) | (r3 << 16) | (g3 << 8) | b3;
be_pushint(vm, rgb);
be_return(vm);
@@ -97,9 +97,9 @@ extern "C" {
uint32_t fore_g = (fore_argb >> 8) & 0xFF;
uint32_t back_b = (back_argb ) & 0xFF;
uint32_t fore_b = (fore_argb ) & 0xFF;
- uint32_t dest_r_new = changeUIntScale(fore_alpha, 0, 255, fore_r, back_r);
- uint32_t dest_g_new = changeUIntScale(fore_alpha, 0, 255, fore_g, back_g);
- uint32_t dest_b_new = changeUIntScale(fore_alpha, 0, 255, fore_b, back_b);
+ uint8_t dest_r_new = changeUIntScale(fore_alpha, 0, 255, fore_r, back_r);
+ uint8_t dest_g_new = changeUIntScale(fore_alpha, 0, 255, fore_g, back_g);
+ uint8_t dest_b_new = changeUIntScale(fore_alpha, 0, 255, fore_b, back_b);
dest_rgb_new = (dest_r_new << 16) | (dest_g_new << 8) | dest_b_new;
}
dest[i] = dest_rgb_new;
@@ -135,7 +135,7 @@ extern "C" {
// Leds_frame.paste_pixels(neopixel:bytes(), led_buffer:bytes(), bri:int 0..100, gamma:bool)
//
- // Copy from ARGB buffer to GRB
+ // Copy from ARGB buffer to RGB
int32_t be_leds_paste_pixels(bvm *vm);
int32_t be_leds_paste_pixels(bvm *vm) {
int32_t top = be_top(vm); // Get the number of arguments
@@ -162,8 +162,8 @@ extern "C" {
uint32_t src_r = (src_argb >> 16) & 0xFF;
uint32_t src_g = (src_argb >> 8) & 0xFF;
uint32_t src_b = (src_argb ) & 0xFF;
- dest_buf[i * 3 + 0] = src_g;
- dest_buf[i * 3 + 1] = src_r;
+ dest_buf[i * 3 + 0] = src_r;
+ dest_buf[i * 3 + 1] = src_g;
dest_buf[i * 3 + 2] = src_b;
}
}
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_IM_Message.be b/lib/libesp32/berry_matter/src/embedded/Matter_IM_Message.be
index 7559236e1..f19fe20bd 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_IM_Message.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_IM_Message.be
@@ -197,8 +197,8 @@ matter.IM_WriteResponse = Matter_IM_WriteResponse
# This version pull the attributes in lazy mode, only when response is computed
#################################################################################
class Matter_IM_ReportData_Pull : Matter_IM_Message
- static var MAX_MESSAGE = 1200 # max bytes size for a single TLV worklaod
- # the maximum MTU is 1280, which leaves 80 bytes for the rest of the message
+ static var MAX_MESSAGE = 1150 # max bytes size for a single TLV worklaod
+ # the maximum MTU is 1280, which leaves 130 bytes for the rest of the message
# section 4.4.4 (p. 114)
# note: `self.data` (bytes or nil) is containing any remaining responses that could not fit in previous packets
var generator_or_arr # a PathGenerator or an array of PathGenerator
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Message.be b/lib/libesp32/berry_matter/src/embedded/Matter_Message.be
index 1d418dfc0..4291fd64a 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Message.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Message.be
@@ -375,7 +375,7 @@ class Matter_Frame
# recompute nonce
var n = self.message_handler._n_bytes # use cached bytes() object to avoid allocation
n.clear()
- n.add(self.flags, 1)
+ n.add(self.sec_flags, 1)
n.add(self.message_counter, 4)
if self.source_node_id
n .. self.source_node_id
@@ -426,7 +426,7 @@ class Matter_Frame
# recompute nonce
var n = self.message_handler._n_bytes # use cached bytes() object to avoid allocation
n.clear()
- n.add(self.flags, 1)
+ n.add(self.sec_flags, 1)
n.add(self.message_counter, 4)
if session.is_CASE() && session.get_device_id()
n .. session.get_device_id()
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM_Message.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM_Message.h
index 5e6fbfda6..6a0337ed1 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM_Message.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM_Message.h
@@ -1095,7 +1095,7 @@ be_local_class(Matter_IM_ReportData_Pull,
{ be_const_key_weak(status_ok_received, -1), be_const_closure(class_Matter_IM_ReportData_Pull_status_ok_received_closure) },
{ be_const_key_weak(data_ev, -1), be_const_var(4) },
{ be_const_key_weak(suppress_response, 8), be_const_var(3) },
- { be_const_key_weak(MAX_MESSAGE, -1), be_const_int(1200) },
+ { be_const_key_weak(MAX_MESSAGE, -1), be_const_int(1150) },
{ be_const_key_weak(set_suppress_response, -1), be_const_closure(class_Matter_IM_ReportData_Pull_set_suppress_response_closure) },
{ be_const_key_weak(set_subscription_id, -1), be_const_closure(class_Matter_IM_ReportData_Pull_set_subscription_id_closure) },
{ be_const_key_weak(generator_or_arr, 5), be_const_var(0) },
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Message.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Message.h
index 90057f7d4..58559d111 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Message.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Message.h
@@ -16,7 +16,7 @@ static const bvalue be_ktab_class_Matter_Frame[73] = {
/* K7 */ be_nested_str_weak(_n_bytes),
/* K8 */ be_nested_str_weak(clear),
/* K9 */ be_nested_str_weak(add),
- /* K10 */ be_nested_str_weak(flags),
+ /* K10 */ be_nested_str_weak(sec_flags),
/* K11 */ be_const_int(1),
/* K12 */ be_nested_str_weak(message_counter),
/* K13 */ be_nested_str_weak(is_CASE),
@@ -27,12 +27,12 @@ static const bvalue be_ktab_class_Matter_Frame[73] = {
/* K18 */ be_const_int(0),
/* K19 */ be_nested_str_weak(remote_ip),
/* K20 */ be_nested_str_weak(remote_port),
- /* K21 */ be_nested_str_weak(flag_s),
- /* K22 */ be_nested_str_weak(flag_dsiz),
- /* K23 */ be_const_int(3),
- /* K24 */ be_nested_str_weak(local_session_id),
- /* K25 */ be_const_int(2),
- /* K26 */ be_nested_str_weak(sec_flags),
+ /* K21 */ be_nested_str_weak(flags),
+ /* K22 */ be_nested_str_weak(flag_s),
+ /* K23 */ be_nested_str_weak(flag_dsiz),
+ /* K24 */ be_const_int(3),
+ /* K25 */ be_nested_str_weak(local_session_id),
+ /* K26 */ be_const_int(2),
/* K27 */ be_nested_str_weak(sec_p),
/* K28 */ be_nested_str_weak(sec_c),
/* K29 */ be_nested_str_weak(sec_sesstype),
@@ -260,83 +260,83 @@ be_local_closure(class_Matter_Frame_encode_frame, /* name */
0x00100805, // 000B ADD R4 R4 R5
0x7C0C0200, // 000C CALL R3 1
0x5C080600, // 000D MOVE R2 R3
- 0x880C010A, // 000E GETMBR R3 R0 K10
+ 0x880C0115, // 000E GETMBR R3 R0 K21
0x4C100000, // 000F LDNIL R4
0x1C0C0604, // 0010 EQ R3 R3 R4
0x780E000D, // 0011 JMPF R3 #0020
- 0x90021512, // 0012 SETMBR R0 K10 K18
- 0x880C0115, // 0013 GETMBR R3 R0 K21
+ 0x90022B12, // 0012 SETMBR R0 K21 K18
+ 0x880C0116, // 0013 GETMBR R3 R0 K22
0x780E0003, // 0014 JMPF R3 #0019
- 0x880C010A, // 0015 GETMBR R3 R0 K10
+ 0x880C0115, // 0015 GETMBR R3 R0 K21
0x54120003, // 0016 LDINT R4 4
0x300C0604, // 0017 OR R3 R3 R4
- 0x90021403, // 0018 SETMBR R0 K10 R3
- 0x880C0116, // 0019 GETMBR R3 R0 K22
+ 0x90022A03, // 0018 SETMBR R0 K21 R3
+ 0x880C0117, // 0019 GETMBR R3 R0 K23
0x780E0004, // 001A JMPF R3 #0020
- 0x880C010A, // 001B GETMBR R3 R0 K10
- 0x88100116, // 001C GETMBR R4 R0 K22
- 0x2C100917, // 001D AND R4 R4 K23
+ 0x880C0115, // 001B GETMBR R3 R0 K21
+ 0x88100117, // 001C GETMBR R4 R0 K23
+ 0x2C100918, // 001D AND R4 R4 K24
0x300C0604, // 001E OR R3 R3 R4
- 0x90021403, // 001F SETMBR R0 K10 R3
+ 0x90022A03, // 001F SETMBR R0 K21 R3
0x8C0C0509, // 0020 GETMET R3 R2 K9
- 0x8814010A, // 0021 GETMBR R5 R0 K10
+ 0x88140115, // 0021 GETMBR R5 R0 K21
0x5818000B, // 0022 LDCONST R6 K11
0x7C0C0600, // 0023 CALL R3 3
0x8C0C0509, // 0024 GETMET R3 R2 K9
- 0x88140118, // 0025 GETMBR R5 R0 K24
+ 0x88140119, // 0025 GETMBR R5 R0 K25
0x78160001, // 0026 JMPF R5 #0029
- 0x88140118, // 0027 GETMBR R5 R0 K24
+ 0x88140119, // 0027 GETMBR R5 R0 K25
0x70020000, // 0028 JMP #002A
0x58140012, // 0029 LDCONST R5 K18
- 0x58180019, // 002A LDCONST R6 K25
+ 0x5818001A, // 002A LDCONST R6 K26
0x7C0C0600, // 002B CALL R3 3
- 0x880C011A, // 002C GETMBR R3 R0 K26
+ 0x880C010A, // 002C GETMBR R3 R0 K10
0x4C100000, // 002D LDNIL R4
0x1C0C0604, // 002E EQ R3 R3 R4
0x780E0013, // 002F JMPF R3 #0044
- 0x90023512, // 0030 SETMBR R0 K26 K18
+ 0x90021512, // 0030 SETMBR R0 K10 K18
0x880C011B, // 0031 GETMBR R3 R0 K27
0x780E0003, // 0032 JMPF R3 #0037
- 0x880C011A, // 0033 GETMBR R3 R0 K26
+ 0x880C010A, // 0033 GETMBR R3 R0 K10
0x5412007F, // 0034 LDINT R4 128
0x300C0604, // 0035 OR R3 R3 R4
- 0x90023403, // 0036 SETMBR R0 K26 R3
+ 0x90021403, // 0036 SETMBR R0 K10 R3
0x880C011C, // 0037 GETMBR R3 R0 K28
0x780E0003, // 0038 JMPF R3 #003D
- 0x880C011A, // 0039 GETMBR R3 R0 K26
+ 0x880C010A, // 0039 GETMBR R3 R0 K10
0x5412003F, // 003A LDINT R4 64
0x300C0604, // 003B OR R3 R3 R4
- 0x90023403, // 003C SETMBR R0 K26 R3
+ 0x90021403, // 003C SETMBR R0 K10 R3
0x880C011D, // 003D GETMBR R3 R0 K29
0x780E0004, // 003E JMPF R3 #0044
- 0x880C011A, // 003F GETMBR R3 R0 K26
+ 0x880C010A, // 003F GETMBR R3 R0 K10
0x8810011D, // 0040 GETMBR R4 R0 K29
- 0x2C100917, // 0041 AND R4 R4 K23
+ 0x2C100918, // 0041 AND R4 R4 K24
0x300C0604, // 0042 OR R3 R3 R4
- 0x90023403, // 0043 SETMBR R0 K26 R3
+ 0x90021403, // 0043 SETMBR R0 K10 R3
0x8C0C0509, // 0044 GETMET R3 R2 K9
- 0x8814011A, // 0045 GETMBR R5 R0 K26
+ 0x8814010A, // 0045 GETMBR R5 R0 K10
0x5818000B, // 0046 LDCONST R6 K11
0x7C0C0600, // 0047 CALL R3 3
0x8C0C0509, // 0048 GETMET R3 R2 K9
0x8814010C, // 0049 GETMBR R5 R0 K12
0x541A0003, // 004A LDINT R6 4
0x7C0C0600, // 004B CALL R3 3
- 0x880C0115, // 004C GETMBR R3 R0 K21
+ 0x880C0116, // 004C GETMBR R3 R0 K22
0x780E0001, // 004D JMPF R3 #0050
0x880C011E, // 004E GETMBR R3 R0 K30
0x400C0403, // 004F CONNECT R3 R2 R3
- 0x880C0116, // 0050 GETMBR R3 R0 K22
+ 0x880C0117, // 0050 GETMBR R3 R0 K23
0x1C0C070B, // 0051 EQ R3 R3 K11
0x780E0001, // 0052 JMPF R3 #0055
0x880C011F, // 0053 GETMBR R3 R0 K31
0x400C0403, // 0054 CONNECT R3 R2 R3
- 0x880C0116, // 0055 GETMBR R3 R0 K22
- 0x1C0C0719, // 0056 EQ R3 R3 K25
+ 0x880C0117, // 0055 GETMBR R3 R0 K23
+ 0x1C0C071A, // 0056 EQ R3 R3 K26
0x780E0003, // 0057 JMPF R3 #005C
0x8C0C0509, // 0058 GETMET R3 R2 K9
0x88140120, // 0059 GETMBR R5 R0 K32
- 0x58180019, // 005A LDCONST R6 K25
+ 0x5818001A, // 005A LDCONST R6 K26
0x7C0C0600, // 005B CALL R3 3
0x600C000C, // 005C GETGBL R3 G12
0x5C100400, // 005D MOVE R4 R2
@@ -362,7 +362,7 @@ be_local_closure(class_Matter_Frame_encode_frame, /* name */
0x880C0124, // 0071 GETMBR R3 R0 K36
0x780E0002, // 0072 JMPF R3 #0076
0x880C0121, // 0073 GETMBR R3 R0 K33
- 0x300C0719, // 0074 OR R3 R3 K25
+ 0x300C071A, // 0074 OR R3 R3 K26
0x90024203, // 0075 SETMBR R0 K33 R3
0x880C0125, // 0076 GETMBR R3 R0 K37
0x780E0002, // 0077 JMPF R3 #007B
@@ -387,11 +387,11 @@ be_local_closure(class_Matter_Frame_encode_frame, /* name */
0x2C140A06, // 008A AND R5 R5 R6
0x70020000, // 008B JMP #008D
0x58140012, // 008C LDCONST R5 K18
- 0x58180019, // 008D LDCONST R6 K25
+ 0x5818001A, // 008D LDCONST R6 K26
0x7C0C0600, // 008E CALL R3 3
0x8C0C0509, // 008F GETMET R3 R2 K9
0x88140128, // 0090 GETMBR R5 R0 K40
- 0x58180019, // 0091 LDCONST R6 K25
+ 0x5818001A, // 0091 LDCONST R6 K26
0x7C0C0600, // 0092 CALL R3 3
0x880C0124, // 0093 GETMBR R3 R0 K36
0x780E0003, // 0094 JMPF R3 #0099
@@ -436,8 +436,8 @@ be_local_closure(class_Matter_Frame_decode_header, /* name */
0x58140012, // 0003 LDCONST R5 K18
0x5818000B, // 0004 LDCONST R6 K11
0x7C0C0600, // 0005 CALL R3 3
- 0x90021403, // 0006 SETMBR R0 K10 R3
- 0x880C010A, // 0007 GETMBR R3 R0 K10
+ 0x90022A03, // 0006 SETMBR R0 K21 R3
+ 0x880C0115, // 0007 GETMBR R3 R0 K21
0x541200F7, // 0008 LDINT R4 248
0x2C0C0604, // 0009 AND R3 R3 R4
0x200C0712, // 000A NE R3 R3 K18
@@ -445,28 +445,28 @@ be_local_closure(class_Matter_Frame_decode_header, /* name */
0x500C0000, // 000C LDBOOL R3 0 0
0x80040600, // 000D RET 1 R3
0x8C0C052C, // 000E GETMET R3 R2 K44
- 0x58140019, // 000F LDCONST R5 K25
+ 0x5814001A, // 000F LDCONST R5 K26
0x5818000B, // 0010 LDCONST R6 K11
0x7C0C0600, // 0011 CALL R3 3
- 0x90022A03, // 0012 SETMBR R0 K21 R3
+ 0x90022C03, // 0012 SETMBR R0 K22 R3
0x8C0C052C, // 0013 GETMET R3 R2 K44
0x58140012, // 0014 LDCONST R5 K18
- 0x58180019, // 0015 LDCONST R6 K25
+ 0x5818001A, // 0015 LDCONST R6 K26
0x7C0C0600, // 0016 CALL R3 3
- 0x90022C03, // 0017 SETMBR R0 K22 R3
- 0x880C0116, // 0018 GETMBR R3 R0 K22
- 0x1C0C0717, // 0019 EQ R3 R3 K23
+ 0x90022E03, // 0017 SETMBR R0 K23 R3
+ 0x880C0117, // 0018 GETMBR R3 R0 K23
+ 0x1C0C0718, // 0019 EQ R3 R3 K24
0x780E0001, // 001A JMPF R3 #001D
0x500C0000, // 001B LDBOOL R3 0 0
0x80040600, // 001C RET 1 R3
0x8C0C052B, // 001D GETMET R3 R2 K43
- 0x58140017, // 001E LDCONST R5 K23
+ 0x58140018, // 001E LDCONST R5 K24
0x5818000B, // 001F LDCONST R6 K11
0x7C0C0600, // 0020 CALL R3 3
- 0x90023403, // 0021 SETMBR R0 K26 R3
+ 0x90021403, // 0021 SETMBR R0 K10 R3
0x8C0C052C, // 0022 GETMET R3 R2 K44
0x54160007, // 0023 LDINT R5 8
- 0x08162E05, // 0024 MUL R5 K23 R5
+ 0x08163005, // 0024 MUL R5 K24 R5
0x541A0006, // 0025 LDINT R6 7
0x00140A06, // 0026 ADD R5 R5 R6
0x5818000B, // 0027 LDCONST R6 K11
@@ -474,7 +474,7 @@ be_local_closure(class_Matter_Frame_decode_header, /* name */
0x90023603, // 0029 SETMBR R0 K27 R3
0x8C0C052C, // 002A GETMET R3 R2 K44
0x54160007, // 002B LDINT R5 8
- 0x08162E05, // 002C MUL R5 K23 R5
+ 0x08163005, // 002C MUL R5 K24 R5
0x541A0005, // 002D LDINT R6 6
0x00140A06, // 002E ADD R5 R5 R6
0x5818000B, // 002F LDCONST R6 K11
@@ -482,7 +482,7 @@ be_local_closure(class_Matter_Frame_decode_header, /* name */
0x90023803, // 0031 SETMBR R0 K28 R3
0x8C0C052C, // 0032 GETMET R3 R2 K44
0x54160007, // 0033 LDINT R5 8
- 0x08162E05, // 0034 MUL R5 K23 R5
+ 0x08163005, // 0034 MUL R5 K24 R5
0x541A0004, // 0035 LDINT R6 5
0x00140A06, // 0036 ADD R5 R5 R6
0x5818000B, // 0037 LDCONST R6 K11
@@ -490,8 +490,8 @@ be_local_closure(class_Matter_Frame_decode_header, /* name */
0x90025A03, // 0039 SETMBR R0 K45 R3
0x8C0C052C, // 003A GETMET R3 R2 K44
0x54160007, // 003B LDINT R5 8
- 0x08162E05, // 003C MUL R5 K23 R5
- 0x58180019, // 003D LDCONST R6 K25
+ 0x08163005, // 003C MUL R5 K24 R5
+ 0x5818001A, // 003D LDCONST R6 K26
0x7C0C0600, // 003E CALL R3 3
0x90023A03, // 003F SETMBR R0 K29 R3
0x880C011D, // 0040 GETMBR R3 R0 K29
@@ -501,9 +501,9 @@ be_local_closure(class_Matter_Frame_decode_header, /* name */
0x80040600, // 0044 RET 1 R3
0x8C0C052B, // 0045 GETMET R3 R2 K43
0x5814000B, // 0046 LDCONST R5 K11
- 0x58180019, // 0047 LDCONST R6 K25
+ 0x5818001A, // 0047 LDCONST R6 K26
0x7C0C0600, // 0048 CALL R3 3
- 0x90023003, // 0049 SETMBR R0 K24 R3
+ 0x90023203, // 0049 SETMBR R0 K25 R3
0x8C0C052B, // 004A GETMET R3 R2 K43
0x54160003, // 004B LDINT R5 4
0x541A0003, // 004C LDINT R6 4
@@ -511,7 +511,7 @@ be_local_closure(class_Matter_Frame_decode_header, /* name */
0x90021803, // 004E SETMBR R0 K12 R3
0x540E0007, // 004F LDINT R3 8
0x00040203, // 0050 ADD R1 R1 R3
- 0x880C0115, // 0051 GETMBR R3 R0 K21
+ 0x880C0116, // 0051 GETMBR R3 R0 K22
0x780E0006, // 0052 JMPF R3 #005A
0x540E0006, // 0053 LDINT R3 7
0x000C0203, // 0054 ADD R3 R1 R3
@@ -520,7 +520,7 @@ be_local_closure(class_Matter_Frame_decode_header, /* name */
0x90023C03, // 0057 SETMBR R0 K30 R3
0x540E0007, // 0058 LDINT R3 8
0x00040203, // 0059 ADD R1 R1 R3
- 0x880C0116, // 005A GETMBR R3 R0 K22
+ 0x880C0117, // 005A GETMBR R3 R0 K23
0x1C0C070B, // 005B EQ R3 R3 K11
0x780E0007, // 005C JMPF R3 #0065
0x540E0006, // 005D LDINT R3 7
@@ -531,22 +531,22 @@ be_local_closure(class_Matter_Frame_decode_header, /* name */
0x540E0007, // 0062 LDINT R3 8
0x00040203, // 0063 ADD R1 R1 R3
0x70020008, // 0064 JMP #006E
- 0x880C0116, // 0065 GETMBR R3 R0 K22
- 0x1C0C0719, // 0066 EQ R3 R3 K25
+ 0x880C0117, // 0065 GETMBR R3 R0 K23
+ 0x1C0C071A, // 0066 EQ R3 R3 K26
0x780E0005, // 0067 JMPF R3 #006E
0x8C0C052B, // 0068 GETMET R3 R2 K43
0x5C140200, // 0069 MOVE R5 R1
- 0x58180019, // 006A LDCONST R6 K25
+ 0x5818001A, // 006A LDCONST R6 K26
0x7C0C0600, // 006B CALL R3 3
0x90024003, // 006C SETMBR R0 K32 R3
- 0x00040319, // 006D ADD R1 R1 K25
+ 0x0004031A, // 006D ADD R1 R1 K26
0x880C012D, // 006E GETMBR R3 R0 K45
0x780E0005, // 006F JMPF R3 #0076
0x8C0C052B, // 0070 GETMET R3 R2 K43
0x5C140200, // 0071 MOVE R5 R1
- 0x58180019, // 0072 LDCONST R6 K25
+ 0x5818001A, // 0072 LDCONST R6 K26
0x7C0C0600, // 0073 CALL R3 3
- 0x00100719, // 0074 ADD R4 R3 K25
+ 0x0010071A, // 0074 ADD R4 R3 K26
0x00040204, // 0075 ADD R1 R1 R4
0x90020801, // 0076 SETMBR R0 K4 R1
0x500C0200, // 0077 LDBOOL R3 1 0
@@ -620,16 +620,16 @@ be_local_closure(class_Matter_Frame_build_response, /* name */
0x900E2604, // 000A SETMBR R3 K19 R4
0x88100114, // 000B GETMBR R4 R0 K20
0x900E2804, // 000C SETMBR R3 K20 R4
- 0x88100115, // 000D GETMBR R4 R0 K21
+ 0x88100116, // 000D GETMBR R4 R0 K22
0x78120003, // 000E JMPF R4 #0013
- 0x900E2D0B, // 000F SETMBR R3 K22 K11
+ 0x900E2F0B, // 000F SETMBR R3 K23 K11
0x8810011E, // 0010 GETMBR R4 R0 K30
0x900E3E04, // 0011 SETMBR R3 K31 R4
0x70020000, // 0012 JMP #0014
- 0x900E2D12, // 0013 SETMBR R3 K22 K18
+ 0x900E2F12, // 0013 SETMBR R3 K23 K18
0x88100100, // 0014 GETMBR R4 R0 K0
0x900E0004, // 0015 SETMBR R3 K0 R4
- 0x88100118, // 0016 GETMBR R4 R0 K24
+ 0x88100119, // 0016 GETMBR R4 R0 K25
0x20100912, // 0017 NE R4 R4 K18
0x7812000D, // 0018 JMPF R4 #0027
0x88100100, // 0019 GETMBR R4 R0 K0
@@ -644,14 +644,14 @@ be_local_closure(class_Matter_Frame_build_response, /* name */
0x900E1804, // 0022 SETMBR R3 K12 R4
0x88100100, // 0023 GETMBR R4 R0 K0
0x88100932, // 0024 GETMBR R4 R4 K50
- 0x900E3004, // 0025 SETMBR R3 K24 R4
+ 0x900E3204, // 0025 SETMBR R3 K25 R4
0x70020005, // 0026 JMP #002D
0x88100100, // 0027 GETMBR R4 R0 K0
0x88100934, // 0028 GETMBR R4 R4 K52
0x8C100935, // 0029 GETMET R4 R4 K53
0x7C100200, // 002A CALL R4 1
0x900E1804, // 002B SETMBR R3 K12 R4
- 0x900E3112, // 002C SETMBR R3 K24 K18
+ 0x900E3312, // 002C SETMBR R3 K25 K18
0x88100125, // 002D GETMBR R4 R0 K37
0x78120001, // 002E JMPF R4 #0031
0x58100012, // 002F LDCONST R4 K18
@@ -673,7 +673,7 @@ be_local_closure(class_Matter_Frame_build_response, /* name */
0x70020000, // 003F JMP #0041
0x58100012, // 0040 LDCONST R4 K18
0x900E4604, // 0041 SETMBR R3 K35 R4
- 0x88100718, // 0042 GETMBR R4 R3 K24
+ 0x88100719, // 0042 GETMBR R4 R3 K25
0x1C100912, // 0043 EQ R4 R4 K18
0x78120013, // 0044 JMPF R4 #0059
0xB8125C00, // 0045 GETNGBL R4 K46
@@ -691,10 +691,10 @@ be_local_closure(class_Matter_Frame_build_response, /* name */
0x60180018, // 0051 GETGBL R6 G24
0x581C0039, // 0052 LDCONST R7 K57
0x88200700, // 0053 GETMBR R8 R3 K0
- 0x88201118, // 0054 GETMBR R8 R8 K24
+ 0x88201119, // 0054 GETMBR R8 R8 K25
0x5C240800, // 0055 MOVE R9 R4
0x7C180600, // 0056 CALL R6 3
- 0x581C0017, // 0057 LDCONST R7 K23
+ 0x581C0018, // 0057 LDCONST R7 K24
0x7C140400, // 0058 CALL R5 2
0x80040600, // 0059 RET 1 R3
})
@@ -731,7 +731,7 @@ be_local_closure(class_Matter_Frame_decrypt, /* name */
0x781E002B, // 0008 JMPF R7 #0035
0xB81E7000, // 0009 GETNGBL R7 K56
0x5820003B, // 000A LDCONST R8 K59
- 0x58240019, // 000B LDCONST R9 K25
+ 0x5824001A, // 000B LDCONST R9 K26
0x7C1C0400, // 000C CALL R7 2
0x8C1C053C, // 000D GETMET R7 R2 K60
0x7C1C0200, // 000E CALL R7 1
@@ -741,7 +741,7 @@ be_local_closure(class_Matter_Frame_decrypt, /* name */
0x60240015, // 0012 GETGBL R9 G21
0x7C240000, // 0013 CALL R9 0
0x8C241309, // 0014 GETMET R9 R9 K9
- 0x882C0118, // 0015 GETMBR R11 R0 K24
+ 0x882C0119, // 0015 GETMBR R11 R0 K25
0x5431FFFD, // 0016 LDINT R12 -2
0x7C240600, // 0017 CALL R9 3
0x542A0004, // 0018 LDINT R10 5
@@ -761,10 +761,10 @@ be_local_closure(class_Matter_Frame_decrypt, /* name */
0x8C30193F, // 0026 GETMET R12 R12 K63
0x5C381400, // 0027 MOVE R14 R10
0x5C3C1200, // 0028 MOVE R15 R9
- 0x58400019, // 0029 LDCONST R16 K25
+ 0x5840001A, // 0029 LDCONST R16 K26
0x7C300800, // 002A CALL R12 4
0x5C2C1800, // 002B MOVE R11 R12
- 0x40322517, // 002C CONNECT R12 K18 K23
+ 0x40322518, // 002C CONNECT R12 K18 K24
0x88340103, // 002D GETMBR R13 R0 K3
0x94301A0C, // 002E GETIDX R12 R13 R12
0x0030180B, // 002F ADD R12 R12 R11
@@ -832,7 +832,7 @@ be_local_closure(class_Matter_Frame_decrypt, /* name */
0x70020003, // 006D JMP #0072
0xB8267000, // 006E GETNGBL R9 K56
0x58280042, // 006F LDCONST R10 K66
- 0x582C0017, // 0070 LDCONST R11 K23
+ 0x582C0018, // 0070 LDCONST R11 K24
0x7C240400, // 0071 CALL R9 2
0x80041000, // 0072 RET 1 R8
})
@@ -867,13 +867,13 @@ be_local_closure(class_Matter_Frame_build_standalone_ack, /* name */
0x900A2603, // 0006 SETMBR R2 K19 R3
0x880C0114, // 0007 GETMBR R3 R0 K20
0x900A2803, // 0008 SETMBR R2 K20 R3
- 0x880C0115, // 0009 GETMBR R3 R0 K21
+ 0x880C0116, // 0009 GETMBR R3 R0 K22
0x780E0003, // 000A JMPF R3 #000F
- 0x900A2D0B, // 000B SETMBR R2 K22 K11
+ 0x900A2F0B, // 000B SETMBR R2 K23 K11
0x880C011E, // 000C GETMBR R3 R0 K30
0x900A3E03, // 000D SETMBR R2 K31 R3
0x70020000, // 000E JMP #0010
- 0x900A2D12, // 000F SETMBR R2 K22 K18
+ 0x900A2F12, // 000F SETMBR R2 K23 K18
0x880C0100, // 0010 GETMBR R3 R0 K0
0x900A0003, // 0011 SETMBR R2 K0 R3
0x880C0100, // 0012 GETMBR R3 R0 K0
@@ -882,7 +882,7 @@ be_local_closure(class_Matter_Frame_build_standalone_ack, /* name */
0x900A1803, // 0015 SETMBR R2 K12 R3
0x880C0100, // 0016 GETMBR R3 R0 K0
0x880C0732, // 0017 GETMBR R3 R3 K50
- 0x900A3003, // 0018 SETMBR R2 K24 R3
+ 0x900A3203, // 0018 SETMBR R2 K25 R3
0x880C0125, // 0019 GETMBR R3 R0 K37
0x780E0001, // 001A JMPF R3 #001D
0x580C0012, // 001B LDCONST R3 K18
@@ -939,7 +939,7 @@ be_local_closure(class_Matter_Frame_initiate_response, /* name */
0x90122606, // 000A SETMBR R4 K19 R6
0x88180345, // 000B GETMBR R6 R1 K69
0x90122806, // 000C SETMBR R4 K20 R6
- 0x90122D12, // 000D SETMBR R4 K22 K18
+ 0x90122F12, // 000D SETMBR R4 K23 K18
0x90120001, // 000E SETMBR R4 K0 R1
0x78060008, // 000F JMPF R1 #0019
0x88180332, // 0010 GETMBR R6 R1 K50
@@ -949,13 +949,13 @@ be_local_closure(class_Matter_Frame_initiate_response, /* name */
0x7C180200, // 0014 CALL R6 1
0x90121806, // 0015 SETMBR R4 K12 R6
0x88180332, // 0016 GETMBR R6 R1 K50
- 0x90123006, // 0017 SETMBR R4 K24 R6
+ 0x90123206, // 0017 SETMBR R4 K25 R6
0x70020004, // 0018 JMP #001E
0x88180334, // 0019 GETMBR R6 R1 K52
0x8C180D35, // 001A GETMET R6 R6 K53
0x7C180200, // 001B CALL R6 1
0x90121806, // 001C SETMBR R4 K12 R6
- 0x90123112, // 001D SETMBR R4 K24 K18
+ 0x90123312, // 001D SETMBR R4 K25 K18
0x90124B0B, // 001E SETMBR R4 K37 K11
0x90124C02, // 001F SETMBR R4 K38 R2
0x88180346, // 0020 GETMBR R6 R1 K70
@@ -1013,14 +1013,14 @@ be_local_closure(class_Matter_Frame_decode_payload, /* name */
0x8C0C052C, // 000F GETMET R3 R2 K44
0x54160007, // 0010 LDINT R5 8
0x08140205, // 0011 MUL R5 R1 R5
- 0x00140B17, // 0012 ADD R5 R5 K23
+ 0x00140B18, // 0012 ADD R5 R5 K24
0x5818000B, // 0013 LDCONST R6 K11
0x7C0C0600, // 0014 CALL R3 3
0x90028E03, // 0015 SETMBR R0 K71 R3
0x8C0C052C, // 0016 GETMET R3 R2 K44
0x54160007, // 0017 LDINT R5 8
0x08140205, // 0018 MUL R5 R1 R5
- 0x00140B19, // 0019 ADD R5 R5 K25
+ 0x00140B1A, // 0019 ADD R5 R5 K26
0x5818000B, // 001A LDCONST R6 K11
0x7C0C0600, // 001B CALL R3 3
0x90024603, // 001C SETMBR R0 K35 R3
@@ -1043,8 +1043,8 @@ be_local_closure(class_Matter_Frame_decode_payload, /* name */
0x7C0C0600, // 002D CALL R3 3
0x90024C03, // 002E SETMBR R0 K38 R3
0x8C0C052B, // 002F GETMET R3 R2 K43
- 0x00140319, // 0030 ADD R5 R1 K25
- 0x58180019, // 0031 LDCONST R6 K25
+ 0x0014031A, // 0030 ADD R5 R1 K26
+ 0x5818001A, // 0031 LDCONST R6 K26
0x7C0C0600, // 0032 CALL R3 3
0x90024E03, // 0033 SETMBR R0 K39 R3
0x880C0125, // 0034 GETMBR R3 R0 K37
@@ -1056,7 +1056,7 @@ be_local_closure(class_Matter_Frame_decode_payload, /* name */
0x8C0C052B, // 003A GETMET R3 R2 K43
0x54160003, // 003B LDINT R5 4
0x00140205, // 003C ADD R5 R1 R5
- 0x58180019, // 003D LDCONST R6 K25
+ 0x5818001A, // 003D LDCONST R6 K26
0x7C0C0600, // 003E CALL R3 3
0x90025003, // 003F SETMBR R0 K40 R3
0x540E0005, // 0040 LDINT R3 6
@@ -1065,10 +1065,10 @@ be_local_closure(class_Matter_Frame_decode_payload, /* name */
0x780E0005, // 0043 JMPF R3 #004A
0x8C0C052B, // 0044 GETMET R3 R2 K43
0x5C140200, // 0045 MOVE R5 R1
- 0x58180019, // 0046 LDCONST R6 K25
+ 0x5818001A, // 0046 LDCONST R6 K26
0x7C0C0600, // 0047 CALL R3 3
0x90029003, // 0048 SETMBR R0 K72 R3
- 0x00040319, // 0049 ADD R1 R1 K25
+ 0x0004031A, // 0049 ADD R1 R1 K26
0x880C0124, // 004A GETMBR R3 R0 K36
0x780E0006, // 004B JMPF R3 #0053
0x8C0C052B, // 004C GETMET R3 R2 K43
@@ -1082,9 +1082,9 @@ be_local_closure(class_Matter_Frame_decode_payload, /* name */
0x780E0005, // 0054 JMPF R3 #005B
0x8C0C052B, // 0055 GETMET R3 R2 K43
0x5C140200, // 0056 MOVE R5 R1
- 0x58180019, // 0057 LDCONST R6 K25
+ 0x5818001A, // 0057 LDCONST R6 K26
0x7C0C0600, // 0058 CALL R3 3
- 0x00100719, // 0059 ADD R4 R3 K25
+ 0x0010071A, // 0059 ADD R4 R3 K26
0x00040204, // 005A ADD R1 R1 R4
0x90025401, // 005B SETMBR R0 K42 R1
0x80040000, // 005C RET 1 R0
diff --git a/lib/libesp32/berry_tasmota/src/be_MI32_lib.c b/lib/libesp32/berry_tasmota/src/be_MI32_lib.c
index 5078de941..3babcf3c4 100644
--- a/lib/libesp32/berry_tasmota/src/be_MI32_lib.c
+++ b/lib/libesp32/berry_tasmota/src/be_MI32_lib.c
@@ -1,6 +1,6 @@
/********************************************************************
* Tasmota lib
- *
+ *
* To use: `import MI32`
*******************************************************************/
#include "be_constobj.h"
@@ -25,6 +25,9 @@ BE_FUNC_CTYPE_DECLARE(be_MI32_set_hum, "", "ii");
extern void be_MI32_set_temp(int slot, int temp_val);
BE_FUNC_CTYPE_DECLARE(be_MI32_set_temp, "", "ii");
+extern bbool be_MI32_widget(const char *sbuf, void* function);
+BE_FUNC_CTYPE_DECLARE(be_MI32_widget, "b", "s[c]");
+
#include "be_fixed_MI32.h"
/* @const_object_info_begin
@@ -35,12 +38,13 @@ module MI32 (scope: global) {
set_bat, ctype_func(be_MI32_set_bat)
set_hum, ctype_func(be_MI32_set_hum)
set_temp, ctype_func(be_MI32_set_temp)
+ widget, ctype_func(be_MI32_widget)
}
@const_object_info_end */
/********************************************************************
* Tasmota lib
- *
+ *
* To use: `import BLE`
*******************************************************************/
diff --git a/lib/libesp32/berry_tasmota/src/be_ULP_lib.c b/lib/libesp32/berry_tasmota/src/be_ULP_lib.c
index d133b2241..6e56dffe5 100644
--- a/lib/libesp32/berry_tasmota/src/be_ULP_lib.c
+++ b/lib/libesp32/berry_tasmota/src/be_ULP_lib.c
@@ -6,7 +6,7 @@
#include "be_constobj.h"
#include "be_mapping.h"
-#if defined(USE_BERRY_ULP) && (defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3))
+#if defined(USE_BERRY_ULP) && defined(CONFIG_ULP_COPROC_ENABLED)
extern void be_ULP_run(int32_t entry);
BE_FUNC_CTYPE_DECLARE(be_ULP_run, "", "[i]");
diff --git a/lib/libesp32/berry_tasmota/src/be_i2c_axp192_axp202_lib.c b/lib/libesp32/berry_tasmota/src/be_i2c_axp192_axp202_lib.c
index aec926077..f121b1708 100644
--- a/lib/libesp32/berry_tasmota/src/be_i2c_axp192_axp202_lib.c
+++ b/lib/libesp32/berry_tasmota/src/be_i2c_axp192_axp202_lib.c
@@ -1,5 +1,5 @@
/********************************************************************
- * Tasmota LVGL lv_signal_bars widget
+ * Drivers for AXP192 and AXP202 I2C Solidified
*******************************************************************/
#include "solidify/solidified_i2c_axp192.h"
#include "solidify/solidified_i2c_axp202.h"
diff --git a/lib/libesp32/berry_tasmota/src/be_leds_ntv_lib.c b/lib/libesp32/berry_tasmota/src/be_leds_ntv_lib.c
index 26ff0b69b..11b2712f6 100644
--- a/lib/libesp32/berry_tasmota/src/be_leds_ntv_lib.c
+++ b/lib/libesp32/berry_tasmota/src/be_leds_ntv_lib.c
@@ -7,7 +7,9 @@
#ifdef USE_WS2812
-extern int be_neopixelbus_call_native(bvm *vm);
+#include "TasmotaLED.h"
+
+extern int be_tasmotaled_call_native(bvm *vm);
extern int be_leds_blend_color(bvm *vm);
extern int be_leds_apply_bri_gamma(bvm *vm);
@@ -16,10 +18,15 @@ class be_class_Leds_ntv (scope: global, name: Leds_ntv, strings: weak) {
_p, var
_t, var
- WS2812_GRB, int(1)
- SK6812_GRBW, int(2)
+ WS2812_GRB, int(ws2812_grb)
+ SK6812_GRBW, int(sk6812_grbw)
+ SK6812_GRB, int(sk6812_grb)
- call_native, func(be_neopixelbus_call_native)
+ RMT, int(TasmotaLed_RMT)
+ SPI, int(TasmotaLed_SPI)
+ I2S, int(TasmotaLed_I2S)
+
+ call_native, func(be_tasmotaled_call_native)
blend_color, static_func(be_leds_blend_color)
apply_bri_gamma, static_func(be_leds_apply_bri_gamma)
diff --git a/lib/libesp32/berry_tasmota/src/embedded/autoconf_module.be b/lib/libesp32/berry_tasmota/src/embedded/autoconf_module.be
index 13688c46a..cefd8b7b3 100644
--- a/lib/libesp32/berry_tasmota/src/embedded/autoconf_module.be
+++ b/lib/libesp32/berry_tasmota/src/embedded/autoconf_module.be
@@ -124,7 +124,7 @@ autoconf_module.init = def (m)
# Displays a "Autoconf" button on the configuration page
def web_add_config_button()
import webserver
- webserver.content_send("
")
+ webserver.content_send("
")
end
diff --git a/lib/libesp32/berry_tasmota/src/embedded/i2c_driver.be b/lib/libesp32/berry_tasmota/src/embedded/i2c_driver.be
index 97cd50a3b..540dcc169 100644
--- a/lib/libesp32/berry_tasmota/src/embedded/i2c_driver.be
+++ b/lib/libesp32/berry_tasmota/src/embedded/i2c_driver.be
@@ -56,6 +56,15 @@ class I2C_Driver
def write8(reg, val)
return self.wire.write(self.addr, reg, val, 1)
end
+ #- write register with 16 bits value -#
+ def write16(reg, val)
+ return self.wire.write(self.addr, reg, val, 2)
+ end
+ #- write register with 16 bits value, Little Endian -#
+ def write16LE(reg, val)
+ val = ((val & 0xFF) << 8) | ((val & 0xFF00) >> 8)
+ return self.write16(reg, val)
+ end
# Set or clear a specific bit in a register
# write_bit(reg:int, bit:int, state:bool) -> nil
@@ -94,6 +103,11 @@ class I2C_Driver
var buf = self.wire.read_bytes(self.addr, reg, 2)
return (buf[0] << 8) + buf[1]
end
+ # read 16 bits Little Endian
+ def read16LE(reg)
+ var buf = self.wire.read_bytes(self.addr, reg, 2)
+ return (buf[1] << 8) + buf[0]
+ end
# read 24 bits
def read24(reg)
var buf = self.wire.read_bytes(self.addr, reg, 3)
diff --git a/lib/libesp32/berry_tasmota/src/embedded/leds.be b/lib/libesp32/berry_tasmota/src/embedded/leds.be
index 019a64e3b..7a124fc50 100644
--- a/lib/libesp32/berry_tasmota/src/embedded/leds.be
+++ b/lib/libesp32/berry_tasmota/src/embedded/leds.be
@@ -31,8 +31,8 @@ class Leds : Leds_ntv
# leds:int = number of leds of the strip
# gpio:int (optional) = GPIO for NeoPixel. If not specified, takes the WS2812 gpio
# typ:int (optional) = Type of LED, defaults to WS2812 RGB
- # rmt:int (optional) = RMT hardware channel to use, leave default unless you have a good reason
- def init(leds, gpio_phy, typ, rmt) # rmt is optional
+ # hardware:int (optional) = hardware support (Leds.RMT, Leds.SPI)
+ def init(leds, gpio_phy, typ, hardware)
import gpio
self.gamma = true # gamma is enabled by default, it should be disabled explicitly if needed
if (gpio_phy == nil) || (gpio_phy == gpio.pin(gpio.WS2812, 0))
@@ -47,7 +47,7 @@ class Leds : Leds_ntv
self.bri = 127 # 50% brightness by default
# initialize the structure
- self.ctor(self.leds, gpio_phy, typ, rmt)
+ self.ctor(self.leds, gpio_phy, typ, hardware)
end
if self._p == nil raise "internal_error", "couldn't not initialize noepixelbus" end
@@ -56,44 +56,6 @@ class Leds : Leds_ntv
self.begin()
end
- # assign RMT
- static def assign_rmt(gpio_phy)
- gpio_phy = int(gpio_phy)
- if gpio_phy < 0 raise "value_error", "invalid GPIO number" end
-
- import global
- var rmt
- # if "_rmt" is not initialized, set to an array of GPIO of size MAX_RMT
- if !global.contains("_rmt")
- rmt = []
- global._rmt = rmt
- for i:0..gpio.MAX_RMT-1
- rmt.push(-1)
- end
- # if default WS2812 is set, assign RMT0
- if gpio.pin_used(gpio.WS2812, 0)
- rmt[0] = gpio.pin(gpio.WS2812, 0)
- end
- end
-
- rmt = global._rmt
- # find an already assigned slot or try to assign a new one
- var i = 0
- var first_free = -1
- while i < gpio.MAX_RMT
- var elt = rmt[i]
- if elt == gpio_phy return i end # already assigned
- if elt < 0 && first_free < 0 first_free = i end # found a free slot
- i += 1
- end
- if first_free >= 0
- rmt[first_free] = gpio_phy
- return first_free
- end
- # no more slot
- raise "internal_error", "no more RMT channel available"
- end
-
def clear()
self.clear_to(0x000000)
self.show()
@@ -109,17 +71,14 @@ class Leds : Leds_ntv
return self.bri
end
- def ctor(leds, gpio_phy, typ, rmt)
+ def ctor(leds, gpio_phy, typ, hardware)
if gpio_phy == nil
self.call_native(0) # native driver
else
if typ == nil
typ = self.WS2812_GRB
end
- if rmt == nil
- rmt = self.assign_rmt(gpio_phy)
- end
- self.call_native(0, leds, gpio_phy, typ, rmt)
+ self.call_native(0, leds, gpio_phy, typ, hardware)
end
end
def begin()
@@ -155,9 +114,13 @@ class Leds : Leds_ntv
def pixel_offset()
return 0
end
- def clear_to(col, bri)
+ def clear_to(col, bri, index, len)
if (bri == nil) bri = self.bri end
- self.call_native(9, self.to_gamma(col, bri))
+ if index != nil && len != nil
+ self.call_native(9, self.to_gamma(col, bri), index, len)
+ else
+ self.call_native(9, self.to_gamma(col, bri))
+ end
end
def set_pixel_color(idx, col, bri)
if (bri == nil) bri = self.bri end
@@ -403,15 +366,15 @@ anim()
#-
-var s = Leds_matrix(5, 5, gpio.pin(gpio.WS2812, 1))
+var s = Leds(25, gpio.pin(gpio.WS2812, 1)).create_matrix(5, 5)
s.set_alternate(true)
-s.clear_to(0x300000)
+s.clear_to(0x400000)
s.show()
x = 0
y = 0
def anim()
- s.clear_to(0x300000)
+ s.clear_to(0x400000)
s.set_matrix_pixel_color(x, y, 0x004000)
s.show()
y = (y + 1) % 5
diff --git a/lib/libesp32/berry_tasmota/src/solidify/solidified_autoconf_module.h b/lib/libesp32/berry_tasmota/src/solidify/solidified_autoconf_module.h
index c64fe3823..ef5e1921e 100644
--- a/lib/libesp32/berry_tasmota/src/solidify/solidified_autoconf_module.h
+++ b/lib/libesp32/berry_tasmota/src/solidify/solidified_autoconf_module.h
@@ -121,7 +121,7 @@ static const bvalue be_ktab_class_Autoconf[126] = {
/* K113 */ be_nested_str(CFG_X3A_X20loaded_X20_X27_X25s_X27),
/* K114 */ be_nested_str(files),
/* K115 */ be_nested_str(CFG_X3A_X20exception_X20_X27_X25s_X27_X20_X2D_X20_X27_X25s_X27),
- /* K116 */ be_nested_str(_X3Cp_X3E_X3Cform_X20id_X3Dac_X20action_X3D_X27ac_X27_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20method_X3D_X27get_X27_X3E_X3Cbutton_X3EAuto_X2Dconfiguration_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
+ /* K116 */ be_nested_str(_X3Cp_X3E_X3Cform_X20id_X3Dac_X20action_X3D_X27ac_X27_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20method_X3D_X27get_X27_X3E_X3Cbutton_X3EAuto_X2DConf_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
/* K117 */ be_nested_str(add_driver),
/* K118 */ be_nested_str(CFG_X3A_X20multiple_X20autoconf_X20files_X20found_X2C_X20aborting_X20_X28_X27_X25s_X27_X20_X2B_X20_X27_X25s_X27_X29),
/* K119 */ be_nested_str(CFG_X3A_X20No_X20_X27_X2A_X2Eautoconf_X27_X20file_X20found),
diff --git a/lib/libesp32/berry_tasmota/src/solidify/solidified_i2c_driver.h b/lib/libesp32/berry_tasmota/src/solidify/solidified_i2c_driver.h
index 1c0147425..cc8fcf12b 100644
--- a/lib/libesp32/berry_tasmota/src/solidify/solidified_i2c_driver.h
+++ b/lib/libesp32/berry_tasmota/src/solidify/solidified_i2c_driver.h
@@ -3,81 +3,33 @@
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
-// compact class 'I2C_Driver' ktab size: 19, total: 60 (saved 328 bytes)
-static const bvalue be_ktab_class_I2C_Driver[19] = {
- /* K0 */ be_const_int(0),
- /* K1 */ be_const_int(1),
- /* K2 */ be_nested_str(write8),
- /* K3 */ be_nested_str(read8),
- /* K4 */ be_nested_str(wire),
- /* K5 */ be_nested_str(read_bytes),
- /* K6 */ be_nested_str(addr),
- /* K7 */ be_const_int(2),
- /* K8 */ be_const_int(3),
- /* K9 */ be_nested_str(tasmota),
- /* K10 */ be_nested_str(i2c_enabled),
- /* K11 */ be_nested_str(wire_scan),
- /* K12 */ be_nested_str(function),
- /* K13 */ be_nested_str(name),
- /* K14 */ be_nested_str(I2C_X3A),
- /* K15 */ be_nested_str(detected_X20on_X20bus),
- /* K16 */ be_nested_str(bus),
- /* K17 */ be_nested_str(write),
+// compact class 'I2C_Driver' ktab size: 20, total: 71 (saved 408 bytes)
+static const bvalue be_ktab_class_I2C_Driver[20] = {
+ /* K0 */ be_nested_str(wire),
+ /* K1 */ be_nested_str(read_bytes),
+ /* K2 */ be_nested_str(addr),
+ /* K3 */ be_const_int(0),
+ /* K4 */ be_const_int(1),
+ /* K5 */ be_const_int(2),
+ /* K6 */ be_const_int(3),
+ /* K7 */ be_nested_str(tasmota),
+ /* K8 */ be_nested_str(i2c_enabled),
+ /* K9 */ be_nested_str(wire_scan),
+ /* K10 */ be_nested_str(function),
+ /* K11 */ be_nested_str(name),
+ /* K12 */ be_nested_str(I2C_X3A),
+ /* K13 */ be_nested_str(detected_X20on_X20bus),
+ /* K14 */ be_nested_str(bus),
+ /* K15 */ be_nested_str(write8),
+ /* K16 */ be_nested_str(read8),
+ /* K17 */ be_nested_str(write16),
/* K18 */ be_nested_str(read),
+ /* K19 */ be_nested_str(write),
};
extern const bclass be_class_I2C_Driver;
-/********************************************************************
-** Solidified function: write_bit
-********************************************************************/
-be_local_closure(class_I2C_Driver_write_bit, /* name */
- be_nested_proto(
- 11, /* nstack */
- 4, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_I2C_Driver, /* shared constants */
- &be_const_str_write_bit,
- &be_const_str_solidified,
- ( &(const binstruction[26]) { /* code */
- 0x14100500, // 0000 LT R4 R2 K0
- 0x74120002, // 0001 JMPT R4 #0005
- 0x54120006, // 0002 LDINT R4 7
- 0x24100404, // 0003 GT R4 R2 R4
- 0x78120000, // 0004 JMPF R4 #0006
- 0x80000800, // 0005 RET 0
- 0x38120202, // 0006 SHL R4 K1 R2
- 0x780E0007, // 0007 JMPF R3 #0010
- 0x8C140102, // 0008 GETMET R5 R0 K2
- 0x5C1C0200, // 0009 MOVE R7 R1
- 0x8C200103, // 000A GETMET R8 R0 K3
- 0x5C280200, // 000B MOVE R10 R1
- 0x7C200400, // 000C CALL R8 2
- 0x30201004, // 000D OR R8 R8 R4
- 0x7C140600, // 000E CALL R5 3
- 0x70020008, // 000F JMP #0019
- 0x8C140102, // 0010 GETMET R5 R0 K2
- 0x5C1C0200, // 0011 MOVE R7 R1
- 0x8C200103, // 0012 GETMET R8 R0 K3
- 0x5C280200, // 0013 MOVE R10 R1
- 0x7C200400, // 0014 CALL R8 2
- 0x542600FE, // 0015 LDINT R9 255
- 0x04241204, // 0016 SUB R9 R9 R4
- 0x2C201009, // 0017 AND R8 R8 R9
- 0x7C140600, // 0018 CALL R5 3
- 0x80000000, // 0019 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: read32
********************************************************************/
@@ -95,24 +47,24 @@ be_local_closure(class_I2C_Driver_read32, /* name */
&be_const_str_read32,
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
- 0x88080104, // 0000 GETMBR R2 R0 K4
- 0x8C080505, // 0001 GETMET R2 R2 K5
- 0x88100106, // 0002 GETMBR R4 R0 K6
+ 0x88080100, // 0000 GETMBR R2 R0 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x88100102, // 0002 GETMBR R4 R0 K2
0x5C140200, // 0003 MOVE R5 R1
0x541A0003, // 0004 LDINT R6 4
0x7C080800, // 0005 CALL R2 4
- 0x940C0500, // 0006 GETIDX R3 R2 K0
+ 0x940C0503, // 0006 GETIDX R3 R2 K3
0x54120017, // 0007 LDINT R4 24
0x380C0604, // 0008 SHL R3 R3 R4
- 0x94100501, // 0009 GETIDX R4 R2 K1
+ 0x94100504, // 0009 GETIDX R4 R2 K4
0x5416000F, // 000A LDINT R5 16
0x38100805, // 000B SHL R4 R4 R5
0x000C0604, // 000C ADD R3 R3 R4
- 0x94100507, // 000D GETIDX R4 R2 K7
+ 0x94100505, // 000D GETIDX R4 R2 K5
0x54160007, // 000E LDINT R5 8
0x38100805, // 000F SHL R4 R4 R5
0x000C0604, // 0010 ADD R3 R3 R4
- 0x94100508, // 0011 GETIDX R4 R2 K8
+ 0x94100506, // 0011 GETIDX R4 R2 K6
0x000C0604, // 0012 ADD R3 R3 R4
0x80040600, // 0013 RET 1 R3
})
@@ -121,115 +73,6 @@ be_local_closure(class_I2C_Driver_read32, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: read13
-********************************************************************/
-be_local_closure(class_I2C_Driver_read13, /* name */
- be_nested_proto(
- 7, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_I2C_Driver, /* shared constants */
- &be_const_str_read13,
- &be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0x88080104, // 0000 GETMBR R2 R0 K4
- 0x8C080505, // 0001 GETMET R2 R2 K5
- 0x88100106, // 0002 GETMBR R4 R0 K6
- 0x5C140200, // 0003 MOVE R5 R1
- 0x58180007, // 0004 LDCONST R6 K7
- 0x7C080800, // 0005 CALL R2 4
- 0x940C0500, // 0006 GETIDX R3 R2 K0
- 0x54120004, // 0007 LDINT R4 5
- 0x380C0604, // 0008 SHL R3 R3 R4
- 0x94100501, // 0009 GETIDX R4 R2 K1
- 0x000C0604, // 000A ADD R3 R3 R4
- 0x80040600, // 000B RET 1 R3
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: read24
-********************************************************************/
-be_local_closure(class_I2C_Driver_read24, /* name */
- be_nested_proto(
- 7, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_I2C_Driver, /* shared constants */
- &be_const_str_read24,
- &be_const_str_solidified,
- ( &(const binstruction[16]) { /* code */
- 0x88080104, // 0000 GETMBR R2 R0 K4
- 0x8C080505, // 0001 GETMET R2 R2 K5
- 0x88100106, // 0002 GETMBR R4 R0 K6
- 0x5C140200, // 0003 MOVE R5 R1
- 0x58180008, // 0004 LDCONST R6 K8
- 0x7C080800, // 0005 CALL R2 4
- 0x940C0500, // 0006 GETIDX R3 R2 K0
- 0x5412000F, // 0007 LDINT R4 16
- 0x380C0604, // 0008 SHL R3 R3 R4
- 0x94100501, // 0009 GETIDX R4 R2 K1
- 0x54160007, // 000A LDINT R5 8
- 0x38100805, // 000B SHL R4 R4 R5
- 0x000C0604, // 000C ADD R3 R3 R4
- 0x94100507, // 000D GETIDX R4 R2 K7
- 0x000C0604, // 000E ADD R3 R3 R4
- 0x80040600, // 000F RET 1 R3
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: read14
-********************************************************************/
-be_local_closure(class_I2C_Driver_read14, /* name */
- be_nested_proto(
- 7, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_I2C_Driver, /* shared constants */
- &be_const_str_read14,
- &be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0x88080104, // 0000 GETMBR R2 R0 K4
- 0x8C080505, // 0001 GETMET R2 R2 K5
- 0x88100106, // 0002 GETMBR R4 R0 K6
- 0x5C140200, // 0003 MOVE R5 R1
- 0x58180007, // 0004 LDCONST R6 K7
- 0x7C080800, // 0005 CALL R2 4
- 0x940C0500, // 0006 GETIDX R3 R2 K0
- 0x54120005, // 0007 LDINT R4 6
- 0x380C0604, // 0008 SHL R3 R3 R4
- 0x94100501, // 0009 GETIDX R4 R2 K1
- 0x000C0604, // 000A ADD R3 R3 R4
- 0x80040600, // 000B RET 1 R3
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: init
********************************************************************/
@@ -250,45 +93,45 @@ be_local_closure(class_I2C_Driver_init, /* name */
0x4C100000, // 0000 LDNIL R4
0x20100604, // 0001 NE R4 R3 R4
0x78120005, // 0002 JMPF R4 #0009
- 0xB8121200, // 0003 GETNGBL R4 K9
- 0x8C10090A, // 0004 GETMET R4 R4 K10
+ 0xB8120E00, // 0003 GETNGBL R4 K7
+ 0x8C100908, // 0004 GETMET R4 R4 K8
0x5C180600, // 0005 MOVE R6 R3
0x7C100400, // 0006 CALL R4 2
0x74120000, // 0007 JMPT R4 #0009
0x80000800, // 0008 RET 0
- 0x90020C02, // 0009 SETMBR R0 K6 R2
- 0xB8121200, // 000A GETNGBL R4 K9
- 0x8C10090B, // 000B GETMET R4 R4 K11
- 0x88180106, // 000C GETMBR R6 R0 K6
+ 0x90020402, // 0009 SETMBR R0 K2 R2
+ 0xB8120E00, // 000A GETNGBL R4 K7
+ 0x8C100909, // 000B GETMET R4 R4 K9
+ 0x88180102, // 000C GETMBR R6 R0 K2
0x7C100400, // 000D CALL R4 2
- 0x90020804, // 000E SETMBR R0 K4 R4
- 0x88100104, // 000F GETMBR R4 R0 K4
+ 0x90020004, // 000E SETMBR R0 K0 R4
+ 0x88100100, // 000F GETMBR R4 R0 K0
0x78120019, // 0010 JMPF R4 #002B
0x60100004, // 0011 GETGBL R4 G4
0x5C140200, // 0012 MOVE R5 R1
0x7C100200, // 0013 CALL R4 1
- 0x1C10090C, // 0014 EQ R4 R4 K12
+ 0x1C10090A, // 0014 EQ R4 R4 K10
0x78120004, // 0015 JMPF R4 #001B
0x5C100200, // 0016 MOVE R4 R1
0x5C140000, // 0017 MOVE R5 R0
0x7C100200, // 0018 CALL R4 1
- 0x90021A04, // 0019 SETMBR R0 K13 R4
+ 0x90021604, // 0019 SETMBR R0 K11 R4
0x70020000, // 001A JMP #001C
- 0x90021A01, // 001B SETMBR R0 K13 R1
- 0x8810010D, // 001C GETMBR R4 R0 K13
+ 0x90021601, // 001B SETMBR R0 K11 R1
+ 0x8810010B, // 001C GETMBR R4 R0 K11
0x4C140000, // 001D LDNIL R5
0x1C100805, // 001E EQ R4 R4 R5
0x78120001, // 001F JMPF R4 #0022
0x4C100000, // 0020 LDNIL R4
- 0x90020804, // 0021 SETMBR R0 K4 R4
- 0x88100104, // 0022 GETMBR R4 R0 K4
+ 0x90020004, // 0021 SETMBR R0 K0 R4
+ 0x88100100, // 0022 GETMBR R4 R0 K0
0x78120006, // 0023 JMPF R4 #002B
0x60100001, // 0024 GETGBL R4 G1
- 0x5814000E, // 0025 LDCONST R5 K14
- 0x8818010D, // 0026 GETMBR R6 R0 K13
- 0x581C000F, // 0027 LDCONST R7 K15
- 0x88200104, // 0028 GETMBR R8 R0 K4
- 0x88201110, // 0029 GETMBR R8 R8 K16
+ 0x5814000C, // 0025 LDCONST R5 K12
+ 0x8818010B, // 0026 GETMBR R6 R0 K11
+ 0x581C000D, // 0027 LDCONST R7 K13
+ 0x88200100, // 0028 GETMBR R8 R0 K0
+ 0x8820110E, // 0029 GETMBR R8 R8 K14
0x7C100800, // 002A CALL R4 4
0x80000000, // 002B RET 0
})
@@ -298,11 +141,99 @@ be_local_closure(class_I2C_Driver_init, /* name */
/********************************************************************
-** Solidified function: write8
+** Solidified function: read24
********************************************************************/
-be_local_closure(class_I2C_Driver_write8, /* name */
+be_local_closure(class_I2C_Driver_read24, /* name */
be_nested_proto(
- 9, /* nstack */
+ 7, /* nstack */
+ 2, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_I2C_Driver, /* shared constants */
+ &be_const_str_read24,
+ &be_const_str_solidified,
+ ( &(const binstruction[16]) { /* code */
+ 0x88080100, // 0000 GETMBR R2 R0 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x88100102, // 0002 GETMBR R4 R0 K2
+ 0x5C140200, // 0003 MOVE R5 R1
+ 0x58180006, // 0004 LDCONST R6 K6
+ 0x7C080800, // 0005 CALL R2 4
+ 0x940C0503, // 0006 GETIDX R3 R2 K3
+ 0x5412000F, // 0007 LDINT R4 16
+ 0x380C0604, // 0008 SHL R3 R3 R4
+ 0x94100504, // 0009 GETIDX R4 R2 K4
+ 0x54160007, // 000A LDINT R5 8
+ 0x38100805, // 000B SHL R4 R4 R5
+ 0x000C0604, // 000C ADD R3 R3 R4
+ 0x94100505, // 000D GETIDX R4 R2 K5
+ 0x000C0604, // 000E ADD R3 R3 R4
+ 0x80040600, // 000F RET 1 R3
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: write_bit
+********************************************************************/
+be_local_closure(class_I2C_Driver_write_bit, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 4, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_I2C_Driver, /* shared constants */
+ &be_const_str_write_bit,
+ &be_const_str_solidified,
+ ( &(const binstruction[26]) { /* code */
+ 0x14100503, // 0000 LT R4 R2 K3
+ 0x74120002, // 0001 JMPT R4 #0005
+ 0x54120006, // 0002 LDINT R4 7
+ 0x24100404, // 0003 GT R4 R2 R4
+ 0x78120000, // 0004 JMPF R4 #0006
+ 0x80000800, // 0005 RET 0
+ 0x38120802, // 0006 SHL R4 K4 R2
+ 0x780E0007, // 0007 JMPF R3 #0010
+ 0x8C14010F, // 0008 GETMET R5 R0 K15
+ 0x5C1C0200, // 0009 MOVE R7 R1
+ 0x8C200110, // 000A GETMET R8 R0 K16
+ 0x5C280200, // 000B MOVE R10 R1
+ 0x7C200400, // 000C CALL R8 2
+ 0x30201004, // 000D OR R8 R8 R4
+ 0x7C140600, // 000E CALL R5 3
+ 0x70020008, // 000F JMP #0019
+ 0x8C14010F, // 0010 GETMET R5 R0 K15
+ 0x5C1C0200, // 0011 MOVE R7 R1
+ 0x8C200110, // 0012 GETMET R8 R0 K16
+ 0x5C280200, // 0013 MOVE R10 R1
+ 0x7C200400, // 0014 CALL R8 2
+ 0x542600FE, // 0015 LDINT R9 255
+ 0x04241204, // 0016 SUB R9 R9 R4
+ 0x2C201009, // 0017 AND R8 R8 R9
+ 0x7C140600, // 0018 CALL R5 3
+ 0x80000000, // 0019 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: write16LE
+********************************************************************/
+be_local_closure(class_I2C_Driver_write16LE, /* name */
+ be_nested_proto(
+ 7, /* nstack */
3, /* argc */
10, /* varg */
0, /* has upvals */
@@ -311,17 +242,24 @@ be_local_closure(class_I2C_Driver_write8, /* name */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_I2C_Driver, /* shared constants */
- &be_const_str_write8,
+ &be_const_str_write16LE,
&be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0x880C0104, // 0000 GETMBR R3 R0 K4
- 0x8C0C0711, // 0001 GETMET R3 R3 K17
- 0x88140106, // 0002 GETMBR R5 R0 K6
- 0x5C180200, // 0003 MOVE R6 R1
- 0x5C1C0400, // 0004 MOVE R7 R2
- 0x58200001, // 0005 LDCONST R8 K1
- 0x7C0C0A00, // 0006 CALL R3 5
- 0x80040600, // 0007 RET 1 R3
+ ( &(const binstruction[15]) { /* code */
+ 0x540E00FE, // 0000 LDINT R3 255
+ 0x2C0C0403, // 0001 AND R3 R2 R3
+ 0x54120007, // 0002 LDINT R4 8
+ 0x380C0604, // 0003 SHL R3 R3 R4
+ 0x5412FEFF, // 0004 LDINT R4 65280
+ 0x2C100404, // 0005 AND R4 R2 R4
+ 0x54160007, // 0006 LDINT R5 8
+ 0x3C100805, // 0007 SHR R4 R4 R5
+ 0x300C0604, // 0008 OR R3 R3 R4
+ 0x5C080600, // 0009 MOVE R2 R3
+ 0x8C0C0111, // 000A GETMET R3 R0 K17
+ 0x5C140200, // 000B MOVE R5 R1
+ 0x5C180400, // 000C MOVE R6 R2
+ 0x7C0C0600, // 000D CALL R3 3
+ 0x80040600, // 000E RET 1 R3
})
)
);
@@ -345,11 +283,11 @@ be_local_closure(class_I2C_Driver_read8, /* name */
&be_const_str_read8,
&be_const_str_solidified,
( &(const binstruction[ 7]) { /* code */
- 0x88080104, // 0000 GETMBR R2 R0 K4
+ 0x88080100, // 0000 GETMBR R2 R0 K0
0x8C080512, // 0001 GETMET R2 R2 K18
- 0x88100106, // 0002 GETMBR R4 R0 K6
+ 0x88100102, // 0002 GETMBR R4 R0 K2
0x5C140200, // 0003 MOVE R5 R1
- 0x58180001, // 0004 LDCONST R6 K1
+ 0x58180004, // 0004 LDCONST R6 K4
0x7C080800, // 0005 CALL R2 4
0x80040400, // 0006 RET 1 R2
})
@@ -358,6 +296,76 @@ be_local_closure(class_I2C_Driver_read8, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: read14
+********************************************************************/
+be_local_closure(class_I2C_Driver_read14, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_I2C_Driver, /* shared constants */
+ &be_const_str_read14,
+ &be_const_str_solidified,
+ ( &(const binstruction[12]) { /* code */
+ 0x88080100, // 0000 GETMBR R2 R0 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x88100102, // 0002 GETMBR R4 R0 K2
+ 0x5C140200, // 0003 MOVE R5 R1
+ 0x58180005, // 0004 LDCONST R6 K5
+ 0x7C080800, // 0005 CALL R2 4
+ 0x940C0503, // 0006 GETIDX R3 R2 K3
+ 0x54120005, // 0007 LDINT R4 6
+ 0x380C0604, // 0008 SHL R3 R3 R4
+ 0x94100504, // 0009 GETIDX R4 R2 K4
+ 0x000C0604, // 000A ADD R3 R3 R4
+ 0x80040600, // 000B RET 1 R3
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read16LE
+********************************************************************/
+be_local_closure(class_I2C_Driver_read16LE, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_I2C_Driver, /* shared constants */
+ &be_const_str_read16LE,
+ &be_const_str_solidified,
+ ( &(const binstruction[12]) { /* code */
+ 0x88080100, // 0000 GETMBR R2 R0 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x88100102, // 0002 GETMBR R4 R0 K2
+ 0x5C140200, // 0003 MOVE R5 R1
+ 0x58180005, // 0004 LDCONST R6 K5
+ 0x7C080800, // 0005 CALL R2 4
+ 0x940C0504, // 0006 GETIDX R3 R2 K4
+ 0x54120007, // 0007 LDINT R4 8
+ 0x380C0604, // 0008 SHL R3 R3 R4
+ 0x94100503, // 0009 GETIDX R4 R2 K3
+ 0x000C0604, // 000A ADD R3 R3 R4
+ 0x80040600, // 000B RET 1 R3
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: read12
********************************************************************/
@@ -375,16 +383,82 @@ be_local_closure(class_I2C_Driver_read12, /* name */
&be_const_str_read12,
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
- 0x88080104, // 0000 GETMBR R2 R0 K4
- 0x8C080505, // 0001 GETMET R2 R2 K5
- 0x88100106, // 0002 GETMBR R4 R0 K6
+ 0x88080100, // 0000 GETMBR R2 R0 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x88100102, // 0002 GETMBR R4 R0 K2
0x5C140200, // 0003 MOVE R5 R1
- 0x58180007, // 0004 LDCONST R6 K7
+ 0x58180005, // 0004 LDCONST R6 K5
0x7C080800, // 0005 CALL R2 4
- 0x940C0500, // 0006 GETIDX R3 R2 K0
+ 0x940C0503, // 0006 GETIDX R3 R2 K3
0x54120003, // 0007 LDINT R4 4
0x380C0604, // 0008 SHL R3 R3 R4
- 0x94100501, // 0009 GETIDX R4 R2 K1
+ 0x94100504, // 0009 GETIDX R4 R2 K4
+ 0x000C0604, // 000A ADD R3 R3 R4
+ 0x80040600, // 000B RET 1 R3
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: write8
+********************************************************************/
+be_local_closure(class_I2C_Driver_write8, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 3, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_I2C_Driver, /* shared constants */
+ &be_const_str_write8,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 8]) { /* code */
+ 0x880C0100, // 0000 GETMBR R3 R0 K0
+ 0x8C0C0713, // 0001 GETMET R3 R3 K19
+ 0x88140102, // 0002 GETMBR R5 R0 K2
+ 0x5C180200, // 0003 MOVE R6 R1
+ 0x5C1C0400, // 0004 MOVE R7 R2
+ 0x58200004, // 0005 LDCONST R8 K4
+ 0x7C0C0A00, // 0006 CALL R3 5
+ 0x80040600, // 0007 RET 1 R3
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read13
+********************************************************************/
+be_local_closure(class_I2C_Driver_read13, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_I2C_Driver, /* shared constants */
+ &be_const_str_read13,
+ &be_const_str_solidified,
+ ( &(const binstruction[12]) { /* code */
+ 0x88080100, // 0000 GETMBR R2 R0 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x88100102, // 0002 GETMBR R4 R0 K2
+ 0x5C140200, // 0003 MOVE R5 R1
+ 0x58180005, // 0004 LDCONST R6 K5
+ 0x7C080800, // 0005 CALL R2 4
+ 0x940C0503, // 0006 GETIDX R3 R2 K3
+ 0x54120004, // 0007 LDINT R4 5
+ 0x380C0604, // 0008 SHL R3 R3 R4
+ 0x94100504, // 0009 GETIDX R4 R2 K4
0x000C0604, // 000A ADD R3 R3 R4
0x80040600, // 000B RET 1 R3
})
@@ -410,16 +484,16 @@ be_local_closure(class_I2C_Driver_read16, /* name */
&be_const_str_read16,
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
- 0x88080104, // 0000 GETMBR R2 R0 K4
- 0x8C080505, // 0001 GETMET R2 R2 K5
- 0x88100106, // 0002 GETMBR R4 R0 K6
+ 0x88080100, // 0000 GETMBR R2 R0 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x88100102, // 0002 GETMBR R4 R0 K2
0x5C140200, // 0003 MOVE R5 R1
- 0x58180007, // 0004 LDCONST R6 K7
+ 0x58180005, // 0004 LDCONST R6 K5
0x7C080800, // 0005 CALL R2 4
- 0x940C0500, // 0006 GETIDX R3 R2 K0
+ 0x940C0503, // 0006 GETIDX R3 R2 K3
0x54120007, // 0007 LDINT R4 8
0x380C0604, // 0008 SHL R3 R3 R4
- 0x94100501, // 0009 GETIDX R4 R2 K1
+ 0x94100504, // 0009 GETIDX R4 R2 K4
0x000C0604, // 000A ADD R3 R3 R4
0x80040600, // 000B RET 1 R3
})
@@ -428,27 +502,61 @@ be_local_closure(class_I2C_Driver_read16, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: write16
+********************************************************************/
+be_local_closure(class_I2C_Driver_write16, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 3, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_I2C_Driver, /* shared constants */
+ &be_const_str_write16,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 8]) { /* code */
+ 0x880C0100, // 0000 GETMBR R3 R0 K0
+ 0x8C0C0713, // 0001 GETMET R3 R3 K19
+ 0x88140102, // 0002 GETMBR R5 R0 K2
+ 0x5C180200, // 0003 MOVE R6 R1
+ 0x5C1C0400, // 0004 MOVE R7 R2
+ 0x58200005, // 0005 LDCONST R8 K5
+ 0x7C0C0A00, // 0006 CALL R3 5
+ 0x80040600, // 0007 RET 1 R3
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified class: I2C_Driver
********************************************************************/
be_local_class(I2C_Driver,
3,
NULL,
- be_nested_map(13,
+ be_nested_map(16,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key(write_bit, -1), be_const_closure(class_I2C_Driver_write_bit_closure) },
- { be_const_key(addr, -1), be_const_var(1) },
{ be_const_key(read32, -1), be_const_closure(class_I2C_Driver_read32_closure) },
+ { be_const_key(write16, 15), be_const_closure(class_I2C_Driver_write16_closure) },
+ { be_const_key(addr, -1), be_const_var(1) },
+ { be_const_key(init, 1), be_const_closure(class_I2C_Driver_init_closure) },
+ { be_const_key(write_bit, -1), be_const_closure(class_I2C_Driver_write_bit_closure) },
+ { be_const_key(read14, -1), be_const_closure(class_I2C_Driver_read14_closure) },
+ { be_const_key(name, -1), be_const_var(2) },
+ { be_const_key(read8, -1), be_const_closure(class_I2C_Driver_read8_closure) },
+ { be_const_key(write16LE, 11), be_const_closure(class_I2C_Driver_write16LE_closure) },
+ { be_const_key(read16LE, -1), be_const_closure(class_I2C_Driver_read16LE_closure) },
+ { be_const_key(read12, -1), be_const_closure(class_I2C_Driver_read12_closure) },
+ { be_const_key(wire, 5), be_const_var(0) },
+ { be_const_key(write8, -1), be_const_closure(class_I2C_Driver_write8_closure) },
{ be_const_key(read13, -1), be_const_closure(class_I2C_Driver_read13_closure) },
{ be_const_key(read16, -1), be_const_closure(class_I2C_Driver_read16_closure) },
- { be_const_key(read14, -1), be_const_closure(class_I2C_Driver_read14_closure) },
- { be_const_key(read24, 12), be_const_closure(class_I2C_Driver_read24_closure) },
- { be_const_key(name, 4), be_const_var(2) },
- { be_const_key(write8, -1), be_const_closure(class_I2C_Driver_write8_closure) },
- { be_const_key(wire, 8), be_const_var(0) },
- { be_const_key(read8, -1), be_const_closure(class_I2C_Driver_read8_closure) },
- { be_const_key(read12, -1), be_const_closure(class_I2C_Driver_read12_closure) },
- { be_const_key(init, -1), be_const_closure(class_I2C_Driver_init_closure) },
+ { be_const_key(read24, -1), be_const_closure(class_I2C_Driver_read24_closure) },
})),
(bstring*) &be_const_str_I2C_Driver
);
diff --git a/lib/libesp32/berry_tasmota/src/solidify/solidified_leds.h b/lib/libesp32/berry_tasmota/src/solidify/solidified_leds.h
index 683e7e756..5a493db0e 100644
--- a/lib/libesp32/berry_tasmota/src/solidify/solidified_leds.h
+++ b/lib/libesp32/berry_tasmota/src/solidify/solidified_leds.h
@@ -3,471 +3,9 @@
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
-extern const bclass be_class_Leds_segment;
extern const bclass be_class_Leds;
extern const bclass be_class_Leds_matrix;
-// compact class 'Leds_segment' ktab size: 16, total: 34 (saved 144 bytes)
-static const bvalue be_ktab_class_Leds_segment[16] = {
- /* K0 */ be_nested_str(offset),
- /* K1 */ be_nested_str(bri),
- /* K2 */ be_nested_str(strip),
- /* K3 */ be_nested_str(call_native),
- /* K4 */ be_nested_str(to_gamma),
- /* K5 */ be_nested_str(leds),
- /* K6 */ be_nested_str(dirty),
- /* K7 */ be_nested_str(can_show),
- /* K8 */ be_nested_str(set_pixel_color),
- /* K9 */ be_nested_str(is_dirty),
- /* K10 */ be_nested_str(clear_to),
- /* K11 */ be_const_int(0),
- /* K12 */ be_nested_str(show),
- /* K13 */ be_nested_str(get_pixel_color),
- /* K14 */ be_nested_str(offseta),
- /* K15 */ be_nested_str(pixel_size),
-};
-
-
extern const bclass be_class_Leds_segment;
-
-/********************************************************************
-** Solidified function: pixel_offset
-********************************************************************/
-be_local_closure(class_Leds_segment_pixel_offset, /* name */
- be_nested_proto(
- 2, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_segment, /* shared constants */
- &be_const_str_pixel_offset,
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x80040200, // 0001 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: clear_to
-********************************************************************/
-be_local_closure(class_Leds_segment_clear_to, /* name */
- be_nested_proto(
- 10, /* nstack */
- 3, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_segment, /* shared constants */
- &be_const_str_clear_to,
- &be_const_str_solidified,
- ( &(const binstruction[16]) { /* code */
- 0x4C0C0000, // 0000 LDNIL R3
- 0x1C0C0403, // 0001 EQ R3 R2 R3
- 0x780E0000, // 0002 JMPF R3 #0004
- 0x88080101, // 0003 GETMBR R2 R0 K1
- 0x880C0102, // 0004 GETMBR R3 R0 K2
- 0x8C0C0703, // 0005 GETMET R3 R3 K3
- 0x54160008, // 0006 LDINT R5 9
- 0x88180102, // 0007 GETMBR R6 R0 K2
- 0x8C180D04, // 0008 GETMET R6 R6 K4
- 0x5C200200, // 0009 MOVE R8 R1
- 0x5C240400, // 000A MOVE R9 R2
- 0x7C180600, // 000B CALL R6 3
- 0x881C0100, // 000C GETMBR R7 R0 K0
- 0x88200105, // 000D GETMBR R8 R0 K5
- 0x7C0C0A00, // 000E CALL R3 5
- 0x80000000, // 000F RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: pixel_count
-********************************************************************/
-be_local_closure(class_Leds_segment_pixel_count, /* name */
- be_nested_proto(
- 2, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_segment, /* shared constants */
- &be_const_str_pixel_count,
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x88040105, // 0000 GETMBR R1 R0 K5
- 0x80040200, // 0001 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: pixels_buffer
-********************************************************************/
-be_local_closure(class_Leds_segment_pixels_buffer, /* name */
- be_nested_proto(
- 2, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_segment, /* shared constants */
- &be_const_str_pixels_buffer,
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x4C040000, // 0000 LDNIL R1
- 0x80040200, // 0001 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: dirty
-********************************************************************/
-be_local_closure(class_Leds_segment_dirty, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_segment, /* shared constants */
- &be_const_str_dirty,
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x88040102, // 0000 GETMBR R1 R0 K2
- 0x8C040306, // 0001 GETMET R1 R1 K6
- 0x7C040200, // 0002 CALL R1 1
- 0x80000000, // 0003 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: can_show
-********************************************************************/
-be_local_closure(class_Leds_segment_can_show, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_segment, /* shared constants */
- &be_const_str_can_show,
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x88040102, // 0000 GETMBR R1 R0 K2
- 0x8C040307, // 0001 GETMET R1 R1 K7
- 0x7C040200, // 0002 CALL R1 1
- 0x80040200, // 0003 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_pixel_color
-********************************************************************/
-be_local_closure(class_Leds_segment_set_pixel_color, /* name */
- be_nested_proto(
- 9, /* nstack */
- 4, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_segment, /* shared constants */
- &be_const_str_set_pixel_color,
- &be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0x4C100000, // 0000 LDNIL R4
- 0x1C100604, // 0001 EQ R4 R3 R4
- 0x78120000, // 0002 JMPF R4 #0004
- 0x880C0101, // 0003 GETMBR R3 R0 K1
- 0x88100102, // 0004 GETMBR R4 R0 K2
- 0x8C100908, // 0005 GETMET R4 R4 K8
- 0x88180100, // 0006 GETMBR R6 R0 K0
- 0x00180206, // 0007 ADD R6 R1 R6
- 0x5C1C0400, // 0008 MOVE R7 R2
- 0x5C200600, // 0009 MOVE R8 R3
- 0x7C100800, // 000A CALL R4 4
- 0x80000000, // 000B RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: is_dirty
-********************************************************************/
-be_local_closure(class_Leds_segment_is_dirty, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_segment, /* shared constants */
- &be_const_str_is_dirty,
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x88040102, // 0000 GETMBR R1 R0 K2
- 0x8C040309, // 0001 GETMET R1 R1 K9
- 0x7C040200, // 0002 CALL R1 1
- 0x80040200, // 0003 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: clear
-********************************************************************/
-be_local_closure(class_Leds_segment_clear, /* name */
- be_nested_proto(
- 4, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_segment, /* shared constants */
- &be_const_str_clear,
- &be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x8C04010A, // 0000 GETMET R1 R0 K10
- 0x580C000B, // 0001 LDCONST R3 K11
- 0x7C040400, // 0002 CALL R1 2
- 0x8C04010C, // 0003 GETMET R1 R0 K12
- 0x7C040200, // 0004 CALL R1 1
- 0x80000000, // 0005 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: begin
-********************************************************************/
-be_local_closure(class_Leds_segment_begin, /* name */
- be_nested_proto(
- 1, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_segment, /* shared constants */
- &be_const_str_begin,
- &be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80000000, // 0000 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: get_pixel_color
-********************************************************************/
-be_local_closure(class_Leds_segment_get_pixel_color, /* name */
- be_nested_proto(
- 5, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_segment, /* shared constants */
- &be_const_str_get_pixel_color,
- &be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x88080102, // 0000 GETMBR R2 R0 K2
- 0x8C08050D, // 0001 GETMET R2 R2 K13
- 0x8810010E, // 0002 GETMBR R4 R0 K14
- 0x00100204, // 0003 ADD R4 R1 R4
- 0x7C080400, // 0004 CALL R2 2
- 0x80040400, // 0005 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: pixel_size
-********************************************************************/
-be_local_closure(class_Leds_segment_pixel_size, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_segment, /* shared constants */
- &be_const_str_pixel_size,
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x88040102, // 0000 GETMBR R1 R0 K2
- 0x8C04030F, // 0001 GETMET R1 R1 K15
- 0x7C040200, // 0002 CALL R1 1
- 0x80040200, // 0003 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(class_Leds_segment_init, /* name */
- be_nested_proto(
- 6, /* nstack */
- 4, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_segment, /* shared constants */
- &be_const_str_init,
- &be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
- 0x90020401, // 0000 SETMBR R0 K2 R1
- 0x60100009, // 0001 GETGBL R4 G9
- 0x5C140400, // 0002 MOVE R5 R2
- 0x7C100200, // 0003 CALL R4 1
- 0x90020004, // 0004 SETMBR R0 K0 R4
- 0x60100009, // 0005 GETGBL R4 G9
- 0x5C140600, // 0006 MOVE R5 R3
- 0x7C100200, // 0007 CALL R4 1
- 0x90020A04, // 0008 SETMBR R0 K5 R4
- 0x80000000, // 0009 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: show
-********************************************************************/
-be_local_closure(class_Leds_segment_show, /* name */
- be_nested_proto(
- 4, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds_segment, /* shared constants */
- &be_const_str_show,
- &be_const_str_solidified,
- ( &(const binstruction[16]) { /* code */
- 0x60080017, // 0000 GETGBL R2 G23
- 0x5C0C0200, // 0001 MOVE R3 R1
- 0x7C080200, // 0002 CALL R2 1
- 0x740A0007, // 0003 JMPT R2 #000C
- 0x88080100, // 0004 GETMBR R2 R0 K0
- 0x1C08050B, // 0005 EQ R2 R2 K11
- 0x780A0007, // 0006 JMPF R2 #000F
- 0x88080105, // 0007 GETMBR R2 R0 K5
- 0x880C0102, // 0008 GETMBR R3 R0 K2
- 0x880C0705, // 0009 GETMBR R3 R3 K5
- 0x1C080403, // 000A EQ R2 R2 R3
- 0x780A0002, // 000B JMPF R2 #000F
- 0x88080102, // 000C GETMBR R2 R0 K2
- 0x8C08050C, // 000D GETMET R2 R2 K12
- 0x7C080200, // 000E CALL R2 1
- 0x80000000, // 000F RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified class: Leds_segment
-********************************************************************/
-be_local_class(Leds_segment,
- 3,
- NULL,
- be_nested_map(17,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key(pixel_offset, 9), be_const_closure(class_Leds_segment_pixel_offset_closure) },
- { be_const_key(clear_to, -1), be_const_closure(class_Leds_segment_clear_to_closure) },
- { be_const_key(show, -1), be_const_closure(class_Leds_segment_show_closure) },
- { be_const_key(pixels_buffer, 10), be_const_closure(class_Leds_segment_pixels_buffer_closure) },
- { be_const_key(offset, -1), be_const_var(1) },
- { be_const_key(dirty, -1), be_const_closure(class_Leds_segment_dirty_closure) },
- { be_const_key(can_show, -1), be_const_closure(class_Leds_segment_can_show_closure) },
- { be_const_key(set_pixel_color, 6), be_const_closure(class_Leds_segment_set_pixel_color_closure) },
- { be_const_key(get_pixel_color, -1), be_const_closure(class_Leds_segment_get_pixel_color_closure) },
- { be_const_key(pixel_count, -1), be_const_closure(class_Leds_segment_pixel_count_closure) },
- { be_const_key(strip, 7), be_const_var(0) },
- { be_const_key(leds, -1), be_const_var(2) },
- { be_const_key(begin, -1), be_const_closure(class_Leds_segment_begin_closure) },
- { be_const_key(is_dirty, 8), be_const_closure(class_Leds_segment_is_dirty_closure) },
- { be_const_key(pixel_size, -1), be_const_closure(class_Leds_segment_pixel_size_closure) },
- { be_const_key(init, -1), be_const_closure(class_Leds_segment_init_closure) },
- { be_const_key(clear, 2), be_const_closure(class_Leds_segment_clear_closure) },
- })),
- (bstring*) &be_const_str_Leds_segment
-);
// compact class 'Leds_matrix' ktab size: 24, total: 62 (saved 304 bytes)
static const bvalue be_ktab_class_Leds_matrix[24] = {
/* K0 */ be_nested_str(strip),
@@ -1111,140 +649,35 @@ be_local_class(Leds_matrix,
})),
(bstring*) &be_const_str_Leds_matrix
);
-// compact class 'Leds' ktab size: 43, total: 83 (saved 320 bytes)
-static const bvalue be_ktab_class_Leds[43] = {
- /* K0 */ be_nested_str(leds),
- /* K1 */ be_const_int(0),
- /* K2 */ be_nested_str(value_error),
- /* K3 */ be_nested_str(out_X20of_X20range),
- /* K4 */ be_const_class(be_class_Leds_segment),
- /* K5 */ be_nested_str(bri),
- /* K6 */ be_nested_str(call_native),
- /* K7 */ be_const_int(1),
- /* K8 */ be_nested_str(clear_to),
- /* K9 */ be_nested_str(show),
- /* K10 */ be_nested_str(gpio),
- /* K11 */ be_nested_str(gamma),
- /* K12 */ be_nested_str(pin),
- /* K13 */ be_nested_str(WS2812),
- /* K14 */ be_nested_str(ctor),
- /* K15 */ be_nested_str(pixel_count),
- /* K16 */ be_nested_str(light),
- /* K17 */ be_nested_str(get),
- /* K18 */ be_nested_str(_p),
- /* K19 */ be_nested_str(internal_error),
- /* K20 */ be_nested_str(couldn_X27t_X20not_X20initialize_X20noepixelbus),
- /* K21 */ be_nested_str(begin),
- /* K22 */ be_nested_str(apply_bri_gamma),
- /* K23 */ be_const_int(2),
- /* K24 */ be_const_class(be_class_Leds),
- /* K25 */ be_nested_str(Leds),
- /* K26 */ be_nested_str(create_matrix),
- /* K27 */ be_nested_str(to_gamma),
- /* K28 */ be_const_class(be_class_Leds_matrix),
- /* K29 */ be_const_int(3),
- /* K30 */ be_nested_str(invalid_X20GPIO_X20number),
- /* K31 */ be_nested_str(global),
- /* K32 */ be_nested_str(contains),
- /* K33 */ be_nested_str(_rmt),
- /* K34 */ be_nested_str(MAX_RMT),
- /* K35 */ be_nested_str(push),
- /* K36 */ be_nested_str(stop_iteration),
- /* K37 */ be_nested_str(pin_used),
- /* K38 */ be_nested_str(no_X20more_X20RMT_X20channel_X20available),
- /* K39 */ be_nested_str(WS2812_GRB),
- /* K40 */ be_nested_str(assign_rmt),
- /* K41 */ be_nested_str(pixel_size),
- /* K42 */ be_nested_str(_change_buffer),
+// compact class 'Leds_segment' ktab size: 16, total: 34 (saved 144 bytes)
+static const bvalue be_ktab_class_Leds_segment[16] = {
+ /* K0 */ be_nested_str(offset),
+ /* K1 */ be_nested_str(bri),
+ /* K2 */ be_nested_str(strip),
+ /* K3 */ be_nested_str(call_native),
+ /* K4 */ be_nested_str(to_gamma),
+ /* K5 */ be_nested_str(leds),
+ /* K6 */ be_nested_str(dirty),
+ /* K7 */ be_nested_str(can_show),
+ /* K8 */ be_nested_str(set_pixel_color),
+ /* K9 */ be_nested_str(is_dirty),
+ /* K10 */ be_nested_str(clear_to),
+ /* K11 */ be_const_int(0),
+ /* K12 */ be_nested_str(show),
+ /* K13 */ be_nested_str(get_pixel_color),
+ /* K14 */ be_nested_str(offseta),
+ /* K15 */ be_nested_str(pixel_size),
};
-extern const bclass be_class_Leds;
+extern const bclass be_class_Leds_segment;
/********************************************************************
-** Solidified function: create_segment
+** Solidified function: pixel_offset
********************************************************************/
-be_local_closure(class_Leds_create_segment, /* name */
+be_local_closure(class_Leds_segment_pixel_offset, /* name */
be_nested_proto(
- 8, /* nstack */
- 3, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds, /* shared constants */
- &be_const_str_create_segment,
- &be_const_str_solidified,
- ( &(const binstruction[23]) { /* code */
- 0x600C0009, // 0000 GETGBL R3 G9
- 0x5C100200, // 0001 MOVE R4 R1
- 0x7C0C0200, // 0002 CALL R3 1
- 0x60100009, // 0003 GETGBL R4 G9
- 0x5C140400, // 0004 MOVE R5 R2
- 0x7C100200, // 0005 CALL R4 1
- 0x000C0604, // 0006 ADD R3 R3 R4
- 0x88100100, // 0007 GETMBR R4 R0 K0
- 0x240C0604, // 0008 GT R3 R3 R4
- 0x740E0003, // 0009 JMPT R3 #000E
- 0x140C0301, // 000A LT R3 R1 K1
- 0x740E0001, // 000B JMPT R3 #000E
- 0x140C0501, // 000C LT R3 R2 K1
- 0x780E0000, // 000D JMPF R3 #000F
- 0xB0060503, // 000E RAISE 1 K2 K3
- 0x580C0004, // 000F LDCONST R3 K4
- 0xB4000004, // 0010 CLASS K4
- 0x5C100600, // 0011 MOVE R4 R3
- 0x5C140000, // 0012 MOVE R5 R0
- 0x5C180200, // 0013 MOVE R6 R1
- 0x5C1C0400, // 0014 MOVE R7 R2
- 0x7C100600, // 0015 CALL R4 3
- 0x80040800, // 0016 RET 1 R4
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_bri
-********************************************************************/
-be_local_closure(class_Leds_set_bri, /* name */
- be_nested_proto(
- 3, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds, /* shared constants */
- &be_const_str_set_bri,
- &be_const_str_solidified,
- ( &(const binstruction[ 9]) { /* code */
- 0x14080301, // 0000 LT R2 R1 K1
- 0x780A0000, // 0001 JMPF R2 #0003
- 0x58040001, // 0002 LDCONST R1 K1
- 0x540A00FE, // 0003 LDINT R2 255
- 0x24080202, // 0004 GT R2 R1 R2
- 0x780A0000, // 0005 JMPF R2 #0007
- 0x540600FE, // 0006 LDINT R1 255
- 0x90020A01, // 0007 SETMBR R0 K5 R1
- 0x80000000, // 0008 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: begin
-********************************************************************/
-be_local_closure(class_Leds_begin, /* name */
- be_nested_proto(
- 4, /* nstack */
+ 2, /* nstack */
1, /* argc */
10, /* varg */
0, /* has upvals */
@@ -1252,14 +685,12 @@ be_local_closure(class_Leds_begin, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- &be_ktab_class_Leds, /* shared constants */
- &be_const_str_begin,
+ &be_ktab_class_Leds_segment, /* shared constants */
+ &be_const_str_pixel_offset,
&be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x8C040106, // 0000 GETMET R1 R0 K6
- 0x580C0007, // 0001 LDCONST R3 K7
- 0x7C040400, // 0002 CALL R1 2
- 0x80000000, // 0003 RET 0
+ ( &(const binstruction[ 2]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x80040200, // 0001 RET 1 R1
})
)
);
@@ -1267,106 +698,11 @@ be_local_closure(class_Leds_begin, /* name */
/********************************************************************
-** Solidified function: clear
+** Solidified function: clear_to
********************************************************************/
-be_local_closure(class_Leds_clear, /* name */
+be_local_closure(class_Leds_segment_clear_to, /* name */
be_nested_proto(
- 4, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds, /* shared constants */
- &be_const_str_clear,
- &be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x8C040108, // 0000 GETMET R1 R0 K8
- 0x580C0001, // 0001 LDCONST R3 K1
- 0x7C040400, // 0002 CALL R1 2
- 0x8C040109, // 0003 GETMET R1 R0 K9
- 0x7C040200, // 0004 CALL R1 1
- 0x80000000, // 0005 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(class_Leds_init, /* name */
- be_nested_proto(
- 12, /* nstack */
- 5, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds, /* shared constants */
- &be_const_str_init,
- &be_const_str_solidified,
- ( &(const binstruction[43]) { /* code */
- 0xA4161400, // 0000 IMPORT R5 K10
- 0x50180200, // 0001 LDBOOL R6 1 0
- 0x90021606, // 0002 SETMBR R0 K11 R6
- 0x4C180000, // 0003 LDNIL R6
- 0x1C180406, // 0004 EQ R6 R2 R6
- 0x741A0005, // 0005 JMPT R6 #000C
- 0x8C180B0C, // 0006 GETMET R6 R5 K12
- 0x88200B0D, // 0007 GETMBR R8 R5 K13
- 0x58240001, // 0008 LDCONST R9 K1
- 0x7C180600, // 0009 CALL R6 3
- 0x1C180406, // 000A EQ R6 R2 R6
- 0x781A000A, // 000B JMPF R6 #0017
- 0x8C18010E, // 000C GETMET R6 R0 K14
- 0x7C180200, // 000D CALL R6 1
- 0x8C18010F, // 000E GETMET R6 R0 K15
- 0x7C180200, // 000F CALL R6 1
- 0x90020006, // 0010 SETMBR R0 K0 R6
- 0xA41A2000, // 0011 IMPORT R6 K16
- 0x8C1C0D11, // 0012 GETMET R7 R6 K17
- 0x7C1C0200, // 0013 CALL R7 1
- 0x941C0F05, // 0014 GETIDX R7 R7 K5
- 0x90020A07, // 0015 SETMBR R0 K5 R7
- 0x7002000B, // 0016 JMP #0023
- 0x60180009, // 0017 GETGBL R6 G9
- 0x5C1C0200, // 0018 MOVE R7 R1
- 0x7C180200, // 0019 CALL R6 1
- 0x90020006, // 001A SETMBR R0 K0 R6
- 0x541A007E, // 001B LDINT R6 127
- 0x90020A06, // 001C SETMBR R0 K5 R6
- 0x8C18010E, // 001D GETMET R6 R0 K14
- 0x88200100, // 001E GETMBR R8 R0 K0
- 0x5C240400, // 001F MOVE R9 R2
- 0x5C280600, // 0020 MOVE R10 R3
- 0x5C2C0800, // 0021 MOVE R11 R4
- 0x7C180A00, // 0022 CALL R6 5
- 0x88180112, // 0023 GETMBR R6 R0 K18
- 0x4C1C0000, // 0024 LDNIL R7
- 0x1C180C07, // 0025 EQ R6 R6 R7
- 0x781A0000, // 0026 JMPF R6 #0028
- 0xB0062714, // 0027 RAISE 1 K19 K20
- 0x8C180115, // 0028 GETMET R6 R0 K21
- 0x7C180200, // 0029 CALL R6 1
- 0x80000000, // 002A RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: to_gamma
-********************************************************************/
-be_local_closure(class_Leds_to_gamma, /* name */
- be_nested_proto(
- 8, /* nstack */
+ 10, /* nstack */
3, /* argc */
10, /* varg */
0, /* has upvals */
@@ -1374,47 +710,26 @@ be_local_closure(class_Leds_to_gamma, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- &be_ktab_class_Leds, /* shared constants */
- &be_const_str_to_gamma,
+ &be_ktab_class_Leds_segment, /* shared constants */
+ &be_const_str_clear_to,
&be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
+ ( &(const binstruction[16]) { /* code */
0x4C0C0000, // 0000 LDNIL R3
0x1C0C0403, // 0001 EQ R3 R2 R3
0x780E0000, // 0002 JMPF R3 #0004
- 0x88080105, // 0003 GETMBR R2 R0 K5
- 0x8C0C0116, // 0004 GETMET R3 R0 K22
- 0x5C140200, // 0005 MOVE R5 R1
- 0x5C180400, // 0006 MOVE R6 R2
- 0x881C010B, // 0007 GETMBR R7 R0 K11
- 0x7C0C0800, // 0008 CALL R3 4
- 0x80040600, // 0009 RET 1 R3
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: show
-********************************************************************/
-be_local_closure(class_Leds_show, /* name */
- be_nested_proto(
- 4, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds, /* shared constants */
- &be_const_str_show,
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x8C040106, // 0000 GETMET R1 R0 K6
- 0x580C0017, // 0001 LDCONST R3 K23
- 0x7C040400, // 0002 CALL R1 2
- 0x80000000, // 0003 RET 0
+ 0x88080101, // 0003 GETMBR R2 R0 K1
+ 0x880C0102, // 0004 GETMBR R3 R0 K2
+ 0x8C0C0703, // 0005 GETMET R3 R3 K3
+ 0x54160008, // 0006 LDINT R5 9
+ 0x88180102, // 0007 GETMBR R6 R0 K2
+ 0x8C180D04, // 0008 GETMET R6 R6 K4
+ 0x5C200200, // 0009 MOVE R8 R1
+ 0x5C240400, // 000A MOVE R9 R2
+ 0x7C180600, // 000B CALL R6 3
+ 0x881C0100, // 000C GETMBR R7 R0 K0
+ 0x88200105, // 000D GETMBR R8 R0 K5
+ 0x7C0C0A00, // 000E CALL R3 5
+ 0x80000000, // 000F RET 0
})
)
);
@@ -1424,7 +739,422 @@ be_local_closure(class_Leds_show, /* name */
/********************************************************************
** Solidified function: pixel_count
********************************************************************/
-be_local_closure(class_Leds_pixel_count, /* name */
+be_local_closure(class_Leds_segment_pixel_count, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds_segment, /* shared constants */
+ &be_const_str_pixel_count,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x88040105, // 0000 GETMBR R1 R0 K5
+ 0x80040200, // 0001 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: pixels_buffer
+********************************************************************/
+be_local_closure(class_Leds_segment_pixels_buffer, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds_segment, /* shared constants */
+ &be_const_str_pixels_buffer,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x4C040000, // 0000 LDNIL R1
+ 0x80040200, // 0001 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: dirty
+********************************************************************/
+be_local_closure(class_Leds_segment_dirty, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds_segment, /* shared constants */
+ &be_const_str_dirty,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x88040102, // 0000 GETMBR R1 R0 K2
+ 0x8C040306, // 0001 GETMET R1 R1 K6
+ 0x7C040200, // 0002 CALL R1 1
+ 0x80000000, // 0003 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: can_show
+********************************************************************/
+be_local_closure(class_Leds_segment_can_show, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds_segment, /* shared constants */
+ &be_const_str_can_show,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x88040102, // 0000 GETMBR R1 R0 K2
+ 0x8C040307, // 0001 GETMET R1 R1 K7
+ 0x7C040200, // 0002 CALL R1 1
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: set_pixel_color
+********************************************************************/
+be_local_closure(class_Leds_segment_set_pixel_color, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 4, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds_segment, /* shared constants */
+ &be_const_str_set_pixel_color,
+ &be_const_str_solidified,
+ ( &(const binstruction[12]) { /* code */
+ 0x4C100000, // 0000 LDNIL R4
+ 0x1C100604, // 0001 EQ R4 R3 R4
+ 0x78120000, // 0002 JMPF R4 #0004
+ 0x880C0101, // 0003 GETMBR R3 R0 K1
+ 0x88100102, // 0004 GETMBR R4 R0 K2
+ 0x8C100908, // 0005 GETMET R4 R4 K8
+ 0x88180100, // 0006 GETMBR R6 R0 K0
+ 0x00180206, // 0007 ADD R6 R1 R6
+ 0x5C1C0400, // 0008 MOVE R7 R2
+ 0x5C200600, // 0009 MOVE R8 R3
+ 0x7C100800, // 000A CALL R4 4
+ 0x80000000, // 000B RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: is_dirty
+********************************************************************/
+be_local_closure(class_Leds_segment_is_dirty, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds_segment, /* shared constants */
+ &be_const_str_is_dirty,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x88040102, // 0000 GETMBR R1 R0 K2
+ 0x8C040309, // 0001 GETMET R1 R1 K9
+ 0x7C040200, // 0002 CALL R1 1
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: clear
+********************************************************************/
+be_local_closure(class_Leds_segment_clear, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds_segment, /* shared constants */
+ &be_const_str_clear,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 6]) { /* code */
+ 0x8C04010A, // 0000 GETMET R1 R0 K10
+ 0x580C000B, // 0001 LDCONST R3 K11
+ 0x7C040400, // 0002 CALL R1 2
+ 0x8C04010C, // 0003 GETMET R1 R0 K12
+ 0x7C040200, // 0004 CALL R1 1
+ 0x80000000, // 0005 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: begin
+********************************************************************/
+be_local_closure(class_Leds_segment_begin, /* name */
+ be_nested_proto(
+ 1, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds_segment, /* shared constants */
+ &be_const_str_begin,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 1]) { /* code */
+ 0x80000000, // 0000 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_pixel_color
+********************************************************************/
+be_local_closure(class_Leds_segment_get_pixel_color, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 2, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds_segment, /* shared constants */
+ &be_const_str_get_pixel_color,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 6]) { /* code */
+ 0x88080102, // 0000 GETMBR R2 R0 K2
+ 0x8C08050D, // 0001 GETMET R2 R2 K13
+ 0x8810010E, // 0002 GETMBR R4 R0 K14
+ 0x00100204, // 0003 ADD R4 R1 R4
+ 0x7C080400, // 0004 CALL R2 2
+ 0x80040400, // 0005 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: pixel_size
+********************************************************************/
+be_local_closure(class_Leds_segment_pixel_size, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds_segment, /* shared constants */
+ &be_const_str_pixel_size,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x88040102, // 0000 GETMBR R1 R0 K2
+ 0x8C04030F, // 0001 GETMET R1 R1 K15
+ 0x7C040200, // 0002 CALL R1 1
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(class_Leds_segment_init, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 4, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds_segment, /* shared constants */
+ &be_const_str_init,
+ &be_const_str_solidified,
+ ( &(const binstruction[10]) { /* code */
+ 0x90020401, // 0000 SETMBR R0 K2 R1
+ 0x60100009, // 0001 GETGBL R4 G9
+ 0x5C140400, // 0002 MOVE R5 R2
+ 0x7C100200, // 0003 CALL R4 1
+ 0x90020004, // 0004 SETMBR R0 K0 R4
+ 0x60100009, // 0005 GETGBL R4 G9
+ 0x5C140600, // 0006 MOVE R5 R3
+ 0x7C100200, // 0007 CALL R4 1
+ 0x90020A04, // 0008 SETMBR R0 K5 R4
+ 0x80000000, // 0009 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: show
+********************************************************************/
+be_local_closure(class_Leds_segment_show, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 2, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds_segment, /* shared constants */
+ &be_const_str_show,
+ &be_const_str_solidified,
+ ( &(const binstruction[16]) { /* code */
+ 0x60080017, // 0000 GETGBL R2 G23
+ 0x5C0C0200, // 0001 MOVE R3 R1
+ 0x7C080200, // 0002 CALL R2 1
+ 0x740A0007, // 0003 JMPT R2 #000C
+ 0x88080100, // 0004 GETMBR R2 R0 K0
+ 0x1C08050B, // 0005 EQ R2 R2 K11
+ 0x780A0007, // 0006 JMPF R2 #000F
+ 0x88080105, // 0007 GETMBR R2 R0 K5
+ 0x880C0102, // 0008 GETMBR R3 R0 K2
+ 0x880C0705, // 0009 GETMBR R3 R3 K5
+ 0x1C080403, // 000A EQ R2 R2 R3
+ 0x780A0002, // 000B JMPF R2 #000F
+ 0x88080102, // 000C GETMBR R2 R0 K2
+ 0x8C08050C, // 000D GETMET R2 R2 K12
+ 0x7C080200, // 000E CALL R2 1
+ 0x80000000, // 000F RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified class: Leds_segment
+********************************************************************/
+be_local_class(Leds_segment,
+ 3,
+ NULL,
+ be_nested_map(17,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key(pixel_offset, 9), be_const_closure(class_Leds_segment_pixel_offset_closure) },
+ { be_const_key(clear_to, -1), be_const_closure(class_Leds_segment_clear_to_closure) },
+ { be_const_key(show, -1), be_const_closure(class_Leds_segment_show_closure) },
+ { be_const_key(pixels_buffer, 10), be_const_closure(class_Leds_segment_pixels_buffer_closure) },
+ { be_const_key(offset, -1), be_const_var(1) },
+ { be_const_key(dirty, -1), be_const_closure(class_Leds_segment_dirty_closure) },
+ { be_const_key(can_show, -1), be_const_closure(class_Leds_segment_can_show_closure) },
+ { be_const_key(set_pixel_color, 6), be_const_closure(class_Leds_segment_set_pixel_color_closure) },
+ { be_const_key(get_pixel_color, -1), be_const_closure(class_Leds_segment_get_pixel_color_closure) },
+ { be_const_key(pixel_count, -1), be_const_closure(class_Leds_segment_pixel_count_closure) },
+ { be_const_key(strip, 7), be_const_var(0) },
+ { be_const_key(leds, -1), be_const_var(2) },
+ { be_const_key(begin, -1), be_const_closure(class_Leds_segment_begin_closure) },
+ { be_const_key(is_dirty, 8), be_const_closure(class_Leds_segment_is_dirty_closure) },
+ { be_const_key(pixel_size, -1), be_const_closure(class_Leds_segment_pixel_size_closure) },
+ { be_const_key(init, -1), be_const_closure(class_Leds_segment_init_closure) },
+ { be_const_key(clear, 2), be_const_closure(class_Leds_segment_clear_closure) },
+ })),
+ (bstring*) &be_const_str_Leds_segment
+);
+// compact class 'Leds' ktab size: 33, total: 65 (saved 256 bytes)
+static const bvalue be_ktab_class_Leds[33] = {
+ /* K0 */ be_nested_str(call_native),
+ /* K1 */ be_nested_str(bri),
+ /* K2 */ be_const_class(be_class_Leds),
+ /* K3 */ be_nested_str(Leds),
+ /* K4 */ be_nested_str(create_matrix),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_const_int(3),
+ /* K7 */ be_nested_str(gamma),
+ /* K8 */ be_const_int(2),
+ /* K9 */ be_nested_str(WS2812_GRB),
+ /* K10 */ be_nested_str(leds),
+ /* K11 */ be_nested_str(value_error),
+ /* K12 */ be_nested_str(out_X20of_X20range),
+ /* K13 */ be_const_class(be_class_Leds_matrix),
+ /* K14 */ be_nested_str(to_gamma),
+ /* K15 */ be_const_class(be_class_Leds_segment),
+ /* K16 */ be_nested_str(gpio),
+ /* K17 */ be_nested_str(pin),
+ /* K18 */ be_nested_str(WS2812),
+ /* K19 */ be_nested_str(ctor),
+ /* K20 */ be_nested_str(pixel_count),
+ /* K21 */ be_nested_str(light),
+ /* K22 */ be_nested_str(get),
+ /* K23 */ be_nested_str(_p),
+ /* K24 */ be_nested_str(internal_error),
+ /* K25 */ be_nested_str(couldn_X27t_X20not_X20initialize_X20noepixelbus),
+ /* K26 */ be_nested_str(begin),
+ /* K27 */ be_nested_str(clear_to),
+ /* K28 */ be_nested_str(show),
+ /* K29 */ be_const_int(1),
+ /* K30 */ be_nested_str(apply_bri_gamma),
+ /* K31 */ be_nested_str(pixel_size),
+ /* K32 */ be_nested_str(_change_buffer),
+};
+
+
+extern const bclass be_class_Leds;
+
+/********************************************************************
+** Solidified function: is_dirty
+********************************************************************/
+be_local_closure(class_Leds_is_dirty, /* name */
be_nested_proto(
4, /* nstack */
1, /* argc */
@@ -1435,11 +1165,11 @@ be_local_closure(class_Leds_pixel_count, /* name */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_Leds, /* shared constants */
- &be_const_str_pixel_count,
+ &be_const_str_is_dirty,
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
- 0x8C040106, // 0000 GETMET R1 R0 K6
- 0x540E0007, // 0001 LDINT R3 8
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x540E0003, // 0001 LDINT R3 4
0x7C040400, // 0002 CALL R1 2
0x80040200, // 0003 RET 1 R1
})
@@ -1465,7 +1195,7 @@ be_local_closure(class_Leds_get_bri, /* name */
&be_const_str_get_bri,
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
- 0x88040105, // 0000 GETMBR R1 R0 K5
+ 0x88040101, // 0000 GETMBR R1 R0 K1
0x80040200, // 0001 RET 1 R1
})
)
@@ -1473,6 +1203,100 @@ be_local_closure(class_Leds_get_bri, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: matrix
+********************************************************************/
+be_local_closure(class_Leds_matrix, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 4, /* argc */
+ 12, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds, /* shared constants */
+ &be_const_str_matrix,
+ &be_const_str_solidified,
+ ( &(const binstruction[12]) { /* code */
+ 0x58100002, // 0000 LDCONST R4 K2
+ 0xB8160600, // 0001 GETNGBL R5 K3
+ 0x08180001, // 0002 MUL R6 R0 R1
+ 0x5C1C0400, // 0003 MOVE R7 R2
+ 0x5C200600, // 0004 MOVE R8 R3
+ 0x7C140600, // 0005 CALL R5 3
+ 0x8C180B04, // 0006 GETMET R6 R5 K4
+ 0x5C200000, // 0007 MOVE R8 R0
+ 0x5C240200, // 0008 MOVE R9 R1
+ 0x58280005, // 0009 LDCONST R10 K5
+ 0x7C180800, // 000A CALL R6 4
+ 0x80040C00, // 000B RET 1 R6
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: can_show
+********************************************************************/
+be_local_closure(class_Leds_can_show, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds, /* shared constants */
+ &be_const_str_can_show,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x580C0006, // 0001 LDCONST R3 K6
+ 0x7C040400, // 0002 CALL R1 2
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: set_bri
+********************************************************************/
+be_local_closure(class_Leds_set_bri, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 2, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds, /* shared constants */
+ &be_const_str_set_bri,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 9]) { /* code */
+ 0x14080305, // 0000 LT R2 R1 K5
+ 0x780A0000, // 0001 JMPF R2 #0003
+ 0x58040005, // 0002 LDCONST R1 K5
+ 0x540A00FE, // 0003 LDINT R2 255
+ 0x24080202, // 0004 GT R2 R1 R2
+ 0x780A0000, // 0005 JMPF R2 #0007
+ 0x540600FE, // 0006 LDINT R1 255
+ 0x90020201, // 0007 SETMBR R0 K1 R1
+ 0x80000000, // 0008 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: set_gamma
********************************************************************/
@@ -1493,7 +1317,7 @@ be_local_closure(class_Leds_set_gamma, /* name */
0x60080017, // 0000 GETGBL R2 G23
0x5C0C0200, // 0001 MOVE R3 R1
0x7C080200, // 0002 CALL R2 1
- 0x90021602, // 0003 SETMBR R0 K11 R2
+ 0x90020E02, // 0003 SETMBR R0 K7 R2
0x80000000, // 0004 RET 0
})
)
@@ -1502,37 +1326,9 @@ be_local_closure(class_Leds_set_gamma, /* name */
/********************************************************************
-** Solidified function: get_pixel_color
+** Solidified function: show
********************************************************************/
-be_local_closure(class_Leds_get_pixel_color, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds, /* shared constants */
- &be_const_str_get_pixel_color,
- &be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x8C080106, // 0000 GETMET R2 R0 K6
- 0x5412000A, // 0001 LDINT R4 11
- 0x5C140200, // 0002 MOVE R5 R1
- 0x7C080600, // 0003 CALL R2 3
- 0x80040400, // 0004 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: dirty
-********************************************************************/
-be_local_closure(class_Leds_dirty, /* name */
+be_local_closure(class_Leds_show, /* name */
be_nested_proto(
4, /* nstack */
1, /* argc */
@@ -1543,11 +1339,11 @@ be_local_closure(class_Leds_dirty, /* name */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_Leds, /* shared constants */
- &be_const_str_dirty,
+ &be_const_str_show,
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
- 0x8C040106, // 0000 GETMET R1 R0 K6
- 0x540E0004, // 0001 LDINT R3 5
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x580C0008, // 0001 LDCONST R3 K8
0x7C040400, // 0002 CALL R1 2
0x80000000, // 0003 RET 0
})
@@ -1557,106 +1353,12 @@ be_local_closure(class_Leds_dirty, /* name */
/********************************************************************
-** Solidified function: matrix
+** Solidified function: ctor
********************************************************************/
-be_local_closure(class_Leds_matrix, /* name */
- be_nested_proto(
- 11, /* nstack */
- 4, /* argc */
- 12, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds, /* shared constants */
- &be_const_str_matrix,
- &be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0x58100018, // 0000 LDCONST R4 K24
- 0xB8163200, // 0001 GETNGBL R5 K25
- 0x08180001, // 0002 MUL R6 R0 R1
- 0x5C1C0400, // 0003 MOVE R7 R2
- 0x5C200600, // 0004 MOVE R8 R3
- 0x7C140600, // 0005 CALL R5 3
- 0x8C180B1A, // 0006 GETMET R6 R5 K26
- 0x5C200000, // 0007 MOVE R8 R0
- 0x5C240200, // 0008 MOVE R9 R1
- 0x58280001, // 0009 LDCONST R10 K1
- 0x7C180800, // 000A CALL R6 4
- 0x80040C00, // 000B RET 1 R6
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: pixel_offset
-********************************************************************/
-be_local_closure(class_Leds_pixel_offset, /* name */
- be_nested_proto(
- 1, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds, /* shared constants */
- &be_const_str_pixel_offset,
- &be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80060200, // 0000 RET 1 K1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: clear_to
-********************************************************************/
-be_local_closure(class_Leds_clear_to, /* name */
- be_nested_proto(
- 10, /* nstack */
- 3, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds, /* shared constants */
- &be_const_str_clear_to,
- &be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0x4C0C0000, // 0000 LDNIL R3
- 0x1C0C0403, // 0001 EQ R3 R2 R3
- 0x780E0000, // 0002 JMPF R3 #0004
- 0x88080105, // 0003 GETMBR R2 R0 K5
- 0x8C0C0106, // 0004 GETMET R3 R0 K6
- 0x54160008, // 0005 LDINT R5 9
- 0x8C18011B, // 0006 GETMET R6 R0 K27
- 0x5C200200, // 0007 MOVE R8 R1
- 0x5C240400, // 0008 MOVE R9 R2
- 0x7C180600, // 0009 CALL R6 3
- 0x7C0C0600, // 000A CALL R3 3
- 0x80000000, // 000B RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_pixel_color
-********************************************************************/
-be_local_closure(class_Leds_set_pixel_color, /* name */
+be_local_closure(class_Leds_ctor, /* name */
be_nested_proto(
12, /* nstack */
- 4, /* argc */
+ 5, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -1664,22 +1366,28 @@ be_local_closure(class_Leds_set_pixel_color, /* name */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_Leds, /* shared constants */
- &be_const_str_set_pixel_color,
+ &be_const_str_ctor,
&be_const_str_solidified,
- ( &(const binstruction[13]) { /* code */
- 0x4C100000, // 0000 LDNIL R4
- 0x1C100604, // 0001 EQ R4 R3 R4
- 0x78120000, // 0002 JMPF R4 #0004
- 0x880C0105, // 0003 GETMBR R3 R0 K5
- 0x8C100106, // 0004 GETMET R4 R0 K6
- 0x541A0009, // 0005 LDINT R6 10
- 0x5C1C0200, // 0006 MOVE R7 R1
- 0x8C20011B, // 0007 GETMET R8 R0 K27
- 0x5C280400, // 0008 MOVE R10 R2
- 0x5C2C0600, // 0009 MOVE R11 R3
- 0x7C200600, // 000A CALL R8 3
- 0x7C100800, // 000B CALL R4 4
- 0x80000000, // 000C RET 0
+ ( &(const binstruction[19]) { /* code */
+ 0x4C140000, // 0000 LDNIL R5
+ 0x1C140405, // 0001 EQ R5 R2 R5
+ 0x78160003, // 0002 JMPF R5 #0007
+ 0x8C140100, // 0003 GETMET R5 R0 K0
+ 0x581C0005, // 0004 LDCONST R7 K5
+ 0x7C140400, // 0005 CALL R5 2
+ 0x7002000A, // 0006 JMP #0012
+ 0x4C140000, // 0007 LDNIL R5
+ 0x1C140605, // 0008 EQ R5 R3 R5
+ 0x78160000, // 0009 JMPF R5 #000B
+ 0x880C0109, // 000A GETMBR R3 R0 K9
+ 0x8C140100, // 000B GETMET R5 R0 K0
+ 0x581C0005, // 000C LDCONST R7 K5
+ 0x5C200200, // 000D MOVE R8 R1
+ 0x5C240400, // 000E MOVE R9 R2
+ 0x5C280600, // 000F MOVE R10 R3
+ 0x5C2C0800, // 0010 MOVE R11 R4
+ 0x7C140C00, // 0011 CALL R5 6
+ 0x80000000, // 0012 RET 0
})
)
);
@@ -1703,7 +1411,7 @@ be_local_closure(class_Leds_pixel_size, /* name */
&be_const_str_pixel_size,
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
- 0x8C040106, // 0000 GETMET R1 R0 K6
+ 0x8C040100, // 0000 GETMET R1 R0 K0
0x540E0006, // 0001 LDINT R3 7
0x7C040400, // 0002 CALL R1 2
0x80040200, // 0003 RET 1 R1
@@ -1713,6 +1421,110 @@ be_local_closure(class_Leds_pixel_size, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: dirty
+********************************************************************/
+be_local_closure(class_Leds_dirty, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds, /* shared constants */
+ &be_const_str_dirty,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x540E0004, // 0001 LDINT R3 5
+ 0x7C040400, // 0002 CALL R1 2
+ 0x80000000, // 0003 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: pixel_offset
+********************************************************************/
+be_local_closure(class_Leds_pixel_offset, /* name */
+ be_nested_proto(
+ 1, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds, /* shared constants */
+ &be_const_str_pixel_offset,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 1]) { /* code */
+ 0x80060A00, // 0000 RET 1 K5
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_pixel_color
+********************************************************************/
+be_local_closure(class_Leds_get_pixel_color, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 2, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds, /* shared constants */
+ &be_const_str_get_pixel_color,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 5]) { /* code */
+ 0x8C080100, // 0000 GETMET R2 R0 K0
+ 0x5412000A, // 0001 LDINT R4 11
+ 0x5C140200, // 0002 MOVE R5 R1
+ 0x7C080600, // 0003 CALL R2 3
+ 0x80040400, // 0004 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_gamma
+********************************************************************/
+be_local_closure(class_Leds_get_gamma, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds, /* shared constants */
+ &be_const_str_get_gamma,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x88040107, // 0000 GETMBR R1 R0 K7
+ 0x80040200, // 0001 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: create_matrix
********************************************************************/
@@ -1745,21 +1557,21 @@ be_local_closure(class_Leds_create_matrix, /* name */
0x4C100000, // 000C LDNIL R4
0x1C100604, // 000D EQ R4 R3 R4
0x78120000, // 000E JMPF R4 #0010
- 0x580C0001, // 000F LDCONST R3 K1
+ 0x580C0005, // 000F LDCONST R3 K5
0x08100202, // 0010 MUL R4 R1 R2
0x00100803, // 0011 ADD R4 R4 R3
- 0x88140100, // 0012 GETMBR R5 R0 K0
+ 0x8814010A, // 0012 GETMBR R5 R0 K10
0x24100805, // 0013 GT R4 R4 R5
0x74120005, // 0014 JMPT R4 #001B
- 0x14100501, // 0015 LT R4 R2 K1
+ 0x14100505, // 0015 LT R4 R2 K5
0x74120003, // 0016 JMPT R4 #001B
- 0x14100301, // 0017 LT R4 R1 K1
+ 0x14100305, // 0017 LT R4 R1 K5
0x74120001, // 0018 JMPT R4 #001B
- 0x14100701, // 0019 LT R4 R3 K1
+ 0x14100705, // 0019 LT R4 R3 K5
0x78120000, // 001A JMPF R4 #001C
- 0xB0060503, // 001B RAISE 1 K2 K3
- 0x5810001C, // 001C LDCONST R4 K28
- 0xB400001C, // 001D CLASS K28
+ 0xB006170C, // 001B RAISE 1 K11 K12
+ 0x5810000D, // 001C LDCONST R4 K13
+ 0xB400000D, // 001D CLASS K13
0x5C140800, // 001E MOVE R5 R4
0x5C180000, // 001F MOVE R6 R0
0x5C1C0200, // 0020 MOVE R7 R1
@@ -1774,183 +1586,9 @@ be_local_closure(class_Leds_create_matrix, /* name */
/********************************************************************
-** Solidified function: get_gamma
+** Solidified function: clear_to
********************************************************************/
-be_local_closure(class_Leds_get_gamma, /* name */
- be_nested_proto(
- 2, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds, /* shared constants */
- &be_const_str_get_gamma,
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x8804010B, // 0000 GETMBR R1 R0 K11
- 0x80040200, // 0001 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: is_dirty
-********************************************************************/
-be_local_closure(class_Leds_is_dirty, /* name */
- be_nested_proto(
- 4, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds, /* shared constants */
- &be_const_str_is_dirty,
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x8C040106, // 0000 GETMET R1 R0 K6
- 0x540E0003, // 0001 LDINT R3 4
- 0x7C040400, // 0002 CALL R1 2
- 0x80040200, // 0003 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: can_show
-********************************************************************/
-be_local_closure(class_Leds_can_show, /* name */
- be_nested_proto(
- 4, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds, /* shared constants */
- &be_const_str_can_show,
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x8C040106, // 0000 GETMET R1 R0 K6
- 0x580C001D, // 0001 LDCONST R3 K29
- 0x7C040400, // 0002 CALL R1 2
- 0x80040200, // 0003 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: assign_rmt
-********************************************************************/
-be_local_closure(class_Leds_assign_rmt, /* name */
- be_nested_proto(
- 9, /* nstack */
- 1, /* argc */
- 12, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_Leds, /* shared constants */
- &be_const_str_assign_rmt,
- &be_const_str_solidified,
- ( &(const binstruction[72]) { /* code */
- 0x58040018, // 0000 LDCONST R1 K24
- 0x60080009, // 0001 GETGBL R2 G9
- 0x5C0C0000, // 0002 MOVE R3 R0
- 0x7C080200, // 0003 CALL R2 1
- 0x5C000400, // 0004 MOVE R0 R2
- 0x14080101, // 0005 LT R2 R0 K1
- 0x780A0000, // 0006 JMPF R2 #0008
- 0xB006051E, // 0007 RAISE 1 K2 K30
- 0xA40A3E00, // 0008 IMPORT R2 K31
- 0x4C0C0000, // 0009 LDNIL R3
- 0x8C100520, // 000A GETMET R4 R2 K32
- 0x58180021, // 000B LDCONST R6 K33
- 0x7C100400, // 000C CALL R4 2
- 0x74120021, // 000D JMPT R4 #0030
- 0x60100012, // 000E GETGBL R4 G18
- 0x7C100000, // 000F CALL R4 0
- 0x5C0C0800, // 0010 MOVE R3 R4
- 0x900A4203, // 0011 SETMBR R2 K33 R3
- 0x60100010, // 0012 GETGBL R4 G16
- 0xB8161400, // 0013 GETNGBL R5 K10
- 0x88140B22, // 0014 GETMBR R5 R5 K34
- 0x04140B07, // 0015 SUB R5 R5 K7
- 0x40160205, // 0016 CONNECT R5 K1 R5
- 0x7C100200, // 0017 CALL R4 1
- 0xA8020005, // 0018 EXBLK 0 #001F
- 0x5C140800, // 0019 MOVE R5 R4
- 0x7C140000, // 001A CALL R5 0
- 0x8C180723, // 001B GETMET R6 R3 K35
- 0x5421FFFE, // 001C LDINT R8 -1
- 0x7C180400, // 001D CALL R6 2
- 0x7001FFF9, // 001E JMP #0019
- 0x58100024, // 001F LDCONST R4 K36
- 0xAC100200, // 0020 CATCH R4 1 0
- 0xB0080000, // 0021 RAISE 2 R0 R0
- 0xB8121400, // 0022 GETNGBL R4 K10
- 0x8C100925, // 0023 GETMET R4 R4 K37
- 0xB81A1400, // 0024 GETNGBL R6 K10
- 0x88180D0D, // 0025 GETMBR R6 R6 K13
- 0x581C0001, // 0026 LDCONST R7 K1
- 0x7C100600, // 0027 CALL R4 3
- 0x78120006, // 0028 JMPF R4 #0030
- 0xB8121400, // 0029 GETNGBL R4 K10
- 0x8C10090C, // 002A GETMET R4 R4 K12
- 0xB81A1400, // 002B GETNGBL R6 K10
- 0x88180D0D, // 002C GETMBR R6 R6 K13
- 0x581C0001, // 002D LDCONST R7 K1
- 0x7C100600, // 002E CALL R4 3
- 0x980E0204, // 002F SETIDX R3 K1 R4
- 0x880C0521, // 0030 GETMBR R3 R2 K33
- 0x58100001, // 0031 LDCONST R4 K1
- 0x5415FFFE, // 0032 LDINT R5 -1
- 0xB81A1400, // 0033 GETNGBL R6 K10
- 0x88180D22, // 0034 GETMBR R6 R6 K34
- 0x14180806, // 0035 LT R6 R4 R6
- 0x781A000A, // 0036 JMPF R6 #0042
- 0x94180604, // 0037 GETIDX R6 R3 R4
- 0x1C1C0C00, // 0038 EQ R7 R6 R0
- 0x781E0000, // 0039 JMPF R7 #003B
- 0x80040800, // 003A RET 1 R4
- 0x141C0D01, // 003B LT R7 R6 K1
- 0x781E0002, // 003C JMPF R7 #0040
- 0x141C0B01, // 003D LT R7 R5 K1
- 0x781E0000, // 003E JMPF R7 #0040
- 0x5C140800, // 003F MOVE R5 R4
- 0x00100907, // 0040 ADD R4 R4 K7
- 0x7001FFF0, // 0041 JMP #0033
- 0x28180B01, // 0042 GE R6 R5 K1
- 0x781A0001, // 0043 JMPF R6 #0046
- 0x980C0A00, // 0044 SETIDX R3 R5 R0
- 0x80040A00, // 0045 RET 1 R5
- 0xB0062726, // 0046 RAISE 1 K19 K38
- 0x80000000, // 0047 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: ctor
-********************************************************************/
-be_local_closure(class_Leds_ctor, /* name */
+be_local_closure(class_Leds_clear_to, /* name */
be_nested_proto(
12, /* nstack */
5, /* argc */
@@ -1961,35 +1599,301 @@ be_local_closure(class_Leds_ctor, /* name */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_Leds, /* shared constants */
- &be_const_str_ctor,
+ &be_const_str_clear_to,
&be_const_str_solidified,
- ( &(const binstruction[26]) { /* code */
+ ( &(const binstruction[28]) { /* code */
0x4C140000, // 0000 LDNIL R5
0x1C140405, // 0001 EQ R5 R2 R5
- 0x78160003, // 0002 JMPF R5 #0007
- 0x8C140106, // 0003 GETMET R5 R0 K6
- 0x581C0001, // 0004 LDCONST R7 K1
- 0x7C140400, // 0005 CALL R5 2
- 0x70020011, // 0006 JMP #0019
+ 0x78160000, // 0002 JMPF R5 #0004
+ 0x88080101, // 0003 GETMBR R2 R0 K1
+ 0x4C140000, // 0004 LDNIL R5
+ 0x20140605, // 0005 NE R5 R3 R5
+ 0x7816000C, // 0006 JMPF R5 #0014
0x4C140000, // 0007 LDNIL R5
- 0x1C140605, // 0008 EQ R5 R3 R5
- 0x78160000, // 0009 JMPF R5 #000B
- 0x880C0127, // 000A GETMBR R3 R0 K39
- 0x4C140000, // 000B LDNIL R5
- 0x1C140805, // 000C EQ R5 R4 R5
- 0x78160003, // 000D JMPF R5 #0012
- 0x8C140128, // 000E GETMET R5 R0 K40
- 0x5C1C0400, // 000F MOVE R7 R2
- 0x7C140400, // 0010 CALL R5 2
- 0x5C100A00, // 0011 MOVE R4 R5
- 0x8C140106, // 0012 GETMET R5 R0 K6
- 0x581C0001, // 0013 LDCONST R7 K1
- 0x5C200200, // 0014 MOVE R8 R1
- 0x5C240400, // 0015 MOVE R9 R2
- 0x5C280600, // 0016 MOVE R10 R3
- 0x5C2C0800, // 0017 MOVE R11 R4
- 0x7C140C00, // 0018 CALL R5 6
- 0x80000000, // 0019 RET 0
+ 0x20140805, // 0008 NE R5 R4 R5
+ 0x78160009, // 0009 JMPF R5 #0014
+ 0x8C140100, // 000A GETMET R5 R0 K0
+ 0x541E0008, // 000B LDINT R7 9
+ 0x8C20010E, // 000C GETMET R8 R0 K14
+ 0x5C280200, // 000D MOVE R10 R1
+ 0x5C2C0400, // 000E MOVE R11 R2
+ 0x7C200600, // 000F CALL R8 3
+ 0x5C240600, // 0010 MOVE R9 R3
+ 0x5C280800, // 0011 MOVE R10 R4
+ 0x7C140A00, // 0012 CALL R5 5
+ 0x70020006, // 0013 JMP #001B
+ 0x8C140100, // 0014 GETMET R5 R0 K0
+ 0x541E0008, // 0015 LDINT R7 9
+ 0x8C20010E, // 0016 GETMET R8 R0 K14
+ 0x5C280200, // 0017 MOVE R10 R1
+ 0x5C2C0400, // 0018 MOVE R11 R2
+ 0x7C200600, // 0019 CALL R8 3
+ 0x7C140600, // 001A CALL R5 3
+ 0x80000000, // 001B RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: create_segment
+********************************************************************/
+be_local_closure(class_Leds_create_segment, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 3, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds, /* shared constants */
+ &be_const_str_create_segment,
+ &be_const_str_solidified,
+ ( &(const binstruction[23]) { /* code */
+ 0x600C0009, // 0000 GETGBL R3 G9
+ 0x5C100200, // 0001 MOVE R4 R1
+ 0x7C0C0200, // 0002 CALL R3 1
+ 0x60100009, // 0003 GETGBL R4 G9
+ 0x5C140400, // 0004 MOVE R5 R2
+ 0x7C100200, // 0005 CALL R4 1
+ 0x000C0604, // 0006 ADD R3 R3 R4
+ 0x8810010A, // 0007 GETMBR R4 R0 K10
+ 0x240C0604, // 0008 GT R3 R3 R4
+ 0x740E0003, // 0009 JMPT R3 #000E
+ 0x140C0305, // 000A LT R3 R1 K5
+ 0x740E0001, // 000B JMPT R3 #000E
+ 0x140C0505, // 000C LT R3 R2 K5
+ 0x780E0000, // 000D JMPF R3 #000F
+ 0xB006170C, // 000E RAISE 1 K11 K12
+ 0x580C000F, // 000F LDCONST R3 K15
+ 0xB400000F, // 0010 CLASS K15
+ 0x5C100600, // 0011 MOVE R4 R3
+ 0x5C140000, // 0012 MOVE R5 R0
+ 0x5C180200, // 0013 MOVE R6 R1
+ 0x5C1C0400, // 0014 MOVE R7 R2
+ 0x7C100600, // 0015 CALL R4 3
+ 0x80040800, // 0016 RET 1 R4
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: set_pixel_color
+********************************************************************/
+be_local_closure(class_Leds_set_pixel_color, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 4, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds, /* shared constants */
+ &be_const_str_set_pixel_color,
+ &be_const_str_solidified,
+ ( &(const binstruction[13]) { /* code */
+ 0x4C100000, // 0000 LDNIL R4
+ 0x1C100604, // 0001 EQ R4 R3 R4
+ 0x78120000, // 0002 JMPF R4 #0004
+ 0x880C0101, // 0003 GETMBR R3 R0 K1
+ 0x8C100100, // 0004 GETMET R4 R0 K0
+ 0x541A0009, // 0005 LDINT R6 10
+ 0x5C1C0200, // 0006 MOVE R7 R1
+ 0x8C20010E, // 0007 GETMET R8 R0 K14
+ 0x5C280400, // 0008 MOVE R10 R2
+ 0x5C2C0600, // 0009 MOVE R11 R3
+ 0x7C200600, // 000A CALL R8 3
+ 0x7C100800, // 000B CALL R4 4
+ 0x80000000, // 000C RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(class_Leds_init, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 5, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds, /* shared constants */
+ &be_const_str_init,
+ &be_const_str_solidified,
+ ( &(const binstruction[43]) { /* code */
+ 0xA4162000, // 0000 IMPORT R5 K16
+ 0x50180200, // 0001 LDBOOL R6 1 0
+ 0x90020E06, // 0002 SETMBR R0 K7 R6
+ 0x4C180000, // 0003 LDNIL R6
+ 0x1C180406, // 0004 EQ R6 R2 R6
+ 0x741A0005, // 0005 JMPT R6 #000C
+ 0x8C180B11, // 0006 GETMET R6 R5 K17
+ 0x88200B12, // 0007 GETMBR R8 R5 K18
+ 0x58240005, // 0008 LDCONST R9 K5
+ 0x7C180600, // 0009 CALL R6 3
+ 0x1C180406, // 000A EQ R6 R2 R6
+ 0x781A000A, // 000B JMPF R6 #0017
+ 0x8C180113, // 000C GETMET R6 R0 K19
+ 0x7C180200, // 000D CALL R6 1
+ 0x8C180114, // 000E GETMET R6 R0 K20
+ 0x7C180200, // 000F CALL R6 1
+ 0x90021406, // 0010 SETMBR R0 K10 R6
+ 0xA41A2A00, // 0011 IMPORT R6 K21
+ 0x8C1C0D16, // 0012 GETMET R7 R6 K22
+ 0x7C1C0200, // 0013 CALL R7 1
+ 0x941C0F01, // 0014 GETIDX R7 R7 K1
+ 0x90020207, // 0015 SETMBR R0 K1 R7
+ 0x7002000B, // 0016 JMP #0023
+ 0x60180009, // 0017 GETGBL R6 G9
+ 0x5C1C0200, // 0018 MOVE R7 R1
+ 0x7C180200, // 0019 CALL R6 1
+ 0x90021406, // 001A SETMBR R0 K10 R6
+ 0x541A007E, // 001B LDINT R6 127
+ 0x90020206, // 001C SETMBR R0 K1 R6
+ 0x8C180113, // 001D GETMET R6 R0 K19
+ 0x8820010A, // 001E GETMBR R8 R0 K10
+ 0x5C240400, // 001F MOVE R9 R2
+ 0x5C280600, // 0020 MOVE R10 R3
+ 0x5C2C0800, // 0021 MOVE R11 R4
+ 0x7C180A00, // 0022 CALL R6 5
+ 0x88180117, // 0023 GETMBR R6 R0 K23
+ 0x4C1C0000, // 0024 LDNIL R7
+ 0x1C180C07, // 0025 EQ R6 R6 R7
+ 0x781A0000, // 0026 JMPF R6 #0028
+ 0xB0063119, // 0027 RAISE 1 K24 K25
+ 0x8C18011A, // 0028 GETMET R6 R0 K26
+ 0x7C180200, // 0029 CALL R6 1
+ 0x80000000, // 002A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: clear
+********************************************************************/
+be_local_closure(class_Leds_clear, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds, /* shared constants */
+ &be_const_str_clear,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 6]) { /* code */
+ 0x8C04011B, // 0000 GETMET R1 R0 K27
+ 0x580C0005, // 0001 LDCONST R3 K5
+ 0x7C040400, // 0002 CALL R1 2
+ 0x8C04011C, // 0003 GETMET R1 R0 K28
+ 0x7C040200, // 0004 CALL R1 1
+ 0x80000000, // 0005 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: begin
+********************************************************************/
+be_local_closure(class_Leds_begin, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds, /* shared constants */
+ &be_const_str_begin,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x580C001D, // 0001 LDCONST R3 K29
+ 0x7C040400, // 0002 CALL R1 2
+ 0x80000000, // 0003 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: pixel_count
+********************************************************************/
+be_local_closure(class_Leds_pixel_count, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds, /* shared constants */
+ &be_const_str_pixel_count,
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x540E0007, // 0001 LDINT R3 8
+ 0x7C040400, // 0002 CALL R1 2
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: to_gamma
+********************************************************************/
+be_local_closure(class_Leds_to_gamma, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 3, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_Leds, /* shared constants */
+ &be_const_str_to_gamma,
+ &be_const_str_solidified,
+ ( &(const binstruction[10]) { /* code */
+ 0x4C0C0000, // 0000 LDNIL R3
+ 0x1C0C0403, // 0001 EQ R3 R2 R3
+ 0x780E0000, // 0002 JMPF R3 #0004
+ 0x88080101, // 0003 GETMBR R2 R0 K1
+ 0x8C0C011E, // 0004 GETMET R3 R0 K30
+ 0x5C140200, // 0005 MOVE R5 R1
+ 0x5C180400, // 0006 MOVE R6 R2
+ 0x881C0107, // 0007 GETMBR R7 R0 K7
+ 0x7C0C0800, // 0008 CALL R3 4
+ 0x80040600, // 0009 RET 1 R3
})
)
);
@@ -2013,7 +1917,7 @@ be_local_closure(class_Leds_pixels_buffer, /* name */
&be_const_str_pixels_buffer,
&be_const_str_solidified,
( &(const binstruction[21]) { /* code */
- 0x8C080106, // 0000 GETMET R2 R0 K6
+ 0x8C080100, // 0000 GETMET R2 R0 K0
0x54120005, // 0001 LDINT R4 6
0x7C080400, // 0002 CALL R2 2
0x4C0C0000, // 0003 LDNIL R3
@@ -2021,15 +1925,15 @@ be_local_closure(class_Leds_pixels_buffer, /* name */
0x780E0009, // 0005 JMPF R3 #0010
0x600C0015, // 0006 GETGBL R3 G21
0x5C100400, // 0007 MOVE R4 R2
- 0x8C140129, // 0008 GETMET R5 R0 K41
+ 0x8C14011F, // 0008 GETMET R5 R0 K31
0x7C140200, // 0009 CALL R5 1
- 0x8C18010F, // 000A GETMET R6 R0 K15
+ 0x8C180114, // 000A GETMET R6 R0 K20
0x7C180200, // 000B CALL R6 1
0x08140A06, // 000C MUL R5 R5 R6
0x7C0C0400, // 000D CALL R3 2
0x80040600, // 000E RET 1 R3
0x70020003, // 000F JMP #0014
- 0x8C0C032A, // 0010 GETMET R3 R1 K42
+ 0x8C0C0320, // 0010 GETMET R3 R1 K32
0x5C140400, // 0011 MOVE R5 R2
0x7C0C0400, // 0012 CALL R3 2
0x80040200, // 0013 RET 1 R1
@@ -2047,35 +1951,34 @@ extern const bclass be_class_Leds_ntv;
be_local_class(Leds,
3,
&be_class_Leds_ntv,
- be_nested_map(27,
+ be_nested_map(26,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key(leds, -1), be_const_var(1) },
- { be_const_key(create_segment, 25), be_const_closure(class_Leds_create_segment_closure) },
- { be_const_key(clear, -1), be_const_closure(class_Leds_clear_closure) },
- { be_const_key(begin, -1), be_const_closure(class_Leds_begin_closure) },
- { be_const_key(ctor, 7), be_const_closure(class_Leds_ctor_closure) },
- { be_const_key(assign_rmt, 12), be_const_static_closure(class_Leds_assign_rmt_closure) },
- { be_const_key(to_gamma, 8), be_const_closure(class_Leds_to_gamma_closure) },
- { be_const_key(dirty, -1), be_const_closure(class_Leds_dirty_closure) },
- { be_const_key(matrix, -1), be_const_static_closure(class_Leds_matrix_closure) },
- { be_const_key(pixel_offset, 2), be_const_closure(class_Leds_pixel_offset_closure) },
- { be_const_key(set_gamma, 4), be_const_closure(class_Leds_set_gamma_closure) },
- { be_const_key(get_pixel_color, -1), be_const_closure(class_Leds_get_pixel_color_closure) },
- { be_const_key(pixel_size, -1), be_const_closure(class_Leds_pixel_size_closure) },
- { be_const_key(create_matrix, -1), be_const_closure(class_Leds_create_matrix_closure) },
- { be_const_key(set_bri, 9), be_const_closure(class_Leds_set_bri_closure) },
- { be_const_key(clear_to, -1), be_const_closure(class_Leds_clear_to_closure) },
- { be_const_key(set_pixel_color, -1), be_const_closure(class_Leds_set_pixel_color_closure) },
- { be_const_key(gamma, -1), be_const_var(0) },
- { be_const_key(pixel_count, 17), be_const_closure(class_Leds_pixel_count_closure) },
- { be_const_key(get_bri, 13), be_const_closure(class_Leds_get_bri_closure) },
- { be_const_key(get_gamma, -1), be_const_closure(class_Leds_get_gamma_closure) },
- { be_const_key(bri, -1), be_const_var(2) },
{ be_const_key(is_dirty, -1), be_const_closure(class_Leds_is_dirty_closure) },
- { be_const_key(can_show, -1), be_const_closure(class_Leds_can_show_closure) },
- { be_const_key(init, 5), be_const_closure(class_Leds_init_closure) },
- { be_const_key(show, -1), be_const_closure(class_Leds_show_closure) },
{ be_const_key(pixels_buffer, -1), be_const_closure(class_Leds_pixels_buffer_closure) },
+ { be_const_key(to_gamma, -1), be_const_closure(class_Leds_to_gamma_closure) },
+ { be_const_key(can_show, -1), be_const_closure(class_Leds_can_show_closure) },
+ { be_const_key(pixel_offset, -1), be_const_closure(class_Leds_pixel_offset_closure) },
+ { be_const_key(set_bri, 24), be_const_closure(class_Leds_set_bri_closure) },
+ { be_const_key(show, 2), be_const_closure(class_Leds_show_closure) },
+ { be_const_key(ctor, -1), be_const_closure(class_Leds_ctor_closure) },
+ { be_const_key(begin, 22), be_const_closure(class_Leds_begin_closure) },
+ { be_const_key(leds, -1), be_const_var(1) },
+ { be_const_key(set_pixel_color, -1), be_const_closure(class_Leds_set_pixel_color_closure) },
+ { be_const_key(dirty, 4), be_const_closure(class_Leds_dirty_closure) },
+ { be_const_key(get_pixel_color, -1), be_const_closure(class_Leds_get_pixel_color_closure) },
+ { be_const_key(get_gamma, -1), be_const_closure(class_Leds_get_gamma_closure) },
+ { be_const_key(gamma, -1), be_const_var(0) },
+ { be_const_key(create_matrix, -1), be_const_closure(class_Leds_create_matrix_closure) },
+ { be_const_key(matrix, 8), be_const_static_closure(class_Leds_matrix_closure) },
+ { be_const_key(create_segment, -1), be_const_closure(class_Leds_create_segment_closure) },
+ { be_const_key(bri, 10), be_const_var(2) },
+ { be_const_key(init, -1), be_const_closure(class_Leds_init_closure) },
+ { be_const_key(clear, -1), be_const_closure(class_Leds_clear_closure) },
+ { be_const_key(get_bri, 9), be_const_closure(class_Leds_get_bri_closure) },
+ { be_const_key(clear_to, -1), be_const_closure(class_Leds_clear_to_closure) },
+ { be_const_key(pixel_count, -1), be_const_closure(class_Leds_pixel_count_closure) },
+ { be_const_key(set_gamma, -1), be_const_closure(class_Leds_set_gamma_closure) },
+ { be_const_key(pixel_size, 1), be_const_closure(class_Leds_pixel_size_closure) },
})),
(bstring*) &be_const_str_Leds
);
diff --git a/lib/libesp32_div/esp-nimble-cpp/CMakeLists.txt b/lib/libesp32_div/esp-nimble-cpp/CMakeLists.txt
index 90c22bd19..4bed65b11 100644
--- a/lib/libesp32_div/esp-nimble-cpp/CMakeLists.txt
+++ b/lib/libesp32_div/esp-nimble-cpp/CMakeLists.txt
@@ -31,6 +31,7 @@ idf_component_register(
"esp32c2"
"esp32c3"
"esp32c6"
+ "esp32h2"
INCLUDE_DIRS
"src"
SRCS
@@ -58,6 +59,7 @@ idf_component_register(
REQUIRES
bt
nvs_flash
+ driver
PRIV_REQUIRES
${ESP_NIMBLE_PRIV_REQUIRES}
)
diff --git a/lib/libesp32_div/esp-nimble-cpp/Kconfig b/lib/libesp32_div/esp-nimble-cpp/Kconfig
index 730f8cd96..0878176a8 100644
--- a/lib/libesp32_div/esp-nimble-cpp/Kconfig
+++ b/lib/libesp32_div/esp-nimble-cpp/Kconfig
@@ -33,7 +33,7 @@ config NIMBLE_CPP_ENABLE_RETURN_CODE_TEXT
Enabling this option will display return code values as text
messages in the debug log. This will use approximately 8kB
of flash memory.
-
+
config NIMBLE_CPP_ENABLE_GAP_EVENT_CODE_TEXT
bool "Show NimBLE gap events as text in debug log."
default "n"
@@ -47,7 +47,7 @@ config NIMBLE_CPP_ENABLE_ADVERTISEMENT_TYPE_TEXT
default "n"
help
Enabling this option will display advertisment types recieved
- while scanning as text messages in the debug log.
+ while scanning as text messages in the debug log.
This will use approximately 250 bytes of flash memory.
config NIMBLE_CPP_ATT_VALUE_TIMESTAMP_ENABLED
@@ -68,5 +68,12 @@ config NIMBLE_CPP_ATT_VALUE_INIT_LENGTH
when the constructor is called. This is also the size used when a remote
characteristic or descriptor is constructed before a value is read/notifed.
Increasing this will reduce reallocations but increase memory footprint.
-
+
+config NIMBLE_CPP_DEBUG_ASSERT_ENABLED
+ bool "Enable debug asserts."
+ default "n"
+ help
+ Enabling this option will add debug asserts to the NimBLE CPP library.
+ This will use approximately 1kB of flash memory.
+
endmenu
diff --git a/lib/libesp32_div/esp-nimble-cpp/docs/Improvements_and_updates.md b/lib/libesp32_div/esp-nimble-cpp/docs/Improvements_and_updates.md
index 220ed5c28..a7504d5fb 100644
--- a/lib/libesp32_div/esp-nimble-cpp/docs/Improvements_and_updates.md
+++ b/lib/libesp32_div/esp-nimble-cpp/docs/Improvements_and_updates.md
@@ -66,7 +66,7 @@ If false the service is only removed from visibility by clients. The pointers to
# Advertising
`NimBLEAdvertising::start`
-Now takes 2 optional parameters, the first is the duration to advertise for (in seconds), the second is a callback that is invoked when advertising ends and takes a pointer to a `NimBLEAdvertising` object (similar to the `NimBLEScan::start` API).
+Now takes 2 optional parameters, the first is the duration to advertise for (in milliseconds), the second is a callback that is invoked when advertising ends and takes a pointer to a `NimBLEAdvertising` object (similar to the `NimBLEScan::start` API).
This provides an opportunity to update the advertisement data if desired.
diff --git a/lib/libesp32_div/esp-nimble-cpp/docs/Migration_guide.md b/lib/libesp32_div/esp-nimble-cpp/docs/Migration_guide.md
index d6362e2b2..d1fcee8ad 100644
--- a/lib/libesp32_div/esp-nimble-cpp/docs/Migration_guide.md
+++ b/lib/libesp32_div/esp-nimble-cpp/docs/Migration_guide.md
@@ -255,7 +255,7 @@ Calling `NimBLEAdvertising::setAdvertisementData` will entirely replace any data
> BLEAdvertising::start (NimBLEAdvertising::start)
-Now takes 2 optional parameters, the first is the duration to advertise for (in seconds), the second is a callback that is invoked when advertising ends and takes a pointer to a `NimBLEAdvertising` object (similar to the `NimBLEScan::start` API).
+Now takes 2 optional parameters, the first is the duration to advertise for (in milliseconds), the second is a callback that is invoked when advertising ends and takes a pointer to a `NimBLEAdvertising` object (similar to the `NimBLEScan::start` API).
This provides an opportunity to update the advertisement data if desired.
@@ -383,18 +383,23 @@ The security callback methods are now incorporated in the `NimBLEServerCallbacks
The callback methods are:
-> `bool onConfirmPIN(uint32_t pin)`
+> `bool onConfirmPIN(const NimBLEConnInfo& connInfo, uint32_t pin)`
-Receives the pin when using numeric comparison authentication, `return true;` to accept.
+Receives the pin when using numeric comparison authentication.
+Call `NimBLEDevice::injectConfirmPIN(connInfo, true);` to accept or `NimBLEDevice::injectConfirmPIN(connInfo, false);` to reject.
-> `uint32_t onPassKeyRequest()`
+> `void onPassKeyEntry(const NimBLEConnInfo& connInfo)`
-For server callback; return the passkey expected from the client.
-For client callback; return the passkey to send to the server.
+Client callback; client should respond with the passkey (pin) by calling `NimBLEDevice::injectPassKey(connInfo, 123456);`
-> `void onAuthenticationComplete(NimBLEConnInfo& connInfo)`
+> `uint32_t onPassKeyDisplay()`
+
+Server callback; should return the passkey (pin) expected from the client.
+
+
+> `void onAuthenticationComplete(const NimBLEConnInfo& connInfo)`
Authentication complete, success or failed information is available from the `NimBLEConnInfo` methods.
diff --git a/lib/libesp32_div/esp-nimble-cpp/examples/Advanced/NimBLE_Client/main/main.cpp b/lib/libesp32_div/esp-nimble-cpp/examples/Advanced/NimBLE_Client/main/main.cpp
index e30bd646b..fe76dd0d9 100644
--- a/lib/libesp32_div/esp-nimble-cpp/examples/Advanced/NimBLE_Client/main/main.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/examples/Advanced/NimBLE_Client/main/main.cpp
@@ -39,20 +39,22 @@ class ClientCallbacks : public NimBLEClientCallbacks {
/********************* Security handled here **********************
****** Note: these are the same return values as defaults ********/
- uint32_t onPassKeyRequest(){
- printf("Client Passkey Request\n");
- /** return the passkey to send to the server */
- return 123456;
- }
+ void onPassKeyEntry(const NimBLEConnInfo& connInfo){
+ printf("Server Passkey Entry\n");
+ /** This should prompt the user to enter the passkey displayed
+ * on the peer device.
+ */
+ NimBLEDevice::injectPassKey(connInfo, 123456);
+ };
- bool onConfirmPIN(uint32_t pass_key){
- printf("The passkey YES/NO number: %" PRIu32"\n", pass_key);
- /** Return false if passkeys don't match. */
- return true;
- }
+ void onConfirmPIN(const NimBLEConnInfo& connInfo, uint32_t pass_key){
+ printf("The passkey YES/NO number: %" PRIu32 "\n", pass_key);
+ /** Inject false if passkeys don't match. */
+ NimBLEDevice::injectConfirmPIN(connInfo, true);
+ };
/** Pairing process complete, we can check the results in connInfo */
- void onAuthenticationComplete(NimBLEConnInfo& connInfo){
+ void onAuthenticationComplete(const NimBLEConnInfo& connInfo){
if(!connInfo.isEncrypted()) {
printf("Encrypt connection failed - disconnecting\n");
/** Find the client with the connection handle provided in desc */
@@ -146,8 +148,8 @@ bool connectToServer() {
* Min interval: 12 * 1.25ms = 15, Max interval: 12 * 1.25ms = 15, 0 latency, 12 * 10ms = 120ms timeout
*/
pClient->setConnectionParams(6,6,0,15);
- /** Set how long we are willing to wait for the connection to complete (seconds), default is 30. */
- pClient->setConnectTimeout(5);
+ /** Set how long we are willing to wait for the connection to complete (milliseconds), default is 30000. */
+ pClient->setConnectTimeout(5 * 1000);
if (!pClient->connect(advDevice)) {
@@ -358,7 +360,7 @@ void app_main (void){
* but will use more energy from both devices
*/
pScan->setActiveScan(true);
- /** Start scanning for advertisers for the scan time specified (in seconds) 0 = forever
+ /** Start scanning for advertisers for the scan time specified (in milliseconds) 0 = forever
* Optional callback for when scanning stops.
*/
pScan->start(scanTime);
diff --git a/lib/libesp32_div/esp-nimble-cpp/examples/Advanced/NimBLE_Server/main/main.cpp b/lib/libesp32_div/esp-nimble-cpp/examples/Advanced/NimBLE_Server/main/main.cpp
index 8bf92e26a..3effb54f2 100644
--- a/lib/libesp32_div/esp-nimble-cpp/examples/Advanced/NimBLE_Server/main/main.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/examples/Advanced/NimBLE_Server/main/main.cpp
@@ -44,21 +44,21 @@ class ServerCallbacks: public NimBLEServerCallbacks {
/********************* Security handled here **********************
****** Note: these are the same return values as defaults ********/
- uint32_t onPassKeyRequest(){
- printf("Server Passkey Request\n");
+ uint32_t onPassKeyDisplay(){
+ printf("Server Passkey Display\n");
/** This should return a random 6 digit number for security
* or make your own static passkey as done here.
*/
return 123456;
};
- bool onConfirmPIN(uint32_t pass_key){
- printf("The passkey YES/NO number: %" PRIu32"\n", pass_key);
- /** Return false if passkeys don't match. */
- return true;
+ void onConfirmPIN(const NimBLEConnInfo& connInfo, uint32_t pass_key){
+ printf("The passkey YES/NO number: %" PRIu32 "\n", pass_key);
+ /** Inject false if passkeys don't match. */
+ NimBLEDevice::injectConfirmPIN(connInfo, true);
};
- void onAuthenticationComplete(NimBLEConnInfo& connInfo){
+ void onAuthenticationComplete(const NimBLEConnInfo& connInfo){
/** Check that encryption was successful, if not we disconnect the client */
if(!connInfo.isEncrypted()) {
NimBLEDevice::getServer()->disconnect(connInfo.getConnHandle());
diff --git a/lib/libesp32_div/esp-nimble-cpp/examples/Bluetooth_5/NimBLE_extended_client/main/main.cpp b/lib/libesp32_div/esp-nimble-cpp/examples/Bluetooth_5/NimBLE_extended_client/main/main.cpp
index c9013d9c7..3572e59ef 100644
--- a/lib/libesp32_div/esp-nimble-cpp/examples/Bluetooth_5/NimBLE_extended_client/main/main.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/examples/Bluetooth_5/NimBLE_extended_client/main/main.cpp
@@ -154,7 +154,7 @@ void app_main (void) {
*/
pScan->setActiveScan(true);
- /* Start scanning for advertisers for the scan time specified (in seconds) 0 = forever
+ /* Start scanning for advertisers for the scan time specified (in milliseconds) 0 = forever
* Optional callback for when scanning stops.
*/
pScan->start(scanTime);
diff --git a/lib/libesp32_div/esp-nimble-cpp/examples/NimBLE_active_passive_scan/NimBLE_active_passive_scan.ino b/lib/libesp32_div/esp-nimble-cpp/examples/NimBLE_active_passive_scan/NimBLE_active_passive_scan.ino
index 9dceb4e67..e69de29bb 100644
--- a/lib/libesp32_div/esp-nimble-cpp/examples/NimBLE_active_passive_scan/NimBLE_active_passive_scan.ino
+++ b/lib/libesp32_div/esp-nimble-cpp/examples/NimBLE_active_passive_scan/NimBLE_active_passive_scan.ino
@@ -1,48 +0,0 @@
-/*
- * NimBLE Scan active/passive switching demo
- *
- * Demonstrates the use of the scan callbacks while alternating between passive and active scanning.
- */
-
-#include "NimBLEDevice.h"
-int scanTime = 5 * 1000; // In milliseconds, 0 = scan forever
-BLEScan* pBLEScan;
-
-bool active = false;
-
-class scanCallbacks: public NimBLEScanCallbacks {
-
- void onDiscovered(NimBLEAdvertisedDevice* advertisedDevice) {
- Serial.printf("Discovered Advertised Device: %s \n", advertisedDevice->toString().c_str());
- }
-
- void onResult(NimBLEAdvertisedDevice* advertisedDevice) {
- Serial.printf("Advertised Device Result: %s \n", advertisedDevice->toString().c_str());
- }
-
- void onScanEnd(NimBLEScanResults results){
- Serial.println("Scan Ended");
- active = !active;
- pBLEScan->setActiveScan(active);
- Serial.printf("scan start, active = %u\n", active);
- pBLEScan->start(scanTime);
- }
-};
-
-
-
-void setup() {
- Serial.begin(115200);
- Serial.println("Scanning...");
-
- NimBLEDevice::init("");
- pBLEScan = NimBLEDevice::getScan();
- pBLEScan->setScanCallbacks(new scanCallbacks());
- pBLEScan->setActiveScan(active);
- pBLEScan->setInterval(100);
- pBLEScan->setWindow(99);
- pBLEScan->start(scanTime);
-}
-
-void loop() {
-}
diff --git a/lib/libesp32_div/esp-nimble-cpp/examples/NimBLE_server_get_client_name/CMakeLists.txt b/lib/libesp32_div/esp-nimble-cpp/examples/NimBLE_server_get_client_name/CMakeLists.txt
new file mode 100644
index 000000000..21c12dad3
--- /dev/null
+++ b/lib/libesp32_div/esp-nimble-cpp/examples/NimBLE_server_get_client_name/CMakeLists.txt
@@ -0,0 +1,7 @@
+# The following lines of boilerplate have to be in your project's
+# CMakeLists in this exact order for cmake to work correctly
+cmake_minimum_required(VERSION 3.5)
+
+include($ENV{IDF_PATH}/tools/cmake/project.cmake)
+set(SUPPORTED_TARGETS esp32)
+project(NimBLE_server_get_client_name)
diff --git a/lib/libesp32_div/esp-nimble-cpp/examples/NimBLE_server_get_client_name/main/CMakeLists.txt b/lib/libesp32_div/esp-nimble-cpp/examples/NimBLE_server_get_client_name/main/CMakeLists.txt
new file mode 100644
index 000000000..0a5a557ec
--- /dev/null
+++ b/lib/libesp32_div/esp-nimble-cpp/examples/NimBLE_server_get_client_name/main/CMakeLists.txt
@@ -0,0 +1,4 @@
+set(COMPONENT_SRCS "main.cpp")
+set(COMPONENT_ADD_INCLUDEDIRS ".")
+
+register_component()
diff --git a/lib/libesp32_div/esp-nimble-cpp/examples/NimBLE_server_get_client_name/main/main.cpp b/lib/libesp32_div/esp-nimble-cpp/examples/NimBLE_server_get_client_name/main/main.cpp
new file mode 100644
index 000000000..e255807f8
--- /dev/null
+++ b/lib/libesp32_div/esp-nimble-cpp/examples/NimBLE_server_get_client_name/main/main.cpp
@@ -0,0 +1,83 @@
+/** NimBLE_server_get_client_name
+ *
+ * Demonstrates 2 ways for the server to read the device name from the connected client.
+ *
+ * Created: on June 24 2024
+ * Author: H2zero
+ *
+ */
+
+#include
+
+// See the following for generating UUIDs:
+// https://www.uuidgenerator.net/
+
+#define SERVICE_UUID "4fafc201-1fb5-459e-8fcc-c5c9c331914b"
+#define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361b26a8"
+#define ENC_CHARACTERISTIC_UUID "9551f35b-8d91-42e4-8f7e-1358dfe272dc"
+
+NimBLEServer* pServer;
+
+class ServerCallbacks : public NimBLEServerCallbacks {
+ // Same as before but now includes the name parameter
+ void onConnect(NimBLEServer* pServer, NimBLEConnInfo& connInfo, std::string& name) override {
+ printf("Client address: %s Name: %s\n", connInfo.getAddress().toString().c_str(), name.c_str());
+ }
+
+ // Same as before but now includes the name parameter
+ void onAuthenticationComplete(const NimBLEConnInfo& connInfo, const std::string& name) override {
+ if (!connInfo.isEncrypted()) {
+ NimBLEDevice::getServer()->disconnect(connInfo.getConnHandle());
+ printf("Encrypt connection failed - disconnecting client\n");
+ return;
+ }
+
+ printf("Encrypted Client address: %s Name: %s\n", connInfo.getAddress().toString().c_str(), name.c_str());
+ }
+};
+
+extern "C" void app_main(void) {
+ printf("Starting BLE Server!\n");
+
+ NimBLEDevice::init("Connect to me!");
+ NimBLEDevice::setSecurityAuth(true, false, true); // Enable bonding to see full name on phones.
+
+ pServer = NimBLEDevice::createServer();
+ NimBLEService* pService = pServer->createService(SERVICE_UUID);
+ NimBLECharacteristic* pCharacteristic =
+ pService->createCharacteristic(CHARACTERISTIC_UUID, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE);
+ pCharacteristic->setValue("Hello World says NimBLE!");
+
+ NimBLECharacteristic* pEncCharacteristic = pService->createCharacteristic(
+ ENC_CHARACTERISTIC_UUID,
+ (NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::READ_ENC | NIMBLE_PROPERTY::WRITE_ENC));
+ pEncCharacteristic->setValue("Hello World says NimBLE Encrypted");
+
+ pService->start();
+
+ pServer->setCallbacks(new ServerCallbacks());
+ pServer->getPeerNameOnConnect(true); // Setting this will enable the onConnect callback that provides the name.
+
+ BLEAdvertising* pAdvertising = NimBLEDevice::getAdvertising();
+ pAdvertising->addServiceUUID(SERVICE_UUID);
+ pAdvertising->setScanResponse(true);
+
+ pAdvertising->start();
+ printf("Advertising started, connect with your phone.\n");
+
+ while (true) {
+ auto clientCount = pServer->getConnectedCount();
+ if (clientCount) {
+ printf("Connected clients:\n");
+ for (auto i = 0; i < clientCount; ++i) {
+ NimBLEConnInfo peerInfo = pServer->getPeerInfo(i);
+ printf("Client address: %s Name: %s\n", peerInfo.getAddress().toString().c_str(),
+ // This function blocks until the name is retrieved, so cannot be used in callback functions.
+ pServer->getPeerName(peerInfo).c_str());
+
+ }
+ }
+
+ vTaskDelay(pdMS_TO_TICKS(10000));
+ }
+}
diff --git a/lib/libesp32_div/esp-nimble-cpp/examples/basic/BLE_client/main/main.cpp b/lib/libesp32_div/esp-nimble-cpp/examples/basic/BLE_client/main/main.cpp
index 18308840e..cfb80e9bf 100644
--- a/lib/libesp32_div/esp-nimble-cpp/examples/basic/BLE_client/main/main.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/examples/basic/BLE_client/main/main.cpp
@@ -51,17 +51,28 @@ class MyClientCallback : public BLEClientCallbacks {
}
/***************** New - Security handled here ********************
****** Note: these are the same return values as defaults ********/
- uint32_t onPassKeyRequest(){
- printf("Client PassKeyRequest\n");
- return 123456;
- }
- bool onConfirmPIN(uint32_t pass_key){
- printf("The passkey YES/NO number: %" PRIu32"\n", pass_key);
- return true;
- }
+ void onPassKeyEntry(const NimBLEConnInfo& connInfo){
+ printf("Server Passkey Entry\n");
+ /** This should prompt the user to enter the passkey displayed
+ * on the peer device.
+ */
+ NimBLEDevice::injectPassKey(connInfo, 123456);
+ };
- void onAuthenticationComplete(BLEConnInfo& connInfo){
- printf("Starting BLE work!\n");
+ void onConfirmPIN(const NimBLEConnInfo& connInfo, uint32_t pass_key){
+ printf("The passkey YES/NO number: %" PRIu32 "\n", pass_key);
+ /** Inject false if passkeys don't match. */
+ NimBLEDevice::injectConfirmPIN(connInfo, true);
+ };
+
+ /** Pairing process complete, we can check the results in connInfo */
+ void onAuthenticationComplete(const NimBLEConnInfo& connInfo){
+ if(!connInfo.isEncrypted()) {
+ printf("Encrypt connection failed - disconnecting\n");
+ /** Find the client with the connection handle provided in desc */
+ NimBLEDevice::getClientByID(connInfo.getConnHandle())->disconnect();
+ return;
+ }
}
/*******************************************************************/
};
diff --git a/lib/libesp32_div/esp-nimble-cpp/examples/basic/BLE_notify/main/main.cpp b/lib/libesp32_div/esp-nimble-cpp/examples/basic/BLE_notify/main/main.cpp
index e966f8b8e..b17f49aaa 100644
--- a/lib/libesp32_div/esp-nimble-cpp/examples/basic/BLE_notify/main/main.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/examples/basic/BLE_notify/main/main.cpp
@@ -57,19 +57,29 @@ class MyServerCallbacks: public BLEServerCallbacks {
}
/***************** New - Security handled here ********************
****** Note: these are the same return values as defaults ********/
- uint32_t onPassKeyRequest(){
- printf("Server PassKeyRequest\n");
- return 123456;
- }
+ uint32_t onPassKeyDisplay(){
+ printf("Server Passkey Display\n");
+ /** This should return a random 6 digit number for security
+ * or make your own static passkey as done here.
+ */
+ return 123456;
+ };
- bool onConfirmPIN(uint32_t pass_key){
- printf("The passkey YES/NO number: %" PRIu32"\n", pass_key);
- return true;
- }
+ void onConfirmPIN(const NimBLEConnInfo& connInfo, uint32_t pass_key){
+ printf("The passkey YES/NO number: %" PRIu32 "\n", pass_key);
+ /** Inject false if passkeys don't match. */
+ NimBLEDevice::injectConfirmPIN(connInfo, true);
+ };
- void onAuthenticationComplete(BLEConnInfo& connInfo){
- printf("Starting BLE work!\n");
- }
+ void onAuthenticationComplete(const NimBLEConnInfo& connInfo){
+ /** Check that encryption was successful, if not we disconnect the client */
+ if(!connInfo.isEncrypted()) {
+ NimBLEDevice::getServer()->disconnect(connInfo.getConnHandle());
+ printf("Encrypt connection failed - disconnecting client\n");
+ return;
+ }
+ printf("Starting BLE work!");
+ };
/*******************************************************************/
};
@@ -128,7 +138,6 @@ void app_main(void) {
NIMBLE_PROPERTY::INDICATE
);
- // https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.descriptor.gatt.client_characteristic_configuration.xml
// Create a BLE Descriptor
/***************************************************
NOTE: DO NOT create a 2902 descriptor.
diff --git a/lib/libesp32_div/esp-nimble-cpp/examples/basic/BLE_uart/main/main.cpp b/lib/libesp32_div/esp-nimble-cpp/examples/basic/BLE_uart/main/main.cpp
index 3aa20fb94..18df6fa63 100644
--- a/lib/libesp32_div/esp-nimble-cpp/examples/basic/BLE_uart/main/main.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/examples/basic/BLE_uart/main/main.cpp
@@ -59,19 +59,29 @@ class MyServerCallbacks: public BLEServerCallbacks {
}
/***************** New - Security handled here ********************
****** Note: these are the same return values as defaults ********/
- uint32_t onPassKeyRequest(){
- printf("Server PassKeyRequest\n");
- return 123456;
- }
+ uint32_t onPassKeyDisplay(){
+ printf("Server Passkey Display\n");
+ /** This should return a random 6 digit number for security
+ * or make your own static passkey as done here.
+ */
+ return 123456;
+ };
- bool onConfirmPIN(uint32_t pass_key){
- printf("The passkey YES/NO number: %" PRIu32"\n", pass_key);
- return true;
- }
+ void onConfirmPIN(const NimBLEConnInfo& connInfo, uint32_t pass_key){
+ printf("The passkey YES/NO number: %" PRIu32 "\n", pass_key);
+ /** Inject false if passkeys don't match. */
+ NimBLEDevice::injectConfirmPIN(connInfo, true);
+ };
- void onAuthenticationComplete(BLEConnInfo& connInfo){
- printf("Starting BLE work!\n");
- }
+ void onAuthenticationComplete(const NimBLEConnInfo& connInfo){
+ /** Check that encryption was successful, if not we disconnect the client */
+ if(!connInfo.isEncrypted()) {
+ NimBLEDevice::getServer()->disconnect(connInfo.getConnHandle());
+ printf("Encrypt connection failed - disconnecting client\n");
+ return;
+ }
+ printf("Starting BLE work!");
+ };
/*******************************************************************/
};
diff --git a/lib/libesp32_div/esp-nimble-cpp/package.json b/lib/libesp32_div/esp-nimble-cpp/package.json
new file mode 100644
index 000000000..1efe13e63
--- /dev/null
+++ b/lib/libesp32_div/esp-nimble-cpp/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "esp-nimble-cpp",
+ "version": "1.5.0",
+ "description": "NimBLE, BLE stack for the Espressif ESP32, ESP32-S and ESP32-C series of SoCs",
+ "keywords": [
+ "BLE",
+ "espidf",
+ "arduino",
+ "espressif",
+ "esp32"
+ ],
+ "license": "LGPL-2.1-or-later",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/h2zero/esp-nimble-cpp"
+ }
+}
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLE2904.cpp b/lib/libesp32_div/esp-nimble-cpp/src/NimBLE2904.cpp
index b518d9b00..486fa5ef5 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLE2904.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLE2904.cpp
@@ -12,10 +12,6 @@
* Author: kolban
*/
-/*
- * See also:
- * https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml
- */
#include "nimconfig.h"
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL)
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLE2904.h b/lib/libesp32_div/esp-nimble-cpp/src/NimBLE2904.h
index 29dde51e8..52ae2d3db 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLE2904.h
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLE2904.h
@@ -33,9 +33,6 @@ struct BLE2904_Data {
* @brief Descriptor for Characteristic Presentation Format.
*
* This is a convenience descriptor for the Characteristic Presentation Format which has a UUID of 0x2904.
- *
- * See also:
- * https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml
*/
class NimBLE2904: public NimBLEDescriptor {
public:
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAddress.cpp b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAddress.cpp
index d8ce5e88c..af7956b3c 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAddress.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAddress.cpp
@@ -138,6 +138,15 @@ uint8_t NimBLEAddress::getType() const {
} // getType
+/**
+ * @brief Determine if this address is a Resolvable Private Address.
+ * @return True if the address is a RPA.
+ */
+bool NimBLEAddress::isRpa() const {
+ return (m_addrType && ((m_address[5] & 0xc0) == 0x40));
+} // isRpa
+
+
/**
* @brief Convert a BLE address to a string.
*
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAddress.h b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAddress.h
index a6e10a09c..8a55b3ebf 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAddress.h
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAddress.h
@@ -43,6 +43,7 @@ public:
NimBLEAddress(uint8_t address[6], uint8_t type = BLE_ADDR_PUBLIC);
NimBLEAddress(const std::string &stringAddress, uint8_t type = BLE_ADDR_PUBLIC);
NimBLEAddress(const uint64_t &address, uint8_t type = BLE_ADDR_PUBLIC);
+ bool isRpa() const;
bool equals(const NimBLEAddress &otherAddress) const;
const uint8_t* getNative() const;
std::string toString() const;
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAdvertisedDevice.cpp b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAdvertisedDevice.cpp
index 3ef71f541..bdc1358eb 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAdvertisedDevice.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAdvertisedDevice.cpp
@@ -203,6 +203,24 @@ std::string NimBLEAdvertisedDevice::getURI() {
return "";
} // getURI
+/**
+ * @brief Get the data from any type available in the advertisement
+ * @param [in] type The advertised data type BLE_HS_ADV_TYPE
+ * @return The data available under the type `type`
+*/
+std::string NimBLEAdvertisedDevice::getPayloadByType(uint16_t type) {
+ size_t data_loc = 0;
+
+ if(findAdvField(type, 0, &data_loc) > 0) {
+ ble_hs_adv_field *field = (ble_hs_adv_field *)&m_payload[data_loc];
+ if(field->length > 1) {
+ return std::string((char*)field->value, field->length - 1);
+ }
+ }
+
+ return "";
+} // getPayloadByType
+
/**
* @brief Get the advertised name.
@@ -556,6 +574,14 @@ bool NimBLEAdvertisedDevice::haveURI() {
return findAdvField(BLE_HS_ADV_TYPE_URI) > 0;
} // haveURI
+/**
+ * @brief Does this advertisement have a adv type `type`?
+ * @return True if there is a `type` present.
+*/
+bool NimBLEAdvertisedDevice::haveType(uint16_t type) {
+ return findAdvField(type) > 0;
+}
+
/**
* @brief Does the advertisement contain a target address?
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAdvertisedDevice.h b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAdvertisedDevice.h
index 5b7a69f24..7869fb547 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAdvertisedDevice.h
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAdvertisedDevice.h
@@ -53,6 +53,7 @@ public:
uint8_t getManufacturerDataCount();
std::string getManufacturerData(uint8_t index = 0);
std::string getURI();
+ std::string getPayloadByType(uint16_t type);
/**
* @brief A template to convert the service data to .
@@ -134,6 +135,7 @@ public:
bool haveAdvInterval();
bool haveTargetAddress();
bool haveURI();
+ bool haveType(uint16_t type);
std::string toString();
bool isConnectable();
bool isLegacyAdvertisement();
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAdvertising.cpp b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAdvertising.cpp
index 283f26493..0ce08ed58 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAdvertising.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAdvertising.cpp
@@ -96,8 +96,8 @@ void NimBLEAdvertising::addServiceUUID(const char* serviceUUID) {
/**
- * @brief Add a service uuid to exposed list of services.
- * @param [in] serviceUUID The UUID of the service to expose.
+ * @brief Remove a service UUID from the advertisment.
+ * @param [in] serviceUUID The UUID of the service to remove.
*/
void NimBLEAdvertising::removeServiceUUID(const NimBLEUUID &serviceUUID) {
for(auto it = m_serviceUUIDs.begin(); it != m_serviceUUIDs.end(); ++it) {
@@ -110,10 +110,17 @@ void NimBLEAdvertising::removeServiceUUID(const NimBLEUUID &serviceUUID) {
} // addServiceUUID
+/**
+ * @brief Remove all service UUIDs from the advertisment.
+ */
+void NimBLEAdvertising::removeServices() {
+ std::vector().swap(m_serviceUUIDs);
+ m_advDataSet = false;
+} // removeServices
+
+
/**
* @brief Set the device appearance in the advertising data.
- * The codes for distinct appearances can be found here:\n
- * https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.gap.appearance.xml.
* @param [in] appearance The appearance of the device in the advertising data.
*/
void NimBLEAdvertising::setAppearance(uint16_t appearance) {
@@ -137,7 +144,7 @@ void NimBLEAdvertising::addTxPower() {
* @param [in] name The name to advertise.
*/
void NimBLEAdvertising::setName(const std::string &name) {
- m_name.assign(name.begin(), name.end());
+ std::vector(name.begin(), name.end()).swap(m_name);
m_advData.name = &m_name[0];
m_advData.name_len = m_name.size();
m_advDataSet = false;
@@ -149,7 +156,7 @@ void NimBLEAdvertising::setName(const std::string &name) {
* @param [in] data The data to advertise.
*/
void NimBLEAdvertising::setManufacturerData(const std::string &data) {
- m_mfgData.assign(data.begin(), data.end());
+ std::vector(data.begin(), data.end()).swap(m_mfgData);
m_advData.mfg_data = &m_mfgData[0];
m_advData.mfg_data_len = m_mfgData.size();
m_advDataSet = false;
@@ -173,7 +180,7 @@ void NimBLEAdvertising::setManufacturerData(const std::vector &data) {
* @param [in] uri The URI to advertise.
*/
void NimBLEAdvertising::setURI(const std::string &uri) {
- m_uri.assign(uri.begin(), uri.end());
+ std::vector(uri.begin(), uri.end()).swap(m_uri);
m_advData.uri = &m_uri[0];
m_advData.uri_len = m_uri.size();
m_advDataSet = false;
@@ -189,7 +196,8 @@ void NimBLEAdvertising::setURI(const std::string &uri) {
void NimBLEAdvertising::setServiceData(const NimBLEUUID &uuid, const std::string &data) {
switch (uuid.bitSize()) {
case 16: {
- m_svcData16.assign((uint8_t*)&uuid.getNative()->u16.value, (uint8_t*)&uuid.getNative()->u16.value + 2);
+ std::vector((uint8_t*)&uuid.getNative()->u16.value,
+ (uint8_t*)&uuid.getNative()->u16.value + 2).swap(m_svcData16);
m_svcData16.insert(m_svcData16.end(), data.begin(), data.end());
m_advData.svc_data_uuid16 = (uint8_t*)&m_svcData16[0];
m_advData.svc_data_uuid16_len = (data.length() > 0) ? m_svcData16.size() : 0;
@@ -197,7 +205,8 @@ void NimBLEAdvertising::setServiceData(const NimBLEUUID &uuid, const std::string
}
case 32: {
- m_svcData32.assign((uint8_t*)&uuid.getNative()->u32.value, (uint8_t*)&uuid.getNative()->u32.value + 4);
+ std::vector((uint8_t*)&uuid.getNative()->u32.value,
+ (uint8_t*)&uuid.getNative()->u32.value + 4).swap(m_svcData32);
m_svcData32.insert(m_svcData32.end(), data.begin(), data.end());
m_advData.svc_data_uuid32 = (uint8_t*)&m_svcData32[0];
m_advData.svc_data_uuid32_len = (data.length() > 0) ? m_svcData32.size() : 0;
@@ -205,7 +214,8 @@ void NimBLEAdvertising::setServiceData(const NimBLEUUID &uuid, const std::string
}
case 128: {
- m_svcData128.assign(uuid.getNative()->u128.value, uuid.getNative()->u128.value + 16);
+ std::vector(uuid.getNative()->u128.value,
+ uuid.getNative()->u128.value + 16).swap(m_svcData128);
m_svcData128.insert(m_svcData128.end(), data.begin(), data.end());
m_advData.svc_data_uuid128 = (uint8_t*)&m_svcData128[0];
m_advData.svc_data_uuid128_len = (data.length() > 0) ? m_svcData128.size() : 0;
@@ -402,7 +412,7 @@ void NimBLEAdvertising::setScanResponseData(NimBLEAdvertisementData& advertiseme
* @param [in] dirAddr The address of a peer to directly advertise to.
* @return True if advertising started successfully.
*/
-bool NimBLEAdvertising::start(uint32_t duration, void (*advCompleteCB)(NimBLEAdvertising *pAdv), NimBLEAddress* dirAddr) {
+bool NimBLEAdvertising::start(uint32_t duration, advCompleteCB_t advCompleteCB, NimBLEAddress* dirAddr) {
NIMBLE_LOGD(LOG_TAG, ">> Advertising start: customAdvData: %d, customScanResponseData: %d",
m_customAdvData, m_customScanResponseData);
@@ -490,8 +500,8 @@ bool NimBLEAdvertising::start(uint32_t duration, void (*advCompleteCB)(NimBLEAdv
if(nullptr == (m_advData.uuids16 = (ble_uuid16_t*)realloc((void*)m_advData.uuids16,
(m_advData.num_uuids16 + 1) * sizeof(ble_uuid16_t))))
{
- NIMBLE_LOGC(LOG_TAG, "Error, no mem");
- abort();
+ NIMBLE_LOGE(LOG_TAG, "Error, no mem");
+ return false;
}
memcpy((void*)&m_advData.uuids16[m_advData.num_uuids16],
&it.getNative()->u16, sizeof(ble_uuid16_t));
@@ -509,8 +519,8 @@ bool NimBLEAdvertising::start(uint32_t duration, void (*advCompleteCB)(NimBLEAdv
if(nullptr == (m_advData.uuids32 = (ble_uuid32_t*)realloc((void*)m_advData.uuids32,
(m_advData.num_uuids32 + 1) * sizeof(ble_uuid32_t))))
{
- NIMBLE_LOGC(LOG_TAG, "Error, no mem");
- abort();
+ NIMBLE_LOGE(LOG_TAG, "Error, no mem");
+ return false;
}
memcpy((void*)&m_advData.uuids32[m_advData.num_uuids32],
&it.getNative()->u32, sizeof(ble_uuid32_t));
@@ -528,8 +538,8 @@ bool NimBLEAdvertising::start(uint32_t duration, void (*advCompleteCB)(NimBLEAdv
if(nullptr == (m_advData.uuids128 = (ble_uuid128_t*)realloc((void*)m_advData.uuids128,
(m_advData.num_uuids128 + 1) * sizeof(ble_uuid128_t))))
{
- NIMBLE_LOGC(LOG_TAG, "Error, no mem");
- abort();
+ NIMBLE_LOGE(LOG_TAG, "Error, no mem");
+ return false;
}
memcpy((void*)&m_advData.uuids128[m_advData.num_uuids128],
&it.getNative()->u128, sizeof(ble_uuid128_t));
@@ -762,7 +772,7 @@ int NimBLEAdvertising::handleGapEvent(struct ble_gap_event *event, void *arg) {
case BLE_HS_EOS:
case BLE_HS_ECONTROLLER:
case BLE_HS_ENOTSYNCED:
- NIMBLE_LOGC(LOG_TAG, "host reset, rc=%d", event->adv_complete.reason);
+ NIMBLE_LOGE(LOG_TAG, "host reset, rc=%d", event->adv_complete.reason);
NimBLEDevice::onReset(event->adv_complete.reason);
return 0;
default:
@@ -800,9 +810,6 @@ void NimBLEAdvertisementData::addData(char * data, size_t length) {
/**
* @brief Set the appearance.
* @param [in] appearance The appearance code value.
- *
- * See also:
- * https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.gap.appearance.xml
*/
void NimBLEAdvertisementData::setAppearance(uint16_t appearance) {
char cdata[2];
@@ -1069,4 +1076,12 @@ std::string NimBLEAdvertisementData::getPayload() {
return m_payload;
} // getPayload
+
+/**
+ * @brief Clear the advertisement data for reuse.
+ */
+void NimBLEAdvertisementData::clearData() {
+ m_payload.clear();
+}
+
#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV */
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAdvertising.h b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAdvertising.h
index 14c34662c..dc36d0732 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAdvertising.h
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAdvertising.h
@@ -33,6 +33,7 @@
#include "NimBLEUUID.h"
#include "NimBLEAddress.h"
+#include
#include
/* COMPATIBILITY - DO NOT USE */
@@ -44,6 +45,9 @@
#define ESP_BLE_ADV_FLAG_NON_LIMIT_DISC (0x00 )
/* ************************* */
+class NimBLEAdvertising;
+
+typedef std::function advCompleteCB_t;
/**
* @brief Advertisement data set by the programmer to be published by the %BLE server.
@@ -72,6 +76,7 @@ public:
void addTxPower();
void setPreferredParams(uint16_t min, uint16_t max);
std::string getPayload(); // Retrieve the current advert payload.
+ void clearData(); // Clear the advertisement data.
private:
friend class NimBLEAdvertising;
@@ -92,7 +97,8 @@ public:
void addServiceUUID(const NimBLEUUID &serviceUUID);
void addServiceUUID(const char* serviceUUID);
void removeServiceUUID(const NimBLEUUID &serviceUUID);
- bool start(uint32_t duration = 0, void (*advCompleteCB)(NimBLEAdvertising *pAdv) = nullptr, NimBLEAddress* dirAddr = nullptr);
+ bool start(uint32_t duration = 0, advCompleteCB_t advCompleteCB = nullptr, NimBLEAddress* dirAddr = nullptr);
+ void removeServices();
bool stop();
void setAppearance(uint16_t appearance);
void setName(const std::string &name);
@@ -129,7 +135,7 @@ private:
bool m_customScanResponseData;
bool m_scanResp;
bool m_advDataSet;
- void (*m_advCompCB)(NimBLEAdvertising *pAdv);
+ advCompleteCB_t m_advCompCB{nullptr};
uint8_t m_slaveItvl[4];
uint32_t m_duration;
std::vector m_svcData16;
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAttValue.h b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAttValue.h
index be346d502..cc8599ab6 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAttValue.h
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEAttValue.h
@@ -24,6 +24,7 @@
#include
#include
+#include
#ifndef CONFIG_NIMBLE_CPP_ATT_VALUE_TIMESTAMP_ENABLED
# define CONFIG_NIMBLE_CPP_ATT_VALUE_TIMESTAMP_ENABLED 0
@@ -41,7 +42,6 @@
# error CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH cannot be less than 1; Range = 1 : 512
#endif
-
/* Used to determine if the type passed to a template has a c_str() and length() method. */
template
struct Has_c_str_len : std::false_type {};
@@ -266,7 +266,8 @@ public:
/** @brief Subscript operator */
uint8_t operator [](int pos) const {
- assert(pos < m_attr_len && "out of range"); return m_attr_value[pos]; }
+ NIMBLE_CPP_DEBUG_ASSERT(pos < m_attr_len);
+ return m_attr_value[pos]; }
/** @brief Operator; Get the value as a std::vector. */
operator std::vector() const {
@@ -311,7 +312,7 @@ public:
inline NimBLEAttValue::NimBLEAttValue(uint16_t init_len, uint16_t max_len) {
m_attr_value = (uint8_t*)calloc(init_len + 1, 1);
- assert(m_attr_value && "No Mem");
+ NIMBLE_CPP_DEBUG_ASSERT(m_attr_value);
m_attr_max_len = std::min(BLE_ATT_ATTR_MAX_LEN, (int)max_len);
m_attr_len = 0;
m_capacity = init_len;
@@ -354,7 +355,7 @@ inline NimBLEAttValue& NimBLEAttValue::operator =(const NimBLEAttValue & source)
inline void NimBLEAttValue::deepCopy(const NimBLEAttValue & source) {
uint8_t* res = (uint8_t*)realloc( m_attr_value, source.m_capacity + 1);
- assert(res && "deepCopy: realloc failed");
+ NIMBLE_CPP_DEBUG_ASSERT(res);
ble_npl_hw_enter_critical();
m_attr_value = res;
@@ -389,7 +390,7 @@ inline bool NimBLEAttValue::setValue(const uint8_t *value, uint16_t len) {
res = (uint8_t*)realloc(m_attr_value, (len + 1));
m_capacity = len;
}
- assert(res && "setValue: realloc failed");
+ NIMBLE_CPP_DEBUG_ASSERT(res);
#if CONFIG_NIMBLE_CPP_ATT_VALUE_TIMESTAMP_ENABLED
time_t t = time(nullptr);
@@ -424,7 +425,7 @@ inline NimBLEAttValue& NimBLEAttValue::append(const uint8_t *value, uint16_t len
res = (uint8_t*)realloc(m_attr_value, (new_len + 1));
m_capacity = new_len;
}
- assert(res && "append: realloc failed");
+ NIMBLE_CPP_DEBUG_ASSERT(res);
#if CONFIG_NIMBLE_CPP_ATT_VALUE_TIMESTAMP_ENABLED
time_t t = time(nullptr);
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLECharacteristic.cpp b/lib/libesp32_div/esp-nimble-cpp/src/NimBLECharacteristic.cpp
index f6db049de..82aa20fd1 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLECharacteristic.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLECharacteristic.cpp
@@ -87,9 +87,7 @@ NimBLEDescriptor* NimBLECharacteristic::createDescriptor(const char* uuid, uint3
*/
NimBLEDescriptor* NimBLECharacteristic::createDescriptor(const NimBLEUUID &uuid, uint32_t properties, uint16_t max_len) {
NimBLEDescriptor* pDescriptor = nullptr;
- if(uuid == NimBLEUUID(uint16_t(0x2902))) {
- assert(0 && "0x2902 descriptors cannot be manually created");
- } else if (uuid == NimBLEUUID(uint16_t(0x2904))) {
+ if (uuid == NimBLEUUID(uint16_t(0x2904))) {
pDescriptor = new NimBLE2904(this);
} else {
pDescriptor = new NimBLEDescriptor(uuid, properties, max_len, this);
@@ -266,7 +264,7 @@ int NimBLECharacteristic::handleGapEvent(uint16_t conn_handle, uint16_t attr_han
NIMBLE_LOGW(LOG_TAG, "Conn_handle (%d) is above the maximum value (%d)", conn_handle, BLE_HCI_LE_CONN_HANDLE_MAX);
return BLE_ATT_ERR_INVALID_HANDLE;
}
-
+
const ble_uuid_t *uuid;
int rc;
NimBLEConnInfo peerInfo;
@@ -279,12 +277,12 @@ int NimBLECharacteristic::handleGapEvent(uint16_t conn_handle, uint16_t attr_han
if(ble_uuid_cmp(uuid, &pCharacteristic->getUUID().getNative()->u) == 0){
switch(ctxt->op) {
case BLE_GATT_ACCESS_OP_READ_CHR: {
- rc = ble_gap_conn_find(conn_handle, &peerInfo.m_desc);
- assert(rc == 0);
+ ble_gap_conn_find(conn_handle, &peerInfo.m_desc);
// If the packet header is only 8 bytes this is a follow up of a long read
// so we don't want to call the onRead() callback again.
if(ctxt->om->om_pkthdr_len > 8 ||
+ conn_handle == BLE_HS_CONN_HANDLE_NONE ||
pCharacteristic->m_value.size() <= (ble_att_mtu(peerInfo.m_desc.conn_handle) - 3)) {
pCharacteristic->m_pCallbacks->onRead(pCharacteristic, peerInfo);
}
@@ -316,8 +314,8 @@ int NimBLECharacteristic::handleGapEvent(uint16_t conn_handle, uint16_t attr_han
len += next->om_len;
next = SLIST_NEXT(next, om_next);
}
- rc = ble_gap_conn_find(conn_handle, &peerInfo.m_desc);
- assert(rc == 0);
+
+ ble_gap_conn_find(conn_handle, &peerInfo.m_desc);
pCharacteristic->setValue(buf, len);
pCharacteristic->m_pCallbacks->onWrite(pCharacteristic, peerInfo);
return 0;
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEClient.cpp b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEClient.cpp
index bd50e3221..e49827f42 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEClient.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEClient.cpp
@@ -111,7 +111,7 @@ NimBLEClient::~NimBLEClient() {
*/
void NimBLEClient::dcTimerCb(ble_npl_event *event) {
/* NimBLEClient *pClient = (NimBLEClient*)event->arg;
- NIMBLE_LOGC(LOG_TAG, "Timed out disconnecting from %s - resetting host",
+ NIMBLE_LOGE(LOG_TAG, "Timed out disconnecting from %s - resetting host",
std::string(pClient->getPeerAddress()).c_str());
*/
ble_hs_sched_reset(BLE_HS_ECONTROLLER);
@@ -189,7 +189,7 @@ bool NimBLEClient::connect(const NimBLEAddress &address, bool deleteAttributes)
NIMBLE_LOGD(LOG_TAG, ">> connect(%s)", address.toString().c_str());
if(!NimBLEDevice::m_synced) {
- NIMBLE_LOGC(LOG_TAG, "Host reset, wait for sync.");
+ NIMBLE_LOGE(LOG_TAG, "Host reset, wait for sync.");
return false;
}
@@ -458,9 +458,6 @@ void NimBLEClient::setConnectionParams(uint16_t minInterval, uint16_t maxInterva
// These are not used by NimBLE at this time - Must leave at defaults
//m_pConnParams->min_ce_len = minConnTime; // Minimum length of connection event in 0.625ms units
//m_pConnParams->max_ce_len = maxConnTime; // Maximum length of connection event in 0.625ms units
-
- int rc = NimBLEUtils::checkConnParams(&m_pConnParams);
- assert(rc == 0 && "Invalid Connection parameters");
} // setConnectionParams
@@ -551,6 +548,66 @@ uint16_t NimBLEClient::getConnId() {
return m_conn_id;
} // getConnId
+/**
+ * @brief Clear the connection information for this client.
+ * @note This is designed to be used to reset the connection information after
+ * calling setConnection(), and should not be used to disconnect from a
+ * peer. To disconnect from a peer, use disconnect().
+ */
+void NimBLEClient::clearConnection() {
+ m_conn_id = BLE_HS_CONN_HANDLE_NONE;
+ m_connEstablished = false;
+ m_peerAddress = NimBLEAddress();
+} // clearConnection
+
+/**
+ * @brief Set the connection information for this client.
+ * @param [in] connInfo The connection information.
+ * @return True on success.
+ * @note Sets the connection established flag to true.
+ * @note If the client is already connected to a peer, this will return false.
+ * @note This is designed to be used when a connection is made outside of the
+ * NimBLEClient class, such as when a connection is made by the
+ * NimBLEServer class and the client is passed the connection id. This use
+ * enables the GATT Server to read the name of the device that has
+ * connected to it.
+ */
+bool NimBLEClient::setConnection(NimBLEConnInfo &connInfo) {
+ if (isConnected() || m_connEstablished) {
+ NIMBLE_LOGE(LOG_TAG, "Already connected");
+ return false;
+ }
+
+ m_peerAddress = connInfo.getAddress();
+ m_conn_id = connInfo.getConnHandle();
+ m_connEstablished = true;
+
+ return true;
+} // setConnection
+
+/**
+ * @brief Set the connection information for this client.
+ * @param [in] conn_id The connection id.
+ * @note Sets the connection established flag to true.
+ * @note This is designed to be used when a connection is made outside of the
+ * NimBLEClient class, such as when a connection is made by the
+ * NimBLEServer class and the client is passed the connection id. This use
+ * enables the GATT Server to read the name of the device that has
+ * connected to it.
+ * @note If the client is already connected to a peer, this will return false.
+ * @note This will look up the peer address using the connection id.
+ */
+bool NimBLEClient::setConnection(uint16_t conn_id) {
+ // we weren't provided the peer address, look it up using ble_gap_conn_find
+ NimBLEConnInfo connInfo;
+ int rc = ble_gap_conn_find(m_conn_id, &connInfo.m_desc);
+ if (rc != 0) {
+ NIMBLE_LOGE(LOG_TAG, "Connection info not found");
+ return false;
+ }
+
+ return setConnection(connInfo);
+} // setConnection
/**
* @brief Retrieve the address of the peer.
@@ -945,7 +1002,7 @@ int NimBLEClient::handleGapEvent(struct ble_gap_event *event, void *arg) {
case BLE_HS_ETIMEOUT_HCI:
case BLE_HS_ENOTSYNCED:
case BLE_HS_EOS:
- NIMBLE_LOGC(LOG_TAG, "Disconnect - host reset, rc=%d", rc);
+ NIMBLE_LOGE(LOG_TAG, "Disconnect - host reset, rc=%d", rc);
NimBLEDevice::onReset(rc);
break;
default:
@@ -1111,7 +1168,11 @@ int NimBLEClient::handleGapEvent(struct ble_gap_event *event, void *arg) {
{
NimBLEConnInfo peerInfo;
rc = ble_gap_conn_find(event->enc_change.conn_handle, &peerInfo.m_desc);
- assert(rc == 0);
+ if (rc != 0) {
+ NIMBLE_LOGE(LOG_TAG, "Connection info not found");
+ rc = 0;
+ break;
+ }
if (event->enc_change.status == (BLE_HS_ERR_HCI_BASE + BLE_ERR_PINKEY_MISSING)) {
// Key is missing, try deleting.
@@ -1125,6 +1186,19 @@ int NimBLEClient::handleGapEvent(struct ble_gap_event *event, void *arg) {
break;
} //BLE_GAP_EVENT_ENC_CHANGE
+ case BLE_GAP_EVENT_IDENTITY_RESOLVED: {
+ NimBLEConnInfo peerInfo;
+ rc = ble_gap_conn_find(event->identity_resolved.conn_handle, &peerInfo.m_desc);
+ if (rc != 0) {
+ NIMBLE_LOGE(LOG_TAG, "Connection info not found");
+ rc = 0;
+ break;
+ }
+
+ pClient->m_pClientCallbacks->onIdentity(peerInfo);
+ break;
+ } // BLE_GAP_EVENT_IDENTITY_RESOLVED
+
case BLE_GAP_EVENT_MTU: {
if(pClient->m_conn_id != event->mtu.conn_handle){
return 0;
@@ -1143,20 +1217,17 @@ int NimBLEClient::handleGapEvent(struct ble_gap_event *event, void *arg) {
if(pClient->m_conn_id != event->passkey.conn_handle)
return 0;
- if (event->passkey.params.action == BLE_SM_IOACT_DISP) {
- pkey.action = event->passkey.params.action;
- pkey.passkey = NimBLEDevice::m_passkey; // This is the passkey to be entered on peer
- rc = ble_sm_inject_io(event->passkey.conn_handle, &pkey);
- NIMBLE_LOGD(LOG_TAG, "ble_sm_inject_io result: %d", rc);
+ NimBLEConnInfo peerInfo;
+ rc = ble_gap_conn_find(event->passkey.conn_handle, &peerInfo.m_desc);
+ if (rc != 0) {
+ NIMBLE_LOGE(LOG_TAG, "Connection info not found");
+ rc = 0;
+ break;
+ }
- } else if (event->passkey.params.action == BLE_SM_IOACT_NUMCMP) {
+ if (event->passkey.params.action == BLE_SM_IOACT_NUMCMP) {
NIMBLE_LOGD(LOG_TAG, "Passkey on device's display: %" PRIu32, event->passkey.params.numcmp);
- pkey.action = event->passkey.params.action;
- pkey.numcmp_accept = pClient->m_pClientCallbacks->onConfirmPIN(event->passkey.params.numcmp);
-
- rc = ble_sm_inject_io(event->passkey.conn_handle, &pkey);
- NIMBLE_LOGD(LOG_TAG, "ble_sm_inject_io result: %d", rc);
-
+ pClient->m_pClientCallbacks->onConfirmPIN(peerInfo, event->passkey.params.numcmp);
//TODO: Handle out of band pairing
} else if (event->passkey.params.action == BLE_SM_IOACT_OOB) {
static uint8_t tem_oob[16] = {0};
@@ -1169,12 +1240,7 @@ int NimBLEClient::handleGapEvent(struct ble_gap_event *event, void *arg) {
////////
} else if (event->passkey.params.action == BLE_SM_IOACT_INPUT) {
NIMBLE_LOGD(LOG_TAG, "Enter the passkey");
- pkey.action = event->passkey.params.action;
- pkey.passkey = pClient->m_pClientCallbacks->onPassKeyRequest();
-
- rc = ble_sm_inject_io(event->passkey.conn_handle, &pkey);
- NIMBLE_LOGD(LOG_TAG, "ble_sm_inject_io result: %d", rc);
-
+ pClient->m_pClientCallbacks->onPassKeyEntry(peerInfo);
} else if (event->passkey.params.action == BLE_SM_IOACT_NONE) {
NIMBLE_LOGD(LOG_TAG, "No passkey action required");
}
@@ -1261,17 +1327,22 @@ bool NimBLEClientCallbacks::onConnParamsUpdateRequest(NimBLEClient* pClient, con
return true;
}
-uint32_t NimBLEClientCallbacks::onPassKeyRequest(){
- NIMBLE_LOGD("NimBLEClientCallbacks", "onPassKeyRequest: default: 123456");
- return 123456;
-}
+void NimBLEClientCallbacks::onPassKeyEntry(const NimBLEConnInfo& connInfo){
+ NIMBLE_LOGD("NimBLEClientCallbacks", "onPassKeyEntry: default: 123456");
+ NimBLEDevice::injectPassKey(connInfo, 123456);
+} //onPassKeyEntry
-void NimBLEClientCallbacks::onAuthenticationComplete(NimBLEConnInfo& peerInfo){
+void NimBLEClientCallbacks::onAuthenticationComplete(const NimBLEConnInfo& connInfo){
NIMBLE_LOGD("NimBLEClientCallbacks", "onAuthenticationComplete: default");
}
-bool NimBLEClientCallbacks::onConfirmPIN(uint32_t pin){
+
+void NimBLEClientCallbacks::onIdentity(const NimBLEConnInfo& connInfo){
+ NIMBLE_LOGD("NimBLEClientCallbacks", "onIdentity: default");
+} // onIdentity
+
+void NimBLEClientCallbacks::onConfirmPIN(const NimBLEConnInfo& connInfo, uint32_t pin){
NIMBLE_LOGD("NimBLEClientCallbacks", "onConfirmPIN: default: true");
- return true;
+ NimBLEDevice::injectConfirmPIN(connInfo, true);
}
#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL */
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEClient.h b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEClient.h
index 486b3d0b5..acef487bf 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEClient.h
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEClient.h
@@ -61,6 +61,9 @@ public:
bool deleteCallbacks = true);
std::string toString();
uint16_t getConnId();
+ void clearConnection();
+ bool setConnection(NimBLEConnInfo &conn_info);
+ bool setConnection(uint16_t conn_id);
uint16_t getMTU();
bool secureConnection();
void setConnectTimeout(uint32_t timeout);
@@ -144,23 +147,29 @@ public:
/**
* @brief Called when server requests a passkey for pairing.
- * @return The passkey to be sent to the server.
+ * @param [in] connInfo A reference to a NimBLEConnInfo instance containing the peer info.
*/
- virtual uint32_t onPassKeyRequest();
+ virtual void onPassKeyEntry(const NimBLEConnInfo& connInfo);
/**
* @brief Called when the pairing procedure is complete.
* @param [in] connInfo A reference to a NimBLEConnInfo instance containing the peer info.\n
* This can be used to check the status of the connection encryption/pairing.
*/
- virtual void onAuthenticationComplete(NimBLEConnInfo& connInfo);
+ virtual void onAuthenticationComplete(const NimBLEConnInfo& connInfo);
/**
* @brief Called when using numeric comparision for pairing.
+ * @param [in] connInfo A reference to a NimBLEConnInfo instance containing the peer info.
* @param [in] pin The pin to compare with the server.
- * @return True to accept the pin.
*/
- virtual bool onConfirmPIN(uint32_t pin);
+ virtual void onConfirmPIN(const NimBLEConnInfo& connInfo, uint32_t pin);
+
+ /**
+ * @brief Called when the peer identity address is resolved.
+ * @param [in] connInfo A reference to a NimBLEConnInfo instance with information
+ */
+ virtual void onIdentity(const NimBLEConnInfo& connInfo);
};
#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL */
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEConnInfo.h b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEConnInfo.h
index c764c2462..274e6d3b0 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEConnInfo.h
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEConnInfo.h
@@ -12,47 +12,47 @@ friend class NimBLEClient;
friend class NimBLECharacteristic;
friend class NimBLEDescriptor;
- ble_gap_conn_desc m_desc;
- NimBLEConnInfo() { m_desc = {}; }
- NimBLEConnInfo(ble_gap_conn_desc desc) { m_desc = desc; }
+ ble_gap_conn_desc m_desc{};
+ NimBLEConnInfo(){};
+ NimBLEConnInfo(ble_gap_conn_desc desc) { m_desc = desc; }
public:
/** @brief Gets the over-the-air address of the connected peer */
- NimBLEAddress getAddress() { return NimBLEAddress(m_desc.peer_ota_addr); }
+ NimBLEAddress getAddress() const { return NimBLEAddress(m_desc.peer_ota_addr); }
/** @brief Gets the ID address of the connected peer */
- NimBLEAddress getIdAddress() { return NimBLEAddress(m_desc.peer_id_addr); }
+ NimBLEAddress getIdAddress() const { return NimBLEAddress(m_desc.peer_id_addr); }
- /** @brief Gets the connection handle of the connected peer */
- uint16_t getConnHandle() { return m_desc.conn_handle; }
+ /** @brief Gets the connection handle (also known as the connection id) of the connected peer */
+ uint16_t getConnHandle() const { return m_desc.conn_handle; }
/** @brief Gets the connection interval for this connection (in 1.25ms units) */
- uint16_t getConnInterval() { return m_desc.conn_itvl; }
+ uint16_t getConnInterval() const { return m_desc.conn_itvl; }
/** @brief Gets the supervision timeout for this connection (in 10ms units) */
- uint16_t getConnTimeout() { return m_desc.supervision_timeout; }
+ uint16_t getConnTimeout() const { return m_desc.supervision_timeout; }
/** @brief Gets the allowable latency for this connection (unit = number of intervals) */
- uint16_t getConnLatency() { return m_desc.conn_latency; }
+ uint16_t getConnLatency() const { return m_desc.conn_latency; }
/** @brief Gets the maximum transmission unit size for this connection (in bytes) */
- uint16_t getMTU() { return ble_att_mtu(m_desc.conn_handle); }
+ uint16_t getMTU() const { return ble_att_mtu(m_desc.conn_handle); }
/** @brief Check if we are in the master role in this connection */
- bool isMaster() { return (m_desc.role == BLE_GAP_ROLE_MASTER); }
+ bool isMaster() const { return (m_desc.role == BLE_GAP_ROLE_MASTER); }
/** @brief Check if we are in the slave role in this connection */
- bool isSlave() { return (m_desc.role == BLE_GAP_ROLE_SLAVE); }
+ bool isSlave() const { return (m_desc.role == BLE_GAP_ROLE_SLAVE); }
/** @brief Check if we are connected to a bonded peer */
- bool isBonded() { return (m_desc.sec_state.bonded == 1); }
+ bool isBonded() const { return (m_desc.sec_state.bonded == 1); }
/** @brief Check if the connection in encrypted */
- bool isEncrypted() { return (m_desc.sec_state.encrypted == 1); }
+ bool isEncrypted() const { return (m_desc.sec_state.encrypted == 1); }
/** @brief Check if the the connection has been authenticated */
- bool isAuthenticated() { return (m_desc.sec_state.authenticated == 1); }
+ bool isAuthenticated() const { return (m_desc.sec_state.authenticated == 1); }
/** @brief Gets the key size used to encrypt the connection */
- uint8_t getSecKeySize() { return m_desc.sec_state.key_size; }
+ uint8_t getSecKeySize() const { return m_desc.sec_state.key_size; }
};
#endif
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEDescriptor.cpp b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEDescriptor.cpp
index 28a151315..a457782a8 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEDescriptor.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEDescriptor.cpp
@@ -55,7 +55,14 @@ NimBLEDescriptor::NimBLEDescriptor(NimBLEUUID uuid, uint16_t properties, uint16_
m_pCharacteristic = pCharacteristic;
m_pCallbacks = &defaultCallbacks; // No initial callback.
m_properties = 0;
- m_removed = 0;
+
+ // Check if this is the client configuration descriptor and set to removed if true.
+ if (uuid == NimBLEUUID((uint16_t)0x2902)) {
+ NIMBLE_LOGW(LOG_TAG, "Manually created 2902 descriptor has no functionality; please remove.");
+ m_removed = 1;
+ } else {
+ m_removed = 0;
+ }
if (properties & BLE_GATT_CHR_F_READ) { // convert uint16_t properties to uint8_t
m_properties |= BLE_ATT_F_READ;
@@ -155,7 +162,7 @@ int NimBLEDescriptor::handleGapEvent(uint16_t conn_handle, uint16_t attr_handle,
const ble_uuid_t *uuid;
int rc;
- NimBLEConnInfo peerInfo;
+ NimBLEConnInfo peerInfo{};
NimBLEDescriptor* pDescriptor = (NimBLEDescriptor*)arg;
NIMBLE_LOGD(LOG_TAG, "Descriptor %s %s event", pDescriptor->getUUID().toString().c_str(),
@@ -165,12 +172,12 @@ int NimBLEDescriptor::handleGapEvent(uint16_t conn_handle, uint16_t attr_handle,
if(ble_uuid_cmp(uuid, &pDescriptor->getUUID().getNative()->u) == 0){
switch(ctxt->op) {
case BLE_GATT_ACCESS_OP_READ_DSC: {
- rc = ble_gap_conn_find(conn_handle, &peerInfo.m_desc);
- assert(rc == 0);
+ ble_gap_conn_find(conn_handle, &peerInfo.m_desc);
// If the packet header is only 8 bytes this is a follow up of a long read
// so we don't want to call the onRead() callback again.
if(ctxt->om->om_pkthdr_len > 8 ||
+ conn_handle == BLE_HS_CONN_HANDLE_NONE ||
pDescriptor->m_value.size() <= (ble_att_mtu(peerInfo.getConnHandle()) - 3)) {
pDescriptor->m_pCallbacks->onRead(pDescriptor, peerInfo);
}
@@ -182,11 +189,9 @@ int NimBLEDescriptor::handleGapEvent(uint16_t conn_handle, uint16_t attr_handle,
}
case BLE_GATT_ACCESS_OP_WRITE_DSC: {
- rc = ble_gap_conn_find(conn_handle, &peerInfo.m_desc);
- assert(rc == 0);
+ ble_gap_conn_find(conn_handle, &peerInfo.m_desc);
uint16_t att_max_len = pDescriptor->m_value.max_size();
-
if (ctxt->om->om_len > att_max_len) {
return BLE_ATT_ERR_INVALID_ATTR_VALUE_LEN;
}
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEDevice.cpp b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEDevice.cpp
index eb9c17703..817f3c3a3 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEDevice.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEDevice.cpp
@@ -299,7 +299,7 @@ size_t NimBLEDevice::getClientListSize() {
/**
* @brief Get a reference to a client by connection ID.
* @param [in] conn_id The client connection ID to search for.
- * @return A pointer to the client object with the spcified connection ID.
+ * @return A pointer to the client object with the specified connection ID or nullptr.
*/
/* STATIC */
NimBLEClient* NimBLEDevice::getClientByID(uint16_t conn_id) {
@@ -308,7 +308,7 @@ NimBLEClient* NimBLEDevice::getClientByID(uint16_t conn_id) {
return (*it);
}
}
- assert(0);
+
return nullptr;
} // getClientByID
@@ -444,12 +444,13 @@ int NimBLEDevice::getPower() {
*/
/* STATIC*/
NimBLEAddress NimBLEDevice::getAddress() {
- ble_addr_t addr = {BLE_ADDR_PUBLIC, 0};
+ ble_addr_t addr = {m_own_addr_type, 0};
- if(BLE_HS_ENOADDR == ble_hs_id_copy_addr(BLE_ADDR_PUBLIC, addr.val, NULL)) {
- NIMBLE_LOGD(LOG_TAG, "Public address not found, checking random");
- addr.type = BLE_ADDR_RANDOM;
- ble_hs_id_copy_addr(BLE_ADDR_RANDOM, addr.val, NULL);
+ if(BLE_HS_ENOADDR == ble_hs_id_copy_addr(m_own_addr_type, addr.val, NULL)) {
+ // NIMBLE_LOGD(LOG_TAG, "Public address not found, checking random");
+ // addr.type = BLE_ADDR_RANDOM;
+ // ble_hs_id_copy_addr(BLE_ADDR_RANDOM, addr.val, NULL);
+ return NimBLEAddress(); // return blank to report error
}
return NimBLEAddress(addr);
@@ -567,10 +568,16 @@ int NimBLEDevice::getNumBonds() {
/**
* @brief Deletes all bonding information.
+ * @returns true on success, false on failure.
*/
/*STATIC*/
-void NimBLEDevice::deleteAllBonds() {
- ble_store_clear();
+bool NimBLEDevice::deleteAllBonds() {
+ int rc = ble_store_clear();
+ if (rc != 0) {
+ NIMBLE_LOGE(LOG_TAG, "Failed to delete all bonds; rc=%d", rc);
+ return false;
+ }
+ return true;
}
@@ -685,6 +692,7 @@ bool NimBLEDevice::whiteListAdd(const NimBLEAddress & address) {
int rc = ble_gap_wl_set(&wlVec[0], wlVec.size());
if (rc != 0) {
NIMBLE_LOGE(LOG_TAG, "Failed adding to whitelist rc=%d", rc);
+ m_whiteList.pop_back();
return false;
}
@@ -771,7 +779,7 @@ void NimBLEDevice::onReset(int reason)
m_synced = false;
- NIMBLE_LOGC(LOG_TAG, "Resetting state; reason=%d, %s", reason,
+ NIMBLE_LOGE(LOG_TAG, "Resetting state; reason=%d, %s", reason,
NimBLEUtils::returnCodeToString(reason));
#if defined(CONFIG_BT_NIMBLE_ROLE_OBSERVER)
@@ -799,7 +807,10 @@ void NimBLEDevice::onSync(void)
/* Make sure we have proper identity address set (public preferred) */
int rc = ble_hs_util_ensure_addr(0);
- assert(rc == 0);
+ if (rc != 0) {
+ NIMBLE_LOGE(LOG_TAG, "error ensuring address; rc=%d", rc);
+ return;
+ }
#ifndef ESP_PLATFORM
rc = ble_hs_id_infer_auto(m_own_addr_type, &m_own_addr_type);
@@ -871,9 +882,11 @@ void NimBLEDevice::init(const std::string &deviceName) {
ESP_ERROR_CHECK(errRc);
+#if CONFIG_IDF_TARGET_ESP32
esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT);
+#endif
-#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0)
+#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0) | !defined(CONFIG_NIMBLE_CPP_IDF)
esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
# if defined (CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
bt_cfg.bluetooth_mode = ESP_BT_MODE_BLE;
@@ -902,14 +915,16 @@ void NimBLEDevice::init(const std::string &deviceName) {
ble_hs_cfg.sm_bonding = 0;
ble_hs_cfg.sm_mitm = 0;
ble_hs_cfg.sm_sc = 1;
- ble_hs_cfg.sm_our_key_dist = 1;
- ble_hs_cfg.sm_their_key_dist = 3;
+ ble_hs_cfg.sm_our_key_dist = BLE_SM_PAIR_KEY_DIST_ENC | BLE_SM_PAIR_KEY_DIST_ID;
+ ble_hs_cfg.sm_their_key_dist = BLE_SM_PAIR_KEY_DIST_ENC | BLE_SM_PAIR_KEY_DIST_ID;
ble_hs_cfg.store_status_cb = ble_store_util_status_rr; /*TODO: Implement handler for this*/
// Set the device name.
rc = ble_svc_gap_device_name_set(deviceName.c_str());
- assert(rc == 0);
+ if (rc != 0) {
+ NIMBLE_LOGE(LOG_TAG, "ble_svc_gap_device_name_set() failed; rc=%d", rc);
+ }
ble_store_config_init();
@@ -935,13 +950,13 @@ void NimBLEDevice::deinit(bool clearAll) {
int ret = nimble_port_stop();
if (ret == 0) {
nimble_port_deinit();
-#ifdef ESP_PLATFORM
-#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0)
+#ifdef CONFIG_NIMBLE_CPP_IDF
+# if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0)
ret = esp_nimble_hci_and_controller_deinit();
if (ret != ESP_OK) {
NIMBLE_LOGE(LOG_TAG, "esp_nimble_hci_and_controller_deinit() failed with error: %d", ret);
}
-#endif
+# endif
#endif
initialized = false;
m_synced = false;
@@ -1150,6 +1165,43 @@ int NimBLEDevice::startSecurity(uint16_t conn_id) {
} // startSecurity
+/**
+ * @brief Inject the provided passkey into the Security Manager
+ * @param [in] peerInfo Connection information for the peer
+ * @param [in] pin The 6-digit pin to inject
+ * @return true if the passkey was injected successfully.
+ */
+bool NimBLEDevice::injectPassKey(const NimBLEConnInfo& peerInfo, uint32_t pin) {
+ int rc = 0;
+ struct ble_sm_io pkey = {0,0};
+
+ pkey.action = BLE_SM_IOACT_INPUT;
+ pkey.passkey = pin;
+
+ rc = ble_sm_inject_io(peerInfo.getConnHandle(), &pkey);
+ NIMBLE_LOGD(LOG_TAG, "BLE_SM_IOACT_INPUT; ble_sm_inject_io result: %d", rc);
+ return rc == 0;
+}
+
+
+/**
+ * @brief Inject the provided numeric comparison response into the Security Manager
+ * @param [in] peerInfo Connection information for the peer
+ * @param [in] accept Whether the user confirmed or declined the comparison
+ */
+bool NimBLEDevice::injectConfirmPIN(const NimBLEConnInfo& peerInfo, bool accept) {
+ int rc = 0;
+ struct ble_sm_io pkey = {0,0};
+
+ pkey.action = BLE_SM_IOACT_NUMCMP;
+ pkey.numcmp_accept = accept;
+
+ rc = ble_sm_inject_io(peerInfo.getConnHandle(), &pkey);
+ NIMBLE_LOGD(LOG_TAG, "BLE_SM_IOACT_NUMCMP; ble_sm_inject_io result: %d", rc);
+ return rc == 0;
+}
+
+
/**
* @brief Check if the device address is on our ignore list.
* @param [in] address The address to look for.
@@ -1202,10 +1254,22 @@ void NimBLEDevice::setCustomGapHandler(gap_event_handler handler) {
int rc = ble_gap_event_listener_register(&m_listener, m_customGapHandler, NULL);
if(rc == BLE_HS_EALREADY){
NIMBLE_LOGI(LOG_TAG, "Already listening to GAP events.");
+ } else if (rc != 0) {
+ NIMBLE_LOGE(LOG_TAG, "ble_gap_event_listener_register: rc=%d %s", rc, NimBLEUtils::returnCodeToString(rc));
}
- else{
- assert(rc == 0);
- }
+
} // setCustomGapHandler
-#endif // CONFIG_BT_ENABLED
+#if CONFIG_NIMBLE_CPP_DEBUG_ASSERT_ENABLED || __DOXYGEN__
+/**
+ * @brief Debug assert - weak function.
+ * @param [in] file The file where the assert occurred.
+ * @param [in] line The line number where the assert occurred.
+ */
+void nimble_cpp_assert(const char *file, unsigned line) {
+ NIMBLE_LOGC("", "Assertion failed at %s:%u\n", file, line);
+ abort();
+}
+#endif // CONFIG_NIMBLE_CPP_DEBUG_ASSERT_ENABLED
+
+#endif // CONFIG_BT_ENABLED
\ No newline at end of file
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEDevice.h b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEDevice.h
index ddb7a60c5..64bd4ed34 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEDevice.h
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEDevice.h
@@ -136,6 +136,8 @@ public:
static void setSecurityPasskey(uint32_t pin);
static uint32_t getSecurityPasskey();
static int startSecurity(uint16_t conn_id);
+ static bool injectConfirmPIN(const NimBLEConnInfo& peerInfo, bool accept);
+ static bool injectPassKey(const NimBLEConnInfo& peerInfo, uint32_t pin);
static int setMTU(uint16_t mtu);
static uint16_t getMTU();
static bool isIgnored(const NimBLEAddress &address);
@@ -172,7 +174,7 @@ public:
static bool deleteBond(const NimBLEAddress &address);
static int getNumBonds();
static bool isBonded(const NimBLEAddress &address);
- static void deleteAllBonds();
+ static bool deleteAllBonds();
static NimBLEAddress getBondedAddress(int index);
#endif
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEEddystoneTLM.cpp b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEEddystoneTLM.cpp
index 7a9c5102c..1f48a1609 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEEddystoneTLM.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEEddystoneTLM.cpp
@@ -81,7 +81,7 @@ uint16_t NimBLEEddystoneTLM::getVolt() {
* @return The temperature value.
*/
float NimBLEEddystoneTLM::getTemp() {
- return ENDIAN_CHANGE_U16(m_eddystoneData.temp) / 256.0f;
+ return (int16_t)ENDIAN_CHANGE_U16(m_eddystoneData.temp) / 256.0f;
} // getTemp
/**
@@ -203,7 +203,7 @@ void NimBLEEddystoneTLM::setVolt(uint16_t volt) {
* @param [in] temp The temperature value.
*/
void NimBLEEddystoneTLM::setTemp(float temp) {
- m_eddystoneData.temp = (uint16_t)temp;
+ m_eddystoneData.temp = ENDIAN_CHANGE_U16((int16_t)(temp * 256.0f));
} // setTemp
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEExtAdvertising.cpp b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEExtAdvertising.cpp
index b979c9fd0..67d8a586a 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEExtAdvertising.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEExtAdvertising.cpp
@@ -341,7 +341,7 @@ int NimBLEExtAdvertising::handleGapEvent(struct ble_gap_event *event, void *arg)
case BLE_HS_EOS:
case BLE_HS_ECONTROLLER:
case BLE_HS_ENOTSYNCED:
- NIMBLE_LOGC(LOG_TAG, "host reset, rc = %d", event->adv_complete.reason);
+ NIMBLE_LOGE(LOG_TAG, "host reset, rc = %d", event->adv_complete.reason);
NimBLEDevice::onReset(event->adv_complete.reason);
return 0;
default:
@@ -623,9 +623,6 @@ void NimBLEExtAdvertisement::addData(const uint8_t * data, size_t length) {
/**
* @brief Set the appearance.
* @param [in] appearance The appearance code value.
- *
- * See also:
- * https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.gap.appearance.xml
*/
void NimBLEExtAdvertisement::setAppearance(uint16_t appearance) {
char cdata[2];
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEHIDDevice.cpp b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEHIDDevice.cpp
index a2310eb9e..12c14def1 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEHIDDevice.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEHIDDevice.cpp
@@ -26,28 +26,34 @@ NimBLEHIDDevice::NimBLEHIDDevice(NimBLEServer* server) {
/*
* Here we create mandatory services described in bluetooth specification
*/
- m_deviceInfoService = server->createService(NimBLEUUID((uint16_t) 0x180a));
- m_hidService = server->createService(NimBLEUUID((uint16_t) 0x1812));
- m_batteryService = server->createService(NimBLEUUID((uint16_t) 0x180f));
+ m_deviceInfoService = server->createService(NimBLEUUID((uint16_t)0x180a));
+ m_hidService = server->createService(NimBLEUUID((uint16_t)0x1812));
+ m_batteryService = server->createService(NimBLEUUID((uint16_t)0x180f));
/*
* Mandatory characteristic for device info service
*/
- m_pnpCharacteristic = m_deviceInfoService->createCharacteristic((uint16_t) 0x2a50, NIMBLE_PROPERTY::READ);
+ m_pnpCharacteristic = m_deviceInfoService->createCharacteristic((uint16_t)0x2a50, NIMBLE_PROPERTY::READ);
+
+ /*
+ * Non-mandatory characteristics for device info service
+ * Will be created on demand
+ */
+ m_manufacturerCharacteristic = nullptr;
/*
* Mandatory characteristics for HID service
*/
- m_hidInfoCharacteristic = m_hidService->createCharacteristic((uint16_t) 0x2a4a, NIMBLE_PROPERTY::READ);
- m_reportMapCharacteristic = m_hidService->createCharacteristic((uint16_t) 0x2a4b, NIMBLE_PROPERTY::READ);
- m_hidControlCharacteristic = m_hidService->createCharacteristic((uint16_t) 0x2a4c, NIMBLE_PROPERTY::WRITE_NR);
- m_protocolModeCharacteristic = m_hidService->createCharacteristic((uint16_t) 0x2a4e, NIMBLE_PROPERTY::WRITE_NR | NIMBLE_PROPERTY::READ);
+ m_hidInfoCharacteristic = m_hidService->createCharacteristic((uint16_t)0x2a4a, NIMBLE_PROPERTY::READ);
+ m_reportMapCharacteristic = m_hidService->createCharacteristic((uint16_t)0x2a4b, NIMBLE_PROPERTY::READ);
+ m_hidControlCharacteristic = m_hidService->createCharacteristic((uint16_t)0x2a4c, NIMBLE_PROPERTY::WRITE_NR);
+ m_protocolModeCharacteristic = m_hidService->createCharacteristic((uint16_t)0x2a4e, NIMBLE_PROPERTY::WRITE_NR | NIMBLE_PROPERTY::READ);
/*
* Mandatory battery level characteristic with notification and presence descriptor
*/
- m_batteryLevelCharacteristic = m_batteryService->createCharacteristic((uint16_t) 0x2a19, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::NOTIFY);
- NimBLE2904* batteryLevelDescriptor = (NimBLE2904*)m_batteryLevelCharacteristic->createDescriptor((uint16_t) 0x2904);
+ m_batteryLevelCharacteristic = m_batteryService->createCharacteristic((uint16_t)0x2a19, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::NOTIFY);
+ NimBLE2904 *batteryLevelDescriptor = (NimBLE2904*)m_batteryLevelCharacteristic->createDescriptor((uint16_t)0x2904);
batteryLevelDescriptor->setFormat(NimBLE2904::FORMAT_UINT8);
batteryLevelDescriptor->setNamespace(1);
batteryLevelDescriptor->setUnit(0x27ad);
@@ -56,8 +62,8 @@ NimBLEHIDDevice::NimBLEHIDDevice(NimBLEServer* server) {
* This value is setup here because its default value in most usage cases, its very rare to use boot mode
* and we want to simplify library using as much as possible
*/
- const uint8_t pMode[] = { 0x01 };
- protocolMode()->setValue((uint8_t*) pMode, 1);
+ const uint8_t pMode[] = {0x01};
+ protocolMode()->setValue((uint8_t*)pMode, 1);
}
NimBLEHIDDevice::~NimBLEHIDDevice() {
@@ -86,7 +92,10 @@ void NimBLEHIDDevice::startServices() {
* @brief Create a manufacturer characteristic (this characteristic is optional).
*/
NimBLECharacteristic* NimBLEHIDDevice::manufacturer() {
- m_manufacturerCharacteristic = m_deviceInfoService->createCharacteristic((uint16_t) 0x2a29, NIMBLE_PROPERTY::READ);
+ if (m_manufacturerCharacteristic == nullptr) {
+ m_manufacturerCharacteristic = m_deviceInfoService->createCharacteristic((uint16_t)0x2a29, NIMBLE_PROPERTY::READ);
+ }
+
return m_manufacturerCharacteristic;
}
@@ -95,7 +104,7 @@ NimBLECharacteristic* NimBLEHIDDevice::manufacturer() {
* @param [in] name The manufacturer name of this HID device.
*/
void NimBLEHIDDevice::manufacturer(std::string name) {
- m_manufacturerCharacteristic->setValue(name);
+ manufacturer()->setValue(name);
}
/**
@@ -106,7 +115,15 @@ void NimBLEHIDDevice::manufacturer(std::string name) {
* @param [in] version The produce version number.
*/
void NimBLEHIDDevice::pnp(uint8_t sig, uint16_t vid, uint16_t pid, uint16_t version) {
- uint8_t pnp[] = { sig, (uint8_t) (vid >> 8), (uint8_t) vid, (uint8_t) (pid >> 8), (uint8_t) pid, (uint8_t) (version >> 8), (uint8_t) version };
+ uint8_t pnp[] = {
+ sig,
+ ((uint8_t*)&vid)[0],
+ ((uint8_t*)&vid)[1],
+ ((uint8_t*)&pid)[0],
+ ((uint8_t*)&pid)[1],
+ ((uint8_t*)&version)[0],
+ ((uint8_t*)&version)[1]
+ };
m_pnpCharacteristic->setValue(pnp, sizeof(pnp));
}
@@ -116,7 +133,7 @@ void NimBLEHIDDevice::pnp(uint8_t sig, uint16_t vid, uint16_t pid, uint16_t vers
* @param [in] flags The HID Class Specification release number to use.
*/
void NimBLEHIDDevice::hidInfo(uint8_t country, uint8_t flags) {
- uint8_t info[] = { 0x11, 0x1, country, flags };
+ uint8_t info[] = {0x11, 0x1, country, flags};
m_hidInfoCharacteristic->setValue(info, sizeof(info));
}
@@ -126,11 +143,11 @@ void NimBLEHIDDevice::hidInfo(uint8_t country, uint8_t flags) {
* @return pointer to new input report characteristic
*/
NimBLECharacteristic* NimBLEHIDDevice::inputReport(uint8_t reportID) {
- NimBLECharacteristic* inputReportCharacteristic = m_hidService->createCharacteristic((uint16_t) 0x2a4d, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::NOTIFY | NIMBLE_PROPERTY::READ_ENC);
- NimBLEDescriptor* inputReportDescriptor = inputReportCharacteristic->createDescriptor((uint16_t) 0x2908, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::READ_ENC);
+ NimBLECharacteristic *inputReportCharacteristic = m_hidService->createCharacteristic((uint16_t)0x2a4d, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::NOTIFY | NIMBLE_PROPERTY::READ_ENC);
+ NimBLEDescriptor *inputReportDescriptor = inputReportCharacteristic->createDescriptor((uint16_t)0x2908, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::READ_ENC);
- uint8_t desc1_val[] = { reportID, 0x01 };
- inputReportDescriptor->setValue((uint8_t*) desc1_val, 2);
+ uint8_t desc1_val[] = {reportID, 0x01};
+ inputReportDescriptor->setValue((uint8_t*)desc1_val, 2);
return inputReportCharacteristic;
}
@@ -141,11 +158,11 @@ NimBLECharacteristic* NimBLEHIDDevice::inputReport(uint8_t reportID) {
* @return Pointer to new output report characteristic
*/
NimBLECharacteristic* NimBLEHIDDevice::outputReport(uint8_t reportID) {
- NimBLECharacteristic* outputReportCharacteristic = m_hidService->createCharacteristic((uint16_t) 0x2a4d, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::WRITE_NR | NIMBLE_PROPERTY::READ_ENC | NIMBLE_PROPERTY::WRITE_ENC);
- NimBLEDescriptor* outputReportDescriptor = outputReportCharacteristic->createDescriptor((uint16_t) 0x2908, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::READ_ENC | NIMBLE_PROPERTY::WRITE_ENC);
+ NimBLECharacteristic *outputReportCharacteristic = m_hidService->createCharacteristic((uint16_t)0x2a4d, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::WRITE_NR | NIMBLE_PROPERTY::READ_ENC | NIMBLE_PROPERTY::WRITE_ENC);
+ NimBLEDescriptor *outputReportDescriptor = outputReportCharacteristic->createDescriptor((uint16_t)0x2908, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::READ_ENC | NIMBLE_PROPERTY::WRITE_ENC);
- uint8_t desc1_val[] = { reportID, 0x02 };
- outputReportDescriptor->setValue((uint8_t*) desc1_val, 2);
+ uint8_t desc1_val[] = {reportID, 0x02};
+ outputReportDescriptor->setValue((uint8_t*)desc1_val, 2);
return outputReportCharacteristic;
}
@@ -156,11 +173,11 @@ NimBLECharacteristic* NimBLEHIDDevice::outputReport(uint8_t reportID) {
* @return Pointer to new feature report characteristic
*/
NimBLECharacteristic* NimBLEHIDDevice::featureReport(uint8_t reportID) {
- NimBLECharacteristic* featureReportCharacteristic = m_hidService->createCharacteristic((uint16_t) 0x2a4d, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::READ_ENC | NIMBLE_PROPERTY::WRITE_ENC);
- NimBLEDescriptor* featureReportDescriptor = featureReportCharacteristic->createDescriptor((uint16_t) 0x2908, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::READ_ENC | NIMBLE_PROPERTY::WRITE_ENC);
+ NimBLECharacteristic *featureReportCharacteristic = m_hidService->createCharacteristic((uint16_t)0x2a4d, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::READ_ENC | NIMBLE_PROPERTY::WRITE_ENC);
+ NimBLEDescriptor *featureReportDescriptor = featureReportCharacteristic->createDescriptor((uint16_t)0x2908, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::READ_ENC | NIMBLE_PROPERTY::WRITE_ENC);
- uint8_t desc1_val[] = { reportID, 0x03 };
- featureReportDescriptor->setValue((uint8_t*) desc1_val, 2);
+ uint8_t desc1_val[] = {reportID, 0x03};
+ featureReportDescriptor->setValue((uint8_t*)desc1_val, 2);
return featureReportCharacteristic;
}
@@ -169,14 +186,14 @@ NimBLECharacteristic* NimBLEHIDDevice::featureReport(uint8_t reportID) {
* @brief Creates a keyboard boot input report characteristic
*/
NimBLECharacteristic* NimBLEHIDDevice::bootInput() {
- return m_hidService->createCharacteristic((uint16_t) 0x2a22, NIMBLE_PROPERTY::NOTIFY);
+ return m_hidService->createCharacteristic((uint16_t)0x2a22, NIMBLE_PROPERTY::NOTIFY);
}
/**
* @brief Create a keyboard boot output report characteristic
*/
NimBLECharacteristic* NimBLEHIDDevice::bootOutput() {
- return m_hidService->createCharacteristic((uint16_t) 0x2a32, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::WRITE_NR);
+ return m_hidService->createCharacteristic((uint16_t)0x2a32, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::WRITE_NR);
}
/**
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEHIDDevice.h b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEHIDDevice.h
index 0e8b2828a..6461a4f32 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEHIDDevice.h
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEHIDDevice.h
@@ -33,6 +33,7 @@
#define HID_DIGITAL_PEN 0x03C7
#define HID_BARCODE 0x03C8
+#define PNPVersionField(MajorVersion, MinorVersion, PatchVersion) ((MajorVersion << 16) & 0xFF00) | ((MinorVersion << 8) & 0x00F0) | (PatchVersion & 0x000F)
/**
* @brief A model of a %BLE Human Interface Device.
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLELog.h b/lib/libesp32_div/esp-nimble-cpp/src/NimBLELog.h
index 542e3d982..0ccdf4163 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLELog.h
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLELog.h
@@ -14,6 +14,7 @@
#if defined(CONFIG_NIMBLE_CPP_IDF) // using esp-idf
# include "esp_log.h"
+# include "console/console.h"
# ifndef CONFIG_NIMBLE_CPP_LOG_LEVEL
# define CONFIG_NIMBLE_CPP_LOG_LEVEL 0
# endif
@@ -35,22 +36,6 @@
# define NIMBLE_LOGE(tag, format, ...) \
NIMBLE_CPP_LOG_PRINT(ESP_LOG_ERROR, tag, format, ##__VA_ARGS__)
-# define NIMBLE_LOGC(tag, format, ...) \
- NIMBLE_CPP_LOG_PRINT(ESP_LOG_ERROR, tag, format, ##__VA_ARGS__)
-
-// These defines pollute the global namespace and conflict with Tasmota and basically always turn on `seriallog 3`
-#ifdef LOG_LEVEL_DEBUG
-#undef LOG_LEVEL_DEBUG
-#endif
-
-#ifdef LOG_LEVEL_INFO
-#undef LOG_LEVEL_INFO
-#endif
-
-#ifdef LOG_LEVEL_ERROR
-#undef LOG_LEVEL_ERROR
-#endif
-
#else // using Arduino
# include "nimble/porting/nimble/include/syscfg/syscfg.h"
# include "nimble/console/console.h"
@@ -82,12 +67,13 @@
# if CONFIG_NIMBLE_CPP_LOG_LEVEL >= 1
# define NIMBLE_LOGE( tag, format, ... ) console_printf("E %s: " format "\n", tag, ##__VA_ARGS__)
-# define NIMBLE_LOGC( tag, format, ... ) console_printf("CRIT %s: " format "\n", tag, ##__VA_ARGS__)
# else
# define NIMBLE_LOGE( tag, format, ... ) (void)tag
-# define NIMBLE_LOGC( tag, format, ... ) (void)tag
# endif
#endif /* CONFIG_NIMBLE_CPP_IDF */
+
+#define NIMBLE_LOGC( tag, format, ... ) console_printf("CRIT %s: " format "\n", tag, ##__VA_ARGS__)
+
#endif /* CONFIG_BT_ENABLED */
#endif /* MAIN_NIMBLELOG_H_ */
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEScan.cpp b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEScan.cpp
index c7ee07a0f..b4fe6a921 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEScan.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEScan.cpp
@@ -359,7 +359,7 @@ bool NimBLEScan::start(uint32_t duration, bool is_continue) {
case BLE_HS_EOS:
case BLE_HS_ECONTROLLER:
case BLE_HS_ENOTSYNCED:
- NIMBLE_LOGC(LOG_TAG, "Unable to scan - Host Reset");
+ NIMBLE_LOGE(LOG_TAG, "Unable to scan - Host Reset");
break;
default:
@@ -459,7 +459,7 @@ void NimBLEScan::onHostSync() {
/**
* @brief Start scanning and block until scanning has been completed.
- * @param [in] duration The duration in seconds for which to scan.
+ * @param [in] duration The duration in milliseconds for which to scan.
* @param [in] is_continue Set to true to save previous scan results, false to clear them.
* @return The scan results.
*/
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEServer.cpp b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEServer.cpp
index daa5f2359..15f933c3f 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEServer.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEServer.cpp
@@ -27,6 +27,11 @@
#include "nimble/nimble/host/services/gatt/include/services/gatt/ble_svc_gatt.h"
#endif
+#include
+
+#define NIMBLE_SERVER_GET_PEER_NAME_ON_CONNECT_CB 0
+#define NIMBLE_SERVER_GET_PEER_NAME_ON_AUTH_CB 1
+
static const char* LOG_TAG = "NimBLEServer";
static NimBLEServerCallbacks defaultCallbacks;
@@ -47,6 +52,7 @@ NimBLEServer::NimBLEServer() {
#endif
m_svcChanged = false;
m_deleteCallbacks = true;
+ m_getPeerNameOnConnect = false;
} // NimBLEServer
@@ -186,9 +192,8 @@ void NimBLEServer::start() {
int rc = ble_gatts_start();
if (rc != 0) {
- NIMBLE_LOGE(LOG_TAG, "ble_gatts_start; rc=%d, %s", rc,
- NimBLEUtils::returnCodeToString(rc));
- abort();
+ NIMBLE_LOGE(LOG_TAG, "ble_gatts_start; rc=%d, %s", rc, NimBLEUtils::returnCodeToString(rc));
+ return;
}
#if CONFIG_NIMBLE_CPP_LOG_LEVEL >= 4
@@ -215,7 +220,9 @@ void NimBLEServer::start() {
if(svc->m_removed == 0) {
rc = ble_gatts_find_svc(&svc->getUUID().getNative()->u, &svc->m_handle);
if(rc != 0) {
- abort();
+ NIMBLE_LOGW(LOG_TAG, "GATT Server started without service: %s, Service %s",
+ svc->getUUID().toString().c_str(), svc->isStarted() ? "missing" : "not started");
+ continue; // Skip this service as it was not started
}
}
@@ -252,6 +259,15 @@ int NimBLEServer::disconnect(uint16_t connId, uint8_t reason) {
return rc;
} // disconnect
+/**
+ * @brief Disconnect the specified client with optional reason.
+ * @param [in] connInfo Connection of the client to disconnect.
+ * @param [in] reason code for disconnecting.
+ * @return NimBLE host return code.
+ */
+int NimBLEServer::disconnect(const NimBLEConnInfo &connInfo, uint8_t reason) {
+ return disconnect(connInfo.getConnHandle(), reason);
+} // disconnect
#if !CONFIG_BT_NIMBLE_EXT_ADV || defined(_DOXYGEN_)
/**
@@ -263,6 +279,15 @@ void NimBLEServer::advertiseOnDisconnect(bool aod) {
} // advertiseOnDisconnect
#endif
+/**
+ * @brief Set the server to automatically read the name from the connected peer before
+ * the onConnect callback is called and enables the override callback with name parameter.
+ * @param [in] enable Enable reading the connected peer name upon connection.
+ */
+void NimBLEServer::getPeerNameOnConnect(bool enable) {
+ m_getPeerNameOnConnect = enable;
+} // getPeerNameOnConnect
+
/**
* @brief Return the number of connected clients.
* @return The number of connected clients.
@@ -328,6 +353,113 @@ NimBLEConnInfo NimBLEServer::getPeerIDInfo(uint16_t id) {
return peerInfo;
} // getPeerIDInfo
+/**
+ * @brief Callback that is called after reading from the peer name characteristic.
+ * @details This will check the task pointer in the task data struct to determine
+ * the action to take once the name has been read. If there is a task waiting then
+ * it will be woken, if not, the the RC value is checked to determine which callback
+ * should be called.
+ */
+int NimBLEServer::peerNameCB(uint16_t conn_handle,
+ const struct ble_gatt_error *error,
+ struct ble_gatt_attr *attr,
+ void *arg) {
+ ble_task_data_t *pTaskData = (ble_task_data_t*)arg;
+ std::string *name = (std::string*)pTaskData->buf;
+ int rc = error->status;
+
+ if (rc == 0) {
+ if (attr) {
+ name->append(OS_MBUF_DATA(attr->om, char*), OS_MBUF_PKTLEN(attr->om));
+ return rc;
+ }
+ }
+
+ if (rc == BLE_HS_EDONE) {
+ // No ask means this was read for a callback.
+ if (pTaskData->task == nullptr) {
+ NimBLEServer* pServer = (NimBLEServer*)pTaskData->pATT;
+ NimBLEConnInfo peerInfo{};
+ ble_gap_conn_find(conn_handle, &peerInfo.m_desc);
+
+ // Use the rc value as a flag to indicate which callback should be called.
+ if (pTaskData->rc == NIMBLE_SERVER_GET_PEER_NAME_ON_CONNECT_CB) {
+ pServer->m_pServerCallbacks->onConnect(pServer, peerInfo, *name);
+ } else if (pTaskData->rc == NIMBLE_SERVER_GET_PEER_NAME_ON_AUTH_CB) {
+ pServer->m_pServerCallbacks->onAuthenticationComplete(peerInfo, *name);
+ }
+ }
+ } else {
+ NIMBLE_LOGE(LOG_TAG, "NimBLEServerPeerNameCB rc=%d; %s", rc, NimBLEUtils::returnCodeToString(rc));
+ }
+
+ if (pTaskData->task != nullptr) {
+ pTaskData->rc = rc;
+ xTaskNotifyGive(pTaskData->task);
+ } else {
+ // If the read was triggered for callback use then these were allocated.
+ delete name;
+ delete pTaskData;
+ }
+
+ return rc;
+}
+
+/**
+ * @brief Internal method that sends the read command.
+ */
+std::string NimBLEServer::getPeerNameInternal(uint16_t conn_handle, TaskHandle_t task, int cb_type) {
+ std::string *buf = new std::string{};
+ ble_task_data_t *taskData = new ble_task_data_t{this, task, cb_type, buf};
+ ble_uuid16_t uuid {{BLE_UUID_TYPE_16}, BLE_SVC_GAP_CHR_UUID16_DEVICE_NAME};
+ int rc = ble_gattc_read_by_uuid(conn_handle,
+ 1,
+ 0xffff,
+ ((ble_uuid_t*)&uuid),
+ NimBLEServer::peerNameCB,
+ taskData);
+ if (rc != 0) {
+ NIMBLE_LOGE(LOG_TAG, "ble_gattc_read_by_uuid rc=%d, %s", rc, NimBLEUtils::returnCodeToString(rc));
+ NimBLEConnInfo peerInfo{};
+ ble_gap_conn_find(conn_handle, &peerInfo.m_desc);
+ if (cb_type == NIMBLE_SERVER_GET_PEER_NAME_ON_CONNECT_CB) {
+ m_pServerCallbacks->onConnect(this, peerInfo, *buf);
+ } else if (cb_type == NIMBLE_SERVER_GET_PEER_NAME_ON_AUTH_CB) {
+ m_pServerCallbacks->onAuthenticationComplete(peerInfo, *buf);
+ }
+ delete buf;
+ delete taskData;
+ } else if (task != nullptr) {
+#ifdef ulTaskNotifyValueClear
+ // Clear the task notification value to ensure we block
+ ulTaskNotifyValueClear(task, ULONG_MAX);
+#endif
+ ulTaskNotifyTake(pdTRUE, portMAX_DELAY);
+ rc = taskData->rc;
+ std::string name{*(std::string*)taskData->buf};
+ delete buf;
+ delete taskData;
+
+ if (rc != 0 && rc != BLE_HS_EDONE) {
+ NIMBLE_LOGE(LOG_TAG, "getPeerName rc=%d %s", rc, NimBLEUtils::returnCodeToString(rc));
+ }
+
+ return name;
+ }
+ // TaskData and name buffer will be deleted in the callback.
+ return "";
+}
+
+/**
+ * @brief Get the name of the connected peer.
+ * @param connInfo A reference to a NimBLEConnInfo instance to read the name from.
+ * @returns A string containing the name.
+ * @note This is a blocking call and should NOT be called from any callbacks!
+ */
+std::string NimBLEServer::getPeerName(const NimBLEConnInfo& connInfo) {
+ std::string name = getPeerNameInternal(connInfo.getConnHandle(), xTaskGetCurrentTaskHandle());
+ return name;
+}
/**
* @brief Handle a GATT Server Event.
@@ -354,16 +486,22 @@ int NimBLEServer::handleGapEvent(struct ble_gap_event *event, void *arg) {
#if !CONFIG_BT_NIMBLE_EXT_ADV
NimBLEDevice::startAdvertising();
#endif
- }
- else {
- pServer->m_connectedPeersVec.push_back(event->connect.conn_handle);
-
+ } else {
rc = ble_gap_conn_find(event->connect.conn_handle, &peerInfo.m_desc);
if (rc != 0) {
return 0;
}
- pServer->m_pServerCallbacks->onConnect(pServer, peerInfo);
+ pServer->m_connectedPeersVec.push_back(event->connect.conn_handle);
+
+ if (pServer->m_getPeerNameOnConnect) {
+ pServer->getPeerNameInternal(event->connect.conn_handle,
+ nullptr,
+ NIMBLE_SERVER_GET_PEER_NAME_ON_CONNECT_CB);
+ } else {
+ pServer->m_pServerCallbacks->onConnect(pServer, peerInfo);
+ }
+
}
return 0;
@@ -378,7 +516,7 @@ int NimBLEServer::handleGapEvent(struct ble_gap_event *event, void *arg) {
case BLE_HS_EOS:
case BLE_HS_ECONTROLLER:
case BLE_HS_ENOTSYNCED:
- NIMBLE_LOGC(LOG_TAG, "Disconnect - host reset, rc=%d", event->disconnect.reason);
+ NIMBLE_LOGE(LOG_TAG, "Disconnect - host reset, rc=%d", event->disconnect.reason);
NimBLEDevice::onReset(event->disconnect.reason);
break;
default:
@@ -514,10 +652,26 @@ int NimBLEServer::handleGapEvent(struct ble_gap_event *event, void *arg) {
return BLE_ATT_ERR_INVALID_HANDLE;
}
- pServer->m_pServerCallbacks->onAuthenticationComplete(peerInfo);
+ if (pServer->m_getPeerNameOnConnect) {
+ pServer->getPeerNameInternal(event->enc_change.conn_handle,
+ nullptr,
+ NIMBLE_SERVER_GET_PEER_NAME_ON_AUTH_CB);
+ } else {
+ pServer->m_pServerCallbacks->onAuthenticationComplete(peerInfo);
+ }
return 0;
} // BLE_GAP_EVENT_ENC_CHANGE
+ case BLE_GAP_EVENT_IDENTITY_RESOLVED: {
+ rc = ble_gap_conn_find(event->identity_resolved.conn_handle, &peerInfo.m_desc);
+ if(rc != 0) {
+ return BLE_ATT_ERR_INVALID_HANDLE;
+ }
+
+ pServer->m_pServerCallbacks->onIdentity(peerInfo);
+ return 0;
+ } // BLE_GAP_EVENT_IDENTITY_RESOLVED
+
case BLE_GAP_EVENT_PASSKEY_ACTION: {
struct ble_sm_io pkey = {0,0};
@@ -528,19 +682,20 @@ int NimBLEServer::handleGapEvent(struct ble_gap_event *event, void *arg) {
// if the (static)passkey is the default, check the callback for custom value
// both values default to the same.
if(pkey.passkey == 123456) {
- pkey.passkey = pServer->m_pServerCallbacks->onPassKeyRequest();
+ pkey.passkey = pServer->m_pServerCallbacks->onPassKeyDisplay();
}
rc = ble_sm_inject_io(event->passkey.conn_handle, &pkey);
NIMBLE_LOGD(LOG_TAG, "BLE_SM_IOACT_DISP; ble_sm_inject_io result: %d", rc);
} else if (event->passkey.params.action == BLE_SM_IOACT_NUMCMP) {
NIMBLE_LOGD(LOG_TAG, "Passkey on device's display: %" PRIu32, event->passkey.params.numcmp);
- pkey.action = event->passkey.params.action;
- pkey.numcmp_accept = pServer->m_pServerCallbacks->onConfirmPIN(event->passkey.params.numcmp);
- rc = ble_sm_inject_io(event->passkey.conn_handle, &pkey);
- NIMBLE_LOGD(LOG_TAG, "BLE_SM_IOACT_NUMCMP; ble_sm_inject_io result: %d", rc);
+ rc = ble_gap_conn_find(event->passkey.conn_handle, &peerInfo.m_desc);
+ if(rc != 0) {
+ return BLE_ATT_ERR_INVALID_HANDLE;
+ }
+ pServer->m_pServerCallbacks->onConfirmPIN(peerInfo, event->passkey.params.numcmp);
//TODO: Handle out of band pairing
} else if (event->passkey.params.action == BLE_SM_IOACT_OOB) {
static uint8_t tem_oob[16] = {0};
@@ -551,14 +706,6 @@ int NimBLEServer::handleGapEvent(struct ble_gap_event *event, void *arg) {
rc = ble_sm_inject_io(event->passkey.conn_handle, &pkey);
NIMBLE_LOGD(LOG_TAG, "BLE_SM_IOACT_OOB; ble_sm_inject_io result: %d", rc);
//////////////////////////////////
- } else if (event->passkey.params.action == BLE_SM_IOACT_INPUT) {
- NIMBLE_LOGD(LOG_TAG, "Enter the passkey");
- pkey.action = event->passkey.params.action;
- pkey.passkey = pServer->m_pServerCallbacks->onPassKeyRequest();
-
- rc = ble_sm_inject_io(event->passkey.conn_handle, &pkey);
- NIMBLE_LOGD(LOG_TAG, "BLE_SM_IOACT_INPUT; ble_sm_inject_io result: %d", rc);
-
} else if (event->passkey.params.action == BLE_SM_IOACT_NONE) {
NIMBLE_LOGD(LOG_TAG, "No passkey action required");
}
@@ -842,6 +989,10 @@ void NimBLEServerCallbacks::onConnect(NimBLEServer* pServer, NimBLEConnInfo& con
NIMBLE_LOGD("NimBLEServerCallbacks", "onConnect(): Default");
} // onConnect
+void NimBLEServerCallbacks::onConnect(NimBLEServer* pServer, NimBLEConnInfo& connInfo, std::string& name) {
+ NIMBLE_LOGD("NimBLEServerCallbacks", "onConnect(): Default");
+} // onConnect
+
void NimBLEServerCallbacks::onDisconnect(NimBLEServer* pServer,
NimBLEConnInfo& connInfo, int reason) {
NIMBLE_LOGD("NimBLEServerCallbacks", "onDisconnect(): Default");
@@ -851,18 +1002,26 @@ void NimBLEServerCallbacks::onMTUChange(uint16_t MTU, NimBLEConnInfo& connInfo)
NIMBLE_LOGD("NimBLEServerCallbacks", "onMTUChange(): Default");
} // onMTUChange
-uint32_t NimBLEServerCallbacks::onPassKeyRequest(){
- NIMBLE_LOGD("NimBLEServerCallbacks", "onPassKeyRequest: default: 123456");
+uint32_t NimBLEServerCallbacks::onPassKeyDisplay(){
+ NIMBLE_LOGD("NimBLEServerCallbacks", "onPassKeyDisplay: default: 123456");
return 123456;
-} //onPassKeyRequest
+} //onPassKeyDisplay
-void NimBLEServerCallbacks::onAuthenticationComplete(NimBLEConnInfo& connInfo){
+void NimBLEServerCallbacks::onConfirmPIN(const NimBLEConnInfo& connInfo, uint32_t pin){
+ NIMBLE_LOGD("NimBLEServerCallbacks", "onConfirmPIN: default: true");
+ NimBLEDevice::injectConfirmPIN(connInfo, true);
+} // onConfirmPIN
+
+void NimBLEServerCallbacks::onIdentity(const NimBLEConnInfo& connInfo){
+ NIMBLE_LOGD("NimBLEServerCallbacks", "onIdentity: default");
+} // onIdentity
+
+void NimBLEServerCallbacks::onAuthenticationComplete(const NimBLEConnInfo& connInfo){
NIMBLE_LOGD("NimBLEServerCallbacks", "onAuthenticationComplete: default");
} // onAuthenticationComplete
-bool NimBLEServerCallbacks::onConfirmPIN(uint32_t pin){
- NIMBLE_LOGD("NimBLEServerCallbacks", "onConfirmPIN: default: true");
- return true;
-} // onConfirmPIN
+void NimBLEServerCallbacks::onAuthenticationComplete(const NimBLEConnInfo& connInfo, const std::string& name){
+ NIMBLE_LOGD("NimBLEServerCallbacks", "onAuthenticationComplete: default");
+} // onAuthenticationComplete
#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL */
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEServer.h b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEServer.h
index ea56ed73f..bbb4ebfb9 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEServer.h
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEServer.h
@@ -69,6 +69,8 @@ public:
NimBLEService* getServiceByHandle(uint16_t handle);
int disconnect(uint16_t connID,
uint8_t reason = BLE_ERR_REM_USER_CONN_TERM);
+ int disconnect(const NimBLEConnInfo &connInfo,
+ uint8_t reason = BLE_ERR_REM_USER_CONN_TERM);
void updateConnParams(uint16_t conn_handle,
uint16_t minInterval, uint16_t maxInterval,
uint16_t latency, uint16_t timeout);
@@ -78,6 +80,8 @@ public:
NimBLEConnInfo getPeerInfo(size_t index);
NimBLEConnInfo getPeerInfo(const NimBLEAddress& address);
NimBLEConnInfo getPeerIDInfo(uint16_t id);
+ std::string getPeerName(const NimBLEConnInfo& connInfo);
+ void getPeerNameOnConnect(bool enable);
#if !CONFIG_BT_NIMBLE_EXT_ADV || defined(_DOXYGEN_)
void advertiseOnDisconnect(bool);
#endif
@@ -98,6 +102,7 @@ private:
#if !CONFIG_BT_NIMBLE_EXT_ADV
bool m_advertiseOnDisconnect;
#endif
+ bool m_getPeerNameOnConnect;
bool m_svcChanged;
NimBLEServerCallbacks* m_pServerCallbacks;
bool m_deleteCallbacks;
@@ -110,10 +115,14 @@ private:
std::vector m_notifyChrVec;
static int handleGapEvent(struct ble_gap_event *event, void *arg);
+ static int peerNameCB(uint16_t conn_handle, const struct ble_gatt_error *error,
+ struct ble_gatt_attr *attr, void *arg);
+ std::string getPeerNameInternal(uint16_t conn_handle, TaskHandle_t task, int cb_type = -1);
void serviceChanged();
void resetGATT();
bool setIndicateWait(uint16_t conn_handle);
void clearIndicateWait(uint16_t conn_handle);
+
}; // NimBLEServer
@@ -128,11 +137,21 @@ public:
* @brief Handle a client connection.
* This is called when a client connects.
* @param [in] pServer A pointer to the %BLE server that received the client connection.
- * @param [in] connInfo A reference to a NimBLEConnInfo instance with information
+ * @param [in] connInfo A reference to a NimBLEConnInfo instance with information.
* about the peer connection parameters.
*/
virtual void onConnect(NimBLEServer* pServer, NimBLEConnInfo& connInfo);
+ /**
+ * @brief Handle a client connection.
+ * This is called when a client connects.
+ * @param [in] pServer A pointer to the %BLE server that received the client connection.
+ * @param [in] connInfo A reference to a NimBLEConnInfo instance with information.
+ * @param [in] name The name of the connected peer device.
+ * about the peer connection parameters.
+ */
+ virtual void onConnect(NimBLEServer* pServer, NimBLEConnInfo& connInfo, std::string& name);
+
/**
* @brief Handle a client disconnection.
* This is called when a client discconnects.
@@ -152,24 +171,39 @@ public:
virtual void onMTUChange(uint16_t MTU, NimBLEConnInfo& connInfo);
/**
- * @brief Called when a client requests a passkey for pairing.
+ * @brief Called when a client requests a passkey for pairing (display).
* @return The passkey to be sent to the client.
*/
- virtual uint32_t onPassKeyRequest();
+ virtual uint32_t onPassKeyDisplay();
+
+ /**
+ * @brief Called when using numeric comparision for pairing.
+ * @param [in] connInfo A reference to a NimBLEConnInfo instance with information
+ * Should be passed back to NimBLEDevice::injectConfirmPIN
+ * @param [in] pin The pin to compare with the client.
+ */
+ virtual void onConfirmPIN(const NimBLEConnInfo& connInfo, uint32_t pin);
/**
* @brief Called when the pairing procedure is complete.
* @param [in] connInfo A reference to a NimBLEConnInfo instance with information
* about the peer connection parameters.
*/
- virtual void onAuthenticationComplete(NimBLEConnInfo& connInfo);
+ virtual void onAuthenticationComplete(const NimBLEConnInfo& connInfo);
/**
- * @brief Called when using numeric comparision for pairing.
- * @param [in] pin The pin to compare with the client.
- * @return True to accept the pin.
+ * @brief Called when the pairing procedure is complete.
+ * @param [in] connInfo A reference to a NimBLEConnInfo instance with information
+ * @param [in] name The name of the connected peer device.
+ * about the peer connection parameters.
*/
- virtual bool onConfirmPIN(uint32_t pin);
+ virtual void onAuthenticationComplete(const NimBLEConnInfo& connInfo, const std::string& name);
+
+ /**
+ * @brief Called when the peer identity address is resolved.
+ * @param [in] connInfo A reference to a NimBLEConnInfo instance with information
+ */
+ virtual void onIdentity(const NimBLEConnInfo& connInfo);
}; // NimBLEServerCallbacks
#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL */
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEService.cpp b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEService.cpp
index 02195ace7..7c2decf01 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEService.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEService.cpp
@@ -126,7 +126,7 @@ bool NimBLEService::start() {
// Nimble requires an array of services to be sent to the api
// Since we are adding 1 at a time we create an array of 2 and set the type
// of the second service to 0 to indicate the end of the array.
- ble_gatt_svc_def* svc = new ble_gatt_svc_def[2];
+ ble_gatt_svc_def* svc = new ble_gatt_svc_def[2]{};
ble_gatt_chr_def* pChr_a = nullptr;
ble_gatt_dsc_def* pDsc_a = nullptr;
@@ -188,7 +188,7 @@ bool NimBLEService::start() {
pChr_a[i].descriptors = NULL;
} else {
// Must have last descriptor uuid = 0 so we have to create 1 extra
- pDsc_a = new ble_gatt_dsc_def[numDscs+1];
+ pDsc_a = new ble_gatt_dsc_def[numDscs+1]{};
int d = 0;
for(auto dsc_it = (*chr_it)->m_dscVec.begin(); dsc_it != (*chr_it)->m_dscVec.end(); ++dsc_it ) {
if((*dsc_it)->m_removed > 0) {
@@ -434,4 +434,14 @@ NimBLEServer* NimBLEService::getServer() {
return NimBLEDevice::getServer();
}// getServer
+
+/**
+ * @brief Checks if the service has been started.
+ * @return True if the service has been started.
+ */
+bool NimBLEService::isStarted() {
+ return m_pSvcDef != nullptr;
+}
+
+
#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL */
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEService.h b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEService.h
index 21ec1af70..73cbd87be 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEService.h
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEService.h
@@ -44,7 +44,7 @@ public:
uint16_t getHandle();
std::string toString();
void dump();
-
+ bool isStarted();
bool start();
NimBLECharacteristic* createCharacteristic(const char* uuid,
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEUtils.cpp b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEUtils.cpp
index 60ea541f2..06e649c09 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEUtils.cpp
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEUtils.cpp
@@ -16,45 +16,6 @@
static const char* LOG_TAG = "NimBLEUtils";
-
-/**
- * @brief A function for checking validity of connection parameters.
- * @param [in] params A pointer to the structure containing the parameters to check.
- * @return valid == 0 or error code.
- */
-int NimBLEUtils::checkConnParams(ble_gap_conn_params* params) {
- /* Check connection interval min */
- if ((params->itvl_min < BLE_HCI_CONN_ITVL_MIN) ||
- (params->itvl_min > BLE_HCI_CONN_ITVL_MAX)) {
- return BLE_ERR_INV_HCI_CMD_PARMS;
- }
- /* Check connection interval max */
- if ((params->itvl_max < BLE_HCI_CONN_ITVL_MIN) ||
- (params->itvl_max > BLE_HCI_CONN_ITVL_MAX) ||
- (params->itvl_max < params->itvl_min)) {
- return BLE_ERR_INV_HCI_CMD_PARMS;
- }
-
- /* Check connection latency */
- if (params->latency > BLE_HCI_CONN_LATENCY_MAX) {
- return BLE_ERR_INV_HCI_CMD_PARMS;
- }
-
- /* Check supervision timeout */
- if ((params->supervision_timeout < BLE_HCI_CONN_SPVN_TIMEOUT_MIN) ||
- (params->supervision_timeout > BLE_HCI_CONN_SPVN_TIMEOUT_MAX)) {
- return BLE_ERR_INV_HCI_CMD_PARMS;
- }
-
- /* Check connection event length */
- if (params->min_ce_len > params->max_ce_len) {
- return BLE_ERR_INV_HCI_CMD_PARMS;
- }
-
- return 0;
-}
-
-
/**
* @brief Converts a return code from the NimBLE stack to a text string.
* @param [in] rc The return code to convert.
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEUtils.h b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEUtils.h
index 006d9352f..57d22a0aa 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/NimBLEUtils.h
+++ b/lib/libesp32_div/esp-nimble-cpp/src/NimBLEUtils.h
@@ -43,7 +43,6 @@ public:
static char* buildHexData(uint8_t* target, const uint8_t* source, uint8_t length);
static const char* advTypeToString(uint8_t advType);
static const char* returnCodeToString(int rc);
- static int checkConnParams(ble_gap_conn_params* params);
};
diff --git a/lib/libesp32_div/esp-nimble-cpp/src/nimconfig.h b/lib/libesp32_div/esp-nimble-cpp/src/nimconfig.h
index 9c1903123..d96e37cf7 100644
--- a/lib/libesp32_div/esp-nimble-cpp/src/nimconfig.h
+++ b/lib/libesp32_div/esp-nimble-cpp/src/nimconfig.h
@@ -32,6 +32,18 @@
# endif
#endif
+#if CONFIG_NIMBLE_CPP_DEBUG_ASSERT_ENABLED && !defined NDEBUG
+void nimble_cpp_assert(const char *file, unsigned line) __attribute((weak, noreturn));
+# define NIMBLE_ATT_VAL_FILE (__builtin_strrchr(__FILE__, '/') ? \
+ __builtin_strrchr (__FILE__, '/') + 1 : __FILE__)
+# define NIMBLE_CPP_DEBUG_ASSERT(cond) \
+ if (!(cond)) { \
+ nimble_cpp_assert(NIMBLE_ATT_VAL_FILE, __LINE__); \
+ }
+#else
+# define NIMBLE_CPP_DEBUG_ASSERT(cond) (void(0))
+#endif
+
#endif /* CONFIG_BT_ENABLED */
#ifdef _DOXYGEN_
diff --git a/lib/libesp32_lvgl/lv_binding_berry/generate/LVGL_API_Reference.md b/lib/libesp32_lvgl/lv_binding_berry/generate/LVGL_API_Reference.md
index 8a88aab87..e89139c74 100644
--- a/lib/libesp32_lvgl/lv_binding_berry/generate/LVGL_API_Reference.md
+++ b/lib/libesp32_lvgl/lv_binding_berry/generate/LVGL_API_Reference.md
@@ -1501,6 +1501,7 @@ set_button_text|lv.obj, string||[lv_list_set_button_text](https://docs.lvgl.io/9
Method|Arguments|Return type|LVGL equivalent
:---|:---|:---|:---
+get_anim||lv.anim|[lv_animimg_get_anim](https://docs.lvgl.io/9.0/search.html?q=lv_animimg_get_anim)
get_duration||int|[lv_animimg_get_duration](https://docs.lvgl.io/9.0/search.html?q=lv_animimg_get_duration)
get_repeat_count||int|[lv_animimg_get_repeat_count](https://docs.lvgl.io/9.0/search.html?q=lv_animimg_get_repeat_count)
get_src_count||int|[lv_animimg_get_src_count](https://docs.lvgl.io/9.0/search.html?q=lv_animimg_get_src_count)
diff --git a/lib/libesp32_lvgl/lv_binding_berry/generate/be_lv_c_mapping.h b/lib/libesp32_lvgl/lv_binding_berry/generate/be_lv_c_mapping.h
index 8d117ef29..f12c88315 100644
--- a/lib/libesp32_lvgl/lv_binding_berry/generate/be_lv_c_mapping.h
+++ b/lib/libesp32_lvgl/lv_binding_berry/generate/be_lv_c_mapping.h
@@ -818,6 +818,7 @@ const be_ntv_func_def_t lv_timer_func[] = {
/* `lv_animimg` methods */
#ifdef BE_LV_WIDGET_ANIMIMG
const be_ntv_func_def_t lv_animimg_func[] = {
+ { "get_anim", { (const void*) &lv_animimg_get_anim, "lv.anim", "(lv.obj)" } },
{ "get_duration", { (const void*) &lv_animimg_get_duration, "i", "(lv.obj)" } },
{ "get_repeat_count", { (const void*) &lv_animimg_get_repeat_count, "i", "(lv.obj)" } },
{ "get_src_count", { (const void*) &lv_animimg_get_src_count, "i", "(lv.obj)" } },
diff --git a/lib/libesp32_lvgl/lv_binding_berry/mapping/lv_funcs.h b/lib/libesp32_lvgl/lv_binding_berry/mapping/lv_funcs.h
index 91d1eca59..41c6cb08f 100644
--- a/lib/libesp32_lvgl/lv_binding_berry/mapping/lv_funcs.h
+++ b/lib/libesp32_lvgl/lv_binding_berry/mapping/lv_funcs.h
@@ -1013,6 +1013,7 @@ const void ** lv_animimg_get_src(lv_obj_t * img)
uint8_t lv_animimg_get_src_count(lv_obj_t * img)
uint32_t lv_animimg_get_duration(lv_obj_t * img)
uint32_t lv_animimg_get_repeat_count(lv_obj_t * img)
+lv_anim_t * lv_animimg_get_anim(lv_obj_t * img)
// ../../lvgl/src/widgets/arc/lv_arc.h
lv_obj_t * lv_arc_create(lv_obj_t * parent)
@@ -1061,7 +1062,7 @@ lv_obj_t * lv_button_create(lv_obj_t * parent)
// ../../lvgl/src/widgets/buttonmatrix/lv_buttonmatrix.h
lv_obj_t * lv_buttonmatrix_create(lv_obj_t * parent)
-void lv_buttonmatrix_set_map(lv_obj_t * obj, const char * map[])
+void lv_buttonmatrix_set_map(lv_obj_t * obj, const char * const map[])
void lv_buttonmatrix_set_ctrl_map(lv_obj_t * obj, const lv_buttonmatrix_ctrl_t ctrl_map[])
void lv_buttonmatrix_set_selected_button(lv_obj_t * obj, uint32_t btn_id)
void lv_buttonmatrix_set_button_ctrl(lv_obj_t * obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl)
@@ -1070,7 +1071,7 @@ void lv_buttonmatrix_set_button_ctrl_all(lv_obj_t * obj, lv_buttonmatrix_ctrl_t
void lv_buttonmatrix_clear_button_ctrl_all(lv_obj_t * obj, lv_buttonmatrix_ctrl_t ctrl)
void lv_buttonmatrix_set_button_width(lv_obj_t * obj, uint32_t btn_id, uint32_t width)
void lv_buttonmatrix_set_one_checked(lv_obj_t * obj, bool en)
-const char ** lv_buttonmatrix_get_map(const lv_obj_t * obj)
+const char * const * lv_buttonmatrix_get_map(const lv_obj_t * obj)
uint32_t lv_buttonmatrix_get_selected_button(const lv_obj_t * obj)
const char * lv_buttonmatrix_get_button_text(const lv_obj_t * obj, uint32_t btn_id)
bool lv_buttonmatrix_has_button_ctrl(lv_obj_t * obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl)
@@ -1092,7 +1093,7 @@ lv_result_t lv_calendar_get_pressed_date(const lv_obj_t * calendar, lv_calendar_
// ../../lvgl/src/widgets/calendar/lv_calendar_chinese.h
void lv_calendar_set_chinese_mode(lv_obj_t * obj, bool en)
const char * lv_calendar_get_day_name(lv_calendar_date_t * gregorian)
-lv_calendar_chinese_t lv_calendar_gregorian_to_chinese(lv_calendar_date_t * gregorian)
+void lv_calendar_gregorian_to_chinese(lv_calendar_date_t * gregorian_time, lv_calendar_chinese_t * chinese_time)
// ../../lvgl/src/widgets/calendar/lv_calendar_header_arrow.h
lv_obj_t * lv_calendar_header_arrow_create(lv_obj_t * parent)
@@ -1220,11 +1221,11 @@ lv_obj_t * lv_keyboard_create(lv_obj_t * parent)
void lv_keyboard_set_textarea(lv_obj_t * kb, lv_obj_t * ta)
void lv_keyboard_set_mode(lv_obj_t * kb, lv_keyboard_mode_t mode)
void lv_keyboard_set_popovers(lv_obj_t * kb, bool en)
-void lv_keyboard_set_map(lv_obj_t * kb, lv_keyboard_mode_t mode, const char * map[], const lv_buttonmatrix_ctrl_t ctrl_map[])
+void lv_keyboard_set_map(lv_obj_t * kb, lv_keyboard_mode_t mode, const char * const map[], const lv_buttonmatrix_ctrl_t ctrl_map[])
lv_obj_t * lv_keyboard_get_textarea(const lv_obj_t * kb)
lv_keyboard_mode_t lv_keyboard_get_mode(const lv_obj_t * kb)
bool lv_keyboard_get_popovers(const lv_obj_t * obj)
-const char ** lv_keyboard_get_map_array(const lv_obj_t * kb)
+const char * const * lv_keyboard_get_map_array(const lv_obj_t * kb)
uint32_t lv_keyboard_get_selected_button(const lv_obj_t * obj)
const char * lv_keyboard_get_button_text(const lv_obj_t * obj, uint32_t btn_id)
diff --git a/lib/libesp32_lvgl/lv_binding_berry/tools/convert.py b/lib/libesp32_lvgl/lv_binding_berry/tools/convert.py
index 239390126..9558c1df0 100644
--- a/lib/libesp32_lvgl/lv_binding_berry/tools/convert.py
+++ b/lib/libesp32_lvgl/lv_binding_berry/tools/convert.py
@@ -407,7 +407,7 @@ class type_mapper_class:
"lv_roller_mode_t": "i",
"lv_table_cell_ctrl_t": "i",
- "lv_calendar_chinese_t": "c",
+ # "lv_calendar_chinese_t": "c",
# adding ad-hoc colorwheel from LVGL8 to LVGL9
"lv_colorwheel_mode_t": "i",
@@ -459,6 +459,7 @@ class type_mapper_class:
# "char **": "lv_str_arr", # treat as a simple pointer, decoding needs to be done at Berry level
"constchar **": "c", # treat as a simple pointer, decoding needs to be done at Berry level
"void * []": "c", # treat as a simple pointer, decoding needs to be done at Berry level
+ "constchar * *": "c",
# callbacks
"lv_group_focus_cb_t": "lv_group_focus_cb",
diff --git a/lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_haspmota.be b/lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_haspmota.be
index a1fc4b5e1..9d65d6fb6 100644
--- a/lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_haspmota.be
+++ b/lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_haspmota.be
@@ -136,7 +136,8 @@ class lvh_root
return def () end
end
def _delete()
- # to be overriden
+ # remove from page
+ self._page.remove_obj(self.id)
end
#################################################################################
@@ -668,8 +669,7 @@ class lvh_obj : lvh_root
self.remove_text_rule()
if (self._lv_label) self._lv_label.del() self._lv_label = nil end
if (self._lv_obj) self._lv_obj.del() self._lv_obj = nil end
- # remove from page
- self._page.remove_obj(self.id)
+ super(self)._delete()
end
#====================================================================
@@ -880,7 +880,7 @@ class lvh_obj : lvh_root
def get_text_color(style_modifier)
return self._lv_obj.get_style_text_color(style_modifier)
end
- def set_value_color(t) self.set_text_color(t) end
+ def set_value_color(t, style_modifier) self.set_text_color(t, style_modifier) end
def get_value_color() return self.get_value_color() end
#====================================================================
@@ -1869,6 +1869,7 @@ class lvh_scale_section : lvh_root
self._style10 = nil
self._style30.del()
self._style30 = nil
+ super(self)._delete()
end
#- ------------------------------------------------------------#
@@ -2186,10 +2187,10 @@ class lvh_chart : lvh_obj
end
def set_series1_color(color)
- self._lv_obj.set_series_color(self._ser1, color)
+ self._lv_obj.set_series_color(self._ser1, self.parse_color(color))
end
def set_series2_color(color)
- self._lv_obj.set_series_color(self._ser2, color)
+ self._lv_obj.set_series_color(self._ser2, self.parse_color(color))
end
def set_h_div_line_count(_h_div)
self._h_div = _h_div
@@ -2365,14 +2366,43 @@ class lvh_page
# create a global for this page of form p, ex `p1`
# create a global for the page attributes as pb0, ex `p1b0`
- global.("p" + str(self._page_id)) = self
- global.("p" + str(self._page_id) + "b0") = obj_scr
+ global.(f"p{self._page_id}") = self
+ global.(f"p{self._page_id}b0") = obj_scr
end
#####################################################################
# General Setters and Getters
#####################################################################
+ #- ------------------------------------------------------------#
+ # Internal utility functions
+ #
+ # Mapping of virtual attributes
+ #
+ #- ------------------------------------------------------------#
+ # `member` virtual getter
+ #- ------------------------------------------------------------#
+ def member(k)
+ import string
+ import introspect
+
+ if string.startswith(k, "set_") || string.startswith(k, "get_") return end
+
+ # if attribute name is in ignore list, abort
+ # if self._attr_ignore.find(k) != nil return end
+ # we don't need an ignore list for pages
+
+ # first check if there is a method named `get_X()`
+ var f = introspect.get(self, "get_" + k) # call self method
+ if type(f) == 'function'
+ # print(f">>>: getmember local method get_{k}")
+ return f(self)
+ end
+
+ # fallback to exception if attribute unknown or not a function
+ return module("undefined")
+ end
+
#====================================================================
# retrieve lvgl screen object for this page
#====================================================================
@@ -2413,6 +2443,44 @@ class lvh_page
end
end
+ #====================================================================
+ # `delete` special attribute used to delete the object
+ #====================================================================
+ def get_clear()
+ self._clear()
+ return def () end
+ end
+ def _clear()
+ # iterate on all objects and try to delete
+ # we first get a copy of all ids so we can delete and continue iterating
+ # without fearing about an infinite loop
+ var ids = []
+ for id: self._obj_id.keys()
+ ids.push(id)
+ end
+ # we iterate until the array is empty
+ var idx = 0
+ while idx < size(ids)
+ var page_id = ids[idx]
+ if (page_id != 0) && self._obj_id.contains(page_id)
+ # first check if the id is still in the page - it could have been already removed if it's a sub-object
+ self._obj_id[page_id]._delete()
+ end
+ idx += 1
+ end
+ self._obj_id = {} # clear map
+ end
+ def get_delete()
+ self._delete()
+ return def () end
+ end
+ def _delete()
+ # remove from page, also change page if this is the current one
+ self._hm._remove_page(self._page_id)
+ # clear content
+ self._clear()
+ end
+
#====================================================================
# `show` transition from one page to another
# duration: in ms, default 500 ms
@@ -2477,6 +2545,7 @@ class HASPmota
# haspmota objects
var lvh_pages # (list of lvg_page) list of pages
var lvh_page_cur_idx # (int) current page index number
+ var lvh_page_cur_idx_parsing # (int) index of the current page related to parsing JSONL, can be different from the displayed page
# regex patterns
var re_page_target # compiled regex for action `p`
# specific event_cb handling for less memory usage since we are registering a lot of callbacks
@@ -2609,6 +2678,18 @@ class HASPmota
def get_page_cur()
return self.lvh_pages[self.lvh_page_cur_idx]
end
+ #====================================================================
+ # return an array of all pages numbers
+ #====================================================================
+ def get_pages()
+ return self.pages_list_sorted(nil)
+ end
+ #====================================================================
+ # return the current page being parsed with JSONL as `lvh_page` object
+ #====================================================================
+ def get_page_cur_parsing()
+ return self.lvh_pages[self.lvh_page_cur_idx_parsing]
+ end
#====================================================================
# load JSONL template
@@ -2633,12 +2714,12 @@ class HASPmota
if tasmota.loglevel(4)
tasmota.log(f"HSP: parsing line '{jsonl[0]}'", 4)
end
- self.parse_page(jline) # parse page first to create any page related objects, may change self.lvh_page_cur_idx
+ self.parse_page(jline) # parse page first to create any page related objects, may change self.lvh_page_cur_idx_parsing
# objects are created in the current page
if (self.lvh_pages == nil)
raise "value_error", "no page 'id' defined"
end
- self.parse_obj(jline, self.lvh_pages[self.lvh_page_cur_idx]) # then parse object within this page
+ self.parse_obj(jline, self.lvh_pages[self.lvh_page_cur_idx_parsing]) # then parse object within this page
else
# check if it's invalid json
if size(string.tr(jsonl[0], " \t", "")) > 0
@@ -2669,7 +2750,7 @@ class HASPmota
var jline = json.load(j)
if type(jline) == 'instance'
- self.parse_page(jline) # parse page first to create any page related objects, may change self.lvh_page_cur_idx
+ self.parse_page(jline) # parse page first to create any page related objects, may change self.lvh_page_cur_idx_parsing
# objects are created in the current page
self.parse_obj(jline, self.lvh_pages[self.lvh_page_cur_idx]) # then parse object within this page
else
@@ -2757,37 +2838,60 @@ class HASPmota
# Execute a page changing action from string `action`
#
# Arg1 `action` can be `prev`, `next`, `back` or `p`
- # Returns: nil
+ # of `delete` if we are deleting the current page
+ # duration: in ms, default 500 ms
+ # anim: -1 right to left, 1 left to right (default), `nil` auto, 0 none
+ # Returns: the target page object if changed, or `nil` if still on same page
#====================================================================
- def page_show(action)
+ def page_show(action, anim, duration)
+ # resolve between page numbers
+ # p1 is either a number or nil (stored value)
+ # p2 is the default value
+ # l is the list of page ids
+ def to_page_resolve(p1, p_def, l)
+ if (p1 != nil) && (l.find(p1) != nil)
+ return p1
+ else
+ return p_def
+ end
+ end
# action can be `prev`, `next`, `back`, or `p` like `p1`
var to_page = nil
- var cur_page = self.lvh_pages[self.lvh_page_cur_idx]
+ var cur_page = self.get_page_cur()
var sorted_pages_list = self.pages_list_sorted(self.lvh_page_cur_idx)
- if size(sorted_pages_list) <= 1 return end # if only 1 page, do nothing
+
+ if size(sorted_pages_list) <= 1 # if only 1 page, do nothing
+ return nil
+ end
+
# handle prev/next/back values
# get the corresponding value from page object,
# if absent, revert to next page, previous page and page 1
# print("sorted_pages_list",sorted_pages_list)
if action == 'prev'
- to_page = int(cur_page.prev)
- if to_page == nil to_page = sorted_pages_list[-1] end # if no prev, take the previous page
+ to_page = to_page_resolve(int(cur_page.prev), sorted_pages_list[-1], sorted_pages_list)
elif action == 'next'
- to_page = int(cur_page.next)
- if to_page == nil to_page = sorted_pages_list[1] end # if no next, take the next page
+ to_page = to_page_resolve(int(cur_page.next), sorted_pages_list[1], sorted_pages_list)
elif action == 'back'
- to_page = int(cur_page.back)
- if to_page == nil # if no back, take first page
- to_page = self.pages_list_sorted(nil)[0]
- end
+ to_page = to_page_resolve(int(cur_page.back), self.pages_list_sorted(nil)[0], sorted_pages_list)
+ elif action == 'delete'
+ to_page = to_page_resolve(int(cur_page.back), self.pages_list_sorted(nil)[0], sorted_pages_list)
+ if (to_page == cur_page.id())
+ to_page = to_page_resolve(int(cur_page.next), sorted_pages_list[1], sorted_pages_list)
+ end
elif self.re_page_target.match(action)
# action is supposed to be `p` format
- to_page = int(action[1..-1]) # just skip first char and convert the rest to a string
+ to_page = to_page_resolve(int(action[1..-1]), nil #-default to nil-#, sorted_pages_list)
end
- # print("to_page=",to_page)
- if to_page != nil && to_page > 0 # we have a target
- self.lvh_pages[to_page].show() # switch to the target page
+ # print(f"{action=} {to_page=}")
+ if (to_page != nil) && (to_page > 0) # we have a target
+ var to_page_obj = self.lvh_pages[to_page]
+ # print(f"{to_page_obj.id()=}")
+ if (to_page_obj != nil)
+ to_page_obj.show(anim, duration)
+ end
+ return to_page_obj
end
end
@@ -2800,7 +2904,11 @@ class HASPmota
def parse_page(jline)
if jline.has("page") && type(jline["page"]) == 'int'
var page = int(jline["page"])
- self.lvh_page_cur_idx = page # change current page
+ # print(f">>> parsing page {page}")
+ self.lvh_page_cur_idx_parsing = page # change current page
+ if (self.lvh_page_cur_idx == nil) # also set current page if we haven't any yet
+ self.lvh_page_cur_idx = page
+ end
# create the page object if it doesn't exist already
if !self.lvh_pages.contains(page)
@@ -2810,7 +2918,7 @@ class HASPmota
# check if there is "id":0
if jline.find("id") == 0
- var lvh_page_cur = self.get_page_cur()
+ var lvh_page_cur = self.get_page_cur_parsing()
lvh_page_cur.prev = int(jline.find("prev", nil))
lvh_page_cur.next = int(jline.find("next", nil))
lvh_page_cur.back = int(jline.find("back", nil))
@@ -2818,6 +2926,36 @@ class HASPmota
end
end
+ #====================================================================
+ # Remove page by id
+ #
+ # Should not be called directly. Indirectly called by `p.delete`
+ #
+ # Only removes reference to the page at root level
+ # Change the active page if needed
+ #====================================================================
+ def _remove_page(page_id)
+ # check if we remove the active page
+ var cur_page_id = self.get_page_cur().id()
+ if (page_id == cur_page_id)
+ # if we try to delete the current page, move do main page
+ var to_page_obj = self.page_show("delete", 0, 0 #-no animation-#) # get the target page as result
+ if (to_page_obj == nil) # we didn't change page
+ return
+ end
+ end
+ # also update lvh_page_cur_idx_parsing, if we removed the current parsing page
+ if (self.lvh_page_cur_idx_parsing == page_id)
+ self.lvh_page_cur_idx_parsing = self.lvh_page_cur_idx
+ end
+ # remove object from page object
+ if self.lvh_pages.contains(page_id)
+ self.lvh_pages.remove(page_id)
+ end
+ # remove global for page
+ global.(f"p{page_id}") = nil
+ end
+
#====================================================================
# Event CB handling
#====================================================================
@@ -2856,65 +2994,70 @@ class HASPmota
#====================================================================
# Parse single object
+ #
+ # The object may be pre-existing or brand new
#====================================================================
def parse_obj(jline, page)
import global
import introspect
var obj_id = int(jline.find("id")) # id number or nil
- var obj_type = str(jline.find("obj")) # obj class or nil
- var obj_lvh # lvgl object created
- var lvh_page_cur = self.get_page_cur() # current page object
+ var obj_type = jline.find("obj") # obj class or nil
+ obj_type = (obj_type != nil) ? str(obj_type) : nil
+ var lvh_page_cur = self.get_page_cur_parsing() # current page object, cannot be nil
- # first run any Berry code embedded
- var berry_run = str(jline.find("berry_run"))
- var func_compiled
- if berry_run != "nil"
- try
- func_compiled = compile(berry_run)
- except .. as e,m
- print(format("HSP: unable to compile berry code \"%s\" - '%s' - %s", berry_run, e, m))
+ # Step 1. Check the id for valid range
+ # 'obj_id' must be between 1 and 254
+ if (obj_id != nil) && (obj_id < 0 || obj_id > 254)
+ if (obj_id != 0) || (obj_type == nil)
+ # if `obj_id` is not `nil` and not `0`, it must have `obj_type` not set to `nil`
+ print(f"HSP: invalid 'id': {obj_id} for 'obj': {obj_type}")
+ return
end
end
- # if line contains botn 'obj' and 'id', create the object
- if obj_type != "nil" && obj_id != nil
- # 'obj_id' must be between 1 and 254
- if obj_id < 1 || obj_id > 254
- print("HSP: invalid 'id': " + str(obj_id) + " for 'obj':" + obj_type)
- return
- end
+ # Step 2. Check if the p<>b<> object already exists
+ # `prev_obj` contains the pre-existing object, or `nil` if we create a new object
+ var obj_lvh = lvh_page_cur.get_obj(obj_id) # get reference of object or `nil` if new object
+
+ # Step 3. Create object instance if required
+ if (obj_type != nil) && (obj_id != nil) && (obj_lvh == nil)
+
+ # Step 3.a. extract the LVGL parent object to create the object in the appropriate lvgl screen
+ # Result in `parent_lvgl`
# extract haspmota class, prefix with `lvh_`. Ex: `btn` becomes `lvh_btn`
- # extract parent
- var parent_lvgl
- var parent_id = int(jline.find("parentid"))
+ var parent_id = int(jline.find("parentid")) # id of parent object, or `nil`
+ var parent_obj # parent HASPmota object
+ var parent_lvgl # lvgl object of parent object
- var parent_obj
if parent_id != nil
parent_obj = lvh_page_cur.get_obj(parent_id) # get parent object
- if parent_obj != nil parent_lvgl = parent_obj._lv_obj end # parent
+ if parent_obj != nil
+ parent_lvgl = parent_obj._lv_obj
+ end # parent
end
if parent_lvgl == nil
parent_lvgl = lvh_page_cur.get_scr() # if not parent, use the current page screen
end
+ # Step 3.b. Get the HASPmota class object for the `obj` class
# check if a class with the requested name exists
# first look for a class with name `lvh_` exists
var obj_class = introspect.get(self, "lvh_" + obj_type)
- var lv_instance = nil # allows to pre-instanciate the object
+ var lv_instance # allows to pre-instanciate the object
- # there is no lvh_X class, try to load the class name from the global namespace
+ # Step 3.c. if no native `lvh_` is found, try the class name from the global namespace
if obj_class == nil
# if not found, check if a LVGL class with name `lv_` exists
var lv_cl = introspect.get(global, obj_type)
- if lv_cl != nil && type(lv_cl) == 'class'
+ if (lv_cl != nil) && (type(lv_cl) == 'class')
lv_instance = lv_cl(parent_lvgl)
obj_class = self.lvh_obj # use the basic lvh_obj component to encapsulate
end
end
- # still not found, try to load a module with the name of the class
+ # Step 3.d. if not found, try to load a module with the name of the class
if obj_class == nil
var lv_cl = introspect.module(obj_type)
if lv_cl != nil && type(lv_cl) == 'class'
@@ -2923,18 +3066,55 @@ class HASPmota
end
end
+ # Step 3.e. if none found, raise an error and abort
if obj_class == nil
- print("HSP: Cannot find object of type " + str(obj_type))
+ print(f"HSP: Cannot find object of type {obj_type}")
return
end
-
- # instanciate the object, passing the lvgl screen as parent object
+
+ # Step 3.f. instanciate the object, passing the lvgl screen as parent object
obj_lvh = obj_class(parent_lvgl, page, jline, lv_instance, parent_obj)
- # add object to page object
+ # Step 3.g. Add object to page object
lvh_page_cur.add_obj(obj_id, obj_lvh)
end
+ # Step 4. if "id" is 0, get the screen object
+ if obj_id == 0
+ if (obj_type != nil)
+ print(f"HSP: cannot specify 'obj':'{obj_type}' for 'id':0")
+ return
+ end
+ obj_lvh = self.get_page_cur_parsing().get_obj(0) # get object id '0'
+ end
+
+ # Step 5. apply attributes
+ # set attributes
+ # try every attribute, if not supported it is silently ignored
+ if (obj_lvh != nil)
+ for k:jline.keys()
+ obj_lvh.(k) = jline[k]
+ end
+ end
+
+ # Step 6. apply post-config
+ # finally call 'post_config()' when all attributes are set, which gives an opportunity to clean or refresh
+ if (obj_lvh != nil)
+ obj_lvh.post_config()
+ end
+
+ # Step 7. run any Berry code embedded
+ # `func_compiled` contains compiled code, that will be run once the object is complete, or `nil` if no code
+ # `berry_run` contains the actual source code, used only for logging
+ var func_compiled
+ var berry_run = str(jline.find("berry_run"))
+ if berry_run != "nil"
+ try
+ func_compiled = compile(berry_run)
+ except .. as e,m
+ print(format("HSP: unable to compile berry code \"%s\" - '%s' - %s", berry_run, e, m))
+ end
+ end
if func_compiled != nil
try
# run the compiled code once
@@ -2947,26 +3127,6 @@ class HASPmota
end
end
- if obj_id == nil return end # if no object id, ignore line
- if obj_id == 0 && obj_type != "nil"
- print("HSP: cannot specify 'obj' for 'id':0")
- return
- end
-
- # if id==0, retrieve the 'scr' object of the current page
- if obj_id == 0
- obj_lvh = self.get_page_cur().get_obj(0) # get object id '0'
- end
-
- # set attributes
- # try every attribute, if not supported it is silently ignored
- for k:jline.keys()
- # introspect.set(obj, k, jline[k])
- obj_lvh.(k) = jline[k]
- end
-
- # finally call 'post_config()' when all attributes are set, which gives an opportunity to clean or refresh
- obj_lvh.post_config()
end
end
haspmota.HASPmota = HASPmota
diff --git a/lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_haspmota.h b/lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_haspmota.h
index 059ac6950..be6f8f134 100644
--- a/lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_haspmota.h
+++ b/lib/libesp32_lvgl/lv_haspmota/src/solidify/solidified_lv_haspmota.h
@@ -4,8 +4,8 @@
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_lvh_root;
-// compact class 'lvh_root' ktab size: 63, total: 95 (saved 256 bytes)
-static const bvalue be_ktab_class_lvh_root[63] = {
+// compact class 'lvh_root' ktab size: 65, total: 98 (saved 264 bytes)
+static const bvalue be_ktab_class_lvh_root[65] = {
/* K0 */ be_nested_str_weak(_val_rule_formula),
/* K1 */ be_nested_str_weak(_val_rule),
/* K2 */ be_nested_str_weak(_page),
@@ -43,32 +43,34 @@ static const bvalue be_ktab_class_lvh_root[63] = {
/* K34 */ be_nested_str_weak(remove_val_rule),
/* K35 */ be_nested_str_weak(tasmota),
/* K36 */ be_nested_str_weak(add_rule),
- /* K37 */ be_nested_str_weak(get_text),
- /* K38 */ be_const_class(be_class_lvh_root),
- /* K39 */ be_nested_str_weak(_X23),
- /* K40 */ be_nested_str_weak(color),
- /* K41 */ be_nested_str_weak(introspect),
- /* K42 */ be_nested_str_weak(COLOR_),
- /* K43 */ be_nested_str_weak(toupper),
- /* K44 */ be_nested_str_weak(get),
- /* K45 */ be_nested_str_weak(_val_rule_function),
- /* K46 */ be_nested_str_weak(_val),
- /* K47 */ be_nested_str_weak(set_val),
- /* K48 */ be_nested_str_weak(resize),
- /* K49 */ be_nested_str_weak(_digit2part),
- /* K50 */ be_nested_str_weak(_digit2state),
- /* K51 */ be_nested_str_weak(invalid_X20style_X20suffix_X20_X2502i),
- /* K52 */ be_nested_str_weak(value_error),
- /* K53 */ be_nested_str_weak(remove_rule),
- /* K54 */ be_nested_str_weak(HSP_X3A_X20failed_X20to_X20run_X20self_X2E_val_rule_function_X20_X2D_X20_X25s_X20_X28_X25s_X29),
- /* K55 */ be_nested_str_weak(val),
- /* K56 */ be_nested_str_weak(HSP_X3A_X20failed_X20to_X20run_X20self_X2E_text_rule_function_X20_X2D_X20_X25s_X20_X28_X25s_X29),
- /* K57 */ be_nested_str_weak(),
- /* K58 */ be_nested_str_weak(text),
- /* K59 */ be_nested_str_weak(remove_text_rule),
- /* K60 */ be_nested_str_weak(type_error),
- /* K61 */ be_nested_str_weak(you_X20cannot_X20assign_X20to_X20_X27delete_X27),
- /* K62 */ be_nested_str_weak(set_text),
+ /* K37 */ be_nested_str_weak(remove_obj),
+ /* K38 */ be_nested_str_weak(id),
+ /* K39 */ be_nested_str_weak(get_text),
+ /* K40 */ be_const_class(be_class_lvh_root),
+ /* K41 */ be_nested_str_weak(_X23),
+ /* K42 */ be_nested_str_weak(color),
+ /* K43 */ be_nested_str_weak(introspect),
+ /* K44 */ be_nested_str_weak(COLOR_),
+ /* K45 */ be_nested_str_weak(toupper),
+ /* K46 */ be_nested_str_weak(get),
+ /* K47 */ be_nested_str_weak(_val_rule_function),
+ /* K48 */ be_nested_str_weak(_val),
+ /* K49 */ be_nested_str_weak(set_val),
+ /* K50 */ be_nested_str_weak(resize),
+ /* K51 */ be_nested_str_weak(_digit2part),
+ /* K52 */ be_nested_str_weak(_digit2state),
+ /* K53 */ be_nested_str_weak(invalid_X20style_X20suffix_X20_X2502i),
+ /* K54 */ be_nested_str_weak(value_error),
+ /* K55 */ be_nested_str_weak(remove_rule),
+ /* K56 */ be_nested_str_weak(HSP_X3A_X20failed_X20to_X20run_X20self_X2E_val_rule_function_X20_X2D_X20_X25s_X20_X28_X25s_X29),
+ /* K57 */ be_nested_str_weak(val),
+ /* K58 */ be_nested_str_weak(HSP_X3A_X20failed_X20to_X20run_X20self_X2E_text_rule_function_X20_X2D_X20_X25s_X20_X28_X25s_X29),
+ /* K59 */ be_nested_str_weak(),
+ /* K60 */ be_nested_str_weak(text),
+ /* K61 */ be_nested_str_weak(remove_text_rule),
+ /* K62 */ be_nested_str_weak(type_error),
+ /* K63 */ be_nested_str_weak(you_X20cannot_X20assign_X20to_X20_X27delete_X27),
+ /* K64 */ be_nested_str_weak(set_text),
};
@@ -625,7 +627,7 @@ be_local_closure(class_lvh_root_set_val_rule, /* name */
********************************************************************/
be_local_closure(class_lvh_root__delete, /* name */
be_nested_proto(
- 1, /* nstack */
+ 4, /* nstack */
1, /* argc */
10, /* varg */
0, /* has upvals */
@@ -636,8 +638,12 @@ be_local_closure(class_lvh_root__delete, /* name */
&be_ktab_class_lvh_root, /* shared constants */
be_str_weak(_delete),
&be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80000000, // 0000 RET 0
+ ( &(const binstruction[ 5]) { /* code */
+ 0x88040102, // 0000 GETMBR R1 R0 K2
+ 0x8C040325, // 0001 GETMET R1 R1 K37
+ 0x880C0126, // 0002 GETMBR R3 R0 K38
+ 0x7C040400, // 0003 CALL R1 2
+ 0x80000000, // 0004 RET 0
})
)
);
@@ -661,7 +667,7 @@ be_local_closure(class_lvh_root_get_value_str, /* name */
be_str_weak(get_value_str),
&be_const_str_solidified,
( &(const binstruction[ 3]) { /* code */
- 0x8C040125, // 0000 GETMET R1 R0 K37
+ 0x8C040127, // 0000 GETMET R1 R0 K39
0x7C040200, // 0001 CALL R1 1
0x80040200, // 0002 RET 1 R1
})
@@ -785,17 +791,17 @@ be_local_closure(class_lvh_root_parse_color, /* name */
be_str_weak(parse_color),
&be_const_str_solidified,
( &(const binstruction[40]) { /* code */
- 0x58040026, // 0000 LDCONST R1 K38
+ 0x58040028, // 0000 LDCONST R1 K40
0x84080000, // 0001 CLOSURE R2 P0
0x600C0008, // 0002 GETGBL R3 G8
0x5C100000, // 0003 MOVE R4 R0
0x7C0C0200, // 0004 CALL R3 1
0x5C000600, // 0005 MOVE R0 R3
0x940C0112, // 0006 GETIDX R3 R0 K18
- 0x1C0C0727, // 0007 EQ R3 R3 K39
+ 0x1C0C0729, // 0007 EQ R3 R3 K41
0x780E0007, // 0008 JMPF R3 #0011
0xB80E1000, // 0009 GETNGBL R3 K8
- 0x8C0C0728, // 000A GETMET R3 R3 K40
+ 0x8C0C072A, // 000A GETMET R3 R3 K42
0x5C140400, // 000B MOVE R5 R2
0x5C180000, // 000C MOVE R6 R0
0x7C140200, // 000D CALL R5 1
@@ -803,12 +809,12 @@ be_local_closure(class_lvh_root_parse_color, /* name */
0x80040600, // 000F RET 1 R3
0x70020011, // 0010 JMP #0023
0xA40E1A00, // 0011 IMPORT R3 K13
- 0xA4125200, // 0012 IMPORT R4 K41
- 0x8C14072B, // 0013 GETMET R5 R3 K43
+ 0xA4125600, // 0012 IMPORT R4 K43
+ 0x8C14072D, // 0013 GETMET R5 R3 K45
0x5C1C0000, // 0014 MOVE R7 R0
0x7C140400, // 0015 CALL R5 2
- 0x00165405, // 0016 ADD R5 K42 R5
- 0x8C18092C, // 0017 GETMET R6 R4 K44
+ 0x00165805, // 0016 ADD R5 K44 R5
+ 0x8C18092E, // 0017 GETMET R6 R4 K46
0xB8221000, // 0018 GETNGBL R8 K8
0x5C240A00, // 0019 MOVE R9 R5
0x7C180600, // 001A CALL R6 3
@@ -816,12 +822,12 @@ be_local_closure(class_lvh_root_parse_color, /* name */
0x201C0C07, // 001C NE R7 R6 R7
0x781E0004, // 001D JMPF R7 #0023
0xB81E1000, // 001E GETNGBL R7 K8
- 0x8C1C0F28, // 001F GETMET R7 R7 K40
+ 0x8C1C0F2A, // 001F GETMET R7 R7 K42
0x5C240C00, // 0020 MOVE R9 R6
0x7C1C0400, // 0021 CALL R7 2
0x80040E00, // 0022 RET 1 R7
0xB80E1000, // 0023 GETNGBL R3 K8
- 0x8C0C0728, // 0024 GETMET R3 R3 K40
+ 0x8C0C072A, // 0024 GETMET R3 R3 K42
0x58140012, // 0025 LDCONST R5 K18
0x7C0C0400, // 0026 CALL R3 2
0x80040600, // 0027 RET 1 R3
@@ -861,7 +867,7 @@ be_local_closure(class_lvh_root_set_val_rule_formula, /* name */
0x7C0C0200, // 000A CALL R3 1
0x5C100600, // 000B MOVE R4 R3
0x7C100000, // 000C CALL R4 0
- 0x90025A04, // 000D SETMBR R0 K45 R4
+ 0x90025E04, // 000D SETMBR R0 K47 R4
0xA8040001, // 000E EXBLK 1 1
0x7002000B, // 000F JMP #001C
0xAC0C0002, // 0010 CATCH R3 0 2
@@ -900,12 +906,12 @@ be_local_closure(class_lvh_root_post_config, /* name */
be_str_weak(post_config),
&be_const_str_solidified,
( &(const binstruction[ 8]) { /* code */
- 0x8804012E, // 0000 GETMBR R1 R0 K46
+ 0x88040130, // 0000 GETMBR R1 R0 K48
0x4C080000, // 0001 LDNIL R2
0x20040202, // 0002 NE R1 R1 R2
0x78060002, // 0003 JMPF R1 #0007
- 0x8C04012F, // 0004 GETMET R1 R0 K47
- 0x880C012E, // 0005 GETMBR R3 R0 K46
+ 0x8C040131, // 0004 GETMET R1 R0 K49
+ 0x880C0130, // 0005 GETMBR R3 R0 K48
0x7C040400, // 0006 CALL R1 2
0x80000000, // 0007 RET 0
})
@@ -931,7 +937,7 @@ be_local_closure(class_lvh_root_remove_trailing_zeroes, /* name */
be_str_weak(remove_trailing_zeroes),
&be_const_str_solidified,
( &(const binstruction[24]) { /* code */
- 0x58040026, // 0000 LDCONST R1 K38
+ 0x58040028, // 0000 LDCONST R1 K40
0x6008000C, // 0001 GETGBL R2 G12
0x5C0C0000, // 0002 MOVE R3 R0
0x7C080200, // 0003 CALL R2 1
@@ -948,7 +954,7 @@ be_local_closure(class_lvh_root_remove_trailing_zeroes, /* name */
0x7001FFF5, // 000E JMP #0005
0x24100712, // 000F GT R4 R3 K18
0x78120005, // 0010 JMPF R4 #0017
- 0x8C100130, // 0011 GETMET R4 R0 K48
+ 0x8C100132, // 0011 GETMET R4 R0 K50
0x6018000C, // 0012 GETGBL R6 G12
0x5C1C0000, // 0013 MOVE R7 R0
0x7C180200, // 0014 CALL R6 1
@@ -1042,11 +1048,11 @@ be_local_closure(class_lvh_root_digits_to_style, /* name */
0x28140512, // 000B GE R5 R2 K18
0x78160008, // 000C JMPF R5 #0016
0x6014000C, // 000D GETGBL R5 G12
- 0x88180131, // 000E GETMBR R6 R0 K49
+ 0x88180133, // 000E GETMBR R6 R0 K51
0x7C140200, // 000F CALL R5 1
0x14140405, // 0010 LT R5 R2 R5
0x78160003, // 0011 JMPF R5 #0016
- 0x88140131, // 0012 GETMBR R5 R0 K49
+ 0x88140133, // 0012 GETMBR R5 R0 K51
0x94140A02, // 0013 GETIDX R5 R5 R2
0x30100805, // 0014 OR R4 R4 R5
0x70020000, // 0015 JMP #0017
@@ -1054,11 +1060,11 @@ be_local_closure(class_lvh_root_digits_to_style, /* name */
0x28140712, // 0017 GE R5 R3 K18
0x78160008, // 0018 JMPF R5 #0022
0x6014000C, // 0019 GETGBL R5 G12
- 0x88180132, // 001A GETMBR R6 R0 K50
+ 0x88180134, // 001A GETMBR R6 R0 K52
0x7C140200, // 001B CALL R5 1
0x14140605, // 001C LT R5 R3 R5
0x78160003, // 001D JMPF R5 #0022
- 0x88140132, // 001E GETMBR R5 R0 K50
+ 0x88140134, // 001E GETMBR R5 R0 K52
0x94140A03, // 001F GETIDX R5 R5 R3
0x30100805, // 0020 OR R4 R4 R5
0x70020000, // 0021 JMP #0023
@@ -1067,10 +1073,10 @@ be_local_closure(class_lvh_root_digits_to_style, /* name */
0x1C140805, // 0024 EQ R5 R4 R5
0x78160004, // 0025 JMPF R5 #002B
0x60140018, // 0026 GETGBL R5 G24
- 0x58180033, // 0027 LDCONST R6 K51
+ 0x58180035, // 0027 LDCONST R6 K53
0x5C1C0200, // 0028 MOVE R7 R1
0x7C140400, // 0029 CALL R5 2
- 0xB0066805, // 002A RAISE 1 K52 R5
+ 0xB0066C05, // 002A RAISE 1 K54 R5
0x80040800, // 002B RET 1 R4
})
)
@@ -1100,7 +1106,7 @@ be_local_closure(class_lvh_root_remove_val_rule, /* name */
0x20040202, // 0002 NE R1 R1 R2
0x78060004, // 0003 JMPF R1 #0009
0xB8064600, // 0004 GETNGBL R1 K35
- 0x8C040335, // 0005 GETMET R1 R1 K53
+ 0x8C040337, // 0005 GETMET R1 R1 K55
0x880C0101, // 0006 GETMBR R3 R0 K1
0x5C100000, // 0007 MOVE R4 R0
0x7C040600, // 0008 CALL R1 3
@@ -1136,7 +1142,7 @@ be_local_closure(class_lvh_root_val_rule_matched, /* name */
0x780E0001, // 0005 JMPF R3 #0008
0x500C0000, // 0006 LDBOOL R3 0 0
0x80040600, // 0007 RET 1 R3
- 0x880C012D, // 0008 GETMBR R3 R0 K45
+ 0x880C012F, // 0008 GETMBR R3 R0 K47
0x4C100000, // 0009 LDNIL R4
0x20100604, // 000A NE R4 R3 R4
0x78120011, // 000B JMPF R4 #001E
@@ -1151,7 +1157,7 @@ be_local_closure(class_lvh_root_val_rule_matched, /* name */
0x70020007, // 0014 JMP #001D
0x60180001, // 0015 GETGBL R6 G1
0x601C0018, // 0016 GETGBL R7 G24
- 0x58200036, // 0017 LDCONST R8 K54
+ 0x58200038, // 0017 LDCONST R8 K56
0x5C240800, // 0018 MOVE R9 R4
0x5C280A00, // 0019 MOVE R10 R5
0x7C1C0600, // 001A CALL R7 3
@@ -1161,7 +1167,7 @@ be_local_closure(class_lvh_root_val_rule_matched, /* name */
0x60100009, // 001E GETGBL R4 G9
0x5C140400, // 001F MOVE R5 R2
0x7C100200, // 0020 CALL R4 1
- 0x90026E04, // 0021 SETMBR R0 K55 R4
+ 0x90027204, // 0021 SETMBR R0 K57 R4
0x50100000, // 0022 LDBOOL R4 0 0
0x80040800, // 0023 RET 1 R4
})
@@ -1211,7 +1217,7 @@ be_local_closure(class_lvh_root_text_rule_matched, /* name */
0x70020007, // 0015 JMP #001E
0x60140001, // 0016 GETGBL R5 G1
0x60180018, // 0017 GETGBL R6 G24
- 0x581C0038, // 0018 LDCONST R7 K56
+ 0x581C003A, // 0018 LDCONST R7 K58
0x5C200600, // 0019 MOVE R8 R3
0x5C240800, // 001A MOVE R9 R4
0x7C180600, // 001B CALL R6 3
@@ -1230,8 +1236,8 @@ be_local_closure(class_lvh_root_text_rule_matched, /* name */
0x7C100400, // 0028 CALL R4 2
0x5C0C0800, // 0029 MOVE R3 R4
0x70020000, // 002A JMP #002C
- 0x580C0039, // 002B LDCONST R3 K57
- 0x90027403, // 002C SETMBR R0 K58 R3
+ 0x580C003B, // 002B LDCONST R3 K59
+ 0x90027803, // 002C SETMBR R0 K60 R3
0x50100000, // 002D LDBOOL R4 0 0
0x80040800, // 002E RET 1 R4
})
@@ -1262,7 +1268,7 @@ be_local_closure(class_lvh_root_is_color_attribute, /* name */
0x60140008, // 0002 GETGBL R5 G8
0x5C180200, // 0003 MOVE R6 R1
0x7C140200, // 0004 CALL R5 1
- 0x58180028, // 0005 LDCONST R6 K40
+ 0x5818002A, // 0005 LDCONST R6 K42
0x7C0C0600, // 0006 CALL R3 3
0x80040600, // 0007 RET 1 R3
})
@@ -1338,7 +1344,7 @@ be_local_closure(class_lvh_root_set_text_rule, /* name */
be_str_weak(set_text_rule),
&be_const_str_solidified,
( &(const binstruction[14]) { /* code */
- 0x8C08013B, // 0000 GETMET R2 R0 K59
+ 0x8C08013D, // 0000 GETMET R2 R0 K61
0x7C080200, // 0001 CALL R2 1
0x60080008, // 0002 GETGBL R2 G8
0x5C0C0200, // 0003 MOVE R3 R1
@@ -1380,7 +1386,7 @@ be_local_closure(class_lvh_root_remove_text_rule, /* name */
0x20040202, // 0002 NE R1 R1 R2
0x78060004, // 0003 JMPF R1 #0009
0xB8064600, // 0004 GETNGBL R1 K35
- 0x8C040335, // 0005 GETMET R1 R1 K53
+ 0x8C040337, // 0005 GETMET R1 R1 K55
0x880C0121, // 0006 GETMBR R3 R0 K33
0x5C100000, // 0007 MOVE R4 R0
0x7C040600, // 0008 CALL R1 3
@@ -1408,7 +1414,7 @@ be_local_closure(class_lvh_root_set_delete, /* name */
be_str_weak(set_delete),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
- 0xB006793D, // 0000 RAISE 1 K60 K61
+ 0xB0067D3F, // 0000 RAISE 1 K62 K63
0x80000000, // 0001 RET 0
})
)
@@ -1433,7 +1439,7 @@ be_local_closure(class_lvh_root_set_value_str, /* name */
be_str_weak(set_value_str),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
- 0x8C08013E, // 0000 GETMET R2 R0 K62
+ 0x8C080140, // 0000 GETMET R2 R0 K64
0x5C100200, // 0001 MOVE R4 R1
0x7C080400, // 0002 CALL R2 2
0x80000000, // 0003 RET 0
@@ -1572,7 +1578,7 @@ be_local_class(lvh_root,
})),
be_str_weak(lvh_root)
);
-// compact class 'lvh_obj' ktab size: 136, total: 285 (saved 1192 bytes)
+// compact class 'lvh_obj' ktab size: 136, total: 283 (saved 1176 bytes)
static const bvalue be_ktab_class_lvh_obj[136] = {
/* K0 */ be_nested_str_weak(_action),
/* K1 */ be_nested_str_weak(_lv_label),
@@ -1608,81 +1614,81 @@ static const bvalue be_ktab_class_lvh_obj[136] = {
/* K31 */ be_nested_str_weak(remove_val_rule),
/* K32 */ be_nested_str_weak(remove_text_rule),
/* K33 */ be_nested_str_weak(del),
- /* K34 */ be_nested_str_weak(remove_obj),
- /* K35 */ be_nested_str_weak(id),
- /* K36 */ be_nested_str_weak(get_text_font),
- /* K37 */ be_nested_str_weak(get_style_radius),
- /* K38 */ be_nested_str_weak(set_text_color),
- /* K39 */ be_nested_str_weak(get_style_text_color),
- /* K40 */ be_nested_str_weak(get_x),
- /* K41 */ be_nested_str_weak(get_long_mode),
- /* K42 */ be_nested_str_weak(_val),
- /* K43 */ be_nested_str_weak(set_value),
- /* K44 */ be_nested_str_weak(set_enabled),
- /* K45 */ be_nested_str_weak(string),
- /* K46 */ be_nested_str_weak(startswith),
- /* K47 */ be_nested_str_weak(set_),
- /* K48 */ be_nested_str_weak(get_),
- /* K49 */ be_const_int(3),
- /* K50 */ be_nested_str_weak(byte),
- /* K51 */ be_const_int(2147483647),
- /* K52 */ be_nested_str_weak(digits_to_style),
- /* K53 */ be_nested_str_weak(_attr_ignore),
- /* K54 */ be_nested_str_weak(find),
- /* K55 */ be_nested_str_weak(get),
- /* K56 */ be_nested_str_weak(function),
- /* K57 */ be_nested_str_weak(_attr_map),
- /* K58 */ be_nested_str_weak(get_style_),
- /* K59 */ be_nested_str_weak(undefined),
- /* K60 */ be_nested_str_weak(set_style_pad_top),
- /* K61 */ be_nested_str_weak(clear_state),
- /* K62 */ be_nested_str_weak(add_state),
- /* K63 */ be_nested_str_weak(check_label),
- /* K64 */ be_nested_str_weak(set_x),
- /* K65 */ be_nested_str_weak(init),
- /* K66 */ be_nested_str_weak(STATE_CHECKED),
- /* K67 */ be_nested_str_weak(parse_font),
- /* K68 */ be_nested_str_weak(set_style_text_font),
- /* K69 */ be_nested_str_weak(get_enabled),
- /* K70 */ be_nested_str_weak(set_style_pad_right),
- /* K71 */ be_nested_str_weak(),
- /* K72 */ be_nested_str_weak(real),
- /* K73 */ be_nested_str_weak(math),
- /* K74 */ be_nested_str_weak(round),
- /* K75 */ be_nested_str_weak(endswith),
- /* K76 */ be_nested_str_weak(_X25),
- /* K77 */ be_nested_str_weak(pct),
- /* K78 */ be_nested_str_weak(is_color_attribute),
- /* K79 */ be_nested_str_weak(set_style_),
- /* K80 */ be_nested_str_weak(HSP_X3A_X20unknown_X20attribute_X3A),
- /* K81 */ be_nested_str_weak(set_text_font),
- /* K82 */ be_nested_str_weak(toupper),
- /* K83 */ be_nested_str_weak(TRUE),
- /* K84 */ be_nested_str_weak(FALSE),
- /* K85 */ be_nested_str_weak(OBJ_FLAG_CLICKABLE),
- /* K86 */ be_nested_str_weak(get_style_text_align),
- /* K87 */ be_nested_str_weak(TEXT_ALIGN_LEFT),
- /* K88 */ be_nested_str_weak(left),
- /* K89 */ be_nested_str_weak(TEXT_ALIGN_CENTER),
- /* K90 */ be_nested_str_weak(center),
- /* K91 */ be_nested_str_weak(TEXT_ALIGN_RIGHT),
- /* K92 */ be_nested_str_weak(right),
- /* K93 */ be_nested_str_weak(get_style_pad_top),
- /* K94 */ be_nested_str_weak(set_style_radius),
- /* K95 */ be_nested_str_weak(get_code),
- /* K96 */ be_nested_str_weak(action),
- /* K97 */ be_nested_str_weak(EVENT_CLICKED),
- /* K98 */ be_nested_str_weak(tasmota),
- /* K99 */ be_nested_str_weak(set_timer),
- /* K100 */ be_nested_str_weak(_event_map),
- /* K101 */ be_nested_str_weak(json),
- /* K102 */ be_nested_str_weak(EVENT_VALUE_CHANGED),
- /* K103 */ be_nested_str_weak(module),
- /* K104 */ be_nested_str_weak(_X2C_X22val_X22_X3A_X25s),
- /* K105 */ be_nested_str_weak(dump),
- /* K106 */ be_nested_str_weak(_X2C_X22text_X22_X3A_X25s),
- /* K107 */ be_nested_str_weak(_X7B_X22hasp_X22_X3A_X7B_X22p_X25ib_X25i_X22_X3A_X7B_X22event_X22_X3A_X22_X25s_X22_X25s_X7D_X7D_X7D),
- /* K108 */ be_nested_str_weak(_page_id),
+ /* K34 */ be_nested_str_weak(_delete),
+ /* K35 */ be_nested_str_weak(get_text_font),
+ /* K36 */ be_nested_str_weak(get_style_radius),
+ /* K37 */ be_nested_str_weak(set_text_color),
+ /* K38 */ be_nested_str_weak(get_style_text_color),
+ /* K39 */ be_nested_str_weak(get_x),
+ /* K40 */ be_nested_str_weak(get_long_mode),
+ /* K41 */ be_nested_str_weak(_val),
+ /* K42 */ be_nested_str_weak(set_value),
+ /* K43 */ be_nested_str_weak(set_enabled),
+ /* K44 */ be_nested_str_weak(string),
+ /* K45 */ be_nested_str_weak(startswith),
+ /* K46 */ be_nested_str_weak(set_),
+ /* K47 */ be_nested_str_weak(get_),
+ /* K48 */ be_const_int(3),
+ /* K49 */ be_nested_str_weak(byte),
+ /* K50 */ be_const_int(2147483647),
+ /* K51 */ be_nested_str_weak(digits_to_style),
+ /* K52 */ be_nested_str_weak(_attr_ignore),
+ /* K53 */ be_nested_str_weak(find),
+ /* K54 */ be_nested_str_weak(get),
+ /* K55 */ be_nested_str_weak(function),
+ /* K56 */ be_nested_str_weak(_attr_map),
+ /* K57 */ be_nested_str_weak(get_style_),
+ /* K58 */ be_nested_str_weak(undefined),
+ /* K59 */ be_nested_str_weak(set_style_pad_top),
+ /* K60 */ be_nested_str_weak(clear_state),
+ /* K61 */ be_nested_str_weak(add_state),
+ /* K62 */ be_nested_str_weak(check_label),
+ /* K63 */ be_nested_str_weak(set_x),
+ /* K64 */ be_nested_str_weak(init),
+ /* K65 */ be_nested_str_weak(STATE_CHECKED),
+ /* K66 */ be_nested_str_weak(parse_font),
+ /* K67 */ be_nested_str_weak(set_style_text_font),
+ /* K68 */ be_nested_str_weak(get_enabled),
+ /* K69 */ be_nested_str_weak(set_style_pad_right),
+ /* K70 */ be_nested_str_weak(),
+ /* K71 */ be_nested_str_weak(real),
+ /* K72 */ be_nested_str_weak(math),
+ /* K73 */ be_nested_str_weak(round),
+ /* K74 */ be_nested_str_weak(endswith),
+ /* K75 */ be_nested_str_weak(_X25),
+ /* K76 */ be_nested_str_weak(pct),
+ /* K77 */ be_nested_str_weak(is_color_attribute),
+ /* K78 */ be_nested_str_weak(set_style_),
+ /* K79 */ be_nested_str_weak(HSP_X3A_X20unknown_X20attribute_X3A),
+ /* K80 */ be_nested_str_weak(set_text_font),
+ /* K81 */ be_nested_str_weak(toupper),
+ /* K82 */ be_nested_str_weak(TRUE),
+ /* K83 */ be_nested_str_weak(FALSE),
+ /* K84 */ be_nested_str_weak(OBJ_FLAG_CLICKABLE),
+ /* K85 */ be_nested_str_weak(get_style_text_align),
+ /* K86 */ be_nested_str_weak(TEXT_ALIGN_LEFT),
+ /* K87 */ be_nested_str_weak(left),
+ /* K88 */ be_nested_str_weak(TEXT_ALIGN_CENTER),
+ /* K89 */ be_nested_str_weak(center),
+ /* K90 */ be_nested_str_weak(TEXT_ALIGN_RIGHT),
+ /* K91 */ be_nested_str_weak(right),
+ /* K92 */ be_nested_str_weak(get_style_pad_top),
+ /* K93 */ be_nested_str_weak(set_style_radius),
+ /* K94 */ be_nested_str_weak(get_code),
+ /* K95 */ be_nested_str_weak(action),
+ /* K96 */ be_nested_str_weak(EVENT_CLICKED),
+ /* K97 */ be_nested_str_weak(tasmota),
+ /* K98 */ be_nested_str_weak(set_timer),
+ /* K99 */ be_nested_str_weak(_event_map),
+ /* K100 */ be_nested_str_weak(json),
+ /* K101 */ be_nested_str_weak(EVENT_VALUE_CHANGED),
+ /* K102 */ be_nested_str_weak(module),
+ /* K103 */ be_nested_str_weak(_X2C_X22val_X22_X3A_X25s),
+ /* K104 */ be_nested_str_weak(dump),
+ /* K105 */ be_nested_str_weak(_X2C_X22text_X22_X3A_X25s),
+ /* K106 */ be_nested_str_weak(_X7B_X22hasp_X22_X3A_X7B_X22p_X25ib_X25i_X22_X3A_X7B_X22event_X22_X3A_X22_X25s_X22_X25s_X7D_X7D_X7D),
+ /* K107 */ be_nested_str_weak(_page_id),
+ /* K108 */ be_nested_str_weak(id),
/* K109 */ be_nested_str_weak(get_style_pad_bottom),
/* K110 */ be_nested_str_weak(get_y),
/* K111 */ be_nested_str_weak(set_style_pad_bottom),
@@ -2120,7 +2126,7 @@ be_local_closure(class_lvh_obj_post_init, /* name */
********************************************************************/
be_local_closure(class_lvh_obj__delete, /* name */
be_nested_proto(
- 4, /* nstack */
+ 3, /* nstack */
1, /* argc */
10, /* varg */
0, /* has upvals */
@@ -2131,7 +2137,7 @@ be_local_closure(class_lvh_obj__delete, /* name */
&be_ktab_class_lvh_obj, /* shared constants */
be_str_weak(_delete),
&be_const_str_solidified,
- ( &(const binstruction[23]) { /* code */
+ ( &(const binstruction[24]) { /* code */
0x8C04011F, // 0000 GETMET R1 R0 K31
0x7C040200, // 0001 CALL R1 1
0x8C040120, // 0002 GETMET R1 R0 K32
@@ -2150,11 +2156,12 @@ be_local_closure(class_lvh_obj__delete, /* name */
0x7C040200, // 000F CALL R1 1
0x4C040000, // 0010 LDNIL R1
0x90020601, // 0011 SETMBR R0 K3 R1
- 0x88040115, // 0012 GETMBR R1 R0 K21
- 0x8C040322, // 0013 GETMET R1 R1 K34
- 0x880C0123, // 0014 GETMBR R3 R0 K35
- 0x7C040400, // 0015 CALL R1 2
- 0x80000000, // 0016 RET 0
+ 0x60040003, // 0012 GETGBL R1 G3
+ 0x5C080000, // 0013 MOVE R2 R0
+ 0x7C040200, // 0014 CALL R1 1
+ 0x8C040322, // 0015 GETMET R1 R1 K34
+ 0x7C040200, // 0016 CALL R1 1
+ 0x80000000, // 0017 RET 0
})
)
);
@@ -2178,7 +2185,7 @@ be_local_closure(class_lvh_obj_get_value_font, /* name */
be_str_weak(get_value_font),
&be_const_str_solidified,
( &(const binstruction[ 3]) { /* code */
- 0x8C040124, // 0000 GETMET R1 R0 K36
+ 0x8C040123, // 0000 GETMET R1 R0 K35
0x7C040200, // 0001 CALL R1 1
0x80040200, // 0002 RET 1 R1
})
@@ -2209,7 +2216,7 @@ be_local_closure(class_lvh_obj_get_radius2, /* name */
0x20040202, // 0002 NE R1 R1 R2
0x78060007, // 0003 JMPF R1 #000C
0x88040103, // 0004 GETMBR R1 R0 K3
- 0x8C040325, // 0005 GETMET R1 R1 K37
+ 0x8C040324, // 0005 GETMET R1 R1 K36
0x880C0107, // 0006 GETMBR R3 R0 K7
0xB8120A00, // 0007 GETNGBL R4 K5
0x88100909, // 0008 GETMBR R4 R4 K9
@@ -2228,8 +2235,8 @@ be_local_closure(class_lvh_obj_get_radius2, /* name */
********************************************************************/
be_local_closure(class_lvh_obj_set_value_color, /* name */
be_nested_proto(
- 5, /* nstack */
- 2, /* argc */
+ 7, /* nstack */
+ 3, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -2239,11 +2246,12 @@ be_local_closure(class_lvh_obj_set_value_color, /* name */
&be_ktab_class_lvh_obj, /* shared constants */
be_str_weak(set_value_color),
&be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x8C080126, // 0000 GETMET R2 R0 K38
- 0x5C100200, // 0001 MOVE R4 R1
- 0x7C080400, // 0002 CALL R2 2
- 0x80000000, // 0003 RET 0
+ ( &(const binstruction[ 5]) { /* code */
+ 0x8C0C0125, // 0000 GETMET R3 R0 K37
+ 0x5C140200, // 0001 MOVE R5 R1
+ 0x5C180400, // 0002 MOVE R6 R2
+ 0x7C0C0600, // 0003 CALL R3 3
+ 0x80000000, // 0004 RET 0
})
)
);
@@ -2268,7 +2276,7 @@ be_local_closure(class_lvh_obj_get_text_color, /* name */
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x88080103, // 0000 GETMBR R2 R0 K3
- 0x8C080527, // 0001 GETMET R2 R2 K39
+ 0x8C080526, // 0001 GETMET R2 R2 K38
0x5C100200, // 0002 MOVE R4 R1
0x7C080400, // 0003 CALL R2 2
0x80040400, // 0004 RET 1 R2
@@ -2296,7 +2304,7 @@ be_local_closure(class_lvh_obj_get_value_ofs_x, /* name */
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x88040101, // 0000 GETMBR R1 R0 K1
- 0x8C040328, // 0001 GETMET R1 R1 K40
+ 0x8C040327, // 0001 GETMET R1 R1 K39
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
@@ -2327,7 +2335,7 @@ be_local_closure(class_lvh_obj_get_label_mode, /* name */
0x20040202, // 0002 NE R1 R1 R2
0x78060003, // 0003 JMPF R1 #0008
0x88040101, // 0004 GETMBR R1 R0 K1
- 0x8C040329, // 0005 GETMET R1 R1 K41
+ 0x8C040328, // 0005 GETMET R1 R1 K40
0x7C040200, // 0006 CALL R1 1
0x80040200, // 0007 RET 1 R1
0x80000000, // 0008 RET 0
@@ -2355,14 +2363,14 @@ be_local_closure(class_lvh_obj_set_val, /* name */
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0xA40A1C00, // 0000 IMPORT R2 K14
- 0x90025401, // 0001 SETMBR R0 K42 R1
+ 0x90025201, // 0001 SETMBR R0 K41 R1
0x8C0C050F, // 0002 GETMET R3 R2 K15
0x88140103, // 0003 GETMBR R5 R0 K3
- 0x5818002B, // 0004 LDCONST R6 K43
+ 0x5818002A, // 0004 LDCONST R6 K42
0x7C0C0600, // 0005 CALL R3 3
0x780E0003, // 0006 JMPF R3 #000B
0x880C0103, // 0007 GETMBR R3 R0 K3
- 0x8C0C072B, // 0008 GETMET R3 R3 K43
+ 0x8C0C072A, // 0008 GETMET R3 R3 K42
0x5C140200, // 0009 MOVE R5 R1
0x7C0C0400, // 000A CALL R3 2
0x80000000, // 000B RET 0
@@ -2389,7 +2397,7 @@ be_local_closure(class_lvh_obj_set_click, /* name */
be_str_weak(set_click),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
- 0x8C08012C, // 0000 GETMET R2 R0 K44
+ 0x8C08012B, // 0000 GETMET R2 R0 K43
0x5C100200, // 0001 MOVE R4 R1
0x7C080400, // 0002 CALL R2 2
0x80000000, // 0003 RET 0
@@ -2416,16 +2424,16 @@ be_local_closure(class_lvh_obj_member, /* name */
be_str_weak(member),
&be_const_str_solidified,
( &(const binstruction[125]) { /* code */
- 0xA40A5A00, // 0000 IMPORT R2 K45
+ 0xA40A5800, // 0000 IMPORT R2 K44
0xA40E1C00, // 0001 IMPORT R3 K14
- 0x8C10052E, // 0002 GETMET R4 R2 K46
+ 0x8C10052D, // 0002 GETMET R4 R2 K45
0x5C180200, // 0003 MOVE R6 R1
- 0x581C002F, // 0004 LDCONST R7 K47
+ 0x581C002E, // 0004 LDCONST R7 K46
0x7C100600, // 0005 CALL R4 3
0x74120004, // 0006 JMPT R4 #000C
- 0x8C10052E, // 0007 GETMET R4 R2 K46
+ 0x8C10052D, // 0007 GETMET R4 R2 K45
0x5C180200, // 0008 MOVE R6 R1
- 0x581C0030, // 0009 LDCONST R7 K48
+ 0x581C002F, // 0009 LDCONST R7 K47
0x7C100600, // 000A CALL R4 3
0x78120000, // 000B JMPF R4 #000D
0x80000800, // 000C RET 0
@@ -2433,13 +2441,13 @@ be_local_closure(class_lvh_obj_member, /* name */
0x6014000C, // 000E GETGBL R5 G12
0x5C180200, // 000F MOVE R6 R1
0x7C140200, // 0010 CALL R5 1
- 0x28140B31, // 0011 GE R5 R5 K49
+ 0x28140B30, // 0011 GE R5 R5 K48
0x7816001F, // 0012 JMPF R5 #0033
- 0x8C140532, // 0013 GETMET R5 R2 K50
+ 0x8C140531, // 0013 GETMET R5 R2 K49
0x541DFFFE, // 0014 LDINT R7 -1
0x941C0207, // 0015 GETIDX R7 R1 R7
0x7C140400, // 0016 CALL R5 2
- 0x8C180532, // 0017 GETMET R6 R2 K50
+ 0x8C180531, // 0017 GETMET R6 R2 K49
0x5421FFFD, // 0018 LDINT R8 -2
0x94200208, // 0019 GETIDX R8 R1 R8
0x7C180400, // 001A CALL R6 2
@@ -2457,32 +2465,32 @@ be_local_closure(class_lvh_obj_member, /* name */
0x781E000B, // 0026 JMPF R7 #0033
0x601C0009, // 0027 GETGBL R7 G9
0x5421FFFD, // 0028 LDINT R8 -2
- 0x40201133, // 0029 CONNECT R8 R8 K51
+ 0x40201132, // 0029 CONNECT R8 R8 K50
0x94200208, // 002A GETIDX R8 R1 R8
0x7C1C0200, // 002B CALL R7 1
0x5421FFFC, // 002C LDINT R8 -3
0x40223008, // 002D CONNECT R8 K24 R8
0x94040208, // 002E GETIDX R1 R1 R8
- 0x8C200134, // 002F GETMET R8 R0 K52
+ 0x8C200133, // 002F GETMET R8 R0 K51
0x5C280E00, // 0030 MOVE R10 R7
0x7C200400, // 0031 CALL R8 2
0x5C101000, // 0032 MOVE R4 R8
- 0x88140135, // 0033 GETMBR R5 R0 K53
- 0x8C140B36, // 0034 GETMET R5 R5 K54
+ 0x88140134, // 0033 GETMBR R5 R0 K52
+ 0x8C140B35, // 0034 GETMET R5 R5 K53
0x5C1C0200, // 0035 MOVE R7 R1
0x7C140400, // 0036 CALL R5 2
0x4C180000, // 0037 LDNIL R6
0x20140A06, // 0038 NE R5 R5 R6
0x78160000, // 0039 JMPF R5 #003B
0x80000A00, // 003A RET 0
- 0x8C140737, // 003B GETMET R5 R3 K55
+ 0x8C140736, // 003B GETMET R5 R3 K54
0x5C1C0000, // 003C MOVE R7 R0
- 0x00226001, // 003D ADD R8 K48 R1
+ 0x00225E01, // 003D ADD R8 K47 R1
0x7C140600, // 003E CALL R5 3
0x60180004, // 003F GETGBL R6 G4
0x5C1C0A00, // 0040 MOVE R7 R5
0x7C180200, // 0041 CALL R6 1
- 0x1C180D38, // 0042 EQ R6 R6 K56
+ 0x1C180D37, // 0042 EQ R6 R6 K55
0x781A0009, // 0043 JMPF R6 #004E
0x5C180A00, // 0044 MOVE R6 R5
0x5C1C0000, // 0045 MOVE R7 R0
@@ -2494,8 +2502,8 @@ be_local_closure(class_lvh_obj_member, /* name */
0x58200018, // 004B LDCONST R8 K24
0x7C180400, // 004C CALL R6 2
0x80040C00, // 004D RET 1 R6
- 0x88180139, // 004E GETMBR R6 R0 K57
- 0x8C180D36, // 004F GETMET R6 R6 K54
+ 0x88180138, // 004E GETMBR R6 R0 K56
+ 0x8C180D35, // 004F GETMET R6 R6 K53
0x5C200200, // 0050 MOVE R8 R1
0x5C240200, // 0051 MOVE R9 R1
0x7C180600, // 0052 CALL R6 3
@@ -2503,29 +2511,29 @@ be_local_closure(class_lvh_obj_member, /* name */
0x4C180000, // 0054 LDNIL R6
0x1C180806, // 0055 EQ R6 R4 R6
0x781A000D, // 0056 JMPF R6 #0065
- 0x8C180737, // 0057 GETMET R6 R3 K55
+ 0x8C180736, // 0057 GETMET R6 R3 K54
0x88200103, // 0058 GETMBR R8 R0 K3
- 0x00266001, // 0059 ADD R9 K48 R1
+ 0x00265E01, // 0059 ADD R9 K47 R1
0x7C180600, // 005A CALL R6 3
0x5C140C00, // 005B MOVE R5 R6
0x60180004, // 005C GETGBL R6 G4
0x5C1C0A00, // 005D MOVE R7 R5
0x7C180200, // 005E CALL R6 1
- 0x1C180D38, // 005F EQ R6 R6 K56
+ 0x1C180D37, // 005F EQ R6 R6 K55
0x781A0003, // 0060 JMPF R6 #0065
0x5C180A00, // 0061 MOVE R6 R5
0x881C0103, // 0062 GETMBR R7 R0 K3
0x7C180200, // 0063 CALL R6 1
0x80040C00, // 0064 RET 1 R6
- 0x8C180737, // 0065 GETMET R6 R3 K55
+ 0x8C180736, // 0065 GETMET R6 R3 K54
0x88200103, // 0066 GETMBR R8 R0 K3
- 0x00267401, // 0067 ADD R9 K58 R1
+ 0x00267201, // 0067 ADD R9 K57 R1
0x7C180600, // 0068 CALL R6 3
0x5C140C00, // 0069 MOVE R5 R6
0x60180004, // 006A GETGBL R6 G4
0x5C1C0A00, // 006B MOVE R7 R5
0x7C180200, // 006C CALL R6 1
- 0x1C180D38, // 006D EQ R6 R6 K56
+ 0x1C180D37, // 006D EQ R6 R6 K55
0x781A0009, // 006E JMPF R6 #0079
0x5C180A00, // 006F MOVE R6 R5
0x881C0103, // 0070 GETMBR R7 R0 K3
@@ -2538,7 +2546,7 @@ be_local_closure(class_lvh_obj_member, /* name */
0x7C180400, // 0077 CALL R6 2
0x80040C00, // 0078 RET 1 R6
0x6018000B, // 0079 GETGBL R6 G11
- 0x581C003B, // 007A LDCONST R7 K59
+ 0x581C003A, // 007A LDCONST R7 K58
0x7C180200, // 007B CALL R6 1
0x80040C00, // 007C RET 1 R6
})
@@ -2569,7 +2577,7 @@ be_local_closure(class_lvh_obj_set_pad_top2, /* name */
0x20080403, // 0002 NE R2 R2 R3
0x780A0009, // 0003 JMPF R2 #000E
0x88080103, // 0004 GETMBR R2 R0 K3
- 0x8C08053C, // 0005 GETMET R2 R2 K60
+ 0x8C08053B, // 0005 GETMET R2 R2 K59
0x60100009, // 0006 GETGBL R4 G9
0x5C140200, // 0007 MOVE R5 R1
0x7C100200, // 0008 CALL R4 1
@@ -2604,13 +2612,13 @@ be_local_closure(class_lvh_obj_set_enabled, /* name */
( &(const binstruction[13]) { /* code */
0x78060005, // 0000 JMPF R1 #0007
0x88080103, // 0001 GETMBR R2 R0 K3
- 0x8C08053D, // 0002 GETMET R2 R2 K61
+ 0x8C08053C, // 0002 GETMET R2 R2 K60
0xB8120A00, // 0003 GETNGBL R4 K5
0x8810090C, // 0004 GETMBR R4 R4 K12
0x7C080400, // 0005 CALL R2 2
0x70020004, // 0006 JMP #000C
0x88080103, // 0007 GETMBR R2 R0 K3
- 0x8C08053E, // 0008 GETMET R2 R2 K62
+ 0x8C08053D, // 0008 GETMET R2 R2 K61
0xB8120A00, // 0009 GETNGBL R4 K5
0x8810090C, // 000A GETMBR R4 R4 K12
0x7C080400, // 000B CALL R2 2
@@ -2638,10 +2646,10 @@ be_local_closure(class_lvh_obj_set_value_ofs_x, /* name */
be_str_weak(set_value_ofs_x),
&be_const_str_solidified,
( &(const binstruction[ 9]) { /* code */
- 0x8C08013F, // 0000 GETMET R2 R0 K63
+ 0x8C08013E, // 0000 GETMET R2 R0 K62
0x7C080200, // 0001 CALL R2 1
0x88080101, // 0002 GETMBR R2 R0 K1
- 0x8C080540, // 0003 GETMET R2 R2 K64
+ 0x8C08053F, // 0003 GETMET R2 R2 K63
0x60100009, // 0004 GETGBL R4 G9
0x5C140200, // 0005 MOVE R5 R1
0x7C100200, // 0006 CALL R4 1
@@ -2673,7 +2681,7 @@ be_local_closure(class_lvh_obj_init, /* name */
0x60180003, // 0000 GETGBL R6 G3
0x5C1C0000, // 0001 MOVE R7 R0
0x7C180200, // 0002 CALL R6 1
- 0x8C180D41, // 0003 GETMET R6 R6 K65
+ 0x8C180D40, // 0003 GETMET R6 R6 K64
0x5C200200, // 0004 MOVE R8 R1
0x5C240400, // 0005 MOVE R9 R2
0x5C280600, // 0006 MOVE R10 R3
@@ -2707,7 +2715,7 @@ be_local_closure(class_lvh_obj_get_toggle, /* name */
0x88040103, // 0000 GETMBR R1 R0 K3
0x8C04030B, // 0001 GETMET R1 R1 K11
0xB80E0A00, // 0002 GETNGBL R3 K5
- 0x880C0742, // 0003 GETMBR R3 R3 K66
+ 0x880C0741, // 0003 GETMBR R3 R3 K65
0x7C040400, // 0004 CALL R1 2
0x80040200, // 0005 RET 1 R1
})
@@ -2733,14 +2741,14 @@ be_local_closure(class_lvh_obj_set_text_font, /* name */
be_str_weak(set_text_font),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
- 0x8C080143, // 0000 GETMET R2 R0 K67
+ 0x8C080142, // 0000 GETMET R2 R0 K66
0x5C100200, // 0001 MOVE R4 R1
0x7C080400, // 0002 CALL R2 2
0x4C0C0000, // 0003 LDNIL R3
0x200C0403, // 0004 NE R3 R2 R3
0x780E0004, // 0005 JMPF R3 #000B
0x880C0103, // 0006 GETMBR R3 R0 K3
- 0x8C0C0744, // 0007 GETMET R3 R3 K68
+ 0x8C0C0743, // 0007 GETMET R3 R3 K67
0x5C140400, // 0008 MOVE R5 R2
0x58180018, // 0009 LDCONST R6 K24
0x7C0C0600, // 000A CALL R3 3
@@ -2768,7 +2776,7 @@ be_local_closure(class_lvh_obj_get_click, /* name */
be_str_weak(get_click),
&be_const_str_solidified,
( &(const binstruction[ 3]) { /* code */
- 0x8C040145, // 0000 GETMET R1 R0 K69
+ 0x8C040144, // 0000 GETMET R1 R0 K68
0x7C040200, // 0001 CALL R1 1
0x80040200, // 0002 RET 1 R1
})
@@ -2799,7 +2807,7 @@ be_local_closure(class_lvh_obj_set_pad_right2, /* name */
0x20080403, // 0002 NE R2 R2 R3
0x780A0009, // 0003 JMPF R2 #000E
0x88080103, // 0004 GETMBR R2 R0 K3
- 0x8C080546, // 0005 GETMET R2 R2 K70
+ 0x8C080545, // 0005 GETMET R2 R2 K69
0x60100009, // 0006 GETGBL R4 G9
0x5C140200, // 0007 MOVE R5 R1
0x7C100200, // 0008 CALL R4 1
@@ -2836,7 +2844,7 @@ be_local_closure(class_lvh_obj_get_action, /* name */
0x78060001, // 0001 JMPF R1 #0004
0x5C080200, // 0002 MOVE R2 R1
0x70020000, // 0003 JMP #0005
- 0x58080047, // 0004 LDCONST R2 K71
+ 0x58080046, // 0004 LDCONST R2 K70
0x80040400, // 0005 RET 1 R2
})
)
@@ -2861,41 +2869,41 @@ be_local_closure(class_lvh_obj_setmember, /* name */
be_str_weak(setmember),
&be_const_str_solidified,
( &(const binstruction[164]) { /* code */
- 0xA40E5A00, // 0000 IMPORT R3 K45
+ 0xA40E5800, // 0000 IMPORT R3 K44
0xA4121C00, // 0001 IMPORT R4 K14
- 0x8C14072E, // 0002 GETMET R5 R3 K46
+ 0x8C14072D, // 0002 GETMET R5 R3 K45
0x5C1C0200, // 0003 MOVE R7 R1
- 0x5820002F, // 0004 LDCONST R8 K47
+ 0x5820002E, // 0004 LDCONST R8 K46
0x7C140600, // 0005 CALL R5 3
0x74160004, // 0006 JMPT R5 #000C
- 0x8C14072E, // 0007 GETMET R5 R3 K46
+ 0x8C14072D, // 0007 GETMET R5 R3 K45
0x5C1C0200, // 0008 MOVE R7 R1
- 0x58200030, // 0009 LDCONST R8 K48
+ 0x5820002F, // 0009 LDCONST R8 K47
0x7C140600, // 000A CALL R5 3
0x78160000, // 000B JMPF R5 #000D
0x80000A00, // 000C RET 0
0x60140004, // 000D GETGBL R5 G4
0x5C180400, // 000E MOVE R6 R2
0x7C140200, // 000F CALL R5 1
- 0x1C140B48, // 0010 EQ R5 R5 K72
+ 0x1C140B47, // 0010 EQ R5 R5 K71
0x78160006, // 0011 JMPF R5 #0019
- 0xA4169200, // 0012 IMPORT R5 K73
+ 0xA4169000, // 0012 IMPORT R5 K72
0x60180009, // 0013 GETGBL R6 G9
- 0x8C1C0B4A, // 0014 GETMET R7 R5 K74
+ 0x8C1C0B49, // 0014 GETMET R7 R5 K73
0x5C240400, // 0015 MOVE R9 R2
0x7C1C0400, // 0016 CALL R7 2
0x7C180200, // 0017 CALL R6 1
0x5C080C00, // 0018 MOVE R2 R6
- 0x8C14074B, // 0019 GETMET R5 R3 K75
+ 0x8C14074A, // 0019 GETMET R5 R3 K74
0x5C1C0200, // 001A MOVE R7 R1
- 0x5820004C, // 001B LDCONST R8 K76
+ 0x5820004B, // 001B LDCONST R8 K75
0x7C140600, // 001C CALL R5 3
0x78160009, // 001D JMPF R5 #0028
0x5415FFFD, // 001E LDINT R5 -2
0x40163005, // 001F CONNECT R5 K24 R5
0x94040205, // 0020 GETIDX R1 R1 R5
0xB8160A00, // 0021 GETNGBL R5 K5
- 0x8C140B4D, // 0022 GETMET R5 R5 K77
+ 0x8C140B4C, // 0022 GETMET R5 R5 K76
0x601C0009, // 0023 GETGBL R7 G9
0x5C200400, // 0024 MOVE R8 R2
0x7C1C0200, // 0025 CALL R7 1
@@ -2905,13 +2913,13 @@ be_local_closure(class_lvh_obj_setmember, /* name */
0x6018000C, // 0029 GETGBL R6 G12
0x5C1C0200, // 002A MOVE R7 R1
0x7C180200, // 002B CALL R6 1
- 0x28180D31, // 002C GE R6 R6 K49
+ 0x28180D30, // 002C GE R6 R6 K48
0x781A001F, // 002D JMPF R6 #004E
- 0x8C180732, // 002E GETMET R6 R3 K50
+ 0x8C180731, // 002E GETMET R6 R3 K49
0x5421FFFE, // 002F LDINT R8 -1
0x94200208, // 0030 GETIDX R8 R1 R8
0x7C180400, // 0031 CALL R6 2
- 0x8C1C0732, // 0032 GETMET R7 R3 K50
+ 0x8C1C0731, // 0032 GETMET R7 R3 K49
0x5425FFFD, // 0033 LDINT R9 -2
0x94240209, // 0034 GETIDX R9 R1 R9
0x7C1C0400, // 0035 CALL R7 2
@@ -2929,32 +2937,32 @@ be_local_closure(class_lvh_obj_setmember, /* name */
0x7822000B, // 0041 JMPF R8 #004E
0x60200009, // 0042 GETGBL R8 G9
0x5425FFFD, // 0043 LDINT R9 -2
- 0x40241333, // 0044 CONNECT R9 R9 K51
+ 0x40241332, // 0044 CONNECT R9 R9 K50
0x94240209, // 0045 GETIDX R9 R1 R9
0x7C200200, // 0046 CALL R8 1
0x5425FFFC, // 0047 LDINT R9 -3
0x40263009, // 0048 CONNECT R9 K24 R9
0x94040209, // 0049 GETIDX R1 R1 R9
- 0x8C240134, // 004A GETMET R9 R0 K52
+ 0x8C240133, // 004A GETMET R9 R0 K51
0x5C2C1000, // 004B MOVE R11 R8
0x7C240400, // 004C CALL R9 2
0x5C141200, // 004D MOVE R5 R9
- 0x88180135, // 004E GETMBR R6 R0 K53
- 0x8C180D36, // 004F GETMET R6 R6 K54
+ 0x88180134, // 004E GETMBR R6 R0 K52
+ 0x8C180D35, // 004F GETMET R6 R6 K53
0x5C200200, // 0050 MOVE R8 R1
0x7C180400, // 0051 CALL R6 2
0x4C1C0000, // 0052 LDNIL R7
0x20180C07, // 0053 NE R6 R6 R7
0x781A0000, // 0054 JMPF R6 #0056
0x80000C00, // 0055 RET 0
- 0x8C180937, // 0056 GETMET R6 R4 K55
+ 0x8C180936, // 0056 GETMET R6 R4 K54
0x5C200000, // 0057 MOVE R8 R0
- 0x00265E01, // 0058 ADD R9 K47 R1
+ 0x00265C01, // 0058 ADD R9 K46 R1
0x7C180600, // 0059 CALL R6 3
0x601C0004, // 005A GETGBL R7 G4
0x5C200C00, // 005B MOVE R8 R6
0x7C1C0200, // 005C CALL R7 1
- 0x1C1C0F38, // 005D EQ R7 R7 K56
+ 0x1C1C0F37, // 005D EQ R7 R7 K55
0x781E000A, // 005E JMPF R7 #006A
0x5C1C0C00, // 005F MOVE R7 R6
0x5C200000, // 0060 MOVE R8 R0
@@ -2967,13 +2975,13 @@ be_local_closure(class_lvh_obj_setmember, /* name */
0x58280018, // 0067 LDCONST R10 K24
0x7C1C0600, // 0068 CALL R7 3
0x80000E00, // 0069 RET 0
- 0x881C0139, // 006A GETMBR R7 R0 K57
- 0x8C1C0F36, // 006B GETMET R7 R7 K54
+ 0x881C0138, // 006A GETMBR R7 R0 K56
+ 0x8C1C0F35, // 006B GETMET R7 R7 K53
0x5C240200, // 006C MOVE R9 R1
0x5C280200, // 006D MOVE R10 R1
0x7C1C0600, // 006E CALL R7 3
0x5C040E00, // 006F MOVE R1 R7
- 0x8C1C014E, // 0070 GETMET R7 R0 K78
+ 0x8C1C014D, // 0070 GETMET R7 R0 K77
0x5C240200, // 0071 MOVE R9 R1
0x7C1C0400, // 0072 CALL R7 2
0x781E0003, // 0073 JMPF R7 #0078
@@ -2984,30 +2992,30 @@ be_local_closure(class_lvh_obj_setmember, /* name */
0x4C1C0000, // 0078 LDNIL R7
0x1C1C0A07, // 0079 EQ R7 R5 R7
0x781E000E, // 007A JMPF R7 #008A
- 0x8C1C0937, // 007B GETMET R7 R4 K55
+ 0x8C1C0936, // 007B GETMET R7 R4 K54
0x88240103, // 007C GETMBR R9 R0 K3
- 0x002A5E01, // 007D ADD R10 K47 R1
+ 0x002A5C01, // 007D ADD R10 K46 R1
0x7C1C0600, // 007E CALL R7 3
0x5C180E00, // 007F MOVE R6 R7
0x601C0004, // 0080 GETGBL R7 G4
0x5C200C00, // 0081 MOVE R8 R6
0x7C1C0200, // 0082 CALL R7 1
- 0x1C1C0F38, // 0083 EQ R7 R7 K56
+ 0x1C1C0F37, // 0083 EQ R7 R7 K55
0x781E0004, // 0084 JMPF R7 #008A
0x5C1C0C00, // 0085 MOVE R7 R6
0x88200103, // 0086 GETMBR R8 R0 K3
0x5C240400, // 0087 MOVE R9 R2
0x7C1C0400, // 0088 CALL R7 2
0x80040E00, // 0089 RET 1 R7
- 0x8C1C0937, // 008A GETMET R7 R4 K55
+ 0x8C1C0936, // 008A GETMET R7 R4 K54
0x88240103, // 008B GETMBR R9 R0 K3
- 0x002A9E01, // 008C ADD R10 K79 R1
+ 0x002A9C01, // 008C ADD R10 K78 R1
0x7C1C0600, // 008D CALL R7 3
0x5C180E00, // 008E MOVE R6 R7
0x601C0004, // 008F GETGBL R7 G4
0x5C200C00, // 0090 MOVE R8 R6
0x7C1C0200, // 0091 CALL R7 1
- 0x1C1C0F38, // 0092 EQ R7 R7 K56
+ 0x1C1C0F37, // 0092 EQ R7 R7 K55
0x781E000A, // 0093 JMPF R7 #009F
0x5C1C0C00, // 0094 MOVE R7 R6
0x88200103, // 0095 GETMBR R8 R0 K3
@@ -3021,7 +3029,7 @@ be_local_closure(class_lvh_obj_setmember, /* name */
0x7C1C0600, // 009D CALL R7 3
0x80040E00, // 009E RET 1 R7
0x601C0001, // 009F GETGBL R7 G1
- 0x58200050, // 00A0 LDCONST R8 K80
+ 0x5820004F, // 00A0 LDCONST R8 K79
0x5C240200, // 00A1 MOVE R9 R1
0x7C1C0400, // 00A2 CALL R7 2
0x80000000, // 00A3 RET 0
@@ -3048,7 +3056,7 @@ be_local_closure(class_lvh_obj_set_value_font, /* name */
be_str_weak(set_value_font),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
- 0x8C080151, // 0000 GETMET R2 R0 K81
+ 0x8C080150, // 0000 GETMET R2 R0 K80
0x5C100200, // 0001 MOVE R4 R1
0x7C080400, // 0002 CALL R2 2
0x80000000, // 0003 RET 0
@@ -3099,36 +3107,36 @@ be_local_closure(class_lvh_obj_set_toggle, /* name */
be_str_weak(set_toggle),
&be_const_str_solidified,
( &(const binstruction[32]) { /* code */
- 0xA40A5A00, // 0000 IMPORT R2 K45
+ 0xA40A5800, // 0000 IMPORT R2 K44
0x600C0004, // 0001 GETGBL R3 G4
0x5C100200, // 0002 MOVE R4 R1
0x7C0C0200, // 0003 CALL R3 1
- 0x1C0C072D, // 0004 EQ R3 R3 K45
+ 0x1C0C072C, // 0004 EQ R3 R3 K44
0x780E000C, // 0005 JMPF R3 #0013
- 0x8C0C0552, // 0006 GETMET R3 R2 K82
+ 0x8C0C0551, // 0006 GETMET R3 R2 K81
0x60140008, // 0007 GETGBL R5 G8
0x5C180200, // 0008 MOVE R6 R1
0x7C140200, // 0009 CALL R5 1
0x7C0C0400, // 000A CALL R3 2
0x5C040600, // 000B MOVE R1 R3
- 0x1C0C0353, // 000C EQ R3 R1 K83
+ 0x1C0C0352, // 000C EQ R3 R1 K82
0x780E0001, // 000D JMPF R3 #0010
0x50040200, // 000E LDBOOL R1 1 0
0x70020002, // 000F JMP #0013
- 0x1C0C0354, // 0010 EQ R3 R1 K84
+ 0x1C0C0353, // 0010 EQ R3 R1 K83
0x780E0000, // 0011 JMPF R3 #0013
0x50040000, // 0012 LDBOOL R1 0 0
0x78060005, // 0013 JMPF R1 #001A
0x880C0103, // 0014 GETMBR R3 R0 K3
- 0x8C0C073E, // 0015 GETMET R3 R3 K62
+ 0x8C0C073D, // 0015 GETMET R3 R3 K61
0xB8160A00, // 0016 GETNGBL R5 K5
- 0x88140B42, // 0017 GETMBR R5 R5 K66
+ 0x88140B41, // 0017 GETMBR R5 R5 K65
0x7C0C0400, // 0018 CALL R3 2
0x70020004, // 0019 JMP #001F
0x880C0103, // 001A GETMBR R3 R0 K3
- 0x8C0C073D, // 001B GETMET R3 R3 K61
+ 0x8C0C073C, // 001B GETMET R3 R3 K60
0xB8160A00, // 001C GETNGBL R5 K5
- 0x88140B42, // 001D GETMBR R5 R5 K66
+ 0x88140B41, // 001D GETMBR R5 R5 K65
0x7C0C0400, // 001E CALL R3 2
0x80000000, // 001F RET 0
})
@@ -3157,7 +3165,7 @@ be_local_closure(class_lvh_obj_get_adjustable, /* name */
0x88040103, // 0000 GETMBR R1 R0 K3
0x8C040304, // 0001 GETMET R1 R1 K4
0xB80E0A00, // 0002 GETNGBL R3 K5
- 0x880C0755, // 0003 GETMBR R3 R3 K85
+ 0x880C0754, // 0003 GETMBR R3 R3 K84
0x7C040400, // 0004 CALL R1 2
0x80040200, // 0005 RET 1 R1
})
@@ -3193,26 +3201,26 @@ be_local_closure(class_lvh_obj_get_align, /* name */
0x4C080000, // 0007 LDNIL R2
0x80040400, // 0008 RET 1 R2
0x88080101, // 0009 GETMBR R2 R0 K1
- 0x8C080556, // 000A GETMET R2 R2 K86
+ 0x8C080555, // 000A GETMET R2 R2 K85
0x5C100200, // 000B MOVE R4 R1
0x7C080400, // 000C CALL R2 2
0xB80E0A00, // 000D GETNGBL R3 K5
- 0x880C0757, // 000E GETMBR R3 R3 K87
+ 0x880C0756, // 000E GETMBR R3 R3 K86
0x1C0C0403, // 000F EQ R3 R2 R3
0x780E0001, // 0010 JMPF R3 #0013
- 0x8006B000, // 0011 RET 1 K88
+ 0x8006AE00, // 0011 RET 1 K87
0x7002000C, // 0012 JMP #0020
0xB80E0A00, // 0013 GETNGBL R3 K5
- 0x880C0759, // 0014 GETMBR R3 R3 K89
+ 0x880C0758, // 0014 GETMBR R3 R3 K88
0x1C0C0403, // 0015 EQ R3 R2 R3
0x780E0001, // 0016 JMPF R3 #0019
- 0x8006B400, // 0017 RET 1 K90
+ 0x8006B200, // 0017 RET 1 K89
0x70020006, // 0018 JMP #0020
0xB80E0A00, // 0019 GETNGBL R3 K5
- 0x880C075B, // 001A GETMBR R3 R3 K91
+ 0x880C075A, // 001A GETMBR R3 R3 K90
0x1C0C0403, // 001B EQ R3 R2 R3
0x780E0001, // 001C JMPF R3 #001F
- 0x8006B800, // 001D RET 1 K92
+ 0x8006B600, // 001D RET 1 K91
0x70020000, // 001E JMP #0020
0x80040400, // 001F RET 1 R2
0x80000000, // 0020 RET 0
@@ -3244,7 +3252,7 @@ be_local_closure(class_lvh_obj_get_pad_top, /* name */
0x20040202, // 0002 NE R1 R1 R2
0x78060007, // 0003 JMPF R1 #000C
0x88040103, // 0004 GETMBR R1 R0 K3
- 0x8C04035D, // 0005 GETMET R1 R1 K93
+ 0x8C04035C, // 0005 GETMET R1 R1 K92
0x880C0107, // 0006 GETMBR R3 R0 K7
0xB8120A00, // 0007 GETNGBL R4 K5
0x88100909, // 0008 GETMBR R4 R4 K9
@@ -3280,7 +3288,7 @@ be_local_closure(class_lvh_obj_set_radius2, /* name */
0x20080403, // 0002 NE R2 R2 R3
0x780A0009, // 0003 JMPF R2 #000E
0x88080103, // 0004 GETMBR R2 R0 K3
- 0x8C08055E, // 0005 GETMET R2 R2 K94
+ 0x8C08055D, // 0005 GETMET R2 R2 K93
0x60100009, // 0006 GETGBL R4 G9
0x5C140200, // 0007 MOVE R5 R1
0x7C100200, // 0008 CALL R4 1
@@ -3368,35 +3376,35 @@ be_local_closure(class_lvh_obj_event_cb, /* name */
( &(const binstruction[84]) { /* code */
0x88080115, // 0000 GETMBR R2 R0 K21
0x88080516, // 0001 GETMBR R2 R2 K22
- 0x8C0C035F, // 0002 GETMET R3 R1 K95
+ 0x8C0C035E, // 0002 GETMET R3 R1 K94
0x7C0C0200, // 0003 CALL R3 1
- 0x88100160, // 0004 GETMBR R4 R0 K96
- 0x20100947, // 0005 NE R4 R4 K71
+ 0x8810015F, // 0004 GETMBR R4 R0 K95
+ 0x20100946, // 0005 NE R4 R4 K70
0x78120008, // 0006 JMPF R4 #0010
0xB8120A00, // 0007 GETNGBL R4 K5
- 0x88100961, // 0008 GETMBR R4 R4 K97
+ 0x88100960, // 0008 GETMBR R4 R4 K96
0x1C100604, // 0009 EQ R4 R3 R4
0x78120004, // 000A JMPF R4 #0010
- 0xB812C400, // 000B GETNGBL R4 K98
- 0x8C100963, // 000C GETMET R4 R4 K99
+ 0xB812C200, // 000B GETNGBL R4 K97
+ 0x8C100962, // 000C GETMET R4 R4 K98
0x58180018, // 000D LDCONST R6 K24
0x841C0000, // 000E CLOSURE R7 P0
0x7C100600, // 000F CALL R4 3
- 0x88100164, // 0010 GETMBR R4 R0 K100
- 0x8C100936, // 0011 GETMET R4 R4 K54
+ 0x88100163, // 0010 GETMBR R4 R0 K99
+ 0x8C100935, // 0011 GETMET R4 R4 K53
0x5C180600, // 0012 MOVE R6 R3
0x7C100400, // 0013 CALL R4 2
0x4C140000, // 0014 LDNIL R5
0x20140805, // 0015 NE R5 R4 R5
0x7816003A, // 0016 JMPF R5 #0052
- 0xA416CA00, // 0017 IMPORT R5 K101
- 0x58180047, // 0018 LDCONST R6 K71
+ 0xA416C800, // 0017 IMPORT R5 K100
+ 0x58180046, // 0018 LDCONST R6 K70
0xB81E0A00, // 0019 GETNGBL R7 K5
- 0x881C0F66, // 001A GETMBR R7 R7 K102
+ 0x881C0F65, // 001A GETMBR R7 R7 K101
0x1C1C0607, // 001B EQ R7 R3 R7
0x781E0026, // 001C JMPF R7 #0044
0xA41E1C00, // 001D IMPORT R7 K14
- 0x8C200F37, // 001E GETMET R8 R7 K55
+ 0x8C200F36, // 001E GETMET R8 R7 K54
0x5C280000, // 001F MOVE R10 R0
0x502C0200, // 0020 LDBOOL R11 1 0
0x7C200600, // 0021 CALL R8 3
@@ -3406,16 +3414,16 @@ be_local_closure(class_lvh_obj_event_cb, /* name */
0x60240004, // 0025 GETGBL R9 G4
0x5C281000, // 0026 MOVE R10 R8
0x7C240200, // 0027 CALL R9 1
- 0x20241367, // 0028 NE R9 R9 K103
+ 0x20241366, // 0028 NE R9 R9 K102
0x78260006, // 0029 JMPF R9 #0031
0x60240018, // 002A GETGBL R9 G24
- 0x58280068, // 002B LDCONST R10 K104
- 0x8C2C0B69, // 002C GETMET R11 R5 K105
+ 0x58280067, // 002B LDCONST R10 K103
+ 0x8C2C0B68, // 002C GETMET R11 R5 K104
0x5C341000, // 002D MOVE R13 R8
0x7C2C0400, // 002E CALL R11 2
0x7C240400, // 002F CALL R9 2
0x5C181200, // 0030 MOVE R6 R9
- 0x8C240F37, // 0031 GETMET R9 R7 K55
+ 0x8C240F36, // 0031 GETMET R9 R7 K54
0x5C2C0000, // 0032 MOVE R11 R0
0x50300200, // 0033 LDBOOL R12 1 0
0x7C240600, // 0034 CALL R9 3
@@ -3425,25 +3433,25 @@ be_local_closure(class_lvh_obj_event_cb, /* name */
0x60280004, // 0038 GETGBL R10 G4
0x5C2C1200, // 0039 MOVE R11 R9
0x7C280200, // 003A CALL R10 1
- 0x20281567, // 003B NE R10 R10 K103
+ 0x20281566, // 003B NE R10 R10 K102
0x782A0006, // 003C JMPF R10 #0044
0x60280018, // 003D GETGBL R10 G24
- 0x582C006A, // 003E LDCONST R11 K106
- 0x8C300B69, // 003F GETMET R12 R5 K105
+ 0x582C0069, // 003E LDCONST R11 K105
+ 0x8C300B68, // 003F GETMET R12 R5 K104
0x5C381200, // 0040 MOVE R14 R9
0x7C300400, // 0041 CALL R12 2
0x7C280400, // 0042 CALL R10 2
0x00180C0A, // 0043 ADD R6 R6 R10
0x601C0018, // 0044 GETGBL R7 G24
- 0x5820006B, // 0045 LDCONST R8 K107
+ 0x5820006A, // 0045 LDCONST R8 K106
0x88240115, // 0046 GETMBR R9 R0 K21
- 0x8824136C, // 0047 GETMBR R9 R9 K108
- 0x88280123, // 0048 GETMBR R10 R0 K35
+ 0x8824136B, // 0047 GETMBR R9 R9 K107
+ 0x8828016C, // 0048 GETMBR R10 R0 K108
0x5C2C0800, // 0049 MOVE R11 R4
0x5C300C00, // 004A MOVE R12 R6
0x7C1C0A00, // 004B CALL R7 5
- 0xB822C400, // 004C GETNGBL R8 K98
- 0x8C201163, // 004D GETMET R8 R8 K99
+ 0xB822C200, // 004C GETNGBL R8 K97
+ 0x8C201162, // 004D GETMET R8 R8 K98
0x58280018, // 004E LDCONST R10 K24
0x842C0001, // 004F CLOSURE R11 P1
0x7C200600, // 0050 CALL R8 3
@@ -3674,13 +3682,13 @@ be_local_closure(class_lvh_obj_set_adjustable, /* name */
0x88080103, // 0001 GETMBR R2 R0 K3
0x8C080570, // 0002 GETMET R2 R2 K112
0xB8120A00, // 0003 GETNGBL R4 K5
- 0x88100955, // 0004 GETMBR R4 R4 K85
+ 0x88100954, // 0004 GETMBR R4 R4 K84
0x7C080400, // 0005 CALL R2 2
0x70020004, // 0006 JMP #000C
0x88080103, // 0007 GETMBR R2 R0 K3
0x8C080571, // 0008 GETMET R2 R2 K113
0xB8120A00, // 0009 GETNGBL R4 K5
- 0x88100955, // 000A GETMBR R4 R4 K85
+ 0x88100954, // 000A GETMBR R4 R4 K84
0x7C080400, // 000B CALL R2 2
0x80000000, // 000C RET 0
})
@@ -3706,7 +3714,7 @@ be_local_closure(class_lvh_obj_set_text, /* name */
be_str_weak(set_text),
&be_const_str_solidified,
( &(const binstruction[ 9]) { /* code */
- 0x8C08013F, // 0000 GETMET R2 R0 K63
+ 0x8C08013E, // 0000 GETMET R2 R0 K62
0x7C080200, // 0001 CALL R2 1
0x88080101, // 0002 GETMBR R2 R0 K1
0x8C080510, // 0003 GETMET R2 R2 K16
@@ -3738,7 +3746,7 @@ be_local_closure(class_lvh_obj_set_value_ofs_y, /* name */
be_str_weak(set_value_ofs_y),
&be_const_str_solidified,
( &(const binstruction[ 9]) { /* code */
- 0x8C08013F, // 0000 GETMET R2 R0 K63
+ 0x8C08013E, // 0000 GETMET R2 R0 K62
0x7C080200, // 0001 CALL R2 1
0x88080101, // 0002 GETMBR R2 R0 K1
0x8C080573, // 0003 GETMET R2 R2 K115
@@ -3859,7 +3867,7 @@ be_local_closure(class_lvh_obj_set_label_mode, /* name */
0x4C0C0000, // 0021 LDNIL R3
0x200C0403, // 0022 NE R3 R2 R3
0x780E0005, // 0023 JMPF R3 #002A
- 0x8C0C013F, // 0024 GETMET R3 R0 K63
+ 0x8C0C013E, // 0024 GETMET R3 R0 K62
0x7C0C0200, // 0025 CALL R3 1
0x880C0101, // 0026 GETMBR R3 R0 K1
0x8C0C0783, // 0027 GETMET R3 R3 K131
@@ -3929,28 +3937,28 @@ be_local_closure(class_lvh_obj_set_align, /* name */
0x1C100518, // 0001 EQ R4 R2 K24
0x78120000, // 0002 JMPF R4 #0004
0x58080018, // 0003 LDCONST R2 K24
- 0x8C10013F, // 0004 GETMET R4 R0 K63
+ 0x8C10013E, // 0004 GETMET R4 R0 K62
0x7C100200, // 0005 CALL R4 1
0x1C100318, // 0006 EQ R4 R1 K24
0x74120001, // 0007 JMPT R4 #000A
- 0x1C100358, // 0008 EQ R4 R1 K88
+ 0x1C100357, // 0008 EQ R4 R1 K87
0x78120002, // 0009 JMPF R4 #000D
0xB8120A00, // 000A GETNGBL R4 K5
- 0x880C0957, // 000B GETMBR R3 R4 K87
+ 0x880C0956, // 000B GETMBR R3 R4 K86
0x7002000C, // 000C JMP #001A
0x1C10031A, // 000D EQ R4 R1 K26
0x74120001, // 000E JMPT R4 #0011
- 0x1C10035A, // 000F EQ R4 R1 K90
+ 0x1C100359, // 000F EQ R4 R1 K89
0x78120002, // 0010 JMPF R4 #0014
0xB8120A00, // 0011 GETNGBL R4 K5
- 0x880C0959, // 0012 GETMBR R3 R4 K89
+ 0x880C0958, // 0012 GETMBR R3 R4 K88
0x70020005, // 0013 JMP #001A
0x1C100384, // 0014 EQ R4 R1 K132
0x74120001, // 0015 JMPT R4 #0018
- 0x1C10035C, // 0016 EQ R4 R1 K92
+ 0x1C10035B, // 0016 EQ R4 R1 K91
0x78120001, // 0017 JMPF R4 #001A
0xB8120A00, // 0018 GETNGBL R4 K5
- 0x880C095B, // 0019 GETMBR R3 R4 K91
+ 0x880C095A, // 0019 GETMBR R3 R4 K90
0x88100101, // 001A GETMBR R4 R0 K1
0x8C100985, // 001B GETMET R4 R4 K133
0x5C180600, // 001C MOVE R6 R3
@@ -8127,50 +8135,51 @@ be_local_class(lvh_scale,
})),
be_str_weak(lvh_scale)
);
-// compact class 'lvh_scale_section' ktab size: 42, total: 57 (saved 120 bytes)
-static const bvalue be_ktab_class_lvh_scale_section[42] = {
+// compact class 'lvh_scale_section' ktab size: 43, total: 58 (saved 120 bytes)
+static const bvalue be_ktab_class_lvh_scale_section[43] = {
/* K0 */ be_nested_str_weak(_style),
/* K1 */ be_nested_str_weak(del),
/* K2 */ be_nested_str_weak(_style10),
/* K3 */ be_nested_str_weak(_style30),
- /* K4 */ be_nested_str_weak(_lv_obj),
- /* K5 */ be_nested_str_weak(_min),
- /* K6 */ be_const_int(0),
- /* K7 */ be_nested_str_weak(_max),
- /* K8 */ be_nested_str_weak(_parent_lvh),
- /* K9 */ be_nested_str_weak(_page),
- /* K10 */ be_nested_str_weak(_hm),
- /* K11 */ be_nested_str_weak(lvh_scale),
- /* K12 */ be_nested_str_weak(add_section),
- /* K13 */ be_nested_str_weak(lv),
- /* K14 */ be_nested_str_weak(style),
- /* K15 */ be_nested_str_weak(set_style),
- /* K16 */ be_nested_str_weak(PART_MAIN),
- /* K17 */ be_nested_str_weak(PART_INDICATOR),
- /* K18 */ be_nested_str_weak(PART_ITEMS),
- /* K19 */ be_nested_str_weak(HSP_X3A_X20_X27scale_section_X27_X20should_X20have_X20a_X20parent_X20of_X20type_X20_X27scale_X27),
- /* K20 */ be_nested_str_weak(set_range),
- /* K21 */ be_nested_str_weak(string),
- /* K22 */ be_nested_str_weak(introspect),
- /* K23 */ be_nested_str_weak(startswith),
- /* K24 */ be_nested_str_weak(set_),
- /* K25 */ be_nested_str_weak(get_),
- /* K26 */ be_nested_str_weak(endswith),
- /* K27 */ be_nested_str_weak(_X25),
- /* K28 */ be_nested_str_weak(pct),
- /* K29 */ be_const_int(3),
- /* K30 */ be_nested_str_weak(byte),
- /* K31 */ be_const_int(2147483647),
- /* K32 */ be_nested_str_weak(value_error),
- /* K33 */ be_nested_str_weak(only_X20modifiers_X20_X2710_X27_X20or_X20_X2730_X27_X20allowed),
- /* K34 */ be_nested_str_weak(_attr_ignore),
- /* K35 */ be_nested_str_weak(find),
- /* K36 */ be_nested_str_weak(get),
- /* K37 */ be_nested_str_weak(function),
- /* K38 */ be_nested_str_weak(is_color_attribute),
- /* K39 */ be_nested_str_weak(parse_color),
- /* K40 */ be_nested_str_weak(_X20for_X20),
- /* K41 */ be_nested_str_weak(HSP_X3A_X20Could_X20not_X20find_X20function_X20set_),
+ /* K4 */ be_nested_str_weak(_delete),
+ /* K5 */ be_nested_str_weak(_lv_obj),
+ /* K6 */ be_nested_str_weak(_min),
+ /* K7 */ be_const_int(0),
+ /* K8 */ be_nested_str_weak(_max),
+ /* K9 */ be_nested_str_weak(_parent_lvh),
+ /* K10 */ be_nested_str_weak(_page),
+ /* K11 */ be_nested_str_weak(_hm),
+ /* K12 */ be_nested_str_weak(lvh_scale),
+ /* K13 */ be_nested_str_weak(add_section),
+ /* K14 */ be_nested_str_weak(lv),
+ /* K15 */ be_nested_str_weak(style),
+ /* K16 */ be_nested_str_weak(set_style),
+ /* K17 */ be_nested_str_weak(PART_MAIN),
+ /* K18 */ be_nested_str_weak(PART_INDICATOR),
+ /* K19 */ be_nested_str_weak(PART_ITEMS),
+ /* K20 */ be_nested_str_weak(HSP_X3A_X20_X27scale_section_X27_X20should_X20have_X20a_X20parent_X20of_X20type_X20_X27scale_X27),
+ /* K21 */ be_nested_str_weak(set_range),
+ /* K22 */ be_nested_str_weak(string),
+ /* K23 */ be_nested_str_weak(introspect),
+ /* K24 */ be_nested_str_weak(startswith),
+ /* K25 */ be_nested_str_weak(set_),
+ /* K26 */ be_nested_str_weak(get_),
+ /* K27 */ be_nested_str_weak(endswith),
+ /* K28 */ be_nested_str_weak(_X25),
+ /* K29 */ be_nested_str_weak(pct),
+ /* K30 */ be_const_int(3),
+ /* K31 */ be_nested_str_weak(byte),
+ /* K32 */ be_const_int(2147483647),
+ /* K33 */ be_nested_str_weak(value_error),
+ /* K34 */ be_nested_str_weak(only_X20modifiers_X20_X2710_X27_X20or_X20_X2730_X27_X20allowed),
+ /* K35 */ be_nested_str_weak(_attr_ignore),
+ /* K36 */ be_nested_str_weak(find),
+ /* K37 */ be_nested_str_weak(get),
+ /* K38 */ be_nested_str_weak(function),
+ /* K39 */ be_nested_str_weak(is_color_attribute),
+ /* K40 */ be_nested_str_weak(parse_color),
+ /* K41 */ be_nested_str_weak(_X20for_X20),
+ /* K42 */ be_nested_str_weak(HSP_X3A_X20Could_X20not_X20find_X20function_X20set_),
};
@@ -8192,7 +8201,7 @@ be_local_closure(class_lvh_scale_section__delete, /* name */
&be_ktab_class_lvh_scale_section, /* shared constants */
be_str_weak(_delete),
&be_const_str_solidified,
- ( &(const binstruction[16]) { /* code */
+ ( &(const binstruction[21]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x7C040200, // 0002 CALL R1 1
@@ -8208,7 +8217,12 @@ be_local_closure(class_lvh_scale_section__delete, /* name */
0x7C040200, // 000C CALL R1 1
0x4C040000, // 000D LDNIL R1
0x90020601, // 000E SETMBR R0 K3 R1
- 0x80000000, // 000F RET 0
+ 0x60040003, // 000F GETGBL R1 G3
+ 0x5C080000, // 0010 MOVE R2 R0
+ 0x7C040200, // 0011 CALL R1 1
+ 0x8C040304, // 0012 GETMET R1 R1 K4
+ 0x7C040200, // 0013 CALL R1 1
+ 0x80000000, // 0014 RET 0
})
)
);
@@ -8233,54 +8247,54 @@ be_local_closure(class_lvh_scale_section_post_init, /* name */
&be_const_str_solidified,
( &(const binstruction[51]) { /* code */
0x4C040000, // 0000 LDNIL R1
- 0x90020801, // 0001 SETMBR R0 K4 R1
- 0x90020B06, // 0002 SETMBR R0 K5 K6
- 0x90020F06, // 0003 SETMBR R0 K7 K6
+ 0x90020A01, // 0001 SETMBR R0 K5 R1
+ 0x90020D07, // 0002 SETMBR R0 K6 K7
+ 0x90021107, // 0003 SETMBR R0 K8 K7
0x6004000F, // 0004 GETGBL R1 G15
- 0x88080108, // 0005 GETMBR R2 R0 K8
- 0x880C0109, // 0006 GETMBR R3 R0 K9
- 0x880C070A, // 0007 GETMBR R3 R3 K10
- 0x880C070B, // 0008 GETMBR R3 R3 K11
+ 0x88080109, // 0005 GETMBR R2 R0 K9
+ 0x880C010A, // 0006 GETMBR R3 R0 K10
+ 0x880C070B, // 0007 GETMBR R3 R3 K11
+ 0x880C070C, // 0008 GETMBR R3 R3 K12
0x7C040400, // 0009 CALL R1 2
0x78060023, // 000A JMPF R1 #002F
- 0x88040108, // 000B GETMBR R1 R0 K8
- 0x88040304, // 000C GETMBR R1 R1 K4
- 0x8C04030C, // 000D GETMET R1 R1 K12
+ 0x88040109, // 000B GETMBR R1 R0 K9
+ 0x88040305, // 000C GETMBR R1 R1 K5
+ 0x8C04030D, // 000D GETMET R1 R1 K13
0x7C040200, // 000E CALL R1 1
- 0x90020801, // 000F SETMBR R0 K4 R1
- 0xB8061A00, // 0010 GETNGBL R1 K13
- 0x8C04030E, // 0011 GETMET R1 R1 K14
+ 0x90020A01, // 000F SETMBR R0 K5 R1
+ 0xB8061C00, // 0010 GETNGBL R1 K14
+ 0x8C04030F, // 0011 GETMET R1 R1 K15
0x7C040200, // 0012 CALL R1 1
0x90020001, // 0013 SETMBR R0 K0 R1
- 0x88040104, // 0014 GETMBR R1 R0 K4
- 0x8C04030F, // 0015 GETMET R1 R1 K15
- 0xB80E1A00, // 0016 GETNGBL R3 K13
- 0x880C0710, // 0017 GETMBR R3 R3 K16
+ 0x88040105, // 0014 GETMBR R1 R0 K5
+ 0x8C040310, // 0015 GETMET R1 R1 K16
+ 0xB80E1C00, // 0016 GETNGBL R3 K14
+ 0x880C0711, // 0017 GETMBR R3 R3 K17
0x88100100, // 0018 GETMBR R4 R0 K0
0x7C040600, // 0019 CALL R1 3
- 0xB8061A00, // 001A GETNGBL R1 K13
- 0x8C04030E, // 001B GETMET R1 R1 K14
+ 0xB8061C00, // 001A GETNGBL R1 K14
+ 0x8C04030F, // 001B GETMET R1 R1 K15
0x7C040200, // 001C CALL R1 1
0x90020401, // 001D SETMBR R0 K2 R1
- 0x88040104, // 001E GETMBR R1 R0 K4
- 0x8C04030F, // 001F GETMET R1 R1 K15
- 0xB80E1A00, // 0020 GETNGBL R3 K13
- 0x880C0711, // 0021 GETMBR R3 R3 K17
+ 0x88040105, // 001E GETMBR R1 R0 K5
+ 0x8C040310, // 001F GETMET R1 R1 K16
+ 0xB80E1C00, // 0020 GETNGBL R3 K14
+ 0x880C0712, // 0021 GETMBR R3 R3 K18
0x88100102, // 0022 GETMBR R4 R0 K2
0x7C040600, // 0023 CALL R1 3
- 0xB8061A00, // 0024 GETNGBL R1 K13
- 0x8C04030E, // 0025 GETMET R1 R1 K14
+ 0xB8061C00, // 0024 GETNGBL R1 K14
+ 0x8C04030F, // 0025 GETMET R1 R1 K15
0x7C040200, // 0026 CALL R1 1
0x90020601, // 0027 SETMBR R0 K3 R1
- 0x88040104, // 0028 GETMBR R1 R0 K4
- 0x8C04030F, // 0029 GETMET R1 R1 K15
- 0xB80E1A00, // 002A GETNGBL R3 K13
- 0x880C0712, // 002B GETMBR R3 R3 K18
+ 0x88040105, // 0028 GETMBR R1 R0 K5
+ 0x8C040310, // 0029 GETMET R1 R1 K16
+ 0xB80E1C00, // 002A GETNGBL R3 K14
+ 0x880C0713, // 002B GETMBR R3 R3 K19
0x88100103, // 002C GETMBR R4 R0 K3
0x7C040600, // 002D CALL R1 3
0x70020002, // 002E JMP #0032
0x60040001, // 002F GETGBL R1 G1
- 0x58080013, // 0030 LDCONST R2 K19
+ 0x58080014, // 0030 LDCONST R2 K20
0x7C040200, // 0031 CALL R1 1
0x80000000, // 0032 RET 0
})
@@ -8309,11 +8323,11 @@ be_local_closure(class_lvh_scale_section_set_min, /* name */
0x60080009, // 0000 GETGBL R2 G9
0x5C0C0200, // 0001 MOVE R3 R1
0x7C080200, // 0002 CALL R2 1
- 0x880C0107, // 0003 GETMBR R3 R0 K7
+ 0x880C0108, // 0003 GETMBR R3 R0 K8
0x14100602, // 0004 LT R4 R3 R2
0x78120000, // 0005 JMPF R4 #0007
0x5C0C0400, // 0006 MOVE R3 R2
- 0x8C100114, // 0007 GETMET R4 R0 K20
+ 0x8C100115, // 0007 GETMET R4 R0 K21
0x5C180400, // 0008 MOVE R6 R2
0x5C1C0600, // 0009 MOVE R7 R3
0x7C100600, // 000A CALL R4 3
@@ -8341,10 +8355,10 @@ be_local_closure(class_lvh_scale_section_set_range, /* name */
be_str_weak(set_range),
&be_const_str_solidified,
( &(const binstruction[ 8]) { /* code */
- 0x90020A01, // 0000 SETMBR R0 K5 R1
- 0x90020E02, // 0001 SETMBR R0 K7 R2
- 0x880C0104, // 0002 GETMBR R3 R0 K4
- 0x8C0C0714, // 0003 GETMET R3 R3 K20
+ 0x90020C01, // 0000 SETMBR R0 K6 R1
+ 0x90021002, // 0001 SETMBR R0 K8 R2
+ 0x880C0105, // 0002 GETMBR R3 R0 K5
+ 0x8C0C0715, // 0003 GETMET R3 R3 K21
0x5C140200, // 0004 MOVE R5 R1
0x5C180400, // 0005 MOVE R6 R2
0x7C0C0600, // 0006 CALL R3 3
@@ -8372,14 +8386,14 @@ be_local_closure(class_lvh_scale_section_set_max, /* name */
be_str_weak(set_max),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
- 0x88080105, // 0000 GETMBR R2 R0 K5
+ 0x88080106, // 0000 GETMBR R2 R0 K6
0x600C0009, // 0001 GETGBL R3 G9
0x5C100200, // 0002 MOVE R4 R1
0x7C0C0200, // 0003 CALL R3 1
0x24100403, // 0004 GT R4 R2 R3
0x78120000, // 0005 JMPF R4 #0007
0x5C080600, // 0006 MOVE R2 R3
- 0x8C100114, // 0007 GETMET R4 R0 K20
+ 0x8C100115, // 0007 GETMET R4 R0 K21
0x5C180400, // 0008 MOVE R6 R2
0x5C1C0600, // 0009 MOVE R7 R3
0x7C100600, // 000A CALL R4 3
@@ -8407,29 +8421,29 @@ be_local_closure(class_lvh_scale_section_setmember, /* name */
be_str_weak(setmember),
&be_const_str_solidified,
( &(const binstruction[141]) { /* code */
- 0xA40E2A00, // 0000 IMPORT R3 K21
- 0xA4122C00, // 0001 IMPORT R4 K22
- 0x8C140717, // 0002 GETMET R5 R3 K23
+ 0xA40E2C00, // 0000 IMPORT R3 K22
+ 0xA4122E00, // 0001 IMPORT R4 K23
+ 0x8C140718, // 0002 GETMET R5 R3 K24
0x5C1C0200, // 0003 MOVE R7 R1
- 0x58200018, // 0004 LDCONST R8 K24
+ 0x58200019, // 0004 LDCONST R8 K25
0x7C140600, // 0005 CALL R5 3
0x74160004, // 0006 JMPT R5 #000C
- 0x8C140717, // 0007 GETMET R5 R3 K23
+ 0x8C140718, // 0007 GETMET R5 R3 K24
0x5C1C0200, // 0008 MOVE R7 R1
- 0x58200019, // 0009 LDCONST R8 K25
+ 0x5820001A, // 0009 LDCONST R8 K26
0x7C140600, // 000A CALL R5 3
0x78160000, // 000B JMPF R5 #000D
0x80000A00, // 000C RET 0
- 0x8C14071A, // 000D GETMET R5 R3 K26
+ 0x8C14071B, // 000D GETMET R5 R3 K27
0x5C1C0200, // 000E MOVE R7 R1
- 0x5820001B, // 000F LDCONST R8 K27
+ 0x5820001C, // 000F LDCONST R8 K28
0x7C140600, // 0010 CALL R5 3
0x78160009, // 0011 JMPF R5 #001C
0x5415FFFD, // 0012 LDINT R5 -2
- 0x40160C05, // 0013 CONNECT R5 K6 R5
+ 0x40160E05, // 0013 CONNECT R5 K7 R5
0x94040205, // 0014 GETIDX R1 R1 R5
- 0xB8161A00, // 0015 GETNGBL R5 K13
- 0x8C140B1C, // 0016 GETMET R5 R5 K28
+ 0xB8161C00, // 0015 GETNGBL R5 K14
+ 0x8C140B1D, // 0016 GETMET R5 R5 K29
0x601C0009, // 0017 GETGBL R7 G9
0x5C200400, // 0018 MOVE R8 R2
0x7C1C0200, // 0019 CALL R7 1
@@ -8439,13 +8453,13 @@ be_local_closure(class_lvh_scale_section_setmember, /* name */
0x6018000C, // 001D GETGBL R6 G12
0x5C1C0200, // 001E MOVE R7 R1
0x7C180200, // 001F CALL R6 1
- 0x28180D1D, // 0020 GE R6 R6 K29
+ 0x28180D1E, // 0020 GE R6 R6 K30
0x781A0023, // 0021 JMPF R6 #0046
- 0x8C18071E, // 0022 GETMET R6 R3 K30
+ 0x8C18071F, // 0022 GETMET R6 R3 K31
0x5421FFFE, // 0023 LDINT R8 -1
0x94200208, // 0024 GETIDX R8 R1 R8
0x7C180400, // 0025 CALL R6 2
- 0x8C1C071E, // 0026 GETMET R7 R3 K30
+ 0x8C1C071F, // 0026 GETMET R7 R3 K31
0x5425FFFD, // 0027 LDINT R9 -2
0x94240209, // 0028 GETIDX R9 R1 R9
0x7C1C0400, // 0029 CALL R7 2
@@ -8463,12 +8477,12 @@ be_local_closure(class_lvh_scale_section_setmember, /* name */
0x7822000F, // 0035 JMPF R8 #0046
0x60200009, // 0036 GETGBL R8 G9
0x5425FFFD, // 0037 LDINT R9 -2
- 0x4024131F, // 0038 CONNECT R9 R9 K31
+ 0x40241320, // 0038 CONNECT R9 R9 K32
0x94240209, // 0039 GETIDX R9 R1 R9
0x7C200200, // 003A CALL R8 1
0x5C141000, // 003B MOVE R5 R8
0x5421FFFC, // 003C LDINT R8 -3
- 0x40220C08, // 003D CONNECT R8 K6 R8
+ 0x40220E08, // 003D CONNECT R8 K7 R8
0x94040208, // 003E GETIDX R1 R1 R8
0x54220009, // 003F LDINT R8 10
0x20200A08, // 0040 NE R8 R5 R8
@@ -8476,9 +8490,9 @@ be_local_closure(class_lvh_scale_section_setmember, /* name */
0x5422001D, // 0042 LDINT R8 30
0x20200A08, // 0043 NE R8 R5 R8
0x78220000, // 0044 JMPF R8 #0046
- 0xB0064121, // 0045 RAISE 1 K32 K33
- 0x88180122, // 0046 GETMBR R6 R0 K34
- 0x8C180D23, // 0047 GETMET R6 R6 K35
+ 0xB0064322, // 0045 RAISE 1 K33 K34
+ 0x88180123, // 0046 GETMBR R6 R0 K35
+ 0x8C180D24, // 0047 GETMET R6 R6 K36
0x5C200200, // 0048 MOVE R8 R1
0x7C180400, // 0049 CALL R6 2
0x4C1C0000, // 004A LDNIL R7
@@ -8495,35 +8509,35 @@ be_local_closure(class_lvh_scale_section_setmember, /* name */
0x1C1C0A07, // 0055 EQ R7 R5 R7
0x781E0000, // 0056 JMPF R7 #0058
0x88180103, // 0057 GETMBR R6 R0 K3
- 0x8C1C0924, // 0058 GETMET R7 R4 K36
+ 0x8C1C0925, // 0058 GETMET R7 R4 K37
0x5C240000, // 0059 MOVE R9 R0
- 0x002A3001, // 005A ADD R10 K24 R1
+ 0x002A3201, // 005A ADD R10 K25 R1
0x7C1C0600, // 005B CALL R7 3
0x60200004, // 005C GETGBL R8 G4
0x5C240E00, // 005D MOVE R9 R7
0x7C200200, // 005E CALL R8 1
- 0x1C201125, // 005F EQ R8 R8 K37
+ 0x1C201126, // 005F EQ R8 R8 K38
0x78220004, // 0060 JMPF R8 #0066
0x5C200E00, // 0061 MOVE R8 R7
0x5C240000, // 0062 MOVE R9 R0
0x5C280400, // 0063 MOVE R10 R2
0x7C200400, // 0064 CALL R8 2
0x80001000, // 0065 RET 0
- 0x8C200924, // 0066 GETMET R8 R4 K36
+ 0x8C200925, // 0066 GETMET R8 R4 K37
0x5C280C00, // 0067 MOVE R10 R6
- 0x002E3001, // 0068 ADD R11 K24 R1
+ 0x002E3201, // 0068 ADD R11 K25 R1
0x7C200600, // 0069 CALL R8 3
0x5C1C1000, // 006A MOVE R7 R8
0x60200004, // 006B GETGBL R8 G4
0x5C240E00, // 006C MOVE R9 R7
0x7C200200, // 006D CALL R8 1
- 0x1C201125, // 006E EQ R8 R8 K37
+ 0x1C201126, // 006E EQ R8 R8 K38
0x78220018, // 006F JMPF R8 #0089
- 0x8C200126, // 0070 GETMET R8 R0 K38
+ 0x8C200127, // 0070 GETMET R8 R0 K39
0x5C280200, // 0071 MOVE R10 R1
0x7C200400, // 0072 CALL R8 2
0x78220003, // 0073 JMPF R8 #0078
- 0x8C200127, // 0074 GETMET R8 R0 K39
+ 0x8C200128, // 0074 GETMET R8 R0 K40
0x5C280400, // 0075 MOVE R10 R2
0x7C200400, // 0076 CALL R8 2
0x5C081000, // 0077 MOVE R2 R8
@@ -8536,7 +8550,7 @@ be_local_closure(class_lvh_scale_section_setmember, /* name */
0x70020006, // 007E JMP #0086
0xAC200002, // 007F CATCH R8 0 2
0x70020003, // 0080 JMP #0085
- 0x00281328, // 0081 ADD R10 R9 K40
+ 0x00281329, // 0081 ADD R10 R9 K41
0x00281401, // 0082 ADD R10 R10 R1
0xB004100A, // 0083 RAISE 1 R8 R10
0x70020000, // 0084 JMP #0086
@@ -8545,7 +8559,7 @@ be_local_closure(class_lvh_scale_section_setmember, /* name */
0x80041000, // 0087 RET 1 R8
0x70020002, // 0088 JMP #008C
0x60200001, // 0089 GETGBL R8 G1
- 0x00265201, // 008A ADD R9 K41 R1
+ 0x00265401, // 008A ADD R9 K42 R1
0x7C200200, // 008B CALL R8 1
0x80000000, // 008C RET 0
})
@@ -9168,8 +9182,8 @@ be_local_class(lvh_span,
})),
be_str_weak(lvh_span)
);
-// compact class 'lvh_chart' ktab size: 24, total: 54 (saved 240 bytes)
-static const bvalue be_ktab_class_lvh_chart[24] = {
+// compact class 'lvh_chart' ktab size: 25, total: 56 (saved 248 bytes)
+static const bvalue be_ktab_class_lvh_chart[25] = {
/* K0 */ be_nested_str_weak(_y_min),
/* K1 */ be_nested_str_weak(_lv_obj),
/* K2 */ be_nested_str_weak(set_next_value),
@@ -9181,19 +9195,20 @@ static const bvalue be_ktab_class_lvh_chart[24] = {
/* K8 */ be_nested_str_weak(_y_max),
/* K9 */ be_nested_str_weak(_ser2),
/* K10 */ be_nested_str_weak(set_series_color),
- /* K11 */ be_const_int(0),
- /* K12 */ be_nested_str_weak(_h_div),
- /* K13 */ be_const_int(3),
- /* K14 */ be_nested_str_weak(_v_div),
- /* K15 */ be_nested_str_weak(set_update_mode),
- /* K16 */ be_nested_str_weak(CHART_UPDATE_MODE_SHIFT),
- /* K17 */ be_nested_str_weak(add_series),
- /* K18 */ be_nested_str_weak(color),
- /* K19 */ be_const_int(15615044),
- /* K20 */ be_const_int(4517444),
- /* K21 */ be_nested_str_weak(_val),
- /* K22 */ be_nested_str_weak(add_point),
- /* K23 */ be_nested_str_weak(set_div_line_count),
+ /* K11 */ be_nested_str_weak(parse_color),
+ /* K12 */ be_const_int(0),
+ /* K13 */ be_nested_str_weak(_h_div),
+ /* K14 */ be_const_int(3),
+ /* K15 */ be_nested_str_weak(_v_div),
+ /* K16 */ be_nested_str_weak(set_update_mode),
+ /* K17 */ be_nested_str_weak(CHART_UPDATE_MODE_SHIFT),
+ /* K18 */ be_nested_str_weak(add_series),
+ /* K19 */ be_nested_str_weak(color),
+ /* K20 */ be_const_int(15615044),
+ /* K21 */ be_const_int(4517444),
+ /* K22 */ be_nested_str_weak(_val),
+ /* K23 */ be_nested_str_weak(add_point),
+ /* K24 */ be_nested_str_weak(set_div_line_count),
};
@@ -9346,7 +9361,7 @@ be_local_closure(class_lvh_chart_add_point2, /* name */
********************************************************************/
be_local_closure(class_lvh_chart_set_series1_color, /* name */
be_nested_proto(
- 6, /* nstack */
+ 8, /* nstack */
2, /* argc */
10, /* varg */
0, /* has upvals */
@@ -9357,13 +9372,15 @@ be_local_closure(class_lvh_chart_set_series1_color, /* name */
&be_ktab_class_lvh_chart, /* shared constants */
be_str_weak(set_series1_color),
&be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
+ ( &(const binstruction[ 8]) { /* code */
0x88080101, // 0000 GETMBR R2 R0 K1
0x8C08050A, // 0001 GETMET R2 R2 K10
0x88100103, // 0002 GETMBR R4 R0 K3
- 0x5C140200, // 0003 MOVE R5 R1
- 0x7C080600, // 0004 CALL R2 3
- 0x80000000, // 0005 RET 0
+ 0x8C14010B, // 0003 GETMET R5 R0 K11
+ 0x5C1C0200, // 0004 MOVE R7 R1
+ 0x7C140400, // 0005 CALL R5 2
+ 0x7C080600, // 0006 CALL R2 3
+ 0x80000000, // 0007 RET 0
})
)
);
@@ -9375,7 +9392,7 @@ be_local_closure(class_lvh_chart_set_series1_color, /* name */
********************************************************************/
be_local_closure(class_lvh_chart_set_series2_color, /* name */
be_nested_proto(
- 6, /* nstack */
+ 8, /* nstack */
2, /* argc */
10, /* varg */
0, /* has upvals */
@@ -9386,13 +9403,15 @@ be_local_closure(class_lvh_chart_set_series2_color, /* name */
&be_ktab_class_lvh_chart, /* shared constants */
be_str_weak(set_series2_color),
&be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
+ ( &(const binstruction[ 8]) { /* code */
0x88080101, // 0000 GETMBR R2 R0 K1
0x8C08050A, // 0001 GETMET R2 R2 K10
0x88100109, // 0002 GETMBR R4 R0 K9
- 0x5C140200, // 0003 MOVE R5 R1
- 0x7C080600, // 0004 CALL R2 3
- 0x80000000, // 0005 RET 0
+ 0x8C14010B, // 0003 GETMET R5 R0 K11
+ 0x5C1C0200, // 0004 MOVE R7 R1
+ 0x7C140400, // 0005 CALL R5 2
+ 0x7C080600, // 0006 CALL R2 3
+ 0x80000000, // 0007 RET 0
})
)
);
@@ -9448,32 +9467,32 @@ be_local_closure(class_lvh_chart_post_init, /* name */
be_str_weak(post_init),
&be_const_str_solidified,
( &(const binstruction[32]) { /* code */
- 0x9002010B, // 0000 SETMBR R0 K0 K11
+ 0x9002010C, // 0000 SETMBR R0 K0 K12
0x54060063, // 0001 LDINT R1 100
0x90021001, // 0002 SETMBR R0 K8 R1
- 0x9002190D, // 0003 SETMBR R0 K12 K13
+ 0x90021B0E, // 0003 SETMBR R0 K13 K14
0x54060004, // 0004 LDINT R1 5
- 0x90021C01, // 0005 SETMBR R0 K14 R1
+ 0x90021E01, // 0005 SETMBR R0 K15 R1
0x88040101, // 0006 GETMBR R1 R0 K1
- 0x8C04030F, // 0007 GETMET R1 R1 K15
+ 0x8C040310, // 0007 GETMET R1 R1 K16
0xB80E0C00, // 0008 GETNGBL R3 K6
- 0x880C0710, // 0009 GETMBR R3 R3 K16
+ 0x880C0711, // 0009 GETMBR R3 R3 K17
0x7C040400, // 000A CALL R1 2
0x88040101, // 000B GETMBR R1 R0 K1
- 0x8C040311, // 000C GETMET R1 R1 K17
+ 0x8C040312, // 000C GETMET R1 R1 K18
0xB80E0C00, // 000D GETNGBL R3 K6
- 0x8C0C0712, // 000E GETMET R3 R3 K18
- 0x58140013, // 000F LDCONST R5 K19
+ 0x8C0C0713, // 000E GETMET R3 R3 K19
+ 0x58140014, // 000F LDCONST R5 K20
0x7C0C0400, // 0010 CALL R3 2
0xB8120C00, // 0011 GETNGBL R4 K6
0x88100907, // 0012 GETMBR R4 R4 K7
0x7C040600, // 0013 CALL R1 3
0x90020601, // 0014 SETMBR R0 K3 R1
0x88040101, // 0015 GETMBR R1 R0 K1
- 0x8C040311, // 0016 GETMET R1 R1 K17
+ 0x8C040312, // 0016 GETMET R1 R1 K18
0xB80E0C00, // 0017 GETNGBL R3 K6
- 0x8C0C0712, // 0018 GETMET R3 R3 K18
- 0x58140014, // 0019 LDCONST R5 K20
+ 0x8C0C0713, // 0018 GETMET R3 R3 K19
+ 0x58140015, // 0019 LDCONST R5 K21
0x7C0C0400, // 001A CALL R3 2
0xB8120C00, // 001B GETNGBL R4 K6
0x88100907, // 001C GETMBR R4 R4 K7
@@ -9528,8 +9547,8 @@ be_local_closure(class_lvh_chart_set_val, /* name */
be_str_weak(set_val),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
- 0x90022A01, // 0000 SETMBR R0 K21 R1
- 0x8C080116, // 0001 GETMET R2 R0 K22
+ 0x90022C01, // 0000 SETMBR R0 K22 R1
+ 0x8C080117, // 0001 GETMET R2 R0 K23
0x5C100200, // 0002 MOVE R4 R1
0x7C080400, // 0003 CALL R2 2
0x80000000, // 0004 RET 0
@@ -9556,11 +9575,11 @@ be_local_closure(class_lvh_chart_set_v_div_line_count, /* name */
be_str_weak(set_v_div_line_count),
&be_const_str_solidified,
( &(const binstruction[ 7]) { /* code */
- 0x90021C01, // 0000 SETMBR R0 K14 R1
+ 0x90021E01, // 0000 SETMBR R0 K15 R1
0x88080101, // 0001 GETMBR R2 R0 K1
- 0x8C080517, // 0002 GETMET R2 R2 K23
- 0x8810010C, // 0003 GETMBR R4 R0 K12
- 0x8814010E, // 0004 GETMBR R5 R0 K14
+ 0x8C080518, // 0002 GETMET R2 R2 K24
+ 0x8810010D, // 0003 GETMBR R4 R0 K13
+ 0x8814010F, // 0004 GETMBR R5 R0 K15
0x7C080600, // 0005 CALL R2 3
0x80000000, // 0006 RET 0
})
@@ -9586,11 +9605,11 @@ be_local_closure(class_lvh_chart_set_h_div_line_count, /* name */
be_str_weak(set_h_div_line_count),
&be_const_str_solidified,
( &(const binstruction[ 7]) { /* code */
- 0x90021801, // 0000 SETMBR R0 K12 R1
+ 0x90021A01, // 0000 SETMBR R0 K13 R1
0x88080101, // 0001 GETMBR R2 R0 K1
- 0x8C080517, // 0002 GETMET R2 R2 K23
- 0x8810010C, // 0003 GETMBR R4 R0 K12
- 0x8814010E, // 0004 GETMBR R5 R0 K14
+ 0x8C080518, // 0002 GETMET R2 R2 K24
+ 0x8810010D, // 0003 GETMBR R4 R0 K13
+ 0x8814010F, // 0004 GETMBR R5 R0 K15
0x7C080600, // 0005 CALL R2 3
0x80000000, // 0006 RET 0
})
@@ -10205,52 +10224,111 @@ be_local_class(lvh_scr,
})),
be_str_weak(lvh_scr)
);
-// compact class 'lvh_page' ktab size: 32, total: 51 (saved 152 bytes)
-static const bvalue be_ktab_class_lvh_page[32] = {
- /* K0 */ be_nested_str_weak(global),
- /* K1 */ be_nested_str_weak(_hm),
- /* K2 */ be_const_int(1),
- /* K3 */ be_nested_str_weak(_page_id),
- /* K4 */ be_nested_str_weak(_obj_id),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(_lv_scr),
- /* K7 */ be_nested_str_weak(lv),
- /* K8 */ be_nested_str_weak(layer_top),
- /* K9 */ be_nested_str_weak(obj),
- /* K10 */ be_nested_str_weak(scr_act),
- /* K11 */ be_nested_str_weak(get_style_bg_color),
- /* K12 */ be_nested_str_weak(set_style_bg_color),
- /* K13 */ be_nested_str_weak(lvh_scr),
- /* K14 */ be_nested_str_weak(p),
- /* K15 */ be_nested_str_weak(b0),
- /* K16 */ be_nested_str_weak(find),
- /* K17 */ be_nested_str_weak(p_X25ib_X25i),
- /* K18 */ be_nested_str_weak(_page),
- /* K19 */ be_nested_str_weak(id),
- /* K20 */ be_nested_str_weak(_p),
- /* K21 */ be_nested_str_weak(page_dir_to),
- /* K22 */ be_nested_str_weak(_X7B_X22hasp_X22_X3A_X7B_X22p_X25i_X22_X3A_X22out_X22_X7D_X7D),
- /* K23 */ be_nested_str_weak(lvh_page_cur_idx),
- /* K24 */ be_nested_str_weak(tasmota),
- /* K25 */ be_nested_str_weak(set_timer),
- /* K26 */ be_nested_str_weak(_X7B_X22hasp_X22_X3A_X7B_X22p_X25i_X22_X3A_X22in_X22_X7D_X7D),
- /* K27 */ be_nested_str_weak(screen_load),
- /* K28 */ be_nested_str_weak(show_anim),
- /* K29 */ be_nested_str_weak(SCR_LOAD_ANIM_NONE),
- /* K30 */ be_nested_str_weak(screen_load_anim),
- /* K31 */ be_nested_str_weak(remove),
+// compact class 'lvh_page' ktab size: 47, total: 73 (saved 208 bytes)
+static const bvalue be_ktab_class_lvh_page[47] = {
+ /* K0 */ be_nested_str_weak(_clear),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(introspect),
+ /* K3 */ be_nested_str_weak(startswith),
+ /* K4 */ be_nested_str_weak(set_),
+ /* K5 */ be_nested_str_weak(get_),
+ /* K6 */ be_nested_str_weak(get),
+ /* K7 */ be_nested_str_weak(function),
+ /* K8 */ be_nested_str_weak(undefined),
+ /* K9 */ be_nested_str_weak(_obj_id),
+ /* K10 */ be_nested_str_weak(keys),
+ /* K11 */ be_nested_str_weak(push),
+ /* K12 */ be_nested_str_weak(stop_iteration),
+ /* K13 */ be_const_int(0),
+ /* K14 */ be_nested_str_weak(contains),
+ /* K15 */ be_nested_str_weak(_delete),
+ /* K16 */ be_const_int(1),
+ /* K17 */ be_nested_str_weak(_lv_scr),
+ /* K18 */ be_nested_str_weak(find),
+ /* K19 */ be_nested_str_weak(remove),
+ /* K20 */ be_nested_str_weak(p_X25ib_X25i),
+ /* K21 */ be_nested_str_weak(_page),
+ /* K22 */ be_nested_str_weak(id),
+ /* K23 */ be_nested_str_weak(global),
+ /* K24 */ be_nested_str_weak(_hm),
+ /* K25 */ be_nested_str_weak(_page_id),
+ /* K26 */ be_nested_str_weak(lv),
+ /* K27 */ be_nested_str_weak(layer_top),
+ /* K28 */ be_nested_str_weak(obj),
+ /* K29 */ be_nested_str_weak(scr_act),
+ /* K30 */ be_nested_str_weak(get_style_bg_color),
+ /* K31 */ be_nested_str_weak(set_style_bg_color),
+ /* K32 */ be_nested_str_weak(lvh_scr),
+ /* K33 */ be_nested_str_weak(p_X25s),
+ /* K34 */ be_nested_str_weak(p_X25sb0),
+ /* K35 */ be_nested_str_weak(_p),
+ /* K36 */ be_nested_str_weak(page_dir_to),
+ /* K37 */ be_nested_str_weak(_X7B_X22hasp_X22_X3A_X7B_X22p_X25i_X22_X3A_X22out_X22_X7D_X7D),
+ /* K38 */ be_nested_str_weak(lvh_page_cur_idx),
+ /* K39 */ be_nested_str_weak(tasmota),
+ /* K40 */ be_nested_str_weak(set_timer),
+ /* K41 */ be_nested_str_weak(_X7B_X22hasp_X22_X3A_X7B_X22p_X25i_X22_X3A_X22in_X22_X7D_X7D),
+ /* K42 */ be_nested_str_weak(screen_load),
+ /* K43 */ be_nested_str_weak(show_anim),
+ /* K44 */ be_nested_str_weak(SCR_LOAD_ANIM_NONE),
+ /* K45 */ be_nested_str_weak(screen_load_anim),
+ /* K46 */ be_nested_str_weak(_remove_page),
};
extern const bclass be_class_lvh_page;
/********************************************************************
-** Solidified function: init
+** Solidified function: get_clear
********************************************************************/
-be_local_closure(class_lvh_page_init, /* name */
+be_local_closure(class_lvh_page_get_clear, /* name */
be_nested_proto(
- 10, /* nstack */
- 3, /* argc */
+ 3, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 0, /* nstack */
+ 0, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(_anonymous_),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 1]) { /* code */
+ 0x80000000, // 0000 RET 0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ &be_ktab_class_lvh_page, /* shared constants */
+ be_str_weak(get_clear),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x7C040200, // 0001 CALL R1 1
+ 0x84040000, // 0002 CLOSURE R1 P0
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: member
+********************************************************************/
+be_local_closure(class_lvh_page_member, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 2, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -10258,68 +10336,103 @@ be_local_closure(class_lvh_page_init, /* name */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_lvh_page, /* shared constants */
- be_str_weak(init),
+ be_str_weak(member),
&be_const_str_solidified,
- ( &(const binstruction[59]) { /* code */
- 0xA40E0000, // 0000 IMPORT R3 K0
- 0x90020202, // 0001 SETMBR R0 K1 R2
- 0x60100009, // 0002 GETGBL R4 G9
- 0x5C140200, // 0003 MOVE R5 R1
- 0x7C100200, // 0004 CALL R4 1
- 0x5C040800, // 0005 MOVE R1 R4
- 0x4C100000, // 0006 LDNIL R4
- 0x1C100204, // 0007 EQ R4 R1 R4
- 0x78120000, // 0008 JMPF R4 #000A
- 0x58040002, // 0009 LDCONST R1 K2
- 0x90020601, // 000A SETMBR R0 K3 R1
- 0x60100013, // 000B GETGBL R4 G19
- 0x7C100000, // 000C CALL R4 0
- 0x90020804, // 000D SETMBR R0 K4 R4
- 0x1C100305, // 000E EQ R4 R1 K5
- 0x78120004, // 000F JMPF R4 #0015
- 0xB8120E00, // 0010 GETNGBL R4 K7
- 0x8C100908, // 0011 GETMET R4 R4 K8
- 0x7C100200, // 0012 CALL R4 1
- 0x90020C04, // 0013 SETMBR R0 K6 R4
- 0x7002000F, // 0014 JMP #0025
- 0xB8120E00, // 0015 GETNGBL R4 K7
- 0x8C100909, // 0016 GETMET R4 R4 K9
- 0x58180005, // 0017 LDCONST R6 K5
- 0x7C100400, // 0018 CALL R4 2
- 0x90020C04, // 0019 SETMBR R0 K6 R4
- 0xB8120E00, // 001A GETNGBL R4 K7
- 0x8C10090A, // 001B GETMET R4 R4 K10
- 0x7C100200, // 001C CALL R4 1
- 0x8C10090B, // 001D GETMET R4 R4 K11
- 0x58180005, // 001E LDCONST R6 K5
- 0x7C100400, // 001F CALL R4 2
- 0x88140106, // 0020 GETMBR R5 R0 K6
- 0x8C140B0C, // 0021 GETMET R5 R5 K12
- 0x5C1C0800, // 0022 MOVE R7 R4
- 0x58200005, // 0023 LDCONST R8 K5
- 0x7C140600, // 0024 CALL R5 3
- 0x88100101, // 0025 GETMBR R4 R0 K1
- 0x8810090D, // 0026 GETMBR R4 R4 K13
- 0x5C140800, // 0027 MOVE R5 R4
- 0x4C180000, // 0028 LDNIL R6
- 0x5C1C0000, // 0029 MOVE R7 R0
- 0x4C200000, // 002A LDNIL R8
- 0x88240106, // 002B GETMBR R9 R0 K6
- 0x7C140800, // 002C CALL R5 4
- 0x88180104, // 002D GETMBR R6 R0 K4
- 0x981A0A05, // 002E SETIDX R6 K5 R5
- 0x60180008, // 002F GETGBL R6 G8
- 0x881C0103, // 0030 GETMBR R7 R0 K3
- 0x7C180200, // 0031 CALL R6 1
- 0x001A1C06, // 0032 ADD R6 K14 R6
- 0x900C0C00, // 0033 SETMBR R3 R6 R0
- 0x60180008, // 0034 GETGBL R6 G8
- 0x881C0103, // 0035 GETMBR R7 R0 K3
- 0x7C180200, // 0036 CALL R6 1
- 0x001A1C06, // 0037 ADD R6 K14 R6
- 0x00180D0F, // 0038 ADD R6 R6 K15
- 0x900C0C05, // 0039 SETMBR R3 R6 R5
- 0x80000000, // 003A RET 0
+ ( &(const binstruction[30]) { /* code */
+ 0xA40A0200, // 0000 IMPORT R2 K1
+ 0xA40E0400, // 0001 IMPORT R3 K2
+ 0x8C100503, // 0002 GETMET R4 R2 K3
+ 0x5C180200, // 0003 MOVE R6 R1
+ 0x581C0004, // 0004 LDCONST R7 K4
+ 0x7C100600, // 0005 CALL R4 3
+ 0x74120004, // 0006 JMPT R4 #000C
+ 0x8C100503, // 0007 GETMET R4 R2 K3
+ 0x5C180200, // 0008 MOVE R6 R1
+ 0x581C0005, // 0009 LDCONST R7 K5
+ 0x7C100600, // 000A CALL R4 3
+ 0x78120000, // 000B JMPF R4 #000D
+ 0x80000800, // 000C RET 0
+ 0x8C100706, // 000D GETMET R4 R3 K6
+ 0x5C180000, // 000E MOVE R6 R0
+ 0x001E0A01, // 000F ADD R7 K5 R1
+ 0x7C100600, // 0010 CALL R4 3
+ 0x60140004, // 0011 GETGBL R5 G4
+ 0x5C180800, // 0012 MOVE R6 R4
+ 0x7C140200, // 0013 CALL R5 1
+ 0x1C140B07, // 0014 EQ R5 R5 K7
+ 0x78160003, // 0015 JMPF R5 #001A
+ 0x5C140800, // 0016 MOVE R5 R4
+ 0x5C180000, // 0017 MOVE R6 R0
+ 0x7C140200, // 0018 CALL R5 1
+ 0x80040A00, // 0019 RET 1 R5
+ 0x6014000B, // 001A GETGBL R5 G11
+ 0x58180008, // 001B LDCONST R6 K8
+ 0x7C140200, // 001C CALL R5 1
+ 0x80040A00, // 001D RET 1 R5
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: _clear
+********************************************************************/
+be_local_closure(class_lvh_page__clear, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_lvh_page, /* shared constants */
+ be_str_weak(_clear),
+ &be_const_str_solidified,
+ ( &(const binstruction[41]) { /* code */
+ 0x60040012, // 0000 GETGBL R1 G18
+ 0x7C040000, // 0001 CALL R1 0
+ 0x60080010, // 0002 GETGBL R2 G16
+ 0x880C0109, // 0003 GETMBR R3 R0 K9
+ 0x8C0C070A, // 0004 GETMET R3 R3 K10
+ 0x7C0C0200, // 0005 CALL R3 1
+ 0x7C080200, // 0006 CALL R2 1
+ 0xA8020005, // 0007 EXBLK 0 #000E
+ 0x5C0C0400, // 0008 MOVE R3 R2
+ 0x7C0C0000, // 0009 CALL R3 0
+ 0x8C10030B, // 000A GETMET R4 R1 K11
+ 0x5C180600, // 000B MOVE R6 R3
+ 0x7C100400, // 000C CALL R4 2
+ 0x7001FFF9, // 000D JMP #0008
+ 0x5808000C, // 000E LDCONST R2 K12
+ 0xAC080200, // 000F CATCH R2 1 0
+ 0xB0080000, // 0010 RAISE 2 R0 R0
+ 0x5808000D, // 0011 LDCONST R2 K13
+ 0x600C000C, // 0012 GETGBL R3 G12
+ 0x5C100200, // 0013 MOVE R4 R1
+ 0x7C0C0200, // 0014 CALL R3 1
+ 0x140C0403, // 0015 LT R3 R2 R3
+ 0x780E000D, // 0016 JMPF R3 #0025
+ 0x940C0202, // 0017 GETIDX R3 R1 R2
+ 0x2010070D, // 0018 NE R4 R3 K13
+ 0x78120008, // 0019 JMPF R4 #0023
+ 0x88100109, // 001A GETMBR R4 R0 K9
+ 0x8C10090E, // 001B GETMET R4 R4 K14
+ 0x5C180600, // 001C MOVE R6 R3
+ 0x7C100400, // 001D CALL R4 2
+ 0x78120003, // 001E JMPF R4 #0023
+ 0x88100109, // 001F GETMBR R4 R0 K9
+ 0x94100803, // 0020 GETIDX R4 R4 R3
+ 0x8C10090F, // 0021 GETMET R4 R4 K15
+ 0x7C100200, // 0022 CALL R4 1
+ 0x00080510, // 0023 ADD R2 R2 K16
+ 0x7001FFEC, // 0024 JMP #0012
+ 0x600C0013, // 0025 GETGBL R3 G19
+ 0x7C0C0000, // 0026 CALL R3 0
+ 0x90021203, // 0027 SETMBR R0 K9 R3
+ 0x80000000, // 0028 RET 0
})
)
);
@@ -10343,7 +10456,7 @@ be_local_closure(class_lvh_page_get_scr, /* name */
be_str_weak(get_scr),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
- 0x88040106, // 0000 GETMBR R1 R0 K6
+ 0x88040111, // 0000 GETMBR R1 R0 K17
0x80040200, // 0001 RET 1 R1
})
)
@@ -10352,24 +10465,86 @@ be_local_closure(class_lvh_page_get_scr, /* name */
/********************************************************************
-** Solidified function: id
+** Solidified function: get_delete
********************************************************************/
-be_local_closure(class_lvh_page_id, /* name */
+be_local_closure(class_lvh_page_get_delete, /* name */
be_nested_proto(
- 2, /* nstack */
+ 3, /* nstack */
1, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 0, /* nstack */
+ 0, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(_anonymous_),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 1]) { /* code */
+ 0x80000000, // 0000 RET 0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ &be_ktab_class_lvh_page, /* shared constants */
+ be_str_weak(get_delete),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x8C04010F, // 0000 GETMET R1 R0 K15
+ 0x7C040200, // 0001 CALL R1 1
+ 0x84040000, // 0002 CLOSURE R1 P0
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: remove_obj
+********************************************************************/
+be_local_closure(class_lvh_page_remove_obj, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_lvh_page, /* shared constants */
- be_str_weak(id),
+ be_str_weak(remove_obj),
&be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x88040103, // 0000 GETMBR R1 R0 K3
- 0x80040200, // 0001 RET 1 R1
+ ( &(const binstruction[20]) { /* code */
+ 0x88080109, // 0000 GETMBR R2 R0 K9
+ 0x8C080512, // 0001 GETMET R2 R2 K18
+ 0x5C100200, // 0002 MOVE R4 R1
+ 0x7C080400, // 0003 CALL R2 2
+ 0x880C0109, // 0004 GETMBR R3 R0 K9
+ 0x8C0C0713, // 0005 GETMET R3 R3 K19
+ 0x5C140200, // 0006 MOVE R5 R1
+ 0x7C0C0400, // 0007 CALL R3 2
+ 0x780A0009, // 0008 JMPF R2 #0013
+ 0x600C0018, // 0009 GETGBL R3 G24
+ 0x58100014, // 000A LDCONST R4 K20
+ 0x88140515, // 000B GETMBR R5 R2 K21
+ 0x8C140B16, // 000C GETMET R5 R5 K22
+ 0x7C140200, // 000D CALL R5 1
+ 0x5C180200, // 000E MOVE R6 R1
+ 0x7C0C0600, // 000F CALL R3 3
+ 0xB8122E00, // 0010 GETNGBL R4 K23
+ 0x4C140000, // 0011 LDNIL R5
+ 0x90100605, // 0012 SETMBR R4 R3 R5
+ 0x80000000, // 0013 RET 0
})
)
);
@@ -10393,8 +10568,8 @@ be_local_closure(class_lvh_page_get_obj, /* name */
be_str_weak(get_obj),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
- 0x88080104, // 0000 GETMBR R2 R0 K4
- 0x8C080510, // 0001 GETMET R2 R2 K16
+ 0x88080109, // 0000 GETMBR R2 R0 K9
+ 0x8C080512, // 0001 GETMET R2 R2 K18
0x5C100200, // 0002 MOVE R4 R1
0x7C080400, // 0003 CALL R2 2
0x80040400, // 0004 RET 1 R2
@@ -10421,16 +10596,16 @@ be_local_closure(class_lvh_page_add_obj, /* name */
be_str_weak(add_obj),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
- 0x880C0104, // 0000 GETMBR R3 R0 K4
+ 0x880C0109, // 0000 GETMBR R3 R0 K9
0x980C0202, // 0001 SETIDX R3 R1 R2
0x600C0018, // 0002 GETGBL R3 G24
- 0x58100011, // 0003 LDCONST R4 K17
- 0x88140512, // 0004 GETMBR R5 R2 K18
- 0x8C140B13, // 0005 GETMET R5 R5 K19
+ 0x58100014, // 0003 LDCONST R4 K20
+ 0x88140515, // 0004 GETMBR R5 R2 K21
+ 0x8C140B16, // 0005 GETMET R5 R5 K22
0x7C140200, // 0006 CALL R5 1
0x5C180200, // 0007 MOVE R6 R1
0x7C0C0600, // 0008 CALL R3 3
- 0xB8120000, // 0009 GETNGBL R4 K0
+ 0xB8122E00, // 0009 GETNGBL R4 K23
0x90100602, // 000A SETMBR R4 R3 R2
0x80000000, // 000B RET 0
})
@@ -10439,6 +10614,87 @@ be_local_closure(class_lvh_page_add_obj, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(class_lvh_page_init, /* name */
+ be_nested_proto(
+ 10, /* nstack */
+ 3, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_lvh_page, /* shared constants */
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[58]) { /* code */
+ 0xA40E2E00, // 0000 IMPORT R3 K23
+ 0x90023002, // 0001 SETMBR R0 K24 R2
+ 0x60100009, // 0002 GETGBL R4 G9
+ 0x5C140200, // 0003 MOVE R5 R1
+ 0x7C100200, // 0004 CALL R4 1
+ 0x5C040800, // 0005 MOVE R1 R4
+ 0x4C100000, // 0006 LDNIL R4
+ 0x1C100204, // 0007 EQ R4 R1 R4
+ 0x78120000, // 0008 JMPF R4 #000A
+ 0x58040010, // 0009 LDCONST R1 K16
+ 0x90023201, // 000A SETMBR R0 K25 R1
+ 0x60100013, // 000B GETGBL R4 G19
+ 0x7C100000, // 000C CALL R4 0
+ 0x90021204, // 000D SETMBR R0 K9 R4
+ 0x1C10030D, // 000E EQ R4 R1 K13
+ 0x78120004, // 000F JMPF R4 #0015
+ 0xB8123400, // 0010 GETNGBL R4 K26
+ 0x8C10091B, // 0011 GETMET R4 R4 K27
+ 0x7C100200, // 0012 CALL R4 1
+ 0x90022204, // 0013 SETMBR R0 K17 R4
+ 0x7002000F, // 0014 JMP #0025
+ 0xB8123400, // 0015 GETNGBL R4 K26
+ 0x8C10091C, // 0016 GETMET R4 R4 K28
+ 0x5818000D, // 0017 LDCONST R6 K13
+ 0x7C100400, // 0018 CALL R4 2
+ 0x90022204, // 0019 SETMBR R0 K17 R4
+ 0xB8123400, // 001A GETNGBL R4 K26
+ 0x8C10091D, // 001B GETMET R4 R4 K29
+ 0x7C100200, // 001C CALL R4 1
+ 0x8C10091E, // 001D GETMET R4 R4 K30
+ 0x5818000D, // 001E LDCONST R6 K13
+ 0x7C100400, // 001F CALL R4 2
+ 0x88140111, // 0020 GETMBR R5 R0 K17
+ 0x8C140B1F, // 0021 GETMET R5 R5 K31
+ 0x5C1C0800, // 0022 MOVE R7 R4
+ 0x5820000D, // 0023 LDCONST R8 K13
+ 0x7C140600, // 0024 CALL R5 3
+ 0x88100118, // 0025 GETMBR R4 R0 K24
+ 0x88100920, // 0026 GETMBR R4 R4 K32
+ 0x5C140800, // 0027 MOVE R5 R4
+ 0x4C180000, // 0028 LDNIL R6
+ 0x5C1C0000, // 0029 MOVE R7 R0
+ 0x4C200000, // 002A LDNIL R8
+ 0x88240111, // 002B GETMBR R9 R0 K17
+ 0x7C140800, // 002C CALL R5 4
+ 0x88180109, // 002D GETMBR R6 R0 K9
+ 0x981A1A05, // 002E SETIDX R6 K13 R5
+ 0x60180018, // 002F GETGBL R6 G24
+ 0x581C0021, // 0030 LDCONST R7 K33
+ 0x88200119, // 0031 GETMBR R8 R0 K25
+ 0x7C180400, // 0032 CALL R6 2
+ 0x900C0C00, // 0033 SETMBR R3 R6 R0
+ 0x60180018, // 0034 GETGBL R6 G24
+ 0x581C0022, // 0035 LDCONST R7 K34
+ 0x88200119, // 0036 GETMBR R8 R0 K25
+ 0x7C180400, // 0037 CALL R6 2
+ 0x900C0C05, // 0038 SETMBR R3 R6 R5
+ 0x80000000, // 0039 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: show
********************************************************************/
@@ -10507,18 +10763,18 @@ be_local_closure(class_lvh_page_show, /* name */
be_str_weak(show),
&be_const_str_solidified,
( &(const binstruction[73]) { /* code */
- 0x880C0106, // 0000 GETMBR R3 R0 K6
+ 0x880C0111, // 0000 GETMBR R3 R0 K17
0x4C100000, // 0001 LDNIL R4
0x1C0C0604, // 0002 EQ R3 R3 R4
0x780E0001, // 0003 JMPF R3 #0006
0x4C0C0000, // 0004 LDNIL R3
0x80040600, // 0005 RET 1 R3
- 0x880C0106, // 0006 GETMBR R3 R0 K6
- 0x880C0714, // 0007 GETMBR R3 R3 K20
- 0xB8120E00, // 0008 GETNGBL R4 K7
- 0x8C10090A, // 0009 GETMET R4 R4 K10
+ 0x880C0111, // 0006 GETMBR R3 R0 K17
+ 0x880C0723, // 0007 GETMBR R3 R3 K35
+ 0xB8123400, // 0008 GETNGBL R4 K26
+ 0x8C10091D, // 0009 GETMET R4 R4 K29
0x7C100200, // 000A CALL R4 1
- 0x88100914, // 000B GETMBR R4 R4 K20
+ 0x88100923, // 000B GETMBR R4 R4 K35
0x1C0C0604, // 000C EQ R3 R3 R4
0x780E0000, // 000D JMPF R3 #000F
0x80000600, // 000E RET 0
@@ -10529,53 +10785,53 @@ be_local_closure(class_lvh_page_show, /* name */
0x4C0C0000, // 0013 LDNIL R3
0x1C0C0203, // 0014 EQ R3 R1 R3
0x780E0005, // 0015 JMPF R3 #001C
- 0x880C0101, // 0016 GETMBR R3 R0 K1
- 0x8C0C0715, // 0017 GETMET R3 R3 K21
- 0x8C140113, // 0018 GETMET R5 R0 K19
+ 0x880C0118, // 0016 GETMBR R3 R0 K24
+ 0x8C0C0724, // 0017 GETMET R3 R3 K36
+ 0x8C140116, // 0018 GETMET R5 R0 K22
0x7C140200, // 0019 CALL R5 1
0x7C0C0400, // 001A CALL R3 2
0x5C040600, // 001B MOVE R1 R3
0x600C0018, // 001C GETGBL R3 G24
- 0x58100016, // 001D LDCONST R4 K22
- 0x88140101, // 001E GETMBR R5 R0 K1
- 0x88140B17, // 001F GETMBR R5 R5 K23
+ 0x58100025, // 001D LDCONST R4 K37
+ 0x88140118, // 001E GETMBR R5 R0 K24
+ 0x88140B26, // 001F GETMBR R5 R5 K38
0x7C0C0400, // 0020 CALL R3 2
- 0xB8123000, // 0021 GETNGBL R4 K24
- 0x8C100919, // 0022 GETMET R4 R4 K25
- 0x58180005, // 0023 LDCONST R6 K5
+ 0xB8124E00, // 0021 GETNGBL R4 K39
+ 0x8C100928, // 0022 GETMET R4 R4 K40
+ 0x5818000D, // 0023 LDCONST R6 K13
0x841C0000, // 0024 CLOSURE R7 P0
0x7C100600, // 0025 CALL R4 3
0x60100018, // 0026 GETGBL R4 G24
- 0x5814001A, // 0027 LDCONST R5 K26
- 0x88180103, // 0028 GETMBR R6 R0 K3
+ 0x58140029, // 0027 LDCONST R5 K41
+ 0x88180119, // 0028 GETMBR R6 R0 K25
0x7C100400, // 0029 CALL R4 2
- 0xB8163000, // 002A GETNGBL R5 K24
- 0x8C140B19, // 002B GETMET R5 R5 K25
- 0x581C0005, // 002C LDCONST R7 K5
+ 0xB8164E00, // 002A GETNGBL R5 K39
+ 0x8C140B28, // 002B GETMET R5 R5 K40
+ 0x581C000D, // 002C LDCONST R7 K13
0x84200001, // 002D CLOSURE R8 P1
0x7C140600, // 002E CALL R5 3
- 0x88140101, // 002F GETMBR R5 R0 K1
- 0x88180103, // 0030 GETMBR R6 R0 K3
- 0x90162E06, // 0031 SETMBR R5 K23 R6
- 0x1C140305, // 0032 EQ R5 R1 K5
+ 0x88140118, // 002F GETMBR R5 R0 K24
+ 0x88180119, // 0030 GETMBR R6 R0 K25
+ 0x90164C06, // 0031 SETMBR R5 K38 R6
+ 0x1C14030D, // 0032 EQ R5 R1 K13
0x78160004, // 0033 JMPF R5 #0039
- 0xB8160E00, // 0034 GETNGBL R5 K7
- 0x8C140B1B, // 0035 GETMET R5 R5 K27
- 0x881C0106, // 0036 GETMBR R7 R0 K6
+ 0xB8163400, // 0034 GETNGBL R5 K26
+ 0x8C140B2A, // 0035 GETMET R5 R5 K42
+ 0x881C0111, // 0036 GETMBR R7 R0 K17
0x7C140400, // 0037 CALL R5 2
0x7002000D, // 0038 JMP #0047
- 0x8814011C, // 0039 GETMBR R5 R0 K28
- 0x8C140B10, // 003A GETMET R5 R5 K16
+ 0x8814012B, // 0039 GETMBR R5 R0 K43
+ 0x8C140B12, // 003A GETMET R5 R5 K18
0x5C1C0200, // 003B MOVE R7 R1
- 0xB8220E00, // 003C GETNGBL R8 K7
- 0x8820111D, // 003D GETMBR R8 R8 K29
+ 0xB8223400, // 003C GETNGBL R8 K26
+ 0x8820112C, // 003D GETMBR R8 R8 K44
0x7C140600, // 003E CALL R5 3
- 0xB81A0E00, // 003F GETNGBL R6 K7
- 0x8C180D1E, // 0040 GETMET R6 R6 K30
- 0x88200106, // 0041 GETMBR R8 R0 K6
+ 0xB81A3400, // 003F GETNGBL R6 K26
+ 0x8C180D2D, // 0040 GETMET R6 R6 K45
+ 0x88200111, // 0041 GETMBR R8 R0 K17
0x5C240A00, // 0042 MOVE R9 R5
0x5C280400, // 0043 MOVE R10 R2
- 0x582C0005, // 0044 LDCONST R11 K5
+ 0x582C000D, // 0044 LDCONST R11 K13
0x50300000, // 0045 LDBOOL R12 0 0
0x7C180C00, // 0046 CALL R6 6
0xA0000000, // 0047 CLOSE R0
@@ -10587,12 +10843,12 @@ be_local_closure(class_lvh_page_show, /* name */
/********************************************************************
-** Solidified function: remove_obj
+** Solidified function: _delete
********************************************************************/
-be_local_closure(class_lvh_page_remove_obj, /* name */
+be_local_closure(class_lvh_page__delete, /* name */
be_nested_proto(
- 7, /* nstack */
- 2, /* argc */
+ 4, /* nstack */
+ 1, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -10600,29 +10856,41 @@ be_local_closure(class_lvh_page_remove_obj, /* name */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_lvh_page, /* shared constants */
- be_str_weak(remove_obj),
+ be_str_weak(_delete),
&be_const_str_solidified,
- ( &(const binstruction[20]) { /* code */
- 0x88080104, // 0000 GETMBR R2 R0 K4
- 0x8C080510, // 0001 GETMET R2 R2 K16
- 0x5C100200, // 0002 MOVE R4 R1
- 0x7C080400, // 0003 CALL R2 2
- 0x880C0104, // 0004 GETMBR R3 R0 K4
- 0x8C0C071F, // 0005 GETMET R3 R3 K31
- 0x5C140200, // 0006 MOVE R5 R1
- 0x7C0C0400, // 0007 CALL R3 2
- 0x780A0009, // 0008 JMPF R2 #0013
- 0x600C0018, // 0009 GETGBL R3 G24
- 0x58100011, // 000A LDCONST R4 K17
- 0x88140512, // 000B GETMBR R5 R2 K18
- 0x8C140B13, // 000C GETMET R5 R5 K19
- 0x7C140200, // 000D CALL R5 1
- 0x5C180200, // 000E MOVE R6 R1
- 0x7C0C0600, // 000F CALL R3 3
- 0xB8120000, // 0010 GETNGBL R4 K0
- 0x4C140000, // 0011 LDNIL R5
- 0x90100605, // 0012 SETMBR R4 R3 R5
- 0x80000000, // 0013 RET 0
+ ( &(const binstruction[ 7]) { /* code */
+ 0x88040118, // 0000 GETMBR R1 R0 K24
+ 0x8C04032E, // 0001 GETMET R1 R1 K46
+ 0x880C0119, // 0002 GETMBR R3 R0 K25
+ 0x7C040400, // 0003 CALL R1 2
+ 0x8C040100, // 0004 GETMET R1 R0 K0
+ 0x7C040200, // 0005 CALL R1 1
+ 0x80000000, // 0006 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: id
+********************************************************************/
+be_local_closure(class_lvh_page_id, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_lvh_page, /* shared constants */
+ be_str_weak(id),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x88040119, // 0000 GETMBR R1 R0 K25
+ 0x80040200, // 0001 RET 1 R1
})
)
);
@@ -10635,14 +10903,9 @@ be_local_closure(class_lvh_page_remove_obj, /* name */
be_local_class(lvh_page,
7,
NULL,
- be_nested_map(15,
+ be_nested_map(20,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(init, -1), be_const_closure(class_lvh_page_init_closure) },
- { be_const_key_weak(back, 3), be_const_var(6) },
- { be_const_key_weak(next, -1), be_const_var(5) },
- { be_const_key_weak(remove_obj, 7), be_const_closure(class_lvh_page_remove_obj_closure) },
- { be_const_key_weak(_hm, -1), be_const_var(3) },
- { be_const_key_weak(show_anim, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(show_anim, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(5,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(0, 3), be_const_int(0) },
@@ -10651,305 +10914,316 @@ be_local_class(lvh_page,
{ be_const_key_int(-1, -1), be_const_int(6) },
{ be_const_key_int(-2, -1), be_const_int(7) },
})) ) } )) },
- { be_const_key_weak(id, 5), be_const_closure(class_lvh_page_id_closure) },
- { be_const_key_weak(show, 11), be_const_closure(class_lvh_page_show_closure) },
+ { be_const_key_weak(id, 3), be_const_closure(class_lvh_page_id_closure) },
+ { be_const_key_weak(_obj_id, -1), be_const_var(0) },
+ { be_const_key_weak(show, 18), be_const_closure(class_lvh_page_show_closure) },
+ { be_const_key_weak(_lv_scr, 19), be_const_var(2) },
+ { be_const_key_weak(get_clear, 2), be_const_closure(class_lvh_page_get_clear_closure) },
+ { be_const_key_weak(back, -1), be_const_var(6) },
+ { be_const_key_weak(get_delete, -1), be_const_closure(class_lvh_page_get_delete_closure) },
+ { be_const_key_weak(remove_obj, 4), be_const_closure(class_lvh_page_remove_obj_closure) },
+ { be_const_key_weak(_hm, -1), be_const_var(3) },
+ { be_const_key_weak(_page_id, 8), be_const_var(1) },
+ { be_const_key_weak(member, 10), be_const_closure(class_lvh_page_member_closure) },
+ { be_const_key_weak(next, -1), be_const_var(5) },
{ be_const_key_weak(get_obj, -1), be_const_closure(class_lvh_page_get_obj_closure) },
{ be_const_key_weak(add_obj, -1), be_const_closure(class_lvh_page_add_obj_closure) },
- { be_const_key_weak(_obj_id, -1), be_const_var(0) },
- { be_const_key_weak(prev, 12), be_const_var(4) },
- { be_const_key_weak(_lv_scr, 13), be_const_var(2) },
- { be_const_key_weak(get_scr, 14), be_const_closure(class_lvh_page_get_scr_closure) },
- { be_const_key_weak(_page_id, -1), be_const_var(1) },
+ { be_const_key_weak(init, -1), be_const_closure(class_lvh_page_init_closure) },
+ { be_const_key_weak(prev, 0), be_const_var(4) },
+ { be_const_key_weak(_delete, -1), be_const_closure(class_lvh_page__delete_closure) },
+ { be_const_key_weak(get_scr, -1), be_const_closure(class_lvh_page_get_scr_closure) },
+ { be_const_key_weak(_clear, -1), be_const_closure(class_lvh_page__clear_closure) },
})),
be_str_weak(lvh_page)
);
extern const bclass be_class_HASPmota;
-// compact class 'HASPmota' ktab size: 121, total: 179 (saved 464 bytes)
-static const bvalue be_ktab_class_HASPmota[121] = {
- /* K0 */ be_const_int(0),
- /* K1 */ be_nested_str_weak(lvh_page_cur_idx),
- /* K2 */ be_nested_str_weak(lvh_pages),
- /* K3 */ be_nested_str_weak(keys),
- /* K4 */ be_nested_str_weak(push),
- /* K5 */ be_nested_str_weak(stop_iteration),
- /* K6 */ be_nested_str_weak(sort),
- /* K7 */ be_nested_str_weak(find),
- /* K8 */ be_const_int(1),
- /* K9 */ be_nested_str_weak(pages_list_sorted),
- /* K10 */ be_nested_str_weak(prev),
- /* K11 */ be_nested_str_weak(next),
- /* K12 */ be_nested_str_weak(back),
- /* K13 */ be_nested_str_weak(re_page_target),
- /* K14 */ be_nested_str_weak(match),
- /* K15 */ be_nested_str_weak(show),
- /* K16 */ be_nested_str_weak(cb),
- /* K17 */ be_nested_str_weak(introspect),
- /* K18 */ be_nested_str_weak(event_cb),
- /* K19 */ be_nested_str_weak(gen_cb),
- /* K20 */ be_nested_str_weak(_lv_obj),
- /* K21 */ be_nested_str_weak(add_event_cb),
- /* K22 */ be_nested_str_weak(toptr),
- /* K23 */ be_nested_str_weak(json),
- /* K24 */ be_nested_str_weak(load),
- /* K25 */ be_nested_str_weak(instance),
- /* K26 */ be_nested_str_weak(parse_page),
- /* K27 */ be_nested_str_weak(parse_obj),
- /* K28 */ be_nested_str_weak(value_error),
- /* K29 */ be_nested_str_weak(unable_X20to_X20parse_X20JSON_X20line),
- /* K30 */ be_nested_str_weak(event),
- /* K31 */ be_nested_str_weak(_p),
- /* K32 */ be_nested_str_weak(lv),
- /* K33 */ be_nested_str_weak(lv_event),
- /* K34 */ be_nested_str_weak(get_user_data),
- /* K35 */ be_nested_str_weak(fromptr),
- /* K36 */ be_nested_str_weak(fix_lv_version),
- /* K37 */ be_nested_str_weak(re),
- /* K38 */ be_nested_str_weak(compile),
- /* K39 */ be_nested_str_weak(p_X5Cd_X2B),
- /* K40 */ be_const_class(be_class_HASPmota),
- /* K41 */ be_nested_str_weak(get),
- /* K42 */ be_nested_str_weak(version),
- /* K43 */ be_nested_str_weak(int),
- /* K44 */ be_nested_str_weak(global),
- /* K45 */ be_nested_str_weak(id),
- /* K46 */ be_nested_str_weak(obj),
- /* K47 */ be_nested_str_weak(get_page_cur),
- /* K48 */ be_nested_str_weak(berry_run),
- /* K49 */ be_nested_str_weak(nil),
- /* K50 */ be_nested_str_weak(HSP_X3A_X20unable_X20to_X20compile_X20berry_X20code_X20_X22_X25s_X22_X20_X2D_X20_X27_X25s_X27_X20_X2D_X20_X25s),
- /* K51 */ be_nested_str_weak(HSP_X3A_X20invalid_X20_X27id_X27_X3A_X20),
- /* K52 */ be_nested_str_weak(_X20for_X20_X27obj_X27_X3A),
- /* K53 */ be_nested_str_weak(parentid),
- /* K54 */ be_nested_str_weak(get_obj),
- /* K55 */ be_nested_str_weak(get_scr),
- /* K56 */ be_nested_str_weak(lvh_),
- /* K57 */ be_nested_str_weak(class),
- /* K58 */ be_nested_str_weak(lvh_obj),
- /* K59 */ be_nested_str_weak(module),
- /* K60 */ be_nested_str_weak(HSP_X3A_X20Cannot_X20find_X20object_X20of_X20type_X20),
- /* K61 */ be_nested_str_weak(add_obj),
- /* K62 */ be_nested_str_weak(function),
- /* K63 */ be_nested_str_weak(HSP_X3A_X20unable_X20to_X20run_X20berry_X20code_X20_X22_X25s_X22_X20_X2D_X20_X27_X25s_X27_X20_X2D_X20_X25s),
- /* K64 */ be_nested_str_weak(HSP_X3A_X20cannot_X20specify_X20_X27obj_X27_X20for_X20_X27id_X27_X3A0),
- /* K65 */ be_nested_str_weak(post_config),
- /* K66 */ be_nested_str_weak(string),
- /* K67 */ be_nested_str_weak(r),
- /* K68 */ be_nested_str_weak(read),
- /* K69 */ be_nested_str_weak(close),
- /* K70 */ be_nested_str_weak(split),
- /* K71 */ be_nested_str_weak(_X0A),
- /* K72 */ be_nested_str_weak(tasmota),
- /* K73 */ be_nested_str_weak(loglevel),
- /* K74 */ be_nested_str_weak(log),
- /* K75 */ be_nested_str_weak(HSP_X3A_X20parsing_X20line_X20_X27_X25s_X27),
- /* K76 */ be_nested_str_weak(no_X20page_X20_X27id_X27_X20defined),
- /* K77 */ be_nested_str_weak(tr),
- /* K78 */ be_nested_str_weak(_X20_X09),
- /* K79 */ be_nested_str_weak(),
- /* K80 */ be_nested_str_weak(HSP_X3A_X20invalid_X20JSON_X20line_X20_X27_X25s_X27),
- /* K81 */ be_const_int(2),
- /* K82 */ be_nested_str_weak(remove),
- /* K83 */ be_nested_str_weak(no_X20page_X20object_X20defined),
- /* K84 */ be_nested_str_weak(EVENT_CLICKED),
- /* K85 */ be_nested_str_weak(page_show),
- /* K86 */ be_nested_str_weak(_action),
- /* K87 */ be_nested_str_weak(has),
- /* K88 */ be_nested_str_weak(page),
- /* K89 */ be_nested_str_weak(contains),
- /* K90 */ be_nested_str_weak(lvh_page),
- /* K91 */ be_nested_str_weak(path),
- /* K92 */ be_nested_str_weak(def_templ_name),
- /* K93 */ be_nested_str_weak(exists),
- /* K94 */ be_nested_str_weak(file_X20_X27),
- /* K95 */ be_nested_str_weak(_X27_X20not_X20found),
- /* K96 */ be_nested_str_weak(io_erorr),
- /* K97 */ be_nested_str_weak(start),
- /* K98 */ be_nested_str_weak(dark),
- /* K99 */ be_nested_str_weak(hres),
- /* K100 */ be_nested_str_weak(get_hor_res),
- /* K101 */ be_nested_str_weak(vres),
- /* K102 */ be_nested_str_weak(get_ver_res),
- /* K103 */ be_nested_str_weak(scr),
- /* K104 */ be_nested_str_weak(scr_act),
- /* K105 */ be_nested_str_weak(r16),
- /* K106 */ be_nested_str_weak(font_embedded),
- /* K107 */ be_nested_str_weak(robotocondensed),
- /* K108 */ be_nested_str_weak(montserrat),
- /* K109 */ be_nested_str_weak(theme_haspmota_init),
- /* K110 */ be_nested_str_weak(color),
- /* K111 */ be_const_int(16711935),
- /* K112 */ be_const_int(3158064),
- /* K113 */ be_nested_str_weak(get_disp),
- /* K114 */ be_nested_str_weak(set_theme),
- /* K115 */ be_nested_str_weak(set_style_bg_color),
- /* K116 */ be_const_int(16777215),
- /* K117 */ be_nested_str_weak(theme_apply),
- /* K118 */ be_nested_str_weak(layer_top),
- /* K119 */ be_nested_str_weak(set_style_bg_opa),
- /* K120 */ be_nested_str_weak(_load),
+// compact class 'HASPmota' ktab size: 124, total: 197 (saved 584 bytes)
+static const bvalue be_ktab_class_HASPmota[124] = {
+ /* K0 */ be_nested_str_weak(get_page_cur),
+ /* K1 */ be_nested_str_weak(pages_list_sorted),
+ /* K2 */ be_nested_str_weak(lvh_page_cur_idx),
+ /* K3 */ be_const_int(1),
+ /* K4 */ be_nested_str_weak(prev),
+ /* K5 */ be_nested_str_weak(next),
+ /* K6 */ be_nested_str_weak(back),
+ /* K7 */ be_const_int(0),
+ /* K8 */ be_nested_str_weak(delete),
+ /* K9 */ be_nested_str_weak(id),
+ /* K10 */ be_nested_str_weak(re_page_target),
+ /* K11 */ be_nested_str_weak(match),
+ /* K12 */ be_nested_str_weak(lvh_pages),
+ /* K13 */ be_nested_str_weak(show),
+ /* K14 */ be_nested_str_weak(cb),
+ /* K15 */ be_nested_str_weak(introspect),
+ /* K16 */ be_nested_str_weak(event_cb),
+ /* K17 */ be_nested_str_weak(gen_cb),
+ /* K18 */ be_nested_str_weak(_lv_obj),
+ /* K19 */ be_nested_str_weak(add_event_cb),
+ /* K20 */ be_nested_str_weak(toptr),
+ /* K21 */ be_nested_str_weak(string),
+ /* K22 */ be_nested_str_weak(json),
+ /* K23 */ be_nested_str_weak(r),
+ /* K24 */ be_nested_str_weak(read),
+ /* K25 */ be_nested_str_weak(close),
+ /* K26 */ be_nested_str_weak(split),
+ /* K27 */ be_nested_str_weak(_X0A),
+ /* K28 */ be_nested_str_weak(load),
+ /* K29 */ be_nested_str_weak(instance),
+ /* K30 */ be_nested_str_weak(tasmota),
+ /* K31 */ be_nested_str_weak(loglevel),
+ /* K32 */ be_nested_str_weak(log),
+ /* K33 */ be_nested_str_weak(HSP_X3A_X20parsing_X20line_X20_X27_X25s_X27),
+ /* K34 */ be_nested_str_weak(parse_page),
+ /* K35 */ be_nested_str_weak(value_error),
+ /* K36 */ be_nested_str_weak(no_X20page_X20_X27id_X27_X20defined),
+ /* K37 */ be_nested_str_weak(parse_obj),
+ /* K38 */ be_nested_str_weak(lvh_page_cur_idx_parsing),
+ /* K39 */ be_nested_str_weak(tr),
+ /* K40 */ be_nested_str_weak(_X20_X09),
+ /* K41 */ be_nested_str_weak(),
+ /* K42 */ be_nested_str_weak(HSP_X3A_X20invalid_X20JSON_X20line_X20_X27_X25s_X27),
+ /* K43 */ be_const_int(2),
+ /* K44 */ be_nested_str_weak(remove),
+ /* K45 */ be_nested_str_weak(no_X20page_X20object_X20defined),
+ /* K46 */ be_nested_str_weak(event),
+ /* K47 */ be_nested_str_weak(_p),
+ /* K48 */ be_nested_str_weak(lv),
+ /* K49 */ be_nested_str_weak(lv_event),
+ /* K50 */ be_nested_str_weak(get_user_data),
+ /* K51 */ be_nested_str_weak(fromptr),
+ /* K52 */ be_const_class(be_class_HASPmota),
+ /* K53 */ be_nested_str_weak(get),
+ /* K54 */ be_nested_str_weak(version),
+ /* K55 */ be_nested_str_weak(int),
+ /* K56 */ be_nested_str_weak(fix_lv_version),
+ /* K57 */ be_nested_str_weak(re),
+ /* K58 */ be_nested_str_weak(compile),
+ /* K59 */ be_nested_str_weak(p_X5Cd_X2B),
+ /* K60 */ be_nested_str_weak(keys),
+ /* K61 */ be_nested_str_weak(push),
+ /* K62 */ be_nested_str_weak(stop_iteration),
+ /* K63 */ be_nested_str_weak(sort),
+ /* K64 */ be_nested_str_weak(find),
+ /* K65 */ be_nested_str_weak(page_show),
+ /* K66 */ be_nested_str_weak(contains),
+ /* K67 */ be_nested_str_weak(global),
+ /* K68 */ be_nested_str_weak(p_X25s),
+ /* K69 */ be_nested_str_weak(EVENT_CLICKED),
+ /* K70 */ be_nested_str_weak(_action),
+ /* K71 */ be_nested_str_weak(has),
+ /* K72 */ be_nested_str_weak(page),
+ /* K73 */ be_nested_str_weak(lvh_page),
+ /* K74 */ be_nested_str_weak(get_page_cur_parsing),
+ /* K75 */ be_nested_str_weak(path),
+ /* K76 */ be_nested_str_weak(def_templ_name),
+ /* K77 */ be_nested_str_weak(exists),
+ /* K78 */ be_nested_str_weak(file_X20_X27),
+ /* K79 */ be_nested_str_weak(_X27_X20not_X20found),
+ /* K80 */ be_nested_str_weak(io_erorr),
+ /* K81 */ be_nested_str_weak(start),
+ /* K82 */ be_nested_str_weak(dark),
+ /* K83 */ be_nested_str_weak(hres),
+ /* K84 */ be_nested_str_weak(get_hor_res),
+ /* K85 */ be_nested_str_weak(vres),
+ /* K86 */ be_nested_str_weak(get_ver_res),
+ /* K87 */ be_nested_str_weak(scr),
+ /* K88 */ be_nested_str_weak(scr_act),
+ /* K89 */ be_nested_str_weak(r16),
+ /* K90 */ be_nested_str_weak(font_embedded),
+ /* K91 */ be_nested_str_weak(robotocondensed),
+ /* K92 */ be_nested_str_weak(montserrat),
+ /* K93 */ be_nested_str_weak(theme_haspmota_init),
+ /* K94 */ be_nested_str_weak(color),
+ /* K95 */ be_const_int(16711935),
+ /* K96 */ be_const_int(3158064),
+ /* K97 */ be_nested_str_weak(get_disp),
+ /* K98 */ be_nested_str_weak(set_theme),
+ /* K99 */ be_nested_str_weak(set_style_bg_color),
+ /* K100 */ be_const_int(16777215),
+ /* K101 */ be_nested_str_weak(theme_apply),
+ /* K102 */ be_nested_str_weak(layer_top),
+ /* K103 */ be_nested_str_weak(set_style_bg_opa),
+ /* K104 */ be_nested_str_weak(_load),
+ /* K105 */ be_nested_str_weak(obj),
+ /* K106 */ be_nested_str_weak(HSP_X3A_X20invalid_X20_X27id_X27_X3A_X20_X25s_X20for_X20_X27obj_X27_X3A_X20_X25s),
+ /* K107 */ be_nested_str_weak(get_obj),
+ /* K108 */ be_nested_str_weak(parentid),
+ /* K109 */ be_nested_str_weak(get_scr),
+ /* K110 */ be_nested_str_weak(lvh_),
+ /* K111 */ be_nested_str_weak(class),
+ /* K112 */ be_nested_str_weak(lvh_obj),
+ /* K113 */ be_nested_str_weak(module),
+ /* K114 */ be_nested_str_weak(HSP_X3A_X20Cannot_X20find_X20object_X20of_X20type_X20_X25s),
+ /* K115 */ be_nested_str_weak(add_obj),
+ /* K116 */ be_nested_str_weak(HSP_X3A_X20cannot_X20specify_X20_X27obj_X27_X3A_X27_X25s_X27_X20for_X20_X27id_X27_X3A0),
+ /* K117 */ be_nested_str_weak(post_config),
+ /* K118 */ be_nested_str_weak(berry_run),
+ /* K119 */ be_nested_str_weak(nil),
+ /* K120 */ be_nested_str_weak(HSP_X3A_X20unable_X20to_X20compile_X20berry_X20code_X20_X22_X25s_X22_X20_X2D_X20_X27_X25s_X27_X20_X2D_X20_X25s),
+ /* K121 */ be_nested_str_weak(function),
+ /* K122 */ be_nested_str_weak(HSP_X3A_X20unable_X20to_X20run_X20berry_X20code_X20_X22_X25s_X22_X20_X2D_X20_X27_X25s_X27_X20_X2D_X20_X25s),
+ /* K123 */ be_nested_str_weak(unable_X20to_X20parse_X20JSON_X20line),
};
extern const bclass be_class_HASPmota;
-/********************************************************************
-** Solidified function: pages_list_sorted
-********************************************************************/
-be_local_closure(class_HASPmota_pages_list_sorted, /* name */
- be_nested_proto(
- 8, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_HASPmota, /* shared constants */
- be_str_weak(pages_list_sorted),
- &be_const_str_solidified,
- ( &(const binstruction[47]) { /* code */
- 0x60080012, // 0000 GETGBL R2 G18
- 0x7C080000, // 0001 CALL R2 0
- 0x1C0C0300, // 0002 EQ R3 R1 K0
- 0x780E0000, // 0003 JMPF R3 #0005
- 0x88040101, // 0004 GETMBR R1 R0 K1
- 0x600C0010, // 0005 GETGBL R3 G16
- 0x88100102, // 0006 GETMBR R4 R0 K2
- 0x8C100903, // 0007 GETMET R4 R4 K3
- 0x7C100200, // 0008 CALL R4 1
- 0x7C0C0200, // 0009 CALL R3 1
- 0xA8020007, // 000A EXBLK 0 #0013
- 0x5C100600, // 000B MOVE R4 R3
- 0x7C100000, // 000C CALL R4 0
- 0x20140900, // 000D NE R5 R4 K0
- 0x78160002, // 000E JMPF R5 #0012
- 0x8C140504, // 000F GETMET R5 R2 K4
- 0x5C1C0800, // 0010 MOVE R7 R4
- 0x7C140400, // 0011 CALL R5 2
- 0x7001FFF7, // 0012 JMP #000B
- 0x580C0005, // 0013 LDCONST R3 K5
- 0xAC0C0200, // 0014 CATCH R3 1 0
- 0xB0080000, // 0015 RAISE 2 R0 R0
- 0x8C0C0106, // 0016 GETMET R3 R0 K6
- 0x5C140400, // 0017 MOVE R5 R2
- 0x7C0C0400, // 0018 CALL R3 2
- 0x5C080600, // 0019 MOVE R2 R3
- 0x4C0C0000, // 001A LDNIL R3
- 0x1C0C0203, // 001B EQ R3 R1 R3
- 0x780E0000, // 001C JMPF R3 #001E
- 0x80040400, // 001D RET 1 R2
- 0x600C000C, // 001E GETGBL R3 G12
- 0x5C100400, // 001F MOVE R4 R2
- 0x7C0C0200, // 0020 CALL R3 1
- 0x00080402, // 0021 ADD R2 R2 R2
- 0x8C100507, // 0022 GETMET R4 R2 K7
- 0x5C180200, // 0023 MOVE R6 R1
- 0x7C100400, // 0024 CALL R4 2
- 0x4C140000, // 0025 LDNIL R5
- 0x1C140805, // 0026 EQ R5 R4 R5
- 0x78160001, // 0027 JMPF R5 #002A
- 0x4C140000, // 0028 LDNIL R5
- 0x80040A00, // 0029 RET 1 R5
- 0x00140803, // 002A ADD R5 R4 R3
- 0x04140B08, // 002B SUB R5 R5 K8
- 0x40140805, // 002C CONNECT R5 R4 R5
- 0x94080405, // 002D GETIDX R2 R2 R5
- 0x80040400, // 002E RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: page_show
********************************************************************/
be_local_closure(class_HASPmota_page_show, /* name */
be_nested_proto(
- 8, /* nstack */
- 2, /* argc */
+ 13, /* nstack */
+ 4, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 6, /* nstack */
+ 3, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(find),
+ }),
+ be_str_weak(to_page_resolve),
+ &be_const_str_solidified,
+ ( &(const binstruction[13]) { /* code */
+ 0x4C0C0000, // 0000 LDNIL R3
+ 0x200C0003, // 0001 NE R3 R0 R3
+ 0x780E0007, // 0002 JMPF R3 #000B
+ 0x8C0C0500, // 0003 GETMET R3 R2 K0
+ 0x5C140000, // 0004 MOVE R5 R0
+ 0x7C0C0400, // 0005 CALL R3 2
+ 0x4C100000, // 0006 LDNIL R4
+ 0x200C0604, // 0007 NE R3 R3 R4
+ 0x780E0001, // 0008 JMPF R3 #000B
+ 0x80040000, // 0009 RET 1 R0
+ 0x70020000, // 000A JMP #000C
+ 0x80040200, // 000B RET 1 R1
+ 0x80000000, // 000C RET 0
+ })
+ ),
+ }),
1, /* has constants */
&be_ktab_class_HASPmota, /* shared constants */
be_str_weak(page_show),
&be_const_str_solidified,
- ( &(const binstruction[71]) { /* code */
- 0x4C080000, // 0000 LDNIL R2
- 0x880C0102, // 0001 GETMBR R3 R0 K2
- 0x88100101, // 0002 GETMBR R4 R0 K1
- 0x940C0604, // 0003 GETIDX R3 R3 R4
- 0x8C100109, // 0004 GETMET R4 R0 K9
- 0x88180101, // 0005 GETMBR R6 R0 K1
- 0x7C100400, // 0006 CALL R4 2
- 0x6014000C, // 0007 GETGBL R5 G12
- 0x5C180800, // 0008 MOVE R6 R4
- 0x7C140200, // 0009 CALL R5 1
- 0x18140B08, // 000A LE R5 R5 K8
- 0x78160000, // 000B JMPF R5 #000D
- 0x80000A00, // 000C RET 0
- 0x1C14030A, // 000D EQ R5 R1 K10
- 0x78160009, // 000E JMPF R5 #0019
- 0x60140009, // 000F GETGBL R5 G9
- 0x8818070A, // 0010 GETMBR R6 R3 K10
- 0x7C140200, // 0011 CALL R5 1
- 0x5C080A00, // 0012 MOVE R2 R5
- 0x4C140000, // 0013 LDNIL R5
- 0x1C140405, // 0014 EQ R5 R2 R5
- 0x78160001, // 0015 JMPF R5 #0018
- 0x5415FFFE, // 0016 LDINT R5 -1
- 0x94080805, // 0017 GETIDX R2 R4 R5
- 0x70020023, // 0018 JMP #003D
- 0x1C14030B, // 0019 EQ R5 R1 K11
- 0x78160008, // 001A JMPF R5 #0024
- 0x60140009, // 001B GETGBL R5 G9
- 0x8818070B, // 001C GETMBR R6 R3 K11
- 0x7C140200, // 001D CALL R5 1
- 0x5C080A00, // 001E MOVE R2 R5
- 0x4C140000, // 001F LDNIL R5
- 0x1C140405, // 0020 EQ R5 R2 R5
- 0x78160000, // 0021 JMPF R5 #0023
- 0x94080908, // 0022 GETIDX R2 R4 K8
- 0x70020018, // 0023 JMP #003D
- 0x1C14030C, // 0024 EQ R5 R1 K12
- 0x7816000B, // 0025 JMPF R5 #0032
- 0x60140009, // 0026 GETGBL R5 G9
- 0x8818070C, // 0027 GETMBR R6 R3 K12
- 0x7C140200, // 0028 CALL R5 1
- 0x5C080A00, // 0029 MOVE R2 R5
- 0x4C140000, // 002A LDNIL R5
- 0x1C140405, // 002B EQ R5 R2 R5
- 0x78160003, // 002C JMPF R5 #0031
- 0x8C140109, // 002D GETMET R5 R0 K9
- 0x4C1C0000, // 002E LDNIL R7
- 0x7C140400, // 002F CALL R5 2
- 0x94080B00, // 0030 GETIDX R2 R5 K0
- 0x7002000A, // 0031 JMP #003D
- 0x8814010D, // 0032 GETMBR R5 R0 K13
- 0x8C140B0E, // 0033 GETMET R5 R5 K14
- 0x5C1C0200, // 0034 MOVE R7 R1
- 0x7C140400, // 0035 CALL R5 2
- 0x78160005, // 0036 JMPF R5 #003D
- 0x60140009, // 0037 GETGBL R5 G9
- 0x5419FFFE, // 0038 LDINT R6 -1
- 0x401A1006, // 0039 CONNECT R6 K8 R6
- 0x94180206, // 003A GETIDX R6 R1 R6
- 0x7C140200, // 003B CALL R5 1
- 0x5C080A00, // 003C MOVE R2 R5
- 0x4C140000, // 003D LDNIL R5
- 0x20140405, // 003E NE R5 R2 R5
- 0x78160005, // 003F JMPF R5 #0046
- 0x24140500, // 0040 GT R5 R2 K0
- 0x78160003, // 0041 JMPF R5 #0046
- 0x88140102, // 0042 GETMBR R5 R0 K2
- 0x94140A02, // 0043 GETIDX R5 R5 R2
- 0x8C140B0F, // 0044 GETMET R5 R5 K15
- 0x7C140200, // 0045 CALL R5 1
- 0x80000000, // 0046 RET 0
+ ( &(const binstruction[108]) { /* code */
+ 0x84100000, // 0000 CLOSURE R4 P0
+ 0x4C140000, // 0001 LDNIL R5
+ 0x8C180100, // 0002 GETMET R6 R0 K0
+ 0x7C180200, // 0003 CALL R6 1
+ 0x8C1C0101, // 0004 GETMET R7 R0 K1
+ 0x88240102, // 0005 GETMBR R9 R0 K2
+ 0x7C1C0400, // 0006 CALL R7 2
+ 0x6020000C, // 0007 GETGBL R8 G12
+ 0x5C240E00, // 0008 MOVE R9 R7
+ 0x7C200200, // 0009 CALL R8 1
+ 0x18201103, // 000A LE R8 R8 K3
+ 0x78220001, // 000B JMPF R8 #000E
+ 0x4C200000, // 000C LDNIL R8
+ 0x80041000, // 000D RET 1 R8
+ 0x1C200304, // 000E EQ R8 R1 K4
+ 0x78220009, // 000F JMPF R8 #001A
+ 0x5C200800, // 0010 MOVE R8 R4
+ 0x60240009, // 0011 GETGBL R9 G9
+ 0x88280D04, // 0012 GETMBR R10 R6 K4
+ 0x7C240200, // 0013 CALL R9 1
+ 0x5429FFFE, // 0014 LDINT R10 -1
+ 0x94280E0A, // 0015 GETIDX R10 R7 R10
+ 0x5C2C0E00, // 0016 MOVE R11 R7
+ 0x7C200600, // 0017 CALL R8 3
+ 0x5C141000, // 0018 MOVE R5 R8
+ 0x70020041, // 0019 JMP #005C
+ 0x1C200305, // 001A EQ R8 R1 K5
+ 0x78220008, // 001B JMPF R8 #0025
+ 0x5C200800, // 001C MOVE R8 R4
+ 0x60240009, // 001D GETGBL R9 G9
+ 0x88280D05, // 001E GETMBR R10 R6 K5
+ 0x7C240200, // 001F CALL R9 1
+ 0x94280F03, // 0020 GETIDX R10 R7 K3
+ 0x5C2C0E00, // 0021 MOVE R11 R7
+ 0x7C200600, // 0022 CALL R8 3
+ 0x5C141000, // 0023 MOVE R5 R8
+ 0x70020036, // 0024 JMP #005C
+ 0x1C200306, // 0025 EQ R8 R1 K6
+ 0x7822000B, // 0026 JMPF R8 #0033
+ 0x5C200800, // 0027 MOVE R8 R4
+ 0x60240009, // 0028 GETGBL R9 G9
+ 0x88280D06, // 0029 GETMBR R10 R6 K6
+ 0x7C240200, // 002A CALL R9 1
+ 0x8C280101, // 002B GETMET R10 R0 K1
+ 0x4C300000, // 002C LDNIL R12
+ 0x7C280400, // 002D CALL R10 2
+ 0x94281507, // 002E GETIDX R10 R10 K7
+ 0x5C2C0E00, // 002F MOVE R11 R7
+ 0x7C200600, // 0030 CALL R8 3
+ 0x5C141000, // 0031 MOVE R5 R8
+ 0x70020028, // 0032 JMP #005C
+ 0x1C200308, // 0033 EQ R8 R1 K8
+ 0x78220017, // 0034 JMPF R8 #004D
+ 0x5C200800, // 0035 MOVE R8 R4
+ 0x60240009, // 0036 GETGBL R9 G9
+ 0x88280D06, // 0037 GETMBR R10 R6 K6
+ 0x7C240200, // 0038 CALL R9 1
+ 0x8C280101, // 0039 GETMET R10 R0 K1
+ 0x4C300000, // 003A LDNIL R12
+ 0x7C280400, // 003B CALL R10 2
+ 0x94281507, // 003C GETIDX R10 R10 K7
+ 0x5C2C0E00, // 003D MOVE R11 R7
+ 0x7C200600, // 003E CALL R8 3
+ 0x5C141000, // 003F MOVE R5 R8
+ 0x8C200D09, // 0040 GETMET R8 R6 K9
+ 0x7C200200, // 0041 CALL R8 1
+ 0x1C200A08, // 0042 EQ R8 R5 R8
+ 0x78220007, // 0043 JMPF R8 #004C
+ 0x5C200800, // 0044 MOVE R8 R4
+ 0x60240009, // 0045 GETGBL R9 G9
+ 0x88280D05, // 0046 GETMBR R10 R6 K5
+ 0x7C240200, // 0047 CALL R9 1
+ 0x94280F03, // 0048 GETIDX R10 R7 K3
+ 0x5C2C0E00, // 0049 MOVE R11 R7
+ 0x7C200600, // 004A CALL R8 3
+ 0x5C141000, // 004B MOVE R5 R8
+ 0x7002000E, // 004C JMP #005C
+ 0x8820010A, // 004D GETMBR R8 R0 K10
+ 0x8C20110B, // 004E GETMET R8 R8 K11
+ 0x5C280200, // 004F MOVE R10 R1
+ 0x7C200400, // 0050 CALL R8 2
+ 0x78220009, // 0051 JMPF R8 #005C
+ 0x5C200800, // 0052 MOVE R8 R4
+ 0x60240009, // 0053 GETGBL R9 G9
+ 0x5429FFFE, // 0054 LDINT R10 -1
+ 0x402A060A, // 0055 CONNECT R10 K3 R10
+ 0x9428020A, // 0056 GETIDX R10 R1 R10
+ 0x7C240200, // 0057 CALL R9 1
+ 0x4C280000, // 0058 LDNIL R10
+ 0x5C2C0E00, // 0059 MOVE R11 R7
+ 0x7C200600, // 005A CALL R8 3
+ 0x5C141000, // 005B MOVE R5 R8
+ 0x4C200000, // 005C LDNIL R8
+ 0x20200A08, // 005D NE R8 R5 R8
+ 0x7822000B, // 005E JMPF R8 #006B
+ 0x24200B07, // 005F GT R8 R5 K7
+ 0x78220009, // 0060 JMPF R8 #006B
+ 0x8820010C, // 0061 GETMBR R8 R0 K12
+ 0x94201005, // 0062 GETIDX R8 R8 R5
+ 0x4C240000, // 0063 LDNIL R9
+ 0x20241009, // 0064 NE R9 R8 R9
+ 0x78260003, // 0065 JMPF R9 #006A
+ 0x8C24110D, // 0066 GETMET R9 R8 K13
+ 0x5C2C0400, // 0067 MOVE R11 R2
+ 0x5C300600, // 0068 MOVE R12 R3
+ 0x7C240600, // 0069 CALL R9 3
+ 0x80041000, // 006A RET 1 R8
+ 0x80000000, // 006B RET 0
})
)
);
@@ -10998,21 +11272,21 @@ be_local_closure(class_HASPmota_register_event, /* name */
be_str_weak(register_event),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
- 0xA40E2000, // 0000 IMPORT R3 K16
- 0xA4122200, // 0001 IMPORT R4 K17
- 0x88140112, // 0002 GETMBR R5 R0 K18
+ 0xA40E1C00, // 0000 IMPORT R3 K14
+ 0xA4121E00, // 0001 IMPORT R4 K15
+ 0x88140110, // 0002 GETMBR R5 R0 K16
0x4C180000, // 0003 LDNIL R6
0x1C140A06, // 0004 EQ R5 R5 R6
0x78160003, // 0005 JMPF R5 #000A
- 0x8C140713, // 0006 GETMET R5 R3 K19
+ 0x8C140711, // 0006 GETMET R5 R3 K17
0x841C0000, // 0007 CLOSURE R7 P0
0x7C140400, // 0008 CALL R5 2
- 0x90022405, // 0009 SETMBR R0 K18 R5
- 0x88140314, // 000A GETMBR R5 R1 K20
- 0x8C180B15, // 000B GETMET R6 R5 K21
- 0x88200112, // 000C GETMBR R8 R0 K18
+ 0x90022005, // 0009 SETMBR R0 K16 R5
+ 0x88140312, // 000A GETMBR R5 R1 K18
+ 0x8C180B13, // 000B GETMET R6 R5 K19
+ 0x88200110, // 000C GETMBR R8 R0 K16
0x5C240400, // 000D MOVE R9 R2
- 0x8C280916, // 000E GETMET R10 R4 K22
+ 0x8C280914, // 000E GETMET R10 R4 K20
0x5C300200, // 000F MOVE R12 R1
0x7C280400, // 0010 CALL R10 2
0x7C180800, // 0011 CALL R6 4
@@ -11024,414 +11298,6 @@ be_local_closure(class_HASPmota_register_event, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: parse
-********************************************************************/
-be_local_closure(class_HASPmota_parse, /* name */
- be_nested_proto(
- 9, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_HASPmota, /* shared constants */
- be_str_weak(parse),
- &be_const_str_solidified,
- ( &(const binstruction[21]) { /* code */
- 0xA40A2E00, // 0000 IMPORT R2 K23
- 0x8C0C0518, // 0001 GETMET R3 R2 K24
- 0x5C140200, // 0002 MOVE R5 R1
- 0x7C0C0400, // 0003 CALL R3 2
- 0x60100004, // 0004 GETGBL R4 G4
- 0x5C140600, // 0005 MOVE R5 R3
- 0x7C100200, // 0006 CALL R4 1
- 0x1C100919, // 0007 EQ R4 R4 K25
- 0x78120009, // 0008 JMPF R4 #0013
- 0x8C10011A, // 0009 GETMET R4 R0 K26
- 0x5C180600, // 000A MOVE R6 R3
- 0x7C100400, // 000B CALL R4 2
- 0x8C10011B, // 000C GETMET R4 R0 K27
- 0x5C180600, // 000D MOVE R6 R3
- 0x881C0102, // 000E GETMBR R7 R0 K2
- 0x88200101, // 000F GETMBR R8 R0 K1
- 0x941C0E08, // 0010 GETIDX R7 R7 R8
- 0x7C100600, // 0011 CALL R4 3
- 0x70020000, // 0012 JMP #0014
- 0xB006391D, // 0013 RAISE 1 K28 K29
- 0x80000000, // 0014 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: event_dispatch
-********************************************************************/
-be_local_closure(class_HASPmota_event_dispatch, /* name */
- be_nested_proto(
- 9, /* nstack */
- 2, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_HASPmota, /* shared constants */
- be_str_weak(event_dispatch),
- &be_const_str_solidified,
- ( &(const binstruction[34]) { /* code */
- 0xA40A2200, // 0000 IMPORT R2 K17
- 0x8C0C0516, // 0001 GETMET R3 R2 K22
- 0x5C140200, // 0002 MOVE R5 R1
- 0x7C0C0400, // 0003 CALL R3 2
- 0x8810011E, // 0004 GETMBR R4 R0 K30
- 0x78120002, // 0005 JMPF R4 #0009
- 0x8810011E, // 0006 GETMBR R4 R0 K30
- 0x90123E03, // 0007 SETMBR R4 K31 R3
- 0x70020004, // 0008 JMP #000E
- 0xB8124000, // 0009 GETNGBL R4 K32
- 0x8C100921, // 000A GETMET R4 R4 K33
- 0x5C180600, // 000B MOVE R6 R3
- 0x7C100400, // 000C CALL R4 2
- 0x90023C04, // 000D SETMBR R0 K30 R4
- 0x8810011E, // 000E GETMBR R4 R0 K30
- 0x8C100922, // 000F GETMET R4 R4 K34
- 0x7C100200, // 0010 CALL R4 1
- 0x60140009, // 0011 GETGBL R5 G9
- 0x5C180800, // 0012 MOVE R6 R4
- 0x7C140200, // 0013 CALL R5 1
- 0x20140B00, // 0014 NE R5 R5 K0
- 0x7816000A, // 0015 JMPF R5 #0021
- 0x8C140523, // 0016 GETMET R5 R2 K35
- 0x5C1C0800, // 0017 MOVE R7 R4
- 0x7C140400, // 0018 CALL R5 2
- 0x60180004, // 0019 GETGBL R6 G4
- 0x5C1C0A00, // 001A MOVE R7 R5
- 0x7C180200, // 001B CALL R6 1
- 0x1C180D19, // 001C EQ R6 R6 K25
- 0x781A0002, // 001D JMPF R6 #0021
- 0x8C180B12, // 001E GETMET R6 R5 K18
- 0x8820011E, // 001F GETMBR R8 R0 K30
- 0x7C180400, // 0020 CALL R6 2
- 0x80000000, // 0021 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(class_HASPmota_init, /* name */
- be_nested_proto(
- 5, /* nstack */
- 1, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_HASPmota, /* shared constants */
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0x8C040124, // 0000 GETMET R1 R0 K36
- 0x7C040200, // 0001 CALL R1 1
- 0xA4064A00, // 0002 IMPORT R1 K37
- 0x8C080326, // 0003 GETMET R2 R1 K38
- 0x58100027, // 0004 LDCONST R4 K39
- 0x7C080400, // 0005 CALL R2 2
- 0x90021A02, // 0006 SETMBR R0 K13 R2
- 0x80000000, // 0007 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: fix_lv_version
-********************************************************************/
-be_local_closure(class_HASPmota_fix_lv_version, /* name */
- be_nested_proto(
- 6, /* nstack */
- 0, /* argc */
- 12, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_HASPmota, /* shared constants */
- be_str_weak(fix_lv_version),
- &be_const_str_solidified,
- ( &(const binstruction[15]) { /* code */
- 0x58000028, // 0000 LDCONST R0 K40
- 0xA4062200, // 0001 IMPORT R1 K17
- 0x8C080329, // 0002 GETMET R2 R1 K41
- 0xB8124000, // 0003 GETNGBL R4 K32
- 0x5814002A, // 0004 LDCONST R5 K42
- 0x7C080600, // 0005 CALL R2 3
- 0x600C0004, // 0006 GETGBL R3 G4
- 0x5C100400, // 0007 MOVE R4 R2
- 0x7C0C0200, // 0008 CALL R3 1
- 0x200C072B, // 0009 NE R3 R3 K43
- 0x780E0002, // 000A JMPF R3 #000E
- 0xB80E4000, // 000B GETNGBL R3 K32
- 0x54120007, // 000C LDINT R4 8
- 0x900E5404, // 000D SETMBR R3 K42 R4
- 0x80000000, // 000E RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: parse_obj
-********************************************************************/
-be_local_closure(class_HASPmota_parse_obj, /* name */
- be_nested_proto(
- 22, /* nstack */
- 3, /* argc */
- 10, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_HASPmota, /* shared constants */
- be_str_weak(parse_obj),
- &be_const_str_solidified,
- ( &(const binstruction[215]) { /* code */
- 0xA40E5800, // 0000 IMPORT R3 K44
- 0xA4122200, // 0001 IMPORT R4 K17
- 0x60140009, // 0002 GETGBL R5 G9
- 0x8C180307, // 0003 GETMET R6 R1 K7
- 0x5820002D, // 0004 LDCONST R8 K45
- 0x7C180400, // 0005 CALL R6 2
- 0x7C140200, // 0006 CALL R5 1
- 0x60180008, // 0007 GETGBL R6 G8
- 0x8C1C0307, // 0008 GETMET R7 R1 K7
- 0x5824002E, // 0009 LDCONST R9 K46
- 0x7C1C0400, // 000A CALL R7 2
- 0x7C180200, // 000B CALL R6 1
- 0x4C1C0000, // 000C LDNIL R7
- 0x8C20012F, // 000D GETMET R8 R0 K47
- 0x7C200200, // 000E CALL R8 1
- 0x60240008, // 000F GETGBL R9 G8
- 0x8C280307, // 0010 GETMET R10 R1 K7
- 0x58300030, // 0011 LDCONST R12 K48
- 0x7C280400, // 0012 CALL R10 2
- 0x7C240200, // 0013 CALL R9 1
- 0x4C280000, // 0014 LDNIL R10
- 0x202C1331, // 0015 NE R11 R9 K49
- 0x782E0012, // 0016 JMPF R11 #002A
- 0xA8020005, // 0017 EXBLK 0 #001E
- 0x602C000D, // 0018 GETGBL R11 G13
- 0x5C301200, // 0019 MOVE R12 R9
- 0x7C2C0200, // 001A CALL R11 1
- 0x5C281600, // 001B MOVE R10 R11
- 0xA8040001, // 001C EXBLK 1 1
- 0x7002000B, // 001D JMP #002A
- 0xAC2C0002, // 001E CATCH R11 0 2
- 0x70020008, // 001F JMP #0029
- 0x60340001, // 0020 GETGBL R13 G1
- 0x60380018, // 0021 GETGBL R14 G24
- 0x583C0032, // 0022 LDCONST R15 K50
- 0x5C401200, // 0023 MOVE R16 R9
- 0x5C441600, // 0024 MOVE R17 R11
- 0x5C481800, // 0025 MOVE R18 R12
- 0x7C380800, // 0026 CALL R14 4
- 0x7C340200, // 0027 CALL R13 1
- 0x70020000, // 0028 JMP #002A
- 0xB0080000, // 0029 RAISE 2 R0 R0
- 0x202C0D31, // 002A NE R11 R6 K49
- 0x782E006A, // 002B JMPF R11 #0097
- 0x4C2C0000, // 002C LDNIL R11
- 0x202C0A0B, // 002D NE R11 R5 R11
- 0x782E0067, // 002E JMPF R11 #0097
- 0x142C0B08, // 002F LT R11 R5 K8
- 0x742E0002, // 0030 JMPT R11 #0034
- 0x542E00FD, // 0031 LDINT R11 254
- 0x242C0A0B, // 0032 GT R11 R5 R11
- 0x782E0008, // 0033 JMPF R11 #003D
- 0x602C0001, // 0034 GETGBL R11 G1
- 0x60300008, // 0035 GETGBL R12 G8
- 0x5C340A00, // 0036 MOVE R13 R5
- 0x7C300200, // 0037 CALL R12 1
- 0x0032660C, // 0038 ADD R12 K51 R12
- 0x00301934, // 0039 ADD R12 R12 K52
- 0x00301806, // 003A ADD R12 R12 R6
- 0x7C2C0200, // 003B CALL R11 1
- 0x80001600, // 003C RET 0
- 0x4C2C0000, // 003D LDNIL R11
- 0x60300009, // 003E GETGBL R12 G9
- 0x8C340307, // 003F GETMET R13 R1 K7
- 0x583C0035, // 0040 LDCONST R15 K53
- 0x7C340400, // 0041 CALL R13 2
- 0x7C300200, // 0042 CALL R12 1
- 0x4C340000, // 0043 LDNIL R13
- 0x4C380000, // 0044 LDNIL R14
- 0x2038180E, // 0045 NE R14 R12 R14
- 0x783A0007, // 0046 JMPF R14 #004F
- 0x8C381136, // 0047 GETMET R14 R8 K54
- 0x5C401800, // 0048 MOVE R16 R12
- 0x7C380400, // 0049 CALL R14 2
- 0x5C341C00, // 004A MOVE R13 R14
- 0x4C380000, // 004B LDNIL R14
- 0x20381A0E, // 004C NE R14 R13 R14
- 0x783A0000, // 004D JMPF R14 #004F
- 0x882C1B14, // 004E GETMBR R11 R13 K20
- 0x4C380000, // 004F LDNIL R14
- 0x1C38160E, // 0050 EQ R14 R11 R14
- 0x783A0002, // 0051 JMPF R14 #0055
- 0x8C381137, // 0052 GETMET R14 R8 K55
- 0x7C380200, // 0053 CALL R14 1
- 0x5C2C1C00, // 0054 MOVE R11 R14
- 0x8C380929, // 0055 GETMET R14 R4 K41
- 0x5C400000, // 0056 MOVE R16 R0
- 0x00467006, // 0057 ADD R17 K56 R6
- 0x7C380600, // 0058 CALL R14 3
- 0x4C3C0000, // 0059 LDNIL R15
- 0x4C400000, // 005A LDNIL R16
- 0x1C401C10, // 005B EQ R16 R14 R16
- 0x78420010, // 005C JMPF R16 #006E
- 0x8C400929, // 005D GETMET R16 R4 K41
- 0x5C480600, // 005E MOVE R18 R3
- 0x5C4C0C00, // 005F MOVE R19 R6
- 0x7C400600, // 0060 CALL R16 3
- 0x4C440000, // 0061 LDNIL R17
- 0x20442011, // 0062 NE R17 R16 R17
- 0x78460009, // 0063 JMPF R17 #006E
- 0x60440004, // 0064 GETGBL R17 G4
- 0x5C482000, // 0065 MOVE R18 R16
- 0x7C440200, // 0066 CALL R17 1
- 0x1C442339, // 0067 EQ R17 R17 K57
- 0x78460004, // 0068 JMPF R17 #006E
- 0x5C442000, // 0069 MOVE R17 R16
- 0x5C481600, // 006A MOVE R18 R11
- 0x7C440200, // 006B CALL R17 1
- 0x5C3C2200, // 006C MOVE R15 R17
- 0x8838013A, // 006D GETMBR R14 R0 K58
- 0x4C400000, // 006E LDNIL R16
- 0x1C401C10, // 006F EQ R16 R14 R16
- 0x7842000F, // 0070 JMPF R16 #0081
- 0x8C40093B, // 0071 GETMET R16 R4 K59
- 0x5C480C00, // 0072 MOVE R18 R6
- 0x7C400400, // 0073 CALL R16 2
- 0x4C440000, // 0074 LDNIL R17
- 0x20442011, // 0075 NE R17 R16 R17
- 0x78460009, // 0076 JMPF R17 #0081
- 0x60440004, // 0077 GETGBL R17 G4
- 0x5C482000, // 0078 MOVE R18 R16
- 0x7C440200, // 0079 CALL R17 1
- 0x1C442339, // 007A EQ R17 R17 K57
- 0x78460004, // 007B JMPF R17 #0081
- 0x5C442000, // 007C MOVE R17 R16
- 0x5C481600, // 007D MOVE R18 R11
- 0x7C440200, // 007E CALL R17 1
- 0x5C3C2200, // 007F MOVE R15 R17
- 0x8838013A, // 0080 GETMBR R14 R0 K58
- 0x4C400000, // 0081 LDNIL R16
- 0x1C401C10, // 0082 EQ R16 R14 R16
- 0x78420006, // 0083 JMPF R16 #008B
- 0x60400001, // 0084 GETGBL R16 G1
- 0x60440008, // 0085 GETGBL R17 G8
- 0x5C480C00, // 0086 MOVE R18 R6
- 0x7C440200, // 0087 CALL R17 1
- 0x00467811, // 0088 ADD R17 K60 R17
- 0x7C400200, // 0089 CALL R16 1
- 0x80002000, // 008A RET 0
- 0x5C401C00, // 008B MOVE R16 R14
- 0x5C441600, // 008C MOVE R17 R11
- 0x5C480400, // 008D MOVE R18 R2
- 0x5C4C0200, // 008E MOVE R19 R1
- 0x5C501E00, // 008F MOVE R20 R15
- 0x5C541A00, // 0090 MOVE R21 R13
- 0x7C400A00, // 0091 CALL R16 5
- 0x5C1C2000, // 0092 MOVE R7 R16
- 0x8C40113D, // 0093 GETMET R16 R8 K61
- 0x5C480A00, // 0094 MOVE R18 R5
- 0x5C4C0E00, // 0095 MOVE R19 R7
- 0x7C400600, // 0096 CALL R16 3
- 0x4C2C0000, // 0097 LDNIL R11
- 0x202C140B, // 0098 NE R11 R10 R11
- 0x782E0018, // 0099 JMPF R11 #00B3
- 0xA802000B, // 009A EXBLK 0 #00A7
- 0x5C2C1400, // 009B MOVE R11 R10
- 0x7C2C0000, // 009C CALL R11 0
- 0x60300004, // 009D GETGBL R12 G4
- 0x5C341600, // 009E MOVE R13 R11
- 0x7C300200, // 009F CALL R12 1
- 0x1C30193E, // 00A0 EQ R12 R12 K62
- 0x78320002, // 00A1 JMPF R12 #00A5
- 0x5C301600, // 00A2 MOVE R12 R11
- 0x5C340E00, // 00A3 MOVE R13 R7
- 0x7C300200, // 00A4 CALL R12 1
- 0xA8040001, // 00A5 EXBLK 1 1
- 0x7002000B, // 00A6 JMP #00B3
- 0xAC2C0002, // 00A7 CATCH R11 0 2
- 0x70020008, // 00A8 JMP #00B2
- 0x60340001, // 00A9 GETGBL R13 G1
- 0x60380018, // 00AA GETGBL R14 G24
- 0x583C003F, // 00AB LDCONST R15 K63
- 0x5C401200, // 00AC MOVE R16 R9
- 0x5C441600, // 00AD MOVE R17 R11
- 0x5C481800, // 00AE MOVE R18 R12
- 0x7C380800, // 00AF CALL R14 4
- 0x7C340200, // 00B0 CALL R13 1
- 0x70020000, // 00B1 JMP #00B3
- 0xB0080000, // 00B2 RAISE 2 R0 R0
- 0x4C2C0000, // 00B3 LDNIL R11
- 0x1C2C0A0B, // 00B4 EQ R11 R5 R11
- 0x782E0000, // 00B5 JMPF R11 #00B7
- 0x80001600, // 00B6 RET 0
- 0x1C2C0B00, // 00B7 EQ R11 R5 K0
- 0x782E0005, // 00B8 JMPF R11 #00BF
- 0x202C0D31, // 00B9 NE R11 R6 K49
- 0x782E0003, // 00BA JMPF R11 #00BF
- 0x602C0001, // 00BB GETGBL R11 G1
- 0x58300040, // 00BC LDCONST R12 K64
- 0x7C2C0200, // 00BD CALL R11 1
- 0x80001600, // 00BE RET 0
- 0x1C2C0B00, // 00BF EQ R11 R5 K0
- 0x782E0005, // 00C0 JMPF R11 #00C7
- 0x8C2C012F, // 00C1 GETMET R11 R0 K47
- 0x7C2C0200, // 00C2 CALL R11 1
- 0x8C2C1736, // 00C3 GETMET R11 R11 K54
- 0x58340000, // 00C4 LDCONST R13 K0
- 0x7C2C0400, // 00C5 CALL R11 2
- 0x5C1C1600, // 00C6 MOVE R7 R11
- 0x602C0010, // 00C7 GETGBL R11 G16
- 0x8C300303, // 00C8 GETMET R12 R1 K3
- 0x7C300200, // 00C9 CALL R12 1
- 0x7C2C0200, // 00CA CALL R11 1
- 0xA8020004, // 00CB EXBLK 0 #00D1
- 0x5C301600, // 00CC MOVE R12 R11
- 0x7C300000, // 00CD CALL R12 0
- 0x9434020C, // 00CE GETIDX R13 R1 R12
- 0x901C180D, // 00CF SETMBR R7 R12 R13
- 0x7001FFFA, // 00D0 JMP #00CC
- 0x582C0005, // 00D1 LDCONST R11 K5
- 0xAC2C0200, // 00D2 CATCH R11 1 0
- 0xB0080000, // 00D3 RAISE 2 R0 R0
- 0x8C2C0F41, // 00D4 GETMET R11 R7 K65
- 0x7C2C0200, // 00D5 CALL R11 1
- 0x80000000, // 00D6 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: _load
********************************************************************/
@@ -11449,103 +11315,103 @@ be_local_closure(class_HASPmota__load, /* name */
be_str_weak(_load),
&be_const_str_solidified,
( &(const binstruction[99]) { /* code */
- 0xA40A8400, // 0000 IMPORT R2 K66
- 0xA40E2E00, // 0001 IMPORT R3 K23
+ 0xA40A2A00, // 0000 IMPORT R2 K21
+ 0xA40E2C00, // 0001 IMPORT R3 K22
0x60100011, // 0002 GETGBL R4 G17
0x5C140200, // 0003 MOVE R5 R1
- 0x58180043, // 0004 LDCONST R6 K67
+ 0x58180017, // 0004 LDCONST R6 K23
0x7C100400, // 0005 CALL R4 2
- 0x8C140944, // 0006 GETMET R5 R4 K68
+ 0x8C140918, // 0006 GETMET R5 R4 K24
0x7C140200, // 0007 CALL R5 1
- 0x8C180945, // 0008 GETMET R6 R4 K69
+ 0x8C180919, // 0008 GETMET R6 R4 K25
0x7C180200, // 0009 CALL R6 1
- 0x8C180546, // 000A GETMET R6 R2 K70
+ 0x8C18051A, // 000A GETMET R6 R2 K26
0x5C200A00, // 000B MOVE R8 R5
- 0x58240047, // 000C LDCONST R9 K71
+ 0x5824001B, // 000C LDCONST R9 K27
0x7C180600, // 000D CALL R6 3
0x4C100000, // 000E LDNIL R4
0x4C140000, // 000F LDNIL R5
0x601C000C, // 0010 GETGBL R7 G12
0x5C200C00, // 0011 MOVE R8 R6
0x7C1C0200, // 0012 CALL R7 1
- 0x241C0F00, // 0013 GT R7 R7 K0
+ 0x241C0F07, // 0013 GT R7 R7 K7
0x781E0039, // 0014 JMPF R7 #004F
- 0x8C1C0718, // 0015 GETMET R7 R3 K24
- 0x94240D00, // 0016 GETIDX R9 R6 K0
+ 0x8C1C071C, // 0015 GETMET R7 R3 K28
+ 0x94240D07, // 0016 GETIDX R9 R6 K7
0x7C1C0400, // 0017 CALL R7 2
0x60200004, // 0018 GETGBL R8 G4
0x5C240E00, // 0019 MOVE R9 R7
0x7C200200, // 001A CALL R8 1
- 0x1C201119, // 001B EQ R8 R8 K25
+ 0x1C20111D, // 001B EQ R8 R8 K29
0x7822001B, // 001C JMPF R8 #0039
- 0xB8229000, // 001D GETNGBL R8 K72
- 0x8C201149, // 001E GETMET R8 R8 K73
+ 0xB8223C00, // 001D GETNGBL R8 K30
+ 0x8C20111F, // 001E GETMET R8 R8 K31
0x542A0003, // 001F LDINT R10 4
0x7C200400, // 0020 CALL R8 2
0x78220007, // 0021 JMPF R8 #002A
- 0xB8229000, // 0022 GETNGBL R8 K72
- 0x8C20114A, // 0023 GETMET R8 R8 K74
+ 0xB8223C00, // 0022 GETNGBL R8 K30
+ 0x8C201120, // 0023 GETMET R8 R8 K32
0x60280018, // 0024 GETGBL R10 G24
- 0x582C004B, // 0025 LDCONST R11 K75
- 0x94300D00, // 0026 GETIDX R12 R6 K0
+ 0x582C0021, // 0025 LDCONST R11 K33
+ 0x94300D07, // 0026 GETIDX R12 R6 K7
0x7C280400, // 0027 CALL R10 2
0x542E0003, // 0028 LDINT R11 4
0x7C200600, // 0029 CALL R8 3
- 0x8C20011A, // 002A GETMET R8 R0 K26
+ 0x8C200122, // 002A GETMET R8 R0 K34
0x5C280E00, // 002B MOVE R10 R7
0x7C200400, // 002C CALL R8 2
- 0x88200102, // 002D GETMBR R8 R0 K2
+ 0x8820010C, // 002D GETMBR R8 R0 K12
0x4C240000, // 002E LDNIL R9
0x1C201009, // 002F EQ R8 R8 R9
0x78220000, // 0030 JMPF R8 #0032
- 0xB006394C, // 0031 RAISE 1 K28 K76
- 0x8C20011B, // 0032 GETMET R8 R0 K27
+ 0xB0064724, // 0031 RAISE 1 K35 K36
+ 0x8C200125, // 0032 GETMET R8 R0 K37
0x5C280E00, // 0033 MOVE R10 R7
- 0x882C0102, // 0034 GETMBR R11 R0 K2
- 0x88300101, // 0035 GETMBR R12 R0 K1
+ 0x882C010C, // 0034 GETMBR R11 R0 K12
+ 0x88300126, // 0035 GETMBR R12 R0 K38
0x942C160C, // 0036 GETIDX R11 R11 R12
0x7C200600, // 0037 CALL R8 3
0x70020010, // 0038 JMP #004A
0x6020000C, // 0039 GETGBL R8 G12
- 0x8C24054D, // 003A GETMET R9 R2 K77
- 0x942C0D00, // 003B GETIDX R11 R6 K0
- 0x5830004E, // 003C LDCONST R12 K78
- 0x5834004F, // 003D LDCONST R13 K79
+ 0x8C240527, // 003A GETMET R9 R2 K39
+ 0x942C0D07, // 003B GETIDX R11 R6 K7
+ 0x58300028, // 003C LDCONST R12 K40
+ 0x58340029, // 003D LDCONST R13 K41
0x7C240800, // 003E CALL R9 4
0x7C200200, // 003F CALL R8 1
- 0x24201100, // 0040 GT R8 R8 K0
+ 0x24201107, // 0040 GT R8 R8 K7
0x78220007, // 0041 JMPF R8 #004A
- 0xB8229000, // 0042 GETNGBL R8 K72
- 0x8C20114A, // 0043 GETMET R8 R8 K74
+ 0xB8223C00, // 0042 GETNGBL R8 K30
+ 0x8C201120, // 0043 GETMET R8 R8 K32
0x60280018, // 0044 GETGBL R10 G24
- 0x582C0050, // 0045 LDCONST R11 K80
- 0x94300D00, // 0046 GETIDX R12 R6 K0
+ 0x582C002A, // 0045 LDCONST R11 K42
+ 0x94300D07, // 0046 GETIDX R12 R6 K7
0x7C280400, // 0047 CALL R10 2
- 0x582C0051, // 0048 LDCONST R11 K81
+ 0x582C002B, // 0048 LDCONST R11 K43
0x7C200600, // 0049 CALL R8 3
0x4C1C0000, // 004A LDNIL R7
- 0x8C200D52, // 004B GETMET R8 R6 K82
- 0x58280000, // 004C LDCONST R10 K0
+ 0x8C200D2C, // 004B GETMET R8 R6 K44
+ 0x58280007, // 004C LDCONST R10 K7
0x7C200400, // 004D CALL R8 2
0x7001FFC0, // 004E JMP #0010
0x4C180000, // 004F LDNIL R6
- 0x8C1C0109, // 0050 GETMET R7 R0 K9
+ 0x8C1C0101, // 0050 GETMET R7 R0 K1
0x4C240000, // 0051 LDNIL R9
0x7C1C0400, // 0052 CALL R7 2
0x6020000C, // 0053 GETGBL R8 G12
0x5C240E00, // 0054 MOVE R9 R7
0x7C200200, // 0055 CALL R8 1
- 0x1C201100, // 0056 EQ R8 R8 K0
+ 0x1C201107, // 0056 EQ R8 R8 K7
0x78220000, // 0057 JMPF R8 #0059
- 0xB0063953, // 0058 RAISE 1 K28 K83
- 0x94200F00, // 0059 GETIDX R8 R7 K0
- 0x90020208, // 005A SETMBR R0 K1 R8
- 0x88200102, // 005B GETMBR R8 R0 K2
- 0x88240101, // 005C GETMBR R9 R0 K1
+ 0xB006472D, // 0058 RAISE 1 K35 K45
+ 0x94200F07, // 0059 GETIDX R8 R7 K7
+ 0x90020408, // 005A SETMBR R0 K2 R8
+ 0x8820010C, // 005B GETMBR R8 R0 K12
+ 0x88240102, // 005C GETMBR R9 R0 K2
0x94201009, // 005D GETIDX R8 R8 R9
- 0x8C20110F, // 005E GETMET R8 R8 K15
- 0x58280000, // 005F LDCONST R10 K0
- 0x582C0000, // 0060 LDCONST R11 K0
+ 0x8C20110D, // 005E GETMET R8 R8 K13
+ 0x58280007, // 005F LDCONST R10 K7
+ 0x582C0007, // 0060 LDCONST R11 K7
0x7C200600, // 0061 CALL R8 3
0x80000000, // 0062 RET 0
})
@@ -11555,11 +11421,11 @@ be_local_closure(class_HASPmota__load, /* name */
/********************************************************************
-** Solidified function: page_dir_to
+** Solidified function: event_dispatch
********************************************************************/
-be_local_closure(class_HASPmota_page_dir_to, /* name */
+be_local_closure(class_HASPmota_event_dispatch, /* name */
be_nested_proto(
- 7, /* nstack */
+ 9, /* nstack */
2, /* argc */
10, /* varg */
0, /* has upvals */
@@ -11568,41 +11434,322 @@ be_local_closure(class_HASPmota_page_dir_to, /* name */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_HASPmota, /* shared constants */
- be_str_weak(page_dir_to),
+ be_str_weak(event_dispatch),
&be_const_str_solidified,
- ( &(const binstruction[32]) { /* code */
- 0x8C080109, // 0000 GETMET R2 R0 K9
- 0x58100000, // 0001 LDCONST R4 K0
- 0x7C080400, // 0002 CALL R2 2
- 0x4C0C0000, // 0003 LDNIL R3
- 0x1C0C0403, // 0004 EQ R3 R2 R3
- 0x780E0000, // 0005 JMPF R3 #0007
- 0x80060000, // 0006 RET 1 K0
- 0x600C000C, // 0007 GETGBL R3 G12
- 0x5C100400, // 0008 MOVE R4 R2
+ ( &(const binstruction[34]) { /* code */
+ 0xA40A1E00, // 0000 IMPORT R2 K15
+ 0x8C0C0514, // 0001 GETMET R3 R2 K20
+ 0x5C140200, // 0002 MOVE R5 R1
+ 0x7C0C0400, // 0003 CALL R3 2
+ 0x8810012E, // 0004 GETMBR R4 R0 K46
+ 0x78120002, // 0005 JMPF R4 #0009
+ 0x8810012E, // 0006 GETMBR R4 R0 K46
+ 0x90125E03, // 0007 SETMBR R4 K47 R3
+ 0x70020004, // 0008 JMP #000E
+ 0xB8126000, // 0009 GETNGBL R4 K48
+ 0x8C100931, // 000A GETMET R4 R4 K49
+ 0x5C180600, // 000B MOVE R6 R3
+ 0x7C100400, // 000C CALL R4 2
+ 0x90025C04, // 000D SETMBR R0 K46 R4
+ 0x8810012E, // 000E GETMBR R4 R0 K46
+ 0x8C100932, // 000F GETMET R4 R4 K50
+ 0x7C100200, // 0010 CALL R4 1
+ 0x60140009, // 0011 GETGBL R5 G9
+ 0x5C180800, // 0012 MOVE R6 R4
+ 0x7C140200, // 0013 CALL R5 1
+ 0x20140B07, // 0014 NE R5 R5 K7
+ 0x7816000A, // 0015 JMPF R5 #0021
+ 0x8C140533, // 0016 GETMET R5 R2 K51
+ 0x5C1C0800, // 0017 MOVE R7 R4
+ 0x7C140400, // 0018 CALL R5 2
+ 0x60180004, // 0019 GETGBL R6 G4
+ 0x5C1C0A00, // 001A MOVE R7 R5
+ 0x7C180200, // 001B CALL R6 1
+ 0x1C180D1D, // 001C EQ R6 R6 K29
+ 0x781A0002, // 001D JMPF R6 #0021
+ 0x8C180B10, // 001E GETMET R6 R5 K16
+ 0x8820012E, // 001F GETMBR R8 R0 K46
+ 0x7C180400, // 0020 CALL R6 2
+ 0x80000000, // 0021 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: fix_lv_version
+********************************************************************/
+be_local_closure(class_HASPmota_fix_lv_version, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 0, /* argc */
+ 12, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_HASPmota, /* shared constants */
+ be_str_weak(fix_lv_version),
+ &be_const_str_solidified,
+ ( &(const binstruction[15]) { /* code */
+ 0x58000034, // 0000 LDCONST R0 K52
+ 0xA4061E00, // 0001 IMPORT R1 K15
+ 0x8C080335, // 0002 GETMET R2 R1 K53
+ 0xB8126000, // 0003 GETNGBL R4 K48
+ 0x58140036, // 0004 LDCONST R5 K54
+ 0x7C080600, // 0005 CALL R2 3
+ 0x600C0004, // 0006 GETGBL R3 G4
+ 0x5C100400, // 0007 MOVE R4 R2
+ 0x7C0C0200, // 0008 CALL R3 1
+ 0x200C0737, // 0009 NE R3 R3 K55
+ 0x780E0002, // 000A JMPF R3 #000E
+ 0xB80E6000, // 000B GETNGBL R3 K48
+ 0x54120007, // 000C LDINT R4 8
+ 0x900E6C04, // 000D SETMBR R3 K54 R4
+ 0x80000000, // 000E RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_page_cur_parsing
+********************************************************************/
+be_local_closure(class_HASPmota_get_page_cur_parsing, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_HASPmota, /* shared constants */
+ be_str_weak(get_page_cur_parsing),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x8804010C, // 0000 GETMBR R1 R0 K12
+ 0x88080126, // 0001 GETMBR R2 R0 K38
+ 0x94040202, // 0002 GETIDX R1 R1 R2
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(class_HASPmota_init, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_HASPmota, /* shared constants */
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 8]) { /* code */
+ 0x8C040138, // 0000 GETMET R1 R0 K56
+ 0x7C040200, // 0001 CALL R1 1
+ 0xA4067200, // 0002 IMPORT R1 K57
+ 0x8C08033A, // 0003 GETMET R2 R1 K58
+ 0x5810003B, // 0004 LDCONST R4 K59
+ 0x7C080400, // 0005 CALL R2 2
+ 0x90021402, // 0006 SETMBR R0 K10 R2
+ 0x80000000, // 0007 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: pages_list_sorted
+********************************************************************/
+be_local_closure(class_HASPmota_pages_list_sorted, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 2, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_HASPmota, /* shared constants */
+ be_str_weak(pages_list_sorted),
+ &be_const_str_solidified,
+ ( &(const binstruction[47]) { /* code */
+ 0x60080012, // 0000 GETGBL R2 G18
+ 0x7C080000, // 0001 CALL R2 0
+ 0x1C0C0307, // 0002 EQ R3 R1 K7
+ 0x780E0000, // 0003 JMPF R3 #0005
+ 0x88040102, // 0004 GETMBR R1 R0 K2
+ 0x600C0010, // 0005 GETGBL R3 G16
+ 0x8810010C, // 0006 GETMBR R4 R0 K12
+ 0x8C10093C, // 0007 GETMET R4 R4 K60
+ 0x7C100200, // 0008 CALL R4 1
0x7C0C0200, // 0009 CALL R3 1
- 0x18100708, // 000A LE R4 R3 K8
- 0x78120000, // 000B JMPF R4 #000D
- 0x80060000, // 000C RET 1 K0
- 0x1C100751, // 000D EQ R4 R3 K81
- 0x78120000, // 000E JMPF R4 #0010
- 0x80061000, // 000F RET 1 K8
- 0x8C100507, // 0010 GETMET R4 R2 K7
- 0x5C180200, // 0011 MOVE R6 R1
- 0x7C100400, // 0012 CALL R4 2
- 0x4C140000, // 0013 LDNIL R5
- 0x1C140805, // 0014 EQ R5 R4 R5
- 0x78160000, // 0015 JMPF R5 #0017
- 0x80060000, // 0016 RET 1 K0
- 0x00140708, // 0017 ADD R5 R3 K8
- 0x0C140B51, // 0018 DIV R5 R5 K81
- 0x18140805, // 0019 LE R5 R4 R5
- 0x78160001, // 001A JMPF R5 #001D
- 0x80061000, // 001B RET 1 K8
- 0x70020001, // 001C JMP #001F
- 0x5415FFFE, // 001D LDINT R5 -1
- 0x80040A00, // 001E RET 1 R5
- 0x80000000, // 001F RET 0
+ 0xA8020007, // 000A EXBLK 0 #0013
+ 0x5C100600, // 000B MOVE R4 R3
+ 0x7C100000, // 000C CALL R4 0
+ 0x20140907, // 000D NE R5 R4 K7
+ 0x78160002, // 000E JMPF R5 #0012
+ 0x8C14053D, // 000F GETMET R5 R2 K61
+ 0x5C1C0800, // 0010 MOVE R7 R4
+ 0x7C140400, // 0011 CALL R5 2
+ 0x7001FFF7, // 0012 JMP #000B
+ 0x580C003E, // 0013 LDCONST R3 K62
+ 0xAC0C0200, // 0014 CATCH R3 1 0
+ 0xB0080000, // 0015 RAISE 2 R0 R0
+ 0x8C0C013F, // 0016 GETMET R3 R0 K63
+ 0x5C140400, // 0017 MOVE R5 R2
+ 0x7C0C0400, // 0018 CALL R3 2
+ 0x5C080600, // 0019 MOVE R2 R3
+ 0x4C0C0000, // 001A LDNIL R3
+ 0x1C0C0203, // 001B EQ R3 R1 R3
+ 0x780E0000, // 001C JMPF R3 #001E
+ 0x80040400, // 001D RET 1 R2
+ 0x600C000C, // 001E GETGBL R3 G12
+ 0x5C100400, // 001F MOVE R4 R2
+ 0x7C0C0200, // 0020 CALL R3 1
+ 0x00080402, // 0021 ADD R2 R2 R2
+ 0x8C100540, // 0022 GETMET R4 R2 K64
+ 0x5C180200, // 0023 MOVE R6 R1
+ 0x7C100400, // 0024 CALL R4 2
+ 0x4C140000, // 0025 LDNIL R5
+ 0x1C140805, // 0026 EQ R5 R4 R5
+ 0x78160001, // 0027 JMPF R5 #002A
+ 0x4C140000, // 0028 LDNIL R5
+ 0x80040A00, // 0029 RET 1 R5
+ 0x00140803, // 002A ADD R5 R4 R3
+ 0x04140B03, // 002B SUB R5 R5 K3
+ 0x40140805, // 002C CONNECT R5 R4 R5
+ 0x94080405, // 002D GETIDX R2 R2 R5
+ 0x80040400, // 002E RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: sort
+********************************************************************/
+be_local_closure(class_HASPmota_sort, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 1, /* argc */
+ 12, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_HASPmota, /* shared constants */
+ be_str_weak(sort),
+ &be_const_str_solidified,
+ ( &(const binstruction[30]) { /* code */
+ 0x58040034, // 0000 LDCONST R1 K52
+ 0x60080010, // 0001 GETGBL R2 G16
+ 0x600C000C, // 0002 GETGBL R3 G12
+ 0x5C100000, // 0003 MOVE R4 R0
+ 0x7C0C0200, // 0004 CALL R3 1
+ 0x040C0703, // 0005 SUB R3 R3 K3
+ 0x400E0603, // 0006 CONNECT R3 K3 R3
+ 0x7C080200, // 0007 CALL R2 1
+ 0xA8020010, // 0008 EXBLK 0 #001A
+ 0x5C0C0400, // 0009 MOVE R3 R2
+ 0x7C0C0000, // 000A CALL R3 0
+ 0x94100003, // 000B GETIDX R4 R0 R3
+ 0x5C140600, // 000C MOVE R5 R3
+ 0x24180B07, // 000D GT R6 R5 K7
+ 0x781A0008, // 000E JMPF R6 #0018
+ 0x04180B03, // 000F SUB R6 R5 K3
+ 0x94180006, // 0010 GETIDX R6 R0 R6
+ 0x24180C04, // 0011 GT R6 R6 R4
+ 0x781A0004, // 0012 JMPF R6 #0018
+ 0x04180B03, // 0013 SUB R6 R5 K3
+ 0x94180006, // 0014 GETIDX R6 R0 R6
+ 0x98000A06, // 0015 SETIDX R0 R5 R6
+ 0x04140B03, // 0016 SUB R5 R5 K3
+ 0x7001FFF4, // 0017 JMP #000D
+ 0x98000A04, // 0018 SETIDX R0 R5 R4
+ 0x7001FFEE, // 0019 JMP #0009
+ 0x5808003E, // 001A LDCONST R2 K62
+ 0xAC080200, // 001B CATCH R2 1 0
+ 0xB0080000, // 001C RAISE 2 R0 R0
+ 0x80040000, // 001D RET 1 R0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: _remove_page
+********************************************************************/
+be_local_closure(class_HASPmota__remove_page, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 2, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_HASPmota, /* shared constants */
+ be_str_weak(_remove_page),
+ &be_const_str_solidified,
+ ( &(const binstruction[37]) { /* code */
+ 0x8C080100, // 0000 GETMET R2 R0 K0
+ 0x7C080200, // 0001 CALL R2 1
+ 0x8C080509, // 0002 GETMET R2 R2 K9
+ 0x7C080200, // 0003 CALL R2 1
+ 0x1C0C0202, // 0004 EQ R3 R1 R2
+ 0x780E0008, // 0005 JMPF R3 #000F
+ 0x8C0C0141, // 0006 GETMET R3 R0 K65
+ 0x58140008, // 0007 LDCONST R5 K8
+ 0x58180007, // 0008 LDCONST R6 K7
+ 0x581C0007, // 0009 LDCONST R7 K7
+ 0x7C0C0800, // 000A CALL R3 4
+ 0x4C100000, // 000B LDNIL R4
+ 0x1C100604, // 000C EQ R4 R3 R4
+ 0x78120000, // 000D JMPF R4 #000F
+ 0x80000800, // 000E RET 0
+ 0x880C0126, // 000F GETMBR R3 R0 K38
+ 0x1C0C0601, // 0010 EQ R3 R3 R1
+ 0x780E0001, // 0011 JMPF R3 #0014
+ 0x880C0102, // 0012 GETMBR R3 R0 K2
+ 0x90024C03, // 0013 SETMBR R0 K38 R3
+ 0x880C010C, // 0014 GETMBR R3 R0 K12
+ 0x8C0C0742, // 0015 GETMET R3 R3 K66
+ 0x5C140200, // 0016 MOVE R5 R1
+ 0x7C0C0400, // 0017 CALL R3 2
+ 0x780E0003, // 0018 JMPF R3 #001D
+ 0x880C010C, // 0019 GETMBR R3 R0 K12
+ 0x8C0C072C, // 001A GETMET R3 R3 K44
+ 0x5C140200, // 001B MOVE R5 R1
+ 0x7C0C0400, // 001C CALL R3 2
+ 0x600C0018, // 001D GETGBL R3 G24
+ 0x58100044, // 001E LDCONST R4 K68
+ 0x5C140200, // 001F MOVE R5 R1
+ 0x7C0C0400, // 0020 CALL R3 2
+ 0xB8128600, // 0021 GETNGBL R4 K67
+ 0x4C140000, // 0022 LDNIL R5
+ 0x90100605, // 0023 SETMBR R4 R3 R5
+ 0x80000000, // 0024 RET 0
})
)
);
@@ -11626,13 +11773,13 @@ be_local_closure(class_HASPmota_do_action, /* name */
be_str_weak(do_action),
&be_const_str_solidified,
( &(const binstruction[ 9]) { /* code */
- 0xB80E4000, // 0000 GETNGBL R3 K32
- 0x880C0754, // 0001 GETMBR R3 R3 K84
+ 0xB80E6000, // 0000 GETNGBL R3 K48
+ 0x880C0745, // 0001 GETMBR R3 R3 K69
0x200C0403, // 0002 NE R3 R2 R3
0x780E0000, // 0003 JMPF R3 #0005
0x80000600, // 0004 RET 0
- 0x8C0C0155, // 0005 GETMET R3 R0 K85
- 0x88140356, // 0006 GETMBR R5 R1 K86
+ 0x8C0C0141, // 0005 GETMET R3 R0 K65
+ 0x88140346, // 0006 GETMBR R5 R1 K70
0x7C0C0400, // 0007 CALL R3 2
0x80000000, // 0008 RET 0
})
@@ -11657,61 +11804,66 @@ be_local_closure(class_HASPmota_parse_page, /* name */
&be_ktab_class_HASPmota, /* shared constants */
be_str_weak(parse_page),
&be_const_str_solidified,
- ( &(const binstruction[54]) { /* code */
- 0x8C080357, // 0000 GETMET R2 R1 K87
- 0x58100058, // 0001 LDCONST R4 K88
+ ( &(const binstruction[59]) { /* code */
+ 0x8C080347, // 0000 GETMET R2 R1 K71
+ 0x58100048, // 0001 LDCONST R4 K72
0x7C080400, // 0002 CALL R2 2
- 0x780A0030, // 0003 JMPF R2 #0035
+ 0x780A0035, // 0003 JMPF R2 #003A
0x60080004, // 0004 GETGBL R2 G4
- 0x940C0358, // 0005 GETIDX R3 R1 K88
+ 0x940C0348, // 0005 GETIDX R3 R1 K72
0x7C080200, // 0006 CALL R2 1
- 0x1C08052B, // 0007 EQ R2 R2 K43
- 0x780A002B, // 0008 JMPF R2 #0035
+ 0x1C080537, // 0007 EQ R2 R2 K55
+ 0x780A0030, // 0008 JMPF R2 #003A
0x60080009, // 0009 GETGBL R2 G9
- 0x940C0358, // 000A GETIDX R3 R1 K88
+ 0x940C0348, // 000A GETIDX R3 R1 K72
0x7C080200, // 000B CALL R2 1
- 0x90020202, // 000C SETMBR R0 K1 R2
+ 0x90024C02, // 000C SETMBR R0 K38 R2
0x880C0102, // 000D GETMBR R3 R0 K2
- 0x8C0C0759, // 000E GETMET R3 R3 K89
- 0x5C140400, // 000F MOVE R5 R2
- 0x7C0C0400, // 0010 CALL R3 2
- 0x740E0006, // 0011 JMPT R3 #0019
- 0x880C015A, // 0012 GETMBR R3 R0 K90
- 0x88100102, // 0013 GETMBR R4 R0 K2
- 0x5C140600, // 0014 MOVE R5 R3
- 0x5C180400, // 0015 MOVE R6 R2
- 0x5C1C0000, // 0016 MOVE R7 R0
- 0x7C140400, // 0017 CALL R5 2
- 0x98100405, // 0018 SETIDX R4 R2 R5
- 0x8C0C0307, // 0019 GETMET R3 R1 K7
- 0x5814002D, // 001A LDCONST R5 K45
- 0x7C0C0400, // 001B CALL R3 2
- 0x1C0C0700, // 001C EQ R3 R3 K0
- 0x780E0016, // 001D JMPF R3 #0035
- 0x8C0C012F, // 001E GETMET R3 R0 K47
- 0x7C0C0200, // 001F CALL R3 1
- 0x60100009, // 0020 GETGBL R4 G9
- 0x8C140307, // 0021 GETMET R5 R1 K7
- 0x581C000A, // 0022 LDCONST R7 K10
- 0x4C200000, // 0023 LDNIL R8
- 0x7C140600, // 0024 CALL R5 3
- 0x7C100200, // 0025 CALL R4 1
- 0x900E1404, // 0026 SETMBR R3 K10 R4
- 0x60100009, // 0027 GETGBL R4 G9
- 0x8C140307, // 0028 GETMET R5 R1 K7
- 0x581C000B, // 0029 LDCONST R7 K11
- 0x4C200000, // 002A LDNIL R8
- 0x7C140600, // 002B CALL R5 3
- 0x7C100200, // 002C CALL R4 1
- 0x900E1604, // 002D SETMBR R3 K11 R4
- 0x60100009, // 002E GETGBL R4 G9
- 0x8C140307, // 002F GETMET R5 R1 K7
- 0x581C000C, // 0030 LDCONST R7 K12
- 0x4C200000, // 0031 LDNIL R8
- 0x7C140600, // 0032 CALL R5 3
- 0x7C100200, // 0033 CALL R4 1
- 0x900E1804, // 0034 SETMBR R3 K12 R4
- 0x80000000, // 0035 RET 0
+ 0x4C100000, // 000E LDNIL R4
+ 0x1C0C0604, // 000F EQ R3 R3 R4
+ 0x780E0000, // 0010 JMPF R3 #0012
+ 0x90020402, // 0011 SETMBR R0 K2 R2
+ 0x880C010C, // 0012 GETMBR R3 R0 K12
+ 0x8C0C0742, // 0013 GETMET R3 R3 K66
+ 0x5C140400, // 0014 MOVE R5 R2
+ 0x7C0C0400, // 0015 CALL R3 2
+ 0x740E0006, // 0016 JMPT R3 #001E
+ 0x880C0149, // 0017 GETMBR R3 R0 K73
+ 0x8810010C, // 0018 GETMBR R4 R0 K12
+ 0x5C140600, // 0019 MOVE R5 R3
+ 0x5C180400, // 001A MOVE R6 R2
+ 0x5C1C0000, // 001B MOVE R7 R0
+ 0x7C140400, // 001C CALL R5 2
+ 0x98100405, // 001D SETIDX R4 R2 R5
+ 0x8C0C0340, // 001E GETMET R3 R1 K64
+ 0x58140009, // 001F LDCONST R5 K9
+ 0x7C0C0400, // 0020 CALL R3 2
+ 0x1C0C0707, // 0021 EQ R3 R3 K7
+ 0x780E0016, // 0022 JMPF R3 #003A
+ 0x8C0C014A, // 0023 GETMET R3 R0 K74
+ 0x7C0C0200, // 0024 CALL R3 1
+ 0x60100009, // 0025 GETGBL R4 G9
+ 0x8C140340, // 0026 GETMET R5 R1 K64
+ 0x581C0004, // 0027 LDCONST R7 K4
+ 0x4C200000, // 0028 LDNIL R8
+ 0x7C140600, // 0029 CALL R5 3
+ 0x7C100200, // 002A CALL R4 1
+ 0x900E0804, // 002B SETMBR R3 K4 R4
+ 0x60100009, // 002C GETGBL R4 G9
+ 0x8C140340, // 002D GETMET R5 R1 K64
+ 0x581C0005, // 002E LDCONST R7 K5
+ 0x4C200000, // 002F LDNIL R8
+ 0x7C140600, // 0030 CALL R5 3
+ 0x7C100200, // 0031 CALL R4 1
+ 0x900E0A04, // 0032 SETMBR R3 K5 R4
+ 0x60100009, // 0033 GETGBL R4 G9
+ 0x8C140340, // 0034 GETMET R5 R1 K64
+ 0x581C0006, // 0035 LDCONST R7 K6
+ 0x4C200000, // 0036 LDNIL R8
+ 0x7C140600, // 0037 CALL R5 3
+ 0x7C100200, // 0038 CALL R4 1
+ 0x900E0C04, // 0039 SETMBR R3 K6 R4
+ 0x80000000, // 003A RET 0
})
)
);
@@ -11719,65 +11871,12 @@ be_local_closure(class_HASPmota_parse_page, /* name */
/********************************************************************
-** Solidified function: sort
+** Solidified function: page_dir_to
********************************************************************/
-be_local_closure(class_HASPmota_sort, /* name */
+be_local_closure(class_HASPmota_page_dir_to, /* name */
be_nested_proto(
7, /* nstack */
- 1, /* argc */
- 12, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- &be_ktab_class_HASPmota, /* shared constants */
- be_str_weak(sort),
- &be_const_str_solidified,
- ( &(const binstruction[30]) { /* code */
- 0x58040028, // 0000 LDCONST R1 K40
- 0x60080010, // 0001 GETGBL R2 G16
- 0x600C000C, // 0002 GETGBL R3 G12
- 0x5C100000, // 0003 MOVE R4 R0
- 0x7C0C0200, // 0004 CALL R3 1
- 0x040C0708, // 0005 SUB R3 R3 K8
- 0x400E1003, // 0006 CONNECT R3 K8 R3
- 0x7C080200, // 0007 CALL R2 1
- 0xA8020010, // 0008 EXBLK 0 #001A
- 0x5C0C0400, // 0009 MOVE R3 R2
- 0x7C0C0000, // 000A CALL R3 0
- 0x94100003, // 000B GETIDX R4 R0 R3
- 0x5C140600, // 000C MOVE R5 R3
- 0x24180B00, // 000D GT R6 R5 K0
- 0x781A0008, // 000E JMPF R6 #0018
- 0x04180B08, // 000F SUB R6 R5 K8
- 0x94180006, // 0010 GETIDX R6 R0 R6
- 0x24180C04, // 0011 GT R6 R6 R4
- 0x781A0004, // 0012 JMPF R6 #0018
- 0x04180B08, // 0013 SUB R6 R5 K8
- 0x94180006, // 0014 GETIDX R6 R0 R6
- 0x98000A06, // 0015 SETIDX R0 R5 R6
- 0x04140B08, // 0016 SUB R5 R5 K8
- 0x7001FFF4, // 0017 JMP #000D
- 0x98000A04, // 0018 SETIDX R0 R5 R4
- 0x7001FFEE, // 0019 JMP #0009
- 0x58080005, // 001A LDCONST R2 K5
- 0xAC080200, // 001B CATCH R2 1 0
- 0xB0080000, // 001C RAISE 2 R0 R0
- 0x80040000, // 001D RET 1 R0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: get_page_cur
-********************************************************************/
-be_local_closure(class_HASPmota_get_page_cur, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
+ 2, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -11785,13 +11884,41 @@ be_local_closure(class_HASPmota_get_page_cur, /* name */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_HASPmota, /* shared constants */
- be_str_weak(get_page_cur),
+ be_str_weak(page_dir_to),
&be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x88040102, // 0000 GETMBR R1 R0 K2
- 0x88080101, // 0001 GETMBR R2 R0 K1
- 0x94040202, // 0002 GETIDX R1 R1 R2
- 0x80040200, // 0003 RET 1 R1
+ ( &(const binstruction[32]) { /* code */
+ 0x8C080101, // 0000 GETMET R2 R0 K1
+ 0x58100007, // 0001 LDCONST R4 K7
+ 0x7C080400, // 0002 CALL R2 2
+ 0x4C0C0000, // 0003 LDNIL R3
+ 0x1C0C0403, // 0004 EQ R3 R2 R3
+ 0x780E0000, // 0005 JMPF R3 #0007
+ 0x80060E00, // 0006 RET 1 K7
+ 0x600C000C, // 0007 GETGBL R3 G12
+ 0x5C100400, // 0008 MOVE R4 R2
+ 0x7C0C0200, // 0009 CALL R3 1
+ 0x18100703, // 000A LE R4 R3 K3
+ 0x78120000, // 000B JMPF R4 #000D
+ 0x80060E00, // 000C RET 1 K7
+ 0x1C10072B, // 000D EQ R4 R3 K43
+ 0x78120000, // 000E JMPF R4 #0010
+ 0x80060600, // 000F RET 1 K3
+ 0x8C100540, // 0010 GETMET R4 R2 K64
+ 0x5C180200, // 0011 MOVE R6 R1
+ 0x7C100400, // 0012 CALL R4 2
+ 0x4C140000, // 0013 LDNIL R5
+ 0x1C140805, // 0014 EQ R5 R4 R5
+ 0x78160000, // 0015 JMPF R5 #0017
+ 0x80060E00, // 0016 RET 1 K7
+ 0x00140703, // 0017 ADD R5 R3 K3
+ 0x0C140B2B, // 0018 DIV R5 R5 K43
+ 0x18140805, // 0019 LE R5 R4 R5
+ 0x78160001, // 001A JMPF R5 #001D
+ 0x80060600, // 001B RET 1 K3
+ 0x70020001, // 001C JMP #001F
+ 0x5415FFFE, // 001D LDINT R5 -1
+ 0x80040A00, // 001E RET 1 R5
+ 0x80000000, // 001F RET 0
})
)
);
@@ -11815,108 +11942,108 @@ be_local_closure(class_HASPmota_start, /* name */
be_str_weak(start),
&be_const_str_solidified,
( &(const binstruction[105]) { /* code */
- 0xA40EB600, // 0000 IMPORT R3 K91
+ 0xA40E9600, // 0000 IMPORT R3 K75
0x4C100000, // 0001 LDNIL R4
0x1C100404, // 0002 EQ R4 R2 R4
0x78120000, // 0003 JMPF R4 #0005
- 0x8808015C, // 0004 GETMBR R2 R0 K92
- 0x8C10075D, // 0005 GETMET R4 R3 K93
+ 0x8808014C, // 0004 GETMBR R2 R0 K76
+ 0x8C10074D, // 0005 GETMET R4 R3 K77
0x5C180400, // 0006 MOVE R6 R2
0x7C100400, // 0007 CALL R4 2
0x74120002, // 0008 JMPT R4 #000C
- 0x0012BC02, // 0009 ADD R4 K94 R2
- 0x0010095F, // 000A ADD R4 R4 K95
- 0xB006C004, // 000B RAISE 1 K96 R4
- 0xB8124000, // 000C GETNGBL R4 K32
- 0x8C100961, // 000D GETMET R4 R4 K97
+ 0x00129C02, // 0009 ADD R4 K78 R2
+ 0x0010094F, // 000A ADD R4 R4 K79
+ 0xB006A004, // 000B RAISE 1 K80 R4
+ 0xB8126000, // 000C GETNGBL R4 K48
+ 0x8C100951, // 000D GETMET R4 R4 K81
0x7C100200, // 000E CALL R4 1
0x60100017, // 000F GETGBL R4 G23
0x5C140200, // 0010 MOVE R5 R1
0x7C100200, // 0011 CALL R4 1
- 0x9002C404, // 0012 SETMBR R0 K98 R4
- 0xB8124000, // 0013 GETNGBL R4 K32
- 0x8C100964, // 0014 GETMET R4 R4 K100
+ 0x9002A404, // 0012 SETMBR R0 K82 R4
+ 0xB8126000, // 0013 GETNGBL R4 K48
+ 0x8C100954, // 0014 GETMET R4 R4 K84
0x7C100200, // 0015 CALL R4 1
- 0x9002C604, // 0016 SETMBR R0 K99 R4
- 0xB8124000, // 0017 GETNGBL R4 K32
- 0x8C100966, // 0018 GETMET R4 R4 K102
+ 0x9002A604, // 0016 SETMBR R0 K83 R4
+ 0xB8126000, // 0017 GETNGBL R4 K48
+ 0x8C100956, // 0018 GETMET R4 R4 K86
0x7C100200, // 0019 CALL R4 1
- 0x9002CA04, // 001A SETMBR R0 K101 R4
- 0xB8124000, // 001B GETNGBL R4 K32
- 0x8C100968, // 001C GETMET R4 R4 K104
+ 0x9002AA04, // 001A SETMBR R0 K85 R4
+ 0xB8126000, // 001B GETNGBL R4 K48
+ 0x8C100958, // 001C GETMET R4 R4 K88
0x7C100200, // 001D CALL R4 1
- 0x9002CE04, // 001E SETMBR R0 K103 R4
+ 0x9002AE04, // 001E SETMBR R0 K87 R4
0xA8020007, // 001F EXBLK 0 #0028
- 0xB8124000, // 0020 GETNGBL R4 K32
- 0x8C10096A, // 0021 GETMET R4 R4 K106
- 0x5818006B, // 0022 LDCONST R6 K107
+ 0xB8126000, // 0020 GETNGBL R4 K48
+ 0x8C10095A, // 0021 GETMET R4 R4 K90
+ 0x5818005B, // 0022 LDCONST R6 K91
0x541E000F, // 0023 LDINT R7 16
0x7C100600, // 0024 CALL R4 3
- 0x9002D204, // 0025 SETMBR R0 K105 R4
+ 0x9002B204, // 0025 SETMBR R0 K89 R4
0xA8040001, // 0026 EXBLK 1 1
0x70020009, // 0027 JMP #0032
0xAC100000, // 0028 CATCH R4 0 0
0x70020006, // 0029 JMP #0031
- 0xB8124000, // 002A GETNGBL R4 K32
- 0x8C10096A, // 002B GETMET R4 R4 K106
- 0x5818006C, // 002C LDCONST R6 K108
+ 0xB8126000, // 002A GETNGBL R4 K48
+ 0x8C10095A, // 002B GETMET R4 R4 K90
+ 0x5818005C, // 002C LDCONST R6 K92
0x541E000D, // 002D LDINT R7 14
0x7C100600, // 002E CALL R4 3
- 0x9002D204, // 002F SETMBR R0 K105 R4
+ 0x9002B204, // 002F SETMBR R0 K89 R4
0x70020000, // 0030 JMP #0032
0xB0080000, // 0031 RAISE 2 R0 R0
- 0xB8124000, // 0032 GETNGBL R4 K32
- 0x8C10096D, // 0033 GETMET R4 R4 K109
- 0x58180000, // 0034 LDCONST R6 K0
- 0xB81E4000, // 0035 GETNGBL R7 K32
- 0x8C1C0F6E, // 0036 GETMET R7 R7 K110
- 0x5824006F, // 0037 LDCONST R9 K111
+ 0xB8126000, // 0032 GETNGBL R4 K48
+ 0x8C10095D, // 0033 GETMET R4 R4 K93
+ 0x58180007, // 0034 LDCONST R6 K7
+ 0xB81E6000, // 0035 GETNGBL R7 K48
+ 0x8C1C0F5E, // 0036 GETMET R7 R7 K94
+ 0x5824005F, // 0037 LDCONST R9 K95
0x7C1C0400, // 0038 CALL R7 2
- 0xB8224000, // 0039 GETNGBL R8 K32
- 0x8C20116E, // 003A GETMET R8 R8 K110
- 0x58280070, // 003B LDCONST R10 K112
+ 0xB8226000, // 0039 GETNGBL R8 K48
+ 0x8C20115E, // 003A GETMET R8 R8 K94
+ 0x58280060, // 003B LDCONST R10 K96
0x7C200400, // 003C CALL R8 2
- 0x88240162, // 003D GETMBR R9 R0 K98
- 0x88280169, // 003E GETMBR R10 R0 K105
+ 0x88240152, // 003D GETMBR R9 R0 K82
+ 0x88280159, // 003E GETMBR R10 R0 K89
0x7C100C00, // 003F CALL R4 6
- 0x88140167, // 0040 GETMBR R5 R0 K103
- 0x8C140B71, // 0041 GETMET R5 R5 K113
+ 0x88140157, // 0040 GETMBR R5 R0 K87
+ 0x8C140B61, // 0041 GETMET R5 R5 K97
0x7C140200, // 0042 CALL R5 1
- 0x8C140B72, // 0043 GETMET R5 R5 K114
+ 0x8C140B62, // 0043 GETMET R5 R5 K98
0x5C1C0800, // 0044 MOVE R7 R4
0x7C140400, // 0045 CALL R5 2
- 0x88140167, // 0046 GETMBR R5 R0 K103
- 0x8C140B73, // 0047 GETMET R5 R5 K115
- 0x881C0162, // 0048 GETMBR R7 R0 K98
+ 0x88140157, // 0046 GETMBR R5 R0 K87
+ 0x8C140B63, // 0047 GETMET R5 R5 K99
+ 0x881C0152, // 0048 GETMBR R7 R0 K82
0x781E0004, // 0049 JMPF R7 #004F
- 0xB81E4000, // 004A GETNGBL R7 K32
- 0x8C1C0F6E, // 004B GETMET R7 R7 K110
- 0x58240000, // 004C LDCONST R9 K0
+ 0xB81E6000, // 004A GETNGBL R7 K48
+ 0x8C1C0F5E, // 004B GETMET R7 R7 K94
+ 0x58240007, // 004C LDCONST R9 K7
0x7C1C0400, // 004D CALL R7 2
0x70020003, // 004E JMP #0053
- 0xB81E4000, // 004F GETNGBL R7 K32
- 0x8C1C0F6E, // 0050 GETMET R7 R7 K110
- 0x58240074, // 0051 LDCONST R9 K116
+ 0xB81E6000, // 004F GETNGBL R7 K48
+ 0x8C1C0F5E, // 0050 GETMET R7 R7 K94
+ 0x58240064, // 0051 LDCONST R9 K100
0x7C1C0400, // 0052 CALL R7 2
- 0x58200000, // 0053 LDCONST R8 K0
+ 0x58200007, // 0053 LDCONST R8 K7
0x7C140600, // 0054 CALL R5 3
- 0xB8164000, // 0055 GETNGBL R5 K32
- 0x8C140B75, // 0056 GETMET R5 R5 K117
- 0xB81E4000, // 0057 GETNGBL R7 K32
- 0x8C1C0F76, // 0058 GETMET R7 R7 K118
+ 0xB8166000, // 0055 GETNGBL R5 K48
+ 0x8C140B65, // 0056 GETMET R5 R5 K101
+ 0xB81E6000, // 0057 GETNGBL R7 K48
+ 0x8C1C0F66, // 0058 GETMET R7 R7 K102
0x7C1C0200, // 0059 CALL R7 1
0x7C140400, // 005A CALL R5 2
- 0xB8164000, // 005B GETNGBL R5 K32
- 0x8C140B76, // 005C GETMET R5 R5 K118
+ 0xB8166000, // 005B GETNGBL R5 K48
+ 0x8C140B66, // 005C GETMET R5 R5 K102
0x7C140200, // 005D CALL R5 1
- 0x8C140B77, // 005E GETMET R5 R5 K119
- 0x581C0000, // 005F LDCONST R7 K0
- 0x58200000, // 0060 LDCONST R8 K0
+ 0x8C140B67, // 005E GETMET R5 R5 K103
+ 0x581C0007, // 005F LDCONST R7 K7
+ 0x58200007, // 0060 LDCONST R8 K7
0x7C140600, // 0061 CALL R5 3
0x60140013, // 0062 GETGBL R5 G19
0x7C140000, // 0063 CALL R5 0
- 0x90020405, // 0064 SETMBR R0 K2 R5
- 0x8C140178, // 0065 GETMET R5 R0 K120
+ 0x90021805, // 0064 SETMBR R0 K12 R5
+ 0x8C140168, // 0065 GETMET R5 R0 K104
0x5C1C0400, // 0066 MOVE R7 R2
0x7C140400, // 0067 CALL R5 2
0x80000000, // 0068 RET 0
@@ -11926,70 +12053,434 @@ be_local_closure(class_HASPmota_start, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: parse_obj
+********************************************************************/
+be_local_closure(class_HASPmota_parse_obj, /* name */
+ be_nested_proto(
+ 20, /* nstack */
+ 3, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_HASPmota, /* shared constants */
+ be_str_weak(parse_obj),
+ &be_const_str_solidified,
+ ( &(const binstruction[239]) { /* code */
+ 0xA40E8600, // 0000 IMPORT R3 K67
+ 0xA4121E00, // 0001 IMPORT R4 K15
+ 0x60140009, // 0002 GETGBL R5 G9
+ 0x8C180340, // 0003 GETMET R6 R1 K64
+ 0x58200009, // 0004 LDCONST R8 K9
+ 0x7C180400, // 0005 CALL R6 2
+ 0x7C140200, // 0006 CALL R5 1
+ 0x8C180340, // 0007 GETMET R6 R1 K64
+ 0x58200069, // 0008 LDCONST R8 K105
+ 0x7C180400, // 0009 CALL R6 2
+ 0x4C1C0000, // 000A LDNIL R7
+ 0x201C0C07, // 000B NE R7 R6 R7
+ 0x781E0003, // 000C JMPF R7 #0011
+ 0x601C0008, // 000D GETGBL R7 G8
+ 0x5C200C00, // 000E MOVE R8 R6
+ 0x7C1C0200, // 000F CALL R7 1
+ 0x70020000, // 0010 JMP #0012
+ 0x4C1C0000, // 0011 LDNIL R7
+ 0x5C180E00, // 0012 MOVE R6 R7
+ 0x8C1C014A, // 0013 GETMET R7 R0 K74
+ 0x7C1C0200, // 0014 CALL R7 1
+ 0x4C200000, // 0015 LDNIL R8
+ 0x20200A08, // 0016 NE R8 R5 R8
+ 0x78220011, // 0017 JMPF R8 #002A
+ 0x14200B07, // 0018 LT R8 R5 K7
+ 0x74220002, // 0019 JMPT R8 #001D
+ 0x542200FD, // 001A LDINT R8 254
+ 0x24200A08, // 001B GT R8 R5 R8
+ 0x7822000C, // 001C JMPF R8 #002A
+ 0x20200B07, // 001D NE R8 R5 K7
+ 0x74220002, // 001E JMPT R8 #0022
+ 0x4C200000, // 001F LDNIL R8
+ 0x1C200C08, // 0020 EQ R8 R6 R8
+ 0x78220007, // 0021 JMPF R8 #002A
+ 0x60200001, // 0022 GETGBL R8 G1
+ 0x60240018, // 0023 GETGBL R9 G24
+ 0x5828006A, // 0024 LDCONST R10 K106
+ 0x5C2C0A00, // 0025 MOVE R11 R5
+ 0x5C300C00, // 0026 MOVE R12 R6
+ 0x7C240600, // 0027 CALL R9 3
+ 0x7C200200, // 0028 CALL R8 1
+ 0x80001000, // 0029 RET 0
+ 0x8C200F6B, // 002A GETMET R8 R7 K107
+ 0x5C280A00, // 002B MOVE R10 R5
+ 0x7C200400, // 002C CALL R8 2
+ 0x4C240000, // 002D LDNIL R9
+ 0x20240C09, // 002E NE R9 R6 R9
+ 0x7826005F, // 002F JMPF R9 #0090
+ 0x4C240000, // 0030 LDNIL R9
+ 0x20240A09, // 0031 NE R9 R5 R9
+ 0x7826005C, // 0032 JMPF R9 #0090
+ 0x4C240000, // 0033 LDNIL R9
+ 0x1C241009, // 0034 EQ R9 R8 R9
+ 0x78260059, // 0035 JMPF R9 #0090
+ 0x60240009, // 0036 GETGBL R9 G9
+ 0x8C280340, // 0037 GETMET R10 R1 K64
+ 0x5830006C, // 0038 LDCONST R12 K108
+ 0x7C280400, // 0039 CALL R10 2
+ 0x7C240200, // 003A CALL R9 1
+ 0x4C280000, // 003B LDNIL R10
+ 0x4C2C0000, // 003C LDNIL R11
+ 0x4C300000, // 003D LDNIL R12
+ 0x2030120C, // 003E NE R12 R9 R12
+ 0x78320007, // 003F JMPF R12 #0048
+ 0x8C300F6B, // 0040 GETMET R12 R7 K107
+ 0x5C381200, // 0041 MOVE R14 R9
+ 0x7C300400, // 0042 CALL R12 2
+ 0x5C281800, // 0043 MOVE R10 R12
+ 0x4C300000, // 0044 LDNIL R12
+ 0x2030140C, // 0045 NE R12 R10 R12
+ 0x78320000, // 0046 JMPF R12 #0048
+ 0x882C1512, // 0047 GETMBR R11 R10 K18
+ 0x4C300000, // 0048 LDNIL R12
+ 0x1C30160C, // 0049 EQ R12 R11 R12
+ 0x78320002, // 004A JMPF R12 #004E
+ 0x8C300F6D, // 004B GETMET R12 R7 K109
+ 0x7C300200, // 004C CALL R12 1
+ 0x5C2C1800, // 004D MOVE R11 R12
+ 0x8C300935, // 004E GETMET R12 R4 K53
+ 0x5C380000, // 004F MOVE R14 R0
+ 0x003EDC06, // 0050 ADD R15 K110 R6
+ 0x7C300600, // 0051 CALL R12 3
+ 0x4C340000, // 0052 LDNIL R13
+ 0x4C380000, // 0053 LDNIL R14
+ 0x1C38180E, // 0054 EQ R14 R12 R14
+ 0x783A0010, // 0055 JMPF R14 #0067
+ 0x8C380935, // 0056 GETMET R14 R4 K53
+ 0x5C400600, // 0057 MOVE R16 R3
+ 0x5C440C00, // 0058 MOVE R17 R6
+ 0x7C380600, // 0059 CALL R14 3
+ 0x4C3C0000, // 005A LDNIL R15
+ 0x203C1C0F, // 005B NE R15 R14 R15
+ 0x783E0009, // 005C JMPF R15 #0067
+ 0x603C0004, // 005D GETGBL R15 G4
+ 0x5C401C00, // 005E MOVE R16 R14
+ 0x7C3C0200, // 005F CALL R15 1
+ 0x1C3C1F6F, // 0060 EQ R15 R15 K111
+ 0x783E0004, // 0061 JMPF R15 #0067
+ 0x5C3C1C00, // 0062 MOVE R15 R14
+ 0x5C401600, // 0063 MOVE R16 R11
+ 0x7C3C0200, // 0064 CALL R15 1
+ 0x5C341E00, // 0065 MOVE R13 R15
+ 0x88300170, // 0066 GETMBR R12 R0 K112
+ 0x4C380000, // 0067 LDNIL R14
+ 0x1C38180E, // 0068 EQ R14 R12 R14
+ 0x783A000F, // 0069 JMPF R14 #007A
+ 0x8C380971, // 006A GETMET R14 R4 K113
+ 0x5C400C00, // 006B MOVE R16 R6
+ 0x7C380400, // 006C CALL R14 2
+ 0x4C3C0000, // 006D LDNIL R15
+ 0x203C1C0F, // 006E NE R15 R14 R15
+ 0x783E0009, // 006F JMPF R15 #007A
+ 0x603C0004, // 0070 GETGBL R15 G4
+ 0x5C401C00, // 0071 MOVE R16 R14
+ 0x7C3C0200, // 0072 CALL R15 1
+ 0x1C3C1F6F, // 0073 EQ R15 R15 K111
+ 0x783E0004, // 0074 JMPF R15 #007A
+ 0x5C3C1C00, // 0075 MOVE R15 R14
+ 0x5C401600, // 0076 MOVE R16 R11
+ 0x7C3C0200, // 0077 CALL R15 1
+ 0x5C341E00, // 0078 MOVE R13 R15
+ 0x88300170, // 0079 GETMBR R12 R0 K112
+ 0x4C380000, // 007A LDNIL R14
+ 0x1C38180E, // 007B EQ R14 R12 R14
+ 0x783A0006, // 007C JMPF R14 #0084
+ 0x60380001, // 007D GETGBL R14 G1
+ 0x603C0018, // 007E GETGBL R15 G24
+ 0x58400072, // 007F LDCONST R16 K114
+ 0x5C440C00, // 0080 MOVE R17 R6
+ 0x7C3C0400, // 0081 CALL R15 2
+ 0x7C380200, // 0082 CALL R14 1
+ 0x80001C00, // 0083 RET 0
+ 0x5C381800, // 0084 MOVE R14 R12
+ 0x5C3C1600, // 0085 MOVE R15 R11
+ 0x5C400400, // 0086 MOVE R16 R2
+ 0x5C440200, // 0087 MOVE R17 R1
+ 0x5C481A00, // 0088 MOVE R18 R13
+ 0x5C4C1400, // 0089 MOVE R19 R10
+ 0x7C380A00, // 008A CALL R14 5
+ 0x5C201C00, // 008B MOVE R8 R14
+ 0x8C380F73, // 008C GETMET R14 R7 K115
+ 0x5C400A00, // 008D MOVE R16 R5
+ 0x5C441000, // 008E MOVE R17 R8
+ 0x7C380600, // 008F CALL R14 3
+ 0x1C240B07, // 0090 EQ R9 R5 K7
+ 0x7826000F, // 0091 JMPF R9 #00A2
+ 0x4C240000, // 0092 LDNIL R9
+ 0x20240C09, // 0093 NE R9 R6 R9
+ 0x78260006, // 0094 JMPF R9 #009C
+ 0x60240001, // 0095 GETGBL R9 G1
+ 0x60280018, // 0096 GETGBL R10 G24
+ 0x582C0074, // 0097 LDCONST R11 K116
+ 0x5C300C00, // 0098 MOVE R12 R6
+ 0x7C280400, // 0099 CALL R10 2
+ 0x7C240200, // 009A CALL R9 1
+ 0x80001200, // 009B RET 0
+ 0x8C24014A, // 009C GETMET R9 R0 K74
+ 0x7C240200, // 009D CALL R9 1
+ 0x8C24136B, // 009E GETMET R9 R9 K107
+ 0x582C0007, // 009F LDCONST R11 K7
+ 0x7C240400, // 00A0 CALL R9 2
+ 0x5C201200, // 00A1 MOVE R8 R9
+ 0x4C240000, // 00A2 LDNIL R9
+ 0x20241009, // 00A3 NE R9 R8 R9
+ 0x7826000C, // 00A4 JMPF R9 #00B2
+ 0x60240010, // 00A5 GETGBL R9 G16
+ 0x8C28033C, // 00A6 GETMET R10 R1 K60
+ 0x7C280200, // 00A7 CALL R10 1
+ 0x7C240200, // 00A8 CALL R9 1
+ 0xA8020004, // 00A9 EXBLK 0 #00AF
+ 0x5C281200, // 00AA MOVE R10 R9
+ 0x7C280000, // 00AB CALL R10 0
+ 0x942C020A, // 00AC GETIDX R11 R1 R10
+ 0x9020140B, // 00AD SETMBR R8 R10 R11
+ 0x7001FFFA, // 00AE JMP #00AA
+ 0x5824003E, // 00AF LDCONST R9 K62
+ 0xAC240200, // 00B0 CATCH R9 1 0
+ 0xB0080000, // 00B1 RAISE 2 R0 R0
+ 0x4C240000, // 00B2 LDNIL R9
+ 0x20241009, // 00B3 NE R9 R8 R9
+ 0x78260001, // 00B4 JMPF R9 #00B7
+ 0x8C241175, // 00B5 GETMET R9 R8 K117
+ 0x7C240200, // 00B6 CALL R9 1
+ 0x4C240000, // 00B7 LDNIL R9
+ 0x60280008, // 00B8 GETGBL R10 G8
+ 0x8C2C0340, // 00B9 GETMET R11 R1 K64
+ 0x58340076, // 00BA LDCONST R13 K118
+ 0x7C2C0400, // 00BB CALL R11 2
+ 0x7C280200, // 00BC CALL R10 1
+ 0x202C1577, // 00BD NE R11 R10 K119
+ 0x782E0012, // 00BE JMPF R11 #00D2
+ 0xA8020005, // 00BF EXBLK 0 #00C6
+ 0x602C000D, // 00C0 GETGBL R11 G13
+ 0x5C301400, // 00C1 MOVE R12 R10
+ 0x7C2C0200, // 00C2 CALL R11 1
+ 0x5C241600, // 00C3 MOVE R9 R11
+ 0xA8040001, // 00C4 EXBLK 1 1
+ 0x7002000B, // 00C5 JMP #00D2
+ 0xAC2C0002, // 00C6 CATCH R11 0 2
+ 0x70020008, // 00C7 JMP #00D1
+ 0x60340001, // 00C8 GETGBL R13 G1
+ 0x60380018, // 00C9 GETGBL R14 G24
+ 0x583C0078, // 00CA LDCONST R15 K120
+ 0x5C401400, // 00CB MOVE R16 R10
+ 0x5C441600, // 00CC MOVE R17 R11
+ 0x5C481800, // 00CD MOVE R18 R12
+ 0x7C380800, // 00CE CALL R14 4
+ 0x7C340200, // 00CF CALL R13 1
+ 0x70020000, // 00D0 JMP #00D2
+ 0xB0080000, // 00D1 RAISE 2 R0 R0
+ 0x4C2C0000, // 00D2 LDNIL R11
+ 0x202C120B, // 00D3 NE R11 R9 R11
+ 0x782E0018, // 00D4 JMPF R11 #00EE
+ 0xA802000B, // 00D5 EXBLK 0 #00E2
+ 0x5C2C1200, // 00D6 MOVE R11 R9
+ 0x7C2C0000, // 00D7 CALL R11 0
+ 0x60300004, // 00D8 GETGBL R12 G4
+ 0x5C341600, // 00D9 MOVE R13 R11
+ 0x7C300200, // 00DA CALL R12 1
+ 0x1C301979, // 00DB EQ R12 R12 K121
+ 0x78320002, // 00DC JMPF R12 #00E0
+ 0x5C301600, // 00DD MOVE R12 R11
+ 0x5C341000, // 00DE MOVE R13 R8
+ 0x7C300200, // 00DF CALL R12 1
+ 0xA8040001, // 00E0 EXBLK 1 1
+ 0x7002000B, // 00E1 JMP #00EE
+ 0xAC2C0002, // 00E2 CATCH R11 0 2
+ 0x70020008, // 00E3 JMP #00ED
+ 0x60340001, // 00E4 GETGBL R13 G1
+ 0x60380018, // 00E5 GETGBL R14 G24
+ 0x583C007A, // 00E6 LDCONST R15 K122
+ 0x5C401400, // 00E7 MOVE R16 R10
+ 0x5C441600, // 00E8 MOVE R17 R11
+ 0x5C481800, // 00E9 MOVE R18 R12
+ 0x7C380800, // 00EA CALL R14 4
+ 0x7C340200, // 00EB CALL R13 1
+ 0x70020000, // 00EC JMP #00EE
+ 0xB0080000, // 00ED RAISE 2 R0 R0
+ 0x80000000, // 00EE RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: parse
+********************************************************************/
+be_local_closure(class_HASPmota_parse, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 2, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_HASPmota, /* shared constants */
+ be_str_weak(parse),
+ &be_const_str_solidified,
+ ( &(const binstruction[21]) { /* code */
+ 0xA40A2C00, // 0000 IMPORT R2 K22
+ 0x8C0C051C, // 0001 GETMET R3 R2 K28
+ 0x5C140200, // 0002 MOVE R5 R1
+ 0x7C0C0400, // 0003 CALL R3 2
+ 0x60100004, // 0004 GETGBL R4 G4
+ 0x5C140600, // 0005 MOVE R5 R3
+ 0x7C100200, // 0006 CALL R4 1
+ 0x1C10091D, // 0007 EQ R4 R4 K29
+ 0x78120009, // 0008 JMPF R4 #0013
+ 0x8C100122, // 0009 GETMET R4 R0 K34
+ 0x5C180600, // 000A MOVE R6 R3
+ 0x7C100400, // 000B CALL R4 2
+ 0x8C100125, // 000C GETMET R4 R0 K37
+ 0x5C180600, // 000D MOVE R6 R3
+ 0x881C010C, // 000E GETMBR R7 R0 K12
+ 0x88200102, // 000F GETMBR R8 R0 K2
+ 0x941C0E08, // 0010 GETIDX R7 R7 R8
+ 0x7C100600, // 0011 CALL R4 3
+ 0x70020000, // 0012 JMP #0014
+ 0xB006477B, // 0013 RAISE 1 K35 K123
+ 0x80000000, // 0014 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_pages
+********************************************************************/
+be_local_closure(class_HASPmota_get_pages, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_HASPmota, /* shared constants */
+ be_str_weak(get_pages),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x8C040101, // 0000 GETMET R1 R0 K1
+ 0x4C0C0000, // 0001 LDNIL R3
+ 0x7C040400, // 0002 CALL R1 2
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_page_cur
+********************************************************************/
+be_local_closure(class_HASPmota_get_page_cur, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 10, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ &be_ktab_class_HASPmota, /* shared constants */
+ be_str_weak(get_page_cur),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x8804010C, // 0000 GETMBR R1 R0 K12
+ 0x88080102, // 0001 GETMBR R2 R0 K2
+ 0x94040202, // 0002 GETIDX R1 R1 R2
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified class: HASPmota
********************************************************************/
be_local_class(HASPmota,
- 10,
+ 11,
NULL,
- be_nested_map(56,
+ be_nested_map(60,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(pages_list_sorted, -1), be_const_closure(class_HASPmota_pages_list_sorted_closure) },
{ be_const_key_weak(lvh_spangroup, -1), be_const_class(be_class_lvh_spangroup) },
- { be_const_key_weak(lvh_roller, -1), be_const_class(be_class_lvh_roller) },
- { be_const_key_weak(lvh_slider, -1), be_const_class(be_class_lvh_slider) },
- { be_const_key_weak(lvh_line, 14), be_const_class(be_class_lvh_line) },
- { be_const_key_weak(start, -1), be_const_closure(class_HASPmota_start_closure) },
- { be_const_key_weak(get_page_cur, -1), be_const_closure(class_HASPmota_get_page_cur_closure) },
- { be_const_key_weak(lvh_btnmatrix, 43), be_const_class(be_class_lvh_btnmatrix) },
- { be_const_key_weak(dark, -1), be_const_var(0) },
- { be_const_key_weak(lvh_checkbox, -1), be_const_class(be_class_lvh_checkbox) },
- { be_const_key_weak(lvh_chart, -1), be_const_class(be_class_lvh_chart) },
- { be_const_key_weak(lvh_scale_line, 9), be_const_class(be_class_lvh_scale_line) },
- { be_const_key_weak(parse, -1), be_const_closure(class_HASPmota_parse_closure) },
- { be_const_key_weak(lvh_page, 20), be_const_class(be_class_lvh_page) },
- { be_const_key_weak(lvh_msgbox, -1), be_const_class(be_class_lvh_msgbox) },
- { be_const_key_weak(lvh_spinner, -1), be_const_class(be_class_lvh_spinner) },
- { be_const_key_weak(lvh_obj, 23), be_const_class(be_class_lvh_obj) },
- { be_const_key_weak(sort, -1), be_const_static_closure(class_HASPmota_sort_closure) },
- { be_const_key_weak(event_dispatch, 27), be_const_closure(class_HASPmota_event_dispatch_closure) },
- { be_const_key_weak(scr, 16), be_const_var(3) },
- { be_const_key_weak(lvh_img, -1), be_const_class(be_class_lvh_img) },
- { be_const_key_weak(vres, -1), be_const_var(2) },
- { be_const_key_weak(lvh_span, 26), be_const_class(be_class_lvh_span) },
- { be_const_key_weak(init, -1), be_const_closure(class_HASPmota_init_closure) },
- { be_const_key_weak(lvh_fixed, -1), be_const_class(be_class_lvh_fixed) },
- { be_const_key_weak(event_cb, -1), be_const_var(9) },
- { be_const_key_weak(_load, -1), be_const_closure(class_HASPmota__load_closure) },
- { be_const_key_weak(lvh_root, 50), be_const_class(be_class_lvh_root) },
- { be_const_key_weak(fix_lv_version, -1), be_const_static_closure(class_HASPmota_fix_lv_version_closure) },
- { be_const_key_weak(def_templ_name, -1), be_nested_str_weak(pages_X2Ejsonl) },
- { be_const_key_weak(parse_obj, 40), be_const_closure(class_HASPmota_parse_obj_closure) },
- { be_const_key_weak(hres, -1), be_const_var(1) },
- { be_const_key_weak(lvh_scale_section, -1), be_const_class(be_class_lvh_scale_section) },
- { be_const_key_weak(lvh_scale, 36), be_const_class(be_class_lvh_scale) },
- { be_const_key_weak(lvh_pages, 41), be_const_var(5) },
- { be_const_key_weak(do_action, -1), be_const_closure(class_HASPmota_do_action_closure) },
- { be_const_key_weak(lvh_label, -1), be_const_class(be_class_lvh_label) },
- { be_const_key_weak(lvh_scr, -1), be_const_class(be_class_lvh_scr) },
{ be_const_key_weak(lvh_switch, -1), be_const_class(be_class_lvh_switch) },
- { be_const_key_weak(event, -1), be_const_var(8) },
- { be_const_key_weak(re_page_target, -1), be_const_var(7) },
- { be_const_key_weak(parse_page, 45), be_const_closure(class_HASPmota_parse_page_closure) },
- { be_const_key_weak(lvh_arc, 37), be_const_class(be_class_lvh_arc) },
- { be_const_key_weak(lvh_led, 51), be_const_class(be_class_lvh_led) },
- { be_const_key_weak(lvh_page_cur_idx, 33), be_const_var(6) },
- { be_const_key_weak(page_dir_to, -1), be_const_closure(class_HASPmota_page_dir_to_closure) },
- { be_const_key_weak(r16, -1), be_const_var(4) },
- { be_const_key_weak(lvh_bar, -1), be_const_class(be_class_lvh_bar) },
- { be_const_key_weak(lvh_dropdown_list, -1), be_const_class(be_class_lvh_dropdown_list) },
- { be_const_key_weak(lvh_flex, 17), be_const_class(be_class_lvh_flex) },
+ { be_const_key_weak(lvh_scr, -1), be_const_class(be_class_lvh_scr) },
+ { be_const_key_weak(register_event, 55), be_const_closure(class_HASPmota_register_event_closure) },
+ { be_const_key_weak(lvh_line, -1), be_const_class(be_class_lvh_line) },
+ { be_const_key_weak(dark, 0), be_const_var(0) },
+ { be_const_key_weak(_load, -1), be_const_closure(class_HASPmota__load_closure) },
+ { be_const_key_weak(lvh_cpicker, -1), be_const_class(be_class_lvh_cpicker) },
+ { be_const_key_weak(lvh_page_cur_idx, -1), be_const_var(6) },
+ { be_const_key_weak(lvh_page, 54), be_const_class(be_class_lvh_page) },
+ { be_const_key_weak(event_dispatch, -1), be_const_closure(class_HASPmota_event_dispatch_closure) },
+ { be_const_key_weak(scr, 28), be_const_var(3) },
+ { be_const_key_weak(fix_lv_version, 22), be_const_static_closure(class_HASPmota_fix_lv_version_closure) },
+ { be_const_key_weak(get_page_cur_parsing, -1), be_const_closure(class_HASPmota_get_page_cur_parsing_closure) },
{ be_const_key_weak(lvh_btn, -1), be_const_class(be_class_lvh_btn) },
- { be_const_key_weak(register_event, -1), be_const_closure(class_HASPmota_register_event_closure) },
- { be_const_key_weak(lvh_qrcode, -1), be_const_class(be_class_lvh_qrcode) },
- { be_const_key_weak(lvh_cpicker, 8), be_const_class(be_class_lvh_cpicker) },
- { be_const_key_weak(page_show, 6), be_const_closure(class_HASPmota_page_show_closure) },
- { be_const_key_weak(lvh_dropdown, 5), be_const_class(be_class_lvh_dropdown) },
+ { be_const_key_weak(init, -1), be_const_closure(class_HASPmota_init_closure) },
+ { be_const_key_weak(lvh_scale_section, -1), be_const_class(be_class_lvh_scale_section) },
+ { be_const_key_weak(lvh_msgbox, -1), be_const_class(be_class_lvh_msgbox) },
+ { be_const_key_weak(get_page_cur, -1), be_const_closure(class_HASPmota_get_page_cur_closure) },
+ { be_const_key_weak(get_pages, -1), be_const_closure(class_HASPmota_get_pages_closure) },
+ { be_const_key_weak(lvh_chart, -1), be_const_class(be_class_lvh_chart) },
+ { be_const_key_weak(sort, -1), be_const_static_closure(class_HASPmota_sort_closure) },
+ { be_const_key_weak(lvh_fixed, 17), be_const_class(be_class_lvh_fixed) },
+ { be_const_key_weak(r16, -1), be_const_var(4) },
+ { be_const_key_weak(lvh_scale, 19), be_const_class(be_class_lvh_scale) },
+ { be_const_key_weak(parse_obj, -1), be_const_closure(class_HASPmota_parse_obj_closure) },
+ { be_const_key_weak(def_templ_name, -1), be_nested_str_weak(pages_X2Ejsonl) },
+ { be_const_key_weak(lvh_dropdown, 53), be_const_class(be_class_lvh_dropdown) },
+ { be_const_key_weak(start, -1), be_const_closure(class_HASPmota_start_closure) },
+ { be_const_key_weak(lvh_obj, -1), be_const_class(be_class_lvh_obj) },
+ { be_const_key_weak(lvh_root, 41), be_const_class(be_class_lvh_root) },
+ { be_const_key_weak(lvh_arc, -1), be_const_class(be_class_lvh_arc) },
+ { be_const_key_weak(lvh_bar, 44), be_const_class(be_class_lvh_bar) },
+ { be_const_key_weak(lvh_img, -1), be_const_class(be_class_lvh_img) },
+ { be_const_key_weak(_remove_page, -1), be_const_closure(class_HASPmota__remove_page_closure) },
+ { be_const_key_weak(lvh_btnmatrix, 48), be_const_class(be_class_lvh_btnmatrix) },
+ { be_const_key_weak(pages_list_sorted, 45), be_const_closure(class_HASPmota_pages_list_sorted_closure) },
+ { be_const_key_weak(lvh_led, -1), be_const_class(be_class_lvh_led) },
+ { be_const_key_weak(parse_page, 18), be_const_closure(class_HASPmota_parse_page_closure) },
+ { be_const_key_weak(lvh_spinner, 32), be_const_class(be_class_lvh_spinner) },
+ { be_const_key_weak(lvh_span, 23), be_const_class(be_class_lvh_span) },
+ { be_const_key_weak(re_page_target, 40), be_const_var(8) },
+ { be_const_key_weak(page_dir_to, 20), be_const_closure(class_HASPmota_page_dir_to_closure) },
+ { be_const_key_weak(lvh_scale_line, 37), be_const_class(be_class_lvh_scale_line) },
+ { be_const_key_weak(event, -1), be_const_var(9) },
+ { be_const_key_weak(lvh_qrcode, 47), be_const_class(be_class_lvh_qrcode) },
+ { be_const_key_weak(lvh_pages, 31), be_const_var(5) },
+ { be_const_key_weak(lvh_dropdown_list, 34), be_const_class(be_class_lvh_dropdown_list) },
+ { be_const_key_weak(do_action, 29), be_const_closure(class_HASPmota_do_action_closure) },
+ { be_const_key_weak(vres, 26), be_const_var(2) },
+ { be_const_key_weak(lvh_roller, 25), be_const_class(be_class_lvh_roller) },
+ { be_const_key_weak(lvh_slider, -1), be_const_class(be_class_lvh_slider) },
+ { be_const_key_weak(parse, -1), be_const_closure(class_HASPmota_parse_closure) },
+ { be_const_key_weak(hres, -1), be_const_var(1) },
+ { be_const_key_weak(lvh_flex, -1), be_const_class(be_class_lvh_flex) },
+ { be_const_key_weak(lvh_page_cur_idx_parsing, -1), be_const_var(7) },
+ { be_const_key_weak(lvh_label, -1), be_const_class(be_class_lvh_label) },
+ { be_const_key_weak(event_cb, 7), be_const_var(10) },
+ { be_const_key_weak(page_show, 1), be_const_closure(class_HASPmota_page_show_closure) },
+ { be_const_key_weak(lvh_checkbox, -1), be_const_class(be_class_lvh_checkbox) },
})),
be_str_weak(HASPmota)
);
diff --git a/lib/libesp32_lvgl/lvgl/library.json b/lib/libesp32_lvgl/lvgl/library.json
index 370c00a6d..ccdc959dc 100644
--- a/lib/libesp32_lvgl/lvgl/library.json
+++ b/lib/libesp32_lvgl/lvgl/library.json
@@ -1,6 +1,6 @@
{
"name": "lvgl",
- "version": "9.2.0",
+ "version": "9.2.2",
"keywords": "graphics, gui, embedded, tft, lvgl",
"description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.",
"repository": {
diff --git a/lib/libesp32_lvgl/lvgl/library.properties b/lib/libesp32_lvgl/lvgl/library.properties
index 7dbe2228e..79a170e8f 100644
--- a/lib/libesp32_lvgl/lvgl/library.properties
+++ b/lib/libesp32_lvgl/lvgl/library.properties
@@ -1,5 +1,5 @@
name=lvgl
-version=9.2.0
+version=9.2.2
author=kisvegabor
maintainer=kisvegabor,embeddedt,pete-pjb
sentence=Full-featured Graphics Library for Embedded Systems
diff --git a/lib/libesp32_lvgl/lvgl/lv_conf_template.h b/lib/libesp32_lvgl/lvgl/lv_conf_template.h
index ab886a96b..99e4aee66 100644
--- a/lib/libesp32_lvgl/lvgl/lv_conf_template.h
+++ b/lib/libesp32_lvgl/lvgl/lv_conf_template.h
@@ -1,6 +1,6 @@
/**
* @file lv_conf.h
- * Configuration file for v9.2.0
+ * Configuration file for v9.2.2
*/
/*
@@ -95,6 +95,14 @@
#if LV_USE_OS == LV_OS_CUSTOM
#define LV_OS_CUSTOM_INCLUDE
#endif
+#if LV_USE_OS == LV_OS_FREERTOS
+ /*
+ * Unblocking an RTOS task with a direct notification is 45% faster and uses less RAM
+ * than unblocking a task using an intermediary object such as a binary semaphore.
+ * RTOS task notifications can only be used when there is only one task that can be the recipient of the event.
+ */
+ #define LV_USE_FREERTOS_TASK_NOTIFY 1
+#endif
/*========================
* RENDERING CONFIGURATION
@@ -205,10 +213,16 @@
#endif
/* Use NXP's PXP on iMX RTxxx platforms. */
-#define LV_USE_DRAW_PXP 0
+#define LV_USE_PXP 0
-#if LV_USE_DRAW_PXP
- #if LV_USE_OS
+#if LV_USE_PXP
+ /* Use PXP for drawing.*/
+ #define LV_USE_DRAW_PXP 1
+
+ /* Use PXP to rotate display.*/
+ #define LV_USE_ROTATE_PXP 0
+
+ #if LV_USE_DRAW_PXP && LV_USE_OS
/* Use additional draw thread for PXP processing.*/
#define LV_USE_PXP_DRAW_THREAD 1
#endif
diff --git a/lib/libesp32_lvgl/lvgl/lv_version.h b/lib/libesp32_lvgl/lvgl/lv_version.h
index 7e6356a66..5767c66c5 100644
--- a/lib/libesp32_lvgl/lvgl/lv_version.h
+++ b/lib/libesp32_lvgl/lvgl/lv_version.h
@@ -8,7 +8,7 @@
#define LVGL_VERSION_MAJOR 9
#define LVGL_VERSION_MINOR 2
-#define LVGL_VERSION_PATCH 0
+#define LVGL_VERSION_PATCH 2
#define LVGL_VERSION_INFO ""
#endif /* LVGL_VERSION_H */
diff --git a/lib/libesp32_lvgl/lvgl/src/core/lv_obj.c b/lib/libesp32_lvgl/lvgl/src/core/lv_obj.c
index 9b9f56d3f..c58e95502 100644
--- a/lib/libesp32_lvgl/lvgl/src/core/lv_obj.c
+++ b/lib/libesp32_lvgl/lvgl/src/core/lv_obj.c
@@ -306,7 +306,7 @@ void lv_obj_add_state(lv_obj_t * obj, lv_state_t state)
lv_state_t new_state = obj->state | state;
if(obj->state != new_state) {
- if(new_state & LV_STATE_DISABLED) {
+ if(new_state & ~obj->state & LV_STATE_DISABLED) {
lv_indev_reset(NULL, obj);
}
diff --git a/lib/libesp32_lvgl/lvgl/src/core/lv_obj_pos.c b/lib/libesp32_lvgl/lvgl/src/core/lv_obj_pos.c
index b5fd34d76..0f10d7dcc 100644
--- a/lib/libesp32_lvgl/lvgl/src/core/lv_obj_pos.c
+++ b/lib/libesp32_lvgl/lvgl/src/core/lv_obj_pos.c
@@ -1046,7 +1046,7 @@ static int32_t calc_content_width(lv_obj_t * obj)
default:
/* Consider other cases only if x=0 and use the width of the object.
* With x!=0 circular dependency could occur. */
- if(lv_obj_get_style_y(child, 0) == 0) {
+ if(lv_obj_get_style_x(child, 0) == 0) {
child_res_tmp = lv_area_get_width(&child->coords) + space_left;
child_res_tmp += lv_obj_get_style_margin_right(child, LV_PART_MAIN);
}
diff --git a/lib/libesp32_lvgl/lvgl/src/core/lv_obj_property.c b/lib/libesp32_lvgl/lvgl/src/core/lv_obj_property.c
index f15ee1186..405b00674 100644
--- a/lib/libesp32_lvgl/lvgl/src/core/lv_obj_property.c
+++ b/lib/libesp32_lvgl/lvgl/src/core/lv_obj_property.c
@@ -44,7 +44,7 @@ typedef lv_result_t (*lv_property_getter_t)(const lv_obj_t *, lv_prop_id_t, lv_p
**********************/
static lv_result_t obj_property(lv_obj_t * obj, lv_prop_id_t id, lv_property_t * value, bool set);
-static int32_t property_name_compare(const void * ref, const void * element);
+static int property_name_compare(const void * ref, const void * element);
/**********************
* STATIC VARIABLES
@@ -121,7 +121,7 @@ lv_property_t lv_obj_get_style_property(lv_obj_t * obj, lv_prop_id_t id, uint32_
uint32_t index = LV_PROPERTY_ID_INDEX(id);
if(index == LV_PROPERTY_ID_INVALID || index >= LV_PROPERTY_ID_START) {
- LV_LOG_WARN("invalid style property id %d", id);
+ LV_LOG_WARN("invalid style property id 0x%" LV_PRIx32, id);
value.id = LV_PROPERTY_ID_INVALID;
value.num = 0;
return value;
@@ -232,7 +232,7 @@ static lv_result_t obj_property(lv_obj_t * obj, lv_prop_id_t id, lv_property_t *
/*id matched but we got null pointer to functions*/
if(set ? prop->setter == NULL : prop->getter == NULL) {
- LV_LOG_WARN("NULL %s provided, id: %d", set ? "setter" : "getter", id);
+ LV_LOG_WARN("NULL %s provided, id: 0x%" LV_PRIx32, set ? "setter" : "getter", id);
return LV_RESULT_INVALID;
}
@@ -278,7 +278,7 @@ static lv_result_t obj_property(lv_obj_t * obj, lv_prop_id_t id, lv_property_t *
break;
}
default: {
- LV_LOG_WARN("Unknown property id: 0x%08x", prop->id);
+ LV_LOG_WARN("Unknown property id: 0x%08" LV_PRIx32, prop->id);
return LV_RESULT_INVALID;
}
}
@@ -289,7 +289,7 @@ static lv_result_t obj_property(lv_obj_t * obj, lv_prop_id_t id, lv_property_t *
/*If no setter found, try base class then*/
}
- LV_LOG_WARN("Unknown property id: 0x%08x", id);
+ LV_LOG_WARN("Unknown property id: 0x%08" LV_PRIx32, id);
return LV_RESULT_INVALID;
}
diff --git a/lib/libesp32_lvgl/lvgl/src/core/lv_obj_style.c b/lib/libesp32_lvgl/lvgl/src/core/lv_obj_style.c
index 26bc39729..06e3ffec3 100644
--- a/lib/libesp32_lvgl/lvgl/src/core/lv_obj_style.c
+++ b/lib/libesp32_lvgl/lvgl/src/core/lv_obj_style.c
@@ -353,6 +353,9 @@ bool lv_obj_has_style_prop(const lv_obj_t * obj, lv_style_selector_t selector, l
void lv_obj_set_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_style_value_t value,
lv_style_selector_t selector)
{
+ /*Stop running transitions wit this property */
+ trans_delete(obj, lv_obj_style_get_selector_part(selector), prop, NULL);
+
lv_style_t * style = get_local_style(obj, selector);
if(selector == LV_PART_MAIN && lv_style_prop_has_flag(prop, LV_STYLE_PROP_FLAG_TRANSFORM)) {
lv_obj_invalidate(obj);
diff --git a/lib/libesp32_lvgl/lvgl/src/core/lv_refr.c b/lib/libesp32_lvgl/lvgl/src/core/lv_refr.c
index 13a2608e6..e91fc0059 100644
--- a/lib/libesp32_lvgl/lvgl/src/core/lv_refr.c
+++ b/lib/libesp32_lvgl/lvgl/src/core/lv_refr.c
@@ -355,7 +355,7 @@ void lv_display_refr_timer(lv_timer_t * tmr)
/* Ensure the timer does not run again automatically.
* This is done before refreshing in case refreshing invalidates something else.
* However if the performance monitor is enabled keep the timer running to count the FPS.*/
-#if LV_USE_PERF_MONITOR
+#if !LV_USE_PERF_MONITOR
lv_timer_pause(tmr);
#endif
}
diff --git a/lib/libesp32_lvgl/lvgl/src/display/lv_display_private.h b/lib/libesp32_lvgl/lvgl/src/display/lv_display_private.h
index bcdc95c46..7dc9f189f 100644
--- a/lib/libesp32_lvgl/lvgl/src/display/lv_display_private.h
+++ b/lib/libesp32_lvgl/lvgl/src/display/lv_display_private.h
@@ -141,8 +141,7 @@ struct lv_display_t {
lv_event_list_t event_list;
- uint32_t sw_rotate : 1; /**< 1: use software rotation (slower)*/
- uint32_t rotation : 2; /**< Element of lv_display_rotation_t*/
+ uint32_t rotation : 3; /**< Element of lv_display_rotation_t*/
lv_theme_t * theme; /**< The theme assigned to the screen*/
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/lv_draw.c b/lib/libesp32_lvgl/lvgl/src/draw/lv_draw.c
index 8de27efad..dbaec7028 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/lv_draw.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/lv_draw.c
@@ -179,8 +179,7 @@ void lv_draw_dispatch(void)
while(disp) {
lv_layer_t * layer = disp->layer_head;
while(layer) {
- /* If there are no tasks in the layer, skip it */
- if(layer->draw_task_head && lv_draw_dispatch_layer(disp, layer))
+ if(lv_draw_dispatch_layer(disp, layer))
task_dispatched = true;
layer = layer->next;
}
@@ -311,6 +310,41 @@ uint32_t lv_draw_get_unit_count(void)
lv_draw_task_t * lv_draw_get_next_available_task(lv_layer_t * layer, lv_draw_task_t * t_prev, uint8_t draw_unit_id)
{
LV_PROFILER_BEGIN;
+
+ /* If there is only 1 draw unit the task can be consumed linearly as
+ * they are added in the correct order. However, it can happen that
+ * there is a `LV_DRAW_TASK_TYPE_LAYER` which can be blended only when
+ * all its tasks are ready. As other areas might be on top of that
+ * layer-to-blend don't skip it. Instead stop there, so that the
+ * draw tasks of that layer can be consumed and can be finished.
+ * After that this layer-to-blenf will have `LV_DRAW_TASK_STATE_QUEUED`
+ * so it can be blended normally.*/
+ if(_draw_info.unit_cnt <= 1) {
+ lv_draw_task_t * t = layer->draw_task_head;
+ while(t) {
+ /*Mark unsupported draw tasks as ready as no one else will consume them*/
+ if(t->state == LV_DRAW_TASK_STATE_QUEUED &&
+ t->preferred_draw_unit_id != LV_DRAW_UNIT_NONE &&
+ t->preferred_draw_unit_id != draw_unit_id) {
+ t->state = LV_DRAW_TASK_STATE_READY;
+ }
+ /*Not queued yet, leave this layer while the first task will be queued*/
+ else if(t->state != LV_DRAW_TASK_STATE_QUEUED) {
+ t = NULL;
+ break;
+ }
+ /*It's a supported and queued task, process it*/
+ else {
+ break;
+ }
+ t = t->next;
+ }
+ LV_PROFILER_END;
+ return t;
+ }
+
+ /*Handle the case of multiply draw units*/
+
/*If the first task is screen sized, there cannot be independent areas*/
if(layer->draw_task_head) {
int32_t hor_res = lv_display_get_horizontal_resolution(lv_refr_get_disp_refreshing());
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/lv_draw_buf.c b/lib/libesp32_lvgl/lvgl/src/draw/lv_draw_buf.c
index daebe9543..a6dc29bb1 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/lv_draw_buf.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/lv_draw_buf.c
@@ -83,6 +83,16 @@ lv_draw_buf_handlers_t * lv_draw_buf_get_handlers(void)
return &default_handlers;
}
+lv_draw_buf_handlers_t * lv_draw_buf_get_font_handlers(void)
+{
+ return &font_draw_buf_handlers;
+}
+
+lv_draw_buf_handlers_t * lv_draw_buf_get_image_handlers(void)
+{
+ return &image_cache_draw_buf_handlers;
+}
+
uint32_t lv_draw_buf_width_to_stride(uint32_t w, lv_color_format_t color_format)
{
return lv_draw_buf_width_to_stride_ex(&default_handlers, w, color_format);
@@ -536,7 +546,7 @@ void lv_draw_buf_set_palette(lv_draw_buf_t * draw_buf, uint8_t index, lv_color32
palette[index] = color;
}
-bool lv_draw_buf_has_flag(lv_draw_buf_t * draw_buf, lv_image_flags_t flag)
+bool lv_draw_buf_has_flag(const lv_draw_buf_t * draw_buf, lv_image_flags_t flag)
{
return draw_buf->header.flags & flag;
}
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/lv_draw_buf.h b/lib/libesp32_lvgl/lvgl/src/draw/lv_draw_buf.h
index 9cc6526e5..22b09de0a 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/lv_draw_buf.h
+++ b/lib/libesp32_lvgl/lvgl/src/draw/lv_draw_buf.h
@@ -67,7 +67,7 @@ LV_EXPORT_CONST_INT(LV_STRIDE_AUTO);
#define LV_DRAW_BUF_INIT_STATIC(name) \
do { \
lv_image_header_t * header = &name.header; \
- lv_draw_buf_init(&name, header->w, header->h, header->cf, header->stride, buf_##name, sizeof(buf_##name)); \
+ lv_draw_buf_init(&name, header->w, header->h, (lv_color_format_t)header->cf, header->stride, buf_##name, sizeof(buf_##name)); \
lv_draw_buf_set_flag(&name, LV_IMAGE_FLAGS_MODIFIABLE); \
} while(0)
@@ -129,6 +129,9 @@ void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t * handlers,
* @return pointer to the struct of handlers
*/
lv_draw_buf_handlers_t * lv_draw_buf_get_handlers(void);
+lv_draw_buf_handlers_t * lv_draw_buf_get_font_handlers(void);
+lv_draw_buf_handlers_t * lv_draw_buf_get_image_handlers(void);
+
/**
* Align the address of a buffer. The buffer needs to be large enough for the real data after alignment
@@ -304,7 +307,7 @@ lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t * src, uint32_t stride);
*/
lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t * draw_buf);
-bool lv_draw_buf_has_flag(lv_draw_buf_t * draw_buf, lv_image_flags_t flag);
+bool lv_draw_buf_has_flag(const lv_draw_buf_t * draw_buf, lv_image_flags_t flag);
void lv_draw_buf_set_flag(lv_draw_buf_t * draw_buf, lv_image_flags_t flag);
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_buf_pxp.c b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_buf_pxp.c
index e83da1ca3..9819cfc64 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_buf_pxp.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_buf_pxp.c
@@ -15,6 +15,7 @@
#include "lv_draw_pxp.h"
+#if LV_USE_PXP
#if LV_USE_DRAW_PXP
#include "../../lv_draw_buf_private.h"
#include "lv_pxp_cfg.h"
@@ -51,8 +52,12 @@ static void _invalidate_cache(const lv_draw_buf_t * draw_buf, const lv_area_t *
void lv_draw_buf_pxp_init_handlers(void)
{
lv_draw_buf_handlers_t * handlers = lv_draw_buf_get_handlers();
+ lv_draw_buf_handlers_t * font_handlers = lv_draw_buf_get_font_handlers();
+ lv_draw_buf_handlers_t * image_handlers = lv_draw_buf_get_image_handlers();
handlers->invalidate_cache_cb = _invalidate_cache;
+ font_handlers->invalidate_cache_cb = _invalidate_cache;
+ image_handlers->invalidate_cache_cb = _invalidate_cache;
}
/**********************
@@ -66,7 +71,7 @@ static void _invalidate_cache(const lv_draw_buf_t * draw_buf, const lv_area_t *
lv_color_format_t cf = header->cf;
if(area->y1 == 0) {
- uint16_t size = stride * lv_area_get_height(area);
+ uint32_t size = stride * lv_area_get_height(area);
/* Invalidate full buffer. */
DEMO_CleanInvalidateCacheByAddr((void *)draw_buf->data, size);
@@ -109,3 +114,4 @@ static void _invalidate_cache(const lv_draw_buf_t * draw_buf, const lv_area_t *
}
#endif /*LV_USE_DRAW_PXP*/
+#endif /*LV_USE_PXP*/
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp.c b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp.c
index e606e6798..636fe4379 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp.c
@@ -15,7 +15,8 @@
#include "lv_draw_pxp.h"
-#if LV_USE_DRAW_PXP
+#if LV_USE_PXP
+#if LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP
#include "lv_pxp_cfg.h"
#include "lv_pxp_utils.h"
@@ -82,6 +83,9 @@ static void _pxp_execute_drawing(lv_draw_pxp_unit_t * u);
void lv_draw_pxp_init(void)
{
+ lv_pxp_init();
+
+#if LV_USE_DRAW_PXP
lv_draw_buf_pxp_init_handlers();
lv_draw_pxp_unit_t * draw_pxp_unit = lv_draw_create_unit(sizeof(lv_draw_pxp_unit_t));
@@ -89,11 +93,10 @@ void lv_draw_pxp_init(void)
draw_pxp_unit->base_unit.dispatch_cb = _pxp_dispatch;
draw_pxp_unit->base_unit.delete_cb = _pxp_delete;
- lv_pxp_init();
-
#if LV_USE_PXP_DRAW_THREAD
lv_thread_init(&draw_pxp_unit->thread, LV_THREAD_PRIO_HIGH, _pxp_render_thread_cb, 2 * 1024, draw_pxp_unit);
#endif
+#endif /*LV_USE_DRAW_PXP*/
}
void lv_draw_pxp_deinit(void)
@@ -107,19 +110,26 @@ void lv_draw_pxp_rotate(const void * src_buf, void * dest_buf, int32_t src_width
{
lv_pxp_reset();
- /* convert rotation angle */
+ /* Convert rotation angle
+ * To be in sync with CPU, the received angle is counterclockwise
+ * and the PXP constants are for clockwise rotation
+ *
+ * counterclockwise clockwise
+ * LV_DISPLAY_ROTATION_90 -> kPXP_Rotate270
+ * LV_DISPLAY_ROTATION_270 -> kPXP_Rotate90
+ */
pxp_rotate_degree_t pxp_rotation;
switch(rotation) {
case LV_DISPLAY_ROTATION_0:
pxp_rotation = kPXP_Rotate0;
break;
- case LV_DISPLAY_ROTATION_90:
+ case LV_DISPLAY_ROTATION_270:
pxp_rotation = kPXP_Rotate90;
break;
case LV_DISPLAY_ROTATION_180:
pxp_rotation = kPXP_Rotate180;
break;
- case LV_DISPLAY_ROTATION_270:
+ case LV_DISPLAY_ROTATION_90:
pxp_rotation = kPXP_Rotate270;
break;
default:
@@ -159,7 +169,7 @@ void lv_draw_pxp_rotate(const void * src_buf, void * dest_buf, int32_t src_width
/**********************
* STATIC FUNCTIONS
**********************/
-
+#if LV_USE_DRAW_PXP
static inline bool _pxp_src_cf_supported(lv_color_format_t cf)
{
bool is_cf_supported = false;
@@ -321,8 +331,7 @@ static int32_t _pxp_dispatch(lv_draw_unit_t * draw_unit, lv_layer_t * layer)
if(t == NULL || t->preferred_draw_unit_id != DRAW_UNIT_ID_PXP)
return LV_DRAW_UNIT_IDLE;
- void * buf = lv_draw_layer_alloc_buf(layer);
- if(buf == NULL)
+ if(lv_draw_layer_alloc_buf(layer) == NULL)
return LV_DRAW_UNIT_IDLE;
t->state = LV_DRAW_TASK_STATE_IN_PROGRESS;
@@ -484,5 +493,6 @@ static void _pxp_render_thread_cb(void * ptr)
LV_LOG_INFO("Exit PXP draw thread.");
}
#endif
-
#endif /*LV_USE_DRAW_PXP*/
+#endif /*LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP*/
+#endif /*LV_USE_PXP*/
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp.h b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp.h
index d5e98d791..d34ad3f84 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp.h
+++ b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp.h
@@ -22,8 +22,10 @@ extern "C" {
#include "../../../lv_conf_internal.h"
-#if LV_USE_DRAW_PXP
-#include "../../sw/lv_draw_sw.h"
+#if LV_USE_PXP
+#if LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP
+#include "../../sw/lv_draw_sw_private.h"
+#include "../../../misc/lv_area_private.h"
/*********************
* DEFINES
@@ -39,8 +41,6 @@ typedef lv_draw_sw_unit_t lv_draw_pxp_unit_t;
* GLOBAL PROTOTYPES
**********************/
-void lv_draw_buf_pxp_init_handlers(void);
-
void lv_draw_pxp_init(void);
void lv_draw_pxp_deinit(void);
@@ -49,6 +49,9 @@ void lv_draw_pxp_rotate(const void * src_buf, void * dest_buf, int32_t src_width
int32_t src_stride, int32_t dest_stride, lv_display_rotation_t rotation,
lv_color_format_t cf);
+#if LV_USE_DRAW_PXP
+void lv_draw_buf_pxp_init_handlers(void);
+
void lv_draw_pxp_fill(lv_draw_unit_t * draw_unit, const lv_draw_fill_dsc_t * dsc,
const lv_area_t * coords);
@@ -62,6 +65,8 @@ void lv_draw_pxp_layer(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * d
* MACROS
**********************/
#endif /*LV_USE_DRAW_PXP*/
+#endif /*LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP*/
+#endif /*LV_USE_PXP*/
#ifdef __cplusplus
} /*extern "C"*/
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp_fill.c b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp_fill.c
index c75de3480..33b80473c 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp_fill.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp_fill.c
@@ -15,6 +15,7 @@
#include "lv_draw_pxp.h"
+#if LV_USE_PXP
#if LV_USE_DRAW_PXP
#include "lv_pxp_cfg.h"
#include "lv_pxp_utils.h"
@@ -145,3 +146,4 @@ static void _pxp_fill(uint8_t * dest_buf, const lv_area_t * dest_area, int32_t d
}
#endif /*LV_USE_DRAW_PXP*/
+#endif /*LV_USE_PXP*/
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp_img.c b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp_img.c
index 08c0a8ad6..79f3790e9 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp_img.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp_img.c
@@ -15,6 +15,7 @@
#include "lv_draw_pxp.h"
+#if LV_USE_PXP
#if LV_USE_DRAW_PXP
#include "lv_pxp_cfg.h"
#include "lv_pxp_utils.h"
@@ -363,3 +364,4 @@ static void _pxp_blit(uint8_t * dest_buf, const lv_area_t * dest_area, int32_t d
}
#endif /*LV_USE_DRAW_PXP*/
+#endif /*LV_USE_PXP*/
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp_layer.c b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp_layer.c
index 4ee33010d..34cb285b7 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp_layer.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_draw_pxp_layer.c
@@ -15,6 +15,7 @@
#include "lv_draw_pxp.h"
+#if LV_USE_PXP
#if LV_USE_DRAW_PXP
#include "../../../stdlib/lv_string.h"
@@ -154,3 +155,4 @@ void lv_draw_pxp_layer(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * d
}
#endif /*LV_USE_DRAW_PXP*/
+#endif /*LV_USE_PXP*/
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_cfg.c b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_cfg.c
index f1d796293..675c1d030 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_cfg.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_cfg.c
@@ -15,7 +15,8 @@
#include "lv_pxp_cfg.h"
-#if LV_USE_DRAW_PXP
+#if LV_USE_PXP
+#if LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP
#include "lv_pxp_osa.h"
/*********************
@@ -88,4 +89,5 @@ void lv_pxp_wait(void)
* STATIC FUNCTIONS
**********************/
-#endif /*LV_USE_DRAW_PXP*/
+#endif /*LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP*/
+#endif /*LV_USE_PXP*/
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_cfg.h b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_cfg.h
index b487e7ff9..67d135857 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_cfg.h
+++ b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_cfg.h
@@ -22,7 +22,8 @@ extern "C" {
#include "../../../lv_conf_internal.h"
-#if LV_USE_DRAW_PXP
+#if LV_USE_PXP
+#if LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP
#include "fsl_cache.h"
#include "fsl_pxp.h"
@@ -93,7 +94,8 @@ void lv_pxp_wait(void);
* MACROS
**********************/
-#endif /*LV_USE_DRAW_PXP*/
+#endif /*LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP*/
+#endif /*LV_USE_PXP*/
#ifdef __cplusplus
} /*extern "C"*/
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_osa.c b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_osa.c
index b573b212b..43dd8155b 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_osa.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_osa.c
@@ -15,7 +15,8 @@
#include "lv_pxp_osa.h"
-#if LV_USE_DRAW_PXP
+#if LV_USE_PXP
+#if LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP
#include "lv_pxp_utils.h"
#include "../../../misc/lv_log.h"
#include "../../../osal/lv_os.h"
@@ -183,4 +184,5 @@ static void _pxp_wait(void)
#endif
}
-#endif /*LV_USE_DRAW_PXP*/
+#endif /*LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP*/
+#endif /*LV_USE_PXP*/
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_osa.h b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_osa.h
index 371429049..5e3d6669d 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_osa.h
+++ b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_osa.h
@@ -22,7 +22,8 @@ extern "C" {
#include "../../../lv_conf_internal.h"
-#if LV_USE_DRAW_PXP
+#if LV_USE_PXP
+#if LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP
#include "lv_pxp_cfg.h"
/*********************
@@ -51,7 +52,8 @@ pxp_cfg_t * pxp_get_default_cfg(void);
* MACROS
**********************/
-#endif /*LV_USE_DRAW_PXP*/
+#endif /*LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP*/
+#endif /*LV_USE_PXP*/
#ifdef __cplusplus
} /*extern "C"*/
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_utils.c b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_utils.c
index 3940a68b5..26acf6ca9 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_utils.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_utils.c
@@ -15,7 +15,8 @@
#include "lv_pxp_utils.h"
-#if LV_USE_DRAW_PXP
+#if LV_USE_PXP
+#if LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP
/*********************
* DEFINES
@@ -89,6 +90,7 @@ pxp_as_pixel_format_t pxp_get_as_px_format(lv_color_format_t cf)
return as_px_format;
}
+#if LV_USE_DRAW_PXP
pxp_ps_pixel_format_t pxp_get_ps_px_format(lv_color_format_t cf)
{
pxp_ps_pixel_format_t ps_px_format = kPXP_PsPixelFormatRGB565;
@@ -143,3 +145,5 @@ bool pxp_buf_aligned(const void * buf, uint32_t stride)
**********************/
#endif /*LV_USE_DRAW_PXP*/
+#endif /*LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP*/
+#endif /*LV_USE_PXP*/
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_utils.h b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_utils.h
index a1f0a16c4..c9ba7bafd 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_utils.h
+++ b/lib/libesp32_lvgl/lvgl/src/draw/nxp/pxp/lv_pxp_utils.h
@@ -21,7 +21,8 @@ extern "C" {
*********************/
#include "../../../lv_conf_internal.h"
-#if LV_USE_DRAW_PXP
+#if LV_USE_PXP
+#if LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP
#include "fsl_pxp.h"
#include "../../../misc/lv_color.h"
@@ -59,6 +60,7 @@ pxp_output_pixel_format_t pxp_get_out_px_format(lv_color_format_t cf);
pxp_as_pixel_format_t pxp_get_as_px_format(lv_color_format_t cf);
+#if LV_USE_DRAW_PXP
pxp_ps_pixel_format_t pxp_get_ps_px_format(lv_color_format_t cf);
bool pxp_buf_aligned(const void * buf, uint32_t stride);
@@ -72,6 +74,8 @@ bool pxp_buf_aligned(const void * buf, uint32_t stride);
**********************/
#endif /*LV_USE_DRAW_PXP*/
+#endif /*LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP*/
+#endif /*LV_USE_PXP*/
#ifdef __cplusplus
} /*extern "C"*/
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/nxp/vglite/lv_draw_buf_vglite.c b/lib/libesp32_lvgl/lvgl/src/draw/nxp/vglite/lv_draw_buf_vglite.c
index ae9b59a5e..85403956f 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/nxp/vglite/lv_draw_buf_vglite.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/nxp/vglite/lv_draw_buf_vglite.c
@@ -35,6 +35,7 @@
**********************/
static void _invalidate_cache(const lv_draw_buf_t * draw_buf, const lv_area_t * area);
+static uint32_t _width_to_stride(uint32_t w, lv_color_format_t cf);
/**********************
* STATIC VARIABLES
@@ -51,8 +52,17 @@ static void _invalidate_cache(const lv_draw_buf_t * draw_buf, const lv_area_t *
void lv_draw_buf_vglite_init_handlers(void)
{
lv_draw_buf_handlers_t * handlers = lv_draw_buf_get_handlers();
+ lv_draw_buf_handlers_t * font_handlers = lv_draw_buf_get_font_handlers();
+ lv_draw_buf_handlers_t * image_handlers = lv_draw_buf_get_image_handlers();
handlers->invalidate_cache_cb = _invalidate_cache;
+ font_handlers->invalidate_cache_cb = _invalidate_cache;
+ image_handlers->invalidate_cache_cb = _invalidate_cache;
+
+ handlers->width_to_stride_cb = _width_to_stride;
+ font_handlers->width_to_stride_cb = _width_to_stride;
+ image_handlers->width_to_stride_cb = _width_to_stride;
+
}
/**********************
@@ -66,7 +76,7 @@ static void _invalidate_cache(const lv_draw_buf_t * draw_buf, const lv_area_t *
lv_color_format_t cf = header->cf;
if(area->y1 == 0) {
- uint16_t size = stride * lv_area_get_height(area);
+ uint32_t size = stride * lv_area_get_height(area);
/* Invalidate full buffer. */
DEMO_CleanInvalidateCacheByAddr((void *)draw_buf->data, size);
@@ -108,4 +118,14 @@ static void _invalidate_cache(const lv_draw_buf_t * draw_buf, const lv_area_t *
}
}
+static uint32_t _width_to_stride(uint32_t w, lv_color_format_t cf)
+{
+ uint8_t bits_per_pixel = lv_color_format_get_bpp(cf);
+ uint32_t width_bits = (w * bits_per_pixel + 7) & ~7;
+ uint32_t width_bytes = width_bits / 8;
+ uint8_t align_bytes = vglite_get_stride_alignment(cf);
+
+ return (width_bytes + align_bytes - 1) & ~(align_bytes - 1);
+}
+
#endif /*LV_USE_DRAW_VGLITE*/
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/nxp/vglite/lv_draw_vglite.c b/lib/libesp32_lvgl/lvgl/src/draw/nxp/vglite/lv_draw_vglite.c
index bf9dce96e..c6fc016f4 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/nxp/vglite/lv_draw_vglite.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/nxp/vglite/lv_draw_vglite.c
@@ -291,16 +291,14 @@ static int32_t _vglite_dispatch(lv_draw_unit_t * draw_unit, lv_layer_t * layer)
if(t == NULL)
return LV_DRAW_UNIT_IDLE;
- if(lv_draw_get_unit_count() > 1) {
- /* Let the SW unit to draw this task. */
- if(t->preferred_draw_unit_id != DRAW_UNIT_ID_VGLITE)
+ if(t->preferred_draw_unit_id != DRAW_UNIT_ID_VGLITE) {
+ /* Let the preferred known unit to draw this task. */
+ if(t->preferred_draw_unit_id != LV_DRAW_UNIT_NONE) {
return LV_DRAW_UNIT_IDLE;
- }
- else {
- /* Fake unsupported tasks as ready. */
- if(t->preferred_draw_unit_id != DRAW_UNIT_ID_VGLITE) {
+ }
+ else {
+ /* Fake unsupported tasks as ready. */
t->state = LV_DRAW_TASK_STATE_READY;
-
/* Request a new dispatching as it can get a new task. */
lv_draw_dispatch_request();
@@ -308,8 +306,7 @@ static int32_t _vglite_dispatch(lv_draw_unit_t * draw_unit, lv_layer_t * layer)
}
}
- void * buf = lv_draw_layer_alloc_buf(layer);
- if(buf == NULL)
+ if(lv_draw_layer_alloc_buf(layer) == NULL)
return LV_DRAW_UNIT_IDLE;
t->state = LV_DRAW_TASK_STATE_IN_PROGRESS;
@@ -340,9 +337,13 @@ static int32_t _vglite_wait_for_finish(lv_draw_unit_t * draw_unit)
lv_draw_vglite_unit_t * draw_vglite_unit = (lv_draw_vglite_unit_t *) draw_unit;
draw_vglite_unit->wait_for_finish = true;
+ /* Signal draw unit to finish its tasks and return READY state after completion. */
if(draw_vglite_unit->inited)
lv_thread_sync_signal(&draw_vglite_unit->sync);
+ /* Wait for finish now. */
+ lv_draw_dispatch_wait_for_request();
+
return 1;
}
#endif
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/nxp/vglite/lv_draw_vglite_triangle.c b/lib/libesp32_lvgl/lvgl/src/draw/nxp/vglite/lv_draw_vglite_triangle.c
index 4f72f3aff..8556fdf2a 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/nxp/vglite/lv_draw_vglite_triangle.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/nxp/vglite/lv_draw_vglite_triangle.c
@@ -97,8 +97,8 @@ static void _vglite_draw_triangle(const lv_area_t * coords, const lv_area_t * cl
tri_area.x2 = (int32_t)LV_MAX3(dsc->p[0].x, dsc->p[1].x, dsc->p[2].x);
tri_area.y2 = (int32_t)LV_MAX3(dsc->p[0].y, dsc->p[1].y, dsc->p[2].y);
- uint32_t width = tri_area.x2 - tri_area.x1;
- uint32_t height = tri_area.y2 - tri_area.y1;
+ uint32_t width = lv_area_get_width(&tri_area);
+ uint32_t height = lv_area_get_height(&tri_area);
/* Init path */
int32_t triangle_path[] = { /*VG line path*/
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/sw/lv_draw_sw_mask_private.h b/lib/libesp32_lvgl/lvgl/src/draw/sw/lv_draw_sw_mask_private.h
index 44d3f87d5..aeae9b8ea 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/sw/lv_draw_sw_mask_private.h
+++ b/lib/libesp32_lvgl/lvgl/src/draw/sw/lv_draw_sw_mask_private.h
@@ -16,6 +16,8 @@ extern "C" {
#include "lv_draw_sw_mask.h"
+#if LV_DRAW_SW_COMPLEX
+
/*********************
* DEFINES
*********************/
@@ -146,6 +148,8 @@ void lv_draw_sw_mask_cleanup(void);
* MACROS
**********************/
+#endif /*LV_DRAW_SW_COMPLEX*/
+
#ifdef __cplusplus
} /*extern "C"*/
#endif
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/sw/lv_draw_sw_transform.c b/lib/libesp32_lvgl/lvgl/src/draw/sw/lv_draw_sw_transform.c
index d4301100b..41036d430 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/sw/lv_draw_sw_transform.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/sw/lv_draw_sw_transform.c
@@ -455,7 +455,7 @@ static void transform_argb8888(const uint8_t * src, int32_t src_w, int32_t src_h
dest_c32[x].alpha = (dest_c32[x].alpha * (0xFF - ys_fract)) >> 8;
}
else if(!lv_color32_eq(dest_c32[x], px_ver)) {
- dest_c32[x].alpha = ((px_ver.alpha * ys_fract) + (dest_c32[x].alpha * (0xFF - ys_fract))) >> 8;
+ if(dest_c32[x].alpha) dest_c32[x].alpha = ((px_ver.alpha * ys_fract) + (dest_c32[x].alpha * (0xFF - ys_fract))) >> 8;
px_ver.alpha = ys_fract;
dest_c32[x] = lv_color_mix32(px_ver, dest_c32[x]);
}
@@ -464,7 +464,7 @@ static void transform_argb8888(const uint8_t * src, int32_t src_w, int32_t src_h
dest_c32[x].alpha = (dest_c32[x].alpha * (0xFF - xs_fract)) >> 8;
}
else if(!lv_color32_eq(dest_c32[x], px_hor)) {
- dest_c32[x].alpha = ((px_hor.alpha * xs_fract) + (dest_c32[x].alpha * (0xFF - xs_fract))) >> 8;
+ if(dest_c32[x].alpha) dest_c32[x].alpha = ((px_hor.alpha * xs_fract) + (dest_c32[x].alpha * (0xFF - xs_fract))) >> 8;
px_hor.alpha = xs_fract;
dest_c32[x] = lv_color_mix32(px_hor, dest_c32[x]);
}
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite.c b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite.c
index 145c00757..1a991ce0f 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite.c
@@ -114,7 +114,9 @@ static void draw_execute(lv_draw_vg_lite_unit_t * u)
lv_draw_buf_set_flag(layer->draw_buf, LV_IMAGE_FLAGS_PREMULTIPLIED);
vg_lite_identity(&u->global_matrix);
- vg_lite_translate(-layer->buf_area.x1, -layer->buf_area.y1, &u->global_matrix);
+ if(layer->buf_area.x1 || layer->buf_area.y1) {
+ vg_lite_translate(-layer->buf_area.x1, -layer->buf_area.y1, &u->global_matrix);
+ }
#if LV_DRAW_TRANSFORM_USE_MATRIX
vg_lite_matrix_t layer_matrix;
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_arc.c b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_arc.c
index 68893c0e4..be995ceac 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_arc.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_arc.c
@@ -149,9 +149,7 @@ void lv_draw_vg_lite_arc(lv_draw_unit_t * draw_unit, const lv_draw_arc_dsc_t * d
lv_vg_lite_path_end(path);
- vg_lite_matrix_t matrix;
- vg_lite_identity(&matrix);
- lv_vg_lite_matrix_multiply(&matrix, &u->global_matrix);
+ vg_lite_matrix_t matrix = u->global_matrix;
vg_lite_color_t color = lv_vg_lite_color(dsc->color, dsc->opa, true);
@@ -174,10 +172,8 @@ void lv_draw_vg_lite_arc(lv_draw_unit_t * draw_unit, const lv_draw_arc_dsc_t * d
if(dsc->img_src) {
vg_lite_buffer_t src_buf;
lv_image_decoder_dsc_t decoder_dsc;
- if(lv_vg_lite_buffer_open_image(&src_buf, &decoder_dsc, dsc->img_src, false)) {
- vg_lite_matrix_t path_matrix;
- vg_lite_identity(&path_matrix);
- lv_vg_lite_matrix_multiply(&path_matrix, &u->global_matrix);
+ if(lv_vg_lite_buffer_open_image(&src_buf, &decoder_dsc, dsc->img_src, false, true)) {
+ vg_lite_matrix_t path_matrix = u->global_matrix;
/* move image to center */
vg_lite_translate(cx - radius_out, cy - radius_out, &matrix);
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_border.c b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_border.c
index 445ab1a5f..5860baa1f 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_border.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_border.c
@@ -83,9 +83,7 @@ void lv_draw_vg_lite_border(lv_draw_unit_t * draw_unit, const lv_draw_border_dsc
lv_vg_lite_path_end(path);
- vg_lite_matrix_t matrix;
- vg_lite_identity(&matrix);
- lv_vg_lite_matrix_multiply(&matrix, &u->global_matrix);
+ vg_lite_matrix_t matrix = u->global_matrix;
vg_lite_color_t color = lv_vg_lite_color(dsc->color, dsc->opa, true);
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_fill.c b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_fill.c
index cae20a8fc..dbfd63df5 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_fill.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_fill.c
@@ -57,22 +57,15 @@ void lv_draw_vg_lite_fill(lv_draw_unit_t * draw_unit, const lv_draw_fill_dsc_t *
LV_PROFILER_BEGIN;
- vg_lite_matrix_t matrix;
- vg_lite_identity(&matrix);
- lv_vg_lite_matrix_multiply(&matrix, &u->global_matrix);
-
- int32_t w = lv_area_get_width(coords);
- int32_t h = lv_area_get_height(coords);
- float r = dsc->radius;
- if(dsc->radius) {
- float r_short = LV_MIN(w, h) / 2.0f;
- r = LV_MIN(r, r_short);
- }
+ vg_lite_matrix_t matrix = u->global_matrix;
lv_vg_lite_path_t * path = lv_vg_lite_path_get(u, VG_LITE_FP32);
lv_vg_lite_path_set_quality(path, dsc->radius == 0 ? VG_LITE_LOW : VG_LITE_HIGH);
lv_vg_lite_path_set_bonding_box_area(path, &clip_area);
- lv_vg_lite_path_append_rect(path, coords->x1, coords->y1, w, h, r);
+ lv_vg_lite_path_append_rect(path,
+ coords->x1, coords->y1,
+ lv_area_get_width(coords), lv_area_get_height(coords),
+ dsc->radius);
lv_vg_lite_path_end(path);
vg_lite_path_t * vg_lite_path = lv_vg_lite_path_get_path(path);
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_img.c b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_img.c
index 84ce9d268..86e43375e 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_img.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_img.c
@@ -74,7 +74,10 @@ void lv_draw_vg_lite_img(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t *
vg_lite_buffer_t src_buf;
lv_image_decoder_dsc_t decoder_dsc;
- if(!lv_vg_lite_buffer_open_image(&src_buf, &decoder_dsc, dsc->src, no_cache)) {
+
+ /* if not support blend normal, premultiply alpha */
+ bool premultiply = !lv_vg_lite_support_blend_normal();
+ if(!lv_vg_lite_buffer_open_image(&src_buf, &decoder_dsc, dsc->src, no_cache, premultiply)) {
LV_PROFILER_END;
return;
}
@@ -91,13 +94,22 @@ void lv_draw_vg_lite_img(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t *
lv_memset(&color, dsc->opa, sizeof(color));
}
- vg_lite_matrix_t matrix;
- vg_lite_identity(&matrix);
- lv_vg_lite_matrix_multiply(&matrix, &u->global_matrix);
- lv_vg_lite_image_matrix(&matrix, coords->x1, coords->y1, dsc);
+ /* convert the blend mode to vg-lite blend mode, considering the premultiplied alpha */
+ bool has_pre_mul = lv_draw_buf_has_flag(decoder_dsc.decoded, LV_IMAGE_FLAGS_PREMULTIPLIED);
+ vg_lite_blend_t blend = lv_vg_lite_blend_mode(dsc->blend_mode, has_pre_mul);
+
+ /* original image matrix */
+ vg_lite_matrix_t image_matrix;
+ vg_lite_identity(&image_matrix);
+ lv_vg_lite_image_matrix(&image_matrix, coords->x1, coords->y1, dsc);
+
+ /* image drawing matrix */
+ vg_lite_matrix_t matrix = u->global_matrix;
+ lv_vg_lite_matrix_multiply(&matrix, &image_matrix);
LV_VG_LITE_ASSERT_SRC_BUFFER(&src_buf);
LV_VG_LITE_ASSERT_DEST_BUFFER(&u->target_buffer);
+ LV_VG_LITE_ASSERT_MATRIX(&matrix);
bool no_transform = lv_matrix_is_identity_or_translation((const lv_matrix_t *)&matrix);
vg_lite_filter_t filter = no_transform ? VG_LITE_FILTER_POINT : VG_LITE_FILTER_BI_LINEAR;
@@ -118,7 +130,7 @@ void lv_draw_vg_lite_img(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t *
&src_buf,
&rect,
&matrix,
- lv_vg_lite_blend_mode(dsc->blend_mode),
+ blend,
color,
filter));
LV_PROFILER_END_TAG("vg_lite_blit_rect");
@@ -126,23 +138,22 @@ void lv_draw_vg_lite_img(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t *
else {
lv_vg_lite_path_t * path = lv_vg_lite_path_get(u, VG_LITE_FP32);
- if(dsc->clip_radius) {
- int32_t width = lv_area_get_width(coords);
- int32_t height = lv_area_get_height(coords);
- float r_short = LV_MIN(width, height) / 2.0f;
- float radius = LV_MIN(dsc->clip_radius, r_short);
-
- /**
- * When clip_radius is enabled, the clipping edges
- * are aligned with the image edges
- */
+ /**
+ * When the image is transformed or rounded, create a path around
+ * the image and follow the image_matrix for coordinate transformation
+ */
+ if(!no_transform || dsc->clip_radius) {
+ /* apply the image transform to the path */
+ lv_vg_lite_path_set_transform(path, &image_matrix);
lv_vg_lite_path_append_rect(
path,
- coords->x1, coords->y1,
- width, height,
- radius);
+ 0, 0,
+ lv_area_get_width(coords), lv_area_get_height(coords),
+ dsc->clip_radius);
+ lv_vg_lite_path_set_transform(path, NULL);
}
else {
+ /* append normal rect to the path */
lv_vg_lite_path_append_rect(
path,
clip_area.x1, clip_area.y1,
@@ -156,9 +167,8 @@ void lv_draw_vg_lite_img(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t *
vg_lite_path_t * vg_lite_path = lv_vg_lite_path_get_path(path);
LV_VG_LITE_ASSERT_PATH(vg_lite_path);
- vg_lite_matrix_t path_matrix;
- vg_lite_identity(&path_matrix);
- lv_vg_lite_matrix_multiply(&path_matrix, &u->global_matrix);
+ vg_lite_matrix_t path_matrix = u->global_matrix;
+ LV_VG_LITE_ASSERT_MATRIX(&path_matrix);
LV_PROFILER_BEGIN_TAG("vg_lite_draw_pattern");
LV_VG_LITE_CHECK_ERROR(vg_lite_draw_pattern(
@@ -168,7 +178,7 @@ void lv_draw_vg_lite_img(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t *
&path_matrix,
&src_buf,
&matrix,
- lv_vg_lite_blend_mode(dsc->blend_mode),
+ blend,
VG_LITE_PATTERN_COLOR,
0,
color,
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_label.c b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_label.c
index 0ad4b15b0..6c4c365d8 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_label.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_label.c
@@ -150,9 +150,7 @@ static void draw_letter_bitmap(lv_draw_vg_lite_unit_t * u, const lv_draw_glyph_d
lv_area_t image_area = *dsc->letter_coords;
- vg_lite_matrix_t matrix;
- vg_lite_identity(&matrix);
- lv_vg_lite_matrix_multiply(&matrix, &u->global_matrix);
+ vg_lite_matrix_t matrix = u->global_matrix;
vg_lite_translate(image_area.x1, image_area.y1, &matrix);
vg_lite_buffer_t src_buf;
@@ -198,9 +196,7 @@ static void draw_letter_bitmap(lv_draw_vg_lite_unit_t * u, const lv_draw_glyph_d
vg_lite_path_t * vg_lite_path = lv_vg_lite_path_get_path(path);
LV_VG_LITE_ASSERT_PATH(vg_lite_path);
- vg_lite_matrix_t path_matrix;
- vg_lite_identity(&path_matrix);
- lv_vg_lite_matrix_multiply(&path_matrix, &u->global_matrix);
+ vg_lite_matrix_t path_matrix = u->global_matrix;
LV_VG_LITE_ASSERT_MATRIX(&path_matrix);
LV_PROFILER_BEGIN_TAG("vg_lite_draw_pattern");
@@ -255,10 +251,7 @@ static void draw_letter_outline(lv_draw_vg_lite_unit_t * u, const lv_draw_glyph_
vg_lite_identity(&matrix);
/* matrix for drawing, different from matrix for calculating the bonding box */
- vg_lite_matrix_t draw_matrix;
- vg_lite_identity(&draw_matrix);
-
- lv_vg_lite_matrix_multiply(&draw_matrix, &u->global_matrix);
+ vg_lite_matrix_t draw_matrix = u->global_matrix;
/* convert to vg-lite coordinate */
vg_lite_translate(pos.x - dsc->g->ofs_x, pos.y + dsc->g->box_h + dsc->g->ofs_y, &draw_matrix);
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_line.c b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_line.c
index 501e8b653..e1ba695b7 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_line.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_line.c
@@ -180,9 +180,7 @@ void lv_draw_vg_lite_line(lv_draw_unit_t * draw_unit, const lv_draw_line_dsc_t *
lv_vg_lite_path_end(path);
- vg_lite_matrix_t matrix;
- vg_lite_identity(&matrix);
- lv_vg_lite_matrix_multiply(&matrix, &u->global_matrix);
+ vg_lite_matrix_t matrix = u->global_matrix;
vg_lite_color_t color = lv_vg_lite_color(dsc->color, dsc->opa, true);
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_mask_rect.c b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_mask_rect.c
index e6c0decb2..3d24b2375 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_mask_rect.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_mask_rect.c
@@ -102,28 +102,23 @@ void lv_draw_vg_lite_mask_rect(lv_draw_unit_t * draw_unit, const lv_draw_mask_re
int32_t w = lv_area_get_width(&dsc->area);
int32_t h = lv_area_get_height(&dsc->area);
- float r = dsc->radius;
- if(dsc->radius) {
- float r_short = LV_MIN(w, h) / 2.0f;
- r = LV_MIN(r, r_short);
- }
lv_vg_lite_path_t * path = lv_vg_lite_path_get(u, VG_LITE_FP32);
lv_vg_lite_path_set_quality(path, VG_LITE_HIGH);
lv_vg_lite_path_set_bonding_box_area(path, &draw_area);
/* Use rounded rectangles and normal rectangles of the same size to nest the cropped area */
- lv_vg_lite_path_append_rect(path, dsc->area.x1, dsc->area.y1, w, h, r);
+ lv_vg_lite_path_append_rect(path, dsc->area.x1, dsc->area.y1, w, h, dsc->radius);
lv_vg_lite_path_append_rect(path, dsc->area.x1, dsc->area.y1, w, h, 0);
lv_vg_lite_path_end(path);
vg_lite_path_t * vg_lite_path = lv_vg_lite_path_get_path(path);
- vg_lite_matrix_t * matrix = &u->global_matrix;
+ vg_lite_matrix_t matrix = u->global_matrix;
LV_VG_LITE_ASSERT_DEST_BUFFER(&u->target_buffer);
LV_VG_LITE_ASSERT_PATH(vg_lite_path);
- LV_VG_LITE_ASSERT_MATRIX(matrix);
+ LV_VG_LITE_ASSERT_MATRIX(&matrix);
/* Use VG_LITE_BLEND_DST_IN (Sa * D) blending mode to make the corners transparent */
LV_PROFILER_BEGIN_TAG("vg_lite_draw");
@@ -131,7 +126,7 @@ void lv_draw_vg_lite_mask_rect(lv_draw_unit_t * draw_unit, const lv_draw_mask_re
&u->target_buffer,
vg_lite_path,
VG_LITE_FILL_EVEN_ODD,
- matrix,
+ &matrix,
VG_LITE_BLEND_DST_IN,
0));
LV_PROFILER_END_TAG("vg_lite_draw");
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_triangle.c b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_triangle.c
index e0258984f..63609130e 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_triangle.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_triangle.c
@@ -71,9 +71,7 @@ void lv_draw_vg_lite_triangle(lv_draw_unit_t * draw_unit, const lv_draw_triangle
LV_VG_LITE_ASSERT_DEST_BUFFER(&u->target_buffer);
LV_VG_LITE_ASSERT_PATH(vg_lite_path);
- vg_lite_matrix_t matrix;
- vg_lite_identity(&matrix);
- lv_vg_lite_matrix_multiply(&matrix, &u->global_matrix);
+ vg_lite_matrix_t matrix = u->global_matrix;
LV_VG_LITE_ASSERT_MATRIX(&matrix);
if(dsc->bg_grad.dir != LV_GRAD_DIR_NONE) {
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_vector.c b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_vector.c
index a70caf804..481be5cdb 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_vector.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_draw_vg_lite_vector.c
@@ -217,7 +217,7 @@ static void task_draw_cb(void * ctx, const lv_vector_path_t * path, const lv_vec
/* draw image */
vg_lite_buffer_t image_buffer;
lv_image_decoder_dsc_t decoder_dsc;
- if(lv_vg_lite_buffer_open_image(&image_buffer, &decoder_dsc, dsc->fill_dsc.img_dsc.src, false)) {
+ if(lv_vg_lite_buffer_open_image(&image_buffer, &decoder_dsc, dsc->fill_dsc.img_dsc.src, false, true)) {
/* Calculate pattern matrix. Should start from path bond box, and also apply fill matrix. */
lv_matrix_t m = dsc->matrix;
lv_matrix_translate(&m, min_x, min_y);
@@ -251,7 +251,15 @@ static void task_draw_cb(void * ctx, const lv_vector_path_t * path, const lv_vec
break;
case LV_VECTOR_DRAW_STYLE_GRADIENT: {
vg_lite_matrix_t grad_matrix;
- lv_vg_lite_matrix(&grad_matrix, &dsc->fill_dsc.matrix);
+ vg_lite_identity(&grad_matrix);
+
+#if !LV_USE_VG_LITE_THORVG
+ /* Workaround inconsistent matrix behavior between device and ThorVG */
+ lv_vg_lite_matrix_multiply(&grad_matrix, &matrix);
+#endif
+ vg_lite_matrix_t fill_matrix;
+ lv_vg_lite_matrix(&fill_matrix, &dsc->fill_dsc.matrix);
+ lv_vg_lite_matrix_multiply(&grad_matrix, &fill_matrix);
lv_vg_lite_draw_grad(
u,
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_path.c b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_path.c
index 1c530072a..9a9346b8a 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_path.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_path.c
@@ -36,8 +36,10 @@
struct lv_vg_lite_path_t {
vg_lite_path_t base;
+ vg_lite_matrix_t matrix;
size_t mem_size;
uint8_t format_len;
+ bool has_transform;
};
typedef struct {
@@ -138,6 +140,7 @@ void lv_vg_lite_path_reset(lv_vg_lite_path_t * path, vg_lite_format_t data_forma
path->base.quality = VG_LITE_MEDIUM;
path->base.path_type = VG_LITE_DRAW_ZERO;
path->format_len = lv_vg_lite_path_format_len(data_format);
+ path->has_transform = false;
}
vg_lite_path_t * lv_vg_lite_path_get_path(lv_vg_lite_path_t * path)
@@ -234,6 +237,16 @@ bool lv_vg_lite_path_update_bonding_box(lv_vg_lite_path_t * path)
return true;
}
+void lv_vg_lite_path_set_transform(lv_vg_lite_path_t * path, const vg_lite_matrix_t * matrix)
+{
+ LV_ASSERT_NULL(path);
+ if(matrix) {
+ path->matrix = *matrix;
+ }
+
+ path->has_transform = matrix ? true : false;
+}
+
void lv_vg_lite_path_set_quality(lv_vg_lite_path_t * path, vg_lite_quality_t quality)
{
LV_ASSERT_NULL(path);
@@ -267,6 +280,15 @@ static void lv_vg_lite_path_append_op(lv_vg_lite_path_t * path, uint32_t op)
static void lv_vg_lite_path_append_point(lv_vg_lite_path_t * path, float x, float y)
{
+ if(path->has_transform) {
+ LV_VG_LITE_ASSERT_MATRIX(&path->matrix);
+ /* transform point */
+ float ori_x = x;
+ float ori_y = y;
+ x = ori_x * path->matrix.m[0][0] + ori_y * path->matrix.m[0][1] + path->matrix.m[0][2];
+ y = ori_x * path->matrix.m[1][0] + ori_y * path->matrix.m[1][1] + path->matrix.m[1][2];
+ }
+
if(path->base.format == VG_LITE_FP32) {
lv_vg_lite_path_append_data(path, &x, sizeof(x));
lv_vg_lite_path_append_data(path, &y, sizeof(y));
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_path.h b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_path.h
index 6854b079a..b1ef3f894 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_path.h
+++ b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_path.h
@@ -61,6 +61,8 @@ void lv_vg_lite_path_get_bonding_box(lv_vg_lite_path_t * path,
bool lv_vg_lite_path_update_bonding_box(lv_vg_lite_path_t * path);
+void lv_vg_lite_path_set_transform(lv_vg_lite_path_t * path, const vg_lite_matrix_t * matrix);
+
void lv_vg_lite_path_set_quality(lv_vg_lite_path_t * path, vg_lite_quality_t quality);
vg_lite_path_t * lv_vg_lite_path_get_path(lv_vg_lite_path_t * path);
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_utils.c b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_utils.c
index e2b763692..116cbde3e 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_utils.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_utils.c
@@ -714,7 +714,7 @@ void lv_vg_lite_image_matrix(vg_lite_matrix_t * matrix, int32_t x, int32_t y, co
}
bool lv_vg_lite_buffer_open_image(vg_lite_buffer_t * buffer, lv_image_decoder_dsc_t * decoder_dsc, const void * src,
- bool no_cache)
+ bool no_cache, bool premultiply)
{
LV_ASSERT_NULL(buffer);
LV_ASSERT_NULL(decoder_dsc);
@@ -722,7 +722,7 @@ bool lv_vg_lite_buffer_open_image(vg_lite_buffer_t * buffer, lv_image_decoder_ds
lv_image_decoder_args_t args;
lv_memzero(&args, sizeof(lv_image_decoder_args_t));
- args.premultiply = !lv_vg_lite_support_blend_normal();
+ args.premultiply = premultiply;
args.stride_align = true;
args.use_indexed = true;
args.no_cache = no_cache;
@@ -778,15 +778,11 @@ void lv_vg_lite_rect(vg_lite_rectangle_t * rect, const lv_area_t * area)
rect->height = lv_area_get_height(area);
}
-#if LV_USE_MATRIX
-
void lv_vg_lite_matrix(vg_lite_matrix_t * dest, const lv_matrix_t * src)
{
lv_memcpy(dest, src, sizeof(lv_matrix_t));
}
-#endif
-
uint32_t lv_vg_lite_get_palette_size(vg_lite_buffer_format_t format)
{
uint32_t size = 0;
@@ -819,9 +815,9 @@ vg_lite_color_t lv_vg_lite_color(lv_color_t color, lv_opa_t opa, bool pre_mul)
return (uint32_t)opa << 24 | (uint32_t)color.blue << 16 | (uint32_t)color.green << 8 | color.red;
}
-vg_lite_blend_t lv_vg_lite_blend_mode(lv_blend_mode_t blend_mode)
+vg_lite_blend_t lv_vg_lite_blend_mode(lv_blend_mode_t blend_mode, bool has_pre_mul)
{
- if(vg_lite_query_feature(gcFEATURE_BIT_VG_LVGL_SUPPORT)) {
+ if(!has_pre_mul && vg_lite_query_feature(gcFEATURE_BIT_VG_LVGL_SUPPORT)) {
switch(blend_mode) {
case LV_BLEND_MODE_NORMAL: /**< Simply mix according to the opacity value*/
return VG_LITE_BLEND_NORMAL_LVGL;
@@ -842,7 +838,7 @@ vg_lite_blend_t lv_vg_lite_blend_mode(lv_blend_mode_t blend_mode)
switch(blend_mode) {
case LV_BLEND_MODE_NORMAL: /**< Simply mix according to the opacity value*/
- if(vg_lite_query_feature(gcFEATURE_BIT_VG_HW_PREMULTIPLY)) {
+ if(!has_pre_mul && vg_lite_query_feature(gcFEATURE_BIT_VG_HW_PREMULTIPLY)) {
return VG_LITE_BLEND_PREMULTIPLY_SRC_OVER;
}
return VG_LITE_BLEND_SRC_OVER;
@@ -883,11 +879,6 @@ bool lv_vg_lite_buffer_check(const vg_lite_buffer_t * buffer, bool is_src)
return false;
}
- if(buffer->stride < 1) {
- LV_LOG_ERROR("buffer stride(%d) < 1", (int)buffer->stride);
- return false;
- }
-
if(!(buffer->tiled == VG_LITE_LINEAR || buffer->tiled == VG_LITE_TILED)) {
LV_LOG_ERROR("buffer tiled(%d) is invalid", (int)buffer->tiled);
return false;
@@ -898,12 +889,6 @@ bool lv_vg_lite_buffer_check(const vg_lite_buffer_t * buffer, bool is_src)
return false;
}
- if((uint32_t)(uintptr_t)buffer->memory != buffer->address) {
- LV_LOG_ERROR("buffer memory(%p) != address(%p)",
- buffer->memory, (void *)(uintptr_t)buffer->address);
- return false;
- }
-
if(is_src && buffer->width != (vg_lite_int32_t)lv_vg_lite_width_align(buffer->width)) {
LV_LOG_ERROR("buffer width(%d) is not aligned", (int)buffer->width);
return false;
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_utils.h b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_utils.h
index 62e65620d..becbce893 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_utils.h
+++ b/lib/libesp32_lvgl/lvgl/src/draw/vg_lite/lv_vg_lite_utils.h
@@ -131,13 +131,13 @@ void lv_vg_lite_image_matrix(vg_lite_matrix_t * matrix, int32_t x, int32_t y, co
void lv_vg_lite_image_dec_init(vg_lite_matrix_t * matrix, int32_t x, int32_t y, const lv_draw_image_dsc_t * dsc);
bool lv_vg_lite_buffer_open_image(vg_lite_buffer_t * buffer, lv_image_decoder_dsc_t * decoder_dsc, const void * src,
- bool no_cache);
+ bool no_cache, bool premultiply);
void lv_vg_lite_image_dsc_init(struct lv_draw_vg_lite_unit_t * unit);
void lv_vg_lite_image_dsc_deinit(struct lv_draw_vg_lite_unit_t * unit);
-vg_lite_blend_t lv_vg_lite_blend_mode(lv_blend_mode_t blend_mode);
+vg_lite_blend_t lv_vg_lite_blend_mode(lv_blend_mode_t blend_mode, bool has_pre_mul);
uint32_t lv_vg_lite_get_palette_size(vg_lite_buffer_format_t format);
@@ -145,12 +145,8 @@ vg_lite_color_t lv_vg_lite_color(lv_color_t color, lv_opa_t opa, bool pre_mul);
void lv_vg_lite_rect(vg_lite_rectangle_t * rect, const lv_area_t * area);
-#if LV_USE_MATRIX
-
void lv_vg_lite_matrix(vg_lite_matrix_t * dest, const lv_matrix_t * src);
-#endif
-
/* Param checker */
bool lv_vg_lite_buffer_check(const vg_lite_buffer_t * buffer, bool is_src);
diff --git a/lib/libesp32_lvgl/lvgl/src/drivers/glfw/lv_opengles_texture.c b/lib/libesp32_lvgl/lvgl/src/drivers/glfw/lv_opengles_texture.c
index 42e6a9f70..02c9dfa7d 100644
--- a/lib/libesp32_lvgl/lvgl/src/drivers/glfw/lv_opengles_texture.c
+++ b/lib/libesp32_lvgl/lvgl/src/drivers/glfw/lv_opengles_texture.c
@@ -61,7 +61,7 @@ lv_display_t * lv_opengles_texture_create(int32_t w, int32_t h)
return NULL;
}
uint32_t stride = lv_draw_buf_width_to_stride(w, lv_display_get_color_format(disp));
- uint32_t buf_size = stride * w;
+ uint32_t buf_size = stride * h;
dsc->fb1 = malloc(buf_size);
if(dsc->fb1 == NULL) {
lv_free(dsc);
diff --git a/lib/libesp32_lvgl/lvgl/src/drivers/libinput/lv_libinput_private.h b/lib/libesp32_lvgl/lvgl/src/drivers/libinput/lv_libinput_private.h
index 6d1844c6b..bced3e219 100644
--- a/lib/libesp32_lvgl/lvgl/src/drivers/libinput/lv_libinput_private.h
+++ b/lib/libesp32_lvgl/lvgl/src/drivers/libinput/lv_libinput_private.h
@@ -18,6 +18,10 @@ extern "C" {
#if LV_USE_LIBINPUT
+#if LV_LIBINPUT_XKB
+#include "lv_xkb_private.h"
+#endif
+
/*********************
* DEFINES
*********************/
diff --git a/lib/libesp32_lvgl/lvgl/src/drivers/libinput/lv_xkb.h b/lib/libesp32_lvgl/lvgl/src/drivers/libinput/lv_xkb.h
index daaa4dc1d..3f9fd86ea 100644
--- a/lib/libesp32_lvgl/lvgl/src/drivers/libinput/lv_xkb.h
+++ b/lib/libesp32_lvgl/lvgl/src/drivers/libinput/lv_xkb.h
@@ -18,6 +18,7 @@ extern "C" {
#if defined(LV_LIBINPUT_XKB) && LV_LIBINPUT_XKB
+#include "../../misc/lv_types.h"
#include
#include
diff --git a/lib/libesp32_lvgl/lvgl/src/drivers/nuttx/lv_nuttx_lcd.c b/lib/libesp32_lvgl/lvgl/src/drivers/nuttx/lv_nuttx_lcd.c
index 228c44593..af49cd44d 100644
--- a/lib/libesp32_lvgl/lvgl/src/drivers/nuttx/lv_nuttx_lcd.c
+++ b/lib/libesp32_lvgl/lvgl/src/drivers/nuttx/lv_nuttx_lcd.c
@@ -216,11 +216,11 @@ static void display_release_cb(lv_event_t * e)
/* clear display buffer */
if(disp->buf_1) {
- lv_free(disp->buf_1);
+ lv_free(disp->buf_1->data);
disp->buf_1 = NULL;
}
if(disp->buf_2) {
- lv_free(disp->buf_2);
+ lv_free(disp->buf_2->data);
disp->buf_2 = NULL;
}
diff --git a/lib/libesp32_lvgl/lvgl/src/drivers/sdl/lv_sdl_window.c b/lib/libesp32_lvgl/lvgl/src/drivers/sdl/lv_sdl_window.c
index 8448e79d4..df8a28e4e 100644
--- a/lib/libesp32_lvgl/lvgl/src/drivers/sdl/lv_sdl_window.c
+++ b/lib/libesp32_lvgl/lvgl/src/drivers/sdl/lv_sdl_window.c
@@ -122,7 +122,7 @@ lv_display_t * lv_sdl_window_create(int32_t hor_res, int32_t ver_res)
lv_display_set_buffers(disp, dsc->fb1, dsc->fb2, stride * disp->ver_res,
LV_SDL_RENDER_MODE);
}
-#else /*/*LV_USE_DRAW_SDL == 1*/
+#else /*LV_USE_DRAW_SDL == 1*/
/*It will render directly to default Texture, so the buffer is not used, so just set something*/
static lv_draw_buf_t draw_buf;
static uint8_t dummy_buf; /*It won't be used as it will render to the SDL textures directly*/
@@ -166,7 +166,7 @@ lv_display_t * lv_sdl_get_disp_from_win_id(uint32_t win_id)
while(disp) {
lv_sdl_window_t * dsc = lv_display_get_driver_data(disp);
- if(SDL_GetWindowID(dsc->window) == win_id) {
+ if(dsc != NULL && SDL_GetWindowID(dsc->window) == win_id) {
return disp;
}
disp = lv_display_get_next(disp);
diff --git a/lib/libesp32_lvgl/lvgl/src/indev/lv_indev.c b/lib/libesp32_lvgl/lvgl/src/indev/lv_indev.c
index 5d0810747..3a4a5721a 100644
--- a/lib/libesp32_lvgl/lvgl/src/indev/lv_indev.c
+++ b/lib/libesp32_lvgl/lvgl/src/indev/lv_indev.c
@@ -1203,11 +1203,6 @@ static void indev_proc_press(lv_indev_t * indev)
lv_obj_send_event(last_obj, LV_EVENT_PRESS_LOST, indev_act);
if(indev_reset_check(indev)) return;
-
- /*Do nothing until release and a new press*/
- lv_indev_reset(indev, NULL);
- lv_indev_wait_release(indev);
- return;
}
indev->pointer.act_obj = indev_obj_act; /*Save the pressed object*/
diff --git a/lib/libesp32_lvgl/lvgl/src/libs/gif/gifdec.c b/lib/libesp32_lvgl/lvgl/src/libs/gif/gifdec.c
index 8e97ab503..ffe9ec1f5 100644
--- a/lib/libesp32_lvgl/lvgl/src/libs/gif/gifdec.c
+++ b/lib/libesp32_lvgl/lvgl/src/libs/gif/gifdec.c
@@ -113,9 +113,21 @@ static gd_GIF * gif_open(gd_GIF * gif_base)
/* Aspect Ratio */
f_gif_read(gif_base, &aspect, 1);
/* Create gd_GIF Structure. */
+ if(0 == width || 0 == height){
+ LV_LOG_WARN("Zero size image");
+ goto fail;
+ }
#if LV_GIF_CACHE_DECODE_DATA
+ if(0 == (INT_MAX - sizeof(gd_GIF) - LZW_CACHE_SIZE) / width / height / 5){
+ LV_LOG_WARN("Image dimensions are too large");
+ goto fail;
+ }
gif = lv_malloc(sizeof(gd_GIF) + 5 * width * height + LZW_CACHE_SIZE);
#else
+ if(0 == (INT_MAX - sizeof(gd_GIF)) / width / height / 5){
+ LV_LOG_WARN("Image dimensions are too large");
+ goto fail;
+ }
gif = lv_malloc(sizeof(gd_GIF) + 5 * width * height);
#endif
if(!gif) goto fail;
@@ -318,6 +330,8 @@ get_key(gd_GIF *gif, int key_size, uint8_t *sub_len, uint8_t *shift, uint8_t *by
}
#if LV_GIF_CACHE_DECODE_DATA
+/* Decompress image pixels.
+ * Return 0 on success or -1 on out-of-memory (w.r.t. LZW code table) or parse error. */
static int
read_image_data(gd_GIF *gif, int interlace)
{
@@ -375,6 +389,10 @@ read_image_data(gd_GIF *gif, int interlace)
while (frm_off < frm_size) {
/* copy data to frame buffer */
while (sp > p_stack) {
+ if(frm_off >= frm_size){
+ LV_LOG_WARN("LZW table token overflows the frame buffer");
+ return -1;
+ }
*ptr++ = *(--sp);
frm_off += 1;
/* read one line */
@@ -526,7 +544,7 @@ interlaced_line_index(int h, int y)
}
/* Decompress image pixels.
- * Return 0 on success or -1 on out-of-memory (w.r.t. LZW code table). */
+ * Return 0 on success or -1 on out-of-memory (w.r.t. LZW code table) or parse error. */
static int
read_image_data(gd_GIF * gif, int interlace)
{
@@ -578,6 +596,10 @@ read_image_data(gd_GIF * gif, int interlace)
if(ret == 1) key_size++;
entry = table->entries[key];
str_len = entry.length;
+ if(frm_off + str_len >= frm_size){
+ LV_LOG_WARN("LZW table token overflows the frame buffer");
+ return -1;
+ }
for(i = 0; i < str_len; i++) {
p = frm_off + entry.length - 1;
x = p % gif->fw;
@@ -603,7 +625,7 @@ read_image_data(gd_GIF * gif, int interlace)
#endif
/* Read image.
- * Return 0 on success or -1 on out-of-memory (w.r.t. LZW code table). */
+ * Return 0 on success or -1 on out-of-memory (w.r.t. LZW code table) or parse error. */
static int
read_image(gd_GIF * gif)
{
@@ -615,6 +637,10 @@ read_image(gd_GIF * gif)
gif->fy = read_num(gif);
gif->fw = read_num(gif);
gif->fh = read_num(gif);
+ if(gif->fx + (uint32_t)gif->fw > gif->width || gif->fy + (uint32_t)gif->fh > gif->height){
+ LV_LOG_WARN("Frame coordinates out of image bounds");
+ return -1;
+ }
f_gif_read(gif, &fisrz, 1);
interlace = fisrz & 0x40;
/* Ignore Sort Flag. */
diff --git a/lib/libesp32_lvgl/lvgl/src/libs/gif/lv_gif.c b/lib/libesp32_lvgl/lvgl/src/libs/gif/lv_gif.c
index ca48f13fd..920f77689 100644
--- a/lib/libesp32_lvgl/lvgl/src/libs/gif/lv_gif.c
+++ b/lib/libesp32_lvgl/lvgl/src/libs/gif/lv_gif.c
@@ -137,6 +137,36 @@ void lv_gif_resume(lv_obj_t * obj)
lv_timer_resume(gifobj->timer);
}
+bool lv_gif_is_loaded(lv_obj_t * obj)
+{
+ lv_gif_t * gifobj = (lv_gif_t *) obj;
+
+ return (gifobj->gif != NULL);
+}
+
+int32_t lv_gif_get_loop_count(lv_obj_t * obj)
+{
+ lv_gif_t * gifobj = (lv_gif_t *) obj;
+
+ if(gifobj->gif == NULL) {
+ return -1;
+ }
+
+ return gifobj->gif->loop_count;
+}
+
+void lv_gif_set_loop_count(lv_obj_t * obj, int32_t count)
+{
+ lv_gif_t * gifobj = (lv_gif_t *) obj;
+
+ if(gifobj->gif == NULL) {
+ LV_LOG_WARN("Gif resource not loaded correctly");
+ return;
+ }
+
+ gifobj->gif->loop_count = count;
+}
+
/**********************
* STATIC FUNCTIONS
**********************/
diff --git a/lib/libesp32_lvgl/lvgl/src/libs/gif/lv_gif.h b/lib/libesp32_lvgl/lvgl/src/libs/gif/lv_gif.h
index fc6323fa6..cf1bee479 100644
--- a/lib/libesp32_lvgl/lvgl/src/libs/gif/lv_gif.h
+++ b/lib/libesp32_lvgl/lvgl/src/libs/gif/lv_gif.h
@@ -72,6 +72,25 @@ void lv_gif_pause(lv_obj_t * obj);
*/
void lv_gif_resume(lv_obj_t * obj);
+/**
+ * Checks if the GIF was loaded correctly.
+ * @param obj pointer to a gif obj
+ */
+bool lv_gif_is_loaded(lv_obj_t * obj);
+
+/**
+ * Get the loop count for the GIF.
+ * @param obj pointer to a gif obj
+ */
+int32_t lv_gif_get_loop_count(lv_obj_t * obj);
+
+/**
+ * Set the loop count for the GIF.
+ * @param obj pointer to a gif obj
+ * @param count the loop count to set
+ */
+void lv_gif_set_loop_count(lv_obj_t * obj, int32_t count);
+
/**********************
* MACROS
**********************/
diff --git a/lib/libesp32_lvgl/lvgl/src/lv_conf_internal.h b/lib/libesp32_lvgl/lvgl/src/lv_conf_internal.h
index 5cebb73f1..0a66d949e 100644
--- a/lib/libesp32_lvgl/lvgl/src/lv_conf_internal.h
+++ b/lib/libesp32_lvgl/lvgl/src/lv_conf_internal.h
@@ -266,6 +266,24 @@
#endif
#endif
#endif
+#if LV_USE_OS == LV_OS_FREERTOS
+ /*
+ * Unblocking an RTOS task with a direct notification is 45% faster and uses less RAM
+ * than unblocking a task using an intermediary object such as a binary semaphore.
+ * RTOS task notifications can only be used when there is only one task that can be the recipient of the event.
+ */
+ #ifndef LV_USE_FREERTOS_TASK_NOTIFY
+ #ifdef LV_KCONFIG_PRESENT
+ #ifdef CONFIG_LV_USE_FREERTOS_TASK_NOTIFY
+ #define LV_USE_FREERTOS_TASK_NOTIFY CONFIG_LV_USE_FREERTOS_TASK_NOTIFY
+ #else
+ #define LV_USE_FREERTOS_TASK_NOTIFY 0
+ #endif
+ #else
+ #define LV_USE_FREERTOS_TASK_NOTIFY 1
+ #endif
+ #endif
+#endif
/*========================
* RENDERING CONFIGURATION
@@ -610,16 +628,38 @@
#endif
/* Use NXP's PXP on iMX RTxxx platforms. */
-#ifndef LV_USE_DRAW_PXP
- #ifdef CONFIG_LV_USE_DRAW_PXP
- #define LV_USE_DRAW_PXP CONFIG_LV_USE_DRAW_PXP
+#ifndef LV_USE_PXP
+ #ifdef CONFIG_LV_USE_PXP
+ #define LV_USE_PXP CONFIG_LV_USE_PXP
#else
- #define LV_USE_DRAW_PXP 0
+ #define LV_USE_PXP 0
#endif
#endif
-#if LV_USE_DRAW_PXP
- #if LV_USE_OS
+#if LV_USE_PXP
+ /* Use PXP for drawing.*/
+ #ifndef LV_USE_DRAW_PXP
+ #ifdef LV_KCONFIG_PRESENT
+ #ifdef CONFIG_LV_USE_DRAW_PXP
+ #define LV_USE_DRAW_PXP CONFIG_LV_USE_DRAW_PXP
+ #else
+ #define LV_USE_DRAW_PXP 0
+ #endif
+ #else
+ #define LV_USE_DRAW_PXP 1
+ #endif
+ #endif
+
+ /* Use PXP to rotate display.*/
+ #ifndef LV_USE_ROTATE_PXP
+ #ifdef CONFIG_LV_USE_ROTATE_PXP
+ #define LV_USE_ROTATE_PXP CONFIG_LV_USE_ROTATE_PXP
+ #else
+ #define LV_USE_ROTATE_PXP 0
+ #endif
+ #endif
+
+ #if LV_USE_DRAW_PXP && LV_USE_OS
/* Use additional draw thread for PXP processing.*/
#ifndef LV_USE_PXP_DRAW_THREAD
#ifdef LV_KCONFIG_PRESENT
diff --git a/lib/libesp32_lvgl/lvgl/src/lv_conf_kconfig.h b/lib/libesp32_lvgl/lvgl/src/lv_conf_kconfig.h
index a36eaf775..7796e0fb9 100644
--- a/lib/libesp32_lvgl/lvgl/src/lv_conf_kconfig.h
+++ b/lib/libesp32_lvgl/lvgl/src/lv_conf_kconfig.h
@@ -18,6 +18,16 @@ extern "C" {
# ifdef __NuttX__
# include
+/*
+ * Make sure version number in Kconfig file is correctly set.
+ * Mismatch can happen when user manually copy lvgl/Kconfig file to their project, like what NuttX does.
+ */
+# include "../lv_version.h"
+
+# if CONFIG_LVGL_VERSION_MAJOR != LVGL_VERSION_MAJOR || CONFIG_LVGL_VERSION_MINOR != LVGL_VERSION_MINOR \
+ || CONFIG_LVGL_VERSION_PATCH != LVGL_VERSION_PATCH
+# warning "Version mismatch between Kconfig and lvgl/lv_version.h"
+# endif
# elif defined(__RTTHREAD__)
# define LV_CONF_INCLUDE_SIMPLE
# include
diff --git a/lib/libesp32_lvgl/lvgl/src/lv_init.c b/lib/libesp32_lvgl/lvgl/src/lv_init.c
index 26897a7bc..a019d6e57 100644
--- a/lib/libesp32_lvgl/lvgl/src/lv_init.c
+++ b/lib/libesp32_lvgl/lvgl/src/lv_init.c
@@ -43,8 +43,10 @@
#if LV_USE_DRAW_VGLITE
#include "draw/nxp/vglite/lv_draw_vglite.h"
#endif
-#if LV_USE_DRAW_PXP
- #include "draw/nxp/pxp/lv_draw_pxp.h"
+#if LV_USE_PXP
+ #if LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP
+ #include "draw/nxp/pxp/lv_draw_pxp.h"
+ #endif
#endif
#if LV_USE_DRAW_DAVE2D
#include "draw/renesas/dave2d/lv_draw_dave2d.h"
@@ -198,9 +200,11 @@ void lv_init(void)
lv_draw_vglite_init();
#endif
-#if LV_USE_DRAW_PXP
+#if LV_USE_PXP
+#if LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP
lv_draw_pxp_init();
#endif
+#endif
#if LV_USE_DRAW_DAVE2D
lv_draw_dave2d_init();
@@ -385,9 +389,11 @@ void lv_deinit(void)
lv_obj_style_deinit();
-#if LV_USE_DRAW_PXP
+#if LV_USE_PXP
+#if LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP
lv_draw_pxp_deinit();
#endif
+#endif
#if LV_USE_DRAW_VGLITE
lv_draw_vglite_deinit();
diff --git a/lib/libesp32_lvgl/lvgl/src/lvgl_private.h b/lib/libesp32_lvgl/lvgl/src/lvgl_private.h
index cda92217b..8ab64e973 100644
--- a/lib/libesp32_lvgl/lvgl/src/lvgl_private.h
+++ b/lib/libesp32_lvgl/lvgl/src/lvgl_private.h
@@ -70,7 +70,6 @@ extern "C" {
#include "widgets/buttonmatrix/lv_buttonmatrix_private.h"
#include "widgets/slider/lv_slider_private.h"
#include "widgets/switch/lv_switch_private.h"
-#include "widgets/calendar/lv_calendar_chinese_private.h"
#include "widgets/calendar/lv_calendar_private.h"
#include "widgets/imagebutton/lv_imagebutton_private.h"
#include "widgets/bar/lv_bar_private.h"
diff --git a/lib/libesp32_lvgl/lvgl/src/misc/lv_anim.c b/lib/libesp32_lvgl/lvgl/src/misc/lv_anim.c
index 0e57f2435..8fc986764 100644
--- a/lib/libesp32_lvgl/lvgl/src/misc/lv_anim.c
+++ b/lib/libesp32_lvgl/lvgl/src/misc/lv_anim.c
@@ -138,7 +138,7 @@ uint32_t lv_anim_get_playtime(const lv_anim_t * a)
if(repeat_cnt < 1) repeat_cnt = 1;
uint32_t playtime = a->repeat_delay + a->duration + a->playback_delay + a->playback_duration;
- playtime = playtime * a->repeat_cnt;
+ playtime = playtime * repeat_cnt;
return playtime;
}
diff --git a/lib/libesp32_lvgl/lvgl/src/misc/lv_bidi_private.h b/lib/libesp32_lvgl/lvgl/src/misc/lv_bidi_private.h
index d197e4ac4..0b684daec 100644
--- a/lib/libesp32_lvgl/lvgl/src/misc/lv_bidi_private.h
+++ b/lib/libesp32_lvgl/lvgl/src/misc/lv_bidi_private.h
@@ -15,6 +15,7 @@ extern "C" {
*********************/
#include "lv_bidi.h"
+#if LV_USE_BIDI
/*********************
* DEFINES
@@ -91,6 +92,8 @@ void lv_bidi_process_paragraph(const char * str_in, char * str_out, uint32_t len
* MACROS
**********************/
+#endif /*LV_USE_BIDI*/
+
#ifdef __cplusplus
} /*extern "C"*/
#endif
diff --git a/lib/libesp32_lvgl/lvgl/src/misc/lv_color.c b/lib/libesp32_lvgl/lvgl/src/misc/lv_color.c
index d56e355fe..d62f280b1 100644
--- a/lib/libesp32_lvgl/lvgl/src/misc/lv_color.c
+++ b/lib/libesp32_lvgl/lvgl/src/misc/lv_color.c
@@ -87,6 +87,7 @@ bool lv_color_format_has_alpha(lv_color_format_t cf)
case LV_COLOR_FORMAT_I4:
case LV_COLOR_FORMAT_I8:
case LV_COLOR_FORMAT_RGB565A8:
+ case LV_COLOR_FORMAT_ARGB8565:
case LV_COLOR_FORMAT_ARGB8888:
case LV_COLOR_FORMAT_AL88:
return true;
diff --git a/lib/libesp32_lvgl/lvgl/src/misc/lv_fs.h b/lib/libesp32_lvgl/lvgl/src/misc/lv_fs.h
index f8ffa1a0e..c6f938b7d 100644
--- a/lib/libesp32_lvgl/lvgl/src/misc/lv_fs.h
+++ b/lib/libesp32_lvgl/lvgl/src/misc/lv_fs.h
@@ -91,6 +91,12 @@ typedef struct {
lv_fs_file_cache_t * cache;
} lv_fs_file_t;
+
+typedef struct {
+ void * dir_d;
+ lv_fs_drv_t * drv;
+} lv_fs_dir_t;
+
/**********************
* GLOBAL PROTOTYPES
**********************/
diff --git a/lib/libesp32_lvgl/lvgl/src/misc/lv_fs_private.h b/lib/libesp32_lvgl/lvgl/src/misc/lv_fs_private.h
index e8789e6c0..f8bb4bbd3 100644
--- a/lib/libesp32_lvgl/lvgl/src/misc/lv_fs_private.h
+++ b/lib/libesp32_lvgl/lvgl/src/misc/lv_fs_private.h
@@ -38,12 +38,6 @@ struct lv_fs_path_ex_t {
uint32_t size;
};
-struct lv_fs_dir_t {
- void * dir_d;
- lv_fs_drv_t * drv;
-};
-
-
/**********************
* GLOBAL PROTOTYPES
**********************/
diff --git a/lib/libesp32_lvgl/lvgl/src/misc/lv_types.h b/lib/libesp32_lvgl/lvgl/src/misc/lv_types.h
index 4e02c1366..b362e7ad0 100644
--- a/lib/libesp32_lvgl/lvgl/src/misc/lv_types.h
+++ b/lib/libesp32_lvgl/lvgl/src/misc/lv_types.h
@@ -139,8 +139,6 @@ typedef struct lv_fs_file_cache_t lv_fs_file_cache_t;
typedef struct lv_fs_path_ex_t lv_fs_path_ex_t;
-typedef struct lv_fs_dir_t lv_fs_dir_t;
-
typedef struct lv_image_decoder_args_t lv_image_decoder_args_t;
typedef struct lv_image_cache_data_t lv_image_cache_data_t;
@@ -187,8 +185,6 @@ typedef struct lv_buttonmatrix_t lv_buttonmatrix_t;
typedef struct lv_calendar_t lv_calendar_t;
-typedef struct lv_calendar_chinese_t lv_calendar_chinese_t;
-
typedef struct lv_canvas_t lv_canvas_t;
typedef struct lv_chart_series_t lv_chart_series_t;
diff --git a/lib/libesp32_lvgl/lvgl/src/osal/lv_freertos.c b/lib/libesp32_lvgl/lvgl/src/osal/lv_freertos.c
index 1c81a8e05..f65a299aa 100644
--- a/lib/libesp32_lvgl/lvgl/src/osal/lv_freertos.c
+++ b/lib/libesp32_lvgl/lvgl/src/osal/lv_freertos.c
@@ -15,11 +15,7 @@
#include "lv_os.h"
#if LV_USE_OS == LV_OS_FREERTOS
-#if (ESP_PLATFORM)
- #include "freertos/atomic.h"
-#else
- #include "atomic.h"
-#endif
+#include "atomic.h"
#include "../tick/lv_tick.h"
#include "../misc/lv_log.h"
@@ -54,7 +50,9 @@ static void prvCondInit(lv_thread_sync_t * pxCond);
static void prvCheckCondInit(lv_thread_sync_t * pxCond);
-#if !USE_FREERTOS_TASK_NOTIFY
+static void prvCheckCondInitIsr(lv_thread_sync_t * pxCond);
+
+#if !LV_USE_FREERTOS_TASK_NOTIFY
static void prvTestAndDecrement(lv_thread_sync_t * pxCond,
uint32_t ulLocalWaitingThreads);
#endif
@@ -74,9 +72,13 @@ static void prvTestAndDecrement(lv_thread_sync_t * pxCond,
#if (ESP_PLATFORM)
#define _enter_critical() taskENTER_CRITICAL(&critSectionMux);
#define _exit_critical() taskEXIT_CRITICAL(&critSectionMux);
+ #define _enter_critical_isr() taskENTER_CRITICAL_FROM_ISR();
+ #define _exit_critical_isr(x) taskEXIT_CRITICAL_FROM_ISR(x);
#else
#define _enter_critical() taskENTER_CRITICAL();
#define _exit_critical() taskEXIT_CRITICAL();
+ #define _enter_critical_isr() taskENTER_CRITICAL_FROM_ISR();
+ #define _exit_critical_isr(x) taskEXIT_CRITICAL_FROM_ISR(x);
#endif
/**********************
@@ -195,20 +197,20 @@ lv_result_t lv_thread_sync_wait(lv_thread_sync_t * pxCond)
/* If the cond is uninitialized, perform initialization. */
prvCheckCondInit(pxCond);
-#if USE_FREERTOS_TASK_NOTIFY
- TaskHandle_t current_task_handle = xTaskGetCurrentTaskHandle();
+#if LV_USE_FREERTOS_TASK_NOTIFY
+ TaskHandle_t xCurrentTaskHandle = xTaskGetCurrentTaskHandle();
_enter_critical();
- BaseType_t signal_sent = pxCond->xSyncSignal;
+ BaseType_t xSyncSygnal = pxCond->xSyncSignal;
pxCond->xSyncSignal = pdFALSE;
- if(signal_sent == pdFALSE) {
+ if(xSyncSygnal == pdFALSE) {
/* The signal hasn't been sent yet. Tell the sender to notify this task */
- pxCond->xTaskToNotify = current_task_handle;
+ pxCond->xTaskToNotify = xCurrentTaskHandle;
}
/* If we have a signal from the other task, we should not ask to be notified */
_exit_critical();
- if(signal_sent == pdFALSE) {
+ if(xSyncSygnal == pdFALSE) {
/* Wait for other task to notify this task. */
ulTaskNotifyTake(pdTRUE, portMAX_DELAY);
}
@@ -275,20 +277,20 @@ lv_result_t lv_thread_sync_signal(lv_thread_sync_t * pxCond)
/* If the cond is uninitialized, perform initialization. */
prvCheckCondInit(pxCond);
-#if USE_FREERTOS_TASK_NOTIFY
+#if LV_USE_FREERTOS_TASK_NOTIFY
_enter_critical();
- TaskHandle_t task_to_notify = pxCond->xTaskToNotify;
+ TaskHandle_t xTaskToNotify = pxCond->xTaskToNotify;
pxCond->xTaskToNotify = NULL;
- if(task_to_notify == NULL) {
+ if(xTaskToNotify == NULL) {
/* No task waiting to be notified. Send this signal for later */
pxCond->xSyncSignal = pdTRUE;
}
/* If a task is already waiting, there is no need to set the sync signal */
_exit_critical();
- if(task_to_notify != NULL) {
+ if(xTaskToNotify != NULL) {
/* There is a task waiting. Send a notification to it */
- xTaskNotifyGive(task_to_notify);
+ xTaskNotifyGive(xTaskToNotify);
}
/* If there was no task waiting to be notified, we sent a signal for it to see later. */
#else
@@ -329,13 +331,13 @@ lv_result_t lv_thread_sync_signal(lv_thread_sync_t * pxCond)
lv_result_t lv_thread_sync_delete(lv_thread_sync_t * pxCond)
{
-#if !USE_FREERTOS_TASK_NOTIFY
+#if !LV_USE_FREERTOS_TASK_NOTIFY
/* Cleanup all resources used by the cond. */
vSemaphoreDelete(pxCond->xCondWaitSemaphore);
vSemaphoreDelete(pxCond->xSyncMutex);
pxCond->ulWaitingThreads = 0;
- pxCond->xSyncSignal = pdFALSE;
#endif
+ pxCond->xSyncSignal = pdFALSE;
pxCond->xIsInitialized = pdFALSE;
return LV_RESULT_OK;
@@ -346,28 +348,28 @@ lv_result_t lv_thread_sync_signal_isr(lv_thread_sync_t * pxCond)
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
/* If the cond is uninitialized, perform initialization. */
- prvCheckCondInit(pxCond);
+ prvCheckCondInitIsr(pxCond);
-#if USE_FREERTOS_TASK_NOTIFY
- _enter_critical();
- TaskHandle_t task_to_notify = pxCond->xTaskToNotify;
+#if LV_USE_FREERTOS_TASK_NOTIFY
+ uint32_t mask = _enter_critical_isr();
+ TaskHandle_t xTaskToNotify = pxCond->xTaskToNotify;
pxCond->xTaskToNotify = NULL;
- if(task_to_notify == NULL) {
+ if(xTaskToNotify == NULL) {
/* No task waiting to be notified. Send this signal for later */
pxCond->xSyncSignal = pdTRUE;
}
/* If a task is already waiting, there is no need to set the sync signal */
- _exit_critical();
+ _exit_critical_isr(mask);
- if(task_to_notify != NULL) {
+ if(xTaskToNotify != NULL) {
/* There is a task waiting. Send a notification to it */
- vTaskNotifyGiveFromISR(task_to_notify, &xHigherPriorityTaskWoken);
+ vTaskNotifyGiveFromISR(xTaskToNotify, &xHigherPriorityTaskWoken);
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
}
/* If there was no task waiting to be notified, we sent a signal for it to see later. */
#else
/* Enter critical section to prevent preemption. */
- _enter_critical();
+ uint32_t mask = _enter_critical_isr();
pxCond->xSyncSignal = pdTRUE;
BaseType_t xAnyHigherPriorityTaskWoken = pdFALSE;
@@ -378,7 +380,7 @@ lv_result_t lv_thread_sync_signal_isr(lv_thread_sync_t * pxCond)
xHigherPriorityTaskWoken |= xAnyHigherPriorityTaskWoken;
}
- _exit_critical();
+ _exit_critical_isr(mask);
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
#endif
@@ -470,7 +472,7 @@ static void prvCondInit(lv_thread_sync_t * pxCond)
pxCond->xIsInitialized = pdTRUE;
pxCond->xSyncSignal = pdFALSE;
-#if USE_FREERTOS_TASK_NOTIFY
+#if LV_USE_FREERTOS_TASK_NOTIFY
pxCond->xTaskToNotify = NULL;
#else
pxCond->xCondWaitSemaphore = xSemaphoreCreateCounting(ulMAX_COUNT, 0U);
@@ -516,7 +518,27 @@ static void prvCheckCondInit(lv_thread_sync_t * pxCond)
}
}
-#if !USE_FREERTOS_TASK_NOTIFY
+static void prvCheckCondInitIsr(lv_thread_sync_t * pxCond)
+{
+ /* Check if the condition variable needs to be initialized. */
+ if(pxCond->xIsInitialized == pdFALSE) {
+ /* Cond initialization must be in a critical section to prevent two
+ * threads from initializing it at the same time. */
+ uint32_t mask = _enter_critical_isr();
+
+ /* Check again that the condition is still uninitialized, i.e. it wasn't
+ * initialized while this function was waiting to enter the critical
+ * section. */
+ if(pxCond->xIsInitialized == pdFALSE) {
+ prvCondInit(pxCond);
+ }
+
+ /* Exit the critical section. */
+ _exit_critical_isr(mask);
+ }
+}
+
+#if !LV_USE_FREERTOS_TASK_NOTIFY
static void prvTestAndDecrement(lv_thread_sync_t * pxCond,
uint32_t ulLocalWaitingThreads)
{
diff --git a/lib/libesp32_lvgl/lvgl/src/osal/lv_freertos.h b/lib/libesp32_lvgl/lvgl/src/osal/lv_freertos.h
index 2e2384d37..67a5a1e7f 100644
--- a/lib/libesp32_lvgl/lvgl/src/osal/lv_freertos.h
+++ b/lib/libesp32_lvgl/lvgl/src/osal/lv_freertos.h
@@ -37,14 +37,6 @@ extern "C" {
* DEFINES
*********************/
-/*
- * Unblocking an RTOS task with a direct notification is 45% faster and uses less RAM
- * than unblocking a task using an intermediary object such as a binary semaphore.
- *
- * RTOS task notifications can only be used when there is only one task that can be the recipient of the event.
- */
-#define USE_FREERTOS_TASK_NOTIFY 1
-
/**********************
* TYPEDEFS
**********************/
@@ -64,7 +56,7 @@ typedef struct {
BaseType_t
xIsInitialized; /**< Set to pdTRUE if this condition variable is initialized, pdFALSE otherwise. */
BaseType_t xSyncSignal; /**< Set to pdTRUE if the thread is signaled, pdFALSE otherwise. */
-#if USE_FREERTOS_TASK_NOTIFY
+#if LV_USE_FREERTOS_TASK_NOTIFY
TaskHandle_t xTaskToNotify; /**< The task waiting to be signalled. NULL if nothing is waiting. */
#else
SemaphoreHandle_t xCondWaitSemaphore; /**< Threads block on this semaphore in lv_thread_sync_wait. */
diff --git a/lib/libesp32_lvgl/lvgl/src/others/ime/lv_ime_pinyin.c b/lib/libesp32_lvgl/lvgl/src/others/ime/lv_ime_pinyin.c
index 08f43a143..8382269b7 100644
--- a/lib/libesp32_lvgl/lvgl/src/others/ime/lv_ime_pinyin.c
+++ b/lib/libesp32_lvgl/lvgl/src/others/ime/lv_ime_pinyin.c
@@ -707,7 +707,8 @@ static void lv_ime_pinyin_kb_event(lv_event_t * e)
}
else if((pinyin_ime->mode == LV_IME_PINYIN_MODE_K26) && ((txt[0] >= 'a' && txt[0] <= 'z') || (txt[0] >= 'A' &&
txt[0] <= 'Z'))) {
- lv_strcat(pinyin_ime->input_char, txt);
+ uint16_t len = lv_strlen(pinyin_ime->input_char);
+ lv_snprintf(pinyin_ime->input_char + len, sizeof(pinyin_ime->input_char) - len, "%s", txt);
pinyin_input_proc(obj);
pinyin_ime->ta_count++;
}
@@ -877,8 +878,8 @@ static void init_pinyin_dict(lv_obj_t * obj, const lv_pinyin_dict_t * dict)
}
else {
headletter = dict[i].py[0];
+ pinyin_ime->py_num[letter_calc] = offset_count;
letter_calc = headletter - 'a';
- pinyin_ime->py_num[letter_calc - 1] = offset_count;
offset_sum += offset_count;
pinyin_ime->py_pos[letter_calc] = offset_sum;
diff --git a/lib/libesp32_lvgl/lvgl/src/others/sysmon/lv_sysmon.c b/lib/libesp32_lvgl/lvgl/src/others/sysmon/lv_sysmon.c
index 1814dddf9..803ce8c5e 100644
--- a/lib/libesp32_lvgl/lvgl/src/others/sysmon/lv_sysmon.c
+++ b/lib/libesp32_lvgl/lvgl/src/others/sysmon/lv_sysmon.c
@@ -277,11 +277,10 @@ static void perf_update_timer_cb(lv_timer_t * t)
static void perf_observer_cb(lv_observer_t * observer, lv_subject_t * subject)
{
- lv_obj_t * label = lv_observer_get_target(observer);
const lv_sysmon_perf_info_t * perf = lv_subject_get_pointer(subject);
#if LV_USE_PERF_MONITOR_LOG_MODE
- LV_UNUSED(label);
+ LV_UNUSED(observer);
LV_LOG("sysmon: "
"%" LV_PRIu32 " FPS (refr_cnt: %" LV_PRIu32 " | redraw_cnt: %" LV_PRIu32"), "
"refr %" LV_PRIu32 "ms (render %" LV_PRIu32 "ms | flush %" LV_PRIu32 "ms), "
@@ -290,6 +289,7 @@ static void perf_observer_cb(lv_observer_t * observer, lv_subject_t * subject)
perf->calculated.refr_avg_time, perf->calculated.render_avg_time, perf->calculated.flush_avg_time,
perf->calculated.cpu);
#else
+ lv_obj_t * label = lv_observer_get_target(observer);
lv_label_set_text_fmt(
label,
"%" LV_PRIu32" FPS, %" LV_PRIu32 "%% CPU\n"
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/animimage/lv_animimage.c b/lib/libesp32_lvgl/lvgl/src/widgets/animimage/lv_animimage.c
index 11ec7ca1c..548c48c8c 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/animimage/lv_animimage.c
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/animimage/lv_animimage.c
@@ -134,6 +134,13 @@ uint32_t lv_animimg_get_repeat_count(lv_obj_t * obj)
return lv_anim_get_repeat_count(&animimg->anim);
}
+lv_anim_t * lv_animimg_get_anim(lv_obj_t * obj)
+{
+ LV_ASSERT_OBJ(obj, MY_CLASS);
+ lv_animimg_t * animimg = (lv_animimg_t *)obj;
+ return &animimg->anim;
+}
+
/**********************
* STATIC FUNCTIONS
**********************/
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/animimage/lv_animimage.h b/lib/libesp32_lvgl/lvgl/src/widgets/animimage/lv_animimage.h
index c7b3b0a8b..a2f1926c1 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/animimage/lv_animimage.h
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/animimage/lv_animimage.h
@@ -14,6 +14,7 @@ extern "C" {
* INCLUDES
*********************/
#include "../image/lv_image.h"
+#include "../../misc/lv_types.h"
#if LV_USE_ANIMIMG != 0
@@ -112,6 +113,13 @@ uint32_t lv_animimg_get_duration(lv_obj_t * img);
*/
uint32_t lv_animimg_get_repeat_count(lv_obj_t * img);
+/**
+ * Get the image animation underlying animation.
+ * @param img pointer to an animation image object
+ * @return the animation reference
+ */
+lv_anim_t * lv_animimg_get_anim(lv_obj_t * img);
+
#endif /*LV_USE_ANIMIMG*/
#ifdef __cplusplus
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/arc/lv_arc.c b/lib/libesp32_lvgl/lvgl/src/widgets/arc/lv_arc.c
index 7e4315c29..6aa14840d 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/arc/lv_arc.c
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/arc/lv_arc.c
@@ -199,6 +199,9 @@ void lv_arc_set_rotation(lv_obj_t * obj, int32_t rotation)
LV_ASSERT_OBJ(obj, MY_CLASS);
lv_arc_t * arc = (lv_arc_t *)obj;
+ /* ensure the angle is in the range [0, 360) */
+ while(rotation < 0) rotation += 360;
+ while(rotation >= 360) rotation -= 360;
arc->rotation = rotation;
lv_obj_invalidate(obj);
@@ -506,8 +509,9 @@ static void lv_arc_event(const lv_obj_class_t * class_p, lv_event_t * e)
angle -= arc->rotation;
angle -= arc->bg_angle_start; /*Make the angle relative to the start angle*/
- /* If we click near the bg_angle_start the angle will be close to 360° instead of a small angle */
- if(angle < 0) angle += 360;
+ /* ensure the angle is in the range [0, 360) */
+ while(angle < 0) angle += 360;
+ while(angle >= 360) angle -= 360;
const uint32_t circumference = (uint32_t)((2U * r * 314U) / 100U); /* Equivalent to: 2r * 3.14, avoiding floats */
const lv_value_precise_t tolerance_deg = (360 * lv_dpx(50U)) / circumference;
@@ -655,6 +659,25 @@ static void lv_arc_event(const lv_obj_class_t * class_p, lv_event_t * e)
return;
}
+ /*Calculate the angle of the pressed point*/
+ lv_value_precise_t angle = lv_atan2(info->point->y - p.y, info->point->x - p.x);
+ angle -= arc->rotation;
+ angle -= arc->bg_angle_start; /*Make the angle relative to the start angle*/
+
+ /* ensure the angle is in the range [0, 360) */
+ while(angle < 0) angle += 360;
+ while(angle >= 360) angle -= 360;
+
+ const uint32_t circumference = (uint32_t)((2U * r * 314U) / 100U); /* Equivalent to: 2r * 3.14, avoiding floats */
+ const lv_value_precise_t tolerance_deg = (360 * lv_dpx(50U)) / circumference;
+
+ /* Check if the angle is outside the drawn background arc */
+ const bool is_angle_within_bg_bounds = lv_arc_angle_within_bg_bounds(obj, angle, tolerance_deg);
+ if(!is_angle_within_bg_bounds) {
+ info->res = false;
+ return;
+ }
+
/*Valid if no clicked outside*/
lv_area_increase(&a, w + ext_click_area * 2, w + ext_click_area * 2);
info->res = lv_area_is_point_on(&a, info->point, LV_RADIUS_CIRCLE);
@@ -941,7 +964,10 @@ static bool lv_arc_angle_within_bg_bounds(lv_obj_t * obj, const lv_value_precise
lv_arc_t * arc = (lv_arc_t *)obj;
lv_value_precise_t bounds_angle = arc->bg_angle_end - arc->bg_angle_start;
- if(bounds_angle < 0) bounds_angle += 360;
+
+ /* ensure the angle is in the range [0, 360) */
+ while(bounds_angle < 0) bounds_angle += 360;
+ while(bounds_angle >= 360) bounds_angle -= 360;
/* Angle is in the bounds */
if(angle <= bounds_angle) {
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/bar/lv_bar_private.h b/lib/libesp32_lvgl/lvgl/src/widgets/bar/lv_bar_private.h
index 891d14a34..1a8dd4bb1 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/bar/lv_bar_private.h
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/bar/lv_bar_private.h
@@ -44,8 +44,8 @@ struct lv_bar_t {
bool val_reversed; /**< Whether value been reversed */
lv_bar_anim_t cur_value_anim;
lv_bar_anim_t start_value_anim;
- lv_bar_mode_t mode : 2; /**< Type of bar*/
- lv_bar_orientation_t orientation : 2; /**< Orientation of bar*/
+ lv_bar_mode_t mode : 3; /**< Type of bar*/
+ lv_bar_orientation_t orientation : 3; /**< Orientation of bar*/
};
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/buttonmatrix/lv_buttonmatrix.c b/lib/libesp32_lvgl/lvgl/src/widgets/buttonmatrix/lv_buttonmatrix.c
index b05602de4..e20ac2ebe 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/buttonmatrix/lv_buttonmatrix.c
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/buttonmatrix/lv_buttonmatrix.c
@@ -51,7 +51,7 @@ static bool button_is_popover(lv_buttonmatrix_ctrl_t ctrl_bits);
static bool button_is_checkable(lv_buttonmatrix_ctrl_t ctrl_bits);
static bool button_get_checked(lv_buttonmatrix_ctrl_t ctrl_bits);
static uint32_t get_button_from_point(lv_obj_t * obj, lv_point_t * p);
-static void allocate_button_areas_and_controls(const lv_obj_t * obj, const char ** map);
+static void allocate_button_areas_and_controls(const lv_obj_t * obj, const char * const * map);
static void invalidate_button_area(const lv_obj_t * obj, uint32_t btn_idx);
static void make_one_button_checked(lv_obj_t * obj, uint32_t btn_idx);
static bool has_popovers_in_top_row(lv_obj_t * obj);
@@ -60,7 +60,7 @@ static bool has_popovers_in_top_row(lv_obj_t * obj);
* STATIC VARIABLES
**********************/
#if LV_WIDGETS_HAS_DEFAULT_VALUE
-static const char * lv_buttonmatrix_def_map[] = {"Btn1", "Btn2", "Btn3", "\n", "Btn4", "Btn5", ""};
+static const char * const lv_buttonmatrix_def_map[] = {"Btn1", "Btn2", "Btn3", "\n", "Btn4", "Btn5", ""};
#endif
const lv_obj_class_t lv_buttonmatrix_class = {
@@ -96,7 +96,7 @@ lv_obj_t * lv_buttonmatrix_create(lv_obj_t * parent)
* Setter functions
*====================*/
-void lv_buttonmatrix_set_map(lv_obj_t * obj, const char * map[])
+void lv_buttonmatrix_set_map(lv_obj_t * obj, const char * const map[])
{
LV_ASSERT_OBJ(obj, MY_CLASS);
if(map == NULL) return;
@@ -125,7 +125,7 @@ void lv_buttonmatrix_set_map(lv_obj_t * obj, const char * map[])
*(A button can be 1,2,3... unit wide)*/
uint32_t txt_tot_i = 0; /*Act. index in the str map*/
uint32_t btn_tot_i = 0; /*Act. index of button areas*/
- const char ** map_row = map;
+ const char * const * map_row = map;
/*Count the units and the buttons in a line*/
uint32_t row;
@@ -295,7 +295,7 @@ void lv_buttonmatrix_set_one_checked(lv_obj_t * obj, bool en)
* Getter functions
*====================*/
-const char ** lv_buttonmatrix_get_map(const lv_obj_t * obj)
+const char * const * lv_buttonmatrix_get_map(const lv_obj_t * obj)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
@@ -813,7 +813,7 @@ static void draw_main(lv_event_t * e)
* @param obj pointer to button matrix object
* @param map_p pointer to a string array
*/
-static void allocate_button_areas_and_controls(const lv_obj_t * obj, const char ** map)
+static void allocate_button_areas_and_controls(const lv_obj_t * obj, const char * const * map)
{
lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj;
btnm->row_cnt = 1;
@@ -1029,7 +1029,7 @@ static bool has_popovers_in_top_row(lv_obj_t * obj)
return false;
}
- const char ** map_row = btnm->map_p;
+ const char * const * map_row = btnm->map_p;
uint32_t btn_cnt = 0;
while(map_row[btn_cnt] && lv_strcmp(map_row[btn_cnt], "\n") != 0 && map_row[btn_cnt][0] != '\0') {
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/buttonmatrix/lv_buttonmatrix.h b/lib/libesp32_lvgl/lvgl/src/widgets/buttonmatrix/lv_buttonmatrix.h
index c095eec35..c2726627c 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/buttonmatrix/lv_buttonmatrix.h
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/buttonmatrix/lv_buttonmatrix.h
@@ -73,7 +73,7 @@ lv_obj_t * lv_buttonmatrix_create(lv_obj_t * parent);
* @param obj pointer to a button matrix object
* @param map pointer a string array. The last string has to be: "". Use "\n" to make a line break.
*/
-void lv_buttonmatrix_set_map(lv_obj_t * obj, const char * map[]);
+void lv_buttonmatrix_set_map(lv_obj_t * obj, const char * const map[]);
/**
* Set the button control map (hidden, disabled etc.) for a button matrix.
@@ -155,7 +155,7 @@ void lv_buttonmatrix_set_one_checked(lv_obj_t * obj, bool en);
* @param obj pointer to a button matrix object
* @return the current map
*/
-const char ** lv_buttonmatrix_get_map(const lv_obj_t * obj);
+const char * const * lv_buttonmatrix_get_map(const lv_obj_t * obj);
/**
* Get the index of the lastly "activated" button by the user (pressed, released, focused etc)
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/buttonmatrix/lv_buttonmatrix_private.h b/lib/libesp32_lvgl/lvgl/src/widgets/buttonmatrix/lv_buttonmatrix_private.h
index 6893b0e1e..cab042db9 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/buttonmatrix/lv_buttonmatrix_private.h
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/buttonmatrix/lv_buttonmatrix_private.h
@@ -30,7 +30,7 @@ extern "C" {
/** Data of button matrix */
struct lv_buttonmatrix_t {
lv_obj_t obj;
- const char ** map_p; /**< Pointer to the current map */
+ const char * const * map_p; /**< Pointer to the current map */
lv_area_t * button_areas; /**< Array of areas of buttons */
lv_buttonmatrix_ctrl_t * ctrl_bits; /**< Array of control bytes */
uint32_t btn_cnt; /**< Number of button in 'map_p'(Handled by the library) */
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/calendar/lv_calendar_chinese.c b/lib/libesp32_lvgl/lvgl/src/widgets/calendar/lv_calendar_chinese.c
index 81c844bf1..ee24133ad 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/calendar/lv_calendar_chinese.c
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/calendar/lv_calendar_chinese.c
@@ -6,7 +6,6 @@
/*********************
* INCLUDES
*********************/
-#include "lv_calendar_chinese_private.h"
#include "lv_calendar_private.h"
#if LV_USE_CALENDAR && LV_USE_CALENDAR_CHINESE
@@ -124,7 +123,7 @@ const char * lv_calendar_get_day_name(lv_calendar_date_t * gregorian)
{
uint16_t i, len;
lv_calendar_chinese_t chinese_calendar;
- chinese_calendar = lv_calendar_gregorian_to_chinese(gregorian);
+ lv_calendar_gregorian_to_chinese(gregorian, &chinese_calendar);
if(gregorian->year > 2099 || gregorian->year < 1901)
return NULL;
@@ -170,11 +169,11 @@ const char * lv_calendar_get_day_name(lv_calendar_date_t * gregorian)
return (char *)chinese_calendar_day_name[chinese_calendar.today.day - 1];
}
-lv_calendar_chinese_t lv_calendar_gregorian_to_chinese(lv_calendar_date_t * gregorian)
+void lv_calendar_gregorian_to_chinese(lv_calendar_date_t * gregorian_time, lv_calendar_chinese_t * chinese_time)
{
- uint16_t year = gregorian->year;
- uint8_t month = gregorian->month;
- uint8_t day = gregorian->day;
+ uint16_t year = gregorian_time->year;
+ uint8_t month = gregorian_time->month;
+ uint8_t day = gregorian_time->day;
/*Record the number of days between the Spring Festival
and the New Year's Day of that year.*/
@@ -191,14 +190,13 @@ lv_calendar_chinese_t lv_calendar_gregorian_to_chinese(lv_calendar_date_t * greg
uint8_t index;
bool leep_month;
- lv_calendar_chinese_t chinese_calendar;
if(year < 1901 || year > 2099) {
- chinese_calendar.leep_month = 0;
- chinese_calendar.today.year = 2000;
- chinese_calendar.today.month = 1;
- chinese_calendar.today.day = 1;
- return chinese_calendar;
+ chinese_time->leep_month = 0;
+ chinese_time->today.year = 2000;
+ chinese_time->today.month = 1;
+ chinese_time->today.day = 1;
+ return;
}
if(((calendar_chinese_table[year - 1901] & 0x0060) >> 5) == 1)
@@ -274,11 +272,10 @@ lv_calendar_chinese_t lv_calendar_gregorian_to_chinese(lv_calendar_date_t * greg
day = days_per_month - by_spring + 1;
}
- chinese_calendar.today.day = day;
- chinese_calendar.today.month = month;
- chinese_calendar.today.year = year;
- chinese_calendar.leep_month = leep_month;
- return chinese_calendar;
+ chinese_time->today.day = day;
+ chinese_time->today.month = month;
+ chinese_time->today.year = year;
+ chinese_time->leep_month = leep_month;
}
/**********************
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/calendar/lv_calendar_chinese.h b/lib/libesp32_lvgl/lvgl/src/widgets/calendar/lv_calendar_chinese.h
index 8d5b174ab..fb7a1bc0e 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/calendar/lv_calendar_chinese.h
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/calendar/lv_calendar_chinese.h
@@ -21,6 +21,15 @@ extern "C" {
* DEFINES
*********************/
+/**********************
+ * TYPEDEFS
+ **********************/
+
+typedef struct {
+ lv_calendar_date_t today;
+ bool leep_month;
+} lv_calendar_chinese_t;
+
/**********************
* GLOBAL PROTOTYPES
**********************/
@@ -41,10 +50,10 @@ const char * lv_calendar_get_day_name(lv_calendar_date_t * gregorian);
/**
* Get the chinese time of the gregorian time (reference: https://www.cnblogs.com/liyang31tg/p/4123171.html)
- * @param gregorian need to convert to chinese time in gregorian time
- * @return return the chinese time of the gregorian time
+ * @param gregorian_time need to convert to chinese time in gregorian time
+ * @param chinese_time the chinese time convert from gregorian time
*/
-lv_calendar_chinese_t lv_calendar_gregorian_to_chinese(lv_calendar_date_t * gregorian);
+void lv_calendar_gregorian_to_chinese(lv_calendar_date_t * gregorian_time, lv_calendar_chinese_t * chinese_time);
/**********************
* MACROS
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/dropdown/lv_dropdown.c b/lib/libesp32_lvgl/lvgl/src/widgets/dropdown/lv_dropdown.c
index 1b34b44fc..517479cdb 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/dropdown/lv_dropdown.c
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/dropdown/lv_dropdown.c
@@ -862,7 +862,6 @@ static void draw_main(lv_event_t * e)
int32_t border_width = lv_obj_get_style_border_width(obj, LV_PART_MAIN);
int32_t left = lv_obj_get_style_pad_left(obj, LV_PART_MAIN) + border_width;
int32_t right = lv_obj_get_style_pad_right(obj, LV_PART_MAIN) + border_width;
- int32_t top = lv_obj_get_style_pad_top(obj, LV_PART_MAIN) + border_width;
lv_draw_label_dsc_t symbol_dsc;
lv_draw_label_dsc_init(&symbol_dsc);
@@ -906,24 +905,22 @@ static void draw_main(lv_event_t * e)
}
lv_area_t symbol_area;
+ symbol_area.y1 = obj->coords.y1;
+ symbol_area.y2 = symbol_area.y1 + symbol_h - 1;
+ symbol_area.x1 = obj->coords.x1;
+ symbol_area.x2 = symbol_area.x1 + symbol_w - 1;
if(symbol_to_left) {
- symbol_area.x1 = obj->coords.x1 + left;
- symbol_area.x2 = symbol_area.x1 + symbol_w - 1;
+ lv_area_align(&obj->coords, &symbol_area, LV_ALIGN_LEFT_MID, left, 0);
}
else {
- symbol_area.x1 = obj->coords.x2 - right - symbol_w;
- symbol_area.x2 = symbol_area.x1 + symbol_w - 1;
+ lv_area_align(&obj->coords, &symbol_area, LV_ALIGN_RIGHT_MID, -right, 0);
}
if(symbol_type == LV_IMAGE_SRC_SYMBOL) {
- symbol_area.y1 = obj->coords.y1 + top;
- symbol_area.y2 = symbol_area.y1 + symbol_h - 1;
symbol_dsc.text = dropdown->symbol;
lv_draw_label(layer, &symbol_dsc, &symbol_area);
}
else {
- symbol_area.y1 = obj->coords.y1 + (lv_obj_get_height(obj) - symbol_h) / 2;
- symbol_area.y2 = symbol_area.y1 + symbol_h - 1;
lv_draw_image_dsc_t img_dsc;
lv_draw_image_dsc_init(&img_dsc);
lv_obj_init_draw_image_dsc(obj, LV_PART_INDICATOR, &img_dsc);
@@ -943,22 +940,21 @@ static void draw_main(lv_event_t * e)
label_dsc.flag);
lv_area_t txt_area;
- txt_area.y1 = obj->coords.y1 + top;
- txt_area.y2 = txt_area.y1 + size.y;
+ txt_area.x1 = obj->coords.x1;
+ txt_area.x2 = txt_area.x1 + size.x - 1;
+ txt_area.y1 = obj->coords.y1;
+ txt_area.y2 = txt_area.y1 + size.y - 1;
/*Center align the text if no symbol*/
if(dropdown->symbol == NULL) {
- txt_area.x1 = obj->coords.x1 + (lv_obj_get_width(obj) - size.x) / 2;
- txt_area.x2 = txt_area.x1 + size.x;
+ lv_area_align(&obj->coords, &txt_area, LV_ALIGN_CENTER, 0, 0);
}
else {
/*Text to the right*/
if(symbol_to_left) {
- txt_area.x1 = obj->coords.x2 - right - size.x;
- txt_area.x2 = txt_area.x1 + size.x;
+ lv_area_align(&obj->coords, &txt_area, LV_ALIGN_RIGHT_MID, -right, 0);
}
else {
- txt_area.x1 = obj->coords.x1 + left;
- txt_area.x2 = txt_area.x1 + size.x;
+ lv_area_align(&obj->coords, &txt_area, LV_ALIGN_LEFT_MID, left, 0);
}
}
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/image/lv_image.c b/lib/libesp32_lvgl/lvgl/src/widgets/image/lv_image.c
index 147429436..5fdcc12d5 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/image/lv_image.c
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/image/lv_image.c
@@ -435,6 +435,11 @@ void lv_image_set_inner_align(lv_obj_t * obj, lv_image_align_t align)
lv_image_t * img = (lv_image_t *)obj;
if(align == img->align) return;
+ /*If we're removing STRETCH, reset the scale*/
+ if(img->align == LV_IMAGE_ALIGN_STRETCH) {
+ lv_image_set_scale(obj, LV_SCALE_NONE);
+ }
+
img->align = align;
update_align(obj);
@@ -849,9 +854,11 @@ static void update_align(lv_obj_t * obj)
if(img->align == LV_IMAGE_ALIGN_STRETCH) {
lv_image_set_rotation(obj, 0);
lv_image_set_pivot(obj, 0, 0);
- int32_t scale_x = lv_obj_get_width(obj) * LV_SCALE_NONE / img->w;
- int32_t scale_y = lv_obj_get_height(obj) * LV_SCALE_NONE / img->h;
- scale_update(obj, scale_x, scale_y);
+ if(img->w != 0 && img->h != 0) {
+ int32_t scale_x = lv_obj_get_width(obj) * LV_SCALE_NONE / img->w;
+ int32_t scale_y = lv_obj_get_height(obj) * LV_SCALE_NONE / img->h;
+ scale_update(obj, scale_x, scale_y);
+ }
}
else if(img->align == LV_IMAGE_ALIGN_TILE) {
lv_image_set_rotation(obj, 0);
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/keyboard/lv_keyboard.c b/lib/libesp32_lvgl/lvgl/src/widgets/keyboard/lv_keyboard.c
index 050a62a7c..e781eb397 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/keyboard/lv_keyboard.c
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/keyboard/lv_keyboard.c
@@ -176,19 +176,19 @@ static const lv_buttonmatrix_ctrl_t default_kb_ctrl_num_map[] = {
1, 1, 1, 1, 1
};
-static const char * * kb_map[10] = {
- (const char * *)default_kb_map_lc,
- (const char * *)default_kb_map_uc,
- (const char * *)default_kb_map_spec,
- (const char * *)default_kb_map_num,
- (const char * *)default_kb_map_lc,
- (const char * *)default_kb_map_lc,
- (const char * *)default_kb_map_lc,
- (const char * *)default_kb_map_lc,
+static const char * const * kb_map[10] = {
+ default_kb_map_lc,
+ default_kb_map_uc,
+ default_kb_map_spec,
+ default_kb_map_num,
+ default_kb_map_lc,
+ default_kb_map_lc,
+ default_kb_map_lc,
+ default_kb_map_lc,
#if LV_USE_ARABIC_PERSIAN_CHARS == 1
- (const char * *)default_kb_map_ar,
+ default_kb_map_ar,
#endif
- (const char * *)NULL
+ NULL
};
static const lv_buttonmatrix_ctrl_t * kb_ctrl[10] = {
default_kb_ctrl_lc_map,
@@ -269,7 +269,7 @@ void lv_keyboard_set_popovers(lv_obj_t * obj, bool en)
lv_keyboard_update_ctrl_map(obj);
}
-void lv_keyboard_set_map(lv_obj_t * obj, lv_keyboard_mode_t mode, const char * map[],
+void lv_keyboard_set_map(lv_obj_t * obj, lv_keyboard_mode_t mode, const char * const map[],
const lv_buttonmatrix_ctrl_t ctrl_map[])
{
LV_ASSERT_OBJ(obj, MY_CLASS);
@@ -410,7 +410,7 @@ void lv_keyboard_def_event_cb(lv_event_t * e)
}
}
-const char ** lv_keyboard_get_map_array(const lv_obj_t * kb)
+const char * const * lv_keyboard_get_map_array(const lv_obj_t * kb)
{
return lv_buttonmatrix_get_map(kb);
}
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/keyboard/lv_keyboard.h b/lib/libesp32_lvgl/lvgl/src/widgets/keyboard/lv_keyboard.h
index b315e97cc..f177c1844 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/keyboard/lv_keyboard.h
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/keyboard/lv_keyboard.h
@@ -107,7 +107,7 @@ void lv_keyboard_set_popovers(lv_obj_t * kb, bool en);
* @param ctrl_map See 'lv_buttonmatrix_set_ctrl_map()' for more info.
*/
-void lv_keyboard_set_map(lv_obj_t * kb, lv_keyboard_mode_t mode, const char * map[],
+void lv_keyboard_set_map(lv_obj_t * kb, lv_keyboard_mode_t mode, const char * const map[],
const lv_buttonmatrix_ctrl_t ctrl_map[]);
/*=====================
@@ -140,7 +140,7 @@ bool lv_keyboard_get_popovers(const lv_obj_t * obj);
* @param kb pointer to a keyboard object
* @return the current map
*/
-const char ** lv_keyboard_get_map_array(const lv_obj_t * kb);
+const char * const * lv_keyboard_get_map_array(const lv_obj_t * kb);
/**
* Get the index of the lastly "activated" button by the user (pressed, released, focused etc)
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/roller/lv_roller.c b/lib/libesp32_lvgl/lvgl/src/widgets/roller/lv_roller.c
index efdb8d81d..b762a1e25 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/roller/lv_roller.c
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/roller/lv_roller.c
@@ -158,13 +158,19 @@ void lv_roller_set_options(lv_obj_t * obj, const char * options, lv_roller_mode_
LV_LOG_INFO("Using %" LV_PRIu32 " pages to make the roller look infinite", roller->inf_page_cnt);
size_t opt_len = lv_strlen(options) + 1; /*+1 to add '\n' after option lists*/
- char * opt_extra = lv_malloc(opt_len * roller->inf_page_cnt);
+ size_t opt_extra_len = opt_len * roller->inf_page_cnt;
+ if(opt_extra_len == 0) {
+ /*Prevent write overflow*/
+ opt_extra_len = 1;
+ }
+
+ char * opt_extra = lv_malloc(opt_extra_len);
uint32_t i;
for(i = 0; i < roller->inf_page_cnt; i++) {
lv_strcpy(&opt_extra[opt_len * i], options);
opt_extra[opt_len * (i + 1) - 1] = '\n';
}
- opt_extra[opt_len * roller->inf_page_cnt - 1] = '\0';
+ opt_extra[opt_extra_len - 1] = '\0';
lv_label_set_text(label, opt_extra);
lv_free(opt_extra);
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/span/lv_span.c b/lib/libesp32_lvgl/lvgl/src/widgets/span/lv_span.c
index a6a287e94..c4afb4373 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/span/lv_span.c
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/span/lv_span.c
@@ -442,7 +442,7 @@ int32_t lv_spangroup_get_expand_height(lv_obj_t * obj, int32_t width)
/* coords of draw span-txt */
lv_point_t txt_pos;
- lv_point_set(&txt_pos, 0, indent); /* first line need add indent */
+ lv_point_set(&txt_pos, indent, 0); /* first line need add indent */
lv_span_t * cur_span = lv_ll_get_head(&spans->child_ll);
const char * cur_txt = cur_span->txt;
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/textarea/lv_textarea.c b/lib/libesp32_lvgl/lvgl/src/widgets/textarea/lv_textarea.c
index 02f1b1614..1958371b3 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/textarea/lv_textarea.c
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/textarea/lv_textarea.c
@@ -1403,11 +1403,16 @@ static void draw_placeholder(lv_event_t * e)
if(ta->one_line) ph_dsc.flag |= LV_TEXT_FLAG_EXPAND;
int32_t left = lv_obj_get_style_pad_left(obj, LV_PART_MAIN);
+ int32_t right = lv_obj_get_style_pad_right(obj, LV_PART_MAIN);
int32_t top = lv_obj_get_style_pad_top(obj, LV_PART_MAIN);
+ int32_t bottom = lv_obj_get_style_pad_bottom(obj, LV_PART_MAIN);
int32_t border_width = lv_obj_get_style_border_width(obj, LV_PART_MAIN);
lv_area_t ph_coords;
lv_area_copy(&ph_coords, &obj->coords);
- lv_area_move(&ph_coords, left + border_width, top + border_width);
+ ph_coords.x1 += left + border_width;
+ ph_coords.x2 -= right + border_width;
+ ph_coords.y1 += top + border_width;
+ ph_coords.y2 -= bottom + border_width;
ph_dsc.text = ta->placeholder_txt;
lv_draw_label(layer, &ph_dsc, &ph_coords);
}
diff --git a/pio-tools/post_esp32.py b/pio-tools/post_esp32.py
index e296be29e..e986a5021 100644
--- a/pio-tools/post_esp32.py
+++ b/pio-tools/post_esp32.py
@@ -38,33 +38,36 @@ from SCons.Script import COMMAND_LINE_TARGETS
sys.path.append(join(platform.get_package_dir("tool-esptoolpy")))
import esptool
+config = env.GetProjectConfig()
variants_dir = env.BoardConfig().get("build.variants_dir", "")
variant = env.BoardConfig().get("build.variant", "")
sections = env.subst(env.get("FLASH_EXTRA_IMAGES"))
chip = env.get("BOARD_MCU")
mcu_build_variant = env.BoardConfig().get("build.variant", "").lower()
+flag_custom_sdkconfig = config.has_option("env:"+env["PIOENV"], "custom_sdkconfig")
+flag_board_sdkconfig = env.BoardConfig().get("espidf.custom_sdkconfig", "")
# Copy safeboots firmwares in place when running in Github
github_actions = os.getenv('GITHUB_ACTIONS')
extra_flags = ''.join([element.replace("-D", " ") for element in env.BoardConfig().get("build.extra_flags", "")])
build_flags = ''.join([element.replace("-D", " ") for element in env.GetProjectOption("build_flags")])
-if "CORE32SOLO1" in extra_flags or "FRAMEWORK_ARDUINO_SOLO1" in build_flags:
+if ("CORE32SOLO1" in extra_flags or "FRAMEWORK_ARDUINO_SOLO1" in build_flags) and flag_custom_sdkconfig == False and flag_board_sdkconfig == "":
FRAMEWORK_DIR = platform.get_package_dir("framework-arduino-solo1")
if github_actions and os.path.exists("./firmware/firmware"):
- shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduino-solo1/variants/tasmota")
+ shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduino-solo1/variants/tasmota", dirs_exist_ok=True)
if variants_dir:
shutil.copytree("./firmware/firmware", variants_dir, dirs_exist_ok=True)
-elif "CORE32ITEAD" in extra_flags or "FRAMEWORK_ARDUINO_ITEAD" in build_flags:
+elif ("CORE32ITEAD" in extra_flags or "FRAMEWORK_ARDUINO_ITEAD" in build_flags) and flag_custom_sdkconfig == False and flag_board_sdkconfig == "":
FRAMEWORK_DIR = platform.get_package_dir("framework-arduino-ITEAD")
if github_actions and os.path.exists("./firmware/firmware"):
- shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduino-ITEAD/variants/tasmota")
+ shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduino-ITEAD/variants/tasmota", dirs_exist_ok=True)
if variants_dir:
shutil.copytree("./firmware/firmware", variants_dir, dirs_exist_ok=True)
else:
FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32")
if github_actions and os.path.exists("./firmware/firmware"):
- shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduinoespressif32/variants/tasmota")
+ shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduinoespressif32/variants/tasmota", dirs_exist_ok=True)
if variants_dir:
shutil.copytree("./firmware/firmware", variants_dir, dirs_exist_ok=True)
@@ -129,7 +132,7 @@ def patch_partitions_bin(size_string):
def esp32_create_chip_string(chip):
tasmota_platform_org = env.subst("$BUILD_DIR").split(os.path.sep)[-1]
tasmota_platform = tasmota_platform_org.split('-')[0]
- if ("CORE32SOLO1" in extra_flags or "FRAMEWORK_ARDUINO_SOLO1" in build_flags) and "tasmota32-safeboot" not in tasmota_platform_org and "tasmota32solo1" not in tasmota_platform_org:
+ if ("CORE32SOLO1" in extra_flags or "FRAMEWORK_ARDUINO_SOLO1" in build_flags) and "tasmota32-safeboot" not in tasmota_platform_org and "tasmota32solo1" not in tasmota_platform_org and flag_custom_sdkconfig == False:
print(Fore.YELLOW + "Unexpected naming convention in this build environment:" + Fore.RED, tasmota_platform_org)
print(Fore.YELLOW + "Expected build environment name like " + Fore.GREEN + "'tasmota32solo1-whatever-you-want'")
print(Fore.YELLOW + "Please correct your actual build environment, to avoid undefined behavior in build process!!")
diff --git a/pio-tools/strip-flags.py b/pio-tools/strip-flags.py
index 981918273..60cabbde3 100644
--- a/pio-tools/strip-flags.py
+++ b/pio-tools/strip-flags.py
@@ -8,8 +8,8 @@ if "FIRMWARE_SAFEBOOT" in build_flags:
try:
link_flags.pop(link_flags.index("-Wl,--wrap=panicHandler"))
except:
- do_nothing=""
+ pass
try:
link_flags.pop(link_flags.index("-Wl,--wrap=xt_unhandled_exception"))
except:
- do_nothing=""
\ No newline at end of file
+ pass
diff --git a/platformio_override_sample.ini b/platformio_override_sample.ini
index 7604a1144..22ea0d674 100644
--- a/platformio_override_sample.ini
+++ b/platformio_override_sample.ini
@@ -80,8 +80,6 @@ lib_extra_dirs = ${library.lib_extra_dirs}
;platform = https://github.com/Jason2866/platform-espressif32/releases/download/2024.07.22/platform-espressif32.zip
;platform_packages = framework-arduinoespressif32 @
-; framework-arduino-solo1 @
-; framework-arduino-ITEAD @
;build_unflags = ${esp32_defaults.build_unflags}
;build_flags = ${esp32_defaults.build_flags}
;board = esp32
diff --git a/platformio_tasmota32.ini b/platformio_tasmota32.ini
index df2702f0c..0c3b4c955 100644
--- a/platformio_tasmota32.ini
+++ b/platformio_tasmota32.ini
@@ -8,7 +8,6 @@ build_unflags = ${esp_defaults.build_unflags}
-Wincompatible-pointer-types
-Wnonnull-compare
-fexceptions
- -fno-lto
-Wpointer-arith
build_flags = ${esp_defaults.build_flags}
; comment next line to disable IPv6 support
@@ -17,7 +16,6 @@ build_flags = ${esp_defaults.build_flags}
-Wno-switch-unreachable
-Wno-stringop-overflow
-fno-exceptions
- -flto=auto
-DBUFFER_LENGTH=128
-DHTTP_UPLOAD_BUFLEN=2048
-DMQTT_MAX_PACKET_SIZE=1200
@@ -54,6 +52,7 @@ monitor_filters = esp32_exception_decoder
[safeboot_flags]
lib_ignore = ${esp32_defaults.lib_ignore}
+ ESPmDNS
LinkedList
ESP Mail Client
IRremoteESP8266
@@ -82,7 +81,7 @@ lib_ignore = ${esp32_defaults.lib_ignore}
ccronexpr
[core32]
-platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.09.30/platform-espressif32.zip
+platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.12.30/platform-espressif32.zip
platform_packages =
build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${esp32_defaults.build_flags}
diff --git a/platformio_tasmota_cenv_sample.ini b/platformio_tasmota_cenv_sample.ini
index 3643e3d7c..9c0576147 100644
--- a/platformio_tasmota_cenv_sample.ini
+++ b/platformio_tasmota_cenv_sample.ini
@@ -102,6 +102,7 @@ extends = env:tasmota32_base
build_flags = ${env:tasmota32_base.build_flags}
-DFIRMWARE_BLUETOOTH
-DUSE_MI_EXT_GUI
+ -DCONFIG_BT_NIMBLE_NVS_PERSIST=y
-DOTA_URL='""'
lib_extra_dirs = lib/libesp32, lib/libesp32_div, lib/lib_basic, lib/lib_i2c, lib/lib_div, lib/lib_ssl
lib_ignore = Micro-RTSP
@@ -112,6 +113,7 @@ board = esp32c3
build_flags = ${env:tasmota32_base.build_flags}
-DFIRMWARE_BLUETOOTH
-DUSE_MI_EXT_GUI
+ -DCONFIG_BT_NIMBLE_NVS_PERSIST=y
-DOTA_URL='""'
lib_extra_dirs = lib/libesp32, lib/libesp32_div, lib/lib_basic, lib/lib_i2c, lib/lib_div, lib/lib_ssl
lib_ignore = Micro-RTSP
@@ -122,6 +124,7 @@ board = esp32s3-qio_qspi
build_flags = ${env:tasmota32_base.build_flags}
-DFIRMWARE_BLUETOOTH
-DUSE_MI_EXT_GUI
+ -DCONFIG_BT_NIMBLE_NVS_PERSIST=y
-DOTA_URL='""'
lib_extra_dirs = lib/libesp32, lib/libesp32_div, lib/lib_basic, lib/lib_i2c, lib/lib_div, lib/lib_ssl
lib_ignore = Micro-RTSP
@@ -132,6 +135,7 @@ board = esp32c6
build_flags = ${env:tasmota32_base.build_flags}
-DFIRMWARE_BLUETOOTH
-DUSE_MI_EXT_GUI
+ -DCONFIG_BT_NIMBLE_NVS_PERSIST=y
-DOTA_URL='""'
; *** Debug version used for PlatformIO Home Project Inspection
@@ -173,13 +177,14 @@ build_flags = ${env:tasmota32_base.build_flags}
[env:tasmota32solo1-ocd]
build_type = debug
extends = env:tasmota32solo1
-board = esp32_solo1
+board = esp32-solo1
debug_tool = esp-prog
upload_protocol = esp-prog
debug_init_break = tbreak setup
build_unflags = ${env:tasmota32_base.build_unflags}
build_flags = ${env:tasmota32_base.build_flags}
-DOTA_URL='""'
+custom_sdkconfig = CONFIG_FREERTOS_UNICORE=y
[env:tasmota32s2-ocd]
build_type = debug
diff --git a/platformio_tasmota_env32.ini b/platformio_tasmota_env32.ini
index ef8d46a58..5b6baa383 100644
--- a/platformio_tasmota_env32.ini
+++ b/platformio_tasmota_env32.ini
@@ -28,7 +28,7 @@ custom_files_upload = no_files
[env:tasmota32-safeboot]
extends = env:tasmota32_base
-board = esp32_solo1
+board = esp32-solo1
board_build.app_partition_name = safeboot
build_flags = ${env:tasmota32_base.build_flags}
-DFRAMEWORK_ARDUINO_SOLO1
@@ -39,7 +39,7 @@ lib_ignore = ${safeboot_flags.lib_ignore}
[env:tasmota32solo1-safeboot]
extends = env:tasmota32_base
-board = esp32_solo1
+board = esp32-solo1
board_build.app_partition_name = safeboot
build_flags = ${env:tasmota32_base.build_flags}
-DFIRMWARE_SAFEBOOT
@@ -145,7 +145,7 @@ build_flags = ${env:tasmota32_base.build_flags}
[env:tasmota32solo1]
extends = env:tasmota32_base
-board = esp32_solo1
+board = esp32-solo1
build_flags = ${env:tasmota32_base.build_flags}
-DFIRMWARE_TASMOTA32
-DCODE_IMAGE_STR='"solo1"'
@@ -255,6 +255,8 @@ build_flags = ${env:tasmota32_base.build_flags}
-DFIRMWARE_IR
-DOTA_URL='"http://ota.tasmota.com/tasmota32/release/tasmota32-ir.bin"'
lib_extra_dirs = lib/libesp32, lib/lib_basic, lib/lib_ssl
+lib_ignore = ${env:tasmota32_base.lib_ignore}
+ Micro-RTSP
[env:tasmota32-zbbrdgpro]
extends = env:tasmota32_base
@@ -270,6 +272,11 @@ custom_files_upload = ${env:tasmota32_base.custom_files_upload}
tasmota/berry/zigbee/sonoff_zb_pro_flasher.be
tools/fw_SonoffZigbeeBridgePro_cc2652/SonoffZBPro_coord_20220219.hex
lib_extra_dirs = lib/lib_basic, lib/lib_ssl, lib/libesp32
+lib_ignore = ${env:tasmota32_base.lib_ignore}
+ Micro-RTSP
+ IRremoteESP8266
+ TasmotaModbus
+ ESP Mail Client
[env:tasmota32-nspanel]
extends = env:tasmota32_base
diff --git a/tasmota/berry/drivers/PCA9535.be b/tasmota/berry/drivers/PCA9535.be
new file mode 100644
index 000000000..e5328caa4
--- /dev/null
+++ b/tasmota/berry/drivers/PCA9535.be
@@ -0,0 +1,82 @@
+#################################################################################
+# Generic driver for PCA9535 - solidified
+#
+# I2C IO Expander, similar to PCA9557
+# Datasheet: https://www.nxp.com/docs/en/data-sheet/PCA9535_PCA9535C.pdf
+#
+# This expander is used in SeedStudio SenseCAP D1
+#################################################################################
+
+#@ solidify:PCA9535
+class PCA9535 : I2C_Driver
+ var last_read # time when last read (avoid reading too often)
+ var input_port # shadow of registers 0+1 with state of input registers
+ var output_port # shadow of registers 2+3 with known outputs
+ var inversion_port # shadow of registers 4+5 with input inversion
+ var config_port # shadow of registers 6+7 with Input/Output configurations
+
+ def init(address)
+ if (address == nil) address = 0x20 end # default address is 0x20
+ super(self).init("PCA9535", address)
+ self.last_read = 0
+ if self.wire
+ # if detected
+ self.read_all()
+ end
+ end
+
+ def read_all()
+ var now = tasmota.millis()
+ if (now - self.last_read > 10) # if last read was more than 10 ms in the past
+ self.input_port = self.read16LE(0x00)
+ self.output_port = self.read16LE(0x02)
+ self.inversion_port = self.read16LE(0x04)
+ self.config_port = self.read16LE(0x06)
+ self.last_read = tasmota.millis()
+ if tasmota.loglevel(4)
+ log(f"I2C: PCA9535 read input(0x{self.input_port:04X}) output(0x{self.output_port:04X}) inversion(0x{self.inversion_port:04X}) config(0x{self.config_port:04X})")
+ end
+ end
+ end
+
+ def config_all(v)
+ self.config_port = int(v)
+ self.write16LE(0x06, self.config_port)
+ end
+ # port: 0..15
+ # mode: 0=output 1=input
+ def config_gpio(port, mode)
+ self.read_all()
+ if (mode != 0 && mode != 1) raise "value_error", f"mode muste be 0 or 1" end
+ var config_new = self._bit_set_to(self.config_port, port, mode)
+ # write only if value changed
+ if config_new != self.config_port
+ self.config_all(config_new)
+ end
+ end
+
+ def read_gpio(port)
+ self.read_all()
+ return (self.input_port & (1 << port)) ? 1 : 0
+ end
+
+ def write_gpio(port, v)
+ self.read_all()
+ v = (v ? 1 : 0) # ensure we have only 0/1 as values
+ var output_new = self._bit_set_to(self.output_port, port, v)
+ if output_new != self.output_port
+ self.output_port = output_new
+ self.write16LE(0x02, self.output_port)
+ end
+ end
+
+ # inspired from https://stackoverflow.com/questions/47981/how-to-set-clear-and-toggle-a-single-bit
+ # num: int value
+ # n: bit to change
+ # x: value 0/1
+ static def _bit_set_to(num, n, x)
+ return (num & ~(1 << n)) | (x << n)
+ end
+end
+
+return PCA9535
diff --git a/tasmota/berry/drivers/PCA9535_SenseCAP_D1.be b/tasmota/berry/drivers/PCA9535_SenseCAP_D1.be
new file mode 100644
index 000000000..7afd9d928
--- /dev/null
+++ b/tasmota/berry/drivers/PCA9535_SenseCAP_D1.be
@@ -0,0 +1,42 @@
+#################################################################################
+# Specialized driver for SeedStudio SenseCAP D1 display
+#################################################################################
+
+import PCA9535
+
+class PCA9535_SenseCAP_D1 : PCA9535
+ def init()
+ super(self).init(0x20)
+
+ if self.wire
+ self.write_gpio(0x05, 1) # set IO0.5 (LCD_RESET) high
+ self.write_gpio(0x07, 1) # set IO0.7 (TOUCH_RESET) high
+ self.write_gpio(0x08, 1) # set IO1.0 (RP2040_RESET) high
+ self.config_gpio(0x05, 0) # configure IO0.5 (LCD_RESET) as output
+ self.config_gpio(0x07, 0) # configure IO0.7 (TOUCH_RESET) as output
+ self.config_gpio(0x08, 0) # configure IO1.0 (RP2040_RESET) as output
+ # reset display at boot
+ self.reset_display()
+ end
+ end
+
+ # hardware reset for the MCU RP2040
+ def reset_RP2040()
+ self.write_gpio(0x08, 0) # drive RESET Low
+ tasmota.delay(2) # the recommended delay is 1ms, we take some margin
+ self.write_gpio(0x08, 1) # drive RESET High
+ end
+
+ # reset both display and touch screen
+ def reset_display()
+ self.write_gpio(0x05, 0)
+ self.write_gpio(0x07, 0)
+ tasmota.delay(2)
+ self.write_gpio(0x05, 1)
+ self.write_gpio(0x07, 1)
+ tasmota.delay(50)
+ end
+
+end
+
+return PCA9535_SenseCAP_D1()
diff --git a/tasmota/berry/modules/antiburn/antiburn.be b/tasmota/berry/modules/antiburn/antiburn.be
index e695df9ca..2f0a0c3a3 100644
--- a/tasmota/berry/modules/antiburn/antiburn.be
+++ b/tasmota/berry/modules/antiburn/antiburn.be
@@ -21,7 +21,7 @@ antiburn.init = def (m)
lv.start()
if self.antiburn == nil
- var antiburn = lv.obj(lv.layer_top())
+ var antiburn = lv.obj(lv.layer_sys())
antiburn.set_style_radius(0, 0)
antiburn.set_style_border_width(0, 0)
antiburn.set_style_bg_opa(255, 0)
diff --git a/tasmota/displaydesc/Panlee_ZX4D30NE01S-UR_SC-02_no_touch.display.ini b/tasmota/displaydesc/Panlee_ZX4D30NE01S-UR_SC-02_no_touch.display.ini
new file mode 100644
index 000000000..9870fa0df
--- /dev/null
+++ b/tasmota/displaydesc/Panlee_ZX4D30NE01S-UR_SC-02_no_touch.display.ini
@@ -0,0 +1,5 @@
+:H,ZX4D30NE01S-UR,480,272,16,RGB,40,48,47,14,45,9,10,11,12,13,16,17,18,8,3,46,42,5,6,7,15
+:V,1,20,10,30,1,10,10,30,0
+:S,2,1,1,0,40,20
+:B,120,02
+#
diff --git a/tasmota/energy_modbus_configs/value_pairs_description.md b/tasmota/energy_modbus_configs/value_pairs_description.md
index 67a73dee2..3b7bfedcc 100644
--- a/tasmota/energy_modbus_configs/value_pairs_description.md
+++ b/tasmota/energy_modbus_configs/value_pairs_description.md
@@ -90,8 +90,8 @@
D - Number of decimals for floating point presentation (0 to 20) or a code correspondig to Tasmota resolution command settings:
21 - VoltRes (V)
22 - AmpRes (A)
- 23 - WattRes (W, VA, VAr)
- 24 - EnergyRes (kWh, kVAh, kVArh)
+ 23 - WattRes (W, VA, var)
+ 24 - EnergyRes (kWh, kVAh, kvarh)
25 - FreqRes (Hz)
26 - TempRes (C, F)
27 - HumRes (%)
diff --git a/tasmota/html_compressed/HTTP_HEAD_STYLE2.h b/tasmota/html_compressed/HTTP_HEAD_STYLE2.h
index 97f2bde73..0103a484f 100644
--- a/tasmota/html_compressed/HTTP_HEAD_STYLE2.h
+++ b/tasmota/html_compressed/HTTP_HEAD_STYLE2.h
@@ -15,7 +15,7 @@ const char HTTP_HEAD_STYLE2_COMPRESSED[] PROGMEM = "\x1C\x2E\xAB\x38\xF6\x8E\xCF
"\x61\xED\x30\x16\x5D\x1E\x61\x33\x14\x08\x38\x05\x85\xA3\xDC\x08\x33\x0F\x71\xD0"
"\xD4\x08\x56\xFF\xA3\xC2\x81\x22\xE0\x20\xCD\x3D\xC7\x4F\x82\x17\x20\x60\x8D\xC7"
"\xD3\x1A\x78\x19\x62\x09\xBC\x3C\x79\x9C\xA2\x18\x6C\x3C\x0D\xBF\x8F\x6F\x1E\x67"
- "\x38\x86\x1B\x11\xCA\x21\x86\xC3\xC1\xEE\x3A\x0A\x30\x7B\x44\xDF\x0C\x0A\xCC\x81"
+ "\x30\x86\x1B\x11\xCA\x21\x86\xC3\xC1\xEE\x3A\x0A\x30\x7B\x44\xDF\x0C\x0A\xCC\x81"
"\x0B\x61";
#define HTTP_HEAD_STYLE2 Decompress(HTTP_HEAD_STYLE2_COMPRESSED,HTTP_HEAD_STYLE2_SIZE).c_str()
\ No newline at end of file
diff --git a/tasmota/html_compressed/HTTP_SCRIPT_MODULE_TEMPLATE.h b/tasmota/html_compressed/HTTP_SCRIPT_MODULE_TEMPLATE.h
index e7f059b0b..99c40b1ac 100644
--- a/tasmota/html_compressed/HTTP_SCRIPT_MODULE_TEMPLATE.h
+++ b/tasmota/html_compressed/HTTP_SCRIPT_MODULE_TEMPLATE.h
@@ -2,7 +2,7 @@
// compressed by tools/unishox/compress-html-uncompressed.py
/////////////////////////////////////////////////////////////////////
-const size_t HTTP_SCRIPT_MODULE_TEMPLATE_SIZE = 602;
+const size_t HTTP_SCRIPT_MODULE_TEMPLATE_SIZE = 589;
const char HTTP_SCRIPT_MODULE_TEMPLATE_COMPRESSED[] PROGMEM = "\x33\xBF\xAC\xF1\xD4\x2B\xC7\x83\x02\xF8\x3A\xDC\xE4\x1B\x3B\xBA\x75\x1A\x8E\xF1"
"\xED\x33\xBF\xAC\x3E\x09\x81\x8B\x1A\xFA\x8E\x81\xFD\xDD\x32\x61\x31\xAF\xA8\xEE"
"\x9F\x78\x32\xB7\x38\xFB\x3B\xC7\x8C\x3A\x53\x36\x51\x07\x9D\x4F\xA8\xF9\xA7\x83"
@@ -15,16 +15,16 @@ const char HTTP_SCRIPT_MODULE_TEMPLATE_COMPRESSED[] PROGMEM = "\x33\xBF\xAC\xF1\
"\x0C\x3A\x7D\x8D\xC3\x36\x08\x3B\x70\x24\xE0\x87\x78\xF0\x7B\x82\x3E\x0A\x04\xAC"
"\xC8\xE3\x3C\x16\x9E\x81\x1E\x34\xED\x9D\xB3\xBC\x7B\x43\x3E\x0A\xF1\xEF\x69\xEF"
"\x82\x17\x2A\x01\xE7\x8D\x30\x77\x6C\xF8\x7C\x0C\xEF\x1E\xD1\xC0\x89\x50\xE3\x70"
- "\x8C\x1E\x07\x7D\xD9\xA1\xE0\xF7\x1E\xEF\x1F\x87\xE1\xF0\xE6\x90\x21\x64\x47\x21"
- "\xE0\xB4\xF4\x3E\x0E\x04\x2C\x8D\x9D\xD3\xBB\xA7\xA1\xC8\xCE\xF1\xDA\x3B\xA7\xD9"
- "\xDC\x3E\xCE\xD9\x69\xDE\x3C\xF4\xEA\xA3\xBC\x78\x3D\xCC\x71\xDD\x3E\xC5\x1F\x67"
- "\x6C\x78\xEF\x1D\x0C\xEC\x21\x6C\xF8\x2C\xED\x9C\x87\x82\xA3\xA7\xA8\xC8\x26\x74"
- "\x33\xDF\x68\xED\x0B\x68\xC8\xF8\x77\x47\x1F\x87\x19\xDE\x3B\x47\xD9\xF6\x79\x9F"
- "\x64\x2B\x44\x11\xF1\xF6\x08\xDC\x58\xF8\xD0\xEE\xF8\xEA\x1E\x04\x3E\x42\xF3\xC7"
- "\x4F\xB1\x81\x58\x6C\xEE\x9D\x87\xB8\xE5\x1D\x84\x3C\x75\x1E\xC3\xD0\x10\x78\x4B"
- "\x40\x83\x9E\x9F\x67\xB0\xEF\x02\x35\xD3\x96\x76\x10\xF1\xD4\x7B\x0F\x43\xB0\x10"
- "\x6F\x1F\x87\xB0\xEF\x1E\x18\xE3\xBA\x7D\x8F\x1F\x67\x6C\x78\xEF\x1D\x37\xB9\xFC"
- "\x85\x15\x10\xD2\x08\xF9\x80\x8D\x48\x10\x72\x13\xBA\x3C\x7A\x1C\x48\xEF\x1D\xA2"
- "\x04\x3E\x47\x4F\x3F\x1E\x34\xC0\x20\xD0\x3D\xA0\x85\xC9\xF9\xE0\xF7\x1E\xE3";
+ "\x8C\x1E\x07\x7D\xD9\xA1\xE0\xF7\x1E\xEF\x1F\x87\xE1\xF0\xE6\x90\x23\x64\x47\xC1"
+ "\xC0\x85\x91\xB3\xBB\xA7\x6C\xE4\x3A\x8A\x8E\xF1\xE0\xF7\x31\xC7\x74\xFB\x14\x7D"
+ "\x9D\xB1\xE3\xBC\x74\x33\xB0\x85\xB3\xE0\xB3\xB6\x72\x1E\x0A\x8E\x9E\xA3\x20\x99"
+ "\xD0\xCF\x7D\xA3\xB4\x2D\xA3\x23\xE1\xDD\x1C\x7E\x1C\x67\x78\xED\x1F\x67\xD9\xE6"
+ "\x7D\x90\xAD\x10\x47\xC7\xD8\x23\x71\x49\xE3\x43\xBB\xE3\xA8\x78\x10\xF8\xFE\xCF"
+ "\x1D\x3E\xC6\x05\x61\xB3\xBA\x76\x1E\xE3\x94\x76\x10\xF1\xD4\x7B\x0F\x40\x41\xE0"
+ "\xF9\x02\x0E\x7A\x7D\x9E\xC3\xBC\x08\xD7\x4E\x59\xD8\x43\xC7\x51\xEC\x3D\x0E\xC0"
+ "\x41\xBC\x7E\x1E\xC3\xBC\x78\x63\x8E\xE9\xF6\x3C\x7D\x9D\xB1\xE3\xBC\x74\xDE\xE7"
+ "\xF2\x14\x54\x43\x48\x23\xE6\x02\x35\x20\x41\xC8\x4E\xE8\xF1\xE8\x71\x23\xBC\x76"
+ "\x88\x10\xF9\x10\x3C\xFC\x78\xD3\x2A\x01\x83\x40\xF6\x82\x17\x26\x47\x83\xDC\x7B"
+ "\x8D";
#define HTTP_SCRIPT_MODULE_TEMPLATE Decompress(HTTP_SCRIPT_MODULE_TEMPLATE_COMPRESSED,HTTP_SCRIPT_MODULE_TEMPLATE_SIZE).c_str()
\ No newline at end of file
diff --git a/tasmota/html_uncompressed/HTTP_HEAD_STYLE2.h b/tasmota/html_uncompressed/HTTP_HEAD_STYLE2.h
index f0fabbd91..24f881014 100644
--- a/tasmota/html_uncompressed/HTTP_HEAD_STYLE2.h
+++ b/tasmota/html_uncompressed/HTTP_HEAD_STYLE2.h
@@ -8,5 +8,5 @@ const char HTTP_HEAD_STYLE2[] PROGMEM =
"a{color:#%06x;text-decoration:none;}" // COLOR_BUTTON
".p{float:left;text-align:left;}"
".q{float:right;text-align:right;}"
- ".r{border-radius:0.3em;padding:2px;margin:6px 2px;}"
+ ".r{border-radius:0.3em;padding:2px;margin:4px 2px;}"
".hf{display:none;}";
diff --git a/tasmota/html_uncompressed/HTTP_SCRIPT_MODULE_TEMPLATE.h b/tasmota/html_uncompressed/HTTP_SCRIPT_MODULE_TEMPLATE.h
index fd52afcc0..0fcd77c51 100644
--- a/tasmota/html_uncompressed/HTTP_SCRIPT_MODULE_TEMPLATE.h
+++ b/tasmota/html_uncompressed/HTTP_SCRIPT_MODULE_TEMPLATE.h
@@ -12,7 +12,7 @@ const char HTTP_SCRIPT_MODULE_TEMPLATE[] PROGMEM =
"l=hs.length;" // Find max indexes for s
"for(i=0;i>=5;" // Add options
- "for(i=1;i<=b;i++){ce((i<10)?(' '+i):i,t);}"
+ "for(i=0;i<=b;i++){ce(i+1,t);}" // Add index 1 to 32
"eb('h'+g).value=u+1;" // Set selected value
"t.style.visibility=(b>0)?'':'hidden';"
"}"
diff --git a/tasmota/include/Powerwall.h b/tasmota/include/Powerwall.h
index e81c0ab5e..518d2dde4 100755
--- a/tasmota/include/Powerwall.h
+++ b/tasmota/include/Powerwall.h
@@ -1,17 +1,26 @@
-// inspred by https://github.com/MoritzLerch/tesla-pv-display
+// inspired by https://github.com/MoritzLerch/tesla-pv-display
#ifndef Powerwall_h
#define Powerwall_h
-// include libraries
-#include "WiFiClientSecureLightBearSSL.h"
+
+#define PW_RETRIES 2
+
+#define PWL_LOGLVL LOG_LEVEL_DEBUG
+
+// include libraries from email client
+// standard ssl does not work at all
+ESP_SSLClient ssl_client;
+WiFiClientImpl basic_client;
class Powerwall {
private:
- const char* powerwall_ip;
+ String powerwall_ip;
String tesla_email;
String tesla_password;
String authCookie;
+ String cts1;
+ String cts2;
public:
Powerwall();
@@ -19,57 +28,132 @@ class Powerwall {
String GetRequest(String url, String authCookie);
String GetRequest(String url);
String AuthCookie();
- void resetAuthCookie();
+ String Pwl_test(String);
};
+#ifndef POWERWALL_IP_CONFIG
+ #define POWERWALL_IP_CONFIG "192.168.188.60"
+#endif
+
+#ifndef TESLA_EMAIL
+ #define TESLA_EMAIL "email"
+#endif
+
+#ifndef TESLA_PASSWORD
+ #define TESLA_PASSWORD "password"
+#endif
+
+#ifndef TESLA_POWERWALL_CTS1
+ #define TESLA_POWERWALL_CTS1 "cts1"
+#endif
+
+#ifndef TESLA_POWERWALL_CTS2
+ #define TESLA_POWERWALL_CTS2 "cts2"
+#endif
+
Powerwall::Powerwall() {
powerwall_ip = POWERWALL_IP_CONFIG;
tesla_email = TESLA_EMAIL;
tesla_password = TESLA_PASSWORD;
authCookie = "";
+ cts1 = TESLA_POWERWALL_CTS1;
+ cts2 = TESLA_POWERWALL_CTS2;
}
String Powerwall::AuthCookie() {
return authCookie;
}
-void Powerwall::resetAuthCookie() {
- authCookie = "";
+
+String Powerwall::Pwl_test(String ip) {
+ AddLog(PWL_LOGLVL, PSTR("PWL: try to open %s"), ip.c_str());
+
+ ssl_client.setInsecure();
+ /** Call setDebugLevel(level) to set the debug
+ * esp_ssl_debug_none = 0
+ * esp_ssl_debug_error = 1
+ * esp_ssl_debug_warn = 2
+ * esp_ssl_debug_info = 3
+ * esp_ssl_debug_dump = 4
+ */
+ ssl_client.setDebugLevel(0);
+
+ // Set the receive and transmit buffers size in bytes for memory allocation (512 to 16384).
+ // For server that does not support SSL fragment size negotiation, leave this setting the default value
+ // by not set any buffer size or set the rx buffer size to maximum SSL record size (16384) and 512 for tx buffer size.
+ //ssl_client.setBufferSizes(1024 /* rx */, 512 /* tx */);
+
+ // Assign the basic client
+ // Due to the basic_client pointer is assigned, to avoid dangling pointer, basic_client should be existed
+ // as long as it was used by ssl_client for transportation.
+ ssl_client.setClient(&basic_client);
+
+ int retry = 0;
+ while (retry < PW_RETRIES) {
+ int32_t res = ssl_client.connect(ip.c_str(), 443);
+ if (res) {
+ break;
+ }
+ delay(100);
+ retry++;
+ }
+
+ if (retry >= PW_RETRIES) {
+ AddLog(PWL_LOGLVL, PSTR("PWL: failed"));
+ } else {
+ AddLog(PWL_LOGLVL, PSTR("PWL: connected"));
+ }
+
+ ssl_client.stop();
+
+ return "\n";
}
+
+void pHexdump(uint8_t *sbuff, uint32_t slen) {
+ char cbuff[slen*3+10];
+ char *cp = cbuff;
+ *cp++ = '>';
+ *cp++ = ' ';
+ for (uint32_t cnt = 0; cnt < slen; cnt ++) {
+ sprintf_P(cp, PSTR("%02x "), sbuff[cnt]);
+ cp += 3;
+ }
+ AddLog(PWL_LOGLVL, PSTR("PWL: response: %s"), cbuff);
+
+}
+
+
/**
* This function returns a string with the authToken based on the basic login endpoint of
* the powerwall in combination with the credentials from the secrets.h
* @returns authToken to be used in an authCookie
*/
String Powerwall::getAuthCookie() {
- AddLog(LOG_LEVEL_DEBUG, PSTR("PWL: requesting new auth Cookie from %s"), powerwall_ip);
+ AddLog(PWL_LOGLVL, PSTR("PWL: requesting new auth Cookie from %s"), powerwall_ip.c_str());
String apiLoginURL = "/api/login/Basic";
-#ifdef ESP32
- WiFiClientSecure *httpsClient = new WiFiClientSecure;
-#else
- // BearSSL::WiFiClientSecure_light *httpsClient = new BearSSL::WiFiClientSecure_light(1024,1024);
- WiFiClientSecure *httpsClient = new WiFiClientSecure;
-#endif
- httpsClient->setInsecure();
- httpsClient->setTimeout(10000);
+ ssl_client.setInsecure();
+ //ssl_client.setBufferSizes(4096 /* rx */, 512 /* tx */);
+ ssl_client.setTimeout(3000);
+ ssl_client.setClient(&basic_client);
+ ssl_client.setDebugLevel(3);
int retry = 0;
-
-#define PW_RETRIES 5
- while ((!httpsClient->connect(powerwall_ip, 443)) && (retry < PW_RETRIES)) {
+ while (retry < PW_RETRIES) {
+ int32_t res = ssl_client.connect(powerwall_ip.c_str(), 443);
+ if (res) {
+ break;
+ }
delay(100);
- Serial.print(".");
retry++;
}
if (retry >= PW_RETRIES) {
- delete httpsClient;
return ("CONN-FAIL");
}
- AddLog(LOG_LEVEL_DEBUG, PSTR("PWL: connected"));
+ AddLog(PWL_LOGLVL, PSTR("PWL: connected"));
String dataString = "{\"username\":\"customer\",\"email\":\"" + tesla_email + "\",\"password\":\"" + tesla_password + "\",\"force_sm_off\":false}";
@@ -80,31 +164,113 @@ String Powerwall::getAuthCookie() {
"Content-Length: " + dataString.length() + "\r\n" +
"\r\n" + dataString + "\r\n\r\n";
- httpsClient->println(payload);
+ AddLog(PWL_LOGLVL, PSTR("PWL: payload: %s"),payload.c_str());
- while (httpsClient->connected()) {
- String response = httpsClient->readStringUntil('\n');
- if (response == "\r") {
- break;
+ ssl_client.println(payload);
+
+ uint8_t flag = 0;
+
+ uint8_t string[1200];
+ uint32_t dlen;
+ uint32_t timeout = 30;
+ while (ssl_client.connected()) {
+ if (ssl_client.available()) {
+ dlen = ssl_client.available();
+ AddLog(PWL_LOGLVL, PSTR("PWL: available: %d"), dlen);
+ String response = "";
+#if 1
+ if (!flag) {
+ char c = ssl_client.peek();
+ AddLog(PWL_LOGLVL, PSTR("PWL: peek: %c"), c);
+ if (c != 'H') {
+ AddLog(PWL_LOGLVL, PSTR("PWL: wrong response: %c"), c);
+ ssl_client.stop();
+ return "";
+ } else {
+ //basic_client.read(string, 17);
+ //ssl_client.read(string, 17);
+ const char *cp = ssl_client.peekBuffer();
+ //ssl_client.peekBytes(string, 17);
+ //ssl_client.peekConsume(17);
+ //string[17] = 0;
+ //pHexdump(string, 17);
+ AddLog(PWL_LOGLVL, PSTR("PWL: 1. response: %s"), cp);
+ cp = strchr(cp, '{');
+ if (cp) {
+ char *cp1 = strchr(cp, '}');
+ if (cp1) {
+ *(cp1 + 1) = 0;
+ AddLog(PWL_LOGLVL, PSTR("PWL: json: %s"), cp);
+ char str_value[256];
+ str_value[0] = 0;
+ float fv;
+ JsonParser parser((char*)cp);
+ JsonParserObject obj = parser.getRootObject();
+ uint32_t res = JsonParsePath(&obj, "token", '#', &fv, str_value, sizeof(str_value));
+
+ AddLog(PWL_LOGLVL, PSTR("PWL: token: %s"), str_value);
+
+ ssl_client.stop();
+ return str_value;
+ }
+ }
+ }
+ flag = 1;
+ }
+ response = ssl_client.readStringUntil('\n');
+ AddLog(PWL_LOGLVL, PSTR("PWL: response: %s"), response.c_str());
+ #else
+ ssl_client.read(string, dlen);
+ pHexdump(string, dlen);
+ #endif
+ char *cp = (char*)response.c_str();
+ if (!strncmp_P(cp, PSTR("HTTP"), 4)) {
+ char *sp = strchr(cp, ' ');
+ if (sp) {
+ sp++;
+ uint16_t result = strtol(sp, 0, 10);
+ if (result != 200) {
+ ssl_client.stop();
+ return "";
+ } else {
+ // break;
+ }
+ }
+ }
+ if (response == "\r") {
+ break;
+ }
+ }
+ timeout--;
+ delay(100);
+ AddLog(PWL_LOGLVL, PSTR("PWL: timeout: %d"), timeout);
+ if (!timeout) {
+ ssl_client.stop();
+ return "";
}
}
- String jsonInput = httpsClient->readStringUntil('\n');
+ String jsonInput;
+ dlen = ssl_client.available();
+ if (ssl_client.connected() && dlen) {
+ ssl_client.read(string, dlen);
+ string[dlen] = 0;
+ jsonInput = (char*)string;
+ AddLog(PWL_LOGLVL, PSTR("PWL: jsonInput %s"),jsonInput.c_str());
+ }
- char str_value[128];
+ char str_value[256];
str_value[0] = 0;
float fv;
JsonParser parser((char*)jsonInput.c_str());
JsonParserObject obj = parser.getRootObject();
uint32_t res = JsonParsePath(&obj, "token", '#', &fv, str_value, sizeof(str_value));
- AddLog(LOG_LEVEL_DEBUG, PSTR("PWL: token: %s"), str_value);
+ AddLog(PWL_LOGLVL, PSTR("PWL: token: %s"), str_value);
- authCookie = str_value;
-
- delete httpsClient;
+ ssl_client.stop();
- return authCookie;
+ return str_value;
}
/**
@@ -117,64 +283,138 @@ String Powerwall::getAuthCookie() {
* @param authCookie optional, but recommended
* @returns content of request
*/
-String Powerwall::GetRequest(String url, String authCookie) {
-#ifdef ESP32
- WiFiClientSecure *httpsClient = new WiFiClientSecure;
-#else
- //BearSSL::WiFiClientSecure_light *httpsClient = new BearSSL::WiFiClientSecure_light(1024,1024);
- WiFiClientSecure *httpsClient = new WiFiClientSecure;
-#endif
- httpsClient->setInsecure();
- httpsClient->setTimeout(10000);
+String Powerwall::GetRequest(String url, String in_authCookie) {
- if (authCookie == "") {
- getAuthCookie();
+
+ AddLog(PWL_LOGLVL, PSTR("PWL: cookie %s"), in_authCookie.c_str());
+
+ ssl_client.setInsecure();
+ ssl_client.setTimeout(5000);
+ ssl_client.setClient(&basic_client);
+ //ssl_client.setBufferSizes(4096 /* rx */, 512 /* tx */);
+ ssl_client.setBufferSizes(16384, 512);
+
+
+ if (in_authCookie == "") {
+ authCookie = getAuthCookie();
}
- AddLog(LOG_LEVEL_DEBUG, PSTR("PWL: doing GET-request to %s%s"), powerwall_ip, url.c_str());
+ AddLog(PWL_LOGLVL, PSTR("PWL: doing GET-request to %s - %s"), powerwall_ip.c_str(), url.c_str());
int retry = 0;
- while ((!httpsClient->connect(powerwall_ip, 443)) && (retry < 15)) {
+ while ((!ssl_client.connect(powerwall_ip.c_str(), 443)) && (retry < PW_RETRIES)) {
delay(100);
- Serial.print(".");
+ //Serial.print(".");
retry++;
}
- if (retry >= 15) {
- delete httpsClient;
+ if (retry >= PW_RETRIES) {
return ("CONN-FAIL");
}
+ AddLog(PWL_LOGLVL, PSTR("PWL: connected"));
+
// HTTP/1.0 is used because of Chunked transfer encoding
- httpsClient->print(String("GET ") + url + " HTTP/1.0" + "\r\n" +
+ String request = "GET " + url + " HTTP/1.0" + "\r\n" +
"Host: " + powerwall_ip + "\r\n" +
"Cookie: " + "AuthCookie" + "=" + authCookie + "\r\n" +
- "Connection: close\r\n\r\n");
+ "Connection: close\r\n\r\n";
+
+ ssl_client.println(request);
+
+ AddLog(PWL_LOGLVL, PSTR("PWL: request: %s"), request.c_str());
- while (httpsClient->connected()) {
- String response = httpsClient->readStringUntil('\n');
- char *cp = (char*)response.c_str();
- if (!strncmp_P(cp, PSTR("HTTP"), 4)) {
- char *sp = strchr(cp, ' ');
- if (sp) {
- sp++;
- uint16_t result = strtol(sp, 0, 10);
- AddLog(LOG_LEVEL_DEBUG, PSTR("PWL: result %d"), result);
- // in case of error 401, get new cookie
- if (result == 401) {
- authCookie = "";
- resetAuthCookie();
+ uint32_t timeout = 500;
+ int32_t chunked = 0;
+ while (ssl_client.connected()) {
+ if (ssl_client.available()) {
+ String response = ssl_client.readStringUntil('\n');
+ AddLog(PWL_LOGLVL, PSTR("PWL: result %s"), response.c_str());
+ if (chunked == -2) {
+ // process chunc size
+ chunked = strtol(response.c_str(), 0, 16);
+ AddLog(PWL_LOGLVL, PSTR("PWL: chunc size %d"), chunked);
+ break;
+ }
+ char *cp = (char*)response.c_str();
+ if (!strncmp_P(cp, PSTR("HTTP"), 4)) {
+ char *sp = strchr(cp, ' ');
+ if (sp) {
+ sp++;
+ uint16_t result = strtol(sp, 0, 10);
+ AddLog(PWL_LOGLVL, PSTR("PWL: result %d"), result);
+ // in case of error 401, get new cookie
+ if (result == 401) {
+ authCookie = "";
+ } else if (result != 200) {
+ ssl_client.stop();
+ return "\n";
+ }
+ }
+ }
+ if (!strncmp_P(cp, PSTR("Transfer-Encoding: chunked"), 26)) {
+ chunked = -1;
+ AddLog(PWL_LOGLVL, PSTR("PWL: chunked %d"), chunked);
+ }
+
+ if (response == "\r") {
+ if (chunked) {
+ // skip
+ chunked = -2;
+ } else {
+ break;
}
}
}
- if (response == "\r") {
+ timeout--;
+ delay(10);
+ if (!timeout) {
break;
}
}
- String result = httpsClient->readStringUntil('\n');
- delete httpsClient;
+ String result = "\r";
+
+ timeout = 100;
+ char *string = (char*)calloc(4096,1);
+ if (string) {
+ char *cp = string;
+ while (ssl_client.connected()) {
+ uint16_t dlen;
+ dlen = ssl_client.available();
+ if (dlen) {
+ ssl_client.read((uint8_t*)cp, dlen);
+ cp += dlen;
+ *cp = 0;
+ }
+ delay(10);
+ timeout--;
+ if (!timeout) {
+ break;
+ }
+ }
+ AddLog(PWL_LOGLVL, PSTR("PWL: result %s"), string);
+ result = string;
+ free(string);
+ }
+ ssl_client.stop();
+
+ // custom replace
+ result.replace(cts1, "PW_CTS1");
+
+ result.replace(cts2, "PW_CTS2");
+
+ // shrink data size because it exceeds json parser maxsize
+ result.replace("communication_time", "ct");
+ result.replace("instant", "i");
+ result.replace("apparent", "a");
+ result.replace("reactive", "r");
+
+ result.replace("nominal_full_pack_energy", "f_p_e");
+ result.replace("nominal_energy_remaining", "n_e_r");
+ result.replace("backup_reserve_percent", "b_r_p");
+
return result;
}
@@ -182,6 +422,30 @@ String Powerwall::GetRequest(String url, String authCookie) {
* this is getting called if there was no provided authCookie in powerwallGetRequest(String url, String authCookie)
*/
String Powerwall::GetRequest(String url) {
+ if (url[0] == '@') {
+ if (url[1] == 'D') {
+ // define vars
+ //AddLog(PWL_LOGLVL, PSTR("PWL: %s - %s - %s"), powerwall_ip.c_str(), tesla_email.c_str(), tesla_password.c_str());
+ url = url.substring(2);
+ uint16_t pos = strcspn(url.c_str(), ",");
+ powerwall_ip = url.substring(0, pos);
+ url = url.substring(pos + 1);
+ pos = strcspn(url.c_str(), ",");
+ tesla_email = url.substring(0, pos);
+ tesla_password = url.substring(pos + 1);
+ //AddLog(PWL_LOGLVL, PSTR("PWL: %s - %s - %s"), powerwall_ip.c_str(), tesla_email.c_str(), tesla_password.c_str());
+ return "";
+ } if (url[1] == 'C') {
+ url = url.substring(2);
+ uint16_t pos = strcspn(url.c_str(), ",");
+ cts1 = url.substring(0, pos);
+ cts2 = url.substring(pos + 1);
+ return "";
+ } else {
+ url = url.substring(1);
+ return Pwl_test(url);
+ }
+ }
return (GetRequest(url, getAuthCookie()));
}
diff --git a/tasmota/include/i18n.h b/tasmota/include/i18n.h
index 5555ec9d9..48d6d20ff 100644
--- a/tasmota/include/i18n.h
+++ b/tasmota/include/i18n.h
@@ -219,6 +219,7 @@
#define D_JSON_VERSION "Version"
#define D_JSON_VOLTAGE "Voltage"
#define D_JSON_VOLUME "Volume"
+#define D_JSON_WATER_DEPTH "Water Depth"
#define D_JSON_WEIGHT "Weight"
#define D_JSON_WIFI "Wifi"
#define D_JSON_WIFI_MODE "Mode"
@@ -1001,12 +1002,15 @@ const char HTTP_SNS_MILLILITERS[] PROGMEM = "{s}%s " D_VOLUME "{
const char HTTP_SNS_GAS[] PROGMEM = "{s}%s " D_GAS "{m}%d " D_UNIT_PERCENT "LEL{e}";
const char HTTP_SNS_SOC[] PROGMEM = "{s}%s " D_SOC "{m}%d " D_UNIT_PERCENT "{e}";
const char HTTP_SNS_SOH[] PROGMEM = "{s}%s " D_SOH "{m}%d " D_UNIT_PERCENT "{e}";
+const char HTTP_SNS_WATER_DEPTH[] PROGMEM = "{s}%s " D_WATER_DEPTH "{m}%s " D_UNIT_CENTIMETER "{e}";
const char HTTP_SNS_STANDARD_CONCENTRATION[] PROGMEM = "{s}%s " D_STANDARD_CONCENTRATION " %s " D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}";
const char HTTP_SNS_ENVIRONMENTAL_CONCENTRATION[] PROGMEM = "{s}%s " D_ENVIRONMENTAL_CONCENTRATION " %s " D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}";
const char HTTP_SNS_F_ENVIRONMENTAL_CONCENTRATION[] PROGMEM = "{s}%s " D_ENVIRONMENTAL_CONCENTRATION " %s " D_UNIT_MICROMETER "{m}%1_f " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}";
const char HTTP_SNS_PARTICALS_BEYOND[] PROGMEM = "{s}%s " D_PARTICALS_BEYOND " %s " D_UNIT_MICROMETER "{m}%d " D_UNIT_PARTS_PER_DECILITER "{e}";
-const char HTTP_SNS_AVG_RAD_DOSE[] PROGMEM = "{s}%s " D_AVG_RAD_DOSE " %s " D_UNIT_MINUTE "{m}%d.%02d " D_UNIT_US_H "{e}";
+const char HTTP_SNS_AVG_RAD_DOSE[] PROGMEM = "{s}%s " D_AVG_RAD_DOSE " %s " D_UNIT_MINUTE "{m}%d.%02d " D_UNIT_US_H "{e}";
+const char HTTP_SNS_US_AQI[] PROGMEM = "{s}%s US AQI" "{m}%d" "{e}";
+const char HTTP_SNS_US_EPA_AQI[] PROGMEM = "{s}%s US EPA AQI" "{m}%d" "{e}";
const char HTTP_SNS_VOLTAGE[] PROGMEM = "{s}" D_VOLTAGE "{m}%s " D_UNIT_VOLT "{e}";
const char HTTP_SNS_CURRENT[] PROGMEM = "{s}" D_CURRENT "{m}%s " D_UNIT_AMPERE "{e}";
diff --git a/tasmota/include/tasmota.h b/tasmota/include/tasmota.h
index 627596474..79a3cc486 100644
--- a/tasmota/include/tasmota.h
+++ b/tasmota/include/tasmota.h
@@ -38,25 +38,24 @@ const uint32_t POWER_SIZE = 32; // Power (relay) bit count
* Constants
\*********************************************************************************************/
-// Why 28? Because in addition to relays there may be lights and uint32_t bitmap can hold up to 32 devices
#ifdef ESP8266
const uint8_t MAX_RELAYS = 8; // Max number of relays selectable on GPIO
-const uint8_t MAX_INTERLOCKS = 4; // Max number of interlock groups (up to MAX_INTERLOCKS_SET)
+const uint8_t MAX_INTERLOCKS = 16; // Max number of interlock groups (up to MAX_INTERLOCKS_SET)
const uint8_t MAX_SWITCHES = 8; // Max number of switches selectable on GPIO
const uint8_t MAX_KEYS = 8; // Max number of keys or buttons selectable on GPIO
#endif // ESP8266
#ifdef ESP32
-const uint8_t MAX_RELAYS = 28; // Max number of relays selectable on GPIO
-const uint8_t MAX_INTERLOCKS = 14; // Max number of interlock groups (up to MAX_INTERLOCKS_SET)
-const uint8_t MAX_SWITCHES = 28; // Max number of switches selectable on GPIO
-const uint8_t MAX_KEYS = 28; // Max number of keys or buttons selectable on GPIO
+const uint8_t MAX_RELAYS = 32; // Max number of relays selectable on GPIO
+const uint8_t MAX_INTERLOCKS = 16; // Max number of interlock groups (up to MAX_INTERLOCKS_SET)
+const uint8_t MAX_SWITCHES = 32; // Max number of switches selectable on GPIO
+const uint8_t MAX_KEYS = 32; // Max number of keys or buttons selectable on GPIO
#endif // ESP32
const uint8_t MAX_RELAYS_SET = 32; // Max number of relays
const uint8_t MAX_KEYS_SET = 32; // Max number of keys
// Changes to the following MAX_ defines will impact settings layout
-const uint8_t MAX_INTERLOCKS_SET = 14; // Max number of interlock groups (MAX_RELAYS_SET / 2)
-const uint8_t MAX_SWITCHES_SET = 28; // Max number of switches
+const uint8_t MAX_INTERLOCKS_SET = 16; // Max number of interlock groups (MAX_RELAYS_SET / 2)
+const uint8_t MAX_SWITCHES_SET = 32; // Max number of switches
const uint8_t MAX_LEDS = 4; // Max number of leds
const uint8_t MAX_PWMS_LEGACY = 5; // Max number of PWM channels in first settings block - Legacy limit for ESP8266, but extended for ESP32 (see below)
#ifdef ESP32 // Max number of PWM channels (total including extended) - ESP32 only
@@ -108,7 +107,7 @@ const uint8_t MAX_I2S = 2; // Max number of Hardware I2S contro
const uint8_t MAX_RMT = 0; // Max number or RMT channels (0 if unknown)
#endif
#else
-const uint8_t MAX_SPI = 0; // Max number of Hardware SPI controllers (ESP8266 = 0, no choice)
+const uint8_t MAX_SPI = 1; // Max number of Hardware SPI controllers
const uint8_t MAX_I2S = 0; // Max number of Hardware I2S controllers (ESP8266 = 0, no choice)
const uint8_t MAX_RMT = 0; // No RMT channel on ESP8266
#endif
@@ -280,13 +279,13 @@ const uint32_t LOOP_SLEEP_DELAY = 50; // Lowest number of milliseconds to
#define KNX_SLOT3 28
#define KNX_SLOT4 29
#define KNX_SLOT5 30
-#define KNX_SLOT6 31
-#define KNX_SLOT7 32
-#define KNX_SLOT8 33
-#define KNX_SLOT9 34
-#define KNX_SCENE 35
-#define KNX_DIMMER 36 // aka DPT_Scaling 5.001
-#define KNX_COLOUR 37 // aka DPT_Colour_RGB 232.600 or DPT_Colour_RGBW 251.600
+#define KNX_SCENE 31
+#define KNX_DIMMER 32 // aka DPT_Scaling 5.001
+#define KNX_COLOUR 33 // aka DPT_Colour_RGB 232.600 or DPT_Colour_RGBW 251.600
+#define KNX_SLOT6 34
+#define KNX_SLOT7 35
+#define KNX_SLOT8 36
+#define KNX_SLOT9 37
#define KNX_MAX_device_param 37
#define MAX_KNXTX_CMNDS 9
@@ -336,6 +335,14 @@ const uint32_t LOOP_SLEEP_DELAY = 50; // Lowest number of milliseconds to
#define WIFI_SENSITIVITY_n -720
#endif
+#ifdef ESP32
+#if SOC_TOUCH_SENSOR_VERSION == 1 // ESP32
+#define SOC_TOUCH_VERSION_1
+#elif SOC_TOUCH_SENSOR_VERSION == 2 // ESP32S2, ESP32S3
+#define SOC_TOUCH_VERSION_2
+#endif // SOC_TOUCH_SENSOR_VERSION
+#endif // ESP32
+
/*********************************************************************************************\
* Enumeration
\*********************************************************************************************/
diff --git a/tasmota/include/tasmota_configurations.h b/tasmota/include/tasmota_configurations.h
index 2cecc2d46..1260892a0 100644
--- a/tasmota/include/tasmota_configurations.h
+++ b/tasmota/include/tasmota_configurations.h
@@ -173,6 +173,7 @@
//#define USE_MAX17043 // [I2cDriver83] Enable MAX17043 fuel-gauge systems Lipo batteries sensor (I2C address 0x36) (+0k9 code)
//#define USE_AMSX915 // [I2CDriver86] Enable AMS5915/AMS6915 pressure/temperature sensor (+1k2 code)
//#define USE_SPL06_007 // [I2cDriver87] Enable SPL06_007 pressure and temperature sensor (I2C addresses 0x76) (+2k5 code)
+//#define USE_MS5837 // [I2cDriver91] Enable MS5837 sensor (I2C address 0x76) (+2k7 code)
//#define USE_RTC_CHIPS // Enable RTC chip support and NTP server - Select only one
// #define USE_DS3231 // [I2cDriver26] Enable DS3231 RTC (I2C address 0x68) (+1k2 code)
@@ -702,6 +703,7 @@
#define USE_TASMOTA_DISCOVERY // Enable Tasmota Discovery support (+2k code)
#undef USE_MQTT_TLS // Disable TLS support won't work as the MQTTHost is not set
#undef USE_KNX // Disable KNX IP Protocol Support
+#undef USE_DALI // Disable support for DALI gateway (+5k code)
//#undef USE_WEBSERVER // Disable Webserver
#undef USE_ENHANCED_GUI_WIFI_SCAN // Disable wifi scan output with BSSID (+0k5 code)
#undef USE_WEBSEND_RESPONSE // Disable command WebSend response message (+1k code)
@@ -849,8 +851,6 @@
#define CODE_IMAGE_STR "minimal"
#endif
-#define FIRMWARE_MINIMAL_ONLY
-
#undef FIRMWARE_LITE // Disable tasmota-lite with no sensors
#undef FIRMWARE_SENSORS // Disable tasmota-sensors with useful sensors enabled
#undef FIRMWARE_KNX_NO_EMULATION // Disable tasmota-knx with KNX but without Emulation
@@ -867,6 +867,7 @@
#undef USE_TELEGRAM // Disable support for Telegram protocol (+49k code, +7.0k mem and +4.8k additional during connection handshake)
//#undef USE_MQTT_TLS // Disable TLS support won't work as the MQTTHost is not set
#undef USE_KNX // Disable KNX IP Protocol Support
+#undef USE_DALI // Disable support for DALI gateway (+5k code)
//#undef USE_WEBSERVER // Disable Webserver
#undef USE_GPIO_VIEWER // Disable GPIO Viewer to see realtime GPIO states (+5k6 code)
#undef USE_ENHANCED_GUI_WIFI_SCAN // Disable wifi scan output with BSSID (+0k5 code)
@@ -1029,21 +1030,23 @@
#define SEND_PRONTO false // Exclude PRONTO protocol
#else
#define _IR_ENABLE_DEFAULT_ false // disable all protocols by default
- // below are the default IR protocols
- #define DECODE_HASH true
- #ifdef USE_IR_SEND_NEC
- #define SEND_NEC true // Support IRsend NEC protocol
- #define DECODE_NEC true // Support IRreceive NEC protocol
- #endif
- #ifdef USE_IR_SEND_RC5
- #define SEND_RC5 true // Support IRsend Philips RC5 protocol
- #define DECODE_RC5 true // Support IRreceive Philips RC5 protocol
- #endif
- #ifdef USE_IR_SEND_RC6
- #define SEND_RC6 true // Support IRsend Philips RC6 protocol
- #define DECODE_RC6 true // Support IRreceive Philips RC6 protocol
- #endif
-#endif
+ #ifdef USE_IR_REMOTE
+ // below are the default IR protocols
+ #define DECODE_HASH true
+ #ifdef USE_IR_SEND_NEC
+ #define SEND_NEC true // Support IRsend NEC protocol
+ #define DECODE_NEC true // Support IRreceive NEC protocol
+ #endif // USE_IR_SEND_NEC
+ #ifdef USE_IR_SEND_RC5
+ #define SEND_RC5 true // Support IRsend Philips RC5 protocol
+ #define DECODE_RC5 true // Support IRreceive Philips RC5 protocol
+ #endif // USE_IR_SEND_RC5
+ #ifdef USE_IR_SEND_RC6
+ #define SEND_RC6 true // Support IRsend Philips RC6 protocol
+ #define DECODE_RC6 true // Support IRreceive Philips RC6 protocol
+ #endif // USE_IR_SEND_RC6
+ #endif // USE_IR_REMOTE
+#endif // USE_IR_REMOTE_FULL
/*********************************************************************************************\
* Mandatory defines satisfying disabled defines
diff --git a/tasmota/include/tasmota_configurations_ESP32.h b/tasmota/include/tasmota_configurations_ESP32.h
index 21343be87..e4d714325 100644
--- a/tasmota/include/tasmota_configurations_ESP32.h
+++ b/tasmota/include/tasmota_configurations_ESP32.h
@@ -60,6 +60,7 @@
#undef USE_TELEGRAM // Disable support for Telegram protocol (+49k code, +7.0k mem and +4.8k additional during connection handshake)
//#undef USE_MQTT_TLS // Disable TLS support won't work as the MQTTHost is not set
#undef USE_KNX // Disable KNX IP Protocol Support
+#undef USE_DALI // Disable support for DALI gateway (+5k code)
//#undef USE_WEBSERVER // Disable Webserver
#undef USE_GPIO_VIEWER // Enable GPIO Viewer to see realtime GPIO states (+5k6 code)
#undef USE_ENHANCED_GUI_WIFI_SCAN // Disable wifi scan output with BSSID (+0k5 code)
@@ -172,8 +173,6 @@
#define FIRMWARE_MINIMAL
-#undef FIRMWARE_MINIMAL_ONLY
-
#undef USE_ESP32_SENSORS
#undef USE_UFILESYS
#undef GUI_TRASH_FILE
@@ -189,14 +188,14 @@
#undef USE_ESP32_WDT // disable watchdog on SAFEBOOT until more testing is done
-#if CONFIG_IDF_TARGET_ESP32
-#if CONFIG_FREERTOS_UNICORE
- #undef USE_MQTT_TLS
+#if CONFIG_FREERTOS_UNICORE || CONFIG_IDF_TARGET_ESP32S3
+#if CONFIG_ETH_ENABLED // Check for Ethernet support in Arduino libs
+// #undef USE_MQTT_TLS
// #define USE_SERIAL_BRIDGE // Add support for software Serial Bridge console Tee (+4.5k code)
#define USE_SPI // Make SPI Ethernet adapters useable (+124 bytes)
#define USE_ETHERNET
-#endif // CONFIG_FREERTOS_UNICORE
-#endif // CONFIG_IDF_TARGET_ESP32
+#endif // CONFIG_ETH_ENABLED
+#endif // CONFIG_FREERTOS_UNICORE || CONFIG_IDF_TARGET_ESP32S3
#endif // FIRMWARE_SAFEBOOT
@@ -449,6 +448,7 @@
//#define USE_LUXV30B // [I2CDriver70] Enable RFRobot SEN0390 LuxV30b ambient light sensor (I2C address 0x4A) (+0k5 code)
//#define USE_PMSA003I // [I2cDriver78] Enable PMSA003I Air Quality Sensor (I2C address 0x12) (+1k8 code)
//#define USE_GDK101 // [I2cDriver79] Enable GDK101 sensor (I2C addresses 0x18 - 0x1B) (+1k2 code)
+//#define USE_MS5837 // [I2cDriver91] Enable MS5837 sensor (I2C address 0x76) (+2k7 code)
//#define USE_RTC_CHIPS // Enable RTC chip support and NTP server - Select only one
// #define USE_DS3231 // [I2cDriver26] Enable DS3231 RTC (I2C address 0x68) (+1k2 code)
@@ -515,6 +515,9 @@
#define USE_ENHANCED_GUI_WIFI_SCAN
+#undef USE_ENERGY_SENSOR // Disable support for energy sensors
+#undef USE_SHUTTER // Disable support for shutter
+#undef USE_IR_REMOTE // Disable support for IR Remote
#undef USE_ARMTRONIX_DIMMERS // Disable support for Armtronix Dimmers (+1k4 code)
#undef USE_PS_16_DZ // Disable support for PS-16-DZ Dimmer (+2k code)
#undef USE_SONOFF_IFAN // Disable support for Sonoff iFan02 and iFan03 (+2k code)
@@ -688,6 +691,7 @@
//#define USE_LUXV30B // [I2CDriver70] Enable RFRobot SEN0390 LuxV30b ambient light sensor (I2C address 0x4A) (+0k5 code)
//#define USE_PMSA003I // [I2cDriver78] Enable PMSA003I Air Quality Sensor (I2C address 0x12) (+1k8 code)
//#define USE_GDK101 // [I2cDriver79] Enable GDK101 sensor (I2C addresses 0x18 - 0x1B) (+1k2 code)
+//#define USE_MS5837 // [I2cDriver91] Enable MS5837 sensor (I2C address 0x76) (+2k7 code)
//#define USE_RTC_CHIPS // Enable RTC chip support and NTP server - Select only one
// #define USE_DS3231 // [I2cDriver26] Enable DS3231 RTC (I2C address 0x68) (+1k2 code)
@@ -797,6 +801,7 @@
#ifndef USE_KNX
#define USE_KNX // Enable KNX IP Protocol Support (+23k code, +3k3 mem)
#endif
+#define USE_DALI // Add support for DALI gateway (+5k code)
#endif // FIRMWARE_TASMOTA32
@@ -827,12 +832,15 @@
#endif // USE_MATTER_DEVICE
/*********************************************************************************************\
- * Post-process compile options for esp32-c2
+ * Post-process for switched off Ethernet support in Arduino static libs
\*********************************************************************************************/
-#ifdef CONFIG_IDF_TARGET_ESP32C2
+#ifndef CONFIG_ETH_ENABLED
#undef USE_ETHERNET
-#endif // CONFIG_IDF_TARGET_ESP32C2
+ #ifdef FIRMWARE_MINIMAL
+ #undef USE_SPI
+ #endif // FIRMWARE_MINIMAL
+#endif // CONFIG_ETH_ENABLED
#endif // ESP32
#endif // _TASMOTA_CONFIGURATIONS_ESP32_H_
diff --git a/tasmota/include/tasmota_globals.h b/tasmota/include/tasmota_globals.h
index db8d24f0c..7c02d9f7f 100644
--- a/tasmota/include/tasmota_globals.h
+++ b/tasmota/include/tasmota_globals.h
@@ -503,13 +503,16 @@ const char WIFI_HOSTNAME[] = WIFI_DEFAULT_HOSTNAME; // Override by user_confi
#ifndef COLOR_TITLE_TEXT
#define COLOR_TITLE_TEXT COLOR_TEXT // Title text color defaults to global text color either dark or light
#endif
+#ifndef COLOR_BUTTON_OFF
+#define COLOR_BUTTON_OFF "#08405e" // Button color when off - Darkest blueish
+#endif
enum WebColors {
COL_TEXT, COL_BACKGROUND, COL_FORM,
COL_INPUT_TEXT, COL_INPUT, COL_CONSOLE_TEXT, COL_CONSOLE,
COL_TEXT_WARNING, COL_TEXT_SUCCESS,
COL_BUTTON_TEXT, COL_BUTTON, COL_BUTTON_HOVER, COL_BUTTON_RESET, COL_BUTTON_RESET_HOVER, COL_BUTTON_SAVE, COL_BUTTON_SAVE_HOVER,
- COL_TIMER_TAB_TEXT, COL_TIMER_TAB_BACKGROUND, COL_TITLE,
+ COL_TIMER_TAB_TEXT, COL_TIMER_TAB_BACKGROUND, COL_TITLE, COL_BUTTON_OFF,
COL_LAST };
const char kWebColors[] PROGMEM =
@@ -517,7 +520,7 @@ const char kWebColors[] PROGMEM =
COLOR_INPUT_TEXT "|" COLOR_INPUT "|" COLOR_CONSOLE_TEXT "|" COLOR_CONSOLE "|"
COLOR_TEXT_WARNING "|" COLOR_TEXT_SUCCESS "|"
COLOR_BUTTON_TEXT "|" COLOR_BUTTON "|" COLOR_BUTTON_HOVER "|" COLOR_BUTTON_RESET "|" COLOR_BUTTON_RESET_HOVER "|" COLOR_BUTTON_SAVE "|" COLOR_BUTTON_SAVE_HOVER "|"
- COLOR_TIMER_TAB_TEXT "|" COLOR_TIMER_TAB_BACKGROUND "|" COLOR_TITLE_TEXT;
+ COLOR_TIMER_TAB_TEXT "|" COLOR_TIMER_TAB_BACKGROUND "|" COLOR_TITLE_TEXT "|" COLOR_BUTTON_OFF;
/*********************************************************************************************\
* Macros
@@ -540,6 +543,7 @@ const char kWebColors[] PROGMEM =
#define AGPIO(x) ((x)<<5)
#define BGPIO(x) ((x)>>5)
+#define AGMAX(x) ((x)?(x-1):0)
#ifdef USE_DEVICE_GROUPS
#define SendDeviceGroupMessage(DEVICE_INDEX, REQUEST_TYPE, ...) _SendDeviceGroupMessage(DEVICE_INDEX, REQUEST_TYPE, __VA_ARGS__, 0)
diff --git a/tasmota/include/tasmota_template.h b/tasmota/include/tasmota_template.h
index 053782636..0a0ce7e71 100644
--- a/tasmota/include/tasmota_template.h
+++ b/tasmota/include/tasmota_template.h
@@ -224,6 +224,10 @@ enum UserSelectablePins {
GPIO_WOOLIIS_RX, // Wooliis Battery capacity monitor Serial RX
GPIO_ADC_VOLTAGE, GPIO_ADC_CURRENT, // Analog Voltage and Current
GPIO_BL0906_RX, // BL0906 Serial interface
+ GPIO_DALI_RX_INV, GPIO_DALI_TX_INV, // DALI
+ GPIO_LD2410S_TX, GPIO_LD2410S_RX, // HLK-LD2410S
+ GPIO_I2C_SER_TX, GPIO_I2C_SER_RX, // I2C via Serial using SC18IM704 protocol (xdrv74)
+ GPIO_TM1640CLK, GPIO_TM1640DIN, // TM1640 (16 x seven-segment LED controler)
GPIO_SENSOR_END };
// Error as warning to rethink GPIO usage with max 2045
@@ -495,96 +499,100 @@ const char kSensorNames[] PROGMEM =
D_SENSOR_WOOLIIS_RX "|"
D_SENSOR_ADC_VOLTAGE "|" D_SENSOR_ADC_CURRENT "|"
D_SENSOR_BL0906_RX "|"
+ D_SENSOR_DALI_RX "_i|" D_SENSOR_DALI_TX "_i|"
+ D_SENSOR_LD2410S_TX "|" D_SENSOR_LD2410S_RX "|"
+ D_SENSOR_I2C_SER_TX "|" D_SENSOR_I2C_SER_RX "|"
+ D_SENSOR_TM1640_CLK "|" D_SENSOR_TM1640_DIN "|"
;
const char kSensorNamesFixed[] PROGMEM =
D_SENSOR_USER;
// Max number of GPIOs
-#define MAX_I2C 0 // Display no index if one bus
+#define MAX_I2C 1 // Display no index if one bus
#ifdef USE_I2C_BUS2
#undef MAX_I2C
-#define MAX_I2C 2
+#define MAX_I2C 2
#endif
-#define MAX_MAX31855S 6
-#define MAX_MAX31865S 6
-#define MAX_MCP23XXX 6
-#define MAX_FLOWRATEMETER 2
-#define MAX_A4988_MSS 3
-#define MAX_WEBCAM_DATA 8
-#define MAX_WEBCAM_HSD 3
-#define MAX_SM2135_DAT 10
-#define MAX_SM2335_DAT 16
-#define MAX_DSB 4
-#define MAX_BP1658CJ_DAT 16
-#define MAX_DINGTIAN_SHIFT 4
+#define MAX_MAX31855S 6
+#define MAX_MAX31865S 6
+#define MAX_MCP23XXX 6
+#define MAX_FLOWRATEMETER 2
+#define MAX_A4988_MSS 3
+#define MAX_WEBCAM_DATA 8
+#define MAX_WEBCAM_HSD 3
+#define MAX_SM2135_DAT 10
+#define MAX_SM2335_DAT 16
+#define MAX_DSB 4
+#define MAX_BP1658CJ_DAT 16
+#define MAX_DINGTIAN_SHIFT 4
#define MAX_MAGIC_SWITCH_MODES 2
-#define MAX_BL0906_RX 6 // Model number of phases, 2 (EM2), 6 (EM6)
-#define MAX_BL0942_RX 8 // Baudrates 1/5 (4800), 2/6 (9600), 3/7 (19200), 4/8 (38400), Support Positive values only 1..4, Support also negative values 5..8
-#define MAX_CSE7761 2 // Model 1/2 (DUALR3), 2/2 (POWCT)
+#define MAX_BL0906_RX 6 // Model number of phases, 2 (EM2), 6 (EM6)
+#define MAX_BL0942_RX 8 // Baudrates 1/5 (4800), 2/6 (9600), 3/7 (19200), 4/8 (38400), Support Positive values only 1..4, Support also negative values 5..8
+#define MAX_CSE7761 2 // Model 1/2 (DUALR3), 2/2 (POWCT)
const uint16_t kGpioNiceList[] PROGMEM = {
- GPIO_NONE, // Not used
- AGPIO(GPIO_OPTION_A) + MAX_OPTIONS_A, // Device specific options
+ GPIO_NONE, // Not used
+ AGPIO(GPIO_OPTION_A) + AGMAX(MAX_OPTIONS_A), // Device specific options
#ifdef ESP32
- AGPIO(GPIO_OPTION_E) + MAX_OPTIONS_E, // Device module emulation
+ AGPIO(GPIO_OPTION_E) + AGMAX(MAX_OPTIONS_E), // Device module emulation
#endif
- AGPIO(GPIO_KEY1) + MAX_KEYS, // Buttons
- AGPIO(GPIO_KEY1_NP) + MAX_KEYS,
+ AGPIO(GPIO_KEY1) + AGMAX(MAX_KEYS), // Buttons
+ AGPIO(GPIO_KEY1_NP) + AGMAX(MAX_KEYS),
#ifdef ESP32
- AGPIO(GPIO_KEY1_PD) + MAX_KEYS,
+ AGPIO(GPIO_KEY1_PD) + AGMAX(MAX_KEYS),
#endif
- AGPIO(GPIO_KEY1_INV) + MAX_KEYS,
- AGPIO(GPIO_KEY1_INV_NP) + MAX_KEYS,
+ AGPIO(GPIO_KEY1_INV) + AGMAX(MAX_KEYS),
+ AGPIO(GPIO_KEY1_INV_NP) + AGMAX(MAX_KEYS),
#ifdef ESP32
- AGPIO(GPIO_KEY1_INV_PD) + MAX_KEYS,
+ AGPIO(GPIO_KEY1_INV_PD) + AGMAX(MAX_KEYS),
#if defined(SOC_TOUCH_VERSION_1) || defined(SOC_TOUCH_VERSION_2)
- AGPIO(GPIO_KEY1_TC) + MAX_KEYS, // Touch button
+ AGPIO(GPIO_KEY1_TC) + AGMAX(MAX_KEYS), // Touch button
#endif // ESP32 SOC_TOUCH_VERSION_1 or SOC_TOUCH_VERSION_2
#endif
- AGPIO(GPIO_SWT1) + MAX_SWITCHES, // User connected external switches
- AGPIO(GPIO_SWT1_NP) + MAX_SWITCHES,
+ AGPIO(GPIO_SWT1) + AGMAX(MAX_SWITCHES), // User connected external switches
+ AGPIO(GPIO_SWT1_NP) + AGMAX(MAX_SWITCHES),
#ifdef ESP32
- AGPIO(GPIO_SWT1_PD) + MAX_SWITCHES,
+ AGPIO(GPIO_SWT1_PD) + AGMAX(MAX_SWITCHES),
#endif
#ifdef ROTARY_V1
- AGPIO(GPIO_ROT1A) + MAX_ROTARIES, // Rotary A Pin
- AGPIO(GPIO_ROT1B) + MAX_ROTARIES, // Rotary B Pin
- AGPIO(GPIO_ROT1A_NP) + MAX_ROTARIES, // Rotary A Pin No Pullup
- AGPIO(GPIO_ROT1B_NP) + MAX_ROTARIES, // Rotary B Pin No Pullup
+ AGPIO(GPIO_ROT1A) + AGMAX(MAX_ROTARIES), // Rotary A Pin
+ AGPIO(GPIO_ROT1B) + AGMAX(MAX_ROTARIES), // Rotary B Pin
+ AGPIO(GPIO_ROT1A_NP) + AGMAX(MAX_ROTARIES), // Rotary A Pin No Pullup
+ AGPIO(GPIO_ROT1B_NP) + AGMAX(MAX_ROTARIES), // Rotary B Pin No Pullup
#endif
- AGPIO(GPIO_REL1) + MAX_RELAYS, // Relays
- AGPIO(GPIO_REL1_INV) + MAX_RELAYS,
- AGPIO(GPIO_REL1_BI) + MAX_RELAYS, // Bistable (Latching) two coil relays
- AGPIO(GPIO_REL1_BI_INV) + MAX_RELAYS,
- AGPIO(GPIO_LED1) + MAX_LEDS, // Leds
- AGPIO(GPIO_LED1_INV) + MAX_LEDS,
+ AGPIO(GPIO_REL1) + AGMAX(MAX_RELAYS), // Relays
+ AGPIO(GPIO_REL1_INV) + AGMAX(MAX_RELAYS),
+ AGPIO(GPIO_REL1_BI) + AGMAX(MAX_RELAYS), // Bistable (Latching) two coil relays
+ AGPIO(GPIO_REL1_BI_INV) + AGMAX(MAX_RELAYS),
+ AGPIO(GPIO_LED1) + AGMAX(MAX_LEDS), // Leds
+ AGPIO(GPIO_LED1_INV) + AGMAX(MAX_LEDS),
#ifdef USE_COUNTER
- AGPIO(GPIO_CNTR1) + MAX_COUNTERS, // Counters
- AGPIO(GPIO_CNTR1_NP) + MAX_COUNTERS,
+ AGPIO(GPIO_CNTR1) + AGMAX(MAX_COUNTERS), // Counters
+ AGPIO(GPIO_CNTR1_NP) + AGMAX(MAX_COUNTERS),
#endif
- AGPIO(GPIO_PWM1) + MAX_PWMS, // RGB Red or C Cold White
- AGPIO(GPIO_PWM1_INV) + MAX_PWMS, // or extended PWM for ESP32
+ AGPIO(GPIO_PWM1) + AGMAX(MAX_PWMS), // RGB Red or C Cold White
+ AGPIO(GPIO_PWM1_INV) + AGMAX(MAX_PWMS), // or extended PWM for ESP32
#ifdef USE_BUZZER
- AGPIO(GPIO_BUZZER), // Buzzer
- AGPIO(GPIO_BUZZER_INV), // Inverted buzzer
+ AGPIO(GPIO_BUZZER), // Buzzer
+ AGPIO(GPIO_BUZZER_INV), // Inverted buzzer
#endif
- AGPIO(GPIO_LEDLNK), // Link led
- AGPIO(GPIO_LEDLNK_INV), // Inverted link led
+ AGPIO(GPIO_LEDLNK), // Link led
+ AGPIO(GPIO_LEDLNK_INV), // Inverted link led
#ifdef USE_BERRY
- AGPIO(GPIO_INPUT) + MAX_SWITCHES, // Pure digital input to be read via Berry
- AGPIO(GPIO_INTERRUPT) + MAX_SWITCHES, // Interrupt pins to be catched by Berry
+ AGPIO(GPIO_INPUT) + AGMAX(MAX_SWITCHES), // Pure digital input to be read via Berry
+ AGPIO(GPIO_INTERRUPT) + AGMAX(MAX_SWITCHES), // Interrupt pins to be catched by Berry
#endif
- AGPIO(GPIO_OUTPUT_HI), // Fixed output high
- AGPIO(GPIO_OUTPUT_LO), // Fixed output low
- AGPIO(GPIO_HEARTBEAT), // Every second pulsed high
- AGPIO(GPIO_HEARTBEAT_INV), // Every second pulsed low
- AGPIO(GPIO_RESET), // Generic reset
+ AGPIO(GPIO_OUTPUT_HI), // Fixed output high
+ AGPIO(GPIO_OUTPUT_LO), // Fixed output low
+ AGPIO(GPIO_HEARTBEAT), // Every second pulsed high
+ AGPIO(GPIO_HEARTBEAT_INV), // Every second pulsed low
+ AGPIO(GPIO_RESET), // Generic reset
#ifdef USE_FTC532
- AGPIO(GPIO_FTC532), // FTC532 touch input
+ AGPIO(GPIO_FTC532), // FTC532 touch input
#endif
#ifdef USE_BS814A2
- AGPIO(GPIO_BS814_CLK), // Holtek BS814A2 touch ctrlr
+ AGPIO(GPIO_BS814_CLK), // Holtek BS814A2 touch ctrlr
AGPIO(GPIO_BS814_DAT),
#endif
@@ -592,50 +600,49 @@ const uint16_t kGpioNiceList[] PROGMEM = {
* Protocol specifics
\*-------------------------------------------------------------------------------------------*/
-#ifdef USE_DALI
- AGPIO(GPIO_DALI_RX), // DALI RX
- AGPIO(GPIO_DALI_TX), // DALI TX
-#endif // USE_DALI
-
#ifdef USE_I2C
- AGPIO(GPIO_I2C_SCL) + MAX_I2C, // I2C SCL
- AGPIO(GPIO_I2C_SDA) + MAX_I2C, // I2C SDA
+ AGPIO(GPIO_I2C_SCL) + AGMAX(MAX_I2C), // I2C SCL
+ AGPIO(GPIO_I2C_SDA) + AGMAX(MAX_I2C), // I2C SDA
#ifdef USE_PCF8574
- AGPIO(GPIO_PCF8574_INT), // PCF8574 Interrupt
+ AGPIO(GPIO_PCF8574_INT), // PCF8574 Interrupt
#endif // USE_PCF8574
+#ifdef USE_I2C_SERIAL
+ AGPIO(GPIO_I2C_SER_TX) + AGMAX(MAX_I2C), // I2C via Serial TX
+ AGPIO(GPIO_I2C_SER_RX) + AGMAX(MAX_I2C), // I2C via Serial RX
+#endif // USE_I2C_SERIAL
#endif
#if defined(USE_I2S_AUDIO) || defined (USE_I2S)
- AGPIO(GPIO_I2S_MCLK) + MAX_I2S, // I2S master clock
- AGPIO(GPIO_I2S_BCLK) + MAX_I2S, // I2S bit clock
- AGPIO(GPIO_I2S_DOUT) + MAX_I2S, // I2S Out Data
- AGPIO(GPIO_I2S_DAC) + 2, // I2S DAC Output
- AGPIO(GPIO_I2S_WS) + MAX_I2S, // I2S word select
- AGPIO(GPIO_I2S_DIN) + MAX_I2S, // I2S IN Data
+ AGPIO(GPIO_I2S_MCLK) + AGMAX(MAX_I2S), // I2S master clock
+ AGPIO(GPIO_I2S_BCLK) + AGMAX(MAX_I2S), // I2S bit clock
+ AGPIO(GPIO_I2S_DOUT) + AGMAX(MAX_I2S), // I2S Out Data
+ AGPIO(GPIO_I2S_DAC) + AGMAX(2), // I2S DAC Output
+ AGPIO(GPIO_I2S_WS) + AGMAX(MAX_I2S), // I2S word select
+ AGPIO(GPIO_I2S_DIN) + AGMAX(MAX_I2S), // I2S IN Data
#endif
#ifdef USE_SPI
- AGPIO(GPIO_SPI_MISO) + MAX_SPI, // SPI MISO
- AGPIO(GPIO_SPI_MOSI) + MAX_SPI, // SPI MOSI
- AGPIO(GPIO_SPI_CLK) + MAX_SPI, // SPI Clk
- AGPIO(GPIO_SPI_CS) + MAX_SPI, // SPI Chip Select
- AGPIO(GPIO_SPI_DC) + MAX_SPI, // SPI Data Direction
+ AGPIO(GPIO_SPI_MISO) + AGMAX(MAX_SPI), // SPI MISO
+ AGPIO(GPIO_SPI_MOSI) + AGMAX(MAX_SPI), // SPI MOSI
+ AGPIO(GPIO_SPI_CLK) + AGMAX(MAX_SPI), // SPI Clk
+ AGPIO(GPIO_SPI_CS) + AGMAX(MAX_SPI), // SPI Chip Select
+ AGPIO(GPIO_SPI_DC) + AGMAX(MAX_SPI), // SPI Data Direction
#ifdef USE_NRF24
AGPIO(GPIO_NRF24_CS),
AGPIO(GPIO_NRF24_DC),
#endif
#ifdef USE_RC522
- AGPIO(GPIO_RC522_CS), // RC522 Rfid Chip Select
- AGPIO(GPIO_RC522_RST), // RC522 Rfid Reset
+ AGPIO(GPIO_RC522_CS), // RC522 Rfid Chip Select
+ AGPIO(GPIO_RC522_RST), // RC522 Rfid Reset
#endif
#ifdef USE_SDCARD
- AGPIO(GPIO_SDCARD_CS), // SDCard in SPI mode
+ AGPIO(GPIO_SDCARD_CS), // SDCard in SPI mode
#endif // USE_SDCARD
#if defined(USE_MCP2515) || defined(USE_CANSNIFFER)
AGPIO(GPIO_MCP2515_CS),
#endif // USE_MCP2515
#ifdef USE_MCP23XXX_DRV
- AGPIO(GPIO_MCP23SXX_CS) + MAX_MCP23XXX,
+ AGPIO(GPIO_MCP23SXX_CS) + AGMAX(MAX_MCP23XXX),
#endif // USE_MCP23XXX_DRV
#ifdef USE_SPI_LORA
AGPIO(GPIO_LORA_CS),
@@ -651,25 +658,25 @@ const uint16_t kGpioNiceList[] PROGMEM = {
#endif // USE_SPI
#if defined(USE_SDCARD) && defined(ESP32)
- AGPIO(GPIO_SDIO_CMD), // SDCard in SDIO mode
+ AGPIO(GPIO_SDIO_CMD), // SDCard in SDIO mode
AGPIO(GPIO_SDIO_CLK),
AGPIO(GPIO_SDIO_D0),
- AGPIO(GPIO_SDIO_D1), // (opt) if in 4-bit mode, DAT1-3 are needed
+ AGPIO(GPIO_SDIO_D1), // (opt) if in 4-bit mode, DAT1-3 are needed
AGPIO(GPIO_SDIO_D2),
AGPIO(GPIO_SDIO_D3),
#endif // USE_SDCARD
- AGPIO(GPIO_SSPI_MISO), // Software SPI Master Input Client Output
- AGPIO(GPIO_SSPI_MOSI), // Software SPI Master Output Client Input
- AGPIO(GPIO_SSPI_SCLK), // Software SPI Serial Clock
- AGPIO(GPIO_SSPI_CS), // Software SPI Chip Select
- AGPIO(GPIO_SSPI_DC), // Software SPI Data or Command
+ AGPIO(GPIO_SSPI_MISO), // Software SPI Master Input Client Output
+ AGPIO(GPIO_SSPI_MOSI), // Software SPI Master Output Client Input
+ AGPIO(GPIO_SSPI_SCLK), // Software SPI Serial Clock
+ AGPIO(GPIO_SSPI_CS), // Software SPI Chip Select
+ AGPIO(GPIO_SSPI_DC), // Software SPI Data or Command
#if defined(USE_DISPLAY) || defined(USE_LVGL)
#ifdef USE_UNIVERSAL_TOUCH
- AGPIO(GPIO_TS_SPI_CS), // Touch CS
- AGPIO(GPIO_TS_RST), // Touch Reset
- AGPIO(GPIO_TS_IRQ), // Touch IRQ
+ AGPIO(GPIO_TS_SPI_CS), // Touch CS
+ AGPIO(GPIO_TS_RST), // Touch Reset
+ AGPIO(GPIO_TS_IRQ), // Touch IRQ
#endif // USE_UNIVERSAL_TOUCH
// REMOVED
// #ifdef USE_DISPLAY_ILI9341
@@ -678,7 +685,7 @@ const uint16_t kGpioNiceList[] PROGMEM = {
// #endif // USE_DISPLAY_ILI9341
#ifdef USE_XPT2046
- AGPIO(GPIO_XPT2046_CS), // XPT2046 SPI Chip Select
+ AGPIO(GPIO_XPT2046_CS), // XPT2046 SPI Chip Select
#endif
#ifdef USE_DISPLAY_ILI9488
@@ -727,10 +734,14 @@ const uint16_t kGpioNiceList[] PROGMEM = {
AGPIO(GPIO_TM1638DIO),
AGPIO(GPIO_TM1638STB),
#endif // USE_DISPLAY_TM1637
- AGPIO(GPIO_BACKLIGHT), // Display backlight control
- AGPIO(GPIO_OLED_RESET), // OLED Display Reset
+#ifdef USE_DISPLAY_TM1640
+ AGPIO(GPIO_TM1640CLK),
+ AGPIO(GPIO_TM1640DIN),
+#endif // USE_DISPLAY_TM1640
+ AGPIO(GPIO_BACKLIGHT), // Display backlight control
+ AGPIO(GPIO_OLED_RESET), // OLED Display Reset
#ifdef ESP32
- AGPIO(GPIO_EPD_DATA), // Base connection EPD driver
+ AGPIO(GPIO_EPD_DATA), // Base connection EPD driver
#endif
#endif // USE_DISPLAY
@@ -743,37 +754,37 @@ const uint16_t kGpioNiceList[] PROGMEM = {
#endif // USE_DISPLAY_TM1621_SONOFF
#ifdef USE_MAX31865
- AGPIO(GPIO_SSPI_MAX31865_CS1) + MAX_MAX31865S,
+ AGPIO(GPIO_SSPI_MAX31865_CS1) + AGMAX(MAX_MAX31865S),
#endif
#ifdef USE_MCP23XXX_DRV
- AGPIO(GPIO_MCP23XXX_INT) + MAX_MCP23XXX,
+ AGPIO(GPIO_MCP23XXX_INT) + AGMAX(MAX_MCP23XXX),
#endif
#ifdef USE_HDMI_CEC
- AGPIO(GPIO_HDMI_CEC), // HDMI CEC bus
+ AGPIO(GPIO_HDMI_CEC), // HDMI CEC bus
#endif
- AGPIO(GPIO_TXD), // Serial interface
- AGPIO(GPIO_RXD), // Serial interface
+ AGPIO(GPIO_TXD), // Serial interface
+ AGPIO(GPIO_RXD), // Serial interface
/*-------------------------------------------------------------------------------------------*\
* Single wire sensors
\*-------------------------------------------------------------------------------------------*/
#ifdef USE_DHT
- AGPIO(GPIO_DHT11), // DHT11
- AGPIO(GPIO_DHT22), // DHT21, DHT22, AM2301, AM2302, AM2321
- AGPIO(GPIO_SI7021), // iTead SI7021
- AGPIO(GPIO_MS01), // Sonoff MS01
- AGPIO(GPIO_DHT11_OUT), // Pseudo Single wire DHT11, DHT21, DHT22, AM2301, AM2302, AM2321
+ AGPIO(GPIO_DHT11), // DHT11
+ AGPIO(GPIO_DHT22), // DHT21, DHT22, AM2301, AM2302, AM2321
+ AGPIO(GPIO_SI7021), // iTead SI7021
+ AGPIO(GPIO_MS01), // Sonoff MS01
+ AGPIO(GPIO_DHT11_OUT), // Pseudo Single wire DHT11, DHT21, DHT22, AM2301, AM2302, AM2321
#endif
#ifdef USE_DS18x20
- AGPIO(GPIO_DSB) + MAX_DSB, // Single wire DS18B20 or DS18S20
- AGPIO(GPIO_DSB_OUT) + MAX_DSB, // Pseudo Single wire DS18B20 or DS18S20
+ AGPIO(GPIO_DSB) + AGMAX(MAX_DSB), // Single wire DS18B20 or DS18S20
+ AGPIO(GPIO_DSB_OUT) + AGMAX(MAX_DSB), // Pseudo Single wire DS18B20 or DS18S20
#endif // USE_DS18x20
#ifdef USE_LMT01
- AGPIO(GPIO_LMT01), // LMT01, count pulses on GPIO
+ AGPIO(GPIO_LMT01), // LMT01, count pulses on GPIO
#endif
/*-------------------------------------------------------------------------------------------*\
@@ -783,47 +794,47 @@ const uint16_t kGpioNiceList[] PROGMEM = {
#ifdef USE_LIGHT
#ifdef USE_WS2812
#if (USE_WS2812_HARDWARE == NEO_HW_P9813)
- AGPIO(GPIO_P9813_CLK), // P9813 CLOCK
- AGPIO(GPIO_P9813_DAT), // P9813 DATA
+ AGPIO(GPIO_P9813_CLK), // P9813 CLOCK
+ AGPIO(GPIO_P9813_DAT), // P9813 DATA
#else
- AGPIO(GPIO_WS2812) + (MAX_RMT ? MAX_RMT + 1 : 0), // WS2812 Led string, using RMT on ESP32
+ AGPIO(GPIO_WS2812) + AGMAX(MAX_RMT), // WS2812 Led string, using RMT on ESP32
#endif // NEO_HW_P9813
#endif
#ifdef USE_ARILUX_RF
- AGPIO(GPIO_ARIRFRCV), // AriLux RF Receive input
- AGPIO(GPIO_ARIRFSEL), // Arilux RF Receive input selected
+ AGPIO(GPIO_ARIRFRCV), // AriLux RF Receive input
+ AGPIO(GPIO_ARIRFSEL), // Arilux RF Receive input selected
#endif
#ifdef USE_MY92X1
- AGPIO(GPIO_DI), // my92x1 PWM input
- AGPIO(GPIO_DCKI), // my92x1 CLK input
+ AGPIO(GPIO_DI), // my92x1 PWM input
+ AGPIO(GPIO_DCKI), // my92x1 CLK input
#endif // USE_MY92X1
#ifdef USE_SM16716
- AGPIO(GPIO_SM16716_CLK), // SM16716 CLOCK
- AGPIO(GPIO_SM16716_DAT), // SM16716 DATA
- AGPIO(GPIO_SM16716_SEL), // SM16716 SELECT
+ AGPIO(GPIO_SM16716_CLK), // SM16716 CLOCK
+ AGPIO(GPIO_SM16716_DAT), // SM16716 DATA
+ AGPIO(GPIO_SM16716_SEL), // SM16716 SELECT
#endif // USE_SM16716
#ifdef USE_SM2135
- AGPIO(GPIO_SM2135_CLK), // SM2135 CLOCK
- AGPIO(GPIO_SM2135_DAT) + MAX_SM2135_DAT, // SM2135 DATA
+ AGPIO(GPIO_SM2135_CLK), // SM2135 CLOCK
+ AGPIO(GPIO_SM2135_DAT) + AGMAX(MAX_SM2135_DAT), // SM2135 DATA
#endif // USE_SM2135
#ifdef USE_SM2335
- AGPIO(GPIO_SM2335_CLK), // SM2335 CLOCK
- AGPIO(GPIO_SM2335_DAT) + MAX_SM2335_DAT, // SM2335 DATA
+ AGPIO(GPIO_SM2335_CLK), // SM2335 CLOCK
+ AGPIO(GPIO_SM2335_DAT) + AGMAX(MAX_SM2335_DAT), // SM2335 DATA
#endif // USE_SM2335
#ifdef USE_BP1658CJ
- AGPIO(GPIO_BP1658CJ_CLK), // BP1658CJ CLOCK
- AGPIO(GPIO_BP1658CJ_DAT) + MAX_BP1658CJ_DAT, // BP1658CJ DATA
+ AGPIO(GPIO_BP1658CJ_CLK), // BP1658CJ CLOCK
+ AGPIO(GPIO_BP1658CJ_DAT) + AGMAX(MAX_BP1658CJ_DAT), // BP1658CJ DATA
#endif // USE_BP1658CJ
#ifdef USE_BP5758D
- AGPIO(GPIO_BP5758D_CLK), // BP5758D CLOCK
- AGPIO(GPIO_BP5758D_DAT), // BP5758D DATA
+ AGPIO(GPIO_BP5758D_CLK), // BP5758D CLOCK
+ AGPIO(GPIO_BP5758D_DAT), // BP5758D DATA
#endif // USE_BP5758D
#ifdef USE_TUYA_MCU
- AGPIO(GPIO_TUYA_TX), // Tuya Serial interface
- AGPIO(GPIO_TUYA_RX), // Tuya Serial interface
+ AGPIO(GPIO_TUYA_TX), // Tuya Serial interface
+ AGPIO(GPIO_TUYA_RX), // Tuya Serial interface
#endif
#ifdef USE_EXS_DIMMER
- AGPIO(GPIO_EXS_ENABLE), // EXS MCU Enable
+ AGPIO(GPIO_EXS_ENABLE), // EXS MCU Enable
#endif
#ifdef USE_ELECTRIQ_MOODL
AGPIO(GPIO_ELECTRIQ_MOODL_TX),
@@ -834,43 +845,50 @@ const uint16_t kGpioNiceList[] PROGMEM = {
#endif
#endif // USE_LIGHT
+#ifdef USE_DALI
+ AGPIO(GPIO_DALI_TX), // DALI TX
+ AGPIO(GPIO_DALI_TX_INV), // DALI TX inverted
+ AGPIO(GPIO_DALI_RX), // DALI RX
+ AGPIO(GPIO_DALI_RX_INV), // DALI RX inverted
+#endif // USE_DALI
+
/*-------------------------------------------------------------------------------------------*\
* Transmission sensors
\*-------------------------------------------------------------------------------------------*/
#if defined(USE_IR_REMOTE) || defined(USE_IR_REMOTE_FULL)
- AGPIO(GPIO_IRSEND) + MAX_IRSEND, // IR remote
+ AGPIO(GPIO_IRSEND) + AGMAX(MAX_IRSEND), // IR remote
#if defined(USE_IR_RECEIVE) || defined(USE_IR_REMOTE_FULL)
- AGPIO(GPIO_IRRECV), // IR receiver
+ AGPIO(GPIO_IRRECV), // IR receiver
#endif
#endif
#ifdef USE_RC_SWITCH
- AGPIO(GPIO_RFSEND), // RF transmitter
- AGPIO(GPIO_RFRECV), // RF receiver
+ AGPIO(GPIO_RFSEND), // RF transmitter
+ AGPIO(GPIO_RFRECV), // RF receiver
#endif
#ifdef USE_RF_SENSOR
- AGPIO(GPIO_RF_SENSOR), // Rf receiver with sensor decoding
+ AGPIO(GPIO_RF_SENSOR), // Rf receiver with sensor decoding
#endif
#ifdef USE_SR04
- AGPIO(GPIO_SR04_TRIG) + MAX_SR04, // SR04 Tri/TXgger pin
- AGPIO(GPIO_SR04_ECHO) + MAX_SR04, // SR04 Ech/RXo pin
+ AGPIO(GPIO_SR04_TRIG) + AGMAX(MAX_SR04), // SR04 Tri/TXgger pin
+ AGPIO(GPIO_SR04_ECHO) + AGMAX(MAX_SR04), // SR04 Ech/RXo pin
#endif
#ifdef USE_ME007
- AGPIO(GPIO_ME007_TRIG), // ME007 Trigger pin (xsns_23_me007.ino)
- AGPIO(GPIO_ME007_RX), // ME007 Rx pin (xsns_23_me007.ino)
+ AGPIO(GPIO_ME007_TRIG), // ME007 Trigger pin (xsns_23_me007.ino)
+ AGPIO(GPIO_ME007_RX), // ME007 Rx pin (xsns_23_me007.ino)
#endif
#ifdef USE_TM1638
- AGPIO(GPIO_TM1638CLK), // TM1638 Clock
- AGPIO(GPIO_TM1638DIO), // TM1638 Data I/O
- AGPIO(GPIO_TM1638STB), // TM1638 Strobe
+ AGPIO(GPIO_TM1638CLK), // TM1638 Clock
+ AGPIO(GPIO_TM1638DIO), // TM1638 Data I/O
+ AGPIO(GPIO_TM1638STB), // TM1638 Strobe
#endif
#ifdef USE_HX711
- AGPIO(GPIO_HX711_SCK), // HX711 Load Cell clock
- AGPIO(GPIO_HX711_DAT), // HX711 Load Cell data
+ AGPIO(GPIO_HX711_SCK), // HX711 Load Cell clock
+ AGPIO(GPIO_HX711_DAT), // HX711 Load Cell data
#endif
#ifdef USE_TFMINIPLUS
- AGPIO(GPIO_TFMINIPLUS_TX), // TFmini Plus TX pin
- AGPIO(GPIO_TFMINIPLUS_RX), // TFmini Plus RX pin
+ AGPIO(GPIO_TFMINIPLUS_TX), // TFmini Plus TX pin
+ AGPIO(GPIO_TFMINIPLUS_RX), // TFmini Plus RX pin
#endif
/*-------------------------------------------------------------------------------------------*\
@@ -879,109 +897,109 @@ const uint16_t kGpioNiceList[] PROGMEM = {
#ifdef USE_ENERGY_SENSOR
#ifdef USE_HLW8012
- AGPIO(GPIO_NRG_SEL), // HLW8012/HLJ-01 Sel output (1 = Voltage)
- AGPIO(GPIO_NRG_SEL_INV), // HLW8012/HLJ-01 Sel output (0 = Voltage)
- AGPIO(GPIO_NRG_CF1), // HLW8012/HLJ-01 CF1 voltage / current
- AGPIO(GPIO_HLW_CF), // HLW8012 CF power
- AGPIO(GPIO_HJL_CF), // HJL-01/BL0937 CF power
+ AGPIO(GPIO_NRG_SEL), // HLW8012/HLJ-01 Sel output (1 = Voltage)
+ AGPIO(GPIO_NRG_SEL_INV), // HLW8012/HLJ-01 Sel output (0 = Voltage)
+ AGPIO(GPIO_NRG_CF1), // HLW8012/HLJ-01 CF1 voltage / current
+ AGPIO(GPIO_HLW_CF), // HLW8012 CF power
+ AGPIO(GPIO_HJL_CF), // HJL-01/BL0937 CF power
#endif
#if defined(USE_I2C) && defined(USE_ADE7880)
- AGPIO(GPIO_ADE7880_IRQ) + 2, // ADE7880 IRQ - (1 = IRQ1, 2 = IRQ2)
+ AGPIO(GPIO_ADE7880_IRQ) + AGMAX(2), // ADE7880 IRQ - (1 = IRQ1, 2 = IRQ2)
#endif
#ifdef USE_ADE7953
#if defined(USE_I2C) || defined(USE_SPI)
- AGPIO(GPIO_ADE7953_IRQ) + 6, // ADE7953 IRQ - (1 = Shelly 2.5, 2 = Shelly EM, 3 = Shelly Plus 2PM, 4 = Shelly Pro 1PM, 5 = Shelly Pro 2PM, 6 = Shelly Pro 4PM)
- AGPIO(GPIO_ADE7953_RST), // ADE7953 Reset
+ AGPIO(GPIO_ADE7953_IRQ) + AGMAX(6), // ADE7953 IRQ - (1 = Shelly 2.5, 2 = Shelly EM, 3 = Shelly Plus 2PM, 4 = Shelly Pro 1PM, 5 = Shelly Pro 2PM, 6 = Shelly Pro 4PM)
+ AGPIO(GPIO_ADE7953_RST), // ADE7953 Reset
#ifdef USE_SPI
- AGPIO(GPIO_ADE7953_CS) + 2, // ADE7953 SPI Chip Select (1 = CS1 (1PM, 2PM), 2 = CS2 (2PM))
+ AGPIO(GPIO_ADE7953_CS) + AGMAX(2), // ADE7953 SPI Chip Select (1 = CS1 (1PM, 2PM), 2 = CS2 (2PM))
#endif // USE_SPI
#endif // USE_I2C or USE_SPI
#endif // USE_ADE7953
#ifdef USE_CSE7761
- AGPIO(GPIO_CSE7761_TX), // CSE7761 Serial interface (Dual R3)
- AGPIO(GPIO_CSE7761_RX) + MAX_CSE7761, // CSE7761 Serial interface (1 = Dual R3, 2 = POWCT)
+ AGPIO(GPIO_CSE7761_TX), // CSE7761 Serial interface (Dual R3)
+ AGPIO(GPIO_CSE7761_RX) + AGMAX(MAX_CSE7761), // CSE7761 Serial interface (1 = Dual R3, 2 = POWCT)
#endif
#ifdef USE_CSE7766
- AGPIO(GPIO_CSE7766_TX), // CSE7766 Serial interface (S31 and Pow R2)
- AGPIO(GPIO_CSE7766_RX), // CSE7766 Serial interface (S31 and Pow R2)
+ AGPIO(GPIO_CSE7766_TX), // CSE7766 Serial interface (S31 and Pow R2)
+ AGPIO(GPIO_CSE7766_RX), // CSE7766 Serial interface (S31 and Pow R2)
#endif
#ifdef USE_MCP39F501
- AGPIO(GPIO_MCP39F5_TX), // MCP39F501 Serial interface (Shelly2)
- AGPIO(GPIO_MCP39F5_RX), // MCP39F501 Serial interface (Shelly2)
- AGPIO(GPIO_MCP39F5_RST), // MCP39F501 Reset (Shelly2)
+ AGPIO(GPIO_MCP39F5_TX), // MCP39F501 Serial interface (Shelly2)
+ AGPIO(GPIO_MCP39F5_RX), // MCP39F501 Serial interface (Shelly2)
+ AGPIO(GPIO_MCP39F5_RST), // MCP39F501 Reset (Shelly2)
#endif
- AGPIO(GPIO_NRG_MBS_TX_ENA), // Generic Energy Modbus Transmit Enable
+ AGPIO(GPIO_NRG_MBS_TX_ENA), // Generic Energy Modbus Transmit Enable
#if defined(USE_PZEM004T) || defined(USE_PZEM_AC) || defined(USE_PZEM_DC)
- AGPIO(GPIO_PZEM0XX_TX), // PZEM0XX Serial interface
+ AGPIO(GPIO_PZEM0XX_TX), // PZEM0XX Serial interface
#endif
#ifdef USE_PZEM004T
- AGPIO(GPIO_PZEM004_RX), // PZEM004T Serial interface
+ AGPIO(GPIO_PZEM004_RX), // PZEM004T Serial interface
#endif
#ifdef USE_PZEM_AC
- AGPIO(GPIO_PZEM016_RX), // PZEM-014,016 Serial Modbus interface
+ AGPIO(GPIO_PZEM016_RX), // PZEM-014,016 Serial Modbus interface
#endif
#ifdef USE_PZEM_DC
- AGPIO(GPIO_PZEM017_RX), // PZEM-003,017 Serial Modbus interface
+ AGPIO(GPIO_PZEM017_RX), // PZEM-003,017 Serial Modbus interface
#endif
#ifdef USE_MODBUS_ENERGY
- AGPIO(GPIO_NRG_MBS_TX), // Generic Energy Modbus device
+ AGPIO(GPIO_NRG_MBS_TX), // Generic Energy Modbus device
AGPIO(GPIO_NRG_MBS_RX),
#endif
#ifdef USE_SDM120
- AGPIO(GPIO_SDM120_TX), // SDM120 Serial interface
- AGPIO(GPIO_SDM120_RX), // SDM120 Serial interface
+ AGPIO(GPIO_SDM120_TX), // SDM120 Serial interface
+ AGPIO(GPIO_SDM120_RX), // SDM120 Serial interface
#endif
#ifdef USE_SDM630
- AGPIO(GPIO_SDM630_TX), // SDM630 Serial interface
- AGPIO(GPIO_SDM630_RX), // SDM630 Serial interface
+ AGPIO(GPIO_SDM630_TX), // SDM630 Serial interface
+ AGPIO(GPIO_SDM630_RX), // SDM630 Serial interface
#endif
#ifdef USE_DDS2382
- AGPIO(GPIO_DDS2382_TX), // DDS2382 Serial interface
- AGPIO(GPIO_DDS2382_RX), // DDS2382 Serial interface
+ AGPIO(GPIO_DDS2382_TX), // DDS2382 Serial interface
+ AGPIO(GPIO_DDS2382_RX), // DDS2382 Serial interface
#endif
#ifdef USE_DDSU666
- AGPIO(GPIO_DDSU666_TX), // DDSU666 Serial interface
- AGPIO(GPIO_DDSU666_RX), // DDSU666 Serial interface
+ AGPIO(GPIO_DDSU666_TX), // DDSU666 Serial interface
+ AGPIO(GPIO_DDSU666_RX), // DDSU666 Serial interface
#endif // USE_DDSU666
#ifdef USE_SOLAX_X1
- AGPIO(GPIO_SOLAXX1_TX), // Solax Inverter tx pin
- AGPIO(GPIO_SOLAXX1_RX), // Solax Inverter rx pin
- AGPIO(GPIO_SOLAXX1_RTS), // Solax Inverter RTS pin
+ AGPIO(GPIO_SOLAXX1_TX), // Solax Inverter tx pin
+ AGPIO(GPIO_SOLAXX1_RX), // Solax Inverter rx pin
+ AGPIO(GPIO_SOLAXX1_RTS), // Solax Inverter RTS pin
#endif // USE_SOLAX_X1
#ifdef USE_LE01MR
- AGPIO(GPIO_LE01MR_TX), // F7F LE-01MR energy meter tx pin
- AGPIO(GPIO_LE01MR_RX), // F7F LE-01MR energy meter rx pin
+ AGPIO(GPIO_LE01MR_TX), // F7F LE-01MR energy meter tx pin
+ AGPIO(GPIO_LE01MR_RX), // F7F LE-01MR energy meter rx pin
#endif // USE_LE01MR
#ifdef ESP32
#ifdef USE_BL0906
- AGPIO(GPIO_BL0906_RX) + MAX_BL0906_RX, // BL0906 Serial interface (Athom EM6)
+ AGPIO(GPIO_BL0906_RX) + AGMAX(MAX_BL0906_RX), // BL0906 Serial interface (Athom EM6)
#endif // USE_BL0906
#endif // ESP32
#if defined(USE_BL0940) || defined(USE_BL09XX)
- AGPIO(GPIO_BL0939_RX), // BL0939 Serial interface (Dual R3 v2)
- AGPIO(GPIO_BL0940_RX), // BL0940 Serial interface
- AGPIO(GPIO_BL0942_RX) + MAX_BL0942_RX, // BL0942 Serial interface
+ AGPIO(GPIO_BL0939_RX), // BL0939 Serial interface (Dual R3 v2)
+ AGPIO(GPIO_BL0940_RX), // BL0940 Serial interface
+ AGPIO(GPIO_BL0942_RX) + AGMAX(MAX_BL0942_RX), // BL0942 Serial interface
#endif
#ifdef USE_IEM3000
- AGPIO(GPIO_IEM3000_TX), // IEM3000 Serial interface
- AGPIO(GPIO_IEM3000_RX), // IEM3000 Serial interface
+ AGPIO(GPIO_IEM3000_TX), // IEM3000 Serial interface
+ AGPIO(GPIO_IEM3000_RX), // IEM3000 Serial interface
#endif
#ifdef USE_WE517
- AGPIO(GPIO_WE517_TX), // WE517 Serial interface
- AGPIO(GPIO_WE517_RX), // WE517 Serial interface
+ AGPIO(GPIO_WE517_TX), // WE517 Serial interface
+ AGPIO(GPIO_WE517_RX), // WE517 Serial interface
#endif
#ifdef USE_SDM72
- AGPIO(GPIO_SDM72_TX), // SDM72 Serial interface
- AGPIO(GPIO_SDM72_RX), // SDM72 Serial interface
+ AGPIO(GPIO_SDM72_TX), // SDM72 Serial interface
+ AGPIO(GPIO_SDM72_RX), // SDM72 Serial interface
#endif
AGPIO(GPIO_ZEROCROSS),
#ifdef USE_SDM230
- AGPIO(GPIO_SDM230_TX), // SDM230 Serial interface
- AGPIO(GPIO_SDM230_RX), // SDM230 Serial interface
+ AGPIO(GPIO_SDM230_TX), // SDM230 Serial interface
+ AGPIO(GPIO_SDM230_RX), // SDM230 Serial interface
#endif
#ifdef USE_BL6523
- AGPIO(GPIO_BL6523_TX), // BL6523 based Watt meter Serial interface
- AGPIO(GPIO_BL6523_RX), // BL6523 based Watt meter Serial interface
+ AGPIO(GPIO_BL6523_TX), // BL6523 based Watt meter Serial interface
+ AGPIO(GPIO_BL6523_RX), // BL6523 based Watt meter Serial interface
#endif
#endif // USE_ENERGY_SENSOR
@@ -990,130 +1008,134 @@ const uint16_t kGpioNiceList[] PROGMEM = {
\*-------------------------------------------------------------------------------------------*/
#ifdef USE_SERIAL_BRIDGE
- AGPIO(GPIO_SBR_TX), // Serial Bridge Serial interface
- AGPIO(GPIO_SBR_RX), // Serial Bridge Serial interface
+ AGPIO(GPIO_SBR_TX), // Serial Bridge Serial interface
+ AGPIO(GPIO_SBR_RX), // Serial Bridge Serial interface
#endif
#ifdef USE_MODBUS_BRIDGE
- AGPIO(GPIO_MBR_TX_ENA), // Modbus Bridge Serial interface
- AGPIO(GPIO_MBR_TX), // Modbus Bridge Serial interface
- AGPIO(GPIO_MBR_RX), // Modbus Bridge Serial interface
+ AGPIO(GPIO_MBR_TX_ENA), // Modbus Bridge Serial interface
+ AGPIO(GPIO_MBR_TX), // Modbus Bridge Serial interface
+ AGPIO(GPIO_MBR_RX), // Modbus Bridge Serial interface
#endif
#ifdef USE_TCP_BRIDGE
- AGPIO(GPIO_TCP_TX), // TCP Serial bridge
- AGPIO(GPIO_TCP_RX), // TCP Serial bridge
- AGPIO(GPIO_TCP_TX_EN), // TCP Serial bridge EN
+ AGPIO(GPIO_TCP_TX), // TCP Serial bridge
+ AGPIO(GPIO_TCP_RX), // TCP Serial bridge
+ AGPIO(GPIO_TCP_TX_EN), // TCP Serial bridge EN
#endif
#ifdef USE_ZIGBEE
- AGPIO(GPIO_ZIGBEE_TX), // Zigbee Serial interface
- AGPIO(GPIO_ZIGBEE_RX), // Zigbee Serial interface
- AGPIO(GPIO_ZIGBEE_RST) + 2, // Zigbee reset, pin 1 is reset, pin 2 is bootloader mode
+ AGPIO(GPIO_ZIGBEE_TX), // Zigbee Serial interface
+ AGPIO(GPIO_ZIGBEE_RX), // Zigbee Serial interface
+ AGPIO(GPIO_ZIGBEE_RST) + AGMAX(2), // Zigbee reset, pin 1 is reset, pin 2 is bootloader mode
#endif
#ifdef USE_MHZ19
- AGPIO(GPIO_MHZ_TXD), // MH-Z19 Serial interface
- AGPIO(GPIO_MHZ_RXD), // MH-Z19 Serial interface
+ AGPIO(GPIO_MHZ_TXD), // MH-Z19 Serial interface
+ AGPIO(GPIO_MHZ_RXD), // MH-Z19 Serial interface
#endif
#ifdef USE_HC8
- AGPIO(GPIO_HC8_RXD), // HC8 Serial interface
+ AGPIO(GPIO_HC8_RXD), // HC8 Serial interface
#endif
#ifdef USE_SENSEAIR
- AGPIO(GPIO_SAIR_TX), // SenseAir Serial interface
- AGPIO(GPIO_SAIR_RX), // SenseAir Serial interface
+ AGPIO(GPIO_SAIR_TX), // SenseAir Serial interface
+ AGPIO(GPIO_SAIR_RX), // SenseAir Serial interface
#endif
#ifdef USE_NOVA_SDS
- AGPIO(GPIO_SDS0X1_TX), // Nova Fitness SDS011 Serial interface
- AGPIO(GPIO_SDS0X1_RX), // Nova Fitness SDS011 Serial interface
+ AGPIO(GPIO_SDS0X1_TX), // Nova Fitness SDS011 Serial interface
+ AGPIO(GPIO_SDS0X1_RX), // Nova Fitness SDS011 Serial interface
#endif
#ifdef USE_HPMA
- AGPIO(GPIO_HPMA_TX), // Honeywell HPMA115S0 Serial interface
- AGPIO(GPIO_HPMA_RX), // Honeywell HPMA115S0 Serial interface
+ AGPIO(GPIO_HPMA_TX), // Honeywell HPMA115S0 Serial interface
+ AGPIO(GPIO_HPMA_RX), // Honeywell HPMA115S0 Serial interface
#endif
#ifdef USE_PMS5003
- AGPIO(GPIO_PMS5003_TX), // Plantower PMS5003 Serial interface
- AGPIO(GPIO_PMS5003_RX), // Plantower PMS5003 Serial interface
+ AGPIO(GPIO_PMS5003_TX), // Plantower PMS5003 Serial interface
+ AGPIO(GPIO_PMS5003_RX), // Plantower PMS5003 Serial interface
#endif
#ifdef USE_VINDRIKTNING
- AGPIO(GPIO_VINDRIKTNING_RX), // Ikea Vindriktning
+ AGPIO(GPIO_VINDRIKTNING_RX), // Ikea Vindriktning
#endif
#ifdef USE_HM330X
- AGPIO(GPIO_HM330X_SET), // HM330X Sleep pin (active low)
+ AGPIO(GPIO_HM330X_SET), // HM330X Sleep pin (active low)
#endif
#if defined(USE_TX20_WIND_SENSOR) || defined(USE_TX23_WIND_SENSOR) || defined(USE_WS2300_WIND_SENSOR)
- AGPIO(GPIO_TX2X_TXD_BLACK), // TX20/TX23 Transmission Pin
+ AGPIO(GPIO_TX2X_TXD_BLACK), // TX20/TX23 Transmission Pin
#endif
-#ifdef USE_WINDMETER // xsns_68_windmeter.ino
+#ifdef USE_WINDMETER
AGPIO(GPIO_WINDMETER_SPEED),
#endif
-#ifdef USE_MP3_PLAYER // xdrv_14_mp3.ino
- AGPIO(GPIO_MP3_DFR562), // RB-DFR-562, DFPlayer Mini MP3 Player Serial interface
- AGPIO(GPIO_MP3_DFR562_BUSY), // RB-DFR-562, DFPlayer Mini MP3 Player optional Busy flag
+#ifdef USE_MP3_PLAYER
+ AGPIO(GPIO_MP3_DFR562), // RB-DFR-562, DFPlayer Mini MP3 Player Serial interface
+ AGPIO(GPIO_MP3_DFR562_BUSY), // RB-DFR-562, DFPlayer Mini MP3 Player optional Busy flag
#endif
-#ifdef USE_AZ7798 // xsns_38_az7798
- AGPIO(GPIO_AZ_TXD), // AZ-Instrument 7798 CO2 datalogger Serial interface
- AGPIO(GPIO_AZ_RXD), // AZ-Instrument 7798 CO2 datalogger Serial interface
+#ifdef USE_AZ7798
+ AGPIO(GPIO_AZ_TXD), // AZ-Instrument 7798 CO2 datalogger Serial interface
+ AGPIO(GPIO_AZ_RXD), // AZ-Instrument 7798 CO2 datalogger Serial interface
#endif
-#ifdef USE_PN532_HSU // xsns_40_pn532.ino
- AGPIO(GPIO_PN532_TXD), // PN532 HSU Tx
- AGPIO(GPIO_PN532_RXD), // PN532 HSU Rx
+#ifdef USE_PN532_HSU
+ AGPIO(GPIO_PN532_TXD), // PN532 HSU Tx
+ AGPIO(GPIO_PN532_RXD), // PN532 HSU Rx
#endif
-#ifdef USE_TASMOTA_CLIENT // xdrv_31_tasmota_client.ino
- AGPIO(GPIO_TASMOTACLIENT_TXD), // Tasmota Client TX
- AGPIO(GPIO_TASMOTACLIENT_RXD), // Tasmota Client RX
- AGPIO(GPIO_TASMOTACLIENT_RST), // Tasmota Client Reset
- AGPIO(GPIO_TASMOTACLIENT_RST_INV), // Tasmota Client Reset Inverted
+#ifdef USE_TASMOTA_CLIENT
+ AGPIO(GPIO_TASMOTACLIENT_TXD), // Tasmota Client TX
+ AGPIO(GPIO_TASMOTACLIENT_RXD), // Tasmota Client RX
+ AGPIO(GPIO_TASMOTACLIENT_RST), // Tasmota Client Reset
+ AGPIO(GPIO_TASMOTACLIENT_RST_INV), // Tasmota Client Reset Inverted
#endif
-#ifdef USE_RDM6300 // xsns_51_rdm6300.ino
+#ifdef USE_RDM6300
AGPIO(GPIO_RDM6300_RX),
#endif
-#ifdef USE_IBEACON // xsns_52_ibeacon.ino
+#ifdef USE_IBEACON
AGPIO(GPIO_IBEACON_TX),
AGPIO(GPIO_IBEACON_RX),
#endif
-#ifdef USE_GPS // xsns_60_gps.ino
- AGPIO(GPIO_GPS_TX), // GPS serial interface
- AGPIO(GPIO_GPS_RX), // GPS serial interface
+#ifdef USE_GPS
+ AGPIO(GPIO_GPS_TX), // GPS serial interface
+ AGPIO(GPIO_GPS_RX), // GPS serial interface
#endif
-#ifdef USE_HM10 // xsns_62_mi_hm10.ino
- AGPIO(GPIO_HM10_TX), // HM10 serial interface
- AGPIO(GPIO_HM10_RX), // HM10 serial interface
+#ifdef USE_HM10
+ AGPIO(GPIO_HM10_TX), // HM10 serial interface
+ AGPIO(GPIO_HM10_RX), // HM10 serial interface
#endif
-#ifdef USE_OPENTHERM // xsns_69_opentherm.ino
+#ifdef USE_OPENTHERM
AGPIO(GPIO_BOILER_OT_TX),
AGPIO(GPIO_BOILER_OT_RX),
#endif
-#ifdef USE_AS608 // xsns_79_as608.ino
+#ifdef USE_AS608
AGPIO(GPIO_AS608_TX),
AGPIO(GPIO_AS608_RX),
#endif
-#ifdef USE_GM861 // xsns_107_gm861.ino
+#ifdef USE_GM861
AGPIO(GPIO_GM861_TX),
AGPIO(GPIO_GM861_RX),
#endif
-#ifdef USE_HRG15 // xsns_90_hrg15.ino
+#ifdef USE_HRG15
AGPIO(GPIO_HRG15_TX),
AGPIO(GPIO_HRG15_RX),
#endif
-#ifdef USE_CM110x // xsns_95_cm110x.ino
- AGPIO(GPIO_CM11_TXD), // CM110x Serial interface
- AGPIO(GPIO_CM11_RXD), // CM110x Serial interface
+#ifdef USE_CM110x
+ AGPIO(GPIO_CM11_TXD), // CM110x Serial interface
+ AGPIO(GPIO_CM11_RXD), // CM110x Serial interface
#endif
-#ifdef USE_LD2410 // xsns_102_ld2410.ino
- AGPIO(GPIO_LD2410_TX), // HLK-LD2410 Serial interface
- AGPIO(GPIO_LD2410_RX), // HLK-LD2410 Serial interface
+#ifdef USE_LD2410
+ AGPIO(GPIO_LD2410_TX), // HLK-LD2410 Serial interface
+ AGPIO(GPIO_LD2410_RX), // HLK-LD2410 Serial interface
#endif
-#ifdef USE_LOX_O2 // xsns_105_lox_o2.ino
- AGPIO(GPIO_LOX_O2_RX), // LuminOx Oxygen Sensor LOX-O2 Serial interface
+#ifdef USE_LD2410S
+ AGPIO(GPIO_LD2410S_TX), // HLK-LD2410S Serial interface
+ AGPIO(GPIO_LD2410S_RX), // HLK-LD2410S Serial interface
+#endif
+#ifdef USE_LOX_O2
+ AGPIO(GPIO_LOX_O2_RX), // LuminOx Oxygen Sensor LOX-O2 Serial interface
#endif
#ifdef USE_LORAWAN_RN2XX3
AGPIO(GPIO_RN2XX3_TX),
AGPIO(GPIO_RN2XX3_RX),
- AGPIO(GPIO_RN2XX3_RST), // RN2XX3 LoRaWan node Serial interface
+ AGPIO(GPIO_RN2XX3_RST), // RN2XX3 LoRaWan node Serial interface
#endif
#ifdef USE_LORAWAN_ASR650X
AGPIO(GPIO_ASR650X_TX),
- AGPIO(GPIO_ASR650X_RX), // ASR650X LoRaWan node Serial interface
+ AGPIO(GPIO_ASR650X_RX), // ASR650X LoRaWan node Serial interface
#endif
-#ifdef USE_WOOLIIS // xsns_115_wooliis.ino
- AGPIO(GPIO_WOOLIIS_RX), // Wooliis Battery capacity monitor Serial interface
+#ifdef USE_WOOLIIS
+ AGPIO(GPIO_WOOLIIS_RX), // Wooliis Battery capacity monitor Serial interface
#endif
/*-------------------------------------------------------------------------------------------*\
@@ -1125,27 +1147,27 @@ const uint16_t kGpioNiceList[] PROGMEM = {
AGPIO(GPIO_MGC3130_RESET),
#endif
#ifdef USE_MAX31855
- AGPIO(GPIO_MAX31855CS) + MAX_MAX31855S, //MAX31855 Serial interface
- AGPIO(GPIO_MAX31855CLK), // MAX31855 Serial interface
- AGPIO(GPIO_MAX31855DO), // MAX31855 Serial interface
+ AGPIO(GPIO_MAX31855CS) + AGMAX(MAX_MAX31855S), // MAX31855 Serial interface
+ AGPIO(GPIO_MAX31855CLK), // MAX31855 Serial interface
+ AGPIO(GPIO_MAX31855DO), // MAX31855 Serial interface
#endif
#ifdef USE_HRE
AGPIO(GPIO_HRE_CLOCK),
AGPIO(GPIO_HRE_DATA),
#endif
#ifdef USE_A4988_STEPPER
- AGPIO(GPIO_A4988_DIR), // A4988 direction pin
- AGPIO(GPIO_A4988_STP), // A4988 step pin
+ AGPIO(GPIO_A4988_DIR), // A4988 direction pin
+ AGPIO(GPIO_A4988_STP), // A4988 step pin
// folowing are not mandatory
- AGPIO(GPIO_A4988_ENA), // A4988 enabled pin
- AGPIO(GPIO_A4988_MS1) + MAX_A4988_MSS, // A4988 microstep pin1 to pin3
+ AGPIO(GPIO_A4988_ENA), // A4988 enabled pin
+ AGPIO(GPIO_A4988_MS1) + AGMAX(MAX_A4988_MSS), // A4988 microstep pin1 to pin3
#endif
#ifdef USE_DEEPSLEEP
AGPIO(GPIO_DEEPSLEEP),
#endif
#ifdef USE_KEELOQ
- AGPIO(GPIO_CC1101_GDO0), // CC1101 pin for RX
- AGPIO(GPIO_CC1101_GDO2), // CC1101 pin for RX
+ AGPIO(GPIO_CC1101_GDO0), // CC1101 pin for RX
+ AGPIO(GPIO_CC1101_GDO2), // CC1101 pin for RX
#endif
#ifdef USE_HRXL
AGPIO(GPIO_HRXL_RX),
@@ -1154,48 +1176,48 @@ const uint16_t kGpioNiceList[] PROGMEM = {
AGPIO(GPIO_DYP_RX),
#endif
#ifdef USE_AS3935
- AGPIO(GPIO_AS3935), // AS3935 IRQ Pin
+ AGPIO(GPIO_AS3935), // AS3935 IRQ Pin
#endif
#ifdef USE_TELEINFO
AGPIO(GPIO_TELEINFO_RX),
AGPIO(GPIO_TELEINFO_ENABLE),
#endif
#ifdef USE_MIEL_HVAC
- AGPIO(GPIO_MIEL_HVAC_TX), // Mitsubishi Electric HVAC TX pin
- AGPIO(GPIO_MIEL_HVAC_RX), // Mitsubishi Electric HVAC RX pin
+ AGPIO(GPIO_MIEL_HVAC_TX), // Mitsubishi Electric HVAC TX pin
+ AGPIO(GPIO_MIEL_HVAC_RX), // Mitsubishi Electric HVAC RX pin
#endif
#ifdef USE_TUYAMCUBR
AGPIO(GPIO_TUYAMCUBR_TX),
AGPIO(GPIO_TUYAMCUBR_RX),
#endif
#ifdef USE_WIEGAND
- AGPIO(GPIO_WIEGAND_D0), // Date line D0 of Wiegand devices
- AGPIO(GPIO_WIEGAND_D1), // Date line D1 of Wiegand devices
+ AGPIO(GPIO_WIEGAND_D0), // Data line D0 of Wiegand devices
+ AGPIO(GPIO_WIEGAND_D1), // Data line D1 of Wiegand devices
#endif
#ifdef USE_NEOPOOL
- AGPIO(GPIO_NEOPOOL_TX), // Sugar Valley RS485 Interface
- AGPIO(GPIO_NEOPOOL_RX), // Sugar Valley RS485 Interface
+ AGPIO(GPIO_NEOPOOL_TX), // Sugar Valley RS485 Interface
+ AGPIO(GPIO_NEOPOOL_RX), // Sugar Valley RS485 Interface
#endif
#ifdef USE_PROJECTOR_CTRL
- AGPIO(GPIO_PROJECTOR_CTRL_TX), // LCD/DLP Projector Serial Control
- AGPIO(GPIO_PROJECTOR_CTRL_RX), // LCD/DLP Projector Serial Control
+ AGPIO(GPIO_PROJECTOR_CTRL_TX), // LCD/DLP Projector Serial Control
+ AGPIO(GPIO_PROJECTOR_CTRL_RX), // LCD/DLP Projector Serial Control
#endif
#if defined(USE_VL53L0X) or defined (USE_VL53L1X)
- AGPIO(GPIO_VL53LXX_XSHUT1) + VL53LXX_MAX_SENSORS, // When using multiple VL53LXX.
+ AGPIO(GPIO_VL53LXX_XSHUT1) + AGMAX(VL53LXX_MAX_SENSORS), // When using multiple VL53LXX.
#endif
#ifdef USE_FLOWRATEMETER
- AGPIO(GPIO_FLOWRATEMETER_IN) + MAX_FLOWRATEMETER, // Flow meter Pin
+ AGPIO(GPIO_FLOWRATEMETER_IN) + AGMAX(MAX_FLOWRATEMETER), // Flow meter Pin
#endif
#ifdef USE_SHIFT595
- AGPIO(GPIO_SHIFT595_SRCLK), // 74x595 shift register
+ AGPIO(GPIO_SHIFT595_SRCLK), // 74x595 shift register
AGPIO(GPIO_SHIFT595_RCLK),
AGPIO(GPIO_SHIFT595_OE),
AGPIO(GPIO_SHIFT595_SER),
#endif
#if defined (ESP32) && defined(USE_DINGTIAN_RELAY)
- AGPIO(GPIO_DINGTIAN_CLK) + MAX_DINGTIAN_SHIFT, // Dingtian Relay board - 8,16,24 or 32 relays & inputs
+ AGPIO(GPIO_DINGTIAN_CLK) + AGMAX(MAX_DINGTIAN_SHIFT), // Dingtian Relay board - 8,16,24 or 32 relays & inputs
AGPIO(GPIO_DINGTIAN_SDI),
AGPIO(GPIO_DINGTIAN_Q7),
AGPIO(GPIO_DINGTIAN_PL),
@@ -1204,12 +1226,12 @@ const uint16_t kGpioNiceList[] PROGMEM = {
#endif
#ifdef USE_MAGIC_SWITCH
- AGPIO(GPIO_MAGIC_SWITCH) + MAX_MAGIC_SWITCH_MODES,
+ AGPIO(GPIO_MAGIC_SWITCH) + AGMAX(MAX_MAGIC_SWITCH_MODES),
#endif
-#ifdef USE_PIPSOLAR // xdrv_92_pipsolar.ino
- AGPIO(GPIO_PIPSOLAR_TX), // pipsolar inverter Serial interface
- AGPIO(GPIO_PIPSOLAR_RX), // pipsolar inverter Serial interface
+#ifdef USE_PIPSOLAR
+ AGPIO(GPIO_PIPSOLAR_TX), // pipsolar inverter Serial interface
+ AGPIO(GPIO_PIPSOLAR_RX), // pipsolar inverter Serial interface
#endif
/*-------------------------------------------------------------------------------------------*\
@@ -1218,7 +1240,7 @@ const uint16_t kGpioNiceList[] PROGMEM = {
#ifdef ESP32
#if CONFIG_IDF_TARGET_ESP32
- AGPIO(GPIO_HALLEFFECT) + 2, // Hall effect sensor connected to GPIO36 and 39
+ AGPIO(GPIO_HALLEFFECT) + AGMAX(2), // Hall effect sensor connected to GPIO36 and 39
#endif // CONFIG_IDF_TARGET_ESP32
#ifdef USE_WEBCAM
AGPIO(GPIO_WEBCAM_PWDN),
@@ -1226,41 +1248,41 @@ const uint16_t kGpioNiceList[] PROGMEM = {
AGPIO(GPIO_WEBCAM_XCLK),
AGPIO(GPIO_WEBCAM_SIOD),
AGPIO(GPIO_WEBCAM_SIOC),
- AGPIO(GPIO_WEBCAM_DATA) + MAX_WEBCAM_DATA,
+ AGPIO(GPIO_WEBCAM_DATA) + AGMAX(MAX_WEBCAM_DATA),
AGPIO(GPIO_WEBCAM_VSYNC),
AGPIO(GPIO_WEBCAM_HREF),
AGPIO(GPIO_WEBCAM_PCLK),
AGPIO(GPIO_WEBCAM_PSCLK),
- AGPIO(GPIO_WEBCAM_HSD) + MAX_WEBCAM_HSD,
+ AGPIO(GPIO_WEBCAM_HSD) + AGMAX(MAX_WEBCAM_HSD),
AGPIO(GPIO_WEBCAM_PSRCS),
#endif // USE_WEBCAM
#ifdef USE_ETHERNET
AGPIO(GPIO_ETH_PHY_POWER),
AGPIO(GPIO_ETH_PHY_MDC),
- AGPIO(GPIO_ETH_PHY_MDIO), // Ethernet
+ AGPIO(GPIO_ETH_PHY_MDIO), // Ethernet
#endif // USE_ETHERNET
#ifdef USE_BIOPDU
- AGPIO(GPIO_BIOPDU_PZEM0XX_TX), // Biomine BioPDU pins
+ AGPIO(GPIO_BIOPDU_PZEM0XX_TX), // Biomine BioPDU pins
AGPIO(GPIO_BIOPDU_PZEM016_RX),
- AGPIO(GPIO_BIOPDU_BIT) + 3,
+ AGPIO(GPIO_BIOPDU_BIT) + AGMAX(3),
#endif
/*-------------------------------------------------------------------------------------------*\
* ESP32 multiple Analog / Digital converter inputs
\*-------------------------------------------------------------------------------------------*/
- AGPIO(GPIO_ADC_INPUT) + MAX_ADCS, // Analog inputs
- AGPIO(GPIO_ADC_TEMP) + MAX_ADCS, // Thermistor
- AGPIO(GPIO_ADC_LIGHT) + MAX_ADCS, // Light sensor
- AGPIO(GPIO_ADC_BUTTON) + MAX_KEYS, // Button
- AGPIO(GPIO_ADC_BUTTON_INV) + MAX_KEYS,
- AGPIO(GPIO_ADC_RANGE) + MAX_ADCS, // Range
- AGPIO(GPIO_ADC_CT_POWER) + MAX_ADCS, // Current
- AGPIO(GPIO_ADC_JOY) + MAX_ADCS, // Joystick
- AGPIO(GPIO_ADC_PH) + MAX_ADCS, // Analog PH Sensor
- AGPIO(GPIO_ADC_MQ) + MAX_ADCS, // Analog MQ Sensor
- AGPIO(GPIO_ADC_VOLTAGE) + MAX_ADCS, // Voltage
- AGPIO(GPIO_ADC_CURRENT) + MAX_ADCS, // Current
+ AGPIO(GPIO_ADC_INPUT) + AGMAX(MAX_ADCS), // Analog inputs
+ AGPIO(GPIO_ADC_TEMP) + AGMAX(MAX_ADCS), // Thermistor
+ AGPIO(GPIO_ADC_LIGHT) + AGMAX(MAX_ADCS), // Light sensor
+ AGPIO(GPIO_ADC_BUTTON) + AGMAX(MAX_KEYS), // Button
+ AGPIO(GPIO_ADC_BUTTON_INV) + AGMAX(MAX_KEYS),
+ AGPIO(GPIO_ADC_RANGE) + AGMAX(MAX_ADCS), // Range
+ AGPIO(GPIO_ADC_CT_POWER) + AGMAX(MAX_ADCS), // Current
+ AGPIO(GPIO_ADC_JOY) + AGMAX(MAX_ADCS), // Joystick
+ AGPIO(GPIO_ADC_PH) + AGMAX(MAX_ADCS), // Analog PH Sensor
+ AGPIO(GPIO_ADC_MQ) + AGMAX(MAX_ADCS), // Analog MQ Sensor
+ AGPIO(GPIO_ADC_VOLTAGE) + AGMAX(MAX_ADCS), // Voltage
+ AGPIO(GPIO_ADC_CURRENT) + AGMAX(MAX_ADCS), // Current
#endif // ESP32
};
@@ -1270,19 +1292,19 @@ const uint16_t kGpioNiceList[] PROGMEM = {
#ifdef ESP8266
const uint16_t kAdcNiceList[] PROGMEM = {
- GPIO_NONE, // Not used
- AGPIO(GPIO_ADC_INPUT), // Analog inputs
- AGPIO(GPIO_ADC_TEMP), // Thermistor
- AGPIO(GPIO_ADC_LIGHT), // Light sensor
- AGPIO(GPIO_ADC_BUTTON) + MAX_KEYS, // Button
- AGPIO(GPIO_ADC_BUTTON_INV) + MAX_KEYS,
- AGPIO(GPIO_ADC_RANGE), // Range
- AGPIO(GPIO_ADC_CT_POWER), // Current
- AGPIO(GPIO_ADC_JOY), // Joystick
- AGPIO(GPIO_ADC_PH), // Analog PH Sensor
- AGPIO(GPIO_ADC_MQ), // Analog MQ Sensor
- AGPIO(GPIO_ADC_VOLTAGE), // Voltage
- AGPIO(GPIO_ADC_CURRENT), // Current
+ GPIO_NONE, // Not used
+ AGPIO(GPIO_ADC_INPUT), // Analog inputs
+ AGPIO(GPIO_ADC_TEMP), // Thermistor
+ AGPIO(GPIO_ADC_LIGHT), // Light sensor
+ AGPIO(GPIO_ADC_BUTTON) + AGMAX(MAX_KEYS), // Button
+ AGPIO(GPIO_ADC_BUTTON_INV) + AGMAX(MAX_KEYS),
+ AGPIO(GPIO_ADC_RANGE), // Range
+ AGPIO(GPIO_ADC_CT_POWER), // Current
+ AGPIO(GPIO_ADC_JOY), // Joystick
+ AGPIO(GPIO_ADC_PH), // Analog PH Sensor
+ AGPIO(GPIO_ADC_MQ), // Analog MQ Sensor
+ AGPIO(GPIO_ADC_VOLTAGE), // Voltage
+ AGPIO(GPIO_ADC_CURRENT), // Current
};
#endif // ESP8266
diff --git a/tasmota/include/tasmota_types.h b/tasmota/include/tasmota_types.h
old mode 100755
new mode 100644
index e7fdbbf0e..c0cb9959b
--- a/tasmota/include/tasmota_types.h
+++ b/tasmota/include/tasmota_types.h
@@ -194,9 +194,9 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
uint32_t neopool_outputsensitive : 1; // bit 11 (v13.2.0.1) - SetOption157 - (NeoPool) Output sensitive data (1)
uint32_t mqtt_disable_modbus : 1; // bit 12 (v13.3.0.5) - SetOption158 - (MQTT) Disable publish ModbusReceived MQTT messages (1), you must use event trigger rules instead
uint32_t counter_both_edges : 1; // bit 13 (v13.3.0.5) - SetOption159 - (Counter) Enable counting on both rising and falling edge (1)
- uint32_t spare14 : 1; // bit 14
- uint32_t spare15 : 1; // bit 15
- uint32_t spare16 : 1; // bit 16
+ uint32_t ld2410_use_pin : 1; // bit 14 (v14.3.0.2) - SetOption160 - (LD2410) Disable generate moving event by sensor report - use LD2410 out pin for events (1)
+ uint32_t gui_no_state_text : 1; // bit 15 (v14.3.0.7) - SetOption161 - (GUI) Disable display of state text (1)
+ uint32_t no_export_energy_today : 1; // bit 16 (v14.3.0.7) - SetOption162 - (Energy) Do not add export energy to energy today (1)
uint32_t spare17 : 1; // bit 17
uint32_t spare18 : 1; // bit 18
uint32_t spare19 : 1; // bit 19
@@ -260,15 +260,11 @@ typedef union {
uint32_t spare16 : 1; // bit 16
uint32_t spare17 : 1; // bit 17
uint32_t spare18 : 1; // bit 18
- uint32_t spare19 : 1; // bit 19
- uint32_t spare20 : 1; // bit 20
- uint32_t spare21 : 1; // bit 21
- uint32_t spare22 : 1; // bit 22
- uint32_t spare23 : 1; // bit 23
- uint32_t FTP_Mode : 2; // bit 24, 25
- uint32_t tariff_forced : 2; // bit 26..27 (v12.4.0.2) - Energy forced tariff : 0=tariff change on time, 1|2=tariff forced
- uint32_t sunrise_dawn_angle : 2; // bits 28/29 (v12.1.1.4) -
- uint32_t temperature_set_res : 2; // bits 30/31 (v9.3.1.4) - (Tuya)
+ uint32_t dali_group_sliders : 5; // bit 19.23 (v14.3.0.3) - (DALI) Number of group sliders 0 to 16
+ uint32_t FTP_Mode : 2; // bit 24/25
+ uint32_t tariff_forced : 2; // bit 26/27 (v12.4.0.2) - Energy forced tariff : 0=tariff change on time, 1|2=tariff forced
+ uint32_t sunrise_dawn_angle : 2; // bit 28/29 (v12.1.1.4) -
+ uint32_t temperature_set_res : 2; // bit 30/31 (v9.3.1.4) - (Tuya)
};
} SysMBitfield2;
@@ -289,7 +285,7 @@ typedef union {
uint32_t influxdb_sensor : 1; // bit 10 (v11.0.0.5) - CMND_IFXSENSOR - Enable sensor support in addition to teleperiod support
uint32_t ex_serbridge_console : 1; // bit 11 (v11.1.0.4) - (v14.1.0.2) Replaced by CMND_SSERIALMODE
uint32_t telegram_disable_af : 1; // bit 12 (v14.0.0.2) - CMND_TMSTATE 6/7 - Disable Telegram auto-fingerprint fix
- uint32_t dali_web : 1; // bit 13 (v14.2.0.6) - CMND_DALIWEB - Enable DALI web controls
+ uint32_t dali_light : 1; // bit 13 (v14.2.0.6) - CMND_DALILIGHT - Enable Tasmota light controls for DALI
uint32_t spare14 : 1; // bit 14
uint32_t spare15 : 1; // bit 15
uint32_t spare16 : 1; // bit 16
@@ -681,17 +677,12 @@ typedef struct {
uint8_t light_width; // 4A4
uint8_t knx_GA_registered; // 4A5 Number of Group Address to read
uint16_t light_wakeup; // 4A6
- uint8_t knx_CB_registered; // 4A8 Number of Group Address to write
- uint8_t switchmode[MAX_SWITCHES_SET]; // 4A9
- uint8_t global_sensor_index[3]; // 4C5
+ uint8_t switchmode[MAX_SWITCHES_SET]; // 4A8 4A9 - Moved dn by 1 byte in v14.3.0.7
uint16_t dns_timeout; // 4C8
uint8_t ds3502_state[MAX_DS3502]; // 4CA
uint16_t influxdb_port; // 4CE
power_t interlock[MAX_INTERLOCKS_SET]; // 4D0 MAX_INTERLOCKS = MAX_RELAYS / 2
- int8_t shutter_tilt_config[5][MAX_SHUTTERS]; //508
- int8_t shutter_tilt_pos[MAX_SHUTTERS]; //51C
- uint16_t influxdb_period; // 520
- uint16_t rf_duplicate_time; // 522
+ int8_t shutter_tilt_config[5][MAX_SHUTTERS]; // 510 508 - - Moved up by 8 bytes in v14.3.0.7
int32_t weight_absconv_a; // 524
int32_t weight_absconv_b; // 528
uint16_t mqtt_keepalive; // 52C
@@ -699,8 +690,13 @@ typedef struct {
uint8_t mqtt_wifi_timeout; // 530
uint8_t ina219_mode; // 531
uint8_t weight_precision; // 532 ex_pulse_timer free since 11.0.0.3
+ uint8_t knx_CB_registered; // 533 4A8 Number of Group Address to write
+ int8_t shutter_tilt_pos[MAX_SHUTTERS]; // 534 51C
+ uint16_t influxdb_period; // 538 520
+ uint16_t rf_duplicate_time; // 53A 522
+ uint8_t global_sensor_index[3]; // 53C 4C5
- uint8_t free_533[13]; // 533
+ uint8_t free_53F[1]; // 53F
uint16_t tcp_baudrate; // 540
uint16_t button_debounce; // 542
@@ -850,9 +846,10 @@ typedef struct {
uint8_t modbus_sconfig; // F62
uint8_t windmeter_measure_intvl; // F63
- uint8_t free_f64[12]; // F64 - Decrement if adding new Setting variables just above and below
+ uint8_t free_f64[8]; // F64 - Decrement if adding new Setting variables just above and below
// Only 32 bit boundary variables below
+ float ms5837_pressure_offset; // F6C
uint32_t touch_threshold; // F70
SOBitfield6 flag6; // F74
uint16_t flowratemeter_calibration[2];// F78
diff --git a/tasmota/include/tasmota_version.h b/tasmota/include/tasmota_version.h
index 374717278..59eee7c69 100644
--- a/tasmota/include/tasmota_version.h
+++ b/tasmota/include/tasmota_version.h
@@ -22,6 +22,6 @@
#define TASMOTA_SHA_SHORT // Filled by Github sed
-const uint32_t TASMOTA_VERSION = 0x0E030000; // 14.3.0.0
+const uint32_t TASMOTA_VERSION = 0x0E040000; // 14.4.0.0
#endif // _TASMOTA_VERSION_H_
diff --git a/tasmota/include/xsns_62_esp32_mi.h b/tasmota/include/xsns_62_esp32_mi.h
index 9995b2ff1..27b4ad231 100644
--- a/tasmota/include/xsns_62_esp32_mi.h
+++ b/tasmota/include/xsns_62_esp32_mi.h
@@ -198,6 +198,7 @@ struct {
uint32_t runningScan:1;
uint32_t updateScan:1;
uint32_t deleteScanTask:1;
+ uint32_t IRKinCfg:1;
uint32_t canConnect:1;
@@ -401,7 +402,7 @@ const char kMI32DeviceType[] PROGMEM = {"Flora|MJ_HT_V1|LYWSD02|LYWSD03|CGG1|CGD
const char kMI32_ConnErrorMsg[] PROGMEM = "no Error|could not connect|did disconnect|got no service|got no characteristic|can not read|can not notify|can not write|did not write|notify time out";
-const char kMI32_BLEInfoMsg[] PROGMEM = "Scan ended|Got Notification|Did connect|Did disconnect|Still connected|Start passive scanning|Start active scanning|Server characteristic set|Server advertisement set|Server scan response set|Server client did connect|Server client did disconnect";
+const char kMI32_BLEInfoMsg[] PROGMEM = "Scan ended|Got Notification|Did connect|Did disconnect|Still connected|Start passive scanning|Start active scanning|Server characteristic set|Server advertisement set|Server scan response set|Server client did connect|Server client did disconnect| Server client did authenticate";
const char kMI32_ButtonMsg[] PROGMEM = "Single|Double|Hold"; //mapping: in Tasmota: 1,2,3 ; for HomeKit and Xiaomi 0,1,2
/*********************************************************************************************\
@@ -444,6 +445,7 @@ BLE_OP_ON_SUBSCRIBE_TO_NOTIFICATIONS_AND_INDICATIONS,
BLE_OP_ON_CONNECT,
BLE_OP_ON_DISCONNECT,
BLE_OP_ON_STATUS,
+BLE_OP_ON_AUTHENTICATED
};
enum MI32_ConnErrorMsg {
@@ -471,7 +473,8 @@ enum MI32_BLEInfoMsg {
MI32_SERV_ADVERTISEMENT_ADDED,
MI32_SERV_SCANRESPONSE_ADDED,
MI32_SERV_CLIENT_CONNECTED,
- MI32_SERV_CLIENT_DISCONNECTED
+ MI32_SERV_CLIENT_DISCONNECTED,
+ MI32_SERV_CLIENT_AUTHENTICATED
};
/*********************************************************************************************\
diff --git a/tasmota/language/af_AF.h b/tasmota/language/af_AF.h
index 9b58f716b..c94c35a22 100644
--- a/tasmota/language/af_AF.h
+++ b/tasmota/language/af_AF.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Ontfout"
#define D_DEWPOINT "Dou punt"
#define D_DISABLED "Gedeaktiveer"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Afstand"
#define D_DNS_SERVER "DNS"
#define D_DO "Opgeloste suurstof"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Webbediener"
#define D_SOC "Laai kondisie"
#define D_SOH "Laai vermoeë"
+#define D_WATER_DEPTH "Water diepte"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "WAARSKUWING Hierdie weergawe ondersteun nie aanhoudende instellings nie"
@@ -282,16 +280,16 @@
#define D_CONSOLE "Konsole"
#define D_CONFIRM_RESTART "Bevestig weer te begin"
-#define D_CONFIGURE_MODULE "Stel Module in"
-#define D_CONFIGURE_WIFI "Stel WiFi in"
-#define D_CONFIGURE_MQTT "Stel MQTT in"
-#define D_CONFIGURE_DOMOTICZ "Stel Domoticz in"
-#define D_CONFIGURE_LOGGING "Stel Logging in"
-#define D_CONFIGURE_OTHER "Stel Ander in"
+#define D_CONFIGURE_MODULE "Module"
+#define D_CONFIGURE_WIFI "WiFi"
+#define D_CONFIGURE_MQTT "MQTT"
+#define D_CONFIGURE_DOMOTICZ "Domoticz"
+#define D_CONFIGURE_LOGGING "Logging"
+#define D_CONFIGURE_OTHER "Ander"
#define D_CONFIRM_RESET_CONFIGURATION "Bevestig die herstel van die konfigurasie"
-#define D_RESET_CONFIGURATION "Stel die konfigurasie terug"
-#define D_BACKUP_CONFIGURATION "Rugsteun die konfigurasie"
-#define D_RESTORE_CONFIGURATION "Herstel die konfigurasie"
+#define D_RESET_CONFIGURATION "Stel terug"
+#define D_BACKUP_CONFIGURATION "Rugsteun"
+#define D_RESTORE_CONFIGURATION "Herstel"
#define D_START_RESTORE "Start restore"
#define D_MAIN_MENU "Hoofkieslys"
@@ -358,7 +356,7 @@
#define D_SINGLE_DEVICE "enkele toestel"
#define D_MULTI_DEVICE "multi toestel"
-#define D_CONFIGURE_TEMPLATE "Konfigureer sjabloon"
+#define D_CONFIGURE_TEMPLATE "sjabloon"
#define D_TEMPLATE_PARAMETERS "Sjabloon parameters"
#define D_TEMPLATE_NAME "Naam"
#define D_BASE_TYPE "Gebaseer op"
@@ -388,10 +386,10 @@
#define D_FLASH_CHIP_SIZE "Flash Size"
#define D_FREE_PROGRAM_SPACE "Vrye program grootte"
-#define D_UPGRADE_BY_WEBSERVER "Opgradeer per webbediener"
+#define D_UPGRADE_BY_WEBSERVER "Per webbediener"
#define D_OTA_URL "OTA Url"
#define D_START_UPGRADE "Begin opgradering"
-#define D_UPGRADE_BY_FILE_UPLOAD "Gradeer op volgens lêeroplaai"
+#define D_UPGRADE_BY_FILE_UPLOAD "Volgens lêeroplaai"
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
#define D_UPLOAD_STARTED "Oplaai begin"
#define D_UPGRADE_STARTED "Opgradering is begin"
@@ -465,7 +463,7 @@
#define D_DOMOTICZ_UPDATE_TIMER "Dateer tydopdatering op"
// xdrv_09_timers.ino
-#define D_CONFIGURE_TIMER "Stel Timer in"
+#define D_CONFIGURE_TIMER "Timer"
#define D_TIMER_PARAMETERS "Timer-parameters"
#define D_TIMER_ENABLE "Aktiveer timers"
#define D_TIMER_ARM "Aktiveer"
@@ -476,7 +474,7 @@
#define D_TIMER_ACTION "Aksie"
// xdrv_10_knx.ino
-#define D_CONFIGURE_KNX "Stel KNX op"
+#define D_CONFIGURE_KNX "KNX"
#define D_KNX_PARAMETERS "KNX-parameters"
#define D_KNX_GENERAL_CONFIG "Algemene"
#define D_KNX_PHYSICAL_ADDRESS "Fisiese adres"
@@ -548,7 +546,7 @@
#define D_DOMOTICZ_SHUTTER "Luik"
// xdrv_28_pcf8574.ino
-#define D_CONFIGURE_PCF8574 "Configure PCF8574"
+#define D_CONFIGURE_PCF8574 "PCF8574"
#define D_PCF8574_PARAMETERS "PCF8574 parameters"
#define D_INVERT_PORTS "Keer poorte om"
#define D_DEVICE "Toestel"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Sensor besig"
#define D_SENSOR_CRC_ERROR "Sensor CRC fout"
@@ -621,7 +627,7 @@
#define D_HX_CAL_DONE "Gekalibreer"
#define D_HX_CAL_FAIL "Kon nie kalibreer nie"
#define D_RESET_HX711 "Stel die skaal terug"
-#define D_CONFIGURE_HX711 "Stel skaal op"
+#define D_CONFIGURE_HX711 "skaal"
#define D_HX711_PARAMETERS "Skaal parameters"
#define D_ITEM_WEIGHT "Gewig van die item"
#define D_REFERENCE_WEIGHT "Verwysingsgewig"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "sec"
#define D_UNIT_SECTORS "sectors"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Import reaktief"
#define D_EXPORT_REACTIVE "Uitvoer reaktief"
#define D_TOTAL_REACTIVE "Totaal reaktief"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Deg"
#define D_TOTAL_ACTIVE "Totaal aktief"
#define D_RESETTABLE_TOTAL_ACTIVE "Totaal aktief (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/bg_BG.h b/tasmota/language/bg_BG.h
index aab2d5396..e4adb6dbb 100644
--- a/tasmota/language/bg_BG.h
+++ b/tasmota/language/bg_BG.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Премахване на дефекти"
#define D_DEWPOINT "Температура на оросяване"
#define D_DISABLED "Забранено"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Разстояние"
#define D_DNS_SERVER "Сървър на DNS"
#define D_DO "Разтворен кислород"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Уеб сървър"
#define D_SOC "Съснояние на зареждане"
#define D_SOH "State of Health"
+#define D_WATER_DEPTH "Дълбочина на водата"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "ПРЕДУПРЕЖДЕНИЕ Тази версия не поддържа постоянни настройки"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Датчикът DS18x20 е зает"
#define D_SENSOR_CRC_ERROR "Датчик DS18x20 - грешка CRC"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/ca_AD.h b/tasmota/language/ca_AD.h
index 8f8a6c9e0..5c4638ddc 100644
--- a/tasmota/language/ca_AD.h
+++ b/tasmota/language/ca_AD.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Depuració"
#define D_DEWPOINT "Punt de rossada"
#define D_DISABLED "Deshabilitat"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Distancia"
#define D_DNS_SERVER "Servidor DNS"
#define D_DO "Oxígen dissolt"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Servidor Web"
#define D_SOC "Estat de canvi"
#define D_SOH "Estat de salut"
+#define D_WATER_DEPTH "Profunditat de l'aigua"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "Avís : Aquesta versió no suporta configuració persistent"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Sensor busy"
#define D_SENSOR_CRC_ERROR "Sensor CRC error"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "sec"
#define D_UNIT_SECTORS "sectors"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Importat Reactiva"
#define D_EXPORT_REACTIVE "Exportat Reactiva"
#define D_TOTAL_REACTIVE "Total Reactiva"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Graus"
#define D_TOTAL_ACTIVE "Total Activa"
#define D_RESETTABLE_TOTAL_ACTIVE "Total Activa (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/cs_CZ.h b/tasmota/language/cs_CZ.h
index 4263ddbd2..f09bb97d3 100644
--- a/tasmota/language/cs_CZ.h
+++ b/tasmota/language/cs_CZ.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Debug"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Zablokováno"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Distance"
#define D_DNS_SERVER "Server DNS"
#define D_DO "Disolved Oxygen"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Web Server"
#define D_SOC "State of Charge"
#define D_SOH "State of Health"
+#define D_WATER_DEPTH "Hloubka vody"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "UPOZORNĚNÍ Tato verze nepodporuje trvalé nastavení"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Sensor DS18x20 obsazen"
#define D_SENSOR_CRC_ERROR "Sensor DS18x20 chyba CRC"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "sec"
#define D_UNIT_SECTORS "sektory"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Import Reactive"
#define D_EXPORT_REACTIVE "Export Reactive"
#define D_TOTAL_REACTIVE "Total Reactive"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Deg"
#define D_TOTAL_ACTIVE "Total Active"
#define D_RESETTABLE_TOTAL_ACTIVE "Total Active (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/de_DE.h b/tasmota/language/de_DE.h
index c8de7e1f0..f6f5d16af 100644
--- a/tasmota/language/de_DE.h
+++ b/tasmota/language/de_DE.h
@@ -28,7 +28,7 @@
* Use online command StateText to translate ON, OFF, HOLD and TOGGLE.
* Use online command Prefix to translate cmnd, stat and tele.
*
- * Updated until v14.1.0.4 - Last update 28.07.2024
+ * Updated until v14.3.0.7 - Last update 07.12.2024
\*********************************************************************/
//#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)
@@ -87,9 +87,6 @@
#define D_DEBUG "debug"
#define D_DEWPOINT "Taupunkt"
#define D_DISABLED "deaktiviert"
-#define D_MOVING_DISTANCE "Abstand bewegt"
-#define D_STATIC_DISTANCE "Abstand fix"
-#define D_DETECT_DISTANCE "Abstandsfeststellung"
#define D_DISTANCE "Abstand"
#define D_DNS_SERVER "DNS-Server"
#define D_DO "gelöster Sauerstoff"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Webserver"
#define D_SOC "Ladestatus"
#define D_SOH "Gesundheitsstatus"
+#define D_WATER_DEPTH "Wassertiefe"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "ACHTUNG: Diese Version unterstützt keine persistenten Einstellungen"
@@ -261,18 +259,18 @@
#define D_NOSCRIPT "JavaScript aktivieren um Tasmota benutzen zu können"
#define D_SAFEBOOT "SAFEBOOT"
#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "MINIMUM-Firmware bitte upgraden"
-#define D_WEBSERVER_ACTIVE_ON "Webserver aktiv bei"
+#define D_WEBSERVER_ACTIVE_ON "Webserver aktiv"
#define D_WITH_IP_ADDRESS "mit IP-Adresse"
#define D_WEBSERVER_STOPPED "Webserver angehalten"
#define D_FILE_NOT_FOUND "Datei nicht gefunden"
#define D_REDIRECTED "umgeleitet zum Captive Portal"
#define D_WIFIMANAGER_SET_ACCESSPOINT_AND_STATION "WLAN-Manager AccessPoint gesetzt und behält Station"
#define D_WIFIMANAGER_SET_ACCESSPOINT "WLAN-Manager AccessPoint gesetzt"
-#define D_TRYING_TO_CONNECT "Versuche mit Netzwerk zu verbinden"
+#define D_TRYING_TO_CONNECT "Verbindungsversuch mit Netzwerk"
#define D_RESTART_IN "Neustart in"
#define D_SECONDS "Sekunden"
-#define D_DEVICE_WILL_RESTART "Gerät wird jetzt neu gestartet"
+#define D_DEVICE_WILL_RESTART "Neustart"
#define D_BUTTON_TOGGLE "An/Aus"
#define D_CONFIGURATION "Einstellungen"
#define D_INFORMATION "Informationen"
@@ -282,68 +280,68 @@
#define D_CONSOLE "Konsole"
#define D_CONFIRM_RESTART "Wirklich neustarten?"
-#define D_CONFIGURE_MODULE "Geräteeinstellungen"
-#define D_CONFIGURE_WIFI "WLAN-Einstellungen"
-#define D_CONFIGURE_MQTT "MQTT-Einstellungen"
-#define D_CONFIGURE_DOMOTICZ "Domoticz-Einstellungen"
-#define D_CONFIGURE_LOGGING "Logging-Einstellungen"
-#define D_CONFIGURE_OTHER "Weitere Einstellungen"
-#define D_CONFIRM_RESET_CONFIGURATION "Zurücksetzen der Konfiguration bestätigen"
-#define D_RESET_CONFIGURATION "Konfiguration zurücksetzen"
-#define D_BACKUP_CONFIGURATION "Konfiguration sichern"
-#define D_RESTORE_CONFIGURATION "Konfiguration wiederherstellen"
+#define D_CONFIGURE_MODULE "Gerät"
+#define D_CONFIGURE_WIFI "WLAN"
+#define D_CONFIGURE_MQTT "MQTT"
+#define D_CONFIGURE_DOMOTICZ "Domoticz"
+#define D_CONFIGURE_LOGGING "Logging"
+#define D_CONFIGURE_OTHER "Erweitert"
+#define D_CONFIRM_RESET_CONFIGURATION "Zurücksetzen bestätigen"
+#define D_RESET_CONFIGURATION "Zurücksetzen"
+#define D_BACKUP_CONFIGURATION "Sichern"
+#define D_RESTORE_CONFIGURATION "Wiederherstellen"
#define D_START_RESTORE "Wiederherstellung starten"
#define D_MAIN_MENU "Hauptmenü"
-#define D_MODULE_PARAMETERS "Geräteeinstellungen"
-#define D_MODULE_TYPE "Gerätetyp"
+#define D_MODULE_PARAMETERS "Parameter"
+#define D_MODULE_TYPE "Typ"
#define D_PULLUP_ENABLE "Pull-up aktiv"
#define D_ADC "ADC"
#define D_GPIO "GPIO"
#define D_SERIAL_IN "serieller Eingang [serial in]"
#define D_SERIAL_OUT "serieller Ausgang [serial out]"
-#define D_WIFI_PARAMETERS "WLAN-Einstellungen"
-#define D_SCAN_FOR_WIFI_NETWORKS "WLAN-Netzwerk suchen und auswählen"
+#define D_WIFI_PARAMETERS "WLAN"
+#define D_SCAN_FOR_WIFI_NETWORKS "WLAN suchen"
#define D_SCAN_DONE "Suche abgeschlossen"
#define D_NO_NETWORKS_FOUND "Kein Netzwerk gefunden"
#define D_REFRESH_TO_SCAN_AGAIN "Aktualisieren, um erneut zu suchen"
#define D_DUPLICATE_ACCESSPOINT "AccessPoint duplizieren"
-#define D_SKIPPING_LOW_QUALITY "überspringe wegen niedriger Qualität"
+#define D_SKIPPING_LOW_QUALITY "WLAN Signal zu schwach"
#define D_MODE "Mode"
#define D_RSSI "RSSI"
#define D_WEP "WEP"
#define D_WPA_PSK "WPA-PSK"
#define D_WPA2_PSK "WPA2-PSK"
#define D_AP1_SSID "WLAN 1 - SSID"
-#define D_AP1_SSID_HELP "WiFi Netzwerk auswählen oder eingeben"
+#define D_AP1_SSID_HELP "WLAN auswählen oder eingeben"
#define D_AP2_SSID "WLAN 2 - SSID"
-#define D_AP2_SSID_HELP "alternatives WiFi Netzwerk eingeben"
-#define D_AP_PASSWORD "WLAN - Passwort"
-#define D_AP_PASSWORD_HELP "WiFi Passwort eingeben"
-#define D_SELECT_YOUR_WIFI_NETWORK "WiFi Netzwerk auswählen"
-#define D_SHOW_MORE_WIFI_NETWORKS "Suche nach WiFi Netzwerken"
+#define D_AP2_SSID_HELP "alternatives WLAN"
+#define D_AP_PASSWORD "Passwort"
+#define D_AP_PASSWORD_HELP "Passwort eingeben"
+#define D_SELECT_YOUR_WIFI_NETWORK "WLAN auswählen"
+#define D_SHOW_MORE_WIFI_NETWORKS "Suche nach WLAN"
#define D_SHOW_MORE_OPTIONS "Mehr Optionen"
-#define D_CHECK_CREDENTIALS "Bitte SSID/Passwort überprüfen"
-#define D_SUCCESSFUL_WIFI_CONNECTION "mit Wifi verbunden"
-#define D_NOW_YOU_CAN_CLOSE_THIS_WINDOW "Das Fenster kann geschlossen werden"
-#define D_REDIRECTING_TO_NEW_IP "Umleitung zur neuen Geräte IP-Adresse"
+#define D_CHECK_CREDENTIALS "Bitte SSID/Passwort prüfen"
+#define D_SUCCESSFUL_WIFI_CONNECTION "mit WLAN verbunden"
+#define D_NOW_YOU_CAN_CLOSE_THIS_WINDOW "Bitte Fenster schließen"
+#define D_REDIRECTING_TO_NEW_IP "Umleitung zur IP-Adresse"
-#define D_MQTT_PARAMETERS "MQTT-Einstellungen"
+#define D_MQTT_PARAMETERS "MQTT"
#define D_CLIENT "Client"
#define D_FULL_TOPIC "Full Topic"
-#define D_LOGGING_PARAMETERS "Logging-Einstellungen"
-#define D_SERIAL_LOG_LEVEL "Seriell-Log Level"
-#define D_MQTT_LOG_LEVEL "MQTT-Log Level"
-#define D_WEB_LOG_LEVEL "Web-Log Level"
-#define D_SYS_LOG_LEVEL "Syslog Level"
+#define D_LOGGING_PARAMETERS "Logging"
+#define D_SERIAL_LOG_LEVEL "Seriell"
+#define D_MQTT_LOG_LEVEL "MQTT"
+#define D_WEB_LOG_LEVEL "Web"
+#define D_SYS_LOG_LEVEL "Syslog"
#define D_MORE_DEBUG "Mehr Details"
#define D_SYSLOG_HOST "Syslog Host"
#define D_SYSLOG_PORT "Syslog Port"
#define D_TELEMETRY_PERIOD "Telemetrieperiode"
-#define D_OTHER_PARAMETERS "Weitere Einstellungen"
+#define D_OTHER_PARAMETERS "Einstellungen"
#define D_TEMPLATE "Vorlage"
#define D_ACTIVATE "Aktivieren"
#define D_DEVICE_NAME "Gerätename"
@@ -358,29 +356,29 @@
#define D_SINGLE_DEVICE "Einzelnes Gerät"
#define D_MULTI_DEVICE "Mehrfachgerät"
-#define D_CONFIGURE_TEMPLATE "Vorlage konfigurieren"
-#define D_TEMPLATE_PARAMETERS "Vorlage Parameter"
+#define D_CONFIGURE_TEMPLATE "Vorlage"
+#define D_TEMPLATE_PARAMETERS "Parameter"
#define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "basiert auf"
#define D_TEMPLATE_FLAGS "Optionen"
-#define D_SAVE_CONFIGURATION "Konfiguration speichern"
-#define D_CONFIGURATION_SAVED "Konfiguration gespeichert"
-#define D_CONFIGURATION_RESET "Konfiguration zurücksetzen"
+#define D_SAVE_CONFIGURATION "speichern"
+#define D_CONFIGURATION_SAVED "gespeichert"
+#define D_CONFIGURATION_RESET "zurücksetzen"
#define D_PROGRAM_VERSION "Tasmota Version"
-#define D_BUILD_DATE_AND_TIME "Erstellungszeitpunkt"
+#define D_BUILD_DATE_AND_TIME "Erstellt"
#define D_CORE_AND_SDK_VERSION "Core-/SDK-Version"
-#define D_FLASH_WRITE_COUNT "Flash-Schreibzyklen"
+#define D_FLASH_WRITE_COUNT "Schreibzyklen"
#define D_MAC_ADDRESS "MAC-Adresse"
-#define D_MQTT_HOST "MQTT Host"
-#define D_MQTT_PORT "MQTT Port"
-#define D_MQTT_CLIENT "MQTT Client"
-#define D_MQTT_USER "MQTT Benutzer"
-#define D_MQTT_TOPIC "MQTT Topic"
-#define D_MQTT_GROUP_TOPIC "MQTT Group Topic"
-#define D_MQTT_FULL_TOPIC "MQTT Full Topic"
-#define D_MQTT_NO_RETAIN "MQTT No Retain"
+#define D_MQTT_HOST "Host"
+#define D_MQTT_PORT "Port"
+#define D_MQTT_CLIENT "Client"
+#define D_MQTT_USER "Benutzer"
+#define D_MQTT_TOPIC "Topic"
+#define D_MQTT_GROUP_TOPIC "Group Topic"
+#define D_MQTT_FULL_TOPIC "Full Topic"
+#define D_MQTT_NO_RETAIN "No Retain"
#define D_MDNS_DISCOVERY "mDNS-Erkennung"
#define D_MDNS_ADVERTISE "mDNS-Freigaben"
#define D_ESP_CHIP_ID "ESP Chip ID"
@@ -390,7 +388,7 @@
#define D_UPGRADE_BY_WEBSERVER "Update über Webserver"
#define D_OTA_URL "OTA-URL"
-#define D_START_UPGRADE "Update starten"
+#define D_START_UPGRADE "Starten"
#define D_UPGRADE_BY_FILE_UPLOAD "Update Datei hochladen"
#define D_UPLOAD_FACTORY "Wechsle zur Safeboot Partition"
#define D_UPLOAD_STARTED "Upload gestartet"
@@ -403,7 +401,7 @@
#define D_UPLOAD_ERR_3 "Falsche Dateisignatur"
#define D_UPLOAD_ERR_4 "Datei überschreitet vorhdn․ Flashspeicher"
#define D_UPLOAD_ERR_5 "Upload Buffer Vergleich weicht ab"
-#define D_UPLOAD_ERR_6 "Upload fehlgeschlagen․ Aktiviere Logging 3"
+#define D_UPLOAD_ERR_6 "Upload fehlgeschlagen․ Details mit Logging 3"
#define D_UPLOAD_ERR_7 "Upload abgebrochen"
#define D_UPLOAD_ERR_8 "Datei ungültig"
#define D_UPLOAD_ERR_9 "Datei zu groß"
@@ -419,8 +417,8 @@
#define D_NEED_USER_AND_PASSWORD "Benötige user=&password="
// xdrv_01_mqtt.ino
-#define D_FINGERPRINT "TLS-Fingerabdruck wird verifiziert…"
-#define D_TLS_CONNECT_FAILED_TO "TLS-Verbindung fehlgeschlagen an"
+#define D_FINGERPRINT "TLS-Fingerabdruck wird verifiziert"
+#define D_TLS_CONNECT_FAILED_TO "TLS-Verbindung fehlgeschlagen"
#define D_RETRY_IN "Erneuter Versuch in"
#define D_VERIFIED "verifiziert mit Fingerabdruck"
#define D_INSECURE "unsichere Verbindung aufgrund ungültigen Fingerabdrucks"
@@ -447,7 +445,7 @@
#define D_3_RESPONSE_PACKETS_SENT "3 Antwortpakete gesendet"
// xdrv_07_domoticz.ino
-#define D_DOMOTICZ_PARAMETERS "Domoticz-Einstellungen"
+#define D_DOMOTICZ_PARAMETERS "Domoticz"
#define D_DOMOTICZ_IDX "Idx"
#define D_DOMOTICZ_KEY_IDX "Key Idx"
#define D_DOMOTICZ_SWITCH_IDX "Switch Idx"
@@ -465,8 +463,8 @@
#define D_DOMOTICZ_UPDATE_TIMER "Zeitplan-Update"
// xdrv_09_timers.ino
-#define D_CONFIGURE_TIMER "Zeitplaneinstellungen"
-#define D_TIMER_PARAMETERS "Zeitplaneinstellungen"
+#define D_CONFIGURE_TIMER "Zeitplan"
+#define D_TIMER_PARAMETERS "Zeitplan"
#define D_TIMER_ENABLE "Zeitpläne aktivieren"
#define D_TIMER_ARM "Aktiv"
#define D_TIMER_TIME "Uhrzeit"
@@ -476,12 +474,12 @@
#define D_TIMER_ACTION "Aktion"
// xdrv_10_knx.ino
-#define D_CONFIGURE_KNX "KNX-Einstellungen"
-#define D_KNX_PARAMETERS "KNX-Parameter"
+#define D_CONFIGURE_KNX "KNX"
+#define D_KNX_PARAMETERS "Parameter"
#define D_KNX_GENERAL_CONFIG "Allgemein"
#define D_KNX_PHYSICAL_ADDRESS "Physikalische Adresse"
-#define D_KNX_PHYSICAL_ADDRESS_NOTE "(Muss einmalig im KNX-Netzwerk sein)"
-#define D_KNX_ENABLE "KNX aktivieren"
+#define D_KNX_PHYSICAL_ADDRESS_NOTE "Muss eindeutig im KNX-Netzwerk sein"
+#define D_KNX_ENABLE "aktivieren"
#define D_KNX_GROUP_ADDRESS_TO_WRITE "Daten zum Senden an Gruppenadresse"
#define D_ADD "Hinzufügen"
#define D_DELETE "Löschen"
@@ -492,7 +490,7 @@
#define D_KNX_COMMAND_READ "Lesen"
#define D_KNX_COMMAND_OTHER "Andere"
#define D_SENT_TO "gesendet an"
-#define D_KNX_WARNING "Die Gruppenadresse (0/0/0) ist reserviert und kann nicht verwendet werden"
+#define D_KNX_WARNING "Die Gruppenadresse (0/0/0) ist reserviert"
#define D_KNX_ENHANCEMENT "Erweiterte Kommunikation"
#define D_KNX_TX_SLOT "KNX TX"
#define D_KNX_RX_SLOT "KNX RX"
@@ -500,15 +498,15 @@
#define D_KNX_RX_SCENE "KNX SCENE RX"
// xdrv_23_zigbee
-#define D_ZIGBEE_PERMITJOIN_ACTIVE "Gerätekopplung erlaubt"
-#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Karte"
+#define D_ZIGBEE_PERMITJOIN_ACTIVE "Kopplung erlaubt"
+#define D_ZIGBEE_MAPPING_TITLE "Zigbee Karte"
#define D_ZIGBEE_NOT_STARTED "Zigbee nicht gestartet"
#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Karte in Erstellung (%d s․ verbleibend)"
#define D_ZIGBEE_MAPPING_NOT_PRESENT "Keine Karte"
-#define D_ZIGBEE_MAP_REFRESH "Zigbee Karte erneuern"
-#define D_ZIGBEE_MAP "Zigbee Karte"
-#define D_ZIGBEE_PERMITJOIN "Zigbee Kopplung ein"
-#define D_ZIGBEE_GENERATE_KEY "Erzeuge zufälligen Zigbee Netzwerkschlüssel"
+#define D_ZIGBEE_MAP_REFRESH "Karte erneuern"
+#define D_ZIGBEE_MAP "Karte"
+#define D_ZIGBEE_PERMITJOIN "Kopplung ein"
+#define D_ZIGBEE_GENERATE_KEY "Erzeuge zufälligen Netzwerkschlüssel"
#define D_ZIGBEE_UNKNOWN_DEVICE "Unbekanntes Gerät"
#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unbekanntes Attribut"
#define D_ZIGBEE_UNKNOWN_ENDPOINT "Unkbekannter Endpunkt"
@@ -518,19 +516,19 @@
#define D_ZIGBEE_TOO_MANY_CLUSTERS "Nur eine Cluster-ID pro Kommando"
#define D_ZIGBEE_CONFLICTING_ENDPOINTS "Kollidierende Endpunkte"
#define D_ZIGBEE_WRONG_DELIMITER "Falscher Delimeter für Payload"
-#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unerkanntes Zigbee Kommando: %s"
+#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unerkanntes Kommando: %s"
#define D_ZIGBEE_TOO_MANY_COMMANDS "Nur 1 Kommando zulässig (%d)"
#define D_ZIGBEE_NO_ATTRIBUTE "Kein Attribut in der Liste"
#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Nicht unterstützter Attributtyp"
#define D_ZIGBEE_JSON_REQUIRED "Konfiguration muss JSON-basiert sein"
#define D_ZIGBEE_RESET_1_OR_2 "1 oder 2 für Reset"
-#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM gefunden an Adresse"
-#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Zufällige Zigbee Parameter erstellt, Überprüfung mit 'ZbConfig'"
+#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "EEPROM gefunden an Adresse"
+#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Zufällige Parameter erstellt, Überprüfung mit 'ZbConfig'"
// xdrv_89_dali.ino
#define D_SENSOR_DALI_RX "Dali RX"
#define D_SENSOR_DALI_TX "Dali TX"
-#define D_CONFIGURE_DALI "DALI-Einstellungen"
+#define D_CONFIGURE_DALI "Dali Einstellungen"
// xdrv_03_energy.ino
#define D_ENERGY_TODAY "Energie heute"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "BLE Einstellungen"
+#define D_BLE_PARAMETERS "BLE Parameter"
+#define D_MQTT_BLE_ENABLE "BLE aktivieren"
+#define D_MQTT_BLE_ACTIVESCAN "Aktiv scannen (*)"
+#define D_BLE_DEVICES "Erkannte Geräte"
+#define D_BLE_REMARK "Mit (*) markierte Geräte werden nicht gespeichert."
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Sensor beschäftigt"
#define D_SENSOR_CRC_ERROR "Sensor CRC-Fehler"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "s"
#define D_UNIT_SECTORS "Sektoren"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Importiere Blind"
#define D_EXPORT_REACTIVE "Exportiere Blind"
#define D_TOTAL_REACTIVE "Total Blind"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Grad"
#define D_TOTAL_ACTIVE "Total Wirk"
#define D_RESETTABLE_TOTAL_ACTIVE "Total Wirk (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Abstand bewegt"
+#define D_STATIC_DISTANCE "Abstand fix"
+#define D_DETECT_DISTANCE "Abstandsfeststellung"
+#define D_MOVING_ENERGY_T "Bewegliches Ziel"
+#define D_STATIC_ENERGY_T "Statisches Ziel"
+#define D_LD2410_PIN_STATE "Zustand des Ausgangspins"
+#define D_LD2410_LIGHT "Lichtsensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/el_GR.h b/tasmota/language/el_GR.h
index 62fd01a65..cfe3e1a39 100644
--- a/tasmota/language/el_GR.h
+++ b/tasmota/language/el_GR.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Debug"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Ανενεργό"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Απόσταση"
#define D_DNS_SERVER "Διακομιστής DNS"
#define D_DO "Disolved Oxygen"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Διακομιστής Web"
#define D_SOC "State of Charge"
#define D_SOH "State of Health"
+#define D_WATER_DEPTH "Βάθος νερού"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "ΠΡΟΕΙΔΟΠΟΙΗΣΗ Αυτή η έκδοση δεν αποθηκεύει τις ρυθμίσεις"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Ο αισθητήρας είναι απασχολημένος"
#define D_SENSOR_CRC_ERROR "Σφάλμα CRC αισθητήρα"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "sec"
#define D_UNIT_SECTORS "sectors"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Import Reactive"
#define D_EXPORT_REACTIVE "Export Reactive"
#define D_TOTAL_REACTIVE "Total Reactive"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Deg"
#define D_TOTAL_ACTIVE "Total Active"
#define D_RESETTABLE_TOTAL_ACTIVE "Total Active (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/en_GB.h b/tasmota/language/en_GB.h
index 05700a230..ccf249610 100644
--- a/tasmota/language/en_GB.h
+++ b/tasmota/language/en_GB.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Debug"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Disabled"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Distance"
#define D_DNS_SERVER "DNS Server"
#define D_DO "Disolved Oxygen"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Web Server"
#define D_SOC "State of Charge"
#define D_SOH "State of Health"
+#define D_WATER_DEPTH "Water Depth"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "WARNING This version does not support persistent settings"
@@ -282,16 +280,16 @@
#define D_CONSOLE "Console"
#define D_CONFIRM_RESTART "Confirm Restart"
-#define D_CONFIGURE_MODULE "Configure Module"
-#define D_CONFIGURE_WIFI "Configure WiFi"
-#define D_CONFIGURE_MQTT "Configure MQTT"
-#define D_CONFIGURE_DOMOTICZ "Configure Domoticz"
-#define D_CONFIGURE_LOGGING "Configure Logging"
-#define D_CONFIGURE_OTHER "Configure Other"
+#define D_CONFIGURE_MODULE "Module"
+#define D_CONFIGURE_WIFI "WiFi"
+#define D_CONFIGURE_MQTT "MQTT"
+#define D_CONFIGURE_DOMOTICZ "Domoticz"
+#define D_CONFIGURE_LOGGING "Logging"
+#define D_CONFIGURE_OTHER "Other"
#define D_CONFIRM_RESET_CONFIGURATION "Confirm Reset Configuration"
-#define D_RESET_CONFIGURATION "Reset Configuration"
-#define D_BACKUP_CONFIGURATION "Backup Configuration"
-#define D_RESTORE_CONFIGURATION "Restore Configuration"
+#define D_RESET_CONFIGURATION "Reset"
+#define D_BACKUP_CONFIGURATION "Backup"
+#define D_RESTORE_CONFIGURATION "Restore"
#define D_START_RESTORE "Start restore"
#define D_MAIN_MENU "Main Menu"
@@ -358,7 +356,7 @@
#define D_SINGLE_DEVICE "single device"
#define D_MULTI_DEVICE "multi device"
-#define D_CONFIGURE_TEMPLATE "Configure Template"
+#define D_CONFIGURE_TEMPLATE "Template"
#define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on"
@@ -388,10 +386,10 @@
#define D_FLASH_CHIP_SIZE "Flash Size"
#define D_FREE_PROGRAM_SPACE "Free Program Space"
-#define D_UPGRADE_BY_WEBSERVER "Upgrade by web server"
+#define D_UPGRADE_BY_WEBSERVER "Use web server"
#define D_OTA_URL "OTA Url"
#define D_START_UPGRADE "Start upgrade"
-#define D_UPGRADE_BY_FILE_UPLOAD "Upgrade by file upload"
+#define D_UPGRADE_BY_FILE_UPLOAD "Use file upload"
#define D_UPLOAD_FACTORY "Switching to safeboot partition"
#define D_UPLOAD_STARTED "Upload started"
#define D_UPGRADE_STARTED "Upgrade started"
@@ -465,7 +463,7 @@
#define D_DOMOTICZ_UPDATE_TIMER "Update timer"
// xdrv_09_timers.ino
-#define D_CONFIGURE_TIMER "Configure Timer"
+#define D_CONFIGURE_TIMER "Timer"
#define D_TIMER_PARAMETERS "Timer parameters"
#define D_TIMER_ENABLE "Enable Timers"
#define D_TIMER_ARM "Enable"
@@ -476,7 +474,7 @@
#define D_TIMER_ACTION "Action"
// xdrv_10_knx.ino
-#define D_CONFIGURE_KNX "Configure KNX"
+#define D_CONFIGURE_KNX "KNX"
#define D_KNX_PARAMETERS "KNX Parameters"
#define D_KNX_GENERAL_CONFIG "General"
#define D_KNX_PHYSICAL_ADDRESS "Physical Address"
@@ -530,7 +528,7 @@
// xdrv_89_dali.ino
#define D_SENSOR_DALI_RX "Dali RX"
#define D_SENSOR_DALI_TX "Dali TX"
-#define D_CONFIGURE_DALI "Config DALI"
+#define D_CONFIGURE_DALI "DALI"
// xdrv_03_energy.ino
#define D_ENERGY_TODAY "Energy Today"
@@ -548,7 +546,7 @@
#define D_DOMOTICZ_SHUTTER "Shutter"
// xdrv_28_pcf8574.ino
-#define D_CONFIGURE_PCF8574 "Configure PCF8574"
+#define D_CONFIGURE_PCF8574 "PCF8574"
#define D_PCF8574_PARAMETERS "PCF8574 parameters"
#define D_INVERT_PORTS "Invert Ports"
#define D_DEVICE "Device"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Sensor busy"
#define D_SENSOR_CRC_ERROR "Sensor CRC error"
@@ -621,7 +627,7 @@
#define D_HX_CAL_DONE "Calibrated"
#define D_HX_CAL_FAIL "Calibration failed"
#define D_RESET_HX711 "Reset Scale"
-#define D_CONFIGURE_HX711 "Configure Scale"
+#define D_CONFIGURE_HX711 "Scale"
#define D_HX711_PARAMETERS "Scale parameters"
#define D_ITEM_WEIGHT "Item weight"
#define D_REFERENCE_WEIGHT "Reference weight"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "sec"
#define D_UNIT_SECTORS "sectors"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Import Reactive"
#define D_EXPORT_REACTIVE "Export Reactive"
#define D_TOTAL_REACTIVE "Total Reactive"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Deg"
#define D_TOTAL_ACTIVE "Total Active"
#define D_RESETTABLE_TOTAL_ACTIVE "Total Active (RST)"
@@ -1274,6 +1286,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/es_ES.h b/tasmota/language/es_ES.h
index d0a4cc72c..ff49b3058 100644
--- a/tasmota/language/es_ES.h
+++ b/tasmota/language/es_ES.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Debug"
#define D_DEWPOINT "Punto de Rocío"
#define D_DISABLED "Deshabilitado"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Distancia"
#define D_DNS_SERVER "Servidor DNS"
#define D_DO "Oxígeno Disuelto"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Servidor Web"
#define D_SOC "Estado de Carga"
#define D_SOH "Estado de Salud"
+#define D_WATER_DEPTH "Profundidad del agua"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "Cuidado, esta versión no guarda los cambios"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Sensor ocupado"
#define D_SENSOR_CRC_ERROR "Error CRC del Sensor"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "seg"
#define D_UNIT_SECTORS "sectores"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "P. Reactiva Entrante"
#define D_EXPORT_REACTIVE "P. Reactiva Saliente"
#define D_TOTAL_REACTIVE "P. Reactiva Total"
-#define D_UNIT_KWARH "kVArH"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Grados"
#define D_TOTAL_ACTIVE "P. Total Activa"
#define D_RESETTABLE_TOTAL_ACTIVE "P. Total Activa (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/fr_FR.h b/tasmota/language/fr_FR.h
index 9b363c57c..1b07f5e8b 100644
--- a/tasmota/language/fr_FR.h
+++ b/tasmota/language/fr_FR.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Debug"
#define D_DEWPOINT "Point de rosée"
#define D_DISABLED "Désactivé"
-#define D_MOVING_DISTANCE "Distance mobile"
-#define D_STATIC_DISTANCE "Distance fixe"
-#define D_DETECT_DISTANCE "Distance détectée"
#define D_DISTANCE "Distance"
#define D_DNS_SERVER "Serveur DNS"
#define D_DO "Oxygène dissout"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Serveur web"
#define D_SOC "État de la Charge"
#define D_SOH "État de Santé"
+#define D_WATER_DEPTH "Profondeur de l’eau"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "ATTENTION Cette version ne gère pas les réglages persistants"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Capteur occupé"
#define D_SENSOR_CRC_ERROR "Erreur CRC capteur"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCl"
#define D_SENSOR_I2C_SDA "I2C SDa"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MClk"
#define D_SENSOR_I2S_BCLK "I2S BClk"
#define D_SENSOR_I2S_WS_IN "I2S BClk In"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 Wr"
#define D_GPIO_TM1621_RD "TM1621 Rd"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 Clk"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 Stb"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 Din"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 Clk"
@@ -1051,7 +1063,7 @@
#define D_UNIT_SECOND "s"
#define D_UNIT_SECTORS "secteurs"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1073,7 +1085,7 @@
#define D_IMPORT_REACTIVE "Énergie réa conso"
#define D_EXPORT_REACTIVE "Énergie réa fournie"
#define D_TOTAL_REACTIVE "Énergie réa totale"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "°"
#define D_TOTAL_ACTIVE "Total Active"
#define D_RESETTABLE_TOTAL_ACTIVE "Total Active (RST)"
@@ -1274,6 +1286,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Distance mobile"
+#define D_STATIC_DISTANCE "Distance fixe"
+#define D_DETECT_DISTANCE "Distance détectée"
+#define D_MOVING_ENERGY_T "Cible mouvante"
+#define D_STATIC_ENERGY_T "Cible statique"
+#define D_LD2410_PIN_STATE "État de la broche de sortie"
+#define D_LD2410_LIGHT "Capteur de lumière"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/fy_NL.h b/tasmota/language/fy_NL.h
index 7991bac52..189e2297a 100644
--- a/tasmota/language/fy_NL.h
+++ b/tasmota/language/fy_NL.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Debugearje"
#define D_DEWPOINT "Dauwpunt"
#define D_DISABLED "Útsetten"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Ôfstân"
#define D_DNS_SERVER "DNS Server"
#define D_DO "Oploste soerstof"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Webserver"
#define D_SOC "State of Charge"
#define D_SOH "State of Charge"
+#define D_WATER_DEPTH "Vattendjup"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "WARSKOGING Dizze ferzje bewarret gjin ynstellings"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Sensor drok"
#define D_SENSOR_CRC_ERROR "Sensor CRC flater"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "sec"
#define D_UNIT_SECTORS "sectoren"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Blind ymportearje"
#define D_EXPORT_REACTIVE "Blind eksportearje"
#define D_TOTAL_REACTIVE "Hielendal blyn"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Deg"
#define D_TOTAL_ACTIVE "Hielendal wier"
#define D_RESETTABLE_TOTAL_ACTIVE "Hielendal wier (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/he_HE.h b/tasmota/language/he_HE.h
index 48a7ef17d..6a04467ac 100644
--- a/tasmota/language/he_HE.h
+++ b/tasmota/language/he_HE.h
@@ -87,9 +87,6 @@
#define D_DEBUG "באגים"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "מבוטל"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "מרחק"
#define D_DNS_SERVER "DNS שרת"
#define D_DO "Disolved Oxygen"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Web שרת"
#define D_SOC "State of Charge"
#define D_SOH "State of Health"
+#define D_WATER_DEPTH "עומק המים"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "אזהרה גרסה זו אינה תומכת בהגדרות קבועות"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "שרת עסוק"
#define D_SENSOR_CRC_ERROR "בחיישן CRC שגיאת"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "sec"
#define D_UNIT_SECTORS "sectors"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Import Reactive"
#define D_EXPORT_REACTIVE "Export Reactive"
#define D_TOTAL_REACTIVE "Total Reactive"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Deg"
#define D_TOTAL_ACTIVE "Total Active"
#define D_RESETTABLE_TOTAL_ACTIVE "Total Active (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/hu_HU.h b/tasmota/language/hu_HU.h
index 89d96304d..9f07ff5cc 100644
--- a/tasmota/language/hu_HU.h
+++ b/tasmota/language/hu_HU.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Debug"
#define D_DEWPOINT "Harmatpont"
#define D_DISABLED "Letiltva"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Távolság"
#define D_DNS_SERVER "DNS szerver"
#define D_DO "Oldott oxygén"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Webszerver"
#define D_SOC "State of Charge"
#define D_SOH "State of Health"
+#define D_WATER_DEPTH "Vízmélység"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "VIGYÁZZ! Ez a verzió nem támogat tartós beállításokat"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Szenzor foglalt"
#define D_SENSOR_CRC_ERROR "Szenzor CRC hiba"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1053,7 +1065,7 @@
#define D_UNIT_SECOND "s"
#define D_UNIT_SECTORS "szektorok"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1075,7 +1087,7 @@
#define D_IMPORT_REACTIVE "Bejövő reaktív"
#define D_EXPORT_REACTIVE "Kimenő reaktív"
#define D_TOTAL_REACTIVE "Összes reaktív"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "fok"
#define D_TOTAL_ACTIVE "Összes aktív"
#define D_RESETTABLE_TOTAL_ACTIVE "Összes aktív (RST)"
@@ -1276,6 +1288,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/it_IT.h b/tasmota/language/it_IT.h
index 3364dc3f4..c18525eed 100644
--- a/tasmota/language/it_IT.h
+++ b/tasmota/language/it_IT.h
@@ -28,7 +28,7 @@
* Use online command StateText to translate ON, OFF, HOLD and TOGGLE.
* Use online command Prefix to translate cmnd, stat and tele.
*
- * Updated until v9.4.0.1 - Last update 27.07.2024
+ * Updated until v9.4.0.1 - Last update 07.12.2024
\*********************************************************************/
#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)
@@ -87,9 +87,6 @@
#define D_DEBUG "Debug"
#define D_DEWPOINT "Punto rugiada" //
#define D_DISABLED "Disabilitato/a"
-#define D_MOVING_DISTANCE "Distanza in movimento"
-#define D_STATIC_DISTANCE "Distanza statica"
-#define D_DETECT_DISTANCE "Rileva distanza"
#define D_DISTANCE "Distanza"
#define D_DNS_SERVER "Server DNS"
#define D_DO "Ossigeno dissolto"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Server web"
#define D_SOC "Stato di carica"
#define D_SOH "State di salute"
+#define D_WATER_DEPTH "Profondità dell'acqua"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "ATTENZIONE Questa versione non supporta il salvataggio delle impostazioni"
@@ -380,7 +378,7 @@
#define D_MQTT_TOPIC "Topic MQTT"
#define D_MQTT_GROUP_TOPIC "Gruppo topic MQTT"
#define D_MQTT_FULL_TOPIC "Full topic MQTT"
-#define D_MQTT_NO_RETAIN "MQTT No Retain"
+#define D_MQTT_NO_RETAIN "MQTT Nessuna conservazione"
#define D_MDNS_DISCOVERY "Ricerca mDNS"
#define D_MDNS_ADVERTISE "Notifica mDNS"
#define D_ESP_CHIP_ID "ID chip ESP"
@@ -388,10 +386,10 @@
#define D_FLASH_CHIP_SIZE "Dimensione flash"
#define D_FREE_PROGRAM_SPACE "Memoria libera programma"
-#define D_UPGRADE_BY_WEBSERVER "Aggiornamento via server web"
+#define D_UPGRADE_BY_WEBSERVER "Aggiorna via server web"
#define D_OTA_URL "URL OTA"
#define D_START_UPGRADE "Esegui aggiornamento"
-#define D_UPGRADE_BY_FILE_UPLOAD "Aggiornamento tramite file locale"
+#define D_UPGRADE_BY_FILE_UPLOAD "Aggiorna tramite file locale"
#define D_UPLOAD_FACTORY "Passaggio a partizione avvio sicuro"
#define D_UPLOAD_STARTED "Caricamento..."
#define D_UPGRADE_STARTED "Aggiornamento..."
@@ -572,17 +570,25 @@
#define D_THERMOSTAT_PI_HYBRID "PI (ibdrida)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Regolazione automatica (ibrida)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "BLE"
+#define D_BLE_PARAMETERS "Impostazioni Bluetooth"
+#define D_MQTT_BLE_ENABLE "Abilita Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Abilita scansione attiva (*)"
+#define D_BLE_DEVICES "Scansione dispositivi"
+#define D_BLE_REMARK "gli elementi segnati con (*) non sono memorizzati in config"
+
// xsns_05_ds18b20.ino
-#define D_SENSOR_BUSY "Sensore occupato"
-#define D_SENSOR_CRC_ERROR "Errore CRC sensore"
-#define D_SENSORS_FOUND "Sensori trovati"
+#define D_SENSOR_BUSY "Sensore occupato"
+#define D_SENSOR_CRC_ERROR "Errore CRC sensore"
+#define D_SENSORS_FOUND "Sensori trovati"
// xsns_06_dht.ino
-#define D_TIMEOUT_WAITING_FOR "Timeout attesa per"
-#define D_START_SIGNAL_LOW "inizio segnale basso"
-#define D_START_SIGNAL_HIGH "inizio segnale alto"
-#define D_PULSE "impulso"
-#define D_CHECKSUM_FAILURE "Checksum fallito"
+#define D_TIMEOUT_WAITING_FOR "Timeout attesa per"
+#define D_START_SIGNAL_LOW "inizio segnale basso"
+#define D_START_SIGNAL_HIGH "inizio segnale alto"
+#define D_PULSE "impulso"
+#define D_CHECKSUM_FAILURE "Checksum fallito"
// xsns_07_sht1x.ino
#define D_SENSOR_DID_NOT_ACK_COMMAND "Il sensore non ha eseguito il comando ACK"
@@ -594,26 +600,26 @@
#define D_PARTICALS_BEYOND "Particelle"
// xsns_27_apds9960.ino
-#define D_GESTURE "Gesto"
-#define D_COLOR_RED "Rosso"
-#define D_COLOR_GREEN "Verde"
-#define D_COLOR_BLUE "Blu"
-#define D_CCT "CCT"
-#define D_PROXIMITY "Prossimità"
+#define D_GESTURE "Gesto"
+#define D_COLOR_RED "Rosso"
+#define D_COLOR_GREEN "Verde"
+#define D_COLOR_BLUE "Blu"
+#define D_CCT "CCT"
+#define D_PROXIMITY "Prossimità"
// xsns_32_mpu6050.ino
-#define D_AX_AXIS "Accelerazione asse X"
-#define D_AY_AXIS "Accelerazione asse Y"
-#define D_AZ_AXIS "Accelerazione asse Z"
-#define D_GX_AXIS "Giroscopio asse X"
-#define D_GY_AXIS "Giroscopio asse Y"
-#define D_GZ_AXIS "Giroscopio asse Z"
+#define D_AX_AXIS "Accelerazione asse X"
+#define D_AY_AXIS "Accelerazione asse Y"
+#define D_AZ_AXIS "Accelerazione asse Z"
+#define D_GX_AXIS "Giroscopio asse X"
+#define D_GY_AXIS "Giroscopio asse Y"
+#define D_GZ_AXIS "Giroscopio asse Z"
// xsns_33_QMC5883L.ino
-#define D_MX "Asse X induzione"
-#define D_MY "Asse Y induzione"
-#define D_MZ "Asse Z induzione"
-#define D_MAGNETICFLD "Induzione magnetica"
+#define D_MX "Asse X induzione"
+#define D_MY "Asse Y induzione"
+#define D_MZ "Asse Z induzione"
+#define D_MAGNETICFLD "Induzione magnetica"
// xsns_34_hx711.ino
#define D_HX_CAL_REMOVE "Rimuovi peso"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C - SCL"
#define D_SENSOR_I2C_SDA "I2C - SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser - TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser - RX"
#define D_SENSOR_I2S_MCLK "I2S - MCLK"
#define D_SENSOR_I2S_BCLK "I2S - BCLK"
#define D_SENSOR_I2S_WS_IN "I2S - BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 - RX"
#define D_SENSOR_LD2410_TX "LD2410 - TX"
#define D_SENSOR_LD2410_RX "LD2410 - RX"
+#define D_SENSOR_LD2410S_TX "LD2410S - TX"
+#define D_SENSOR_LD2410S_RX "LD2410S - RX"
#define D_GPIO_TM1621_CS "TM1621 - CS"
#define D_GPIO_TM1621_WR "TM1621 - WR"
#define D_GPIO_TM1621_RD "TM1621 - RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 - CLK"
#define D_SENSOR_TM1638_DIO "TM1638 - DIO"
#define D_SENSOR_TM1638_STB "TM1638 - STB"
+#define D_SENSOR_TM1640_CLK "TM1640 - CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 - DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 - DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 - CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 - CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "sec"
#define D_UNIT_SECTORS "settori"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Potenza reattiva importata"
#define D_EXPORT_REACTIVE "Potenza reattiva esportata"
#define D_TOTAL_REACTIVE "Potenza reattiva totale"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "°"
#define D_TOTAL_ACTIVE "Potenza attiva totale"
#define D_RESETTABLE_TOTAL_ACTIVE "Potenza attiva totale (RST)"
@@ -1274,6 +1286,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar - TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar - RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Distanza in movimento"
+#define D_STATIC_DISTANCE "Distanza statica"
+#define D_DETECT_DISTANCE "Rileva distanza"
+#define D_MOVING_ENERGY_T "Obiettivo in movimento"
+#define D_STATIC_ENERGY_T "Obiettivo statico"
+#define D_LD2410_PIN_STATE "Stato pin di uscita"
+#define D_LD2410_LIGHT "Sensore di luce"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Importa"
#define D_EXPORT "Esporta"
diff --git a/tasmota/language/ko_KO.h b/tasmota/language/ko_KO.h
index f545eb38f..d47bee947 100644
--- a/tasmota/language/ko_KO.h
+++ b/tasmota/language/ko_KO.h
@@ -87,9 +87,6 @@
#define D_DEBUG "디버그"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "사용안함"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "거리"
#define D_DNS_SERVER "DNS 서버"
#define D_DO "Disolved Oxygen"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "웹 서버"
#define D_SOC "State of Charge"
#define D_SOH "State of Health"
+#define D_WATER_DEPTH "수심"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "경고: 이 버전은 영구 설정을 지원하지 않습니다"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "센서가 사용 중"
#define D_SENSOR_CRC_ERROR "센서 CRC 에러"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "초"
#define D_UNIT_SECTORS "섹터"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Import Reactive"
#define D_EXPORT_REACTIVE "Export Reactive"
#define D_TOTAL_REACTIVE "Total Reactive"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Deg"
#define D_TOTAL_ACTIVE "Total Active"
#define D_RESETTABLE_TOTAL_ACTIVE "Total Active (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/nl_NL.h b/tasmota/language/nl_NL.h
index 7f5fecdb4..dac4c6eee 100644
--- a/tasmota/language/nl_NL.h
+++ b/tasmota/language/nl_NL.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Debug"
#define D_DEWPOINT "Dauwpunt"
#define D_DISABLED "Uitgeschakeld"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Afstand"
#define D_DNS_SERVER "DNS Server"
#define D_DO "Opgelost zuurstof"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Webserver"
#define D_SOC "Laadtoestand"
#define D_SOH "Gezondheid"
+#define D_WATER_DEPTH "Diepte van het water"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "WAARSCHUWING Deze versie bewaart geen instellingen"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Sensor bezet"
#define D_SENSOR_CRC_ERROR "Sensor CRC fout"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "sec"
#define D_UNIT_SECTORS "sectoren"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Import blind"
#define D_EXPORT_REACTIVE "Export blind"
#define D_TOTAL_REACTIVE "Totaal blind"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Deg"
#define D_TOTAL_ACTIVE "Totaal werkelijk"
#define D_RESETTABLE_TOTAL_ACTIVE "Totaal werkelijk (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/pl_PL.h b/tasmota/language/pl_PL.h
index ae79d7a4e..e48f1e00d 100644
--- a/tasmota/language/pl_PL.h
+++ b/tasmota/language/pl_PL.h
@@ -51,15 +51,15 @@
#define D_DECIMAL_SEPARATOR ","
// Common
-#define D_ABSOLUTE_HUMIDITY "Abs Humidity"
+#define D_ABSOLUTE_HUMIDITY "Wilgotność"
#define D_ADMIN "Admin"
#define D_AIR_QUALITY "Jakość powietrza"
#define D_AP "AP" // Access Point
#define D_AS "jak"
#define D_AUTO "AUTO"
-#define D_BATTERY "Battery"
-#define D_BATT "Batt" // Short for Battery
-#define D_BATTERY_CHARGE "Charge" // Battery charge in %
+#define D_BATTERY "Bateria"
+#define D_BATT "Bat" // Short for Battery
+#define D_BATTERY_CHARGE "Ładowanie" // Battery charge in %
#define D_BLINK "Miganie"
#define D_BLINKOFF "Miganie - Wył."
#define D_BOOT_COUNT "Licznik restartów"
@@ -76,20 +76,17 @@
#define D_COMMAND "Komenda"
#define D_CONNECTED "Połączony"
#define D_CORS_DOMAIN "Domena CORS"
-#define D_COLOR "Color"
+#define D_COLOR "Kolor"
#define D_COUNT "Licz"
#define D_COUNTER "Licznik"
#define D_CT_POWER "Moc CT"
#define D_CURRENT "Prąd" // As in Voltage and Current
-#define D_CURRENT_NEUTRAL "Current Neutral"
-#define D_DATA "Data"
+#define D_CURRENT_NEUTRAL "Prąd N"
+#define D_DATA "Dane"
#define D_DARKLIGHT "Ciemny"
#define D_DEBUG "Debug"
#define D_DEWPOINT "Punkt rosy"
#define D_DISABLED "Wyłączony"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Odległość"
#define D_DNS_SERVER "Serwer DNS"
#define D_DO "Rozpuszczalność tlenu"
@@ -110,7 +107,7 @@
#define D_FILE_SYSTEM_SIZE "Rozmiar systemu plików"
#define D_FLOW_RATE "Przepływ"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
-#define D_FRAME_RATE "Frame rate"
+#define D_FRAME_RATE "Liczba klatek"
#define D_FREE_MEMORY "Wolna pamięć"
#define D_PSR_MAX_MEMORY "Pamięć PS-RAM"
#define D_PSR_FREE_MEMORY "Wolna pamięć PS-RAM"
@@ -119,8 +116,8 @@
#define D_GATEWAY "Brama"
#define D_GROUP "Grupa"
#define D_HOST "Serwer"
-#define D_HALL_EFFECT "Hall Effect"
-#define D_HEATINDEX "Heat index"
+#define D_HALL_EFFECT "Efekt Hall'a"
+#define D_HEATINDEX "Indeks ciepła"
#define D_HOSTNAME "Nazwa serwera"
#define D_HUMIDITY "Wilgotność"
#define D_ILLUMINANCE "Podświetlanie"
@@ -155,7 +152,7 @@
#define D_POWER_FACTOR "Cosinus fi"
#define D_POWERUSAGE "Moc"
#define D_POWERUSAGE_ACTIVE "Moc czynna"
-#define D_POWERUSAGE_ACTIVE_TOTAL "Active Power Total"
+#define D_POWERUSAGE_ACTIVE_TOTAL "Moc czynna całkowita"
#define D_POWERUSAGE_APPARENT "Moc pozorna"
#define D_POWERUSAGE_REACTIVE "Moc bierna"
#define D_PRESSURE "Ciśnienie"
@@ -191,9 +188,9 @@
#define D_TRANSMIT "Wyślij"
#define D_TRUE "Prawda"
#define D_TVOC "TVOC"
-#define D_TWILIGHT_ASTRONOMICAL "Astronomical"
-#define D_TWILIGHT_CIVIL "Civil"
-#define D_TWILIGHT_NAUTICAL "Nautical"
+#define D_TWILIGHT_ASTRONOMICAL "Astronomiczny"
+#define D_TWILIGHT_CIVIL "Cywilny"
+#define D_TWILIGHT_NAUTICAL "Morski"
#define D_UPLOAD "Wgraj"
#define D_UPTIME "Czas pracy"
#define D_USED "użyte"
@@ -204,8 +201,8 @@
#define D_UV_INDEX_2 "Średni"
#define D_UV_INDEX_3 "Wysoki"
#define D_UV_INDEX_4 "Niebezpieczny"
-#define D_UV_INDEX_5 "Burn L1/2"
-#define D_UV_INDEX_6 "Burn L3"
+#define D_UV_INDEX_5 "Krytyczny L1/2"
+#define D_UV_INDEX_6 "Krytyczny L3"
#define D_UV_INDEX_7 "OoR"
#define D_UV_LEVEL "Poziom UV"
#define D_UV_POWER "Moc UV"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Serwer Web"
#define D_SOC "Stan naładowania"
#define D_SOH "Kondycja"
+#define D_WATER_DEPTH "Głębokość wody"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "UWAGA Ta wersja nie obsługuje zapisu ustawień"
@@ -259,7 +257,7 @@
// xdrv_02_webserver.ino
#define D_NOSCRIPT "Aby korzystać z Tasmota, włącz obsługę JavaScript"
-#define D_SAFEBOOT "SAFEBOOT"
+#define D_SAFEBOOT "Bezpieczny rozruch"
#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "Oprogramowanie MINIMAL proszę uaktualnić"
#define D_WEBSERVER_ACTIVE_ON "Aktywny serwer Web"
#define D_WITH_IP_ADDRESS "z adresem IP"
@@ -277,8 +275,8 @@
#define D_CONFIGURATION "Konfiguracja"
#define D_INFORMATION "Informacje"
#define D_FIRMWARE_UPGRADE "Aktualizacja oprogramowania"
-#define D_MANAGEMENT "Konsole"
-#define D_GPIO_VIEWER "GPIO Viewer"
+#define D_MANAGEMENT "Narzędzia"
+#define D_GPIO_VIEWER "Wizualizacja GPIO"
#define D_CONSOLE "Konsola"
#define D_CONFIRM_RESTART "Potwierdź restart"
@@ -419,11 +417,11 @@
#define D_NEED_USER_AND_PASSWORD "Wymagany użytkownik=&hasło="
// xdrv_01_mqtt.ino
-#define D_FINGERPRINT "Weryfikuj odcisk TLS..."
+#define D_FINGERPRINT "Weryfikacja klucza TLS..."
#define D_TLS_CONNECT_FAILED_TO "Nieudane połączenie TLS do"
#define D_RETRY_IN "Spróbuj ponownie"
-#define D_VERIFIED "Zweryfikowano odcisk"
-#define D_INSECURE "Nieprawidłowe połączenie z powodu błędnego odcisku TLS"
+#define D_VERIFIED "Zweryfikowano"
+#define D_INSECURE "Nieprawidłowe połączenie z powodu błędnego klucza TLS"
#define D_CONNECT_FAILED_TO "Nie udało się nawiązać połączenia"
// xplg_wemohue.ino
@@ -511,12 +509,12 @@
#define D_ZIGBEE_GENERATE_KEY "generuj losowo klucz sieci Zigbee"
#define D_ZIGBEE_UNKNOWN_DEVICE "Nieznane urządzenie"
#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Nieznany atrybut"
-#define D_ZIGBEE_UNKNOWN_ENDPOINT "Unknown endpoint"
+#define D_ZIGBEE_UNKNOWN_ENDPOINT "Nieznany punkt końcowy"
#define D_ZIGBEE_INVALID_PARAM "Zły parametr"
#define D_ZIGBEE_MISSING_PARAM "Brak parametrów"
#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Nieznana nazwa atrybutu (ignoruję): %s"
#define D_ZIGBEE_TOO_MANY_CLUSTERS "Nie więcej niż jeden cluster id na komendę"
-#define D_ZIGBEE_CONFLICTING_ENDPOINTS "Conflicting destination endpoints"
+#define D_ZIGBEE_CONFLICTING_ENDPOINTS "Konflikt doselowych punktów końcowych"
#define D_ZIGBEE_WRONG_DELIMITER "Błędny delimiter autoryzacji"
#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Nieznana komenda zigbee: %s"
#define D_ZIGBEE_TOO_MANY_COMMANDS "Tylko 1 komenda dozwolona (%d)"
@@ -530,7 +528,7 @@
// xdrv_89_dali.ino
#define D_SENSOR_DALI_RX "Dali RX"
#define D_SENSOR_DALI_TX "Dali TX"
-#define D_CONFIGURE_DALI "Config DALI"
+#define D_CONFIGURE_DALI "Konfiguracja DALI"
// xdrv_03_energy.ino
#define D_ENERGY_TODAY "Energia dzisiaj"
@@ -539,8 +537,8 @@
// xsns_100_ina3221.ino
#define D_UNIT_CHARGE "Ah"
-#define D_CHARGE "Charge"
-#define D_ENERGY "Energy"
+#define D_CHARGE "Ładowanie"
+#define D_ENERGY "Energia"
// xdrv_27_shutter.ino
#define D_OPEN "Otwórz"
@@ -556,21 +554,29 @@
#define D_DEVICE_OUTPUT "Wyjście"
// xdrv_39_thermostat.ino, xdrv_85_esp32_ble_eq3_trv.ino
-#define D_THERMOSTAT "Thermostat"
-#define D_THERMOSTAT_SET_POINT "Set Point Temperature"
-#define D_THERMOSTAT_SENSOR "Current Temperature"
-#define D_THERMOSTAT_GRADIENT "Gradient Temperature"
-#define D_THERMOSTAT_DUTY_CYCLE "Duty cycle"
-#define D_THERMOSTAT_VALVE_POSITION "Valve Position"
-#define D_THERMOSTAT_CYCLE_TIME "Cycle time"
-#define D_THERMOSTAT_PI_AUTOTUNE "PI Auto tuning"
-#define D_THERMOSTAT_CONTROL_METHOD "Control method"
-#define D_THERMOSTAT_RAMP_UP "Ramp up"
+#define D_THERMOSTAT "Termostat"
+#define D_THERMOSTAT_SET_POINT "Temperatura zadana"
+#define D_THERMOSTAT_SENSOR "Temperatura aktualna"
+#define D_THERMOSTAT_GRADIENT "Rozdzielczość temperatury"
+#define D_THERMOSTAT_DUTY_CYCLE "Cykl pracy"
+#define D_THERMOSTAT_VALVE_POSITION "Pozycja zaworu"
+#define D_THERMOSTAT_CYCLE_TIME "Czas cyklu"
+#define D_THERMOSTAT_PI_AUTOTUNE "PI Auto strojenie"
+#define D_THERMOSTAT_CONTROL_METHOD "Metoda kontroli"
+#define D_THERMOSTAT_RAMP_UP "Przyspieszanie"
#define D_THERMOSTAT_PI "PI"
-#define D_THERMOSTAT_AUTOTUNE "Autotune"
-#define D_THERMOSTAT_RAMP_UP_HYBRID "Ramp up (Hybrid)"
+#define D_THERMOSTAT_AUTOTUNE "Automatyczne strojenie"
+#define D_THERMOSTAT_RAMP_UP_HYBRID "Przyspieszanie (Hybrid)"
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
-#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+#define D_THERMOSTAT_AUTOTUNE_HYBRID "Automatyczne strojenie (Hybrid)"
+
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Konfiguracja BLE"
+#define D_BLE_PARAMETERS "Ustawienia Bluetooth"
+#define D_MQTT_BLE_ENABLE "Załącz Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Załącz Aktywne Skanowanie(*)"
+#define D_BLE_DEVICES "Znalezione Urządzenia"
+#define D_BLE_REMARK "rzeczy oznaczone (*) nie są zapisywane w konfiguracji"
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Czujnik zajęty"
@@ -610,10 +616,10 @@
#define D_GZ_AXIS "Odchylenie Oś-Z"
// xsns_33_QMC5883L.ino
-#define D_MX "Induction X-Axis"
-#define D_MY "Induction Y-Axis"
-#define D_MZ "Induction Z-Axis"
-#define D_MAGNETICFLD "Magnetic Induction"
+#define D_MX "Indukcja X-Axis"
+#define D_MY "Indukcja Y-Axis"
+#define D_MZ "Indukcja Z-Axis"
+#define D_MAGNETICFLD "Indukcja magnetyczna"
// xsns_34_hx711.ino
#define D_HX_CAL_REMOVE "Usuń wagę"
@@ -665,22 +671,22 @@
#define D_CHIPTEMPERATURE "Temperatura Chipa"
// xsns_60_GPS
-#define D_LATITUDE "Latitude"
-#define D_LONGITUDE "Longitude"
+#define D_LATITUDE "Szerokość"
+#define D_LONGITUDE "Długość"
#define D_HORIZONTAL_ACCURACY "Horizontal Accuracy"
-#define D_ALTITUDE "Altitude"
-#define D_VERTICAL_ACCURACY "Vertical Accuracy"
-#define D_SPEED "Speed"
-#define D_SPEED_ACCURACY "Speed Accuracy"
-#define D_HEADING "Heading"
-#define D_HEADING_ACCURACY "Heading Accuracy"
-#define D_SAT_FIX "Satellite Fix"
- #define D_SAT_FIX_NO_FIX "None"
- #define D_SAT_FIX_DEAD_RECK "Dead reckoning"
+#define D_ALTITUDE "Dokładność pozioma"
+#define D_VERTICAL_ACCURACY "Dokładność pionowa"
+#define D_SPEED "Prędkość"
+#define D_SPEED_ACCURACY "Dokładność prędkości"
+#define D_HEADING "Nagłówek"
+#define D_HEADING_ACCURACY "Dokładność nagłówka"
+#define D_SAT_FIX "Satelita"
+ #define D_SAT_FIX_NO_FIX "Żadne"
+ #define D_SAT_FIX_DEAD_RECK "Martwe pole"
#define D_SAT_FIX_2D "2D"
#define D_SAT_FIX_3D "3D"
- #define D_SAT_FIX_GPS_DEAD "GPS and dead reckoning"
- #define D_SAT_FIX_TIME "Time only fix"
+ #define D_SAT_FIX_GPS_DEAD "GPS i martwe pole"
+ #define D_SAT_FIX_TIME "Tylko czas"
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Brak"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -713,7 +721,7 @@
#define D_SENSOR_LED_LINK "Led link" // Suffix "i"
#define D_SENSOR_PWM "Obroty" // Suffix "1"
#define D_SENSOR_COUNTER "Licznik" // Suffix "1"
-#define D_SENSOR_INTERRUPT "Interrupt"
+#define D_SENSOR_INTERRUPT "Zakłócenia"
#define D_SENSOR_INPUT "Input"
#define D_SENSOR_IRRECV "IRrecv"
#define D_SENSOR_MHZ_RX "MHZ Rx"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -993,7 +1005,7 @@
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
-#define D_SENSOR_FLOWRATEMETER "Flowrate"
+#define D_SENSOR_FLOWRATEMETER "Przepływ"
#define D_SENSOR_ME007_TRIG "ME007 Tri"
#define D_SENSOR_ME007_RX "ME007 Rx"
#define D_SENSOR_TUYAMCUBR_TX "TuyaMCUBr Tx"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "sec"
#define D_UNIT_SECTORS "sektory"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Bierna pobrana"
#define D_EXPORT_REACTIVE "Bierna oddana"
#define D_TOTAL_REACTIVE "Bierna całkowita"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Stopni"
#define D_TOTAL_ACTIVE "Całkowita czynna"
#define D_RESETTABLE_TOTAL_ACTIVE "Całkowita czynna (RST)"
@@ -1200,9 +1212,9 @@
#define D_FP_UNKNOWNERROR "Błąd" // Any other error
// xsns_96_flowratemeter.ino
-#define D_FLOWRATEMETER_NAME "Flowrate"
-#define D_FLOWRATEMETER_AMOUNT_TODAY "Amount Today"
-#define D_FLOWRATEMETER_DURATION_TODAY "Duration Today"
+#define D_FLOWRATEMETER_NAME "Przepływ"
+#define D_FLOWRATEMETER_AMOUNT_TODAY "Wartość dzisiaj"
+#define D_FLOWRATEMETER_DURATION_TODAY "Czas trwania dzisiaj"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names
@@ -1217,52 +1229,52 @@
#define D_NEOPOOL_MACH_GENERIC "Generic"
#define D_NEOPOOL_MACH_BAYROL "Bayrol"
#define D_NEOPOOL_MACH_HAY "Hay"
-#define D_NEOPOOL_FILTRATION_MANUAL "Manual" // Filtration modes
+#define D_NEOPOOL_FILTRATION_MANUAL "Ręczny" // Filtration modes
#define D_NEOPOOL_FILTRATION_AUTO "Auto"
-#define D_NEOPOOL_FILTRATION_HEATING "Heating"
+#define D_NEOPOOL_FILTRATION_HEATING "Ogrzewanie"
#define D_NEOPOOL_FILTRATION_SMART "Smart"
-#define D_NEOPOOL_FILTRATION_INTELLIGENT "Intelligent"
-#define D_NEOPOOL_FILTRATION_BACKWASH "Backwash"
-#define D_NEOPOOL_FILTRATION_NONE "" // Filtration speed level
-#define D_NEOPOOL_FILTRATION_SLOW "slow"
-#define D_NEOPOOL_FILTRATION_MEDIUM "medium"
-#define D_NEOPOOL_FILTRATION_FAST "fast"
-#define D_NEOPOOL_TYPE "Type" // Sensor & relais names
+#define D_NEOPOOL_FILTRATION_INTELLIGENT "Inteligentny"
+#define D_NEOPOOL_FILTRATION_BACKWASH "Płukanie wsteczne"
+#define D_NEOPOOL_FILTRATION_NONE "żaden" // Filtration speed level
+#define D_NEOPOOL_FILTRATION_SLOW "wolny"
+#define D_NEOPOOL_FILTRATION_MEDIUM "średni"
+#define D_NEOPOOL_FILTRATION_FAST "szybki"
+#define D_NEOPOOL_TYPE "Typ" // Sensor & relais names
#define D_NEOPOOL_REDOX "Redox"
-#define D_NEOPOOL_CHLORINE "Chlorine"
-#define D_NEOPOOL_CONDUCTIVITY "Conductivity"
-#define D_NEOPOOL_IONIZATION "Ionization"
-#define D_NEOPOOL_HYDROLYSIS "Hydrolysis"
-#define D_NEOPOOL_RELAY "Relay"
-#define D_NEOPOOL_RELAY_FILTRATION "Filtration" // Relay assignment
-#define D_NEOPOOL_RELAY_LIGHT "Light"
-#define D_NEOPOOL_RELAY_PH_ACID "Acid pump"
-#define D_NEOPOOL_RELAY_PH_BASE "Base pump"
-#define D_NEOPOOL_RELAY_RX "Redox level"
-#define D_NEOPOOL_RELAY_CL "Chlorine pump"
-#define D_NEOPOOL_RELAY_CD "Conductivity"
-#define D_NEOPOOL_RELAY_HEATING "Heating"
+#define D_NEOPOOL_CHLORINE "Chlor"
+#define D_NEOPOOL_CONDUCTIVITY "Przewodność"
+#define D_NEOPOOL_IONIZATION "Jonizacja"
+#define D_NEOPOOL_HYDROLYSIS "Hydroliza"
+#define D_NEOPOOL_RELAY "Przekaźnik"
+#define D_NEOPOOL_RELAY_FILTRATION "Filtrowanie" // Relay assignment
+#define D_NEOPOOL_RELAY_LIGHT "Światło"
+#define D_NEOPOOL_RELAY_PH_ACID "Pompa Acid"
+#define D_NEOPOOL_RELAY_PH_BASE "Pompa Base"
+#define D_NEOPOOL_RELAY_RX "Poziom Redox"
+#define D_NEOPOOL_RELAY_CL "Pompa Chlorine"
+#define D_NEOPOOL_RELAY_CD "Przewodność"
+#define D_NEOPOOL_RELAY_HEATING "Ogrzewanie"
#define D_NEOPOOL_RELAY_UV "UV"
-#define D_NEOPOOL_RELAY_VALVE "Valve"
-#define D_NEOPOOL_RELAY_AUX "Aux"
-#define D_NEOPOOL_TIME "Time"
-#define D_NEOPOOL_FILT_MODE "Filtration mode"
+#define D_NEOPOOL_RELAY_VALVE "Zawór"
+#define D_NEOPOOL_RELAY_AUX "Uniwersalny"
+#define D_NEOPOOL_TIME "Czas"
+#define D_NEOPOOL_FILT_MODE "Tryb filtracji"
#define D_NEOPOOL_CELL_RUNTIME "Cell runtime"
#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status
#define D_NEOPOOL_PR_OFF "PrOff"
#define D_NEOPOOL_SETPOINT_OK "Ok"
-#define D_NEOPOOL_COVER "Cover"
-#define D_NEOPOOL_SHOCK "Boost"
-#define D_NEOPOOL_STATUS_ON "ON"
-#define D_NEOPOOL_STATUS_OFF "OFF"
-#define D_NEOPOOL_STATUS_WAIT "WAIT"
-#define D_NEOPOOL_STATUS_TANK "TANK"
-#define D_NEOPOOL_STATUS_FLOW "Flow"
-#define D_NEOPOOL_LOW "Low"
+#define D_NEOPOOL_COVER "Okładka"
+#define D_NEOPOOL_SHOCK "Wzmocnienie"
+#define D_NEOPOOL_STATUS_ON "ZAŁĄCZONY"
+#define D_NEOPOOL_STATUS_OFF "WYŁĄCZONY"
+#define D_NEOPOOL_STATUS_WAIT "CZEKAJ"
+#define D_NEOPOOL_STATUS_TANK "ZBIORNIK"
+#define D_NEOPOOL_STATUS_FLOW "Przepływ"
+#define D_NEOPOOL_LOW "Niski"
#define D_NEOPOOL_FLOW1 "FL1"
#define D_NEOPOOL_FLOW2 "FL2"
-#define D_NEOPOOL_PH_HIGH "too high" // ph Alarms
-#define D_NEOPOOL_PH_LOW "too low"
+#define D_NEOPOOL_PH_HIGH "za wysoki" // ph Alarms
+#define D_NEOPOOL_PH_LOW "za niski"
#define D_NEOPOOL_PUMP_TIME_EXCEEDED "czas pompowania przekroczony"
// xsns_106_gdk101.ino
@@ -1273,10 +1285,19 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Dystans Przesuwu"
+#define D_STATIC_DISTANCE "Dystans Statyczny"
+#define D_DETECT_DISTANCE "Wykryj Dystans"
+#define D_MOVING_ENERGY_T "Cel przesuwu"
+#define D_STATIC_ENERGY_T "Cel statyczny"
+#define D_LD2410_PIN_STATE "Stan wyjść pin"
+#define D_LD2410_LIGHT "Czujnik światła"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
-#define D_CHARGING "Charging"
-#define D_CAPACITY "Capacity"
+#define D_CHARGING "Ładowanie"
+#define D_CAPACITY "Pojemność"
#endif // _LANGUAGE_PL_PL_D_H_
diff --git a/tasmota/language/pt_BR.h b/tasmota/language/pt_BR.h
index 0b3fce6fd..4dfaf2058 100644
--- a/tasmota/language/pt_BR.h
+++ b/tasmota/language/pt_BR.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Depurar"
#define D_DEWPOINT "Ponto de orvalho"
#define D_DISABLED "Desabilitado"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Distância"
#define D_DNS_SERVER "Servidor DNS"
#define D_DO "Oxigênio dissolvido"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Servidor WEB"
#define D_SOC "Estado de Carga"
#define D_SOH "Estado de Saúde"
+#define D_WATER_DEPTH "Profundidade da água"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "AVISO: esta versão não supporta configurações persistentes"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Sensor ocupado"
#define D_SENSOR_CRC_ERROR "Erro CRC sensor"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "s"
#define D_UNIT_SECTORS "setores"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "W/h"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Importar Reativo"
#define D_EXPORT_REACTIVE "Exportar Reativo"
#define D_TOTAL_REACTIVE "Reativo total"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Deg"
#define D_TOTAL_ACTIVE "Total Ativo"
#define D_RESETTABLE_TOTAL_ACTIVE "Total Activo (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/pt_PT.h b/tasmota/language/pt_PT.h
index b9beddd84..4735ffe3f 100644
--- a/tasmota/language/pt_PT.h
+++ b/tasmota/language/pt_PT.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Depurar"
#define D_DEWPOINT "Ponto de Condensação"
#define D_DISABLED "Disabilitado"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Distância"
#define D_DNS_SERVER "Servidor DNS"
#define D_DO "Oxigénio Dissolvido"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Servidor WEB"
#define D_SOC "Estado de Carga"
#define D_SOH "Estado de Saúde"
+#define D_WATER_DEPTH "Profundidade da água"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "AVISO esta versão não supporta configurações persistentes"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Sensor ocupado"
#define D_SENSOR_CRC_ERROR "Erro no CRC do sensor"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "sec"
#define D_UNIT_SECTORS "setores"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Reativo importado"
#define D_EXPORT_REACTIVE "Reativo exportado"
#define D_TOTAL_REACTIVE "Reactivo total"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Deg"
#define D_TOTAL_ACTIVE "Total Ativo"
#define D_RESETTABLE_TOTAL_ACTIVE "Total Ativo (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/ro_RO.h b/tasmota/language/ro_RO.h
index b41043a2d..96a0f506d 100644
--- a/tasmota/language/ro_RO.h
+++ b/tasmota/language/ro_RO.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Depanare"
#define D_DEWPOINT "Punct de rouă"
#define D_DISABLED "Dezactivat"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Distanță"
#define D_DNS_SERVER "Server DNS"
#define D_DO "Disolved Oxygen"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Server Web"
#define D_SOC "State of Charge"
#define D_SOH "State of Health"
+#define D_WATER_DEPTH "Adâncimea apei"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "ATENȚIE Această versiune nu suportă setări permanente"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Senzor ocupat"
#define D_SENSOR_CRC_ERROR "Eroare senzor CRC"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "sec"
#define D_UNIT_SECTORS "sectors"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Import Reactiv"
#define D_EXPORT_REACTIVE "Export Reactiv"
#define D_TOTAL_REACTIVE "Total Reactiv"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Deg"
#define D_TOTAL_ACTIVE "Total Activ"
#define D_RESETTABLE_TOTAL_ACTIVE "Total Activ (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/ru_RU.h b/tasmota/language/ru_RU.h
index a7ff3e0fc..0a70d129c 100644
--- a/tasmota/language/ru_RU.h
+++ b/tasmota/language/ru_RU.h
@@ -88,9 +88,6 @@
#define D_DEBUG "Отладка"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Блокирован"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Расстояние"
#define D_DNS_SERVER "DNS Сервер"
#define D_DO "Disolved Oxygen"
@@ -219,6 +216,7 @@
#define D_WEB_SERVER "Веб-сервер"
#define D_SOC "State of Charge"
#define D_SOH "State of Health"
+#define D_WATER_DEPTH "Глубина воды"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "ПРЕДУПРЕЖДЕНИЕ Эта версия не поддерживает персистентные настройки"
@@ -573,6 +571,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Датчик DS18x20 занят"
#define D_SENSOR_CRC_ERROR "Датчик DS18x20 - ошибка CRC"
@@ -694,6 +700,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -770,6 +778,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -779,6 +789,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1274,6 +1286,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/sk_SK.h b/tasmota/language/sk_SK.h
index d65869917..91ba8d635 100644
--- a/tasmota/language/sk_SK.h
+++ b/tasmota/language/sk_SK.h
@@ -89,9 +89,6 @@
#define D_DEBUG "Debug"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Zablokované"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Vzdialenosť"
#define D_DNS_SERVER "Server DNS"
#define D_DO "Disolved Oxygen"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Web Server"
#define D_SOC "State of Charge"
#define D_SOH "State of Health"
+#define D_WATER_DEPTH "Hĺbka vody"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "UPOZORNENIE Táto verzia nepodporuje trvalé nastavenia"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Sensor DS18x20 obsadený"
#define D_SENSOR_CRC_ERROR "Sensor DS18x20 chyba CRC"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "sek"
#define D_UNIT_SECTORS "sektory"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Import Reactive"
#define D_EXPORT_REACTIVE "Export Reactive"
#define D_TOTAL_REACTIVE "Total Reactive"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Deg"
#define D_TOTAL_ACTIVE "Total Active"
#define D_RESETTABLE_TOTAL_ACTIVE "Total Active (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/sv_SE.h b/tasmota/language/sv_SE.h
index de5fb68b2..8bf23eb8d 100644
--- a/tasmota/language/sv_SE.h
+++ b/tasmota/language/sv_SE.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Debug"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Inaktiverad"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Distans"
#define D_DNS_SERVER "DNS-server"
#define D_DO "Disolved Oxygen"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Webbserver"
#define D_SOC "State of Charge"
#define D_SOH "State of Health"
+#define D_WATER_DEPTH "Vattendjup"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "VARNING Denna version supporterar inte beständiga inställningar"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Sensor upptagen"
#define D_SENSOR_CRC_ERROR "Sensor CRC-fel"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "sek"
#define D_UNIT_SECTORS "sektorer"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Import reaktiv"
#define D_EXPORT_REACTIVE "Export reaktiv"
#define D_TOTAL_REACTIVE "Total reaktiv"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Deg"
#define D_TOTAL_ACTIVE "Total aktiv"
#define D_RESETTABLE_TOTAL_ACTIVE "Total aktiv (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/tr_TR.h b/tasmota/language/tr_TR.h
index 23dc61fd1..d73fbd1ab 100644
--- a/tasmota/language/tr_TR.h
+++ b/tasmota/language/tr_TR.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Hata Ayıklama"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Etkin Değil"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Mesage"
#define D_DNS_SERVER "DNS Sunucu"
#define D_DO "Disolved Oxygen"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Web Sunucusu"
#define D_SOC "State of Charge"
#define D_SOH "State of Health"
+#define D_WATER_DEPTH "Su derinliği"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "UYARI Bu versiyon ayarların kalıcı olarak kaydedilmesine olanak sağlamıyor"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Sensör başgül"
#define D_SENSOR_CRC_ERROR "Sensor CRC hatası"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "sec"
#define D_UNIT_SECTORS "sectors"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Import Reactive"
#define D_EXPORT_REACTIVE "Export Reactive"
#define D_TOTAL_REACTIVE "Total Reactive"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Deg"
#define D_TOTAL_ACTIVE "Total Active"
#define D_RESETTABLE_TOTAL_ACTIVE "Total Active (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/uk_UA.h b/tasmota/language/uk_UA.h
index fba2ed0c5..0cf2ac690 100644
--- a/tasmota/language/uk_UA.h
+++ b/tasmota/language/uk_UA.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Налагодження"
#define D_DEWPOINT "Tочка роси"
#define D_DISABLED "Вимкнено"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Відстань"
#define D_DNS_SERVER "Сервер DNS"
#define D_DO "Disolved Oxygen"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Web сервер"
#define D_SOC "State of Charge"
#define D_SOH "State of Health"
+#define D_WATER_DEPTH "Глибина води"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "ПОПЕРЕДЖЕННЯ! Ця версія не підтримує збереження налаштувань"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Давач DS18x20 зайнятий"
#define D_SENSOR_CRC_ERROR "Давач DS18x20 - помилка CRC"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/vi_VN.h b/tasmota/language/vi_VN.h
index 106312501..4b625a7c0 100644
--- a/tasmota/language/vi_VN.h
+++ b/tasmota/language/vi_VN.h
@@ -87,9 +87,6 @@
#define D_DEBUG "Tìm lỗi"
#define D_DEWPOINT "Điểm sương"
#define D_DISABLED "Vô hiệu hóa"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "Khoảng cách"
#define D_DNS_SERVER "Máy chủ DNS"
#define D_DO "Disolved Oxygen"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Máy chủ Web"
#define D_SOC "State of Charge"
#define D_SOH "State of Health"
+#define D_WATER_DEPTH "Độ sâu nước"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "Cảnh báo phiên bản này không hỗ trợ các cài đặt vĩnh viễn"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "Cảm biến đang bận"
#define D_SENSOR_CRC_ERROR "Cảm biến CRC lỗi"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "sec"
#define D_UNIT_SECTORS "sectors"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Import Reactive"
#define D_EXPORT_REACTIVE "Export Reactive"
#define D_TOTAL_REACTIVE "Total Reactive"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Deg"
#define D_TOTAL_ACTIVE "Total Active"
#define D_RESETTABLE_TOTAL_ACTIVE "Total Active (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/zh_CN.h b/tasmota/language/zh_CN.h
index b3218a523..70d2c5d97 100644
--- a/tasmota/language/zh_CN.h
+++ b/tasmota/language/zh_CN.h
@@ -87,9 +87,6 @@
#define D_DEBUG "调试"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "禁用"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "距离"
#define D_DNS_SERVER "DNS服务器"
#define D_DO "Disolved Oxygen"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "Web服务器"
#define D_SOC "充电状态"
#define D_SOH "充电健康"
+#define D_WATER_DEPTH "水深"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "警告:精简固件不支持持久保存设置"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "传感器正忙"
#define D_SENSOR_CRC_ERROR "传感器 CRC 校验错误"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "秒"
#define D_UNIT_SECTORS "扇区"
#define D_UNIT_VA "VA"
-#define D_UNIT_VAR "VAr"
+#define D_UNIT_VAR "var"
#define D_UNIT_VOLT "V"
#define D_UNIT_WATT "W"
#define D_UNIT_WATTHOUR "Wh"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/language/zh_TW.h b/tasmota/language/zh_TW.h
index 2028d0865..2b721c2ab 100644
--- a/tasmota/language/zh_TW.h
+++ b/tasmota/language/zh_TW.h
@@ -87,9 +87,6 @@
#define D_DEBUG "偵錯"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "已停用"
-#define D_MOVING_DISTANCE "Moving Distance"
-#define D_STATIC_DISTANCE "Static Distance"
-#define D_DETECT_DISTANCE "Detect Distance"
#define D_DISTANCE "距離"
#define D_DNS_SERVER "DNS伺服器"
#define D_DO "Disolved Oxygen"
@@ -218,6 +215,7 @@
#define D_WEB_SERVER "網頁伺服器"
#define D_SOC "State of Charge"
#define D_SOH "State of Health"
+#define D_WATER_DEPTH "水深"
// tasmota.ino
#define D_WARNING_MINIMAL_VERSION "警告,這個版本並不支援將設定永久的儲存!"
@@ -572,6 +570,14 @@
#define D_THERMOSTAT_PI_HYBRID "PI (Hybrid)"
#define D_THERMOSTAT_AUTOTUNE_HYBRID "Autotune (Hybrid)"
+// xdrv_79_esp32_ble.ino
+#define D_CONFIGURE_BLE "Configure BLE"
+#define D_BLE_PARAMETERS "Bluetooth Settings"
+#define D_MQTT_BLE_ENABLE "Enable Bluetooth"
+#define D_MQTT_BLE_ACTIVESCAN "Enable Active Scan(*)"
+#define D_BLE_DEVICES "Devices Seen"
+#define D_BLE_REMARK "items marked (*) are not stored in config"
+
// xsns_05_ds18b20.ino
#define D_SENSOR_BUSY "感應器忙碌中"
#define D_SENSOR_CRC_ERROR "感應器 CRC 校驗錯誤"
@@ -693,6 +699,8 @@
#define D_SENSOR_DS18X20 "DS18x20"
#define D_SENSOR_I2C_SCL "I2C SCL"
#define D_SENSOR_I2C_SDA "I2C SDA"
+#define D_SENSOR_I2C_SER_TX "I2C Ser TX"
+#define D_SENSOR_I2C_SER_RX "I2C Ser RX"
#define D_SENSOR_I2S_MCLK "I2S MCLK"
#define D_SENSOR_I2S_BCLK "I2S BCLK"
#define D_SENSOR_I2S_WS_IN "I2S BCLK IN"
@@ -769,6 +777,8 @@
#define D_SENSOR_WE517_RX "WE517 Rx"
#define D_SENSOR_LD2410_TX "LD2410 Tx"
#define D_SENSOR_LD2410_RX "LD2410 Rx"
+#define D_SENSOR_LD2410S_TX "LD2410S Tx"
+#define D_SENSOR_LD2410S_RX "LD2410S Rx"
#define D_GPIO_TM1621_CS "TM1621 CS"
#define D_GPIO_TM1621_WR "TM1621 WR"
#define D_GPIO_TM1621_RD "TM1621 RD"
@@ -778,6 +788,8 @@
#define D_SENSOR_TM1638_CLK "TM1638 CLK"
#define D_SENSOR_TM1638_DIO "TM1638 DIO"
#define D_SENSOR_TM1638_STB "TM1638 STB"
+#define D_SENSOR_TM1640_CLK "TM1640 CLK"
+#define D_SENSOR_TM1640_DIN "TM1640 DIN"
#define D_SENSOR_MAX7219_DIN "MAX7219 DIN"
#define D_SENSOR_MAX7219_CS "MAX7219 CS"
#define D_SENSOR_MAX7219_CLK "MAX7219 CLK"
@@ -1050,7 +1062,7 @@
#define D_UNIT_SECOND "秒"
#define D_UNIT_SECTORS "磁區"
#define D_UNIT_VA "伏安(VA)"
-#define D_UNIT_VAR "乏爾(VAr)"
+#define D_UNIT_VAR "乏爾(var)"
#define D_UNIT_VOLT "伏特"
#define D_UNIT_WATT "瓦特"
#define D_UNIT_WATTHOUR "瓦小時"
@@ -1072,7 +1084,7 @@
#define D_IMPORT_REACTIVE "Import Reactive"
#define D_EXPORT_REACTIVE "Export Reactive"
#define D_TOTAL_REACTIVE "Total Reactive"
-#define D_UNIT_KWARH "kVArh"
+#define D_UNIT_KWARH "kvarh"
#define D_UNIT_ANGLE "Deg"
#define D_TOTAL_ACTIVE "Total Active"
#define D_RESETTABLE_TOTAL_ACTIVE "Total Active (RST)"
@@ -1273,6 +1285,15 @@
#define D_SENSOR_PIPSOLAR_TX "Pipsolar TX"
#define D_SENSOR_PIPSOLAR_RX "Pipsolar RX"
+// xsns_102_ld2410.ino
+#define D_MOVING_DISTANCE "Moving Distance"
+#define D_STATIC_DISTANCE "Static Distance"
+#define D_DETECT_DISTANCE "Detect Distance"
+#define D_MOVING_ENERGY_T "Moving target"
+#define D_STATIC_ENERGY_T "Static target"
+#define D_LD2410_PIN_STATE "Output pin state"
+#define D_LD2410_LIGHT "Light sensor"
+
// xsns_115_wooliis.ino
#define D_IMPORT "Import"
#define D_EXPORT "Export"
diff --git a/tasmota/lvgl_berry/tasmota_lv_conf.h b/tasmota/lvgl_berry/tasmota_lv_conf.h
index 5fcfcfe82..5b80a8dc7 100644
--- a/tasmota/lvgl_berry/tasmota_lv_conf.h
+++ b/tasmota/lvgl_berry/tasmota_lv_conf.h
@@ -1,6 +1,6 @@
/**
* @file lv_conf.h
- * Configuration file for v9.2.0
+ * Configuration file for v9.2.2
*/
/*
@@ -95,6 +95,14 @@
#if LV_USE_OS == LV_OS_CUSTOM
#define LV_OS_CUSTOM_INCLUDE
#endif
+#if LV_USE_OS == LV_OS_FREERTOS
+ /*
+ * Unblocking an RTOS task with a direct notification is 45% faster and uses less RAM
+ * than unblocking a task using an intermediary object such as a binary semaphore.
+ * RTOS task notifications can only be used when there is only one task that can be the recipient of the event.
+ */
+ #define LV_USE_FREERTOS_TASK_NOTIFY 1
+#endif
/*========================
* RENDERING CONFIGURATION
@@ -205,10 +213,16 @@
#endif
/* Use NXP's PXP on iMX RTxxx platforms. */
-#define LV_USE_DRAW_PXP 0
+#define LV_USE_PXP 0
-#if LV_USE_DRAW_PXP
- #if LV_USE_OS
+#if LV_USE_PXP
+ /* Use PXP for drawing.*/
+ #define LV_USE_DRAW_PXP 1
+
+ /* Use PXP to rotate display.*/
+ #define LV_USE_ROTATE_PXP 0
+
+ #if LV_USE_DRAW_PXP && LV_USE_OS
/* Use additional draw thread for PXP processing.*/
#define LV_USE_PXP_DRAW_THREAD 1
#endif
diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h
index e9d8128bb..b2873e8df 100644
--- a/tasmota/my_user_config.h
+++ b/tasmota/my_user_config.h
@@ -190,7 +190,7 @@
// -- HTTP GUI Colors -----------------------------
// HTML hex color codes. Only 3 and 6 digit hex string values are supported!! See https://www.w3schools.com/colors/colors_hex.asp
// Light theme - pre v7
-// WebColor {"WebColor":["#000","#fff","#f2f2f2","#000","#fff","#000","#fff","#f00","#008000","#fff","#1fa3ec","#0e70a4","#d43535","#931f1f","#47c266","#5aaf6f","#fff","#999","#000"]}
+// WebColor {"WebColor":["#000","#fff","#f2f2f2","#000","#fff","#000","#fff","#f00","#008000","#fff","#1fa3ec","#0e70a4","#d43535","#931f1f","#47c266","#5aaf6f","#fff","#999","#000","#08405e"]}
/*
#define COLOR_TEXT "#000" // [WebColor1] Global text color - Black
#define COLOR_BACKGROUND "#fff" // [WebColor2] Global background color - White
@@ -211,9 +211,10 @@
#define COLOR_TIMER_TAB_TEXT "#fff" // [WebColor17] Config timer tab text color - White
#define COLOR_TIMER_TAB_BACKGROUND "#999" // [WebColor18] Config timer tab background color - Dark gray
#define COLOR_TITLE_TEXT "#000" // [WebColor19] Title text color - Whiteish
+#define COLOR_BUTTON_OFF "#08405e" // [WebColor20] Button color when off - Darkest blueish
*/
// Dark theme
-// WebColor {"WebColor":["#eaeaea","#252525","#4f4f4f","#000","#ddd","#65c115","#1f1f1f","#ff5661","#008000","#faffff","#1fa3ec","#0e70a4","#d43535","#931f1f","#47c266","#5aaf6f","#faffff","#999","#eaeaea"]}
+// WebColor {"WebColor":["#eaeaea","#252525","#4f4f4f","#000","#ddd","#65c115","#1f1f1f","#ff5661","#008000","#faffff","#1fa3ec","#0e70a4","#d43535","#931f1f","#47c266","#5aaf6f","#faffff","#999","#eaeaea","#08405e"]}
#define COLOR_TEXT "#eaeaea" // [WebColor1] Global text color - Very light gray
#define COLOR_BACKGROUND "#252525" // [WebColor2] Global background color - Very dark gray (mostly black)
#define COLOR_FORM "#4f4f4f" // [WebColor3] Form background color - Very dark gray
@@ -233,6 +234,7 @@
#define COLOR_TIMER_TAB_TEXT "#faffff" // [WebColor17] Config timer tab text color - Very pale (mostly white) cyan.
#define COLOR_TIMER_TAB_BACKGROUND "#999" // [WebColor18] Config timer tab background color - Dark gray
#define COLOR_TITLE_TEXT "#eaeaea" // [WebColor19] Title text color - Very light gray
+#define COLOR_BUTTON_OFF "#08405e" // [WebColor20] Button color when off - Darkest blueish
// -- KNX -----------------------------------------
#define KNX_ENABLED false // [Knx_Enabled] Enable KNX protocol
@@ -560,14 +562,7 @@
// #define MAGICSWITCH_MASKING_WINDOW_LEN 5 // Overridable masking window (in number of 50ms loops)
// -- Optional light modules ----------------------
-#define USE_LIGHT // Add support for light control
-#define USE_WS2812 // WS2812 Led string using library NeoPixelBus (+5k code, +1k mem, 232 iram) - Disable by //
-// #define USE_WS2812_DMA // ESP8266 only, DMA supports only GPIO03 (= Serial RXD) (+1k mem). When USE_WS2812_DMA is enabled expect Exceptions on Pow
- #define USE_WS2812_RMT 0 // ESP32 only, hardware RMT support (default). Specify the RMT channel 0..7. This should be preferred to software bit bang.
-// #define USE_WS2812_I2S 0 // ESP32 only, hardware I2S support. Specify the I2S channel 0..2. This is exclusive from RMT. By default, prefer RMT support
-// #define USE_WS2812_INVERTED // Use inverted data signal
- #define USE_WS2812_HARDWARE NEO_HW_WS2812 // Hardware type (NEO_HW_WS2812, NEO_HW_WS2812X, NEO_HW_WS2813, NEO_HW_SK6812, NEO_HW_LC8812, NEO_HW_APA106, NEO_HW_P9813)
- #define USE_WS2812_CTYPE NEO_GRB // Color type (NEO_RGB, NEO_GRB, NEO_BRG, NEO_RBG, NEO_RGBW, NEO_GRBW)
+#define USE_LIGHT // Add support for light control
#define USE_MY92X1 // Add support for MY92X1 RGBCW led controller as used in Sonoff B1, Ailight and Lohas
#define USE_SM16716 // Add support for SM16716 RGB LED controller (+0k7 code)
#define USE_SM2135 // Add support for SM2135 RGBCW led control as used in Action LSC (+0k6 code)
@@ -581,6 +576,18 @@
#define USE_DGR_LIGHT_SEQUENCE // Add support for device group light sequencing (requires USE_DEVICE_GROUPS) (+0k2 code)
//#define USE_LSC_MCSL // Add support for GPE Multi color smart light as sold by Action in the Netherlands (+1k1 code)
+// -- Optional adressable leds ----------------------
+#define USE_WS2812 // WS2812 Led string using library NeoPixelBus (+5k code, +1k mem, 232 iram) - Disable by //
+// -------- below is for ESP8266 only
+// #define USE_WS2812_DMA // ESP8266 only, DMA supports only GPIO03 (= Serial RXD) (+1k mem). When USE_WS2812_DMA is enabled expect Exceptions on Pow
+ #define USE_WS2812_RMT 0 // ESP32 only, hardware RMT support (default). Specify the RMT channel 0..7. This should be preferred to software bit bang.
+// #define USE_WS2812_I2S 0 // ESP32 only, hardware I2S support. Specify the I2S channel 0..2. This is exclusive from RMT. By default, prefer RMT support
+// #define USE_WS2812_INVERTED // Use inverted data signal
+ #define USE_WS2812_HARDWARE NEO_HW_WS2812 // Hardware type (NEO_HW_WS2812, NEO_HW_WS2812X, NEO_HW_WS2813, NEO_HW_SK6812, NEO_HW_LC8812, NEO_HW_APA106, NEO_HW_P9813)
+ #define USE_WS2812_CTYPE NEO_GRB // Color type (NEO_RGB, NEO_GRB, NEO_BRG, NEO_RBG, NEO_RGBW, NEO_GRBW)
+// -------- below if for ESP32x only -- ESP32 uses a lightweight library instead of NeoPixelBus
+ // #define USE_WS2812_FORCE_NEOPIXELBUS // this option forces to use NeoPixelBus (like ESP866), which disables Berry support and limits features -- DO NOT USE unless you have a good reason
+
// #define USE_LIGHT_ARTNET // Add support for DMX/ArtNet via UDP on port 6454 (+3.5k code)
#define USE_LIGHT_ARTNET_MCAST 239,255,25,54 // Multicast address used to listen: 239.255.25.54
@@ -750,6 +757,7 @@
// #define USE_AMSX915 // [I2CDriver86] Enable AMS5915/AMS6915 pressure/temperature sensor (+1k2 code)
// #define USE_SPL06_007 // [I2cDriver87] Enable SPL06_007 pressure and temperature sensor (I2C addresses 0x76) (+2k5 code)
// #define USE_QMP6988 // [I2cDriver88] Enable QMP6988 pressure and temperature sensor (I2C address 0x56 or 0x70) (+2k9 code)
+// #define USE_MS5837 // [I2cDriver91] Enable MS5837 sensor (I2C address 0x76) (+2k7 code)
// #define USE_RTC_CHIPS // Enable RTC chip support and NTP server - Select only one
// #define USE_DS3231 // [I2cDriver26] Enable DS3231 RTC - used by Ulanzi TC001 (I2C address 0x68) (+1k2 code)
@@ -772,7 +780,7 @@
#define MTX_ADDRESS7 0x00 // [DisplayAddress7] I2C address of seventh 8x8 matrix module
#define MTX_ADDRESS8 0x00 // [DisplayAddress8] I2C address of eigth 8x8 matrix module
#define USE_DISPLAY_SEVENSEG // [DisplayModel 11] [I2cDriver47] Enable sevenseg display (I2C 0x70-0x77) (<+11k code)
-// #define USE_DISPLAY_SEVENSEG_COMMON_ANODE // Enable support for common anode sevenseg displays
+// #define USE_DISPLAY_SEVENSEG_COMMON_ANODE // Enable support for common anode sevenseg displays
// Multiple sevenseg displays are logically arranged vertically with MTX_ADDRESS1 at y=0,
// MTX_ADDRESS2 at y=1, up to MTX_ADDRESS8 at y=7
// Command: DisplayText [yn]8888
@@ -780,7 +788,7 @@
// Each segment may be address Command: DisplayText [xn]m
// where n is 0..4 (4 digits and middle :) and m is decimal for bitmap of which segment to turn on.
// Reference: https://cdn-learn.adafruit.com/downloads/pdf/adafruit-led-backpack.pdf
- // #define SEVENSEG_ADDRESS1 0x70 // No longer used. Use MTX_ADDRESS1 - MTX_ADDRESS8 instead to specify I2C address of sevenseg displays
+// #define SEVENSEG_ADDRESS1 0x70 // No longer used. Use MTX_ADDRESS1 - MTX_ADDRESS8 instead to specify I2C address of sevenseg displays
// #define USE_DISPLAY_SH1106 // [DisplayModel 7] [I2cDriver6] Enable SH1106 Oled 128x64 display (I2C addresses 0x3C and 0x3D)
// #define USE_DISPLAY_TM1650 // [DisplayModel 20] [I2cDriver74] Enable TM1650 display (I2C addresses 0x24 - 0x27 and 0x34 - 0x37)
// #define USE_DT_VARS // Display variables that are exposed in JSON MQTT strings e.g. in TelePeriod messages.
@@ -790,10 +798,12 @@
#endif // USE_I2C
-// #define USE_DISPLAY // Add I2C/TM1637/MAX7219 Display Support (+2k code)
-// #define USE_DISPLAY_TM1637 // [DisplayModel 15] Enable TM1637 Seven Segment Display Module (4-6 digits)
-// #define USE_DISPLAY_MAX7219 // [DisplayModel 15] Enable MAX7219 Seven Segment Display Module (8 digits)
-// #define USE_DISPLAY_MAX7219_MATRIX // [DisplayModel 19] Enable MAX7219 8x8 Matrix Display
+//#define USE_DISPLAY // Add I2C/TM1637/MAX7219 Display Support (+2k code)
+// #define USE_DISPLAY_TM1637 // [DisplayModel 15] Enable TM1637 Seven Segment Display Module (4-6 digits)
+// #define USE_DISPLAY_MAX7219 // [DisplayModel 15] Enable MAX7219 Seven Segment Display Module (8 digits)
+// #define USE_DISPLAY_MAX7219_MATRIX // [DisplayModel 19] Enable MAX7219 8x8 Matrix Display
+// #define USE_DISPLAY_TM1640 // [DisplayModel 13] Enable TM1640 module Seven Segment Display Module (stub)
+// #define USE_IOTTIMER // Enable TM1640 based IotTimer
// -- Universal Display Driver ---------------------------------
// #define USE_UNIVERSAL_DISPLAY // New universal display driver for both I2C and SPI
@@ -886,6 +896,7 @@
// #define GM861_DECODE_AIM // Decode AIM-id (+0k3 code)
// #define GM861_HEARTBEAT // Enable heartbeat (+0k2 code)
//#define USE_WOOLIIS // Add support for Wooliis Hall Effect Coulometer or Battery capacity monitor (+1k6 code)
+//#define USE_DALI // Add support for DALI gateway (+5k code)
// -- Power monitoring sensors --------------------
#define USE_ENERGY_SENSOR // Add support for Energy Monitors (+14k code)
@@ -1078,10 +1089,6 @@
//#define USE_FLOWRATEMETER // Add support for water flow meter YF-DN50 and similary (+1k7 code)
-// #define USE_DALI // Add support for DALI 1 bridge (+2k1 code)
- #define DALI_IN_INVERT 0 // DALI RX inverted
- #define DALI_OUT_INVERT 0 // DALI TX inverted
-
// -- Thermostat control ----------------------------
//#define USE_THERMOSTAT // Add support for Thermostat
#define THERMOSTAT_CONTROLLER_OUTPUTS 1 // Number of outputs to be controlled independently
diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino
index e4f930685..94b611e1a 100644
--- a/tasmota/tasmota.ino
+++ b/tasmota/tasmota.ino
@@ -18,7 +18,7 @@
*/
// Location specific includes
-#ifndef ESP32_STAGE // ESP32 Stage has no core_version.h file. Disable include via PlatformIO Option
+#if __has_include("core_version.h") // ESP32 Stage has no core_version.h file. Disable include via PlatformIO Option
#include // Arduino_Esp8266 version information (ARDUINO_ESP8266_RELEASE and ARDUINO_ESP8266_RELEASE_2_7_1)
#endif // ESP32_STAGE
#include "include/tasmota_compat.h"
@@ -312,8 +312,7 @@ struct TasmotaGlobal_t {
bool stop_flash_rotate; // Allow flash configuration rotation
bool blinkstate; // LED state
bool pwm_present; // Any PWM channel configured with SetOption15 0
- bool i2c_enabled; // I2C configured
- bool i2c_enabled_2; // I2C configured, second controller, Wire1
+ bool i2c_enabled[2]; // I2C configured for all possible buses (1 or 2)
#ifdef ESP32
bool ota_factory; // Select safeboot binary
#endif
@@ -409,17 +408,21 @@ void setup(void) {
DisableBrownout(); // Workaround possible weak LDO resulting in brownout detection during Wifi connection
#endif // DISABLE_ESP32_BROWNOUT
- // restore GPIO16/17 if no PSRAM is found
+#ifndef FIRMWARE_SAFEBOOT
+#ifndef CORE32SOLO1
+ // restore GPIO5/18 or 16/17 if no PSRAM is found which may be used by Ethernet among others
if (!FoundPSRAM()) {
// test if the CPU is not pico
uint32_t pkg_version = bootloader_common_get_chip_ver_pkg();
if (pkg_version <= 3) { // D0WD, S0WD, D2WD
- gpio_reset_pin(GPIO_NUM_16); // D0WD_PSRAM_CS_IO
- gpio_reset_pin(GPIO_NUM_17); // D0WD_PSRAM_CLK_IO
+ gpio_reset_pin((gpio_num_t)CONFIG_D0WD_PSRAM_CS_IO);
+ gpio_reset_pin((gpio_num_t)CONFIG_D0WD_PSRAM_CLK_IO);
// IDF5.3 fix esp_gpio_reserve used in init PSRAM
- esp_gpio_revoke(BIT64(GPIO_NUM_16) | BIT64(GPIO_NUM_17));
+ esp_gpio_revoke(BIT64(CONFIG_D0WD_PSRAM_CS_IO) | BIT64(CONFIG_D0WD_PSRAM_CLK_IO));
}
}
+#endif // CORE32SOLO1
+#endif // FIRMWARE_SAFEBOOT
#endif // CONFIG_IDF_TARGET_ESP32
#endif // ESP32
@@ -563,6 +566,7 @@ void setup(void) {
SettingsLoad();
SettingsDelta();
+ SettingsMinimum(); // Set life-saving parameters if out-of-range due to reconfig Settings Area
OsWatchInit();
diff --git a/tasmota/tasmota_support/settings.ino b/tasmota/tasmota_support/settings.ino
index 5404dba9d..8d5008efd 100644
--- a/tasmota/tasmota_support/settings.ino
+++ b/tasmota/tasmota_support/settings.ino
@@ -687,9 +687,11 @@ char* SettingsText(uint32_t index) {
if (index >= SET_MAX) { // Index above SET_MAX are not stored in Settings
#ifdef USE_WEBSERVER
+#ifndef FIRMWARE_MINIMAL
if (SET_BUTTON17 <= index && index <= SET_BUTTON32)
return (char*)GetWebButton(index-SET_BUTTON17+16);
-#endif
+#endif // not FIRMWARE_MINIMAL
+#endif // USE_WEBSERVER
position += settings_text_size -1; // Setting not supported - internal error - return empty string
} else {
SettingsUpdateFinished();
@@ -926,6 +928,14 @@ void SettingsSdkErase(void) {
/********************************************************************************************/
+void SettingsMinimum(void) {
+ // Set life-saving parameters if out-of-range due to reconfig Settings Area
+ if (Settings->dns_timeout < 100) { Settings->dns_timeout = DNS_TIMEOUT; }
+ if (Settings->mqtt_keepalive < 1) { Settings->mqtt_keepalive = MQTT_KEEPALIVE; }
+ if (Settings->mqtt_socket_timeout < 1) { Settings->mqtt_socket_timeout = MQTT_SOCKET_TIMEOUT; }
+ if (Settings->mqtt_wifi_timeout < 1) { Settings->mqtt_wifi_timeout = MQTT_WIFI_CLIENT_TIMEOUT / 100; }
+}
+
void SettingsDefault(void) {
AddLog(LOG_LEVEL_INFO, PSTR(D_LOG_CONFIG D_USE_DEFAULTS));
SettingsDefaultSet1();
@@ -1835,6 +1845,35 @@ void SettingsDelta(void) {
if (Settings->version < 0x0E020004) { // 14.2.0.4
Settings->weight_precision = 0; // Initialized by HX711 driver
}
+ if (Settings->version < 0x0E030002) { // 14.3.0.2
+ Settings->sbflag1.dali_light = 1;
+ }
+ if (Settings->version < 0x0E030004) { // 14.3.0.4
+ Settings->mbflag2.dali_group_sliders = 2;
+ }
+ if (Settings->version < 0x0E030006) { // 14.3.0.6
+ char scolor[10];
+ WebHexCode(COL_BUTTON_OFF, GetTextIndexed(scolor, sizeof(scolor), COL_BUTTON_OFF, kWebColors));
+ }
+
+ if (Settings->version < 0x0E030007) { // 14.3.0.7
+ // move up uint8_t knx_CB_registered from 4A8 to 533
+ memmove_P((uint8_t*)&Settings->knx_CB_registered, (uint8_t*)&Settings->switchmode, 1);
+ // move up uint8_t global_sensor_index[3] from 4C5 to 53C
+ memmove_P((uint8_t*)&Settings->global_sensor_index, (uint8_t*)&Settings->switchmode +29, 3);
+ // move dn uint8_t switchmode[MAX_SWITCHES_SET] from 4A9 to 4A8
+ memmove_P((uint8_t*)&Settings->switchmode, (uint8_t*)&Settings->switchmode +1, 28);
+ for (uint32_t i = 28; i < MAX_SWITCHES_SET; i++) {
+ Settings->switchmode[i] = SWITCH_MODE;
+ }
+ // move up int8_t shutter_tilt_pos[MAX_SHUTTERS], uint16_t influxdb_period and uint16_t rf_duplicate_timefrom 51C to 534
+ memmove_P((uint8_t*)&Settings->shutter_tilt_pos, (uint8_t*)&Settings->shutter_tilt_config +12, 8);
+ // move up int8_t shutter_tilt_config[5][MAX_SHUTTERS] from 508 to 510
+ memmove_P((uint8_t*)&Settings->shutter_tilt_config, (uint8_t*)&Settings->shutter_tilt_config -8, 20);
+ for (uint32_t i = 14; i < MAX_INTERLOCKS_SET; i++) {
+ Settings->interlock[i] = 0;
+ }
+ }
Settings->version = TASMOTA_VERSION;
SettingsSave(1);
diff --git a/tasmota/tasmota_support/support.ino b/tasmota/tasmota_support/support.ino
index d385ec0ac..b9619a90c 100755
--- a/tasmota/tasmota_support/support.ino
+++ b/tasmota/tasmota_support/support.ino
@@ -832,11 +832,26 @@ int32_t UpdateDevicesPresent(int32_t change) {
else if (devices_present >= POWER_SIZE) { // Support up to uint32_t as bitmask
difference = devices_present - POWER_SIZE;
devices_present = POWER_SIZE;
+// AddLog(LOG_LEVEL_DEBUG, PSTR("APP: Max 32 devices supported"));
}
TasmotaGlobal.devices_present = devices_present;
return difference;
}
+void DevicesPresentNonDisplayOrLight(uint32_t &devices_claimed) {
+ uint32_t display_and_lights = 0;
+#ifdef USE_LIGHT
+ display_and_lights += LightDevices(); // Skip light(s)
+#endif // USE_LIGHT
+#ifdef USE_DISPLAY
+ display_and_lights += DisplayDevices(); // Skip display
+#endif // USE_DISPLAY
+ uint32_t devices_present = TasmotaGlobal.devices_present - display_and_lights;
+ if (devices_claimed > devices_present) {
+ devices_claimed = devices_present; // Reduce amount of claimed devices
+ }
+}
+
char* GetPowerDevice(char* dest, uint32_t idx, size_t size, uint32_t option)
{
strncpy_P(dest, S_RSLT_POWER, size); // POWER
diff --git a/tasmota/tasmota_support/support_a_i2c.ino b/tasmota/tasmota_support/support_a_i2c.ino
index c857240cd..2240a884c 100644
--- a/tasmota/tasmota_support/support_a_i2c.ino
+++ b/tasmota/tasmota_support/support_a_i2c.ino
@@ -78,19 +78,29 @@ bool I2cBegin(int sda, int scl, uint32_t bus, uint32_t frequency) {
return result;
}
+TwoWire * I2CSerialGetWire(TwoWire * orig_wire, uint8_t bus);
+
TwoWire& I2cGetWire(uint8_t bus = 0) {
- if ((0 == bus) && TasmotaGlobal.i2c_enabled) {
+ if ((0 == bus) && TasmotaGlobal.i2c_enabled[0]) {
#ifdef USE_I2C_BUS2_ESP8266
I2cSetBus(bus);
#endif
+#ifdef USE_I2C_SERIAL
+ return I2CSerialGetWire(Wire, bus);
+#else
return Wire;
+#endif // USE_I2C_SERIAL
}
#ifdef USE_I2C_BUS2
- else if ((1 == bus) && TasmotaGlobal.i2c_enabled_2) {
+ else if ((1 == bus) && TasmotaGlobal.i2c_enabled[1]) {
#ifdef USE_I2C_BUS2_ESP8266
I2cSetBus(bus);
#endif
+#ifdef USE_I2C_SERIAL
+ return I2CSerialGetWire(Wire1, bus);
+#else
return Wire1;
+#endif // USE_I2C_SERIAL
}
#endif // USE_I2C_BUS2
else {
diff --git a/tasmota/tasmota_support/support_a_spi.ino b/tasmota/tasmota_support/support_a_spi.ino
index 35a3db4b0..b3a7f915b 100644
--- a/tasmota/tasmota_support/support_a_spi.ino
+++ b/tasmota/tasmota_support/support_a_spi.ino
@@ -43,6 +43,7 @@ SPIClass *SpiBegin(uint32 bus) {
/********************************************************************************************/
void AddLogSpi(uint32_t hardware, int clk, int mosi, int miso) {
+#ifndef FIRMWARE_MINIMAL
uint32_t enabled = TasmotaGlobal.soft_spi_enabled;
char hwswbus[8];
if (hardware) {
@@ -72,4 +73,5 @@ void AddLogSpi(uint32_t hardware, int clk, int mosi, int miso) {
hwswbus, clk, mosi, miso);
break;
}
+#endif // FIRMWARE_MINIMAL
}
diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino
index eb460e7fb..2c25cdd28 100644
--- a/tasmota/tasmota_support/support_command.ino
+++ b/tasmota/tasmota_support/support_command.ino
@@ -22,7 +22,7 @@ const char kTasmotaCommands[] PROGMEM = "|" // No prefix
D_SO_WIFINOSLEEP "|"
// Other commands
D_CMND_UPGRADE "|" D_CMND_UPLOAD "|" D_CMND_OTAURL "|" D_CMND_SERIALLOG "|" D_CMND_RESTART "|"
-#ifndef FIRMWARE_MINIMAL_ONLY
+#ifndef FIRMWARE_MINIMAL
D_CMND_BACKLOG "|" D_CMND_DELAY "|" D_CMND_POWER "|" D_CMND_POWERLOCK "|" D_CMND_TIMEDPOWER "|" D_CMND_STATUS "|" D_CMND_STATE "|" D_CMND_SLEEP "|"
D_CMND_POWERONSTATE "|" D_CMND_PULSETIME "|" D_CMND_BLINKTIME "|" D_CMND_BLINKCOUNT "|" D_CMND_STATETEXT "|" D_CMND_SAVEDATA "|"
D_CMND_SO "|" D_CMND_SETOPTION "|" D_CMND_TEMPERATURE_RESOLUTION "|" D_CMND_HUMIDITY_RESOLUTION "|" D_CMND_PRESSURE_RESOLUTION "|" D_CMND_POWER_RESOLUTION "|"
@@ -53,7 +53,7 @@ const char kTasmotaCommands[] PROGMEM = "|" // No prefix
#endif // ESP32 SOC_TOUCH_VERSION_1 or SOC_TOUCH_VERSION_2
D_CMND_CPU_FREQUENCY
#endif // ESP32
-#endif //FIRMWARE_MINIMAL_ONLY
+#endif //FIRMWARE_MINIMAL
;
SO_SYNONYMS(kTasmotaSynonyms,
@@ -62,7 +62,7 @@ SO_SYNONYMS(kTasmotaSynonyms,
void (* const TasmotaCommand[])(void) PROGMEM = {
&CmndUpgrade, &CmndUpgrade, &CmndOtaUrl, &CmndSeriallog, &CmndRestart,
-#ifndef FIRMWARE_MINIMAL_ONLY
+#ifndef FIRMWARE_MINIMAL
&CmndBacklog, &CmndDelay, &CmndPower, &CmndPowerLock, &CmndTimedPower, &CmndStatus, &CmndState, &CmndSleep,
&CmndPowerOnState, &CmndPulsetime, &CmndBlinktime, &CmndBlinkcount, &CmndStateText, &CmndSavedata,
&CmndSetoption, &CmndSetoption, &CmndTemperatureResolution, &CmndHumidityResolution, &CmndPressureResolution, &CmndPowerResolution,
@@ -93,7 +93,7 @@ void (* const TasmotaCommand[])(void) PROGMEM = {
#endif // ESP32 SOC_TOUCH_VERSION_1 or SOC_TOUCH_VERSION_2
&CmndCpuFrequency
#endif // ESP32
-#endif //FIRMWARE_MINIMAL_ONLY
+#endif //FIRMWARE_MINIMAL
};
const char kWifiConfig[] PROGMEM =
@@ -101,7 +101,7 @@ const char kWifiConfig[] PROGMEM =
/********************************************************************************************/
-#ifndef FIRMWARE_MINIMAL_ONLY
+#ifndef FIRMWARE_MINIMAL
void CmndWifiScan(void)
{
if (XdrvMailbox.data_len > 0) {
@@ -249,7 +249,7 @@ void CmndWifiTest(void)
#endif //USE_WEBSERVER
}
-#endif // not defined FIRMWARE_MINIMAL_ONLY
+#endif // not defined FIRMWARE_MINIMAL
void ResponseCmnd(void) {
Response_P(PSTR("{\"%s\":"), XdrvMailbox.command);
@@ -829,9 +829,9 @@ void CmndStatus(void)
if (payload > MAX_STATUS) { return; } // {"Command":"Error"}
if (!Settings->flag.mqtt_enabled && (6 == payload)) { return; } // SetOption3 - Enable MQTT
if (!TasmotaGlobal.energy_driver && (9 == payload)) { return; }
- #ifndef FIRMWARE_MINIMAL
+#ifndef FIRMWARE_MINIMAL
if (!CrashFlag() && (12 == payload)) { return; }
- #endif // FIRMWARE_MINIMAL
+#endif // FIRMWARE_MINIMAL
if (!Settings->flag3.shutter_mode && (13 == payload)) { return; }
char stemp[200];
@@ -1805,7 +1805,7 @@ void CmndGpio(void)
if (ValidGPIO(XdrvMailbox.index, template_gp.io[XdrvMailbox.index]) && (XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < AGPIO(GPIO_SENSOR_END))) {
bool present = false;
for (uint32_t i = 0; i < nitems(kGpioNiceList); i++) {
- uint32_t midx = pgm_read_word(kGpioNiceList + i);
+ uint32_t midx = pgm_read_word(&kGpioNiceList[i]);
uint32_t max_midx = ((midx & 0x001F) > 0) ? midx : midx +1;
if ((XdrvMailbox.payload >= (midx & 0xFFE0)) && (XdrvMailbox.payload < max_midx)) {
present = true;
@@ -1843,7 +1843,7 @@ void CmndGpio(void)
uint32_t sensor_name_idx = BGPIO(sensor_type);
uint32_t nice_list_search = sensor_type & 0xFFE0;
for (uint32_t j = 0; j < nitems(kGpioNiceList); j++) {
- uint32_t nls_idx = pgm_read_word(kGpioNiceList + j);
+ uint32_t nls_idx = pgm_read_word(&kGpioNiceList[j]);
if (((nls_idx & 0xFFE0) == nice_list_search) && ((nls_idx & 0x001F) > 0)) {
snprintf_P(sindex, sizeof(sindex), PSTR("%d"), (sensor_type & 0x001F) +1);
break;
@@ -2752,12 +2752,12 @@ void CmndBatteryPercent(void) {
void CmndI2cScan(void) {
// I2CScan - Scan bus1 then bus2
bool jsflag = false;
- if (TasmotaGlobal.i2c_enabled) {
+ if (TasmotaGlobal.i2c_enabled[0]) {
I2cScan();
jsflag = true;
}
#ifdef USE_I2C_BUS2
- if (TasmotaGlobal.i2c_enabled_2) {
+ if (TasmotaGlobal.i2c_enabled[1]) {
if (jsflag) {
MqttPublishPrefixTopicRulesProcess_P(RESULT_OR_STAT, XdrvMailbox.command);
}
@@ -2882,11 +2882,11 @@ void CmndTouchCal(void) {
if (XdrvMailbox.payload == 0) {
TouchButton.calibration = 0;
}
- else if (XdrvMailbox.payload < MAX_KEYS + 1) {
+ else if (XdrvMailbox.payload < MAX_KEYS) {
TouchButton.calibration = bitSet(TouchButton.calibration, XdrvMailbox.payload);
}
else if (XdrvMailbox.payload == 255) {
- TouchButton.calibration = 0x0FFFFFFF; // All MAX_KEYS pins
+ TouchButton.calibration = 0xFFFFFFFF; // All MAX_KEYS pins
}
}
ResponseCmndNumber(TouchButton.calibration);
diff --git a/tasmota/tasmota_support/support_eeprom.ino b/tasmota/tasmota_support/support_eeprom.ino
index 10828fe16..58678cad7 100644
--- a/tasmota/tasmota_support/support_eeprom.ino
+++ b/tasmota/tasmota_support/support_eeprom.ino
@@ -39,7 +39,7 @@ void eeprom_readBytes(uint32_t addr, uint32_t len, uint8_t *buff) {
}
uint32_t eeprom_init(uint32_t size) {
- if (TasmotaGlobal.i2c_enabled) {
+ if (TasmotaGlobal.i2c_enabled[0]) {
if (I2cActive(EEPROM_ADDRESS) || I2cSetDevice(EEPROM_ADDRESS)) {
// eeprom is present
I2cSetActiveFound(EEPROM_ADDRESS, "24C256");
diff --git a/tasmota/tasmota_support/support_float.ino b/tasmota/tasmota_support/support_float.ino
index ac7527302..c6bfa9787 100644
--- a/tasmota/tasmota_support/support_float.ino
+++ b/tasmota/tasmota_support/support_float.ino
@@ -481,3 +481,7 @@ float Polynomialf(const float *factors, uint32_t degree, float x) {
}
return r;
}
+
+float map_float(float x, float in_min, float in_max, float out_min, float out_max) {
+ return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
+}
diff --git a/tasmota/tasmota_support/support_tasmota.ino b/tasmota/tasmota_support/support_tasmota.ino
index aa57a47af..d8cceedc4 100644
--- a/tasmota/tasmota_support/support_tasmota.ino
+++ b/tasmota/tasmota_support/support_tasmota.ino
@@ -466,7 +466,11 @@ void SetPowerOnState(void)
for (uint32_t i = 0; i < TasmotaGlobal.devices_present; i++) {
#ifdef ESP8266
if (!Settings->flag3.no_power_feedback && // SetOption63 - Don't scan relay power state at restart - #5594 and #5663
- !TasmotaGlobal.power_on_delay) { // SetOption47 - Delay switching relays to reduce power surge at power on
+ !TasmotaGlobal.power_on_delay // SetOption47 - Delay switching relays to reduce power surge at power on
+#ifdef USE_SHUTTER
+ && !Settings->flag3.shutter_mode // SetOption80 - Enable shutter support
+#endif // USE_SHUTTER
+ ) {
if ((port < MAX_RELAYS) && PinUsed(GPIO_REL1, port)) {
if (bitRead(TasmotaGlobal.rel_bistable, port)) {
port++; // Skip both bistable relays as always 0
@@ -1489,12 +1493,11 @@ void Every250mSeconds(void)
Response_P(PSTR("{\"" D_CMND_UPGRADE "\":\""));
if (ota_result) {
ResponseAppend_P(PSTR(D_JSON_SUCCESSFUL ". " D_JSON_RESTARTING));
- TasmotaGlobal.restart_flag = 2;
+ TasmotaGlobal.restart_flag = 5; // Allow time for webserver to update console
} else {
ResponseAppend_P(PSTR(D_JSON_FAILED " %s"), ESPhttpUpdate.getLastErrorString().c_str());
}
ResponseAppend_P(PSTR("\"}"));
-// TasmotaGlobal.restart_flag = 2; // Restart anyway to keep memory clean webserver
MqttPublishPrefixTopicRulesProcess_P(STAT, PSTR(D_CMND_UPGRADE));
AllowInterrupts(1);
}
@@ -1624,7 +1627,7 @@ void Every250mSeconds(void)
if (1 == RtcSettings.ota_loader) {
RtcSettings.ota_loader = 0;
AddLog(LOG_LEVEL_DEBUG, PSTR("OTA: Propagating upload"));
- TasmotaGlobal.ota_state_flag = 3;
+ TasmotaGlobal.ota_state_flag = 6; // Allow time for webserver to update console
}
#endif // FIRMWARE_MINIMAL
@@ -2234,17 +2237,17 @@ void GpioInit(void)
#ifdef USE_I2C
/*
if (PinUsed(GPIO_I2C_SCL) && PinUsed(GPIO_I2C_SDA)) {
- TasmotaGlobal.i2c_enabled = I2cBegin(Pin(GPIO_I2C_SDA), Pin(GPIO_I2C_SCL));
+ TasmotaGlobal.i2c_enabled[0] = I2cBegin(Pin(GPIO_I2C_SDA), Pin(GPIO_I2C_SCL));
#ifdef ESP32
- if (TasmotaGlobal.i2c_enabled) {
+ if (TasmotaGlobal.i2c_enabled[0]) {
AddLog(LOG_LEVEL_INFO, PSTR("I2C: Bus1 using GPIO%02d(SCL) and GPIO%02d(SDA)"), Pin(GPIO_I2C_SCL), Pin(GPIO_I2C_SDA));
}
#endif
}
#ifdef ESP32
if (PinUsed(GPIO_I2C_SCL, 1) && PinUsed(GPIO_I2C_SDA, 1)) {
- TasmotaGlobal.i2c_enabled_2 = I2cBegin(Pin(GPIO_I2C_SDA, 1), Pin(GPIO_I2C_SCL, 1), 1);
- if (TasmotaGlobal.i2c_enabled_2) {
+ TasmotaGlobal.i2c_enabled[1] = I2cBegin(Pin(GPIO_I2C_SDA, 1), Pin(GPIO_I2C_SCL, 1), 1);
+ if (TasmotaGlobal.i2c_enabled[1]) {
AddLog(LOG_LEVEL_INFO, PSTR("I2C: Bus2 using GPIO%02d(SCL) and GPIO%02d(SDA)"), Pin(GPIO_I2C_SCL, 1), Pin(GPIO_I2C_SDA, 1));
}
}
@@ -2258,11 +2261,11 @@ void GpioInit(void)
if (PinUsed(GPIO_I2C_SCL, bus) && PinUsed(GPIO_I2C_SDA, bus)) {
if (I2cBegin(Pin(GPIO_I2C_SDA, bus), Pin(GPIO_I2C_SCL, bus), bus)) {
if (0 == bus) {
- TasmotaGlobal.i2c_enabled = true;
+ TasmotaGlobal.i2c_enabled[0] = true;
}
#ifdef USE_I2C_BUS2
else {
- TasmotaGlobal.i2c_enabled_2 = true;
+ TasmotaGlobal.i2c_enabled[1] = true;
}
AddLog(LOG_LEVEL_INFO, PSTR("I2C: Bus%d using GPIO%02d(SCL) and GPIO%02d(SDA)"), bus +1, Pin(GPIO_I2C_SCL, bus), Pin(GPIO_I2C_SDA, bus));
#endif // USE_I2C_BUS2
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino b/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino
index b9837b786..c3758c86c 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino
@@ -266,10 +266,26 @@ const char HTTP_HEAD_STYLE3[] PROGMEM =
"%s " // Module name
"%s "; // Device name
+const char HTTP_MENU_HEAD[] PROGMEM =
+ "
%s ";
+
+const char HTTP_MSG_SLIDER_SHUTTER[] PROGMEM =
+ ""
+ "%s "
+ " "
+ "
"
+ " ";
+
const char HTTP_MSG_SLIDER_GRADIENT[] PROGMEM =
+ ""
""
" "
- "
";
+ ""
+ " ";
+
+// https://stackoverflow.com/questions/4057236/how-to-add-onload-event-to-a-div-element
+const char HTTP_MSG_EXEC_JAVASCRIPT[] PROGMEM =
+ " ";
@@ -355,23 +371,32 @@ const char HTTP_FORM_UPG[] PROGMEM =
"" D_START_UPGRADE " "
" "
" " D_UPGRADE_BY_FILE_UPLOAD " ";
-const char HTTP_FORM_RST_UPG[] PROGMEM =
+const char HTTP_FORM_RST_UPG[] PROGMEM = // ESP8266 or ESP32 dual partition
""
+ "onclick='"
+ "eb(\"f1\").style.display=\"none\";" // Disable display of form f1
+ "eb(\"f2\").style.display=\"block\";" // Enable display of D_UPLOAD_STARTED
+ "this.form.action+=this.form[\"u2\"].files[0].size;" // Set return file size
+ "this.form.submit();" // Form response
+ "'>%s"
" "
""
"" D_UPLOAD_STARTED "...
";
// upload via factory partition
-const char HTTP_FORM_RST_UPG_FCT[] PROGMEM =
+const char HTTP_FORM_RST_UPG_FCT[] PROGMEM = // ESP32 safeboot partition
""
+ "onclick='"
+ "eb(\"f1\").style.display=\"none\";" // Disable display of form f1
+ "var fs=this.form[\"u2\"].files[0].size;" // Retreive file size of requested file
+ "eb((fs>900000)?\"f3\":\"f2\").style.display=\"block\";" // Enable display of either D_UPLOAD_FACTORY or D_UPLOAD_STARTED based on arbitrary file size of 900k
+ "this.form.action+=fs;" // Set return file size
+ "return upl(this);" // Form response
+ "'>%s"
""
""
"" D_UPLOAD_FACTORY "...
"
@@ -413,7 +438,7 @@ const char HTTP_END[] PROGMEM =
"