New MTK codes
git-svn-id: https://arducopter.googlecode.com/svn/trunk@399 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
11e896b64c
commit
d68cde2571
@ -38,8 +38,7 @@ AP_GPS_MTK::AP_GPS_MTK()
|
|||||||
|
|
||||||
// Public Methods //////////////////////////////////////////////////////////////
|
// Public Methods //////////////////////////////////////////////////////////////
|
||||||
void AP_GPS_MTK::init(void)
|
void AP_GPS_MTK::init(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
ck_a = 0;
|
ck_a = 0;
|
||||||
ck_b = 0;
|
ck_b = 0;
|
||||||
step = 0;
|
step = 0;
|
||||||
@ -50,10 +49,13 @@ void AP_GPS_MTK::init(void)
|
|||||||
// initialize serial port for binary protocol use
|
// initialize serial port for binary protocol use
|
||||||
#if defined(__AVR_ATmega1280__)
|
#if defined(__AVR_ATmega1280__)
|
||||||
Serial1.begin(38400); // Serial port 1 on ATMega1280
|
Serial1.begin(38400); // Serial port 1 on ATMega1280
|
||||||
|
Serial1.print(MTK_SET_BINARY);
|
||||||
|
Serial1.print(MTK_OUTPUT_4HZ);
|
||||||
#else
|
#else
|
||||||
Serial.begin(38400);
|
Serial.begin(38400);
|
||||||
|
Serial.print(MTK_SET_BINARY);
|
||||||
|
Serial.print(MTK_OUTPUT_4HZ);
|
||||||
#endif
|
#endif
|
||||||
Serial1.print("$PGCMD,16,0,0,0,0,0*6A\r\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// optimization : This code don¥t wait for data, only proccess the data available
|
// optimization : This code don¥t wait for data, only proccess the data available
|
||||||
|
Loading…
Reference in New Issue
Block a user