aboutsummaryrefslogtreecommitdiff
path: root/apps/drivers/gps/ubx.h
diff options
context:
space:
mode:
authorJulian Oes <joes@student.ethz.ch>2013-02-06 18:47:32 -0800
committerJulian Oes <joes@student.ethz.ch>2013-02-06 18:47:32 -0800
commit6ed5d97aea29a284015708a6089b7910afea8369 (patch)
tree1192387a09c9198f97b27a0b1c203cc42cd7844b /apps/drivers/gps/ubx.h
parentd962e6c403678e14a64a6b01be8773e98660bb24 (diff)
downloadpx4-firmware-6ed5d97aea29a284015708a6089b7910afea8369.tar.gz
px4-firmware-6ed5d97aea29a284015708a6089b7910afea8369.tar.bz2
px4-firmware-6ed5d97aea29a284015708a6089b7910afea8369.zip
Merged mtk16 and mtk19 helper classes, configure() now writes directly instead of buffering
Diffstat (limited to 'apps/drivers/gps/ubx.h')
-rw-r--r--apps/drivers/gps/ubx.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/drivers/gps/ubx.h b/apps/drivers/gps/ubx.h
index a23bb5502..c420e83b9 100644
--- a/apps/drivers/gps/ubx.h
+++ b/apps/drivers/gps/ubx.h
@@ -40,7 +40,6 @@
#include "gps_helper.h"
-
#define UBX_SYNC1 0xB5
#define UBX_SYNC2 0x62
@@ -341,7 +340,7 @@ public:
UBX();
~UBX();
void reset(void);
- void configure(uint8_t *buffer, int &length, const unsigned max_length, bool &baudrate_changed, unsigned &baudrate);
+ void configure(const int &fd, bool &baudrate_changed, unsigned &baudrate);
void parse(uint8_t, struct vehicle_gps_position_s*, bool &config_needed, bool &pos_updated);
private:
@@ -358,7 +357,13 @@ private:
/**
* Add the two checksum bytes to an outgoing message
*/
- void addChecksumToMessage(uint8_t*, const unsigned);
+ void addChecksumToMessage(uint8_t* message, const unsigned length);
+
+ /**
+ * Helper to send a config packet
+ */
+ void sendConfigPacket(const int &fd, uint8_t *packet, const unsigned length);
+
ubx_config_state_t _config_state;
bool _waiting_for_ack;
ubx_decode_state_t _decode_state;