From 6ed5d97aea29a284015708a6089b7910afea8369 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Wed, 6 Feb 2013 18:47:32 -0800 Subject: Merged mtk16 and mtk19 helper classes, configure() now writes directly instead of buffering --- apps/drivers/gps/ubx.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'apps/drivers/gps/ubx.h') 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; -- cgit v1.2.3