firebug-cvs Mailing List for FireBug: wireless wildfire monitoring (Page 2)
Brought to you by:
doolin
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(36) |
Jun
(45) |
Jul
(108) |
Aug
(31) |
Sep
(2) |
Oct
(4) |
Nov
(113) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(63) |
Feb
(37) |
Mar
(24) |
Apr
(6) |
May
(5) |
Jun
(5) |
Jul
(71) |
Aug
(42) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(64) |
Jun
(71) |
Jul
(51) |
Aug
(89) |
Sep
(24) |
Oct
(1) |
Nov
(1) |
Dec
(2) |
2006 |
Jan
|
Feb
|
Mar
(3) |
Apr
(2) |
May
|
Jun
|
Jul
(21) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: David M. D. <do...@us...> - 2006-03-20 23:09:44
|
Update of /cvsroot/firebug/firebug/project/hazelatlas/map In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19202/map Log Message: Directory /cvsroot/firebug/firebug/project/hazelatlas/map added to the repository |
From: David M. D. <do...@us...> - 2006-03-20 23:07:59
|
Update of /cvsroot/firebug/firebug/project/hazelatlas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18330/hazelatlas Log Message: Directory /cvsroot/firebug/firebug/project/hazelatlas added to the repository |
From: David M. D. <do...@us...> - 2005-12-16 19:25:17
|
Update of /cvsroot/firebug/firebug/doc/chassis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16810 Modified Files: chassis.tex Log Message: Deleted redundant material Index: chassis.tex =================================================================== RCS file: /cvsroot/firebug/firebug/doc/chassis/chassis.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** chassis.tex 16 Dec 2005 06:17:54 -0000 1.15 --- chassis.tex 16 Dec 2005 19:25:01 -0000 1.16 *************** *** 4,8 **** \usepackage{graphicx} \usepackage{subfigure} ! %\input{comment} \setlength{\textheight}{8.5in} --- 4,8 ---- \usepackage{graphicx} \usepackage{subfigure} ! \input{comment} \setlength{\textheight}{8.5in} *************** *** 72,76 **** deployment, and dissasembly of the Crossbow WSN hardware. ! This paper reviews the design process and technical issues for creating such a chassis. \section{The Mica mote} --- 72,77 ---- deployment, and dissasembly of the Crossbow WSN hardware. ! This paper reviews the design process and technical issues for ! creating such a chassis. \section{The Mica mote} *************** *** 262,268 **** Short-run injection molding through a service bureau such as Protomold was determined to cost approximately \$2,500 for tooling and a fixed ! lot of 25 parts, and between \$3 to \$10 per additional part (depending ! on volume). ! \begin{figure} --- 263,268 ---- Short-run injection molding through a service bureau such as Protomold was determined to cost approximately \$2,500 for tooling and a fixed ! lot of 25 parts, and between \$3 to \$10 per additional part ! (depending on volume). \begin{figure} *************** *** 307,396 **** - \section{Mica Mote Chassis} - - Early on we identified the following design objectives in a mounting chassis: - \begin{itemize} - \item Tool-less; requires only hands and possibly a coin to - open, disassemble, reassemble (rapid and simple) - \item Separation of modular components: sensing, power, mote, antennas - \item Wiring harness to separate power connection - \item battery cage design to accommodate different battery candidates - \item Supports mounting by: screw, strap, zip-tie, velcro, magnet, hook, or similar - technology. - \item Injection moldable for low-cost high-volume production - \end{itemize} - - - \subsection{Design for Assembly} - - - >>Boothroyd references - - -mounting mote onto chassis; supporting edge connectors - - -using wiring harness to connect power to mote - - -pyramid assembly - - -using standoffs as thumbnuts - - -chamfers on the battery clip - - - \subsection{Design for Injection Molding} - - -straight-pull design - - -avoiding undercuts - - -constant wall thickness to avoid shrinkage - - -shelled design - - -strapping slots ribbed for rigidity - - \begin{figure} - \begin{center} - \includegraphics[width=3in]{figs/exploded_view_2.eps} - \caption{An exploded view of the ``candy bar'' chassis - used for the controlled burn test at East Bay Regional - Parks Fire Department, Lake Chabot.} - \label{fig:exploded_view_2} - \end{center} - \end{figure} - - - - A prototyped ``candy bar'' chassis machined from acrylic - is shown in Fig.~\ref{fig:exploded_view_2}. - - - \begin{figure} - \begin{center} - \subfigure[Front view.]{\label{subfig:candy_bar_injection_moldable_front}% - \includegraphics[width=2.5in]{figs/candy_bar_injection_moldable_front.eps}} - \subfigure[Back view.]{\label{subfig:candy_bar_injection_moldable_back}% - \includegraphics[width=2.5in]{figs/candy_bar_injection_moldable_back.eps}} - \subfigure[FDM front view.]{\label{subfig:fdm_front}% - \includegraphics[width=2.5in]{figs/fdm_front.eps}} - \subfigure[FDM back view.]{\label{subfig:fdm_back}% - \includegraphics[width=2.5in]{figs/fdm_back.eps}} - \caption{Injection mold design, and prototype using FDM technology.} - \label{fig:cbim} - \end{center} - \end{figure} - - An injection moldable chassis, as shown in - Fig.~\ref{fig:cbim} was designed with the ??? software. - - \begin{figure} - \begin{center} - \includegraphics[width=3in]{figs/fdm_assembled.eps} - \caption{Assembled mote using FDM prototype.} - \label{fig:fdm_assembled} - \end{center} - \end{figure} - - \section{Wiring harness} --- 307,310 ---- |
From: David M. D. <do...@us...> - 2005-12-16 06:18:06
|
Update of /cvsroot/firebug/firebug/doc/chassis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20370 Modified Files: chassis.tex Log Message: Added alex material. Index: chassis.tex =================================================================== RCS file: /cvsroot/firebug/firebug/doc/chassis/chassis.tex,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** chassis.tex 17 Nov 2005 00:32:59 -0000 1.14 --- chassis.tex 16 Dec 2005 06:17:54 -0000 1.15 *************** *** 137,140 **** --- 137,310 ---- + + + + \section{Mica Mote Chassis} + + Early on we identified the following design objectives in a mounting chassis: + \begin{itemize} + \item Tool-less; requires only hands and possibly a coin to + open, disassemble, reassemble (rapid and simple) + \item Separation of modular components: sensing, power, mote, antennas + \begin{itemize} + \item Wiring harness to separate power connection + \item battery cage design to accommodate different battery candidates + \end{itemize} + \item Supports mounting by: screw, strap, zip-tie, velcro, magnet, hook, or similar + technology. + \item Injection moldable for low-cost high-volume production + \end{itemize} + + + \subsection{Design for Assembly} + + Since the Mica Mote Chassis were to + be assembled and disassembled in the field, the most prominent choices + for mounting and securing were snap-fit joints and thumbscrews. + Snap-fitting joints however require custom injection molding and are + difficult to prototype, so early on it was a preference to target the + design aound tool-less screw types. In addition, snap-fitting joints + would have only supported a fixed number of boards; one advantage of + the 51-pin edge connector employed by the Mica mote and sensor boards + is that many sensor boards are designed to be stackable such that the + pin-out leads can be passed through to additional boards. + + The Mica mote and sensor boards support screw or pin mounting with two + 0.120" (just smaller than 1/8") diameter holes located at opposite + (diagonal) corners. For such holes, it is advisable to use \#4 machine + screws. A requirement in securing the mote and sensor boards was that + the additional boards needed to be fixed in the z-axis (normal to the + board), otherwise they would either loosen from the edge connector or + strain the connector in a way to possibly cause failure. To provide a + 3/16" spacer between boards for support, threaded standoffs were used + so that they could fit between components in the screw assembly and + not become loose. In this manner, a mote and several boards can be + secured to a plastic chassis with two screws and a number of 3/16" + standoffs. + + To effectively use the screw holes on the mote, it was necessary to + remove the battery pack from the underside of the mote. The chassis + was designed so that the mote-and-sensor assembly would be a stack of + components sitting alongside a power source, connected to the mote by + wire harness or the original battery pack wiring. In this + configuration, the original battery pack could be peeled back from the + mote and secured to the chassis (still connected by wiring), or + another power source battery could be used. The battery pack was + secured to the mote by using self-tapping screws, fastening through + two holes already present in the battery pack. Battery clips or + sleeves, which could hold batteries of different form factors, could + then be screwed into that same mounting area. In one case, a set of + battery sleeves which held lithium-ion batteries was fabricated to + screw into the battery mounting holes. While the process of mounting + the battery clip or sleeve was not considered to be tool-less, it + could be done for a pre-configured chassis type before going to the + field. Following Boothroyd's guidelines of design for manual assembly + (Boothroyd, 1994), the screw-holes on the chassis were chamfered so + that alignment of the very small screws could be done by feel. + + One principal difficulty in using thumbscrews and standoffs in the + field is that they are very small, easy to lose, and difficult to + align. To solve this problem and simplify the assembly method, a + "pyramid assembly" concept outlined by Boothroyd (Boothroyd 1994) was + applied to the design. The primary concept of pyramid assembly is to + be able to stack multiple components onto a fixed guide axis. In this + case, the implementation involved "flipping the logic" of trying to + insert a loose screw from above into a set of components with holes, + to fixing the screw from below as part of the chassis and individually + stacking the components onto it from below. With this design, the + parts aligned themselves correctly to the component below them as they + were assembled. This not only aided with the edge connectors, but + specifically made application of the standoffs a much simpler task. + The screws themselves were affixed to the chassis by two small holes; + the screws were inserted from the bottom and secured at the top with a + 3/32" hex nut. While this process required the use of some tools, it + could be done before going into the field and once the screws were on + the chassis there was no reason to remove them. The 3/32" nut also + provided clearance from the underside of the mote, eliminating any + interference from components to the chassis plane. To finally secure + the components at the end of the screw, a 3/4" long threaded hexagonal + standoff was used. The standoff's six edges allowed for a good grip + between fingers and a thumb while maintaining a small horizontal + profile which would not interfere with circuit board components, + unlike larger wingnuts. + + Finally, for supporting chassis mounting to other surfaces, long slots + were designed which could support mounting by fabric strapping, + zip-ties, hard wires, or nails. Keyhole type mounts were incorporated + to support nails, screws, hooks, and push-pins. A magnet could also + be glued to the back of the chassis for mounting onto metal surfaces. + + \subsection{Design for Injection Molding} + + The first chassis designs were prototyped by machining 1/8" strips of + acrylic, shown in in Figure~\ref{fig:exploded_view_2}. To make the + design injection-moldable, it was first created as a solid model using + the SolidWorks CAD package. Three general design guidelines were + considered in adapting the prototype for moldability: + + \begin{itemize} + \item Maintain constant wall thickness for best dimensional accuracy + \item Avoid undercuts so that a "straight-pull" tool can be used + \item "Shell" the design to use a reasonable wall-thickness for moldability and cost + \end{itemize} + + The design was updated to use 0.08" wall thickness, reasonable for + polystyrene (PS), ABS, or polycarbonate (PC). The shelled design + allowed features on the underside, such as the heads of the mounting + screws or the bosses of the battery clip screws, to be neatly nested + beneath the part as it lay flat on a table. Structural stability with + a thinner design was aided by the perimeter wall but still a concern; + extending part wall around the slot features all the way to the bottom + effectively created a set of ribs which prevented extreme flexing. + Fig.~\ref{fig:cbim} shows early CAD renderings and early ABS + prototypes built from a fused deposition modeling (FDM) machine. + Later revisions of FDM prototypes durable enough for field testing. + Short-run injection molding through a service bureau such as Protomold + was determined to cost approximately \$2,500 for tooling and a fixed + lot of 25 parts, and between \$3 to \$10 per additional part (depending + on volume). + + + \begin{figure} + \begin{center} + \includegraphics[width=3in]{figs/exploded_view_2.eps} + \caption{An exploded view of the ``candy bar'' chassis + used for the controlled burn test at East Bay Regional + Parks Fire Department, Lake Chabot.} + \label{fig:exploded_view_2} + \end{center} + \end{figure} + + + + + + + \begin{figure} + \begin{center} + \subfigure[Front view.]{\label{subfig:candy_bar_injection_moldable_front}% + \includegraphics[width=2.5in]{figs/candy_bar_injection_moldable_front.eps}} + \subfigure[Back view.]{\label{subfig:candy_bar_injection_moldable_back}% + \includegraphics[width=2.5in]{figs/candy_bar_injection_moldable_back.eps}} + \subfigure[FDM front view.]{\label{subfig:fdm_front}% + \includegraphics[width=2.5in]{figs/fdm_front.eps}} + \subfigure[FDM back view.]{\label{subfig:fdm_back}% + \includegraphics[width=2.5in]{figs/fdm_back.eps}} + \caption{Injection mold design, and prototype using FDM technology.} + \label{fig:cbim} + \end{center} + \end{figure} + + + \begin{figure} + \begin{center} + \includegraphics[width=3in]{figs/fdm_assembled.eps} + \caption{Assembled mote using FDM prototype.} + \label{fig:fdm_assembled} + \end{center} + \end{figure} + + + \section{Mica Mote Chassis} |
From: David M. D. <do...@us...> - 2005-11-17 00:33:08
|
Update of /cvsroot/firebug/firebug/doc/chassis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18657 Modified Files: chassis.tex Log Message: More fix up. Index: chassis.tex =================================================================== RCS file: /cvsroot/firebug/firebug/doc/chassis/chassis.tex,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** chassis.tex 27 Oct 2005 21:36:27 -0000 1.13 --- chassis.tex 17 Nov 2005 00:32:59 -0000 1.14 *************** *** 17,30 **** \title{Chassis and battery design for wireless sensor motes} ! \author{Kevin Lee\thanks{}, ! Alex Do\thanks{Grad. Research Assistant, Dept. Mechanical ! Engineering, University of California, Berkeley, CA}, ! David M. Doolin\thanks{Asst. Research Engineer, ! Earthquake Engineering Research Center, 1301 S. 46th ! St., RFS 451, Richmond CA 94804}, ! Nicholas Sitar\thanks{Professor and Director, ! Earthquake Engineering Research Center, 1301 S. 46th ! St., RFS 451, Richmond CA 94804} ! } \date{\today} \maketitle --- 17,31 ---- \title{Chassis and battery design for wireless sensor motes} ! ! %\author{Kevin Lee\thanks{}, ! %Alex Do\thanks{Grad. Research Assistant, Dept. Mechanical ! %Engineering, University of California, Berkeley, CA}, ! %David M. Doolin\thanks{Asst. Research Engineer, ! %Earthquake Engineering Research Center, 1301 S. 46th ! %St., RFS 451, Richmond CA 94804}, ! %Nicholas Sitar\thanks{Professor and Director, ! %Earthquake Engineering Research Center, 1301 S. 46th ! %St., RFS 451, Richmond CA 94804} ! %} \date{\today} \maketitle *************** *** 73,77 **** This paper reviews the design process and technical issues for creating such a chassis. ! \section{Background} The architecture of a typical wireless sensor consists of the --- 74,78 ---- This paper reviews the design process and technical issues for creating such a chassis. ! \section{The Mica mote} The architecture of a typical wireless sensor consists of the *************** *** 107,111 **** antenna that plugs into an MMCX connector on the mote board. ! While a Mica wireless sensor is functional "out-of-the-box," the default configuration is not rugged enough for practical use. Network testing and deployment requires the motes to be physically handled, --- 108,112 ---- antenna that plugs into an MMCX connector on the mote board. ! While a Mica wireless sensor is functional as-shipped, the default configuration is not rugged enough for practical use. Network testing and deployment requires the motes to be physically handled, *************** *** 135,151 **** adhesive, and still many of the aforementioned problems occur. ! \section{Design Objectives} Early on we identified the following design objectives in a mounting chassis: \begin{itemize} ! \item Tool-less; requires only hands and possibly a coin to open, disassemble, reassemble (rapid and simple) \item Separation of modular components: sensing, power, mote, antennas \item Wiring harness to separate power connection \item battery cage design to accommodate different battery candidates ! \item Supports mounting by: screw, strap, zip-tie, magnet \item Injection moldable for low-cost high-volume production \end{itemize} ! \section{Design for Assembly} >>Boothroyd references --- 136,157 ---- adhesive, and still many of the aforementioned problems occur. ! ! \section{Mica Mote Chassis} Early on we identified the following design objectives in a mounting chassis: \begin{itemize} ! \item Tool-less; requires only hands and possibly a coin to ! open, disassemble, reassemble (rapid and simple) \item Separation of modular components: sensing, power, mote, antennas \item Wiring harness to separate power connection \item battery cage design to accommodate different battery candidates ! \item Supports mounting by: screw, strap, zip-tie, velcro, magnet, hook, or similar ! technology. \item Injection moldable for low-cost high-volume production \end{itemize} ! ! \subsection{Design for Assembly} ! >>Boothroyd references *************** *** 161,164 **** --- 167,227 ---- -chamfers on the battery clip + + \subsection{Design for Injection Molding} + + -straight-pull design + + -avoiding undercuts + + -constant wall thickness to avoid shrinkage + + -shelled design + + -strapping slots ribbed for rigidity + + \begin{figure} + \begin{center} + \includegraphics[width=3in]{figs/exploded_view_2.eps} + \caption{An exploded view of the ``candy bar'' chassis + used for the controlled burn test at East Bay Regional + Parks Fire Department, Lake Chabot.} + \label{fig:exploded_view_2} + \end{center} + \end{figure} + + + + A prototyped ``candy bar'' chassis machined from acrylic + is shown in Fig.~\ref{fig:exploded_view_2}. + + + \begin{figure} + \begin{center} + \subfigure[Front view.]{\label{subfig:candy_bar_injection_moldable_front}% + \includegraphics[width=2.5in]{figs/candy_bar_injection_moldable_front.eps}} + \subfigure[Back view.]{\label{subfig:candy_bar_injection_moldable_back}% + \includegraphics[width=2.5in]{figs/candy_bar_injection_moldable_back.eps}} + \subfigure[FDM front view.]{\label{subfig:fdm_front}% + \includegraphics[width=2.5in]{figs/fdm_front.eps}} + \subfigure[FDM back view.]{\label{subfig:fdm_back}% + \includegraphics[width=2.5in]{figs/fdm_back.eps}} + \caption{Injection mold design, and prototype using FDM technology.} + \label{fig:cbim} + \end{center} + \end{figure} + + An injection moldable chassis, as shown in + Fig.~\ref{fig:cbim} was designed with the ??? software. + + \begin{figure} + \begin{center} + \includegraphics[width=3in]{figs/fdm_assembled.eps} + \caption{Assembled mote using FDM prototype.} + \label{fig:fdm_assembled} + \end{center} + \end{figure} + + + \section{Wiring harness} *************** *** 170,181 **** \subsection{Crimping the connectors} ! ! In order to utilize the Molex power connector on the mote, we purchased 50058-8100 Molex crimp terminals and 51021-0200 Molex crimp housings. To accommodate the size of these two parts, we found it best to use 26 AWG wire. In order to crimp these connectors, we were officially supposed to use a specific Molex ! crimping tool.However, the cost of this tool is roughly \$180, ! making it quite a hefty investment. Thus, we instead went with a \$7 crimping tool from a nearby electronics store, and did our best to make working connectors. But because of the size of --- 233,247 ---- \subsection{Crimping the connectors} ! Each mote in the Mica family is equipped with a small, ! plastic Molex jack as an external external power plug. ! This allows clean separation of an external power supply ! such as a battery to be independent of the mote. ! To utilize the Molex power connector on the mote, we purchased 50058-8100 Molex crimp terminals and 51021-0200 Molex crimp housings. To accommodate the size of these two parts, we found it best to use 26 AWG wire. In order to crimp these connectors, we were officially supposed to use a specific Molex ! crimping tool. However, the cost of this tool is roughly \$180, ! making it quite a hefty investment. Instead we used a \$7 crimping tool from a nearby electronics store, and did our best to make working connectors. But because of the size of *************** *** 183,186 **** --- 249,262 ---- now there is no telling just how robust these connectors are. + The Molex power connector is more fragile than the existing + soldered connection to the battery pack in the default + Mica configuration, and too fragile to use for repeated + assembly and disassembly of the motes. The advantage over + soldering is that it's possible to replace just the + battery component in the field very quickly, since there + is no need for a soldering iron. + + + \subsection{Connecting the connectors to the battery cases} *************** *** 194,245 **** there were still issues to be addressed. ! To join the wires and form one piece that went from the battery case to ! the connector, solder was first applied on each pair of wire separately ! (the two red and two black wires) and then reinforced altogether with some ! plastic heat-shrinking material. This process, however, had some flaws. ! First, the diameter of the heat shrink (expanded diameter of .187) ! could not fit over the crimp housings, so the heat shrink had to be ! placed on the wires prior to soldering. It is important to note that ! since the heat-shrinking material only shrinks up to 50\% of its expanded ! diameter, a larger heat shrink would have been too loose to properly ! insulate the two sets of wires together. Thus, we could not use heat ! shrinks with a larger diameter to remedy this problem.As a result, ! since we had to place the heat shrink on the wires before soldering, ! the length of heat shrink that we were allowed to use was limited ! by where the joining of the wires would take place. This was rather ! disappointing, because we had hoped to cover up the two wires entirely ! with heat-shrinking material so that the two sets of wires would act as ! one. The second flaw we found was that the soldered wires could not ! just be wrapped in heat-shrinking material, because a short would then ! exist at the soldered areas between the red and black wires. To prevent ! a short from happening, the two options were to either first wrap each ! wire separately with heat-shrinking material and then wrap both of these ! with a heat shrink, or to use electrical tape and first insulate each of ! the wires before applying the heat shrink. The former could not be done, ! however, because we did not have heat shrink with a large enough diameter ! that would insulate the two heat-shrinked wires. The latter proved to ! be quite difficult too, because the heat shrink barely (and in some cases ! failed to) fit over the taped-and-soldered wires. - \subsection{Suggestions} - From these experiences with creating wire harnesses for the - motes, we have a couple of suggestions to make. The first - one is regarding the Molex power connector on the mote board. - It would be nicer if Crossbow could use a larger (and possibly - structurally different) connector so that we could manually make - more robust connections. Secondly, it would be very helpful if - Crossbow could provide better battery cases. Since there is a - Molex power connector on the mote board, Crossbow should devise - a way for people to utilize that connector instead of just the - soldered connections. Using the current battery cases for this - purpose is very difficult, largely because of the different sizes - of the wires, and the difficulty of insulating them properly. - It would be great if Crossbow could either provide battery cases - that would allow us to connect our wires directly to them (instead - of having to find a way to couple our wires with existing ones), - or to maybe even provide a battery case that already has a molex - connector on the end. --- 270,307 ---- there were still issues to be addressed. ! To join the wires and form one piece that went from the battery case ! to the connector, solder was first applied on each pair of wire ! separately (the two red and two black wires) and then reinforced ! altogether with some plastic heat-shrinking material. This process, ! however, had some flaws. First, the diameter of the heat shrink ! (expanded diameter of 0.187 in) could not fit over the crimp housings, so ! the heat shrink had to be placed on the wires prior to soldering. It ! is important to note that since the heat-shrinking material only ! shrinks up to 50\% of its expanded diameter, a larger heat shrink ! would have been too loose to properly insulate the two sets of wires ! together. Thus, we could not use heat shrinks with a larger diameter ! to remedy this problem. ! ! ! As a result, since we had to place the heat shrink on the wires before ! soldering, the length of heat shrink that we were allowed to use was ! limited by where the joining of the wires would take place. This was ! rather disappointing, because we had hoped to cover up the two wires ! entirely with heat-shrinking material so that the two sets of wires ! would act as one. The second flaw we found was that the soldered ! wires could not just be wrapped in heat-shrinking material, because a ! short would then exist at the soldered areas between the red and black ! wires. To prevent a short from happening, the two options were to ! either first wrap each wire separately with heat-shrinking material ! and then wrap both of these with a heat shrink, or to use electrical ! tape and first insulate each of the wires before applying the heat ! shrink. The former could not be done, however, because we did not ! have heat shrink with a large enough diameter that would insulate the ! two heat-shrinked wires. The latter proved to be quite difficult too, ! because the heat shrink barely (and in some cases failed to) fit over ! the taped-and-soldered wires. *************** *** 247,285 **** ! When considering whether to use the Nickel-Cadmium (Ni-Cd) ! or Lithium Ion (Li-ion) batteries, we took into account ! several factors, focusing on its ease of use and whether ! there would be detrimental effects to the environment ! given the proposed usage of these batteries. Since ! firefighters will be placing these battery-powered ! devices on their helmets, one issue is to have the ! batteries be as light as possible. In this case, the ! Li-Ion battery chemistry is much lighter than the ! Nickel-Cadmium one, providing less of a burden on ! firefighters. Now the idea of using rechargeable ! batteries was so that firefighters would not have to ! frequently open up the device and replace the AA ! batteries. However, Ni-Cd batteries have what is ! known as ``the memory effect,'' where partial ! discharges will lead to a decrease in the capacity ! of the battery. Thus, to combat the memory effect, ! it is recommended that the Ni-Cd batteries be fully ! discharged before recharging. If we were to require ! firefighters to completely discharge the batteries ! first each time, then this idea of using rechargeable ! batteries would not be that much more convenient than ! having to replace the AAs. Moreover, if the batteries ! were to only be used for motes, then they would never be ! completely discharged. Luckily, Li-Ion batteries ! do not have this effect, and it is even recommended that ! only partial discharges be made before recharging them. ! Lastly, another concern was what effects the batteries ! could have on the environment if they were burned up. ! Again, the Li-Ion batteries prove to be the better choice, ! as Ni-Cd batteries are toxic and harmful to the environment. ! Li-Ion batteries do not even contain free lithium, thus ! making them much safer for this particular use. Given ! these considerations, Li-Ion batteries are much more ! suitable than Ni-Cd batteries for this project. \subsection{Combining the Battery with the Motes} --- 309,347 ---- ! When considering whether to use the Nickel-Cadmium (Ni-Cd) or Lithium ! Ion (Li-ion) batteries, we took into account several factors, focusing ! on its ease of use and whether there would be detrimental effects to ! the environment given the proposed usage of these batteries. Since ! firefighters will be placing these battery-powered devices on their ! helmets, one issue is to have the batteries be as light as possible. ! In this case, the Li-Ion battery chemistry is much lighter than the ! Nickel-Cadmium one, providing less of a burden on firefighters. Now ! the idea of using rechargeable batteries was so that firefighters ! would not have to frequently open up the device and replace the AA ! batteries. ! ! ! However, Ni-Cd batteries have what is known as ``the memory effect,'' ! where partial discharges will lead to a decrease in the capacity of ! the battery. To combat the memory effect, Ni-Cd batteries must be ! fully discharged before recharging. If we were to require ! firefighters to completely discharge the batteries first each time, ! then this idea of using rechargeable batteries would not be that much ! more convenient than having to replace the AAs. Moreover, if the ! batteries were to only be used for motes, then they would never be ! completely discharged. Luckily, Li-Ion batteries do not have this ! effect, and it is even recommended that only partial discharges be ! made before recharging them. ! ! ! Lastly, we were concerned about what effects the batteries could have ! on the environment if they were burned up. Again, the Li-Ion ! batteries prove to be the better choice, as Ni-Cd batteries are toxic ! and harmful to the environment. Li-Ion batteries do not even contain ! free lithium, thus making them much safer for this particular use. ! Given these considerations, Li-Ion batteries are much more suitable ! than Ni-Cd batteries for this project. ! ! \subsection{Combining the Battery with the Motes} *************** *** 296,369 **** especially a larger one, since the battery wires are larger than the ones used to attach the battery case to the Molex power connector on ! the board. (to be continued...) ! ! Ideally, it would be nice if we could use the one connector for the ! entire mote. This would leave us with three options: use the molex ! power connector, the adaptor jack, or a mini-USB jack. ! ! \section{Mounting} ! ! -strapping (velcro, zip-tie) ! ! -hooks ! ! -magnets ! ! \section{Design for Injection Molding} ! ! -straight-pull design ! ! -avoiding undercuts ! ! -constant wall thickness to avoid shrinkage ! ! -shelled design ! ! -strapping slots ribbed for rigidity ! ! \begin{figure} ! \begin{center} ! \includegraphics[width=3in]{figs/exploded_view_2.eps} ! \caption{An exploded view of the ``candy bar'' chassis ! used for the controlled burn test at East Bay Regional ! Parks Fire Department, Lake Chabot.} ! \label{fig:exploded_view_2} ! \end{center} ! \end{figure} ! ! A prototyped ``candy bar'' chassis machined from acrylic ! is shown in Fig.~\ref{fig:exploded_view_2}. ! \begin{figure} ! \begin{center} ! \subfigure[Front view.]{\label{subfig:candy_bar_injection_moldable_front}% ! \includegraphics[width=2.5in]{figs/candy_bar_injection_moldable_front.eps}} ! \subfigure[Back view.]{\label{subfig:candy_bar_injection_moldable_back}% ! \includegraphics[width=2.5in]{figs/candy_bar_injection_moldable_back.eps}} ! \subfigure[FDM front view.]{\label{subfig:fdm_front}% ! \includegraphics[width=2.5in]{figs/fdm_front.eps}} ! \subfigure[FDM back view.]{\label{subfig:fdm_back}% ! \includegraphics[width=2.5in]{figs/fdm_back.eps}} ! \caption{Injection mold design, and prototype using FDM technology.} ! \label{fig:cbim} ! \end{center} ! \end{figure} - An injection moldable chassis, as shown in - Fig.~\ref{fig:cbim} was designed with the ??? software. ! \begin{figure} ! \begin{center} ! \includegraphics[width=3in]{figs/fdm_assembled.eps} ! \caption{Assembled mote using FDM prototype.} ! \label{fig:fdm_assembled} ! \end{center} ! \end{figure} ! \section{Conclusions} --- 358,398 ---- especially a larger one, since the battery wires are larger than the ones used to attach the battery case to the Molex power connector on ! the board. Ideally, it would be nice if we could use the one ! connector for the entire mote. This would leave us with three ! options: use the molex power connector, the adaptor jack, or a ! mini-USB jack. + \subsection{Charger design and construction} ! {\em Kevin, a paragraph here would be excellent.} ! \section{Conclusions} ! \subsection{Wiring harness} + From these experiences with creating wire harnesses for the + motes, we have a couple of suggestions to make. ! \begin{enumerate} ! \item The first ! one is regarding the Molex power connector on the mote board. ! It would be nicer if Crossbow could use a larger (and possibly ! structurally different) connector so that we could manually make ! more robust connections. ! \item Secondly, it would be very helpful if ! Crossbow could provide better battery cases. Since there is a ! Molex power connector on the mote board, Crossbow should devise ! a way for people to utilize that connector instead of just the ! soldered connections. Using the current battery cases for this ! purpose is very difficult, largely because of the different sizes ! of the wires, and the difficulty of insulating them properly. ! It would be great if Crossbow could either provide battery cases ! that would allow us to connect our wires directly to them (instead ! of having to find a way to couple our wires with existing ones), ! or to maybe even provide a battery case that already has a molex ! connector on the end. ! \end{enumerate} |
From: David M. D. <do...@us...> - 2005-10-27 21:36:39
|
Update of /cvsroot/firebug/firebug/doc/chassis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16163 Modified Files: chassis.tex Log Message: . Index: chassis.tex =================================================================== RCS file: /cvsroot/firebug/firebug/doc/chassis/chassis.tex,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** chassis.tex 6 Aug 2004 07:11:16 -0000 1.12 --- chassis.tex 27 Oct 2005 21:36:27 -0000 1.13 *************** *** 1,3 **** ! \documentclass{article} \usepackage{chicago} --- 1,3 ---- ! \documentclass[12pt]{article} \usepackage{chicago} *************** *** 16,25 **** \begin{document} ! \title{Chassis design for motes} ! \author{Kevin Lee, Alex Do, David M. Doolin, Nicholas Sitar} \date{\today} \maketitle \section{Introduction} Wireless sensors networks (WSN) are currently emerging as solutions to monitor and collect data in situations where traditional ``wired'' sensing components --- 16,51 ---- \begin{document} ! \title{Chassis and battery design for wireless sensor motes} ! \author{Kevin Lee\thanks{}, ! Alex Do\thanks{Grad. Research Assistant, Dept. Mechanical ! Engineering, University of California, Berkeley, CA}, ! David M. Doolin\thanks{Asst. Research Engineer, ! Earthquake Engineering Research Center, 1301 S. 46th ! St., RFS 451, Richmond CA 94804}, ! Nicholas Sitar\thanks{Professor and Director, ! Earthquake Engineering Research Center, 1301 S. 46th ! St., RFS 451, Richmond CA 94804} ! } \date{\today} \maketitle + \abstract{Wireless sensor motes present an opportunity + to increase the density of data collection while lowering + the unit cost per datum in a wide variety of scientific, + engineering and industrial applications. Packaging + and powering these small devices to provide physical + robustness while allowing environmental conditions + around the motes to be accurately measured is challenging + because the mote packaging may influence the sensor + measurements. + %%% Add power here. + In this report, we describe our current chassis and + battery designs for balancing robustness, convenient + power and environmental access to Crossbow's Mica2 mote + for operation in real field environments.} + + \section{Introduction} + Wireless sensors networks (WSN) are currently emerging as solutions to monitor and collect data in situations where traditional ``wired'' sensing components *************** *** 30,34 **** or bridges, industrial manufacturing operations, heating and cooling systems, and an endless addition of other applications. The technology, however, is ! extremely early in its lifecycle -- where commercial markets are minute and the bulk of the current customers are comprised of government, academic, and corporate researchers~\cite{appropriate_refs} --- 56,60 ---- or bridges, industrial manufacturing operations, heating and cooling systems, and an endless addition of other applications. The technology, however, is ! extremely early in its lifecycle --- where commercial markets are minute and the bulk of the current customers are comprised of government, academic, and corporate researchers~\cite{appropriate_refs} *************** *** 48,105 **** \section{Background} - The architecture of a typical wireless sensor consists of the following layers: sensing, - communications, and power. Because WSN sensors operate in mesh networks rather - than through point-to-point communication, the communications boards (motes) are - more than simple radio transmitters; they consist of an operating system that manages - use of power, operates the sensors, and receives and transmits data packets. As this - is a mechanical design study, we will not discuss software since it has no bearing - on the mechanical package. ! >>need figure of mica mote - The Crossbow Mica platform isolates the remaining layers into the following physical - components: sensor boards, a mote board (along with an external radio antenna), and - a battery clip that holds two AA battery cells. The sensor boards connect to the mote - using a stackable 52-pin edge connector that allows multiple sensors to be used simultaneously. - The battery clip is connected to the mote through two inch-long narrow-gauge stranded wires that - soldered directly to the mote board (*footnote: earlier versions used solid wire that was not flexible). - The mote board is secured to the battery clip with a small piece of foam adhesive. For the radio - antennas, Mica users can choose from a solder-on wire antenna or a removable antenna - that plugs into an MMCX connector on the mote board. ! While a Mica wireless sensor is functional "out-of-the-box," the default configuration is ! not rugged enough for practical use. Network testing and deployment requires the motes ! to be physically handled, mounted to walls and ceilings, disassembled and reassembled. The ! current interconnections between each of the components break or fail, ceasing operation of ! the sensor node until the unit is repaired. Here is a summary of common problems must be solved ! in the design of a chassis: ! -the edge connectors do not feature any locking engagement, so the sensor boards can become loosened from the mote or from each other ! -the wires from the battery clips are stressed very highly at the solder junctions, and break frequently even with light handling ! -the foam adhesive is not very strong, so the mote and sensors easily become loosened from the battery clip and often causing the fault above ! -the solder-on antenna becomes stressed from repeated repositioning and breaks off from the mote often ! In addition, the current mechanical package does not support for mounting. It is nearly impossible to ! secure a bare mote to a tree or a wooden post. Even in an indoor environment, the only common method ! of mounting a mote is by using Velcro (trademark) or other two-sided adhesive, and still many of the ! aforementioned problems occur. \section{Design Objectives} - Early on we identified the following design objectives in a mounting chassis: - -Tool-less; requires only hands and possibly a coin to open, disassemble, reassemble (rapid and simple) - -Separation of modular components: sensing, power, mote, antennas - -Wiring harness to separate power connection - -battery cage design to accommodate different battery candidates - -Supports mounting by: screw, strap, zip-tie, magnet - -Injection moldable for low-cost high-volume production \section{Design for Assembly} >>Boothroyd references -mounting mote onto chassis; supporting edge connectors -using wiring harness to connect power to mote -pyramid assembly -using standoffs as thumbnuts -chamfers on the battery clip --- 74,162 ---- \section{Background} ! The architecture of a typical wireless sensor consists of the ! following layers: sensing, communications, and power. Because WSN ! sensors operate in mesh networks rather than through point-to-point ! communication, the communications boards (motes) are more than simple ! radio transmitters; they consist of an operating system that manages ! use of power, operates the sensors, and receives and transmits data ! packets. As this is a mechanical design study, we will not discuss ! software since it has no bearing on the mechanical package. ! \begin{figure} ! \begin{center} ! %\includegraphics{ ! \caption{Mica2 mote as-shipped from Crossbow.} ! \label{mica2} ! \end{center} ! \end{figure} ! ! The Crossbow Mica platform isolates the remaining layers into the ! following physical components: sensor boards, a mote board (along with ! an external radio antenna), and a battery clip that holds two AA ! battery cells. The sensor boards connect to the mote using a ! stackable 52-pin edge connector that allows multiple sensors to be ! used simultaneously. The battery clip is connected to the mote ! through two inch-long narrow-gauge stranded wires that soldered ! directly to the mote board (*footnote: earlier versions used solid ! wire that was not flexible). The mote board is secured to the battery ! clip with a small piece of foam adhesive. For the radio antennas, ! Mica users can choose from a solder-on wire antenna or a removable ! antenna that plugs into an MMCX connector on the mote board. ! ! While a Mica wireless sensor is functional "out-of-the-box," the ! default configuration is not rugged enough for practical use. Network ! testing and deployment requires the motes to be physically handled, ! mounted to walls and ceilings, disassembled and reassembled. The ! current interconnections between each of the components break or fail, ! ceasing operation of the sensor node until the unit is repaired. Here ! is a summary of common problems must be solved in the design of a ! chassis: ! \begin{itemize} ! \item the edge connectors do not feature any locking ! engagement, so the sensor boards can become loosened ! from the mote or from each other. ! \item the wires from the battery clips are stressed ! very highly at the solder junctions, and break frequently ! even with light handling. ! \item the foam adhesive is not very strong, so the mote ! and sensors easily become loosened from the battery clip ! and often causing the fault above. ! \item the solder-on antenna becomes stressed from ! repeated repositioning and breaks off from the mote often. ! \end{itemize} ! ! In addition, the current mechanical package does not support for ! mounting. It is nearly impossible to secure a bare mote to a tree or ! a wooden post. Even in an indoor environment, the only common method ! of mounting a mote is by using Velcro (trademark) or other two-sided ! adhesive, and still many of the aforementioned problems occur. \section{Design Objectives} + Early on we identified the following design objectives in a mounting chassis: + \begin{itemize} + \item Tool-less; requires only hands and possibly a coin to open, disassemble, reassemble (rapid and simple) + \item Separation of modular components: sensing, power, mote, antennas + \item Wiring harness to separate power connection + \item battery cage design to accommodate different battery candidates + \item Supports mounting by: screw, strap, zip-tie, magnet + \item Injection moldable for low-cost high-volume production + \end{itemize} \section{Design for Assembly} + >>Boothroyd references -mounting mote onto chassis; supporting edge connectors + -using wiring harness to connect power to mote -pyramid assembly + -using standoffs as thumbnuts + -chamfers on the battery clip *************** *** 212,216 **** first each time, then this idea of using rechargeable batteries would not be that much more convenient than ! having to replace the AAs. Moreover, if the batteries were to only be used for motes, then they would never be completely discharged. Luckily, Li-Ion batteries do not have this effect, and it is even recommended that only partial discharges be made before recharging them. --- 269,275 ---- first each time, then this idea of using rechargeable batteries would not be that much more convenient than ! having to replace the AAs. Moreover, if the batteries ! were to only be used for motes, then they would never be ! completely discharged. Luckily, Li-Ion batteries do not have this effect, and it is even recommended that only partial discharges be made before recharging them. *************** *** 227,238 **** ! Currently we are using 3.7V, 600mAh Li-Ion rechargeable batteries, manufactured by Ultralife Batteries, Inc. Unlike normal rechargeable batteries that are found in electronic devices, these OEM batteries do not have connectors on them already, only two wires with positive and negative polarities. What this means is that we also have to decide on the type of connector to use. Judging from the amount of difficulty we have had with the Molex 51021-0200 crimp housings, it would be nice if some other sort of connector could be used, especially a larger one, since the battery wires are larger than the ones used to attach the battery case to the Molex power connector on the board. ! (to be continued...) ! Ideally, it would be nice if we could use the one connector for the entire mote. This would leave us with three options: use the molex power connector, the adaptor jack, or a mini-USB jack. \section{Mounting} -strapping (velcro, zip-tie) -hooks -magnets --- 286,311 ---- ! Currently we are using 3.7V, 600mAh Li-Ion rechargeable batteries, ! manufactured by Ultralife Batteries, Inc. Unlike normal rechargeable ! batteries that are found in electronic devices, these OEM batteries do ! not have connectors on them already, only two wires with positive and ! negative polarities. What this means is that we also have to decide ! on the type of connector to use. Judging from the amount of ! difficulty we have had with the Molex 51021-0200 crimp housings, it ! would be nice if some other sort of connector could be used, ! especially a larger one, since the battery wires are larger than the ! ones used to attach the battery case to the Molex power connector on ! the board. (to be continued...) ! Ideally, it would be nice if we could use the one connector for the ! entire mote. This would leave us with three options: use the molex ! power connector, the adaptor jack, or a mini-USB jack. \section{Mounting} + -strapping (velcro, zip-tie) + -hooks + -magnets *************** *** 240,246 **** --- 313,323 ---- -straight-pull design + -avoiding undercuts + -constant wall thickness to avoid shrinkage + -shelled design + -strapping slots ribbed for rigidity |
From: David M. D. <do...@us...> - 2005-09-20 00:57:17
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPS3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11230 Modified Files: TestMTS400M.nc Log Message: Deleted more cpp stuff. Index: TestMTS400M.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/apps/GPS3/TestMTS400M.nc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestMTS400M.nc 20 Sep 2005 00:20:55 -0000 1.2 --- TestMTS400M.nc 20 Sep 2005 00:57:04 -0000 1.3 *************** *** 214,262 **** ! // send message to the GPS to enable VTG messages on a 1 second cycle ! task void enableNMEAmessage() { ! #if 0 ! readStep_t localStep; ! atomic localStep = readStep; ! if (localStep != GPS_REQUESTED) { ! // Wait until GPS is safely on ! post enableNMEAmessage(); ! return; ! }; ! #endif ! if ( call GpsSend.send((char *)NMEA_ENABLE , NMEA_ENABLE_LENGTH) == SUCCESS) { ! SODbg(DBG_USR2,"GPS ENable NMEA\n"); ! return; ! }; ! post enableNMEAmessage(); return; ! } ! event result_t GpsSend.sendDone(uint8_t *sendPtr, result_t status) { ! //#if NMEA_MESSAGE_TESTING ! // SODbg(DBG_USR2, "GPS %s commanded: %s",((status == SUCCESS) ? "OK" : "FAIL"),(char *)sendPtr); ! //#endif ! return SUCCESS; ! } ! //#if NMEA_MESSAGE_TESTING ! task void disableNMEAmessage() { ! #if 0 ! readStep_t localStep; ! atomic localStep = readStep; ! if (localStep != GPS_REQUESTED) { ! // Wait until GPS is safely on ! post enableNMEAmessage(); ! return; ! }; ! #endif ! if ( call GpsSend.send(NMEA_DISABLE, NMEA_DISABLE_LENGTH) == SUCCESS) { ! SODbg(DBG_USR2,"GPS DISable NMEA\n"); ! return; ! } ! post disableNMEAmessage(); return; ! } --- 214,246 ---- ! // send message to the GPS to enable VTG messages on a 1 second cycle ! task void enableNMEAmessage() { ! ! if ( call GpsSend.send((char *)NMEA_ENABLE , NMEA_ENABLE_LENGTH) == SUCCESS) { ! SODbg(DBG_USR2,"GPS ENable NMEA\n"); return; ! }; ! post enableNMEAmessage(); ! return; ! } ! event result_t GpsSend.sendDone(uint8_t *sendPtr, result_t status) { ! //#if NMEA_MESSAGE_TESTING ! // SODbg(DBG_USR2, "GPS %s commanded: %s",((status == SUCCESS) ? "OK" : "FAIL"),(char *)sendPtr); ! //#endif ! return SUCCESS; ! } ! ! task void disableNMEAmessage() { ! ! if ( call GpsSend.send(NMEA_DISABLE, NMEA_DISABLE_LENGTH) == SUCCESS) { ! SODbg(DBG_USR2,"GPS DISable NMEA\n"); return; ! } ! post disableNMEAmessage(); ! return; ! } |
From: David M. D. <do...@us...> - 2005-09-20 00:21:05
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPS3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3484 Modified Files: TestMTS400M.nc Log Message: more cleanup. Index: TestMTS400M.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/apps/GPS3/TestMTS400M.nc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestMTS400M.nc 19 Sep 2005 22:34:44 -0000 1.1 --- TestMTS400M.nc 20 Sep 2005 00:20:55 -0000 1.2 *************** *** 72,78 **** // turn on or off one of the GPS messages. This allows testing to see // if messages are making it out to the GPS. - #ifndef NMEA_MESSAGE_TESTING - #define NMEA_MESSAGE_TESTING 0 - #endif --- 72,75 ---- *************** *** 110,130 **** } - #if NMEA_MESSAGE_TESTING - // Test code to determine if messages can be sent to the GPS. MJNewman - // 15Aug05 - //#define NMEA_ENABLE "$PSRF103,05,00,01,01*20\r\n" //VTG on - //#define NMEA_DISABLE "$PSRF103,05,00,00,01*21\r\n" //VTG off - //#define NMEA_ENABLE "$PSRF103,00,00,02,01*26\r\n" //GGA on 2 sec - //#define NMEA_ENABLE "$PSRF103,00,00,08,01*2C\r\n" //GGA on 8 sec ! #define NMEA_ENABLE "\r\n\r\n$PSRF103,01,00,01,01*24\r\n" //GLL on ! #define NMEA_ENABLE_LENGTH strlen(NMEA_ENABLE) ! #define NMEA_DISABLE "\r\n\r\n$PSRF103,01,00,00,01*25\r\n" //GLL off ! #define NMEA_DISABLE_LENGTH strlen(NMEA_DISABLE) - #if 0 #define CHANGE_TO_SIRF_MODE "$PSRF100,0,4800,8,1,0*0F\r\n" #define CHANGE_TO_SIRF_LENGTH strlen(CHANGE_TO_SIRF_MODE) ! static const uint8_t const CHANGE_TO_NMEA_MODE[] = { 0xA0, 0xA2, --- 107,131 ---- } ! // Test code to determine if messages can be sent to the GPS. MJNewman ! // 15Aug05 ! #define VTG_ON "$PSRF103,05,00,01,01*20\r\n" //VTG on ! #define VTG_ON_LENGTH strlen(VTG_ON) ! #define VTG_OFF "$PSRF103,05,00,00,01*21\r\n" //VTG off ! #define VTG_OFF_LENGTH strlen(VTG_OFF) ! ! ! //#define NMEA_ENABLE "$PSRF103,00,00,02,01*26\r\n" //GGA on 2 sec ! //#define NMEA_ENABLE "$PSRF103,00,00,08,01*2C\r\n" //GGA on 8 sec ! ! #define GLL_ON "\r\n\r\n$PSRF103,01,00,01,01*24\r\n" //GLL on ! #define GLL_ON_LENGTH strlen(GLL_ON) ! #define GLL_OFF "\r\n\r\n$PSRF103,01,00,00,01*25\r\n" //GLL off ! #define GLL_OFF_LENGTH strlen(GLL_OFF) ! #define CHANGE_TO_SIRF_MODE "$PSRF100,0,4800,8,1,0*0F\r\n" #define CHANGE_TO_SIRF_LENGTH strlen(CHANGE_TO_SIRF_MODE) ! static const uint8_t CHANGE_TO_NMEA_MODE[] = { 0xA0, 0xA2, *************** *** 165,169 **** #define NMEA_DISABLE CHANGE_TO_SIRF_MODE #define NMEA_DISABLE_LENGTH strlen(CHANGE_TO_SIRF_MODE) ! #endif // send message to the GPS to enable VTG messages on a 1 second cycle --- 166,216 ---- #define NMEA_DISABLE CHANGE_TO_SIRF_MODE #define NMEA_DISABLE_LENGTH strlen(CHANGE_TO_SIRF_MODE) ! ! ! ! task void gll_on() { ! ! if ( call GpsSend.send((char *)GLL_ON , GLL_ON_LENGTH) == SUCCESS) { ! SODbg(DBG_USR2,"GLL ON\n"); ! return; ! }; ! post gll_on(); ! return; ! } ! ! task void gll_off() { ! ! if ( call GpsSend.send(GLL_OFF, GLL_OFF_LENGTH) == SUCCESS) { ! SODbg(DBG_USR2,"GLL OFF\n"); ! return; ! } ! post gll_off(); ! return; ! ! } ! ! ! ! task void vtg_on() { ! ! if ( call GpsSend.send((char *)VTG_ON , VTG_ON_LENGTH) == SUCCESS) { ! SODbg(DBG_USR2,"VTG ON\n"); ! return; ! }; ! post vtg_on(); ! return; ! } ! ! task void vtg_off() { ! ! if ( call GpsSend.send(VTG_OFF, VTG_OFF_LENGTH) == SUCCESS) { ! SODbg(DBG_USR2,"VTG OFF\n"); ! return; ! } ! post vtg_off(); ! return; ! ! } ! // send message to the GPS to enable VTG messages on a 1 second cycle *************** *** 185,198 **** return; } ! #endif event result_t GpsSend.sendDone(uint8_t *sendPtr, result_t status) { ! #if NMEA_MESSAGE_TESTING // SODbg(DBG_USR2, "GPS %s commanded: %s",((status == SUCCESS) ? "OK" : "FAIL"),(char *)sendPtr); ! #endif return SUCCESS; } ! #if NMEA_MESSAGE_TESTING task void disableNMEAmessage() { #if 0 --- 232,245 ---- return; } ! event result_t GpsSend.sendDone(uint8_t *sendPtr, result_t status) { ! //#if NMEA_MESSAGE_TESTING // SODbg(DBG_USR2, "GPS %s commanded: %s",((status == SUCCESS) ? "OK" : "FAIL"),(char *)sendPtr); ! //#endif return SUCCESS; } ! //#if NMEA_MESSAGE_TESTING task void disableNMEAmessage() { #if 0 *************** *** 212,216 **** return; } ! #endif command result_t StdControl.init() { --- 259,263 ---- return; } ! command result_t StdControl.init() { *************** *** 233,236 **** --- 280,284 ---- call GpsControl.start(); + call Timer.start(TIMER_REPEAT, TIMER_PERIOD); //start up sensor measurements return SUCCESS; *************** *** 290,305 **** }; call Leds.redToggle(); ! #if NMEA_MESSAGE_TESTING { static uint8_t cycleCount; cycleCount += 1; if (cycleCount == 5) { ! SODbg(DBG_USR2, "Trying NMEA On\n"); ! post enableNMEAmessage(); return SUCCESS; }; if (cycleCount == 30) { ! SODbg(DBG_USR2, "Trying NMEA OFF\n"); ! post disableNMEAmessage(); return SUCCESS; }; --- 338,357 ---- }; call Leds.redToggle(); ! { static uint8_t cycleCount; cycleCount += 1; if (cycleCount == 5) { ! //SODbg(DBG_USR2, "Trying NMEA On\n"); ! //post enableNMEAmessage(); ! SODbg(DBG_USR2, "Trying GLL On\n"); ! post gll_on(); return SUCCESS; }; if (cycleCount == 30) { ! //SODbg(DBG_USR2, "Trying NMEA OFF\n"); ! //post disableNMEAmessage(); ! SODbg(DBG_USR2, "Trying GLL OFF\n"); ! post gll_off(); return SUCCESS; }; *************** *** 308,312 **** }; } ! #endif // NMEA_MESSAGE_TESTING return SUCCESS; } --- 360,364 ---- }; } ! return SUCCESS; } |
From: David M. D. <do...@us...> - 2005-09-19 22:35:12
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPS3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12170 Added Files: SODebug.h sensorboardApp.h Log Message: NMEA testing. --- NEW FILE: SODebug.h --- // printf style output for debugging // // Copyright (c) 2004 by Sensicast, Inc. // All rights including that of resale granted to Crossbow, Inc. // // Permission to use, copy, modify, and distribute this software and its // documentation for any purpose, without fee, and without written // agreement is hereby granted, provided that the above copyright // notice, the (updated) modification history and the author appear in // all copies of this source code. // // Permission is also granted to distribute this software under the // standard BSD license as contained in the TinyOS distribution. // // @Author: Michael Newman // #ifndef SOdebugEdit #define SOdebugEdit 1 // // Modification History: // 25Jan04 MJNewman 1: Created. #include <stdarg.h> //turn off debug output by default #ifndef SO_DEBUG #define SO_DEBUG 0 #endif // Assume we are not a dot by default #ifndef SO_DEBUG_DOT #define SODEBUG_DOT 0 #endif // Most of this module is off unless enabled #if (SO_DEBUG) //#include <stdio.h> // This varaiable is shared by many possible users of SOdebug. // The rest of the code is duplicated!. static const char hex[] = "0123456789ABCDEF"; #if (!SO_DEBUG_DOT) //init comm port (57.6K baud, mica2 only, use 19K baud for mica2dot, mica....) for debug // TinyOS is using 57.6K and seems to reset the baud rate periodically. // Use only 57.6K baud unless TinyOS is sorted out. static void init_debug(){ atomic { outp(0,UBRR0H); #if 1 // 56K with 0% error clock is 7.3728Mhz outp(15, UBRR0L); //set baud rate outp((1<<U2X),UCSR0A); // Set UART double speed #else // 19.K with 0% error clock is 7.3728Mhz outp(47, UBRR0L); //set baud rate outp((1<<U2X),UCSR0A); // Set UART double speed #endif outp(((1 << UCSZ1) | (1 << UCSZ0)) , UCSR0C); // Set frame format: 8 data-bits, 1 stop-bit inp(UDR0); outp((1 << TXEN) ,UCSR0B); // Enable uart reciever and transmitter } } #else //init comm port (19K baud) for mica2dot for debug static void init_debug(){ atomic { outp(0,UBRR0H); // Set baudrate to 19.2 KBps outp(12, UBRR0L); outp(0,UCSR0A); // Disable U2X and MPCM outp(((1 << UCSZ1) | (1 << UCSZ0)) , UCSR0C); inp(UDR0); outp((1 << TXEN) ,UCSR0B); } } #endif // output a char to the uart void UARTPutChar(char c) { if (c == '\n') { loop_until_bit_is_set(UCSR0A, UDRE); outb(UDR0,'\r'); loop_until_bit_is_set(UCSR0A, TXC); }; loop_until_bit_is_set(UCSR0A, UDRE); outb(UDR0,c); loop_until_bit_is_set(UCSR0A, TXC); return; } // Simplified printf int printf(const uint8_t *format, ...) { static bool debugStarted; uint8_t format_flag; uint32_t u_val=0; uint32_t div_val; uint8_t base; uint8_t *ptr; bool longNumber = FALSE; bool temp; va_list ap; va_start (ap, format); atomic temp = debugStarted; if (!temp) { init_debug(); atomic debugStarted = 1; }; if (format == NULL) format = "NULL\n"; for (;;) /* Until full format string read */ { if (!longNumber) { // Assume char after %l is d or xX while ((format_flag = *format++) != '%') /* Until '%' or '\0' */ { if (!format_flag) { return 0; // not bothering with count of chars output }; UARTPutChar(format_flag); }; }; switch (format_flag = *format++) { case 'c': format_flag = va_arg(ap, int); default: UARTPutChar(format_flag); continue; case 'S': case 's': ptr = va_arg(ap,char *); while ((format_flag = *ptr++)) { UARTPutChar(format_flag); }; continue; #if 0 case 't': { #define SECONDS_IN_ONE_DAY 86400 base = 10; if (currentSeconds/86400) {//print days div_val = 10000; u_val = currentSeconds/SECONDS_IN_ONE_DAY; do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); UARTPutChar(' '); UARTPutChar('d'); UARTPutChar('a'); UARTPutChar('y'); UARTPutChar('s'); UARTPutChar(' '); } // //hours div_val = 10; u_val = (currentSeconds % 86400)/3600; do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); UARTPutChar(':'); // //minutes div_val = 10; u_val = (INT16)((currentSeconds % 86400)%3600)/60; do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); UARTPutChar(':'); // //seconds div_val = 10; u_val = (INT16)(currentSeconds%60); do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); } continue; #endif // 't' time output case 'l': longNumber = TRUE; continue; case 'o': base = 8; if (!longNumber) div_val = 0x8000; else div_val = 0x40000000; goto CONVERSION_LOOP; case 'u': case 'i': case 'd': base = 10; if (!longNumber) div_val = 10000; else div_val = 1000000000; goto CONVERSION_LOOP; case 'x': base = 16; if (!longNumber) div_val = 0x1000; else div_val = 0x10000000; CONVERSION_LOOP: { if (!longNumber) u_val = va_arg(ap,int); else u_val = va_arg(ap,long); if ((format_flag == 'd') || (format_flag == 'i')) { bool isNegative; if (!longNumber) isNegative = (((int)u_val) < 0); else isNegative = (((long)u_val) < 0); if (isNegative) { u_val = - u_val; UARTPutChar('-'); }; while (div_val > 1 && div_val > u_val) { div_val /= 10; }; } // truncate signed values to a 16 bits for hex output if ((format_flag == 'x') && (!longNumber)) u_val &= 0xffff; do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); longNumber = FALSE; }; break; }; }; } #endif // SO_DEBUG #define SO_NO_DEBUG 0 #if (SO_DEBUG) #define SODbg(__x,__args...) { \ char bStatus; \ if(__x != SO_NO_DEBUG){ \ bStatus=bit_is_set(SREG,7); \ cli(); \ printf(__args); \ if (bStatus) sei(); \ }; \ } #else #define SODbg(__x,__args...) #endif #endif //SOdebugEdit --- NEW FILE: sensorboardApp.h --- // $Id: sensorboardApp.h,v 1.1 2005/09/19 22:35:03 doolin Exp $ #ifndef SENSORBOARDAPP_H #define SENSORBOARDAPP_H #include "NMEA.h" typedef struct XSensorHeader { uint8_t board_id; uint8_t packet_id; // 3 uint8_t node_id; uint8_t rsvd; }__attribute__ ((packed)) XSensorHeader; typedef struct GGAMsg { uint8_t hour; uint8_t minute; uint8_t lat_deg; uint8_t long_deg; uint32_t dec_sec; uint32_t lat_dec_min; uint32_t long_dec_min; uint8_t nsewind; uint8_t fixed; } __attribute__ ((packed)) GGAMsg; typedef struct XSensorMTS400DataMsg { uint16_t vref; uint16_t humidity; uint16_t temperature; uint16_t cal_wrod1; uint16_t cal_wrod2; uint16_t cal_wrod3; uint16_t cal_wrod4; uint16_t intersematemp; uint16_t pressure; uint16_t taoch0; uint16_t taoch1; uint16_t accel_x; uint16_t accel_y; } __attribute__ ((packed)) XSensorMTS400DataMsg; enum { AM_XSXMSG = 0, }; typedef struct weather_data { uint16_t vref; uint16_t humidity; uint16_t temperature; uint16_t cal_word1; uint16_t cal_word2; uint16_t cal_word3; uint16_t cal_word4; uint16_t intersematemp; uint16_t pressure; uint16_t taosch0; uint16_t taosch1; } Weather_Data; enum { AM_WEATHER_DATA = 251, }; typedef struct XDataMsg { XSensorHeader xSensorHeader; union { XSensorMTS400DataMsg data1; GGAMsg dataGps; GGA_Data gga_data; Weather_Data weather_data; }xData; } __attribute__ ((packed)) XDataMsg; #endif /* SENSORBOARDAPP_H */ |
From: David M. D. <do...@us...> - 2005-09-19 22:34:52
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPS3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12108 Added Files: .cvsignore Makefile README TestMTS400.nc TestMTS400M.nc Log Message: NMEA testing. --- NEW FILE: TestMTS400M.nc --- /****************************************************************************** * Controls GPS for testing purposes. This is an isolated test of the * GPS. * * NOTES: * -Intersema pressure sensor control lines are shared with gps control lines * -Cannot enable gps rx/tx and intersema at same time * * Strategy: * 1. Turn on gps power and leave on * 2. Continuously report GPS packets as they come from the GPS. * 3. A timer fires periodically. When a counted number of timer events * occurs reconfigure the GPS by sending a message to the GPS. After an * additional counted number of timer events reconfigure the GPS back. * * "Copyright (c) 2005 The Regents of the University of California. * All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * 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 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * * Author: Michael Newman * * Modification History: * 8Sep05 MJNewman: Created. *****************************************************************************/ module TestMTS400M { provides interface StdControl; provides command result_t nmea_parse(); uses { //communication interface StdControl as CommControl; //gps // interface I2CSwitchCmds as GpsCmd; interface GpsCmd; interface StdControl as GpsControl; interface SendVarLenPacket as GpsSend; interface ReceiveMsg as GpsReceive; interface NMEA as nmea; interface Timer; interface Leds; } } implementation { #define TIMER_PERIOD 1000 // timer period in msec // Turn on to send a message every Minute or so that tell the GPS to // turn on or off one of the GPS messages. This allows testing to see // if messages are making it out to the GPS. #ifndef NMEA_MESSAGE_TESTING #define NMEA_MESSAGE_TESTING 0 #endif #define MIN(_a,_b) ((_a < _b) ? _a : _b) #include "SODebug.h" #include "gps.h" #include "NMEA.h" enum { GPSstateUnknown, GPSstateStart, GPSstatePowerOn, GPSstateReady, } GPSstate; static void dumpGPSstate() { switch (GPSstate) { default: case GPSstateUnknown: SODbg(DBG_USR2, "?GPSstate %d?\n",GPSstate); break; case GPSstateStart: SODbg(DBG_USR2,"GPSstateStart\n"); break; case GPSstatePowerOn: SODbg(DBG_USR2,"GPSstatePowerOn\n"); break; case GPSstateReady: SODbg(DBG_USR2,"GPSstateReady\n"); break; } return; } #if NMEA_MESSAGE_TESTING // Test code to determine if messages can be sent to the GPS. MJNewman // 15Aug05 //#define NMEA_ENABLE "$PSRF103,05,00,01,01*20\r\n" //VTG on //#define NMEA_DISABLE "$PSRF103,05,00,00,01*21\r\n" //VTG off //#define NMEA_ENABLE "$PSRF103,00,00,02,01*26\r\n" //GGA on 2 sec //#define NMEA_ENABLE "$PSRF103,00,00,08,01*2C\r\n" //GGA on 8 sec #define NMEA_ENABLE "\r\n\r\n$PSRF103,01,00,01,01*24\r\n" //GLL on #define NMEA_ENABLE_LENGTH strlen(NMEA_ENABLE) #define NMEA_DISABLE "\r\n\r\n$PSRF103,01,00,00,01*25\r\n" //GLL off #define NMEA_DISABLE_LENGTH strlen(NMEA_DISABLE) #if 0 #define CHANGE_TO_SIRF_MODE "$PSRF100,0,4800,8,1,0*0F\r\n" #define CHANGE_TO_SIRF_LENGTH strlen(CHANGE_TO_SIRF_MODE) static const uint8_t const CHANGE_TO_NMEA_MODE[] = { 0xA0, 0xA2, 0x00, 0x18, 0x81, 0x02, 0x01, 0x01, 0x00, 0x01, 0x05, 0x01, 0x05, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x12, 0xC0, 0x01, 0x6A, 0xB0, 0xB3 }; #define CHANGE_TO_NMEA_LENGTH sizeof(CHANGE_TO_NMEA_MODE) #define NMEA_ENABLE CHANGE_TO_NMEA_MODE #define NMEA_ENABLE_LENGTH CHANGE_TO_NMEA_LENGTH #define NMEA_DISABLE CHANGE_TO_SIRF_MODE #define NMEA_DISABLE_LENGTH strlen(CHANGE_TO_SIRF_MODE) #endif // send message to the GPS to enable VTG messages on a 1 second cycle task void enableNMEAmessage() { #if 0 readStep_t localStep; atomic localStep = readStep; if (localStep != GPS_REQUESTED) { // Wait until GPS is safely on post enableNMEAmessage(); return; }; #endif if ( call GpsSend.send((char *)NMEA_ENABLE , NMEA_ENABLE_LENGTH) == SUCCESS) { SODbg(DBG_USR2,"GPS ENable NMEA\n"); return; }; post enableNMEAmessage(); return; } #endif event result_t GpsSend.sendDone(uint8_t *sendPtr, result_t status) { #if NMEA_MESSAGE_TESTING // SODbg(DBG_USR2, "GPS %s commanded: %s",((status == SUCCESS) ? "OK" : "FAIL"),(char *)sendPtr); #endif return SUCCESS; } #if NMEA_MESSAGE_TESTING task void disableNMEAmessage() { #if 0 readStep_t localStep; atomic localStep = readStep; if (localStep != GPS_REQUESTED) { // Wait until GPS is safely on post enableNMEAmessage(); return; }; #endif if ( call GpsSend.send(NMEA_DISABLE, NMEA_DISABLE_LENGTH) == SUCCESS) { SODbg(DBG_USR2,"GPS DISable NMEA\n"); return; } post disableNMEAmessage(); return; } #endif command result_t StdControl.init() { atomic { GPSstate = GPSstateStart; } call Leds.init(); call Leds.greenOn(); call GpsControl.init(); SODbg(DBG_USR2,"InitComplete\n"); return SUCCESS; } command result_t StdControl.start() { SODbg(DBG_USR2,"Starting GPS\n"); call GpsControl.start(); call Timer.start(TIMER_REPEAT, TIMER_PERIOD); //start up sensor measurements return SUCCESS; } static void dumpGPSmsg(char *string,int length) { #if 1 if (string[0] == '$') { // echo the GPS message int i; for (i=0;i < length;i += 1) { SODbg(DBG_USR2, "%c",string[i]); if (string[i] == '*') break; }; SODbg(DBG_USR2, "\n"); }; #endif return; } command result_t StdControl.stop() { call GpsControl.stop(); call GpsCmd.TxRxSwitch(0); // ???timing of switch setting call GpsCmd.PowerSwitch(0); call Timer.stop(); call CommControl.stop(); return SUCCESS; } /****************************************************************************** * Timer fired, test GPS, humidity/temp * async for test only *****************************************************************************/ event result_t Timer.fired() { switch (GPSstate) { default: case GPSstateUnknown: dumpGPSstate(); GPSstate = GPSstateStart; //... case GPSstateStart: SODbg(DBG_USR2, "Turn GPS power ON\n"); if (call GpsCmd.PowerSwitch(1) != SUCCESS) { SODbg(DBG_USR2, "PowerSwitch failed wait for retry\n"); }; return SUCCESS; case GPSstatePowerOn: SODbg(DBG_USR2, "Turn GPS switches ON\n"); if (call GpsCmd.TxRxSwitch(1) != SUCCESS) { SODbg(DBG_USR2, "TxRxSwitch failed wait for retry\n"); }; return SUCCESS; case GPSstateReady: break; }; call Leds.redToggle(); #if NMEA_MESSAGE_TESTING { static uint8_t cycleCount; cycleCount += 1; if (cycleCount == 5) { SODbg(DBG_USR2, "Trying NMEA On\n"); post enableNMEAmessage(); return SUCCESS; }; if (cycleCount == 30) { SODbg(DBG_USR2, "Trying NMEA OFF\n"); post disableNMEAmessage(); return SUCCESS; }; if (cycleCount >= 60) { cycleCount = 0; }; } #endif // NMEA_MESSAGE_TESTING return SUCCESS; } // TODO: Move this into the NMEA module. command result_t nmea_parse() { #if 0 if (is_gga_string_m(leadtek_string)) { call nmea.gga_parse(gga_data_ptr, leadtek_string); } else if (is_gsa_string(pGPSdata->data)) { call nmea.gsa_parse(gsa_data_ptr, leadtek_string); } else if (is_gva_string(data)) { call nmea.gsv_parse(gsv_data_ptr, leadtek_string); } else if (is_gll_string(data)) { call nmea.gll_parse(gll_data_ptr, leadtek_string); } else if (is_rmc_string(data)) { call nmea.rmc_parse(rmc_data_ptr, leadtek_string); } else if (is_vtg_string(data)) { call nmea.vtg_parse(vtg_data_ptr, leadtek_string); } else if (is_mss_string(data)) { call nmea.mss_parse(mss_data_ptr, leadtek_string); } else if (is_ltc_string(data)) { call nmea.ltc_parse(ltc_data_ptr, leadtek_string); } else { // signal error }; #endif return SUCCESS; } // When a packet is received from the GPS we retain a pointer to // that packet and hand a pointer to another buffer back to the // lower level. Each sucessive message swaps buffers, establishing // a double buffering scheme. static GPS_Msg gpsData; // contributed buffer for double buffering static GPS_Msg *pGPSdata = &gpsData; // buffer to dump // Report and handle the content of a message that came in from the // GPS and is stored inpGGAdata. task void handleGPSmessage() { char * leadtek_string; // if gps have been scaned then stop receiving gps uart packet leadtek_string = pGPSdata->data; if (leadtek_string[0] == '$') { dumpGPSmsg(leadtek_string,MIN(sizeof(pGPSdata->data),pGPSdata->length)); call nmea_parse(); }; if (leadtek_string[0] == (char)0xA0) { #if 1 //??? remove when the rest of the Sirf code is available SODbg(DBG_USR2,"SIRF Packet\n"); #else uint8_t sirftype; sirftype = sirf.get_type(data); switch sirftype { case SIRF2: call sirf.id2_parse(leadtek_string); break; case SIRF28: call sirf.id28_parse(leadtek_string); break; default: // Unexpected SIRF type, this might be normal it // also might want to signal an error. break; }; #endif }; } // A gps message has been collected from the receiver. Log it and // set off a task to report it. // // Inputs: // pData really a pointer to a GGA_data block // Returns: // new buffer for lower level to use event TOS_MsgPtr GpsReceive.receive(TOS_MsgPtr pData) { GPS_Msg *pTemp; pTemp = pGPSdata; pGPSdata = (GPS_Msg *)pData; post handleGPSmessage(); return (TOS_MsgPtr)pTemp; } // Log the power condition reported by the GPS so we can test it // later. event result_t GpsCmd.PowerSet(uint8_t PowerState){ SODbg(DBG_USR2,"GPS power %s\n",(PowerState) ? "ON" : "OFF"); if (PowerState) { GPSstate += 1; }; dumpGPSstate(); return SUCCESS; } event result_t GpsCmd.TxRxSet(uint8_t rtstate) { // gps tx/rx switches set to on or off SODbg(DBG_USR2,"GPS switches %s\n",(rtstate) ? "ON" : "OFF"); if (rtstate) { GPSstate += 1; }; dumpGPSstate(); return SUCCESS; } } --- NEW FILE: TestMTS400.nc --- /****************************************************************************** * Controls GPS for testing purposes. This is an isolated test of the * GPS. See discussion in TestMTS400M.nc for more info on operational * strategy. * * "Copyright (c) 2005 The Regents of the University of California. * All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * 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 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * * Author: Michael Newman * * Modification History: * 8Sep05 MJNewman: Created. *****************************************************************************/ includes sensorboardApp; configuration TestMTS400 { } implementation { components Main, TestMTS400M, MicaWbSwitch, GenericComm as Comm, TimerC, Voltage, NMEAC, LedsC, UARTGpsPacket, ADCC; Main.StdControl -> TestMTS400M; Main.StdControl -> TimerC; TestMTS400M.CommControl -> Comm; // Wiring for gps TestMTS400M.GpsControl -> UARTGpsPacket; TestMTS400M.GpsSend -> UARTGpsPacket.SendVar; TestMTS400M.GpsReceive -> UARTGpsPacket; TestMTS400M.GpsCmd -> UARTGpsPacket.GpsCmd; //UARTGpsPacket.GpsCmd; TestMTS400M.Leds -> LedsC; TestMTS400M.Timer -> TimerC.Timer[unique("Timer")]; TestMTS400M.nmea -> NMEAC; } --- NEW FILE: Makefile --- include ../Makelocal COMPONENT=TestMTS400 SENSORBOARD=mts400 #MSG_SIZE=120 XBOWROOT=$(TOSROOT)/contrib/xbow/tos CWD = $(shell pwd) FIREBOARDROOT=$(CWD)/../../.. PFLAGS = -I$(XBOWROOT)/interfaces PFLAGS += -I$(XBOWROOT)/system PFLAGS += -I$(XBOWROOT)/platform/$(PLATFORM) #PFLAGS += -I$(XBOWROOT)/AXStack/$(PLATFORM) #PFLAGS += -I$(XBOWROOT)/lib PFLAGS += -I$(FIREBOARDROOT)/beta/tos/sensorboards/$(SENSORBOARD) PFLAGS += -I$(FIREBOARDROOT)/beta/tos/sensorboards/$(SENSORBOARD)/GPS PFLAGS += -I$(FIREBOARDROOT)/interfaces # control debugging printfs 1 is on 0 is off PFLAGS += -DSO_DEBUG=1 #PFLAGS += -DFEATURE_GPS_ONLY=1 #PFLAGS += -DNMEA_MESSAGE_TESTING=0 #include ../MakeXbowlocal #include ${TOSROOT}/tools/make/Makerules include ${TOSROOT}/apps/Makerules --- NEW FILE: .cvsignore --- build *~ --- NEW FILE: README --- README Description: Test the observation of GPS data from the MTS400 in isolation from other sensors on that board. Also test the ability to send commands to the GPS. |
From: David M. D. <do...@us...> - 2005-09-19 22:34:14
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPS3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12009/GPS3 Log Message: Directory /cvsroot/firebug/fireboard/beta/apps/GPS3 added to the repository |
From: David M. D. <do...@us...> - 2005-09-19 22:33:31
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPS2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11916 Modified Files: Makefile TestMTS400M.nc Added Files: .cvsignore Log Message: More clean up. Index: TestMTS400M.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/apps/GPS2/TestMTS400M.nc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestMTS400M.nc 19 Sep 2005 21:36:55 -0000 1.2 --- TestMTS400M.nc 19 Sep 2005 22:33:23 -0000 1.3 *************** *** 258,262 **** call GpsCmd.TxRxSwitch(0); // ???timing of switch setting call GpsCmd.PowerSwitch(0); - call Timer.stop(); call CommControl.stop(); --- 258,261 ---- *************** *** 351,356 **** static GPS_Msg *pGPSdata = &gpsData; // buffer to dump - - // Report and handle the content of a message that came in from the // GPS and is stored inpGGAdata. --- 350,353 ---- *************** *** 429,430 **** --- 426,428 ---- } + --- NEW FILE: .cvsignore --- build *~ Index: Makefile =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/apps/GPS2/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 19 Sep 2005 17:41:05 -0000 1.1 --- Makefile 19 Sep 2005 22:33:23 -0000 1.2 *************** *** 22,27 **** # control debugging printfs 1 is on 0 is off PFLAGS += -DSO_DEBUG=1 ! PFLAGS += -DFEATURE_GPS_ONLY=1 ! PFLAGS += -DNMEA_MESSAGE_TESTING=1 #include ../MakeXbowlocal #include ${TOSROOT}/tools/make/Makerules --- 22,27 ---- # control debugging printfs 1 is on 0 is off PFLAGS += -DSO_DEBUG=1 ! #PFLAGS += -DFEATURE_GPS_ONLY=1 ! #PFLAGS += -DNMEA_MESSAGE_TESTING=0 #include ../MakeXbowlocal #include ${TOSROOT}/tools/make/Makerules |
From: David M. D. <do...@us...> - 2005-09-19 21:37:04
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPS2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30018 Modified Files: TestMTS400M.nc Log Message: Removed some cpp defines, refactored nmea handling code. Index: TestMTS400M.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/apps/GPS2/TestMTS400M.nc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestMTS400M.nc 19 Sep 2005 17:41:05 -0000 1.1 --- TestMTS400M.nc 19 Sep 2005 21:36:55 -0000 1.2 *************** *** 42,45 **** --- 42,48 ---- module TestMTS400M { provides interface StdControl; + provides command result_t nmea_parse(); + + uses { *************** *** 311,314 **** --- 314,347 ---- + + // TODO: Move this into the NMEA module. + command result_t nmea_parse() { + + #if 0 + if (is_gga_string_m(leadtek_string)) { + call nmea.gga_parse(gga_data_ptr, leadtek_string); + } else if (is_gsa_string(pGPSdata->data)) { + call nmea.gsa_parse(gsa_data_ptr, leadtek_string); + } else if (is_gva_string(data)) { + call nmea.gsv_parse(gsv_data_ptr, leadtek_string); + } else if (is_gll_string(data)) { + call nmea.gll_parse(gll_data_ptr, leadtek_string); + } else if (is_rmc_string(data)) { + call nmea.rmc_parse(rmc_data_ptr, leadtek_string); + } else if (is_vtg_string(data)) { + call nmea.vtg_parse(vtg_data_ptr, leadtek_string); + } else if (is_mss_string(data)) { + call nmea.mss_parse(mss_data_ptr, leadtek_string); + } else if (is_ltc_string(data)) { + call nmea.ltc_parse(ltc_data_ptr, leadtek_string); + } else { + // signal error + }; + #endif + return SUCCESS; + } + + + // When a packet is received from the GPS we retain a pointer to // that packet and hand a pointer to another buffer back to the *************** *** 318,321 **** --- 351,356 ---- static GPS_Msg *pGPSdata = &gpsData; // buffer to dump + + // Report and handle the content of a message that came in from the // GPS and is stored inpGGAdata. *************** *** 327,352 **** if (leadtek_string[0] == '$') { dumpGPSmsg(leadtek_string,MIN(sizeof(pGPSdata->data),pGPSdata->length)); ! ! #if 0 ! if (is_gga_string_m(leadtek_string)) { ! call nmea.gga_parse(gga_data_ptr, leadtek_string); ! } else if (is_gsa_string(pGPSdata->data)) { ! call nmea.gsa_parse(gsa_data_ptr, leadtek_string); ! } else if (is_gva_string(data)) { ! call nmea.gsv_parse(gsv_data_ptr, leadtek_string); ! } else if (is_gll_string(data)) { ! call nmea.gll_parse(gll_data_ptr, leadtek_string); ! } else if (is_rmc_string(data)) { ! call nmea.rmc_parse(rmc_data_ptr, leadtek_string); ! } else if (is_vtg_string(data)) { ! call nmea.vtg_parse(vtg_data_ptr, leadtek_string); ! } else if (is_mss_string(data)) { ! call nmea.mss_parse(mss_data_ptr, leadtek_string); ! } else if (is_ltc_string(data)) { ! call nmea.ltc_parse(ltc_data_ptr, leadtek_string); ! } else { ! // signal error ! }; ! #endif }; --- 362,366 ---- if (leadtek_string[0] == '$') { dumpGPSmsg(leadtek_string,MIN(sizeof(pGPSdata->data),pGPSdata->length)); ! call nmea_parse(); }; *************** *** 414,415 **** --- 428,430 ---- } + |
From: David M. D. <do...@us...> - 2005-09-19 17:41:18
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPS2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10324 Added Files: Makefile README SODebug.h TestMTS400.nc TestMTS400M.nc sensorboardApp.h Log Message: GPS test application code clean up. --- NEW FILE: SODebug.h --- // printf style output for debugging // // Copyright (c) 2004 by Sensicast, Inc. // All rights including that of resale granted to Crossbow, Inc. // // Permission to use, copy, modify, and distribute this software and its // documentation for any purpose, without fee, and without written // agreement is hereby granted, provided that the above copyright // notice, the (updated) modification history and the author appear in // all copies of this source code. // // Permission is also granted to distribute this software under the // standard BSD license as contained in the TinyOS distribution. // // @Author: Michael Newman // #ifndef SOdebugEdit #define SOdebugEdit 1 // // Modification History: // 25Jan04 MJNewman 1: Created. #include <stdarg.h> //turn off debug output by default #ifndef SO_DEBUG #define SO_DEBUG 0 #endif // Assume we are not a dot by default #ifndef SO_DEBUG_DOT #define SODEBUG_DOT 0 #endif // Most of this module is off unless enabled #if (SO_DEBUG) //#include <stdio.h> // This varaiable is shared by many possible users of SOdebug. // The rest of the code is duplicated!. static const char hex[] = "0123456789ABCDEF"; #if (!SO_DEBUG_DOT) //init comm port (57.6K baud, mica2 only, use 19K baud for mica2dot, mica....) for debug // TinyOS is using 57.6K and seems to reset the baud rate periodically. // Use only 57.6K baud unless TinyOS is sorted out. static void init_debug(){ atomic { outp(0,UBRR0H); #if 1 // 56K with 0% error clock is 7.3728Mhz outp(15, UBRR0L); //set baud rate outp((1<<U2X),UCSR0A); // Set UART double speed #else // 19.K with 0% error clock is 7.3728Mhz outp(47, UBRR0L); //set baud rate outp((1<<U2X),UCSR0A); // Set UART double speed #endif outp(((1 << UCSZ1) | (1 << UCSZ0)) , UCSR0C); // Set frame format: 8 data-bits, 1 stop-bit inp(UDR0); outp((1 << TXEN) ,UCSR0B); // Enable uart reciever and transmitter } } #else //init comm port (19K baud) for mica2dot for debug static void init_debug(){ atomic { outp(0,UBRR0H); // Set baudrate to 19.2 KBps outp(12, UBRR0L); outp(0,UCSR0A); // Disable U2X and MPCM outp(((1 << UCSZ1) | (1 << UCSZ0)) , UCSR0C); inp(UDR0); outp((1 << TXEN) ,UCSR0B); } } #endif // output a char to the uart void UARTPutChar(char c) { if (c == '\n') { loop_until_bit_is_set(UCSR0A, UDRE); outb(UDR0,'\r'); loop_until_bit_is_set(UCSR0A, TXC); }; loop_until_bit_is_set(UCSR0A, UDRE); outb(UDR0,c); loop_until_bit_is_set(UCSR0A, TXC); return; } // Simplified printf int printf(const uint8_t *format, ...) { static bool debugStarted; uint8_t format_flag; uint32_t u_val=0; uint32_t div_val; uint8_t base; uint8_t *ptr; bool longNumber = FALSE; bool temp; va_list ap; va_start (ap, format); atomic temp = debugStarted; if (!temp) { init_debug(); atomic debugStarted = 1; }; if (format == NULL) format = "NULL\n"; for (;;) /* Until full format string read */ { if (!longNumber) { // Assume char after %l is d or xX while ((format_flag = *format++) != '%') /* Until '%' or '\0' */ { if (!format_flag) { return 0; // not bothering with count of chars output }; UARTPutChar(format_flag); }; }; switch (format_flag = *format++) { case 'c': format_flag = va_arg(ap, int); default: UARTPutChar(format_flag); continue; case 'S': case 's': ptr = va_arg(ap,char *); while ((format_flag = *ptr++)) { UARTPutChar(format_flag); }; continue; #if 0 case 't': { #define SECONDS_IN_ONE_DAY 86400 base = 10; if (currentSeconds/86400) {//print days div_val = 10000; u_val = currentSeconds/SECONDS_IN_ONE_DAY; do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); UARTPutChar(' '); UARTPutChar('d'); UARTPutChar('a'); UARTPutChar('y'); UARTPutChar('s'); UARTPutChar(' '); } // //hours div_val = 10; u_val = (currentSeconds % 86400)/3600; do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); UARTPutChar(':'); // //minutes div_val = 10; u_val = (INT16)((currentSeconds % 86400)%3600)/60; do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); UARTPutChar(':'); // //seconds div_val = 10; u_val = (INT16)(currentSeconds%60); do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); } continue; #endif // 't' time output case 'l': longNumber = TRUE; continue; case 'o': base = 8; if (!longNumber) div_val = 0x8000; else div_val = 0x40000000; goto CONVERSION_LOOP; case 'u': case 'i': case 'd': base = 10; if (!longNumber) div_val = 10000; else div_val = 1000000000; goto CONVERSION_LOOP; case 'x': base = 16; if (!longNumber) div_val = 0x1000; else div_val = 0x10000000; CONVERSION_LOOP: { if (!longNumber) u_val = va_arg(ap,int); else u_val = va_arg(ap,long); if ((format_flag == 'd') || (format_flag == 'i')) { bool isNegative; if (!longNumber) isNegative = (((int)u_val) < 0); else isNegative = (((long)u_val) < 0); if (isNegative) { u_val = - u_val; UARTPutChar('-'); }; while (div_val > 1 && div_val > u_val) { div_val /= 10; }; } // truncate signed values to a 16 bits for hex output if ((format_flag == 'x') && (!longNumber)) u_val &= 0xffff; do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); longNumber = FALSE; }; break; }; }; } #endif // SO_DEBUG #define SO_NO_DEBUG 0 #if (SO_DEBUG) #define SODbg(__x,__args...) { \ char bStatus; \ if(__x != SO_NO_DEBUG){ \ bStatus=bit_is_set(SREG,7); \ cli(); \ printf(__args); \ if (bStatus) sei(); \ }; \ } #else #define SODbg(__x,__args...) #endif #endif //SOdebugEdit --- NEW FILE: TestMTS400.nc --- /****************************************************************************** * Controls GPS for testing purposes. This is an isolated test of the * GPS. See discussion in TestMTS400M.nc for more info on operational * strategy. * * "Copyright (c) 2005 The Regents of the University of California. * All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * 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 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * * Author: Michael Newman * * Modification History: * 8Sep05 MJNewman: Created. *****************************************************************************/ includes sensorboardApp; configuration TestMTS400 { } implementation { components Main, TestMTS400M, MicaWbSwitch, GenericComm as Comm, TimerC, Voltage, NMEAC, LedsC, UARTGpsPacket, ADCC; Main.StdControl -> TestMTS400M; Main.StdControl -> TimerC; TestMTS400M.CommControl -> Comm; // Wiring for gps TestMTS400M.GpsControl -> UARTGpsPacket; TestMTS400M.GpsSend -> UARTGpsPacket.SendVar; TestMTS400M.GpsReceive -> UARTGpsPacket; TestMTS400M.GpsCmd -> UARTGpsPacket.GpsCmd; //UARTGpsPacket.GpsCmd; TestMTS400M.Leds -> LedsC; TestMTS400M.Timer -> TimerC.Timer[unique("Timer")]; TestMTS400M.nmea -> NMEAC; } --- NEW FILE: Makefile --- include ../Makelocal COMPONENT=TestMTS400 SENSORBOARD=mts400 #MSG_SIZE=120 XBOWROOT=$(TOSROOT)/contrib/xbow/tos CWD = $(shell pwd) FIREBOARDROOT=$(CWD)/../../.. PFLAGS = -I$(XBOWROOT)/interfaces PFLAGS += -I$(XBOWROOT)/system PFLAGS += -I$(XBOWROOT)/platform/$(PLATFORM) #PFLAGS += -I$(XBOWROOT)/AXStack/$(PLATFORM) #PFLAGS += -I$(XBOWROOT)/lib PFLAGS += -I$(FIREBOARDROOT)/beta/tos/sensorboards/$(SENSORBOARD) PFLAGS += -I$(FIREBOARDROOT)/beta/tos/sensorboards/$(SENSORBOARD)/GPS PFLAGS += -I$(FIREBOARDROOT)/interfaces # control debugging printfs 1 is on 0 is off PFLAGS += -DSO_DEBUG=1 PFLAGS += -DFEATURE_GPS_ONLY=1 PFLAGS += -DNMEA_MESSAGE_TESTING=1 #include ../MakeXbowlocal #include ${TOSROOT}/tools/make/Makerules include ${TOSROOT}/apps/Makerules --- NEW FILE: TestMTS400M.nc --- /****************************************************************************** * Controls GPS for testing purposes. This is an isolated test of the * GPS. * * NOTES: * -Intersema pressure sensor control lines are shared with gps control lines * -Cannot enable gps rx/tx and intersema at same time * * Strategy: * 1. Turn on gps power and leave on * 2. Continuously report GPS packets as they come from the GPS. * 3. A timer fires periodically. When a counted number of timer events * occurs reconfigure the GPS by sending a message to the GPS. After an * additional counted number of timer events reconfigure the GPS back. * * "Copyright (c) 2005 The Regents of the University of California. * All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * 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 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * * Author: Michael Newman * * Modification History: * 8Sep05 MJNewman: Created. *****************************************************************************/ module TestMTS400M { provides interface StdControl; uses { //communication interface StdControl as CommControl; //gps // interface I2CSwitchCmds as GpsCmd; interface GpsCmd; interface StdControl as GpsControl; interface SendVarLenPacket as GpsSend; interface ReceiveMsg as GpsReceive; interface NMEA as nmea; interface Timer; interface Leds; } } implementation { #define TIMER_PERIOD 1000 // timer period in msec // Turn on to send a message every Minute or so that tell the GPS to // turn on or off one of the GPS messages. This allows testing to see // if messages are making it out to the GPS. #ifndef NMEA_MESSAGE_TESTING #define NMEA_MESSAGE_TESTING 0 #endif #define MIN(_a,_b) ((_a < _b) ? _a : _b) #include "SODebug.h" #include "gps.h" #include "NMEA.h" enum { GPSstateUnknown, GPSstateStart, GPSstatePowerOn, GPSstateReady, } GPSstate; static void dumpGPSstate() { switch (GPSstate) { default: case GPSstateUnknown: SODbg(DBG_USR2, "?GPSstate %d?\n",GPSstate); break; case GPSstateStart: SODbg(DBG_USR2,"GPSstateStart\n"); break; case GPSstatePowerOn: SODbg(DBG_USR2,"GPSstatePowerOn\n"); break; case GPSstateReady: SODbg(DBG_USR2,"GPSstateReady\n"); break; } return; } #if NMEA_MESSAGE_TESTING // Test code to determine if messages can be sent to the GPS. MJNewman // 15Aug05 //#define NMEA_ENABLE "$PSRF103,05,00,01,01*20\r\n" //VTG on //#define NMEA_DISABLE "$PSRF103,05,00,00,01*21\r\n" //VTG off //#define NMEA_ENABLE "$PSRF103,00,00,02,01*26\r\n" //GGA on 2 sec //#define NMEA_ENABLE "$PSRF103,00,00,08,01*2C\r\n" //GGA on 8 sec #define NMEA_ENABLE "\r\n\r\n$PSRF103,01,00,01,01*24\r\n" //GLL on #define NMEA_ENABLE_LENGTH strlen(NMEA_ENABLE) #define NMEA_DISABLE "\r\n\r\n$PSRF103,01,00,00,01*25\r\n" //GLL off #define NMEA_DISABLE_LENGTH strlen(NMEA_DISABLE) #if 0 #define CHANGE_TO_SIRF_MODE "$PSRF100,0,4800,8,1,0*0F\r\n" #define CHANGE_TO_SIRF_LENGTH strlen(CHANGE_TO_SIRF_MODE) static const uint8_t const CHANGE_TO_NMEA_MODE[] = { 0xA0, 0xA2, 0x00, 0x18, 0x81, 0x02, 0x01, 0x01, 0x00, 0x01, 0x05, 0x01, 0x05, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x12, 0xC0, 0x01, 0x6A, 0xB0, 0xB3 }; #define CHANGE_TO_NMEA_LENGTH sizeof(CHANGE_TO_NMEA_MODE) #define NMEA_ENABLE CHANGE_TO_NMEA_MODE #define NMEA_ENABLE_LENGTH CHANGE_TO_NMEA_LENGTH #define NMEA_DISABLE CHANGE_TO_SIRF_MODE #define NMEA_DISABLE_LENGTH strlen(CHANGE_TO_SIRF_MODE) #endif // send message to the GPS to enable VTG messages on a 1 second cycle task void enableNMEAmessage() { #if 0 readStep_t localStep; atomic localStep = readStep; if (localStep != GPS_REQUESTED) { // Wait until GPS is safely on post enableNMEAmessage(); return; }; #endif if ( call GpsSend.send((char *)NMEA_ENABLE , NMEA_ENABLE_LENGTH) == SUCCESS) { SODbg(DBG_USR2,"GPS ENable NMEA\n"); return; }; post enableNMEAmessage(); return; } #endif event result_t GpsSend.sendDone(uint8_t *sendPtr, result_t status) { #if NMEA_MESSAGE_TESTING // SODbg(DBG_USR2, "GPS %s commanded: %s",((status == SUCCESS) ? "OK" : "FAIL"),(char *)sendPtr); #endif return SUCCESS; } #if NMEA_MESSAGE_TESTING task void disableNMEAmessage() { #if 0 readStep_t localStep; atomic localStep = readStep; if (localStep != GPS_REQUESTED) { // Wait until GPS is safely on post enableNMEAmessage(); return; }; #endif if ( call GpsSend.send(NMEA_DISABLE, NMEA_DISABLE_LENGTH) == SUCCESS) { SODbg(DBG_USR2,"GPS DISable NMEA\n"); return; } post disableNMEAmessage(); return; } #endif command result_t StdControl.init() { atomic { GPSstate = GPSstateStart; } call Leds.init(); call Leds.greenOn(); call GpsControl.init(); SODbg(DBG_USR2,"InitComplete\n"); return SUCCESS; } command result_t StdControl.start() { SODbg(DBG_USR2,"Starting GPS\n"); call GpsControl.start(); call Timer.start(TIMER_REPEAT, TIMER_PERIOD); //start up sensor measurements return SUCCESS; } static void dumpGPSmsg(char *string,int length) { #if 1 if (string[0] == '$') { // echo the GPS message int i; for (i=0;i < length;i += 1) { SODbg(DBG_USR2, "%c",string[i]); if (string[i] == '*') break; }; SODbg(DBG_USR2, "\n"); }; #endif return; } command result_t StdControl.stop() { call GpsControl.stop(); call GpsCmd.TxRxSwitch(0); // ???timing of switch setting call GpsCmd.PowerSwitch(0); call Timer.stop(); call CommControl.stop(); return SUCCESS; } /****************************************************************************** * Timer fired, test GPS, humidity/temp * async for test only *****************************************************************************/ event result_t Timer.fired() { switch (GPSstate) { default: case GPSstateUnknown: dumpGPSstate(); GPSstate = GPSstateStart; //... case GPSstateStart: SODbg(DBG_USR2, "Turn GPS power ON\n"); if (call GpsCmd.PowerSwitch(1) != SUCCESS) { SODbg(DBG_USR2, "PowerSwitch failed wait for retry\n"); }; return SUCCESS; case GPSstatePowerOn: SODbg(DBG_USR2, "Turn GPS switches ON\n"); if (call GpsCmd.TxRxSwitch(1) != SUCCESS) { SODbg(DBG_USR2, "TxRxSwitch failed wait for retry\n"); }; return SUCCESS; case GPSstateReady: break; }; call Leds.redToggle(); #if NMEA_MESSAGE_TESTING { static uint8_t cycleCount; cycleCount += 1; if (cycleCount == 5) { SODbg(DBG_USR2, "Trying NMEA On\n"); post enableNMEAmessage(); return SUCCESS; }; if (cycleCount == 30) { SODbg(DBG_USR2, "Trying NMEA OFF\n"); post disableNMEAmessage(); return SUCCESS; }; if (cycleCount >= 60) { cycleCount = 0; }; } #endif // NMEA_MESSAGE_TESTING return SUCCESS; } // When a packet is received from the GPS we retain a pointer to // that packet and hand a pointer to another buffer back to the // lower level. Each sucessive message swaps buffers, establishing // a double buffering scheme. static GPS_Msg gpsData; // contributed buffer for double buffering static GPS_Msg *pGPSdata = &gpsData; // buffer to dump // Report and handle the content of a message that came in from the // GPS and is stored inpGGAdata. task void handleGPSmessage() { char * leadtek_string; // if gps have been scaned then stop receiving gps uart packet leadtek_string = pGPSdata->data; if (leadtek_string[0] == '$') { dumpGPSmsg(leadtek_string,MIN(sizeof(pGPSdata->data),pGPSdata->length)); #if 0 if (is_gga_string_m(leadtek_string)) { call nmea.gga_parse(gga_data_ptr, leadtek_string); } else if (is_gsa_string(pGPSdata->data)) { call nmea.gsa_parse(gsa_data_ptr, leadtek_string); } else if (is_gva_string(data)) { call nmea.gsv_parse(gsv_data_ptr, leadtek_string); } else if (is_gll_string(data)) { call nmea.gll_parse(gll_data_ptr, leadtek_string); } else if (is_rmc_string(data)) { call nmea.rmc_parse(rmc_data_ptr, leadtek_string); } else if (is_vtg_string(data)) { call nmea.vtg_parse(vtg_data_ptr, leadtek_string); } else if (is_mss_string(data)) { call nmea.mss_parse(mss_data_ptr, leadtek_string); } else if (is_ltc_string(data)) { call nmea.ltc_parse(ltc_data_ptr, leadtek_string); } else { // signal error }; #endif }; if (leadtek_string[0] == (char)0xA0) { #if 1 //??? remove when the rest of the Sirf code is available SODbg(DBG_USR2,"SIRF Packet\n"); #else uint8_t sirftype; sirftype = sirf.get_type(data); switch sirftype { case SIRF2: call sirf.id2_parse(leadtek_string); break; case SIRF28: call sirf.id28_parse(leadtek_string); break; default: // Unexpected SIRF type, this might be normal it // also might want to signal an error. break; }; #endif }; } // A gps message has been collected from the receiver. Log it and // set off a task to report it. // // Inputs: // pData really a pointer to a GGA_data block // Returns: // new buffer for lower level to use event TOS_MsgPtr GpsReceive.receive(TOS_MsgPtr pData) { GPS_Msg *pTemp; pTemp = pGPSdata; pGPSdata = (GPS_Msg *)pData; post handleGPSmessage(); return (TOS_MsgPtr)pTemp; } // Log the power condition reported by the GPS so we can test it // later. event result_t GpsCmd.PowerSet(uint8_t PowerState){ SODbg(DBG_USR2,"GPS power %s\n",(PowerState) ? "ON" : "OFF"); if (PowerState) { GPSstate += 1; }; dumpGPSstate(); return SUCCESS; } event result_t GpsCmd.TxRxSet(uint8_t rtstate) { // gps tx/rx switches set to on or off SODbg(DBG_USR2,"GPS switches %s\n",(rtstate) ? "ON" : "OFF"); if (rtstate) { GPSstate += 1; }; dumpGPSstate(); return SUCCESS; } } --- NEW FILE: sensorboardApp.h --- // $Id: sensorboardApp.h,v 1.1 2005/09/19 17:41:05 doolin Exp $ #ifndef SENSORBOARDAPP_H #define SENSORBOARDAPP_H #include "NMEA.h" typedef struct XSensorHeader { uint8_t board_id; uint8_t packet_id; // 3 uint8_t node_id; uint8_t rsvd; }__attribute__ ((packed)) XSensorHeader; typedef struct GGAMsg { uint8_t hour; uint8_t minute; uint8_t lat_deg; uint8_t long_deg; uint32_t dec_sec; uint32_t lat_dec_min; uint32_t long_dec_min; uint8_t nsewind; uint8_t fixed; } __attribute__ ((packed)) GGAMsg; typedef struct XSensorMTS400DataMsg { uint16_t vref; uint16_t humidity; uint16_t temperature; uint16_t cal_wrod1; uint16_t cal_wrod2; uint16_t cal_wrod3; uint16_t cal_wrod4; uint16_t intersematemp; uint16_t pressure; uint16_t taoch0; uint16_t taoch1; uint16_t accel_x; uint16_t accel_y; } __attribute__ ((packed)) XSensorMTS400DataMsg; enum { AM_XSXMSG = 0, }; typedef struct weather_data { uint16_t vref; uint16_t humidity; uint16_t temperature; uint16_t cal_word1; uint16_t cal_word2; uint16_t cal_word3; uint16_t cal_word4; uint16_t intersematemp; uint16_t pressure; uint16_t taosch0; uint16_t taosch1; } Weather_Data; enum { AM_WEATHER_DATA = 251, }; typedef struct XDataMsg { XSensorHeader xSensorHeader; union { XSensorMTS400DataMsg data1; GGAMsg dataGps; GGA_Data gga_data; Weather_Data weather_data; }xData; } __attribute__ ((packed)) XDataMsg; #endif /* SENSORBOARDAPP_H */ --- NEW FILE: README --- README Description: Test the observation of GPS data from the MTS400 in isolation from other sensors on that board. Also test the ability to send commands to the GPS. |
From: David M. D. <do...@us...> - 2005-09-19 17:40:07
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPS2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9948/GPS2 Log Message: Directory /cvsroot/firebug/fireboard/beta/apps/GPS2 added to the repository |
From: Michael N. <mne...@us...> - 2005-09-09 00:03:19
|
Update of /cvsroot/firebug/fireboard/beta/apps/XSensorMTS400 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23957 Modified Files: TestMTS400M.nc Log Message: Testing updated to send arbitrary GPS commands Index: TestMTS400M.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/apps/XSensorMTS400/TestMTS400M.nc,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** TestMTS400M.nc 8 Sep 2005 23:33:46 -0000 1.19 --- TestMTS400M.nc 9 Sep 2005 00:03:11 -0000 1.20 *************** *** 224,228 **** // This sequence of steps is used when collecting data from the // various sensors. The steps are performed in this sequence. ! norace enum { START, BATTERY_REQUESTED, --- 224,228 ---- // This sequence of steps is used when collecting data from the // various sensors. The steps are performed in this sequence. ! typedef norace enum { START, BATTERY_REQUESTED, *************** *** 238,242 **** GPS_REQUESTED, GPS_DONE ! } readStep; // Log the current condition of the sensors. Primarily used for --- 238,243 ---- GPS_REQUESTED, GPS_DONE ! } readStep_t; ! readStep_t readStep; // Log the current condition of the sensors. Primarily used for *************** *** 299,310 **** //#define NMEA_ENABLE "$PSRF103,05,00,01,01*20\r\n" //VTG on //#define NMEA_DISABLE "$PSRF103,05,00,00,01*21\r\n" //VTG off #define NMEA_ENABLE "$PSRF103,01,00,01,01*24\r\n" //GLL on #define NMEA_DISABLE "$PSRF103,01,00,00,01*25\r\n" //GLL off // send message to the GPS to enable VTG messages on a 1 second cycle task void enableNMEAmessage() { if (!gpsIsPowered) { SODbg(DBG_USR2,"GPS off trying to Enable NMEA\n"); }; ! if ( call GpsSend.send(NMEA_ENABLE , strlen(NMEA_ENABLE)) == SUCCESS) { return; }; --- 300,371 ---- //#define NMEA_ENABLE "$PSRF103,05,00,01,01*20\r\n" //VTG on //#define NMEA_DISABLE "$PSRF103,05,00,00,01*21\r\n" //VTG off + //#define NMEA_ENABLE "$PSRF103,00,00,02,01*26\r\n" //GGA on 2 sec + //#define NMEA_ENABLE "$PSRF103,00,00,08,01*2C\r\n" //GGA on 8 sec + #define NMEA_ENABLE "$PSRF103,01,00,01,01*24\r\n" //GLL on + #define NMEA_ENABLE_LENGTH strlen(NMEA_ENABLE) #define NMEA_DISABLE "$PSRF103,01,00,00,01*25\r\n" //GLL off + #define NMEA_DISABLE_LENGTH strlen(NMEA_DISABLE) + + #if 0 + #define CHANGE_TO_SIRF_MODE "$PSRF100,0,4800,8,1,0*0F\r\n" + #define CHANGE_TO_SIRF_LENGTH strlen(CHANGE_TO_SIRF_MODE) + static const uint8_t const CHANGE_TO_NMEA_MODE[] = { + 0xA0, + 0xA2, + 0x00, + 0x18, + 0x81, + 0x02, + 0x01, + 0x01, + 0x00, + 0x01, + 0x05, + 0x01, + 0x05, + 0x01, + 0x00, + 0x01, + 0x00, + 0x01, + 0x00, + 0x01, + 0x00, + 0x01, + 0x00, + 0x01, + 0x00, + 0x01, + 0x12, + 0xC0, + 0x01, + 0x6A, + 0xB0, + 0xB3 + }; + #define CHANGE_TO_NMEA_LENGTH sizeof(CHANGE_TO_NMEA_MODE) + #define NMEA_ENABLE CHANGE_TO_NMEA_MODE + #define NMEA_ENABLE_LENGTH CHANGE_TO_NMEA_LENGTH + #define NMEA_DISABLE CHANGE_TO_SIRF_MODE + #define NMEA_DISABLE_LENGTH strlen(CHANGE_TO_SIRF_MODE) + #endif + // send message to the GPS to enable VTG messages on a 1 second cycle task void enableNMEAmessage() { + #if 0 + readStep_t localStep; + atomic localStep = readStep; + if (localStep != GPS_REQUESTED) { + // Wait until GPS is safely on + post enableNMEAmessage(); + return; + }; + #endif if (!gpsIsPowered) { SODbg(DBG_USR2,"GPS off trying to Enable NMEA\n"); }; ! if ( call GpsSend.send((char *)NMEA_ENABLE , NMEA_ENABLE_LENGTH) == SUCCESS) { ! SODbg(DBG_USR2,"GPS ENable NMEA\n"); return; }; *************** *** 316,320 **** event result_t GpsSend.sendDone(uint8_t *sendPtr, result_t status) { #if NMEA_MESSAGE_TESTING ! SODbg(DBG_USR2, "GPS %s commanded: %s",((status == SUCCESS) ? "OK" : "FAIL"),(char *)sendPtr); #endif return SUCCESS; --- 377,381 ---- event result_t GpsSend.sendDone(uint8_t *sendPtr, result_t status) { #if NMEA_MESSAGE_TESTING ! // SODbg(DBG_USR2, "GPS %s commanded: %s",((status == SUCCESS) ? "OK" : "FAIL"),(char *)sendPtr); #endif return SUCCESS; *************** *** 323,330 **** #if NMEA_MESSAGE_TESTING task void disableNMEAmessage() { if (!gpsIsPowered) { SODbg(DBG_USR2,"GPS off trying to Disable NMEA\n"); }; ! if ( call GpsSend.send(NMEA_DISABLE, strlen(NMEA_DISABLE)) == SUCCESS) { return; } --- 384,401 ---- #if NMEA_MESSAGE_TESTING task void disableNMEAmessage() { + #if 0 + readStep_t localStep; + atomic localStep = readStep; + if (localStep != GPS_REQUESTED) { + // Wait until GPS is safely on + post enableNMEAmessage(); + return; + }; + #endif if (!gpsIsPowered) { SODbg(DBG_USR2,"GPS off trying to Disable NMEA\n"); }; ! if ( call GpsSend.send(NMEA_DISABLE, NMEA_DISABLE_LENGTH) == SUCCESS) { ! SODbg(DBG_USR2,"GPS DISable NMEA\n"); return; } *************** *** 425,429 **** call TempHumControl.init(); //init Sensirion call PressureControl.init(); // init Intersema ! return SUCCESS; } --- 496,500 ---- call TempHumControl.init(); //init Sensirion call PressureControl.init(); // init Intersema ! SODbg(DBG_USR2,"InitComplete\n"); return SUCCESS; } *************** *** 436,439 **** --- 507,511 ---- call BattControl.start(); + SODbg(DBG_USR2,"Starting GPS\n"); #ifdef MTS420 call GpsControl.start(); *************** *** 465,469 **** *****************************************************************************/ event result_t Timer.fired() { ! uint8_t localStep; call Leds.redToggle(); --- 537,541 ---- *****************************************************************************/ event result_t Timer.fired() { ! readStep_t localStep; call Leds.redToggle(); *************** *** 484,498 **** static uint8_t cycleCount; cycleCount += 1; ! if (cycleCount == 10) { SODbg(DBG_USR2, "Trying NMEA On\n"); post enableNMEAmessage(); return SUCCESS; }; ! if (cycleCount == 70) { SODbg(DBG_USR2, "Trying NMEA OFF\n"); post disableNMEAmessage(); return SUCCESS; }; ! if (cycleCount == 120) { cycleCount = 0; }; --- 556,570 ---- static uint8_t cycleCount; cycleCount += 1; ! if (cycleCount == 5) { SODbg(DBG_USR2, "Trying NMEA On\n"); post enableNMEAmessage(); return SUCCESS; }; ! if (cycleCount == 30) { SODbg(DBG_USR2, "Trying NMEA OFF\n"); post disableNMEAmessage(); return SUCCESS; }; ! if (cycleCount >= 60) { cycleCount = 0; }; *************** *** 570,573 **** --- 642,646 ---- sensorStatus = SENSOR_PRESSURE_START; } + SODbg(DBG_USR2,"Pressure start\n"); return call PressureControl.start(); case PRESSURE_REQUESTED: *************** *** 658,666 **** // ???is this still appropriate? Double buffering should // eliminate the need. ! if (readStep == GPS_DONE) return; leadtek_string = pGPSdata->data; #if 1 if (leadtek_string[0] == '$') { int i; for (i=0;i < MIN(sizeof(pGPSdata->data),pGPSdata->length);i += 1) { --- 731,744 ---- // ???is this still appropriate? Double buffering should // eliminate the need. ! { ! readStep_t localStep; ! atomic localStep = readStep; ! if (localStep == GPS_DONE) return; ! } leadtek_string = pGPSdata->data; #if 1 if (leadtek_string[0] == '$') { + // echo the GPS message int i; for (i=0;i < MIN(sizeof(pGPSdata->data),pGPSdata->length);i += 1) { |
From: Michael N. <mne...@us...> - 2005-09-08 23:58:24
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPStest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22701 Added Files: sensorboardApp.h Log Message: Created --- NEW FILE: sensorboardApp.h --- // $Id: sensorboardApp.h,v 1.1 2005/09/08 23:58:16 mnewmantechedit Exp $ #ifndef SENSORBOARDAPP_H #define SENSORBOARDAPP_H #include "NMEA.h" typedef struct XSensorHeader { uint8_t board_id; uint8_t packet_id; // 3 uint8_t node_id; uint8_t rsvd; }__attribute__ ((packed)) XSensorHeader; typedef struct GGAMsg { uint8_t hour; uint8_t minute; uint8_t lat_deg; uint8_t long_deg; uint32_t dec_sec; uint32_t lat_dec_min; uint32_t long_dec_min; uint8_t nsewind; uint8_t fixed; } __attribute__ ((packed)) GGAMsg; typedef struct XSensorMTS400DataMsg { uint16_t vref; uint16_t humidity; uint16_t temperature; uint16_t cal_wrod1; uint16_t cal_wrod2; uint16_t cal_wrod3; uint16_t cal_wrod4; uint16_t intersematemp; uint16_t pressure; uint16_t taoch0; uint16_t taoch1; uint16_t accel_x; uint16_t accel_y; } __attribute__ ((packed)) XSensorMTS400DataMsg; enum { AM_XSXMSG = 0, }; typedef struct weather_data { uint16_t vref; uint16_t humidity; uint16_t temperature; uint16_t cal_word1; uint16_t cal_word2; uint16_t cal_word3; uint16_t cal_word4; uint16_t intersematemp; uint16_t pressure; uint16_t taosch0; uint16_t taosch1; } Weather_Data; enum { AM_WEATHER_DATA = 251, }; typedef struct XDataMsg { XSensorHeader xSensorHeader; union { XSensorMTS400DataMsg data1; GGAMsg dataGps; GGA_Data gga_data; Weather_Data weather_data; }xData; } __attribute__ ((packed)) XDataMsg; #endif /* SENSORBOARDAPP_H */ |
From: Michael N. <mne...@us...> - 2005-09-08 23:57:49
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPStest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22613 Added Files: appFeatures.h Log Message: Created --- NEW FILE: appFeatures.h --- /** * Compile-time flags for defining application specific feature preferences. * * @file appFeatures.h * @author Martin Turon * * @version 2004/8/8 mturon Initial version * * $Id: appFeatures.h,v 1.1 2005/09/08 23:57:42 mnewmantechedit Exp $ */ // crossbow sensor board id //define MTS420 to enable gps. // MTS400 will not send gps packets. // Uncomment the following line if you are using a MTS420 board. #define MTS420 #ifndef MTS420 #define SENSOR_BOARD_ID 0x85 //MTS400 sensor board id #else #define SENSOR_BOARD_ID 0x86 //MTS420 sensor board id #endif #ifndef FEATURE_GPS_ONLY #define FEATURE_GPS_ONLY 0 #endif // current Xee lib donnot support MicaZ #ifdef PLATFORM_MICAZ #define FEATURE_XEE_PARAMS 0 #else #define FEATURE_XEE_PARAMS 0 #endif /// FEATURE_XEE_PARAMS -- enables changing nodeid, group, and other params #ifndef FEATURE_XEE_PARAMS #define FEATURE_XEE_PARAMS 0 #endif /** * FEATURE_XEE_PARAMS enables dynamic setting of various parameters when set. * Params include: nodeid, group, radio power, radio freq/band. */ #if FEATURE_XEE_PARAMS #define XEE_PARAMS_COMPONENT RecoverParamsC, #define XEE_PARAMS_WIRING() Main.StdControl->RecoverParamsC.ParamControl; #else #define XEE_PARAMS_COMPONENT #define XEE_PARAMS_WIRING() #endif |
From: Michael N. <mne...@us...> - 2005-09-08 23:57:26
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPStest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22553 Added Files: TestMTS400M.nc Log Message: Created --- NEW FILE: TestMTS400M.nc --- /****************************************************************************** * Controls GPS for testing purposes. This is an isolated test of the * GPS. * * NOTES: * -Intersema pressure sensor control lines are shared with gps control lines * -Cannot enable gps rx/tx and intersema at same time * * Strategy: * 1. Turn on gps power and leave on * 2. Continuously report GPS packets as they come from the GPS. * 3. A timer fires periodically. When a counted number of timer events * occurs reconfigure the GPS by sending a message to the GPS. After an * additional counted number of timer events reconfigure the GPS back. * * "Copyright (c) 2005 The Regents of the University of California. * All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * 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 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * * Author: Michael Newman * * Modification History: * 8Sep05 MJNewman: Created. *****************************************************************************/ #include "appFeatures.h" module TestMTS400M { provides interface StdControl; uses { //communication interface StdControl as CommControl; #ifdef MTS420 //gps // interface I2CSwitchCmds as GpsCmd; interface GpsCmd; interface StdControl as GpsControl; interface SendVarLenPacket as GpsSend; interface ReceiveMsg as GpsReceive; #endif interface NMEA as nmea; interface Timer; interface Leds; } } implementation { #define TIMER_PERIOD 1000 // timer period in msec // Turn on to send a message every Minute or so that tell the GPS to // turn on or off one of the GPS messages. This allows testing to see // if messages are making it out to the GPS. #ifndef NMEA_MESSAGE_TESTING #define NMEA_MESSAGE_TESTING 0 #endif #define MIN(_a,_b) ((_a < _b) ? _a : _b) #include "SODebug.h" #include "gps.h" #include "NMEA.h" enum { GPSstateUnknown, GPSstateStart, GPSstatePowerOn, GPSstateReady, } GPSstate; static void dumpGPSstate() { switch (GPSstate) { default: case GPSstateUnknown: SODbg(DBG_USR2, "?GPSstate %d?\n",GPSstate); break; case GPSstateStart: SODbg(DBG_USR2,"GPSstateStart\n"); break; case GPSstatePowerOn: SODbg(DBG_USR2,"GPSstatePowerOn\n"); break; case GPSstateReady: SODbg(DBG_USR2,"GPSstateReady\n"); break; } return; } #if NMEA_MESSAGE_TESTING // Test code to determine if messages can be sent to the GPS. MJNewman // 15Aug05 //#define NMEA_ENABLE "$PSRF103,05,00,01,01*20\r\n" //VTG on //#define NMEA_DISABLE "$PSRF103,05,00,00,01*21\r\n" //VTG off //#define NMEA_ENABLE "$PSRF103,00,00,02,01*26\r\n" //GGA on 2 sec //#define NMEA_ENABLE "$PSRF103,00,00,08,01*2C\r\n" //GGA on 8 sec #define NMEA_ENABLE "\r\n\r\n$PSRF103,01,00,01,01*24\r\n" //GLL on #define NMEA_ENABLE_LENGTH strlen(NMEA_ENABLE) #define NMEA_DISABLE "\r\n\r\n$PSRF103,01,00,00,01*25\r\n" //GLL off #define NMEA_DISABLE_LENGTH strlen(NMEA_DISABLE) #if 0 #define CHANGE_TO_SIRF_MODE "$PSRF100,0,4800,8,1,0*0F\r\n" #define CHANGE_TO_SIRF_LENGTH strlen(CHANGE_TO_SIRF_MODE) static const uint8_t const CHANGE_TO_NMEA_MODE[] = { 0xA0, 0xA2, 0x00, 0x18, 0x81, 0x02, 0x01, 0x01, 0x00, 0x01, 0x05, 0x01, 0x05, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x12, 0xC0, 0x01, 0x6A, 0xB0, 0xB3 }; #define CHANGE_TO_NMEA_LENGTH sizeof(CHANGE_TO_NMEA_MODE) #define NMEA_ENABLE CHANGE_TO_NMEA_MODE #define NMEA_ENABLE_LENGTH CHANGE_TO_NMEA_LENGTH #define NMEA_DISABLE CHANGE_TO_SIRF_MODE #define NMEA_DISABLE_LENGTH strlen(CHANGE_TO_SIRF_MODE) #endif // send message to the GPS to enable VTG messages on a 1 second cycle task void enableNMEAmessage() { #if 0 readStep_t localStep; atomic localStep = readStep; if (localStep != GPS_REQUESTED) { // Wait until GPS is safely on post enableNMEAmessage(); return; }; #endif if ( call GpsSend.send((char *)NMEA_ENABLE , NMEA_ENABLE_LENGTH) == SUCCESS) { SODbg(DBG_USR2,"GPS ENable NMEA\n"); return; }; post enableNMEAmessage(); return; } #endif event result_t GpsSend.sendDone(uint8_t *sendPtr, result_t status) { #if NMEA_MESSAGE_TESTING // SODbg(DBG_USR2, "GPS %s commanded: %s",((status == SUCCESS) ? "OK" : "FAIL"),(char *)sendPtr); #endif return SUCCESS; } #if NMEA_MESSAGE_TESTING task void disableNMEAmessage() { #if 0 readStep_t localStep; atomic localStep = readStep; if (localStep != GPS_REQUESTED) { // Wait until GPS is safely on post enableNMEAmessage(); return; }; #endif if ( call GpsSend.send(NMEA_DISABLE, NMEA_DISABLE_LENGTH) == SUCCESS) { SODbg(DBG_USR2,"GPS DISable NMEA\n"); return; } post disableNMEAmessage(); return; } #endif command result_t StdControl.init() { atomic { GPSstate = GPSstateStart; } call Leds.init(); call Leds.greenOn(); #ifdef MTS420 call GpsControl.init(); #endif SODbg(DBG_USR2,"InitComplete\n"); return SUCCESS; } command result_t StdControl.start() { SODbg(DBG_USR2,"Starting GPS\n"); #ifdef MTS420 call GpsControl.start(); #endif call Timer.start(TIMER_REPEAT, TIMER_PERIOD); //start up sensor measurements return SUCCESS; } static void dumpGPSmsg(char *string,int length) { #if 1 if (string[0] == '$') { // echo the GPS message int i; for (i=0;i < length;i += 1) { SODbg(DBG_USR2, "%c",string[i]); if (string[i] == '*') break; }; SODbg(DBG_USR2, "\n"); }; #endif return; } command result_t StdControl.stop() { #ifdef MTS420 call GpsControl.stop(); call GpsCmd.TxRxSwitch(0); // ???timing of switch setting call GpsCmd.PowerSwitch(0); #endif call Timer.stop(); call CommControl.stop(); return SUCCESS; } /****************************************************************************** * Timer fired, test GPS, humidity/temp * async for test only *****************************************************************************/ event result_t Timer.fired() { switch (GPSstate) { default: case GPSstateUnknown: dumpGPSstate(); GPSstate = GPSstateStart; //... case GPSstateStart: SODbg(DBG_USR2, "Turn GPS power ON\n"); if (call GpsCmd.PowerSwitch(1) != SUCCESS) { SODbg(DBG_USR2, "PowerSwitch failed wait for retry\n"); }; return SUCCESS; case GPSstatePowerOn: SODbg(DBG_USR2, "Turn GPS switches ON\n"); if (call GpsCmd.TxRxSwitch(1) != SUCCESS) { SODbg(DBG_USR2, "TxRxSwitch failed wait for retry\n"); }; return SUCCESS; case GPSstateReady: break; }; call Leds.redToggle(); #if NMEA_MESSAGE_TESTING { static uint8_t cycleCount; cycleCount += 1; if (cycleCount == 5) { SODbg(DBG_USR2, "Trying NMEA On\n"); post enableNMEAmessage(); return SUCCESS; }; if (cycleCount == 30) { SODbg(DBG_USR2, "Trying NMEA OFF\n"); post disableNMEAmessage(); return SUCCESS; }; if (cycleCount >= 60) { cycleCount = 0; }; } #endif // NMEA_MESSAGE_TESTING return SUCCESS; } #ifdef MTS420 // When a packet is received from the GPS we retain a pointer to // that packet and hand a pointer to another buffer back to the // lower level. Each sucessive message swaps buffers, establishing // a double buffering scheme. static GPS_Msg gpsData; // contributed buffer for double buffering static GPS_Msg *pGPSdata = &gpsData; // buffer to dump // Report and handle the content of a message that came in from the // GPS and is stored inpGGAdata. task void handleGPSmessage() { char * leadtek_string; // if gps have been scaned then stop receiving gps uart packet leadtek_string = pGPSdata->data; if (leadtek_string[0] == '$') { dumpGPSmsg(leadtek_string,MIN(sizeof(pGPSdata->data),pGPSdata->length)); #if 0 if (is_gga_string_m(leadtek_string)) { call nmea.gga_parse(gga_data_ptr, leadtek_string); } else if (is_gsa_string(pGPSdata->data)) { call nmea.gsa_parse(gsa_data_ptr, leadtek_string); } else if (is_gva_string(data)) { call nmea.gsv_parse(gsv_data_ptr, leadtek_string); } else if (is_gll_string(data)) { call nmea.gll_parse(gll_data_ptr, leadtek_string); } else if (is_rmc_string(data)) { call nmea.rmc_parse(rmc_data_ptr, leadtek_string); } else if (is_vtg_string(data)) { call nmea.vtg_parse(vtg_data_ptr, leadtek_string); } else if (is_mss_string(data)) { call nmea.mss_parse(mss_data_ptr, leadtek_string); } else if (is_ltc_string(data)) { call nmea.ltc_parse(ltc_data_ptr, leadtek_string); } else { // signal error }; #endif }; if (leadtek_string[0] == (char)0xA0) { #if 1 //??? remove when the rest of the Sirf code is available SODbg(DBG_USR2,"SIRF Packet\n"); #else uint8_t sirftype; sirftype = sirf.get_type(data); switch sirftype { case SIRF2: call sirf.id2_parse(leadtek_string); break; case SIRF28: call sirf.id28_parse(leadtek_string); break; default: // Unexpected SIRF type, this might be normal it // also might want to signal an error. break; }; #endif }; } // A gps message has been collected from the receiver. Log it and // set off a task to report it. // // Inputs: // pData really a pointer to a GGA_data block // Returns: // new buffer for lower level to use event TOS_MsgPtr GpsReceive.receive(TOS_MsgPtr pData) { GPS_Msg *pTemp; pTemp = pGPSdata; pGPSdata = (GPS_Msg *)pData; post handleGPSmessage(); return (TOS_MsgPtr)pTemp; } // Log the power condition reported by the GPS so we can test it // later. event result_t GpsCmd.PowerSet(uint8_t PowerState){ SODbg(DBG_USR2,"GPS power %s\n",(PowerState) ? "ON" : "OFF"); if (PowerState) { GPSstate += 1; }; dumpGPSstate(); return SUCCESS; } event result_t GpsCmd.TxRxSet(uint8_t rtstate) { // gps tx/rx switches set to on or off SODbg(DBG_USR2,"GPS switches %s\n",(rtstate) ? "ON" : "OFF"); if (rtstate) { GPSstate += 1; }; dumpGPSstate(); return SUCCESS; } #endif // defined(MTS420) } |
From: Michael N. <mne...@us...> - 2005-09-08 23:56:57
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPStest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22494 Added Files: TestMTS400.nc Log Message: Created --- NEW FILE: TestMTS400.nc --- /****************************************************************************** * Controls GPS for testing purposes. This is an isolated test of the * GPS. See discussion in TestMTS400M.nc for more info on operational * strategy. * * "Copyright (c) 2005 The Regents of the University of California. * All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * 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 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * * Author: Michael Newman * * Modification History: * 8Sep05 MJNewman: Created. *****************************************************************************/ includes sensorboardApp; #include "appFeatures.h" configuration TestMTS400 { } implementation { components Main, TestMTS400M, MicaWbSwitch, GenericComm as Comm, TimerC, Voltage, NMEAC, LedsC, #ifdef MTS420 UARTGpsPacket, #endif ADCC; Main.StdControl -> TestMTS400M; Main.StdControl -> TimerC; TestMTS400M.CommControl -> Comm; // Wiring for gps #ifdef MTS420 TestMTS400M.GpsControl -> UARTGpsPacket; TestMTS400M.GpsSend -> UARTGpsPacket.SendVar; TestMTS400M.GpsReceive -> UARTGpsPacket; TestMTS400M.GpsCmd -> UARTGpsPacket.GpsCmd; //UARTGpsPacket.GpsCmd; #endif TestMTS400M.Leds -> LedsC; TestMTS400M.Timer -> TimerC.Timer[unique("Timer")]; TestMTS400M.nmea -> NMEAC; } |
From: Michael N. <mne...@us...> - 2005-09-08 23:56:21
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPStest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22395 Added Files: SODebug.h Log Message: Created --- NEW FILE: SODebug.h --- // printf style output for debugging // // Copyright (c) 2004 by Sensicast, Inc. // All rights including that of resale granted to Crossbow, Inc. // // Permission to use, copy, modify, and distribute this software and its // documentation for any purpose, without fee, and without written // agreement is hereby granted, provided that the above copyright // notice, the (updated) modification history and the author appear in // all copies of this source code. // // Permission is also granted to distribute this software under the // standard BSD license as contained in the TinyOS distribution. // // @Author: Michael Newman // #ifndef SOdebugEdit #define SOdebugEdit 1 // // Modification History: // 25Jan04 MJNewman 1: Created. #include <stdarg.h> //turn off debug output by default #ifndef SO_DEBUG #define SO_DEBUG 0 #endif // Assume we are not a dot by default #ifndef SO_DEBUG_DOT #define SODEBUG_DOT 0 #endif // Most of this module is off unless enabled #if (SO_DEBUG) //#include <stdio.h> // This varaiable is shared by many possible users of SOdebug. // The rest of the code is duplicated!. static const char hex[] = "0123456789ABCDEF"; #if (!SO_DEBUG_DOT) //init comm port (57.6K baud, mica2 only, use 19K baud for mica2dot, mica....) for debug // TinyOS is using 57.6K and seems to reset the baud rate periodically. // Use only 57.6K baud unless TinyOS is sorted out. static void init_debug(){ atomic { outp(0,UBRR0H); #if 1 // 56K with 0% error clock is 7.3728Mhz outp(15, UBRR0L); //set baud rate outp((1<<U2X),UCSR0A); // Set UART double speed #else // 19.K with 0% error clock is 7.3728Mhz outp(47, UBRR0L); //set baud rate outp((1<<U2X),UCSR0A); // Set UART double speed #endif outp(((1 << UCSZ1) | (1 << UCSZ0)) , UCSR0C); // Set frame format: 8 data-bits, 1 stop-bit inp(UDR0); outp((1 << TXEN) ,UCSR0B); // Enable uart reciever and transmitter } } #else //init comm port (19K baud) for mica2dot for debug static void init_debug(){ atomic { outp(0,UBRR0H); // Set baudrate to 19.2 KBps outp(12, UBRR0L); outp(0,UCSR0A); // Disable U2X and MPCM outp(((1 << UCSZ1) | (1 << UCSZ0)) , UCSR0C); inp(UDR0); outp((1 << TXEN) ,UCSR0B); } } #endif // output a char to the uart void UARTPutChar(char c) { if (c == '\n') { loop_until_bit_is_set(UCSR0A, UDRE); outb(UDR0,'\r'); loop_until_bit_is_set(UCSR0A, TXC); }; loop_until_bit_is_set(UCSR0A, UDRE); outb(UDR0,c); loop_until_bit_is_set(UCSR0A, TXC); return; } // Simplified printf int printf(const uint8_t *format, ...) { static bool debugStarted; uint8_t format_flag; uint32_t u_val=0; uint32_t div_val; uint8_t base; uint8_t *ptr; bool longNumber = FALSE; bool temp; va_list ap; va_start (ap, format); atomic temp = debugStarted; if (!temp) { init_debug(); atomic debugStarted = 1; }; if (format == NULL) format = "NULL\n"; for (;;) /* Until full format string read */ { if (!longNumber) { // Assume char after %l is d or xX while ((format_flag = *format++) != '%') /* Until '%' or '\0' */ { if (!format_flag) { return 0; // not bothering with count of chars output }; UARTPutChar(format_flag); }; }; switch (format_flag = *format++) { case 'c': format_flag = va_arg(ap, int); default: UARTPutChar(format_flag); continue; case 'S': case 's': ptr = va_arg(ap,char *); while ((format_flag = *ptr++)) { UARTPutChar(format_flag); }; continue; #if 0 case 't': { #define SECONDS_IN_ONE_DAY 86400 base = 10; if (currentSeconds/86400) {//print days div_val = 10000; u_val = currentSeconds/SECONDS_IN_ONE_DAY; do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); UARTPutChar(' '); UARTPutChar('d'); UARTPutChar('a'); UARTPutChar('y'); UARTPutChar('s'); UARTPutChar(' '); } // //hours div_val = 10; u_val = (currentSeconds % 86400)/3600; do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); UARTPutChar(':'); // //minutes div_val = 10; u_val = (INT16)((currentSeconds % 86400)%3600)/60; do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); UARTPutChar(':'); // //seconds div_val = 10; u_val = (INT16)(currentSeconds%60); do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); } continue; #endif // 't' time output case 'l': longNumber = TRUE; continue; case 'o': base = 8; if (!longNumber) div_val = 0x8000; else div_val = 0x40000000; goto CONVERSION_LOOP; case 'u': case 'i': case 'd': base = 10; if (!longNumber) div_val = 10000; else div_val = 1000000000; goto CONVERSION_LOOP; case 'x': base = 16; if (!longNumber) div_val = 0x1000; else div_val = 0x10000000; CONVERSION_LOOP: { if (!longNumber) u_val = va_arg(ap,int); else u_val = va_arg(ap,long); if ((format_flag == 'd') || (format_flag == 'i')) { bool isNegative; if (!longNumber) isNegative = (((int)u_val) < 0); else isNegative = (((long)u_val) < 0); if (isNegative) { u_val = - u_val; UARTPutChar('-'); }; while (div_val > 1 && div_val > u_val) { div_val /= 10; }; } // truncate signed values to a 16 bits for hex output if ((format_flag == 'x') && (!longNumber)) u_val &= 0xffff; do { UARTPutChar(hex[u_val / div_val]); u_val %= div_val; div_val /= base; } while (div_val); longNumber = FALSE; }; break; }; }; } #endif // SO_DEBUG #define SO_NO_DEBUG 0 #if (SO_DEBUG) #define SODbg(__x,__args...) { \ char bStatus; \ if(__x != SO_NO_DEBUG){ \ bStatus=bit_is_set(SREG,7); \ cli(); \ printf(__args); \ if (bStatus) sei(); \ }; \ } #else #define SODbg(__x,__args...) #endif #endif //SOdebugEdit |
From: Michael N. <mne...@us...> - 2005-09-08 23:55:43
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPStest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22310 Added Files: README Log Message: Created --- NEW FILE: README --- README Description: Test the observation of GPS data from the MTS400 in isolation from other sensors on that board. Also test the ability to send commands to the GPS. |
From: Michael N. <mne...@us...> - 2005-09-08 23:54:56
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPStest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22141 Added Files: Makefile Log Message: Created --- NEW FILE: Makefile --- include ../Makelocal COMPONENT=TestMTS400 SENSORBOARD=mts400 #MSG_SIZE=120 XBOWROOT=$(TOSROOT)/contrib/xbow/tos CWD = $(shell pwd) FIREBOARDROOT=$(CWD)/../../.. PFLAGS = -I$(XBOWROOT)/interfaces PFLAGS += -I$(XBOWROOT)/system PFLAGS += -I$(XBOWROOT)/platform/$(PLATFORM) #PFLAGS += -I$(XBOWROOT)/AXStack/$(PLATFORM) #PFLAGS += -I$(XBOWROOT)/lib PFLAGS += -I$(FIREBOARDROOT)/beta/tos/sensorboards/$(SENSORBOARD) PFLAGS += -I$(FIREBOARDROOT)/beta/tos/sensorboards/$(SENSORBOARD)/GPS PFLAGS += -I$(FIREBOARDROOT)/interfaces # control debugging printfs 1 is on 0 is off PFLAGS += -DSO_DEBUG=1 PFLAGS += -DFEATURE_GPS_ONLY=1 PFLAGS += -DNMEA_MESSAGE_TESTING=1 #include ../MakeXbowlocal #include ${TOSROOT}/tools/make/Makerules include ${TOSROOT}/apps/Makerules |
From: Michael N. <mne...@us...> - 2005-09-08 23:42:16
|
Update of /cvsroot/firebug/fireboard/beta/apps/GPStest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20124/GPStest Log Message: Directory /cvsroot/firebug/fireboard/beta/apps/GPStest added to the repository |
From: Michael N. <mne...@us...> - 2005-09-08 23:40:46
|
Update of /cvsroot/firebug/fireboard/beta/tos/sensorboards/mts400/GPS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19875 Modified Files: HPLUART1M.nc Log Message: Formatting changes Index: HPLUART1M.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/tos/sensorboards/mts400/GPS/HPLUART1M.nc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HPLUART1M.nc 17 Aug 2005 22:48:56 -0000 1.2 --- HPLUART1M.nc 8 Sep 2005 23:40:38 -0000 1.3 *************** *** 80,84 **** async command result_t UART.init() { ! // SODbg(DBG_BOOT, "UART1 initialized\n"); // UART will run at: (N-8-1) --- 80,84 ---- async command result_t UART.init() { ! // SODbg(DBG_BOOT, "UART1 initialized\n"); // UART will run at: (N-8-1) |