mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-18 07:27:34 +08:00
make structs static and decrease stack size, run astyle
This commit is contained in:
committed by
Lorenz Meier
parent
6fa6e72250
commit
0960e1a820
@@ -482,7 +482,7 @@ int frsky_telemetry_main(int argc, char *argv[])
|
||||
frsky_task = px4_task_spawn_cmd("frsky_telemetry",
|
||||
SCHED_DEFAULT,
|
||||
200,
|
||||
2200,
|
||||
1800,
|
||||
frsky_telemetry_thread_main,
|
||||
(char *const *)argv);
|
||||
|
||||
|
||||
@@ -225,7 +225,9 @@ void sPort_send_GPS_LON(int uart)
|
||||
/* precision is approximately 0.1m */
|
||||
uint32_t iLon = 6E5 * fabs(global_pos.lon);
|
||||
iLon |= (1 << 31);
|
||||
|
||||
if (global_pos.lon < 0) { iLon |= (1 << 30); }
|
||||
|
||||
sPort_send_data(uart, SMARTPORT_ID_GPS_LON_LAT, iLon);
|
||||
}
|
||||
|
||||
@@ -238,7 +240,9 @@ void sPort_send_GPS_LAT(int uart)
|
||||
|
||||
/* convert to 30 bit signed magnitude degrees*6E5 with MSb = 0 and bit 30=sign */
|
||||
uint32_t iLat = 6E5 * fabs(global_pos.lat);
|
||||
|
||||
if (global_pos.lat < 0) { iLat |= (1 << 30); }
|
||||
|
||||
sPort_send_data(uart, SMARTPORT_ID_GPS_LON_LAT, iLat);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user