Fix _SendDeviceGroupMessage signedness

This commit is contained in:
Paul C Diem 2021-02-16 22:20:30 -06:00
parent a506bd7e77
commit 27cdfea330
2 changed files with 3 additions and 3 deletions

View File

@ -480,7 +480,7 @@ cleanup:
}
}
bool _SendDeviceGroupMessage(uint32_t device, DevGroupMessageType message_type, ...)
bool _SendDeviceGroupMessage(int32_t device, DevGroupMessageType message_type, ...)
{
// If device groups is not up, ignore this request.
if (!device_groups_up) return 1;

View File

@ -491,7 +491,7 @@ void PWMDimmerHandleButton(uint32_t button_index, bool pressed)
}
// If we need to adjust the brightness, do it.
uint32_t negated_device_group_index = -power_button_index;
int32_t negated_device_group_index = -power_button_index;
if (bri_offset) {
int32_t bri;
#ifdef USE_PWM_DIMMER_REMOTE
@ -510,7 +510,7 @@ void PWMDimmerHandleButton(uint32_t button_index, bool pressed)
}
if (new_bri != bri) {
#ifdef USE_DEVICE_GROUPS
SendDeviceGroupMessage(negated_device_group_index, (dgr_more_to_come ? DGR_MSGTYP_UPDATE_MORE_TO_COME : DGR_MSGTYP_UPDATE_DIRECT), DGR_ITEM_LIGHT_BRI, new_bri);
SendDeviceGroupMessage(negated_device_group_index, (dgr_more_to_come ? DGR_MSGTYP_UPDATE_MORE_TO_COME : DGR_MSGTYP_UPDATE_DIRECT), DGR_ITEM_LIGHT_BRI, new_bri, DGR_ITEM_BRI_POWER_ON, new_bri);
#endif // USE_DEVICE_GROUPS
#ifdef USE_PWM_DIMMER_REMOTE
if (active_remote_pwm_dimmer) {