X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fkernel%2Fao_sample.c;h=f0ab0169805fb6a1db38ddde5ca7b803b2f530c9;hp=29bf2bf6ed0661a98aab90182b903977c1148880;hb=cf20e213f39fb24f15e0ac94307c2d138fcadecb;hpb=013e9ccfbe76dc46e8c69ea314950bed83d9a39f diff --git a/src/kernel/ao_sample.c b/src/kernel/ao_sample.c index 29bf2bf6..f0ab0169 100644 --- a/src/kernel/ao_sample.c +++ b/src/kernel/ao_sample.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -179,7 +180,7 @@ static void ao_sample_rotate(void) { #ifdef AO_FLIGHT_TEST - float dt = (ao_sample_tick - ao_sample_prev_tick) / TIME_DIV; + float dt = (int16_t) (ao_sample_tick - ao_sample_prev_tick) / TIME_DIV; #else static const float dt = 1/TIME_DIV; #endif