uncrustify libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.pde

This commit is contained in:
uncrustify 2012-08-16 23:19:43 -07:00 committed by Pat Hickey
parent 9f2d71e544
commit 1e8ea08bce

View File

@ -11,7 +11,7 @@
FastSerialPort0(Serial);
FastSerialPort1(Serial1);
GPS *gps;
GPS *gps;
AP_GPS_Auto GPS(&Serial1, &gps);
#define T6 1000000
@ -21,19 +21,19 @@ AP_GPS_Auto GPS(&Serial1, &gps);
// probably this should be moved to AP_Common
void print_latlon(BetterStream *s, int32_t lat_or_lon)
{
int32_t dec_portion, frac_portion;
int32_t abs_lat_or_lon = labs(lat_or_lon);
int32_t dec_portion, frac_portion;
int32_t abs_lat_or_lon = labs(lat_or_lon);
// extract decimal portion (special handling of negative numbers to ensure we round towards zero)
// extract decimal portion (special handling of negative numbers to ensure we round towards zero)
dec_portion = abs_lat_or_lon / T7;
// extract fractional portion
// extract fractional portion
frac_portion = abs_lat_or_lon - dec_portion*T7;
// print output including the minus sign
if( lat_or_lon < 0 ) {
s->printf_P(PSTR("-"));
}
// print output including the minus sign
if( lat_or_lon < 0 ) {
s->printf_P(PSTR("-"));
}
s->printf_P(PSTR("%ld.%07ld"),(long)dec_portion,(long)frac_portion);
}
@ -62,7 +62,7 @@ void loop()
(int)gps->ground_course / 100,
gps->num_sats,
gps->time,
gps->status());
gps->status());
} else {
Serial.println("No fix");
}