Browse Source

Bug fixes for EM-406

git-svn-id: https://arducopter.googlecode.com/svn/trunk@539 f9c3cf11-9bcb-44bc-f272-b75c42450872
master
deweibel 15 years ago
parent
commit
34aa823003
  1. 1
      libraries/AP_GPS/AP_GPS.h
  2. 8
      libraries/AP_GPS/AP_GPS_406.cpp
  3. 3
      libraries/AP_GPS/AP_GPS_SIRF.cpp

1
libraries/AP_GPS/AP_GPS.h

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
#include "AP_GPS_NMEA.h"
#include "AP_GPS_SIRF.h"
#include "AP_GPS_406.h"
#include "AP_GPS_UBLOX.h"
#include "AP_GPS_MTK.h"
#include "AP_GPS_IMU.h"

8
libraries/AP_GPS/AP_GPS_406.cpp

@ -68,6 +68,14 @@ AP_GPS_406::_change_to_sirf_protocol(void) @@ -68,6 +68,14 @@ AP_GPS_406::_change_to_sirf_protocol(void)
_port->print(init_str);
delay(300);
fs->begin(9600);
delay(300);
_port->print(init_str);
delay(300);
fs->begin(GPS_406_BITRATE);
delay(300);
_port->print(init_str);
delay(300);
}

3
libraries/AP_GPS/AP_GPS_SIRF.cpp

@ -165,7 +165,8 @@ AP_GPS_SIRF::_parse_gps(void) @@ -165,7 +165,8 @@ AP_GPS_SIRF::_parse_gps(void)
switch(_msg_id) {
case MSG_GEONAV:
time = _swapl(&_buffer.nav.time);
fix = (0 == _buffer.nav.fix_invalid) && (FIX_3D == (_buffer.nav.fix_type & FIX_MASK));
//fix = (0 == _buffer.nav.fix_invalid) && (FIX_3D == (_buffer.nav.fix_type & FIX_MASK));
fix = (0 == _buffer.nav.fix_invalid);
latitude = _swapl(&_buffer.nav.latitude);
longitude = _swapl(&_buffer.nav.longitude);
altitude = _swapl(&_buffer.nav.altitude_msl);

Loading…
Cancel
Save