mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-16 08:29:15 +01:00
Merged in filnet/librepilot/LP-402_invalid_value_for_running (pull request #381)
LP-402 invalid value for running
This commit is contained in:
commit
758af312b5
@ -31,8 +31,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#include <openpilot.h>
|
#include <openpilot.h>
|
||||||
|
|
||||||
#include <callbackinfo.h>
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <pid.h>
|
#include <pid.h>
|
||||||
#include <CoordinateConversions.h>
|
#include <CoordinateConversions.h>
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
#include <systemalarms.h>
|
#include <systemalarms.h>
|
||||||
#include <revosettings.h>
|
#include <revosettings.h>
|
||||||
#include <positionstate.h>
|
#include <positionstate.h>
|
||||||
#include <taskinfo.h>
|
|
||||||
|
|
||||||
// a number of useful macros
|
// a number of useful macros
|
||||||
#define ADDSEVERITY(check) severity = (severity != SYSTEMALARMS_ALARM_OK ? severity : ((check) ? SYSTEMALARMS_ALARM_OK : SYSTEMALARMS_ALARM_CRITICAL))
|
#define ADDSEVERITY(check) severity = (severity != SYSTEMALARMS_ALARM_OK ? severity : ((check) ? SYSTEMALARMS_ALARM_OK : SYSTEMALARMS_ALARM_CRITICAL))
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
#include "airspeedsettings.h"
|
#include "airspeedsettings.h"
|
||||||
#include "airspeedsensor.h" // object that will be updated by the module
|
#include "airspeedsensor.h" // object that will be updated by the module
|
||||||
#include "airspeedalarm.h"
|
#include "airspeedalarm.h"
|
||||||
#include "taskinfo.h"
|
|
||||||
|
|
||||||
#if defined(PIOS_INCLUDE_MS4525DO)
|
#if defined(PIOS_INCLUDE_MS4525DO)
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
|
|
||||||
#include "inc/ubx_autoconfig.h"
|
#include "inc/ubx_autoconfig.h"
|
||||||
#include <pios_mem.h>
|
#include <pios_mem.h>
|
||||||
#include "taskinfo.h"
|
|
||||||
|
|
||||||
// private type definitions
|
// private type definitions
|
||||||
|
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
#include "osdinput.h"
|
#include "osdinput.h"
|
||||||
|
|
||||||
#include "attitudestate.h"
|
#include "attitudestate.h"
|
||||||
#include "taskinfo.h"
|
|
||||||
#include "flightstatus.h"
|
#include "flightstatus.h"
|
||||||
|
|
||||||
#include "fifo_buffer.h"
|
#include "fifo_buffer.h"
|
||||||
|
@ -27,8 +27,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#include <openpilot.h>
|
#include <openpilot.h>
|
||||||
|
|
||||||
#include <callbackinfo.h>
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <pid.h>
|
#include <pid.h>
|
||||||
#include <CoordinateConversions.h>
|
#include <CoordinateConversions.h>
|
||||||
|
@ -31,8 +31,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#include <openpilot.h>
|
#include <openpilot.h>
|
||||||
|
|
||||||
#include <callbackinfo.h>
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <pid.h>
|
#include <pid.h>
|
||||||
#include <CoordinateConversions.h>
|
#include <CoordinateConversions.h>
|
||||||
|
@ -28,8 +28,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#include <openpilot.h>
|
#include <openpilot.h>
|
||||||
|
|
||||||
#include <callbackinfo.h>
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <pid.h>
|
#include <pid.h>
|
||||||
#include <alarms.h>
|
#include <alarms.h>
|
||||||
|
@ -27,8 +27,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#include <openpilot.h>
|
#include <openpilot.h>
|
||||||
|
|
||||||
#include <callbackinfo.h>
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <pid.h>
|
#include <pid.h>
|
||||||
#include <pathdesired.h>
|
#include <pathdesired.h>
|
||||||
|
@ -31,8 +31,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#include <openpilot.h>
|
#include <openpilot.h>
|
||||||
|
|
||||||
#include <callbackinfo.h>
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <pid.h>
|
#include <pid.h>
|
||||||
#include <alarms.h>
|
#include <alarms.h>
|
||||||
|
@ -27,8 +27,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#include <openpilot.h>
|
#include <openpilot.h>
|
||||||
|
|
||||||
#include <callbackinfo.h>
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <pid.h>
|
#include <pid.h>
|
||||||
#include <CoordinateConversions.h>
|
#include <CoordinateConversions.h>
|
||||||
|
@ -26,8 +26,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#include <openpilot.h>
|
#include <openpilot.h>
|
||||||
|
|
||||||
#include <callbackinfo.h>
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <pid.h>
|
#include <pid.h>
|
||||||
#include <CoordinateConversions.h>
|
#include <CoordinateConversions.h>
|
||||||
|
@ -28,8 +28,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#include <openpilot.h>
|
#include <openpilot.h>
|
||||||
|
|
||||||
#include <callbackinfo.h>
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <pid.h>
|
#include <pid.h>
|
||||||
#include <alarms.h>
|
#include <alarms.h>
|
||||||
|
@ -27,8 +27,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#include <openpilot.h>
|
#include <openpilot.h>
|
||||||
|
|
||||||
#include <callbackinfo.h>
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <pid.h>
|
#include <pid.h>
|
||||||
#include <alarms.h>
|
#include <alarms.h>
|
||||||
|
@ -26,8 +26,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#include <openpilot.h>
|
#include <openpilot.h>
|
||||||
|
|
||||||
#include <callbackinfo.h>
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <pid.h>
|
#include <pid.h>
|
||||||
#include <alarms.h>
|
#include <alarms.h>
|
||||||
|
@ -244,7 +244,9 @@ static void systemTask(__attribute__((unused)) void *parameters)
|
|||||||
|
|
||||||
#ifdef DIAG_TASKS
|
#ifdef DIAG_TASKS
|
||||||
TaskInfoData taskInfoData;
|
TaskInfoData taskInfoData;
|
||||||
|
memset(&taskInfoData, 0, sizeof(TaskInfoData));
|
||||||
CallbackInfoData callbackInfoData;
|
CallbackInfoData callbackInfoData;
|
||||||
|
memset(&callbackInfoData, 0, sizeof(CallbackInfoData));
|
||||||
#endif
|
#endif
|
||||||
// Main system loop
|
// Main system loop
|
||||||
while (1) {
|
while (1) {
|
||||||
@ -270,13 +272,9 @@ static void systemTask(__attribute__((unused)) void *parameters)
|
|||||||
PIOS_TASK_MONITOR_ForEachTask(taskMonitorForEachCallback, &taskInfoData);
|
PIOS_TASK_MONITOR_ForEachTask(taskMonitorForEachCallback, &taskInfoData);
|
||||||
TaskInfoSet(&taskInfoData);
|
TaskInfoSet(&taskInfoData);
|
||||||
// Update the callback status object
|
// Update the callback status object
|
||||||
// if(FALSE){
|
|
||||||
PIOS_CALLBACKSCHEDULER_ForEachCallback(callbackSchedulerForEachCallback, &callbackInfoData);
|
PIOS_CALLBACKSCHEDULER_ForEachCallback(callbackSchedulerForEachCallback, &callbackInfoData);
|
||||||
CallbackInfoSet(&callbackInfoData);
|
CallbackInfoSet(&callbackInfoData);
|
||||||
// }
|
|
||||||
#endif
|
#endif
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
UAVObjEvent ev;
|
UAVObjEvent ev;
|
||||||
int delayTime = SYSTEM_UPDATE_PERIOD_MS;
|
int delayTime = SYSTEM_UPDATE_PERIOD_MS;
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
#include <hwsettings.h>
|
#include <hwsettings.h>
|
||||||
#include <manualcontrolsettings.h>
|
#include <manualcontrolsettings.h>
|
||||||
#include <gcsreceiver.h>
|
#include <gcsreceiver.h>
|
||||||
#include <taskinfo.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pull in the board-specific static HW definitions.
|
* Pull in the board-specific static HW definitions.
|
||||||
|
@ -1024,7 +1024,7 @@ QVariant UAVObjectField::getValue(quint32 index)
|
|||||||
quint8 tmpenum;
|
quint8 tmpenum;
|
||||||
memcpy(&tmpenum, &data[offset + numBytesPerElement * index], numBytesPerElement);
|
memcpy(&tmpenum, &data[offset + numBytesPerElement * index], numBytesPerElement);
|
||||||
if (tmpenum >= options.length()) {
|
if (tmpenum >= options.length()) {
|
||||||
qDebug() << "Invalid value for" << name;
|
qDebug() << "Invalid enum" << tmpenum << "for field" << (obj->getName() + ":" + name + "[" + elementNames[index] + "]");
|
||||||
tmpenum = 0;
|
tmpenum = 0;
|
||||||
}
|
}
|
||||||
return QVariant(options[tmpenum]);
|
return QVariant(options[tmpenum]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user