Thread: [Firebug-cvs] firebug/project/src/gps TestMTS350.nc,1.1,1.2 TestMTS350M.nc,1.4,1.5 gps.h,1.4,1.5
Brought to you by:
doolin
From: <cs...@us...> - 2003-07-31 15:39:57
|
Update of /cvsroot/firebug/firebug/project/src/gps In directory sc8-pr-cvs1:/tmp/cvs-serv10685 Modified Files: TestMTS350.nc TestMTS350M.nc gps.h Log Message: GPS Power cycle every 5 sec. Index: TestMTS350.nc =================================================================== RCS file: /cvsroot/firebug/firebug/project/src/gps/TestMTS350.nc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestMTS350.nc 8 Jul 2003 21:51:35 -0000 1.1 --- TestMTS350.nc 31 Jul 2003 15:33:56 -0000 1.2 *************** *** 62,66 **** } implementation { ! components Main, TestMTS350M, RadioCRCPacket as Comm, UARTNoCRCPacket,SensirionHumidity, MicaWbSwitch,UARTGpsPacket,TimerC, LedsC, Logger; Main.StdControl -> TestMTS350M; --- 62,66 ---- } implementation { ! components Main, TestMTS350M, RadioCRCPacket as Comm, UARTNoCRCPacket,SensirionHumidity, MicaWbSwitch,UARTGpsPacket,TimerC, LedsC, Logger, SimpleCmd; Main.StdControl -> TestMTS350M; *************** *** 104,107 **** TestMTS350M.LoggerWrite -> Logger.LoggerWrite; TestMTS350M.LoggerRead -> Logger; ! } --- 104,107 ---- TestMTS350M.LoggerWrite -> Logger.LoggerWrite; TestMTS350M.LoggerRead -> Logger; ! } Index: TestMTS350M.nc =================================================================== RCS file: /cvsroot/firebug/firebug/project/src/gps/TestMTS350M.nc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TestMTS350M.nc 15 Jul 2003 16:57:35 -0000 1.4 --- TestMTS350M.nc 31 Jul 2003 15:33:56 -0000 1.5 *************** *** 162,166 **** command result_t StdControl.start() { result_t ok1, ok2, ok3; ! //call Timer.start(TIMER_REPEAT, 5000); ok1 = call UARTControl.start(); ok2 = call RadioControl.start(); --- 162,166 ---- command result_t StdControl.start() { result_t ok1, ok2, ok3; ! call Timer.start(TIMER_REPEAT, 5000); ok1 = call UARTControl.start(); ok2 = call RadioControl.start(); *************** *** 268,271 **** --- 268,274 ---- if(gps_data->data[i] == '*') { if(gga_read) { + if(call GpsCmd.GpsPower(0)) { + SODbg(DBG_USR2, "GPS Power Off\n"); + } call parseGPS(gga_string, j); gga_read = FALSE; *************** *** 417,420 **** --- 420,430 ---- return SUCCESS; } + + //event result_t Timer.fired() { + // call GpsCmd.GpsPower(1); + //} + + + Index: gps.h =================================================================== RCS file: /cvsroot/firebug/firebug/project/src/gps/gps.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gps.h 14 Apr 2003 18:24:55 -0000 1.4 --- gps.h 31 Jul 2003 15:33:56 -0000 1.5 *************** *** 1,7 **** ! /* -*- Mode: C; c-basic-indent: 3; indent-tabs-mode: nil -*- */ ! ! ! /* tab:4 ! * Copyright (c) 2000-2002 The Regents of the University of California. * All rights reserved. * --- 1,6 ---- ! /* tab:4 ! * ! * ! * "Copyright (c) 2000-2002 The Regents of the University of California. * All rights reserved. * *************** *** 10,19 **** * hereby granted, provided that the above copyright notice, the following * two paragraphs and the author appear in all copies of this software. ! * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY --- 9,18 ---- * hereby granted, provided that the above copyright notice, the following * two paragraphs and the author appear in all copies of this software. ! * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY *************** *** 23,72 **** * */ ! /* - * This file is part of the FireBug project. * ! * FireBug is free software; you can redistribute it and/or modify it ! * under the terms of the GNU Lesser General Public License as published by the ! * Free Software Foundation; either version 2, or (at your option) any ! * later version. * ! * FireBug 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 Lesser General Public License ! * for more details. ! ! * You should have received a copy of the GNU Lesser General Public License ! * along with Geotechnica; see the file COPYING. If not, write to the Free ! * Software Foundation, 59 Temple Place - Suite 330, Boston, ! * MA 02111-1307, USA. */ ! /* ! * The definition of gps messages needs to be moved out ! * of the "private" module files into "public" header ! * files so that third party applications (such as mig) ! * will be able to generate parsing code from the ! * definition of the messages. ! */ - /* - * @todo Break up the typedef, mig won't support it. - * Necessary typedefs can be used internally to the - * nesc source files. - */ - struct GPSMsg { - char LatDegrees; //(0-90) - char LatMinutes; //(0-59) - int LatSeconds; //2 bytes (0-59999) - char LongDegrees; //(0-180) - char LongMinutes; //(0-59) - int LongSeconds; //2 bytes - char Status; //(SE=00, SW=01, NE=10, NW=11); - }; - enum { - AM_GPSMSG = 127 - }; --- 22,96 ---- * */ ! /* tab:4 ! * IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. By ! * downloading, copying, installing or using the software you agree to ! * this license. If you do not agree to this license, do not download, ! * install, copy or use the software. ! * ! * Intel Open Source License ! * ! * Copyright (c) 2002 Intel Corporation ! * All rights reserved. ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions are ! * met: ! * ! * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in the ! * documentation and/or other materials provided with the distribution. ! * Neither the name of the Intel Corporation nor the names of its ! * contributors may be used to endorse or promote products derived from ! * this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ! * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS ! * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ! * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ! * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ! * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ! * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ! * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! * ! * ! */ /* * ! * Authors: * ! * $Id$ */ ! #define GPS_DATA_LENGTH 350 ! typedef struct GPS_Msg ! { ! /* The following fields are received on the gps. */ ! uint8_t length; ! int8_t data[GPS_DATA_LENGTH]; ! uint16_t crc; ! } GPS_Msg; ! typedef GPS_Msg *GPS_MsgPtr; ! ! typedef struct GGA_Msg ! { ! uint8_t hours; ! uint8_t minutes; ! uint16_t dec_sec; ! uint8_t Lat_deg; ! uint16_t Lat_dec_min; ! uint8_t Long_deg; ! uint16_t Long_dec_min; ! uint8_t NSEWind; ! ! ! } GGA_Msg; ! ! |