X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao_monitor.c;h=15b56f058b6ab821c5083aae01ade569a53915ab;hp=9a8038f8f4aea00bea06e293c714f594328b0a63;hb=45976af820fc41099928df71ea8304c56eb9fc7c;hpb=3703ecdc9e190f2e0b7ead0e71b78be881c1f3b7 diff --git a/ao_monitor.c b/ao_monitor.c index 9a8038f8..15b56f05 100644 --- a/ao_monitor.c +++ b/ao_monitor.c @@ -1,25 +1,18 @@ /* - * $Id: $ + * Copyright © 2009 Keith Packard * - * Copyright © 2009 Keith Packard + * 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. * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include "ao.h" @@ -30,6 +23,7 @@ const char const * const ao_state_names[] = { }; __xdata uint8_t ao_monitoring; +__pdata uint8_t ao_monitor_led; void ao_monitor(void) @@ -59,6 +53,7 @@ ao_monitor(void) recv.telemetry.adc.sense_m); ao_gps_print(&recv.telemetry.gps); ao_usb_flush(); + ao_led_toggle(ao_monitor_led); } } @@ -78,8 +73,9 @@ __code struct ao_cmds ao_monitor_cmds[] = { }; void -ao_monitor_init(void) +ao_monitor_init(uint8_t monitor_led) { + ao_monitor_led = monitor_led; ao_monitoring = 0; ao_cmd_register(&ao_monitor_cmds[0]); ao_add_task(&ao_monitor_task, ao_monitor, "monitor");