diff --git a/node/code/Makefile b/node/code/Makefile index 607fb1c7..6bad77bc 100644 --- a/node/code/Makefile +++ b/node/code/Makefile @@ -19,7 +19,7 @@ FEATURES_REQUIRED += libstdcpp # Internal Modules # Teamagotchi MODULES #USEMODULE += lwm2m_handler -USEMODULE += io_handler +#USEMODULE += io_handler USEMODULE += display_handler USEMODULE += lwm2m_handler EXTERNAL_MODULE_DIRS += modules @@ -51,17 +51,12 @@ CXXEXFLAGS += -std=c++20 -Wall -Wextra # reverted in C++23 because it wasn't thought through CXXEXFLAGS += -Wno-volatile -#include $(CURDIR)/modules/lwm2m/Makefile.include -include $(RIOTBASE)/Makefile.include - - BOARD_BLACKLIST += native64 ## DEBUG CFLAGS += -DDEBUG_ASSERT_VERBOSE ##### LWM2M ##### -#SERVER_URI = '"coap://[2001:db8:1::1]:5684"' LWM2M_SERVER_SHORT_ID ?= 1 CFLAGS += -DEVENT_THREAD_MEDIUM_STACKSIZE='(3*1024)' # Uncomment to enable Wakaama debug log @@ -76,24 +71,14 @@ ifndef CONFIG_LWM2M_SERVER_URI CFLAGS += -DCONFIG_DTLS_PEER_MAX=2 CFLAGS += -DCONFIG_MAX_BUF=1024 # Uncomment to enable Wakaama debug log - CFLAGS += -DCONFIG_LWM2M_WITH_LOGS=1 + endif ##### /LWM2M ##### -BOARD_BLACKLIST += native64 - include $(RIOTBASE)/Makefile.include -CFLAGS += -DDEBUG_ASSERT_VERBOSE -# Configure server via CFLAGS only if not done via Kconfig -ifndef CONFIG_LWM2M_SERVER_URI - CFLAGS += -DCONFIG_LWM2M_SERVER_URI=$(SERVER_URI) -endif - - - CFLAGS += -DDISPLAY_STACKSIZE=2*1024 # SDL requires more stack diff --git a/node/code/inc/EVENTS.hpp b/node/code/inc/EVENTS.hpp index 70d8bea5..d40d2fee 100644 --- a/node/code/inc/EVENTS.hpp +++ b/node/code/inc/EVENTS.hpp @@ -19,14 +19,10 @@ extern "C" enum EVENTS: uint16_t { BUTTON_RIGHT_RELEASED, PET_FEED, PET_PLAY, - PET_WASH, + PET_CLEAN, PET_MEDICATE, PET_HUNGRY, PET_ILL, PET_BORED, PET_DIRTY, - PET_FEED, - PET_MEDICATE, - PET_PLAY, - PET_CLEAN, }; diff --git a/node/code/main.cpp b/node/code/main.cpp index 7f76d783..4fd73677 100644 --- a/node/code/main.cpp +++ b/node/code/main.cpp @@ -17,6 +17,7 @@ // Example Module Import //#include "external_module.h" //LWM2M Handler Import +#include "display_handler.hpp" #include "lwm2m_handler.hpp" //#include "test_folder/test_hello.h" diff --git a/node/code/modules/display_handler/init_lvgl.c b/node/code/modules/display_handler/init_lvgl.c index 8b87cd9a..075268ac 100644 --- a/node/code/modules/display_handler/init_lvgl.c +++ b/node/code/modules/display_handler/init_lvgl.c @@ -48,7 +48,7 @@ kernel_pid_t dispatcher_pid_lvgl; uint16_t PET_FEED = 14; uint16_t PET_PLAY = 15; -uint16_t PET_WASH = 16; +uint16_t PET_CLEAN = 16; uint16_t PET_MEDICATE = 17; lv_obj_t * roller1; @@ -128,7 +128,7 @@ static void menu_cb(lv_event_t * e){ }else if (key == LV_KEY_ENTER && (img_index_pairs[current_img_index].event == PET_FEED || img_index_pairs[current_img_index].event == PET_PLAY || img_index_pairs[current_img_index].event == PET_MEDICATE || - img_index_pairs[current_img_index].event == PET_WASH)){ + img_index_pairs[current_img_index].event == PET_CLEAN)){ msg_t message; message.type = img_index_pairs[current_img_index].event ; msg_try_send(&message, dispatcher_pid_lvgl); @@ -423,7 +423,7 @@ void init_menu(void){ img_index_pairs[1].event = PET_PLAY; img_index_pairs[2].img = wash_ico; img_index_pairs[2].index = 2; - img_index_pairs[2].event = PET_WASH; + img_index_pairs[2].event = PET_CLEAN; img_index_pairs[3].img = medicate_ico; img_index_pairs[3].index = 3; img_index_pairs[3].event = PET_MEDICATE;