1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

ManualControl: Initialize scaledChannel to 0, - required to not fail compilation with -O3 (GCC claims about potentially uninitialized use)

This commit is contained in:
Corvus Corax 2013-05-10 20:23:16 +02:00
parent b76df471ee
commit 0a3b59ddea

View File

@ -203,7 +203,7 @@ static void manualControlTask(__attribute__((unused)) void *parameters)
// Main task loop
lastSysTime = xTaskGetTickCount();
while (1) {
float scaledChannel[MANUALCONTROLSETTINGS_CHANNELGROUPS_NUMELEM];
static float scaledChannel[MANUALCONTROLSETTINGS_CHANNELGROUPS_NUMELEM] = {0};
// Wait until next update
vTaskDelayUntil(&lastSysTime, UPDATE_PERIOD_MS / portTICK_RATE_MS);