Compare commits
76 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 38cf9536e1 | |||
| 2683194f64 | |||
| 010d6691b9 | |||
| 3c6e21d945 | |||
| dcde1073b0 | |||
| fd55a40d26 | |||
| a2350c6d92 | |||
| 35e5faa8ad | |||
| 77e9130c37 | |||
| 9cc0b8b608 | |||
| 96953c7987 | |||
| 5b277378c6 | |||
| 2714017fe8 | |||
| b747b03ac0 | |||
| 3ed37c1e79 | |||
| b9b2cb46eb | |||
| 832c891e3e | |||
| 86a8e6a128 | |||
| 30c28645da | |||
| 01c0607aa8 | |||
| 7a14c3592a | |||
| e9b28898d0 | |||
| 001585a194 | |||
| b22dca6be7 | |||
| e46523b08e | |||
| a3f8e92c39 | |||
| 4cdd359405 | |||
| 82aa8cc383 | |||
| 85cb8b3dbd | |||
| 0a5c3f42c5 | |||
| 8267ac2fc2 | |||
| 6bbb416f83 | |||
| 1478b8c9da | |||
| 3dddf353e4 | |||
| ecb1955750 | |||
| c00c9e7e79 | |||
| e9084e4d59 | |||
| 016eafefab | |||
| 7cdc42387b | |||
| f09e1338f6 | |||
| 458e41744b | |||
| f276b8a9eb | |||
| 57d50f05cd | |||
| dd5889c6fc | |||
| a4c400b62a | |||
| e7e6c9b75e | |||
| b54c5c2d2e | |||
| b3d61289e8 | |||
| e0295d08da | |||
| cf7984a3c5 | |||
| 41390af8a4 | |||
| 5385a01b2e | |||
| 54447a45a0 | |||
| b593d871a6 | |||
| d18c6c9985 | |||
| 64e84f1af9 | |||
| 61923a9bec | |||
| c8e0b85e7e | |||
| 2170d2a129 | |||
| 7f4f7cee8b | |||
| f2c9aa9494 | |||
| 79b461eda8 | |||
| becbb8cbb9 | |||
| ac98f6adaf | |||
| fe68ef4cd1 | |||
| 0342ca9172 | |||
| d030561bf3 | |||
| d21fcbf260 | |||
| 19818b6c07 | |||
| 6b7cc60751 | |||
| 00d3d3e20b | |||
| 4a099a7161 | |||
| df30dd9bb9 | |||
| e44e87221f | |||
| d4959dfeb0 | |||
| ffe70d1eaa |
@@ -406,3 +406,20 @@ Michael Gregory
|
||||
Robert Russell
|
||||
Gordon Stahl
|
||||
Felix Kaiser
|
||||
Joshua Bardwell
|
||||
Davd Goodall
|
||||
Leonard MacKey
|
||||
Miles Kelly
|
||||
Sergio Robledo
|
||||
Mikael Wallbäck
|
||||
Daniel Malcman
|
||||
Paul Dittman
|
||||
Attilio Rausse
|
||||
Sidney Gates
|
||||
Andrea Montefusco
|
||||
Paul Luby
|
||||
Donald L Webster
|
||||
Kenneth Frehafer
|
||||
Peter McHenry
|
||||
Matthias Hase
|
||||
Markus Wolf
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<h2>Version 2.0.1</h2>
|
||||
<ul>
|
||||
<li>Fix on recursive GVars</li>
|
||||
<li>Sky9x EEPROM read/write fix</li>
|
||||
<li>Translations updated
|
||||
<li>Wizard fixes
|
||||
<li>Fix on invalid splashes bitmaps
|
||||
</ul>
|
||||
|
||||
<h2>Version 2.0.0</h2>
|
||||
<ul>
|
||||
<li>Companion now merged into OpenTX</li>
|
||||
<li>Too many changes to list them all!</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.52</h2>
|
||||
<ul>
|
||||
<li>Fix crash when writing certain EEPROMS</li>
|
||||
|
||||
@@ -2,7 +2,7 @@ PROJECT( companion )
|
||||
|
||||
SET( C9X_VERSION_MAJOR "2" )
|
||||
SET( C9X_VERSION_MINOR "0" )
|
||||
SET( C9X_VERSION_REVISION "0" )
|
||||
SET( C9X_VERSION_REVISION "1" )
|
||||
SET( C9X_VERSION ${C9X_VERSION_MAJOR}.${C9X_VERSION_MINOR}.${C9X_VERSION_REVISION} )
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
|
||||
@@ -121,6 +121,8 @@ set(common_SRCS
|
||||
firmwares/gruvin9x/gruvin9xinterface.cpp
|
||||
firmwares/ersky9x/ersky9xeeprom.cpp
|
||||
firmwares/ersky9x/ersky9xinterface.cpp
|
||||
${RADIO_SRC_DIRECTORY}/bitmaps/sticks.lbm
|
||||
${RADIO_SRC_DIRECTORY}/translations/en.h
|
||||
firmwares/opentx/opentxeeprom.cpp
|
||||
firmwares/opentx/open9xStockeeprom.cpp
|
||||
firmwares/opentx/open9xGruvin9xeeprom.cpp
|
||||
@@ -130,7 +132,7 @@ set(common_SRCS
|
||||
firmwares/opentx/opentxSky9xsimulator.cpp
|
||||
firmwares/opentx/opentxGruvin9xsimulator.cpp
|
||||
firmwares/opentx/opentxM128simulator.cpp
|
||||
firmwares/opentx/opentxsimulator.cpp
|
||||
firmwares/opentx/opentxM64simulator.cpp
|
||||
file.cpp
|
||||
googleanalytics.cpp
|
||||
appdata.cpp
|
||||
@@ -140,14 +142,16 @@ set(common_MOC_HDRS
|
||||
googleanalytics.h
|
||||
)
|
||||
|
||||
qt4_wrap_cpp( common_SRCS ${common_MOC_HDRS} )
|
||||
|
||||
add_library(common ${common_SRCS})
|
||||
|
||||
set(companion_SRCS
|
||||
hexinterface.cpp
|
||||
flashinterface.cpp
|
||||
xmlinterface.cpp
|
||||
${PROJECT_BINARY_DIR}/radio.cxx
|
||||
# xmlinterface.cpp
|
||||
# ${PROJECT_BINARY_DIR}/radio.cxx
|
||||
${RADIO_SRC_DIRECTORY}/stamp-opentx.h
|
||||
${RADIO_SRC_DIRECTORY}/bitmaps/sticks.lbm
|
||||
${RADIO_SRC_DIRECTORY}/translations/en.h
|
||||
helpers.cpp
|
||||
mdichild.cpp
|
||||
generaledit.cpp
|
||||
@@ -168,7 +172,7 @@ set(companion_SRCS
|
||||
splashlibrary.cpp
|
||||
mainwindow.cpp
|
||||
companion.cpp
|
||||
taranisnotfound.cpp
|
||||
radionotfound.cpp
|
||||
qcustomplot.cpp
|
||||
wizarddata.cpp
|
||||
wizarddialog.cpp
|
||||
@@ -193,7 +197,7 @@ set(companion_MOC_HDRS
|
||||
modelslist.h
|
||||
mdichild.h
|
||||
mainwindow.h
|
||||
taranisnotfound.h
|
||||
radionotfound.h
|
||||
qcustomplot.h
|
||||
qautocombobox.h
|
||||
helpers.h
|
||||
@@ -216,7 +220,7 @@ set(companion_UIS
|
||||
customizesplashdialog.ui
|
||||
splashlibrary.ui
|
||||
burndialog.ui
|
||||
taranisnotfound.ui
|
||||
radionotfound.ui
|
||||
)
|
||||
|
||||
set(companion_RCS
|
||||
@@ -274,9 +278,9 @@ FOREACH( language ${LANGUAGES} )
|
||||
SET( companion_TS ${companion_TS} translations/companion_${language}.ts )
|
||||
ENDFOREACH( language )
|
||||
|
||||
set( companion_SRCS ${common_SRCS} ${companion_SRCS} )
|
||||
set( companion_SRCS ${companion_SRCS} )
|
||||
QT4_WRAP_UI( companion_SRCS ${companion_UIS} )
|
||||
QT4_WRAP_CPP( companion_SRCS ${companion_MOC_HDRS} ${common_MOC_HDRS} )
|
||||
QT4_WRAP_CPP( companion_SRCS ${companion_MOC_HDRS} )
|
||||
QT4_ADD_TRANSLATION( companion_QM ${companion_TS} )
|
||||
QT4_ADD_RESOURCES( companion_SRCS ${companion_RCS} )
|
||||
|
||||
@@ -288,7 +292,7 @@ ELSE( )
|
||||
ADD_EXECUTABLE( ${PROJECT_NAME} WIN32 ${companion_SRCS} ${companion_QM} )
|
||||
ENDIF( )
|
||||
|
||||
TARGET_LINK_LIBRARIES( ${PROJECT_NAME} modeledit simulation ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${XERCESC_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS} )
|
||||
TARGET_LINK_LIBRARIES( ${PROJECT_NAME} modeledit simulation common ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${XERCESC_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS} )
|
||||
|
||||
############# Standalone simu ###############
|
||||
|
||||
@@ -334,8 +338,8 @@ set(simu_MOC_HDRS
|
||||
modeledit/node.h
|
||||
)
|
||||
|
||||
set( simu_SRCS ${simu_SRCS} ${common_SRCS} )
|
||||
qt4_wrap_cpp(simu_SRCS ${simu_MOC_HDRS} ${common_MOC_HDRS} )
|
||||
set( simu_SRCS ${simu_SRCS} )
|
||||
qt4_wrap_cpp(simu_SRCS ${simu_MOC_HDRS} )
|
||||
qt4_add_resources(simu_SRCS companion.qrc) # TODO not needed
|
||||
|
||||
if(WIN32)
|
||||
@@ -345,9 +349,9 @@ endif()
|
||||
add_executable(simulator WIN32 ${simu_SRCS})
|
||||
|
||||
if(SDL_FOUND)
|
||||
target_link_libraries(simulator simulation ${QT_LIBRARIES} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS})
|
||||
target_link_libraries(simulator simulation common ${QT_LIBRARIES} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS})
|
||||
else()
|
||||
target_link_libraries(simulator simulation ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS})
|
||||
target_link_libraries(simulator simulation common ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS})
|
||||
endif()
|
||||
|
||||
############# Packaging ####################
|
||||
|
||||
@@ -174,14 +174,14 @@ void AppPreferencesDialog::initSettings()
|
||||
|
||||
QString hwSettings;
|
||||
if (g.profile[g.id()].stickPotCalib() == "" ) {
|
||||
hwSettings = QString(tr("EMPTY: No radio settings stored in profile"));
|
||||
hwSettings = tr("EMPTY: No radio settings stored in profile");
|
||||
}
|
||||
else {
|
||||
QString str = g.profile[g.id()].timeStamp();
|
||||
if (str.isEmpty())
|
||||
hwSettings = QString(tr("AVAILABLE: Radio settings of unknown age"));
|
||||
hwSettings = tr("AVAILABLE: Radio settings of unknown age");
|
||||
else
|
||||
hwSettings = QString(tr("AVAILABLE: Radio settings stored %1").arg(str));
|
||||
hwSettings = tr("AVAILABLE: Radio settings stored %1").arg(str);
|
||||
}
|
||||
ui->lblGeneralSettings->setText(hwSettings);
|
||||
|
||||
|
||||
@@ -221,6 +221,7 @@ bool burnDialog::checkeEprom(QString fileName)
|
||||
}
|
||||
burnraw=false;
|
||||
int fileType = getFileType(fileName);
|
||||
#if 0
|
||||
if (fileType==FILE_TYPE_XML) {
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { //reading HEX TEXT file
|
||||
QMessageBox::critical(this, tr("Error"),tr("Error opening file %1:\n%2.").arg(fileName).arg(file.errorString()));
|
||||
@@ -229,7 +230,9 @@ bool burnDialog::checkeEprom(QString fileName)
|
||||
QTextStream inputStream(&file);
|
||||
XmlInterface(inputStream).load(radioData);
|
||||
}
|
||||
else if (fileType==FILE_TYPE_HEX || fileType==FILE_TYPE_EEPE) { //read HEX file
|
||||
else
|
||||
#endif
|
||||
if (fileType==FILE_TYPE_HEX || fileType==FILE_TYPE_EEPE) { //read HEX file
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { //reading HEX TEXT file
|
||||
QMessageBox::critical(this, tr("Error"),tr("Error opening file %1:\n%2.").arg(fileName).arg(file.errorString()));
|
||||
return false;
|
||||
@@ -409,7 +412,11 @@ void burnDialog::on_BurnFlashButton_clicked()
|
||||
if (!fileName.isEmpty()) {
|
||||
g.flashDir( QFileInfo(fileName).dir().absolutePath() );
|
||||
if (!ui->useFwImageCB->isChecked()) {
|
||||
QImage image = ui->imageLabel->pixmap()->toImage().scaled(ui->imageLabel->width(), ui->imageLabel->height());
|
||||
const QPixmap * pixmap = ui->imageLabel->pixmap();
|
||||
QImage image;
|
||||
if (pixmap) {
|
||||
image = pixmap->toImage().scaled(ui->imageLabel->width(), ui->imageLabel->height());
|
||||
}
|
||||
if (!image.isNull()) {
|
||||
QString tempDir = QDir::tempPath();
|
||||
QString tempFile;
|
||||
@@ -422,7 +429,8 @@ void burnDialog::on_BurnFlashButton_clicked()
|
||||
if (flash.saveFlash(tempFile) > 0) {
|
||||
hexfileName->clear();
|
||||
hexfileName->append(tempFile);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
hexfileName->clear();
|
||||
QMessageBox::critical(this, tr("Warning"), tr("Cannot save customized firmware"));
|
||||
}
|
||||
@@ -442,6 +450,7 @@ void burnDialog::on_BurnFlashButton_clicked()
|
||||
hexfileName->clear();
|
||||
}
|
||||
}
|
||||
|
||||
if (hexType==EEPROM_FILE_TYPE) {
|
||||
QString calib = g.profile[g.id()].stickPotCalib();
|
||||
QString trainercalib = g.profile[g.id()].trainerCalib();
|
||||
@@ -486,7 +495,8 @@ void burnDialog::on_BurnFlashButton_clicked()
|
||||
radioData.generalSettings.vBatCalib=vBatCalib;
|
||||
radioData.generalSettings.PPM_Multiplier=PPM_Multiplier;
|
||||
patch=true;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
QMessageBox::critical(this, tr("Warning"), tr("Wrong radio calibration data in profile, Settings not patched"));
|
||||
}
|
||||
}
|
||||
@@ -540,7 +550,8 @@ void burnDialog::on_BurnFlashButton_clicked()
|
||||
if (ok)
|
||||
radioData.generalSettings.speakerVolume=byte8u;
|
||||
patch=true;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
QMessageBox::critical(this, tr("Warning"), tr("Wrong radio setting data in profile, Settings not patched"));
|
||||
}
|
||||
|
||||
@@ -567,17 +578,19 @@ void burnDialog::on_BurnFlashButton_clicked()
|
||||
QTextStream outputStream(&file);
|
||||
|
||||
long result = file.write((char*)eeprom, eeprom_size);
|
||||
if(result!=eeprom_size) {
|
||||
if (result!=eeprom_size) {
|
||||
QMessageBox::warning(this, tr("Error"),tr("Error writing file %1:\n%2.").arg(fileName).arg(file.errorString()));
|
||||
hexfileName->clear();
|
||||
}
|
||||
hexfileName->clear();
|
||||
hexfileName->append(fileName);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
hexfileName->clear();
|
||||
hexfileName->append(ui->FWFileName->text());
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
hexfileName->clear();
|
||||
hexfileName->append(ui->FWFileName->text());
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<file>images/taranison.png</file>
|
||||
<file>images/wizard/ailerons.png</file>
|
||||
<file>images/wizard/airbrakes.png</file>
|
||||
<file>images/wizard/bank.png</file>
|
||||
<file>images/wizard/elevons.png</file>
|
||||
<file>images/wizard/conclusion.png</file>
|
||||
<file>images/wizard/cyclic.png</file>
|
||||
<file>images/wizard/fblheli.png</file>
|
||||
|
||||
@@ -15,7 +15,11 @@
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTextEdit" name="textEditor"/>
|
||||
<widget class="QTextEdit" name="textEditor">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
@@ -1164,6 +1164,23 @@ int ModelData::getTrimValue(int phaseIdx, int trimIdx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool ModelData::isGVarLinked(int phaseIdx, int gvarIdx)
|
||||
{
|
||||
return phaseData[phaseIdx].gvars[gvarIdx] > 1024;
|
||||
}
|
||||
|
||||
int ModelData::getGVarValue(int phaseIdx, int gvarIdx)
|
||||
{
|
||||
int idx = phaseData[phaseIdx].gvars[gvarIdx];
|
||||
for (int i=0; idx>1024 && i<C9X_MAX_FLIGHT_MODES; i++) {
|
||||
int nextPhase = idx - 1025;
|
||||
if (nextPhase >= phaseIdx) nextPhase += 1;
|
||||
phaseIdx = nextPhase;
|
||||
idx = phaseData[phaseIdx].gvars[gvarIdx];
|
||||
}
|
||||
return idx;
|
||||
}
|
||||
|
||||
void ModelData::setTrimValue(int phaseIdx, int trimIdx, int value)
|
||||
{
|
||||
for (uint8_t i=0; i<C9X_MAX_FLIGHT_MODES; i++) {
|
||||
|
||||
@@ -1028,6 +1028,7 @@ class ModelData {
|
||||
uint8_t bt_telemetry;
|
||||
uint8_t numVoice;
|
||||
MavlinkData mavlink;
|
||||
unsigned int telemetryProtocol;
|
||||
FrSkyData frsky;
|
||||
|
||||
char bitmap[10+1];
|
||||
@@ -1046,6 +1047,10 @@ class ModelData {
|
||||
|
||||
int getTrimValue(int phaseIdx, int trimIdx);
|
||||
void setTrimValue(int phaseIdx, int trimIdx, int value);
|
||||
|
||||
bool isGVarLinked(int phaseIdx, int gvarIdx);
|
||||
int getGVarValue(int phaseIdx, int gvarIdx);
|
||||
|
||||
ModelData removeGlobalVars();
|
||||
|
||||
void clearMixes();
|
||||
@@ -1094,7 +1099,6 @@ enum Capability {
|
||||
SoundMod,
|
||||
SoundPitch,
|
||||
MaxVolume,
|
||||
Beeperlen,
|
||||
EepromBackup,
|
||||
Haptic,
|
||||
HasBeeper,
|
||||
@@ -1105,7 +1109,6 @@ enum Capability {
|
||||
HasMixerNames,
|
||||
HasChNames,
|
||||
HasCvNames,
|
||||
HasFuncRepeat,
|
||||
HasPxxCountry,
|
||||
HasPPMStart,
|
||||
HasGeneralUnits,
|
||||
@@ -1139,7 +1142,6 @@ enum Capability {
|
||||
HasCurrentCalibration,
|
||||
HasVolume,
|
||||
HasBrightness,
|
||||
HasContrast,
|
||||
PerModelTimers,
|
||||
SlowScale,
|
||||
SlowRange,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <algorithm>
|
||||
#include "eeprominterface.h"
|
||||
|
||||
EFile::EFile():
|
||||
RleFile::RleFile():
|
||||
eeprom(NULL),
|
||||
eeprom_size(0),
|
||||
eeFs(NULL),
|
||||
@@ -31,7 +31,7 @@ eeFsArm(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
void EFile::EeFsCreate(uint8_t *eeprom, int size, BoardEnum board)
|
||||
void RleFile::EeFsCreate(uint8_t *eeprom, int size, BoardEnum board)
|
||||
{
|
||||
this->eeprom = eeprom;
|
||||
this->eeprom_size = size;
|
||||
@@ -92,7 +92,7 @@ void EFile::EeFsCreate(uint8_t *eeprom, int size, BoardEnum board)
|
||||
}
|
||||
}
|
||||
|
||||
bool EFile::EeFsOpen(uint8_t *eeprom, int size, BoardEnum board)
|
||||
bool RleFile::EeFsOpen(uint8_t *eeprom, int size, BoardEnum board)
|
||||
{
|
||||
this->eeprom = eeprom;
|
||||
this->eeprom_size = size;
|
||||
@@ -137,29 +137,29 @@ bool EFile::EeFsOpen(uint8_t *eeprom, int size, BoardEnum board)
|
||||
}
|
||||
}
|
||||
|
||||
void EFile::eeprom_read_block (void *pointer_ram, unsigned int pointer_eeprom, size_t size)
|
||||
void RleFile::eeprom_read_block (void *pointer_ram, unsigned int pointer_eeprom, size_t size)
|
||||
{
|
||||
memcpy(pointer_ram, &eeprom[pointer_eeprom], size);
|
||||
}
|
||||
|
||||
void EFile::eeprom_write_block(const void *pointer_ram, unsigned int pointer_eeprom, size_t size)
|
||||
void RleFile::eeprom_write_block(const void *pointer_ram, unsigned int pointer_eeprom, size_t size)
|
||||
{
|
||||
memcpy(&eeprom[pointer_eeprom], pointer_ram, size);
|
||||
}
|
||||
|
||||
uint8_t EFile::EeFsRead(unsigned int blk, unsigned int ofs)
|
||||
uint8_t RleFile::EeFsRead(unsigned int blk, unsigned int ofs)
|
||||
{
|
||||
uint8_t ret;
|
||||
eeprom_read_block(&ret, blk*eeFsBlockSize+ofs+eeFsBlocksOffset, 1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void EFile::EeFsWrite(unsigned int blk, unsigned int ofs, uint8_t val)
|
||||
void RleFile::EeFsWrite(unsigned int blk, unsigned int ofs, uint8_t val)
|
||||
{
|
||||
eeprom_write_block(&val, blk*eeFsBlockSize+ofs+eeFsBlocksOffset, 1);
|
||||
}
|
||||
|
||||
unsigned int EFile::EeFsGetLink(unsigned int blk)
|
||||
unsigned int RleFile::EeFsGetLink(unsigned int blk)
|
||||
{
|
||||
if (IS_ARM(board)) {
|
||||
int16_t ret;
|
||||
@@ -171,7 +171,7 @@ unsigned int EFile::EeFsGetLink(unsigned int blk)
|
||||
}
|
||||
}
|
||||
|
||||
void EFile::EeFsSetLink(unsigned int blk, unsigned int val)
|
||||
void RleFile::EeFsSetLink(unsigned int blk, unsigned int val)
|
||||
{
|
||||
if (IS_ARM(board)) {
|
||||
int16_t s_link = val;
|
||||
@@ -182,17 +182,17 @@ void EFile::EeFsSetLink(unsigned int blk, unsigned int val)
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t EFile::EeFsGetDat(unsigned int blk, unsigned int ofs)
|
||||
uint8_t RleFile::EeFsGetDat(unsigned int blk, unsigned int ofs)
|
||||
{
|
||||
return EeFsRead(blk, ofs+eeFsLinkSize);
|
||||
}
|
||||
|
||||
void EFile::EeFsSetDat(unsigned int blk, unsigned int ofs, const uint8_t *buf, unsigned int len)
|
||||
void RleFile::EeFsSetDat(unsigned int blk, unsigned int ofs, const uint8_t *buf, unsigned int len)
|
||||
{
|
||||
eeprom_write_block(buf, blk*eeFsBlockSize+ofs+eeFsLinkSize+eeFsBlocksOffset, len);
|
||||
}
|
||||
|
||||
unsigned int EFile::EeFsGetFree()
|
||||
unsigned int RleFile::EeFsGetFree()
|
||||
{
|
||||
unsigned int ret = 0;
|
||||
unsigned int i;
|
||||
@@ -211,7 +211,7 @@ unsigned int EFile::EeFsGetFree()
|
||||
/*
|
||||
* free one or more blocks
|
||||
*/
|
||||
void EFile::EeFsFree(unsigned int blk)
|
||||
void RleFile::EeFsFree(unsigned int blk)
|
||||
{
|
||||
unsigned int i = blk;
|
||||
while (EeFsGetLink(i)) i = EeFsGetLink(i);
|
||||
@@ -228,7 +228,7 @@ void EFile::EeFsFree(unsigned int blk)
|
||||
/*
|
||||
* alloc one block from freelist
|
||||
*/
|
||||
unsigned int EFile::EeFsAlloc()
|
||||
unsigned int RleFile::EeFsAlloc()
|
||||
{
|
||||
unsigned int ret = (IS_ARM(board) ? eeFsArm->freeList : eeFs->freeList);
|
||||
if (ret) {
|
||||
@@ -241,12 +241,12 @@ unsigned int EFile::EeFsAlloc()
|
||||
return ret;
|
||||
}
|
||||
|
||||
unsigned int EFile::size(unsigned int id)
|
||||
unsigned int RleFile::size(unsigned int id)
|
||||
{
|
||||
return IS_ARM(board) ? eeFsArm->files[id].size : eeFs->files[id].size;
|
||||
}
|
||||
|
||||
unsigned int EFile::openRd(unsigned int i_fileId)
|
||||
unsigned int RleFile::openRd(unsigned int i_fileId)
|
||||
{
|
||||
if (IS_SKY9X(board)) {
|
||||
m_fileId = get_current_block_number(i_fileId * 2, &m_size);
|
||||
@@ -268,7 +268,7 @@ unsigned int EFile::openRd(unsigned int i_fileId)
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int EFile::read(uint8_t *buf, unsigned int i_len)
|
||||
unsigned int RleFile::read(uint8_t *buf, unsigned int i_len)
|
||||
{
|
||||
unsigned int len = IS_ARM(board) ? eeFsArm->files[m_fileId].size : eeFs->files[m_fileId].size;
|
||||
len -= m_pos;
|
||||
@@ -288,7 +288,7 @@ unsigned int EFile::read(uint8_t *buf, unsigned int i_len)
|
||||
}
|
||||
|
||||
// G: Read runlength (RLE) compressed bytes into buf.
|
||||
unsigned int EFile::readRlc12(uint8_t *buf, unsigned int i_len, bool rlc2)
|
||||
unsigned int RleFile::readRlc12(uint8_t *buf, unsigned int i_len, bool rlc2)
|
||||
{
|
||||
memset(buf, 0, i_len);
|
||||
|
||||
@@ -344,12 +344,12 @@ unsigned int EFile::readRlc12(uint8_t *buf, unsigned int i_len, bool rlc2)
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int EFile::write1(uint8_t b)
|
||||
unsigned int RleFile::write1(uint8_t b)
|
||||
{
|
||||
return write(&b, 1);
|
||||
}
|
||||
|
||||
unsigned int EFile::write(const uint8_t *buf, unsigned int i_len)
|
||||
unsigned int RleFile::write(const uint8_t *buf, unsigned int i_len)
|
||||
{
|
||||
unsigned int len = i_len;
|
||||
if (!m_currBlk && m_pos==0)
|
||||
@@ -386,7 +386,7 @@ unsigned int EFile::write(const uint8_t *buf, unsigned int i_len)
|
||||
return i_len - len;
|
||||
}
|
||||
|
||||
void EFile::create(unsigned int i_fileId, unsigned int typ)
|
||||
void RleFile::create(unsigned int i_fileId, unsigned int typ)
|
||||
{
|
||||
openRd(i_fileId); //internal use
|
||||
if (IS_ARM(board)) {
|
||||
@@ -399,7 +399,7 @@ void EFile::create(unsigned int i_fileId, unsigned int typ)
|
||||
}
|
||||
}
|
||||
|
||||
void EFile::closeTrunc()
|
||||
void RleFile::closeTrunc()
|
||||
{
|
||||
unsigned int fri=0;
|
||||
if (IS_ARM(board))
|
||||
@@ -410,7 +410,7 @@ void EFile::closeTrunc()
|
||||
if(fri) EeFsFree( fri ); //chain in
|
||||
}
|
||||
|
||||
unsigned int EFile::writeRlc1(unsigned int i_fileId, unsigned int typ, const uint8_t *buf, unsigned int i_len)
|
||||
unsigned int RleFile::writeRlc1(unsigned int i_fileId, unsigned int typ, const uint8_t *buf, unsigned int i_len)
|
||||
{
|
||||
create(i_fileId, typ);
|
||||
bool state0 = true;
|
||||
@@ -456,7 +456,7 @@ unsigned int EFile::writeRlc1(unsigned int i_fileId, unsigned int typ, const uin
|
||||
/*
|
||||
* Write runlength (RLE) compressed bytes
|
||||
*/
|
||||
unsigned int EFile::writeRlc2(unsigned int i_fileId, unsigned int typ, const uint8_t *buf, unsigned int i_len)
|
||||
unsigned int RleFile::writeRlc2(unsigned int i_fileId, unsigned int typ, const uint8_t *buf, unsigned int i_len)
|
||||
{
|
||||
if (IS_SKY9X(board)) {
|
||||
openRd(i_fileId);
|
||||
@@ -520,7 +520,7 @@ unsigned int EFile::writeRlc2(unsigned int i_fileId, unsigned int typ, const uin
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t EFile::byte_checksum( uint8_t *p, unsigned int size )
|
||||
uint8_t RleFile::byte_checksum( uint8_t *p, unsigned int size )
|
||||
{
|
||||
uint32_t csum ;
|
||||
|
||||
@@ -533,7 +533,7 @@ uint8_t EFile::byte_checksum( uint8_t *p, unsigned int size )
|
||||
return csum ;
|
||||
}
|
||||
|
||||
uint32_t EFile::ee32_check_header( struct t_eeprom_header *hptr )
|
||||
uint32_t RleFile::ee32_check_header( struct t_eeprom_header *hptr )
|
||||
{
|
||||
uint8_t csum ;
|
||||
|
||||
@@ -549,7 +549,7 @@ uint32_t EFile::ee32_check_header( struct t_eeprom_header *hptr )
|
||||
// to see which is the most recent, the block_no of the most recent
|
||||
// is returned, with the corresponding data size if required
|
||||
// and the sequence number if required
|
||||
uint32_t EFile::get_current_block_number( uint32_t block_no, uint16_t *p_size)
|
||||
uint32_t RleFile::get_current_block_number( uint32_t block_no, uint16_t *p_size)
|
||||
{
|
||||
struct t_eeprom_header b0 ;
|
||||
struct t_eeprom_header b1 ;
|
||||
|
||||
@@ -61,7 +61,7 @@ struct t_eeprom_header
|
||||
uint8_t hcsum ;
|
||||
};
|
||||
|
||||
class EFile
|
||||
class RleFile
|
||||
{
|
||||
uint8_t m_fileId; //index of file in directory = filename
|
||||
unsigned int m_pos; //over all filepos
|
||||
@@ -101,7 +101,7 @@ class EFile
|
||||
|
||||
public:
|
||||
|
||||
EFile();
|
||||
RleFile();
|
||||
|
||||
void EeFsCreate(uint8_t *eeprom, int size, BoardEnum board);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
Er9xInterface::Er9xInterface():
|
||||
EEPROMInterface(BOARD_STOCK),
|
||||
efile(new EFile())
|
||||
efile(new RleFile())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <QtXml>
|
||||
#include "eeprominterface.h"
|
||||
#include "er9xeeprom.h"
|
||||
class EFile;
|
||||
class RleFile;
|
||||
|
||||
class Er9xInterface : public EEPROMInterface
|
||||
{
|
||||
@@ -50,7 +50,7 @@ class Er9xInterface : public EEPROMInterface
|
||||
|
||||
protected:
|
||||
|
||||
EFile *efile;
|
||||
RleFile *efile;
|
||||
|
||||
private:
|
||||
void appendTextElement(QDomDocument * qdoc, QDomElement * pe, QString name, QString value);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
Ersky9xInterface::Ersky9xInterface():
|
||||
EEPROMInterface(BOARD_SKY9X),
|
||||
efile(new EFile())
|
||||
efile(new RleFile())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <QtXml>
|
||||
#include "eeprominterface.h"
|
||||
#include "ersky9xeeprom.h"
|
||||
class EFile;
|
||||
class RleFile;
|
||||
|
||||
class Ersky9xInterface : public EEPROMInterface
|
||||
{
|
||||
@@ -50,7 +50,7 @@ class Ersky9xInterface : public EEPROMInterface
|
||||
|
||||
protected:
|
||||
|
||||
EFile *efile;
|
||||
RleFile *efile;
|
||||
|
||||
private:
|
||||
void appendTextElement(QDomDocument * qdoc, QDomElement * pe, QString name, QString value);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
Gruvin9xInterface::Gruvin9xInterface(BoardEnum board):
|
||||
EEPROMInterface(board),
|
||||
efile(new EFile())
|
||||
efile(new RleFile())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "eeprominterface.h"
|
||||
|
||||
class EFile;
|
||||
class RleFile;
|
||||
|
||||
class Gruvin9xInterface : public EEPROMInterface
|
||||
{
|
||||
@@ -57,7 +57,7 @@ class Gruvin9xInterface : public EEPROMInterface
|
||||
template <class T>
|
||||
bool loadGeneral(GeneralSettings &settings, int version=2);
|
||||
|
||||
EFile *efile;
|
||||
RleFile *efile;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ namespace Open9xGruvin9x {
|
||||
#include "radio/src/pulses/pulses_avr.cpp"
|
||||
#include "radio/src/stamp.cpp"
|
||||
#include "radio/src/maths.cpp"
|
||||
#include "radio/src/vario.cpp"
|
||||
#include "radio/src/gui/menus.cpp"
|
||||
#include "radio/src/gui/menu_model.cpp"
|
||||
#include "radio/src/gui/menu_general.cpp"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
#include <exception>
|
||||
|
||||
namespace Open9xM128 {
|
||||
namespace OpenTxM128 {
|
||||
#include "radio/src/targets/stock/board_stock.cpp"
|
||||
#include "radio/src/targets/common_avr/telemetry_driver.cpp"
|
||||
#include "radio/src/eeprom_common.cpp"
|
||||
@@ -68,6 +68,7 @@ namespace Open9xM128 {
|
||||
#include "radio/src/pulses/pulses_avr.cpp"
|
||||
#include "radio/src/stamp.cpp"
|
||||
#include "radio/src/maths.cpp"
|
||||
#include "radio/src/vario.cpp"
|
||||
#include "radio/src/gui/menus.cpp"
|
||||
#include "radio/src/gui/menu_model.cpp"
|
||||
#include "radio/src/gui/menu_general.cpp"
|
||||
@@ -109,70 +110,70 @@ uint8_t getStickMode()
|
||||
|
||||
}
|
||||
|
||||
using namespace Open9xM128;
|
||||
using namespace OpenTxM128;
|
||||
|
||||
Open9xM128Simulator::Open9xM128Simulator()
|
||||
OpenTxM128Simulator::OpenTxM128Simulator()
|
||||
{
|
||||
}
|
||||
|
||||
bool Open9xM128Simulator::timer10ms()
|
||||
bool OpenTxM128Simulator::timer10ms()
|
||||
{
|
||||
#define TIMER10MS_IMPORT
|
||||
#include "simulatorimport.h"
|
||||
}
|
||||
|
||||
uint8_t * Open9xM128Simulator::getLcd()
|
||||
uint8_t * OpenTxM128Simulator::getLcd()
|
||||
{
|
||||
#define GETLCD_IMPORT
|
||||
#include "simulatorimport.h"
|
||||
}
|
||||
|
||||
bool Open9xM128Simulator::lcdChanged(bool & lightEnable)
|
||||
bool OpenTxM128Simulator::lcdChanged(bool & lightEnable)
|
||||
{
|
||||
#define LCDCHANGED_IMPORT
|
||||
#include "simulatorimport.h"
|
||||
}
|
||||
|
||||
void Open9xM128Simulator::start(QByteArray & eeprom, bool tests)
|
||||
void OpenTxM128Simulator::start(QByteArray & eeprom, bool tests)
|
||||
{
|
||||
memcpy(Open9xM128::eeprom, eeprom.data(), std::min<int>(sizeof(Open9xM128::eeprom), eeprom.size()));
|
||||
memcpy(OpenTxM128::eeprom, eeprom.data(), std::min<int>(sizeof(OpenTxM128::eeprom), eeprom.size()));
|
||||
StartEepromThread(NULL);
|
||||
StartMainThread(tests);
|
||||
}
|
||||
|
||||
void Open9xM128Simulator::start(const char * filename, bool tests)
|
||||
void OpenTxM128Simulator::start(const char * filename, bool tests)
|
||||
{
|
||||
StartEepromThread(filename);
|
||||
StartMainThread(tests);
|
||||
}
|
||||
|
||||
void Open9xM128Simulator::stop()
|
||||
void OpenTxM128Simulator::stop()
|
||||
{
|
||||
StopMainThread();
|
||||
StopEepromThread();
|
||||
}
|
||||
|
||||
void Open9xM128Simulator::getValues(TxOutputs &outputs)
|
||||
void OpenTxM128Simulator::getValues(TxOutputs &outputs)
|
||||
{
|
||||
#define GETVALUES_IMPORT
|
||||
#define g_chans512 channelOutputs
|
||||
#include "simulatorimport.h"
|
||||
}
|
||||
|
||||
void Open9xM128Simulator::setValues(TxInputs &inputs)
|
||||
void OpenTxM128Simulator::setValues(TxInputs &inputs)
|
||||
{
|
||||
#define SETVALUES_IMPORT
|
||||
#include "simulatorimport.h"
|
||||
}
|
||||
|
||||
void Open9xM128Simulator::setTrim(unsigned int idx, int value)
|
||||
void OpenTxM128Simulator::setTrim(unsigned int idx, int value)
|
||||
{
|
||||
idx = Open9xM128::modn12x3[4*getStickMode() + idx];
|
||||
idx = OpenTxM128::modn12x3[4*getStickMode() + idx];
|
||||
uint8_t phase = getTrimFlightPhase(getFlightPhase(), idx);
|
||||
setTrimValue(phase, idx, value);
|
||||
}
|
||||
|
||||
void Open9xM128Simulator::getTrims(Trims & trims)
|
||||
void OpenTxM128Simulator::getTrims(Trims & trims)
|
||||
{
|
||||
uint8_t phase = getFlightPhase();
|
||||
trims.extended = hasExtendedTrims();
|
||||
@@ -181,30 +182,30 @@ void Open9xM128Simulator::getTrims(Trims & trims)
|
||||
}
|
||||
|
||||
for (int i=0; i<2; i++) {
|
||||
uint8_t idx = Open9xM128::modn12x3[4*getStickMode() + i];
|
||||
uint8_t idx = OpenTxM128::modn12x3[4*getStickMode() + i];
|
||||
int16_t tmp = trims.values[i];
|
||||
trims.values[i] = trims.values[idx];
|
||||
trims.values[idx] = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
void Open9xM128Simulator::wheelEvent(uint8_t steps)
|
||||
void OpenTxM128Simulator::wheelEvent(uint8_t steps)
|
||||
{
|
||||
}
|
||||
|
||||
unsigned int Open9xM128Simulator::getPhase()
|
||||
unsigned int OpenTxM128Simulator::getPhase()
|
||||
{
|
||||
return getFlightPhase();
|
||||
}
|
||||
|
||||
const char * Open9xM128Simulator::getPhaseName(unsigned int phase)
|
||||
const char * OpenTxM128Simulator::getPhaseName(unsigned int phase)
|
||||
{
|
||||
static char buff[sizeof(g_model.phaseData[0].name)+1];
|
||||
zchar2str(buff, g_model.phaseData[phase].name, sizeof(g_model.phaseData[0].name));
|
||||
return buff;
|
||||
}
|
||||
|
||||
const char * Open9xM128Simulator::getError()
|
||||
const char * OpenTxM128Simulator::getError()
|
||||
{
|
||||
#define GETERROR_IMPORT
|
||||
#include "simulatorimport.h"
|
||||
|
||||
@@ -14,19 +14,19 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef open9xM128_simulator_h
|
||||
#define open9xM128_simulator_h
|
||||
#ifndef OpenTxM128_simulator_h
|
||||
#define OpenTxM128_simulator_h
|
||||
|
||||
#include "simulatorinterface.h"
|
||||
|
||||
class RadioData;
|
||||
class OpenTxEepromInterface;
|
||||
|
||||
class Open9xM128Simulator : public SimulatorInterface {
|
||||
class OpenTxM128Simulator : public SimulatorInterface {
|
||||
|
||||
public:
|
||||
|
||||
Open9xM128Simulator();
|
||||
OpenTxM128Simulator();
|
||||
|
||||
virtual void start(QByteArray & eeprom, bool tests=true);
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opentxsimulator.h"
|
||||
#include "opentxM64simulator.h"
|
||||
#include "opentxinterface.h"
|
||||
#include "opentxeeprom.h"
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
#include <exception>
|
||||
|
||||
namespace Open9x {
|
||||
namespace OpenTxM64 {
|
||||
#include "radio/src/targets/stock/board_stock.cpp"
|
||||
#include "radio/src/targets/common_avr/telemetry_driver.cpp"
|
||||
#include "radio/src/eeprom_common.cpp"
|
||||
@@ -74,6 +74,7 @@ namespace Open9x {
|
||||
#include "radio/src/pulses/pulses_avr.cpp"
|
||||
#include "radio/src/stamp.cpp"
|
||||
#include "radio/src/maths.cpp"
|
||||
#include "radio/src/vario.cpp"
|
||||
#include "radio/src/gui/menus.cpp"
|
||||
#include "radio/src/gui/menu_model.cpp"
|
||||
#include "radio/src/gui/menu_general.cpp"
|
||||
@@ -115,52 +116,52 @@ uint8_t getStickMode()
|
||||
|
||||
}
|
||||
|
||||
using namespace Open9x;
|
||||
using namespace OpenTxM64;
|
||||
|
||||
Open9xSimulator::Open9xSimulator()
|
||||
OpenTxM64Simulator::OpenTxM64Simulator()
|
||||
{
|
||||
#define INIT_IMPORT
|
||||
#include "simulatorimport.h"
|
||||
}
|
||||
|
||||
bool Open9xSimulator::timer10ms()
|
||||
bool OpenTxM64Simulator::timer10ms()
|
||||
{
|
||||
#define TIMER10MS_IMPORT
|
||||
#include "simulatorimport.h"
|
||||
}
|
||||
|
||||
uint8_t * Open9xSimulator::getLcd()
|
||||
uint8_t * OpenTxM64Simulator::getLcd()
|
||||
{
|
||||
#define GETLCD_IMPORT
|
||||
#include "simulatorimport.h"
|
||||
}
|
||||
|
||||
bool Open9xSimulator::lcdChanged(bool & lightEnable)
|
||||
bool OpenTxM64Simulator::lcdChanged(bool & lightEnable)
|
||||
{
|
||||
#define LCDCHANGED_IMPORT
|
||||
#include "simulatorimport.h"
|
||||
}
|
||||
|
||||
void Open9xSimulator::start(QByteArray & eeprom, bool tests)
|
||||
void OpenTxM64Simulator::start(QByteArray & eeprom, bool tests)
|
||||
{
|
||||
memcpy(&Open9x::eeprom[0], eeprom.data(), 2048);
|
||||
memcpy(&OpenTxM64::eeprom[0], eeprom.data(), 2048);
|
||||
StartEepromThread(NULL);
|
||||
StartMainThread(tests);
|
||||
}
|
||||
|
||||
void Open9xSimulator::start(const char * filename, bool tests)
|
||||
void OpenTxM64Simulator::start(const char * filename, bool tests)
|
||||
{
|
||||
StartEepromThread(filename);
|
||||
StartMainThread(tests);
|
||||
}
|
||||
|
||||
void Open9xSimulator::stop()
|
||||
void OpenTxM64Simulator::stop()
|
||||
{
|
||||
StopMainThread();
|
||||
StopEepromThread();
|
||||
}
|
||||
|
||||
void Open9xSimulator::getValues(TxOutputs &outputs)
|
||||
void OpenTxM64Simulator::getValues(TxOutputs &outputs)
|
||||
{
|
||||
#define GETVALUES_IMPORT
|
||||
#define g_chans512 channelOutputs
|
||||
@@ -169,20 +170,20 @@ void Open9xSimulator::getValues(TxOutputs &outputs)
|
||||
g_beepCnt = 0;
|
||||
}
|
||||
|
||||
void Open9xSimulator::setValues(TxInputs &inputs)
|
||||
void OpenTxM64Simulator::setValues(TxInputs &inputs)
|
||||
{
|
||||
#define SETVALUES_IMPORT
|
||||
#include "simulatorimport.h"
|
||||
}
|
||||
|
||||
void Open9xSimulator::setTrim(unsigned int idx, int value)
|
||||
void OpenTxM64Simulator::setTrim(unsigned int idx, int value)
|
||||
{
|
||||
idx = Open9x::modn12x3[4*getStickMode() + idx];
|
||||
idx = OpenTxM64::modn12x3[4*getStickMode() + idx];
|
||||
uint8_t phase = getTrimFlightPhase(getFlightPhase(), idx);
|
||||
setTrimValue(phase, idx, value);
|
||||
}
|
||||
|
||||
void Open9xSimulator::getTrims(Trims & trims)
|
||||
void OpenTxM64Simulator::getTrims(Trims & trims)
|
||||
{
|
||||
uint8_t phase = getFlightPhase();
|
||||
trims.extended = hasExtendedTrims();
|
||||
@@ -191,26 +192,26 @@ void Open9xSimulator::getTrims(Trims & trims)
|
||||
}
|
||||
|
||||
for (int i=0; i<2; i++) {
|
||||
uint8_t idx = Open9x::modn12x3[4*getStickMode() + i];
|
||||
uint8_t idx = OpenTxM64::modn12x3[4*getStickMode() + i];
|
||||
int16_t tmp = trims.values[i];
|
||||
trims.values[i] = trims.values[idx];
|
||||
trims.values[idx] = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int Open9xSimulator::getPhase()
|
||||
unsigned int OpenTxM64Simulator::getPhase()
|
||||
{
|
||||
return getFlightPhase();
|
||||
}
|
||||
|
||||
const char * Open9xSimulator::getPhaseName(unsigned int phase)
|
||||
const char * OpenTxM64Simulator::getPhaseName(unsigned int phase)
|
||||
{
|
||||
static char buff[sizeof(g_model.phaseData[0].name)+1];
|
||||
zchar2str(buff, g_model.phaseData[phase].name, sizeof(g_model.phaseData[0].name));
|
||||
return buff;
|
||||
}
|
||||
|
||||
const char * Open9xSimulator::getError()
|
||||
const char * OpenTxM64Simulator::getError()
|
||||
{
|
||||
#define GETERROR_IMPORT
|
||||
#include "simulatorimport.h"
|
||||
@@ -21,11 +21,11 @@
|
||||
|
||||
class OpenTxEepromInterface;
|
||||
|
||||
class Open9xSimulator : public SimulatorInterface {
|
||||
class OpenTxM64Simulator : public SimulatorInterface {
|
||||
|
||||
public:
|
||||
|
||||
Open9xSimulator();
|
||||
OpenTxM64Simulator();
|
||||
|
||||
virtual void start(QByteArray & eeprom, bool tests=true);
|
||||
|
||||
@@ -83,6 +83,7 @@ namespace Open9xSky9x {
|
||||
#include "radio/src/pulses/pulses_arm.cpp"
|
||||
#include "radio/src/stamp.cpp"
|
||||
#include "radio/src/maths.cpp"
|
||||
#include "radio/src/vario.cpp"
|
||||
#include "radio/src/gui/menus.cpp"
|
||||
#include "radio/src/gui/menu_model.cpp"
|
||||
#include "radio/src/gui/menu_general.cpp"
|
||||
|
||||
@@ -89,6 +89,7 @@ inline int geteepromsize() {
|
||||
#include "radio/src/pulses/pulses_arm.cpp"
|
||||
#include "radio/src/stamp.cpp"
|
||||
#include "radio/src/maths.cpp"
|
||||
#include "radio/src/vario.cpp"
|
||||
#include "radio/src/gui/menus.cpp"
|
||||
#include "radio/src/gui/menu_model.cpp"
|
||||
#include "radio/src/gui/menu_general.cpp"
|
||||
|
||||
@@ -2412,8 +2412,8 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_TARANIS(board))
|
||||
internalField.Append(new SpareBitsField<3>());
|
||||
if (IS_ARM(board))
|
||||
internalField.Append(new UnsignedField<3>(modelData.telemetryProtocol));
|
||||
else
|
||||
internalField.Append(new ConversionField< SignedField<3> >(modelData.moduleData[0].protocol, &protocolsConversionTable, "Protocol", ::QObject::tr("OpenTX doesn't accept this protocol")));
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "opentxeeprom.h"
|
||||
#include "open9xGruvin9xeeprom.h"
|
||||
#include "open9xSky9xeeprom.h"
|
||||
#include "opentxsimulator.h"
|
||||
#include "opentxM64simulator.h"
|
||||
#include "opentxM128simulator.h"
|
||||
#include "opentxGruvin9xsimulator.h"
|
||||
#include "opentxSky9xsimulator.h"
|
||||
@@ -45,7 +45,7 @@ size_t SizeOfArray( T(&)[ N ] )
|
||||
|
||||
OpenTxEepromInterface::OpenTxEepromInterface(BoardEnum board):
|
||||
EEPROMInterface(board),
|
||||
efile(new EFile())
|
||||
efile(new RleFile())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -569,11 +569,6 @@ int OpenTxFirmware::getCapability(const Capability capability)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
case HasFuncRepeat:
|
||||
case HasContrast:
|
||||
return 1;
|
||||
case Beeperlen:
|
||||
return 1;
|
||||
case MaxVolume:
|
||||
return (IS_ARM(board) ? 23 : 7);
|
||||
case HasSoundMixer:
|
||||
@@ -915,6 +910,7 @@ QString OpenTxFirmware::getFirmwareUrl(QString & id)
|
||||
url.append(QString("/getfw.php?fw=%1.hex").arg(id));
|
||||
break;
|
||||
case BOARD_SKY9X:
|
||||
case BOARD_9XRPRO:
|
||||
case BOARD_TARANIS:
|
||||
case BOARD_TARANIS_PLUS:
|
||||
url.append(QString("/getfw.php?fw=%1.bin").arg(id));
|
||||
@@ -944,9 +940,9 @@ SimulatorInterface * OpenTxFirmware::getSimulator()
|
||||
{
|
||||
switch (board) {
|
||||
case BOARD_STOCK:
|
||||
return new Open9xSimulator();
|
||||
return new OpenTxM64Simulator();
|
||||
case BOARD_M128:
|
||||
return new Open9xM128Simulator();
|
||||
return new OpenTxM128Simulator();
|
||||
case BOARD_GRUVIN9X:
|
||||
return new Open9xGruvin9xSimulator();
|
||||
case BOARD_SKY9X:
|
||||
@@ -1158,7 +1154,7 @@ void registerOpenTxFirmwares()
|
||||
openTx->addOptions(fai_options);
|
||||
firmwares.push_back(openTx);
|
||||
|
||||
/* SKY9X board */
|
||||
/* 9XR-Pro */
|
||||
openTx = new OpenTxFirmware("opentx-9xrpro", QObject::tr("OpenTX for 9XR-PRO"), BOARD_9XRPRO, true);
|
||||
openTx->setVariantBase(FRSKY_VARIANT);
|
||||
openTx->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
|
||||
@@ -1181,29 +1177,6 @@ void registerOpenTxFirmwares()
|
||||
openTx->addOption("bluetooth", QObject::tr("Bluetooth interface"));
|
||||
openTx->addOptions(fai_options);
|
||||
firmwares.push_back(openTx);
|
||||
openTx = new OpenTxFirmware("opentx-sky9x", QObject::tr("OpenTX for Sky9x board / 9X"), BOARD_SKY9X, true);
|
||||
openTx->setVariantBase(FRSKY_VARIANT);
|
||||
openTx->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support"));
|
||||
openTx->addOption("templates", QObject::tr("Enable TEMPLATES menu"));
|
||||
openTx->addOption("nofp", QObject::tr("No flight modes"));
|
||||
openTx->addOption("nocurves", QObject::tr("Disable curves menus"));
|
||||
openTx->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||
openTx->addOption("ppmus", QObject::tr("Channel values displayed in us"));
|
||||
openTx->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||
openTx->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||
openTx->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||
openTx->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||
openTx->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||
openTx->addOption("dblkeys", QObject::tr("Enable resetting values by pressing up and down at the same time"));
|
||||
openTx->addOption("nographics", QObject::tr("No graphical check boxes and sliders"));
|
||||
openTx->addOption("battgraph", QObject::tr("Battery graph"));
|
||||
openTx->addOption("nobold", QObject::tr("Don't use bold font for highlighting active items"));
|
||||
openTx->addOption("sqt5font", QObject::tr("Use alternative SQT5 font"));
|
||||
openTx->addOption("tsticks", QObject::tr("Use FrSky Taranis sticks in a 9X/9XR"));
|
||||
openTx->addOption("bluetooth", QObject::tr("Bluetooth interface"));
|
||||
openTx->addOptions(fai_options);
|
||||
firmwares.push_back(openTx);
|
||||
|
||||
#endif
|
||||
|
||||
/* Taranis board */
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#define OPENTX_COMPANION_DOWNLOADS "http://downloads-20.open-tx.org/companion"
|
||||
#define OPENTX_FIRMWARE_DOWNLOADS "http://downloads-20.open-tx.org/firmware"
|
||||
|
||||
class EFile;
|
||||
class RleFile;
|
||||
|
||||
class OpenTxEepromInterface : public EEPROMInterface
|
||||
{
|
||||
@@ -74,7 +74,7 @@ class OpenTxEepromInterface : public EEPROMInterface
|
||||
template <class T>
|
||||
bool saveGeneral(GeneralSettings &settings, BoardEnum board, uint32_t version, uint32_t variant);
|
||||
|
||||
EFile *efile;
|
||||
RleFile *efile;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
Th9xInterface::Th9xInterface():
|
||||
EEPROMInterface(BOARD_STOCK),
|
||||
efile(new EFile())
|
||||
efile(new RleFile())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "eeprominterface.h"
|
||||
|
||||
class EFile;
|
||||
class RleFile;
|
||||
|
||||
class Th9xInterface : public EEPROMInterface
|
||||
{
|
||||
@@ -50,7 +50,7 @@ class Th9xInterface : public EEPROMInterface
|
||||
|
||||
protected:
|
||||
|
||||
EFile *efile;
|
||||
RleFile *efile;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ void FlashInterface::SeekSplash(void)
|
||||
return;
|
||||
}
|
||||
|
||||
if (SeekSplash(QByteArray(OTX_SPS_TARANIS, sizeof(OTX_SPS_TARANIS)), QByteArray(OTX_SPE, sizeof(OTX_SPE)), 6790)) {
|
||||
if (SeekSplash(QByteArray(OTX_SPS_TARANIS, OTX_SPS_SIZE), QByteArray(OTX_SPE, OTX_SPE_SIZE), 6784)) {
|
||||
splash_width = SPLASHX9D_WIDTH;
|
||||
splash_height = SPLASHX9D_HEIGHT;
|
||||
splash_format = QImage::Format_Indexed8;
|
||||
|
||||
@@ -103,10 +103,6 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
|
||||
mavbaudEditLock=false;
|
||||
}
|
||||
|
||||
if (!GetCurrentFirmware()->getCapability(HasContrast)) {
|
||||
ui->contrastSB->hide();
|
||||
ui->label_contrast->hide();
|
||||
}
|
||||
if (!GetCurrentFirmware()->getCapability(HasSoundMixer)) {
|
||||
ui->beepVolume_SL->hide();
|
||||
ui->beepVolume_label->hide();
|
||||
|
||||
@@ -1091,18 +1091,6 @@
|
||||
offset="1"
|
||||
id="stop4633-8" />
|
||||
</linearGradient>
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
id="filter5060"
|
||||
x="-0.10864612"
|
||||
width="1.2172922"
|
||||
y="-0.24492737"
|
||||
height="1.4898547">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="5.7995994"
|
||||
id="feGaussianBlur5062" />
|
||||
</filter>
|
||||
<linearGradient
|
||||
id="linearGradient4709-5">
|
||||
<stop
|
||||
@@ -1163,18 +1151,6 @@
|
||||
offset="1"
|
||||
id="stop4633-9" />
|
||||
</linearGradient>
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
id="filter6148"
|
||||
x="-0.090552361"
|
||||
width="1.1811047"
|
||||
y="-0.1778305"
|
||||
height="1.355661">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="5.1385088"
|
||||
id="feGaussianBlur6150" />
|
||||
</filter>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient5786"
|
||||
@@ -2566,7 +2542,7 @@
|
||||
fx="299.52417"
|
||||
fy="779.74567"
|
||||
r="55.418938"
|
||||
gradientTransform="matrix(0.45002749,0.03665999,-0.00806819,0.09904275,-32.330683,866.95508)"
|
||||
gradientTransform="matrix(0.45002749,0.03665999,-0.00806819,0.09904275,194.65059,702.90631)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
@@ -2577,7 +2553,7 @@
|
||||
x2="294.27679"
|
||||
y2="794.37579"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-203.53553,162.44975)" />
|
||||
gradientTransform="translate(23.445741,-1.5990189)" />
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
id="filter5149"
|
||||
@@ -2607,7 +2583,7 @@
|
||||
x2="292.177"
|
||||
y2="803.63416"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-203.53553,162.44975)" />
|
||||
gradientTransform="translate(23.445741,-1.5990189)" />
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
id="filter5295"
|
||||
@@ -2835,7 +2811,7 @@
|
||||
xlink:href="#linearGradient5127-5"
|
||||
id="linearGradient5695"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-203.69622,-0.7961383)"
|
||||
gradientTransform="matrix(1.3146629,0,0,1.3146629,-298.3169,-166.23615)"
|
||||
x1="326.85025"
|
||||
y1="793.87579"
|
||||
x2="294.27679"
|
||||
@@ -2845,7 +2821,7 @@
|
||||
xlink:href="#linearGradient5093-1"
|
||||
id="radialGradient5699"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.78006028,0.14595423,-0.08994153,0.48069744,-67.795168,373.85384)"
|
||||
gradientTransform="matrix(1.0255163,0.19188061,-0.1182428,0.63195509,-119.65283,326.30228)"
|
||||
cx="253.82587"
|
||||
cy="792.63324"
|
||||
fx="253.82587"
|
||||
@@ -2856,7 +2832,7 @@
|
||||
xlink:href="#linearGradient5105-3"
|
||||
id="radialGradient5714"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.97852709,0.20611827,-0.04337458,0.20591673,-164.16094,578.0247)"
|
||||
gradientTransform="matrix(1.2864332,0.27097604,-0.05702295,0.27071109,-246.34133,594.71814)"
|
||||
cx="246.97363"
|
||||
cy="789.21893"
|
||||
fx="246.97363"
|
||||
@@ -2867,7 +2843,7 @@
|
||||
xlink:href="#linearGradient5117-0"
|
||||
id="radialGradient5718"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.45002749,0.03665999,-0.00806819,0.09904275,-32.49138,703.70919)"
|
||||
gradientTransform="matrix(0.59163445,0.04819552,-0.01060695,0.13020783,-73.240247,759.95088)"
|
||||
cx="299.52417"
|
||||
cy="779.74567"
|
||||
fx="299.52417"
|
||||
@@ -2878,7 +2854,7 @@
|
||||
xlink:href="#linearGradient5727"
|
||||
id="linearGradient5722"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-203.69622,-0.7961383)"
|
||||
gradientTransform="translate(-211.47439,79.106926)"
|
||||
x1="266.15909"
|
||||
y1="735.04486"
|
||||
x2="292.177"
|
||||
@@ -2898,9 +2874,9 @@
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
borderlayer="true"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:window-height="972"
|
||||
inkscape:window-x="1280"
|
||||
inkscape:window-width="1024"
|
||||
inkscape:window-height="744"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
showguides="true"
|
||||
@@ -2913,7 +2889,7 @@
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
@@ -2922,162 +2898,33 @@
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-702.36218)">
|
||||
<path
|
||||
style="opacity:0.16607774;fill:#212121;fill-opacity:1;stroke:none;filter:url(#filter5427)"
|
||||
d="m 353.28858,830.27639 19,-0.25 -0.75,-10.25 -24.25,-11.75 -0.5,22.25 z"
|
||||
id="path5361"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="matrix(0.80136773,0,0,0.80136773,-149.24088,316.37583)" />
|
||||
<path
|
||||
style="opacity:0.60070669;fill:#212121;fill-opacity:1;stroke:none;filter:url(#filter5357)"
|
||||
d="m 323.59376,743.0011 c -2.02047,0.27313 -4.06987,0.40162 -5.65936,2.82968 l -20.98682,32.54135 -46.21815,29.24005 0.23581,0 46.21815,29.24006 20.98681,32.54135 c 1.58949,2.42806 3.63889,2.55655 5.65937,2.82968 l 13.44099,0 0,-64.61109 -0.23581,0 0,-64.61108 -13.44099,0 z"
|
||||
id="path3473-4"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="matrix(1,0,0,0.94301708,-203.53553,204.05043)" />
|
||||
<path
|
||||
style="fill:#dc3232;fill-opacity:1;stroke:#000000;stroke-width:1.17200005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 109.94896,891.54774 c -2.02047,0.27313 -4.06987,0.40162 -5.65936,2.82968 l -20.986823,32.54135 -46.21815,29.24005 0.23581,0 46.21815,29.24006 20.986813,32.54132 c 1.58949,2.428 3.63889,2.5565 5.65937,2.8297 l 13.44099,0 0,-64.61108 -0.23581,0 0,-64.61108 -13.44099,0 z"
|
||||
id="path3473"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="opacity:0.9181272;fill:url(#linearGradient5187);fill-opacity:1;stroke:#ffffff;stroke-width:1.17200005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter5161)"
|
||||
d="m 121.40197,893.5435 c -3.98587,0.0736 -7.99299,-0.14058 -11.96875,0.0937 l 0,5e-5 c -5.66719,0.75957 -6.41414,8.52927 -10.027703,11.99566 -5.47113,7.65546 -9.64823,16.62401 -15.87971,23.508 -14.19753,8.98836 -28.39506,17.97673 -42.59259,26.96509 14.71745,9.43817 29.76941,18.54698 44.28125,28.1875 7.64889,11.13495 14.17209,23.3742 22.437503,33.9062 4.5008,1.2612 9.34531,0.2231 13.96875,0.5625"
|
||||
id="path5153"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccc" />
|
||||
<path
|
||||
style="fill:#3234bd;fill-opacity:1;stroke:#000000;stroke-width:1.27199996;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 62.109637,948.31825 c -16.29822,0.1086 -26.48309,3.75139 -26.70513,7.75215 l -0.0148,0 c -4.7e-4,0.0291 -4.7e-4,0.0594 0,0.0884 -4.7e-4,0.03 -4.7e-4,0.0584 0,0.0884 l 0.0148,0 c 0.25241,4.75514 14.57029,9.01198 36.50585,7.42792 25.08486,-1.81148 45.880773,-5.3502 71.788463,-5.77727 1.67155,-0.12773 1.68871,-3.3799 -0.0295,-3.47815 -25.89384,-0.42928 -46.669003,-3.96648 -71.744253,-5.77727 -3.46945,-0.25055 -6.75183,-0.34465 -9.81546,-0.32423 z"
|
||||
id="path3408"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="scccccsccss" />
|
||||
<path
|
||||
sodipodi:nodetypes="scccccsccss"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5115"
|
||||
d="m 62.109637,948.31825 c -16.29822,0.1086 -26.48309,3.75139 -26.70513,7.75215 l -0.0148,0 c -4.7e-4,0.0291 -4.7e-4,0.0594 0,0.0884 -4.7e-4,0.03 -4.7e-4,0.0584 0,0.0884 l 0.0148,0 c 0.25241,4.75514 14.57029,9.01198 36.50585,7.42792 25.08486,-1.81148 45.880773,-5.3502 71.788463,-5.77727 1.67155,-0.12773 1.68871,-3.3799 -0.0295,-3.47815 -25.89384,-0.42928 -46.669003,-3.96648 -71.744253,-5.77727 -3.46945,-0.25055 -6.75183,-0.34465 -9.81546,-0.32423 z"
|
||||
style="fill:url(#radialGradient5123);fill-opacity:1;stroke:#000000;stroke-width:1.27199996;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
<path
|
||||
sodipodi:nodetypes="cssccscc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5688"
|
||||
d="m 83.892766,952.60695 c -6.87778,-0.7158 -13.77991,-1.4658 -21.23736,-2.0043 -2.45227,-0.1771 -4.77613,-0.2503 -6.94156,-0.2358 -3.14581,0.021 -5.92519,0.2417 -8.37115,0.5895 -1.14311,3.3062 -0.96581,6.6124 0,9.9186 4.12512,0.5858 9.30688,0.7874 15.31271,0.3537 7.45864,-0.5386 14.35978,-1.2885 21.23736,-2.0043 0.64914,-2.1131 0.89851,-4.2832 0,-6.6174 z"
|
||||
style="fill:#212121;fill-opacity:1;stroke:#000000;stroke-width:0.33334607px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:#535353;fill-opacity:1;stroke:none;filter:url(#filter5684)"
|
||||
d="m 81.404082,954.22675 c -6.151626,-0.53187 -12.32503,-1.0891 -18.995124,-1.48925 -2.193359,-0.13156 -4.271866,-0.1859 -6.208671,-0.17519 -2.813676,0.0156 -5.29961,0.17959 -7.487325,0.43801 -1.022421,2.45651 -0.863841,4.91301 0,7.36951 3.68959,0.43523 8.324262,0.58507 13.695996,0.26283 6.671159,-0.4002 12.843677,-0.95735 18.995124,-1.48924 0.580604,-1.56999 0.803647,-3.1824 0,-4.91667 z"
|
||||
id="path3462-8"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cssccscc"
|
||||
transform="matrix(0.9487876,0,0,0.65487255,5.1779868,331.94549)" />
|
||||
<rect
|
||||
style="fill:#81ff51;fill-opacity:1;stroke:#070707;stroke-width:1.32051849;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="rect3507"
|
||||
width="13.912606"
|
||||
height="8.489048"
|
||||
x="70.280167"
|
||||
y="952.14117" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:2.07510066;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 72.506544,957.02087 46.329316,15.02601"
|
||||
id="path4279-7"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:#81ff51;fill-opacity:1;stroke:#000000;stroke-width:2.07510066;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 72.050618,955.14715 118.73347,941.00501"
|
||||
id="path4279"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:#dcc75f;fill-opacity:1;stroke:#000000;stroke-width:1.17200005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 61.200064,948.43449 c -16.29822,0.10861 -26.49671,3.74925 -26.71875,7.75 -4.7e-4,0.0292 -4.7e-4,0.0648 0,0.0937 -4.7e-4,0.0302 -4.7e-4,0.0638 0,0.0937 0.25241,4.75514 14.56443,9.02156 36.5,7.4375 5.05245,-0.36484 9.80312,-0.85532 14.59375,-1.3125 6.24289,-3.59689 7.9814,-7.60209 0,-12.4375 -4.78394,-0.45667 -9.51469,-0.91674 -14.5625,-1.28125 -3.46945,-0.25057 -6.74887,-0.36418 -9.8125,-0.34375 z m -5.65625,2.28125 c 2.16543,-0.0144 4.48523,0.0729 6.9375,0.25 7.45745,0.53854 14.37222,1.28416 21.25,2 0.89851,2.33414 0.64914,4.51196 0,6.625 -6.87758,0.71588 -13.79136,1.46138 -21.25,2 -6.00583,0.43371 -11.18738,0.21075 -15.3125,-0.375 -0.96581,-3.30621 -1.14311,-6.60003 0,-9.90625 2.44596,-0.3478 5.22919,-0.57275 8.375,-0.59375 z"
|
||||
id="path5103"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#3234bd;fill-opacity:1;stroke:#000000;stroke-width:1.07200003;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 112.08596,954.0289 c -18.568463,0.8356 -18.753283,3.98005 0.0834,4.59333 10.27215,-0.38097 20.26392,-0.53862 31.52949,-0.72433 1.67155,-0.12773 1.68871,-3.3799 -0.0295,-3.47815 -11.25276,-0.18656 -21.32425,-0.0108 -31.58339,-0.39085 z"
|
||||
id="path3466"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.57200003;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 116.82782,1020.465 -0.74788,-58.411 7.07421,0"
|
||||
id="path3501"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.57200003;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 123.15415,950.73527 -7.07421,0 0.23581,-58.95173"
|
||||
id="path3503"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="opacity:0.53003534;fill:#212121;fill-opacity:1;stroke:none"
|
||||
id="rect3505"
|
||||
width="5.3357005"
|
||||
height="3.2573676"
|
||||
x="116.40572"
|
||||
y="939.42657" />
|
||||
<rect
|
||||
style="fill:#000000;fill-opacity:1;stroke:none"
|
||||
id="rect3509"
|
||||
width="5.6508331"
|
||||
height="3.9498441"
|
||||
x="-959.20496"
|
||||
y="70.752983"
|
||||
transform="matrix(0,-1,1,0,0,0)" />
|
||||
<rect
|
||||
style="opacity:0.53003534;fill:#212121;fill-opacity:1;stroke:none"
|
||||
id="rect3505-6"
|
||||
width="5.3357005"
|
||||
height="3.2573676"
|
||||
x="117.03843"
|
||||
y="-973.44843"
|
||||
transform="scale(1,-1)" />
|
||||
<path
|
||||
style="opacity:0.77385158;fill:none;stroke:#ffffff;stroke-width:1.10000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter5149)"
|
||||
d="m 35.13604,955.48871 c 15.716517,-12.07971 44.811908,-4.83224 68.98008,-1.28033"
|
||||
id="path5135"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5125"
|
||||
d="m 112.08596,954.0289 c -18.568463,0.8356 -18.753283,3.98005 0.0834,4.59333 10.27215,-0.38097 20.26392,-0.53862 31.52949,-0.72433 1.67155,-0.12773 1.68871,-3.3799 -0.0295,-3.47815 -11.25276,-0.18656 -21.32425,-0.0108 -31.58339,-0.39085 z"
|
||||
style="fill:url(#linearGradient5133);fill-opacity:1;stroke:#000000;stroke-width:1.07200003;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
<path
|
||||
style="opacity:0.54063607;fill:#333333;fill-opacity:1;stroke:none;filter:url(#filter5295)"
|
||||
d="m 49.934137,963.20838 c 18.42376,3.94814 47.50436,4.19404 63.500003,3.625 l 4.25,0.75 5.625,3.875 0.125,-13.25 -30.500003,3.75 -27.25,1.5 z"
|
||||
id="path5189"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
<path
|
||||
style="opacity:0.16607774;fill:#212121;fill-opacity:1;stroke:none;filter:url(#filter5427-6)"
|
||||
d="m 353.28858,830.27639 19,-0.25 -0.75,-10.25 -24.25,-11.75 -0.5,22.25 z"
|
||||
id="path5361-7"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="matrix(0.80136773,0,0,0.80136773,-149.40158,153.12994)" />
|
||||
transform="matrix(1.0535285,0,0,1.0535285,-226.93776,36.124757)" />
|
||||
<path
|
||||
style="opacity:0.60070669;fill:#212121;fill-opacity:1;stroke:none;filter:url(#filter5357-0)"
|
||||
d="m 323.59376,743.0011 c -2.02047,0.27313 -4.06987,0.40162 -5.65936,2.82968 l -20.98682,32.54135 -46.21815,29.24005 0.23581,0 46.21815,29.24006 20.98681,32.54135 c 1.58949,2.42806 3.63889,2.55655 5.65937,2.82968 l 13.44099,0 0,-64.61109 -0.23581,0 0,-64.61108 -13.44099,0 z"
|
||||
id="path3473-4-1"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="matrix(1,0,0,0.94301708,-203.69622,40.804542)" />
|
||||
transform="matrix(1.314663,0,0,1.2397496,-298.31692,-111.54527)" />
|
||||
<path
|
||||
style="fill:#dc3232;fill-opacity:1;stroke:#000000;stroke-width:1.17200005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 109.78826,728.30185 c -2.02047,0.27313 -4.06987,0.40162 -5.65936,2.82968 l -20.98682,32.54135 -46.21815,29.24005 0.23581,0 46.21815,29.24006 20.98681,32.54135 c 1.58949,2.42806 3.63889,2.55655 5.65937,2.82968 l 13.44099,0 0,-64.61109 -0.23581,0 0,-64.61108 -13.44099,0 z"
|
||||
style="fill:#dc3232;fill-opacity:1;stroke:#000000;stroke-width:1.54078507;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 113.80952,792.28197 c -2.65624,0.35907 -5.35051,0.528 -7.44015,3.72007 l -27.590593,42.78091 -60.761289,38.44082 0.31001,0 60.761291,38.44082 27.590571,42.7809 c 2.08965,3.19209 4.78392,3.36101 7.44017,3.72009 l 17.67038,0 0,-84.94181 -0.31001,0 0,-84.9418 -17.67038,0 z"
|
||||
id="path3473-5"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="opacity:0.9181272;fill:url(#linearGradient5722);fill-opacity:1;stroke:#fffcfc;stroke-width:1.17200005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter5161-7)"
|
||||
d="m 121.24127,730.29761 c -3.98587,0.0736 -7.99299,-0.14058 -11.96875,0.0937 l 0,5e-5 c -5.66719,0.75957 -6.41414,8.52927 -10.0277,11.99566 -5.47113,7.65546 -9.64823,16.62401 -15.87971,23.508 -14.19753,8.98836 -28.39506,17.97673 -42.59259,26.96509 14.71745,9.43817 29.76941,18.54698 44.28125,28.1875 7.64889,11.13495 14.17209,23.37424 22.4375,33.90625 4.5008,1.26119 9.34531,0.22306 13.96875,0.5625"
|
||||
d="m 113.4631,810.20067 c -3.98587,0.0736 -7.99299,-0.14058 -11.96875,0.0937 l 0,5e-5 c -5.667194,0.75957 -6.414144,8.52927 -10.027704,11.99566 -5.47113,7.65546 -9.64823,16.62401 -15.87971,23.508 -14.19753,8.98836 -28.39506,17.97673 -42.59259,26.96509 14.71745,9.43817 29.76941,18.54698 44.28125,28.1875 7.64889,11.13495 14.17209,23.37424 22.4375,33.90625 4.500804,1.26119 9.345314,0.22306 13.968754,0.5625"
|
||||
id="path5153-1"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccc" />
|
||||
sodipodi:nodetypes="ccccccccc"
|
||||
transform="matrix(1.314663,0,0,1.314663,-20.299359,-270.23509)" />
|
||||
<path
|
||||
style="fill:#3234bd;fill-opacity:1;stroke:#000000;stroke-width:1.27199996;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 61.94894,785.07236 c -16.29822,0.1086 -26.48309,3.75139 -26.70513,7.75215 l -0.0148,0 c -4.7e-4,0.0291 -4.7e-4,0.0594 0,0.0884 -4.7e-4,0.03 -4.7e-4,0.0584 0,0.0884 l 0.0148,0 c 0.25241,4.75514 14.57029,9.01198 36.50585,7.42792 25.08486,-1.81148 45.88077,-5.3502 71.78847,-5.77727 1.67155,-0.12773 1.68871,-3.3799 -0.0295,-3.47815 -25.89385,-0.42928 -46.66901,-3.96648 -71.74426,-5.77727 -3.46945,-0.25055 -6.75183,-0.34465 -9.81546,-0.32423 z"
|
||||
style="fill:#3234bd;fill-opacity:1;stroke:#000000;stroke-width:1.67225122;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 50.916942,866.91606 c -21.426667,0.14277 -34.816338,4.93181 -35.108246,10.19146 l -0.01946,0 c -6.18e-4,0.0383 -6.18e-4,0.0781 0,0.11622 -6.18e-4,0.0394 -6.18e-4,0.0767 0,0.11621 l 0.01946,0 c 0.331835,6.25141 19.15502,11.84772 47.992889,9.76522 32.978135,-2.38149 60.317745,-7.03371 94.377645,-7.59517 2.19752,-0.16792 2.22008,-4.44342 -0.0388,-4.57259 -34.04168,-0.56436 -61.354016,-5.21459 -94.319516,-7.59516 -4.561157,-0.32939 -8.876381,-0.45311 -12.904022,-0.42626 z"
|
||||
id="path3408-8"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="scccccsccss" />
|
||||
@@ -3085,11 +2932,11 @@
|
||||
sodipodi:nodetypes="scccccsccss"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5115-3"
|
||||
d="m 61.94894,785.07236 c -16.29822,0.1086 -26.48309,3.75139 -26.70513,7.75215 l -0.0148,0 c -4.7e-4,0.0291 -4.7e-4,0.0594 0,0.0884 -4.7e-4,0.03 -4.7e-4,0.0584 0,0.0884 l 0.0148,0 c 0.25241,4.75514 14.57029,9.01198 36.50585,7.42792 25.08486,-1.81148 45.88077,-5.3502 71.78847,-5.77727 1.67155,-0.12773 1.68871,-3.3799 -0.0295,-3.47815 -25.89385,-0.42928 -46.66901,-3.96648 -71.74426,-5.77727 -3.46945,-0.25055 -6.75183,-0.34465 -9.81546,-0.32423 z"
|
||||
style="fill:url(#radialGradient5718);fill-opacity:1;stroke:#000000;stroke-width:1.27199996;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
d="m 50.916942,866.91606 c -21.426667,0.14277 -34.816338,4.93181 -35.108246,10.19146 l -0.01946,0 c -6.18e-4,0.0383 -6.18e-4,0.0781 0,0.11622 -6.18e-4,0.0394 -6.18e-4,0.0767 0,0.11621 l 0.01946,0 c 0.331835,6.25141 19.15502,11.84772 47.992889,9.76522 32.978135,-2.38149 60.317745,-7.03371 94.377645,-7.59517 2.19752,-0.16792 2.22008,-4.44342 -0.0388,-4.57259 -34.04168,-0.56436 -61.354016,-5.21459 -94.319516,-7.59516 -4.561157,-0.32939 -8.876381,-0.45311 -12.904022,-0.42626 z"
|
||||
style="fill:url(#radialGradient5718);fill-opacity:1;stroke:#000000;stroke-width:1.67225122;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
<path
|
||||
style="fill:#dcc75f;fill-opacity:1;stroke:#000000;stroke-width:1.17200005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 86.65625,786.46948 c -4.78394,-0.45667 -9.52801,-0.93243 -14.57582,-1.29694 -3.46945,-0.25057 -6.75183,-0.34466 -9.81546,-0.32423 -16.29822,0.10861 -26.48309,3.7514 -26.70513,7.75215 l -0.0148,0 c -4.7e-4,0.0292 -4.7e-4,0.0594 0,0.0884 -4.7e-4,0.0302 -4.7e-4,0.0584 0,0.0884 l 0.0148,0 c 0.25241,4.75514 14.57029,9.01198 36.50586,7.42792 5.05245,-0.36484 9.79992,-0.83976 14.59055,-1.29694 6.24289,-3.59689 7.9814,-7.6034 0,-12.43881 z"
|
||||
style="fill:#dcc75f;fill-opacity:1;stroke:#000000;stroke-width:1.54078507;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 83.398727,868.7528 c -6.289269,-0.60036 -12.526122,-1.22584 -19.16229,-1.70504 -4.561158,-0.32942 -8.876381,-0.45311 -12.904023,-0.42626 -21.426666,0.1428 -34.816337,4.93183 -35.108245,10.19147 l -0.01946,0 c -6.18e-4,0.0384 -6.18e-4,0.0781 0,0.11622 -6.18e-4,0.0398 -6.18e-4,0.0767 0,0.11621 l 0.01946,0 c 0.331834,6.25141 19.15502,11.84772 47.992902,9.76522 6.642269,-0.47965 12.883592,-1.104 19.181656,-1.70505 8.207296,-4.72869 10.492848,-9.9959 0,-16.35284 z"
|
||||
id="path3481-9-8"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="csscccccscc" />
|
||||
@@ -3097,109 +2944,111 @@
|
||||
sodipodi:nodetypes="csscccccscc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5103-4"
|
||||
d="m 86.65625,786.46948 c -4.78394,-0.45667 -9.52801,-0.93243 -14.57582,-1.29694 -3.46945,-0.25057 -6.75183,-0.34466 -9.81546,-0.32423 -16.29822,0.10861 -26.48309,3.7514 -26.70513,7.75215 l -0.0148,0 c -4.7e-4,0.0292 -4.7e-4,0.0594 0,0.0884 -4.7e-4,0.0302 -4.7e-4,0.0584 0,0.0884 l 0.0148,0 c 0.25241,4.75514 14.57029,9.01198 36.50586,7.42792 5.05245,-0.36484 9.79992,-0.83976 14.59055,-1.29694 6.24289,-3.59689 7.9814,-7.6034 0,-12.43881 z"
|
||||
style="fill:url(#radialGradient5714);fill-opacity:1;stroke:#000000;stroke-width:1.17200005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
d="m 83.398727,868.7528 c -6.289269,-0.60036 -12.526122,-1.22584 -19.16229,-1.70504 -4.561158,-0.32942 -8.876381,-0.45311 -12.904023,-0.42626 -21.426666,0.1428 -34.816337,4.93183 -35.108245,10.19147 l -0.01946,0 c -6.18e-4,0.0384 -6.18e-4,0.0781 0,0.11622 -6.18e-4,0.0398 -6.18e-4,0.0767 0,0.11621 l 0.01946,0 c 0.331834,6.25141 19.15502,11.84772 47.992902,9.76522 6.642269,-0.47965 12.883592,-1.104 19.181656,-1.70505 8.207296,-4.72869 10.492848,-9.9959 0,-16.35284 z"
|
||||
style="fill:url(#radialGradient5714);fill-opacity:1;stroke:#000000;stroke-width:1.54078507;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
<path
|
||||
style="fill:#212121;fill-opacity:1;stroke:#000000;stroke-width:0.33334607px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 84.79273,789.36109 c -6.87778,-0.71584 -13.77991,-1.46582 -21.23736,-2.00436 -2.45227,-0.17709 -4.77613,-0.25023 -6.94156,-0.2358 -3.14581,0.021 -5.92519,0.24171 -8.37115,0.58951 -1.14311,3.30622 -0.96581,6.61242 0,9.91863 4.12512,0.58575 9.30688,0.78742 15.31271,0.35371 7.45864,-0.53862 14.35978,-1.28848 21.23736,-2.00436 0.64914,-2.11304 0.89851,-4.28319 0,-6.61733 z"
|
||||
style="fill:#212121;fill-opacity:1;stroke:#000000;stroke-width:0.43823776px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 80.948826,872.55429 c -9.041962,-0.94109 -18.115937,-1.92705 -27.919971,-2.63505 -3.223908,-0.23282 -6.279001,-0.32897 -9.125811,-0.31 -4.135681,0.0276 -7.789628,0.31777 -11.005241,0.77501 -1.502805,4.34655 -1.269715,8.6931 0,13.03965 5.423142,0.77006 12.23541,1.03519 20.131052,0.46501 9.805599,-0.70811 18.878271,-1.69391 27.919971,-2.63506 0.8534,-2.77794 1.181238,-5.63095 0,-8.69956 z"
|
||||
id="path3462-2"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cssccscc" />
|
||||
<path
|
||||
style="fill:#3234bd;fill-opacity:1;stroke:#000000;stroke-width:1.07200003;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 111.92526,790.78301 c -18.56846,0.8356 -18.75328,3.98005 0.0834,4.59333 10.27215,-0.38097 20.26392,-0.53862 31.5295,-0.72433 1.67155,-0.12773 1.68871,-3.3799 -0.0295,-3.47815 -11.25277,-0.18656 -21.32426,-0.0108 -31.5834,-0.39085 z"
|
||||
style="fill:#3234bd;fill-opacity:1;stroke:#000000;stroke-width:1.40931869;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 116.61896,874.42364 c -24.411268,1.09853 -24.654245,5.23242 0.10964,6.03868 13.50442,-0.50085 26.64022,-0.70811 41.45066,-0.95225 2.19753,-0.16792 2.22009,-4.44343 -0.0388,-4.57259 -14.7936,-0.24526 -28.03421,-0.0142 -41.52152,-0.51384 z"
|
||||
id="path3466-9"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.57200003;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 116.66712,857.21915 -0.74788,-58.41104 7.07421,0"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.75198728;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 122.85291,961.76477 -0.98322,-76.79083 9.30021,0"
|
||||
id="path3501-7"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.57200003;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 122.99345,787.48938 -7.07421,0 0.23581,-58.95173"
|
||||
style="fill:none;stroke:#000000;stroke-width:0.75198728;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 131.1699,870.09362 -9.30021,0 0.31002,-77.50165"
|
||||
id="path3503-0"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="opacity:0.53003534;fill:#212121;fill-opacity:1;stroke:none"
|
||||
id="rect3505-65"
|
||||
width="5.3357005"
|
||||
height="3.2573676"
|
||||
x="116.59856"
|
||||
y="769.81677" />
|
||||
width="7.0146475"
|
||||
height="4.2823405"
|
||||
x="122.76275"
|
||||
y="846.86011" />
|
||||
<rect
|
||||
style="fill:#81ff51;fill-opacity:1;stroke:#070707;stroke-width:1.32051849;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
style="fill:#81ff51;fill-opacity:1;stroke:#070707;stroke-width:1.73603678;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="rect3507-5"
|
||||
width="13.912606"
|
||||
height="8.489048"
|
||||
x="83.024162"
|
||||
y="768.74274" />
|
||||
width="18.290388"
|
||||
height="11.160236"
|
||||
x="78.623749"
|
||||
y="845.44812" />
|
||||
<rect
|
||||
style="fill:#000000;fill-opacity:1;stroke:none"
|
||||
id="rect3509-5"
|
||||
width="9.1964684"
|
||||
height="4.1266208"
|
||||
x="83.613701"
|
||||
y="768.62482" />
|
||||
width="12.090257"
|
||||
height="5.4251156"
|
||||
x="79.398796"
|
||||
y="845.29315" />
|
||||
<path
|
||||
style="fill:#81ff51;fill-opacity:1;stroke:#000000;stroke-width:2.07510066;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 89.03726,770.51128 31.1265,0"
|
||||
style="fill:#81ff51;fill-opacity:1;stroke:#000000;stroke-width:2.72805786;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 86.528952,847.77314 40.920858,0"
|
||||
id="path4279-9"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="opacity:0.53003534;fill:#212121;fill-opacity:1;stroke:none"
|
||||
id="rect3505-6-1"
|
||||
width="5.3357005"
|
||||
height="3.2573676"
|
||||
x="116.87774"
|
||||
y="-815.68268"
|
||||
width="7.0146475"
|
||||
height="4.2823405"
|
||||
x="123.12979"
|
||||
y="-907.15833"
|
||||
transform="scale(1,-1)" />
|
||||
<rect
|
||||
style="fill:#81ff51;fill-opacity:1;stroke:#070707;stroke-width:1.32051849;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
style="fill:#81ff51;fill-opacity:1;stroke:#070707;stroke-width:1.73603678;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="rect3507-7-5"
|
||||
width="13.912606"
|
||||
height="8.489048"
|
||||
x="83.303337"
|
||||
y="-816.75671"
|
||||
width="18.290388"
|
||||
height="11.160236"
|
||||
x="78.990768"
|
||||
y="-908.57037"
|
||||
transform="scale(1,-1)" />
|
||||
<rect
|
||||
style="fill:#000000;fill-opacity:1;stroke:none"
|
||||
id="rect3509-8-5"
|
||||
width="9.1964684"
|
||||
height="4.1266208"
|
||||
x="83.892845"
|
||||
y="-816.87463"
|
||||
width="12.090257"
|
||||
height="5.4251156"
|
||||
x="79.76577"
|
||||
y="-908.72534"
|
||||
transform="scale(1,-1)" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:2.07510066;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 89.31641,814.98818 31.12651,0"
|
||||
style="fill:none;stroke:#000000;stroke-width:2.72805786;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 86.895941,906.24528 40.920869,0"
|
||||
id="path4279-7-2"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
sodipodi:nodetypes="cssccscc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5075-7"
|
||||
d="m 85.29273,788.86109 c -6.87778,-0.71584 -13.77991,-1.46582 -21.23736,-2.00436 -2.45227,-0.17709 -4.77613,-0.25023 -6.94156,-0.2358 -3.14581,0.021 -5.92519,0.24171 -8.37115,0.58951 -1.14311,3.30622 -0.96581,6.61242 0,9.91863 4.12512,0.58575 9.30688,0.78742 15.31271,0.35371 7.45864,-0.53862 14.35978,-1.28848 21.23736,-2.00436 0.64914,-2.11304 0.89851,-4.28319 0,-6.61733 z"
|
||||
style="fill:url(#radialGradient5699);fill-opacity:1;stroke:#070707;stroke-width:0.33334607px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0" />
|
||||
d="m 81.606158,871.89696 c -9.041964,-0.94109 -18.115938,-1.92706 -27.919971,-2.63506 -3.223908,-0.23281 -6.279001,-0.32897 -9.125812,-0.31 -4.13568,0.0276 -7.789627,0.31777 -11.00524,0.77501 -1.502805,4.34657 -1.269716,8.69311 0,13.03965 5.423142,0.77007 12.23541,1.0352 20.131052,0.46502 9.805597,-0.7081 18.878271,-1.69392 27.919971,-2.63506 0.8534,-2.77793 1.181237,-5.63095 0,-8.69956 z"
|
||||
style="fill:url(#radialGradient5699);fill-opacity:1;stroke:#070707;stroke-width:0.43823776px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0" />
|
||||
<path
|
||||
style="opacity:0.77385158;fill:none;stroke:#ffffff;stroke-width:1.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter5149-4)"
|
||||
d="m 37.80377,792.06605 c 14.47908,-8.72095 39.33183,-4.30191 63.5,-0.75"
|
||||
d="m 30.025596,871.96911 c 14.47908,-8.72095 39.33183,-4.30191 63.5,-0.75"
|
||||
id="path5135-0"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
sodipodi:nodetypes="cc"
|
||||
transform="matrix(1.314663,0,0,1.314663,-20.299359,-270.23509)" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5125-7"
|
||||
d="m 111.92526,790.78301 c -18.56846,0.8356 -18.75328,3.98005 0.0834,4.59333 10.27215,-0.38097 20.26392,-0.53862 31.5295,-0.72433 1.67155,-0.12773 1.68871,-3.3799 -0.0295,-3.47815 -11.25277,-0.18656 -21.32426,-0.0108 -31.5834,-0.39085 z"
|
||||
style="fill:url(#linearGradient5695);fill-opacity:1;stroke:#000000;stroke-width:1.07200003;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
d="m 116.61896,874.42364 c -24.411268,1.09853 -24.654245,5.23242 0.10964,6.03868 13.50442,-0.50085 26.64022,-0.70811 41.45066,-0.95225 2.19753,-0.16792 2.22009,-4.44343 -0.0388,-4.57259 -14.7936,-0.24526 -28.03421,-0.0142 -41.52152,-0.51384 z"
|
||||
style="fill:url(#linearGradient5695);fill-opacity:1;stroke:#000000;stroke-width:1.40931869;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
<path
|
||||
style="opacity:0.54063607;fill:#333333;fill-opacity:1;stroke:none;filter:url(#filter5295-5)"
|
||||
d="m 49.77344,799.96249 c 18.42376,3.94814 47.50436,4.19404 63.5,3.625 l 4.25,0.75 5.625,3.875 0.125,-13.25 -30.5,3.75 -27.25,1.5 z"
|
||||
d="m 41.995266,879.86555 c 18.42376,3.94814 47.50436,4.19404 63.500004,3.625 l 4.25,0.75 5.625,3.875 0.125,-13.25 -30.500004,3.75 -27.25,1.5 z"
|
||||
id="path5189-4"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
sodipodi:nodetypes="cccccccc"
|
||||
transform="matrix(1.314663,0,0,1.314663,-20.299359,-270.23509)" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 20 KiB |
@@ -352,7 +352,7 @@ void logsDialog::on_mapsButton_clicked() {
|
||||
#ifdef __APPLE__
|
||||
gePath = "/usr/bin/open";
|
||||
parameters << "-a";
|
||||
parameters << "Google\ Earth";
|
||||
parameters << "Google\\ Earth";
|
||||
#endif
|
||||
parameters << geFilename;
|
||||
QProcess *process = new QProcess(this);
|
||||
@@ -525,7 +525,8 @@ void logsDialog::plotValue(int index, int plot, int numplots)
|
||||
ui->customPlot->graph(0)->setScatterStyle(QCP::ssNone);
|
||||
//ui->customPlot->graph()->setLineStyle((QCPGraph::LineStyle)(rand()%5+1));
|
||||
ui->customPlot->graph(0)->setPen(graphPen);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ui->customPlot->xAxis2->setRange(0, maxx-minx);
|
||||
ui->customPlot->yAxis2->setTickLabels(true);
|
||||
ui->customPlot->yAxis2->setRange(miny,maxy);
|
||||
@@ -540,7 +541,8 @@ void logsDialog::plotValue(int index, int plot, int numplots)
|
||||
//ui->customPlot->graph()->setLineStyle((QCPGraph::LineStyle)(rand()%5+1));
|
||||
ui->customPlot->graph(1)->setPen(graphPen);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ui->customPlot->yAxis->setTickLabels(false);
|
||||
ui->customPlot->yAxis2->setTickLabels(false);
|
||||
ui->customPlot->yAxis->setRange(-1100, 1100);
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
#include "warnings.h"
|
||||
#include "helpers.h"
|
||||
#include "appdata.h"
|
||||
#include "taranisnotfound.h"
|
||||
#include "radionotfound.h"
|
||||
#include "googleanalytics.h"
|
||||
#include "firmwares/opentx/opentxinterface.h" // TODO get rid of this include
|
||||
|
||||
@@ -423,7 +423,7 @@ void MainWindow::checkForFirmwareUpdateFinished(QNetworkReply * reply)
|
||||
if (msgBox.clickedButton() == rnButton) {
|
||||
contributorsDialog *cd = new contributorsDialog(this,2,rn);
|
||||
cd->exec();
|
||||
int ret2 = QMessageBox::question(this, "Companion", tr("Do you want to download release %1 %2 now ?").arg(versionString), QMessageBox::Yes | QMessageBox::No);
|
||||
int ret2 = QMessageBox::question(this, "Companion", tr("Do you want to download release %1 now ?").arg(versionString), QMessageBox::Yes | QMessageBox::No);
|
||||
if (ret2 == QMessageBox::Yes)
|
||||
download = true;
|
||||
else
|
||||
@@ -438,7 +438,7 @@ void MainWindow::checkForFirmwareUpdateFinished(QNetworkReply * reply)
|
||||
}
|
||||
else if (version > currentVersion) {
|
||||
QString rn = GetFirmware(current_firmware_variant.id)->getReleaseNotesUrl();
|
||||
QAbstractButton *rnButton;
|
||||
QAbstractButton *rnButton = NULL;
|
||||
msgBox.setText("Companion");
|
||||
msgBox.setInformativeText(tr("A new version of %1 firmware is available:\n - current is %2\n - newer is %3\n\nDo you want to download it now ?").arg(current_firmware_variant.id).arg(currentVersionString).arg(versionString));
|
||||
QAbstractButton *YesButton = msgBox.addButton(trUtf8("Yes"), QMessageBox::YesRole);
|
||||
@@ -496,6 +496,7 @@ void MainWindow::checkForFirmwareUpdateFinished(QNetworkReply * reply)
|
||||
void MainWindow::startFirmwareDownload()
|
||||
{
|
||||
QString url = current_firmware_variant.getFirmwareUrl();
|
||||
qDebug() << url;
|
||||
QString ext = url.mid(url.lastIndexOf("."));
|
||||
QString defaultFilename = g.flashDir() + "/" + current_firmware_variant.id;
|
||||
if (g.profile[g.id()].renameFwFiles()) {
|
||||
@@ -562,7 +563,7 @@ void MainWindow::setIconThemeSize(int index)
|
||||
|
||||
void MainWindow::newFile()
|
||||
{
|
||||
MdiChild *child = createMdiChild();
|
||||
MdiChild * child = createMdiChild();
|
||||
child->newFile();
|
||||
child->show();
|
||||
}
|
||||
@@ -911,15 +912,13 @@ QString MainWindow::FindMassstoragePath(QString filename)
|
||||
DWORD dwMaxFileNameLength=256;
|
||||
DWORD dwFileSystemFlags=0;
|
||||
bool ret = GetVolumeInformationW( (WCHAR *) drive.absolutePath().utf16(),szVolumeName,256,&dwSerialNumber,&dwMaxFileNameLength,&dwFileSystemFlags,szFileSystemName,256);
|
||||
if(ret) {
|
||||
if (ret) {
|
||||
QString vName = QString::fromUtf16 ( (const ushort *) szVolumeName) ;
|
||||
if (vName.contains("TARANIS")) {
|
||||
temppath = drive.absolutePath();
|
||||
eepromfile = temppath;
|
||||
eepromfile.append("/" + filename);
|
||||
if (QFile::exists(eepromfile)) {
|
||||
return eepromfile;
|
||||
}
|
||||
temppath = drive.absolutePath();
|
||||
eepromfile = temppath;
|
||||
eepromfile.append("/" + filename);
|
||||
if (QFile::exists(eepromfile)) {
|
||||
return eepromfile;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1055,10 +1054,10 @@ bool MainWindow::readEepromFromRadio(const QString filename, const QString messa
|
||||
if (IS_ARM(GetCurrentFirmware()->getBoard())) {
|
||||
QString path = FindMassstoragePath("EEPROM.BIN");
|
||||
if (path.isEmpty()) {
|
||||
taranisNotFoundDialog *tnfd = new taranisNotFoundDialog(this);
|
||||
tnfd->exec();
|
||||
// Mike's bootloader calls the EEPROM file "ERSKY9X.BIN" :(
|
||||
path = FindMassstoragePath("ERSKY9X.BIN");
|
||||
}
|
||||
else {
|
||||
if (!path.isEmpty()) {
|
||||
QStringList str;
|
||||
str << path << filename;
|
||||
avrOutputDialog *ad = new avrOutputDialog(this, "", str, message);
|
||||
@@ -1069,7 +1068,8 @@ bool MainWindow::readEepromFromRadio(const QString filename, const QString messa
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
if (result == false && !IS_TARANIS(GetCurrentFirmware()->getBoard())) {
|
||||
QStringList str = GetReceiveEEpromCommand(filename);
|
||||
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, message);
|
||||
ad->setWindowIcon(CompanionIcon("read_eeprom.png"));
|
||||
@@ -1079,22 +1079,30 @@ bool MainWindow::readEepromFromRadio(const QString filename, const QString messa
|
||||
result = true;
|
||||
}
|
||||
|
||||
if (!QFileInfo(filename).exists())
|
||||
if (result == false && IS_ARM(GetCurrentFirmware()->getBoard())) {
|
||||
RadioNotFoundDialog *dialog = new RadioNotFoundDialog(this);
|
||||
dialog->exec();
|
||||
delete dialog;
|
||||
}
|
||||
|
||||
if (!QFileInfo(filename).exists()) {
|
||||
result = false;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool MainWindow::writeEepromToRadio(const QString filename, const QString message)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if (IS_ARM(GetCurrentFirmware()->getBoard())) {
|
||||
QString path = FindMassstoragePath("EEPROM.BIN");
|
||||
if (path.isEmpty()) {
|
||||
taranisNotFoundDialog *tnfd = new taranisNotFoundDialog(this);
|
||||
tnfd->exec();
|
||||
return false;
|
||||
// Mike's bootloader calls the EEPROM file "ERSKY9X.BIN" :(
|
||||
path = FindMassstoragePath("ERSKY9X.BIN");
|
||||
}
|
||||
else {
|
||||
if (!path.isEmpty()) {
|
||||
QStringList str;
|
||||
str << filename << path;
|
||||
avrOutputDialog *ad = new avrOutputDialog(this, "", str, message);
|
||||
@@ -1102,17 +1110,27 @@ bool MainWindow::writeEepromToRadio(const QString filename, const QString messag
|
||||
ad->exec();
|
||||
delete ad;
|
||||
sleep(1);
|
||||
return true;
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
if (result == false && !IS_TARANIS(GetCurrentFirmware()->getBoard())) {
|
||||
QStringList str = GetSendEEpromCommand(filename);
|
||||
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Write Backup To Radio", AVR_DIALOG_SHOW_DONE);
|
||||
ad->setWindowIcon(CompanionIcon("write_eeprom.png"));
|
||||
ad->exec();
|
||||
delete ad;
|
||||
return true;
|
||||
sleep(1);
|
||||
result = true;
|
||||
}
|
||||
|
||||
if (result == false && IS_ARM(GetCurrentFirmware()->getBoard())) {
|
||||
RadioNotFoundDialog *dialog = new RadioNotFoundDialog(this);
|
||||
dialog->exec();
|
||||
delete dialog;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void MainWindow::writeBackup()
|
||||
@@ -1411,11 +1429,11 @@ void MainWindow::about()
|
||||
QString aboutStr = "<center><img src=\":/images/companion-title.png\"></center><br/>";
|
||||
aboutStr.append(tr("OpenTX Home Page: <a href='%1'>%1</a>").arg("http://www.open-tx.org"));
|
||||
aboutStr.append("<br/><br/>");
|
||||
aboutStr.append(tr("The OpenTX Companion project was originally forked from <a href='%2'>eePe</a>").arg("http://code.google.com/p/eepe"));
|
||||
aboutStr.append(tr("The OpenTX Companion project was originally forked from <a href='%1'>eePe</a>").arg("http://code.google.com/p/eepe"));
|
||||
aboutStr.append("<br/><br/>");
|
||||
aboutStr.append(tr("If you've found this program useful, please support by <a href='%1'>donating</a>").arg(DONATE_STR));
|
||||
aboutStr.append("<br/><br/>");
|
||||
aboutStr.append(tr("Version %1, %3").arg(C9X_VERSION).arg(__DATE__));
|
||||
aboutStr.append(QString("Version %1, %2").arg(C9X_VERSION).arg(__DATE__));
|
||||
aboutStr.append("<br/><br/>");
|
||||
aboutStr.append(tr("Copyright OpenTX Team") + "<br/>© 2011-2014<br/>");
|
||||
QMessageBox msgBox(this);
|
||||
@@ -1452,7 +1470,7 @@ void MainWindow::updateMenus()
|
||||
|
||||
MdiChild *MainWindow::createMdiChild()
|
||||
{
|
||||
MdiChild *child = new MdiChild();
|
||||
MdiChild * child = new MdiChild();
|
||||
mdiArea->addSubWindow(child);
|
||||
if(!child->parentWidget()->isMaximized() && !child->parentWidget()->isMinimized())
|
||||
child->parentWidget()->resize(400, 400);
|
||||
@@ -1921,15 +1939,16 @@ void MainWindow::updateProfilesActions()
|
||||
}
|
||||
|
||||
void MainWindow::createProfile()
|
||||
{ int i;
|
||||
for (i=0; i<MAX_PROFILES && g.profile[i].existsOnDisk(); i++)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<MAX_PROFILES && g.profile[i].existsOnDisk(); i++)
|
||||
;
|
||||
if (i==MAX_PROFILES) //Failed to find free slot
|
||||
return;
|
||||
|
||||
// Copy current profile to new and give it a new name
|
||||
g.profile[i] = g.profile[g.id()];
|
||||
g.profile[i].name( QString(tr("New Radio")));
|
||||
g.profile[i].name(tr("New Radio"));
|
||||
|
||||
g.id(i);
|
||||
updateMenus();
|
||||
@@ -1937,7 +1956,7 @@ for (i=0; i<MAX_PROFILES && g.profile[i].existsOnDisk(); i++)
|
||||
|
||||
QString MainWindow::strippedName(const QString &fullFileName)
|
||||
{
|
||||
return QFileInfo(fullFileName).fileName();
|
||||
return QFileInfo(fullFileName).fileName();
|
||||
}
|
||||
|
||||
int MainWindow::getEpromVersion(QString fileName)
|
||||
@@ -1952,6 +1971,7 @@ int MainWindow::getEpromVersion(QString fileName)
|
||||
return -1;
|
||||
}
|
||||
int fileType = getFileType(fileName);
|
||||
#if 0
|
||||
if (fileType==FILE_TYPE_XML) {
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { //reading HEX TEXT file
|
||||
QMessageBox::critical(this, tr("Error"),tr("Error opening file %1:\n%2.").arg(fileName).arg(file.errorString()));
|
||||
@@ -1960,7 +1980,9 @@ int MainWindow::getEpromVersion(QString fileName)
|
||||
QTextStream inputStream(&file);
|
||||
XmlInterface(inputStream).load(testData);
|
||||
}
|
||||
else if (fileType==FILE_TYPE_HEX || fileType==FILE_TYPE_EEPE) { //read HEX file
|
||||
else
|
||||
#endif
|
||||
if (fileType==FILE_TYPE_HEX || fileType==FILE_TYPE_EEPE) { //read HEX file
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { //reading HEX TEXT file
|
||||
QMessageBox::critical(this, tr("Error"),tr("Error opening file %1:\n%2.").arg(fileName).arg(file.errorString()));
|
||||
return -1;
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
#include "helpers.h"
|
||||
#include "appdata.h"
|
||||
#include "wizarddialog.h"
|
||||
#include "taranisnotfound.h"
|
||||
#include <QFileInfo>
|
||||
#include "googleanalytics.h"
|
||||
|
||||
@@ -242,6 +241,7 @@ bool MdiChild::loadFile(const QString &fileName, bool resetCurrentFile)
|
||||
|
||||
int fileType = getFileType(fileName);
|
||||
|
||||
#if 0
|
||||
if (fileType==FILE_TYPE_XML) {
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { //reading HEX TEXT file
|
||||
QMessageBox::critical(this, tr("Error"),
|
||||
@@ -253,7 +253,9 @@ bool MdiChild::loadFile(const QString &fileName, bool resetCurrentFile)
|
||||
QTextStream inputStream(&file);
|
||||
XmlInterface(inputStream).load(radioData);
|
||||
}
|
||||
else if (fileType==FILE_TYPE_HEX || fileType==FILE_TYPE_EEPE) { //read HEX file
|
||||
else
|
||||
#endif
|
||||
if (fileType==FILE_TYPE_HEX || fileType==FILE_TYPE_EEPE) { //read HEX file
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { //reading HEX TEXT file
|
||||
QMessageBox::critical(this, tr("Error"),
|
||||
tr("Error opening file %1:\n%2.")
|
||||
@@ -416,6 +418,7 @@ bool MdiChild::saveFile(const QString &fileName, bool setCurrent)
|
||||
|
||||
QTextStream outputStream(&file);
|
||||
|
||||
#if 0
|
||||
if (fileType==FILE_TYPE_XML) {
|
||||
if (!XmlInterface(outputStream).save(radioData)) {
|
||||
QMessageBox::warning(this, tr("Error"),tr("Cannot write file %1:\n%2.").arg(myFile).arg(file.errorString()));
|
||||
@@ -423,7 +426,9 @@ bool MdiChild::saveFile(const QString &fileName, bool setCurrent)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (fileType==FILE_TYPE_HEX || fileType==FILE_TYPE_EEPE) { // write hex
|
||||
else
|
||||
#endif
|
||||
if (fileType==FILE_TYPE_HEX || fileType==FILE_TYPE_EEPE) { // write hex
|
||||
if (fileType==FILE_TYPE_EEPE)
|
||||
outputStream << EEPE_EEPROM_FILE_HEADER << "\n";
|
||||
|
||||
|
||||
@@ -376,7 +376,7 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
|
||||
widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM + CUSTOM_FUNCTION_ENABLE;
|
||||
}
|
||||
else if (index==FuncPlaySound || index==FuncPlayHaptic || index==FuncPlayValue || index==FuncPlayPrompt || index==FuncPlayBoth || index==FuncBackgroundMusic) {
|
||||
if (index != FuncBackgroundMusic && firmware->getCapability(HasFuncRepeat)) {
|
||||
if (index != FuncBackgroundMusic) {
|
||||
widgetsMask |= CUSTOM_FUNCTION_REPEAT;
|
||||
fswtchRepeat[i]->update();
|
||||
}
|
||||
|
||||
@@ -202,17 +202,9 @@ void FlightModePanel::update()
|
||||
|
||||
for (int i=0; i<gvCount; i++) {
|
||||
gvNames[i]->setText(model.gvars_names[i]);
|
||||
gvValues[i]->setDisabled(false);
|
||||
int idx = phase.gvars[i];
|
||||
PhaseData *phasegvar = &phase;
|
||||
while (idx > 1024) {
|
||||
idx -= 1025;
|
||||
phasegvar = &model.phaseData[idx];
|
||||
idx = phasegvar->gvars[i];
|
||||
gvValues[i]->setDisabled(true);
|
||||
}
|
||||
gvValues[i]->setDisabled(model.isGVarLinked(phaseIdx, i));
|
||||
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
gvValues[i]->setValue(phasegvar->gvars[i]);
|
||||
gvValues[i]->setValue(model.getGVarValue(phaseIdx, i));
|
||||
if (phaseIdx == 0)
|
||||
gvPopups[i]->setChecked(model.gvars_popups[i]);
|
||||
}
|
||||
|
||||
@@ -22,10 +22,11 @@ TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, Ge
|
||||
ui->persistentValue->hide();
|
||||
}
|
||||
|
||||
ui->countdownBeep->addItem(tr("Silent"));
|
||||
ui->countdownBeep->addItem(tr("Beeps"));
|
||||
ui->countdownBeep->setField(&timer.countdownBeep, this);
|
||||
ui->countdownBeep->addItem(tr("Silent"), 0);
|
||||
ui->countdownBeep->addItem(tr("Beeps"), 1);
|
||||
if (IS_ARM(GetEepromInterface()->getBoard()) || IS_2560(GetEepromInterface()->getBoard()))
|
||||
ui->countdownBeep->addItem(tr("Voice"));
|
||||
ui->countdownBeep->addItem(tr("Voice"), 2);
|
||||
|
||||
lock = false;
|
||||
}
|
||||
@@ -56,7 +57,6 @@ void TimerPanel::update()
|
||||
ui->persistentValue->setText(QString(" %1(%2:%3:%4)").arg(sign<0 ? "-" :" ").arg(hours, 2, 10, QLatin1Char('0')).arg(minutes, 2, 10, QLatin1Char('0')).arg(seconds, 2, 10, QLatin1Char('0')));
|
||||
}
|
||||
|
||||
ui->countdownBeep->setCurrentIndex(timer.countdownBeep);
|
||||
ui->minuteBeep->setChecked(timer.minuteBeep);
|
||||
}
|
||||
|
||||
@@ -80,12 +80,6 @@ void TimerPanel::on_persistent_toggled(bool checked)
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void TimerPanel::on_countdownBeep_currentIndexChanged(int index)
|
||||
{
|
||||
timer.countdownBeep = index;
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void TimerPanel::on_minuteBeep_toggled(bool checked)
|
||||
{
|
||||
timer.minuteBeep = checked;
|
||||
|
||||
@@ -30,7 +30,6 @@ class TimerPanel : public ModelPanel
|
||||
void on_value_editingFinished();
|
||||
void on_persistent_toggled(bool checked);
|
||||
void on_minuteBeep_toggled(bool checked);
|
||||
void on_countdownBeep_currentIndexChanged(int index);
|
||||
|
||||
private:
|
||||
TimerData & timer;
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="countdownBeep"/>
|
||||
<widget class="QUnsignedAutoComboBox" name="countdownBeep"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="minuteBeep">
|
||||
@@ -79,6 +79,13 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QUnsignedAutoComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>qautocombobox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -476,6 +476,14 @@ TelemetryPanel::TelemetryPanel(QWidget *parent, ModelData & model, GeneralSettin
|
||||
model.frsky.usrProto = 1;
|
||||
}
|
||||
|
||||
if (IS_ARM(firmware->getBoard())) {
|
||||
ui->telemetryProtocol->setCurrentIndex(model.telemetryProtocol);
|
||||
}
|
||||
else {
|
||||
ui->telemetryProtocolLabel->hide();
|
||||
ui->telemetryProtocol->hide();
|
||||
}
|
||||
|
||||
analogs[0] = new TelemetryAnalog(this, model.frsky.channels[0], model, generalSettings, firmware);
|
||||
ui->A1Layout->addWidget(analogs[0]);
|
||||
connect(analogs[0], SIGNAL(modified()), this, SLOT(onAnalogModified()));
|
||||
@@ -711,6 +719,12 @@ void TelemetryPanel::populateCurrentSource()
|
||||
cb->addItem(tr("FAS"), TELEMETRY_CURRENT_SOURCE_FAS);
|
||||
}
|
||||
|
||||
void TelemetryPanel::on_telemetryProtocol_currentIndexChanged(int index)
|
||||
{
|
||||
model.telemetryProtocol = index;
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void TelemetryPanel::onAnalogModified()
|
||||
{
|
||||
emit modified();
|
||||
@@ -718,14 +732,14 @@ void TelemetryPanel::onAnalogModified()
|
||||
|
||||
void TelemetryPanel::on_frskyUnitsCB_currentIndexChanged(int index)
|
||||
{
|
||||
model.frsky.imperial = index;
|
||||
emit modified();
|
||||
model.frsky.imperial = index;
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void TelemetryPanel::on_bladesCount_editingFinished()
|
||||
{
|
||||
model.frsky.blades = ui->bladesCount->value();
|
||||
emit modified();
|
||||
model.frsky.blades = ui->bladesCount->value();
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void TelemetryPanel::on_frskyProtoCB_currentIndexChanged(int index)
|
||||
|
||||
@@ -83,6 +83,7 @@ class TelemetryPanel : public ModelPanel
|
||||
virtual ~TelemetryPanel();
|
||||
|
||||
private slots:
|
||||
void on_telemetryProtocol_currentIndexChanged(int index);
|
||||
void onAnalogModified();
|
||||
void on_frskyProtoCB_currentIndexChanged(int index);
|
||||
void on_frskyUnitsCB_currentIndexChanged(int index);
|
||||
|
||||
@@ -13,10 +13,53 @@
|
||||
<property name="windowTitle">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,0,0">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="telemetryProtocolLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Protocol</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="telemetryProtocol">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>FrSky S.PORT</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>FrSky D</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="0">
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#include "radionotfound.h"
|
||||
#include "ui_radionotfound.h"
|
||||
|
||||
RadioNotFoundDialog::RadioNotFoundDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::RadioNotFoundDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
RadioNotFoundDialog::~RadioNotFoundDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void RadioNotFoundDialog::on_OK_clicked()
|
||||
{
|
||||
accept();
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef _RADIONOTFOUNDDIALOG_H
|
||||
#define _RADIONOTFOUNDDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class RadioNotFoundDialog;
|
||||
}
|
||||
|
||||
class RadioNotFoundDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit RadioNotFoundDialog(QWidget *parent = 0);
|
||||
~RadioNotFoundDialog();
|
||||
private:
|
||||
Ui::RadioNotFoundDialog *ui;
|
||||
private slots:
|
||||
void on_OK_clicked();
|
||||
};
|
||||
|
||||
#endif // _RADIONOTFOUNDDIALOG_H
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>taranisNotFoundDialog</class>
|
||||
<widget class="QDialog" name="taranisNotFoundDialog">
|
||||
<class>RadioNotFoundDialog</class>
|
||||
<widget class="QDialog" name="RadioNotFoundDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -29,7 +29,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>No Taranis Radio Found</string>
|
||||
<string>No Radio Found</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
@@ -37,7 +37,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>No Taranis Radio was found!</p><p>Make sure that you hold the lower trim buttons towards the center while you turn it on.</p><p>Then connect the USB wire.</p></body></html></string>
|
||||
<string><html><head/><body><p>No Radio was found!</p><p>Make sure that you hold the lower trim buttons towards the center while you turn it on.</p><p>Then connect the USB wire.</p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
@@ -1,19 +0,0 @@
|
||||
#include "taranisnotfound.h"
|
||||
#include "ui_taranisnotfound.h"
|
||||
|
||||
taranisNotFoundDialog::taranisNotFoundDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::taranisNotFoundDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
taranisNotFoundDialog::~taranisNotFoundDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void taranisNotFoundDialog::on_OK_clicked()
|
||||
{
|
||||
accept();
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
#ifndef TARANISNOTFOUNDDIALOG_H
|
||||
#define TARANISNOTFOUNDDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class taranisNotFoundDialog;
|
||||
}
|
||||
|
||||
class taranisNotFoundDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit taranisNotFoundDialog(QWidget *parent = 0);
|
||||
~taranisNotFoundDialog();
|
||||
private:
|
||||
Ui::taranisNotFoundDialog *ui;
|
||||
private slots:
|
||||
void on_OK_clicked();
|
||||
};
|
||||
|
||||
#endif // TARANISNOTFOUNDDIALOG_H
|
||||
@@ -54,7 +54,7 @@ enum WizardPage {
|
||||
Page_Ailerons,
|
||||
Page_Flaps,
|
||||
Page_Airbrakes,
|
||||
Page_Bank,
|
||||
Page_Elevons,
|
||||
Page_Rudder,
|
||||
Page_Tails,
|
||||
Page_Tail,
|
||||
|
||||
@@ -18,34 +18,34 @@
|
||||
#include "helpers.h"
|
||||
#include "googleanalytics.h"
|
||||
|
||||
WizardDialog::WizardDialog(const GeneralSettings & settings, unsigned int modelId, QWidget *parent)
|
||||
: QWizard(parent),
|
||||
mix(settings, modelId),
|
||||
settings(settings)
|
||||
WizardDialog::WizardDialog(const GeneralSettings & settings, unsigned int modelId, QWidget *parent):
|
||||
QWizard(parent),
|
||||
mix(settings, modelId),
|
||||
settings(settings)
|
||||
{
|
||||
setWindowIcon(CompanionIcon("wizard.png"));
|
||||
setWindowTitle(tr("Model Wizard"));
|
||||
|
||||
setPage(Page_Models, new ModelSelectionPage(this, "models",tr("Model Type"),tr("Enter model name and model type.")));
|
||||
setPage(Page_Throttle, new ThrottlePage(this, "throttle",tr("Throttle"),tr("Has your model got a motor or an engine?"), Page_Wingtypes));
|
||||
setPage(Page_Wingtypes, new WingtypeSelectionPage(this, "wingtype",tr("Wing Type"),tr("Is your model a flying wing/deltawing or has it a standard wing configuration?")));
|
||||
setPage(Page_Ailerons, new AileronsPage(this, "ailerons",tr("Ailerons"),tr("Has your model got ailerons?"), Page_Flaps));
|
||||
setPage(Page_Flaps, new FlapsPage(this, "flaps",tr("Flaps"),tr("Has your model got flaps?"), Page_Airbrakes));
|
||||
setPage(Page_Airbrakes, new AirbrakesPage(this, "airbrakes",tr("Airbrakes"),tr("Has your model got airbrakes?"), Page_Tails));
|
||||
setPage(Page_Bank, new BankPage(this, "bank",tr("Flying-wing / Delta-wing"),tr("Are the elevons controlled by servos connected to separate channels or by a single servo channel?"), Page_Rudder));
|
||||
setPage(Page_Rudder, new RudderPage(this, "rudder",tr("Rudder"),tr("Does your model have a rudder?"), Page_Options));
|
||||
setPage(Page_Tails, new TailSelectionPage(this, "tails",tr("Tail Type"),tr("Select which type of tail your model is equiped with.")));
|
||||
setPage(Page_Tail, new TailPage(this, "tail",tr("Tail"),tr("Select channels for tail control."), Page_Options));
|
||||
setPage(Page_Vtail, new VTailPage(this, "vtail",tr("V-Tail"),tr("Select channels for tail control."), Page_Options));
|
||||
setPage(Page_Simpletail, new SimpleTailPage(this, "simpletail",tr("Tail"),tr("Select elevator channel."), Page_Options));
|
||||
setPage(Page_Cyclic, new CyclicPage(this, "cyclic",tr("Cyclic"),tr("Which type of swash control is installed in your helicopter?"), Page_Gyro));
|
||||
setPage(Page_Gyro, new GyroPage(this, "gyro",tr("Tail Gyro"),tr("Has your helicopter got an adjustable gyro for the tail?"), Page_Flybar));
|
||||
setPage(Page_Flybar, new FlybarSelectionPage(this, "flybar",tr("Rotor Type"),tr("Has your helicopter got a flybar?")));
|
||||
setPage(Page_Fblheli, new FblPage(this, "fblheli",tr("Helicopter"),tr("Select the controls for your helicopter"), Page_Options));
|
||||
setPage(Page_Helictrl, new HeliPage(this, "helictrl",tr("Helicopter"),tr("Select the controls for your helicopter"), Page_Options));
|
||||
setPage(Page_Multirotor, new MultirotorPage(this, "multirotor",tr("Multirotor"),tr("Select the control channels for your multirotor"), Page_Options));
|
||||
setPage(Page_Options, new OptionsPage(this, "options",tr("Model Options"),tr("Select additional options"), Page_Conclusion));
|
||||
setPage(Page_Conclusion, new ConclusionPage(this, "conclusion",tr("Save Changes"),tr(
|
||||
setPage(Page_Models, new ModelSelectionPage(this, "models", tr("Model Type"), tr("Enter model name and model type.")));
|
||||
setPage(Page_Throttle, new ThrottlePage(this, "throttle", tr("Throttle"), tr("Has your model got a motor or an engine?"), Page_Wingtypes));
|
||||
setPage(Page_Wingtypes, new WingtypeSelectionPage(this, "wingtype", tr("Wing Type"), tr("Is your model a flying wing/deltawing or has it a standard wing configuration?")));
|
||||
setPage(Page_Ailerons, new AileronsPage(this, "ailerons", tr("Ailerons"), tr("Has your model got ailerons?"), Page_Flaps));
|
||||
setPage(Page_Flaps, new FlapsPage(this, "flaps", tr("Flaps"), tr("Has your model got flaps?"), Page_Airbrakes));
|
||||
setPage(Page_Airbrakes, new AirbrakesPage(this, "airbrakes", tr("Airbrakes"), tr("Has your model got airbrakes?"), Page_Tails));
|
||||
setPage(Page_Elevons, new ElevonsPage(this, "elevons", tr("Flying-wing / Delta-wing"), tr("Select the elevons channels"), Page_Rudder));
|
||||
setPage(Page_Rudder, new RudderPage(this, "rudder", tr("Rudder"), tr("Does your model have a rudder?"), Page_Options));
|
||||
setPage(Page_Tails, new TailSelectionPage(this, "tails", tr("Tail Type"), tr("Select which type of tail your model is equiped with.")));
|
||||
setPage(Page_Tail, new TailPage(this, "tail", tr("Tail"), tr("Select channels for tail control."), Page_Options));
|
||||
setPage(Page_Vtail, new VTailPage(this, "vtail", tr("V-Tail"), tr("Select channels for tail control."), Page_Options));
|
||||
setPage(Page_Simpletail, new SimpleTailPage(this, "simpletail", tr("Tail"), tr("Select elevator channel."), Page_Options));
|
||||
setPage(Page_Cyclic, new CyclicPage(this, "cyclic", tr("Cyclic"), tr("Which type of swash control is installed in your helicopter?"), Page_Gyro));
|
||||
setPage(Page_Gyro, new GyroPage(this, "gyro", tr("Tail Gyro"), tr("Has your helicopter got an adjustable gyro for the tail?"), Page_Flybar));
|
||||
setPage(Page_Flybar, new FlybarSelectionPage(this, "flybar", tr("Rotor Type"), tr("Has your helicopter got a flybar?")));
|
||||
setPage(Page_Fblheli, new FblPage(this, "fblheli", tr("Helicopter"), tr("Select the controls for your helicopter"), Page_Options));
|
||||
setPage(Page_Helictrl, new HeliPage(this, "helictrl", tr("Helicopter"), tr("Select the controls for your helicopter"), Page_Options));
|
||||
setPage(Page_Multirotor, new MultirotorPage(this, "multirotor", tr("Multirotor"), tr("Select the control channels for your multirotor"), Page_Options));
|
||||
setPage(Page_Options, new OptionsPage(this, "options", tr("Model Options"), tr("Select additional options"), Page_Conclusion));
|
||||
setPage(Page_Conclusion, new ConclusionPage(this, "conclusion", tr("Save Changes"), tr(
|
||||
"Manually check the direction of each control surface and reverse any channels that make controls move in the wrong direction. "
|
||||
"Remove the propeller/propellers before you try to control your model for the first time.<br>"
|
||||
"Please note that continuing removes all old model settings!"), -1));
|
||||
@@ -65,77 +65,97 @@ void WizardDialog::showHelp()
|
||||
QString message;
|
||||
|
||||
switch (currentId()) {
|
||||
case Page_Models:
|
||||
message = tr("Enter a name for your model and select model type."); break;
|
||||
case Page_Throttle:
|
||||
message = tr("Select the receiver channel that is connected to your ESC or throttle servo.<br><br>"
|
||||
"Throttle - Spektrum: CH1, Futaba: CH3"); break;
|
||||
case Page_Wingtypes:
|
||||
message = tr("Most aircraft have a main wing and a tail with control surfaces. Flying wings and delta winged aircraft only have a single wing. "
|
||||
"The main control surface on a standard wing controls the roll of the aircraft. This surface is called an aileron.<br>"
|
||||
"The control surface of a delta wing controls both roll and pitch. This surface is called an elevon. "); break;
|
||||
case Page_Ailerons:
|
||||
message = tr("Models use one or two channels to control the ailerons.<br>"
|
||||
"A so called Y-cable can be used to connect a single receiver channel to two separate aileron servos. "
|
||||
"If your servos are connected by a Y-cable you should select the single-servo option.<br><br>"
|
||||
"Aileron - Spektrum: CH2, Futaba: CH1"); break;
|
||||
case Page_Flaps:
|
||||
message = tr("This wizard assumes that your flaps are controlled by a switch. "
|
||||
"If your flaps are controlled by a potentiometer you can change that manually later."); break;
|
||||
case Page_Airbrakes:
|
||||
message = tr("Air brakes are used to reduce the speed of advanced sail planes.<br>"
|
||||
"They are very uncommon on other types of planes."); break;
|
||||
case Page_Bank:
|
||||
message = tr("Models use one or two channels to control the elevons.<br>"
|
||||
"A so called Y-cable can be used to connect single a receiver channel to two separate elevon servos. "
|
||||
"If your servos are connected by a Y-cable you should select the single-servo option."); break;
|
||||
case Page_Rudder:
|
||||
message = tr("Select the receiver channel that is connected to your rudder.<br><br>"
|
||||
"Rudder - Spektrum: CH4, Futaba: CH4"); break;
|
||||
case Page_Tails:
|
||||
message = tr("Select the tail type of your plane."); break;
|
||||
case Page_Tail:
|
||||
message = tr("Select the Rudder and Elevator channels.<br><br>"
|
||||
"Rudder - Spektrum: CH4, Futaba: CH4<br>"
|
||||
"Elevator - Spektrum: CH3, Futaba: CH2"); break;
|
||||
case Page_Vtail:
|
||||
message = tr("Select the Rudder and Elevator channels.<br><br>"
|
||||
"Rudder - Spektrum: CH4, Futaba: CH4<br>"
|
||||
"Elevator - Spektrum: CH3, Futaba: CH2"); break;
|
||||
case Page_Simpletail:
|
||||
message = tr("Select the Elevator channel.<br><br>"
|
||||
"Elevator - Spektrum: CH3, Futaba: CH2"); break;
|
||||
case Page_Flybar:
|
||||
message = tr("TBD."); break;
|
||||
case Page_Cyclic:
|
||||
message = tr("TBD."); break;
|
||||
case Page_Gyro:
|
||||
message = tr("TBD."); break;
|
||||
case Page_Fblheli:
|
||||
message = tr("TBD."); break;
|
||||
case Page_Helictrl:
|
||||
message = tr("TBD."); break;
|
||||
case Page_Multirotor:
|
||||
message = tr("Select the control channels for your multirotor.<br><br>"
|
||||
"Throttle - Spektrum: CH1, Futaba: CH3<br>"
|
||||
"Yaw - Spektrum: CH4, Futaba: CH4<br>"
|
||||
"Pitch - Spektrum: CH3, Futaba: CH2<br>"
|
||||
"Roll - Spektrum: CH2, Futaba: CH1"); break;
|
||||
case Page_Options:
|
||||
message = tr("TBD."); break;
|
||||
case Page_Conclusion:
|
||||
message = tr("TBD."); break;
|
||||
default:
|
||||
message = tr("There is no help available for the current page.");
|
||||
case Page_Models:
|
||||
message = tr("Enter a name for your model and select model type.");
|
||||
break;
|
||||
case Page_Throttle:
|
||||
message = tr("Select the receiver channel that is connected to your ESC or throttle servo.<br><br>"
|
||||
"Throttle - Spektrum: CH1, Futaba: CH3");
|
||||
break;
|
||||
case Page_Wingtypes:
|
||||
message = tr("Most aircraft have a main wing and a tail with control surfaces. Flying wings and delta winged aircraft only have a single wing. "
|
||||
"The main control surface on a standard wing controls the roll of the aircraft. This surface is called an aileron.<br>"
|
||||
"The control surface of a delta wing controls both roll and pitch. This surface is called an elevon. ");
|
||||
break;
|
||||
case Page_Ailerons:
|
||||
message = tr("Models use one or two channels to control the ailerons.<br>"
|
||||
"A so called Y-cable can be used to connect a single receiver channel to two separate aileron servos. "
|
||||
"If your servos are connected by a Y-cable you should select the single-servo option.<br><br>"
|
||||
"Aileron - Spektrum: CH2, Futaba: CH1");
|
||||
break;
|
||||
case Page_Flaps:
|
||||
message = tr("This wizard assumes that your flaps are controlled by a switch. "
|
||||
"If your flaps are controlled by a potentiometer you can change that manually later.");
|
||||
break;
|
||||
case Page_Airbrakes:
|
||||
message = tr("Air brakes are used to reduce the speed of advanced sail planes.<br>"
|
||||
"They are very uncommon on other types of planes.");
|
||||
break;
|
||||
case Page_Elevons:
|
||||
message = tr("Models use two channels to control the elevons.<br>"
|
||||
"Select these two channels");
|
||||
break;
|
||||
case Page_Rudder:
|
||||
message = tr("Select the receiver channel that is connected to your rudder.<br><br>"
|
||||
"Rudder - Spektrum: CH4, Futaba: CH4");
|
||||
break;
|
||||
case Page_Tails:
|
||||
message = tr("Select the tail type of your plane.");
|
||||
break;
|
||||
case Page_Tail:
|
||||
message = tr("Select the Rudder and Elevator channels.<br><br>"
|
||||
"Rudder - Spektrum: CH4, Futaba: CH4<br>"
|
||||
"Elevator - Spektrum: CH3, Futaba: CH2");
|
||||
break;
|
||||
case Page_Vtail:
|
||||
message = tr("Select the Rudder and Elevator channels.<br><br>"
|
||||
"Rudder - Spektrum: CH4, Futaba: CH4<br>"
|
||||
"Elevator - Spektrum: CH3, Futaba: CH2");
|
||||
break;
|
||||
case Page_Simpletail:
|
||||
message = tr("Select the Elevator channel.<br><br>"
|
||||
"Elevator - Spektrum: CH3, Futaba: CH2");
|
||||
break;
|
||||
case Page_Flybar:
|
||||
message = tr("TBD.");
|
||||
break;
|
||||
case Page_Cyclic:
|
||||
message = tr("TBD.");
|
||||
break;
|
||||
case Page_Gyro:
|
||||
message = tr("TBD.");
|
||||
break;
|
||||
case Page_Fblheli:
|
||||
message = tr("TBD.");
|
||||
break;
|
||||
case Page_Helictrl:
|
||||
message = tr("TBD.");
|
||||
break;
|
||||
case Page_Multirotor:
|
||||
message = tr("Select the control channels for your multirotor.<br><br>"
|
||||
"Throttle - Spektrum: CH1, Futaba: CH3<br>"
|
||||
"Yaw - Spektrum: CH4, Futaba: CH4<br>"
|
||||
"Pitch - Spektrum: CH3, Futaba: CH2<br>"
|
||||
"Roll - Spektrum: CH2, Futaba: CH1");
|
||||
break;
|
||||
case Page_Options:
|
||||
message = tr("TBD.");
|
||||
break;
|
||||
case Page_Conclusion:
|
||||
message = tr("TBD.");
|
||||
break;
|
||||
default:
|
||||
message = tr("There is no help available for the current page.");
|
||||
}
|
||||
|
||||
QMessageBox::information(this, tr("Model Wizard Help"), message);
|
||||
}
|
||||
|
||||
StandardPage::StandardPage(WizardPage currentPage, WizardDialog *dlg, QString image, QString title, QString text, int nextPage )
|
||||
: QWizardPage(),
|
||||
wizDlg(dlg),
|
||||
pageCurrent(currentPage),
|
||||
pageFollower(nextPage)
|
||||
StandardPage::StandardPage(WizardPage currentPage, WizardDialog *dlg, QString image, QString title, QString text, int nextPage):
|
||||
QWizardPage(),
|
||||
wizDlg(dlg),
|
||||
pageCurrent(currentPage),
|
||||
pageFollower(nextPage)
|
||||
{
|
||||
setTitle(title);
|
||||
setPixmap(QWizard::WatermarkPixmap, QPixmap(QString(":/images/wizard/%1.png").arg(image)));
|
||||
@@ -175,10 +195,10 @@ void StandardPage::populateCB(QComboBox *cb, int preferred)
|
||||
}
|
||||
// Avoid selecting prebooked channels
|
||||
int channel = cb->itemData(cb->currentIndex()).toInt();
|
||||
if(wizDlg->mix.channel[channel].prebooked){
|
||||
for(int i=cb->count()-1; i>=0; i--){
|
||||
if (wizDlg->mix.channel[channel].prebooked) {
|
||||
for (int i=cb->count()-1; i>=0; i--){
|
||||
channel = cb->itemData(i).toInt();
|
||||
if( !wizDlg->mix.channel[channel].prebooked ){
|
||||
if (!wizDlg->mix.channel[channel].prebooked) {
|
||||
cb->setCurrentIndex(i);
|
||||
break;
|
||||
}
|
||||
@@ -208,9 +228,8 @@ bool StandardPage::bookChannel(QComboBox * cb, Input input1, int weight1, Input
|
||||
|
||||
void StandardPage::releaseBookings()
|
||||
{
|
||||
for (int i=0; i<WIZ_MAX_CHANNELS; i++)
|
||||
{
|
||||
if (wizDlg->mix.channel[i].page == pageCurrent){
|
||||
for (int i=0; i<WIZ_MAX_CHANNELS; i++) {
|
||||
if (wizDlg->mix.channel[i].page == pageCurrent) {
|
||||
wizDlg->mix.channel[i].clear();
|
||||
}
|
||||
}
|
||||
@@ -218,8 +237,7 @@ void StandardPage::releaseBookings()
|
||||
|
||||
void StandardPage::releasePreBookings()
|
||||
{
|
||||
for (int i=0; i<WIZ_MAX_CHANNELS; i++)
|
||||
{
|
||||
for (int i=0; i<WIZ_MAX_CHANNELS; i++) {
|
||||
wizDlg->mix.channel[i].prebooked = false;
|
||||
}
|
||||
}
|
||||
@@ -304,7 +322,7 @@ WingtypeSelectionPage::WingtypeSelectionPage(WizardDialog *dlg, QString image, Q
|
||||
int WingtypeSelectionPage::nextId() const
|
||||
{
|
||||
if (deltaWingRB->isChecked())
|
||||
return Page_Bank;
|
||||
return Page_Elevons;
|
||||
else
|
||||
return Page_Ailerons;
|
||||
}
|
||||
@@ -419,13 +437,15 @@ AileronsPage::AileronsPage(WizardDialog *dlg, QString image, QString title, QStr
|
||||
connect(twoAileronsRB, SIGNAL(toggled(bool)), this, SLOT(twoAileronChannels()));
|
||||
}
|
||||
|
||||
void AileronsPage::initializePage(){
|
||||
void AileronsPage::initializePage()
|
||||
{
|
||||
populateCB(aileron1CB, getDefaultChannel(AILERONS_INPUT));
|
||||
populateCB(aileron2CB, nextFreeChannel(4));
|
||||
StandardPage::initializePage();
|
||||
}
|
||||
|
||||
bool AileronsPage::validatePage() {
|
||||
bool AileronsPage::validatePage()
|
||||
{
|
||||
releaseBookings();
|
||||
if (noAileronsRB->isChecked()) {
|
||||
return true;
|
||||
@@ -437,12 +457,26 @@ bool AileronsPage::validatePage() {
|
||||
bookChannel(aileron2CB, AILERONS_INPUT, -100 ));
|
||||
}
|
||||
|
||||
void AileronsPage::noAileronChannel(){ aileron1CB->setEnabled(false);aileron2CB->setEnabled(false);}
|
||||
void AileronsPage::oneAileronChannel(){ aileron1CB->setEnabled(true); aileron2CB->setEnabled(false);}
|
||||
void AileronsPage::twoAileronChannels(){ aileron1CB->setEnabled(true); aileron2CB->setEnabled(true);}
|
||||
void AileronsPage::noAileronChannel()
|
||||
{
|
||||
aileron1CB->setEnabled(false);
|
||||
aileron2CB->setEnabled(false);
|
||||
}
|
||||
|
||||
FlapsPage::FlapsPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage)
|
||||
: StandardPage(Page_Flaps, dlg, image, title, text, nextPage)
|
||||
void AileronsPage::oneAileronChannel()
|
||||
{
|
||||
aileron1CB->setEnabled(true);
|
||||
aileron2CB->setEnabled(false);
|
||||
}
|
||||
|
||||
void AileronsPage::twoAileronChannels()
|
||||
{
|
||||
aileron1CB->setEnabled(true);
|
||||
aileron2CB->setEnabled(true);
|
||||
}
|
||||
|
||||
FlapsPage::FlapsPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage):
|
||||
StandardPage(Page_Flaps, dlg, image, title, text, nextPage)
|
||||
{
|
||||
noFlapsRB = new QRadioButton(tr("No"));
|
||||
oneFlapRB = new QRadioButton(tr("Yes, controlled by a single channel"));
|
||||
@@ -468,7 +502,8 @@ FlapsPage::FlapsPage(WizardDialog *dlg, QString image, QString title, QString te
|
||||
connect(twoFlapsRB, SIGNAL(toggled(bool)), this, SLOT(twoFlapChannels()));
|
||||
}
|
||||
|
||||
void FlapsPage::initializePage(){
|
||||
void FlapsPage::initializePage()
|
||||
{
|
||||
populateCB(flap1CB, nextFreeChannel(4));
|
||||
populateCB(flap2CB, nextFreeChannel(4));
|
||||
StandardPage::initializePage();
|
||||
@@ -486,12 +521,26 @@ bool FlapsPage::validatePage() {
|
||||
bookChannel(flap2CB, FLAPS_INPUT, 100 ));
|
||||
}
|
||||
|
||||
void FlapsPage::noFlapChannel(){ flap1CB->setEnabled(false);flap2CB->setEnabled(false);}
|
||||
void FlapsPage::oneFlapChannel(){ flap1CB->setEnabled(true); flap2CB->setEnabled(false);}
|
||||
void FlapsPage::twoFlapChannels(){ flap1CB->setEnabled(true); flap2CB->setEnabled(true);}
|
||||
void FlapsPage::noFlapChannel()
|
||||
{
|
||||
flap1CB->setEnabled(false);
|
||||
flap2CB->setEnabled(false);
|
||||
}
|
||||
|
||||
AirbrakesPage::AirbrakesPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage)
|
||||
: StandardPage(Page_Airbrakes, dlg, image, title, text, nextPage)
|
||||
void FlapsPage::oneFlapChannel()
|
||||
{
|
||||
flap1CB->setEnabled(true);
|
||||
flap2CB->setEnabled(false);
|
||||
}
|
||||
|
||||
void FlapsPage::twoFlapChannels()
|
||||
{
|
||||
flap1CB->setEnabled(true);
|
||||
flap2CB->setEnabled(true);
|
||||
}
|
||||
|
||||
AirbrakesPage::AirbrakesPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage):
|
||||
StandardPage(Page_Airbrakes, dlg, image, title, text, nextPage)
|
||||
{
|
||||
noAirbrakesRB = new QRadioButton(tr("No"));
|
||||
oneAirbrakeRB = new QRadioButton(tr("Yes, controlled by a single channel"));
|
||||
@@ -517,13 +566,15 @@ AirbrakesPage::AirbrakesPage(WizardDialog *dlg, QString image, QString title, QS
|
||||
connect(twoAirbrakesRB, SIGNAL(toggled(bool)), this, SLOT(twoAirbrakeChannels()));
|
||||
}
|
||||
|
||||
void AirbrakesPage::initializePage(){
|
||||
void AirbrakesPage::initializePage()
|
||||
{
|
||||
populateCB(airbrake1CB, nextFreeChannel(4));
|
||||
populateCB(airbrake2CB, nextFreeChannel(4));
|
||||
StandardPage::initializePage();
|
||||
}
|
||||
|
||||
bool AirbrakesPage::validatePage() {
|
||||
bool AirbrakesPage::validatePage()
|
||||
{
|
||||
releaseBookings();
|
||||
if (noAirbrakesRB->isChecked()) {
|
||||
return true;
|
||||
@@ -535,53 +586,53 @@ bool AirbrakesPage::validatePage() {
|
||||
bookChannel(airbrake2CB, AIRBRAKES_INPUT, 100 ));
|
||||
}
|
||||
|
||||
void AirbrakesPage::noAirbrakeChannel(){ airbrake1CB->setEnabled(false);airbrake2CB->setEnabled(false);}
|
||||
void AirbrakesPage::oneAirbrakeChannel(){ airbrake1CB->setEnabled(true); airbrake2CB->setEnabled(false);}
|
||||
void AirbrakesPage::twoAirbrakeChannels(){ airbrake1CB->setEnabled(true); airbrake2CB->setEnabled(true);}
|
||||
|
||||
BankPage::BankPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage)
|
||||
: StandardPage(Page_Bank, dlg, image, title, text, nextPage)
|
||||
void AirbrakesPage::noAirbrakeChannel()
|
||||
{
|
||||
airbrake1CB->setEnabled(false);
|
||||
airbrake2CB->setEnabled(false);
|
||||
}
|
||||
|
||||
void AirbrakesPage::oneAirbrakeChannel()
|
||||
{
|
||||
airbrake1CB->setEnabled(true);
|
||||
airbrake2CB->setEnabled(false);
|
||||
}
|
||||
|
||||
void AirbrakesPage::twoAirbrakeChannels()
|
||||
{
|
||||
airbrake1CB->setEnabled(true);
|
||||
airbrake2CB->setEnabled(true);
|
||||
}
|
||||
|
||||
ElevonsPage::ElevonsPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage):
|
||||
StandardPage(Page_Elevons, dlg, image, title, text, nextPage)
|
||||
{
|
||||
oneElevonChRB = new QRadioButton(tr("One"));
|
||||
twoElevonsChRB = new QRadioButton(tr("Two"));
|
||||
oneElevonChRB->setChecked(true);
|
||||
|
||||
elevon1CB = new QComboBox();
|
||||
elevon2CB = new QComboBox();
|
||||
elevon2CB->setEnabled(false);
|
||||
|
||||
QLayout *l = layout();
|
||||
l->addWidget(oneElevonChRB);
|
||||
l->addWidget(twoElevonsChRB);
|
||||
l->addWidget(new QLabel(tr("<br>First Elevon Channel:")));
|
||||
l->addWidget(elevon1CB);
|
||||
l->addWidget(new QLabel(tr("Second Elevon Channel:")));
|
||||
l->addWidget(elevon2CB);
|
||||
|
||||
connect(oneElevonChRB, SIGNAL(toggled(bool)), this, SLOT(oneElevonChannel()));
|
||||
connect(twoElevonsChRB, SIGNAL(toggled(bool)), this, SLOT(twoElevonChannels()));
|
||||
}
|
||||
|
||||
void BankPage::initializePage(){
|
||||
void ElevonsPage::initializePage()
|
||||
{
|
||||
populateCB(elevon1CB, getDefaultChannel(ELEVATOR_INPUT));
|
||||
populateCB(elevon2CB, getDefaultChannel(AILERONS_INPUT));
|
||||
StandardPage::initializePage();
|
||||
}
|
||||
|
||||
bool BankPage::validatePage() {
|
||||
bool ElevonsPage::validatePage()
|
||||
{
|
||||
releaseBookings();
|
||||
if (oneElevonChRB->isChecked()) {
|
||||
return (bookChannel(elevon1CB, AILERONS_INPUT, 100, ELEVATOR_INPUT, 100 ));
|
||||
}
|
||||
return( bookChannel(elevon1CB, AILERONS_INPUT, 100, ELEVATOR_INPUT, 100 ) &&
|
||||
bookChannel(elevon2CB, AILERONS_INPUT, -100, ELEVATOR_INPUT, 100 ));
|
||||
return (bookChannel(elevon1CB, AILERONS_INPUT, 100, ELEVATOR_INPUT, 100) &&
|
||||
bookChannel(elevon2CB, AILERONS_INPUT, -100, ELEVATOR_INPUT, 100));
|
||||
}
|
||||
|
||||
void BankPage::oneElevonChannel(){ elevon2CB->setEnabled(false);}
|
||||
void BankPage::twoElevonChannels(){ elevon2CB->setEnabled(true);}
|
||||
|
||||
RudderPage::RudderPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage)
|
||||
: StandardPage(Page_Rudder, dlg, image, title, text, nextPage)
|
||||
RudderPage::RudderPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage):
|
||||
StandardPage(Page_Rudder, dlg, image, title, text, nextPage)
|
||||
{
|
||||
noRudderRB = new QRadioButton(tr("No"));
|
||||
hasRudderRB = new QRadioButton(tr("Yes"));
|
||||
@@ -599,7 +650,8 @@ RudderPage::RudderPage(WizardDialog *dlg, QString image, QString title, QString
|
||||
connect(hasRudderRB, SIGNAL(toggled(bool)), this, SLOT(hasRudder()));
|
||||
}
|
||||
|
||||
void RudderPage::initializePage(){
|
||||
void RudderPage::initializePage()
|
||||
{
|
||||
populateCB(rudderCB, getDefaultChannel(RUDDER_INPUT));
|
||||
StandardPage::initializePage();
|
||||
}
|
||||
@@ -612,8 +664,15 @@ bool RudderPage::validatePage() {
|
||||
return (bookChannel(rudderCB, RUDDER_INPUT, 100));
|
||||
}
|
||||
|
||||
void RudderPage::noRudder(){ rudderCB->setEnabled(false);}
|
||||
void RudderPage::hasRudder(){ rudderCB->setEnabled(true);}
|
||||
void RudderPage::noRudder()
|
||||
{
|
||||
rudderCB->setEnabled(false);
|
||||
}
|
||||
|
||||
void RudderPage::hasRudder()
|
||||
{
|
||||
rudderCB->setEnabled(true);
|
||||
}
|
||||
|
||||
VTailPage::VTailPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage)
|
||||
: StandardPage(Page_Tail, dlg, image, title, text, nextPage)
|
||||
@@ -628,20 +687,22 @@ VTailPage::VTailPage(WizardDialog *dlg, QString image, QString title, QString te
|
||||
l->addWidget(tail2CB);
|
||||
}
|
||||
|
||||
void VTailPage::initializePage(){
|
||||
void VTailPage::initializePage()
|
||||
{
|
||||
populateCB(tail1CB, getDefaultChannel(ELEVATOR_INPUT));
|
||||
populateCB(tail2CB, getDefaultChannel(AILERONS_INPUT));
|
||||
StandardPage::initializePage();
|
||||
}
|
||||
|
||||
bool VTailPage::validatePage() {
|
||||
bool VTailPage::validatePage()
|
||||
{
|
||||
releaseBookings();
|
||||
return (bookChannel(tail1CB, ELEVATOR_INPUT, 50, RUDDER_INPUT, 50) &&
|
||||
bookChannel(tail2CB, ELEVATOR_INPUT, 50, RUDDER_INPUT, -50 ));
|
||||
}
|
||||
|
||||
TailPage::TailPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage)
|
||||
: StandardPage(Page_Tail, dlg, image, title, text, nextPage)
|
||||
TailPage::TailPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage):
|
||||
StandardPage(Page_Tail, dlg, image, title, text, nextPage)
|
||||
{
|
||||
elevatorCB = new QComboBox();
|
||||
rudderCB = new QComboBox();
|
||||
@@ -653,16 +714,18 @@ TailPage::TailPage(WizardDialog *dlg, QString image, QString title, QString text
|
||||
l->addWidget(elevatorCB);
|
||||
}
|
||||
|
||||
void TailPage::initializePage(){
|
||||
void TailPage::initializePage()
|
||||
{
|
||||
populateCB(elevatorCB, getDefaultChannel(ELEVATOR_INPUT));
|
||||
populateCB(rudderCB, getDefaultChannel(RUDDER_INPUT));
|
||||
StandardPage::initializePage();
|
||||
}
|
||||
|
||||
bool TailPage::validatePage() {
|
||||
bool TailPage::validatePage()
|
||||
{
|
||||
releaseBookings();
|
||||
return( bookChannel(elevatorCB, ELEVATOR_INPUT, 100 ) &&
|
||||
bookChannel(rudderCB, RUDDER_INPUT, 100 ));
|
||||
return( bookChannel(elevatorCB, ELEVATOR_INPUT, 100) &&
|
||||
bookChannel(rudderCB, RUDDER_INPUT, 100));
|
||||
}
|
||||
|
||||
SimpleTailPage::SimpleTailPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage)
|
||||
@@ -675,18 +738,20 @@ SimpleTailPage::SimpleTailPage(WizardDialog *dlg, QString image, QString title,
|
||||
l->addWidget(elevatorCB);
|
||||
}
|
||||
|
||||
void SimpleTailPage::initializePage(){
|
||||
void SimpleTailPage::initializePage()
|
||||
{
|
||||
populateCB(elevatorCB, getDefaultChannel(ELEVATOR_INPUT));
|
||||
StandardPage::initializePage();
|
||||
}
|
||||
|
||||
bool SimpleTailPage::validatePage() {
|
||||
bool SimpleTailPage::validatePage()
|
||||
{
|
||||
releaseBookings();
|
||||
return( bookChannel(elevatorCB, ELEVATOR_INPUT, 100 ));
|
||||
}
|
||||
|
||||
CyclicPage::CyclicPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage)
|
||||
: StandardPage(Page_Cyclic, dlg, image, title, text, nextPage)
|
||||
CyclicPage::CyclicPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage):
|
||||
StandardPage(Page_Cyclic, dlg, image, title, text, nextPage)
|
||||
{
|
||||
cyclic90RB = new QRadioButton(tr("90"));
|
||||
cyclic90RB->setChecked(true);
|
||||
@@ -701,17 +766,19 @@ CyclicPage::CyclicPage(WizardDialog *dlg, QString image, QString title, QString
|
||||
l->addWidget(cyclic140RB);
|
||||
}
|
||||
|
||||
void CyclicPage::initializePage(){
|
||||
void CyclicPage::initializePage()
|
||||
{
|
||||
StandardPage::initializePage();
|
||||
}
|
||||
|
||||
bool CyclicPage::validatePage() {
|
||||
bool CyclicPage::validatePage()
|
||||
{
|
||||
releaseBookings();
|
||||
return true;
|
||||
}
|
||||
|
||||
GyroPage::GyroPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage)
|
||||
: StandardPage(Page_Gyro, dlg, image, title, text, nextPage)
|
||||
GyroPage::GyroPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage):
|
||||
StandardPage(Page_Gyro, dlg, image, title, text, nextPage)
|
||||
{
|
||||
noGyroRB = new QRadioButton(tr("No"));
|
||||
noGyroRB->setChecked(true);
|
||||
@@ -724,7 +791,8 @@ GyroPage::GyroPage(WizardDialog *dlg, QString image, QString title, QString text
|
||||
l->addWidget(potGyroRB);
|
||||
}
|
||||
|
||||
void GyroPage::initializePage(){
|
||||
void GyroPage::initializePage()
|
||||
{
|
||||
StandardPage::initializePage();
|
||||
}
|
||||
|
||||
@@ -733,8 +801,8 @@ bool GyroPage::validatePage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
FblPage::FblPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage)
|
||||
: StandardPage(Page_Fblheli, dlg, image, title, text, nextPage)
|
||||
FblPage::FblPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage):
|
||||
StandardPage(Page_Fblheli, dlg, image, title, text, nextPage)
|
||||
{
|
||||
throttleCB = new QComboBox();
|
||||
yawCB = new QComboBox();
|
||||
@@ -752,7 +820,8 @@ FblPage::FblPage(WizardDialog *dlg, QString image, QString title, QString text,
|
||||
l->addWidget(rollCB);
|
||||
}
|
||||
|
||||
void FblPage::initializePage(){
|
||||
void FblPage::initializePage()
|
||||
{
|
||||
populateCB(throttleCB, getDefaultChannel(THROTTLE_INPUT));
|
||||
populateCB(yawCB, getDefaultChannel(RUDDER_INPUT));
|
||||
populateCB(pitchCB, getDefaultChannel(ELEVATOR_INPUT));
|
||||
@@ -760,7 +829,8 @@ void FblPage::initializePage(){
|
||||
StandardPage::initializePage();
|
||||
}
|
||||
|
||||
bool FblPage::validatePage() {
|
||||
bool FblPage::validatePage()
|
||||
{
|
||||
releaseBookings();
|
||||
return( bookChannel(throttleCB, THROTTLE_INPUT, 100 ) &&
|
||||
bookChannel( yawCB, RUDDER_INPUT, 100 ) &&
|
||||
@@ -768,8 +838,8 @@ bool FblPage::validatePage() {
|
||||
bookChannel( rollCB, AILERONS_INPUT, 100 ));
|
||||
}
|
||||
|
||||
HeliPage::HeliPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage)
|
||||
: StandardPage(Page_Helictrl, dlg, image, title, text, nextPage)
|
||||
HeliPage::HeliPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage):
|
||||
StandardPage(Page_Helictrl, dlg, image, title, text, nextPage)
|
||||
{
|
||||
throttleCB = new QComboBox();
|
||||
yawCB = new QComboBox();
|
||||
@@ -787,7 +857,8 @@ HeliPage::HeliPage(WizardDialog *dlg, QString image, QString title, QString text
|
||||
l->addWidget(rollCB);
|
||||
}
|
||||
|
||||
void HeliPage::initializePage(){
|
||||
void HeliPage::initializePage()
|
||||
{
|
||||
populateCB(throttleCB, getDefaultChannel(THROTTLE_INPUT));
|
||||
populateCB(yawCB, getDefaultChannel(RUDDER_INPUT));
|
||||
populateCB(pitchCB, getDefaultChannel(ELEVATOR_INPUT));
|
||||
@@ -795,7 +866,8 @@ void HeliPage::initializePage(){
|
||||
StandardPage::initializePage();
|
||||
}
|
||||
|
||||
bool HeliPage::validatePage() {
|
||||
bool HeliPage::validatePage()
|
||||
{
|
||||
releaseBookings();
|
||||
return( bookChannel(throttleCB, THROTTLE_INPUT, 100 ) &&
|
||||
bookChannel( yawCB, RUDDER_INPUT, 100 ) &&
|
||||
@@ -803,8 +875,8 @@ bool HeliPage::validatePage() {
|
||||
bookChannel( rollCB, AILERONS_INPUT, 100 ));
|
||||
}
|
||||
|
||||
MultirotorPage::MultirotorPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage)
|
||||
: StandardPage(Page_Multirotor, dlg, image, title, text, nextPage)
|
||||
MultirotorPage::MultirotorPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage):
|
||||
StandardPage(Page_Multirotor, dlg, image, title, text, nextPage)
|
||||
{
|
||||
throttleCB = new QComboBox();
|
||||
yawCB = new QComboBox();
|
||||
@@ -822,7 +894,8 @@ MultirotorPage::MultirotorPage(WizardDialog *dlg, QString image, QString title,
|
||||
l->addWidget(rollCB);
|
||||
}
|
||||
|
||||
void MultirotorPage::initializePage(){
|
||||
void MultirotorPage::initializePage()
|
||||
{
|
||||
populateCB(throttleCB, getDefaultChannel(THROTTLE_INPUT));
|
||||
populateCB(yawCB, getDefaultChannel(RUDDER_INPUT));
|
||||
populateCB(pitchCB, getDefaultChannel(ELEVATOR_INPUT));
|
||||
@@ -830,7 +903,8 @@ void MultirotorPage::initializePage(){
|
||||
StandardPage::initializePage();
|
||||
}
|
||||
|
||||
bool MultirotorPage::validatePage() {
|
||||
bool MultirotorPage::validatePage()
|
||||
{
|
||||
releaseBookings();
|
||||
return( bookChannel(throttleCB, THROTTLE_INPUT, 100 ) &&
|
||||
bookChannel(yawCB, RUDDER_INPUT, 100 ) &&
|
||||
@@ -838,8 +912,8 @@ bool MultirotorPage::validatePage() {
|
||||
bookChannel(rollCB, AILERONS_INPUT, 100 ));
|
||||
}
|
||||
|
||||
OptionsPage::OptionsPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage)
|
||||
: StandardPage(Page_Options, dlg, image, title, text, nextPage)
|
||||
OptionsPage::OptionsPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage):
|
||||
StandardPage(Page_Options, dlg, image, title, text, nextPage)
|
||||
{
|
||||
throttleCutRB = new QCheckBox(tr("Throttle Cut"));
|
||||
throttleTimerRB = new QCheckBox(tr("Throttle Timer"));
|
||||
@@ -874,13 +948,15 @@ ConclusionPage::ConclusionPage(WizardDialog *dlg, QString image, QString title,
|
||||
l->addWidget(proceedCB);
|
||||
}
|
||||
|
||||
void ConclusionPage::initializePage(){
|
||||
void ConclusionPage::initializePage()
|
||||
{
|
||||
WizardPrinter p(&wizDlg->mix);
|
||||
textLabel->setText(p.print());
|
||||
StandardPage::initializePage();
|
||||
}
|
||||
|
||||
bool ConclusionPage::validatePage() {
|
||||
bool ConclusionPage::validatePage()
|
||||
{
|
||||
wizDlg->mix.complete = true;
|
||||
return true;
|
||||
}
|
||||
@@ -888,24 +964,35 @@ bool ConclusionPage::validatePage() {
|
||||
|
||||
QString WizardPrinter::inputName(Input input)
|
||||
{
|
||||
switch (input){
|
||||
case THROTTLE_INPUT: return "THR";
|
||||
case RUDDER_INPUT: return "RUD";
|
||||
case ELEVATOR_INPUT: return "ELE";
|
||||
case AILERONS_INPUT: return "AIL";
|
||||
case FLAPS_INPUT: return "FLP";
|
||||
case AIRBRAKES_INPUT: return "AIR";
|
||||
default: return "---";
|
||||
switch (input) {
|
||||
case THROTTLE_INPUT:
|
||||
return "THR";
|
||||
case RUDDER_INPUT:
|
||||
return "RUD";
|
||||
case ELEVATOR_INPUT:
|
||||
return "ELE";
|
||||
case AILERONS_INPUT:
|
||||
return "AIL";
|
||||
case FLAPS_INPUT:
|
||||
return "FLP";
|
||||
case AIRBRAKES_INPUT:
|
||||
return "AIR";
|
||||
default:
|
||||
return "---";
|
||||
}
|
||||
}
|
||||
|
||||
QString WizardPrinter::vehicleName(Vehicle vehicle)
|
||||
{
|
||||
switch (vehicle){
|
||||
case PLANE: return "Plane";
|
||||
case MULTICOPTER: return "Multicopter";
|
||||
case HELICOPTER: return "Helicopter";
|
||||
default: return "---";
|
||||
switch (vehicle) {
|
||||
case PLANE:
|
||||
return tr("Plane");
|
||||
case MULTICOPTER:
|
||||
return tr("Multicopter");
|
||||
case HELICOPTER:
|
||||
return tr("Helicopter");
|
||||
default:
|
||||
return "---";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -925,23 +1012,22 @@ WizardPrinter::WizardPrinter(WizMix *wizMix)
|
||||
|
||||
QString WizardPrinter::print()
|
||||
{
|
||||
QString str;
|
||||
str = QString(tr("Model Name: ")) + mix->name + "\n";
|
||||
str += QString(tr("Model Type: ")) + vehicleName(mix->vehicle) + "\n";
|
||||
QString str = tr("Model Name: ") + mix->name + "\n";
|
||||
str += tr("Model Type: ") + vehicleName(mix->vehicle) + "\n";
|
||||
|
||||
str += QString(tr("Options: ")) + "[";
|
||||
for (int i=0; i<WIZ_MAX_OPTIONS; i++){
|
||||
if (mix->options[i])
|
||||
str += "X";
|
||||
else
|
||||
str += "-";
|
||||
}
|
||||
str += tr("Options: ") + "[";
|
||||
for (int i=0; i<WIZ_MAX_OPTIONS; i++) {
|
||||
if (mix->options[i])
|
||||
str += "X";
|
||||
else
|
||||
str += "-";
|
||||
}
|
||||
str += QString("]") + "\n";
|
||||
|
||||
for (int i=0; i<WIZ_MAX_CHANNELS; i++){
|
||||
for (int i=0; i<WIZ_MAX_CHANNELS; i++) {
|
||||
if (mix->channel[i].page != Page_None) {
|
||||
Channel ch = mix->channel[i];
|
||||
str += QString(tr("Channel %1: ").arg(i+1));
|
||||
str += tr("Channel %1: ").arg(i+1);
|
||||
str += printChannel(ch.input1, ch.weight1, ch.input2, ch.weight2 );
|
||||
str += QString("\n");
|
||||
}
|
||||
|
||||
@@ -192,41 +192,37 @@ private:
|
||||
QComboBox *airbrake2CB;
|
||||
};
|
||||
|
||||
class BankPage: public StandardPage
|
||||
class ElevonsPage: public StandardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
BankPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
|
||||
void initializePage();
|
||||
bool validatePage();
|
||||
|
||||
protected slots:
|
||||
void oneElevonChannel();
|
||||
void twoElevonChannels();
|
||||
public:
|
||||
ElevonsPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
|
||||
void initializePage();
|
||||
bool validatePage();
|
||||
|
||||
private:
|
||||
QRadioButton *oneElevonChRB;
|
||||
QRadioButton *twoElevonsChRB;
|
||||
QComboBox *elevon1CB;
|
||||
QComboBox *elevon2CB;
|
||||
private:
|
||||
QComboBox *elevon1CB;
|
||||
QComboBox *elevon2CB;
|
||||
};
|
||||
|
||||
class RudderPage: public StandardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RudderPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
|
||||
void initializePage();
|
||||
bool validatePage();
|
||||
|
||||
protected slots:
|
||||
void noRudder();
|
||||
void hasRudder();
|
||||
public:
|
||||
RudderPage(WizardDialog *dlg, QString image, QString title, QString text, int nextPage=-1);
|
||||
void initializePage();
|
||||
bool validatePage();
|
||||
|
||||
private:
|
||||
QRadioButton *noRudderRB;
|
||||
QRadioButton *hasRudderRB;
|
||||
QComboBox *rudderCB;
|
||||
protected slots:
|
||||
void noRudder();
|
||||
void hasRudder();
|
||||
|
||||
private:
|
||||
QRadioButton *noRudderRB;
|
||||
QRadioButton *hasRudderRB;
|
||||
QComboBox *rudderCB;
|
||||
};
|
||||
|
||||
class TailPage: public StandardPage
|
||||
|
||||
@@ -1,4 +1,28 @@
|
||||
<h2>OpenTX 2.0 / Coming soon!</h2>
|
||||
<h2>OpenTX 2.0.1 / 2014-02-05</h2>
|
||||
[Taranis]
|
||||
<ul>
|
||||
<li>S.PORT / D protocol choice added in TELEMETRY menu
|
||||
<li>Heli mixer fix (stick modes 2/3/4)
|
||||
<li>Multipos switch fix
|
||||
<li>Italian translations updated
|
||||
<li>French translations fixes
|
||||
<li>Multis Wizard added
|
||||
<li>Bootloader now needs only one trim pressed
|
||||
<li>S3 warning hidden (no S3 on Taranis)
|
||||
<li>Persistent mAh was broken
|
||||
</ul>
|
||||
|
||||
[Stock]
|
||||
<ul>
|
||||
<li>Fix for LS used as source
|
||||
</ul>
|
||||
|
||||
[All]
|
||||
<ul>
|
||||
<li>Fix on d>=x logical switches
|
||||
</ul>
|
||||
|
||||
<h2>OpenTX 2.0.0 / 2014-06-02</h2>
|
||||
[Taranis]
|
||||
<ul>
|
||||
<li>Inputs layer with support for all physical inputs and telemetry
|
||||
@@ -17,7 +41,7 @@
|
||||
<li>Taranis will be useable as a standard PC joystick through USB, 8 analogs and 8 buttons mapped to CH1-8 and 9-16 respectively
|
||||
</ul>
|
||||
|
||||
[Arm Boards]
|
||||
[ARM Boards]
|
||||
<ul>
|
||||
<li>Measured consumption (mAh) can be stored on power off
|
||||
<li>0.1% resolution for limits
|
||||
@@ -33,7 +57,7 @@
|
||||
<li>Support for up to 16 channels on trainer input
|
||||
</ul>
|
||||
|
||||
[all]
|
||||
[All]
|
||||
<ul>
|
||||
<li>Proportional fonts
|
||||
<li>Switch warnings can be disabled for switches you don't use on a given model
|
||||
@@ -47,13 +71,13 @@
|
||||
</ul>
|
||||
|
||||
<h2>2940 / 2014-02-02</h2>
|
||||
[Arm Boards]
|
||||
[ARM Boards]
|
||||
<ul>
|
||||
<li>Wav files played even in silent mode
|
||||
<li>GPS support had broken VFAS
|
||||
</ul>
|
||||
|
||||
[all]
|
||||
[All]
|
||||
<ul>
|
||||
<li>Custom function triggered by a CSW based on analog triggering erroneously at powerup
|
||||
<li>Problem with mixer weight field when !GVARS
|
||||
@@ -61,20 +85,20 @@
|
||||
</ul>
|
||||
|
||||
<h2>2923 / 2014-01-08</h2>
|
||||
[Arm Boards]
|
||||
[ARM Boards]
|
||||
<ul>
|
||||
<li>Audio freeze bug fixed
|
||||
<li>Aurora gimbals support
|
||||
</ul>
|
||||
|
||||
<h2>2834 / 2013-10-29</h2>
|
||||
[Arm Boards]
|
||||
[ARM Boards]
|
||||
<ul>
|
||||
<li>Altitude played without decimal when >= 10m
|
||||
<li>Check to avoid too long paths when playing SD files
|
||||
</ul>
|
||||
|
||||
[all]
|
||||
[All]
|
||||
<ul>
|
||||
<li>Mixer bug when a MULTIPLY mix used with a slow
|
||||
<li>GVAR popup removed
|
||||
@@ -82,75 +106,75 @@
|
||||
</ul>
|
||||
|
||||
<h2>2768 / 2013-09-20</h2>
|
||||
[all]
|
||||
[All]
|
||||
<ul>
|
||||
<li>Name badly displayed after SD Model Restore</li>
|
||||
</ul>
|
||||
|
||||
[stock]
|
||||
[9X Stock]
|
||||
<ul>
|
||||
<li>Custom switches not working when comparing a timer with a value (stock only without telemetry mod)</li>
|
||||
</ul>
|
||||
|
||||
[sky9x/gruvin]
|
||||
[Sky9x/Gruvin9x]
|
||||
<ul>
|
||||
<li>Fixes in logging function</li>
|
||||
<li>Confirmation Popup before SD Format</li>
|
||||
</ul>
|
||||
|
||||
<h2>2751 / 2013-09-01</h2>
|
||||
[all]
|
||||
[All]
|
||||
<ul>
|
||||
<li>Fixes in translations (FR, IT, PT)</li>
|
||||
</ul>
|
||||
|
||||
<h2>2746 / 2013-08-30</h2>
|
||||
[all]
|
||||
[All]
|
||||
<ul>
|
||||
<li>Limits are now [-125:0] and [0:125] instead of [-125:25] and [-25:125]</li>
|
||||
<li>INPUTS instead of STICKS for BL activation</li>
|
||||
<li>Curves presets bug fix</li>
|
||||
</ul>
|
||||
|
||||
[stock]
|
||||
[9X Stock]
|
||||
<ul>
|
||||
<li>Fix bug with Battery calibration</li>
|
||||
<li>14051 can be used for THR and AIL connections (telemetry)</li>
|
||||
<li>CH1 PPM output was truncated</li>
|
||||
</ul>
|
||||
|
||||
[sky9x]
|
||||
[Sky9x]
|
||||
<ul>
|
||||
<li>Flight mode sound files now are read from: /SOUNDS/(lang)/modelname/fpname-ON.wav and /SOUNDS/(lang)/modelname/fpname-OFF.wav</li>
|
||||
</ul>
|
||||
|
||||
<h2>2688 / 2013-07-28</h2>
|
||||
[stock]
|
||||
[9X Stock]
|
||||
<ul>
|
||||
<li>Fix bug with imperial units</li>
|
||||
</ul>
|
||||
|
||||
[gruvin9x]
|
||||
[Gruvin9x]
|
||||
<ul>
|
||||
<li>Fix bug with imperial units</li>
|
||||
<li>Fix small bug with SOMO 14D </li>
|
||||
<li>Telemetry logs renamed modelname-yyyy-mm-dd.csv</li>
|
||||
</ul>
|
||||
|
||||
[sky9x]
|
||||
[Sky9x]
|
||||
<ul>
|
||||
<li>Telemetry logs renamed modelname-yyyy-mm-dd.csv</li>
|
||||
</ul>
|
||||
|
||||
<h2>2647 / 2013-07-21</h2>
|
||||
[all]
|
||||
[All]
|
||||
<ul>
|
||||
<li>Some bug fixes</li>
|
||||
<li>Better fonts</li>
|
||||
</ul>
|
||||
|
||||
<h2>2491 / 2013-06-24</h2>
|
||||
[all]
|
||||
[All]
|
||||
<ul>
|
||||
<li>PlaySound has now a repeat argument</li>
|
||||
<li>FAI mode added (disable telemetry other than A1/A2/RSSI for contests)</li>
|
||||
@@ -158,55 +182,55 @@
|
||||
<li>RSSI alarms default thresholds now 45 / 42 </li>
|
||||
</ul>
|
||||
|
||||
[stock]
|
||||
[9X Stock]
|
||||
<ul>
|
||||
<li>Flash savings</li>
|
||||
<li>Vario sink tones removed</li>
|
||||
<li>Audio files renumbered (see here) </li>
|
||||
</ul>
|
||||
|
||||
[sky9x]
|
||||
[Sky9x]
|
||||
<ul>
|
||||
<li>Audio mixer: several sounds can now be played simulataneously, and beeps won't interrupt and clear voice alerts anymore. Note that sound files now need to have sampling rates of either 8, 16 or 32kHz and may need to be replaced. </li>
|
||||
</ul>
|
||||
|
||||
<h2>2413 / 2013-05-22</h2>
|
||||
[all]
|
||||
[All]
|
||||
<ul>
|
||||
<li>Calibration screen automatically appears following an EEPROM format</li>
|
||||
<li>Wraparound in popup menus </li>
|
||||
</ul>
|
||||
|
||||
[stock]
|
||||
[9X Stock]
|
||||
<ul>
|
||||
<li>More options supported (novario / nogps / nogauges)</li>
|
||||
<li>Flash savings</li>
|
||||
<li>Mavlink huge rework by Rienk! </li>
|
||||
</ul>
|
||||
|
||||
[sky9x]
|
||||
[Sky9x]
|
||||
<ul>
|
||||
<li>Audio language can now be selected in the general settings! Note that the sound files need to be moved to subfolders of the SOUNDS folder (SOUNDS/en for English, same with it, fr, de, pt, se, cz)</li>
|
||||
<li>More settings for the 2nd PPM port</li>
|
||||
</ul>
|
||||
|
||||
<h2>2215 / 2013-04-05</h2>
|
||||
[all]
|
||||
[All]
|
||||
<ul>
|
||||
<li>New option AUTOSOURCE to automatically select the stick / pot / switch which is moved when editing a Mix source </li>
|
||||
</ul>
|
||||
|
||||
[stock]
|
||||
[9X Stock]
|
||||
<ul>
|
||||
<li>All prompts renumbered to have the "custom" prompts starting at 0 and to be able to use PlayTrack?(GVAR) with Adjust(GVAR) to play tracks sequences </li>
|
||||
</ul>
|
||||
|
||||
[gruvin9x]
|
||||
[Gruvin9x]
|
||||
<ul>
|
||||
<li>Possibility to have both BEEPER and SPEAKER enable in the same time </li>
|
||||
</ul>
|
||||
|
||||
[sky9x]
|
||||
[Sky9x]
|
||||
<ul>
|
||||
<li>Fixed a bug with audio stopped until next reboot in BackgroundMusic with no track selected</li>
|
||||
<li>Imperial is now an option selectable in the menus</li>
|
||||
|
||||
@@ -279,7 +279,7 @@ SHELL = sh
|
||||
IMG2LBM = -python ../util/img2lbm.py
|
||||
BIN2LBM = -python ../util/bin2lbm.py
|
||||
TRANSLATE = -python ../util/translate.py
|
||||
VERSION = 2.0.0
|
||||
VERSION = 2.0.1
|
||||
|
||||
SRC =
|
||||
CPPSRC =
|
||||
@@ -953,6 +953,7 @@ ifeq ($(EXT), $(filter $(EXT), FRSKY FRSKY_SPORT TELEMETREZ))
|
||||
endif
|
||||
|
||||
ifeq ($(VARIO), YES)
|
||||
CPPSRC += vario.cpp
|
||||
CPPDEFS += -DVARIO
|
||||
endif
|
||||
EEPROM_VARIANT += ${FRSKY_VARIANT}
|
||||
|
||||
@@ -984,8 +984,9 @@ void eeLoadModel(uint8_t id)
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
if(g_model.frsky.mAhPersistent)
|
||||
frskyData.hub.currentConsumption = g_model.frsky.storedMah;
|
||||
if (g_model.frsky.mAhPersistent) {
|
||||
frskyData.hub.currentConsumption = g_model.frsky.storedMah;
|
||||
}
|
||||
#endif
|
||||
|
||||
LOAD_MODEL_CURVES();
|
||||
|
||||
@@ -617,7 +617,7 @@ void menuGeneralSetup(uint8_t event)
|
||||
|
||||
#if defined(MAVLINK)
|
||||
case ITEM_MAVLINK_BAUD:
|
||||
g_eeGeneral.mavbaud = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_MAVLINK_BAUD_LABEL, STR_MAVLINK_BAUDS, PSTR("4800""9600""14400""19200""38400""57600""76800""115200"), g_eeGeneral.mavbaud, 0, 7, attr, event);
|
||||
g_eeGeneral.mavbaud = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_MAVLINK_BAUD_LABEL, STR_MAVLINK_BAUDS, g_eeGeneral.mavbaud, 0, 7, attr, event);
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -4897,7 +4897,12 @@ void menuModelCustomFunctions(uint8_t event)
|
||||
MENU_ADD_ITEM(STR_INSERT);
|
||||
if (!CFN_EMPTY(sd))
|
||||
MENU_ADD_ITEM(STR_CLEAR);
|
||||
MENU_ADD_ITEM(STR_DELETE);
|
||||
for (int i=sub+1; i<NUM_CFN; i++) {
|
||||
if (!CFN_EMPTY(&g_model.funcSw[i])) {
|
||||
MENU_ADD_ITEM(STR_DELETE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
menuHandler = onCustomFunctionsMenu;
|
||||
}
|
||||
#endif
|
||||
@@ -5355,6 +5360,7 @@ void menuModelCustomScripts(uint8_t event)
|
||||
#endif
|
||||
|
||||
enum menuModelTelemetryItems {
|
||||
CASE_CPUARM(ITEM_TELEMETRY_PROTOCOL_TYPE)
|
||||
#if defined(CPUARM)
|
||||
ITEM_TELEMETRY_RXBATT_LABEL,
|
||||
ITEM_TELEMETRY_RXBATT_ALARM1,
|
||||
@@ -5491,7 +5497,7 @@ enum menuModelTelemetryItems {
|
||||
|
||||
void menuModelTelemetry(uint8_t event)
|
||||
{
|
||||
MENU(STR_MENUTELEMETRY, menuTabModel, e_Telemetry, ITEM_TELEMETRY_MAX+1, {0, RXBATT_ROWS CHANNEL_ROWS, CHANNEL_ROWS, CASE_CPUARM(CHANNEL_ROWS) CASE_CPUARM(CHANNEL_ROWS) RSSI_ROWS, USRDATA_LINES 0, 0, IF_FAS_OFFSET(0) CASE_CPUARM(0) CASE_VARIO(LABEL(Vario)) CASE_VARIO(0) CASE_VARIO(VARIO_RANGE_ROWS) CASE_PCBTARANIS(LABEL(TopBar)) CASE_PCBTARANIS(0) SCREEN_TYPE_ROWS, 2, 2, 2, 2, SCREEN_TYPE_ROWS, 2, 2, 2, 2, CASE_CPUARM(SCREEN_TYPE_ROWS) CASE_CPUARM(2) CASE_CPUARM(2) CASE_CPUARM(2) CASE_CPUARM(2) });
|
||||
MENU(STR_MENUTELEMETRY, menuTabModel, e_Telemetry, ITEM_TELEMETRY_MAX+1, {0, CASE_CPUARM(0) RXBATT_ROWS CHANNEL_ROWS, CHANNEL_ROWS, CASE_CPUARM(CHANNEL_ROWS) CASE_CPUARM(CHANNEL_ROWS) RSSI_ROWS, USRDATA_LINES 0, 0, IF_FAS_OFFSET(0) CASE_CPUARM(0) CASE_VARIO(LABEL(Vario)) CASE_VARIO(0) CASE_VARIO(VARIO_RANGE_ROWS) CASE_PCBTARANIS(LABEL(TopBar)) CASE_PCBTARANIS(0) SCREEN_TYPE_ROWS, 2, 2, 2, 2, SCREEN_TYPE_ROWS, 2, 2, 2, 2, CASE_CPUARM(SCREEN_TYPE_ROWS) CASE_CPUARM(2) CASE_CPUARM(2) CASE_CPUARM(2) CASE_CPUARM(2)});
|
||||
|
||||
uint8_t sub = m_posVert - 1;
|
||||
|
||||
@@ -5525,7 +5531,15 @@ void menuModelTelemetry(uint8_t event)
|
||||
#endif
|
||||
FrSkyChannelData & channel = g_model.frsky.channels[ch];
|
||||
uint8_t dest = TELEM_A1-1+ch;
|
||||
|
||||
switch (k) {
|
||||
|
||||
#if defined(CPUARM)
|
||||
case ITEM_TELEMETRY_PROTOCOL_TYPE:
|
||||
g_model.telemetryProtocol = selectMenuItem(TELEM_COL2, y, "Telemetry Type", "\006S.PORTD\0 ", g_model.telemetryProtocol, PROTOCOL_FRSKY_SPORT, PROTOCOL_FRSKY_D, attr, event);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
case ITEM_TELEMETRY_RXBATT_LABEL:
|
||||
lcd_putsLeft(y, "RxBatt");
|
||||
|
||||
@@ -158,7 +158,7 @@ void displayVoltageScreenLine(uint8_t y, uint8_t index)
|
||||
}
|
||||
|
||||
#if LCD_W >= 212
|
||||
#define BAR_WIDTH 160
|
||||
#define BAR_WIDTH 150
|
||||
#else
|
||||
#define BAR_WIDTH 100
|
||||
#endif
|
||||
|
||||
@@ -990,14 +990,15 @@ void putsMixerSource(xcoord_t x, uint8_t y, uint8_t idx, LcdFlags att)
|
||||
#if defined(PCBTARANIS)
|
||||
else if (idx < MIXSRC_SW1)
|
||||
lcd_putsiAtt(x, y, STR_VSRCRAW, idx-MIXSRC_Rud+1, att);
|
||||
else if (idx <= MIXSRC_LAST_LOGICAL_SWITCH)
|
||||
putsSwitches(x, y, SWSRC_SW1+idx-MIXSRC_SW1, att);
|
||||
#else
|
||||
if (idx < MIXSRC_THR)
|
||||
lcd_putsiAtt(x, y, STR_VSRCRAW, idx, att);
|
||||
else if (idx < MIXSRC_FIRST_TRAINER)
|
||||
else if (idx < MIXSRC_SW1)
|
||||
putsSwitches(x, y, idx-MIXSRC_THR+1+3*(1/*+EXTRA_3POS*/), att);
|
||||
// TODO would perhaps save flash if those switches were in VSRCRAW
|
||||
#endif
|
||||
else if (idx <= MIXSRC_LAST_LOGICAL_SWITCH)
|
||||
putsSwitches(x, y, SWSRC_SW1+idx-MIXSRC_SW1, att);
|
||||
else if (idx < MIXSRC_CH1)
|
||||
putsStrIdx(x, y, STR_PPM_TRAINER, idx-MIXSRC_FIRST_TRAINER+1, att);
|
||||
else if (idx <= MIXSRC_LAST_CH) {
|
||||
|
||||
@@ -100,30 +100,28 @@ void _bootStart()
|
||||
bwdt_reset();
|
||||
}
|
||||
|
||||
if ((GPIOE->IDR & 0x00000008) == 0) {
|
||||
if ((GPIOC->IDR & 0x00000002) == 0) {
|
||||
// Bootloader needed
|
||||
const uint8_t *src;
|
||||
uint8_t *dest;
|
||||
uint32_t size;
|
||||
if (((GPIOC->IDR & 0x00000002) == 0) || ((GPIOE->IDR & 0x00000008) == 0)) {
|
||||
// Bootloader needed
|
||||
const uint8_t *src;
|
||||
uint8_t *dest;
|
||||
uint32_t size;
|
||||
|
||||
bwdt_reset();
|
||||
size = sizeof(BootCode);
|
||||
src = BootCode;
|
||||
dest = (uint8_t *) 0x20000000;
|
||||
|
||||
for (; size; size -= 1) {
|
||||
*dest++ = *src++;
|
||||
}
|
||||
// Could check for a valid copy to RAM here
|
||||
// Go execute bootloader
|
||||
bwdt_reset();
|
||||
|
||||
uint32_t address = *(uint32_t *) 0x20000004;
|
||||
|
||||
((void (*)(void)) (address))(); // Go execute the loaded application
|
||||
bwdt_reset();
|
||||
size = sizeof(BootCode);
|
||||
src = BootCode;
|
||||
dest = (uint8_t *) 0x20000000;
|
||||
|
||||
for (; size; size -= 1) {
|
||||
*dest++ = *src++;
|
||||
}
|
||||
// Could check for a valid copy to RAM here
|
||||
// Go execute bootloader
|
||||
bwdt_reset();
|
||||
|
||||
uint32_t address = *(uint32_t *) 0x20000004;
|
||||
|
||||
((void (*)(void)) (address))(); // Go execute the loaded application
|
||||
|
||||
}
|
||||
|
||||
// run_application() ;
|
||||
|
||||
@@ -921,48 +921,49 @@ int luaGetInputs(ScriptInternalData & sid)
|
||||
return -1;
|
||||
|
||||
sid.inputsCount = 0;
|
||||
for (lua_pushnil(L); lua_next(L, -2) && sid.inputsCount<MAX_SCRIPT_OUTPUTS; lua_pop(L, 1)) {
|
||||
for (lua_pushnil(L); lua_next(L, -2); lua_pop(L, 1)) {
|
||||
luaL_checktype(L, -2, LUA_TNUMBER); // key is number
|
||||
luaL_checktype(L, -1, LUA_TTABLE); // value is table
|
||||
uint8_t field = 0;
|
||||
for (lua_pushnil(L); lua_next(L, -2) && field<5; lua_pop(L, 1), field++) {
|
||||
switch (field) {
|
||||
case 0:
|
||||
luaL_checktype(L, -2, LUA_TNUMBER); // key is number
|
||||
luaL_checktype(L, -1, LUA_TSTRING); // value is string
|
||||
sid.inputs[sid.inputsCount].name = lua_tostring(L, -1);
|
||||
break;
|
||||
case 1:
|
||||
luaL_checktype(L, -2, LUA_TNUMBER); // key is number
|
||||
luaL_checktype(L, -1, LUA_TNUMBER); // value is number
|
||||
sid.inputs[sid.inputsCount].type = lua_tointeger(L, -1);
|
||||
if (sid.inputs[sid.inputsCount].type == 0) {
|
||||
sid.inputs[sid.inputsCount].min = -100;
|
||||
sid.inputs[sid.inputsCount].max = 100;
|
||||
}
|
||||
else {
|
||||
sid.inputs[sid.inputsCount].max = MIXSRC_LAST_TELEM;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
luaL_checktype(L, -2, LUA_TNUMBER); // key is number
|
||||
luaL_checktype(L, -1, LUA_TNUMBER); // value is number
|
||||
sid.inputs[sid.inputsCount].min = lua_tointeger(L, -1);
|
||||
break;
|
||||
case 3:
|
||||
luaL_checktype(L, -2, LUA_TNUMBER); // key is number
|
||||
luaL_checktype(L, -1, LUA_TNUMBER); // value is number
|
||||
sid.inputs[sid.inputsCount].max = lua_tointeger(L, -1);
|
||||
break;
|
||||
case 4:
|
||||
luaL_checktype(L, -2, LUA_TNUMBER); // key is number
|
||||
luaL_checktype(L, -1, LUA_TNUMBER); // value is number
|
||||
sid.inputs[sid.inputsCount].def = lua_tointeger(L, -1);
|
||||
break;
|
||||
if (sid.inputsCount<MAX_SCRIPT_INPUTS) {
|
||||
uint8_t field = 0;
|
||||
for (lua_pushnil(L); lua_next(L, -2) && field<5; lua_pop(L, 1), field++) {
|
||||
switch (field) {
|
||||
case 0:
|
||||
luaL_checktype(L, -2, LUA_TNUMBER); // key is number
|
||||
luaL_checktype(L, -1, LUA_TSTRING); // value is string
|
||||
sid.inputs[sid.inputsCount].name = lua_tostring(L, -1);
|
||||
break;
|
||||
case 1:
|
||||
luaL_checktype(L, -2, LUA_TNUMBER); // key is number
|
||||
luaL_checktype(L, -1, LUA_TNUMBER); // value is number
|
||||
sid.inputs[sid.inputsCount].type = lua_tointeger(L, -1);
|
||||
if (sid.inputs[sid.inputsCount].type == 0) {
|
||||
sid.inputs[sid.inputsCount].min = -100;
|
||||
sid.inputs[sid.inputsCount].max = 100;
|
||||
}
|
||||
else {
|
||||
sid.inputs[sid.inputsCount].max = MIXSRC_LAST_TELEM;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
luaL_checktype(L, -2, LUA_TNUMBER); // key is number
|
||||
luaL_checktype(L, -1, LUA_TNUMBER); // value is number
|
||||
sid.inputs[sid.inputsCount].min = lua_tointeger(L, -1);
|
||||
break;
|
||||
case 3:
|
||||
luaL_checktype(L, -2, LUA_TNUMBER); // key is number
|
||||
luaL_checktype(L, -1, LUA_TNUMBER); // value is number
|
||||
sid.inputs[sid.inputsCount].max = lua_tointeger(L, -1);
|
||||
break;
|
||||
case 4:
|
||||
luaL_checktype(L, -2, LUA_TNUMBER); // key is number
|
||||
luaL_checktype(L, -1, LUA_TNUMBER); // value is number
|
||||
sid.inputs[sid.inputsCount].def = lua_tointeger(L, -1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
sid.inputsCount++;
|
||||
}
|
||||
|
||||
sid.inputsCount++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -974,10 +975,12 @@ int luaGetOutputs(ScriptInternalData & sid)
|
||||
return -1;
|
||||
|
||||
sid.outputsCount = 0;
|
||||
for (lua_pushnil(L); lua_next(L, -2) && sid.outputsCount<MAX_SCRIPT_OUTPUTS; lua_pop(L, 1)) {
|
||||
for (lua_pushnil(L); lua_next(L, -2); lua_pop(L, 1)) {
|
||||
luaL_checktype(L, -2, LUA_TNUMBER); // key is number
|
||||
luaL_checktype(L, -1, LUA_TSTRING); // value is string
|
||||
sid.outputs[sid.outputsCount++].name = lua_tostring(L, -1);
|
||||
if (sid.outputsCount<MAX_SCRIPT_OUTPUTS) {
|
||||
sid.outputs[sid.outputsCount++].name = lua_tostring(L, -1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -154,19 +154,6 @@ getvalue_t div10_and_round(getvalue_t value)
|
||||
return value/10;
|
||||
}
|
||||
|
||||
|
||||
#if defined(FRSKY)
|
||||
uint16_t getChannelRatio(uint8_t channel)
|
||||
{
|
||||
return (uint16_t)g_model.frsky.channels[channel].ratio << g_model.frsky.channels[channel].multiplier;
|
||||
}
|
||||
|
||||
lcdint_t applyChannelRatio(uint8_t channel, lcdint_t val)
|
||||
{
|
||||
return ((int32_t)val+g_model.frsky.channels[channel].offset) * getChannelRatio(channel) * 2 / 51;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
double gpsToDouble(bool neg, int16_t bp, int16_t ap)
|
||||
{
|
||||
@@ -232,135 +219,3 @@ void getGpsDistance()
|
||||
frskyData.hub.maxGpsDistance = frskyData.hub.gpsDistance;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM) && defined(VARIO)
|
||||
|
||||
void varioWakeup()
|
||||
{
|
||||
if (isFunctionActive(FUNCTION_VARIO)) {
|
||||
int varioFreq, varioDuration, varioPause=0;
|
||||
uint8_t varioFlags;
|
||||
|
||||
int verticalSpeed = frskyData.hub.varioSpeed;
|
||||
|
||||
#if 0
|
||||
if (g_model.frsky.varioSource == VARIO_SOURCE_DTE) {
|
||||
#warning "Ele stick for vario tests"
|
||||
verticalSpeed = getValue(MIXSRC_Ele);
|
||||
}
|
||||
#endif
|
||||
|
||||
int varioCenterMin = (int)g_model.frsky.varioCenterMin * 10 - 50;
|
||||
int varioCenterMax = (int)g_model.frsky.varioCenterMax * 10 + 50;
|
||||
int varioMax = (10+(int)g_model.frsky.varioMax) * 100;
|
||||
int varioMin = (-10+(int)g_model.frsky.varioMin) * 100;
|
||||
|
||||
if (verticalSpeed > varioMax)
|
||||
verticalSpeed = varioMax;
|
||||
else if (verticalSpeed < varioMin)
|
||||
verticalSpeed = varioMin;
|
||||
|
||||
if (verticalSpeed > varioCenterMin) {
|
||||
varioFreq = VARIO_FREQUENCY_ZERO + (g_eeGeneral.varioPitch*10) + (((VARIO_FREQUENCY_RANGE+(g_eeGeneral.varioRange*10)) * (verticalSpeed-varioCenterMin)) / varioMax);
|
||||
int varioPeriod = VARIO_REPEAT_MAX + ((VARIO_REPEAT_ZERO+(g_eeGeneral.varioRepeat*10)-VARIO_REPEAT_MAX) * (varioMax-verticalSpeed) * (varioMax-verticalSpeed)) / ((varioMax-varioCenterMin) * (varioMax-varioCenterMin));
|
||||
if (verticalSpeed >= varioCenterMax || varioCenterMin == varioCenterMax)
|
||||
varioDuration = varioPeriod / 5;
|
||||
else
|
||||
varioDuration = varioPeriod * (85 - (((verticalSpeed-varioCenterMin) * 25) / (varioCenterMax-varioCenterMin))) / 100;
|
||||
varioPause = varioPeriod - varioDuration;
|
||||
varioFlags = PLAY_BACKGROUND;
|
||||
}
|
||||
else {
|
||||
varioFreq = VARIO_FREQUENCY_ZERO + (g_eeGeneral.varioPitch*10) - (((VARIO_FREQUENCY_ZERO+(g_eeGeneral.varioPitch*10)-((VARIO_FREQUENCY_ZERO + (g_eeGeneral.varioPitch*10))/2)) * (verticalSpeed-varioCenterMin)) / varioMin);
|
||||
varioDuration = 80; // continuous beep: we will enter again here before the tone ends
|
||||
varioFlags = PLAY_BACKGROUND|PLAY_NOW;
|
||||
}
|
||||
|
||||
AUDIO_VARIO(varioFreq, varioDuration, varioPause, varioFlags);
|
||||
}
|
||||
}
|
||||
|
||||
#elif defined(FRSKY) && defined(VARIO)
|
||||
|
||||
void varioWakeup()
|
||||
{
|
||||
static tmr10ms_t s_varioTmr;
|
||||
tmr10ms_t tmr10ms = get_tmr10ms();
|
||||
|
||||
if (isFunctionActive(FUNCTION_VARIO)) {
|
||||
#if defined(AUDIO)
|
||||
cli();
|
||||
int16_t verticalSpeed = frskyData.hub.varioSpeed;
|
||||
sei();
|
||||
|
||||
#if defined(PCBSTD)
|
||||
int16_t varioCenterMax = (int16_t)g_model.frsky.varioCenterMax * 10 + 50;
|
||||
if (verticalSpeed >= varioCenterMax) {
|
||||
verticalSpeed = verticalSpeed - varioCenterMax;
|
||||
int16_t varioMax = (10+(int16_t)g_model.frsky.varioMax) * 100;
|
||||
if (verticalSpeed > varioMax) verticalSpeed = varioMax;
|
||||
verticalSpeed = (verticalSpeed * 10) / ((varioMax-varioCenterMax) / 100);
|
||||
|
||||
if ((int16_t)(s_varioTmr-tmr10ms) < 0) {
|
||||
uint8_t varioFreq = (verticalSpeed * 10 + 16000) >> 8;
|
||||
uint8_t varioDuration = (1600 - verticalSpeed) / 100;
|
||||
s_varioTmr = tmr10ms + (varioDuration*2);
|
||||
AUDIO_VARIO(varioFreq, varioDuration);
|
||||
}
|
||||
}
|
||||
#else
|
||||
int varioCenterMin = (int)g_model.frsky.varioCenterMin * 10 - 50;
|
||||
int varioCenterMax = (int)g_model.frsky.varioCenterMax * 10 + 50;
|
||||
int varioMax = (10+(int)g_model.frsky.varioMax) * 100;
|
||||
int varioMin = (-10+(int)g_model.frsky.varioMin) * 100;
|
||||
|
||||
if (verticalSpeed < varioCenterMin || (verticalSpeed > varioCenterMax && (int16_t)(s_varioTmr - tmr10ms) < 0)) {
|
||||
if (verticalSpeed > varioMax)
|
||||
verticalSpeed = varioMax;
|
||||
else if (verticalSpeed < varioMin)
|
||||
verticalSpeed = varioMin;
|
||||
|
||||
uint8_t varioFreq, varioDuration;
|
||||
if (verticalSpeed > 0) {
|
||||
varioFreq = (verticalSpeed * 4 + 8000) >> 7;
|
||||
varioDuration = (8000 - verticalSpeed * 5) / 100;
|
||||
}
|
||||
else {
|
||||
varioFreq = (verticalSpeed * 3 + 8000) >> 7;
|
||||
varioDuration = 20;
|
||||
}
|
||||
s_varioTmr = tmr10ms + (varioDuration/2);
|
||||
AUDIO_VARIO(varioFreq, varioDuration);
|
||||
}
|
||||
#endif
|
||||
|
||||
#else // defined(AUDIO)
|
||||
|
||||
int8_t verticalSpeed = limit((int16_t)-100, (int16_t)(frskyData.hub.varioSpeed/10), (int16_t)+100);
|
||||
|
||||
uint16_t interval;
|
||||
if (verticalSpeed == 0) {
|
||||
interval = 300;
|
||||
}
|
||||
else {
|
||||
if (verticalSpeed < 0) {
|
||||
verticalSpeed = -verticalSpeed;
|
||||
warble = 1;
|
||||
}
|
||||
interval = (uint8_t)200 / verticalSpeed;
|
||||
}
|
||||
if (g_tmr10ms - s_varioTmr > interval) {
|
||||
s_varioTmr = g_tmr10ms;
|
||||
if (warble)
|
||||
AUDIO_VARIO_DOWN();
|
||||
else
|
||||
AUDIO_VARIO_UP();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
s_varioTmr = tmr10ms;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -62,11 +62,18 @@ int16_t ex_chans[NUM_CHNOUT] = {0}; // Outputs (before LIMITS) of the last perMa
|
||||
|
||||
#if defined(HELI)
|
||||
int16_t cyc_anas[3] = {0};
|
||||
#if defined(PCBTARANIS)
|
||||
int16_t heliAnas[4] = {0};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS)
|
||||
{
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(HELI)
|
||||
int16_t heliAnasCopy[4];
|
||||
memcpy(heliAnasCopy, heliAnas, sizeof(heliAnasCopy));
|
||||
#endif
|
||||
#else
|
||||
int16_t anas2[NUM_INPUTS]; // values before expo, to ensure same expo base when multiple expo lines are used
|
||||
memcpy(anas2, anas, sizeof(anas2));
|
||||
@@ -89,6 +96,12 @@ void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS)
|
||||
int v;
|
||||
if (ed->srcRaw == ovwrIdx)
|
||||
v = ovwrValue;
|
||||
#if defined(HELI)
|
||||
else if (ed->srcRaw == MIXSRC_Ele)
|
||||
v = heliAnasCopy[ELE_STICK];
|
||||
else if (ed->srcRaw == MIXSRC_Ail)
|
||||
v = heliAnasCopy[AIL_STICK];
|
||||
#endif
|
||||
else {
|
||||
v = getValue(ed->srcRaw);
|
||||
if (ed->srcRaw >= MIXSRC_FIRST_TELEM && ed->scale > 0) {
|
||||
@@ -136,6 +149,13 @@ void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS)
|
||||
virtualInputsTrims[cur_chn] = ed->srcRaw - MIXSRC_Rud;
|
||||
else
|
||||
virtualInputsTrims[cur_chn] = -1;
|
||||
|
||||
#if defined(HELI)
|
||||
if (ed->srcRaw == MIXSRC_Ele)
|
||||
heliAnas[ELE_STICK] = v;
|
||||
else if (ed->srcRaw == MIXSRC_Ail)
|
||||
heliAnas[AIL_STICK] = v;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
anas[cur_chn] = v;
|
||||
@@ -280,7 +300,6 @@ getvalue_t getValue(uint8_t i)
|
||||
else if (i==MIXSRC_SF) return (switchState(SW_SF0) ? -1024 : 1024);
|
||||
else if (i==MIXSRC_SG) return (switchState(SW_SG0) ? -1024 : (switchState(SW_SG1) ? 0 : 1024));
|
||||
else if (i==MIXSRC_SH) return (switchState(SW_SH0) ? -1024 : 1024);
|
||||
else if (i<=MIXSRC_LAST_LOGICAL_SWITCH) return getSwitch(SWSRC_FIRST_LOGICAL_SWITCH+i-MIXSRC_FIRST_LOGICAL_SWITCH) ? 1024 : -1024;
|
||||
#else
|
||||
else if (i==MIXSRC_3POS) return (getSwitch(SW_ID0-SW_BASE+1) ? -1024 : (getSwitch(SW_ID1-SW_BASE+1) ? 0 : 1024));
|
||||
// don't use switchState directly to give getSwitch possibility to hack values if needed for switch warning
|
||||
@@ -288,9 +307,9 @@ getvalue_t getValue(uint8_t i)
|
||||
else if (i==MIXSRC_3POS2) return (getSwitch(SW_ID3-SW_BASE+1) ? -1024 : (getSwitch(SW_ID4-SW_BASE+1) ? 0 : 1024));
|
||||
// don't use switchState directly to give getSwitch possibility to hack values if needed for switch warning
|
||||
#endif
|
||||
else if (i<=MIXSRC_LAST_LOGICAL_SWITCH) return getSwitch(SWSRC_THR+i-MIXSRC_THR) ? 1024 : -1024;
|
||||
else if (i<MIXSRC_SW1) return getSwitch(SWSRC_THR+i-MIXSRC_THR) ? 1024 : -1024;
|
||||
#endif
|
||||
|
||||
else if (i<=MIXSRC_LAST_LOGICAL_SWITCH) return getSwitch(SWSRC_FIRST_LOGICAL_SWITCH+i-MIXSRC_FIRST_LOGICAL_SWITCH) ? 1024 : -1024;
|
||||
else if (i<=MIXSRC_LAST_TRAINER) { int16_t x = g_ppmIns[i-MIXSRC_FIRST_TRAINER]; if (i<MIXSRC_FIRST_TRAINER+NUM_CAL_PPM) { x-= g_eeGeneral.trainer.calib[i-MIXSRC_FIRST_TRAINER]; } return x*2; }
|
||||
else if (i<=MIXSRC_LAST_CH) return ex_chans[i-MIXSRC_CH1];
|
||||
|
||||
@@ -477,6 +496,9 @@ void evalInputs(uint8_t mode)
|
||||
if (d && (ch==ELE_STICK || ch==AIL_STICK)) {
|
||||
v = (int32_t(v) * calc100toRESX(g_model.swashR.value)) / int32_t(d);
|
||||
}
|
||||
#if defined(PCBTARANIS)
|
||||
heliAnas[ch] = v;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(PCBTARANIS)
|
||||
@@ -501,7 +523,11 @@ void evalInputs(uint8_t mode)
|
||||
}
|
||||
}
|
||||
|
||||
#define HELI_ANAS_ARRAY anas
|
||||
#if defined(PCBTARANIS)
|
||||
#define HELI_ANAS_ARRAY heliAnas
|
||||
#else
|
||||
#define HELI_ANAS_ARRAY anas
|
||||
#endif
|
||||
|
||||
uint8_t s_current_mixer_flight_mode;
|
||||
void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
|
||||
|
||||
@@ -1693,11 +1693,17 @@ enum ThrottleSources {
|
||||
THROTTLE_SOURCE_CH1,
|
||||
};
|
||||
|
||||
enum TelemetryProtocol
|
||||
{
|
||||
PROTOCOL_FRSKY_SPORT,
|
||||
PROTOCOL_FRSKY_D,
|
||||
};
|
||||
|
||||
PACK(typedef struct t_ModelData {
|
||||
ModelHeader header;
|
||||
TimerData timers[MAX_TIMERS];
|
||||
AVR_FIELD(uint8_t protocol:3);
|
||||
ARM_FIELD(uint8_t spare:3);
|
||||
ARM_FIELD(uint8_t telemetryProtocol:3);
|
||||
uint8_t thrTrim:1; // Enable Throttle Trim
|
||||
AVR_FIELD(int8_t ppmNCH:4)
|
||||
ARM_FIELD(int8_t spare2:4)
|
||||
|
||||
@@ -2441,11 +2441,11 @@ void opentxClose()
|
||||
saveTimers();
|
||||
|
||||
#if defined(CPUARM) && defined(FRSKY)
|
||||
if ((g_model.frsky.mAhPersistent) && (g_model.frsky.storedMah != frskyData.hub.currentConsumption)) {
|
||||
if (g_model.frsky.mAhPersistent && g_model.frsky.storedMah!=frskyData.hub.currentConsumption) {
|
||||
g_model.frsky.storedMah = frskyData.hub.currentConsumption;
|
||||
eeDirty(EE_MODEL);
|
||||
}
|
||||
else if((!g_model.frsky.mAhPersistent) && (g_model.frsky.storedMah != 0)){
|
||||
else if (!g_model.frsky.mAhPersistent && g_model.frsky.storedMah!=0) {
|
||||
g_model.frsky.storedMah = 0;
|
||||
eeDirty(EE_MODEL);
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ void getSwitchesPosition(bool startup)
|
||||
switchesPos = newPos;
|
||||
|
||||
for (int i=0; i<NUM_XPOTS; i++) {
|
||||
if (g_eeGeneral.potsType & (1 << i)) {
|
||||
if (IS_POT_MULTIPOS(POT1+i)) {
|
||||
StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[POT1+i];
|
||||
if (calib->count>0 && calib->count<XPOTS_MULTIPOS_COUNT) {
|
||||
uint8_t pos = anaIn(POT1+i) / (2*RESX/calib->count);
|
||||
@@ -305,15 +305,29 @@ bool getLogicalSwitch(uint8_t idx)
|
||||
break;
|
||||
default:
|
||||
{
|
||||
if (LS_LAST_VALUE(s_current_mixer_flight_mode, idx) == CS_LAST_VALUE_INIT)
|
||||
if (LS_LAST_VALUE(s_current_mixer_flight_mode, idx) == CS_LAST_VALUE_INIT) {
|
||||
LS_LAST_VALUE(s_current_mixer_flight_mode, idx) = x;
|
||||
}
|
||||
int16_t diff = x - LS_LAST_VALUE(s_current_mixer_flight_mode, idx);
|
||||
if (ls->func == LS_FUNC_DIFFEGREATER)
|
||||
result = (y >= 0 ? (diff >= y) : (diff <= y));
|
||||
else
|
||||
bool update = false;
|
||||
if (ls->func == LS_FUNC_DIFFEGREATER) {
|
||||
if (y >= 0) {
|
||||
result = (diff >= y);
|
||||
if (diff < 0)
|
||||
update = true;
|
||||
}
|
||||
else {
|
||||
result = (diff <= y);
|
||||
if (diff > 0)
|
||||
update = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
result = (abs(diff) >= y);
|
||||
if (result)
|
||||
}
|
||||
if (result || update) {
|
||||
LS_LAST_VALUE(s_current_mixer_flight_mode, idx) = x;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -552,6 +566,11 @@ void checkSwitches()
|
||||
evalFlightModeMixes(e_perout_mode_normal, 0);
|
||||
bad_pots = 0;
|
||||
for (uint8_t i=0; i<NUM_POTS; i++) {
|
||||
#if !defined(REVPLUS)
|
||||
if (i == POT3-POT1) {
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (!(g_model.nPotsToWarn & (1 << i)) && (abs(g_model.potPosition[i] - GET_LOWRES_POT_POSITION(i)) > 1)) {
|
||||
warn = true;
|
||||
bad_pots |= (1<<i);
|
||||
@@ -596,6 +615,11 @@ void checkSwitches()
|
||||
}
|
||||
if (potMode) {
|
||||
for (uint8_t i=0; i<NUM_POTS; i++) {
|
||||
#if !defined(REVPLUS)
|
||||
if (i == POT3-POT1) {
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (!(g_model.nPotsToWarn & (1 << i))) {
|
||||
uint8_t flags = 0;
|
||||
if (abs(g_model.potPosition[i] - GET_LOWRES_POT_POSITION(i)) > 1) {
|
||||
|
||||
@@ -68,30 +68,9 @@ uint8_t frskyRxBufferCount = 0;
|
||||
FrskyData frskyData;
|
||||
|
||||
#if defined(CPUARM)
|
||||
enum TelemetryProtocol
|
||||
{
|
||||
PROTOCOL_NONE,
|
||||
PROTOCOL_FRSKY_D,
|
||||
PROTOCOL_FRSKY_SPORT,
|
||||
};
|
||||
|
||||
uint8_t telemetryProtocol = 255;
|
||||
#define IS_FRSKY_D_PROTOCOL() (telemetryProtocol == PROTOCOL_FRSKY_D)
|
||||
#define IS_FRSKY_SPORT_PROTOCOL() (telemetryProtocol == PROTOCOL_FRSKY_SPORT)
|
||||
|
||||
TelemetryProtocol telemetryProtocol = PROTOCOL_NONE;
|
||||
|
||||
TelemetryProtocol getTelemetryProtocol()
|
||||
{
|
||||
if (IS_MODULE_XJT(EXTERNAL_MODULE))
|
||||
return PROTOCOL_FRSKY_SPORT;
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
if (IS_MODULE_XJT(INTERNAL_MODULE))
|
||||
return PROTOCOL_FRSKY_SPORT;
|
||||
#endif
|
||||
|
||||
return PROTOCOL_FRSKY_D;
|
||||
}
|
||||
#else
|
||||
#define IS_FRSKY_D_PROTOCOL() (true)
|
||||
#define IS_FRSKY_SPORT_PROTOCOL() (false)
|
||||
@@ -144,6 +123,16 @@ void FrskyValueWithMinMax::set(uint8_t value, uint8_t unit)
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t getChannelRatio(uint8_t channel)
|
||||
{
|
||||
return (uint16_t)g_model.frsky.channels[channel].ratio << g_model.frsky.channels[channel].multiplier;
|
||||
}
|
||||
|
||||
lcdint_t applyChannelRatio(uint8_t channel, lcdint_t val)
|
||||
{
|
||||
return ((int32_t)val+g_model.frsky.channels[channel].offset) * getChannelRatio(channel) * 2 / 51;
|
||||
}
|
||||
|
||||
#if defined(CPUARM)
|
||||
inline bool rxBattAlarmRaised(uint8_t alarm)
|
||||
{
|
||||
@@ -291,9 +280,8 @@ enum AlarmsCheckSteps {
|
||||
void telemetryWakeup()
|
||||
{
|
||||
#if defined(CPUARM)
|
||||
TelemetryProtocol currentProtocol = getTelemetryProtocol();
|
||||
if (telemetryProtocol != currentProtocol) {
|
||||
telemetryProtocol = currentProtocol;
|
||||
if (telemetryProtocol != g_model.telemetryProtocol) {
|
||||
telemetryProtocol = g_model.telemetryProtocol;
|
||||
telemetryInit();
|
||||
}
|
||||
#endif
|
||||
@@ -590,13 +578,8 @@ void telemetryReset()
|
||||
|
||||
void telemetryInit(void)
|
||||
{
|
||||
#if defined(PCBTARANIS)
|
||||
if (IS_MODULE_XJT(INTERNAL_MODULE) || IS_MODULE_XJT(EXTERNAL_MODULE))
|
||||
telemetryPortInit(FRSKY_SPORT_BAUDRATE);
|
||||
else
|
||||
telemetryPortInit(FRSKY_D_BAUDRATE);
|
||||
#elif defined(PCBSKY9X)
|
||||
if (IS_MODULE_XJT(EXTERNAL_MODULE))
|
||||
#if defined(CPUARM)
|
||||
if (telemetryProtocol == PROTOCOL_FRSKY_SPORT)
|
||||
telemetryPortInit(FRSKY_SPORT_BAUDRATE);
|
||||
else
|
||||
telemetryPortInit(FRSKY_D_BAUDRATE);
|
||||
@@ -604,6 +587,9 @@ void telemetryInit(void)
|
||||
telemetryPortInit();
|
||||
#endif
|
||||
|
||||
// clear telemetry context
|
||||
#if 0
|
||||
// if we call telemetryReset() here we also reset the consumption after model load
|
||||
// right now I don't see why we call it here
|
||||
telemetryReset();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -871,7 +871,7 @@
|
||||
#define TR_ABOUT_KJELL_3 "OpenTX Recorder author"
|
||||
#define TR_ABOUT_KJELL_4 "Companion contributor"
|
||||
|
||||
#define TR_ABOUT_MARTIN_1 "Kjell Martin Hotar"
|
||||
#define TR_ABOUT_MARTIN_1 "Martin Hotar"
|
||||
#define TR_ABOUT_MARTIN_2 "Graphics designer"
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
|
||||
@@ -668,7 +668,7 @@
|
||||
#define TR_VARIO TR("Vario","Variomètre")
|
||||
#define TR_PITCH_AT_ZERO INDENT "Tonalité au zéro"
|
||||
#define TR_PITCH_AT_MAX INDENT "Tonalité au max"
|
||||
#define TR_REPEAT_AT_ZERO INDENT "Tonalité au zéro"
|
||||
#define TR_REPEAT_AT_ZERO INDENT "Intervalle au zéro"
|
||||
#define TR_SHUTDOWN "ARRET EN COURS"
|
||||
#define TR_BATT_CALIB "Calib. Batterie"
|
||||
#define TR_CURRENT_CALIB "Calib. Courant"
|
||||
|
||||
@@ -110,18 +110,18 @@
|
||||
#define TR_VBEEPCOUNTDOWN "NienteSuoni\0Voce\0 "
|
||||
|
||||
#define LEN_CURVE_TYPES "\010"
|
||||
#define TR_CURVE_TYPES "Standard""Personali\0"
|
||||
#define TR_CURVE_TYPES "Fisso\0 ""Modific."
|
||||
|
||||
#define LEN_RETA123 "\001"
|
||||
|
||||
#if defined(PCBTARANIS) || defined(REVX)
|
||||
#define TR_RETA123 "RETA123LR"
|
||||
#define TR_RETA123 "DEMA123SD"
|
||||
#elif defined(PCBSKY9X)
|
||||
#define TR_RETA123 "RETA123a"
|
||||
#define TR_RETA123 "DEMA123a"
|
||||
#elif defined(CPUM2560)
|
||||
#define TR_RETA123 "RETA123ab"
|
||||
#define TR_RETA123 "DEMA123ab"
|
||||
#else
|
||||
#define TR_RETA123 "RETA123"
|
||||
#define TR_RETA123 "DEMA123"
|
||||
#endif
|
||||
|
||||
#define LEN_VPROTOS "\006"
|
||||
@@ -169,7 +169,7 @@
|
||||
#define TR_VMLTPX2 "+=""*="":="
|
||||
|
||||
#define LEN_VMIXTRIMS "\003"
|
||||
#define TR_VMIXTRIMS "OFF""ON ""Rud""Ele""Thr""Ail"
|
||||
#define TR_VMIXTRIMS "OFF""ON ""Dir""Ele""Mot""Ale"
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_CSWTIMER "Timer"
|
||||
@@ -235,7 +235,7 @@
|
||||
#define TR_PLAY_VALUE "[LeggiValore]"
|
||||
#endif
|
||||
|
||||
#define TR_CFN_BG_MUSIC "BgMusic\0 ""BgMusic ||\0 "
|
||||
#define TR_CFN_BG_MUSIC "Musica Sf\0 ""Musica Sf ||\0"
|
||||
|
||||
#if defined(SDCARD)
|
||||
#define TR_SDCLOGS "SDCARD Logs\0 "
|
||||
@@ -246,7 +246,7 @@
|
||||
#ifdef GVARS
|
||||
#define TR_ADJUST_GVAR "Regola \0 "
|
||||
#else
|
||||
#define TR_ADJUST_GVAR "[RegolaGV]\0 "
|
||||
#define TR_ADJUST_GVAR "[RegolaVG]\0 "
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
@@ -258,30 +258,30 @@
|
||||
#define TR_CFN_RESERVE "[riserva] \0"
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_VFSWFUNC "Blocco\0 ""Maestro \0 ""Trim Instant ""Azzera\0 ""Set \0 " TR_ADJUST_GVAR "Volume\0 " TR_CFN_RESERVE TR_CFN_RESERVE TR_CFN_RESERVE TR_SOUND TR_PLAY_TRACK TR_PLAY_VALUE TR_CFN_RESERVE TR_CFN_RESERVE TR_CFN_RESERVE TR_CFN_BG_MUSIC TR_VVARIO TR_HAPTIC TR_SDCLOGS "Retroillum.\0 " TR_CFN_TEST
|
||||
#define TR_VFSWFUNC "Blocco\0 ""Maestro \0 ""Trim Instant.""Azzera\0 ""Set \0 " TR_ADJUST_GVAR "Volume\0 " TR_CFN_RESERVE TR_CFN_RESERVE TR_CFN_RESERVE TR_SOUND TR_PLAY_TRACK TR_PLAY_VALUE TR_CFN_RESERVE TR_CFN_RESERVE TR_CFN_RESERVE TR_CFN_BG_MUSIC TR_VVARIO TR_HAPTIC TR_SDCLOGS "Retroillum.\0 " TR_CFN_TEST
|
||||
#elif defined(PCBGRUVIN9X)
|
||||
#define TR_VFSWFUNC "Blocco\0 ""Maestro \0 ""Trim Instant ""Azzera\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC TR_SDCLOGS "Retroillum.\0 " TR_CFN_TEST
|
||||
#define TR_VFSWFUNC "Blocco\0 ""Maestro \0 ""Trim Instant.""Azzera\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC TR_SDCLOGS "Retroillum.\0 " TR_CFN_TEST
|
||||
#else
|
||||
#define TR_VFSWFUNC "Blocco\0 ""Maestro \0 ""Trim Instant ""Azzera\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC "Retroillum.\0 " TR_CFN_TEST
|
||||
#define TR_VFSWFUNC "Blocco\0 ""Maestro \0 ""Trim Instant.""Azzera\0 " TR_ADJUST_GVAR TR_SOUND TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE TR_VVARIO TR_HAPTIC "Retroillum.\0 " TR_CFN_TEST
|
||||
#endif
|
||||
|
||||
#define LEN_VFSWRESET TR("\004", "\011")
|
||||
|
||||
#if defined(FRSKY)
|
||||
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetria")
|
||||
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetr.")
|
||||
#else
|
||||
#define TR_FSW_RESET_TELEM
|
||||
#endif
|
||||
|
||||
#if ROTARY_ENCODERS == 2
|
||||
#define TR_FSW_RESET_ROTENC TR("REa\0""REb\0", "RotEnc A\0""RotEnc B\0")
|
||||
#define TR_FSW_RESET_ROTENC TR("REa\0""REb\0", "EncRot A\0""EncRot B\0")
|
||||
#elif ROTARY_ENCODERS == 1
|
||||
#define TR_FSW_RESET_ROTENC TR("R.E.", "RotEnc\0 ")
|
||||
#define TR_FSW_RESET_ROTENC TR("R.E.", "EncRot\0 ")
|
||||
#else
|
||||
#define TR_FSW_RESET_ROTENC
|
||||
#endif
|
||||
|
||||
#define TR_VFSWRESET TR("Tmr1""Tmr2""All\0" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, "Timer 1\0 ""Timer 2\0 ""All\0 " TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC)
|
||||
#define TR_VFSWRESET TR("Tmr1""Tmr2""All\0" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, "Timer 1\0 ""Timer 2\0 ""Tutto\0 " TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC)
|
||||
|
||||
#define LEN_FUNCSOUNDS TR("\004", "\006")
|
||||
#define TR_FUNCSOUNDS TR("Bp1\0""Bp2\0""Bp3\0""Wrn1""Wrn2""Chee""Rata""Tick""Sirn""Ring""SciF""Robt""Chrp""Tada""Crck""Alrm", "Beep1 ""Beep2 ""Beep3 ""Warn1 ""Warn2 ""Cheep ""Ratata""Tick ""Siren ""Ring ""SciFi ""Robot ""Chirp ""Tada ""Crickt""AlmClk")
|
||||
@@ -290,9 +290,9 @@
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE TR("[--]", "[---]")
|
||||
#define TR_TELEM_TIME TR("Time", "Time\0")
|
||||
#define TR_TELEM_TIME TR("Ora\0", "Ora\0 ")
|
||||
#define TR_SWR TR("SWR\0", "SWR\0 ")
|
||||
#define TR_RX_BATT TR("RxBt", "RxBat")
|
||||
#define TR_RX_BATT TR("RxBt", "BatRx")
|
||||
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
|
||||
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
|
||||
#else
|
||||
@@ -313,9 +313,9 @@
|
||||
#endif
|
||||
|
||||
#if LCD_W >= 212
|
||||
#define TR_VTELEMCHNS "---\0 ""Batt\0" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Tmr1\0""Tmr2\0" TR_SWR "Tx\0 " TR_TELEM_RSSI_RX TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0 ""Rpm\0 ""Fuel\0""T1\0 ""T2\0 ""Spd\0 ""Dist\0""GAlt\0""Cell\0""Cells""Vfas\0""Curr\0""Cnsp\0""Powr\0""AccX\0""AccY\0""AccZ\0""Hdg\0 ""VSpd\0""ASpd\0""dTE\0 " TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0 ""A2-\0 " TR_A3_A4_MIN "Alt-\0""Alt+\0""Rpm+\0""T1+\0 ""T2+\0 ""Spd+\0""Dst+\0" TR_ASPD_MAX "Cell-""Cels-""Vfas-""Curr+""Powr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0 ""Time\0"
|
||||
#define TR_VTELEMCHNS "---\0 ""Batt\0" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Tmr1\0""Tmr2\0" TR_SWR "Tx\0 " TR_TELEM_RSSI_RX TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0 ""Rpm\0 ""Fuel\0""T1\0 ""T2\0 ""Spd\0 ""Dist\0""GAlt\0""Cell\0""Celle""Vfas\0""Curr\0""Cnsp\0""Powr\0""AccX\0""AccY\0""AccZ\0""Hdg\0 ""VSpd\0""ASpd\0""dTE\0 " TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0 ""A2-\0 " TR_A3_A4_MIN "Alt-\0""Alt+\0""Rpm+\0""T1+\0 ""T2+\0 ""Spd+\0""Dst+\0" TR_ASPD_MAX "Cell-""Cels-""Vfas-""Curr+""Powr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0 ""Ora\0 "
|
||||
#else
|
||||
#define TR_VTELEMCHNS "---\0""Batt" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Tmr1""Tmr2" TR_SWR "Tx\0 " TR_TELEM_RSSI_RX TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Time"
|
||||
#define TR_VTELEMCHNS "---\0""Batt" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Tmr1""Tmr2" TR_SWR "Tx\0 " TR_TELEM_RSSI_RX TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Ora\0"
|
||||
#endif
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
@@ -346,7 +346,7 @@
|
||||
#define STR_A (STR_VTELEMUNIT+4)
|
||||
|
||||
#define LEN_VALARM "\003"
|
||||
#define TR_VALARM "---""Yel""Org""Red"
|
||||
#define TR_VALARM "---""Gia""Ara""Ros"
|
||||
|
||||
#define LEN_VALARMFN "\001"
|
||||
#define TR_VALARMFN "<>"
|
||||
@@ -356,12 +356,12 @@
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define LEN_AMPSRC TR("\003", "\007")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Celle\0 ")
|
||||
#define LEN_VOLTSRC TR("\003", "\007")
|
||||
#define TR_VOLTSRC TR("RxV""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "RxBatt\0""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
|
||||
#define TR_VOLTSRC TR("RxV""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "BattRx\0""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Celle\0 ")
|
||||
#else
|
||||
#define LEN_AMPSRC TR("\003", "\007")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells\0 ")
|
||||
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Celle\0 ")
|
||||
#endif
|
||||
|
||||
#define LEN_VARIOSRC "\005"
|
||||
@@ -371,21 +371,21 @@
|
||||
#define TR_VARIOSRC "Alti\0""Alti+""Vario""A1\0 ""A2\0"
|
||||
#endif
|
||||
|
||||
#define LEN_VSCREEN "\004"
|
||||
#define TR_VSCREEN "Nums""Bars"
|
||||
#define LEN_VSCREEN "\006"
|
||||
#define TR_VSCREEN "Valori""Barre "
|
||||
|
||||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "HMS NMEA"
|
||||
|
||||
#define LEN2_VTEMPLATES 13
|
||||
#define LEN_VTEMPLATES "\015"
|
||||
#define TR_VTEMPLATES "Canc. Mixes\0 ""Semplice 4CH\0""Sticky-T-Cut\0""V-Tail \0""Elevoni\0 ""Delta\0 ""eCCPM\0 ""Heli Setup\0 ""Test Servo\0 "
|
||||
#define TR_VTEMPLATES "Canc. Mixes\0 ""Semplice 4CH\0""Sticky-T-Cut\0""Coda-V \0""Elevoni\0 ""Delta\0 ""eCCPM\0 ""Setup Heli\0 ""Test Servo\0 "
|
||||
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0"
|
||||
|
||||
#define LEN_VKEYS "\005"
|
||||
#define TR_VKEYS TR("Menù\0""EXIT\0""DN\0 ""UP\0 ""SX\0 ""DX\0 ", "Menu\0""Exit\0""Enter""Page\0""Più\0 ""Meno")
|
||||
#define TR_VKEYS TR("Menù\0""EXIT\0""DN\0 ""UP\0 ""SX\0 ""DX\0 ", "Menu\0""Esci\0""Enter""Pag.\0""Più\0 ""Meno")
|
||||
|
||||
#define LEN_VRENCODERS "\003"
|
||||
#define TR_VRENCODERS "REa""REb"
|
||||
@@ -442,7 +442,7 @@
|
||||
#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]"
|
||||
#endif
|
||||
|
||||
#define TR_VSRCRAW "---\0""Rud\0""Ele\0""Thr\0""Ail\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmR" "TrmE" "TrmT" "TrmA" TR_SW_VSRCRAW
|
||||
#define TR_VSRCRAW "---\0""Dir\0""Ele\0""Mot\0""Ale\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmD" "TrmE" "TrmM" "TrmA" TR_SW_VSRCRAW
|
||||
|
||||
#define LEN_VTMRMODES "\003"
|
||||
#define TR_VTMRMODES "OFF""ABS""THs""TH%""THt"
|
||||
@@ -450,7 +450,7 @@
|
||||
#define LEN_VTRAINERMODES "\007"
|
||||
#define TR_VTRAINERMODES "Maestro""Allievo"
|
||||
|
||||
#define LEN_VFAILSAFE "\012"
|
||||
#define LEN_VFAILSAFE "\013"
|
||||
#define TR_VFAILSAFE "Mantieni\0 ""Personali\0 ""No impulsi\0""Ricevente\0 "
|
||||
|
||||
#if defined(MAVLINK)
|
||||
@@ -486,7 +486,7 @@
|
||||
#define TR_MODELNAME "Nome modello"
|
||||
#define TR_PHASENAME "Nome fase"
|
||||
#define TR_MIXNAME "Nome mix"
|
||||
#define TR_INPUTNAME "Nome Input"
|
||||
#define TR_INPUTNAME "Nome Ingr."
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_EXPONAME "Nome expo"
|
||||
#else
|
||||
@@ -562,9 +562,9 @@
|
||||
#define TR_INACTIVITYALARM INDENT"Inattivita'"
|
||||
#define TR_MEMORYWARNING INDENT"Avviso memoria"
|
||||
#define TR_ALARMWARNING INDENT"Spegni suono"
|
||||
#define TR_RENAVIG "Navig RotEnc "
|
||||
#define TR_RENAVIG "Navig EncRot "
|
||||
#define TR_THROTTLE_LABEL "Motore"
|
||||
#define TR_THROTTLEREVERSE TR("Thr inv.", INDENT "Motore Inverso")
|
||||
#define TR_THROTTLEREVERSE TR("Mot inv.", INDENT "Motore Inverso")
|
||||
#define TR_MINUTEBEEP INDENT"Minuto"
|
||||
#define TR_BEEPCOUNTDOWN TR(INDENT"Conto rov",INDENT"Conto rovescia")
|
||||
#define TR_PERSISTENT TR(INDENT"Persist.",INDENT"Persistente")
|
||||
@@ -588,7 +588,7 @@
|
||||
#define TR_MENUTOSTART CENTER"\011" TR_ENTER " per Cal."
|
||||
#define TR_SETMIDPOINT CENTER"\012SETTA CENTRO"
|
||||
#define TR_MOVESTICKSPOTS CENTER"\010MUOVI STICK/POT"
|
||||
#define TR_RXBATT "Rx Batt:"
|
||||
#define TR_RXBATT "Batt Rx:"
|
||||
#define TR_TXnRX "Tx:\0Rx:"
|
||||
#define OFS_RX 4
|
||||
#define TR_ACCEL "Acc:"
|
||||
@@ -658,7 +658,7 @@
|
||||
#define TR_MENUTEMPLATES "ESEMPI GUIDA"
|
||||
#define TR_MENUSTAT "STATO"
|
||||
#define TR_MENUDEBUG "DEBUG"
|
||||
#define TR_RXNUM "RxNum"
|
||||
#define TR_RXNUM "NumRx"
|
||||
#define TR_SYNCMENU TR("Sinc.","Sinc.[Menù]")
|
||||
#define TR_LIMIT "Limiti"
|
||||
#define TR_MINRSSI "Min Rssi"
|
||||
@@ -689,8 +689,8 @@
|
||||
#define TR_EEPROM_CONVERTING "Conversione EEPROM"
|
||||
#define TR_THROTTLEWARN "MOTORE"
|
||||
#define TR_ALARMSWARN "ALLARMI"
|
||||
#define TR_SWITCHWARN "INTERRUTTORI"
|
||||
#define TR_INVERT_THR "Inverti Thr?"
|
||||
#define TR_SWITCHWARN "CONTROLLI"
|
||||
#define TR_INVERT_THR "Inverti Mot?"
|
||||
#define TR_SPEAKER_VOLUME "Volume Audio"
|
||||
#define TR_LCD "LCD"
|
||||
#define TR_BRIGHTNESS INDENT "Luminosità"
|
||||
@@ -794,7 +794,7 @@
|
||||
#define TR_COUNT "Punti"
|
||||
#define TR_PT "pt"
|
||||
#define TR_PTS "pti"
|
||||
#define TR_SMOOTH "Smorza"
|
||||
#define TR_SMOOTH "Smussa"
|
||||
#define TR_COPY_TRIMS_TO_OFS "Copia Trim su Offset"
|
||||
#define TR_PERSISTENT_MAH INDENT "Memo mAh"
|
||||
#define TR_PREFLIGHT "Controlli Prevolo"
|
||||
@@ -898,7 +898,7 @@
|
||||
#define TR_BEEP_VOLUME "Volume Beep"
|
||||
#define TR_WAV_VOLUME "Volume Wav"
|
||||
#define TR_VARIO_VOLUME "Volume Vario"
|
||||
#define TR_BG_VOLUME "Volume Bg"
|
||||
#define TR_BG_VOLUME "Volume Sf"
|
||||
|
||||
#define TR_TOP_BAR "Barra sup."
|
||||
#define TR_ALTITUDE INDENT "Altitudine"
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
/*
|
||||
* Authors (alphabetical order)
|
||||
* - Andre Bernet <bernet.andre@gmail.com>
|
||||
* - Andreas Weitl
|
||||
* - Bertrand Songis <bsongis@gmail.com>
|
||||
* - Bryan J. Rentoul (Gruvin) <gruvin@gmail.com>
|
||||
* - Cameron Weeks <th9xer@gmail.com>
|
||||
* - Erez Raviv
|
||||
* - Gabriel Birkus
|
||||
* - Jean-Pierre Parisy
|
||||
* - Karl Szmutny
|
||||
* - Michael Blandford
|
||||
* - Michal Hlavinka
|
||||
* - Pat Mackenzie
|
||||
* - Philip Moss
|
||||
* - Rob Thomson
|
||||
* - Romolo Manfredini <romolo.manfredini@gmail.com>
|
||||
* - Thomas Husterer
|
||||
*
|
||||
* opentx is based on code named
|
||||
* gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
|
||||
* er9x by Erez Raviv: http://code.google.com/p/er9x/,
|
||||
* and the original (and ongoing) project by
|
||||
* Thomas Husterer, th9x: http://code.google.com/p/th9x/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
|
||||
#if defined(CPUARM)
|
||||
|
||||
void varioWakeup()
|
||||
{
|
||||
if (isFunctionActive(FUNCTION_VARIO)) {
|
||||
int varioFreq, varioDuration, varioPause=0;
|
||||
uint8_t varioFlags;
|
||||
|
||||
int verticalSpeed = frskyData.hub.varioSpeed;
|
||||
|
||||
#if 0
|
||||
if (g_model.frsky.varioSource == VARIO_SOURCE_DTE) {
|
||||
#warning "Ele stick for vario tests"
|
||||
verticalSpeed = getValue(MIXSRC_Ele);
|
||||
}
|
||||
#endif
|
||||
|
||||
int varioCenterMin = (int)g_model.frsky.varioCenterMin * 10 - 50;
|
||||
int varioCenterMax = (int)g_model.frsky.varioCenterMax * 10 + 50;
|
||||
int varioMax = (10+(int)g_model.frsky.varioMax) * 100;
|
||||
int varioMin = (-10+(int)g_model.frsky.varioMin) * 100;
|
||||
|
||||
if (verticalSpeed > varioMax)
|
||||
verticalSpeed = varioMax;
|
||||
else if (verticalSpeed < varioMin)
|
||||
verticalSpeed = varioMin;
|
||||
|
||||
if (verticalSpeed > varioCenterMin) {
|
||||
varioFreq = VARIO_FREQUENCY_ZERO + (g_eeGeneral.varioPitch*10) + (((VARIO_FREQUENCY_RANGE+(g_eeGeneral.varioRange*10)) * (verticalSpeed-varioCenterMin)) / varioMax);
|
||||
int varioPeriod = VARIO_REPEAT_MAX + ((VARIO_REPEAT_ZERO+(g_eeGeneral.varioRepeat*10)-VARIO_REPEAT_MAX) * (varioMax-verticalSpeed) * (varioMax-verticalSpeed)) / ((varioMax-varioCenterMin) * (varioMax-varioCenterMin));
|
||||
if (verticalSpeed >= varioCenterMax || varioCenterMin == varioCenterMax)
|
||||
varioDuration = varioPeriod / 5;
|
||||
else
|
||||
varioDuration = varioPeriod * (85 - (((verticalSpeed-varioCenterMin) * 25) / (varioCenterMax-varioCenterMin))) / 100;
|
||||
varioPause = varioPeriod - varioDuration;
|
||||
varioFlags = PLAY_BACKGROUND;
|
||||
}
|
||||
else {
|
||||
varioFreq = VARIO_FREQUENCY_ZERO + (g_eeGeneral.varioPitch*10) - (((VARIO_FREQUENCY_ZERO+(g_eeGeneral.varioPitch*10)-((VARIO_FREQUENCY_ZERO + (g_eeGeneral.varioPitch*10))/2)) * (verticalSpeed-varioCenterMin)) / varioMin);
|
||||
varioDuration = 80; // continuous beep: we will enter again here before the tone ends
|
||||
varioFlags = PLAY_BACKGROUND|PLAY_NOW;
|
||||
}
|
||||
|
||||
AUDIO_VARIO(varioFreq, varioDuration, varioPause, varioFlags);
|
||||
}
|
||||
}
|
||||
|
||||
#elif defined(FRSKY)
|
||||
|
||||
void varioWakeup()
|
||||
{
|
||||
static tmr10ms_t s_varioTmr;
|
||||
tmr10ms_t tmr10ms = get_tmr10ms();
|
||||
|
||||
if (isFunctionActive(FUNCTION_VARIO)) {
|
||||
#if defined(AUDIO)
|
||||
cli();
|
||||
int16_t verticalSpeed = frskyData.hub.varioSpeed;
|
||||
sei();
|
||||
|
||||
#if defined(PCBSTD)
|
||||
int16_t varioCenterMax = (int16_t)g_model.frsky.varioCenterMax * 10 + 50;
|
||||
if (verticalSpeed >= varioCenterMax) {
|
||||
verticalSpeed = verticalSpeed - varioCenterMax;
|
||||
int16_t varioMax = (10+(int16_t)g_model.frsky.varioMax) * 100;
|
||||
if (verticalSpeed > varioMax) verticalSpeed = varioMax;
|
||||
verticalSpeed = (verticalSpeed * 10) / ((varioMax-varioCenterMax) / 100);
|
||||
|
||||
if ((int16_t)(s_varioTmr-tmr10ms) < 0) {
|
||||
uint8_t varioFreq = (verticalSpeed * 10 + 16000) >> 8;
|
||||
uint8_t varioDuration = (1600 - verticalSpeed) / 100;
|
||||
s_varioTmr = tmr10ms + (varioDuration*2);
|
||||
AUDIO_VARIO(varioFreq, varioDuration);
|
||||
}
|
||||
}
|
||||
#else
|
||||
int varioCenterMin = (int)g_model.frsky.varioCenterMin * 10 - 50;
|
||||
int varioCenterMax = (int)g_model.frsky.varioCenterMax * 10 + 50;
|
||||
int varioMax = (10+(int)g_model.frsky.varioMax) * 100;
|
||||
int varioMin = (-10+(int)g_model.frsky.varioMin) * 100;
|
||||
|
||||
if (verticalSpeed < varioCenterMin || (verticalSpeed > varioCenterMax && (int16_t)(s_varioTmr - tmr10ms) < 0)) {
|
||||
if (verticalSpeed > varioMax)
|
||||
verticalSpeed = varioMax;
|
||||
else if (verticalSpeed < varioMin)
|
||||
verticalSpeed = varioMin;
|
||||
|
||||
uint8_t varioFreq, varioDuration;
|
||||
if (verticalSpeed > 0) {
|
||||
varioFreq = (verticalSpeed * 4 + 8000) >> 7;
|
||||
varioDuration = (8000 - verticalSpeed * 5) / 100;
|
||||
}
|
||||
else {
|
||||
varioFreq = (verticalSpeed * 3 + 8000) >> 7;
|
||||
varioDuration = 20;
|
||||
}
|
||||
s_varioTmr = tmr10ms + (varioDuration/2);
|
||||
AUDIO_VARIO(varioFreq, varioDuration);
|
||||
}
|
||||
#endif
|
||||
|
||||
#else // defined(AUDIO)
|
||||
|
||||
int8_t verticalSpeed = limit((int16_t)-100, (int16_t)(frskyData.hub.varioSpeed/10), (int16_t)+100);
|
||||
|
||||
uint16_t interval;
|
||||
if (verticalSpeed == 0) {
|
||||
interval = 300;
|
||||
}
|
||||
else {
|
||||
if (verticalSpeed < 0) {
|
||||
verticalSpeed = -verticalSpeed;
|
||||
warble = 1;
|
||||
}
|
||||
interval = (uint8_t)200 / verticalSpeed;
|
||||
}
|
||||
if (g_tmr10ms - s_varioTmr > interval) {
|
||||
s_varioTmr = g_tmr10ms;
|
||||
if (warble)
|
||||
AUDIO_VARIO_DOWN();
|
||||
else
|
||||
AUDIO_VARIO_UP();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
s_varioTmr = tmr10ms;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
@@ -0,0 +1,306 @@
|
||||
-- Multicopter Wizard pages
|
||||
local THROTTLE_PAGE = 0
|
||||
local ROLL_PAGE = 1
|
||||
local PITCH_PAGE = 2
|
||||
local YAW_PAGE = 3
|
||||
local CONFIRMATION_PAGE = 4
|
||||
|
||||
-- Navigation variables
|
||||
local page = THROTTLE_PAGE
|
||||
local dirty = true
|
||||
local edit = false
|
||||
local field = 0
|
||||
local fieldsMax = 0
|
||||
local comboBoxMode = 0 -- Scrap variable
|
||||
|
||||
-- Model settings
|
||||
local thrCH1 = 0
|
||||
local rollCH1 = 0
|
||||
local yawCH1 = 0
|
||||
local pitchCH1 = 0
|
||||
|
||||
-- Common functions
|
||||
local lastBlink = 0
|
||||
local function blinkChanged()
|
||||
local time = getTime() % 128
|
||||
local blink = (time - time % 64) / 64
|
||||
if blink ~= lastBlink then
|
||||
lastBlink = blink
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
local function fieldIncDec(event, value, max, force)
|
||||
if edit or force==true then
|
||||
if event == EVT_PLUS_BREAK then
|
||||
value = (value + max)
|
||||
dirty = true
|
||||
elseif event == EVT_MINUS_BREAK then
|
||||
value = (value + max + 2)
|
||||
dirty = true
|
||||
end
|
||||
value = (value % (max+1))
|
||||
end
|
||||
return value
|
||||
end
|
||||
|
||||
local function valueIncDec(event, value, min, max)
|
||||
if edit then
|
||||
if event == EVT_PLUS_FIRST or event == EVT_PLUS_REPT then
|
||||
if value < max then
|
||||
value = (value + 1)
|
||||
dirty = true
|
||||
end
|
||||
elseif event == EVT_MINUS_FIRST or event == EVT_MINUS_REPT then
|
||||
if value > min then
|
||||
value = (value - 1)
|
||||
dirty = true
|
||||
end
|
||||
end
|
||||
end
|
||||
return value
|
||||
end
|
||||
|
||||
local function navigate(event, fieldMax, prevPage, nextPage)
|
||||
if event == EVT_ENTER_BREAK then
|
||||
edit = not edit
|
||||
dirty = true
|
||||
elseif edit then
|
||||
if event == EVT_EXIT_BREAK then
|
||||
edit = false
|
||||
dirty = true
|
||||
elseif not dirty then
|
||||
dirty = blinkChanged()
|
||||
end
|
||||
else
|
||||
if event == EVT_PAGE_BREAK then
|
||||
page = nextPage
|
||||
field = 0
|
||||
dirty = true
|
||||
elseif event == EVT_PAGE_LONG then
|
||||
page = prevPage
|
||||
field = 0
|
||||
killEvents(event);
|
||||
dirty = true
|
||||
else
|
||||
field = fieldIncDec(event, field, fieldMax, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function getFieldFlags(position)
|
||||
flags = 0
|
||||
if field == position then
|
||||
flags = INVERS
|
||||
if edit then
|
||||
flags = INVERS + BLINK
|
||||
end
|
||||
end
|
||||
return flags
|
||||
end
|
||||
|
||||
local function channelIncDec(event, value)
|
||||
if not edit and event==EVT_MENU_BREAK then
|
||||
servoPage = value
|
||||
dirty = true
|
||||
else
|
||||
value = valueIncDec(event, value, 0, 15)
|
||||
end
|
||||
return value
|
||||
end
|
||||
|
||||
-- Init function
|
||||
local function init()
|
||||
thrCH1 = defaultChannel(2)
|
||||
rollCH1 = defaultChannel(3)
|
||||
yawCH1 = defaultChannel(0)
|
||||
pitchCH1 = defaultChannel(1)
|
||||
end
|
||||
|
||||
-- Throttle Menu
|
||||
local function drawThrottleMenu()
|
||||
lcd.clear()
|
||||
lcd.drawText(1, 0, "Select multicopter throttle channel", 0)
|
||||
lcd.drawFilledRectangle(0, 0, LCD_W, 8, GREY_DEFAULT+FILL_WHITE)
|
||||
lcd.drawCombobox(0, 8, LCD_W/2, {"..."}, comboBoxMode, getFieldFlags(1))
|
||||
lcd.drawLine(LCD_W/2-1, 18, LCD_W/2-1, LCD_H, DOTTED, 0)
|
||||
lcd.drawPixmap(120, 8, "multi-thr.bmp")
|
||||
lcd.drawText(20, LCD_H-16, "Assign Throttle", 0);
|
||||
lcd.drawText(20, LCD_H-8, "Channel", 0);
|
||||
lcd.drawText(LCD_W/2-19, LCD_H-8, ">>>", 0);
|
||||
lcd.drawSource(113, LCD_H-8, MIXSRC_CH1+thrCH1, getFieldFlags(0))
|
||||
fieldsMax = 0
|
||||
end
|
||||
|
||||
local function throttleMenu(event)
|
||||
if dirty then
|
||||
dirty = false
|
||||
drawThrottleMenu()
|
||||
end
|
||||
navigate(event, fieldsMax, page, page+1)
|
||||
thrCH1 = channelIncDec(event, thrCH1)
|
||||
end
|
||||
|
||||
-- Roll Menu
|
||||
local function drawRollMenu()
|
||||
lcd.clear()
|
||||
lcd.drawText(1, 0, "Select multicopter roll channel", 0)
|
||||
lcd.drawFilledRectangle(0, 0, LCD_W, 8, GREY_DEFAULT+FILL_WHITE)
|
||||
lcd.drawCombobox(0, 8, LCD_W/2, {"..."}, comboBoxMode, getFieldFlags(1))
|
||||
lcd.drawLine(LCD_W/2-1, 18, LCD_W/2-1, LCD_H, DOTTED, 0)
|
||||
lcd.drawPixmap(120, 8, "multi-roll.bmp")
|
||||
lcd.drawText(20, LCD_H-16, "Assign Roll", 0);
|
||||
lcd.drawText(20, LCD_H-8, "Channel", 0);
|
||||
lcd.drawText(LCD_W/2-19, LCD_H-8, ">>>", 0);
|
||||
lcd.drawSource(113, LCD_H-8, MIXSRC_CH1+rollCH1, getFieldFlags(0))
|
||||
fieldsMax = 0
|
||||
end
|
||||
|
||||
local function rollMenu(event)
|
||||
if dirty then
|
||||
dirty = false
|
||||
drawRollMenu()
|
||||
end
|
||||
navigate(event, fieldsMax, page-1, page+1)
|
||||
rollCH1 = channelIncDec(event, rollCH1)
|
||||
end
|
||||
|
||||
-- Pitch Menu
|
||||
local function drawPitchMenu()
|
||||
lcd.clear()
|
||||
lcd.drawText(1, 0, "Select multicopter pitch channel", 0)
|
||||
lcd.drawFilledRectangle(0, 0, LCD_W, 8, GREY_DEFAULT+FILL_WHITE)
|
||||
lcd.drawCombobox(0, 8, LCD_W/2, {"..."}, comboBoxMode, getFieldFlags(1))
|
||||
lcd.drawLine(LCD_W/2-1, 18, LCD_W/2-1, LCD_H, DOTTED, 0)
|
||||
lcd.drawPixmap(120, 8, "multi-pitch.bmp")
|
||||
lcd.drawText(20, LCD_H-16, "Assign Pitch", 0);
|
||||
lcd.drawText(20, LCD_H-8, "Channel", 0);
|
||||
lcd.drawText(LCD_W/2-19, LCD_H-8, ">>>", 0);
|
||||
lcd.drawSource(113, LCD_H-8, MIXSRC_CH1+pitchCH1, getFieldFlags(0))
|
||||
fieldsMax = 0
|
||||
end
|
||||
|
||||
local function pitchMenu(event)
|
||||
if dirty then
|
||||
dirty = false
|
||||
drawPitchMenu()
|
||||
end
|
||||
navigate(event, fieldsMax, page-1, page+1)
|
||||
pitchCH1 = channelIncDec(event, pitchCH1)
|
||||
end
|
||||
|
||||
-- Yaw Menu
|
||||
local function drawYawMenu()
|
||||
lcd.clear()
|
||||
lcd.drawText(1, 0, "Select multicopter yaw channel", 0)
|
||||
lcd.drawFilledRectangle(0, 0, LCD_W, 8, GREY_DEFAULT+FILL_WHITE)
|
||||
lcd.drawCombobox(0, 8, LCD_W/2, {"..."}, comboBoxMode, getFieldFlags(1))
|
||||
lcd.drawLine(LCD_W/2-1, 18, LCD_W/2-1, LCD_H, DOTTED, 0)
|
||||
lcd.drawPixmap(120, 8, "multi-yaw.bmp")
|
||||
lcd.drawText(20, LCD_H-16, "Assign Yaw", 0);
|
||||
lcd.drawText(20, LCD_H-8, "Channel", 0);
|
||||
lcd.drawText(LCD_W/2-19, LCD_H-8, ">>>", 0);
|
||||
lcd.drawSource(113, LCD_H-8, MIXSRC_CH1+yawCH1, getFieldFlags(0))
|
||||
fieldsMax = 0
|
||||
end
|
||||
|
||||
local function yawMenu(event)
|
||||
if dirty then
|
||||
dirty = false
|
||||
drawYawMenu()
|
||||
end
|
||||
navigate(event, fieldsMax, page-1, page+1)
|
||||
yawCH1 = channelIncDec(event, yawCH1)
|
||||
end
|
||||
|
||||
-- Confirmation Menu
|
||||
local function drawNextLine(x, y, label, channel)
|
||||
lcd.drawText(x, y, label, 0);
|
||||
lcd.drawSource(x+52, y, MIXSRC_CH1+channel, 0)
|
||||
y = y + 8
|
||||
if y > 50 then
|
||||
y = 12
|
||||
x = 120
|
||||
end
|
||||
return x, y
|
||||
end
|
||||
|
||||
local function drawConfirmationMenu()
|
||||
local x = 22
|
||||
local y = 12
|
||||
lcd.clear()
|
||||
lcd.drawText(48, 1, "Ready to go?", 0);
|
||||
lcd.drawFilledRectangle(0, 0, LCD_W, 9, 0)
|
||||
x, y = drawNextLine(x, y, "Throttle:", thrCH1)
|
||||
x, y = drawNextLine(x, y, "Roll:", rollCH1)
|
||||
x, y = drawNextLine(x, y, "Pitch:", pitchCH1)
|
||||
x, y = drawNextLine(x, y, "Yaw:", yawCH1)
|
||||
lcd.drawText(48, LCD_H-8, "[Enter Long] to confirm", 0);
|
||||
lcd.drawFilledRectangle(0, LCD_H-9, LCD_W, 9, 0)
|
||||
lcd.drawPixmap(LCD_W-18, 0, "confirm-tick.bmp")
|
||||
lcd.drawPixmap(0, LCD_H-17, "confirm-plane.bmp")
|
||||
fieldsMax = 0
|
||||
end
|
||||
|
||||
local function addMix(channel, input, name, weight, index)
|
||||
local mix = { source=input, name=name }
|
||||
if weight ~= nil then
|
||||
mix.weight = weight
|
||||
end
|
||||
if index == nil then
|
||||
index = 0
|
||||
end
|
||||
model.insertMix(channel, index, mix)
|
||||
end
|
||||
|
||||
local function applySettings()
|
||||
model.defaultInputs()
|
||||
model.deleteMixes()
|
||||
addMix(thrCH1, MIXSRC_FIRST_INPUT+defaultChannel(2), "Throttle")
|
||||
addMix(rollCH1, MIXSRC_FIRST_INPUT+defaultChannel(3), "Roll")
|
||||
addMix(yawCH1, MIXSRC_FIRST_INPUT+defaultChannel(0), "Yaw")
|
||||
addMix(pitchCH1, MIXSRC_FIRST_INPUT+defaultChannel(1), "Pitch")
|
||||
end
|
||||
|
||||
local function confirmationMenu(event)
|
||||
if dirty then
|
||||
dirty = false
|
||||
drawConfirmationMenu()
|
||||
end
|
||||
|
||||
navigate(event, fieldsMax, YAW_PAGE, page)
|
||||
|
||||
if event == EVT_EXIT_BREAK then
|
||||
return 2
|
||||
elseif event == EVT_ENTER_LONG then
|
||||
killEvents(event)
|
||||
applySettings()
|
||||
return 2
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
-- Main
|
||||
local function run(event)
|
||||
if event == nil then
|
||||
error("Cannot be run as a model script!")
|
||||
end
|
||||
lcd.lock()
|
||||
if page == THROTTLE_PAGE then
|
||||
throttleMenu(event)
|
||||
elseif page == ROLL_PAGE then
|
||||
rollMenu(event)
|
||||
elseif page == YAW_PAGE then
|
||||
yawMenu(event)
|
||||
elseif page == PITCH_PAGE then
|
||||
pitchMenu(event)
|
||||
elseif page == CONFIRMATION_PAGE then
|
||||
return confirmationMenu(event)
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
||||
return { init=init, run=run }
|
||||
@@ -50,6 +50,7 @@ local function modelTypeMenu(event)
|
||||
elseif modelType == MODELTYPE_DELTA then
|
||||
return "delta.lua"
|
||||
elseif modelType == MODELTYPE_QUAD then
|
||||
return "multi.lua"
|
||||
end
|
||||
dirty = true
|
||||
else
|
||||
|
||||