X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fao_flight_test.c;fp=src%2Fao_flight_test.c;h=70888d34448cd090029f951db7e33d1f38e1c9c7;hp=e75bc8df348f5ca8dc240aaaaed6a8900f880d73;hb=e339ffd8bd8b9e3f4758017ba355028000cb612e;hpb=02611efea0c485d78fad08c696c1f56e868d36b8 diff --git a/src/ao_flight_test.c b/src/ao_flight_test.c index e75bc8df..70888d34 100644 --- a/src/ao_flight_test.c +++ b/src/ao_flight_test.c @@ -118,30 +118,7 @@ struct ao_cmds { const char *help; }; - -static int16_t altitude_table[2048] = { -#include "altitude.h" -}; - -int16_t -ao_pres_to_altitude(int16_t pres) __reentrant -{ - pres = pres >> 4; - if (pres < 0) pres = 0; - if (pres > 2047) pres = 2047; - return altitude_table[pres]; -} - -int16_t -ao_altitude_to_pres(int16_t alt) __reentrant -{ - int16_t pres; - - for (pres = 0; pres < 2047; pres++) - if (altitude_table[pres] <= alt) - break; - return pres << 4; -} +#include "ao_convert.c" struct ao_config { uint16_t main_deploy;