mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 20:28:37 +08:00
the gps_thread_should_exit flag is now static again, hope it works like this
This commit is contained in:
+2
-3
@@ -58,7 +58,6 @@
|
|||||||
#include <v1.0/common/mavlink.h>
|
#include <v1.0/common/mavlink.h>
|
||||||
#include <mavlink/mavlink_log.h>
|
#include <mavlink/mavlink_log.h>
|
||||||
|
|
||||||
bool gps_thread_should_exit = false; /**< Deamon exit flag */
|
|
||||||
static bool thread_running = false; /**< Deamon status flag */
|
static bool thread_running = false; /**< Deamon status flag */
|
||||||
static int deamon_task; /**< Handle of deamon task / thread */
|
static int deamon_task; /**< Handle of deamon task / thread */
|
||||||
|
|
||||||
@@ -154,7 +153,7 @@ int gps_main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!strcmp(argv[1], "status")) {
|
if (!strcmp(argv[1], "status")) {
|
||||||
if (thread_running) {
|
if (thread_running) {
|
||||||
printf("\gps is running\n");
|
printf("\tgps is running\n");
|
||||||
} else {
|
} else {
|
||||||
printf("\tgps not started\n");
|
printf("\tgps not started\n");
|
||||||
}
|
}
|
||||||
@@ -329,7 +328,7 @@ int gps_thread_main(int argc, char *argv[]) {
|
|||||||
* if the gps was once running the wtachdog thread will not return but instead try to reconfigure the gps (depending on the mode/protocol)
|
* if the gps was once running the wtachdog thread will not return but instead try to reconfigure the gps (depending on the mode/protocol)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (current_gps_mode == GPS_MODE_UBX) { //TODO: make a small enum with all modes to avoid all the strcpy
|
if (current_gps_mode == GPS_MODE_UBX) {
|
||||||
|
|
||||||
if (gps_verbose) printf("[gps] Trying UBX mode at %d baud\n", current_gps_speed);
|
if (gps_verbose) printf("[gps] Trying UBX mode at %d baud\n", current_gps_speed);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
extern bool gps_thread_should_exit; /**< Deamon status flag */
|
static bool gps_thread_should_exit; /**< Deamon status flag */
|
||||||
|
|
||||||
#endif /* GPS_H_ */
|
#endif /* GPS_H_ */
|
||||||
|
|||||||
Reference in New Issue
Block a user