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

AP_HAL_ChibiOS: fix printf error #12946

Closed
wants to merge 1 commit into from

Conversation

Huibean
Copy link
Contributor

@Huibean Huibean commented Dec 2, 2019

fix spi clock debug error
../../libraries/AP_HAL_ChibiOS/SPIDevice.cpp: In static member function 'static void ChibiOS::SPIDevice::test_clock_freq()': ../../libraries/AP_HAL_ChibiOS/SPIDevice.cpp:433:61: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t {aka long unsigned int}' [-Werror=format=] hal.console->printf("Waiting %u\n", AP_HAL::millis()); ~~~~~~~~~~~~~~~~^

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

Tryingto tack on "long" to the format leads to 32-vs-64-bit pain.

Casting to unsigned is our pattern.

libraries/AP_HAL_ChibiOS/SPIDevice.cpp Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/SPIDevice.cpp Outdated Show resolved Hide resolved
@Huibean Huibean force-pushed the fix-spi-clock-debug-msg branch 3 times, most recently from 4bd9977 to 63b1635 Compare December 2, 2019 09:25
@Huibean
Copy link
Contributor Author

Huibean commented Dec 2, 2019

why the travis-ci is not passing?

@rmackay9
Copy link
Contributor

rmackay9 commented Dec 2, 2019

@Huibean, looks like a server issue, I've kicked it off again and maybe it will work this time.

@peterbarker peterbarker dismissed their stale review December 2, 2019 22:36

Points addressed

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

@Huibean Patches look good now, but the commit message needs fixing. We require a commit-per-directory, and for that directory name to prepend the commit description.

In this case AP_HAL_ChibiOS: fix printf error would be a reasonable commit message.

@Huibean
Copy link
Contributor Author

Huibean commented Dec 3, 2019

@peterbarker I got it, updated

@Huibean Huibean changed the title fix printf error AP_HAL_ChibiOS: fix printf error Dec 3, 2019
@tridge
Copy link
Contributor

tridge commented Feb 25, 2020

already fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants