23 lines
501 B
C++
23 lines
501 B
C++
#pragma once
|
|
|
|
#include "Widget.hpp"
|
|
|
|
class ArcWidget : public Widget {
|
|
public:
|
|
explicit ArcWidget(const WidgetConfig& config);
|
|
|
|
lv_obj_t* create(lv_obj_t* parent) override;
|
|
void applyStyle() override;
|
|
|
|
void onKnxValue(float value) override;
|
|
void onKnxSwitch(bool value) override;
|
|
|
|
private:
|
|
void updateValueLabel(float value);
|
|
static const char* unitSuffix(uint8_t unit);
|
|
|
|
lv_obj_t* scale_ = nullptr;
|
|
lv_obj_t* valueLabel_ = nullptr;
|
|
float lastValue_ = 0.0f;
|
|
};
|