mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-03 04:03:59 -04:00
CPUInfo: example fix travis warning
missing function declaration implicit cast some style fix
This commit is contained in:
parent
eb4298ca3e
commit
c73584c9b8
@ -8,6 +8,9 @@
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#include <AP_Common/AP_Common.h>
|
||||
|
||||
void setup();
|
||||
void loop();
|
||||
|
||||
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
|
||||
|
||||
void setup() {
|
||||
@ -24,9 +27,9 @@ static void show_sizes(void)
|
||||
hal.console->printf("bool : %lu\n", (unsigned long)sizeof(bool));
|
||||
hal.console->printf("void* : %lu\n", (unsigned long)sizeof(void *));
|
||||
|
||||
hal.console->printf("printing NaN: %f\n", sqrt(-1.0f));
|
||||
hal.console->printf("printing +Inf: %f\n", 1.0f/0.0f);
|
||||
hal.console->printf("printing -Inf: %f\n", -1.0f/0.0f);
|
||||
hal.console->printf("printing NaN: %f\n", (double)sqrtf(-1.0f));
|
||||
hal.console->printf("printing +Inf: %f\n", (double)(1.0f/0.0f));
|
||||
hal.console->printf("printing -Inf: %f\n", (double)(-1.0f/0.0f));
|
||||
}
|
||||
|
||||
#define TENTIMES(x) do { x; x; x; x; x; x; x; x; x; x; } while (0)
|
||||
|
Loading…
Reference in New Issue
Block a user