mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 11:46:31 +00:00
Merge pull request #10997 from pcdiem/dgr2
Fix _SendDeviceGroupMessage signedness
This commit is contained in:
commit
d84de90b1b
@ -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 is not up, ignore this request.
|
||||||
if (!device_groups_up) return 1;
|
if (!device_groups_up) return 1;
|
||||||
|
@ -491,7 +491,7 @@ void PWMDimmerHandleButton(uint32_t button_index, bool pressed)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If we need to adjust the brightness, do it.
|
// 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) {
|
if (bri_offset) {
|
||||||
int32_t bri;
|
int32_t bri;
|
||||||
#ifdef USE_PWM_DIMMER_REMOTE
|
#ifdef USE_PWM_DIMMER_REMOTE
|
||||||
@ -510,7 +510,7 @@ void PWMDimmerHandleButton(uint32_t button_index, bool pressed)
|
|||||||
}
|
}
|
||||||
if (new_bri != bri) {
|
if (new_bri != bri) {
|
||||||
#ifdef USE_DEVICE_GROUPS
|
#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
|
#endif // USE_DEVICE_GROUPS
|
||||||
#ifdef USE_PWM_DIMMER_REMOTE
|
#ifdef USE_PWM_DIMMER_REMOTE
|
||||||
if (active_remote_pwm_dimmer) {
|
if (active_remote_pwm_dimmer) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user