mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
Merge remote-tracking branch 'remotes/origin/sambas/osd_test' into osd_test_v1
Conflicts: flight/Modules/Osd/osdgen/osdgen.c flight/OSD/Makefile flight/PiOS/Common/pios_video.c shared/uavobjectdefinition/osdsettings.xml
This commit is contained in:
commit
cb442f0481
552
flight/Modules/COTelemetry/cotelemetry.c
Normal file
552
flight/Modules/COTelemetry/cotelemetry.c
Normal file
@ -0,0 +1,552 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @addtogroup OpenPilotModules OpenPilot Modules
|
||||
* @{
|
||||
* @addtogroup TelemetryModule Telemetry Module
|
||||
* @brief Main telemetry module
|
||||
* Starts three tasks (RX, TX, and priority TX) that watch event queues
|
||||
* and handle all the telemetry of the UAVobjects
|
||||
* @{
|
||||
*
|
||||
* @file telemetry.c
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @brief Telemetry module, handles telemetry and UAVObject updates
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
*
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "openpilot.h"
|
||||
#include "cotelemetry.h"
|
||||
#include "flighttelemetrystats.h"
|
||||
#include "gcstelemetrystats.h"
|
||||
#include "hwsettings.h"
|
||||
|
||||
// Private constants
|
||||
#define MAX_QUEUE_SIZE TELEM_QUEUE_SIZE
|
||||
#define STACK_SIZE_BYTES PIOS_TELEM_STACK_SIZE
|
||||
#define TASK_PRIORITY_RX (tskIDLE_PRIORITY + 2)
|
||||
#define TASK_PRIORITY_TX (tskIDLE_PRIORITY + 2)
|
||||
#define TASK_PRIORITY_TXPRI (tskIDLE_PRIORITY + 2)
|
||||
#define REQ_TIMEOUT_MS 250
|
||||
#define MAX_RETRIES 2
|
||||
#define STATS_UPDATE_PERIOD_MS 4000
|
||||
#define CONNECTION_TIMEOUT_MS 8000
|
||||
|
||||
// Private types
|
||||
|
||||
// Private variables
|
||||
static uint32_t telemetryPort;
|
||||
static xQueueHandle queue;
|
||||
|
||||
#if defined(PIOS_TELEM_PRIORITY_QUEUE)
|
||||
static xQueueHandle priorityQueue;
|
||||
static xTaskHandle telemetryTxPriTaskHandle;
|
||||
static void cotelemetryTxPriTask(void *parameters);
|
||||
#else
|
||||
#define priorityQueue queue
|
||||
#endif
|
||||
|
||||
static xTaskHandle telemetryTxTaskHandle;
|
||||
static xTaskHandle telemetryRxTaskHandle;
|
||||
static uint32_t txErrors;
|
||||
static uint32_t txRetries;
|
||||
static uint32_t timeOfLastObjectUpdate;
|
||||
static UAVTalkConnection uavTalkCon;
|
||||
|
||||
// Private functions
|
||||
static void cotelemetryTxTask(void *parameters);
|
||||
static void cotelemetryRxTask(void *parameters);
|
||||
static int32_t transmitData(uint8_t * data, int32_t length);
|
||||
static void registerObject(UAVObjHandle obj);
|
||||
static void updateObject(UAVObjHandle obj);
|
||||
static int32_t addObject(UAVObjHandle obj);
|
||||
static int32_t setUpdatePeriod(UAVObjHandle obj, int32_t updatePeriodMs);
|
||||
static void processObjEvent(UAVObjEvent * ev);
|
||||
static void updateTelemetryStats();
|
||||
static void gcsTelemetryStatsUpdated();
|
||||
static void updateSettings();
|
||||
|
||||
/**
|
||||
* Initialise the telemetry module
|
||||
* \return -1 if initialisation failed
|
||||
* \return 0 on success
|
||||
*/
|
||||
int32_t COTelemetryStart(void)
|
||||
{
|
||||
// Process all registered objects and connect queue for updates
|
||||
UAVObjIterate(®isterObject);
|
||||
|
||||
// Listen to objects of interest
|
||||
GCSTelemetryStatsConnectQueue(priorityQueue);
|
||||
|
||||
// Start telemetry tasks
|
||||
xTaskCreate(cotelemetryTxTask, (signed char *)"COTelTx", STACK_SIZE_BYTES/4, NULL, TASK_PRIORITY_TX, &telemetryTxTaskHandle);
|
||||
xTaskCreate(cotelemetryRxTask, (signed char *)"COTelRx", STACK_SIZE_BYTES/4, NULL, TASK_PRIORITY_RX, &telemetryRxTaskHandle);
|
||||
TaskMonitorAdd(TASKINFO_RUNNING_TELEMETRYTX, telemetryTxTaskHandle);
|
||||
TaskMonitorAdd(TASKINFO_RUNNING_TELEMETRYRX, telemetryRxTaskHandle);
|
||||
|
||||
#if defined(PIOS_TELEM_PRIORITY_QUEUE)
|
||||
xTaskCreate(cotelemetryTxPriTask, (signed char *)"COTelPriTx", STACK_SIZE_BYTES/4, NULL, TASK_PRIORITY_TXPRI, &telemetryTxPriTaskHandle);
|
||||
TaskMonitorAdd(TASKINFO_RUNNING_TELEMETRYTXPRI, telemetryTxPriTaskHandle);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialise the telemetry module
|
||||
* \return -1 if initialisation failed
|
||||
* \return 0 on success
|
||||
*/
|
||||
int32_t COTelemetryInitialize(void)
|
||||
{
|
||||
FlightTelemetryStatsInitialize();
|
||||
GCSTelemetryStatsInitialize();
|
||||
|
||||
// Initialize vars
|
||||
timeOfLastObjectUpdate = 0;
|
||||
|
||||
// Create object queues
|
||||
queue = xQueueCreate(MAX_QUEUE_SIZE, sizeof(UAVObjEvent));
|
||||
#if defined(PIOS_TELEM_PRIORITY_QUEUE)
|
||||
priorityQueue = xQueueCreate(MAX_QUEUE_SIZE, sizeof(UAVObjEvent));
|
||||
#endif
|
||||
|
||||
// Update telemetry settings
|
||||
telemetryPort = PIOS_COM_COTELEM;
|
||||
HwSettingsInitialize();
|
||||
updateSettings();
|
||||
|
||||
// Initialise UAVTalk
|
||||
uavTalkCon = UAVTalkInitialize(&transmitData);
|
||||
|
||||
// Create periodic event that will be used to update the telemetry stats
|
||||
txErrors = 0;
|
||||
txRetries = 0;
|
||||
UAVObjEvent ev;
|
||||
memset(&ev, 0, sizeof(UAVObjEvent));
|
||||
EventPeriodicQueueCreate(&ev, priorityQueue, STATS_UPDATE_PERIOD_MS);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
MODULE_INITCALL(COTelemetryInitialize, COTelemetryStart)
|
||||
|
||||
/**
|
||||
* Register a new object, adds object to local list and connects the queue depending on the object's
|
||||
* telemetry settings.
|
||||
* \param[in] obj Object to connect
|
||||
*/
|
||||
static void registerObject(UAVObjHandle obj)
|
||||
{
|
||||
// Setup object for periodic updates
|
||||
addObject(obj);
|
||||
|
||||
// Setup object for telemetry updates
|
||||
updateObject(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update object's queue connections and timer, depending on object's settings
|
||||
* \param[in] obj Object to updates
|
||||
*/
|
||||
static void updateObject(UAVObjHandle obj)
|
||||
{
|
||||
UAVObjMetadata metadata;
|
||||
int32_t eventMask;
|
||||
|
||||
// Get metadata
|
||||
UAVObjGetMetadata(obj, &metadata);
|
||||
|
||||
// Setup object depending on update mode
|
||||
if (metadata.telemetryUpdateMode == UPDATEMODE_PERIODIC) {
|
||||
// Set update period
|
||||
setUpdatePeriod(obj, metadata.telemetryUpdatePeriod);
|
||||
// Connect queue
|
||||
eventMask = EV_UPDATED_MANUAL | EV_UPDATE_REQ;
|
||||
if (UAVObjIsMetaobject(obj)) {
|
||||
eventMask |= EV_UNPACKED; // we also need to act on remote updates (unpack events)
|
||||
}
|
||||
UAVObjConnectQueue(obj, priorityQueue, eventMask);
|
||||
} else if (metadata.telemetryUpdateMode == UPDATEMODE_ONCHANGE) {
|
||||
// Set update period
|
||||
setUpdatePeriod(obj, 0);
|
||||
// Connect queue
|
||||
eventMask = EV_UPDATED | EV_UPDATED_MANUAL | EV_UPDATE_REQ;
|
||||
if (UAVObjIsMetaobject(obj)) {
|
||||
eventMask |= EV_UNPACKED; // we also need to act on remote updates (unpack events)
|
||||
}
|
||||
UAVObjConnectQueue(obj, priorityQueue, eventMask);
|
||||
} else if (metadata.telemetryUpdateMode == UPDATEMODE_MANUAL) {
|
||||
// Set update period
|
||||
setUpdatePeriod(obj, 0);
|
||||
// Connect queue
|
||||
eventMask = EV_UPDATED_MANUAL | EV_UPDATE_REQ;
|
||||
if (UAVObjIsMetaobject(obj)) {
|
||||
eventMask |= EV_UNPACKED; // we also need to act on remote updates (unpack events)
|
||||
}
|
||||
UAVObjConnectQueue(obj, priorityQueue, eventMask);
|
||||
} else if (metadata.telemetryUpdateMode == UPDATEMODE_NEVER) {
|
||||
// Set update period
|
||||
setUpdatePeriod(obj, 0);
|
||||
// Disconnect queue
|
||||
UAVObjDisconnectQueue(obj, priorityQueue);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes queue events
|
||||
*/
|
||||
static void processObjEvent(UAVObjEvent * ev)
|
||||
{
|
||||
UAVObjMetadata metadata;
|
||||
FlightTelemetryStatsData flightStats;
|
||||
int32_t retries;
|
||||
int32_t success;
|
||||
|
||||
if (ev->obj == 0) {
|
||||
updateTelemetryStats();
|
||||
} else if (ev->obj == GCSTelemetryStatsHandle()) {
|
||||
gcsTelemetryStatsUpdated();
|
||||
} else {
|
||||
// Only process event if connected to GCS or if object FlightTelemetryStats is updated
|
||||
FlightTelemetryStatsGet(&flightStats);
|
||||
if (flightStats.Status == FLIGHTTELEMETRYSTATS_STATUS_CONNECTED || ev->obj == FlightTelemetryStatsHandle()) {
|
||||
// Get object metadata
|
||||
UAVObjGetMetadata(ev->obj, &metadata);
|
||||
// Act on event
|
||||
retries = 0;
|
||||
success = -1;
|
||||
if (ev->event == EV_UPDATED || ev->event == EV_UPDATED_MANUAL) {
|
||||
// Send update to GCS (with retries)
|
||||
while (retries < MAX_RETRIES && success == -1) {
|
||||
success = UAVTalkSendObject(uavTalkCon, ev->obj, ev->instId, metadata.telemetryAcked, REQ_TIMEOUT_MS); // call blocks until ack is received or timeout
|
||||
++retries;
|
||||
}
|
||||
// Update stats
|
||||
txRetries += (retries - 1);
|
||||
if (success == -1) {
|
||||
++txErrors;
|
||||
}
|
||||
} else if (ev->event == EV_UPDATE_REQ) {
|
||||
// Request object update from GCS (with retries)
|
||||
while (retries < MAX_RETRIES && success == -1) {
|
||||
success = UAVTalkSendObjectRequest(uavTalkCon, ev->obj, ev->instId, REQ_TIMEOUT_MS); // call blocks until update is received or timeout
|
||||
++retries;
|
||||
}
|
||||
// Update stats
|
||||
txRetries += (retries - 1);
|
||||
if (success == -1) {
|
||||
++txErrors;
|
||||
}
|
||||
}
|
||||
// If this is a metaobject then make necessary telemetry updates
|
||||
if (UAVObjIsMetaobject(ev->obj)) {
|
||||
updateObject(UAVObjGetLinkedObj(ev->obj)); // linked object will be the actual object the metadata are for
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Telemetry transmit task, regular priority
|
||||
*/
|
||||
static void cotelemetryTxTask(void *parameters)
|
||||
{
|
||||
UAVObjEvent ev;
|
||||
|
||||
// Loop forever
|
||||
while (1) {
|
||||
// Wait for queue message
|
||||
if (xQueueReceive(queue, &ev, portMAX_DELAY) == pdTRUE) {
|
||||
// Process event
|
||||
processObjEvent(&ev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Telemetry transmit task, high priority
|
||||
*/
|
||||
#if defined(PIOS_TELEM_PRIORITY_QUEUE)
|
||||
static void cotelemetryTxPriTask(void *parameters)
|
||||
{
|
||||
UAVObjEvent ev;
|
||||
|
||||
// Loop forever
|
||||
while (1) {
|
||||
// Wait for queue message
|
||||
if (xQueueReceive(priorityQueue, &ev, portMAX_DELAY) == pdTRUE) {
|
||||
// Process event
|
||||
processObjEvent(&ev);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Telemetry transmit task. Processes queue events and periodic updates.
|
||||
*/
|
||||
static void cotelemetryRxTask(void *parameters)
|
||||
{
|
||||
uint32_t inputPort;
|
||||
|
||||
// Task loop
|
||||
while (1) {
|
||||
#if 0 && defined(PIOS_INCLUDE_USB)
|
||||
// Determine input port (USB takes priority over telemetry port)
|
||||
if (PIOS_USB_CheckAvailable(0) && PIOS_COM_TELEM_USB) {
|
||||
inputPort = PIOS_COM_TELEM_USB;
|
||||
} else
|
||||
#endif /* PIOS_INCLUDE_USB */
|
||||
{
|
||||
inputPort = telemetryPort;
|
||||
}
|
||||
|
||||
if (inputPort) {
|
||||
// Block until data are available
|
||||
uint8_t serial_data[1];
|
||||
uint16_t bytes_to_process;
|
||||
|
||||
bytes_to_process = PIOS_COM_ReceiveBuffer(inputPort, serial_data, sizeof(serial_data), 500);
|
||||
if (bytes_to_process > 0) {
|
||||
for (uint8_t i = 0; i < bytes_to_process; i++) {
|
||||
UAVTalkProcessInputStream(uavTalkCon,serial_data[i]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
vTaskDelay(5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Transmit data buffer to the modem or USB port.
|
||||
* \param[in] data Data buffer to send
|
||||
* \param[in] length Length of buffer
|
||||
* \return -1 on failure
|
||||
* \return number of bytes transmitted on success
|
||||
*/
|
||||
static int32_t transmitData(uint8_t * data, int32_t length)
|
||||
{
|
||||
uint32_t outputPort;
|
||||
|
||||
// Determine input port (USB takes priority over telemetry port)
|
||||
#if 0 && defined(PIOS_INCLUDE_USB)
|
||||
if (PIOS_USB_CheckAvailable(0) && PIOS_COM_TELEM_USB) {
|
||||
outputPort = PIOS_COM_TELEM_USB;
|
||||
} else
|
||||
#endif /* PIOS_INCLUDE_USB */
|
||||
{
|
||||
outputPort = telemetryPort;
|
||||
}
|
||||
|
||||
if (outputPort) {
|
||||
return PIOS_COM_SendBuffer(outputPort, data, length);
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup object for periodic updates.
|
||||
* \param[in] obj The object to update
|
||||
* \return 0 Success
|
||||
* \return -1 Failure
|
||||
*/
|
||||
static int32_t addObject(UAVObjHandle obj)
|
||||
{
|
||||
UAVObjEvent ev;
|
||||
|
||||
// Add object for periodic updates
|
||||
ev.obj = obj;
|
||||
ev.instId = UAVOBJ_ALL_INSTANCES;
|
||||
ev.event = EV_UPDATED_MANUAL;
|
||||
return EventPeriodicQueueCreate(&ev, queue, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set update period of object (it must be already setup for periodic updates)
|
||||
* \param[in] obj The object to update
|
||||
* \param[in] updatePeriodMs The update period in ms, if zero then periodic updates are disabled
|
||||
* \return 0 Success
|
||||
* \return -1 Failure
|
||||
*/
|
||||
static int32_t setUpdatePeriod(UAVObjHandle obj, int32_t updatePeriodMs)
|
||||
{
|
||||
UAVObjEvent ev;
|
||||
|
||||
// Add object for periodic updates
|
||||
ev.obj = obj;
|
||||
ev.instId = UAVOBJ_ALL_INSTANCES;
|
||||
ev.event = EV_UPDATED_MANUAL;
|
||||
return EventPeriodicQueueUpdate(&ev, queue, updatePeriodMs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called each time the GCS telemetry stats object is updated.
|
||||
* Trigger a flight telemetry stats update if a connection is not
|
||||
* yet established.
|
||||
*/
|
||||
static void gcsTelemetryStatsUpdated()
|
||||
{
|
||||
FlightTelemetryStatsData flightStats;
|
||||
GCSTelemetryStatsData gcsStats;
|
||||
FlightTelemetryStatsGet(&flightStats);
|
||||
GCSTelemetryStatsGet(&gcsStats);
|
||||
if (flightStats.Status != FLIGHTTELEMETRYSTATS_STATUS_CONNECTED || gcsStats.Status != GCSTELEMETRYSTATS_STATUS_CONNECTED) {
|
||||
updateTelemetryStats();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update telemetry statistics and handle connection handshake
|
||||
*/
|
||||
static void updateTelemetryStats()
|
||||
{
|
||||
UAVTalkStats utalkStats;
|
||||
FlightTelemetryStatsData flightStats;
|
||||
GCSTelemetryStatsData gcsStats;
|
||||
uint8_t forceUpdate;
|
||||
uint8_t connectionTimeout;
|
||||
uint32_t timeNow;
|
||||
|
||||
// Get stats
|
||||
UAVTalkGetStats(uavTalkCon, &utalkStats);
|
||||
UAVTalkResetStats(uavTalkCon);
|
||||
|
||||
// Get object data
|
||||
FlightTelemetryStatsGet(&flightStats);
|
||||
GCSTelemetryStatsGet(&gcsStats);
|
||||
|
||||
// Update stats object
|
||||
if (flightStats.Status == FLIGHTTELEMETRYSTATS_STATUS_CONNECTED) {
|
||||
flightStats.RxDataRate = (float)utalkStats.rxBytes / ((float)STATS_UPDATE_PERIOD_MS / 1000.0);
|
||||
flightStats.TxDataRate = (float)utalkStats.txBytes / ((float)STATS_UPDATE_PERIOD_MS / 1000.0);
|
||||
flightStats.RxFailures += utalkStats.rxErrors;
|
||||
flightStats.TxFailures += txErrors;
|
||||
flightStats.TxRetries += txRetries;
|
||||
txErrors = 0;
|
||||
txRetries = 0;
|
||||
} else {
|
||||
flightStats.RxDataRate = 0;
|
||||
flightStats.TxDataRate = 0;
|
||||
flightStats.RxFailures = 0;
|
||||
flightStats.TxFailures = 0;
|
||||
flightStats.TxRetries = 0;
|
||||
txErrors = 0;
|
||||
txRetries = 0;
|
||||
}
|
||||
|
||||
// Check for connection timeout
|
||||
timeNow = xTaskGetTickCount() * portTICK_RATE_MS;
|
||||
if (utalkStats.rxObjects > 0) {
|
||||
timeOfLastObjectUpdate = timeNow;
|
||||
}
|
||||
if ((timeNow - timeOfLastObjectUpdate) > CONNECTION_TIMEOUT_MS) {
|
||||
connectionTimeout = 1;
|
||||
} else {
|
||||
connectionTimeout = 0;
|
||||
}
|
||||
|
||||
// Update connection state
|
||||
forceUpdate = 1;
|
||||
if (flightStats.Status == FLIGHTTELEMETRYSTATS_STATUS_DISCONNECTED) {
|
||||
// Wait for connection request
|
||||
if (gcsStats.Status == GCSTELEMETRYSTATS_STATUS_HANDSHAKEREQ) {
|
||||
flightStats.Status = FLIGHTTELEMETRYSTATS_STATUS_HANDSHAKEACK;
|
||||
}
|
||||
} else if (flightStats.Status == FLIGHTTELEMETRYSTATS_STATUS_HANDSHAKEACK) {
|
||||
// Wait for connection
|
||||
if (gcsStats.Status == GCSTELEMETRYSTATS_STATUS_CONNECTED) {
|
||||
flightStats.Status = FLIGHTTELEMETRYSTATS_STATUS_CONNECTED;
|
||||
} else if (gcsStats.Status == GCSTELEMETRYSTATS_STATUS_DISCONNECTED) {
|
||||
flightStats.Status = FLIGHTTELEMETRYSTATS_STATUS_DISCONNECTED;
|
||||
}
|
||||
} else if (flightStats.Status == FLIGHTTELEMETRYSTATS_STATUS_CONNECTED) {
|
||||
if (gcsStats.Status != GCSTELEMETRYSTATS_STATUS_CONNECTED || connectionTimeout) {
|
||||
flightStats.Status = FLIGHTTELEMETRYSTATS_STATUS_DISCONNECTED;
|
||||
} else {
|
||||
forceUpdate = 0;
|
||||
}
|
||||
} else {
|
||||
flightStats.Status = FLIGHTTELEMETRYSTATS_STATUS_DISCONNECTED;
|
||||
}
|
||||
|
||||
// Update the telemetry alarm
|
||||
if (flightStats.Status == FLIGHTTELEMETRYSTATS_STATUS_CONNECTED) {
|
||||
AlarmsClear(SYSTEMALARMS_ALARM_TELEMETRY);
|
||||
} else {
|
||||
AlarmsSet(SYSTEMALARMS_ALARM_TELEMETRY, SYSTEMALARMS_ALARM_ERROR);
|
||||
}
|
||||
|
||||
// Update object
|
||||
FlightTelemetryStatsSet(&flightStats);
|
||||
|
||||
// Force telemetry update if not connected
|
||||
if (forceUpdate) {
|
||||
FlightTelemetryStatsUpdated();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the telemetry settings, called on startup.
|
||||
* FIXME: This should be in the TelemetrySettings object. But objects
|
||||
* have too much overhead yet. Also the telemetry has no any specific
|
||||
* settings, etc. Thus the HwSettings object which contains the
|
||||
* telemetry port speed is used for now.
|
||||
*/
|
||||
static void updateSettings()
|
||||
{
|
||||
|
||||
if (telemetryPort) {
|
||||
// Retrieve settings
|
||||
uint8_t speed;
|
||||
HwSettingsTelemetrySpeedGet(&speed);
|
||||
|
||||
// Set port speed
|
||||
switch (speed) {
|
||||
case HWSETTINGS_TELEMETRYSPEED_2400:
|
||||
PIOS_COM_ChangeBaud(telemetryPort, 2400);
|
||||
break;
|
||||
case HWSETTINGS_TELEMETRYSPEED_4800:
|
||||
PIOS_COM_ChangeBaud(telemetryPort, 4800);
|
||||
break;
|
||||
case HWSETTINGS_TELEMETRYSPEED_9600:
|
||||
PIOS_COM_ChangeBaud(telemetryPort, 9600);
|
||||
break;
|
||||
case HWSETTINGS_TELEMETRYSPEED_19200:
|
||||
PIOS_COM_ChangeBaud(telemetryPort, 19200);
|
||||
break;
|
||||
case HWSETTINGS_TELEMETRYSPEED_38400:
|
||||
PIOS_COM_ChangeBaud(telemetryPort, 38400);
|
||||
break;
|
||||
case HWSETTINGS_TELEMETRYSPEED_57600:
|
||||
PIOS_COM_ChangeBaud(telemetryPort, 57600);
|
||||
break;
|
||||
case HWSETTINGS_TELEMETRYSPEED_115200:
|
||||
PIOS_COM_ChangeBaud(telemetryPort, 115200);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
46
flight/Modules/COTelemetry/inc/cotelemetry.h
Normal file
46
flight/Modules/COTelemetry/inc/cotelemetry.h
Normal file
@ -0,0 +1,46 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @addtogroup OpenPilotModules OpenPilot Modules
|
||||
* @{
|
||||
* @addtogroup TelemetryModule Telemetry Module
|
||||
* @brief Main telemetry module
|
||||
* Starts three tasks (RX, TX, and priority TX) that watch event queues
|
||||
* and handle all the telemetry of the UAVobjects
|
||||
* @{
|
||||
*
|
||||
* @file telemetry.h
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @brief Include file of the telemetry module.
|
||||
* As with all modules only the initialize function is exposed all other
|
||||
* interactions with the module take place through the event queue and
|
||||
* objects.
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
*
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef TELEMETRY_H
|
||||
#define TELEMETRY_H
|
||||
|
||||
int32_t COTelemetryInitialize(void);
|
||||
|
||||
#endif // TELEMETRY_H
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
@ -144,7 +144,7 @@ int32_t GPSInitialize(void)
|
||||
#ifdef PIOS_GPS_SETS_HOMELOCATION
|
||||
HomeLocationInitialize();
|
||||
#endif
|
||||
//updateSettings();
|
||||
updateSettings();
|
||||
|
||||
gps_rx_buffer = pvPortMalloc(NMEA_MAX_PACKET_LENGTH);
|
||||
PIOS_Assert(gps_rx_buffer);
|
||||
@ -400,10 +400,10 @@ static void updateSettings()
|
||||
PIOS_COM_ChangeBaud(gpsPort, 38400);
|
||||
break;
|
||||
case HWSETTINGS_GPSSPEED_57600:
|
||||
PIOS_COM_ChangeBaud(gpsPort, 57600);
|
||||
//PIOS_COM_ChangeBaud(gpsPort, 57600);
|
||||
break;
|
||||
case HWSETTINGS_GPSSPEED_115200:
|
||||
PIOS_COM_ChangeBaud(gpsPort, 115200);
|
||||
//PIOS_COM_ChangeBaud(gpsPort, 115200);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -154,258 +154,6 @@ uint8_t printCharFB(uint16_t ch, uint16_t x, uint16_t y) {
|
||||
|
||||
|
||||
|
||||
#define logo1_width 192
|
||||
#define logo1_height 186
|
||||
static unsigned short logo1_bits[] = {
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xe1ff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x007f, 0xfffe, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0x003f, 0xfff8, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0x003f, 0xfff0, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x001f, 0xffc0, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0x001f, 0xff80, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0x001f, 0xff00, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x000f, 0xfc00, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0x000f, 0xf800, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0x000f, 0xf000, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0007, 0xe000, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0x0007, 0x8000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0x0007, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0007, 0x0000, 0xfffe,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0x0003, 0x0000, 0xfff8, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0x0003, 0x0000, 0xfff0, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0003, 0x0000, 0xffe0,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0x0001, 0x0000, 0xffc0, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0x0001, 0x0000, 0xff00, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0001, 0x00fc, 0xfe00,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0x0001, 0x01fc, 0xfc00, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0x0000, 0x07fe, 0xf000, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0000, 0x1ffe, 0xe000,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0x0000, 0x3ffe, 0xc000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0x7fff, 0x0000, 0xfffe, 0x8000, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0x0fff, 0xfffe, 0x7fff, 0x0000, 0xffff, 0x0001,
|
||||
0xfffe, 0xffff, 0xffff, 0xffff, 0x8fff, 0xffff, 0x03ff, 0xfff8, 0x7fff,
|
||||
0x0000, 0xffff, 0x0007, 0xfffc, 0xffff, 0xffff, 0xffff, 0x3fff, 0xfff8,
|
||||
0x00ff, 0xffe0, 0x3fff, 0x0000, 0xffff, 0x000f, 0xfff8, 0xffff, 0xffff,
|
||||
0xffff, 0x7fff, 0xff80, 0x001f, 0xffc0, 0x3fff, 0x0000, 0xffff, 0x003f,
|
||||
0xfff0, 0xffff, 0xffff, 0xffff, 0xffff, 0xfc01, 0x0007, 0xffc0, 0x3fff,
|
||||
0x8000, 0xffff, 0x007f, 0xffc0, 0xffff, 0xffff, 0xffff, 0xffff, 0xc003,
|
||||
0x0001, 0xffe0, 0x3fff, 0x8000, 0xffff, 0x01ff, 0xff80, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0x000f, 0x0000, 0xffe0, 0x1fff, 0x8000, 0xffff, 0x03ff,
|
||||
0xff00, 0xffff, 0xffff, 0xffff, 0xffff, 0x001f, 0x0000, 0x9fe0, 0x1fff,
|
||||
0x8000, 0xffff, 0x0fff, 0xff00, 0xffff, 0xffff, 0xffff, 0xffff, 0x007f,
|
||||
0x0000, 0x1fe0, 0x1ffe, 0xc000, 0xffff, 0x1fff, 0xfe00, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0x00ff, 0x0000, 0x0ff0, 0x0ff8, 0xc000, 0xffff, 0x7fff,
|
||||
0xfc00, 0xffff, 0xffff, 0xffff, 0xffff, 0x03ff, 0x0000, 0x0ff0, 0x0fe0,
|
||||
0xc000, 0xffff, 0xffff, 0xfc00, 0xffff, 0xffff, 0xffff, 0xffff, 0x07ff,
|
||||
0x0000, 0x0ff0, 0x0f80, 0xe000, 0xffff, 0xffff, 0xf801, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0x0fff, 0x0000, 0x0ff0, 0x0f00, 0xe000, 0xffff, 0xffff,
|
||||
0xf803, 0xffff, 0xffff, 0xffff, 0xffff, 0x3fff, 0x0000, 0x07f0, 0x3c00,
|
||||
0xe000, 0xffff, 0xffff, 0xf807, 0xffff, 0xffff, 0xffff, 0xffff, 0x3fff,
|
||||
0x0000, 0x07e0, 0xf000, 0xe000, 0xffff, 0xffff, 0xf807, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0x3fff, 0x0000, 0x07c0, 0xc000, 0xf003, 0xffff, 0xffff,
|
||||
0xf807, 0xffff, 0xffff, 0xffff, 0xffff, 0x7fff, 0x0000, 0x07c0, 0x0000,
|
||||
0xf007, 0xffff, 0xffff, 0xf007, 0xffff, 0xffff, 0xffff, 0xffff, 0x7fff,
|
||||
0x0000, 0x03c0, 0x0000, 0xf01e, 0xffff, 0xffff, 0xf007, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0x0000, 0x03c0, 0x0000, 0xf078, 0xffff, 0xffff,
|
||||
0xf007, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0000, 0x03e0, 0x0000,
|
||||
0xf9e0, 0xffff, 0xffff, 0xf007, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0x0000, 0x03e0, 0x0000, 0xff80, 0xffff, 0xffff, 0xf007, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0x0001, 0x01e0, 0x0000, 0xfe00, 0xffff, 0xffff,
|
||||
0xf007, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0001, 0x01f0, 0x0000,
|
||||
0xfc00, 0xffff, 0xffff, 0xf007, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0x0003, 0x01fe, 0x0000, 0xf000, 0xffff, 0xffff, 0xf007, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0x0003, 0x01fe, 0x0000, 0xc000, 0xffff, 0xffff,
|
||||
0xf007, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0007, 0x00fe, 0x0000,
|
||||
0x0000, 0xffff, 0xffff, 0xf007, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0x0007, 0x00ff, 0x0000, 0x0000, 0xfffc, 0xffff, 0xf007, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0x0007, 0x00ff, 0x0000, 0x0000, 0xfff0, 0xffff,
|
||||
0xf007, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x000f, 0x00ff, 0x0000,
|
||||
0x0000, 0xffc0, 0xffff, 0xf007, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0x800f, 0x007f, 0x0000, 0x0000, 0xff80, 0xffff, 0xf007, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0x801f, 0x007f, 0x0000, 0x0000, 0xfe00, 0xffff,
|
||||
0xf007, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x807f, 0x007f, 0x0000,
|
||||
0x0000, 0xf800, 0xffff, 0xf003, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0x83ff, 0x007f, 0x0000, 0x0000, 0xe000, 0xffff, 0xf003, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xdfff, 0x003f, 0x0000, 0x0000, 0x8000, 0xffff,
|
||||
0xf003, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x003f, 0x0000,
|
||||
0x0000, 0x0000, 0xffff, 0xf003, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0x003f, 0x0000, 0x0000, 0x0000, 0xfffc, 0xf003, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0x00ff, 0x0000, 0x0000, 0x0000, 0xfff0,
|
||||
0xf003, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x07ff, 0x0000,
|
||||
0x0000, 0x0000, 0xffc0, 0xf003, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0x3fff, 0x0000, 0x0000, 0x0000, 0xff00, 0xf003, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0000, 0x0000, 0x0000, 0xfc00,
|
||||
0xf003, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0007,
|
||||
0x0000, 0x0000, 0xf000, 0xf001, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0x003f, 0x0000, 0x0000, 0xe000, 0xf001, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x00ff, 0x0000, 0x0000, 0x0000,
|
||||
0xf000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x07ff,
|
||||
0x0000, 0x0000, 0x0000, 0xf000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0x3fff, 0x0000, 0x0000, 0x0000, 0xf000, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0000, 0x0000, 0x0000,
|
||||
0xf000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0x0007, 0x0000, 0x0000, 0xf000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xfff9, 0x003f, 0x0000, 0x0000, 0xf000, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffc1, 0x01ff, 0x0000, 0x0000,
|
||||
0xf000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfe00,
|
||||
0x07ff, 0x0000, 0x0000, 0xf000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xf000, 0x3fff, 0x0000, 0x0000, 0xf000, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x8000, 0xffff, 0x0001, 0x0000,
|
||||
0xf000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0000,
|
||||
0xfffc, 0x000f, 0x0000, 0xf800, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0x7fff, 0x0000, 0xfffc, 0x003f, 0x0000, 0xf800, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0x7fff, 0x0000, 0xfffc, 0x01ff, 0x0000,
|
||||
0xf800, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x7fff, 0x0000,
|
||||
0xfffc, 0x0fff, 0x0000, 0xf800, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0x3fff, 0x0000, 0xfffc, 0x7fff, 0x0000, 0xf800, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0x3fff, 0x0000, 0xfffe, 0xffff, 0x0001,
|
||||
0xfc00, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x3fff, 0x0000,
|
||||
0xfffe, 0xffff, 0x000f, 0xfc00, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0x3fff, 0x0000, 0xfffe, 0xffff, 0x007f, 0xfe00, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0x1fff, 0x0000, 0xfffe, 0xffff, 0x03ff,
|
||||
0xfe00, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x1fff, 0x0000,
|
||||
0xffff, 0xffff, 0x0fff, 0xff00, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0x1fff, 0x0000, 0xffff, 0xffff, 0x7fff, 0xff80, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0x0fff, 0x0000, 0xffff, 0xffff, 0xffff,
|
||||
0xfff3, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0fff, 0x8000,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0x0fff, 0x8000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0x07ff, 0x8000, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x07ff, 0x8000,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0x07ff, 0xc000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0x07ff, 0xc000, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x1fff, 0xc000,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0x3fff, 0xc000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xe000, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xe003,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xe00f, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xe03f, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xf07f,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xf1ff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x7fff, 0xffe6,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0x3fff, 0xffc6, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0x7fff, 0xffc6, 0x9fff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffc7,
|
||||
0x9fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffc7, 0x0fff, 0xffff, 0xffff, 0xffff, 0xffff, 0x00ff,
|
||||
0x03fc, 0x0ff0, 0x3fc0, 0x7f00, 0x7c00, 0x1fc6, 0x0780, 0xfff8, 0xffff,
|
||||
0xffff, 0xffff, 0x003f, 0x00f8, 0x03e0, 0x0f80, 0x3e00, 0x3800, 0x0fc6,
|
||||
0x0600, 0xfff8, 0xffff, 0xffff, 0xffff, 0x001f, 0x0070, 0x01c0, 0x0700,
|
||||
0x1c00, 0x3000, 0x07c6, 0x9c00, 0xffff, 0xffff, 0xffff, 0xffff, 0xff1f,
|
||||
0xfc63, 0xf18f, 0xc73f, 0x1c7f, 0x31ff, 0xe3c6, 0x9c7f, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xff9f, 0xfe63, 0xf98f, 0xe63f, 0x88ff, 0x23ff, 0xe3c6,
|
||||
0x9cff, 0xffff, 0xffff, 0xffff, 0xffff, 0xff9f, 0xfe63, 0x018f, 0xe600,
|
||||
0x88ff, 0x23ff, 0xe3c6, 0x9cff, 0xffff, 0xffff, 0xffff, 0xffff, 0xff9f,
|
||||
0xfe63, 0x018f, 0xe600, 0x88ff, 0x23ff, 0xe3c6, 0x9cff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xff9f, 0xfe63, 0xf18f, 0xe7ff, 0x88ff, 0x23ff, 0xe3c6,
|
||||
0x9cff, 0xffff, 0xffff, 0xffff, 0xffff, 0xff1f, 0xfe63, 0xf18f, 0xe7ff,
|
||||
0x88ff, 0x31ff, 0xe3c6, 0x1c7f, 0xffff, 0xffff, 0xffff, 0xffff, 0x701f,
|
||||
0x0000, 0x01c0, 0xe780, 0x00ff, 0x3000, 0x070e, 0x1c1f, 0xfff8, 0xffff,
|
||||
0xffff, 0xffff, 0x003f, 0x0000, 0x03e0, 0xe780, 0x00ff, 0x3800, 0x0f0e,
|
||||
0x3e00, 0xfff8, 0xffff, 0xffff, 0xffff, 0x007f, 0x0000, 0x07f0, 0xe780,
|
||||
0x00ff, 0x7c00, 0x1f3e, 0x7f00, 0xfff8, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xfe3f, 0xffff, 0xffff, 0x8fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xfe7f, 0xffff, 0xffff, 0x8fff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfe7f, 0xffff, 0xffff,
|
||||
0x8fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xfe7f, 0xffff, 0xffff, 0x8fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xfe7f, 0xffff, 0xffff, 0x9fff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff };
|
||||
|
||||
|
||||
#define level_width 144
|
||||
#define level_height 129
|
||||
|
@ -49,7 +49,11 @@ endif
|
||||
FLASH_TOOL = OPENOCD
|
||||
|
||||
# List of modules to include
|
||||
<<<<<<< HEAD
|
||||
MODULES = Osd/osdgen Osd/osdinput GPS Telemetry #FirmwareIAP
|
||||
=======
|
||||
MODULES = Osd/osdgen Osd/osdinput GPS COTelemetry Telemetry FirmwareIAP
|
||||
>>>>>>> remotes/origin/sambas/osd_test
|
||||
|
||||
|
||||
# Paths
|
||||
|
@ -662,6 +662,7 @@ uint32_t pios_com_aux_id;
|
||||
uint32_t pios_com_gps_id;
|
||||
uint32_t pios_com_telem_usb_id;
|
||||
uint32_t pios_com_telem_rf_id;
|
||||
uint32_t pios_com_cotelem_id;
|
||||
|
||||
|
||||
void PIOS_Board_Init(void) {
|
||||
@ -888,6 +889,27 @@ void PIOS_Board_Init(void) {
|
||||
#else
|
||||
pios_com_telem_rf_id = 0;
|
||||
#endif /* PIOS_INCLUDE_COM_TELEM */
|
||||
|
||||
#if defined(PIOS_INCLUDE_COM_TELEM)
|
||||
{ /* Eventually add switch for this port function */
|
||||
uint32_t pios_usart_cotelem_id;
|
||||
if (PIOS_USART_Init(&pios_usart_cotelem_id, &pios_usart_cotelem_main_cfg)) {
|
||||
PIOS_Assert(0);
|
||||
}
|
||||
|
||||
uint8_t * rx_buffer = (uint8_t *) pvPortMalloc(PIOS_COM_TELEM_RF_RX_BUF_LEN);
|
||||
uint8_t * tx_buffer = (uint8_t *) pvPortMalloc(PIOS_COM_TELEM_RF_TX_BUF_LEN);
|
||||
PIOS_Assert(rx_buffer);
|
||||
PIOS_Assert(tx_buffer);
|
||||
if (PIOS_COM_Init(&pios_com_cotelem_id, &pios_usart_com_driver, pios_usart_cotelem_id,
|
||||
rx_buffer, PIOS_COM_TELEM_RF_RX_BUF_LEN,
|
||||
tx_buffer, PIOS_COM_TELEM_RF_TX_BUF_LEN)) {
|
||||
PIOS_Assert(0);
|
||||
}
|
||||
}
|
||||
#else
|
||||
pios_com_cotelem_id = 0;
|
||||
#endif /* PIOS_INCLUDE_COM_TELEM */
|
||||
#endif /* PIOS_INCLUDE_COM */
|
||||
|
||||
/*
|
||||
@ -950,12 +972,12 @@ GPIO_InitTypeDef GPIO_InitStructure;
|
||||
PIOS_DEBUG_Assert(0);
|
||||
}*/
|
||||
|
||||
init_USART_dma();
|
||||
/*init_USART_dma();
|
||||
initUSARTs();
|
||||
extern t_fifo_buffer rx;
|
||||
fifoBuf_init(&rx,RxBuffer3,sizeof(RxBuffer3));
|
||||
|
||||
PIOS_Video_Init(&pios_video_cfg);
|
||||
PIOS_Video_Init(&pios_video_cfg);*/
|
||||
|
||||
//uint8_t * rx_buffer = (uint8_t *) pvPortMalloc(PIOS_COM_HKOSD_RX_BUF_LEN);
|
||||
|
||||
|
@ -198,15 +198,17 @@ extern uint32_t pios_spi_port_id;
|
||||
//
|
||||
// See also pios_board.c
|
||||
//-------------------------
|
||||
#define PIOS_COM_MAX_DEVS 4
|
||||
#define PIOS_COM_MAX_DEVS 5
|
||||
extern uint32_t pios_com_telem_rf_id;
|
||||
extern uint32_t pios_com_gps_id;
|
||||
extern uint32_t pios_com_aux_id;
|
||||
extern uint32_t pios_com_telem_usb_id;
|
||||
extern uint32_t pios_com_cotelem_id;
|
||||
#define PIOS_COM_AUX (pios_com_aux_id)
|
||||
#define PIOS_COM_GPS (pios_com_gps_id)
|
||||
#define PIOS_COM_TELEM_USB (pios_com_telem_usb_id)
|
||||
#define PIOS_COM_TELEM_RF (pios_com_telem_rf_id)
|
||||
#define PIOS_COM_COTELEM (pios_com_cotelem_id)
|
||||
#define PIOS_COM_DEBUG PIOS_COM_AUX
|
||||
|
||||
|
||||
|
@ -101,7 +101,7 @@ void PIOS_Hsync_ISR() {
|
||||
//PIOS_LED_On(LED2);
|
||||
if(gLineType == LINE_TYPE_GRAPHICS)
|
||||
{
|
||||
for(int g=0;g<95;g++)
|
||||
for(int g=0;g<90;g++)
|
||||
{
|
||||
asm("nop");
|
||||
}
|
||||
|
@ -212,6 +212,54 @@ static const struct pios_usart_cfg pios_usart_telem_main_cfg = {
|
||||
#endif /* PIOS_COM_TELEM */
|
||||
|
||||
|
||||
#if 1
|
||||
/*
|
||||
* COTelemetry on main USART
|
||||
*/
|
||||
static const struct pios_usart_cfg pios_usart_cotelem_main_cfg = {
|
||||
.regs = UART4,
|
||||
.remap = GPIO_AF_UART4,
|
||||
.init = {
|
||||
.USART_BaudRate = 57600,
|
||||
.USART_WordLength = USART_WordLength_8b,
|
||||
.USART_Parity = USART_Parity_No,
|
||||
.USART_StopBits = USART_StopBits_1,
|
||||
.USART_HardwareFlowControl =
|
||||
USART_HardwareFlowControl_None,
|
||||
.USART_Mode = USART_Mode_Rx | USART_Mode_Tx,
|
||||
},
|
||||
.irq = {
|
||||
.init = {
|
||||
.NVIC_IRQChannel = UART4_IRQn,
|
||||
.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_MID,
|
||||
.NVIC_IRQChannelSubPriority = 0,
|
||||
.NVIC_IRQChannelCmd = ENABLE,
|
||||
},
|
||||
},
|
||||
.rx = {
|
||||
.gpio = GPIOA,
|
||||
.init = {
|
||||
.GPIO_Pin = GPIO_Pin_1,
|
||||
.GPIO_Speed = GPIO_Speed_2MHz,
|
||||
.GPIO_Mode = GPIO_Mode_AF,
|
||||
.GPIO_OType = GPIO_OType_PP,
|
||||
.GPIO_PuPd = GPIO_PuPd_UP
|
||||
},
|
||||
},
|
||||
.tx = {
|
||||
.gpio = GPIOA,
|
||||
.init = {
|
||||
.GPIO_Pin = GPIO_Pin_0,
|
||||
.GPIO_Speed = GPIO_Speed_2MHz,
|
||||
.GPIO_Mode = GPIO_Mode_AF,
|
||||
.GPIO_OType = GPIO_OType_PP,
|
||||
.GPIO_PuPd = GPIO_PuPd_UP
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
#endif /* PIOS_COM_COTELEM */
|
||||
|
||||
|
||||
#if defined(PIOS_INCLUDE_COM)
|
||||
|
||||
|
@ -35,6 +35,15 @@
|
||||
#include "glu.h"
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN32)
|
||||
#include "GL/gl.h"
|
||||
#include "GL/glu.h"
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_LINUX)
|
||||
#include "GL/glu.h"
|
||||
#endif
|
||||
|
||||
#if !defined(Q_OS_MAC)
|
||||
// ARB_vertex_buffer_object
|
||||
extern PFNGLBINDBUFFERARBPROC glBindBuffer;
|
||||
|
@ -30,6 +30,15 @@
|
||||
#include "glu.h"
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN32)
|
||||
#include "GL/gl.h"
|
||||
#include "GL/glu.h"
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_LINUX)
|
||||
#include "GL/glu.h"
|
||||
#endif
|
||||
|
||||
#include <QtDebug>
|
||||
|
||||
using namespace glc;
|
||||
|
@ -12,7 +12,7 @@
|
||||
<field name="Altitude" units="" type="enum" elements="1" options="Disabled,Enabled" defaultvalue="Enabled"/>
|
||||
<field name="AltitudeSetup" units="" type="int16" elements="2" elementnames="X,Y" defaultvalue="2,145"/>
|
||||
<field name="Heading" units="" type="enum" elements="1" options="Disabled,Enabled" defaultvalue="Enabled"/>
|
||||
<field name="HeadingSetup" units="" type="int16" elements="2" elementnames="X,Y" defaultvalue="168,250"/>
|
||||
<field name="HeadingSetup" units="" type="int16" elements="2" elementnames="X,Y" defaultvalue="168,240"/>
|
||||
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user