-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
GPX out read logged alt in dm for Betaflight 4 #25
Conversation
src/blackbox_decode.c
Outdated
*/ | ||
float getAltitude(flightLog_t *log, int64_t *frame) { | ||
return frame[log->gpsFieldIndexes.GPS_altitude] / 100.0 + options.altOffset; //Change [cm] to [m] for gpx format | ||
int majorFcVersion=getMajorVersion(log); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use spaces around operators.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spaces around =
are still missing.
Fixes #24. |
Code has now been formatted as requested. |
src/blackbox_decode.c
Outdated
*/ | ||
float getAltitude(flightLog_t *log, int64_t *frame) { | ||
return frame[log->gpsFieldIndexes.GPS_altitude] / 100.0 + options.altOffset; //Change [cm] to [m] for gpx format | ||
int majorFcVersion=getMajorVersion(log); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spaces around =
are still missing.
src/blackbox_decode.c
Outdated
} | ||
char fcVersion[30]; | ||
strcpy(fcVersion, log->private->fcVersion); | ||
return atoi(strtok(fcVersion,".")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still plenty of places where the formatting is not up to the coding standard. Please read https://github.com/betaflight/betaflight/blob/master/docs/development/CodingStyle.md and format all of your changes accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please rebase and squash this into one commit?
Code formatted Two spaces added Auto-formatted changes using coding standards
Not sure if OK now? |
@cpihl: All good now, just waiting for CI to do its thing and tell us that the build is good. |
Betaflight 4 log altitude in unit dm instead of cm as in earlier versions. Exporting to GPX file now check firmware version and read as dm unit if log file from Betaflight 4 or later.