Merge with latest 2.3

This commit is contained in:
Bertrand Songis
2019-12-13 12:30:02 +01:00
52 changed files with 10502 additions and 7011 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ set(VERSION_REVISION "0")
set(VERSION_SUFFIX $ENV{OPENTX_VERSION_SUFFIX})
set(VERSION_FAMILY ${VERSION_MAJOR}.${VERSION_MINOR})
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}${VERSION_SUFFIX})
set(SDCARD_REVISION "0024")
set(SDCARD_REVISION "0025")
set(SDCARD_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}V${SDCARD_REVISION})
cmake_minimum_required(VERSION 2.8)
+6
View File
@@ -1661,3 +1661,9 @@ NthWave Web Works
Simon Brenner
Joseph Litko
Bradley Murchie
William Cessna
Justin Farnsworth
James Snodgrass
Peter Schneider
Norman Schenck
Boris Hemmer
+4 -2
View File
@@ -123,7 +123,7 @@ configure_file(${COMPANION_SRC_DIRECTORY}/simulator.desktop.in ${CMAKE_CURRENT_B
### Generate .qm files and assemble resource (qrc) file.
# available Companion translations (src/translations/*.ts)
set(LANGUAGES cs de en es fi fr it pl sv zh_CN ja)
set(LANGUAGES cs de en es fi fr it pl ru sv zh_CN ja)
foreach(language ${LANGUAGES})
list(APPEND companion_TS translations/companion_${language}.ts)
endforeach(language)
@@ -341,7 +341,9 @@ endif()
# the current flavour is not automatically added if build in the current cmake iteration, so always
# add its library name to be sure
if(PCB STREQUAL X7 AND PCBREV STREQUAL T12)
if(PCB STREQUAL X7 AND PCBREV STREQUAL ACCESS)
set(FLAVOUR x7access)
elseif(PCB STREQUAL X7 AND PCBREV STREQUAL T12)
set(FLAVOUR t12)
elseif(PCB STREQUAL X9D+ AND PCBREV STREQUAL 2019)
set(FLAVOUR x9d+2019)
+5
View File
@@ -66,6 +66,7 @@ uint32_t Boards::getFourCC(Type board)
case BOARD_TARANIS_XLITES:
return 0x3B78746F;
case BOARD_TARANIS_X7:
case BOARD_TARANIS_X7_ACCESS:
return 0x3678746F;
case BOARD_TARANIS_X9E:
return 0x3578746F;
@@ -116,6 +117,7 @@ int Boards::getEEpromSize(Board::Type board)
case BOARD_TARANIS_XLITES:
case BOARD_TARANIS_XLITE:
case BOARD_TARANIS_X7:
case BOARD_TARANIS_X7_ACCESS:
case BOARD_TARANIS_X9LITE:
case BOARD_TARANIS_X9LITES:
case BOARD_TARANIS_X9D:
@@ -154,6 +156,7 @@ int Boards::getFlashSize(Type board)
case BOARD_TARANIS_XLITES:
case BOARD_TARANIS_XLITE:
case BOARD_TARANIS_X7:
case BOARD_TARANIS_X7_ACCESS:
case BOARD_TARANIS_X9LITE:
case BOARD_TARANIS_X9LITES:
case BOARD_TARANIS_X9D:
@@ -497,6 +500,8 @@ QString Boards::getBoardName(Board::Type board)
return "MEGA2560";
case BOARD_TARANIS_X7:
return "Taranis X7/X7S";
case BOARD_TARANIS_X7_ACCESS:
return "Taranis X7/X7S Access";
case BOARD_JUMPER_T12:
return "Jumper T12";
case BOARD_TARANIS_XLITE:
+8 -2
View File
@@ -40,6 +40,7 @@ namespace Board {
BOARD_9XRPRO,
BOARD_AR9X,
BOARD_TARANIS_X7,
BOARD_TARANIS_X7_ACCESS,
BOARD_TARANIS_X9D,
BOARD_TARANIS_X9DP,
BOARD_TARANIS_X9DP_2019,
@@ -241,7 +242,12 @@ inline bool IS_TARANIS_XLITES(Board::Type board)
inline bool IS_TARANIS_X7(Board::Type board)
{
return board == Board::BOARD_TARANIS_X7;
return board == Board::BOARD_TARANIS_X7 || board == Board::BOARD_TARANIS_X7_ACCESS;
}
inline bool IS_TARANIS_X7_ACCESS(Board::Type board)
{
return board == Board::BOARD_TARANIS_X7_ACCESS;
}
inline bool IS_TARANIS_X9LITE(Board::Type board)
@@ -321,7 +327,7 @@ inline bool HAS_EXTERNAL_ANTENNA(Board::Type board)
inline bool IS_ACCESS_RADIO(Board::Type board, QString &id)
{
return (IS_TARANIS_XLITES(board) || IS_TARANIS_X9LITE(board) || board == Board::BOARD_TARANIS_X9DP_2019 || board == Board::BOARD_X10_EXPRESS ||
return (IS_TARANIS_XLITES(board) || IS_TARANIS_X9LITE(board) || board == Board::BOARD_TARANIS_X9DP_2019 || board == Board::BOARD_X10_EXPRESS || IS_TARANIS_X7_ACCESS(board) ||
(IS_HORUS(board) && id.contains("internalaccess")));
}
@@ -80,6 +80,8 @@ const char * OpenTxEepromInterface::getName()
return "OpenTX for FrSky Taranis X9E";
case BOARD_TARANIS_X7:
return "OpenTX for FrSky Taranis X7";
case BOARD_TARANIS_X7_ACCESS:
return "OpenTX for FrSky Taranis X7 Access";
case BOARD_TARANIS_X9LITES:
return "OpenTX for FrSky Taranis X9-Lite S";
case BOARD_TARANIS_X9LITE:
@@ -330,6 +332,9 @@ int OpenTxEepromInterface::save(uint8_t * eeprom, const RadioData & radioData, u
else if (IS_TARANIS_X9LITE(board)) {
variant |= TARANIS_X9LITE_VARIANT;
}
else if (IS_TARANIS_X7_ACCESS(board)) {
variant |= TARANIS_X7_VARIANT;
}
else if (IS_TARANIS_X7(board)) {
variant |= TARANIS_X7_VARIANT;
}
@@ -1254,6 +1259,11 @@ void registerOpenTxFirmwares()
addOpenTxTaranisOptions(firmware);
registerOpenTxFirmware(firmware);
/* FrSky X7 Access board */
firmware = new OpenTxFirmware("opentx-x7access", Firmware::tr("FrSky Taranis X7 / X7S Access"), BOARD_TARANIS_X7_ACCESS);
addOpenTxTaranisOptions(firmware);
registerOpenTxFirmware(firmware);
/* FrSky X-Lite S/PRO board */
firmware = new OpenTxFirmware("opentx-xlites", Firmware::tr("FrSky Taranis X-Lite S/PRO"), BOARD_TARANIS_XLITES);
addOpenTxTaranisOptions(firmware);
+6 -7
View File
@@ -164,20 +164,19 @@ void DebugOutput::restoreState()
void DebugOutput::processBytesReceived()
{
static char buf[512];
static QByteArray text;
if (text.capacity() < 512)
text.reserve(512);
const QTextCursor savedCursor(ui->console->textCursor());
const int sbValue = ui->console->verticalScrollBar()->value();
const bool sbAtBottom = (sbValue == ui->console->verticalScrollBar()->maximum());
qint64 len;
QString text;
while (m_dataBufferDevice && m_dataBufferDevice->bytesAvailable() > 0) {
len = m_dataBufferDevice->read(buf, sizeof(buf));
if (len <= 0)
text = m_dataBufferDevice->read(qint64(text.capacity()));
if (text.isEmpty())
break;
text = QString::fromLocal8Bit(buf, len);
ui->console->moveCursor(QTextCursor::End);
ui->console->textCursor().insertText(text);
ui->console->textCursor().insertText(QString(text));
if (sbAtBottom) {
ui->console->moveCursor(QTextCursor::End);
ui->console->verticalScrollBar()->setValue(ui->console->verticalScrollBar()->maximum());
+89 -113
View File
@@ -31,38 +31,38 @@
FIFOBufferDevice::FIFOBufferDevice(QObject * parent) :
QBuffer(parent),
m_dataBufferMaxSize(20 * 1024),
m_hasOverflow(false)
{
setDataBufferMaxSize(20 * 1024);
}
qint64 FIFOBufferDevice::getDataBufferMaxSize() const
void FIFOBufferDevice::setDataBufferMaxSize(int size)
{
return m_dataBufferMaxSize;
}
void FIFOBufferDevice::setDataBufferMaxSize(qint64 size)
{
if (m_dataBufferMaxSize > size)
trimData(m_dataBufferMaxSize - size);
m_dataBufferMaxSize = size;
QWriteLocker locker(&m_dataRWLock);
if (buffer().capacity() > size) {
trimData(buffer().capacity() - size);
buffer().squeeze();
}
buffer().reserve(size);
}
// Remove data from beginning of storage array.
// NOT thread-safe, lock data before use (this avoids needing a recursive mutex)
qint64 FIFOBufferDevice::trimData(qint64 len)
int FIFOBufferDevice::trimData(int len)
{
if (!isWritable())
if (!isWritable() || len <= 0)
return 0;
qint64 count = 0;
if (len > 0) {
count = qMin(len, (qint64)buffer().size());
buffer().remove(0, count);
seek(0);
}
return count;
len = qMin(len, buffer().size());
buffer().remove(0, len);
QIODevice::seek(0);
return len;
}
int FIFOBufferDevice::nextLineLen() const
{
QReadLocker locker(&m_dataRWLock);
return buffer().indexOf('\n', 0) + 1;
}
qint64 FIFOBufferDevice::writeData(const char * data, qint64 len)
@@ -73,10 +73,10 @@ qint64 FIFOBufferDevice::writeData(const char * data, qint64 len)
QWriteLocker locker(&m_dataRWLock);
// Handle overflow
if (size() + len > m_dataBufferMaxSize) {
if (size() + len > getDataBufferMaxSize()) {
m_hasOverflow = true;
qint64 tlen = trimData(size() + len - m_dataBufferMaxSize);
emit bufferOverflow(tlen);
const int tlen = trimData(size() + len - getDataBufferMaxSize());
emit bufferOverflow(qint64(tlen));
}
else if (m_hasOverflow) {
m_hasOverflow = false;
@@ -84,65 +84,62 @@ qint64 FIFOBufferDevice::writeData(const char * data, qint64 len)
}
// Always write to end of stream.
if (!seek(size()))
if (!QIODevice::seek(size()))
return -1;
// Save the data
len = QBuffer::writeData(data, len);
// Make sure we're always ready for reading, this makes bytesAvailable() (et.al.) return correct result.
seek(0);
QIODevice::seek(0);
return len;
}
qint64 FIFOBufferDevice::readData(char * data, qint64 len)
{
if (!isReadable())
len = qMin(len, qint64(buffer().size()));
if (!isReadable() || len <= 0)
return 0;
// Do not block
if (m_dataRWLock.tryLockForRead()) {
// Always take data from top
if (seek(0)) {
len = QBuffer::readData(data, len);
trimData(len);
}
m_dataRWLock.unlock();
QWriteLocker locker(&m_dataRWLock);
// Always take data from top
if (QIODevice::seek(0)) {
memcpy(data, buffer().constData(), len);
buffer().remove(0, len);
}
else {
len = -1;
}
return len;
}
qint64 FIFOBufferDevice::readLine(char * data, qint64 maxSize)
{
m_dataRWLock.lockForRead();
qint64 len = buffer().indexOf('\n', 0);
m_dataRWLock.unlock();
if (maxSize < 2)
return -1;
if (len < 0 || maxSize <= 0)
int len = nextLineLen();
if (len <= 0)
return 0;
++len;
len = qMin(len, maxSize);
return readData(data, len);
len = qMin(len, int(maxSize));
return readData(data, qint64(len));
}
QByteArray FIFOBufferDevice::readLine(qint64 maxSize)
{
QByteArray ba;
m_dataRWLock.lockForRead();
qint64 len = buffer().indexOf('\n', 0);
m_dataRWLock.unlock();
if (maxSize < 0)
return QByteArray();
if (len < 0)
return ba;
int len = nextLineLen();
if (len <= 0)
return QByteArray();
++len;
if (maxSize > 0)
len = qMin(len, maxSize);
if (maxSize > 1)
len = qMin(len, int(maxSize - 1));
ba.fill(0, len);
len = readData(ba.data(), len);
QByteArray ba(len, 0);
len = int(readData(ba.data(), qint64(len)));
if (len < 0)
len = 0;
@@ -163,15 +160,12 @@ FilteredTextBuffer::FilteredTextBuffer(QObject * parent) :
FIFOBufferDevice(parent),
m_inBuffer(new FIFOBufferDevice(this)),
m_bufferFlushTimer(new QTimer(this)),
m_lineFilter(QRegularExpression()),
m_inBuffMaxSize(5 * 1024),
m_inBuffFlushTimeout(1500),
m_lineFilterEnable(false),
m_lineFilterExclusive(false)
{
m_bufferFlushTimer->setSingleShot(true);
setInputBufferMaxSize(m_inBuffMaxSize);
setInputBufferTimeout(m_inBuffFlushTimeout);
setInputBufferMaxSize(5 * 1024);
setInputBufferTimeout(1500);
connect(m_inBuffer, &FIFOBufferDevice::readyRead, this, &FilteredTextBuffer::processInputBuffer, Qt::QueuedConnection);
connect(m_inBuffer, &FIFOBufferDevice::bytesWritten, this, &FilteredTextBuffer::onInputBufferWrite, Qt::QueuedConnection);
@@ -186,44 +180,26 @@ FilteredTextBuffer::~FilteredTextBuffer()
if (m_bufferFlushTimer) {
disconnect(m_bufferFlushTimer, 0, this, 0);
disconnect(this, 0, m_bufferFlushTimer, 0);
m_bufferFlushTimer->deleteLater();
m_bufferFlushTimer = Q_NULLPTR;
}
if (m_inBuffer) {
closeInputBuffer();
disconnect(m_inBuffer, 0, this, 0);
m_inBuffer->deleteLater();
m_inBuffer = Q_NULLPTR;
}
}
qint64 FilteredTextBuffer::getInputBufferMaxSize() const
void FilteredTextBuffer::setInputBufferMaxSize(int size)
{
return m_inBuffMaxSize;
m_inBuffer->setDataBufferMaxSize(size);
}
quint32 FilteredTextBuffer::getInputBufferTimeout() const
void FilteredTextBuffer::setInputBufferTimeout(int ms)
{
return m_inBuffFlushTimeout;
}
void FilteredTextBuffer::setInputBufferMaxSize(qint64 size)
{
m_inBuffMaxSize = size;
if (m_inBuffer)
m_inBuffer->setDataBufferMaxSize(size);
}
void FilteredTextBuffer::setInputBufferTimeout(quint32 ms)
{
m_inBuffFlushTimeout = ms;
if (m_bufferFlushTimer)
m_bufferFlushTimer->setInterval(ms);
m_bufferFlushTimer->setInterval(ms);
}
void FilteredTextBuffer::setLineFilterExpr(const QRegularExpression & expr)
{
if (expr.isValid())
if (!expr.pattern().isEmpty() && expr.isValid())
m_lineFilter = expr;
else
setLineFilterEnabled(false);
@@ -231,7 +207,9 @@ void FilteredTextBuffer::setLineFilterExpr(const QRegularExpression & expr)
void FilteredTextBuffer::setLineFilterEnabled(bool enable)
{
if (!enable && m_lineFilterEnable)
if (enable && !m_inBuffer->isOpen())
openInputBuffer();
else if (!enable)
closeInputBuffer();
m_lineFilterEnable = enable;
@@ -251,7 +229,7 @@ void FilteredTextBuffer::setLineFilter(bool enable, bool exclusive, const QRegul
qint64 FilteredTextBuffer::writeDataSuper(const char * data, qint64 len)
{
if (len == -1)
if (len < 0)
len = qstrlen(data);
return FIFOBufferDevice::writeData(data, len);
@@ -259,17 +237,20 @@ qint64 FilteredTextBuffer::writeDataSuper(const char * data, qint64 len)
qint64 FilteredTextBuffer::writeData(const char * data, qint64 len)
{
if (!isWritable())
if (!isWritable() || len < 0)
return -1;
if (!len)
return 0;
const qint64 maxSz = qint64(getInputBufferMaxSize());
// if filter is disabled, invalid, or input buffer failure, write directly to output buffer
if (!m_lineFilterEnable || !m_inBuffer || len > m_inBuffMaxSize || (!m_inBuffer->isOpen() && !openInputBuffer()))
if (!m_inBuffer->isOpen() || len > maxSz)
return writeDataSuper(data, len);
// check for input buffer overflow
if (m_inBuffer->bytesAvailable() + len > m_inBuffMaxSize) {
if (m_inBuffer->bytesAvailable() + len > maxSz) {
flushInputBuffer();
onInputBufferOverflow(m_inBuffer->bytesAvailable() + len - m_inBuffMaxSize);
onInputBufferOverflow(m_inBuffer->bytesAvailable() + len - maxSz);
}
return m_inBuffer->write(data, len);
@@ -278,16 +259,15 @@ qint64 FilteredTextBuffer::writeData(const char * data, qint64 len)
void FilteredTextBuffer::flushInputBuffer()
{
emit timerStop();
if (m_inBuffer && m_inBuffer->bytesAvailable()) {
// qDebug() << "Flushing input buffer.";
writeDataSuper(m_inBuffer->readAll().constData());
if (m_inBuffer->bytesAvailable()) {
const QByteArray text = m_inBuffer->readAll();
writeDataSuper(text.constData(), qint64(text.size()));
}
}
void FilteredTextBuffer::closeInputBuffer()
{
if (!m_inBuffer || !m_inBuffer->isOpen())
if (!m_inBuffer->isOpen())
return;
flushInputBuffer();
@@ -296,37 +276,33 @@ void FilteredTextBuffer::closeInputBuffer()
bool FilteredTextBuffer::openInputBuffer()
{
if (m_inBuffer && m_inBuffer->isOpen())
if (m_inBuffer->isOpen())
closeInputBuffer();
return m_inBuffer->open(ReadWrite);
return m_inBuffer->open(ReadWrite | Text);
}
void FilteredTextBuffer::processInputBuffer()
{
if (m_lineFilterEnable && m_inBuffer && m_inBuffer->canReadLine()) {
emit timerStop();
while (m_inBuffer && m_inBuffer->canReadLine()) {
QByteArray text = m_inBuffer->readLine();
bool fltMatch = QString(text).contains(m_lineFilter);
// check line against filter
if ((m_lineFilterExclusive && !fltMatch) || (!m_lineFilterExclusive && fltMatch)) {
// Write line to output buffer
writeDataSuper(text.constData());
}
}
// restart timer if unread bytes still remain
if (m_inBuffer && m_inBuffer->bytesAvailable() > 0)
emit timerStart();
if (!m_lineFilterEnable) {
return closeInputBuffer();
}
else if (!m_lineFilterEnable || !m_inBuffer) {
closeInputBuffer();
else if (sender() == m_bufferFlushTimer) {
return flushInputBuffer();
}
else if (m_bufferFlushTimer && !m_bufferFlushTimer->remainingTime()) {
flushInputBuffer();
//qDebug() << "Input buffer timeout.";
emit timerStop();
while (m_lineFilterEnable && m_inBuffer->canReadLine()) {
const QByteArray text = m_inBuffer->readLine();
// If line matches inclusive filter or does not match exclusive filter, write it to output buffer.
if (!text.isEmpty() && m_lineFilterExclusive != QString(text).contains(m_lineFilter))
writeDataSuper(text.constData(), qint64(text.size()));
}
// restart timer if unread bytes still remain
if (m_inBuffer->bytesAvailable() > 0)
emit timerStart();
}
void FilteredTextBuffer::onInputBufferWrite(qint64)
{
emit timerStart();
+20 -17
View File
@@ -39,23 +39,28 @@ class FIFOBufferDevice : public QBuffer
public:
explicit FIFOBufferDevice(QObject * parent = Q_NULLPTR);
qint64 getDataBufferMaxSize() const;
void setDataBufferMaxSize(qint64 size);
//! @returns FIFO buffer limit in bytes.
inline int getDataBufferMaxSize() const { return buffer().capacity(); }
//! @param size in bytes.
void setDataBufferMaxSize(int size);
virtual inline qint64 bytesAvailable() const override { return size() || QIODevice::bytesAvailable(); }
virtual inline bool canReadLine() const override { return nextLineLen() > 0; }
// reimplemented from QIODevice for efficiency
qint64 readLine(char * data, qint64 maxSize);
QByteArray readLine(qint64 maxSize = 0);
signals:
void bufferOverflow(qint64 len); // len is overflow size, <= 0 means overflow has cleared
//! @param len is overflow size, <= 0 means overflow has cleared
void bufferOverflow(qint64 len);
protected:
qint64 trimData(qint64 len);
virtual qint64 writeData(const char * data, qint64 len);
virtual qint64 readData(char * data, qint64 len);
int trimData(int len);
int nextLineLen() const;
virtual qint64 writeData(const char * data, qint64 len) override;
virtual qint64 readData(char * data, qint64 len) override;
QReadWriteLock m_dataRWLock;
qint64 m_dataBufferMaxSize; // [bytes] output buffer limit (FIFO).
mutable QReadWriteLock m_dataRWLock;
bool m_hasOverflow;
};
@@ -77,14 +82,14 @@ class FilteredTextBuffer : public FIFOBufferDevice
explicit FilteredTextBuffer(QObject * parent = Q_NULLPTR);
~FilteredTextBuffer();
qint64 getInputBufferMaxSize() const;
quint32 getInputBufferTimeout() const;
inline int getInputBufferMaxSize() const { return m_inBuffer->getDataBufferMaxSize(); }
inline int getInputBufferTimeout() const { return m_bufferFlushTimer->interval(); }
public slots:
// input buffer will be flushed if grows > size bytes.
void setInputBufferMaxSize(qint64 size);
// how often to flush the input buffer when less than whole lines are present.
void setInputBufferTimeout(quint32 ms);
//! @param size in bytes. Input buffer will be flushed if grows over this size.
void setInputBufferMaxSize(int size);
//! @param ms how often to flush the input buffer when less than whole lines are present.
void setInputBufferTimeout(int ms);
void setLineFilterExpr(const QRegularExpression & expr);
void setLineFilterEnabled(bool enable);
void setLineFilterExclusive(bool exclusive);
@@ -97,7 +102,7 @@ class FilteredTextBuffer : public FIFOBufferDevice
protected:
qint64 writeDataSuper(const char * data, qint64 len = -1);
virtual qint64 writeData(const char * data, qint64 len);
virtual qint64 writeData(const char * data, qint64 len) override;
void flushInputBuffer();
void closeInputBuffer();
bool openInputBuffer();
@@ -108,8 +113,6 @@ class FilteredTextBuffer : public FIFOBufferDevice
FIFOBufferDevice * m_inBuffer;
QTimer * m_bufferFlushTimer;
QRegularExpression m_lineFilter;
qint64 m_inBuffMaxSize; // [bytes]
quint32 m_inBuffFlushTimeout; // [ms]
bool m_lineFilterEnable;
bool m_lineFilterExclusive;
};
@@ -64,6 +64,7 @@ SimulatorWidget::SimulatorWidget(QWidget * parent, SimulatorInterface * simulato
radioUiWidget = new SimulatedUIWidgetX9LITE(simulator, this);
break;
case Board::BOARD_TARANIS_X7:
case Board::BOARD_TARANIS_X7_ACCESS:
radioUiWidget = new SimulatedUIWidgetX7(simulator, this);
break;
case Board::BOARD_TARANIS_X9D:
+1 -1
View File
@@ -45,7 +45,7 @@ QStringList const Translations::getAvailableTranslations()
//<< "nl_NL"
<< "pl_PL"
//<< "pt_PT"
//<< "ru_RU"
<< "ru_RU"
<< "sv_SE"
<< "zh_CN"
<< "ja_JP" ;
File diff suppressed because it is too large Load Diff
+330 -280
View File
@@ -16,37 +16,59 @@
---- # #
---- #########################################################################
local shadowed = 0
local options = {
local _options = {
{ "Sensor", SOURCE, 0 },
{ "Color", COLOR, WHITE },
{ "Shadow", BOOL, 0 },
{ "LowestCell", BOOL, 0 }
{ "LowestCell", BOOL, 1 }
}
-- This function is runned once at the creation of the widget
-- This function is run once at the creation of the widget
local function create(zone, options)
local myZone = { zone=zone, options=options, counter=0 }
histCellData = {}
local wgt = {
zone = zone,
options = options,
counter = 0,
-- use default if user did not set, So widget is operational when selecting the widget
if myZone.options.Sensor == 0 then
myZone.options.Sensor = "Cels"
shadowed = 0,
no_telem_blink = 0,
isDataAvailable = 0,
cellDataLive = {0,0,0,0,0,0},
cellDataHistoryLowest = {0,0,0,0,0,0},
cellDataHistoryCellLowest = 5,
cellMax = 0,
cellMin = 0,
cellAvg = 0,
cellPercent = 0,
cellCount = 0,
cellSum = 0,
mainValue = 0,
secondaryValue = 0
}
-- use default if user did not set, So widget is operational on "select widget"
if wgt.options.Sensor == 0 then
wgt.options.Sensor = "Cels"
end
return myZone
wgt.options.LowestCell = wgt.options.LowestCell % 2 -- modulo due to bug that cause the value to be other than 0|1
return wgt
end
-- This function allow updates when you change widgets settings
local function update(myZone, options)
myZone.options = options
local function update(wgt, options)
if (wgt == nil) then return end
-- use default if user did not set, So widget is operational when selecting the widget
if myZone.options.Sensor == 0 then
myZone.options.Sensor = "Cels"
wgt.options = options
-- use default if user did not set, So widget is operational on "select widget"
if wgt.options.Sensor == 0 then
wgt.options.Sensor = "Cels"
end
wgt.options.LowestCell = wgt.options.LowestCell % 2 -- modulo due to bug that cause the value to be other than 0|1
end
-- A quick and dirty check for empty table
@@ -57,345 +79,373 @@ local function isEmpty(self)
return true
end
--- This function returns a table with cels values
local function getCels(sensor)
liveCellData = getValue(sensor)
if type(liveCellData) == "table" then
-- initialize historical table if not done yet
if isEmpty(histCellData) then
for k, v in pairs(liveCellData) do
histCellData[k] = v
end
end
-- this is necessary for simu where cellcount can change
if #histCellData ~= #liveCellData then
for k, v in pairs(liveCellData) do
histCellData[k] = v
end
end
-- stores the lowest cell values in historical table
for k, v in pairs(liveCellData) do
if v < histCellData[k] then histCellData[k] = v end
end
else
-- erase low cell memory when you change lipo
histCellData = {}
end
return liveCellData
end
--- This function returns the number of cels
local function getCellCount(cellData)
return #cellData
end
--- This function returns the value of the highest of all cels
local function getCellMax(cellData)
cellMax = 0
if type(cellData) == "table" then
for k, v in pairs(cellData) do
if v > cellMax then cellMax = v end
end
end
return cellMax
end
--- This function returns the value of the lowest of all cels
local function getCellMin(cellData)
cellMin = 5
if type(cellData) == "table" then
for k, v in pairs(cellData) do
if v < cellMin then cellMin = v end
end
end
return cellMin
end
--- This function return the percentage remaining in a single Lipo cel
local function getCellPercent(cellValue)
if cellValue == nil then
return 0
end
--## Data gathered from commercial lipo sensors
local myArrayPercentList =
{{3, 0}, {3.093, 1}, {3.196, 2}, {3.301, 3}, {3.401, 4}, {3.477, 5}, {3.544, 6}, {3.601, 7}, {3.637, 8}, {3.664, 9}, {3.679, 10}, {3.683, 11}, {3.689, 12}, {3.692, 13}, {3.705, 14}, {3.71, 15}, {3.713, 16}, {3.715, 17}, {3.72, 18}, {3.731, 19}, {3.735, 20}, {3.744, 21}, {3.753, 22}, {3.756, 23}, {3.758, 24}, {3.762, 25}, {3.767, 26}, {3.774, 27}, {3.78, 28}, {3.783, 29}, {3.786, 30}, {3.789, 31}, {3.794, 32}, {3.797, 33}, {3.8, 34}, {3.802, 35}, {3.805, 36}, {3.808, 37}, {3.811, 38}, {3.815, 39}, {3.818, 40}, {3.822, 41}, {3.825, 42}, {3.829, 43}, {3.833, 44}, {3.836, 45}, {3.84, 46}, {3.843, 47}, {3.847, 48}, {3.85, 49}, {3.854, 50}, {3.857, 51}, {3.86, 52}, {3.863, 53}, {3.866, 54}, {3.87, 55}, {3.874, 56}, {3.879, 57}, {3.888, 58}, {3.893, 59}, {3.897, 60}, {3.902, 61}, {3.906, 62}, {3.911, 63}, {3.918, 64}, {3.923, 65}, {3.928, 66}, {3.939, 67}, {3.943, 68}, {3.949, 69}, {3.955, 70}, {3.961, 71}, {3.968, 72}, {3.974, 73}, {3.981, 74}, {3.987, 75}, {3.994, 76}, {4.001, 77}, {4.007, 78}, {4.014, 79}, {4.021, 80}, {4.029, 81}, {4.036, 82}, {4.044, 83}, {4.052, 84}, {4.062, 85}, {4.074, 86}, {4.085, 87}, {4.095, 88}, {4.105, 89}, {4.111, 90}, {4.116, 91}, {4.12, 92}, {4.125, 93}, {4.129, 94}, {4.135, 95}, {4.145, 96}, {4.176, 97}, {4.179, 98}, {4.193, 99}, {4.2, 100}}
for i, v in ipairs( myArrayPercentList ) do
if v[ 1 ] >= cellValue then
result = v[ 2 ]
-- in case somehow voltage is higher, don't return nil
if (cellValue > 4.2) then
return 100
end
-- Data gathered from commercial lipo sensors
local myArrayPercentList = { {3,0},{3.093,1},{3.196,2},{3.301,3},{3.401,4},{3.477,5},{3.544,6},{3.601,7},{3.637,8},{3.664,9},{3.679,10},{3.683,11},{3.689,12},{3.692,13},{3.705,14},{3.71,15},{3.713,16},{3.715,17},{3.72,18},{3.731,19},{3.735,20},{3.744,21},{3.753,22},{3.756,23},{3.758,24},{3.762,25},{3.767,26},{3.774,27},{3.78,28},{3.783,29},{3.786,30},{3.789,31},{3.794,32},{3.797,33},{3.8,34},{3.802,35},{3.805,36},{3.808,37},{3.811,38},{3.815,39},{3.818,40},{3.822,41},{3.825,42},{3.829,43},{3.833,44},{3.836,45},{3.84,46},{3.843,47},{3.847,48},{3.85,49},{3.854,50},{3.857,51},{3.86,52},{3.863,53},{3.866,54},{3.87,55},{3.874,56},{3.879,57},{3.888,58},{3.893,59},{3.897,60},{3.902,61},{3.906,62},{3.911,63},{3.918,64},{3.923,65},{3.928,66},{3.939,67},{3.943,68},{3.949,69},{3.955,70},{3.961,71},{3.968,72},{3.974,73},{3.981,74},{3.987,75},{3.994,76},{4.001,77},{4.007,78},{4.014,79},{4.021,80},{4.029,81},{4.036,82},{4.044,83},{4.052,84},{4.062,85},{4.074,86},{4.085,87},{4.095,88},{4.105,89},{4.111,90},{4.116,91},{4.12,92},{4.125,93},{4.129,94},{4.135,95},{4.145,96},{4.176,97},{4.179,98},{4.193,99},{4.2,100} }
for i, v in ipairs(myArrayPercentList) do
if v[1] >= cellValue then
result = v[2]
break
end
end
end
return result
end
--- This function parse each individual cell and return the sum of all cels
local function getCellSum(cellData)
cellSum = 0
if type(cellData) == "table" then
for k, v in pairs(cellData) do cellSum = cellSum + v end
--- This function returns a table with cels values
local function calculateBatteryData(wgt)
local newCellData = getValue(wgt.options.Sensor)
if type(newCellData) ~= "table" then
wgt.isDataAvailable = false
return
end
return cellSum
-- this is necessary for simu where cell-count can change
if #wgt.cellDataHistoryLowest ~= #newCellData then
wgt.cellDataHistoryLowest = {}
for k, v in pairs(newCellData) do
wgt.cellDataHistoryLowest[k] = v
end
end
-- stores the lowest cell values in historical table
for k, v in pairs(newCellData) do
if v < wgt.cellDataHistoryLowest[k] then
wgt.cellDataHistoryLowest[k] = v
end
end
--- calc highest of all cels
local cellMax = 0
for k, v in pairs(newCellData) do
if v > cellMax then
cellMax = v
end
end
wgt.cellMax = cellMax
--- calc lowest of all cels
local cellMin = 5
for k, v in pairs(newCellData) do
if v < cellMin and v > 1 then -- >1 to ignore invalid values
cellMin = v
end
end
wgt.cellMin = cellMin
--- calc history lowest of all cells
if cellMin < wgt.cellDataHistoryCellLowest and cellMin > 1 then -- >1 to ignore invalid values
wgt.cellDataHistoryCellLowest = cellMin
end
wgt.cellCount = #newCellData
--- sum of all cells
local cellSum = 0
for k, v in pairs(newCellData) do
cellSum = cellSum + v
end
wgt.cellSum = cellSum
--- average of all cells
wgt.cellAvg = wgt.cellSum / wgt.cellCount
wgt.cellPercent = getCellPercent(wgt.cellMin)
wgt.cellDataLive = newCellData
-- mainValue
if wgt.options.LowestCell == 1 then
wgt.mainValue = wgt.cellMin
elseif wgt.options.LowestCell == 0 then
wgt.mainValue = wgt.cellSum
else
wgt.mainValue = "-1"
end
-- secondaryValue
if wgt.options.LowestCell == 1 then
wgt.secondaryValue = wgt.cellSum
elseif wgt.options.LowestCell == 0 then
wgt.secondaryValue = wgt.cellMin
else
wgt.secondaryValue = "-2"
end
wgt.isDataAvailable = true
end
--- This function returns the average of all cels
local function getCellAvg(cellData)
if type(cellData) == "table" then
return getCellSum(cellData)/getCellCount(cellData)
end
end
-- This function returns green at 100%, red bellow 30% and graduate in between
-- color for battery
local function getPercentColor(cpercent)
if cpercent < 30 then
-- This function returns green at 100%, red bellow 30% and graduate in between
local function getPercentColor(percent)
if percent < 30 then
return lcd.RGB(0xff, 0, 0)
else
g = math.floor(0xdf * cpercent / 100)
g = math.floor(0xdf * percent / 100)
r = 0xdf - g
return lcd.RGB(r, g, 0)
end
end
-- This function returns green at gvalue, red at rvalue and graduate in between
-- color for cell
local function getRangeColor(value, gvalue, rvalue)
if gvalue > rvalue and not range==0 then
range = gvalue - rvalue
if value > gvalue then return lcd.RGB(0, 0xdf, 0) end
if value < rvalue then return lcd.RGB(0xdf, 0, 0) end
g = math.floor(0xdf * (value-rvalue) / range)
-- This function returns green at gvalue, red at rvalue and graduate in between
local function getRangeColor(value, green_value, red_value)
local range = math.abs(green_value - red_value)
if range==0 then return lcd.RGB(0, 0xdf, 0) end
if green_value > red_value then
if value > green_value then return lcd.RGB(0, 0xdf, 0) end
if value < red_value then return lcd.RGB(0xdf, 0, 0) end
g = math.floor(0xdf * (value - red_value) / range)
r = 0xdf - g
return lcd.RGB(r, g, 0)
else
range = rvalue - gvalue
if value > gvalue then return lcd.RGB(0, 0xdf, 0) end
if value < rvalue then return lcd.RGB(0xdf, 0, 0) end
r = math.floor(0xdf * (value-gvalue) / range)
if value > green_value then return lcd.RGB(0, 0xdf, 0) end
if value < red_value then return lcd.RGB(0xdf, 0, 0) end
r = math.floor(0xdf * (value - green_value) / range)
g = 0xdf - r
return lcd.RGB(r, g, 0)
end
end
local function getMainValue(mySensor, options)
if options.LowestCell == 1 then
return getCellMin(mySensor)
else
return getCellSum(mySensor)
end
--- Zone size: 70x39 1/8th top bar
local function refreshZoneTiny(wgt)
local myString = string.format("%2.1fV", wgt.mainValue)
lcd.drawText(wgt.zone.x + wgt.zone.w -25, wgt.zone.y + 5, wgt.cellPercent .. "%", RIGHT + SMLSIZE + CUSTOM_COLOR + wgt.no_telem_blink)
lcd.drawText(wgt.zone.x + wgt.zone.w -25, wgt.zone.y + 20, myString, RIGHT + SMLSIZE + CUSTOM_COLOR + wgt.no_telem_blink)
-- draw batt
lcd.drawRectangle(wgt.zone.x + 50, wgt.zone.y + 9, 16, 25, CUSTOM_COLOR, 2)
lcd.drawFilledRectangle(wgt.zone.x +50 + 4, wgt.zone.y + 7, 6, 3, CUSTOM_COLOR)
local rect_h = math.floor(25 * wgt.cellPercent / 100)
lcd.drawFilledRectangle(wgt.zone.x +50, wgt.zone.y + 9 + 25 - rect_h, 16, rect_h, CUSTOM_COLOR + wgt.no_telem_blink)
end
local function getSecondaryValue(mySensor, options)
if options.LowestCell == 1 then
return getCellSum(mySensor)
else
return getCellMin(mySensor)
end
end
-- This size is for top bar widgets
local function refreshZoneTiny(zone)
local mySensor = getCels(zone.options.Sensor)
local isHaveData = (type(mySensor) == "table")
if isHaveData then
local myString = string.format("%2.1fV", getMainValue(mySensor, zone.options))
local percent = getCellPercent(getCellAvg(mySensor))
lcd.drawText(zone.zone.x + zone.zone.w, zone.zone.y, percent.."%", RIGHT + SMLSIZE + CUSTOM_COLOR)
lcd.drawText(zone.zone.x + zone.zone.w, zone.zone.y + 15, myString, RIGHT + SMLSIZE + CUSTOM_COLOR)
-- draw batt
lcd.drawRectangle(zone.zone.x, zone.zone.y + 6, 16, 25, CUSTOM_COLOR, 2)
lcd.drawFilledRectangle(zone.zone.x + 4, zone.zone.y + 4, 6, 3, CUSTOM_COLOR)
local rect_h = math.floor(25 * percent / 100)
lcd.drawFilledRectangle(zone.zone.x, zone.zone.y + 6 + 25 - rect_h , 16, rect_h, CUSTOM_COLOR)
end
end
--- Size is 160x32 1/8th
local function refreshZoneSmall(zone)
local myBatt = {["x"]=0, ["y"]=0, ["w"]=155, ["h"]=35, ["segments_w"]=25, ["color"]=WHITE, ["cath_w"]=6, ["cath_h"]=20}
local mySensor = getCels(zone.options.Sensor)
local isDataAvailable = (type(mySensor) == "table")
local percent = getCellPercent(getCellAvg(mySensor))
--- Zone size: 160x32 1/8th
local function refreshZoneSmall(wgt)
local myBatt = { ["x"] = 0, ["y"] = 0, ["w"] = 155, ["h"] = 35, ["segments_w"] = 25, ["color"] = WHITE, ["cath_w"] = 6, ["cath_h"] = 20 }
-- draws bat
lcd.setColor(CUSTOM_COLOR, WHITE)
lcd.drawRectangle(zone.zone.x + myBatt.x, zone.zone.y + myBatt.y, myBatt.w, myBatt.h, CUSTOM_COLOR, 2)
lcd.drawFilledRectangle(zone.zone.x + myBatt.x + myBatt.w, zone.zone.y + myBatt.h/2 - myBatt.cath_h/2, myBatt.cath_w, myBatt.cath_h, CUSTOM_COLOR)
lcd.drawRectangle(wgt.zone.x + myBatt.x, wgt.zone.y + myBatt.y, myBatt.w, myBatt.h, CUSTOM_COLOR, 2)
-- fill batt
lcd.setColor(CUSTOM_COLOR, getPercentColor(wgt.cellPercent))
lcd.drawGauge(wgt.zone.x + 2, wgt.zone.y + 2, myBatt.w - 4, wgt.zone.h, wgt.cellPercent, 100, CUSTOM_COLOR)
-- fils batt
lcd.setColor(CUSTOM_COLOR, getPercentColor(percent))
lcd.drawGauge(zone.zone.x+2, zone.zone.y+2, myBatt.w-4, zone.zone.h, percent, 100, CUSTOM_COLOR)
-- write text
if isDataAvailable then
lcd.setColor(CUSTOM_COLOR, zone.options.Color)
local topLine = string.format("%2.1fV %2.0f%%", getMainValue(mySensor, zone.options), percent)
lcd.drawText(zone.zone.x + 20, zone.zone.y +2, topLine , MIDSIZE + CUSTOM_COLOR + shadowed)
if wgt.isDataAvailable then
lcd.setColor(CUSTOM_COLOR, wgt.options.Color)
else
lcd.drawText(zone.zone.x + 10, zone.zone.y+10, "No Cells Data", LEFT + SMLSIZE + INVERS + CUSTOM_COLOR + shadowed)
lcd.setColor(CUSTOM_COLOR, GREY)
end
local topLine = string.format("%2.1fV %2.0f%%", wgt.mainValue, wgt.cellPercent)
lcd.drawText(wgt.zone.x + 20, wgt.zone.y + 2, topLine, MIDSIZE + CUSTOM_COLOR + wgt.shadowed + wgt.no_telem_blink)
return
end
--- Size is 225x98 1/4th (no sliders/trim)
local function refreshZoneMedium(zone)
local myBatt = {["x"]=0, ["y"]=0, ["w"]=85, ["h"]=35, ["segments_w"]=15, ["color"]=WHITE, ["cath_w"]=6, ["cath_h"]=20}
local mySensor = getCels(zone.options.Sensor)
local isDataAvailable = (type(mySensor) == "table")
--- Zone size: 180x70 1/4th (with sliders/trim)
--- Zone size: 225x98 1/4th (no sliders/trim)
local function refreshZoneMedium(wgt)
local myBatt = { ["x"] = 0, ["y"] = 0, ["w"] = 85, ["h"] = 35, ["segments_w"] = 15, ["color"] = WHITE, ["cath_w"] = 6, ["cath_h"] = 20 }
lcd.setColor(CUSTOM_COLOR, zone.options.Color)
if isDataAvailable then
-- draw values
local percent = getCellPercent(getCellAvg(mySensor))
lcd.drawText(zone.zone.x + zone.zone.w, zone.zone.y, string.format("%2.1fV", getMainValue(mySensor, zone.options)) , DBLSIZE + CUSTOM_COLOR + RIGHT+ shadowed)
-- fils batt
lcd.setColor(CUSTOM_COLOR, getPercentColor(percent))
lcd.drawGauge(zone.zone.x + myBatt.x, zone.zone.y + myBatt.y, myBatt.w, myBatt.h, percent, 100, CUSTOM_COLOR)
-- draw cells
local pos = {{x=2, y=38}, {x=60, y=38}, {x=118, y=38}, {x=2, y=57}, {x=60, y=57}, {x=118, y=57}}
for i=1, getCellCount(mySensor), 1 do
lcd.setColor(CUSTOM_COLOR, getRangeColor(mySensor[i], getCellMax(mySensor), getCellMax(mySensor) - 0.2))
lcd.drawFilledRectangle(zone.zone.x + pos[i].x, zone.zone.y + pos[i].y, 58, 20, CUSTOM_COLOR)
lcd.setColor(CUSTOM_COLOR, WHITE)
lcd.drawText(zone.zone.x + pos[i].x+10, zone.zone.y + pos[i].y, string.format("%.2f", mySensor[i]), CUSTOM_COLOR + shadowed)
lcd.drawRectangle(zone.zone.x + pos[i].x, zone.zone.y + pos[i].y, 59, 20, CUSTOM_COLOR,1)
end
if wgt.isDataAvailable then
lcd.setColor(CUSTOM_COLOR, wgt.options.Color)
else
lcd.drawText(zone.zone.x, zone.zone.y+35, "No Cells Data", LEFT + SMLSIZE + INVERS + CUSTOM_COLOR)
lcd.setColor(CUSTOM_COLOR, GREY)
end
-- draw values
lcd.drawText(wgt.zone.x, wgt.zone.y + 35, string.format("%2.1fV", wgt.mainValue), DBLSIZE + CUSTOM_COLOR + wgt.shadowed + wgt.no_telem_blink)
-- more info if 1/4 is high enough (without trim & slider)
if wgt.zone.h > 80 then
lcd.drawText(wgt.zone.x , wgt.zone.y + 70, string.format("%2.2fV" , wgt.secondaryValue), SMLSIZE + CUSTOM_COLOR + wgt.no_telem_blink)
lcd.drawText(wgt.zone.x + 50, wgt.zone.y + 70, string.format("dV %2.2fV", wgt.cellMax - wgt.cellMin), SMLSIZE + CUSTOM_COLOR + wgt.no_telem_blink)
lcd.drawText(wgt.zone.x , wgt.zone.y + 84, string.format("Min %2.2fV", wgt.cellDataHistoryCellLowest), SMLSIZE + CUSTOM_COLOR + wgt.no_telem_blink)
end
-- fill batt
lcd.setColor(CUSTOM_COLOR, getPercentColor(wgt.cellPercent))
lcd.drawGauge(wgt.zone.x + myBatt.x, wgt.zone.y + myBatt.y, myBatt.w, myBatt.h, wgt.cellPercent, 100, CUSTOM_COLOR)
-- draw cells
local cellH = wgt.zone.h / wgt.cellCount
if cellH > 20 then cellH =20 end
local cellX = 118
local cellW = 58
for i = 1, wgt.cellCount, 1 do
local cellY = wgt.zone.y + (i-1)* (cellH -1)
-- fill current value
lcd.setColor(CUSTOM_COLOR, getRangeColor(wgt.cellDataLive[i], wgt.cellMax, wgt.cellMax - 0.2))
--lcd.drawFilledRectangle(wgt.zone.x + cellX , cellY, 58, cellH, CUSTOM_COLOR)
local percentCurrent = getCellPercent(wgt.cellDataLive[i])
local percentMin = getCellPercent(wgt.cellDataHistoryLowest[i])
lcd.drawFilledRectangle(wgt.zone.x + cellX , cellY, cellW * percentCurrent / 100, cellH, CUSTOM_COLOR)
-- fill min
lcd.setColor(CUSTOM_COLOR, getRangeColor(wgt.cellDataHistoryLowest[i], wgt.cellMax, wgt.cellMax - 0.2))
lcd.drawFilledRectangle(wgt.zone.x + cellX + ((percentCurrent - percentMin) / 100) , cellY, cellW - (cellW * (percentCurrent - percentMin) / 100), cellH, CUSTOM_COLOR)
lcd.setColor(CUSTOM_COLOR, WHITE)
lcd.drawText (wgt.zone.x + cellX + 10, cellY, string.format("%.2f", wgt.cellDataLive[i]), SMLSIZE + CUSTOM_COLOR + wgt.shadowed + wgt.no_telem_blink)
lcd.drawRectangle (wgt.zone.x + cellX , cellY, 59, cellH, CUSTOM_COLOR , 1)
end
-- draws bat
lcd.setColor(CUSTOM_COLOR, WHITE)
lcd.drawRectangle(zone.zone.x + myBatt.x , zone.zone.y + myBatt.y, myBatt.w, myBatt.h, CUSTOM_COLOR, 2)
lcd.drawFilledRectangle(zone.zone.x + myBatt.x + myBatt.w, zone.zone.y + myBatt.h/2 - myBatt.cath_h/2, myBatt.cath_w, myBatt.cath_h, CUSTOM_COLOR)
lcd.drawText(zone.zone.x + myBatt.x + 20 , zone.zone.y + myBatt.y + 5, string.format("%2.0f%%", getCellPercent(getCellAvg(mySensor))), LEFT + MIDSIZE + CUSTOM_COLOR + shadowed)
--for i=1, myBatt.w - myBatt.segments_w, myBatt.segments_w do
-- lcd.drawRectangle(zone.zone.x + myBatt.x + i, zone.zone.y + myBatt.y, myBatt.segments_w, myBatt.h, CUSTOM_COLOR, 1)
--end
return
lcd.drawRectangle(wgt.zone.x + myBatt.x, wgt.zone.y + myBatt.y, myBatt.w, myBatt.h, CUSTOM_COLOR, 2)
lcd.drawFilledRectangle(wgt.zone.x + myBatt.x + myBatt.w, wgt.zone.y + myBatt.h / 2 - myBatt.cath_h / 2, myBatt.cath_w, myBatt.cath_h, CUSTOM_COLOR)
lcd.drawText(wgt.zone.x + myBatt.x + 20, wgt.zone.y + myBatt.y + 5, string.format("%2.0f%%", wgt.cellPercent), LEFT + MIDSIZE + CUSTOM_COLOR + wgt.shadowed)
end
--- Size is 192x152 1/2
local function refreshZoneLarge(zone)
local myBatt = {["x"]=0, ["y"]=18, ["w"]=76, ["h"]=121, ["segments_h"]=30, ["color"]=WHITE, ["cath_w"]=30, ["cath_h"]=10}
local mySensor = getCels(zone.options.Sensor)
local isDataAvailable = (type(mySensor) == "table")
--- Zone size: 192x152 1/2
local function refreshZoneLarge(wgt)
local myBatt = { ["x"] = 0, ["y"] = 18, ["w"] = 76, ["h"] = 121, ["segments_h"] = 30, ["color"] = WHITE, ["cath_w"] = 30, ["cath_h"] = 10 }
lcd.setColor(CUSTOM_COLOR, zone.options.Color)
if isDataAvailable then
local percent = getCellPercent(getCellAvg(mySensor))
lcd.drawText(zone.zone.x+zone.zone.w, zone.zone.y, percent.."%", RIGHT + DBLSIZE + CUSTOM_COLOR + shadowed)
lcd.drawText(zone.zone.x+zone.zone.w, zone.zone.y+30, string.format("%2.1fV", getMainValue(mySensor, zone.options)), RIGHT + DBLSIZE + CUSTOM_COLOR + shadowed)
lcd.drawText(zone.zone.x+zone.zone.w, zone.zone.y+70, string.format("%2.1fV %2.1fS", getSecondaryValue(mySensor, options), getCellCount(mySensor)), RIGHT + SMLSIZE + CUSTOM_COLOR + shadowed)
-- fils batt
lcd.setColor(CUSTOM_COLOR, getPercentColor(percent))
lcd.drawFilledRectangle(zone.zone.x + myBatt.x, zone.zone.y + myBatt.y + myBatt.h + myBatt.cath_h - math.floor(percent/100 * myBatt.h), myBatt.w, math.floor(percent/100 * myBatt.h), CUSTOM_COLOR)
-- draw cells
local pos = {{x=80, y=90}, {x=138, y=90}, {x=80, y=109}, {x=138, y=109}, {x=80, y=128}, {x=138, y=128}}
for i=1, getCellCount(mySensor), 1 do
lcd.setColor(CUSTOM_COLOR, getRangeColor(mySensor[i], getCellMax(mySensor), getCellMax(mySensor) - 0.2))
lcd.drawFilledRectangle(zone.zone.x + pos[i].x, zone.zone.y + pos[i].y, 58, 20, CUSTOM_COLOR)
lcd.setColor(CUSTOM_COLOR, WHITE)
lcd.drawText(zone.zone.x + pos[i].x+10, zone.zone.y + pos[i].y, string.format("%.2f", mySensor[i]), CUSTOM_COLOR + shadowed)
lcd.drawRectangle(zone.zone.x + pos[i].x, zone.zone.y + pos[i].y, 59, 20, CUSTOM_COLOR, 1)
end
if wgt.isDataAvailable then
lcd.setColor(CUSTOM_COLOR, wgt.options.Color)
else
lcd.drawText(zone.zone.x+5, zone.zone.y, "No Cells Data", LEFT + SMLSIZE + INVERS + CUSTOM_COLOR + shadowed)
lcd.setColor(CUSTOM_COLOR, GREY)
end
-- draws bat
lcd.drawText(wgt.zone.x + wgt.zone.w, wgt.zone.y, wgt.cellPercent .. "%", RIGHT + DBLSIZE + CUSTOM_COLOR + wgt.shadowed)
lcd.drawText(wgt.zone.x + wgt.zone.w, wgt.zone.y + 30, string.format("%2.1fV", wgt.mainValue), RIGHT + DBLSIZE + CUSTOM_COLOR + wgt.shadowed)
lcd.drawText(wgt.zone.x + wgt.zone.w, wgt.zone.y + 70, string.format("%2.1fV %2.1fS", wgt.secondaryValue, wgt.cellCount), RIGHT + SMLSIZE + CUSTOM_COLOR + wgt.shadowed)
-- fill batt
lcd.setColor(CUSTOM_COLOR, getPercentColor(wgt.cellPercent))
lcd.drawFilledRectangle(wgt.zone.x + myBatt.x, wgt.zone.y + myBatt.y + myBatt.h + myBatt.cath_h - math.floor(wgt.cellPercent / 100 * myBatt.h), myBatt.w, math.floor(wgt.cellPercent / 100 * myBatt.h), CUSTOM_COLOR)
-- draw cells
local pos = { { x = 80, y = 90 }, { x = 138, y = 90 }, { x = 80, y = 109 }, { x = 138, y = 109 }, { x = 80, y = 128 }, { x = 138, y = 128 } }
for i = 1, wgt.cellCount, 1 do
lcd.setColor(CUSTOM_COLOR, getRangeColor(wgt.cellDataLive[i], wgt.cellMax, wgt.cellMax - 0.2))
lcd.drawFilledRectangle(wgt.zone.x + pos[i].x, wgt.zone.y + pos[i].y, 58, 20, CUSTOM_COLOR)
lcd.setColor(CUSTOM_COLOR, WHITE)
lcd.drawText(wgt.zone.x + pos[i].x + 10, wgt.zone.y + pos[i].y, string.format("%.2f", wgt.cellDataLive[i]), CUSTOM_COLOR + wgt.shadowed)
lcd.drawRectangle(wgt.zone.x + pos[i].x, wgt.zone.y + pos[i].y, 59, 20, CUSTOM_COLOR, 1)
end
-- draw bat
lcd.setColor(CUSTOM_COLOR, WHITE)
lcd.drawRectangle(zone.zone.x + myBatt.x, zone.zone.y + myBatt.y + myBatt.cath_h , myBatt.w, myBatt.h, CUSTOM_COLOR, 2)
lcd.drawFilledRectangle(zone.zone.x + myBatt.x + myBatt.w/2 - myBatt.cath_w/2, zone.zone.y + myBatt.y, myBatt.cath_w, myBatt.cath_h, CUSTOM_COLOR)
for i=1, myBatt.h - myBatt.segments_h, myBatt.segments_h do
lcd.drawRectangle(zone.zone.x + myBatt.x, zone.zone.y + myBatt.y + myBatt.cath_h + i, myBatt.w, myBatt.segments_h, CUSTOM_COLOR, 1)
lcd.drawRectangle(wgt.zone.x + myBatt.x, wgt.zone.y + myBatt.y + myBatt.cath_h, myBatt.w, myBatt.h, CUSTOM_COLOR, 2)
lcd.drawFilledRectangle(wgt.zone.x + myBatt.x + myBatt.w / 2 - myBatt.cath_w / 2, wgt.zone.y + myBatt.y, myBatt.cath_w, myBatt.cath_h, CUSTOM_COLOR)
for i = 1, myBatt.h - myBatt.segments_h, myBatt.segments_h do
lcd.drawRectangle(wgt.zone.x + myBatt.x, wgt.zone.y + myBatt.y + myBatt.cath_h + i, myBatt.w, myBatt.segments_h, CUSTOM_COLOR, 1)
end
return
end
--- Size is 390x172 1/1
--- Size is 460x252 1/1 (no sliders/trim/topbar)
local function refreshZoneXLarge(zone)
local myBatt = {["x"]=10, ["y"]=20, ["w"]=80, ["h"]=121, ["segments_h"]=30, ["color"]=WHITE, ["cath_w"]=30, ["cath_h"]=10}
local mySensor = getCels(zone.options.Sensor)
local isDataAvailable = (type(mySensor) == "table")
--- Zone size: 390x172 1/1
--- Zone size: 460x252 1/1 (no sliders/trim/topbar)
local function refreshZoneXLarge(wgt)
local myBatt = { ["x"] = 10, ["y"] = 20, ["w"] = 80, ["h"] = 121, ["segments_h"] = 30, ["color"] = WHITE, ["cath_w"] = 30, ["cath_h"] = 10 }
lcd.setColor(CUSTOM_COLOR, zone.options.Color)
if isDataAvailable then
local percent = getCellPercent(getCellAvg(mySensor))
-- fils batt
lcd.setColor(CUSTOM_COLOR, getPercentColor(percent))
lcd.drawFilledRectangle(zone.zone.x + myBatt.x, zone.zone.y + myBatt.y + myBatt.h + myBatt.cath_h - math.floor(percent/100 * myBatt.h), myBatt.w, math.floor(percent/100 * myBatt.h), CUSTOM_COLOR)
-- draw right text section
lcd.setColor(CUSTOM_COLOR, zone.options.Color)
lcd.drawText(zone.zone.x+zone.zone.w, zone.zone.y + myBatt.y, percent.."%", RIGHT + DBLSIZE + CUSTOM_COLOR + shadowed)
lcd.setColor(CUSTOM_COLOR, wgt.options.Color)
lcd.drawText(zone.zone.x+zone.zone.w, zone.zone.y + myBatt.y + 30, string.format("%2.1fV", getMainValue(mySensor, zone.options)), RIGHT + DBLSIZE + CUSTOM_COLOR + shadowed)
lcd.drawText(zone.zone.x+zone.zone.w, zone.zone.y + myBatt.y + 105, string.format("%2.1fV %2.1fS", getSecondaryValue(mySensor, zone.options), getCellCount(mySensor)) , RIGHT + SMLSIZE + CUSTOM_COLOR + shadowed)
-- fill batt
lcd.setColor(CUSTOM_COLOR, getPercentColor(wgt.cellPercent))
lcd.drawFilledRectangle(wgt.zone.x + myBatt.x, wgt.zone.y + myBatt.y + myBatt.h + myBatt.cath_h - math.floor(wgt.cellPercent / 100 * myBatt.h), myBatt.w, math.floor(wgt.cellPercent / 100 * myBatt.h), CUSTOM_COLOR)
-- draw cells
local pos = {{x=111, y=38}, {x=164, y=38}, {x=217, y=38}, {x=111, y=57}, {x=164, y=57}, {x=217, y=57}}
for i=1, getCellCount(mySensor), 1 do
lcd.setColor(CUSTOM_COLOR, getRangeColor(mySensor[i], getCellMax(mySensor), getCellMax(mySensor) - 0.2))
lcd.drawFilledRectangle(zone.zone.x + pos[i].x, zone.zone.y + pos[i].y, 53, 20, CUSTOM_COLOR)
lcd.setColor(CUSTOM_COLOR, WHITE)
lcd.drawText(zone.zone.x + pos[i].x+10, zone.zone.y + pos[i].y, string.format("%.2f", mySensor[i]), CUSTOM_COLOR + shadowed)
lcd.drawRectangle(zone.zone.x + pos[i].x, zone.zone.y + pos[i].y, 54, 20, CUSTOM_COLOR, 1)
end
-- draw cells for lowest cells
local pos = {{x=111, y=110}, {x=164, y=110}, {x=217, y=110}, {x=111, y=129}, {x=164, y=129}, {x=217, y=129}}
for i=1, getCellCount(mySensor), 1 do
lcd.setColor(CUSTOM_COLOR, getRangeColor(histCellData[i], mySensor[i], mySensor[i] - 0.3))
lcd.drawFilledRectangle(zone.zone.x + pos[i].x, zone.zone.y + pos[i].y, 53, 20, CUSTOM_COLOR)
lcd.setColor(CUSTOM_COLOR, WHITE)
lcd.drawRectangle(zone.zone.x + pos[i].x, zone.zone.y + pos[i].y, 54, 20, CUSTOM_COLOR, 1)
lcd.drawText(zone.zone.x + pos[i].x+10, zone.zone.y + pos[i].y, string.format("%.2f", histCellData[i]), CUSTOM_COLOR + shadowed)
end
-- draw right text section
if wgt.isDataAvailable then
lcd.setColor(CUSTOM_COLOR, wgt.options.Color)
else
lcd.drawText(zone.zone.x+5, zone.zone.y, "No Cells Data", LEFT + SMLSIZE + INVERS + CUSTOM_COLOR)
lcd.setColor(CUSTOM_COLOR, GREY)
end
lcd.drawText(wgt.zone.x + wgt.zone.w, wgt.zone.y + myBatt.y, wgt.cellPercent .. "%", RIGHT + DBLSIZE + CUSTOM_COLOR + wgt.shadowed + wgt.no_telem_blink)
lcd.drawText(wgt.zone.x + wgt.zone.w, wgt.zone.y + myBatt.y + 30, string.format("%2.1fV", wgt.mainValue), RIGHT + DBLSIZE + CUSTOM_COLOR + wgt.shadowed + wgt.no_telem_blink)
lcd.drawText(wgt.zone.x + wgt.zone.w, wgt.zone.y + myBatt.y + 105, string.format("%2.1fV %2.1fS", wgt.secondaryValue, wgt.cellCount), RIGHT + SMLSIZE + CUSTOM_COLOR + wgt.shadowed + wgt.no_telem_blink)
-- draw cells
local pos = { { x = 111, y = 38 }, { x = 164, y = 38 }, { x = 217, y = 38 }, { x = 111, y = 57 }, { x = 164, y = 57 }, { x = 217, y = 57 } }
for i = 1, wgt.cellCount, 1 do
lcd.setColor(CUSTOM_COLOR, getRangeColor(wgt.cellDataLive[i], wgt.cellMax, wgt.cellMax - 0.2))
lcd.drawFilledRectangle(wgt.zone.x + pos[i].x, wgt.zone.y + pos[i].y, 53, 20, CUSTOM_COLOR)
lcd.setColor(CUSTOM_COLOR, WHITE)
lcd.drawText(wgt.zone.x + pos[i].x + 10, wgt.zone.y + pos[i].y, string.format("%.2f", wgt.cellDataLive[i]), CUSTOM_COLOR + wgt.shadowed + wgt.no_telem_blink)
lcd.drawRectangle(wgt.zone.x + pos[i].x, wgt.zone.y + pos[i].y, 54, 20, CUSTOM_COLOR, 1)
end
-- draw cells for lowest cells
local pos = { { x = 111, y = 110 }, { x = 164, y = 110 }, { x = 217, y = 110 }, { x = 111, y = 129 }, { x = 164, y = 129 }, { x = 217, y = 129 } }
for i = 1, wgt.cellCount, 1 do
lcd.setColor(CUSTOM_COLOR, getRangeColor(wgt.cellDataHistoryLowest[i], wgt.cellDataLive[i], wgt.cellDataLive[i] - 0.3))
lcd.drawFilledRectangle(wgt.zone.x + pos[i].x, wgt.zone.y + pos[i].y, 53, 20, CUSTOM_COLOR)
lcd.setColor(CUSTOM_COLOR, WHITE)
lcd.drawRectangle(wgt.zone.x + pos[i].x, wgt.zone.y + pos[i].y, 54, 20, CUSTOM_COLOR, 1)
lcd.drawText(wgt.zone.x + pos[i].x + 10, wgt.zone.y + pos[i].y, string.format("%.2f", wgt.cellDataHistoryLowest[i]), CUSTOM_COLOR + wgt.shadowed + wgt.no_telem_blink)
end
-- draws bat
lcd.setColor(CUSTOM_COLOR, WHITE)
lcd.drawRectangle(zone.zone.x + myBatt.x, zone.zone.y + myBatt.y + myBatt.cath_h , myBatt.w, myBatt.h, CUSTOM_COLOR, 2)
lcd.drawFilledRectangle(zone.zone.x + myBatt.x + myBatt.w/2 - myBatt.cath_w/2, zone.zone.y + myBatt.y, myBatt.cath_w, myBatt.cath_h, CUSTOM_COLOR)
for i=1, myBatt.h - myBatt.segments_h, myBatt.segments_h do
lcd.drawRectangle(zone.zone.x + myBatt.x, zone.zone.y + myBatt.y + myBatt.cath_h + i, myBatt.w, myBatt.segments_h, CUSTOM_COLOR, 1)
lcd.drawRectangle(wgt.zone.x + myBatt.x, wgt.zone.y + myBatt.y + myBatt.cath_h, myBatt.w, myBatt.h, CUSTOM_COLOR, 2)
lcd.drawFilledRectangle(wgt.zone.x + myBatt.x + myBatt.w / 2 - myBatt.cath_w / 2, wgt.zone.y + myBatt.y, myBatt.cath_w, myBatt.cath_h, CUSTOM_COLOR)
for i = 1, myBatt.h - myBatt.segments_h, myBatt.segments_h do
lcd.drawRectangle(wgt.zone.x + myBatt.x, wgt.zone.y + myBatt.y + myBatt.cath_h + i, myBatt.w, myBatt.segments_h, CUSTOM_COLOR, 1)
end
-- draw middle rectangles
lcd.drawRectangle(zone.zone.x + 110, zone.zone.y + 38, 161, 40, CUSTOM_COLOR, 1)
lcd.drawText(zone.zone.x + 220, zone.zone.y + 21, "Live data", RIGHT + SMLSIZE + INVERS + CUSTOM_COLOR + shadowed)
lcd.drawRectangle(zone.zone.x + 110, zone.zone.y + 110, 161, 40, CUSTOM_COLOR, 1)
lcd.drawText(zone.zone.x + 230, zone.zone.y + 93, "Lowest data", RIGHT + SMLSIZE + INVERS + CUSTOM_COLOR + shadowed)
lcd.drawRectangle(wgt.zone.x + 110, wgt.zone.y + 38, 161, 40, CUSTOM_COLOR, 1)
lcd.drawText(wgt.zone.x + 220, wgt.zone.y + 21, "Live data", RIGHT + SMLSIZE + INVERS + CUSTOM_COLOR + wgt.shadowed)
lcd.drawRectangle(wgt.zone.x + 110, wgt.zone.y + 110, 161, 40, CUSTOM_COLOR, 1)
lcd.drawText(wgt.zone.x + 230, wgt.zone.y + 93, "Lowest data", RIGHT + SMLSIZE + INVERS + CUSTOM_COLOR + wgt.shadowed)
return
end
-- This function allow recording of lowest cells when widget is not active
local function background(myZone)
getCels(myZone.options.Sensor)
return
-- This function allow recording of lowest cells when widget is in background
local function background(wgt)
if (wgt == nil) then return end
calculateBatteryData(wgt)
end
function refresh(myZone)
if myZone.options.Shadow == 1 then
shadowed = SHADOWED
local function refresh(wgt)
if (wgt == nil) then return end
if (wgt.options == nil) then return end
if (wgt.zone == nil) then return end
if (wgt.options.LowestCell == nil) then return end
if wgt.options.Shadow == 1 then
wgt.shadowed = SHADOWED
else
shadowed = 0
wgt.shadowed = 0
end
--if myZone.options.Sensor == 1 then
-- lcd.drawText(myZone.zone.x+2, myZone.zone.y+2, "Not configured", LEFT + SMLSIZE + CUSTOM_COLOR)
-- lcd.drawText(myZone.zone.x+2, myZone.zone.y+20, "Requires setting a Voltage Sensor", LEFT + SMLSIZE + INVERS + CUSTOM_COLOR)
-- return
--end
if myZone.zone.w > 380 and myZone.zone.h > 165 then refreshZoneXLarge(myZone)
elseif myZone.zone.w > 180 and myZone.zone.h > 145 then refreshZoneLarge(myZone)
elseif myZone.zone.w > 170 and myZone.zone.h > 65 then refreshZoneMedium(myZone)
elseif myZone.zone.w > 150 and myZone.zone.h > 28 then refreshZoneSmall(myZone)
elseif myZone.zone.w > 65 and myZone.zone.h > 35 then refreshZoneTiny(myZone)
calculateBatteryData(wgt)
if wgt.isDataAvailable then
wgt.no_telem_blink = 0
else
wgt.no_telem_blink = INVERS + BLINK
end
if wgt.zone.w > 380 and wgt.zone.h > 165 then refreshZoneXLarge(wgt)
elseif wgt.zone.w > 180 and wgt.zone.h > 145 then refreshZoneLarge(wgt)
elseif wgt.zone.w > 170 and wgt.zone.h > 65 then refreshZoneMedium(wgt)
elseif wgt.zone.w > 150 and wgt.zone.h > 28 then refreshZoneSmall(wgt)
elseif wgt.zone.w > 65 and wgt.zone.h > 35 then refreshZoneTiny(wgt)
end
end
return { name="BattCheck", options=options, create=create, update=update, background=background, refresh=refresh }
return { name="BattCheck", options=_options, create=create, update=update, background=background, refresh=refresh }
+1 -1
View File
@@ -21,7 +21,7 @@
#include "opentx.h"
#include "gui/common/stdlcd/fonts.h"
pixel_t displayBuf[DISPLAY_BUFFER_SIZE];
pixel_t displayBuf[DISPLAY_BUFFER_SIZE] __DMA;
void lcdClear()
{
+8 -10
View File
@@ -262,7 +262,11 @@ void onModelAntennaSwitchConfirm(const char * result)
#define EXTERNAL_ANTENNA_ROW
#endif
#if defined(PCBX7) || defined(PCBX9LITE)
#if defined(PCBX7ACCESS)
#define TRAINER_BLUETOOTH_ROW (g_model.trainerData.mode == TRAINER_MODE_MASTER_BLUETOOTH ? TRAINER_BLUETOOTH_M_ROW : (g_model.trainerData.mode == TRAINER_MODE_SLAVE_BLUETOOTH ? TRAINER_BLUETOOTH_S_ROW : HIDDEN_ROW))
#define TRAINER_PPM_PARAMS_ROW (g_model.trainerData.mode == TRAINER_MODE_SLAVE ? (uint8_t)2 : HIDDEN_ROW)
#define TRAINER_ROWS LABEL(Trainer), 0, IF_BT_TRAINER_ON(TRAINER_BLUETOOTH_ROW), TRAINER_CHANNELS_ROW, TRAINER_PPM_PARAMS_ROW
#elif defined(PCBX7) || defined(PCBX9LITE)
#if defined(BLUETOOTH)
#define TRAINER_BLUETOOTH_ROW (g_model.trainerData.mode == TRAINER_MODE_MASTER_BLUETOOTH ? TRAINER_BLUETOOTH_M_ROW : (g_model.trainerData.mode == TRAINER_MODE_SLAVE_BLUETOOTH ? TRAINER_BLUETOOTH_S_ROW : HIDDEN_ROW)),
#else
@@ -1488,15 +1492,9 @@ void menuModelSetup(event_t event)
lcdDrawNumber(MODEL_SETUP_2ND_COLUMN, y, optionValue, LEFT | attr);
if (attr) {
if (multi_proto == MODULE_SUBTYPE_MULTI_FS_AFHDS2A) {
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[moduleIdx].multi.optionValue, 0, 70);
}
else if (multi_proto == MODULE_SUBTYPE_MULTI_OLRS) {
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[moduleIdx].multi.optionValue, -1, 7);
}
else {
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[moduleIdx].multi.optionValue, -128, 127);
}
int8_t min, max;
getMultiOptionValues(multi_proto, min, max);
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[moduleIdx].multi.optionValue, min, max);
}
}
#endif
+3 -9
View File
@@ -1241,15 +1241,9 @@ void menuModelSetup(event_t event)
lcdDrawNumber(MODEL_SETUP_2ND_COLUMN, y, optionValue, LEFT | attr);
if (attr) {
if (multi_proto == MODULE_SUBTYPE_MULTI_FS_AFHDS2A) {
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[moduleIdx].multi.optionValue, 0, 70);
}
else if (multi_proto == MODULE_SUBTYPE_MULTI_OLRS) {
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[moduleIdx].multi.optionValue, -1, 7);
}
else {
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[moduleIdx].multi.optionValue, -128, 127);
}
int8_t min, max;
getMultiOptionValues(multi_proto, min, max);
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[moduleIdx].multi.optionValue, min, max);
}
}
#endif
-1
View File
@@ -326,7 +326,6 @@ extern uint8_t warningInfoFlags;
#define POPUP_INPUT(s, func) (warningText = s, popupFunc = func)
#define SET_WARNING_INFO(info, len, flags) (warningInfoText = info, warningInfoLength = len, warningInfoFlags = flags)
#define POPUP_MENU_START(func) do { popupMenuHandler = (func); AUDIO_KEY_PRESS(); } while(0)
#define POPUP_MENU_MAX_LINES 12
#define MENU_MAX_DISPLAY_LINES 9
#define MENU_LINE_LENGTH (LEN_MODEL_NAME+12)
@@ -309,7 +309,7 @@ void menuRadioSdManager(event_t _event)
REFRESH_FILES();
break;
#if defined(PCBX9) || defined(RADIO_X7) // TODO NO_MENU_KEY
#if defined(PCBX9) || defined(RADIO_X7) || defined(RADIO_X7ACCESS) // TODO NO_MENU_KEY
case EVT_KEY_LONG(KEY_MENU):
if (SD_CARD_PRESENT() && !READ_ONLY() && s_editMode == 0) {
killEvents(_event);
@@ -345,7 +345,7 @@ void menuRadioSdManager(event_t _event)
break;
case EVT_KEY_LONG(KEY_ENTER):
#if !defined(PCBX9) && !defined(RADIO_X7) // TODO NO_HEADER_LINE
#if !defined(PCBX9) && !defined(RADIO_X7) && !defined(RADIO_X7ACCESS) // TODO NO_HEADER_LINE
if (menuVerticalPosition < HEADER_LINE) {
killEvents(_event);
POPUP_MENU_ADD_ITEM(STR_SD_INFO);
+7 -1
View File
@@ -37,10 +37,13 @@ bool isBootloader(const char * filename)
void bootloaderFlash(const char * filename)
{
FIL file;
f_open(&file, filename, FA_READ);
uint8_t buffer[1024];
UINT count;
pausePulses();
f_open(&file, filename, FA_READ);
static uint8_t unlocked = 0;
if (!unlocked) {
unlocked = 1;
@@ -71,6 +74,7 @@ void bootloaderFlash(const char * filename)
}
watchdogSuspend(0);
WDG_RESET();
if (unlocked) {
lockFlash();
@@ -78,4 +82,6 @@ void bootloaderFlash(const char * filename)
}
f_close(&file);
resumePulses();
}
+9 -5
View File
@@ -46,7 +46,7 @@ const char * logsOpen()
{
// Determine and set log file filename
FRESULT result;
char filename[34]; // /LOGS/modelnamexxx-2013-01-01.log
char filename[sizeof(LOGS_PATH) + LEN_MODEL_NAME + 16]; // /LOGS/modelnamexxxxxx_2013-01-01.log
if (!sdMounted())
return STR_NO_SDCARD;
@@ -61,13 +61,13 @@ const char * logsOpen()
return error;
}
filename[sizeof(LOGS_PATH)-1] = '/';
filename[sizeof(LOGS_PATH) - 1] = '/';
memcpy(&filename[sizeof(LOGS_PATH)], g_model.header.name, sizeof(g_model.header.name));
filename[sizeof(LOGS_PATH)+sizeof(g_model.header.name)] = '\0';
filename[sizeof(LOGS_PATH) + LEN_MODEL_NAME] = '\0';
uint8_t i = sizeof(LOGS_PATH)+sizeof(g_model.header.name)-1;
uint8_t i = sizeof(LOGS_PATH) + LEN_MODEL_NAME - 1;
uint8_t len = 0;
while (i>sizeof(LOGS_PATH)-1) {
while (i > sizeof(LOGS_PATH) - 1) {
if (!len && filename[i])
len = i+1;
if (len) {
@@ -197,6 +197,10 @@ void logsWrite()
{
static const char * error_displayed = nullptr;
if (!sdMounted()) {
return;
}
if (isFunctionActive(FUNCTION_LOGS) && logDelay > 0) {
tmr10ms_t tmr10ms = get_tmr10ms();
if (lastLogTime == 0 || (tmr10ms_t)(tmr10ms - lastLogTime) >= (tmr10ms_t)logDelay*10) {
+12 -11
View File
@@ -16,15 +16,16 @@ set(LUA_INCLUDES
)
if(PYTHONINTERP_FOUND)
add_lua_export_target(x9lite ${LUA_INCLUDES} -DPCBTARANIS -DPCBX9LITE -DPCBX9)
add_lua_export_target(x9lites ${LUA_INCLUDES} -DPCBTARANIS -DPCBX9LITES -DPCBX9LITE -DPCBX9)
add_lua_export_target(x7 ${LUA_INCLUDES} -DPCBTARANIS -DPCBX7 -DRADIO_X7)
add_lua_export_target(xlite ${LUA_INCLUDES} -DPCBTARANIS -DPCBXLITE)
add_lua_export_target(xlites ${LUA_INCLUDES} -DPCBTARANIS -DPCBXLITES -DPCBXLITE -DGYRO)
add_lua_export_target(x9d ${LUA_INCLUDES} -DPCBTARANIS -DPCBX9D -DPCBX9)
add_lua_export_target(x9e ${LUA_INCLUDES} -DPCBTARANIS -DPCBX9E -DPCBX9)
add_lua_export_target(x10 ${LUA_INCLUDES} -DPCBHORUS -DPCBX10)
add_lua_export_target(x12s ${LUA_INCLUDES} -DPCBHORUS -DPCBX12S)
add_lua_export_target(t12 ${LUA_INCLUDES} -DPCBTARANIS -DPCBX7 -DRADIO_T12)
add_lua_export_target(t16 ${LUA_INCLUDES} -DPCBHORUS -DPCBX10 -DRADIO_T16)
add_lua_export_target(x9lite ${LUA_INCLUDES} -DPCBTARANIS -DPCBX9LITE -DPCBX9)
add_lua_export_target(x9lites ${LUA_INCLUDES} -DPCBTARANIS -DPCBX9LITES -DPCBX9LITE -DPCBX9)
add_lua_export_target(x7 ${LUA_INCLUDES} -DPCBTARANIS -DPCBX7 -DRADIO_X7)
add_lua_export_target(x7access ${LUA_INCLUDES} -DPCBTARANIS -DPCBX7ACCESS -DPCBX7 -DRADIO_X7ACCESS)
add_lua_export_target(xlite ${LUA_INCLUDES} -DPCBTARANIS -DPCBXLITE)
add_lua_export_target(xlites ${LUA_INCLUDES} -DPCBTARANIS -DPCBXLITES -DPCBXLITE -DGYRO)
add_lua_export_target(x9d ${LUA_INCLUDES} -DPCBTARANIS -DPCBX9D -DPCBX9)
add_lua_export_target(x9e ${LUA_INCLUDES} -DPCBTARANIS -DPCBX9E -DPCBX9)
add_lua_export_target(x10 ${LUA_INCLUDES} -DPCBHORUS -DPCBX10)
add_lua_export_target(x12s ${LUA_INCLUDES} -DPCBHORUS -DPCBX12S)
add_lua_export_target(t12 ${LUA_INCLUDES} -DPCBTARANIS -DPCBX7 -DRADIO_T12)
add_lua_export_target(t16 ${LUA_INCLUDES} -DPCBHORUS -DPCBX10 -DRADIO_T16)
endif()
+2
View File
@@ -34,6 +34,8 @@
#include "lua/lua_exports_x10.inc"
#elif defined(PCBX9E)
#include "lua/lua_exports_x9e.inc"
#elif defined(RADIO_X7ACCESS)
#include "lua/lua_exports_x7access.inc"
#elif defined(RADIO_X7)
#include "lua/lua_exports_x7.inc"
#elif defined(RADIO_T12)
+62 -36
View File
@@ -19,6 +19,7 @@
*/
#include "opentx.h"
#if defined(LIBOPENUI)
#include "mainwindow.h"
#endif
@@ -27,7 +28,24 @@ uint8_t currentSpeakerVolume = 255;
uint8_t requiredSpeakerVolume = 255;
uint8_t mainRequestFlags = 0;
#if defined(STM32)
#if defined(LIBOPENUI)
void openUsbMenu()
{
auto menu = new Menu();
menu->setTitle("USB");
menu->addLine(STR_USB_JOYSTICK, [] {
setSelectedUsbMode(USB_JOYSTICK_MODE);
});
menu->addLine(STR_USB_MASS_STORAGE, [] {
setSelectedUsbMode(USB_MASS_STORAGE_MODE);
});
#if defined(DEBUG)
menu->addLine(STR_USB_SERIAL, [] {
setSelectedUsbMode(USB_SERIAL_MODE);
});
#endif
}
#elif defined(STM32)
void onUSBConnectMenu(const char *result)
{
if (result == STR_USB_MASS_STORAGE) {
@@ -40,43 +58,46 @@ void onUSBConnectMenu(const char *result)
setSelectedUsbMode(USB_SERIAL_MODE);
}
}
void openUsbMenu()
{
POPUP_MENU_ADD_ITEM(STR_USB_JOYSTICK);
POPUP_MENU_ADD_ITEM(STR_USB_MASS_STORAGE);
#if defined(DEBUG)
POPUP_MENU_ADD_ITEM(STR_USB_SERIAL);
#endif
POPUP_MENU_START(onUSBConnectMenu);
}
#endif
void handleUsbConnection()
{
#if defined(STM32) && !defined(SIMU)
if (!usbStarted() && usbPlugged() && !(getSelectedUsbMode() == USB_UNSELECTED_MODE)) {
usbStart();
if (getSelectedUsbMode() == USB_MASS_STORAGE_MODE) {
opentxClose(false);
usbPluggedIn();
if (!usbStarted() && usbPlugged()) {
if (getSelectedUsbMode() == USB_UNSELECTED_MODE) {
if (g_eeGeneral.USBMode == USB_UNSELECTED_MODE && popupMenuItemsCount == 0) {
openUsbMenu();
}
else {
setSelectedUsbMode(g_eeGeneral.USBMode);
}
}
else {
if (getSelectedUsbMode() == USB_MASS_STORAGE_MODE) {
opentxClose(false);
usbPluggedIn();
}
usbStart();
}
}
#if defined(COLORLCD)
#warning "USB popup"
#else
if (!usbStarted() && usbPlugged() && getSelectedUsbMode() == USB_UNSELECTED_MODE) {
if (g_eeGeneral.USBMode == USB_UNSELECTED_MODE && popupMenuItemsCount == 0) {
POPUP_MENU_ADD_ITEM(STR_USB_JOYSTICK);
POPUP_MENU_ADD_ITEM(STR_USB_MASS_STORAGE);
#if defined(USB_SERIAL)
POPUP_MENU_ADD_ITEM(STR_USB_SERIAL);
#endif
POPUP_MENU_START(onUSBConnectMenu);
}
if (g_eeGeneral.USBMode != USB_UNSELECTED_MODE) {
setSelectedUsbMode(g_eeGeneral.USBMode);
}
}
#endif
if (usbStarted() && !usbPlugged()) {
usbStop();
if (getSelectedUsbMode() == USB_MASS_STORAGE_MODE) {
opentxResume();
putEvent(EVT_ENTRY);
}
#if !defined(BOOT)
setSelectedUsbMode(USB_UNSELECTED_MODE);
#endif
}
#endif // defined(STM32) && !defined(SIMU)
}
@@ -164,12 +185,10 @@ void checkSpeakerVolume()
#if defined(EEPROM)
void checkEeprom()
{
if (!usbPlugged()) {
if (eepromIsWriting())
eepromWriteProcess();
else if (TIME_TO_WRITE())
storageCheck(false);
}
if (eepromIsWriting())
eepromWriteProcess();
else if (TIME_TO_WRITE())
storageCheck(false);
}
#else
void checkEeprom()
@@ -494,13 +513,20 @@ void perMain()
#if defined(PCBSKY9X)
calcConsumption();
#endif
checkSpeakerVolume();
checkEeprom();
logsWrite();
if (!usbPlugged()) {
checkEeprom();
logsWrite();
}
handleUsbConnection();
#if defined(PCBXLITES)
handleJackConnection();
#endif
checkTrainerSettings();
periodicTick();
DEBUG_TIMER_STOP(debugTimerPerMain1);
@@ -511,7 +537,7 @@ void perMain()
mainRequestFlags &= ~(1 << REQUEST_FLIGHT_RESET);
}
doLoopCommonActions();
checkBacklight();
#if !defined(LIBOPENUI)
event_t evt = getEvent(false);
@@ -525,14 +551,14 @@ void perMain()
#endif
#if defined(STM32)
if (SD_CARD_PRESENT() && !sdMounted()) {
if (!usbPlugged() && SD_CARD_PRESENT() && !sdMounted()) {
sdMount();
}
#endif
#if !defined(EEPROM)
// In case the SD card is removed during the session
if (!SD_CARD_PRESENT() && !globalData.unexpectedShutdown) {
if (!usbPlugged() && !SD_CARD_PRESENT() && !globalData.unexpectedShutdown) {
drawFatalErrorScreen(STR_NO_SDCARD);
return;
}
+11 -9
View File
@@ -722,11 +722,6 @@ void checkBacklight()
}
}
void doLoopCommonActions()
{
checkBacklight();
}
void backlightOn()
{
lightOffCounter = ((uint16_t)g_eeGeneral.lightAutoOff*250) << 1;
@@ -813,7 +808,7 @@ void doSplash()
}
#endif
doLoopCommonActions();
checkBacklight();
}
}
}
@@ -1049,7 +1044,7 @@ void checkThrottleStick()
}
#endif
doLoopCommonActions();
checkBacklight();
WDG_RESET();
@@ -1089,7 +1084,7 @@ void alert(const char * title, const char * msg , uint8_t sound)
if (getEvent()) // wait for key release
break;
doLoopCommonActions();
checkBacklight();
WDG_RESET();
@@ -1634,8 +1629,9 @@ void opentxClose(uint8_t shutdown)
{
TRACE("opentxClose");
watchdogSuspend(2000/*20s*/);
if (shutdown) {
watchdogSuspend(2000/*20s*/);
pausePulses(); // stop mixer task to disable trims processing while in shutdown
AUDIO_BYE();
// TODO needed? telemetryEnd();
@@ -2178,7 +2174,13 @@ uint32_t pwrCheck()
lcdRefreshWait();
lcdClear();
POPUP_CONFIRMATION(STR_MODEL_SHUTDOWN, nullptr);
#if defined(SHUTDOWN_CONFIRMATION)
if (TELEMETRY_STREAMING() && !g_eeGeneral.disableRssiPoweroffAlarm) {
SET_WARNING_INFO(STR_MODEL_STILL_POWERED, sizeof(TR_MODEL_STILL_POWERED), 0);
}
#else
SET_WARNING_INFO(STR_MODEL_STILL_POWERED, sizeof(TR_MODEL_STILL_POWERED), 0);
#endif
event_t evt = getEvent(false);
DISPLAY_WARNING(evt);
lcdRefresh();
-1
View File
@@ -659,7 +659,6 @@ static inline void GET_ADC_IF_MIXER_NOT_RUNNING()
void backlightOn();
void checkBacklight();
void doLoopCommonActions();
uint16_t isqrt32(uint32_t n);
+30
View File
@@ -608,6 +608,36 @@ inline void resetMultiProtocolsOptions(uint8_t moduleIdx)
g_model.moduleData[moduleIdx].multi.disableMapping = 0;
g_model.moduleData[moduleIdx].multi.lowPowerMode = 0;
}
inline void getMultiOptionValues(int8_t multi_proto, int8_t & min, int8_t & max)
{
switch (multi_proto) {
case MODULE_SUBTYPE_MULTI_DSM2:
min = 0;
max = 1;
break;
case MODULE_SUBTYPE_MULTI_BAYANG:
min = 0;
max = 3;
break;
case MODULE_SUBTYPE_MULTI_OLRS:
min = -1;
max = 7;
break;
case MODULE_SUBTYPE_MULTI_FS_AFHDS2A:
min = 0;
max = 70;
break;
case MODULE_SUBTYPE_MULTI_XN297DP:
min = -1;
max = 84;
break;
default:
min = -128;
max = 127;
break;
}
}
#endif
#endif // _MODULES_HELPERS_H_
+4 -1
View File
@@ -25,15 +25,18 @@ template <class PxxTransport>
void Pxx1Pulses<PxxTransport>::addFlag1(uint8_t module, uint8_t sendFailsafe)
{
uint8_t flag1 = (g_model.moduleData[module].subType << 6);
if (moduleState[module].mode == MODULE_MODE_BIND) {
flag1 |= (g_eeGeneral.countryCode << 1) | PXX_SEND_BIND;
}
else if (moduleState[module].mode == MODULE_MODE_RANGECHECK) {
flag1 |= PXX_SEND_RANGECHECK;
}
else if (sendFailsafe && g_model.moduleData[module].failsafeMode != FAILSAFE_NOT_SET && g_model.moduleData[module].failsafeMode != FAILSAFE_RECEIVER) {
if (sendFailsafe && g_model.moduleData[module].failsafeMode != FAILSAFE_NOT_SET && g_model.moduleData[module].failsafeMode != FAILSAFE_RECEIVER) {
flag1 |= PXX_SEND_FAILSAFE;
}
PxxTransport::addByte(flag1);
}
+4 -4
View File
@@ -138,8 +138,10 @@ const char * getBasename(const char * path);
#define OTX_FOURCC 0x3B78746F // otx for Taranis X-Lite S
#elif defined(PCBXLITE)
#define OTX_FOURCC 0x3978746F // otx for Taranis X-Lite
#elif defined(RADIO_X7)
#define OTX_FOURCC 0x3678746F // otx for Taranis X7
#elif defined(RADIO_T12)
#define OTX_FOURCC 0x3D78746F // otx for Jumper T12
#elif defined(PCBX7)
#define OTX_FOURCC 0x3678746F // otx for Taranis X7 / X7S / X7 Express / X7S Express
#elif defined(PCBX9LITES)
#define OTX_FOURCC 0x3E78746F // otx for Taranis X9-Lite
#elif defined(PCBX9LITE)
@@ -150,8 +152,6 @@ const char * getBasename(const char * path);
#define OTX_FOURCC 0x3A78746F // otx for NV14
#elif defined(PCBSKY9X)
#define OTX_FOURCC 0x3278746F // otx for sky9x
#elif defined(RADIO_T12)
#define OTX_FOURCC 0x3D78746F // otx for Jumper T12
#endif
bool isFileAvailable(const char * filename, bool exclDir = false);
@@ -249,7 +249,7 @@ void convertModelData_218_to_219(ModelData &model)
newModel.moduleData[i].type += 4;
if (newModel.moduleData[i].type == MODULE_TYPE_XJT_PXX1) {
newModel.moduleData[i].subType = newModel.moduleData[i].rfProtocol;
#if defined(PCBX9DP) && PCBREV >= 2019
#if defined(RADIO_X9DP2019)
if (i == INTERNAL_MODULE) {
newModel.moduleData[i].type = MODULE_TYPE_ISRM_PXX2;
newModel.moduleData[i].subType = MODULE_SUBTYPE_ISRM_PXX2_ACCST_D16;
@@ -390,7 +390,7 @@ void convertRadioData_218_to_219(RadioData & settings)
settings.backlightColor = oldSettings.backlightColor;
settings.switchUnlockStates = oldSettings.switchUnlockStates;
settings.switchConfig = oldSettings.switchConfig;
#if defined(PCBX9DP) && PCBREV >= 2019
#if defined(RADIO_X9DP2019)
settings.switchConfig |= SWITCH_TOGGLE << 16;
#endif
memcpy(&settings.switchNames[0], &oldSettings.switchNames[0], 8 * LEN_SWITCH_NAME);
@@ -441,7 +441,7 @@ void convertRadioData_218_to_219(RadioData & settings)
}
#endif
#if defined(PCBX9DP) && PCBREV >= 2019
#if defined(RADIO_X9DP2019)
// force re-calibration
settings.chkSum = 0xFFFF;
setDefaultOwnerId();
+5 -3
View File
@@ -158,11 +158,13 @@ void getSwitchesPosition(bool startup)
CHECK_2POS(SW_SH);
#endif
#if defined(PCBX9DP) && PCBREV >= 2019
#if defined(RADIO_X9DP2019)
CHECK_2POS(SW_SI);
#endif
#if defined(PCBHORUS) || defined(PCBX7)
#if defined(PCBX7ACCESS)
CHECK_2POS(SW_SI);
#elif defined(PCBHORUS) || defined(PCBX7)
CHECK_2POS(SW_SI);
CHECK_2POS(SW_SJ);
#endif
@@ -745,7 +747,7 @@ void checkSwitches()
}
#endif
doLoopCommonActions();
checkBacklight();
WDG_RESET();
@@ -24,7 +24,7 @@
Fifo<uint8_t, BT_TX_FIFO_SIZE> btTxFifo;
Fifo<uint8_t, BT_RX_FIFO_SIZE> btRxFifo;
#if defined(PCBX7) || defined(PCBXLITE)
#if defined(BLUETOOTH_PROBE)
volatile uint8_t btChipPresent = 0;
#endif
@@ -117,7 +117,7 @@ extern "C" void BT_USART_IRQHandler(void)
uint8_t byte = USART_ReceiveData(BT_USART);
btRxFifo.push(byte);
TRACE("BT %02X", byte);
#if defined(PCBX7) || defined(PCBXLITE)
#if defined(BLUETOOTH_PROBE)
if (!btChipPresent) {
// This is to differentiate X7 and X7S and X-Lite with/without BT
btChipPresent = 1;
@@ -23,7 +23,12 @@
#include "stamp.h"
#define BOOTLOADER_TITLE " OTX Bootloader - " VERSION
#if LCD_W < 212
#define BOOTLOADER_TITLE " OTX Bootloader - " VERSION
#else
#define BOOTLOADER_TITLE " OpenTX Bootloader - " VERSION
#endif
#define DISPLAY_CHAR_WIDTH (LCD_COLS+4)
#if LCD_W >= 480
@@ -73,7 +73,7 @@ void bootloaderDrawScreen(BootloaderState st, int opt, const char* str)
lcd->clear(DEFAULT_BGCOLOR);
if (st == ST_START) {
bootloaderDrawTitle(88, "OpenTX Bootloader");
bootloaderDrawTitle(88, BOOTLOADER_TITLE);
lcd->drawBitmapPattern(90, 72, LBM_FLASH, DEFAULT_COLOR);
lcd->drawText(124, 75, "Write Firmware");
@@ -605,6 +605,8 @@ class OpenTxSimulatorFactory: public SimulatorFactory
return Board::BOARD_HORUS_X12S;
#elif defined(PCBX10)
return Board::BOARD_X10;
#elif defined(PCBX7ACCESS)
return Board::BOARD_TARANIS_X7_ACCESS;
#elif defined(PCBX7)
return Board::BOARD_TARANIS_X7;
#elif defined(PCBX9LITES)
+76 -30
View File
@@ -38,6 +38,8 @@ if(PCB STREQUAL X9E)
set(LCD_DRIVER lcd_driver_spi.cpp)
set(GVAR_SCREEN model_gvars.cpp)
set(STATUS_LEDS NO)
set(BLUETOOTH YES)
set(ROTARY_ENCODER YES)
elseif(PCB STREQUAL X9D+)
set(HAPTIC YES)
set(LUA_EXPORT lua_export_x9d)
@@ -54,39 +56,43 @@ elseif(PCB STREQUAL X9D+)
if (${PCBREV} STREQUAL 2019)
option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" OFF)
option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" ON)
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
set(FLAVOUR x9d+2019)
set(CPU_TYPE STM32F4)
set(CPU_TYPE_FULL STM32F407xE) # for size report
set(LINKER_SCRIPT targets/taranis/stm32f4_flash.ld)
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
set(FIRMWARE_TARGET_SRC
${FIRMWARE_TARGET_SRC}
startup_stm32f40_41xxx.s
)
set(LINKER_SCRIPT targets/taranis/stm32f4_flash.ld)
add_definitions(-DRADIO_X9DP2019)
add_definitions(-DSTM32F40_41xxx)
add_definitions(-DSOFTWARE_VOLUME -DPWR_BUTTON_${PWR_BUTTON} -DHARDWARE_POWER_MANAGEMENT_UNIT)
set(STATUS_LEDS YES)
set(PXX2 ON)
set(PXX_FREQUENCY "HIGH")
set(FLAVOUR x9d+2019)
set(BLUETOOTH YES)
set(ROTARY_ENCODER YES)
set(INTERNAL_MODULE_SERIAL YES)
else()
option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" ON)
option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" OFF)
set(FLAVOUR x9d+)
set(CPU_TYPE STM32F2)
set(CPU_TYPE_FULL STM32F205xE) # for size report
set(LINKER_SCRIPT targets/taranis/stm32f2_flash.ld)
set(AUX_SERIAL_DRIVER ../common/arm/stm32/aux_serial_driver.cpp)
set(STATUS_LEDS NO)
set(FLAVOUR x9d+)
endif()
elseif(PCB STREQUAL X9D)
option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" ON)
option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" OFF)
set(FLAVOUR x9d)
set(CPU_TYPE STM32F2)
set(CPU_TYPE_FULL STM32F205xE) # for size report
set(LINKER_SCRIPT targets/taranis/stm32f2_flash.ld)
option(HAPTIC "Haptic support" OFF)
set(LUA_EXPORT lua_export_x9d)
set(FLAVOUR x9d)
add_definitions(-DPCBX9D -DPCBX9)
add_definitions(-DEEPROM_VARIANT=0)
set(GUI_DIR 212x64)
@@ -99,34 +105,64 @@ elseif(PCB STREQUAL X9D)
set(STATUS_LEDS NO)
elseif(PCB STREQUAL X7)
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
set(CPU_TYPE STM32F2)
set(CPU_TYPE_FULL STM32F205xE) # for size report
set(LINKER_SCRIPT targets/taranis/stm32f2_flash.ld)
set(HAPTIC YES)
if(PCBREV STREQUAL T12)
set(LUA_EXPORT lua_export_t12)
set(FLAVOUR t12)
set(NAVIGATION_TYPE 9x)
add_definitions(-DRADIO_T12)
add_definitions(-DEEPROM_VARIANT=0x4001)
option(INTERNAL_MODULE_MULTI "Support for MULTI internal module" OFF)
else()
option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" ON)
option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" OFF)
set(LUA_EXPORT lua_export_x7)
set(FLAVOUR x7)
set(NAVIGATION_TYPE x7)
add_definitions(-DRADIO_X7)
add_definitions(-DEEPROM_VARIANT=0x4000)
endif()
add_definitions(-DPCBX7 -DSOFTWARE_VOLUME)
add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
set(GUI_DIR 128x64)
set(BITMAPS_TARGET 9x_bitmaps)
set(FONTS_TARGET 9x_fonts_1bit)
set(LCD_DRIVER lcd_driver_spi.cpp)
set(GVAR_SCREEN model_gvars.cpp)
set(STATUS_LEDS YES)
add_definitions(-DPCBX7 -DSOFTWARE_VOLUME)
add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
if(PCBREV STREQUAL T12)
option(INTERNAL_MODULE_MULTI "Support for MULTI internal module" OFF)
set(FLAVOUR t12)
set(NAVIGATION_TYPE 9x)
set(CPU_TYPE STM32F2)
set(CPU_TYPE_FULL STM32F205xE) # for size report
set(LINKER_SCRIPT targets/taranis/stm32f2_flash.ld)
set(LUA_EXPORT lua_export_t12)
add_definitions(-DRADIO_T12)
add_definitions(-DEEPROM_VARIANT=0x4001)
elseif(PCBREV STREQUAL ACCESS)
option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" OFF)
option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" ON)
set(FLAVOUR x7access)
set(NAVIGATION_TYPE x7)
set(CPU_TYPE STM32F4)
set(CPU_TYPE_FULL STM32F407xE) # for size report
set(LINKER_SCRIPT targets/taranis/stm32f4_flash.ld)
set(LUA_EXPORT lua_export_x7access)
add_definitions(-DRADIO_X7ACCESS)
add_definitions(-DEEPROM_VARIANT=0x4000)
add_definitions(-DPCBREV=${PCBREV})
add_definitions(-DPCBX7ACCESS)
set(FIRMWARE_TARGET_SRC
${FIRMWARE_TARGET_SRC}
startup_stm32f40_41xxx.s
)
add_definitions(-DSTM32F40_41xxx)
add_definitions(-DHARDWARE_POWER_MANAGEMENT_UNIT)
set(PXX2 ON)
set(PXX_FREQUENCY "HIGH")
set(BLUETOOTH YES)
set(ROTARY_ENCODER YES)
set(INTERNAL_MODULE_SERIAL YES)
else()
option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" ON)
option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" OFF)
set(FLAVOUR x7)
set(NAVIGATION_TYPE x7)
set(CPU_TYPE STM32F2)
set(CPU_TYPE_FULL STM32F205xE) # for size report
set(LINKER_SCRIPT targets/taranis/stm32f2_flash.ld)
set(LUA_EXPORT lua_export_x7)
add_definitions(-DRADIO_X7)
add_definitions(-DEEPROM_VARIANT=0x4000)
set(BLUETOOTH YES)
add_definitions(-DBLUETOOTH_PROBE)
set(ROTARY_ENCODER YES)
endif()
elseif(PCB STREQUAL X9LITE)
option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" OFF)
option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" ON)
@@ -150,6 +186,8 @@ elseif(PCB STREQUAL X9LITE)
set(LCD_DRIVER lcd_driver_spi.cpp)
set(GVAR_SCREEN model_gvars.cpp)
set(STATUS_LEDS YES)
set(ROTARY_ENCODER YES)
set(INTERNAL_MODULE_SERIAL YES)
elseif(PCB STREQUAL X9LITES)
option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" OFF)
option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" ON)
@@ -173,6 +211,9 @@ elseif(PCB STREQUAL X9LITES)
set(LCD_DRIVER lcd_driver_spi.cpp)
set(GVAR_SCREEN model_gvars.cpp)
set(STATUS_LEDS YES)
set(BLUETOOTH YES)
set(ROTARY_ENCODER YES)
set(INTERNAL_MODULE_SERIAL YES)
elseif(PCB STREQUAL XLITE)
option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" ON)
option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" OFF)
@@ -195,6 +236,8 @@ elseif(PCB STREQUAL XLITE)
set(LCD_DRIVER lcd_driver_spi.cpp)
set(GVAR_SCREEN model_gvars.cpp)
set(STATUS_LEDS YES)
set(BLUETOOTH YES)
set(INTERNAL_MODULE_SERIAL YES)
elseif(PCB STREQUAL XLITES)
option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" OFF)
option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" ON)
@@ -217,9 +260,12 @@ elseif(PCB STREQUAL XLITES)
set(GVAR_SCREEN model_gvars.cpp)
set(STATUS_LEDS YES)
set(PXX2 ON)
set(BLUETOOTH YES)
set(GYRO YES)
set(INTERNAL_MODULE_SERIAL YES)
endif()
if(PCB STREQUAL XLITES)
if(GYRO)
add_definitions(-DGYRO)
set(TARGET_SRC
${TARGET_SRC}
@@ -231,7 +277,7 @@ if(PCB STREQUAL XLITES)
)
endif()
if(PCB STREQUAL XLITE OR PCB STREQUAL XLITES OR PCB STREQUAL X9LITE OR PCB STREQUAL X9LITES OR (PCB STREQUAL X9D+ AND PCBREV STREQUAL 2019))
if(INTERNAL_MODULE_SERIAL)
add_definitions(-DINTERNAL_MODULE_SERIAL)
if(PXX_FREQUENCY STREQUAL HIGH)
add_definitions(-DPXX_FREQUENCY_HIGH)
@@ -247,14 +293,14 @@ elseif(NOT (PCB STREQUAL X7 AND PCBREV STREQUAL T12))
)
endif()
if(PCB STREQUAL X9E OR (PCB STREQUAL X9D+ AND PCBREV STREQUAL 2019) OR (PCB STREQUAL X7 AND NOT (PCBREV STREQUAL T12)) OR PCB STREQUAL X9LITE OR PCB STREQUAL X9LITES)
if(ROTARY_ENCODER)
set(TARGET_SRC
${TARGET_SRC}
../common/arm/stm32/rotary_encoder_driver.cpp
)
endif()
if(PCB STREQUAL X9E OR (PCB STREQUAL X7 AND NOT PCBREV STREQUAL T12) OR PCB STREQUAL XLITE OR PCB STREQUAL XLITES OR (PCB STREQUAL X9D+ AND PCBREV STREQUAL 2019) OR PCB STREQUAL X9LITES)
if(BLUETOOTH)
add_definitions(-DBLUETOOTH)
set(TARGET_SRC
${TARGET_SRC}
+18 -7
View File
@@ -333,12 +333,16 @@ enum EnumSwitchesPositions
SW_SH1,
SW_SH2,
#endif
#if defined(PCBX9DP) && PCBREV >= 2019
#if defined(RADIO_X9DP2019)
SW_SI0,
SW_SI1,
SW_SI2,
#endif
#if defined(PCBX7)
#if defined(PCBX7ACCESS)
SW_SI0,
SW_SI1,
SW_SI2,
#elif defined(PCBX7)
SW_SI0,
SW_SI1,
SW_SI2,
@@ -396,6 +400,11 @@ enum EnumSwitchesPositions
#define STORAGE_NUM_SWITCHES NUM_SWITCHES
#define DEFAULT_SWITCH_CONFIG (SWITCH_2POS << 10) + (SWITCH_2POS << 8) + (SWITCH_3POS << 6) + (SWITCH_3POS << 4) + (SWITCH_3POS << 2) + (SWITCH_3POS << 0)
#define DEFAULT_POTS_CONFIG (POT_WITHOUT_DETENT << 0) + (POT_WITHOUT_DETENT << 2); // S1 = pot without detent, S2 = pot with detent
#elif defined(PCBX7ACCESS)
#define NUM_SWITCHES 7
#define STORAGE_NUM_SWITCHES 8
#define DEFAULT_SWITCH_CONFIG (SWITCH_TOGGLE << 10) + (SWITCH_2POS << 8) + (SWITCH_3POS << 6) + (SWITCH_3POS << 4) + (SWITCH_3POS << 2) + (SWITCH_3POS << 0)
#define DEFAULT_POTS_CONFIG (POT_WITHOUT_DETENT << 0) + (POT_WITH_DETENT << 2); // S1 = pot without detent, S2 = pot with detent
#elif defined(PCBX7)
#define NUM_SWITCHES 8
#define STORAGE_NUM_SWITCHES NUM_SWITCHES
@@ -417,7 +426,7 @@ enum EnumSwitchesPositions
#define DEFAULT_SWITCH_CONFIG (SWITCH_TOGGLE << 14) + (SWITCH_3POS << 12) + (SWITCH_2POS << 10) + (SWITCH_3POS << 8) + (SWITCH_3POS << 6) + (SWITCH_3POS << 4) + (SWITCH_3POS << 2) + (SWITCH_3POS << 0)
#define DEFAULT_POTS_CONFIG (POT_WITH_DETENT << 0) + (POT_WITH_DETENT << 2);
#define DEFAULT_SLIDERS_CONFIG (SLIDER_WITH_DETENT << 3) + (SLIDER_WITH_DETENT << 2) + (SLIDER_WITH_DETENT << 3) + (SLIDER_WITH_DETENT << 2) + (SLIDER_WITH_DETENT << 1) + (SLIDER_WITH_DETENT << 0)
#elif defined(PCBX9DP) && PCBREV >= 2019
#elif defined(RADIO_X9DP2019)
#define NUM_SWITCHES 9
#define STORAGE_NUM_SWITCHES NUM_SWITCHES
#define DEFAULT_SWITCH_CONFIG (SWITCH_TOGGLE << 16) + (SWITCH_TOGGLE << 14) + (SWITCH_3POS << 12) + (SWITCH_2POS << 10) + (SWITCH_3POS << 8) + (SWITCH_3POS << 6) + (SWITCH_3POS << 4) + (SWITCH_3POS << 2) + (SWITCH_3POS << 0);
@@ -607,7 +616,7 @@ extern uint16_t adcValues[NUM_ANALOGS];
#define BATT_SCALE 123
#elif defined(PCBX9LITE)
#define BATT_SCALE 117
#elif defined(PCBX9DP) && PCBREV >= 2019
#elif defined(RADIO_X9DP2019)
#define BATT_SCALE 117
#else
#define BATT_SCALE 150
@@ -689,7 +698,9 @@ extern uint32_t telemetryErrors;
void telemetryPortInvertedInit(uint32_t baudrate);
// PCBREV driver
#if defined(PCBX7)
#if defined(PCBX7ACCESS)
#define HAS_SPORT_UPDATE_CONNECTOR() true
#elif defined(PCBX7)
#define IS_PCBREV_40() (GPIO_ReadInputDataBit(PCBREV_GPIO, PCBREV_GPIO_PIN) == Bit_SET)
#define HAS_SPORT_UPDATE_CONNECTOR() IS_PCBREV_40()
#elif defined(SPORT_UPDATE_PWR_GPIO)
@@ -785,11 +796,11 @@ void bluetoothInit(uint32_t baudrate, bool enable);
void bluetoothWriteWakeup();
uint8_t bluetoothIsWriting();
void bluetoothDisable();
#if defined(PCBX9LITES)
#if defined(PCBX9LITES) || defined(PCBX7ACCESS)
#define IS_BLUETOOTH_CHIP_PRESENT() (true)
#elif defined(PCBX9LITE)
#define IS_BLUETOOTH_CHIP_PRESENT() (false)
#elif (defined(PCBX7) || defined(PCBXLITE)) && !defined(SIMU)
#elif defined(BLUETOOTH_PROBE) && !defined(SIMU)
extern volatile uint8_t btChipPresent;
#define IS_BLUETOOTH_CHIP_PRESENT() (btChipPresent)
#else
+1 -1
View File
@@ -1026,7 +1026,7 @@ void sdDone()
#if defined(LOG_TELEMETRY)
f_close(&g_telemetryFile);
#endif
f_mount(NULL, "", 0); // unmount SD
f_mount(nullptr, "", 0); // unmount SD
}
}
#endif
+116 -28
View File
@@ -59,7 +59,7 @@
#define KEYS_GPIO_PIN_LEFT GPIO_Pin_7 // PD.07
#define KEYS_GPIO_REG_RIGHT GPIOD->IDR
#define KEYS_GPIO_PIN_RIGHT GPIO_Pin_3 // PD.03
#elif defined(RADIO_X7)
#elif defined(PCBX7)
#define KEYS_GPIO_REG_PAGE GPIOD->IDR
#define KEYS_GPIO_PIN_PAGE GPIO_Pin_3 // PD.03
#define KEYS_GPIO_REG_MENU GPIOD->IDR
@@ -77,7 +77,7 @@
#define KEYS_GPIO_PIN_EXIT GPIO_Pin_9 // PE.09
#define KEYS_GPIO_REG_ENTER GPIOE->IDR
#define KEYS_GPIO_PIN_ENTER GPIO_Pin_11 // PE.11
#elif defined(PCBX9DP) && PCBREV >= 2019
#elif defined(RADIO_X9DP2019)
#define KEYS_GPIO_REG_MENU GPIOD->IDR
#define KEYS_GPIO_PIN_MENU GPIO_Pin_2 // PD.02
#define KEYS_GPIO_REG_EXIT GPIOD->IDR
@@ -115,7 +115,7 @@
#define ROTARY_ENCODER_EXTI_PortSource EXTI_PortSourceGPIOD
#define ROTARY_ENCODER_EXTI_PinSource1 EXTI_PinSource12
#define ROTARY_ENCODER_EXTI_PinSource2 EXTI_PinSource13
#elif defined(PCBX9DP) && PCBREV >= 2019
#elif defined(RADIO_X9DP2019)
#define ROTARY_ENCODER_NAVIGATION
#define ROTARY_ENCODER_GPIO GPIOE
#define ROTARY_ENCODER_GPIO_PIN_A GPIO_Pin_10 // PE.10
@@ -128,7 +128,7 @@
#define ROTARY_ENCODER_EXTI_PortSource EXTI_PortSourceGPIOE
#define ROTARY_ENCODER_EXTI_PinSource1 EXTI_PinSource10
#define ROTARY_ENCODER_EXTI_PinSource2 EXTI_PinSource11
#elif defined(RADIO_X7)
#elif defined(RADIO_X7) || defined(RADIO_X7ACCESS)
#define ROTARY_ENCODER_NAVIGATION
#define ROTARY_ENCODER_GPIO GPIOE
#define ROTARY_ENCODER_GPIO_PIN_A GPIO_Pin_9 // PE.09
@@ -193,6 +193,23 @@
#define TRIMS_GPIO_PIN_LVU GPIO_Pin_0 // PB.00
#define TRIMS_GPIO_REG_LVD GPIOB->IDR
#define TRIMS_GPIO_PIN_LVD GPIO_Pin_1 // PB.01
#elif defined(RADIO_X7ACCESS)
#define TRIMS_GPIO_REG_LHR GPIOD->IDR
#define TRIMS_GPIO_PIN_LHR GPIO_Pin_15 // PD.15
#define TRIMS_GPIO_REG_LHL GPIOC->IDR
#define TRIMS_GPIO_PIN_LHL GPIO_Pin_1 // PC.01
#define TRIMS_GPIO_REG_LVD GPIOE->IDR
#define TRIMS_GPIO_PIN_LVD GPIO_Pin_6 // PE.06
#define TRIMS_GPIO_REG_LVU GPIOE->IDR
#define TRIMS_GPIO_PIN_LVU GPIO_Pin_5 // PE.05
#define TRIMS_GPIO_REG_RVD GPIOC->IDR
#define TRIMS_GPIO_PIN_RVD GPIO_Pin_3 // PC.03
#define TRIMS_GPIO_REG_RHR GPIOE->IDR
#define TRIMS_GPIO_PIN_RHR GPIO_Pin_3 // PE.03
#define TRIMS_GPIO_REG_RVU GPIOC->IDR
#define TRIMS_GPIO_PIN_RVU GPIO_Pin_2 // PC.02
#define TRIMS_GPIO_REG_RHL GPIOE->IDR
#define TRIMS_GPIO_PIN_RHL GPIO_Pin_4 // PE.04
#elif defined(PCBX7)
#define TRIMS_GPIO_REG_LHL GPIOD->IDR
#define TRIMS_GPIO_PIN_LHL GPIO_Pin_15 // PD.15
@@ -227,7 +244,7 @@
#define TRIMS_GPIO_PIN_RVD GPIO_Pin_14 // PE.14
#define TRIMS_GPIO_REG_RHL GPIOD->IDR
#define TRIMS_GPIO_PIN_RHL GPIO_Pin_9 // PD.09
#elif defined(PCBX9DP) && PCBREV >= 2019
#elif defined(RADIO_X9DP2019)
#define TRIMS_GPIO_REG_LHL GPIOE->IDR
#define TRIMS_GPIO_PIN_LHL GPIO_Pin_3 // PE.03
#define TRIMS_GPIO_REG_LHR GPIOE->IDR
@@ -351,8 +368,13 @@
#define HARDWARE_SWITCH_C
#define SWITCHES_GPIO_REG_C_L GPIOD->IDR
#define SWITCHES_GPIO_PIN_C_L GPIO_Pin_11 // PD.11
#define SWITCHES_GPIO_REG_C_H GPIOE->IDR
#define SWITCHES_GPIO_PIN_C_H GPIO_Pin_0 // PE.00
#if defined(PCBX7ACCESS)
#define SWITCHES_GPIO_REG_C_H GPIOD->IDR
#define SWITCHES_GPIO_PIN_C_H GPIO_Pin_10 // PD.10
#else
#define SWITCHES_GPIO_REG_C_H GPIOE->IDR
#define SWITCHES_GPIO_PIN_C_H GPIO_Pin_0 // PE.00
#endif
#else
#define STORAGE_SWITCH_C
#define HARDWARE_SWITCH_C
@@ -514,7 +536,7 @@
#define SWITCHES_GPIO_PIN_H GPIO_Pin_13 // PE.13
#endif
#if defined(PCBX9DP) && PCBREV >= 2019
#if defined(RADIO_X9DP2019)
#define STORAGE_SWITCH_I
#define HARDWARE_SWITCH_I
#define SWITCHES_GPIO_REG_I GPIOD->IDR
@@ -524,13 +546,19 @@
#endif
// X7 P400 P401 headers additionnal momentary switches
#if defined(PCBX7)
#if defined(PCBX7ACCESS)
#define STORAGE_SWITCH_I
#define HARDWARE_SWITCH_I
#define STORAGE_SWITCH_J
#define HARDWARE_SWITCH_J
#define SWITCHES_GPIO_REG_I GPIOC->IDR
#define SWITCHES_GPIO_PIN_I GPIO_Pin_13 // PC.13
#define STORAGE_SWITCH_J
#elif defined(PCBX7)
#define STORAGE_SWITCH_I
#define HARDWARE_SWITCH_I
#define SWITCHES_GPIO_REG_I GPIOC->IDR
#define SWITCHES_GPIO_PIN_I GPIO_Pin_13 // PC.13
#define STORAGE_SWITCH_J
#define HARDWARE_SWITCH_J
#define SWITCHES_GPIO_REG_J GPIOD->IDR
#define SWITCHES_GPIO_PIN_J GPIO_Pin_10 // PD.10
#endif
@@ -607,7 +635,7 @@
#define KEYS_GPIOE_PINS (TRIMS_GPIO_PIN_LVU | TRIMS_GPIO_PIN_LVD | SWITCHES_GPIO_PIN_D_H | SWITCHES_GPIO_PIN_D_L| SWITCHES_GPIO_PIN_E_H | SWITCHES_GPIO_PIN_E_L | SWITCHES_GPIO_PIN_F | SWITCHES_GPIO_PIN_I_L | SWITCHES_GPIO_PIN_L_H | SWITCHES_GPIO_PIN_L_L | SWITCHES_GPIO_PIN_M_H | SWITCHES_GPIO_PIN_O_L | SWITCHES_GPIO_PIN_R_L)
#define KEYS_GPIOF_PINS (KEYS_GPIO_PIN_ENTER | SWITCHES_GPIO_PIN_C_H | SWITCHES_GPIO_PIN_C_L | SWITCHES_GPIO_PIN_G_H | SWITCHES_GPIO_PIN_G_L | SWITCHES_GPIO_PIN_H | SWITCHES_GPIO_PIN_I_H | SWITCHES_GPIO_PIN_O_H | SWITCHES_GPIO_PIN_P_H | SWITCHES_GPIO_PIN_P_L | SWITCHES_GPIO_PIN_Q_H | SWITCHES_GPIO_PIN_Q_L)
#define KEYS_GPIOG_PINS (TRIMS_GPIO_PIN_LHL | TRIMS_GPIO_PIN_LHR| SWITCHES_GPIO_PIN_B_H | SWITCHES_GPIO_PIN_B_L | SWITCHES_GPIO_PIN_J_H | SWITCHES_GPIO_PIN_J_L | SWITCHES_GPIO_PIN_K_H | SWITCHES_GPIO_PIN_K_L)
#elif defined(PCBX9DP) && PCBREV >= 2019
#elif defined(RADIO_X9DP2019)
#define KEYS_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_GPIOE)
#define KEYS_GPIOA_PINS (GPIO_Pin_5)
#define KEYS_GPIOB_PINS (GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5)
@@ -639,6 +667,12 @@
#define KEYS_GPIOC_PINS (GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3)
#define KEYS_GPIOD_PINS (GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_7 | GPIO_Pin_11 | GPIO_Pin_14 | GPIO_Pin_15)
#define KEYS_GPIOE_PINS (GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15)
#elif defined(RADIO_X7ACCESS)
#define KEYS_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_GPIOE)
#define KEYS_GPIOA_PINS GPIO_Pin_5
#define KEYS_GPIOC_PINS (GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_13)
#define KEYS_GPIOD_PINS (GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_7 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_14 | GPIO_Pin_15)
#define KEYS_GPIOE_PINS (GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15)
#elif defined(RADIO_X7)
#define KEYS_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_GPIOE)
#define KEYS_GPIOA_PINS GPIO_Pin_5
@@ -882,7 +916,7 @@
#define PWR_ON_GPIO_PIN GPIO_Pin_0 // PD.00
#endif
#if defined(PCBX9DP) && PCBREV >= 2019
#if defined(RADIO_X9DP2019)
#define STATUS_LEDS
#define GPIO_LED_GPIO_ON GPIO_ResetBits
#define GPIO_LED_GPIO_OFF GPIO_SetBits
@@ -898,6 +932,14 @@
#define LED_RED_GPIO_PIN GPIO_Pin_4 // PE.04
#define LED_GREEN_GPIO GPIOE
#define LED_GREEN_GPIO_PIN GPIO_Pin_5 // PE.05
#elif defined(PCBX7ACCESS)
#define STATUS_LEDS
#define GPIO_LED_GPIO_ON GPIO_SetBits
#define GPIO_LED_GPIO_OFF GPIO_ResetBits
#define LED_BLUE_GPIO GPIOB
#define LED_BLUE_GPIO_PIN GPIO_Pin_1 // PB.01
#define LED_RED_GPIO GPIOC
#define LED_RED_GPIO_PIN GPIO_Pin_4 // PC.04
#elif defined(PCBX7)
#define STATUS_LEDS
#define GPIO_LED_GPIO_ON GPIO_SetBits
@@ -962,7 +1004,7 @@
#define INTMODULE_BOOTCMD_GPIO GPIOC
#define INTMODULE_BOOTCMD_GPIO_PIN GPIO_Pin_8 // PC.08
#endif
#elif defined(PCBX9DP) && PCBREV >= 2019
#elif defined(RADIO_X9DP2019)
#define INTMODULE_RCC_APB1Periph 0
#define INTMODULE_RCC_APB2Periph RCC_APB2Periph_USART1
#define INTMODULE_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_DMA2)
@@ -982,6 +1024,26 @@
#define INTMODULE_DMA_STREAM_IRQHandler DMA2_Stream7_IRQHandler
#define INTMODULE_DMA_FLAG_TC DMA_IT_TCIF7
#define INTMODULE_DMA_CHANNEL DMA_Channel_4
#elif defined(RADIO_X7ACCESS)
#define INTMODULE_RCC_APB1Periph 0
#define INTMODULE_RCC_APB2Periph RCC_APB2Periph_USART1
#define INTMODULE_RCC_AHB1Periph (RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_DMA2)
#define INTMODULE_PWR_GPIO GPIOC
#define INTMODULE_PWR_GPIO_PIN GPIO_Pin_5 // PC.05
#define INTMODULE_GPIO GPIOB
#define INTMODULE_TX_GPIO_PIN GPIO_Pin_6 // PB.06
#define INTMODULE_RX_GPIO_PIN GPIO_Pin_7 // PB.07
#define INTMODULE_GPIO_PinSource_TX GPIO_PinSource6
#define INTMODULE_GPIO_PinSource_RX GPIO_PinSource7
#define INTMODULE_USART USART1
#define INTMODULE_GPIO_AF GPIO_AF_USART1
#define INTMODULE_USART_IRQHandler USART1_IRQHandler
#define INTMODULE_USART_IRQn USART1_IRQn
#define INTMODULE_DMA_STREAM DMA2_Stream7
#define INTMODULE_DMA_STREAM_IRQ DMA2_Stream7_IRQn
#define INTMODULE_DMA_STREAM_IRQHandler DMA2_Stream7_IRQHandler
#define INTMODULE_DMA_FLAG_TC DMA_IT_TCIF7
#define INTMODULE_DMA_CHANNEL DMA_Channel_4
#elif defined(PCBX9E) || defined(PCBX9DP) || defined(RADIO_X7)
#define INTMODULE_PULSES
#define INTMODULE_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_DMA2)
@@ -1051,9 +1113,9 @@
#endif
// External Module
#if defined(PCBXLITE) || defined(PCBX9LITE) || (defined(PCBX9DP) && PCBREV >= 2019)
#if defined(PCBXLITE) || defined(PCBX9LITE) || defined(RADIO_X9DP2019) || defined(PCBX7ACCESS)
#define EXTMODULE_RCC_APB2Periph (RCC_APB2Periph_TIM8 | RCC_APB2Periph_USART6)
#if defined(PCBX9DP) && PCBREV >= 2019
#if defined(RADIO_X9DP2019) || defined(RADIO_X7ACCESS)
#define EXTMODULE_RCC_AHB1Periph (RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_DMA2)
#define EXTMODULE_PWR_GPIO GPIOD
#define EXTMODULE_PWR_GPIO_PIN GPIO_Pin_8 // PD.08
@@ -1121,7 +1183,7 @@
#define EXTMODULE_TIMER_OUTPUT_ENABLE TIM_CCER_CC1NE
#define EXTMODULE_TIMER_OUTPUT_POLARITY TIM_CCER_CC1NP
#define EXTMODULE_TIMER_FREQ (PERI2_FREQUENCY * TIMER_MULT_APB2)
#elif defined(PCBX9DP) && PCBREV >= 2019
#elif defined(RADIO_X9DP2019)
#define EXTMODULE_RCC_AHB1Periph (RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_DMA2)
#define EXTMODULE_RCC_APB2Periph (RCC_APB2Periph_TIM8 | RCC_APB2Periph_USART6)
#define EXTMODULE_PWR_GPIO GPIOD
@@ -1243,7 +1305,7 @@
#endif
// Serial Port
#if defined(PCBX7) || defined(PCBXLITE) || defined(PCBX9LITE) || (defined(PCBX9DP) && PCBREV >= 2019)
#if defined(PCBX7) || defined(PCBXLITE) || defined(PCBX9LITE) || defined(RADIO_X9DP2019)
#define AUX_SERIAL_RCC_AHB1Periph 0
#define AUX_SERIAL_RCC_APB1Periph 0
#else
@@ -1268,7 +1330,7 @@
#define TELEMETRY_RCC_APB1Periph RCC_APB1Periph_USART2
#define TELEMETRY_DIR_GPIO GPIOD
#define TELEMETRY_DIR_GPIO_PIN GPIO_Pin_4 // PD.04
#if defined(PCBXLITE) || defined(PCBX9LITE) || (defined(PCBX9DP) && PCBREV >= 2019)
#if defined(PCBXLITE) || defined(PCBX9LITE) || defined(RADIO_X9DP2019) || defined(RADIO_X7ACCESS)
#define TELEMETRY_DIR_OUTPUT() TELEMETRY_DIR_GPIO->BSRRH = TELEMETRY_DIR_GPIO_PIN
#define TELEMETRY_DIR_INPUT() TELEMETRY_DIR_GPIO->BSRRL = TELEMETRY_DIR_GPIO_PIN
#else
@@ -1295,9 +1357,9 @@
#define TELEMETRY_EXTI_IRQn EXTI9_5_IRQn
#define TELEMETRY_EXTI_TRIGGER EXTI_Trigger_Rising
#if defined(RADIO_X7)
#if defined(RADIO_X7) || defined(RADIO_X7ACCESS)
#define TELEMETRY_EXTI_REUSE_INTERRUPT_ROTARY_ENCODER
#elif defined(PCBXLITE) || defined(PCBX9LITE) || (defined(PCBX9DP) && PCBREV >= 2019)
#elif defined(PCBXLITE) || defined(PCBX9LITE) || defined(RADIO_X9DP2019)
#define TELEMETRY_EXTI_IRQHandler EXTI9_5_IRQHandler
#else
#define TELEMETRY_EXTI_REUSE_INTERRUPT_INTMODULE_HEARTBEAT
@@ -1324,6 +1386,13 @@
#define SPORT_UPDATE_PWR_GPIO_PIN GPIO_Pin_8 // PD.08
#define GPIO_SPORT_UPDATE_PWR_GPIO_ON GPIO_SetBits
#define GPIO_SPORT_UPDATE_PWR_GPIO_OFF GPIO_ResetBits
#elif defined(PCBX7ACCESS)
#define SPORT_MAX_BAUDRATE 400000
#define SPORT_UPDATE_RCC_AHB1Periph RCC_AHB1Periph_GPIOB
#define SPORT_UPDATE_PWR_GPIO GPIOB
#define SPORT_UPDATE_PWR_GPIO_PIN GPIO_Pin_3 // PB.03
#define GPIO_SPORT_UPDATE_PWR_GPIO_ON GPIO_SetBits
#define GPIO_SPORT_UPDATE_PWR_GPIO_OFF GPIO_ResetBits
#elif defined(PCBX7)
#define SPORT_MAX_BAUDRATE 250000 // < 400000
#define SPORT_UPDATE_RCC_AHB1Periph RCC_AHB1Periph_GPIOB
@@ -1338,7 +1407,7 @@
#define SPORT_UPDATE_PWR_GPIO_PIN GPIO_Pin_15 // PE.15
#define GPIO_SPORT_UPDATE_PWR_GPIO_ON GPIO_SetBits
#define GPIO_SPORT_UPDATE_PWR_GPIO_OFF GPIO_ResetBits
#elif defined(PCBX9DP) && PCBREV >= 2019
#elif defined(RADIO_X9DP2019)
#define SPORT_MAX_BAUDRATE 400000
#define SPORT_UPDATE_RCC_AHB1Periph RCC_AHB1Periph_GPIOA
#define SPORT_UPDATE_PWR_GPIO GPIOA
@@ -1372,17 +1441,27 @@
// #define INTMODULE_HEARTBEAT_EXTI_LINE EXTI_Line9
// #define INTMODULE_HEARTBEAT_EXTI_IRQn EXTI9_5_IRQn
// #define INTMODULE_HEARTBEAT_EXTI_IRQHandler EXTI9_5_IRQHandler
#elif defined(RADIO_X7)
#elif defined(RADIO_X7ACCESS)
#define INTMODULE_HEARTBEAT
#define INTMODULE_HEARTBEAT_REUSE_INTERRUPT_ROTARY_ENCODER
#define INTMODULE_HEARTBEAT_RCC_AHB1Periph RCC_AHB1Periph_GPIOA
#define INTMODULE_HEARTBEAT_GPIO GPIOA
#define INTMODULE_HEARTBEAT_GPIO_PIN GPIO_Pin_7 // PA.07
#define INTMODULE_HEARTBEAT_EXTI_PortSource EXTI_PortSourceGPIOA
#define INTMODULE_HEARTBEAT_EXTI_PinSource GPIO_PinSource7
#define INTMODULE_HEARTBEAT_EXTI_LINE EXTI_Line7
#define INTMODULE_HEARTBEAT_EXTI_IRQn EXTI9_5_IRQn
#elif defined(RADIO_X7)
#define INTMODULE_HEARTBEAT
#define INTMODULE_HEARTBEAT_REUSE_INTERRUPT_ROTARY_ENCODER
#define INTMODULE_HEARTBEAT_RCC_AHB1Periph RCC_AHB1Periph_GPIOC
#define INTMODULE_HEARTBEAT_GPIO GPIOC
#define INTMODULE_HEARTBEAT_GPIO_PIN GPIO_Pin_7
#define INTMODULE_HEARTBEAT_GPIO_PIN GPIO_Pin_7 // PC.07
#define INTMODULE_HEARTBEAT_EXTI_PortSource EXTI_PortSourceGPIOC
#define INTMODULE_HEARTBEAT_EXTI_PinSource GPIO_PinSource7
#define INTMODULE_HEARTBEAT_EXTI_LINE EXTI_Line7
#define INTMODULE_HEARTBEAT_EXTI_IRQn EXTI9_5_IRQn
#elif defined(PCBX9DP) && PCBREV >= 2019
#elif defined(RADIO_X9DP2019)
#define INTMODULE_HEARTBEAT
#define INTMODULE_HEARTBEAT_RCC_AHB1Periph RCC_AHB1Periph_GPIOB
#define INTMODULE_HEARTBEAT_GPIO GPIOB
@@ -1646,7 +1725,16 @@
#define I2C_WP_GPIO_PIN GPIO_Pin_7 // PD.07
#define I2C_SCL_GPIO_PinSource GPIO_PinSource8
#define I2C_SDA_GPIO_PinSource GPIO_PinSource9
#elif defined(PCBX9DP) && PCBREV >= 2019
#elif defined(PCBX7ACCESS)
#define I2C_RCC_AHB1Periph RCC_AHB1Periph_GPIOB
#define I2C_SPI_GPIO GPIOB
#define I2C_SDA_GPIO_PIN GPIO_Pin_9 // PB.09
#define I2C_SCL_GPIO_PIN GPIO_Pin_8 // PB.08
#define I2C_WP_GPIO GPIOB
#define I2C_WP_GPIO_PIN GPIO_Pin_5 // PB.05
#define I2C_SDA_GPIO_PinSource GPIO_PinSource9
#define I2C_SCL_GPIO_PinSource GPIO_PinSource8
#elif defined(RADIO_X9DP2019)
#define I2C_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOF)
#define I2C_SPI_GPIO GPIOB
#define I2C_SDA_GPIO_PIN GPIO_Pin_9 // PB.09
@@ -1759,7 +1847,7 @@
#define HAPTIC_CCMR1 TIM_CCMR1_OC2M_1 | TIM_CCMR1_OC2M_2
#define HAPTIC_CCER TIM_CCER_CC2E
#define BACKLIGHT_BDTR TIM_BDTR_MOE
#elif defined(PCBX9DP) && PCBREV >= 2019
#elif defined(RADIO_X9DP2019) || defined(RADIO_X7ACCESS)
#define HAPTIC_PWM
#define HAPTIC_RCC_AHB1Periph RCC_AHB1Periph_GPIOA
#define HAPTIC_RCC_APB2Periph RCC_APB2Periph_TIM1
@@ -1827,7 +1915,7 @@
#define BT_TX_GPIO_PinSource GPIO_PinSource14
#define BT_RX_GPIO_PinSource GPIO_PinSource9
#define BT_USART_IRQHandler USART6_IRQHandler
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBX9LITES) || (defined(PCBX9DP) && PCBREV >= 2019)
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBX9LITES) || defined(RADIO_X9DP2019)
#define STORAGE_BLUETOOTH
#define BT_RCC_APB1Periph RCC_APB1Periph_USART3
#define BT_RCC_APB2Periph 0
+7 -1
View File
@@ -195,6 +195,12 @@ uint32_t switchState(uint8_t index)
#elif defined(PCBXLITE)
ADD_3POS_CASE(D, 3);
// no SWE, SWF, SWG and SWH on XLITE
#elif defined(PCBX7ACCESS)
ADD_3POS_CASE(D, 3);
ADD_2POS_CASE(F);
ADD_2POS_CASE(H);
ADD_2POS_CASE(I);
// no SWJ on XLITE
#elif defined(PCBX7)
ADD_3POS_CASE(D, 3);
ADD_2POS_CASE(F);
@@ -209,7 +215,7 @@ uint32_t switchState(uint8_t index)
ADD_2POS_CASE(H);
#endif
#if defined(PCBX9DP) && PCBREV >= 2019
#if defined(RADIO_X9DP2019)
ADD_2POS_CASE(I);
#endif
+1 -1
View File
@@ -311,7 +311,7 @@ void lcdInit()
issued by the other parts of the code.
*/
#if defined(PCBX9DP) && PCBREV >= 2019
#if defined(RADIO_X9DP2019) || defined(RADIO_X7ACCESS)
#define LCD_DELAY_NEEDED() true
#else
#define LCD_DELAY_NEEDED() (!WAS_RESET_BY_WATCHDOG_OR_SOFTWARE())
+5
View File
@@ -149,6 +149,11 @@ inline uint8_t modelTelemetryProtocol()
if (!sportUsed && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_MULTIMODULE) {
return PROTOCOL_TELEMETRY_MULTIMODULE;
}
#if defined(INTERNAL_MODULE_MULTI)
if (g_model.moduleData[INTERNAL_MODULE].type == MODULE_TYPE_MULTIMODULE) {
return PROTOCOL_TELEMETRY_MULTIMODULE;
}
#endif
#endif
// default choice
return PROTOCOL_TELEMETRY_FRSKY_SPORT;
+5 -5
View File
@@ -39,14 +39,14 @@
#define TR_POTS_VSRCRAW "\310F1\0""\310F2\0""\310F3\0""\310F4\0""\311S1\0""\311S2\0""\311LS\0""\311RS\0"
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0""\312SF\0""\312SG\0""\312SH\0""\312SI\0""\312SJ\0""\312SK\0""\312SL\0""\312SM\0""\312SN\0""\312SO\0""\312SP\0""\312SQ\0""\312SR\0"
#elif defined(PCBXLITE)
#define TR_POTS_VSRCRAW "\210S1\0""\210S2\0"
#define TR_SW_VSRCRAW "\212SA\0""\212SB\0""\212SC\0""\212SD\0""\312SE\0""\312SF\0"
#elif defined(RADIO_X7)
#define TR_POTS_VSRCRAW "\210S1\0""\210S2\0"
#define TR_SW_VSRCRAW "\212SA\0""\212SB\0""\212SC\0""\212SD\0""\212SF\0""\212SH\0""\212SI\0""\212SJ\0"
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0"
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0""\312SF\0"
#elif defined(RADIO_T12)
#define TR_POTS_VSRCRAW "\210S1\0""\210S2\0"
#define TR_SW_VSRCRAW "\212SA\0""\212SB\0""\212SC\0""\212SD\0""\212SG\0""\212SH\0""\212SI\0""\212SJ\0"
#elif defined(PCBX7)
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0"
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SF\0""\312SH\0""\312SI\0""\312SJ\0"
#elif defined(PCBX9LITES)
#define TR_POTS_VSRCRAW "\310S1\0"
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0""\312SF\0""\312SG\0"
+6
View File
@@ -0,0 +1,6 @@
def filename(idx):
ext = ".wav"
if isinstance(idx, int):
return "%04d%s" % (idx, ext)
else:
return idx + ext
+44 -45
View File
@@ -2,21 +2,20 @@
# Czech language sounds configuration
from tts_common import filename, NO_ALTERNATE, PROMPT_SYSTEM_BASE, PROMPT_CUSTOM_BASE
from tts_common import filename
systemSounds = []
sounds = []
for i, s in enumerate(["nula", "jedna", "dva"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + i)))
systemSounds.append((s, filename(i)))
for i in range(97):
systemSounds.append((str(3 + i), filename(PROMPT_SYSTEM_BASE + 3 + i)))
for i, s in enumerate(["sto", "dvěsta", "třista", "čtyřista", "pětset", "šestset", "sedmset", "osmset",
"devětset", "tisíc"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 100 + i)))
systemSounds.append((str(3 + i), filename(3 + i)))
for i, s in enumerate(["sto", "dvěsta", "třista", "čtyřista", "pětset", "šestset", "sedmset", "osmset", "devětset", "tisíc"]):
systemSounds.append((s, filename(100 + i)))
for i, s in enumerate(["tisíce", "jeden", "jedno", "dvě", "celá", "celé", "celých", "mínus"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 110 + i)))
systemSounds.append((s, filename(110 + i)))
for i, (s, f) in enumerate([("volt", "volt0"), ("volty", "volt1"), ("voltů", "volt2"),("voltu", "volt3"),
("ampér", "amp0"), ("ampéry", "amp1"), ("ampérů", "amp2"), ("ampéru", "amp3"),
("miliampér", "mamp0"), ("miliampéry", "mamp1"), ("miliampérů", "mamp2"), ("miliampéru", "mamp3"),
@@ -45,43 +44,43 @@ for i, (s, f) in enumerate([("volt", "volt0"), ("volty", "volt1"), ("voltů", "v
("minuta", "minute0"), ("minuty", "minute1"), ("minut", "minute2"), ("minuty", "minute3"),
("sekunda", "second0"), ("sekundy", "second1"), ("sekund", "second2"), ("sekundy", "second3"),
]):
systemSounds.append((s, filename(f, PROMPT_SYSTEM_BASE + 118 + i)))
for s, f, a in [("střed trimu", "midtrim", 495),
("maximum trimu", "maxtrim", NO_ALTERNATE),
("minimum trimu", "mintrim", NO_ALTERNATE),
("stopky 1 doběhly", "timovr1", NO_ALTERNATE),
("stopky 2 doběhly", "timovr2", NO_ALTERNATE),
("stopky 3 doběhly", "timovr3", NO_ALTERNATE),
("baterie rádia je vybitá", "lowbatt", 485),
("zapoměl jsi na mě!", "inactiv", 486),
("plyn není na nule", "thralert", 481),
("přepínače nejsou ve výchozí poloze", "swalert", 482),
("neplatná eeprom", "eebad", 483),
("Žádám o povolení ke startu.", "hello", 480),
("Tak zase příště!", "bye", 480),
("dvacet sekund", "timer20", 500),
("třicet sekund", "timer30", 501),
("A1,nízká", "a1_org", NO_ALTERNATE),
("A1,kritická", "a1_red", NO_ALTERNATE),
("A2,nízká", "a2_org", NO_ALTERNATE),
("A2,kritická", "a2_red", NO_ALTERNATE),
("A3,nízká", "a3_org", NO_ALTERNATE),
("A3,kritická", "a3_red", NO_ALTERNATE),
("A4,nízká", "a4_org", NO_ALTERNATE),
("A4,kritická", "a4_red", NO_ALTERNATE),
("nízký RF signál", "rssi_org", NO_ALTERNATE),
("kritický RF signál", "rssi_red", NO_ALTERNATE),
("problém s anténou rádia", "swr_red", NO_ALTERNATE),
("telemetrie ztracena", "telemko", NO_ALTERNATE),
("telemetrie je funkční", "telemok", NO_ALTERNATE),
("trenér port odpojen", "trainko", NO_ALTERNATE),
("trenér port připojen", "trainok", NO_ALTERNATE),
("senzor ztracen", "sensorko", NO_ALTERNATE),
("servo přetíženo", "servoko", NO_ALTERNATE),
("r f přebuzeno", "rxko", NO_ALTERNATE),
("receiver still connected", "modelpwr", NO_ALTERNATE),
]:
systemSounds.append((s, filename(f, a)))
systemSounds.append((s, filename(f)))
for s, f in [("střed trimu", "midtrim"),
("maximum trimu", "maxtrim"),
("minimum trimu", "mintrim"),
("stopky 1 doběhly", "timovr1"),
("stopky 2 doběhly", "timovr2"),
("stopky 3 doběhly", "timovr3"),
("baterie rádia je vybitá", "lowbatt"),
("zapoměl jsi na mě!", "inactiv"),
("plyn není na nule", "thralert"),
("přepínače nejsou ve výchozí poloze", "swalert"),
("neplatná eeprom", "eebad"),
("Žádám o povolení ke startu.", "hello"),
("Tak zase příště!", "bye"),
("dvacet sekund", "timer20"),
("třicet sekund", "timer30"),
("A1,nízká", "a1_org"),
("A1,kritická", "a1_red"),
("A2,nízká", "a2_org"),
("A2,kritická", "a2_red"),
("A3,nízká", "a3_org"),
("A3,kritická", "a3_red"),
("A4,nízká", "a4_org"),
("A4,kritická", "a4_red"),
("nízký RF signál", "rssi_org"),
("kritický RF signál", "rssi_red"),
("problém s anténou rádia", "swr_red"),
("telemetrie ztracena", "telemko"),
("telemetrie je funkční", "telemok"),
("trenér port odpojen", "trainko"),
("trenér port připojen", "trainok"),
("senzor ztracen", "sensorko"),
("servo přetíženo", "servoko"),
("r f přebuzeno", "rxko"),
("receiver still connected", "modelpwr"),
]:
systemSounds.append((s, filename(f)))
for i, (s, f) in enumerate([("podvozek je zasunut", "podvo0"),
("podvozek je vysunut", "podvo1"),
("klapky jsou zapnuty", "klapk1"),
@@ -113,4 +112,4 @@ for i, (s, f) in enumerate([("podvozek je zasunut", "podvo0"),
("letový režim sedm", "fm-7"),
("letový režim osm", "fm-8"),
]):
sounds.append((s, filename(f, PROMPT_CUSTOM_BASE + i)))
sounds.append((s, filename(f)))
+51 -51
View File
@@ -2,21 +2,21 @@
# German language sounds configuration
from tts_common import filename, NO_ALTERNATE, PROMPT_SYSTEM_BASE, PROMPT_CUSTOM_BASE
from tts_common import filename
systemSounds = []
sounds = []
for i in range(100):
systemSounds.append((str(i), filename(PROMPT_SYSTEM_BASE + i)))
systemSounds.append(("ein", filename(PROMPT_SYSTEM_BASE + 100)))
systemSounds.append(("eine", filename(PROMPT_SYSTEM_BASE + 101)))
systemSounds.append(("hundert", filename(PROMPT_SYSTEM_BASE + 102)))
systemSounds.append(("tausend", filename(PROMPT_SYSTEM_BASE + 103)))
systemSounds.append((str(i), filename(i)))
systemSounds.append(("ein", filename(100)))
systemSounds.append(("eine", filename(101)))
systemSounds.append(("hundert", filename(102)))
systemSounds.append(("tausend", filename(103)))
for i, s in enumerate(["komma", "und", "minus", "uhr", "minute", "minuten", "sekunde", "sekunden", "stunde", "stunden"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 104 + i)))
for i, (s, f) in enumerate([("Wolt","volt0"),
systemSounds.append((s, filename(104 + i)))
for i, (s, f) in enumerate([("Wolt", "volt0"),
("Ampär", "amp0"),
("MilliAmpär", "mamp0"),
("Knoten", "knot0"),
@@ -44,52 +44,52 @@ for i, (s, f) in enumerate([("Wolt","volt0"),
("Minute", "minute0"), ("Minuten", "minute1"),
("Sekunde", "second0"), ("Sekunden", "second1"),
]):
systemSounds.append((s, filename(f, PROMPT_SYSTEM_BASE + 114 + i)))
for s, f, a in [("Inaktivitätsalarm", "inactiv", 486),
("Senderspannung schwach", "lowbatt", 485),
("Gaskanal nicht Null, bitte prüfen", "thralert", 481),
("Schalter fehlpositioniert, bitte prüfen", "swalert", 482),
("EEPROM fehlerhaft", "eebad", NO_ALTERNATE),
("EEPROM formatiert", "eeformat", NO_ALTERNATE),
("Fehler", "error", NO_ALTERNATE),
("Trim zentriert", "midtrim", 495),
("Poti zentriert", "midpot", 496),
("Obere Trimmungsgrenze erreicht", "maxtrim", NO_ALTERNATE),
("Untere Trimmungsgrenze erreicht", "mintrim", NO_ALTERNATE),
("20 Sekunden", "timer20", 500),
("30 Sekunden", "timer30", 501),
("Senderstrom zu hoch!", "highmah", NO_ALTERNATE),
("Sendertemperatur zu hoch!", "hightemp", NO_ALTERNATE),
("A1 schwach!", "a1_org", NO_ALTERNATE),
("A1 kritisch!", "a1_red", NO_ALTERNATE),
("A2 schwach!", "a2_org", NO_ALTERNATE),
("A2 kritisch!", "a2_red", NO_ALTERNATE),
("A3 schwach!", "a3_org", NO_ALTERNATE),
("A3 kritisch!", "a3_red", NO_ALTERNATE),
("A4 schwach!", "a4_org", NO_ALTERNATE),
("A4 kritisch!", "a4_red", NO_ALTERNATE),
("Funksignal schwach!", "rssi_org", NO_ALTERNATE),
("Funksignal kritisch!", "rssi_red", NO_ALTERNATE),
("Problem mit der Sender Antenne", "swr_red", NO_ALTERNATE),
("Telemetrie verloren", "telemko", NO_ALTERNATE),
("Telemetrie wiederhergestellt", "telemok", NO_ALTERNATE),
("Schülersignal verloren", "trainko", NO_ALTERNATE),
("Schülersignal wiederhergestellt", "trainok", NO_ALTERNATE),
("servo overload", "servoko", NO_ALTERNATE),
("power overload", "rxko", NO_ALTERNATE),
("Empfänger noch verbunden", "modelpwr", NO_ALTERNATE),
("timer eins abgelaufen", "timovr1", NO_ALTERNATE),
("timer zwei abgelaufen", "timovr2", NO_ALTERNATE),
("timer drei abgelaufen", "timovr3", NO_ALTERNATE),
("Sensor verloren", "sensorko", NO_ALTERNATE),
("Willkommen bei open te ix", "hello", 480),
]:
systemSounds.append((s, filename(f, a)))
systemSounds.append((s, filename(f)))
for s, f in [("Inaktivitätsalarm", "inactiv"),
("Senderspannung schwach", "lowbatt"),
("Gaskanal nicht Null, bitte prüfen", "thralert"),
("Schalter fehlpositioniert, bitte prüfen", "swalert"),
("EEPROM fehlerhaft", "eebad"),
("EEPROM formatiert", "eeformat"),
("Fehler", "error"),
("Trim zentriert", "midtrim"),
("Poti zentriert", "midpot"),
("Obere Trimmungsgrenze erreicht", "maxtrim"),
("Untere Trimmungsgrenze erreicht", "mintrim"),
("20 Sekunden", "timer20"),
("30 Sekunden", "timer30"),
("Senderstrom zu hoch!", "highmah"),
("Sendertemperatur zu hoch!", "hightemp"),
("A1 schwach!", "a1_org"),
("A1 kritisch!", "a1_red"),
("A2 schwach!", "a2_org"),
("A2 kritisch!", "a2_red"),
("A3 schwach!", "a3_org"),
("A3 kritisch!", "a3_red"),
("A4 schwach!", "a4_org"),
("A4 kritisch!", "a4_red"),
("Funksignal schwach!", "rssi_org"),
("Funksignal kritisch!", "rssi_red"),
("Problem mit der Sender Antenne", "swr_red"),
("Telemetrie verloren", "telemko"),
("Telemetrie wiederhergestellt", "telemok"),
("Schülersignal verloren", "trainko"),
("Schülersignal wiederhergestellt", "trainok"),
("servo overload", "servoko"),
("power overload", "rxko"),
("Empfänger noch verbunden", "modelpwr"),
("timer eins abgelaufen", "timovr1"),
("timer zwei abgelaufen", "timovr2"),
("timer drei abgelaufen", "timovr3"),
("Sensor verloren", "sensorko"),
("Willkommen bei open te ix", "hello"),
]:
systemSounds.append((s, filename(f)))
for i, s in enumerate(["Uhr", "Uhr", "Sender", "Empfang", "A1", "A2", "Hoehe", "Motor",
"Treibstoff", "Temperatur", "Temperatur", "Geschwindigkeit", "Entfernung", "Höhe", "Lipo-Zelle",
"Zellen gesamt", "Spannung", "Strom", "Verbrauch", "Power", "Beschleunigung X", "Beschleunigung Y", "Beschleunigung Z",
"Richtung", "Variometer", "Minimum", "Maximum"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 134 + i)))
systemSounds.append((s, filename(134 + i)))
for i, (s, f) in enumerate([("Fahrwerk eingezogen", "gearup"),
("Fahrwerk ausgefahren", "geardn"),
("Klappen eingefahren", "flapup"),
@@ -117,4 +117,4 @@ for i, (s, f) in enumerate([("Fahrwerk eingezogen", "gearup"),
("Flugmodus 8", "fm-8"),
("Flugmodus 9", "fm-9"),
]):
sounds.append((s, filename(f, PROMPT_CUSTOM_BASE + i)))
sounds.append((s, filename(f)))
+32 -32
View File
@@ -2,18 +2,18 @@
# English language sounds configuration
from tts_common import filename, NO_ALTERNATE, PROMPT_SYSTEM_BASE, PROMPT_CUSTOM_BASE
from tts_common import filename
systemSounds = []
sounds = []
for i in range(100):
systemSounds.append((str(i), filename(PROMPT_SYSTEM_BASE + i)))
systemSounds.append((str(i), filename(i)))
for i in range(9):
systemSounds.append((str(100 * (i + 1)), filename(PROMPT_SYSTEM_BASE + 100 + i)))
systemSounds.append((str(100 * (i + 1)), filename(100 + i)))
for i, s in enumerate(["thousand", "and", "minus", "point"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 109 + i)))
systemSounds.append((s, filename(109 + i)))
for i, (s, f) in enumerate([("volt", "volt0"), ("volts", "volt1"),
("amp", "amp0"), ("amps", "amp1"),
("milliamp", "mamp0"), ("milliamps", "mamp1"),
@@ -42,36 +42,36 @@ for i, (s, f) in enumerate([("volt", "volt0"), ("volts", "volt1"),
("minute", "minute0"), ("minutes", "minute1"),
("second", "second0"), ("seconds", "second1"),
]):
systemSounds.append((s, filename(f, PROMPT_SYSTEM_BASE + 115 + i)))
systemSounds.append((s, filename(f)))
for i, s in enumerate(["point zero", "point one", "point two", "point three",
"point four", "point five", "point six",
"point seven", "point eight", "point nine"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 167 + i)))
for s, f, a in [("trim center", "midtrim", 495),
("maximum trim reached", "maxtrim", NO_ALTERNATE),
("minimum trim reached", "mintrim", NO_ALTERNATE),
("timer 1 elapsed", "timovr1", NO_ALTERNATE),
("timer 2 elapsed", "timovr2", NO_ALTERNATE),
("timer 3 elapsed", "timovr3", NO_ALTERNATE),
("transmitter battery low", "lowbatt", 485),
("inactivity alarm", "inactiv", 486),
("throttle warning", "thralert", 481),
("switch warning", "swalert", 482),
("bad eeprom", "eebad", 483),
("Welcome to open tea ex!", "hello", 480),
("RF signal, low", "rssi_org", NO_ALTERNATE),
("RF signal, critical", "rssi_red", NO_ALTERNATE),
("radio antenna defective", "swr_red", NO_ALTERNATE),
("telemetry lost", "telemko", NO_ALTERNATE),
("telemetry recovered", "telemok", NO_ALTERNATE),
("trainer signal lost", "trainko", NO_ALTERNATE),
("trainer signal recovered", "trainok", NO_ALTERNATE),
("sensor lost", "sensorko", NO_ALTERNATE),
("servo overload", "servoko", NO_ALTERNATE),
("power overload", "rxko", NO_ALTERNATE),
("receiver still connected", "modelpwr", NO_ALTERNATE),
]:
systemSounds.append((s, filename(f, a)))
systemSounds.append((s, filename(167 + i)))
for s, f in [("trim center", "midtrim"),
("maximum trim reached", "maxtrim"),
("minimum trim reached", "mintrim"),
("timer 1 elapsed", "timovr1"),
("timer 2 elapsed", "timovr2"),
("timer 3 elapsed", "timovr3"),
("transmitter battery low", "lowbatt"),
("inactivity alarm", "inactiv"),
("throttle warning", "thralert"),
("switch warning", "swalert"),
("bad eeprom", "eebad"),
("Welcome to open tea ex!", "hello"),
("RF signal, low", "rssi_org"),
("RF signal, critical", "rssi_red"),
("radio antenna defective", "swr_red"),
("telemetry lost", "telemko"),
("telemetry recovered", "telemok"),
("trainer signal lost", "trainko"),
("trainer signal recovered", "trainok"),
("sensor lost", "sensorko"),
("servo overload", "servoko"),
("power overload", "rxko"),
("receiver still connected", "modelpwr"),
]:
systemSounds.append((s, filename(f)))
for i, (s, f) in enumerate([("gear!, up!", "gearup"),
("gear!, down!", "geardn"),
("flaps!, up!", "flapup"),
@@ -118,4 +118,4 @@ for i, (s, f) in enumerate([("gear!, up!", "gearup"),
("flight mode thermal left", "fm-thl"),
("flight mode thermal right", "fm-thr"),
]):
sounds.append((s, filename(f, PROMPT_CUSTOM_BASE + i)))
sounds.append((s, filename(f)))
+45 -45
View File
@@ -2,26 +2,26 @@
# Spanish language sounds configuration
from tts_common import filename, NO_ALTERNATE, PROMPT_SYSTEM_BASE, PROMPT_CUSTOM_BASE
from tts_common import filename
systemSounds = []
sounds = []
for i in range(101):
systemSounds.append((str(i), filename(PROMPT_SYSTEM_BASE + i)))
systemSounds.append(("ciento", filename(PROMPT_SYSTEM_BASE + 101)))
systemSounds.append(("doscientos", filename(PROMPT_SYSTEM_BASE + 102)))
systemSounds.append(("trescientos", filename(PROMPT_SYSTEM_BASE + 103)))
systemSounds.append(("cuatrocientos", filename(PROMPT_SYSTEM_BASE + 104)))
systemSounds.append(("quinientos", filename(PROMPT_SYSTEM_BASE + 105)))
systemSounds.append(("sescientos", filename(PROMPT_SYSTEM_BASE + 106)))
systemSounds.append(("setecientos", filename(PROMPT_SYSTEM_BASE + 107)))
systemSounds.append(("ochocientos", filename(PROMPT_SYSTEM_BASE + 108)))
systemSounds.append(("nuevecientos", filename(PROMPT_SYSTEM_BASE + 109)))
systemSounds.append(("mil", filename(PROMPT_SYSTEM_BASE + 110)))
systemSounds.append((str(i), filename(i)))
systemSounds.append(("ciento", filename(101)))
systemSounds.append(("doscientos", filename(102)))
systemSounds.append(("trescientos", filename(103)))
systemSounds.append(("cuatrocientos", filename(104)))
systemSounds.append(("quinientos", filename(105)))
systemSounds.append(("sescientos", filename(106)))
systemSounds.append(("setecientos", filename(107)))
systemSounds.append(("ochocientos", filename(108)))
systemSounds.append(("nuevecientos", filename(109)))
systemSounds.append(("mil", filename(110)))
for i, s in enumerate(["coma", "un", "una", "i", "meno", "hora", "horas", "minuto", "minutos", "segundo", "segundos"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 111 + i)))
systemSounds.append((s, filename(111 + i)))
for i, (s, f) in enumerate([("Voltio","volt0"),
("ampério", "amp0"),
("miliamperios", "mamp0"),
@@ -50,41 +50,41 @@ for i, (s, f) in enumerate([("Voltio","volt0"),
("minuto", "minute0"), ("minutos", "minute1"),
("segundo", "second0"), ("segundos", "second1"),
]):
systemSounds.append((s, filename(f, PROMPT_SYSTEM_BASE + 122 + i)))
for s, f, a in [("me tienes abandonada", "inactiv", 486),
("batería del transmisor baja", "lowbatt", 485),
("El acelerador está activado, por favor, corrijalo", "thralert", 481),
("Los interruptores no están en la posición correcta, por favor corrijalo", "swalert", 482),
("eeprom corrompida", "eebad", NO_ALTERNATE),
("Formateo de eeprom en curso", "eeformat", NO_ALTERNATE),
("error", "error", NO_ALTERNATE),
("trim centrado", "midtrim", 495),
("potenciómetro centrado", "midpot", 496),
("trim al máximo", "maxtrim", NO_ALTERNATE),
("trim al mínima", "mintrim", NO_ALTERNATE),
("20 segundos", "timer20", 500),
("30 segundos", "timer30", 501),
("assorbimiento elevado", "highmah", NO_ALTERNATE),
("temperatura elevada", "hightemp", NO_ALTERNATE),
("Alarma A1", "a1_org", NO_ALTERNATE),
("A1 crítica", "a1_red", NO_ALTERNATE),
("Alarma A2", "a2_org", NO_ALTERNATE),
("A2 crítica", "a2_red", NO_ALTERNATE),
("recepcion de señal baja", "rssi_org", NO_ALTERNATE),
("recepción de señal crítica", "rssi_red", NO_ALTERNATE),
("Problemas con la antena del transmisor", "swr_red", NO_ALTERNATE),
("Sin telemetría", "telemko", NO_ALTERNATE),
("Telemetría disponible", "telemok", NO_ALTERNATE),
("servo overload", "servoko", NO_ALTERNATE),
("power overload", "rxko", NO_ALTERNATE),
("receiver still connected", "modelpwr", NO_ALTERNATE),
]:
systemSounds.append((s, filename(f, a)))
systemSounds.append((s, filename(f)))
for s, f in [("me tienes abandonada", "inactiv"),
("batería del transmisor baja", "lowbatt"),
("El acelerador está activado, por favor, corrijalo", "thralert"),
("Los interruptores no están en la posición correcta, por favor corrijalo", "swalert"),
("eeprom corrompida", "eebad"),
("Formateo de eeprom en curso", "eeformat"),
("error", "error"),
("trim centrado", "midtrim"),
("potenciómetro centrado", "midpot"),
("trim al máximo", "maxtrim"),
("trim al mínima", "mintrim"),
("20 segundos", "timer20"),
("30 segundos", "timer30"),
("assorbimiento elevado", "highmah"),
("temperatura elevada", "hightemp"),
("Alarma A1", "a1_org"),
("A1 crítica", "a1_red"),
("Alarma A2", "a2_org"),
("A2 crítica", "a2_red"),
("recepcion de señal baja", "rssi_org"),
("recepción de señal crítica", "rssi_red"),
("Problemas con la antena del transmisor", "swr_red"),
("Sin telemetría", "telemko"),
("Telemetría disponible", "telemok"),
("servo overload", "servoko"),
("power overload", "rxko"),
("receiver still connected", "modelpwr"),
]:
systemSounds.append((s, filename(f)))
for i, s in enumerate(["cronómetro", "cronómetro", "transmisión", "recepción", "A1", "A2", "altitud", "motor",
"combustible", "temperatura", "temperatura", "velocidad", "distancia", "altitude", "célula lipo",
"Total lipo", "voltaje", "corriente", "consumo", "potencia", "aceleración X", "aceleración Y", "aceleración Z",
"dirección", "variómetro", "minimo", "máximo"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 141 + i)))
systemSounds.append((s, filename(141 + i)))
for i, (s, f) in enumerate([("tren arriba.", "gearup"),
("tren abajo.", "geardn"),
("flaps arriba", "flapup"),
@@ -111,4 +111,4 @@ for i, (s, f) in enumerate([("tren arriba.", "gearup"),
("fase de vuelo 8", "fltmd8"),
("fase de vuelo 9", "fltmd9"),
]):
sounds.append((s, filename(f, PROMPT_CUSTOM_BASE + i)))
sounds.append((s, filename(f)))
+34 -34
View File
@@ -2,20 +2,20 @@
# French language sounds configuration
from tts_common import filename, NO_ALTERNATE, PROMPT_SYSTEM_BASE, PROMPT_CUSTOM_BASE
from tts_common import filename
systemSounds = []
sounds = []
for i in range(100):
systemSounds.append((str(i), filename(PROMPT_SYSTEM_BASE + i)))
systemSounds.append((str(i), filename(i)))
for i in range(10):
systemSounds.append((str(100 * (i + 1)), filename(PROMPT_SYSTEM_BASE + 100 + i)))
systemSounds.append((str(100 * (i + 1)), filename(100 + i)))
for i, s in enumerate(["une", "onze", "vingt et une", "trente et une", "quarante et une", "cinquante et une", "soixante et une", "soixante et onze", "quatre vingt une"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 110 + i)))
systemSounds.append((s, filename(110 + i)))
for i, s in enumerate(["virgule", "et", "moins", "minuit", "midi"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 119 + i)))
for i, (s, f) in enumerate([("volts","volt0"),
systemSounds.append((s, filename(119 + i)))
for i, (s, f) in enumerate([("volts", "volt0"),
("ampères", "amp0"),
("milli ampères", "mamp0"),
("noeud", "knot0"),
@@ -43,34 +43,34 @@ for i, (s, f) in enumerate([("volts","volt0"),
("minute", "minute0"),
("seconde", "second0"),
]):
systemSounds.append((s, filename(f, PROMPT_SYSTEM_BASE + 125 + i)))
systemSounds.append((s, filename(f)))
for i, s in enumerate(["virgule 0", "virgule 1", "virgule 2", "virgule 3", "virgule 4", "virgule 5", "virgule 6", "virgule 7", "virgule 8", "virgule 9"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 180 + i)))
for s, f, a in [("Trim centré", "midtrim", 495),
("Trim maximum atteint", "maxtrim", NO_ALTERNATE),
("Trim minimum atteint", "mintrim", NO_ALTERNATE),
("Chrono 1 à 0", "timovr1", NO_ALTERNATE),
("Chrono 2 à 0", "timovr2", NO_ALTERNATE),
("Chrono 3 à 0", "timovr3", NO_ALTERNATE),
("Batterie radio faible !", "lowbatt", 485),
("Radio inactive !", "inactiv", 486),
("Alerte manche des gaz", "thralert", 481),
("Alerte inters", "swalert", 482),
("éprome corrompue", "eebad", 483),
("Bienvenue sur o pun t x", "hello", 480),
("Signal RF, faible", "rssi_org", NO_ALTERNATE),
("Signal RF, critique", "rssi_red", NO_ALTERNATE),
("Antenne défectueuse", "swr_red", NO_ALTERNATE),
("Télémétrie perdue", "telemko", NO_ALTERNATE),
("Télémétrie retrouvée", "telemok", NO_ALTERNATE),
("Signal écolage perdu", "trainko", NO_ALTERNATE),
("Signal écolage retrouvé", "trainok", NO_ALTERNATE),
("Sonde de télémétrie perdue", "sensorko", NO_ALTERNATE),
("Servo en surcharge", "servoko", NO_ALTERNATE),
("Surcharge réception", "rxko", NO_ALTERNATE),
("Récepteur encore sous tension", "modelpwr", NO_ALTERNATE),
]:
systemSounds.append((s, filename(f, a)))
systemSounds.append((s, filename(180 + i)))
for s, f in [("Trim centré", "midtrim"),
("Trim maximum atteint", "maxtrim"),
("Trim minimum atteint", "mintrim"),
("Chrono 1 à 0", "timovr1"),
("Chrono 2 à 0", "timovr2"),
("Chrono 3 à 0", "timovr3"),
("Batterie radio faible !", "lowbatt"),
("Radio inactive !", "inactiv"),
("Alerte manche des gaz", "thralert"),
("Alerte inters", "swalert"),
("éprome corrompue", "eebad"),
("Bienvenue sur o pun t x", "hello"),
("Signal RF, faible", "rssi_org"),
("Signal RF, critique", "rssi_red"),
("Antenne défectueuse", "swr_red"),
("Télémétrie perdue", "telemko"),
("Télémétrie retrouvée", "telemok"),
("Signal écolage perdu", "trainko"),
("Signal écolage retrouvé", "trainok"),
("Sonde de télémétrie perdue", "sensorko"),
("Servo en surcharge", "servoko"),
("Surcharge réception", "rxko"),
("Récepteur encore sous tension", "modelpwr"),
]:
systemSounds.append((s, filename(f)))
for i, (s, f) in enumerate([("altitude", "altitude"),
("température moteur", "moteur"),
("température contrôleur", "cntrleur"),
@@ -112,4 +112,4 @@ for i, (s, f) in enumerate([("altitude", "altitude"),
("mode de vol thermique gauche", "fm-thl"),
("mode de vol thermique droit", "fm-thr"),
]):
sounds.append((s, filename(f, PROMPT_CUSTOM_BASE + i)))
sounds.append((s, filename(f)))
+44 -44
View File
@@ -2,18 +2,18 @@
# Italian language sounds configuration
from tts_common import filename, NO_ALTERNATE, PROMPT_SYSTEM_BASE, PROMPT_CUSTOM_BASE
from tts_common import filename
systemSounds = []
sounds = []
for i in range(101):
systemSounds.append((str(i), filename(PROMPT_SYSTEM_BASE + i)))
systemSounds.append(("mila", filename(PROMPT_SYSTEM_BASE + 101)))
systemSounds.append(("mille", filename(PROMPT_SYSTEM_BASE + 102)))
systemSounds.append((str(i), filename(i)))
systemSounds.append(("mila", filename(101)))
systemSounds.append(("mille", filename(102)))
for i, s in enumerate(["virgola", "un", "e", "meno", "ora", "ore", "minuto", "minuti", "secondo", "secondi"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 103 + i)))
systemSounds.append((s, filename(103 + i)))
for i, (s, f) in enumerate([("volt", "volt0"),
("ampere", "amp0"),
("milliampere", "mamp0"),
@@ -42,48 +42,48 @@ for i, (s, f) in enumerate([("volt", "volt0"),
("minuto", "minute0"), ("minuti", "minute1"),
("secondo", "second0"), ("secondi", "second1"),
]):
systemSounds.append((s, filename(f, PROMPT_SYSTEM_BASE + 116 + i)))
for s, f, a in [("radio inattiva controllare", "inactiv", 486),
("batteria della radio scarica", "lowbatt", 485),
("controllo motore non in posizione, verificare", "thralert", 481),
("interruttori non in posizione, verificare", "swalert", 482),
("eeprom corrotta", "eebad", NO_ALTERNATE),
("formattazione eeprom in corso", "eeformat", NO_ALTERNATE),
("errore", "error", NO_ALTERNATE),
("trim centrato", "midtrim", 495),
("potenziometro centrato", "midpot", 496),
("massimo trim raggiunto", "maxtrim", NO_ALTERNATE),
("minimo trim raggiunto", "mintrim", NO_ALTERNATE),
("venti secondi", "timer20", 500),
("trenta secondi", "timer30", 501),
("assorbimento elevato", "highmah", NO_ALTERNATE),
("temperatura elevata", "hightemp", NO_ALTERNATE),
("A1 in allarme", "a1_org", NO_ALTERNATE),
("A1 critico", "a1_red", NO_ALTERNATE),
("A2 in allarme", "a2_org", NO_ALTERNATE),
("A2 critico", "a2_red", NO_ALTERNATE),
("A3 in allarme", "a3_org", NO_ALTERNATE),
("A3 critico", "a3_red", NO_ALTERNATE),
("A4 in allarme", "a4_org", NO_ALTERNATE),
("A4 critico", "a4_red", NO_ALTERNATE),
("Segnale radio basso", "rssi_org", NO_ALTERNATE),
("Segnale radio critico", "rssi_red", NO_ALTERNATE),
("Problema all'antenna della radio", "swr_red", NO_ALTERNATE),
("Telemetria assente", "telemko", NO_ALTERNATE),
("Telemetria disponibile", "telemok", NO_ALTERNATE),
("Segnale trainer perso", "trainko", NO_ALTERNATE),
("Segnale trainer disponibile", "trainok", NO_ALTERNATE),
("Sensore perso", "sensorko", NO_ALTERNATE),
("sovraccarico servo", "servoko", NO_ALTERNATE),
("sovraccarico di alimentazione", "rxko", NO_ALTERNATE),
("ricevente ancora connessa", "modelpwr", NO_ALTERNATE),
]:
systemSounds.append((s, filename(f, a)))
systemSounds.append((s, filename(f)))
for s, f in [("radio inattiva controllare", "inactiv"),
("batteria della radio scarica", "lowbatt"),
("controllo motore non in posizione, verificare", "thralert"),
("interruttori non in posizione, verificare", "swalert"),
("eeprom corrotta", "eebad"),
("formattazione eeprom in corso", "eeformat"),
("errore", "error"),
("trim centrato", "midtrim"),
("potenziometro centrato", "midpot"),
("massimo trim raggiunto", "maxtrim"),
("minimo trim raggiunto", "mintrim"),
("venti secondi", "timer20"),
("trenta secondi", "timer30"),
("assorbimento elevato", "highmah"),
("temperatura elevata", "hightemp"),
("A1 in allarme", "a1_org"),
("A1 critico", "a1_red"),
("A2 in allarme", "a2_org"),
("A2 critico", "a2_red"),
("A3 in allarme", "a3_org"),
("A3 critico", "a3_red"),
("A4 in allarme", "a4_org"),
("A4 critico", "a4_red"),
("Segnale radio basso", "rssi_org"),
("Segnale radio critico", "rssi_red"),
("Problema all'antenna della radio", "swr_red"),
("Telemetria assente", "telemko"),
("Telemetria disponibile", "telemok"),
("Segnale trainer perso", "trainko"),
("Segnale trainer disponibile", "trainok"),
("Sensore perso", "sensorko"),
("sovraccarico servo", "servoko"),
("sovraccarico di alimentazione", "rxko"),
("ricevente ancora connessa", "modelpwr"),
]:
systemSounds.append((s, filename(f)))
for i, s in enumerate(["timer", "", "tensione", "tensione", "trasmissione", "ricezione", "altitudine", "motore",
"carburante", "temperatura", "temperatura", "velocità", "distanza", "altitudine", "cella lipo",
"totale lipo", "tensione", "corrente", "consumo", "potenza", "accelerazione X", "accelerazione Y", "accelerazione Z",
"direzione", "variometro", "minimo", "massimo"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 155 + i)))
systemSounds.append((s, filename(155 + i)))
for i, (s, f) in enumerate([("carrello chiuso", "gearup"),
("carrello aperto", "geardn"),
("flap rientrati", "flapup"),
@@ -130,4 +130,4 @@ for i, (s, f) in enumerate([("carrello chiuso", "gearup"),
("fase di volo termica sinistra", "fm-thl"),
("fase di volo termica destra", "fm-thr"),
]):
sounds.append((s, filename(f, PROMPT_CUSTOM_BASE + i)))
sounds.append((s, filename(f)))
+43 -43
View File
@@ -2,26 +2,26 @@
# Portuguese language sounds configuration
from tts_common import filename, NO_ALTERNATE, PROMPT_SYSTEM_BASE, PROMPT_CUSTOM_BASE
from tts_common import filename
systemSounds = []
sounds = []
for i in range(101):
systemSounds.append((str(i), filename(PROMPT_SYSTEM_BASE + i)))
systemSounds.append(("cento", filename(PROMPT_SYSTEM_BASE + 101)))
systemSounds.append(("duzentos", filename(PROMPT_SYSTEM_BASE + 102)))
systemSounds.append(("trezentos", filename(PROMPT_SYSTEM_BASE + 103)))
systemSounds.append(("quatrocentos", filename(PROMPT_SYSTEM_BASE + 104)))
systemSounds.append(("quinhentos", filename(PROMPT_SYSTEM_BASE + 105)))
systemSounds.append(("seiscentos", filename(PROMPT_SYSTEM_BASE + 106)))
systemSounds.append(("setecentos", filename(PROMPT_SYSTEM_BASE + 107)))
systemSounds.append(("oitocentos", filename(PROMPT_SYSTEM_BASE + 108)))
systemSounds.append(("novecentos", filename(PROMPT_SYSTEM_BASE + 109)))
systemSounds.append(("mil", filename(PROMPT_SYSTEM_BASE + 110)))
systemSounds.append((str(i), filename(i)))
systemSounds.append(("cento", filename(101)))
systemSounds.append(("duzentos", filename(102)))
systemSounds.append(("trezentos", filename(103)))
systemSounds.append(("quatrocentos", filename(104)))
systemSounds.append(("quinhentos", filename(105)))
systemSounds.append(("seiscentos", filename(106)))
systemSounds.append(("setecentos", filename(107)))
systemSounds.append(("oitocentos", filename(108)))
systemSounds.append(("novecentos", filename(109)))
systemSounds.append(("mil", filename(110)))
for i, s in enumerate(["virgula", "uma", "duas", "e", "menos", "hora", "horas", "minuto", "minutos", "segundo", "segundos"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 111 + i)))
systemSounds.append((s, filename(111 + i)))
for i, (s, f) in enumerate([("Volt", "volt0"),
("ampére", "amp0"),
("miliamperes", "mamp0"),
@@ -50,39 +50,39 @@ for i, (s, f) in enumerate([("Volt", "volt0"),
("minutos", "minute0"),
("segundos", "second0"),
]):
systemSounds.append((s, filename(f, PROMPT_SYSTEM_BASE + 122 + i)))
for s, f, a in [("atenção, o rádio foi esquecido ligado, por favor desligue-o", "inactiv", 486),
("bateria do rádio fraca", "lowbatt", 485),
("atenção,acelerador não está no mínimo", "thralert", 481),
("atenção, certifique-se que os interruptores estão na posição certa", "swalert", 482),
("eeprom corrompida", "eebad", NO_ALTERNATE),
("formatação da eeprom em curso", "eeformat", NO_ALTERNATE),
("erro", "error", NO_ALTERNATE),
("trim centrado", "midtrim", 495),
("potenciómetro centrado", "midpot", 496),
("trim no máximo", "maxtrim", NO_ALTERNATE),
("trim no mínimo", "mintrim", NO_ALTERNATE),
("20 segundos", "timer20", 500),
("30 segundos", "timer30", 501),
("assorbimento elevato", "highmah", NO_ALTERNATE),
("temperatura elevata", "hightemp", NO_ALTERNATE),
("Alarme A1", "a1_org", NO_ALTERNATE),
("A1 critica", "a1_red", NO_ALTERNATE),
("Alarme A2", "a2_org", NO_ALTERNATE),
("A2 critica", "a2_red", NO_ALTERNATE),
("recepção de sinal muito baixa", "rssi_org", NO_ALTERNATE),
("recepção de sinal crítica", "rssi_red", NO_ALTERNATE),
("Problema com a antena do transmissor", "swr_red", NO_ALTERNATE),
("servo overload", "servoko", NO_ALTERNATE),
("power overload", "rxko", NO_ALTERNATE),
("receiver still connected", "modelpwr", NO_ALTERNATE),
]:
systemSounds.append((s, filename(f, a)))
systemSounds.append((s, filename(f)))
for s, f in [("atenção, o rádio foi esquecido ligado, por favor desligue-o", "inactiv"),
("bateria do rádio fraca", "lowbatt"),
("atenção,acelerador não está no mínimo", "thralert"),
("atenção, certifique-se que os interruptores estão na posição certa", "swalert"),
("eeprom corrompida", "eebad"),
("formatação da eeprom em curso", "eeformat"),
("erro", "error"),
("trim centrado", "midtrim"),
("potenciómetro centrado", "midpot"),
("trim no máximo", "maxtrim"),
("trim no mínimo", "mintrim"),
("20 segundos", "timer20"),
("30 segundos", "timer30"),
("assorbimento elevato", "highmah"),
("temperatura elevata", "hightemp"),
("Alarme A1", "a1_org"),
("A1 critica", "a1_red"),
("Alarme A2", "a2_org"),
("A2 critica", "a2_red"),
("recepção de sinal muito baixa", "rssi_org"),
("recepção de sinal crítica", "rssi_red"),
("Problema com a antena do transmissor", "swr_red"),
("servo overload", "servoko"),
("power overload", "rxko"),
("receiver still connected", "modelpwr"),
]:
systemSounds.append((s, filename(f)))
for i, s in enumerate(["cronómetro", "cronómetro", "transmissão", "recepção", "A1", "A2", "altitude", "motor",
"combustível", "temperatura", "temperatura", "velocidade", "distância", "altitude", "célula lipo",
"Total lipo", "tensão", "corrente", "consumo", "potência", "aceleração X", "aceleração Y", "aceleração Z",
"Direcção", "variómetro", "mínimo", "máximo"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 141 + i)))
systemSounds.append((s, filename(141 + i)))
for i, (s, f) in enumerate([("trem, em cima.", "gearup"),
("trem, em baixo.", "geardn"),
("flaps recolhidos", "flapup"),
@@ -109,4 +109,4 @@ for i, (s, f) in enumerate([("trem, em cima.", "gearup"),
("fase de voo 8", "fltmd8"),
("fase de voo 9", "fltmd9"),
]):
sounds.append((s, filename(f, PROMPT_CUSTOM_BASE + i)))
sounds.append((s, filename(f)))
+86 -85
View File
@@ -2,7 +2,7 @@
# Russian language sounds configuration
from tts_common import filename, NO_ALTERNATE, PROMPT_SYSTEM_BASE, PROMPT_CUSTOM_BASE
from tts_common import filename
systemSounds = []
@@ -10,30 +10,30 @@ sounds = []
# 0 - 100
for i in range(100):
systemSounds.append((str(i), filename(PROMPT_SYSTEM_BASE + i)))
systemSounds.append((str(i), filename(i)))
# 100, 200, ... 900
for i in range(9):
systemSounds.append((str(100 * (i + 1)), filename(PROMPT_SYSTEM_BASE + 100 + i)))
systemSounds.append((str(100 * (i + 1)), filename(100 + i)))
for i, s in enumerate([u"тысяча", u"и", u"минус"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 109 + i)))
systemSounds.append((s, filename(109 + i)))
for i, s in enumerate([u"тысяча", u"тысячи", u"тысяч"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 200 + i)))
systemSounds.append((s, filename(200 + i)))
# decimal point
for i, s in enumerate([u"ровно", u"и одна десятая", u"и две десятых", u"и три десятых", u"и четыре десятых",
u"и пять десятых", u"и шесть десятых", u"и семь десятых", u"и восемь десятых", u"и девять десятых" ]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 165 + i)))
systemSounds.append((s, filename(165 + i)))
# last digit = 1, female
for i, s in enumerate([u"одна", u"одиннадцать", u"двадцать одна", u"тридцать одна", u"сорок одна",
u"пятьдесят одна", u"шестьдесят одна", u"семьдесят одна", u"восемьдесят одна", u"девяносто одна"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 180 + i)))
systemSounds.append((s, filename(180 + i)))
# last digit = 2, female
for i, s in enumerate([u"две", u"двенадцать", u"двадцать две", u"тридцать две", u"сорок две",
u"пятьдесят две", u"шестьдесят две", u"семьдесят две", u"восемьдесят две", u"девяносто две"]):
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 190 + i)))
systemSounds.append((s, filename(190 + i)))
for i, (s, f) in enumerate([(u"вольт", "volt0"), (u"вольт", "volt1"),
(u"вольта", "volt2"), (u"вольт", "volt5"),
@@ -88,83 +88,84 @@ for i, (s, f) in enumerate([(u"вольт", "volt0"), (u"вольт", "volt1"),
(u"секунд", "second0"), (u"секунда", "second1"),
(u"секунды", "second2"), (u"секунд", "second5"),
]):
systemSounds.append((s, filename(f, PROMPT_SYSTEM_BASE + 115 + i)))
systemSounds.append((s, filename(f)))
for s, f, a in [(u"Триммер по центру", "midtrim", 495),
(u"Триммер максимум", "maxtrim", NO_ALTERNATE),
(u"Триммер минимум", "mintrim", NO_ALTERNATE),
(u"Таймер 1. Время вышло", "timovr1", NO_ALTERNATE),
(u"Таймер 2. Время вышло", "timovr2", NO_ALTERNATE),
(u"Таймер 3. Время вышло", "timovr3", NO_ALTERNATE),
(u"Аккумулятор садится!", "lowbatt", 485),
(u"Внимание, пульт не выключен!", "inactiv", 486),
(u"Проверь газ!", "thralert", 481),
(u"Проверь, тумблеры!", "swalert", 482),
(u"Ошибка памяти", "eebad", 483),
(u"Опен тэ, икс приветствует вас!", "hello", 480),
(u"Слабый сигнал!", "rssi_org", NO_ALTERNATE),
(u"Очень слабый сигнал!", "rssi_red", NO_ALTERNATE),
(u"Проблема с антэнной!", "swr_red", NO_ALTERNATE),
(u"Телеметрия потеряна", "telemko", NO_ALTERNATE),
(u"Телеметрия восстановлена", "telemok", NO_ALTERNATE),
(u"Тренерский сигнал потерян", "trainko", NO_ALTERNATE),
(u"Тренерский сигнал восстановлен", "trainok", NO_ALTERNATE),
(u"Сенсор отключен", "sensorko", NO_ALTERNATE),
(u"Серва перегружена", "servoko", NO_ALTERNATE),
(u"Перегрузка", "rxko", NO_ALTERNATE),
(u"Приемник всё ещё подключен!", "modelpwr", NO_ALTERNATE),
]:
systemSounds.append((s, filename(f, a)))
for s, f in [
(u"Триммер по центру", "midtrim"),
(u"Триммер максимум", "maxtrim"),
(u"Триммер минимум", "mintrim"),
(u"Таймер 1. Время вышло", "timovr1"),
(u"Таймер 2. Время вышло", "timovr2"),
(u"Таймер 3. Время вышло", "timovr3"),
(u"Аккумулятор садится!", "lowbatt"),
(u"Внимание, пульт не выключен!", "inactiv"),
(u"Проверь газ!", "thralert"),
(u"Проверь, тумблеры!", "swalert"),
(u"Ошибка памяти", "eebad"),
(u"Опен тэ, икс приветствует вас!", "hello"),
(u"Слабый сигнал!", "rssi_org"),
(u"Очень слабый сигнал!", "rssi_red"),
(u"Проблема с антэнной!", "swr_red"),
(u"Телеметрия потеряна", "telemko"),
(u"Телеметрия восстановлена", "telemok"),
(u"Тренерский сигнал потерян", "trainko"),
(u"Тренерский сигнал восстановлен", "trainok"),
(u"Сенсор отключен", "sensorko"),
(u"Серва перегружена", "servoko"),
(u"Перегрузка", "rxko"),
(u"Приемник всё ещё подключен!", "modelpwr"),
]:
systemSounds.append((s, filename(f)))
for i, (s, f) in enumerate([
(u"Аккумулятор садится!", "lowbat"),
(u"Шасси, убраны'", "gearup"),
(u"Шасси, выпущены", "geardn"),
(u"Закрылки убраны'", "flapup"),
(u"Закрылки выпущены", "flapdn"),
(u"Спойлеры выпущены", "splrup"),
(u"Спойлеры - убраны'", "splrdn"),
(u"Тренер: подключен", "trnon"),
(u"Тренер: отключен", "trnoff"),
(u"Двигатели запущены!", "armed"),
(u"Двигатели выключены", "disarm"),
(u"Слишком высоко", "tohigh"),
(u"Слишком низко", "tolow"),
(u"Низкий уровень сигнала", "siglow"),
(u"Критически низкий уровень сигнала", "sigcrt"),
(u"Полетный режим один", "fm-1"),
(u"Полетный режим два", "fm-2"),
(u"Полетный режим три", "fm-3"),
(u"Полетный режим четыре", "fm-4"),
(u"Полетный режим пять", "fm-5"),
(u"Полетный режим шесть", "fm-6"),
(u"Полетный режим семь", "fm-7"),
(u"Полетный режим восемь", "fm-8"),
(u"Режим,акро", "fm-acr"),
(u"Режим круиза", "fm-crs"),
(u"Режим взлета", "fm-lch"),
(u"Режим посадки", "fm-lnd"),
(u"Нормальный режим", "fm-nrm"),
(u"Ручной режим", "fm-man"),
(u"Стабилизация", "fm-stb"),
(u"Удержание позиции", "fm-hld"),
(u"Возврат в точку старта", "fm-rth"),
(u"Горизонт", "fm-hor"),
(u"Стабилизация", "fm-ang"),
(u"аирмод включен", "airmon"),
(u"аирмод выключен", "airmof"),
(u"Высота", "alt"),
(u"Удержание высоты", "althld"),
(u"Критический разряд!", "batcrt"),
(u"Время полета", "flttm"),
(u"Аварийный режим выключен", "fsoff"),
(u"Аварийный режим включен", "fson"),
(u"ДжиПи Эс", "gps"),
(u"Высокие расходы", "hirate"),
(u"Низкие расходы", "lorate"),
(u"Спутники найдены!", "satfix"),
(u"Спутники потеряны!", "satlst"),
(u"Бортовые огни выключены", "ledoff"),
(u"Бортовые огни включены", "ledon")
]):
sounds.append((s, filename(f, PROMPT_CUSTOM_BASE + i)))
(u"Аккумулятор садится!", "lowbat"),
(u"Шасси, убраны'", "gearup"),
(u"Шасси, выпущены", "geardn"),
(u"Закрылки убраны'", "flapup"),
(u"Закрылки выпущены", "flapdn"),
(u"Спойлеры выпущены", "splrup"),
(u"Спойлеры - убраны'", "splrdn"),
(u"Тренер: подключен", "trnon"),
(u"Тренер: отключен", "trnoff"),
(u"Двигатели запущены!", "armed"),
(u"Двигатели выключены", "disarm"),
(u"Слишком высоко", "tohigh"),
(u"Слишком низко", "tolow"),
(u"Низкий уровень сигнала", "siglow"),
(u"Критически низкий уровень сигнала", "sigcrt"),
(u"Полетный режим один", "fm-1"),
(u"Полетный режим два", "fm-2"),
(u"Полетный режим три", "fm-3"),
(u"Полетный режим четыре", "fm-4"),
(u"Полетный режим пять", "fm-5"),
(u"Полетный режим шесть", "fm-6"),
(u"Полетный режим семь", "fm-7"),
(u"Полетный режим восемь", "fm-8"),
(u"Режим,акро", "fm-acr"),
(u"Режим круиза", "fm-crs"),
(u"Режим взлета", "fm-lch"),
(u"Режим посадки", "fm-lnd"),
(u"Нормальный режим", "fm-nrm"),
(u"Ручной режим", "fm-man"),
(u"Стабилизация", "fm-stb"),
(u"Удержание позиции", "fm-hld"),
(u"Возврат в точку старта", "fm-rth"),
(u"Горизонт", "fm-hor"),
(u"Стабилизация", "fm-ang"),
(u"аирмод включен", "airmon"),
(u"аирмод выключен", "airmof"),
(u"Высота", "alt"),
(u"Удержание высоты", "althld"),
(u"Критический разряд!", "batcrt"),
(u"Время полета", "flttm"),
(u"Аварийный режим выключен", "fsoff"),
(u"Аварийный режим включен", "fson"),
(u"ДжиПи Эс", "gps"),
(u"Высокие расходы", "hirate"),
(u"Низкие расходы", "lorate"),
(u"Спутники найдены!", "satfix"),
(u"Спутники потеряны!", "satlst"),
(u"Бортовые огни выключены", "ledoff"),
(u"Бортовые огни включены", "ledon")
]):
sounds.append((s, filename(f)))
+11
View File
@@ -103,6 +103,17 @@ boards = {
"MULTIMODULE": "NO",
"CROSSFIRE": "NO",
"DEFAULT_MODE": "2",
},
"X7ACCESS": {
"PCB": "X7",
"PCBREV": "ACCESS",
"LUA": "NO_MODEL_SCRIPTS",
"GVARS": "YES",
"AUTOUPDATE": "YES",
"PXX1": "YES",
"MULTIMODULE": "NO",
"CROSSFIRE": "NO",
"DEFAULT_MODE": "2",
}
}