From 4f14b9b7e28ffdc6924f9f448bd1bdd76b307c99 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 20 Jun 2016 11:10:36 -0300 Subject: [PATCH] AP_HAL_Linux: ToneAlarm_Raspilot: add fixme comment --- libraries/AP_HAL_Linux/ToneAlarm_Raspilot.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_HAL_Linux/ToneAlarm_Raspilot.cpp b/libraries/AP_HAL_Linux/ToneAlarm_Raspilot.cpp index 54b1ff833f..f8ef057cfb 100644 --- a/libraries/AP_HAL_Linux/ToneAlarm_Raspilot.cpp +++ b/libraries/AP_HAL_Linux/ToneAlarm_Raspilot.cpp @@ -183,6 +183,7 @@ void ToneAlarm_Raspilot::_set_pwm0_duty(uint8_t percent) int bit_count = constrain_int32(320 * percent / 100, 320, 0); unsigned int bits = 0; + // FIXME: bits overflows for any bit_count > 32 while (bit_count) { bits <<= 1; bits |= 1;