mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
OP-1474 Revert TPS debugging code
This commit is contained in:
parent
0e2af9c654
commit
7afb211330
@ -44,8 +44,6 @@
|
|||||||
#include <stabilizationbank.h>
|
#include <stabilizationbank.h>
|
||||||
#include <stabilizationdesired.h>
|
#include <stabilizationdesired.h>
|
||||||
#include <actuatordesired.h>
|
#include <actuatordesired.h>
|
||||||
#include <tpsdebug.h>
|
|
||||||
#include <pid.h> // FIXME: Temporary debugging
|
|
||||||
|
|
||||||
#include <stabilization.h>
|
#include <stabilization.h>
|
||||||
#include <relay_tuning.h>
|
#include <relay_tuning.h>
|
||||||
@ -86,7 +84,6 @@ void stabilizationInnerloopInit()
|
|||||||
ManualControlCommandInitialize();
|
ManualControlCommandInitialize();
|
||||||
StabilizationDesiredInitialize();
|
StabilizationDesiredInitialize();
|
||||||
ActuatorDesiredInitialize();
|
ActuatorDesiredInitialize();
|
||||||
TPSDebugInitialize();
|
|
||||||
#ifdef REVOLUTION
|
#ifdef REVOLUTION
|
||||||
AirspeedStateInitialize();
|
AirspeedStateInitialize();
|
||||||
AirspeedStateConnectCallback(AirSpeedUpdatedCb);
|
AirspeedStateConnectCallback(AirSpeedUpdatedCb);
|
||||||
@ -143,27 +140,6 @@ static inline pid_scaler create_pid_scaler()
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// FIXME: Temporary debugging
|
|
||||||
static int pidDebugCount = 0;
|
|
||||||
|
|
||||||
pidDebugCount++;
|
|
||||||
if (pidDebugCount == 100) {
|
|
||||||
struct pid *pid = &stabSettings.innerPids[0];
|
|
||||||
|
|
||||||
TPSDebugData tpsDebug;
|
|
||||||
TPSDebugGet(&tpsDebug);
|
|
||||||
|
|
||||||
tpsDebug.thrust = scaler.x;
|
|
||||||
tpsDebug.p = pid->p;
|
|
||||||
tpsDebug.d = pid->d;
|
|
||||||
tpsDebug.factor = pid_scale_factor(&scaler);
|
|
||||||
tpsDebug.p_scaled = tpsDebug.p * tpsDebug.factor;
|
|
||||||
tpsDebug.d_scaled = tpsDebug.d * tpsDebug.factor;
|
|
||||||
|
|
||||||
TPSDebugSet(&tpsDebug);
|
|
||||||
pidDebugCount = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return scaler;
|
return scaler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +128,6 @@ ifndef TESTAPP
|
|||||||
SRC += $(OPUAVSYNTHDIR)/airspeedstate.c
|
SRC += $(OPUAVSYNTHDIR)/airspeedstate.c
|
||||||
SRC += $(OPUAVSYNTHDIR)/mpu6000settings.c
|
SRC += $(OPUAVSYNTHDIR)/mpu6000settings.c
|
||||||
SRC += $(OPUAVSYNTHDIR)/perfcounter.c
|
SRC += $(OPUAVSYNTHDIR)/perfcounter.c
|
||||||
SRC += $(OPUAVSYNTHDIR)/tpsdebug.c
|
|
||||||
else
|
else
|
||||||
## Test Code
|
## Test Code
|
||||||
SRC += $(OPTESTS)/test_common.c
|
SRC += $(OPTESTS)/test_common.c
|
||||||
|
@ -115,7 +115,6 @@ UAVOBJSRCFILENAMES += mpu6000settings
|
|||||||
UAVOBJSRCFILENAMES += txpidsettings
|
UAVOBJSRCFILENAMES += txpidsettings
|
||||||
UAVOBJSRCFILENAMES += takeofflocation
|
UAVOBJSRCFILENAMES += takeofflocation
|
||||||
UAVOBJSRCFILENAMES += perfcounter
|
UAVOBJSRCFILENAMES += perfcounter
|
||||||
UAVOBJSRCFILENAMES += tpsdebug
|
|
||||||
|
|
||||||
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(OPUAVSYNTHDIR)/$(UAVOBJSRCFILE).c )
|
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(OPUAVSYNTHDIR)/$(UAVOBJSRCFILE).c )
|
||||||
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )
|
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )
|
||||||
|
@ -115,7 +115,6 @@ UAVOBJSRCFILENAMES += mpu6000settings
|
|||||||
UAVOBJSRCFILENAMES += txpidsettings
|
UAVOBJSRCFILENAMES += txpidsettings
|
||||||
UAVOBJSRCFILENAMES += takeofflocation
|
UAVOBJSRCFILENAMES += takeofflocation
|
||||||
UAVOBJSRCFILENAMES += perfcounter
|
UAVOBJSRCFILENAMES += perfcounter
|
||||||
UAVOBJSRCFILENAMES += tpsdebug
|
|
||||||
|
|
||||||
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(OPUAVSYNTHDIR)/$(UAVOBJSRCFILE).c )
|
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(OPUAVSYNTHDIR)/$(UAVOBJSRCFILE).c )
|
||||||
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )
|
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )
|
||||||
|
@ -114,7 +114,6 @@ UAVOBJSRCFILENAMES += poilearnsettings
|
|||||||
UAVOBJSRCFILENAMES += mpu6000settings
|
UAVOBJSRCFILENAMES += mpu6000settings
|
||||||
UAVOBJSRCFILENAMES += txpidsettings
|
UAVOBJSRCFILENAMES += txpidsettings
|
||||||
UAVOBJSRCFILENAMES += takeofflocation
|
UAVOBJSRCFILENAMES += takeofflocation
|
||||||
UAVOBJSRCFILENAMES += tpsdebug
|
|
||||||
|
|
||||||
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(OPUAVSYNTHDIR)/$(UAVOBJSRCFILE).c )
|
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(OPUAVSYNTHDIR)/$(UAVOBJSRCFILE).c )
|
||||||
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )
|
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )
|
||||||
|
@ -112,7 +112,6 @@ UAVOBJSRCFILENAMES += altitudeholdstatus
|
|||||||
UAVOBJSRCFILENAMES += ekfconfiguration
|
UAVOBJSRCFILENAMES += ekfconfiguration
|
||||||
UAVOBJSRCFILENAMES += ekfstatevariance
|
UAVOBJSRCFILENAMES += ekfstatevariance
|
||||||
UAVOBJSRCFILENAMES += takeofflocation
|
UAVOBJSRCFILENAMES += takeofflocation
|
||||||
UAVOBJSRCFILENAMES += tpsdebug
|
|
||||||
|
|
||||||
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(UAVOBJSYNTHDIR)/$(UAVOBJSRCFILE).c )
|
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(UAVOBJSYNTHDIR)/$(UAVOBJSRCFILE).c )
|
||||||
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )
|
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )
|
||||||
|
@ -127,8 +127,7 @@ HEADERS += \
|
|||||||
$$UAVOBJECT_SYNTHETICS/waypointactive.h \
|
$$UAVOBJECT_SYNTHETICS/waypointactive.h \
|
||||||
$$UAVOBJECT_SYNTHETICS/mpu6000settings.h \
|
$$UAVOBJECT_SYNTHETICS/mpu6000settings.h \
|
||||||
$$UAVOBJECT_SYNTHETICS/takeofflocation.h \
|
$$UAVOBJECT_SYNTHETICS/takeofflocation.h \
|
||||||
$$UAVOBJECT_SYNTHETICS/perfcounter.h \
|
$$UAVOBJECT_SYNTHETICS/perfcounter.h
|
||||||
$$UAVOBJECT_SYNTHETICS/tpsdebug.h
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
$$UAVOBJECT_SYNTHETICS/accelgyrosettings.cpp \
|
$$UAVOBJECT_SYNTHETICS/accelgyrosettings.cpp \
|
||||||
@ -232,6 +231,5 @@ SOURCES += \
|
|||||||
$$UAVOBJECT_SYNTHETICS/waypointactive.cpp \
|
$$UAVOBJECT_SYNTHETICS/waypointactive.cpp \
|
||||||
$$UAVOBJECT_SYNTHETICS/mpu6000settings.cpp \
|
$$UAVOBJECT_SYNTHETICS/mpu6000settings.cpp \
|
||||||
$$UAVOBJECT_SYNTHETICS/takeofflocation.cpp \
|
$$UAVOBJECT_SYNTHETICS/takeofflocation.cpp \
|
||||||
$$UAVOBJECT_SYNTHETICS/perfcounter.cpp \
|
$$UAVOBJECT_SYNTHETICS/perfcounter.cpp
|
||||||
$$UAVOBJECT_SYNTHETICS/tpsdebug.cpp
|
|
||||||
|
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
<xml>
|
|
||||||
<object name="TPSDebug" singleinstance="true" settings="false" category="State">
|
|
||||||
<description>Debugging of the @ref Thrust PID Scale module</description>
|
|
||||||
<field name="thrust" units="ratio" type="float" elements="1" defaultvalue="0" />
|
|
||||||
<field name="factor" units="ratio" type="float" elements="1" defaultvalue="0" />
|
|
||||||
<field name="p" units="ratio" type="float" elements="1" defaultvalue="0" />
|
|
||||||
<field name="p_scaled" units="ratio" type="float" elements="1" defaultvalue="0" />
|
|
||||||
<field name="d" units="ratio" type="float" elements="1" defaultvalue="0" />
|
|
||||||
<field name="d_scaled" units="ratio" type="float" elements="1" defaultvalue="0" />
|
|
||||||
<access gcs="readwrite" flight="readwrite"/>
|
|
||||||
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
|
||||||
<telemetryflight acked="true" updatemode="onchange" period="0"/>
|
|
||||||
<logging updatemode="manual" period="0"/>
|
|
||||||
</object>
|
|
||||||
</xml>
|
|
Loading…
Reference in New Issue
Block a user