Rebuilt climate sliders limits

Solves #1551
Solves #1554
Solves #1561
Solves #1562
This commit is contained in:
Edward Firmo
2024-01-09 14:03:29 +01:00
parent d010cf4b28
commit dc2c777580
26 changed files with 338 additions and 56 deletions

View File

@@ -101,7 +101,7 @@ Text tft_version
Dragging : 0
Send Component ID : on press and release
Associated Keyboard: none
Text : 4.2beta.2
Text : 4.2beta.4
Max. Text Size : 9
Text esph_version

View File

@@ -162,6 +162,31 @@ Variable (int32) temp_number2
Scope: local
Value: 0
Variable (string) temp_unit
Attributes
ID : 50
Scope : local
Text :
Max. Text Size: 10
Variable (int32) temp_low_max
Attributes
ID : 51
Scope: local
Value: 0
Variable (int32) temp_high_min
Attributes
ID : 52
Scope: local
Value: 0
Variable (int32) temp_gap
Attributes
ID : 53
Scope: local
Value: 0
Text current_temp
Attributes
ID : 3
@@ -509,13 +534,20 @@ Slider slider_high
Scope : local
Dragging : 0
Send Component ID: on press and release
Position : 200
Position : 215
Upper range limit: 400
Lower range limit: 0
Events
Touch Press Event
temp_gap.val=3*temp_step.val
temp_high_min.val=slider_low.val+temp_gap.val
Touch Release Event
active_slider.val=1
if(slider_high.val<temp_high_min.val)
{
slider_high.val=temp_high_min.val
}
temp_number1.val=slider_high.val*temp_step.val
temp_number1.val+=temp_offset.val
va0.val=temp_number1.val/10
@@ -523,7 +555,11 @@ Slider slider_high
va0.val=temp_number1.val%10
covx va0.val,va1.txt,0,0
target_high.txt+="."+va1.txt
target_high.txt+=temp_unit.txt
timer1.en=1
active_slider.val=1
temp_gap.val=3*temp_step.val
temp_low_max.val=slider_high.val-temp_gap.val
Slider slider_low
Attributes
@@ -531,21 +567,32 @@ Slider slider_low
Scope : local
Dragging : 0
Send Component ID: on press and release
Position : 200
Position : 185
Upper range limit: 400
Lower range limit: 0
Events
Touch Press Event
temp_gap.val=3*temp_step.val
temp_low_max.val=slider_high.val-temp_gap.val
Touch Release Event
active_slider.val=2
temp_number2.val=slider_high.val*temp_step.val
if(slider_low.val>temp_low_max.val)
{
slider_low.val=temp_low_max.val
}
temp_number2.val=slider_low.val*temp_step.val
temp_number2.val+=temp_offset.val
va0.val=temp_number2.val/10
covx va0.val,target_high.txt,0,0
covx va0.val,target_low.txt,0,0
va0.val=temp_number2.val%10
covx va0.val,va1.txt,0,0
target_high.txt+="."+va1.txt
target_low.txt+="."+va1.txt
target_low.txt+=temp_unit.txt
timer2.en=1
active_slider.val=2
temp_gap.val=3*temp_step.val
temp_high_min.val=slider_low.val+temp_gap.val
Slider climateslider
Attributes