QuRT and POSIX changes - part 4

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-04-24 01:24:31 -07:00
parent c802beb3d7
commit 187f13cd70
11 changed files with 65 additions and 35 deletions
+7 -4
View File
@@ -36,10 +36,8 @@
#
SRCS = err.c \
hx_stream.c \
perf_counter.c \
param/param.c \
bson/tinybson.c \
conversions.c \
cpuload.c \
getopt_long.c \
@@ -52,14 +50,19 @@ SRCS = err.c \
otp.c \
board_serial.c \
pwm_limit/pwm_limit.c \
circuit_breaker.cpp \
circuit_breaker_params.c \
mcu_version.c
ifeq ($(PX4_TARGET_OS),nuttx)
SRCS += up_cxxinitialize.c
endif
ifneq ($(PX4_TARGET_OS),qurt)
SRCS += hx_stream.c \
circuit_breaker.cpp \
circuit_breaker_params.c \
bson/tinybson.c
endif
MAXOPTIMIZATION = -Os
EXTRACFLAGS = -Wno-sign-compare
+1 -1
View File
@@ -71,7 +71,7 @@ int val_read(void *dest, volatile const void *src, int bytes)
int write_otp(uint8_t id_type, uint32_t vid, uint32_t pid, char *signature)
{
warnx("write_otp: PX4 / %02X / %02X / %02X / ... etc \n", id_type, vid, pid);
warnx("write_otp: PX4 / %02X / %02lX / %02lX / ... etc \n", id_type, (unsigned long)vid, (unsigned long)pid);
int errors = 0;
+5 -1
View File
@@ -45,6 +45,10 @@
#include <math.h>
#include "perf_counter.h"
#ifdef __PX4_QURT
#define dprintf(...)
#endif
/**
* Header common to all counters.
*/
@@ -470,7 +474,7 @@ perf_print_latency(int fd)
{
dprintf(fd, "bucket : events\n");
for (int i = 0; i < latency_bucket_count; i++) {
printf(" %4i : %i\n", latency_buckets[i], latency_counters[i]);
printf(" %4i : %li\n", latency_buckets[i], (long int)latency_counters[i]);
}
// print the overflow bucket value
dprintf(fd, " >%4i : %i\n", latency_buckets[latency_bucket_count-1], latency_counters[latency_bucket_count]);
+1 -1
View File
@@ -40,7 +40,7 @@
#define _SYSTEMLIB_PERF_COUNTER_H value
#include <stdint.h>
#include <platforms/px4_defines.h>
#include <px4_defines.h>
/**
* Counter types.
+1
View File
@@ -38,6 +38,7 @@
*/
#include <px4_config.h>
#include <px4_time.h>
#include <stdio.h>
#include <unistd.h>
+1 -2
View File
@@ -51,7 +51,7 @@ public:
};
StateTable(Tran const *table, unsigned nStates, unsigned nSignals)
: myTable(table), myNsignals(nSignals), myNstates(nStates) {}
: myTable(table), myNsignals(nSignals) {}
#define NO_ACTION &StateTable::doNothing
#define ACTION(_target) StateTable::Action(_target)
@@ -76,7 +76,6 @@ protected:
private:
Tran const *myTable;
unsigned myNsignals;
unsigned myNstates;
};
#endif