Removed hasp_attr_get

This commit is contained in:
fvanroie 2020-04-08 13:51:47 +02:00
parent ea8d55a0a7
commit 51ac9a90ee
2 changed files with 4 additions and 22 deletions

View File

@ -3,14 +3,13 @@
#include "lvgl.h" #include "lvgl.h"
#include "hasp.h" #include "hasp.h"
#include "hasp_attr_get.h" //#include "hasp_attr_get.h"
#define LVGL7 1 #define LVGL7 1
bool haspGetObjAttribute(lv_obj_t * obj, String strAttr, std::string & strPayload) bool haspGetObjAttribute(lv_obj_t * obj, String strAttr, std::string & strPayload)
{ {
if(!obj) return false; if(!obj) return false;
uint16_t val = 0;
switch(strAttr.length()) { switch(strAttr.length()) {
case 4: case 4:
@ -36,7 +35,8 @@ bool haspGetObjAttribute(lv_obj_t * obj, String strAttr, std::string & strPayloa
if(check_obj_type(list.type[0], LV_HASP_BAR)) strPayload = String(lv_bar_get_value(obj)).c_str(); if(check_obj_type(list.type[0], LV_HASP_BAR)) strPayload = String(lv_bar_get_value(obj)).c_str();
if(check_obj_type(list.type[0], LV_HASP_LMETER)) if(check_obj_type(list.type[0], LV_HASP_LMETER))
strPayload = String(lv_linemeter_get_value(obj)).c_str(); strPayload = String(lv_linemeter_get_value(obj)).c_str();
if(check_obj_type(list.type[0], LV_HASP_CPICKER)) strPayload = String(get_cpicker_value(obj)).c_str(); // if(check_obj_type(list.type[0], LV_HASP_CPICKER)) strPayload =
// String(lv_cpicker_get_color(obj)).c_str();
if(check_obj_type(list.type[0], LV_HASP_CHECKBOX)) if(check_obj_type(list.type[0], LV_HASP_CHECKBOX))
strPayload = String(!lv_checkbox_is_checked(obj) ? 0 : 1).c_str(); strPayload = String(!lv_checkbox_is_checked(obj) ? 0 : 1).c_str();
if(check_obj_type(list.type[0], LV_HASP_DDLIST)) if(check_obj_type(list.type[0], LV_HASP_DDLIST))

View File

@ -1,18 +0,0 @@
#ifndef HASP_ATTR_GET_H
#define HASP_ATTR_GET_H
#include "Arduino.h"
#include "lvgl.h"
#ifdef __cplusplus
extern "C" {
#endif
bool haspGetObjAttribute(lv_obj_t * obj, String strAttr, std::string & strPayload);
uint32_t get_cpicker_value(lv_obj_t * obj);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif