X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdrivers%2Fao_lco_two.c;h=0eb90080acb76dae8d288b8fe466d6d39b06ab32;hb=c49bd3cb0c31a51fae79ddc92237cc309be9a242;hp=12c02e8847002714ca6a33a78a81935687d4035d;hpb=c6e57291d91f1f6c4de5c54a5cfd3eef66d9f830;p=fw%2Faltos diff --git a/src/drivers/ao_lco_two.c b/src/drivers/ao_lco_two.c index 12c02e88..0eb90080 100644 --- a/src/drivers/ao_lco_two.c +++ b/src/drivers/ao_lco_two.c @@ -79,21 +79,21 @@ ao_lco_input(void) ao_event_get(&event); } ao_lco_wakeup(); - PRINTD("event type %d unit %d value %d\n", - event.type, event.unit, event.value); + PRINTD("event type %d unit %d value %ld\n", + event.type, event.unit, (long) event.value); switch (event.type) { case AO_EVENT_BUTTON: switch (event.unit) { case AO_BUTTON_BOX: - ao_lco_set_box(event.value); + ao_lco_set_box((uint16_t) event.value); ao_lco_set_armed(0); break; case AO_BUTTON_ARM: - ao_lco_set_armed(event.value); + ao_lco_set_armed((uint8_t) event.value); break; case AO_BUTTON_FIRE: if (ao_lco_armed) - ao_lco_set_firing(event.value); + ao_lco_set_firing((uint8_t) event.value); break; } break; @@ -114,19 +114,19 @@ ao_lco_main(void) ao_add_task(&ao_lco_input_task, ao_lco_input, "lco input"); ao_add_task(&ao_lco_arm_warn_task, ao_lco_arm_warn, "lco arm warn"); ao_add_task(&ao_lco_igniter_status_task, ao_lco_igniter_status, "lco igniter status"); - ao_led_on(~0); + ao_led_on((uint16_t) ~0); ao_beep_for(AO_BEEP_MID, AO_MS_TO_TICKS(200)); - ao_led_off(~0); + ao_led_off((uint16_t) ~0); ao_lco_monitor(); } #if DEBUG -void +static void ao_lco_set_debug(void) { - ao_cmd_decimal(); + uint32_t r = ao_cmd_decimal(); if (ao_cmd_status == ao_cmd_success) - ao_lco_debug = ao_cmd_lex_i; + ao_lco_debug = r != 0; } const struct ao_cmds ao_lco_cmds[] = {