16 #ifdef LV_CONF_INCLUDE_SIMPLE 19 #include "../../../lv_conf.h" 25 #if LV_USE_LMETER == 0 26 #error "lv_gauge: lv_lmeter is required. Enable it in lv_conf.h (LV_USE_LMETER 1) " 29 #include "../lv_core/lv_obj.h" 45 lv_lmeter_ext_t lmeter;
48 const lv_color_t * needle_colors;
57 typedef uint8_t lv_gauge_style_t;
81 void lv_gauge_set_needle_count(
lv_obj_t * gauge, uint8_t needle_cnt,
const lv_color_t colors[]);
89 void lv_gauge_set_value(
lv_obj_t * gauge, uint8_t needle_id, int16_t value);
97 static inline void lv_gauge_set_range(
lv_obj_t * gauge, int16_t min, int16_t max)
99 lv_lmeter_set_range(gauge, min, max);
107 static inline void lv_gauge_set_critical_value(
lv_obj_t * gauge, int16_t value)
109 lv_lmeter_set_value(gauge, value);
121 void lv_gauge_set_scale(
lv_obj_t * gauge, uint16_t angle, uint8_t line_cnt, uint8_t label_cnt);
129 static inline void lv_gauge_set_style(
lv_obj_t * gauge, lv_gauge_style_t type,
lv_style_t * style)
145 int16_t lv_gauge_get_value(
const lv_obj_t * gauge, uint8_t needle);
152 uint8_t lv_gauge_get_needle_count(
const lv_obj_t * gauge);
159 static inline int16_t lv_gauge_get_min_value(
const lv_obj_t * lmeter)
161 return lv_lmeter_get_min_value(lmeter);
169 static inline int16_t lv_gauge_get_max_value(
const lv_obj_t * lmeter)
171 return lv_lmeter_get_max_value(lmeter);
179 static inline int16_t lv_gauge_get_critical_value(
const lv_obj_t * gauge)
181 return lv_lmeter_get_value(gauge);
189 uint8_t lv_gauge_get_label_count(
const lv_obj_t * gauge);
196 static inline uint8_t lv_gauge_get_line_count(
const lv_obj_t * gauge)
198 return lv_lmeter_get_line_count(gauge);
206 static inline uint16_t lv_gauge_get_scale_angle(
const lv_obj_t * gauge)
208 return lv_lmeter_get_scale_angle(gauge);
217 static inline const lv_style_t * lv_gauge_get_style(
const lv_obj_t * gauge, lv_gauge_style_t type)
const lv_style_t * lv_obj_get_style(const lv_obj_t *obj)
void lv_obj_set_style(lv_obj_t *obj, const lv_style_t *style)
Definition: lv_style.h:57