mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 15:33:33 +08:00
formatting
This commit is contained in:
committed by
Lorenz Meier
parent
62a152227a
commit
e7ed07cf3c
+16
-12
@@ -303,10 +303,12 @@ int GPS::init()
|
|||||||
|
|
||||||
void GPS::task_main_trampoline(int argc, char *argv[])
|
void GPS::task_main_trampoline(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
if (!strcmp(argv[1], "1"))
|
if (!strcmp(argv[1], "1")) {
|
||||||
g_dev[0]->task_main();
|
g_dev[0]->task_main();
|
||||||
else if (!strcmp(argv[1], "2"))
|
|
||||||
g_dev[1]->task_main();
|
} else if (!strcmp(argv[1], "2")) {
|
||||||
|
g_dev[1]->task_main();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int GPS::callback(GPSCallbackType type, void *data1, int data2, void *user)
|
int GPS::callback(GPSCallbackType type, void *data1, int data2, void *user)
|
||||||
@@ -813,14 +815,14 @@ GPS::print_info()
|
|||||||
void
|
void
|
||||||
GPS::publish()
|
GPS::publish()
|
||||||
{
|
{
|
||||||
if(_gps_num == 1){
|
if (_gps_num == 1) {
|
||||||
orb_publish_auto(ORB_ID(vehicle_gps_position), &_report_gps_pos_pub, &_report_gps_pos, &_gps_orb_instance,
|
orb_publish_auto(ORB_ID(vehicle_gps_position), &_report_gps_pos_pub, &_report_gps_pos, &_gps_orb_instance,
|
||||||
ORB_PRIO_DEFAULT);
|
ORB_PRIO_DEFAULT);
|
||||||
is_gps1_advertised = true;
|
is_gps1_advertised = true;
|
||||||
}
|
|
||||||
else if(is_gps1_advertised){
|
} else if (is_gps1_advertised) {
|
||||||
orb_publish_auto(ORB_ID(vehicle_gps_position), &_report_gps_pos_pub, &_report_gps_pos, &_gps_orb_instance,
|
orb_publish_auto(ORB_ID(vehicle_gps_position), &_report_gps_pos_pub, &_report_gps_pos, &_gps_orb_instance,
|
||||||
ORB_PRIO_DEFAULT);
|
ORB_PRIO_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -860,6 +862,7 @@ start(const char *uart_path, bool fake_gps, bool enable_sat_info, int gps_num)
|
|||||||
if (OK != g_dev[0]->init()) {
|
if (OK != g_dev[0]->init()) {
|
||||||
goto fail1;
|
goto fail1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -879,6 +882,7 @@ start(const char *uart_path, bool fake_gps, bool enable_sat_info, int gps_num)
|
|||||||
if (OK != g_dev[1]->init()) {
|
if (OK != g_dev[1]->init()) {
|
||||||
goto fail2;
|
goto fail2;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user