diff options
| author | Bdale Garbee <bdale@gag.com> | 2018-10-20 01:18:12 -0600 |
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2018-10-20 01:18:12 -0600 |
| commit | 0686a7b8aec524d81bda4c572549a3a068ce0eed (patch) | |
| tree | 2e6061c834b99e3b9668be8b3cfb1627251365d3 /src/kernel/ao_fake_flight.c | |
| parent | 6aa451ce81bfdfe679e3f9902043a5f0d235c745 (diff) | |
| parent | cc528f1ff0271ec6488a1a7b91c731183502101e (diff) | |
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'src/kernel/ao_fake_flight.c')
| -rw-r--r-- | src/kernel/ao_fake_flight.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/kernel/ao_fake_flight.c b/src/kernel/ao_fake_flight.c index 5880cf2b..ec8691e9 100644 --- a/src/kernel/ao_fake_flight.c +++ b/src/kernel/ao_fake_flight.c @@ -54,7 +54,7 @@ ao_fake_data_read(void) uint8_t *d = (void *) &ao_fake_next; if (getchar() == 0) - return FALSE; + return false; for (i = 0; i < sizeof (struct ao_data); i++) *d++ = getchar(); if (!ao_fake_has_offset) { @@ -64,7 +64,7 @@ ao_fake_data_read(void) } else ao_fake_next.tick += ao_fake_tick_offset; ao_fake_has_next = 1; - return TRUE; + return true; } static void @@ -118,10 +118,10 @@ ao_fake_calib_read(void) ) { printf ("Calibration data major version mismatch %d.%d <= %d.%d\n", ao_calib.major, ao_calib.minor, AO_FAKE_CALIB_MAJOR, AO_FAKE_CALIB_MINOR); - return FALSE; + return false; } ao_fake_calib_set(&ao_calib); - return TRUE; + return true; } static void @@ -133,14 +133,12 @@ ao_fake_flight(void) enum ao_flight_state my_state = ao_flight_invalid; int i; - ao_cmd_hex(); + calib_size = ao_cmd_hex(); if (ao_cmd_status != ao_cmd_success) return; - calib_size = ao_cmd_lex_i; - ao_cmd_hex(); + data_size = ao_cmd_hex(); if (ao_cmd_status != ao_cmd_success) return; - data_size = ao_cmd_lex_i; if ((unsigned) calib_size != sizeof (struct ao_fake_calib)) { printf ("calib size %d larger than actual size %d\n", calib_size, sizeof (struct ao_fake_calib)); |
