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

GPX out read logged alt in dm for Betaflight 4 #25

Merged
merged 1 commit into from
May 6, 2019

Conversation

cpihl
Copy link
Contributor

@cpihl cpihl commented May 3, 2019

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.

src/blackbox_decode.c Outdated Show resolved Hide resolved
*/
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);
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

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.

@mikeller
Copy link
Member

mikeller commented May 4, 2019

Fixes #24.

@cpihl
Copy link
Contributor Author

cpihl commented May 4, 2019

Code has now been formatted as requested.

*/
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);
Copy link
Member

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.

}
char fcVersion[30];
strcpy(fcVersion, log->private->fcVersion);
return atoi(strtok(fcVersion,"."));
Copy link
Member

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.

mikeller
mikeller previously approved these changes May 5, 2019
Copy link
Member

@mikeller mikeller left a 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
@cpihl
Copy link
Contributor Author

cpihl commented May 5, 2019

Not sure if OK now?
A review was dismissed while I reached god level of messing up the most basic rebase, squash and push.

@mikeller
Copy link
Member

mikeller commented May 5, 2019

@cpihl: All good now, just waiting for CI to do its thing and tell us that the build is good.

@mikeller mikeller merged commit 9f6ee40 into betaflight:master May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants