HASwitchPlate / openHASP

HomeAutomation Switchplate based on lvgl for ESP32
https://www.openhasp.com
MIT License
719 stars 184 forks source link

Reorder object IDs and implementation status #38

Closed fvanroie closed 2 years ago

fvanroie commented 3 years ago

The object IDs currently are arbitrary and it would help to make better sense to group them according to their purpose. Here is a proposal to use the object name as obj parameter instead of objid. The current objid still works, but will be obsoleted in the future.

Controls objid obj implemented note
OBJECT 91 obj :heavy_check_mark:
BUTTON 10 btn :heavy_check_mark:
BTNMATRIX 13 btnmatrix :heavy_check_mark: add txt to return value
IMGBTN 14 imgbtn :x:
CHECKBOX 11 cb :heavy_check_mark:
SWITCH 40 switch :heavy_check_mark:
SLIDER 30 slider :heavy_check_mark:
TEXTAREA 16 textarea :clock9:
SPINBOX 17 spinbox :x:
CPICKER 20 cpicker :heavy_check_mark:
Visualizers
id obj implemented note
LABEL 12 label :heavy_check_mark:
GAUGE 31 gauge :heavy_check_mark: add more needles
BAR 32 bar :heavy_check_mark:
LMETER 33 lmeter :heavy_check_mark:
LED 41 led :heavy_check_mark:
ARC 22 arc :heavy_check_mark:
PRELOADER 21 spinner :heavy_check_mark:
CHART 37 chart :clock9:
Selectors
id obj implemented note
DDLIST 50 dropdown :heavy_check_mark:
ROLLER 51 roller :heavy_check_mark:
LIST 52 list :clock9:
TABLE 53 table :clock9:
CALENDER 54 calendar :heavy_check_mark:
Containers
id obj implemented note
CONTAINER 60 cont :o: Obsolete in v8
WINDOW 61 win :x:
MSGBOX 62 msgbox :clock9:
TILEVIEW 63 tileview :x: Simplified in v8
TABVIEW 64 tabview :heavy_check_mark:
TAB 65 tab :heavy_check_mark:
PAGE 69 page :o: Obsolete in v8
Graphics
id obj implemented note
LINE 70 line :heavy_check_mark:
IMAGE 71 img :heavy_check_mark:
CANVAS 72 canvas :x:
MASK 73 objmask :o: Obsolete in v8
fvanroie commented 3 years ago

The change from objid to obj has been implemented, with objid being obsoleted, but still working. The docs have been updated with the new object names which follow the lvgl naming of widgets.

arovak commented 3 years ago

Looks good, will make managing objects easier for users.

fvanroie commented 3 years ago

.txt is inconsistent with the rest of the lvgl properties, a .text property would be suited better and in line with the other attributes. Both can exist while .txt is phased out...

fvanroie commented 3 years ago

Attribute text has been added to replace txt, which is now obsoleted...

fvanroie commented 3 years ago

Using objid or txt properties now results in an obsolete warning in the logs as a last step to removing them altogether.

nagyrobi commented 3 years ago

+1 for spinbox. Especially with regard to supporting decimal values (as text).