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

Commit

Permalink
fixed compiling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
moritzholzer committed May 30, 2024
1 parent dff93fd commit 62b4561
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 25 deletions.
19 changes: 2 additions & 17 deletions node/code/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 1 addition & 5 deletions node/code/inc/EVENTS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
1 change: 1 addition & 0 deletions node/code/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions node/code/modules/display_handler/init_lvgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 62b4561

Please sign in to comment.