various tweaks and improvements

This commit is contained in:
Joren de Graaf
2026-10-09 20:48:39 +02:00
parent 2b0bbdd201
commit 9ec360d736
5 changed files with 60 additions and 16 deletions
+15 -11
View File
@@ -10,10 +10,10 @@ BoomDisplay boomDisplay;
BoomDisplay* BoomDisplay::instance_ = nullptr;
static lv_point_t fireworkRays[8][2] = {
{{30, 28}, {30, 2}}, {{30, 32}, {30, 58}},
{{28, 30}, {2, 30}}, {{32, 30}, {58, 30}},
{{28, 28}, {8, 8}}, {{32, 32}, {52, 52}},
{{32, 28}, {52, 8}}, {{28, 32}, {8, 52}}
{{23, 21}, {23, 2}}, {{23, 25}, {23, 44}},
{{21, 23}, {2, 23}}, {{25, 23}, {44, 23}},
{{21, 21}, {7, 7}}, {{25, 25}, {39, 39}},
{{25, 21}, {39, 7}}, {{21, 25}, {7, 39}}
};
static void stylePlainScreen(lv_obj_t* screen) {
@@ -202,8 +202,8 @@ lv_obj_t* BoomDisplay::makeStatusChip(lv_obj_t* parent, int x, const char* initi
void BoomDisplay::createFireworkMark(lv_obj_t* parent) {
lv_obj_t* mark = lv_obj_create(parent);
lv_obj_set_size(mark, 60, 60);
lv_obj_set_pos(mark, 70, 40);
lv_obj_set_size(mark, 46, 46);
lv_obj_set_pos(mark, 77, 31);
lv_obj_set_style_bg_opa(mark, LV_OPA_TRANSP, 0);
lv_obj_set_style_border_width(mark, 0, 0);
lv_obj_set_style_pad_all(mark, 0, 0);
@@ -217,7 +217,7 @@ void BoomDisplay::createFireworkMark(lv_obj_t* parent) {
}
lv_obj_t* centre = lv_obj_create(mark);
lv_obj_set_size(centre, 8, 8);
lv_obj_set_pos(centre, 26, 26);
lv_obj_set_pos(centre, 19, 19);
lv_obj_set_style_radius(centre, LV_RADIUS_CIRCLE, 0);
lv_obj_set_style_bg_color(centre, lv_color_black(), 0);
lv_obj_set_style_border_width(centre, 0, 0);
@@ -237,21 +237,25 @@ void BoomDisplay::createScreens() {
lv_label_set_text(title, "Vuurwerkdetector");
lv_obj_set_width(title, 190);
lv_obj_set_style_text_align(title, LV_TEXT_ALIGN_CENTER, 0);
lv_obj_align(title, LV_ALIGN_TOP_MID, 0, 102);
lv_obj_align(title, LV_ALIGN_TOP_MID, 0, 81);
lv_obj_t* message = lv_label_create(publicScreen_);
lv_label_set_text(message, "Luistert naar knallen,\nniet naar gesprekken.\nGeen continue opname.");
lv_obj_set_width(message, 190);
lv_obj_set_style_text_align(message, LV_TEXT_ALIGN_CENTER, 0);
lv_obj_align(message, LV_ALIGN_TOP_MID, 0, 122);
lv_obj_align(message, LV_ALIGN_TOP_MID, 0, 101);
publicCount_ = lv_label_create(publicScreen_);
lv_label_set_text(publicCount_, "Vandaag: 0");
lv_obj_align(publicCount_, LV_ALIGN_BOTTOM_LEFT, 8, -6);
lv_obj_set_width(publicCount_, 190);
lv_obj_set_style_text_align(publicCount_, LV_TEXT_ALIGN_CENTER, 0);
lv_obj_align(publicCount_, LV_ALIGN_BOTTOM_MID, 0, -27);
publicCapture_ = lv_label_create(publicScreen_);
lv_label_set_text(publicCapture_, "BOOT: details");
lv_obj_align(publicCapture_, LV_ALIGN_BOTTOM_RIGHT, -8, -6);
lv_obj_set_width(publicCapture_, 190);
lv_obj_set_style_text_align(publicCapture_, LV_TEXT_ALIGN_CENTER, 0);
lv_obj_align(publicCapture_, LV_ALIGN_BOTTOM_MID, 0, -5);
// ---------------------------------------------------------------------------
// Screen 2: owner / technical status