HASPmota support for led (#20857)

This commit is contained in:
s-hadinger 2024-03-03 18:39:40 +01:00 committed by GitHub
parent 174caf2251
commit 9759cca4f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1012 additions and 839 deletions

View File

@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
### Added
- Berry `path.rename()` (#20840)
- HASPmota support for spangroup (styled text)
- HASPmota support for led
### Breaking Changed
- Drop support for old (insecure) fingerprint format (#20842)

File diff suppressed because it is too large Load Diff

View File

@ -1329,6 +1329,28 @@ class lvh_roller : lvh_obj
end
end
#====================================================================
# led
#====================================================================
class lvh_led : lvh_obj
static _lv_class = lv.led
# `val` is a synonym for `brightness`
def set_val(t)
self._lv_obj.set_brightness(t)
end
def get_val()
return self._lv_obj.get_brightness()
end
def set_color(t)
var v = self.parse_color(t)
self._lv_obj.set_color(v)
end
def get_color()
end
end
#====================================================================
# dropdown
#====================================================================
@ -1826,6 +1848,7 @@ class HASPmota
# static lvh_linemeter = lvh_linemeter
# static lvh_gauge = lvh_gauge
static lvh_textarea = lvh_textarea # additional?
static lvh_led = lvh_led
static lvh_spangroup = lvh_spangroup
static lvh_span = lvh_span
static lvh_qrcode = lvh_qrcode
@ -2300,7 +2323,7 @@ def solidify_haspmota()
"page", "obj", "scr",
"btn", "switch", "checkbox",
"label", "spinner", "line", "img", "roller", "btnmatrix",
"bar", "slider", "arc", "textarea", "dropdown",
"bar", "slider", "arc", "textarea", "led", "dropdown",
"qrcode", "chart", "spangroup", "span",
# new internal names
"button", "image", "buttonmatrix",