mirror of https://github.com/ArduPilot/ardupilot
a basic mission uploader
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1796 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
5008c1656b
commit
66c86e9a87
|
@ -11,11 +11,11 @@
|
||||||
// GPS configuration : Custom protocol per "DIYDrones Custom Binary Sentence Specification V1.1"
|
// GPS configuration : Custom protocol per "DIYDrones Custom Binary Sentence Specification V1.1"
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "GPS_SIMPLE.h"
|
#include "GCS_SIMPLE.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
// Public Methods //////////////////////////////////////////////////////////////
|
// 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
|
bool
|
||||||
GPS_SIMPLE::read(void)
|
GCS_SIMPLE::read(void)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
uint8_t data;
|
uint8_t data;
|
||||||
int numc;
|
int numc;
|
||||||
bool parsed = false;
|
bool parsed = false;
|
||||||
|
@ -84,7 +83,5 @@ GPS_SIMPLE::read(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return parsed;
|
return parsed;
|
||||||
*/
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,22 +10,26 @@
|
||||||
//
|
//
|
||||||
// GPS configuration : Custom protocol per "DIYDrones Custom Binary Sentence Specification V1.1"
|
// 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
|
#ifndef GCS_SIMPLE_h
|
||||||
#define GPS_SIMPLE_h
|
#define GCS_SIMPLE_h
|
||||||
|
|
||||||
#include <GCS_MAVLink.h> // MAVLink GCS definitions
|
#include <GCS_MAVLink.h> // MAVLink GCS definitions
|
||||||
|
|
||||||
class GPS_SIMPLE {
|
|
||||||
|
|
||||||
|
class GCS_SIMPLE {
|
||||||
public:
|
public:
|
||||||
GPS_SIMPLE(Stream *s);
|
//GCS_SIMPLE();
|
||||||
virtual bool read(void);
|
GCS_SIMPLE(Stream *s);
|
||||||
|
bool read(void);
|
||||||
Stream *_port; ///< port the GPS is attached to
|
Stream *_port; ///< port the GPS is attached to
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
struct diyd_mtk_msg {
|
struct diyd_mtk_msg {
|
||||||
|
int8_t index;
|
||||||
int8_t id;
|
int8_t id;
|
||||||
int8_t p1;
|
int8_t p1;
|
||||||
int32_t altitude;
|
int32_t altitude;
|
||||||
|
@ -47,4 +51,4 @@ private:
|
||||||
} _buffer;
|
} _buffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GPS_SIMPLE_H
|
#endif // GCS_SIMPLE_H
|
||||||
|
|
Loading…
Reference in New Issue