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

Open
wants to merge 1 commit into
base: master
from

Conversation

@Huibean
Copy link
Contributor

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 left a comment

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 VimDrones:fix-spi-clock-debug-msg branch 3 times, most recently from 4bd9977 to 63b1635 Dec 2, 2019
@Huibean

This comment has been minimized.

Copy link
Contributor Author

Huibean commented Dec 2, 2019

why the travis-ci is not passing?

@rmackay9

This comment has been minimized.

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 Dec 2, 2019

Points addressed

Copy link
Contributor

peterbarker left a comment

@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 Huibean force-pushed the VimDrones:fix-spi-clock-debug-msg branch from 63b1635 to 09638bf Dec 3, 2019
@Huibean

This comment has been minimized.

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
@Huibean Huibean force-pushed the VimDrones:fix-spi-clock-debug-msg branch from 09638bf to 63241bc Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.