forked from Archive/PX4-Autopilot
POSIX: changes to support posix build on ARMv7
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
parent
2903ceaacc
commit
062a547d07
|
@ -91,6 +91,8 @@ print """
|
|||
#include <uORB/uORB.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#include <inttypes.h>
|
||||
"""
|
||||
for m in messages:
|
||||
print "#include <uORB/topics/%s.h>" % m
|
||||
|
@ -135,7 +137,7 @@ for index,m in enumerate(messages[1:]):
|
|||
print "\t\t\t}"
|
||||
print "\t\t\tprintf(\"\\n\");"
|
||||
elif item[0] == "uint64":
|
||||
print "\t\t\tprintf(\"%s: %%lu\\n \",container.%s);" % (item[1], item[1])
|
||||
print "\t\t\tprintf(\"%s: %%\" PRIu64 \"\\n \",container.%s);" % (item[1], item[1])
|
||||
elif item[0] == "uint8":
|
||||
print "\t\t\tprintf(\"%s: %%u\\n \",container.%s);" % (item[1], item[1])
|
||||
elif item[0] == "bool":
|
||||
|
|
|
@ -211,7 +211,7 @@ Airspeed::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
|||
bool want_start = (_measure_ticks == 0);
|
||||
|
||||
/* convert hz to tick interval via microseconds */
|
||||
unsigned ticks = USEC2TICK(1000000 / arg);
|
||||
long ticks = USEC2TICK(1000000 / arg);
|
||||
|
||||
/* check against maximum rate */
|
||||
if (ticks < USEC2TICK(_conversion_interval))
|
||||
|
|
Loading…
Reference in New Issue