mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Flight/Altitude Update altitude object with new metafields, modified update rates in XML and flight s/w
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@645 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
713c76bc6e
commit
f143628e80
@ -37,6 +37,7 @@
|
||||
// Private constants
|
||||
#define STACK_SIZE configMINIMAL_STACK_SIZE
|
||||
#define TASK_PRIORITY (tskIDLE_PRIORITY+3)
|
||||
#define UPDATE_PERIOD 100
|
||||
|
||||
// Private types
|
||||
|
||||
@ -72,9 +73,6 @@ static void altitudeTask(void* parameters)
|
||||
lastSysTime = xTaskGetTickCount();
|
||||
while (1)
|
||||
{
|
||||
// Get the object data
|
||||
AltitudeActualGet(&data);
|
||||
|
||||
// Update the temperature data
|
||||
PIOS_BMP085_StartADC(TemperatureConv);
|
||||
#if 0
|
||||
@ -104,6 +102,6 @@ static void altitudeTask(void* parameters)
|
||||
AltitudeActualSet(&data);
|
||||
|
||||
// Delay until it is time to read the next sample
|
||||
vTaskDelayUntil(&lastSysTime, 1000 / portTICK_RATE_MS );
|
||||
vTaskDelayUntil(&lastSysTime, UPDATE_PERIOD / portTICK_RATE_MS );
|
||||
}
|
||||
}
|
||||
|
@ -77,12 +77,14 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId)
|
||||
UAVObjSetInstanceData(obj, instId, &data);
|
||||
|
||||
// Initialize object metadata to their default values
|
||||
metadata.access = ACCESS_READWRITE;
|
||||
metadata.gcsAccess = ACCESS_READWRITE;
|
||||
metadata.telemetryAcked = 1;
|
||||
metadata.telemetryUpdateMode = UPDATEMODE_ONCHANGE;
|
||||
metadata.telemetryUpdatePeriod = 0;
|
||||
metadata.telemetryUpdateMode = UPDATEMODE_PERIODIC;
|
||||
metadata.telemetryUpdatePeriod = 1000;
|
||||
metadata.gcsTelemetryAcked = 1;
|
||||
metadata.gcsTelemetryUpdateMode = UPDATEMODE_PERIODIC;
|
||||
metadata.gcsTelemetryUpdatePeriod = 200;
|
||||
metadata.gcsTelemetryUpdateMode = UPDATEMODE_MANUAL;
|
||||
metadata.gcsTelemetryUpdatePeriod = 0;
|
||||
metadata.loggingUpdateMode = UPDATEMODE_NEVER;
|
||||
metadata.loggingUpdatePeriod = 0;
|
||||
UAVObjSetMetadata(obj, &metadata);
|
||||
|
Loading…
x
Reference in New Issue
Block a user