Skip to content

Commit 8fb7930

Browse files
authored
Merge pull request #4617 from giacomo892/32bit_max_distance_giacomo892
Change GPS distance from home to 32bit
2 parents 6544d50 + 517db3e commit 8fb7930

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/main/io/osd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ typedef struct statistic_s {
145145
int16_t max_power; // /100
146146
int16_t min_rssi;
147147
int32_t max_altitude;
148-
uint16_t max_distance;
148+
uint32_t max_distance;
149149
} statistic_t;
150150

151151
static statistic_t stats;

src/main/navigation/navigation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
* Compatibility for home position
6969
*-----------------------------------------------------------*/
7070
gpsLocation_t GPS_home;
71-
uint16_t GPS_distanceToHome; // distance to home point in meters
71+
uint32_t GPS_distanceToHome; // distance to home point in meters
7272
int16_t GPS_directionToHome; // direction to home point in degrees
7373

7474
#if defined(USE_NAV)

src/main/navigation/navigation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
/* GPS Home location data */
3434
extern gpsLocation_t GPS_home;
35-
extern uint16_t GPS_distanceToHome; // distance to home point in meters
35+
extern uint32_t GPS_distanceToHome; // distance to home point in meters
3636
extern int16_t GPS_directionToHome; // direction to home point in degrees
3737

3838
extern bool autoThrottleManuallyIncreased;

src/test/unit/serial_msp_unittest.cc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ uint16_t cycleTime = 0; // this is the number in micro second to achieve
545545
// from navigation.c
546546
int32_t GPS_home[2];
547547
int32_t GPS_hold[2];
548-
uint16_t GPS_distanceToHome; // distance to home point in meters
548+
uint32_t GPS_distanceToHome; // distance to home point in meters
549549
int16_t GPS_directionToHome; // direction to home or hol point in degrees
550550
navigationMode_e nav_mode = NAV_MODE_NONE; // Navigation mode
551551
void GPS_set_next_wp(int32_t *lat, int32_t *lon) {UNUSED(lat);UNUSED(lon);}

src/test/unit/telemetry_hott_unittest.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ gpsSolutionData_t gpsSol;
174174
uint8_t GPS_numSat;
175175
int32_t GPS_coord[2];
176176
uint16_t GPS_speed; // speed in 0.1m/s
177-
uint16_t GPS_distanceToHome; // distance to home point in meters
177+
uint32_t GPS_distanceToHome; // distance to home point in meters
178178
uint16_t GPS_altitude; // altitude in 0.1m
179179
uint16_t vbat;
180180
int16_t GPS_directionToHome; // direction to home or hol point in degrees

0 commit comments

Comments
 (0)