Code formatter fixes

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois 2016-02-08 22:59:26 -08:00 committed by Julian Oes
parent 419f4c49ce
commit 791ec37f43
8 changed files with 26 additions and 16 deletions

View File

@ -55,12 +55,12 @@ public:
*/
static uORB::KraitFastRpcChannel *GetInstance()
{
if (_InstancePtr == nullptr)
{
if (_InstancePtr == nullptr) {
_InstancePtr = new uORB::KraitFastRpcChannel();
}
return _InstancePtr;
}
}
/**
* @brief Interface to notify the remote entity of interest of a

View File

@ -181,6 +181,7 @@ MultirotorMixer::from_text(Mixer::ControlCallback control_cb, uintptr_t cb_handl
geometry = MultirotorGeometry::OCTA_COX;
#if 0
} else if (!strcmp(geomname, "8cw")) {
geometry = MultirotorGeometry::OCTA_COX_WIDE;
#endif

View File

@ -547,7 +547,7 @@ param_set_internal(param_t param, const void *val, bool mark_saved, bool notify_
bool params_changed = false;
PX4_DEBUG("param_set_internal params: param = %d, val = 0x%X, mark_saved: %d, notify_changes: %d",
param, val, (int)mark_saved, (int)notify_changes);
param, val, (int)mark_saved, (int)notify_changes);
param_lock();
@ -816,6 +816,7 @@ param_save_default(void)
res = ERROR;
goto exit;
}
is_locked = true;
fd = PARAM_OPEN(filename, O_WRONLY | O_CREAT, PX4_O_MODE_666);
@ -835,17 +836,18 @@ param_save_default(void)
PARAM_CLOSE(fd);
exit:
if (is_locked) {
release_shmem_lock();
}
if (fd >= 0) {
close(fd);
}
close(fd);
}
if (res == OK) {
PX4_INFO("saving params completed successfully\n");
}
}
return res;
}

View File

@ -135,13 +135,15 @@ int DfImu::stop()
return 0;
}
int DfImu::_publish_callback(struct imu_sensor_data &data) {
int DfImu::_publish_callback(struct imu_sensor_data &data)
{
PX4_WARN("publish");
return 0;
};
namespace df_imu {
namespace df_imu
{
DfImu *g_dev = nullptr;
@ -164,6 +166,7 @@ int stop()
}
int ret = g_dev->stop();
if (ret != 0) {
PX4_ERR("driver could not be stopped");
return ret;

View File

@ -174,8 +174,7 @@ px4_task_t px4_task_spawn_cmd(const char *name, int scheduler, int priority, int
rv = pthread_attr_setstacksize(&attr, stack_size);
if (rv != 0)
{
if (rv != 0) {
PX4_ERR("pthread_attr_setstacksize returned error");
return (rv < 0) ? rv : -rv;
}

View File

@ -167,7 +167,7 @@ px4_task_t px4_task_spawn_cmd(const char *name, int scheduler, int priority, int
PX4_DEBUG("stack address after pthread_attr_init: 0x%X", attr.stackaddr);
PX4_DEBUG("attr address: 0x%X, param address: 0x%X", &attr, &param);
rv = pthread_attr_getschedparam(&attr, &param);
rv = pthread_attr_getschedparam(&attr, &param);
PX4_DEBUG("stack address after pthread_attr_getschedparam: 0x%X", attr.stackaddr);
if (rv != 0) {

View File

@ -179,11 +179,13 @@ void update_to_shmem(param_t param, union param_value_u value)
#ifdef SHMEM_DEBUG
if (param_type(param) == PARAM_TYPE_INT32) {
PX4_INFO("Set value %d for param %s to shmem, set adsp index %d:%d\n", value.i, param_name(param), byte_changed, bit_changed);
PX4_INFO("Set value %d for param %s to shmem, set adsp index %d:%d\n", value.i, param_name(param), byte_changed,
bit_changed);
}
else if (param_type(param) == PARAM_TYPE_FLOAT) {
PX4_INFO("Set value %f for param %s to shmem, set adsp index %d:%d\n", value.f, param_name(param), byte_changed, bit_changed);
PX4_INFO("Set value %f for param %s to shmem, set adsp index %d:%d\n", value.f, param_name(param), byte_changed,
bit_changed);
}
#endif
@ -232,11 +234,13 @@ static void update_value_from_shmem(param_t param, union param_value_u *value)
#ifdef SHMEM_DEBUG
if (param_type(param) == PARAM_TYPE_INT32) {
PX4_INFO("Got value %d for param %s from shmem, cleared krait index %d:%d\n", value->i, param_name(param), byte_changed, bit_changed);
PX4_INFO("Got value %d for param %s from shmem, cleared krait index %d:%d\n", value->i, param_name(param), byte_changed,
bit_changed);
}
else if (param_type(param) == PARAM_TYPE_FLOAT) {
PX4_INFO("Got value %f for param %s from shmem, cleared krait index %d:%d\n", value->f, param_name(param), byte_changed, bit_changed);
PX4_INFO("Got value %f for param %s from shmem, cleared krait index %d:%d\n", value->f, param_name(param), byte_changed,
bit_changed);
}
#endif

View File

@ -122,6 +122,7 @@ load(const char *devname, const char *fname)
}
char buf[2048];
if (load_mixer_file(fname, &buf[0], sizeof(buf)) < 0) {
warnx("can't load mixer: %s", fname);
return 1;