using device ID intead of the canid
This commit is contained in:
@@ -81,7 +81,7 @@ void DataClbk_cls_light_GlobalTheme(void* msg, uint32_t length) {
|
|||||||
|
|
||||||
void DataClbk_cls_light_ThemeSettings(void* msg, uint32_t length) {
|
void DataClbk_cls_light_ThemeSettings(void* msg, uint32_t length) {
|
||||||
DATA_CLBK_SETUP(cls_light_ThemeSettings);
|
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;
|
uint8_t theme = msg_cls_light_ThemeSettings.theme & 0x3;
|
||||||
|
|
||||||
uint16_t msg_light_setting = GENERATE_CLS_ADDRESS(CLS_CODE_CONFIG, device, theme);
|
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) {
|
void DataClbk_cls_light_SaveThemeSettings(void* msg, uint32_t length) {
|
||||||
DATA_CLBK_SETUP(cls_light_SaveThemeSettings);
|
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);
|
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_TxHeaderType can_header = CREATE_BSP_CAN_HEADER(msg_light_setting, CLS_BSP_DLC_BYTES_1);
|
||||||
CLS_BSP_CAN_AddMessageToSend(&can_header, (uint8_t*)"X");
|
CLS_BSP_CAN_AddMessageToSend(&can_header, (uint8_t*)"X");
|
||||||
|
|||||||
Reference in New Issue
Block a user