diff options
author | Denis Yeldandi <dyeldandi@gramant.ru> | 2014-10-02 14:34:20 +0400 |
---|---|---|
committer | Denis Yeldandi <dyeldandi@gramant.ru> | 2014-10-02 14:34:20 +0400 |
commit | a960fcbdef475e5ab264760568b15867d55b7774 (patch) | |
tree | 6fb65fdedb03f87e853f2ec9c87d24e8e70c2bc4 /src/drivers/gps/ashtech.cpp | |
parent | 83632ec0cecc24ea304853569b3ba92d13c53374 (diff) | |
download | px4-firmware-a960fcbdef475e5ab264760568b15867d55b7774.tar.gz px4-firmware-a960fcbdef475e5ab264760568b15867d55b7774.tar.bz2 px4-firmware-a960fcbdef475e5ab264760568b15867d55b7774.zip |
Increased ashtech POS frequency and increased baudrate
Diffstat (limited to 'src/drivers/gps/ashtech.cpp')
-rw-r--r-- | src/drivers/gps/ashtech.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/drivers/gps/ashtech.cpp b/src/drivers/gps/ashtech.cpp index d338ff8e5..614aade00 100644 --- a/src/drivers/gps/ashtech.cpp +++ b/src/drivers/gps/ashtech.cpp @@ -597,20 +597,22 @@ void ASHTECH::decode_init(void){ char comm[] = "$PASHS,NME,ZDA,B,ON,3\r\n"\ "$PASHS,NME,GGA,B,OFF\r\n"\ "$PASHS,NME,GST,B,ON,3\r\n"\ - "$PASHS,NME,POS,B,ON,0.1\r\n"\ + "$PASHS,NME,POS,B,ON,0.05\r\n"\ "$PASHS,NME,GSV,B,ON,3\r\n"\ "$PASHS,SPD,A,8\r\n"\ - "$PASHS,SPD,B,7\r\n"; // default baud is 7 + "$PASHS,SPD,B,9\r\n"; // default baud is 7 int ASHTECH::configure(unsigned &baudrate){ /* try different baudrates */ const unsigned baudrates_to_try[] = {9600, 38400, 19200, 57600, 115200}; + for (int baud_i = 0; baud_i < sizeof(baudrates_to_try)/sizeof(baudrates_to_try[0]); baud_i++) { baudrate = baudrates_to_try[baud_i]; set_baudrate(_fd, baudrate); write(_fd, (uint8_t*)comm, sizeof(comm)); } - set_baudrate(_fd, 38400); + + set_baudrate(_fd, 115200); return 0; } |