mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 13:46:36 +00:00
Update hasp-lvgl.robot
This commit is contained in:
parent
320c4787d1
commit
07293d0d47
2
lib/lvgl
2
lib/lvgl
@ -1 +1 @@
|
|||||||
Subproject commit 3543cc051bdb7b8233ddcc71b3694efcbe562c52
|
Subproject commit 00d32b127f5745bf477e9b3c8ae89f11b0247a5b
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @file lv_theme_hasp.c
|
* @file lv_theme_hasp.cpp
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -11,6 +11,7 @@
|
|||||||
#if LV_USE_THEME_HASP
|
#if LV_USE_THEME_HASP
|
||||||
|
|
||||||
#include "lv_misc/lv_gc.h"
|
#include "lv_misc/lv_gc.h"
|
||||||
|
#include "lv_theme_hasp.h"
|
||||||
|
|
||||||
#if defined(LV_GC_INCLUDE)
|
#if defined(LV_GC_INCLUDE)
|
||||||
#include LV_GC_INCLUDE
|
#include LV_GC_INCLUDE
|
||||||
@ -350,7 +351,7 @@ lv_theme_t * lv_theme_hasp_init(lv_color_t color_primary, lv_color_t color_secon
|
|||||||
LV_GC_ROOT(_lv_theme_template_styles) = lv_mem_alloc(sizeof(theme_styles_t));
|
LV_GC_ROOT(_lv_theme_template_styles) = lv_mem_alloc(sizeof(theme_styles_t));
|
||||||
styles = (theme_styles_t *)LV_GC_ROOT(_lv_theme_template_styles);
|
styles = (theme_styles_t *)LV_GC_ROOT(_lv_theme_template_styles);
|
||||||
#else
|
#else
|
||||||
styles = lv_mem_alloc(sizeof(theme_styles_t));
|
styles = (theme_styles_t*)lv_mem_alloc(sizeof(theme_styles_t));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -9,8 +9,8 @@
|
|||||||
| | ... | ${property}=${property} | ${data}=${data}
|
| | ... | ${property}=${property} | ${data}=${data}
|
||||||
| | ${time} | Get Time | epoch
|
| | ${time} | Get Time | epoch
|
||||||
| | ${client} | Catenate | SEPARATOR=. | robot.mqtt | ${time}
|
| | ${client} | Catenate | SEPARATOR=. | robot.mqtt | ${time}
|
||||||
| | ${topic} | Set Variable | hasp/plate35/command
|
| | ${topic} | Set Variable | hasp/plate37/command
|
||||||
| | ${restopic} | Set Variable | hasp/plate35/state/json
|
| | ${restopic} | Set Variable | hasp/plate37/state/json
|
||||||
| | ${qos} | Set Variable | 1
|
| | ${qos} | Set Variable | 1
|
||||||
| | ${message} | Set Variable | ${property}=${data}
|
| | ${message} | Set Variable | ${property}=${data}
|
||||||
| | ${result} | Set Variable | {"${property}":"${data}"}
|
| | ${result} | Set Variable | {"${property}":"${data}"}
|
||||||
@ -31,8 +31,8 @@
|
|||||||
| | ... | ${property}=${property} | ${data}=${data}
|
| | ... | ${property}=${property} | ${data}=${data}
|
||||||
| | ${time} | Get Time | epoch
|
| | ${time} | Get Time | epoch
|
||||||
| | ${client} | Catenate | SEPARATOR=. | robot.mqtt | ${time}
|
| | ${client} | Catenate | SEPARATOR=. | robot.mqtt | ${time}
|
||||||
| | ${topic} | Set Variable | hasp/plate35/command
|
| | ${topic} | Set Variable | hasp/plate37/command
|
||||||
| | ${restopic} | Set Variable | hasp/plate35/state/page
|
| | ${restopic} | Set Variable | hasp/plate37/state/page
|
||||||
| | ${qos} | Set Variable | 1
|
| | ${qos} | Set Variable | 1
|
||||||
| | ${message} | Set Variable | ${property}=${data}
|
| | ${message} | Set Variable | ${property}=${data}
|
||||||
| | Subscribe Async | client.id=${client} | topic=${restopic}
|
| | Subscribe Async | client.id=${client} | topic=${restopic}
|
||||||
@ -44,12 +44,26 @@
|
|||||||
| | Length Should Be | ${messages} | 1
|
| | Length Should Be | ${messages} | 1
|
||||||
| | Should Be Equal As Strings | ${messages}[0] | ${data}
|
| | Should Be Equal As Strings | ${messages}[0] | ${data}
|
||||||
|
|
||||||
|
| Hasp Command
|
||||||
|
| | [Arguments] | ${broker.uri}=${broker.uri} | ${port}=${broker.port}
|
||||||
|
| | ... | ${client.id}=${client.id} | ${clean_session}=${true}
|
||||||
|
| | ... | ${property}=${property} | ${data}=${data}
|
||||||
|
| | ${time} | Get Time | epoch
|
||||||
|
| | ${client} | Catenate | SEPARATOR=. | robot.mqtt | ${time}
|
||||||
|
| | ${topic} | Set Variable | hasp/plate37/command/${property}
|
||||||
|
| | ${restopic} | Set Variable | hasp/plate37/state/page
|
||||||
|
| | ${qos} | Set Variable | 1
|
||||||
|
| | ${message} | Set Variable | ${data}
|
||||||
|
| | Connect | ${broker.uri} | ${port} | ${client.id} | ${clean_session}
|
||||||
|
| | Publish | ${topic} | ${message} | 1
|
||||||
|
|
||||||
| *Test Cases*
|
| *Test Cases*
|
||||||
|
|
||||||
| Test Color Picker\n
|
| Test Color Picker\n
|
||||||
| | ${obj} | Set Variable | p[1].b[4]
|
| | ${obj} | Set Variable | p[1].b[4]
|
||||||
| | Test Page | property=page | data=1
|
| | Test Page | property=page | data=1
|
||||||
|
| | Hasp Command | property=clearpage | data=1
|
||||||
|
| | Hasp Command | property=jsonl | data={"page":1,"id":4,"objid":20}
|
||||||
#| | Test Property | property=${obj}.txt | data=ABC
|
#| | Test Property | property=${obj}.txt | data=ABC
|
||||||
#| | Test Property | property=${obj}.txt | data=1234
|
#| | Test Property | property=${obj}.txt | data=1234
|
||||||
| | Test Property | property=${obj}.x | data=50
|
| | Test Property | property=${obj}.x | data=50
|
||||||
@ -80,6 +94,8 @@
|
|||||||
| Test Text Field\n
|
| Test Text Field\n
|
||||||
| | ${obj} | Set Variable | p[1].b[1]
|
| | ${obj} | Set Variable | p[1].b[1]
|
||||||
| | Test Page | property=page | data=1
|
| | Test Page | property=page | data=1
|
||||||
|
| | Hasp Command | property=clearpage | data=1
|
||||||
|
| | Hasp Command | property=jsonl | data={"page":1,"id":1,"objid":12}
|
||||||
| | Test Property | property=${obj}.txt | data=ABC
|
| | Test Property | property=${obj}.txt | data=ABC
|
||||||
| | Test Property | property=${obj}.txt | data=123
|
| | Test Property | property=${obj}.txt | data=123
|
||||||
| | Test Property | property=${obj}.x | data=20
|
| | Test Property | property=${obj}.x | data=20
|
||||||
@ -103,8 +119,10 @@
|
|||||||
|
|
||||||
|
|
||||||
| Test Button\n
|
| Test Button\n
|
||||||
| | ${obj} | Set Variable | p[0].b[1]
|
| | ${obj} | Set Variable | p[1].b[1]
|
||||||
| | Test Page | property=page | data=0
|
| | Test Page | property=page | data=1
|
||||||
|
| | Hasp Command | property=clearpage | data=1
|
||||||
|
| | Hasp Command | property=jsonl | data={"page":1,"id":1,"objid":10}
|
||||||
#| | Test Property | property=${obj}.txt | data=ABC
|
#| | Test Property | property=${obj}.txt | data=ABC
|
||||||
#| | Test Property | property=${obj}.txt | data=1234
|
#| | Test Property | property=${obj}.txt | data=1234
|
||||||
| | Test Property | property=${obj}.x | data=20
|
| | Test Property | property=${obj}.x | data=20
|
||||||
@ -133,8 +151,10 @@
|
|||||||
| | Test Property | property=${obj}.val | data=3
|
| | Test Property | property=${obj}.val | data=3
|
||||||
|
|
||||||
| Test Slider\n
|
| Test Slider\n
|
||||||
| | ${obj} | Set Variable | p[1].b[3]
|
| | ${obj} | Set Variable | p[1].b[4]
|
||||||
| | Test Page | property=page | data=1
|
| | Test Page | property=page | data=1
|
||||||
|
| | Hasp Command | property=clearpage | data=1
|
||||||
|
| | Hasp Command | property=jsonl | data={"page":1,"id":4,"objid":30}
|
||||||
#| | Test Property | property=${obj}.txt | data=ABC
|
#| | Test Property | property=${obj}.txt | data=ABC
|
||||||
#| | Test Property | property=${obj}.txt | data=1234
|
#| | Test Property | property=${obj}.txt | data=1234
|
||||||
| | Test Property | property=${obj}.x | data=20
|
| | Test Property | property=${obj}.x | data=20
|
||||||
|
Loading…
x
Reference in New Issue
Block a user