From fd106148226629b7008160e0323f84653302dd48 Mon Sep 17 00:00:00 2001 From: jasonshort Date: Mon, 21 Mar 2011 00:51:43 +0000 Subject: [PATCH] a basic mission uploader git-svn-id: https://arducopter.googlecode.com/svn/trunk@1796 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- libraries/GCS_SIMPLE/GCS_SIMPLE.cpp | 9 +++------ libraries/GCS_SIMPLE/GCS_SIMPLE.h | 18 +++++++++++------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/libraries/GCS_SIMPLE/GCS_SIMPLE.cpp b/libraries/GCS_SIMPLE/GCS_SIMPLE.cpp index 40b1b144db..a66f0d6b94 100644 --- a/libraries/GCS_SIMPLE/GCS_SIMPLE.cpp +++ b/libraries/GCS_SIMPLE/GCS_SIMPLE.cpp @@ -11,11 +11,11 @@ // GPS configuration : Custom protocol per "DIYDrones Custom Binary Sentence Specification V1.1" // -#include "GPS_SIMPLE.h" +#include "GCS_SIMPLE.h" #include // Public Methods ////////////////////////////////////////////////////////////// -GPS_SIMPLE::GPS_SIMPLE(Stream *s) : _port(s) +GCS_SIMPLE::GCS_SIMPLE(Stream *s) : _port(s) { } @@ -32,9 +32,8 @@ GPS_SIMPLE::GPS_SIMPLE(Stream *s) : _port(s) // bool -GPS_SIMPLE::read(void) +GCS_SIMPLE::read(void) { -/* uint8_t data; int numc; bool parsed = false; @@ -84,7 +83,5 @@ GPS_SIMPLE::read(void) } } return parsed; - */ - return true; } diff --git a/libraries/GCS_SIMPLE/GCS_SIMPLE.h b/libraries/GCS_SIMPLE/GCS_SIMPLE.h index a477a68809..c5477e465c 100644 --- a/libraries/GCS_SIMPLE/GCS_SIMPLE.h +++ b/libraries/GCS_SIMPLE/GCS_SIMPLE.h @@ -10,22 +10,26 @@ // // GPS configuration : Custom protocol per "DIYDrones Custom Binary Sentence Specification V1.1" // -// Note - see GPS_SIMPLE16.h for firmware 1.6 and later. +// Note - see GCS_SIMPLE16.h for firmware 1.6 and later. // -#ifndef GPS_SIMPLE_h -#define GPS_SIMPLE_h +#ifndef GCS_SIMPLE_h +#define GCS_SIMPLE_h #include // MAVLink GCS definitions -class GPS_SIMPLE { + + +class GCS_SIMPLE { public: - GPS_SIMPLE(Stream *s); - virtual bool read(void); + //GCS_SIMPLE(); + GCS_SIMPLE(Stream *s); + bool read(void); Stream *_port; ///< port the GPS is attached to private: #pragma pack(1) struct diyd_mtk_msg { + int8_t index; int8_t id; int8_t p1; int32_t altitude; @@ -47,4 +51,4 @@ private: } _buffer; }; -#endif // GPS_SIMPLE_H +#endif // GCS_SIMPLE_H