Compare commits

...

5 Commits

Author SHA1 Message Date
fb-pilot cad766d14d
Merge branch 'arendst:development' into development 2024-04-27 20:43:34 +02:00
s-hadinger 5cc5e5ef45
HASPmota demo of Renaissance Watch for 480x480 displays (#21290)
* HASPmota demo of Renaissance Watch for 480x480 displays

* Put arrow in front of date
2024-04-27 19:05:24 +02:00
Jason2866 71c8748def
Revert "Platform 2024.04.13 (#21264)" (#21288)
This reverts commit 492c6bbda2.
2024-04-27 18:56:11 +02:00
s-hadinger bf01e5bb70
Fix async HMDI CEC (#21287) 2024-04-27 18:22:50 +02:00
sfromis 311a9f18e6
Wrong feature bit for USE_SPL06_007 (#21286)
Obvious "typo" in setting the feature bit for this recently added sensor. Already mentioned in https://github.com/arendst/Tasmota/pull/21185#issuecomment-2071122611
2024-04-27 16:30:57 +02:00
12 changed files with 121 additions and 5 deletions

View File

@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
- esp32_partition_app3904k_fs3392k partition scheme for 8MB ESP32S3
- TCP Tx En GPIO type
- Berry `webserver.content_close()`
- HASPmota demo of Renaissance Watch for 480x480 displays
### Breaking Changed
- ESP32-C3 OTA binary name from `tasmota32c3cdc.bin` to `tasmota32c3.bin` with USB HWCDC and fallback to serial (#21212)

View File

@ -77,7 +77,7 @@ lib_ignore = ${esp32_defaults.lib_ignore}
ccronexpr
[core32]
platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.04.13/platform-espressif32.zip
platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.04.12/platform-espressif32.zip
platform_packages =
build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${esp32_defaults.build_flags}

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

View File

@ -0,0 +1,73 @@
# This is a simple demo of displaying Renaissance Watch adapted for 480x480 displays
#
# Just install `haspmota_watch_480.tapp` in the filesystem
#
# Generate with
# rm haspmota_watch_480.tapp ; zip -j -0 haspmota_watch_480.tapp ../haspmota_src/haspmota_watch_480/*
# Test if display is at least 480x480
lv.start()
hres = lv.get_hor_res() # should be 320
vres = lv.get_ver_res() # should be 240
if lv.get_hor_res() < 480 || lv.get_ver_res() < 480
print("Renaissance Watch 480 demo requires a screen at least 480x480")
return
end
import haspmota
haspmota.start(false, tasmota.wd + "pages.jsonl")
var prev_day = -1
def set_watch()
import global
var now = tasmota.rtc()
var time_raw = now['local']
var time = tasmota.time_dump(time_raw)
# set second
if global.contains("p23b13")
global.p23b13.angle = 60 * time['sec']
end
# set minutes
global.p100b12.angle = 60 * time['min'] + (time['sec'] / 10) * 10
# set hours
global.p100b11.angle = 300 * (time['hour'] % 12) + time['min'] * 5
# set day
if time['day'] != prev_day
global.p100b15.text = str(time['day'])
prev_day = time['day']
end
end
def run_watch()
set_watch()
tasmota.set_timer(1000, run_watch)
end
run_watch()
def watch_in()
import global
global.p0b90.hidden = true
global.p0b101.bg_opa = 0
global.p0b101.border_opa = 0
global.p0b102.bg_opa = 0
global.p0b102.border_opa = 0
global.p0b102.text_opa = 0
global.p0b103.bg_opa = 0
global.p0b103.border_opa = 0
end
def watch_out()
import global
global.p0b90.hidden = false
global.p0b101.bg_opa = 255
global.p0b101.border_opa = 255
global.p0b102.bg_opa = 255
global.p0b102.border_opa = 255
global.p0b102.text_opa = 255
global.p0b103.bg_opa = 255
global.p0b103.border_opa = 255
end
tasmota.add_rule("hasp#p100=in", watch_in)
tasmota.add_rule("hasp#p100=out", watch_out)

View File

@ -0,0 +1,29 @@
{"page":0,"comment":"---------- Upper stat line ----------"}
{"id":0,"text_color":"#FFFF44"}
{"id":90,"obj":"flex","x":0,"y":0,"w%":100,"h":24,"bg_color":"#4f4f4f","bg_opa":255,"radius":0,"border_side":1,"border_width":1,"border_color":"#FFFF44","text_color":"#FFFF44"}
{"id":91,"obj":"label","parentid":90,"x":0,"y":0,"w":100,"h%":100,"long_mode":3,"text":"Tasmota","flex_grow":1}
{"id":92,"obj":"fixed","parentid":90,"w":102,"text_color":"#FFFF44"}
{"id":95,"parentid":92,"comment":"-- Clock --","obj":"lv_clock","x":0,"y":3,"w":55,"h":16,"radius":0,"border_side":0}
{"id":96,"parentid":92,"comment":"-- Battery indicator --","obj":"label","x":57,"y":0,"w":20,"h":20,"text":"\uE6A5","align":0,"text_font":"icons-18"}
{"id":97,"parentid":92,"comment":"-- Wifi indicator --","obj":"lv_wifi_arcs","x":73,"y":0,"w":29,"h":20,"radius":0,"border_side":0,"bg_color":"#000000","line_color":"#FFFF44"}
{"comment":"---------- Bottom buttons - prev/home/next ----------"}
{"id":100,"obj":"flex","x":0,"y%":84,"h%":16,"w%":100,"flex_main_place":3}
{"id":101,"obj":"btn","parentid":100,"w%":25,"h%":100,"action":"prev","bg_color":"#4f4f4f","text_color":"#FFFF44","radius":10,"text":"\uF053","text_font":"montserrat-20","border_width":3,"border_side":15,"border_color":"#FFFF44","border_opa":210}
{"id":102,"obj":"btn","parentid":100,"w%":25,"h%":100,"action":"back","bg_color":"#4f4f4f","text_color":"#FFFF44","radius":10,"text":"\uF015","text_font":"montserrat-20","border_width":3,"border_side":15,"border_color":"#FFFF44","border_opa":210}
{"id":103,"obj":"btn","parentid":100,"w%":25,"h%":100,"action":"next","bg_color":"#4f4f4f","text_color":"#FFFF44","radius":10,"text":"\uF054","text_font":"montserrat-20","border_width":3,"border_side":15,"border_color":"#FFFF44","border_opa":210}
{"page":1,"comment":"---------- Page 1 Obj ----------"}
{"id":0,"bg_color":"#000000","text_color":"#FFFFFF"}
{"id":10,"obj":"label","x":0,"y":30,"w%":100,"h":24,"text":"Demo of Renaissance watch 480x480","text_font":"montserrat-20"}
{"page":100,"comment":"---------- Page 100 Renaissance Watch ----------"}
{"id":0,"bg_color":"#000000","bg_grad_color":"#000000","bg_grad_dir":1,"text_color":"#000000"}
{"id":10,"obj":"img","src":"A:haspmota_watch_480.tapp#/ren_back_480.png","x":0,"y":0,"w":480,"h":480}
{"id":15,"obj":"label","parentid":10,"x":367,"y":225,"w":36,"h":36,"text":"29","align":"right","text_font":"montserrat-28"}
{"id":11,"obj":"img","parentid":10,"src":"A:/haspmota_watch_480.tapp#ren_hour_480.png","x":218,"y":94,"angle":-550}
{"id":12,"obj":"img","parentid":10,"src":"A:/haspmota_watch_480.tapp#ren_min_480.png","angle":500}
{"id":13,"obj":"img","parentid":10,"src":"A:/haspmota_watch_480.tapp#ren_sec_480.png","x":220,"y":20,"angle":1400,"hidden":true}

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

@ -917,9 +917,8 @@ constexpr uint32_t feature[] = {
0x00000010 | // xdrv_73_9_lora.ino
#endif
#if defined(USE_I2C) && defined(USE_SPL06_007)
0x10000000 | // xsns_25_spl006-7_sensor.ino
0x00000020 | // xsns_25_spl006-7_sensor.ino
#endif
// 0x00000020 | //
// 0x00000040 | //
// 0x00000080 | //
// 0x00000100 | //

View File

@ -116,7 +116,14 @@ void CmndHDMISendRaw(void) {
if (buf.len() > 0 && buf.len() < 16) {
bool success = HDMI_CEC_device->transmitRaw(buf.buf(), buf.len());
if (success) {
HDMI_CEC_device->run();
bool transmitting = true;
while (transmitting) {
HDMI_CEC_device->run();
transmitting = HDMI_CEC_device->isTransmitting();
if (transmitting) {
delay(1); // wait until next ms
}
}
ResponseCmndDone();
} else {
ResponseCmndChar_P(PSTR("Sending failed"));
@ -166,7 +173,14 @@ void CmndHDMISend(void) {
if (buf.len() > 0 && buf.len() < 15) {
bool success = HDMI_CEC_device->transmitFrame(to, buf.buf(), buf.len());
if (success) {
HDMI_CEC_device->run();
bool transmitting = true;
while (transmitting) {
HDMI_CEC_device->run();
transmitting = HDMI_CEC_device->isTransmitting();
if (transmitting) {
delay(1); // wait until next ms
}
}
ResponseCmndDone();
} else {
ResponseCmndChar_P(PSTR("Sending failed"));