using device ID intead of the canid

This commit is contained in:
2024-04-19 02:42:55 +02:00
parent 7a8b840747
commit 3164b6d8d9

View File

@@ -81,7 +81,7 @@ void DataClbk_cls_light_GlobalTheme(void* msg, uint32_t length) {
void DataClbk_cls_light_ThemeSettings(void* msg, uint32_t length) {
DATA_CLBK_SETUP(cls_light_ThemeSettings);
uint8_t device = msg_cls_light_ThemeSettings.deviceId & 0x1F;
uint8_t device = msg_cls_light_ThemeSettings.deviceId;
uint8_t theme = msg_cls_light_ThemeSettings.theme & 0x3;
uint16_t msg_light_setting = GENERATE_CLS_ADDRESS(CLS_CODE_CONFIG, device, theme);
@@ -101,7 +101,7 @@ void DataClbk_cls_light_ThemeSettings(void* msg, uint32_t length) {
void DataClbk_cls_light_SaveThemeSettings(void* msg, uint32_t length) {
DATA_CLBK_SETUP(cls_light_SaveThemeSettings);
uint8_t device = msg_cls_light_SaveThemeSettings.deviceId & 0x1F;
uint8_t device = msg_cls_light_SaveThemeSettings.deviceId;
uint16_t msg_light_setting = GENERATE_CLS_ADDRESS(CLS_CODE_CONFIG, device, 4);
CLS_BSP_TxHeaderType can_header = CREATE_BSP_CAN_HEADER(msg_light_setting, CLS_BSP_DLC_BYTES_1);
CLS_BSP_CAN_AddMessageToSend(&can_header, (uint8_t*)"X");