1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +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:
vassilis 2010-05-20 01:21:44 +00:00 committed by vassilis
parent 713c76bc6e
commit f143628e80
2 changed files with 8 additions and 8 deletions

View File

@ -37,6 +37,7 @@
// Private constants // Private constants
#define STACK_SIZE configMINIMAL_STACK_SIZE #define STACK_SIZE configMINIMAL_STACK_SIZE
#define TASK_PRIORITY (tskIDLE_PRIORITY+3) #define TASK_PRIORITY (tskIDLE_PRIORITY+3)
#define UPDATE_PERIOD 100
// Private types // Private types
@ -72,9 +73,6 @@ static void altitudeTask(void* parameters)
lastSysTime = xTaskGetTickCount(); lastSysTime = xTaskGetTickCount();
while (1) while (1)
{ {
// Get the object data
AltitudeActualGet(&data);
// Update the temperature data // Update the temperature data
PIOS_BMP085_StartADC(TemperatureConv); PIOS_BMP085_StartADC(TemperatureConv);
#if 0 #if 0
@ -104,6 +102,6 @@ static void altitudeTask(void* parameters)
AltitudeActualSet(&data); AltitudeActualSet(&data);
// Delay until it is time to read the next sample // Delay until it is time to read the next sample
vTaskDelayUntil(&lastSysTime, 1000 / portTICK_RATE_MS ); vTaskDelayUntil(&lastSysTime, UPDATE_PERIOD / portTICK_RATE_MS );
} }
} }

View File

@ -77,12 +77,14 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId)
UAVObjSetInstanceData(obj, instId, &data); UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values // Initialize object metadata to their default values
metadata.access = ACCESS_READWRITE;
metadata.gcsAccess = ACCESS_READWRITE;
metadata.telemetryAcked = 1; metadata.telemetryAcked = 1;
metadata.telemetryUpdateMode = UPDATEMODE_ONCHANGE; metadata.telemetryUpdateMode = UPDATEMODE_PERIODIC;
metadata.telemetryUpdatePeriod = 0; metadata.telemetryUpdatePeriod = 1000;
metadata.gcsTelemetryAcked = 1; metadata.gcsTelemetryAcked = 1;
metadata.gcsTelemetryUpdateMode = UPDATEMODE_PERIODIC; metadata.gcsTelemetryUpdateMode = UPDATEMODE_MANUAL;
metadata.gcsTelemetryUpdatePeriod = 200; metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdateMode = UPDATEMODE_NEVER; metadata.loggingUpdateMode = UPDATEMODE_NEVER;
metadata.loggingUpdatePeriod = 0; metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata); UAVObjSetMetadata(obj, &metadata);