diff options
| author | Keith Packard <keithp@keithp.com> | 2011-03-06 21:57:52 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2011-03-16 15:57:37 -0700 | 
| commit | e339ffd8bd8b9e3f4758017ba355028000cb612e (patch) | |
| tree | 2b4ad14032efef3bf13ad326f1b4fec11ecad5c1 /src/ao_flight_test.c | |
| parent | 02611efea0c485d78fad08c696c1f56e868d36b8 (diff) | |
altos/test: Use ao_convert.c instead of hand-coded pres → alt func
Fix up ao_convert.c so that it can be used within the flight test code
instead of having a (broken) copy of the code there.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_flight_test.c')
| -rw-r--r-- | src/ao_flight_test.c | 25 | 
1 files changed, 1 insertions, 24 deletions
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;  | 
