tc link switches in website are now automaticalle optical changes in relation to tc_enabled state.

This commit is contained in:
Kai Lauterbach 2023-04-30 10:48:32 +02:00
parent eb33c94bf2
commit e0310f8c40
2 changed files with 7 additions and 3 deletions

View file

@ -661,7 +661,9 @@ void init_webserver()
"xhr.open('GET', 'http://192.168.0.26/?tc=true', true);" "xhr.open('GET', 'http://192.168.0.26/?tc=true', true);"
// Sende die Anfrage im Hintergrund // Sende die Anfrage im Hintergrund
"xhr.send();" "xhr.send();"
"console.log('tc=true call')" "console.log('tc=true call');"
"document.getElementById('tc_on').classList.add('pure-button-primary');"
"document.getElementById('tc_off').classList.remove('pure-button-primary');"
"});" "});"
"});" "});"
// Suche nach allen tc Links auf der Seite mit IDs tc_off // Suche nach allen tc Links auf der Seite mit IDs tc_off
@ -676,7 +678,9 @@ void init_webserver()
"xhr.open('GET', 'http://192.168.0.26/?tc=false', true);" "xhr.open('GET', 'http://192.168.0.26/?tc=false', true);"
// Sende die Anfrage im Hintergrund // Sende die Anfrage im Hintergrund
"xhr.send();" "xhr.send();"
"console.log('tc=false call')" "console.log('tc=false call');"
"document.getElementById('tc_off').classList.add('pure-button-primary');"
"document.getElementById('tc_on').classList.remove('pure-button-primary');"
"});" "});"
"});" "});"
"</script>"; "</script>";

View file

@ -43,7 +43,7 @@ uint8_t example_timer_data_block[] = {
// hour min ch1 ch2 ch3 ch3 // hour min ch1 ch2 ch3 ch3
8, 0, 0, 0, 0, 0, // 0: off 8, 0, 0, 0, 0, 0, // 0: off
8, 30, 25, 0, 0, 0, // 1: 10% ch1 blues 8, 30, 25, 0, 0, 0, // 1: 10% ch1 blues
9, 0, 25, 0, 25, 0, // 2: 10% all blues 11, 0, 25, 0, 25, 0, // 2: 10% all blues
13, 0, 205, 205, 205, 205, // 3: 80% all 13, 0, 205, 205, 205, 205, // 3: 80% all
18, 0, 205, 205, 205, 205, // 4: 80% all for 5 hours 18, 0, 205, 205, 205, 205, // 4: 80% all for 5 hours
19, 0, 50, 50, 50, 50, // 5: 20% all 19, 0, 50, 50, 50, 50, // 5: 20% all