wirepas / wm-sdk

SDK to develop applications on the MCU running Wirepas Stack
Other
44 stars 33 forks source link

POSLIB_FLAG_EVENT overflow in callback event_id #50

Open sforconi opened 2 years ago

sforconi commented 2 years ago

In file poslib.h: the event: POSLIB_FLAG_EVENT_LED_OFF is defined as POSLIB_FLAG_EVENT_LED_OFF = 256, but in the callback function: poslib_events_listen_info_f, called at line 228 in poslib_event.c, the callback argument structure POSLIB_FLAG_EVENT_info_t, has the event_id field defined as uint8_t, thus the value 256 will be trucated to 0, remapping onto POSLIB_FLAG_EVENT_NONE.