Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change GPS distance from home to 32bit #4617

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ typedef struct statistic_s {
int16_t max_power; // /100
int16_t min_rssi;
int32_t max_altitude;
uint16_t max_distance;
uint32_t max_distance;
} statistic_t;

static statistic_t stats;
Expand Down
2 changes: 1 addition & 1 deletion src/main/navigation/navigation.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
* Compatibility for home position
*-----------------------------------------------------------*/
gpsLocation_t GPS_home;
uint16_t GPS_distanceToHome; // distance to home point in meters
uint32_t GPS_distanceToHome; // distance to home point in meters
int16_t GPS_directionToHome; // direction to home point in degrees

#if defined(USE_NAV)
Expand Down
2 changes: 1 addition & 1 deletion src/main/navigation/navigation.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

/* GPS Home location data */
extern gpsLocation_t GPS_home;
extern uint16_t GPS_distanceToHome; // distance to home point in meters
extern uint32_t GPS_distanceToHome; // distance to home point in meters
extern int16_t GPS_directionToHome; // direction to home point in degrees

extern bool autoThrottleManuallyIncreased;
Expand Down
2 changes: 1 addition & 1 deletion src/test/unit/serial_msp_unittest.cc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ uint16_t cycleTime = 0; // this is the number in micro second to achieve
// from navigation.c
int32_t GPS_home[2];
int32_t GPS_hold[2];
uint16_t GPS_distanceToHome; // distance to home point in meters
uint32_t GPS_distanceToHome; // distance to home point in meters
int16_t GPS_directionToHome; // direction to home or hol point in degrees
navigationMode_e nav_mode = NAV_MODE_NONE; // Navigation mode
void GPS_set_next_wp(int32_t *lat, int32_t *lon) {UNUSED(lat);UNUSED(lon);}
Expand Down
2 changes: 1 addition & 1 deletion src/test/unit/telemetry_hott_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ gpsSolutionData_t gpsSol;
uint8_t GPS_numSat;
int32_t GPS_coord[2];
uint16_t GPS_speed; // speed in 0.1m/s
uint16_t GPS_distanceToHome; // distance to home point in meters
uint32_t GPS_distanceToHome; // distance to home point in meters
uint16_t GPS_altitude; // altitude in 0.1m
uint16_t vbat;
int16_t GPS_directionToHome; // direction to home or hol point in degrees
Expand Down