Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
Prototype Showcase UI (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnsAnns authored Jun 12, 2024
2 parents 8205c0f + 2228960 commit 4606339
Show file tree
Hide file tree
Showing 11 changed files with 1,164 additions and 1,163 deletions.
2 changes: 1 addition & 1 deletion node/code/RIOT
Submodule RIOT updated 64 files
+1 −1 .github/workflows/check-labels.yml
+9 −0 Makefile.features
+1 −0 boards/b-l072z-lrwan1/Makefile.features
+16 −0 boards/b-l072z-lrwan1/include/periph_conf.h
+1 −1 boards/esp32-ethernet-kit-v1_0/Makefile.features
+1 −1 boards/esp32-olimex-evb/Makefile.features
+1 −2 boards/native/common_features.inc.mk
+0 −2 boards/nucleo-f207zg/Makefile.features
+4 −2 boards/nucleo-f303ze/doc.txt
+0 −2 boards/nucleo-f429zi/Makefile.features
+0 −2 boards/nucleo-f439zi/Makefile.features
+0 −2 boards/nucleo-f767zi/Makefile.features
+0 −2 boards/same54-xpro/Makefile.features
+0 −2 boards/stm32f746g-disco/features-shared.mk
+5 −2 boards/stm32l476g-disco/Makefile.include
+60 −0 boards/stm32l476g-disco/doc.txt
+1 −2 boards/stm32l476g-disco/include/board.h
+20 −2 core/thread.c
+1 −1 cpu/esp32/Makefile.dep
+48 −7 cpu/esp_common/syscalls.c
+1 −1 cpu/native/startup.c
+2 −2 cpu/nrf5x_common/periph/gpio.c
+44 −34 dist/tools/buildsystem_sanity_check/check.sh
+91 −0 dist/tools/buildsystem_sanity_check/get_dockerhub_digests.py
+13,673 −0 doc/doxygen/src/pinouts/nucleo-f303ze.svg
+0 −52 drivers/w5500/Kconfig
+7 −14 drivers/w5500/w5500.c
+1 −2 drivers/ws281x/ws281x_saul.c
+0 −4 features.yaml
+42 −5 makefiles/docker.inc.mk
+0 −1 makefiles/features_existing.inc.mk
+25 −0 pkg/esp32_sdk/patches/0034-components-efuse-fix-incorrect-forward-declaration.patch
+24 −0 pkg/esp32_sdk/patches/0035-components-wpa_supplicant-add-missing-include.patch
+105 −0 pkg/esp32_sdk/patches/0036-components-fix-calls-to-calloc.patch
+2 −2 pkg/wakaama/Kconfig
+25 −0 pkg/wakaama/Makefile.dep
+5 −0 pkg/wakaama/contrib/objects/Kconfig
+62 −0 pkg/wakaama/contrib/objects/Kconfig.ipso
+68 −0 pkg/wakaama/contrib/objects/barometer.c
+68 −0 pkg/wakaama/contrib/objects/current.c
+69 −0 pkg/wakaama/contrib/objects/humidity.c
+70 −0 pkg/wakaama/contrib/objects/illuminance.c
+417 −0 pkg/wakaama/contrib/objects/ipso_sensor_base.c
+71 −0 pkg/wakaama/contrib/objects/temperature.c
+69 −0 pkg/wakaama/contrib/objects/voltage.c
+161 −0 pkg/wakaama/include/objects/barometer.h
+159 −0 pkg/wakaama/include/objects/current.h
+162 −0 pkg/wakaama/include/objects/humidity.h
+158 −0 pkg/wakaama/include/objects/illuminance.h
+202 −0 pkg/wakaama/include/objects/ipso_sensor_base.h
+161 −0 pkg/wakaama/include/objects/temperature.h
+163 −0 pkg/wakaama/include/objects/voltage.h
+1 −1 sys/hashes/sha2xx_common.c
+1 −1 sys/include/random.h
+2 −2 sys/include/xtimer.h
+26 −21 sys/net/application_layer/nanocoap/sock.c
+33 −11 sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.c
+9 −8 sys/net/gnrc/network_layer/ipv6/nib/nib.c
+2 −2 sys/random/shaxprng.c
+1 −0 tests/core/thread_stack_alignment/tests/01-run.py
+0 −2 tests/drivers/w5500/app.config.test
+127 −12 tests/net/gnrc_ipv6_nib/main.c
+25 −11 tests/periph/flashpage/main.c
+1 −1 tests/sys/prng_sha1prng/main.c
Binary file added node/code/flash.uf2
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
#define LV_ATTRIBUTE_MEM_ALIGN
#endif

#ifndef LV_ATTRIBUTE_IMG_background_1
#define LV_ATTRIBUTE_IMG_background_1
#ifndef LV_ATTRIBUTE_IMG_background
#define LV_ATTRIBUTE_IMG_background
#endif

const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_background_1 uint8_t background_1_map[] = {
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_background uint8_t background_map[] = {
#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
/*Pixel format: Red: 3 bit, Green: 3 bit, Blue: 2 bit*/
0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf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xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3, 0xf3,
Expand Down Expand Up @@ -676,12 +676,12 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_backgroun
#endif
};

const lv_img_dsc_t background_1 = {
const lv_img_dsc_t background = {
.header.cf = LV_IMG_CF_TRUE_COLOR,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 320,
.header.h = 160,
.data_size = 51200 * LV_COLOR_SIZE / 8,
.data = background_1_map,
.data = background_map,
};
256 changes: 128 additions & 128 deletions node/code/modules/display_handler/feed.c

Large diffs are not rendered by default.

Empty file.

Large diffs are not rendered by default.

240 changes: 120 additions & 120 deletions node/code/modules/display_handler/info.c

Large diffs are not rendered by default.

123 changes: 62 additions & 61 deletions node/code/modules/display_handler/init_lvgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,57 +170,7 @@ static uint32_t keypad_get_key(void)
return 0;
}

void enter_pressed(void){
buttons[0].state = true;
}

void enter_released(void){
buttons[0].state = false;
}

void up_pressed(void){
buttons[1].state = true;
}

void up_released(void){
buttons[1].state = false;
}

void down_pressed(void){
buttons[2].state = true;
}

void down_released(void){
buttons[2].state = false;
}

void left_pressed(void){
buttons[3].state = true;
}

void left_released(void){
buttons[3].state = false;
}

void right_pressed(void){
buttons[4].state = true;
}

void right_released(void){
buttons[4].state = false;
}

static void timer_cb(lv_timer_t *param){
(void) param;
lvgl_wakeup();
}

static void timer_deactivate(void){
lv_timer_del(wakeup_task);
}

void init_default_screen(void){

void init_default_screen(char* top_bar_text){
lv_obj_clean(lv_scr_act());
static lv_style_t style_base;
lv_style_init(&style_base);
Expand Down Expand Up @@ -248,7 +198,7 @@ void init_default_screen(void){

// // Add a label to the top bar
lv_obj_t * pet_label = lv_label_create(top_bar);
lv_label_set_text(pet_label, "Kevin the Frog | Lvl 2 | 89/100 | Disconnected");
lv_label_set_text(pet_label, top_bar_text);
lv_obj_set_style_text_color(pet_label, lv_color_hex(0xFFFFFF), LV_PART_MAIN);

// /* Style for center */
Expand All @@ -266,8 +216,8 @@ void init_default_screen(void){
lv_obj_clear_flag(center,LV_OBJ_FLAG_SCROLLABLE);

/* Background of the room*/
LV_IMG_DECLARE(background_1);
lv_obj_set_style_bg_img_src(center, &background_1,LV_PART_MAIN);
LV_IMG_DECLARE(background);
lv_obj_set_style_bg_img_src(center, &background,LV_PART_MAIN);

/* Style of the bottom bar*/
static lv_style_t style_bottom_bar;
Expand All @@ -288,6 +238,61 @@ void init_default_screen(void){

}

void enter_pressed(void){
buttons[0].state = true;
}

void enter_released(void){
buttons[0].state = false;
}

void up_pressed(void){
init_default_screen("Kevin the Frog | Lvl 2 | 89/100 | Disconnected");
init_menu();
init_registered_pet();
buttons[1].state = true;
}

void up_released(void){
buttons[1].state = false;
}

void down_pressed(void){
init_default_screen("Registering ...");
init_menu();
init_not_registered();
buttons[2].state = true;
}

void down_released(void){
buttons[2].state = false;
}

void left_pressed(void){
buttons[3].state = true;
}

void left_released(void){
buttons[3].state = false;
}

void right_pressed(void){
buttons[4].state = true;
}

void right_released(void){
buttons[4].state = false;
}

static void timer_cb(lv_timer_t *param){
(void) param;
lvgl_wakeup();
}

static void timer_deactivate(void){
lv_timer_del(wakeup_task);
}

void init_not_registered(void){

// /* Style of the align bar*/
Expand Down Expand Up @@ -373,9 +378,9 @@ void init_registered_pet(void){
lv_obj_align(align, LV_ALIGN_CENTER,0,0);

/* Pet*/
LV_IMG_DECLARE(forg);
LV_IMG_DECLARE(frog);
lv_obj_t * pet = lv_img_create(align);
lv_img_set_src(pet, &forg);
lv_img_set_src(pet, &frog);
lv_obj_align(pet, LV_ALIGN_CENTER, 0, 0);
}

Expand Down Expand Up @@ -478,11 +483,7 @@ int init_lvgl(void)
indev = lv_indev_drv_register(&drv);

lv_indev_set_group(indev,group1);


init_default_screen();
//init_not_registered();
init_registered_pet();
init_default_screen("Initializing ...");
init_menu();
return 0;
}
Loading

0 comments on commit 4606339

Please sign in to comment.