delete px4_includes.h header and update boards/ to use syslog

This commit is contained in:
Daniel Agar
2019-01-22 11:23:29 -05:00
parent 376e078c24
commit 2ffb49b734
86 changed files with 190 additions and 563 deletions
@@ -229,8 +229,6 @@ AttitudeEstimatorQ::~AttitudeEstimatorQ()
int AttitudeEstimatorQ::start()
{
ASSERT(_control_task == -1);
/* start the task */
_control_task = px4_task_spawn_cmd("attitude_estimator_q",
SCHED_DEFAULT,
@@ -223,7 +223,7 @@ GroundRoverAttitudeControl::task_main()
/* this is undesirable but not much we can do - might want to flag unhappy status */
if (pret < 0) {
warn("poll error %d, %d", pret, errno);
PX4_ERR("poll error %d, %d", pret, errno);
continue;
}
@@ -298,7 +298,7 @@ GroundRoverAttitudeControl::task_main()
perf_count(_nonfinite_output_perf);
if (_debug && loop_counter % 10 == 0) {
warnx("yaw_u %.4f", (double)yaw_u);
PX4_INFO("yaw_u %.4f", (double)yaw_u);
}
}
@@ -343,7 +343,7 @@ GroundRoverAttitudeControl::task_main()
perf_end(_loop_perf);
}
warnx("exiting.\n");
PX4_INFO("exiting.");
_control_task = -1;
_task_running = false;
@@ -352,8 +352,6 @@ GroundRoverAttitudeControl::task_main()
int
GroundRoverAttitudeControl::start()
{
ASSERT(_control_task == -1);
/* start the task */
_control_task = px4_task_spawn_cmd("gnd_att_control",
SCHED_DEFAULT,
@@ -363,7 +361,7 @@ GroundRoverAttitudeControl::start()
nullptr);
if (_control_task < 0) {
warn("task start failed");
PX4_ERR("task start failed");
return -errno;
}
@@ -373,28 +371,28 @@ GroundRoverAttitudeControl::start()
int gnd_att_control_main(int argc, char *argv[])
{
if (argc < 2) {
warnx("usage: gnd_att_control {start|stop|status}");
PX4_INFO("usage: gnd_att_control {start|stop|status}");
return 1;
}
if (!strcmp(argv[1], "start")) {
if (att_gnd_control::g_control != nullptr) {
warnx("already running");
PX4_WARN("already running");
return 1;
}
att_gnd_control::g_control = new GroundRoverAttitudeControl;
if (att_gnd_control::g_control == nullptr) {
warnx("alloc failed");
PX4_ERR("alloc failed");
return 1;
}
if (PX4_OK != att_gnd_control::g_control->start()) {
delete att_gnd_control::g_control;
att_gnd_control::g_control = nullptr;
warn("start failed");
PX4_ERR("start failed");
return 1;
}
@@ -416,7 +414,7 @@ int gnd_att_control_main(int argc, char *argv[])
if (!strcmp(argv[1], "stop")) {
if (att_gnd_control::g_control == nullptr) {
warnx("not running");
PX4_WARN("not running");
return 1;
}
@@ -427,15 +425,15 @@ int gnd_att_control_main(int argc, char *argv[])
if (!strcmp(argv[1], "status")) {
if (att_gnd_control::g_control) {
warnx("running");
PX4_INFO("running");
return 0;
} else {
warnx("not running");
PX4_INFO("not running");
return 1;
}
}
warnx("unrecognized command");
PX4_WARN("unrecognized command");
return 1;
}
@@ -484,8 +484,6 @@ GroundRoverPositionControl::task_main_trampoline(int argc, char *argv[])
int
GroundRoverPositionControl::start()
{
ASSERT(_control_task == -1);
/* start the task */
_control_task = px4_task_spawn_cmd("gnd_pos_ctrl",
SCHED_DEFAULT,
+2
View File
@@ -33,8 +33,10 @@
#include "log_writer_file.h"
#include "messages.h"
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <mathlib/mathlib.h>
#include <px4_posix.h>
-1
View File
@@ -52,7 +52,6 @@
#include <uORB/topics/vehicle_command_ack.h>
#include <drivers/drv_hrt.h>
#include <px4_includes.h>
#include <px4_getopt.h>
#include <px4_log.h>
#include <px4_posix.h>
+2
View File
@@ -41,6 +41,8 @@
#include "mavlink_timesync.h"
#include "mavlink_main.h"
#include <stdlib.h>
MavlinkTimesync::MavlinkTimesync(Mavlink *mavlink) :
_mavlink(mavlink)
{
@@ -33,6 +33,7 @@
#include "uORBFastRpcChannel.hpp"
#include "px4_log.h"
#include <algorithm>
#include <string.h>
#include <drivers/drv_hrt.h>
// static initialization.
@@ -40,6 +40,7 @@
#include "px4_log.h"
#include <shmem.h>
#include <drivers/drv_hrt.h>
#include <string.h>
using namespace px4muorb;
@@ -37,6 +37,7 @@
#include <drivers/drv_hrt.h>
#include <cstdio>
#include <pthread.h>
#include <string.h>
#define LOG_TAG "uORBKraitFastRpcChannel.cpp"