1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-30 15:52:12 +01:00

Updates, first UAVtalk client test

This commit is contained in:
Sambas 2012-03-05 19:53:52 +02:00
parent ebd2ae7e59
commit 91a9e45888
18 changed files with 16007 additions and 9845 deletions

View 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(&registerObject);
// 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;
}
}
}
/**
* @}
* @}
*/

View 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
/**
* @}
* @}
*/

View File

@ -144,7 +144,7 @@ int32_t GPSInitialize(void)
#ifdef PIOS_GPS_SETS_HOMELOCATION #ifdef PIOS_GPS_SETS_HOMELOCATION
HomeLocationInitialize(); HomeLocationInitialize();
#endif #endif
//updateSettings(); updateSettings();
gps_rx_buffer = pvPortMalloc(NMEA_MAX_PACKET_LENGTH); gps_rx_buffer = pvPortMalloc(NMEA_MAX_PACKET_LENGTH);
PIOS_Assert(gps_rx_buffer); PIOS_Assert(gps_rx_buffer);
@ -400,10 +400,10 @@ static void updateSettings()
PIOS_COM_ChangeBaud(gpsPort, 38400); PIOS_COM_ChangeBaud(gpsPort, 38400);
break; break;
case HWSETTINGS_GPSSPEED_57600: case HWSETTINGS_GPSSPEED_57600:
PIOS_COM_ChangeBaud(gpsPort, 57600); //PIOS_COM_ChangeBaud(gpsPort, 57600);
break; break;
case HWSETTINGS_GPSSPEED_115200: case HWSETTINGS_GPSSPEED_115200:
PIOS_COM_ChangeBaud(gpsPort, 115200); //PIOS_COM_ChangeBaud(gpsPort, 115200);
break; break;
} }
} }

View File

@ -161,7 +161,7 @@ void introGraphics();
void updateGraphics(); void updateGraphics();
void drawGraphicsLine(); void drawGraphicsLine();
void write_char16(char ch, unsigned int x, unsigned int y); void write_char16(char ch, unsigned int x, unsigned int y, int font);
void write_pixel(uint16_t *buff, unsigned int x, unsigned int y, int mode); void write_pixel(uint16_t *buff, unsigned int x, unsigned int y, int mode);
void write_pixel_lm(unsigned int x, unsigned int y, int mmode, int lmode); void write_pixel_lm(unsigned int x, unsigned int y, int mmode, int lmode);
void write_hline(uint16_t *buff, unsigned int x0, unsigned int x1, unsigned int y, int mode); void write_hline(uint16_t *buff, unsigned int x0, unsigned int x1, unsigned int y, int mode);

View File

@ -41,6 +41,7 @@
#include "fonts.h" #include "fonts.h"
#include "font12x18.h" #include "font12x18.h"
#include "font8x10.h"
#include "WMMInternal.h" #include "WMMInternal.h"
static uint16_t angleA=0; static uint16_t angleA=0;
@ -124,7 +125,7 @@ uint8_t getCharData(uint16_t charPos) {
} }
} }
return length; return length;
}*/ }
uint8_t printText16(uint16_t x, uint16_t y, const char* str) { uint8_t printText16(uint16_t x, uint16_t y, const char* str) {
@ -139,12 +140,6 @@ uint8_t printText16(uint16_t x, uint16_t y, const char* str) {
} }
void printTime(uint16_t x, uint16_t y) {
char temp[9]={0};
sprintf(temp,"%02d:%02d:%02d",time.hour,time.min,time.sec);
//printTextFB(x,y,temp);
write_string(temp, x, y, 1, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 0);
}
uint8_t printCharFB(uint16_t ch, uint16_t x, uint16_t y) { uint8_t printCharFB(uint16_t ch, uint16_t x, uint16_t y) {
for(uint8_t i = 0; i < 18; i++) for(uint8_t i = 0; i < 18; i++)
@ -155,57 +150,7 @@ uint8_t printCharFB(uint16_t ch, uint16_t x, uint16_t y) {
} }
return 1; return 1;
} }
*/
void write_char16(char ch, unsigned int x, unsigned int y)
{
int yy, addr_temp, row, row_temp, xshift;
uint16_t and_mask, or_mask, level_bits;
char lookup = 0;
// Compute starting address (for x,y) of character.
int addr = CALC_BUFF_ADDR(x, y);
int wbit = CALC_BIT_IN_WORD(x);
// If font only supports lowercase or uppercase, make the letter
// lowercase or uppercase.
// How big is the character? We handle characters up to 8 pixels
// wide for now. Support for large characters may be added in future.
{
// Ensure we don't overflow.
if(x + wbit > DISP_WIDTH)
return;
// Load data pointer.
row = ch * 18;
row_temp = row;
addr_temp = addr;
xshift = 16 - 16;
// We can write mask words easily.
for(yy = y; yy < y + 18; yy++)
{
write_word_misaligned_OR(draw_buffer_mask, font_mask16x18[row] << xshift, addr, wbit);
addr += DISP_WIDTH / 16;
row++;
}
// Level bits are more complicated. We need to set or clear
// level bits, but only where the mask bit is set; otherwise,
// we need to leave them alone. To do this, for each word, we
// construct an AND mask and an OR mask, and apply each individually.
row = row_temp;
addr = addr_temp;
for(yy = y; yy < y + 18; yy++)
{
level_bits = font_frame16x18[row];
//if(!(flags & FONT_INVERT)) // data is normally inverted
level_bits = ~level_bits;
or_mask = font_mask16x18[row] << xshift;
and_mask = (font_mask16x18[row] & level_bits) << xshift;
write_word_misaligned_OR(draw_buffer_level, or_mask, addr, wbit);
// If we're not bold write the AND mask.
//if(!(flags & FONT_BOLD))
write_word_misaligned_NAND(draw_buffer_level, and_mask, addr, wbit);
addr += DISP_WIDTH / 16;
row++;
}
}
}
@ -1395,6 +1340,86 @@ int fetch_font_info(char ch, int font, struct FontEntry *font_info, char *lookup
return 1; return 1;
} }
/**
* write_char16: Draw a character on the current draw buffer.
* Currently supports outlined characters and characters with
* a width of up to 8 pixels.
*
* @param ch character to write
* @param x x coordinate (left)
* @param y y coordinate (top)
* @param flags flags to write with (see gfx.h)
* @param font font to use
*/
void write_char16(char ch, unsigned int x, unsigned int y, int font)
{
int yy, addr_temp, row, row_temp, xshift;
uint16_t and_mask, or_mask, level_bits;
struct FontEntry font_info;
char lookup = 0;
fetch_font_info(0, font, &font_info, NULL);
// Compute starting address (for x,y) of character.
int addr = CALC_BUFF_ADDR(x, y);
int wbit = CALC_BIT_IN_WORD(x);
// If font only supports lowercase or uppercase, make the letter
// lowercase or uppercase.
// How big is the character? We handle characters up to 8 pixels
// wide for now. Support for large characters may be added in future.
{
// Ensure we don't overflow.
if(x + wbit > DISP_WIDTH)
return;
// Load data pointer.
row = ch * font_info.height;
row_temp = row;
addr_temp = addr;
xshift = 16 - font_info.width;
// We can write mask words easily.
for(yy = y; yy < y + font_info.height; yy++)
{
if(font==3)
write_word_misaligned_OR(draw_buffer_mask, font_mask12x18[row] << xshift, addr, wbit);
else
write_word_misaligned_OR(draw_buffer_mask, font_mask8x10[row] << xshift, addr, wbit);
addr += DISP_WIDTH / 16;
row++;
}
// Level bits are more complicated. We need to set or clear
// level bits, but only where the mask bit is set; otherwise,
// we need to leave them alone. To do this, for each word, we
// construct an AND mask and an OR mask, and apply each individually.
row = row_temp;
addr = addr_temp;
for(yy = y; yy < y + font_info.height; yy++)
{
if(font==3)
{
level_bits = font_frame12x18[row];
//if(!(flags & FONT_INVERT)) // data is normally inverted
level_bits = ~level_bits;
or_mask = font_mask12x18[row] << xshift;
and_mask = (font_mask12x18[row] & level_bits) << xshift;
} else {
level_bits = font_frame8x10[row];
//if(!(flags & FONT_INVERT)) // data is normally inverted
level_bits = ~level_bits;
or_mask = font_mask8x10[row] << xshift;
and_mask = (font_mask8x10[row] & level_bits) << xshift;
}
write_word_misaligned_OR(draw_buffer_level, or_mask, addr, wbit);
// If we're not bold write the AND mask.
//if(!(flags & FONT_BOLD))
write_word_misaligned_NAND(draw_buffer_level, and_mask, addr, wbit);
addr += DISP_WIDTH / 16;
row++;
}
}
}
/** /**
* write_char: Draw a character on the current draw buffer. * write_char: Draw a character on the current draw buffer.
* Currently supports outlined characters and characters with * Currently supports outlined characters and characters with
@ -1418,10 +1443,10 @@ void write_char(char ch, unsigned int x, unsigned int y, int flags, int font)
int wbit = CALC_BIT_IN_WORD(x); int wbit = CALC_BIT_IN_WORD(x);
// If font only supports lowercase or uppercase, make the letter // If font only supports lowercase or uppercase, make the letter
// lowercase or uppercase. // lowercase or uppercase.
/*if(font_info.flags & FONT_LOWERCASE_ONLY) if(font_info.flags & FONT_LOWERCASE_ONLY)
ch = tolower(ch); ch = tolower(ch);
if(font_info.flags & FONT_UPPERCASE_ONLY) if(font_info.flags & FONT_UPPERCASE_ONLY)
ch = toupper(ch);*/ ch = toupper(ch);
fetch_font_info(ch, font, &font_info, &lookup); fetch_font_info(ch, font, &font_info, &lookup);
// How big is the character? We handle characters up to 8 pixels // How big is the character? We handle characters up to 8 pixels
// wide for now. Support for large characters may be added in future. // wide for now. Support for large characters may be added in future.
@ -1543,7 +1568,12 @@ void write_string(char *str, unsigned int x, unsigned int y, unsigned int xs, un
else else
{ {
if(xx >= 0 && xx < DISP_WIDTH) if(xx >= 0 && xx < DISP_WIDTH)
{
if(font_info.id<2)
write_char(*str, xx, yy, flags, font); write_char(*str, xx, yy, flags, font);
else
write_char16(*str, xx, yy, font);
}
xx += font_info.width + xs; xx += font_info.width + xs;
} }
str++; str++;
@ -1833,6 +1863,14 @@ void drawBattery(uint16_t x, uint16_t y, uint8_t battery, uint16_t size)
} }
} }
void printTime(uint16_t x, uint16_t y) {
char temp[9]={0};
sprintf(temp,"%02d:%02d:%02d",time.hour,time.min,time.sec);
//printTextFB(x,y,temp);
write_string(temp, x, y, 0, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 3);
}
void setAttitudeOsd(int16_t pitch, int16_t roll, int16_t yaw) void setAttitudeOsd(int16_t pitch, int16_t roll, int16_t yaw)
{ {
m_pitch=pitch; m_pitch=pitch;
@ -1851,7 +1889,7 @@ void setGpsOsd(uint8_t status, int32_t lat, int32_t lon, float alt, float spd)
void introText(){ void introText(){
//printTextFB((GRAPHICS_WIDTH_REAL/2 - 40)/16,GRAPHICS_HEIGHT_REAL-10,"ver 0.1"); //printTextFB((GRAPHICS_WIDTH_REAL/2 - 40)/16,GRAPHICS_HEIGHT_REAL-10,"ver 0.1");
write_string("ver 0.2", (GRAPHICS_WIDTH_REAL/2),GRAPHICS_HEIGHT_REAL-18, 1, 0, TEXT_VA_TOP, TEXT_HA_CENTER, 0, 0); write_string("ver 0.2", (GRAPHICS_WIDTH_REAL/2),GRAPHICS_HEIGHT_REAL-20, 0, 0, TEXT_VA_TOP, TEXT_HA_CENTER, 0, 3);
} }
void introGraphics() { void introGraphics() {
@ -2115,7 +2153,7 @@ void hud_draw_linear_compass(int v, int range, int width, int x, int y, int mint
// Then, draw a rectangle with the present heading in it. // Then, draw a rectangle with the present heading in it.
// We want to cover up any other markers on the bottom. // We want to cover up any other markers on the bottom.
// First compute font size. // First compute font size.
fetch_font_info(0, 0, &font_info, NULL); fetch_font_info(0, 3, &font_info, NULL);
int text_width = (font_info.width + 1) * 3; int text_width = (font_info.width + 1) * 3;
int rect_width = text_width + 2; int rect_width = text_width + 2;
write_filled_rectangle_lm(x - (rect_width / 2), majtick_start + 2, rect_width, font_info.height + 2, 0, 1); write_filled_rectangle_lm(x - (rect_width / 2), majtick_start + 2, rect_width, font_info.height + 2, 0, 1);
@ -2124,7 +2162,7 @@ void hud_draw_linear_compass(int v, int range, int width, int x, int y, int mint
headingstr[1] = '0' + ((v / 10) % 10); headingstr[1] = '0' + ((v / 10) % 10);
headingstr[2] = '0' + (v % 10); headingstr[2] = '0' + (v % 10);
headingstr[3] = 0; headingstr[3] = 0;
write_string(headingstr, x + 1, majtick_start + textoffset+2, 1, 0, TEXT_VA_MIDDLE, TEXT_HA_CENTER, 1, 0); write_string(headingstr, x + 1, majtick_start + textoffset+2, 0, 0, TEXT_VA_MIDDLE, TEXT_HA_CENTER, 1, 3);
} }
@ -2191,19 +2229,40 @@ void calcHomeArrow(void)
//! TODO: sanity check //! TODO: sanity check
char temp[50]={0}; char temp[50]={0};
memset(temp, ' ', 40);
sprintf(temp,"hea:%d",(int)brng); sprintf(temp,"hea:%d",(int)brng);
write_string(temp, 130, 10, 1, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 0); write_string(temp, 130, 10, 0, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 2);
sprintf(temp,"ele:%d",(int)elevation); sprintf(temp,"ele:%d",(int)elevation);
write_string(temp, 130, 10+14, 1, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 0); write_string(temp, 130, 10+10, 0, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 2);
sprintf(temp,"dis:%d",(int)d); sprintf(temp,"dis:%d",(int)d);
write_string(temp, 130, 10+14+14, 1, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 0); write_string(temp, 130, 10+10+10, 0, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 2);
sprintf(temp,"u2g:%d",(int)u2g); sprintf(temp,"u2g:%d",(int)u2g);
write_string(temp, 130, 10+14+14+14, 1, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 0); write_string(temp, 130, 10+10+10+10, 0, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 2);
sprintf(temp,"%c%c",(int)(u2g/22.5f)*2+0x90,(int)(u2g/22.5f)*2+0x91); sprintf(temp,"%c%c",(int)(u2g/22.5f)*2+0x90,(int)(u2g/22.5f)*2+0x91);
printText16(200, 10+14+14,temp); write_string(temp,200,10+10+10, 0, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 3);
}
int lama=10;
int lama_loc[2][30];
void lamas(void)
{
char temp[10]={0};
lama++;
if(lama%10==0)
{
for(int z=0; z<30;z++)
{
lama_loc[0][z]=rand()%(GRAPHICS_WIDTH_REAL-10);
lama_loc[1][z]=rand()%(GRAPHICS_HEIGHT_REAL-10);
}
}
for(int z=0; z<30;z++)
{
sprintf(temp,"%c",0xe8+(lama_loc[0][z]%2));
write_string(temp,lama_loc[0][z],lama_loc[1][z], 0, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 2);
}
} }
//main draw function //main draw function
@ -2247,11 +2306,11 @@ void updateGraphics() {
char temp[50]={0}; char temp[50]={0};
memset(temp, ' ', 40); memset(temp, ' ', 40);
sprintf(temp,"Lat:%d",(int)m_gpsLat); sprintf(temp,"Lat:%d",(int)m_gpsLat);
write_string(temp, 5, 10, 1, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 0); write_string(temp, 5, 10, 0, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 2);
sprintf(temp,"Lon:%d",(int)m_gpsLon); sprintf(temp,"Lon:%d",(int)m_gpsLon);
write_string(temp, 5, 10+14, 1, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 0); write_string(temp, 5, 10+14, 0, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 2);
sprintf(temp,"Fix:%d",(int)m_gpsStatus); sprintf(temp,"Fix:%d",(int)m_gpsStatus);
write_string(temp, 5, 10+14+14, 1, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 0); write_string(temp, 5, 10+14+14, 0, 0, TEXT_VA_TOP, TEXT_HA_LEFT, 0, 2);
/* Print RTC time */ /* Print RTC time */
@ -2262,16 +2321,27 @@ void updateGraphics() {
/* Print Number of detected video Lines */ /* Print Number of detected video Lines */
sprintf(temp,"Lines:%4d",PIOS_Video_GetOSDLines()); sprintf(temp,"Lines:%4d",PIOS_Video_GetOSDLines());
write_string(temp, (GRAPHICS_WIDTH_REAL - 2),10, 1, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 0); write_string(temp, (GRAPHICS_WIDTH_REAL - 2),10, 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
/* Print ADC voltage */ /* Print ADC voltage */
sprintf(temp,"Rssi:%4dV",(int)(PIOS_ADC_PinGet(4)*3000/4096)); sprintf(temp,"Rssi:%4dV",(int)(PIOS_ADC_PinGet(5)*300*61/4096));
write_string(temp, (GRAPHICS_WIDTH_REAL - 2),24, 1, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 0); write_string(temp, (GRAPHICS_WIDTH_REAL - 2),20, 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
/* Print CPU temperature */ /* Print CPU temperature */
sprintf(temp,"Temp:%4dC",(int)(PIOS_ADC_PinGet(5)*0.29296875f-279)); sprintf(temp,"Temp:%4dC",(int)(PIOS_ADC_PinGet(6)*0.29296875f-279));
write_string(temp, (GRAPHICS_WIDTH_REAL - 2),38, 1, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 0); write_string(temp, (GRAPHICS_WIDTH_REAL - 2),30, 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
/* Print ADC voltage FLIGHT*/
sprintf(temp,"FltV:%4dV",(int)(PIOS_ADC_PinGet(2)*300*61/4096));
write_string(temp, (GRAPHICS_WIDTH_REAL - 2),40, 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
/* Print ADC voltage VIDEO*/
sprintf(temp,"VidV:%4dV",(int)(PIOS_ADC_PinGet(3)*300*61/4096));
write_string(temp, (GRAPHICS_WIDTH_REAL - 2),50, 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
/* Print ADC voltage RSSI */
sprintf(temp,"Rssi:%4dV",(int)(PIOS_ADC_PinGet(4)*300*61/4096));
write_string(temp, (GRAPHICS_WIDTH_REAL - 2),60, 0, 0, TEXT_VA_TOP, TEXT_HA_RIGHT, 0, 2);
/* Draw Battery Gauge */ /* Draw Battery Gauge */
m_batt++; m_batt++;
@ -2323,7 +2393,7 @@ void updateGraphics() {
} }
//write_filled_rectangle(draw_buffer_level,20,20,30,30,1); //write_filled_rectangle(draw_buffer_level,20,20,30,30,1);
//write_filled_rectangle(draw_buffer_mask,30,30,30,30,1); //write_filled_rectangle(draw_buffer_mask,30,30,30,30,1);
lamas();
/* Make sure every line last bit is 0 */ /* Make sure every line last bit is 0 */
write_vline( draw_buffer_level,GRAPHICS_WIDTH_REAL-1,0,GRAPHICS_HEIGHT_REAL-1,0); write_vline( draw_buffer_level,GRAPHICS_WIDTH_REAL-1,0,GRAPHICS_HEIGHT_REAL-1,0);
write_vline( draw_buffer_mask,GRAPHICS_WIDTH_REAL-1,0,GRAPHICS_HEIGHT_REAL-1,0); write_vline( draw_buffer_mask,GRAPHICS_WIDTH_REAL-1,0,GRAPHICS_HEIGHT_REAL-1,0);

View File

@ -49,7 +49,7 @@ endif
FLASH_TOOL = OPENOCD FLASH_TOOL = OPENOCD
# List of modules to include # List of modules to include
MODULES = Osd/osdgen Osd/osdinput GPS Telemetry FirmwareIAP MODULES = Osd/osdgen Osd/osdinput GPS COTelemetry Telemetry FirmwareIAP
# Paths # Paths
@ -84,6 +84,7 @@ OPUAVOBJINC = $(OPUAVOBJ)/inc
OPSYSINC = $(OPDIR)/System/inc OPSYSINC = $(OPDIR)/System/inc
BOOT = ../Bootloaders/AHRS BOOT = ../Bootloaders/AHRS
BOOTINC = $(BOOT)/inc BOOTINC = $(BOOT)/inc
HWDEFSINC = ../board_hw_defs/$(BOARD_NAME)
OPUAVSYNTHDIR = $(OUTDIR)/../uavobject-synthetics/flight OPUAVSYNTHDIR = $(OUTDIR)/../uavobject-synthetics/flight
@ -243,6 +244,7 @@ EXTRAINCDIRS += $(RTOSSRCDIR)/portable/GCC/ARM_CM3
EXTRAINCDIRS += $(AHRSINC) EXTRAINCDIRS += $(AHRSINC)
EXTRAINCDIRS += $(OPUAVSYNTHDIR) EXTRAINCDIRS += $(OPUAVSYNTHDIR)
EXTRAINCDIRS += $(BOOTINC) EXTRAINCDIRS += $(BOOTINC)
EXTRAINCDIRS += $(HWDEFSINC)
EXTRAINCDIRS += ${foreach MOD, ${MODULES}, ${OPMODULEDIR}/${MOD}/inc} ${OPMODULEDIR}/System/inc EXTRAINCDIRS += ${foreach MOD, ${MODULES}, ${OPMODULEDIR}/${MOD}/inc} ${OPMODULEDIR}/System/inc

View File

@ -29,6 +29,7 @@ struct FontEntry fonts[NUM_FONTS + 1] = {
&font_lookup_outlined8x8, &font_lookup_outlined8x8,
&font_data_outlined8x8, &font_data_outlined8x8,
FONT_UPPERCASE_ONLY }, FONT_UPPERCASE_ONLY },
{ 2, 8, 8, "Tiny5x5", 0, 0, 0 }, // not yet implemented { 2, 8, 10, "font8x10", 0, 0, 0 },
{ 3, 12, 18, "font12x18", 0, 0, 0 },
{ -1 } // ends font table { -1 } // ends font table
}; };

View File

@ -26,7 +26,7 @@
#include "font_outlined8x8.h" #include "font_outlined8x8.h"
// This number must also be incremented for each new font. // This number must also be incremented for each new font.
#define NUM_FONTS 3 #define NUM_FONTS 4
// Flags for fonts. // Flags for fonts.
#define FONT_LOWERCASE_ONLY 1 #define FONT_LOWERCASE_ONLY 1

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5649 @@
/*
* font8x10.h
*
* Created on: 3.1.2012
* Author: Samba
*/
#ifndef FONT8X10_H_
#define FONT8X10_H_
static const uint8_t font_frame8x10[] = {
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x60,
0x10,
0x20,
0x4C,
0x7A,
0x0A,
0x0C,
0x00,
0x00,
0x00,
0x60,
0x20,
0x60,
0x2C,
0x6A,
0x0A,
0x0C,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x10,
0x10,
0x10,
0x10,
0x10,
0x00,
0x10,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x28,
0x28,
0x7C,
0x28,
0x7C,
0x28,
0x28,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x7C,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x30,
0x30,
0x00,
0x00,
0x00,
0x00,
0x04,
0x08,
0x10,
0x20,
0x40,
0x00,
0x00,
0x00,
0x00,
0x38,
0x44,
0x4C,
0x54,
0x64,
0x44,
0x38,
0x00,
0x00,
0x00,
0x10,
0x30,
0x10,
0x10,
0x10,
0x10,
0x38,
0x00,
0x00,
0x00,
0x38,
0x44,
0x04,
0x08,
0x10,
0x20,
0x7C,
0x00,
0x00,
0x00,
0x7C,
0x08,
0x10,
0x08,
0x04,
0x44,
0x38,
0x00,
0x00,
0x00,
0x08,
0x18,
0x28,
0x48,
0x7C,
0x08,
0x08,
0x00,
0x00,
0x00,
0x7C,
0x40,
0x78,
0x04,
0x04,
0x44,
0x38,
0x00,
0x00,
0x00,
0x18,
0x20,
0x40,
0x78,
0x44,
0x44,
0x38,
0x00,
0x00,
0x00,
0x7C,
0x04,
0x08,
0x10,
0x20,
0x20,
0x20,
0x00,
0x00,
0x00,
0x38,
0x44,
0x44,
0x38,
0x44,
0x44,
0x38,
0x00,
0x00,
0x00,
0x38,
0x44,
0x44,
0x3C,
0x04,
0x08,
0x30,
0x00,
0x00,
0x00,
0x00,
0x00,
0x30,
0x30,
0x00,
0x30,
0x30,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x7C,
0x00,
0x7C,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x38,
0x44,
0x04,
0x34,
0x54,
0x54,
0x38,
0x00,
0x00,
0x00,
0x38,
0x44,
0x44,
0x44,
0x7C,
0x44,
0x44,
0x00,
0x00,
0x00,
0x78,
0x44,
0x44,
0x78,
0x44,
0x44,
0x78,
0x00,
0x00,
0x00,
0x38,
0x44,
0x40,
0x40,
0x40,
0x44,
0x38,
0x00,
0x00,
0x00,
0x70,
0x48,
0x44,
0x44,
0x44,
0x48,
0x70,
0x00,
0x00,
0x00,
0x7C,
0x40,
0x40,
0x78,
0x40,
0x40,
0x7C,
0x00,
0x00,
0x00,
0x7C,
0x40,
0x40,
0x78,
0x40,
0x40,
0x40,
0x00,
0x00,
0x00,
0x38,
0x44,
0x40,
0x58,
0x44,
0x44,
0x3C,
0x00,
0x00,
0x00,
0x44,
0x44,
0x44,
0x7C,
0x44,
0x44,
0x44,
0x00,
0x00,
0x00,
0x38,
0x10,
0x10,
0x10,
0x10,
0x10,
0x38,
0x00,
0x00,
0x00,
0x1C,
0x08,
0x08,
0x08,
0x08,
0x48,
0x30,
0x00,
0x00,
0x00,
0x44,
0x48,
0x50,
0x60,
0x50,
0x48,
0x44,
0x00,
0x00,
0x00,
0x40,
0x40,
0x40,
0x40,
0x40,
0x40,
0x7C,
0x00,
0x00,
0x00,
0x44,
0x6C,
0x54,
0x54,
0x44,
0x44,
0x44,
0x00,
0x00,
0x00,
0x44,
0x44,
0x64,
0x54,
0x4C,
0x44,
0x44,
0x00,
0x00,
0x00,
0x38,
0x44,
0x44,
0x44,
0x44,
0x44,
0x38,
0x00,
0x00,
0x00,
0x78,
0x44,
0x44,
0x78,
0x40,
0x40,
0x40,
0x00,
0x00,
0x00,
0x38,
0x44,
0x44,
0x44,
0x54,
0x48,
0x34,
0x00,
0x00,
0x00,
0x78,
0x44,
0x44,
0x78,
0x50,
0x48,
0x44,
0x00,
0x00,
0x00,
0x38,
0x44,
0x40,
0x38,
0x04,
0x44,
0x38,
0x00,
0x00,
0x00,
0x7C,
0x10,
0x10,
0x10,
0x10,
0x10,
0x10,
0x00,
0x00,
0x00,
0x44,
0x44,
0x44,
0x44,
0x44,
0x44,
0x38,
0x00,
0x00,
0x00,
0x44,
0x44,
0x44,
0x44,
0x44,
0x28,
0x10,
0x00,
0x00,
0x00,
0x44,
0x44,
0x44,
0x54,
0x54,
0x54,
0x28,
0x00,
0x00,
0x00,
0x44,
0x44,
0x28,
0x10,
0x28,
0x44,
0x44,
0x00,
0x00,
0x00,
0x44,
0x44,
0x44,
0x28,
0x10,
0x10,
0x10,
0x00,
0x00,
0x00,
0x7C,
0x04,
0x08,
0x10,
0x20,
0x40,
0x7C,
0x00,
0x00,
0x00,
0x38,
0x20,
0x20,
0x20,
0x20,
0x20,
0x38,
0x00,
0x00,
0x00,
0x00,
0x40,
0x20,
0x10,
0x08,
0x04,
0x00,
0x00,
0x00,
0x00,
0x38,
0x08,
0x08,
0x08,
0x08,
0x08,
0x38,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x38,
0x04,
0x3C,
0x44,
0x3C,
0x00,
0x00,
0x00,
0x40,
0x40,
0x40,
0x78,
0x44,
0x44,
0x78,
0x00,
0x00,
0x00,
0x00,
0x00,
0x3C,
0x40,
0x40,
0x40,
0x3C,
0x00,
0x00,
0x00,
0x04,
0x04,
0x04,
0x3C,
0x44,
0x44,
0x3C,
0x00,
0x00,
0x00,
0x00,
0x00,
0x38,
0x44,
0x7C,
0x40,
0x3C,
0x00,
0x00,
0x00,
0x08,
0x14,
0x10,
0x7C,
0x10,
0x10,
0x10,
0x00,
0x00,
0x00,
0x00,
0x00,
0x3C,
0x44,
0x3C,
0x04,
0x78,
0x00,
0x00,
0x00,
0x40,
0x40,
0x40,
0x78,
0x44,
0x44,
0x44,
0x00,
0x00,
0x00,
0x00,
0x10,
0x00,
0x10,
0x10,
0x10,
0x10,
0x00,
0x00,
0x00,
0x08,
0x00,
0x08,
0x08,
0x08,
0x48,
0x30,
0x00,
0x00,
0x00,
0x20,
0x20,
0x24,
0x28,
0x30,
0x28,
0x24,
0x00,
0x00,
0x00,
0x30,
0x10,
0x10,
0x10,
0x10,
0x10,
0x38,
0x00,
0x00,
0x00,
0x00,
0x00,
0x68,
0x54,
0x54,
0x44,
0x44,
0x00,
0x00,
0x00,
0x00,
0x00,
0x58,
0x64,
0x44,
0x44,
0x44,
0x00,
0x00,
0x00,
0x00,
0x00,
0x38,
0x44,
0x44,
0x44,
0x38,
0x00,
0x00,
0x00,
0x00,
0x00,
0x78,
0x44,
0x78,
0x40,
0x40,
0x00,
0x00,
0x00,
0x00,
0x00,
0x3C,
0x44,
0x3C,
0x04,
0x04,
0x00,
0x00,
0x00,
0x00,
0x00,
0x58,
0x64,
0x40,
0x40,
0x40,
0x00,
0x00,
0x00,
0x00,
0x00,
0x3C,
0x40,
0x38,
0x04,
0x78,
0x00,
0x00,
0x00,
0x10,
0x10,
0x7C,
0x10,
0x10,
0x14,
0x08,
0x00,
0x00,
0x00,
0x00,
0x00,
0x44,
0x44,
0x44,
0x44,
0x38,
0x00,
0x00,
0x00,
0x00,
0x00,
0x44,
0x44,
0x44,
0x28,
0x10,
0x00,
0x00,
0x00,
0x00,
0x00,
0x44,
0x44,
0x54,
0x54,
0x28,
0x00,
0x00,
0x00,
0x00,
0x00,
0x44,
0x28,
0x10,
0x28,
0x44,
0x00,
0x00,
0x00,
0x00,
0x00,
0x44,
0x28,
0x10,
0x10,
0x20,
0x00,
0x00,
0x00,
0x00,
0x00,
0x7C,
0x08,
0x10,
0x20,
0x7C,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x10,
0x10,
0x10,
0x10,
0x10,
0x10,
0x10,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x38,
0x54,
0x54,
0x54,
0x44,
0x54,
0x44,
0x7C,
0x00,
0x00,
0x38,
0x44,
0x44,
0x44,
0x44,
0x44,
0x44,
0x7C,
0x00,
0x00,
0x38,
0x44,
0x44,
0x44,
0x44,
0x7C,
0x7C,
0x7C,
0x00,
0x00,
0x38,
0x44,
0x44,
0x7C,
0x7C,
0x7C,
0x7C,
0x7C,
0x00,
0x00,
0x38,
0x44,
0x7C,
0x7C,
0x7C,
0x7C,
0x7C,
0x7C,
0x00,
0x00,
0x38,
0x7C,
0x7C,
0x7C,
0x7C,
0x7C,
0x7C,
0x7C,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0xFF,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x18,
0x18,
0xFF,
0x18,
0x18,
0x00,
0x00,
0x00,
0x42,
0x42,
0x62,
0x52,
0xCB,
0x46,
0x42,
0x42,
0x00,
0x00,
0x3C,
0x42,
0x40,
0x30,
0xCF,
0x02,
0x42,
0x3C,
0x00,
0x00,
0x3E,
0x20,
0x20,
0x38,
0xA3,
0x20,
0x20,
0x3E,
0x00,
0x00,
0x42,
0x42,
0x42,
0x42,
0xDB,
0x5A,
0x5A,
0x24,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x81,
0x42,
0x24,
0x18,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x18,
0x7E,
0x5E,
0x9F,
0x8F,
0x4E,
0x6E,
0x18,
0x00,
0x00,
0x18,
0x7E,
0x7E,
0x9F,
0x8F,
0x46,
0x66,
0x18,
0x00,
0x00,
0x18,
0x7E,
0x7E,
0xFF,
0x8F,
0x42,
0x66,
0x18,
0x00,
0x00,
0x18,
0x7E,
0x7E,
0xFF,
0xF1,
0x42,
0x66,
0x18,
0x00,
0x00,
0x18,
0x7E,
0x7E,
0xF9,
0xF1,
0x62,
0x66,
0x18,
0x00,
0x00,
0x18,
0x7E,
0x7A,
0xF9,
0xF1,
0x72,
0x76,
0x18,
0x00,
0x00,
0x18,
0x76,
0x72,
0xF1,
0xF9,
0x7A,
0x7E,
0x18,
0x00,
0x00,
0x18,
0x66,
0x62,
0xF1,
0xF9,
0x7E,
0x7E,
0x18,
0x00,
0x00,
0x18,
0x66,
0x42,
0xF1,
0xFF,
0x7E,
0x7E,
0x18,
0x00,
0x00,
0x18,
0x66,
0x42,
0x8F,
0xFF,
0x7E,
0x7E,
0x18,
0x00,
0x00,
0x18,
0x66,
0x46,
0x8F,
0x9F,
0x7E,
0x7E,
0x18,
0x00,
0x00,
0x18,
0x6E,
0x4E,
0x8F,
0x9F,
0x5E,
0x7E,
0x18,
0x00,
0x00,
0x07,
0x06,
0x04,
0x44,
0x3C,
0x3C,
0x24,
0x24,
0x00,
0x00,
0xE0,
0x60,
0x20,
0x22,
0x3C,
0x3C,
0x24,
0x24,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
};
static const uint8_t font_mask8x10[] = {
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0xF0,
0xF8,
0xFC,
0xFE,
0xFF,
0xFF,
0x7F,
0x3F,
0x1F,
0x00,
0xF0,
0xF8,
0xFC,
0xFE,
0xFF,
0xFF,
0xFF,
0x3F,
0x1F,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x10,
0x38,
0x38,
0x38,
0x38,
0x38,
0x10,
0x38,
0x10,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x28,
0x7C,
0x7C,
0xFE,
0x7C,
0xFE,
0x7C,
0x7C,
0x28,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x7C,
0xFE,
0x7C,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x30,
0x78,
0x78,
0x30,
0x00,
0x00,
0x04,
0x0E,
0x1C,
0x38,
0x70,
0xE0,
0x40,
0x00,
0x00,
0x38,
0x7C,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0x7C,
0x38,
0x00,
0x10,
0x38,
0x78,
0x38,
0x38,
0x38,
0x38,
0x7C,
0x38,
0x00,
0x38,
0x7C,
0xFE,
0x4E,
0x1C,
0x38,
0x7C,
0xFE,
0x7C,
0x00,
0x7C,
0xFE,
0x7C,
0x38,
0x1C,
0x4E,
0xFE,
0x7C,
0x38,
0x00,
0x08,
0x1C,
0x3C,
0x7C,
0xFC,
0xFE,
0x7C,
0x1C,
0x08,
0x00,
0x7C,
0xFE,
0xFC,
0xFC,
0x7E,
0x4E,
0xFE,
0x7C,
0x38,
0x00,
0x18,
0x3C,
0x78,
0xF8,
0xFC,
0xFE,
0xFE,
0x7C,
0x38,
0x00,
0x7C,
0xFE,
0x7E,
0x1C,
0x38,
0x70,
0x70,
0x70,
0x20,
0x00,
0x38,
0x7C,
0xFE,
0xFE,
0x7C,
0xFE,
0xFE,
0x7C,
0x38,
0x00,
0x38,
0x7C,
0xFE,
0xFE,
0x7E,
0x3E,
0x3C,
0x78,
0x30,
0x00,
0x00,
0x00,
0x30,
0x78,
0x78,
0x30,
0x78,
0x78,
0x30,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x7C,
0xFE,
0x7C,
0xFE,
0x7C,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x38,
0x7C,
0xFE,
0x7E,
0x7E,
0xFE,
0xFE,
0x7C,
0x38,
0x00,
0x38,
0x7C,
0xFE,
0xEE,
0xFE,
0xFE,
0xFE,
0xEE,
0x44,
0x00,
0x78,
0xFC,
0xFE,
0xFE,
0xFC,
0xFE,
0xFE,
0xFC,
0x78,
0x00,
0x38,
0x7C,
0xFE,
0xE4,
0xE0,
0xE4,
0xFE,
0x7C,
0x38,
0x00,
0x70,
0xF8,
0xFC,
0xEE,
0xEE,
0xEE,
0xFC,
0xF8,
0x70,
0x00,
0x7C,
0xFE,
0xFC,
0xF8,
0xFC,
0xF8,
0xFC,
0xFE,
0x7C,
0x00,
0x7C,
0xFE,
0xFC,
0xF8,
0xFC,
0xF8,
0xE0,
0xE0,
0x40,
0x00,
0x38,
0x7C,
0xFE,
0xFC,
0xFC,
0xFE,
0xFE,
0x7E,
0x3C,
0x00,
0x44,
0xEE,
0xEE,
0xFE,
0xFE,
0xFE,
0xEE,
0xEE,
0x44,
0x00,
0x38,
0x7C,
0x38,
0x38,
0x38,
0x38,
0x38,
0x7C,
0x38,
0x00,
0x1C,
0x3E,
0x1C,
0x1C,
0x1C,
0x5C,
0xFC,
0x78,
0x30,
0x00,
0x44,
0xEE,
0xFC,
0xF8,
0xF0,
0xF8,
0xFC,
0xEE,
0x44,
0x00,
0x40,
0xE0,
0xE0,
0xE0,
0xE0,
0xE0,
0xFC,
0xFE,
0x7C,
0x00,
0x44,
0xEE,
0xFE,
0xFE,
0xFE,
0xFE,
0xEE,
0xEE,
0x44,
0x00,
0x44,
0xEE,
0xEE,
0xFE,
0xFE,
0xFE,
0xEE,
0xEE,
0x44,
0x00,
0x38,
0x7C,
0xFE,
0xEE,
0xEE,
0xEE,
0xFE,
0x7C,
0x38,
0x00,
0x78,
0xFC,
0xFE,
0xFE,
0xFC,
0xF8,
0xE0,
0xE0,
0x40,
0x00,
0x38,
0x7C,
0xFE,
0xEE,
0xEE,
0xFE,
0xFC,
0x7E,
0x34,
0x00,
0x78,
0xFC,
0xFE,
0xFE,
0xFC,
0xF8,
0xFC,
0xEE,
0x44,
0x00,
0x38,
0x7C,
0xFE,
0xFC,
0x7C,
0x7E,
0xFE,
0x7C,
0x38,
0x00,
0x7C,
0xFE,
0x7C,
0x38,
0x38,
0x38,
0x38,
0x38,
0x10,
0x00,
0x44,
0xEE,
0xEE,
0xEE,
0xEE,
0xEE,
0xFE,
0x7C,
0x38,
0x00,
0x44,
0xEE,
0xEE,
0xEE,
0xEE,
0xEE,
0x7C,
0x38,
0x10,
0x00,
0x44,
0xEE,
0xEE,
0xFE,
0xFE,
0xFE,
0xFE,
0x7C,
0x28,
0x00,
0x44,
0xEE,
0xEE,
0x7C,
0x38,
0x7C,
0xEE,
0xEE,
0x44,
0x00,
0x44,
0xEE,
0xEE,
0xEE,
0x7C,
0x38,
0x38,
0x38,
0x10,
0x00,
0x7C,
0xFE,
0x7E,
0x1C,
0x38,
0x70,
0xFC,
0xFE,
0x7C,
0x00,
0x38,
0x7C,
0x78,
0x70,
0x70,
0x70,
0x78,
0x7C,
0x38,
0x00,
0x00,
0x40,
0xE0,
0x70,
0x38,
0x1C,
0x0E,
0x04,
0x00,
0x00,
0x38,
0x7C,
0x3C,
0x1C,
0x1C,
0x1C,
0x3C,
0x7C,
0x38,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x38,
0x7C,
0x3E,
0x7E,
0xFE,
0x7E,
0x3C,
0x00,
0x40,
0xE0,
0xE0,
0xF8,
0xFC,
0xFE,
0xFE,
0xFC,
0x78,
0x00,
0x00,
0x00,
0x3C,
0x7E,
0xFC,
0xE0,
0xFC,
0x7E,
0x3C,
0x00,
0x04,
0x0E,
0x0E,
0x3E,
0x7E,
0xFE,
0xFE,
0x7E,
0x3C,
0x00,
0x00,
0x00,
0x38,
0x7C,
0xFE,
0xFE,
0xFC,
0x7E,
0x3C,
0x00,
0x08,
0x1C,
0x3E,
0x7C,
0xFE,
0x7C,
0x38,
0x38,
0x10,
0x00,
0x00,
0x00,
0x3C,
0x7E,
0xFE,
0x7E,
0x7E,
0xFC,
0x78,
0x00,
0x40,
0xE0,
0xE0,
0xF8,
0xFC,
0xFE,
0xEE,
0xEE,
0x44,
0x00,
0x00,
0x10,
0x38,
0x10,
0x38,
0x38,
0x38,
0x38,
0x10,
0x00,
0x08,
0x1C,
0x08,
0x1C,
0x1C,
0x5C,
0xFC,
0x78,
0x30,
0x00,
0x20,
0x70,
0x74,
0x7E,
0x7C,
0x78,
0x7C,
0x7E,
0x24,
0x00,
0x30,
0x78,
0x38,
0x38,
0x38,
0x38,
0x38,
0x7C,
0x38,
0x00,
0x00,
0x00,
0x68,
0xFC,
0xFE,
0xFE,
0xFE,
0xEE,
0x6C,
0x00,
0x00,
0x00,
0x58,
0xFC,
0xFE,
0xEE,
0xEE,
0xEE,
0x44,
0x00,
0x00,
0x00,
0x38,
0x7C,
0xFE,
0xEE,
0xFE,
0x7C,
0x38,
0x00,
0x00,
0x00,
0x78,
0xFC,
0xFE,
0xFC,
0xF8,
0xE0,
0x40,
0x00,
0x00,
0x00,
0x3C,
0x7E,
0xFE,
0x7E,
0x3E,
0x0E,
0x04,
0x00,
0x00,
0x00,
0x58,
0xFC,
0xFE,
0xE4,
0xE0,
0xE0,
0x40,
0x00,
0x00,
0x00,
0x3C,
0x7E,
0xFC,
0x7C,
0x7E,
0xFC,
0x78,
0x00,
0x10,
0x38,
0x7C,
0xFE,
0x7C,
0x3C,
0x3E,
0x1C,
0x08,
0x00,
0x00,
0x00,
0x44,
0xEE,
0xEE,
0xEE,
0xFE,
0x7C,
0x38,
0x00,
0x00,
0x00,
0x44,
0xEE,
0xEE,
0xEE,
0x7C,
0x38,
0x10,
0x00,
0x00,
0x00,
0x44,
0xEE,
0xFE,
0xFE,
0xFE,
0x7C,
0x28,
0x00,
0x00,
0x00,
0x44,
0xEE,
0x7C,
0x38,
0x7C,
0xEE,
0x44,
0x00,
0x00,
0x00,
0x44,
0xEE,
0x7C,
0x38,
0x38,
0x70,
0x20,
0x00,
0x00,
0x00,
0x7C,
0xFE,
0x7C,
0x38,
0x7C,
0xFE,
0x7C,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x10,
0x38,
0x38,
0x38,
0x38,
0x38,
0x38,
0x38,
0x10,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x38,
0x7C,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0x7C,
0x38,
0x7C,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0x7C,
0x38,
0x7C,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0x7C,
0x38,
0x7C,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0x7C,
0x38,
0x7C,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0x7C,
0x38,
0x7C,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0xFE,
0x7C,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0xFF,
0xFF,
0xFF,
0x00,
0x00,
0x00,
0x00,
0x00,
0x18,
0x3C,
0xFF,
0xFF,
0xFF,
0x3C,
0x18,
0x00,
0x42,
0xE7,
0xE7,
0xF7,
0xFF,
0xFF,
0xEF,
0xE7,
0xE7,
0x42,
0x3C,
0x7E,
0xFF,
0xF2,
0xFD,
0xFF,
0xCF,
0xFF,
0x7E,
0x3C,
0x3E,
0x7F,
0x7E,
0x78,
0xFF,
0xFF,
0xF3,
0x7E,
0x7F,
0x3E,
0x42,
0xE7,
0xE7,
0xE7,
0xFF,
0xFF,
0xFF,
0xFF,
0x7E,
0x24,
0x00,
0x00,
0x00,
0x00,
0xFF,
0x00,
0xFF,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x81,
0xC3,
0xE7,
0x7E,
0x3C,
0x18,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x18,
0x7E,
0x7E,
0xFF,
0xFF,
0x7E,
0x7E,
0x18,
0x00,
0x00,
0x18,
0x7E,
0x7E,
0xFF,
0xFF,
0x7E,
0x7E,
0x18,
0x00,
0x00,
0x18,
0x7E,
0x7E,
0xFF,
0xFF,
0x7E,
0x7E,
0x18,
0x00,
0x00,
0x18,
0x7E,
0x7E,
0xFF,
0xFF,
0x7E,
0x7E,
0x18,
0x00,
0x00,
0x18,
0x7E,
0x7E,
0xFF,
0xFF,
0x7E,
0x7E,
0x18,
0x00,
0x00,
0x18,
0x7E,
0x7E,
0xFF,
0xFF,
0x7E,
0x7E,
0x18,
0x00,
0x00,
0x18,
0x7E,
0x7E,
0xFF,
0xFF,
0x7E,
0x7E,
0x18,
0x00,
0x00,
0x18,
0x7E,
0x7E,
0xFF,
0xFF,
0x7E,
0x7E,
0x18,
0x00,
0x00,
0x18,
0x7E,
0x7E,
0xFF,
0xFF,
0x7E,
0x7E,
0x18,
0x00,
0x00,
0x18,
0x7E,
0x7E,
0xFF,
0xFF,
0x7E,
0x7E,
0x18,
0x00,
0x00,
0x18,
0x7E,
0x7E,
0xFF,
0xFF,
0x7E,
0x7E,
0x18,
0x00,
0x00,
0x18,
0x7E,
0x7E,
0xFF,
0xFF,
0x7E,
0x7E,
0x18,
0x00,
0x07,
0x0F,
0x0F,
0x4E,
0xFE,
0x7E,
0x7E,
0x7E,
0x7E,
0x24,
0xE0,
0xF0,
0xF0,
0x72,
0x7F,
0x7E,
0x7E,
0x7E,
0x7E,
0x24,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
};
#endif /* FONT8X10_H_ */

View File

@ -41,7 +41,7 @@
#define PIOS_INCLUDE_FREERTOS #define PIOS_INCLUDE_FREERTOS
#define PIOS_INCLUDE_BL_HELPER #define PIOS_INCLUDE_BL_HELPER
#define PIOS_INCLUDE_GPIO //#define PIOS_INCLUDE_GPIO
#define PIOS_INCLUDE_EXTI #define PIOS_INCLUDE_EXTI
#define PIOS_INCLUDE_USB #define PIOS_INCLUDE_USB
#define PIOS_INCLUDE_USB_HID #define PIOS_INCLUDE_USB_HID

View File

@ -31,6 +31,9 @@
#include <manualcontrolsettings.h> #include <manualcontrolsettings.h>
#include <gcsreceiver.h> #include <gcsreceiver.h>
#include "board_hw_defs.c"
#define TxBufferSize3 33 #define TxBufferSize3 33
@ -46,228 +49,6 @@ uint8_t RxBuffer3[TxBufferSize3];
/**
* PIOS_Board_Init()
* initializes all the core subsystems on this specific hardware
* called from System/openpilot.c
*/
#if defined(PIOS_INCLUDE_RTC)
/*
* Realtime Clock (RTC)
*/
#include <pios_rtc_priv.h>
void PIOS_RTC_IRQ_Handler (void);
void RTC_WKUP_IRQHandler() __attribute__ ((alias ("PIOS_RTC_IRQ_Handler")));
static const struct pios_rtc_cfg pios_rtc_main_cfg = {
.clksrc = RCC_RTCCLKSource_HSE_Div8, // Divide 8 Mhz crystal down to 1
// For some reason it's acting like crystal is 16 Mhz. This clock is then divided
// by another 16 to give a nominal 62.5 khz clock
.prescaler = 100, // Every 100 cycles gives 625 Hz
.irq = {
.init = {
.NVIC_IRQChannel = RTC_WKUP_IRQn,
.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_MID,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
};
void PIOS_RTC_IRQ_Handler (void)
{
PIOS_RTC_irq_handler ();
}
#endif
#if defined(PIOS_INCLUDE_LED)
#include <pios_led_priv.h>
static const struct pios_led pios_leds[] = {
[PIOS_LED_HEARTBEAT] = {
.pin = {
.gpio = GPIOD,
.init = {
.GPIO_Pin = GPIO_Pin_13,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_OType = GPIO_OType_PP,
.GPIO_PuPd = GPIO_PuPd_UP
},
},
},
[PIOS_LED_ALARM] = {
.pin = {
.gpio = GPIOD,
.init = {
.GPIO_Pin = GPIO_Pin_12,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_OType = GPIO_OType_PP,
.GPIO_PuPd = GPIO_PuPd_UP
},
},
},
};
static const struct pios_led_cfg pios_led_cfg = {
.leds = pios_leds,
.num_leds = NELEMENTS(pios_leds),
};
#endif /* PIOS_INCLUDE_LED */
#if defined(PIOS_INCLUDE_GPS)
#include <pios_usart_priv.h>
#include <pios_com_priv.h>
/*
* GPS USART
*/
static const struct pios_usart_cfg pios_usart_gps_cfg = {
.regs = USART1,
.remap = GPIO_AF_USART1,
.init = {
.USART_BaudRate = 38400,
.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 = USART1_IRQn,
.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_LOW,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
.rx = {
.gpio = GPIOA,
.init = {
.GPIO_Pin = GPIO_Pin_10,
.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_9,
.GPIO_Speed = GPIO_Speed_2MHz,
.GPIO_Mode = GPIO_Mode_AF,
.GPIO_OType = GPIO_OType_PP,
.GPIO_PuPd = GPIO_PuPd_UP
},
},
};
#endif /* PIOS_INCLUDE_GPS */
#ifdef PIOS_INCLUDE_COM_AUX
/*
* AUX USART
*/
static const struct pios_usart_cfg pios_usart_aux_cfg = {
.regs = USART1,
.remap = GPIO_AF_USART1,
.init = {
.USART_BaudRate = 230400,
.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 = USART1_IRQn,
.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_MID,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
.rx = {
.gpio = GPIOA,
.init = {
.GPIO_Pin = GPIO_Pin_10,
.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_9,
.GPIO_Speed = GPIO_Speed_2MHz,
.GPIO_Mode = GPIO_Mode_AF,
.GPIO_OType = GPIO_OType_PP,
.GPIO_PuPd = GPIO_PuPd_UP
},
},
};
#endif /* PIOS_COM_AUX */
#ifdef PIOS_INCLUDE_COM_TELEM
/*
* Telemetry on main USART
*/
static const struct pios_usart_cfg pios_usart_telem_main_cfg = {
.regs = USART6,
.remap = GPIO_AF_USART6,
.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 = USART6_IRQn,
.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_MID,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
.rx = {
.gpio = GPIOC,
.init = {
.GPIO_Pin = GPIO_Pin_7,
.GPIO_Speed = GPIO_Speed_2MHz,
.GPIO_Mode = GPIO_Mode_AF,
.GPIO_OType = GPIO_OType_PP,
.GPIO_PuPd = GPIO_PuPd_UP
},
},
.tx = {
.gpio = GPIOC,
.init = {
.GPIO_Pin = GPIO_Pin_6,
.GPIO_Speed = GPIO_Speed_2MHz,
.GPIO_Mode = GPIO_Mode_AF,
.GPIO_OType = GPIO_OType_PP,
.GPIO_PuPd = GPIO_PuPd_UP
},
},
};
#endif /* PIOS_COM_TELEM */
#if defined(PIOS_INCLUDE_VIDEO) #if defined(PIOS_INCLUDE_VIDEO)
@ -866,65 +647,6 @@ void init_USART_dma()
} }
#if defined(PIOS_INCLUDE_USB)
#include "pios_usb_priv.h"
static const struct pios_usb_cfg pios_usb_main_cfg = {
.irq = {
.init = {
.NVIC_IRQChannel = OTG_FS_IRQn,
.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_LOW,
.NVIC_IRQChannelSubPriority = 3,
.NVIC_IRQChannelCmd = ENABLE,
},
},
.vsense = {
.gpio = GPIOD,
.init = {
.GPIO_Pin = GPIO_Pin_11,
.GPIO_Speed = GPIO_Speed_25MHz,
.GPIO_Mode = GPIO_Mode_IN,
.GPIO_OType = GPIO_OType_OD,
},
}
};
#include "pios_usb_board_data_priv.h"
#include "pios_usb_desc_hid_cdc_priv.h"
#include "pios_usb_desc_hid_only_priv.h"
#include "pios_usbhook.h"
#endif /* PIOS_INCLUDE_USB */
#if defined(PIOS_INCLUDE_COM_MSG)
#include <pios_com_msg_priv.h>
#endif /* PIOS_INCLUDE_COM_MSG */
#if defined(PIOS_INCLUDE_USB_HID)
#include <pios_usb_hid_priv.h>
const struct pios_usb_hid_cfg pios_usb_hid_cfg = {
.data_if = 0,
.data_rx_ep = 1,
.data_tx_ep = 1,
};
#endif /* PIOS_INCLUDE_USB_HID */
#if defined(PIOS_INCLUDE_USB_CDC)
#include <pios_usb_cdc_priv.h>
const struct pios_usb_cdc_cfg pios_usb_cdc_cfg = {
.ctrl_if = 1,
.ctrl_tx_ep = 2,
.data_if = 2,
.data_rx_ep = 3,
.data_tx_ep = 3,
};
#endif /* PIOS_INCLUDE_USB_CDC */
#define PIOS_COM_TELEM_RF_RX_BUF_LEN 512 #define PIOS_COM_TELEM_RF_RX_BUF_LEN 512
#define PIOS_COM_TELEM_RF_TX_BUF_LEN 512 #define PIOS_COM_TELEM_RF_TX_BUF_LEN 512
@ -940,6 +662,7 @@ uint32_t pios_com_aux_id;
uint32_t pios_com_gps_id; uint32_t pios_com_gps_id;
uint32_t pios_com_telem_usb_id; uint32_t pios_com_telem_usb_id;
uint32_t pios_com_telem_rf_id; uint32_t pios_com_telem_rf_id;
uint32_t pios_com_cotelem_id;
void PIOS_Board_Init(void) { void PIOS_Board_Init(void) {
@ -1166,6 +889,27 @@ void PIOS_Board_Init(void) {
#else #else
pios_com_telem_rf_id = 0; pios_com_telem_rf_id = 0;
#endif /* PIOS_INCLUDE_COM_TELEM */ #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 */ #endif /* PIOS_INCLUDE_COM */
/* /*
@ -1228,12 +972,12 @@ GPIO_InitTypeDef GPIO_InitStructure;
PIOS_DEBUG_Assert(0); PIOS_DEBUG_Assert(0);
}*/ }*/
init_USART_dma(); /*init_USART_dma();
initUSARTs(); initUSARTs();
extern t_fifo_buffer rx; extern t_fifo_buffer rx;
fifoBuf_init(&rx,RxBuffer3,sizeof(RxBuffer3)); 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); //uint8_t * rx_buffer = (uint8_t *) pvPortMalloc(PIOS_COM_HKOSD_RX_BUF_LEN);

View File

@ -134,6 +134,7 @@ TIM4 | STOPWATCH |
#define PIOS_LED_HEARTBEAT 0 #define PIOS_LED_HEARTBEAT 0
#define PIOS_LED_ALARM 1 #define PIOS_LED_ALARM 1
#if 0
#define PIOS_LED_LED1_GPIO_PORT GPIOD #define PIOS_LED_LED1_GPIO_PORT GPIOD
#define PIOS_LED_LED1_GPIO_PIN GPIO_Pin_13 //LD3 #define PIOS_LED_LED1_GPIO_PIN GPIO_Pin_13 //LD3
#define PIOS_LED_LED1_GPIO_CLK RCC_APB2Periph_GPIOD #define PIOS_LED_LED1_GPIO_CLK RCC_APB2Periph_GPIOD
@ -150,7 +151,7 @@ TIM4 | STOPWATCH |
#define PIOS_LED_PORTS { PIOS_LED_LED1_GPIO_PORT, PIOS_LED_LED2_GPIO_PORT, PIOS_LED_LED3_GPIO_PORT, PIOS_LED_LED4_GPIO_PORT } #define PIOS_LED_PORTS { PIOS_LED_LED1_GPIO_PORT, PIOS_LED_LED2_GPIO_PORT, PIOS_LED_LED3_GPIO_PORT, PIOS_LED_LED4_GPIO_PORT }
#define PIOS_LED_PINS { PIOS_LED_LED1_GPIO_PIN, PIOS_LED_LED2_GPIO_PIN, PIOS_LED_LED3_GPIO_PIN, PIOS_LED_LED4_GPIO_PIN } #define PIOS_LED_PINS { PIOS_LED_LED1_GPIO_PIN, PIOS_LED_LED2_GPIO_PIN, PIOS_LED_LED3_GPIO_PIN, PIOS_LED_LED4_GPIO_PIN }
#define PIOS_LED_CLKS { PIOS_LED_LED1_GPIO_CLK, PIOS_LED_LED2_GPIO_CLK, PIOS_LED_LED3_GPIO_CLK, PIOS_LED_LED4_GPIO_CLK } #define PIOS_LED_CLKS { PIOS_LED_LED1_GPIO_CLK, PIOS_LED_LED2_GPIO_CLK, PIOS_LED_LED3_GPIO_CLK, PIOS_LED_LED4_GPIO_CLK }
#endif
/*#define USB_LED_ON PIOS_LED_On(LED1) /*#define USB_LED_ON PIOS_LED_On(LED1)
#define USB_LED_OFF PIOS_LED_Off(LED1) #define USB_LED_OFF PIOS_LED_Off(LED1)
@ -197,15 +198,17 @@ extern uint32_t pios_spi_port_id;
// //
// See also pios_board.c // 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_telem_rf_id;
extern uint32_t pios_com_gps_id; extern uint32_t pios_com_gps_id;
extern uint32_t pios_com_aux_id; extern uint32_t pios_com_aux_id;
extern uint32_t pios_com_telem_usb_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_AUX (pios_com_aux_id)
#define PIOS_COM_GPS (pios_com_gps_id) #define PIOS_COM_GPS (pios_com_gps_id)
#define PIOS_COM_TELEM_USB (pios_com_telem_usb_id) #define PIOS_COM_TELEM_USB (pios_com_telem_usb_id)
#define PIOS_COM_TELEM_RF (pios_com_telem_rf_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 #define PIOS_COM_DEBUG PIOS_COM_AUX
@ -251,6 +254,7 @@ extern uint32_t pios_com_telem_usb_id;
{GPIOC, GPIO_Pin_1, ADC_Channel_11}, \ {GPIOC, GPIO_Pin_1, ADC_Channel_11}, \
{GPIOC, GPIO_Pin_2, ADC_Channel_12}, \ {GPIOC, GPIO_Pin_2, ADC_Channel_12}, \
{GPIOC, GPIO_Pin_3, ADC_Channel_13}, \ {GPIOC, GPIO_Pin_3, ADC_Channel_13}, \
{GPIOA, GPIO_Pin_7, ADC_Channel_7}, \
{NULL, 0, ADC_Channel_Vrefint}, /* Voltage reference */\ {NULL, 0, ADC_Channel_Vrefint}, /* Voltage reference */\
{NULL, 0, ADC_Channel_TempSensor} /* Temperature sensor */\ {NULL, 0, ADC_Channel_TempSensor} /* Temperature sensor */\
} }
@ -258,10 +262,12 @@ extern uint32_t pios_com_telem_usb_id;
/* we have to do all this to satisfy the PIOS_ADC_MAX_SAMPLES define in pios_adc.h */ /* we have to do all this to satisfy the PIOS_ADC_MAX_SAMPLES define in pios_adc.h */
/* which is annoying because this then determines the rate at which we generate buffer turnover events */ /* which is annoying because this then determines the rate at which we generate buffer turnover events */
/* the objective here is to get enough buffer space to support 100Hz averaging rate */ /* the objective here is to get enough buffer space to support 100Hz averaging rate */
#define PIOS_ADC_NUM_CHANNELS 6 #define PIOS_ADC_NUM_CHANNELS 7
#define PIOS_ADC_MAX_OVERSAMPLING 10 #define PIOS_ADC_MAX_OVERSAMPLING 10
#define PIOS_ADC_USE_ADC2 0 #define PIOS_ADC_USE_ADC2 0
#if 0
// ***************************************************************** // *****************************************************************
// GPIO output pins // GPIO output pins
@ -410,6 +416,8 @@ extern uint32_t pios_com_telem_usb_id;
#define RF_INT_PIN 5 #define RF_INT_PIN 5
#define RF_MISC_PIN 6 #define RF_MISC_PIN 6
#endif
// ***************************************************************** // *****************************************************************
// USB // USB
@ -424,6 +432,7 @@ extern uint32_t pios_com_telem_usb_id;
#endif #endif
#if 0
// ***************************************************************** // *****************************************************************
// VIDEO // VIDEO
#define PIOS_VIDEO_HSYNC_GPIO_PORT GPIOD #define PIOS_VIDEO_HSYNC_GPIO_PORT GPIOD
@ -448,7 +457,7 @@ extern uint32_t pios_com_telem_usb_id;
#define PIOS_VIDEO_VSYNC_EXTI_PIN_SOURCE EXTI_PinSource11 #define PIOS_VIDEO_VSYNC_EXTI_PIN_SOURCE EXTI_PinSource11
#define PIOS_VIDEO_VSYNC_IRQn EXTI15_10_IRQn #define PIOS_VIDEO_VSYNC_IRQn EXTI15_10_IRQn
#define PIOS_VIDEO_VSYNC_PRIO PIOS_IRQ_PRIO_HIGHEST #define PIOS_VIDEO_VSYNC_PRIO PIOS_IRQ_PRIO_HIGHEST
#endif
// ***************************************************************** // *****************************************************************
//-------------------------- //--------------------------

View File

@ -94,14 +94,14 @@ void PIOS_Hsync_ISR() {
asm("nop"); asm("nop");
}*/ }*/
//PIOS_DELAY_WaituS(5); // wait 5us to see if H or V sync //PIOS_DELAY_WaituS(5); // wait 5us to see if H or V sync
//if(dev_cfg->hsync_io.gpio->IDR & dev_cfg->hsync_io.init.GPIO_Pin) { if(dev_cfg->hsync->pin.gpio->IDR & dev_cfg->hsync->pin.init.GPIO_Pin) {
if(PIOS_VIDEO_HSYNC_GPIO_PORT->IDR & PIOS_VIDEO_HSYNC_GPIO_PIN) { //if(PIOS_VIDEO_HSYNC_GPIO_PORT->IDR & PIOS_VIDEO_HSYNC_GPIO_PIN) {
//rising //rising
//if (gActiveLine != 0) { //if (gActiveLine != 0) {
//PIOS_LED_On(LED2); //PIOS_LED_On(LED2);
if(gLineType == LINE_TYPE_GRAPHICS) if(gLineType == LINE_TYPE_GRAPHICS)
{ {
for(int g=0;g<110;g++) for(int g=0;g<90;g++)
{ {
asm("nop"); asm("nop");
} }

View File

@ -212,6 +212,54 @@ static const struct pios_usart_cfg pios_usart_telem_main_cfg = {
#endif /* PIOS_COM_TELEM */ #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) #if defined(PIOS_INCLUDE_COM)

View File

@ -35,6 +35,15 @@
#include "glu.h" #include "glu.h"
#endif #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) #if !defined(Q_OS_MAC)
// ARB_vertex_buffer_object // ARB_vertex_buffer_object
extern PFNGLBINDBUFFERARBPROC glBindBuffer; extern PFNGLBINDBUFFERARBPROC glBindBuffer;

View File

@ -30,6 +30,15 @@
#include "glu.h" #include "glu.h"
#endif #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> #include <QtDebug>
using namespace glc; using namespace glc;

View File

@ -0,0 +1,22 @@
<xml>
<object name="OsdSettings" singleinstance="true" settings="true">
<description>OSD settings used by the OSDgen module</description>
<field name="Attitude" units="" type="enum" elements="1" options="Disabled,Enabled" defaultvalue="Enabled"/>
<field name="AttitudeSetup" units="" type="int16" elements="2" elementnames="X,Y" defaultvalue="168,135"/>
<field name="Time" units="" type="enum" elements="1" options="Disabled,Enabled" defaultvalue="Enabled"/>
<field name="TimeSetup" units="" type="int16" elements="2" elementnames="X,Y" defaultvalue="10,250"/>
<field name="Battery" units="" type="enum" elements="1" options="Disabled,Enabled" defaultvalue="Enabled"/>
<field name="BatterySetup" units="" type="int16" elements="2" elementnames="X,Y" defaultvalue="316,210"/>
<field name="Speed" units="" type="enum" elements="1" options="Disabled,Enabled" defaultvalue="Enabled"/>
<field name="SpeedSetup" units="" type="int16" elements="2" elementnames="X,Y" defaultvalue="2,145"/>
<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,240"/>
<access gcs="readwrite" flight="readwrite"/>
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
<telemetryflight acked="true" updatemode="onchange" period="0"/>
<logging updatemode="never" period="0"/>
</object>
</xml>