diff --git a/CREDITS.txt b/CREDITS.txt index 6ea0e45a2..c9f3d46c8 100644 --- a/CREDITS.txt +++ b/CREDITS.txt @@ -2,6 +2,7 @@ Bertrand Songis Romolo Manfredini André Bernet Michael Blandford +Rob Thomson Bryan J. Rentoul (aka Gruvin) Cameron Weeks Martin Hotař @@ -17,4 +18,4 @@ Severino Anedda (splash screens) Grootwitbaas - 9xforums.com (mac) Adrian Amberg (splash screens) Wallaguest1 - 9xforums.com (splash screens) -HC1969 - 9xforums.com (splash screens) \ No newline at end of file +HC1969 - 9xforums.com (splash screens) diff --git a/DONATIONS.txt b/DONATIONS.txt index b2e0e77ea..0f9eb76b2 100644 --- a/DONATIONS.txt +++ b/DONATIONS.txt @@ -45,7 +45,7 @@ Martin Wilson Joe Street John Holdsworth Daniel Schwartz -Dean Church +Dean Church (monthly) Michael Halse David Mark Ted Moss @@ -95,8 +95,8 @@ Heinrich Illig Michael Collins Michael Manning Craig Lorentz -Jonathan Modellismo - http://jonathan.it -Aviomotive - http://www.aviomotive.com +Jonathan Modellismo - jonathan.it +Aviomotive - www.aviomotive.com André Lasseret Felipe Alexandre de Oliveira Brian Harris @@ -126,7 +126,7 @@ Larisa Filocamo Alex Calderhead Hartmut Sahm Åke Brodin -Aloft Hobbies - http://www.alofthobbies.com +Aloft Hobbies - www.alofthobbies.com Ted Moss Filippos Tigarakis Chewytm @@ -166,7 +166,7 @@ Heiko Polig Andrew Fernie Marco Lange Nick McMillan -Michel Baily (mensual) +Michel Baily (monthly) Patrick Mullen Scott Campbell Erich Roeder @@ -252,4 +252,58 @@ Sławomir Juszczak Stephen Henderson David Morgan Aloft Hobbies - +Netanel Hobara +Cameron Galipo +Doug Schafer +Pietro Rossin +Earl Killingsworth +Victor B Wright +Terry McKinley +Марков Алексей +Offer Shmuely +Ian Lobley +Keith Hertzog +Stéphane Fortas +Peter Mitrik +Thomas Majewski +ANF King +Henrik Hammarström +Kenneth Lilja (monthly) +R Wells +Uwe Jordt +Harald Wilczak +Bernhard Lohmann +Ferenc Koller +Robert Ferguson +Daniel Byers +Tyler Darby +Miguel Villalpando +Kim Dong Hoon +Terry McKinley +Walter Bell +wsTech - http://wstech.de +Clinton Linck +Gordon Stahl +Josep Clodas Sola +Thierry Martin +Peter Mauro +Mitchell Brenner +Ulach Green +Lluis Bullich Rañe +Steffen Rohr +Eric Jacquin +Harvest Lane +Ville Kuvaja +DK-System +Heinz Vogel +Heung Jin Choi +MMJS van der Helm +Dan Neelands +Yashiro Masayuki +Isaac Sloan +Harold Baird +Roy Bender +Bradley Murchie +Maximilian Süß +Dean Jansa +Ronald Donker diff --git a/README.md b/README.md new file mode 100644 index 000000000..1b9c5331e --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +##OpenTX Next Branch + +You have found your way to the GitHub repository site for the OpenTX Next Branch. This code branch holds the source code for the ongoing development. + +The stable release code is not here, it is in the master branch. +Under no circumstances build and use software from this branch for real world application. At times you will be more or less guaranteed to crash your plane and destroy all your model settings. + +Refer to the opentx.wiki for information about setting up the tool chains for building OpenTX and OpenTX Companion as well as other development related issues. diff --git a/README.txt b/README.txt deleted file mode 100644 index 8f6415cbd..000000000 --- a/README.txt +++ /dev/null @@ -1 +0,0 @@ -[to be written] diff --git a/companion/src/CMakeLists.txt b/companion/src/CMakeLists.txt index 318a65524..6b028706a 100644 --- a/companion/src/CMakeLists.txt +++ b/companion/src/CMakeLists.txt @@ -1,7 +1,7 @@ -PROJECT( companion9x ) +PROJECT( companion ) SET( C9X_VERSION_MAJOR "1" ) -SET( C9X_VERSION_MINOR "51" ) +SET( C9X_VERSION_MINOR "52" ) SET( C9X_VERSION ${C9X_VERSION_MAJOR}.${C9X_VERSION_MINOR} ) CMAKE_MINIMUM_REQUIRED( VERSION 2.8 ) @@ -109,7 +109,18 @@ add_custom_command( DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/ersky9x/ersky9xsimulator.cpp ) -SET( companion9x_SRCS +set(RADIO_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/../../radio/src) + +add_custom_command( + OUTPUT ${RADIO_SRC_DIRECTORY}/bitmaps/sticks.lbm + COMMAND make lbm + DEPENDS ${RADIO_SRC_DIRECTORY}/bitmaps/sticks_4x1.xbm + WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY} +) + +add_subdirectory(modeledit) + +SET( companion_SRCS eeprominterface.cpp hexinterface.cpp flashinterface.cpp @@ -124,28 +135,25 @@ SET( companion9x_SRCS ${ER9X_CHECKOUT_DIRECTORY}/er9xsimulator.cpp firmwares/gruvin9x/gruvin9xeeprom.cpp firmwares/gruvin9x/gruvin9xinterface.cpp - firmwares/opentx/open9xeeprom.cpp + firmwares/opentx/opentxeeprom.cpp firmwares/opentx/open9xStockeeprom.cpp - firmwares/opentx/open9xinterface.cpp firmwares/opentx/open9xGruvin9xeeprom.cpp firmwares/opentx/open9xSky9xeeprom.cpp + firmwares/opentx/opentxinterface.cpp firmwares/opentx/opentxTaranisSimulator.cpp - firmwares/opentx/open9xSky9xsimulator.cpp - firmwares/opentx/open9xGruvin9xsimulator.cpp - firmwares/opentx/open9xM128simulator.cpp - firmwares/opentx/open9xsimulator.cpp + firmwares/opentx/opentxSky9xsimulator.cpp + firmwares/opentx/opentxGruvin9xsimulator.cpp + firmwares/opentx/opentxM128simulator.cpp + firmwares/opentx/opentxsimulator.cpp firmwares/ersky9x/ersky9xeeprom.cpp firmwares/ersky9x/ersky9xinterface.cpp ${ERSKY9X_CHECKOUT_DIRECTORY}/ersky9xsimulator.cpp - node.cpp - edge.cpp + ${RADIO_SRC_DIRECTORY}/bitmaps/sticks.lbm helpers.cpp mdichild.cpp generaledit.cpp - modeledit.cpp modelslist.cpp mountlist.cpp - mixerslist.cpp avroutputdialog.cpp preferencesdialog.cpp burnconfigdialog.cpp @@ -155,8 +163,6 @@ SET( companion9x_SRCS burndialog.cpp printdialog.cpp fusesdialog.cpp - expodialog.cpp - mixerdialog.cpp logsdialog.cpp downloaddialog.cpp simulatordialog.cpp @@ -168,16 +174,14 @@ SET( companion9x_SRCS qcustomplot.cpp ) -SET( companion9x_MOC_HDRS +SET( companion_MOC_HDRS avroutputdialog.h preferencesdialog.h burnconfigdialog.h comparedialog.h printdialog.h fusesdialog.h - mixerdialog.h logsdialog.h - expodialog.h contributorsdialog.h customizesplashdialog.h splashlibrary.h @@ -191,31 +195,27 @@ SET( companion9x_MOC_HDRS xmenuwidget.h xsimulatordialog.h generaledit.h - modeledit.h modelslist.h - mixerslist.h mdichild.h mainwindow.h myslider.h modelconfigdialog.h qcustomplot.h + helpers.h ) -SET( companion9x_UIS +SET( companion_UIS mdichild.ui avroutputdialog.ui comparedialog.ui fusesdialog.ui - expodialog.ui logsdialog.ui - mixerdialog.ui preferencesdialog.ui simulatordialog.ui xsimulatordialog.ui burnconfigdialog.ui downloaddialog.ui generaledit.ui - modeledit.ui printdialog.ui contributorsdialog.ui customizesplashdialog.ui @@ -225,26 +225,26 @@ SET( companion9x_UIS ) IF ( SDL_FOUND ) - SET( companion9x_SRCS - ${companion9x_SRCS} + SET( companion_SRCS + ${companion_SRCS} joystick.cpp joystickdialog.cpp ) - SET( companion9x_MOC_HDRS - ${companion9x_MOC_HDRS} + SET( companion_MOC_HDRS + ${companion_MOC_HDRS} joystick.h joystickdialog.h ) - SET( companion9x_UIS - ${companion9x_UIS} + SET( companion_UIS + ${companion_UIS} joystickdialog.ui ) ENDIF( ) -SET( companion9x_RCS - companion9x.qrc +SET( companion_RCS + companion.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc ) @@ -286,7 +286,7 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/firmwares/opentx/stamp-opentx.h.in ${ SET( PATCH_FLAGS "--binary" ) IF( WIN32 ) - SET( companion9x_SRCS ${companion9x_SRCS} icon.rc ) + SET( companion_SRCS ${companion_SRCS} icon.rc ) IF ( NOT MSVC ) SET(CMAKE_EXE_LINKER_FLAGS -mwindows) ENDIF( ) @@ -298,28 +298,36 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ) SET( LANGUAGES he pt ru de fr it sv cs ) FOREACH( language ${LANGUAGES} ) - SET( companion9x_TS ${companion9x_TS} translations/companion9x_${language}.ts ) + SET( companion_TS ${companion_TS} translations/companion_${language}.ts ) ENDFOREACH( language ) -QT4_WRAP_UI( companion9x_SRCS ${companion9x_UIS} ) -QT4_WRAP_CPP( companion9x_SRCS ${companion9x_MOC_HDRS} ) -QT4_ADD_TRANSLATION( companion9x_QM ${companion9x_TS} ) -QT4_ADD_RESOURCES( companion9x_SRCS ${companion9x_RCS} ) +QT4_WRAP_UI( companion_SRCS ${companion_UIS} ) +QT4_WRAP_CPP( companion_SRCS ${companion_MOC_HDRS} ) +QT4_ADD_TRANSLATION( companion_QM ${companion_TS} ) +QT4_ADD_RESOURCES( companion_SRCS ${companion_RCS} ) ADD_DEFINITIONS( -DQT_TRANSLATIONS_DIR="${QT_TRANSLATIONS_DIR}" ) IF( APPLE ) - ADD_EXECUTABLE( ${PROJECT_NAME} MACOSX_BUNDLE ${companion9x_SRCS} ${companion9x_QM} ) + ADD_EXECUTABLE( ${PROJECT_NAME} MACOSX_BUNDLE ${companion_SRCS} ${companion_QM} ) ELSE( ) - ADD_EXECUTABLE( ${PROJECT_NAME} WIN32 ${companion9x_SRCS} ${companion9x_QM} ) + ADD_EXECUTABLE( ${PROJECT_NAME} WIN32 ${companion_SRCS} ${companion_QM} ) ENDIF( ) -TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${XERCESC_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS} ) +TARGET_LINK_LIBRARIES( ${PROJECT_NAME} modeledit ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${XERCESC_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS} ) IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") INSTALL( TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) - INSTALL( FILES companion9x.desktop DESTINATION share/applications ) - INSTALL( FILES companion9x.png DESTINATION share/icons ) + INSTALL( FILES companion.desktop DESTINATION share/applications ) + INSTALL( FILES images/linuxicons/16x16/companion.png DESTINATION /usr/share/icons/hicolor/16x16/apps ) + INSTALL( FILES images/linuxicons/22x22/companion.png DESTINATION /usr/share/icons/hicolor/22x22/apps ) + INSTALL( FILES images/linuxicons/24x24/companion.png DESTINATION /usr/share/icons/hicolor/24x24/apps ) + INSTALL( FILES images/linuxicons/32x32/companion.png DESTINATION /usr/share/icons/hicolor/32x32/apps ) + INSTALL( FILES images/linuxicons/48x48/companion.png DESTINATION /usr/share/icons/hicolor/48x48/apps ) + INSTALL( FILES images/linuxicons/128x128/companion.png DESTINATION /usr/share/icons/hicolor/128x128/apps ) + INSTALL( FILES images/linuxicons/256x256/companion.png DESTINATION /usr/share/icons/hicolor/256x256/apps ) + INSTALL( FILES images/linuxicons/512x512/companion.png DESTINATION /usr/share/icons/hicolor/512x512/apps ) + INSTALL( FILES images/linuxicons/scalable/companion.svg DESTINATION /usr/share/icons/hicolor/scalable/apps ) INSTALL( FILES ../targets/linux/45-taranis.rules DESTINATION /etc/udev/rules.d/ ) # Linux specific code SET(OperatingSystem "Linux") @@ -329,13 +337,13 @@ ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") IF( WIN32 ) IF( MSVC ) - SET( NSI_IN_FILE companion9x-vs.nsi.in ) + SET( NSI_IN_FILE companion-vs.nsi.in ) ELSE( ) - SET( NSI_IN_FILE companion9x-msys.nsi.in ) + SET( NSI_IN_FILE companion-msys.nsi.in ) ENDIF( ) SET( SYSDIR "$ENV{windir}/system32" ) - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../targets/windows/${NSI_IN_FILE} ${CMAKE_CURRENT_BINARY_DIR}/companion9x.nsi @ONLY) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../targets/windows/${NSI_IN_FILE} ${CMAKE_CURRENT_BINARY_DIR}/companion.nsi @ONLY) FIND_PROGRAM(NSIS_EXE makensis.exe PATHS "C:/Program Files/NSIS" @@ -343,14 +351,14 @@ IF( WIN32 ) "C:/Programs/NSIS" ) - ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/companion9xInstall.exe - COMMAND "${NSIS_EXE}" ARGS companion9x.nsi - DEPENDS ${PROJECT_NAME} ${PROJECT_BINARY_DIR}/companion9x.nsi + ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/companionInstall.exe + COMMAND "${NSIS_EXE}" ARGS companion.nsi + DEPENDS ${PROJECT_NAME} ${PROJECT_BINARY_DIR}/companion.nsi COMMENT "Windows NSIS Installer") ADD_CUSTOM_TARGET( installer - DEPENDS ${PROJECT_BINARY_DIR}/companion9xInstall.exe - SOURCES ${PROJECT_BINARY_DIR}/companion9x.nsi) + DEPENDS ${PROJECT_BINARY_DIR}/companionInstall.exe + SOURCES ${PROJECT_BINARY_DIR}/companion.nsi) ENDIF( ) IF( APPLE ) @@ -362,36 +370,36 @@ IF( APPLE ) ENDIF() ADD_CUSTOM_TARGET( addframeworks ALL - COMMAND mkdir -p companion9x.app/Contents/Frameworks - COMMAND mkdir -p companion9x.app/Contents/Resources - COMMAND mkdir -p companion9x.app/Contents/translations - COMMAND rsync ${PROJECT_SOURCE_DIR}/images/${MACOSX_BUNDLE_ICON_FILE} companion9x.app/Contents/Resources/${MACOSX_BUNDLE_ICON_FILE} # Copy the icon files - COMMAND rsync ${PROJECT_SOURCE_DIR}/../macbuild/lib* companion9x.app/Contents/Frameworks - #COMMAND rsync ${PROJECT_SOURCE_DIR}/../macbuild/libcrypto.1.0.0.dylib companion9x.app/Contents/Frameworks - COMMAND rsync -r --exclude=.svn ${PROJECT_SOURCE_DIR}/../macbuild/qt_menu.nib companion9x.app/Contents/Resources/ - COMMAND rsync ${PROJECT_BINARY_DIR}/*.qm companion9x.app/Contents/translations - COMMAND ${QT_BINARY_DIR}/macdeployqt companion9x.app + COMMAND mkdir -p companion.app/Contents/Frameworks + COMMAND mkdir -p companion.app/Contents/Resources + COMMAND mkdir -p companion.app/Contents/translations + COMMAND rsync ${PROJECT_SOURCE_DIR}/images/${MACOSX_BUNDLE_ICON_FILE} companion.app/Contents/Resources/${MACOSX_BUNDLE_ICON_FILE} # Copy the icon files + COMMAND rsync ${PROJECT_SOURCE_DIR}/../targets/mac/lib* companion.app/Contents/Frameworks + #COMMAND rsync ${PROJECT_SOURCE_DIR}/../targets/mac/libcrypto.1.0.0.dylib companion.app/Contents/Frameworks + COMMAND rsync -r --exclude=.svn ${PROJECT_SOURCE_DIR}/../targets/mac/qt_menu.nib companion.app/Contents/Resources/ + COMMAND rsync ${PROJECT_BINARY_DIR}/*.qm companion.app/Contents/translations + COMMAND ${QT_BINARY_DIR}/macdeployqt companion.app WORKING_DIRECTORY ${WORK_DIR} DEPENDS ${PROJECT_NAME} ) ADD_CUSTOM_TARGET( makedmg - COMMAND ${QT_BINARY_DIR}/macdeployqt companion9x.app -dmg -no-plugins + COMMAND ${QT_BINARY_DIR}/macdeployqt companion.app -dmg -no-plugins WORKING_DIRECTORY ${WORK_DIR} DEPENDS addframeworks ) ENDIF( ) ADD_CUSTOM_TARGET( stamp - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/version.h ${CMAKE_SOURCE_DIR}/../companion9x.stamp + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/version.h ${CMAKE_SOURCE_DIR}/../companion.stamp DEPENDS ${CMAKE_BINARY_DIR}/version.h ) ADD_CUSTOM_TARGET( translations WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMAND lupdate-qt4 ${CMAKE_SOURCE_DIR} -ts ${companion9x_TS} ) + COMMAND lupdate-qt4 ${CMAKE_SOURCE_DIR} -ts ${companion_TS} ) -SET(CPACK_PACKAGE_NAME "COMPANION9X") -SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "EEPROM Editor for the openTx open source firmware") +SET(CPACK_PACKAGE_NAME "COMPANION") +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Models and settings editor for the OpenTx open source firmware") string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_PACKAGE_NAME_LOWERCASE) find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems") if(DPKG_PROGRAM) diff --git a/companion/src/avroutputdialog.cpp b/companion/src/avroutputdialog.cpp index a125d8e99..8680d39a7 100644 --- a/companion/src/avroutputdialog.cpp +++ b/companion/src/avroutputdialog.cpp @@ -58,7 +58,7 @@ avrOutputDialog::avrOutputDialog(QWidget *parent, QString prog, QStringList arg, QFile exec; winTitle=wTitle; if (!(exec.exists(prog))) { - QMessageBox::critical(this, "companion9x", getProgrammer() + " " + tr("executable not found")); + QMessageBox::critical(this, "Companion", getProgrammer() + " " + tr("executable not found")); closeOpt = AVR_DIALOG_FORCE_CLOSE; QTimer::singleShot(0, this, SLOT(forceClose())); } else { @@ -315,10 +315,10 @@ void avrOutputDialog::errorWizard() } } if (fwexist==false) { - QMessageBox::warning(this, "companion9x - Tip of the day", tr("Your radio uses a %1 CPU!!!\n\nPlease check advanced burn options to set the correct cpu type.").arg(DeviceStr)); + QMessageBox::warning(this, "Companion - Tip of the day", tr("Your radio uses a %1 CPU!!!\n\nPlease check advanced burn options to set the correct cpu type.").arg(DeviceStr)); } else { FirmwareInfo *firmware = GetCurrentFirmware(); - QMessageBox::warning(this, "companion9x - Tip of the day", tr("Your radio uses a %1 CPU!!!\n\nPlease select an appropriate firmware type to program it.").arg(DeviceStr)+FwStr+tr("\nYou are currently using:\n %1").arg(firmware->name)); + QMessageBox::warning(this, "Companion - Tip of the day", tr("Your radio uses a %1 CPU!!!\n\nPlease select an appropriate firmware type to program it.").arg(DeviceStr)+FwStr+tr("\nYou are currently using:\n %1").arg(firmware->name)); } } } @@ -416,24 +416,24 @@ void avrOutputDialog::doFinished(int code=0) if (hasErrors || code) { if (!cmdLine.isEmpty()) { if (getProgrammer()!="AVRDUDE") { - QMessageBox::critical(this, "companion9x", getProgrammer() + " " + tr("did not finish correctly")); + QMessageBox::critical(this, "Companion", getProgrammer() + " " + tr("did not finish correctly")); } else { - int res = QMessageBox::question(this, "companion9x",getProgrammer() + " " + tr("did not finish correctly!\nDo you want some help ?"),QMessageBox::Yes | QMessageBox::No); + int res = QMessageBox::question(this, "Companion",getProgrammer() + " " + tr("did not finish correctly!\nDo you want some help ?"),QMessageBox::Yes | QMessageBox::No); if (res != QMessageBox::No) { errorWizard(); } } } else { - QMessageBox::critical(this, "companion9x", tr("Copy did not finish correctly")); + QMessageBox::critical(this, "Companion", tr("Copy did not finish correctly")); } // reject(); } else { if (!cmdLine.isEmpty()) { ui->progressBar->setValue(100); - QMessageBox::information(this, "companion9x", getProgrammer() + " " + tr("finished correctly")); + QMessageBox::information(this, "Companion", getProgrammer() + " " + tr("finished correctly")); accept(); } else { - QMessageBox::information(this, "companion9x", tr("Copy finished correctly")); + QMessageBox::information(this, "Companion", tr("Copy finished correctly")); accept(); } } diff --git a/companion/src/avroutputdialog.ui b/companion/src/avroutputdialog.ui index 54ecf8d74..ded09363e 100644 --- a/companion/src/avroutputdialog.ui +++ b/companion/src/avroutputdialog.ui @@ -32,7 +32,7 @@ Dialog - + :/icon.png:/icon.png @@ -109,7 +109,7 @@ - + diff --git a/companion/src/burnconfigdialog.cpp b/companion/src/burnconfigdialog.cpp index 71887d4da..e0ea4a63e 100644 --- a/companion/src/burnconfigdialog.cpp +++ b/companion/src/burnconfigdialog.cpp @@ -2,6 +2,7 @@ #include "ui_burnconfigdialog.h" #include "avroutputdialog.h" #include "eeprominterface.h" +#include "helpers.h" #include #if !defined WIN32 && defined __GNUC__ @@ -82,7 +83,7 @@ burnConfigDialog::~burnConfigDialog() void burnConfigDialog::getSettings() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; #if defined WIN32 || !defined __GNUC__ avrLoc = settings.value("avrdude_location", QFileInfo("avrdude.exe").absoluteFilePath()).toString(); sambaLoc = settings.value("samba_location", QFileInfo("sam-ba.exe").absoluteFilePath()).toString(); @@ -136,7 +137,7 @@ void burnConfigDialog::getSettings() void burnConfigDialog::putSettings() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; settings.setValue("avrdude_location", avrLoc); settings.setValue("programmer", avrProgrammer); settings.setValue("mcu", avrMCU); @@ -278,8 +279,9 @@ void burnConfigDialog::listProgrammers() QStringList arguments; arguments << "-c?"; avrOutputDialog *ad = new avrOutputDialog(this, ui->avrdude_location->text(), arguments, "List available programmers", AVR_DIALOG_KEEP_OPEN, TRUE); - ad->setWindowIcon(QIcon(":/images/list.png")); + ad->setWindowIcon(CompanionIcon("list.png")); ad->show(); + delete ad; } void burnConfigDialog::on_pushButton_3_clicked() @@ -295,8 +297,9 @@ void burnConfigDialog::on_pushButton_4_clicked() arguments << "-?"; avrOutputDialog *ad = new avrOutputDialog(this, ui->avrdude_location->text(), arguments, "Show help", AVR_DIALOG_KEEP_OPEN,TRUE); - ad->setWindowIcon(QIcon(":/images/configure.png")); + ad->setWindowIcon(CompanionIcon("configure.png")); ad->show(); + delete ad; } @@ -312,8 +315,9 @@ void burnConfigDialog::readFuses() arguments << "-c" << avrProgrammer << "-p" << avrMCU << args << str; avrOutputDialog *ad = new avrOutputDialog(this, avrLoc, arguments, "Read Fuses",AVR_DIALOG_KEEP_OPEN,TRUE); - ad->setWindowIcon(QIcon(":/images/fuses.png")); + ad->setWindowIcon(CompanionIcon("fuses.png")); ad->show(); + delete ad; } void burnConfigDialog::restFuses(bool eeProtect) @@ -324,8 +328,7 @@ void burnConfigDialog::restFuses(bool eeProtect) //avrdude -c usbasp -p m64 -U efuse:w:<0xFF>:m QMessageBox::StandardButton ret = QMessageBox::No; - - ret = QMessageBox::warning(this, tr("companion9x"), + ret = QMessageBox::warning(this, tr("Companion"), tr("WARNING!
This will reset the fuses of %1 to the factory settings.
Writing fuses can mess up your radio.
Do this only if you are sure they are wrong!
Are you sure you want to continue?").arg(avrMCU), QMessageBox::Yes | QMessageBox::No); if (ret == QMessageBox::Yes) @@ -338,7 +341,8 @@ void burnConfigDialog::restFuses(bool eeProtect) QString erStr = eeProtect ? "hfuse:w:0x11:m" : "hfuse:w:0x19:m"; str << "-U" << "lfuse:w:0xD7:m" << "-U" << erStr << "-U" << "efuse:w:0xFC:m"; //use hfuse = 0x81 to prevent eeprom being erased with every flashing - } else { + } + else { QString tempDir = QDir::tempPath(); QString tempFile; QString lfuses; @@ -346,8 +350,9 @@ void burnConfigDialog::restFuses(bool eeProtect) QStringList argread; argread << "-c" << avrProgrammer << "-p" << avrMCU << args <<"-U" << "lfuse:r:"+tempFile+":r" ; avrOutputDialog *ad = new avrOutputDialog(this, avrLoc, argread, "Reset Fuses",AVR_DIALOG_CLOSE_IF_SUCCESSFUL,FALSE); - ad->setWindowIcon(QIcon(":/images/fuses.png")); + ad->setWindowIcon(CompanionIcon("fuses.png")); ad->exec(); + delete ad; QFile file(tempFile); if (file.exists() && file.size()==1) { file.open(QIODevice::ReadOnly); @@ -355,12 +360,14 @@ void burnConfigDialog::restFuses(bool eeProtect) file.read(bin_flash, 1); if (bin_flash[0]==0x0E) { lfuses="lfuse:w:0x0E:m"; - } else { + } + else { lfuses="lfuse:w:0x3F:m"; } file.close(); unlink(tempFile.toAscii()); - } else { + } + else { lfuses="lfuse:w:0x3F:m"; } @@ -371,12 +378,14 @@ void burnConfigDialog::restFuses(bool eeProtect) QStringList arguments; if (avrMCU=="m2560") { arguments << "-c" << avrProgrammer << "-p" << avrMCU << args << "-u" << str; - } else { + } + else { arguments << "-c" << avrProgrammer << "-p" << avrMCU << args << "-B" << "100" << "-u" << str; } avrOutputDialog *ad = new avrOutputDialog(this, avrLoc, arguments, "Reset Fuses",AVR_DIALOG_KEEP_OPEN,TRUE); - ad->setWindowIcon(QIcon(":/images/fuses.png")); + ad->setWindowIcon(CompanionIcon("fuses.png")); ad->show(); + delete ad; } } @@ -388,24 +397,29 @@ void burnConfigDialog::on_advCtrChkB_toggled(bool checked) if (IS_TARANIS(eepromInterface->getBoard())) { ui->label_dfu2->show(); ui->dfuArgs->show(); - } else if (eepromInterface->getBoard()==BOARD_SKY9X) { + } + else if (eepromInterface->getBoard()==BOARD_SKY9X) { ui->label_sb2->show(); ui->arm_mcu->show(); - } else { + } + else { ui->label_av3->show(); ui->avrdude_mcu->show(); - QMessageBox::warning(this, tr("companion9x"), + QMessageBox::warning(this, tr("Companion"), tr("WARNING!
Normally CPU type is automatically selected according to the chosen firmware.
If you change the CPU type the resulting eeprom could be inconsistent."), QMessageBox::Ok); } - } else { + } + else { if (IS_TARANIS(eepromInterface->getBoard())) { ui->label_dfu2->hide(); ui->dfuArgs->hide(); - } else if (eepromInterface->getBoard()==BOARD_SKY9X) { + } + else if (eepromInterface->getBoard()==BOARD_SKY9X) { ui->label_sb2->hide(); ui->arm_mcu->hide(); - } else { + } + else { ui->label_av3->hide(); ui->avrdude_mcu->hide(); } diff --git a/companion/src/burnconfigdialog.ui b/companion/src/burnconfigdialog.ui index ba1adbf17..b5419d37f 100644 --- a/companion/src/burnconfigdialog.ui +++ b/companion/src/burnconfigdialog.ui @@ -26,8 +26,8 @@ Programmer Configuration - - :/images/configure.png:/images/configure.png + + :/icon.png:/icon.png @@ -760,7 +760,7 @@ Please only use this if you know what you are doing. There are no error checks buttonBox - + diff --git a/companion/src/burndialog.cpp b/companion/src/burndialog.cpp index 54b37d7a2..f1d7f5482 100644 --- a/companion/src/burndialog.cpp +++ b/companion/src/burndialog.cpp @@ -16,6 +16,7 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac hexType(Type) { ui->setupUi(this); + ui->libraryButton->setIcon(CompanionIcon("library.png")); ui->SplashFrame->hide(); ui->FramFWInfo->hide(); ui->EEbackupCB->hide(); @@ -26,11 +27,12 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac ui->patchcalib_CB->hide(); ui->patchhw_CB->hide(); ui->InvertColorButton->setDisabled(true); - this->setWindowTitle(tr("Write firmware to TX")); + setWindowTitle(tr("Write firmware to TX")); if (IS_TARANIS(GetEepromInterface()->getBoard())) { ui->EEbackupCB->hide(); } - } else { + } + else { ui->FlashLoadButton->setText(tr("Browse for file")); ui->profile_label->hide(); ui->patchcalib_CB->hide(); @@ -51,11 +53,12 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac ui->BurnFlashButton->setDisabled(true); ui->EEbackupCB->hide(); if (DocName.isEmpty()) { - this->setWindowTitle(tr("Write Models and Settings to TX")); - } else { - this->setWindowTitle(tr("Write Models and Settings in %1 to TX").arg(DocName)); + setWindowTitle(tr("Write Models and Settings to TX")); } - QSettings settings("companion9x", "companion9x"); + else { + setWindowTitle(tr("Write Models and Settings in %1 to TX").arg(DocName)); + } + QSettings settings; int profileid=settings.value("profileId", 1).toInt(); settings.beginGroup("Profiles"); QString profile=QString("profile%1").arg(profileid); @@ -69,10 +72,11 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac ui->FWFileName->setText(*hexfileName); if (Type==2) { checkFw(*hexfileName); - } else { + } + else { burnraw=false; if (checkeEprom(*hexfileName)) { - QSettings settings("companion9x", "companion9x"); + QSettings settings; int profileid=settings.value("profileId", 1).toInt(); settings.beginGroup("Profiles"); QString profile=QString("profile%1").arg(profileid); @@ -97,12 +101,14 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac if (!((DisplaySet.length()==6) && (BeeperSet.length()==4) && (HapticSet.length()==6) && (SpeakerSet.length()==6))) { ui->patchhw_CB->setDisabled(true); } - } else { + } + else { ui->profile_label->hide(); } if (!IS_TARANIS(GetEepromInterface()->getBoard())) { ui->EEpromCB->show(); - } else { + } + else { ui->EEpromCB->setChecked(false); } ui->BurnFlashButton->setEnabled(true); @@ -113,7 +119,7 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac hexfileName->clear(); } else if (Type==2) { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString FileName; FileName = settings.value("lastFw").toString(); QFile file(FileName); @@ -124,14 +130,15 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac resize(0, 0); } -burnDialog::~burnDialog() { +burnDialog::~burnDialog() +{ delete ui; } void burnDialog::on_FlashLoadButton_clicked() { QString fileName; - QSettings settings("companion9x", "companion9x"); + QSettings settings; ui->ImageLoadButton->setDisabled(true); ui->libraryButton->setDisabled(true); ui->InvertColorButton->setDisabled(true); @@ -150,7 +157,8 @@ void burnDialog::on_FlashLoadButton_clicked() if (hexType==2) { fileName = QFileDialog::getOpenFileName(this, tr("Open"), settings.value("lastFlashDir").toString(), FLASH_FILES_FILTER); checkFw(fileName); - } else { + } + else { QString fileName = QFileDialog::getOpenFileName(this,tr("Choose file to load Models and Settings from"), settings.value("lastDir").toString(), tr(EXTERNAL_EEPROM_FILES_FILTER)); if (checkeEprom(fileName)) { if (burnraw==false) { @@ -160,10 +168,12 @@ void burnDialog::on_FlashLoadButton_clicked() ui->patchhw_CB->show(); if (!IS_TARANIS(GetEepromInterface()->getBoard())) { ui->EEpromCB->show(); - } else { + } + else { ui->EEpromCB->setChecked(false); } - } else { + } + else { ui->BurnFlashButton->setEnabled(true); ui->profile_label->hide(); ui->patchcalib_CB->setChecked(false); @@ -181,10 +191,11 @@ void burnDialog::checkFw(QString fileName) if (fileName.isEmpty()) { return; } - QSettings settings("companion9x", "companion9x"); + QSettings settings; if (!IS_TARANIS(GetEepromInterface()->getBoard())) { ui->EEbackupCB->show(); - } else { + } + else { ui->EEbackupCB->setChecked(false); *backup=false; } @@ -223,23 +234,27 @@ void burnDialog::checkFw(QString fileName) ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width(), ui->imageLabel->height()).convertToFormat(flash.getSplashFormat()))); ui->PatchFWCB->setEnabled(true); ui->PatchFWCB->setChecked(PatchFwCB); - } else { + } + else { ui->PatchFWCB->setDisabled(true); ui->PatchFWCB->setChecked(false); ui->PreferredImageCB->setDisabled(true); } - } else { + } + else { ui->PatchFWCB->setDisabled(true); ui->PatchFWCB->setChecked(false); ui->PreferredImageCB->setDisabled(true); } } - } else { + } + else { ui->FwImage->hide(); ui->ImageFileName->setText(""); ui->SplashFrame->hide(); } - } else { + } + else { QMessageBox::warning(this, tr("Warning"), tr("%1 is not a known firmware").arg(fileName)); ui->BurnFlashButton->setText(tr("Burn anyway !")); ui->BurnFlashButton->setEnabled(true); @@ -267,7 +282,8 @@ 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 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; @@ -292,7 +308,7 @@ bool burnDialog::checkeEprom(QString fileName) uint8_t eeprom[EESIZE_RLC_MAX]; int eeprom_size = HexInterface(inputStream).load(eeprom, EESIZE_RLC_MAX); if (!eeprom_size) { - int res = QMessageBox::question(this, "companion9x",tr("Invalid binary Models and Settings File %1, Proceed anyway ?").arg(fileName),QMessageBox::Yes | QMessageBox::No); + int res = QMessageBox::question(this, "Companion",tr("Invalid binary Models and Settings File %1, Proceed anyway ?").arg(fileName),QMessageBox::Yes | QMessageBox::No); if (res == QMessageBox::No) { return false; } @@ -302,7 +318,7 @@ bool burnDialog::checkeEprom(QString fileName) } file.close(); if (!LoadEeprom(radioData, eeprom, eeprom_size)) { - int res = QMessageBox::question(this, "companion9x",tr("Invalid binary Models and Settings File %1, Proceed anyway ?").arg(fileName),QMessageBox::Yes | QMessageBox::No); + int res = QMessageBox::question(this, "Companion",tr("Invalid binary Models and Settings File %1, Proceed anyway ?").arg(fileName),QMessageBox::Yes | QMessageBox::No); if (res == QMessageBox::No) { return false; } @@ -310,7 +326,8 @@ bool burnDialog::checkeEprom(QString fileName) ui->FWFileName->setText(fileName); return true; } - } else if (fileType==FILE_TYPE_BIN) { //read binary + } + else if (fileType==FILE_TYPE_BIN) { //read binary int eeprom_size = file.size(); if (!file.open(QFile::ReadOnly)) { //reading binary file - TODO HEX support QMessageBox::critical(this, tr("Error"),tr("Error opening file %1:\n%2.").arg(fileName).arg(file.errorString())); @@ -325,7 +342,7 @@ bool burnDialog::checkeEprom(QString fileName) return false; } if (!LoadEeprom(radioData, eeprom, eeprom_size)) { - int res = QMessageBox::question(this, "companion9x",tr("Invalid binary Models and Settings File %1, Proceed anyway ?").arg(fileName),QMessageBox::Yes | QMessageBox::No); + int res = QMessageBox::question(this, "Companion",tr("Invalid binary Models and Settings File %1, Proceed anyway ?").arg(fileName),QMessageBox::Yes | QMessageBox::No); if (res == QMessageBox::No) { return false; } @@ -343,7 +360,7 @@ void burnDialog::on_ImageLoadButton_clicked() supportedImageFormats += QLatin1String(" *.") + QImageReader::supportedImageFormats()[formatIndex]; } - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString fileName = QFileDialog::getOpenFileName(this, tr("Open Image to load"), settings.value("lastImagesDir").toString(), tr("Images (%1)").arg(supportedImageFormats)); @@ -365,17 +382,16 @@ void burnDialog::on_ImageLoadButton_clicked() int gray; int width = image.width(); int height = image.height(); - for (int i = 0; i < width; ++i) - { - for (int j = 0; j < height; ++j) - { - col = image.pixel(i, j); - gray = qGray(col); - image.setPixel(i, j, qRgb(gray, gray, gray)); - } + for (int i = 0; i < width; ++i) { + for (int j = 0; j < height; ++j) { + col = image.pixel(i, j); + gray = qGray(col); + image.setPixel(i, j, qRgb(gray, gray, gray)); + } } ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width(), ui->imageLabel->height()))); - } else { + } + else { ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width(), ui->imageLabel->height()).convertToFormat(QImage::Format_Mono))); } ui->PatchFWCB->setEnabled(true); @@ -426,7 +442,7 @@ void burnDialog::on_BurnFlashButton_clicked() if (hexType==2) { QString fileName=ui->FWFileName->text(); if (!fileName.isEmpty()) { - QSettings settings("companion9x", "companion9x"); + QSettings settings; settings.setValue("lastFlashDir", QFileInfo(fileName).dir().absolutePath()); settings.setValue("lastFw", fileName); if (ui->PatchFWCB->isChecked()) { @@ -463,7 +479,7 @@ void burnDialog::on_BurnFlashButton_clicked() } } if (hexType==1) { - QSettings settings("companion9x", "companion9x"); + QSettings settings; int profileid=settings.value("profileId", 1).toInt(); settings.beginGroup("Profiles"); QString profile=QString("profile%1").arg(profileid); @@ -640,7 +656,7 @@ void burnDialog::on_PreferredImageCB_toggled(bool checked) { QString tmpFileName; if (checked) { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString ImageStr = settings.value("SplashImage", "").toString(); if (!ImageStr.isEmpty()) { QImage Image = qstring2image(ImageStr); diff --git a/companion/src/burndialog.ui b/companion/src/burndialog.ui index d9c51ec35..e86634e9a 100644 --- a/companion/src/burndialog.ui +++ b/companion/src/burndialog.ui @@ -26,8 +26,8 @@ Customize Splash - - :/images/c_home.png:/images/c_home.png + + :/icon.png:/icon.png @@ -273,7 +273,7 @@ - Allows companion9x to write to older version of the firmware + Allows Companion to write to older version of the firmware Check Firmware compatibility @@ -455,10 +455,6 @@ ... - - - :/images/library.png:/images/library.png - 16 @@ -488,7 +484,7 @@ BurnFlashButton - + diff --git a/companion/src/companion.desktop b/companion/src/companion.desktop new file mode 100644 index 000000000..df19a4a80 --- /dev/null +++ b/companion/src/companion.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Encoding=UTF-8 +Name=Companion +GenericName=Transmitter Companion App +Comment=The Ultimate Transmitter Companion +Icon=companion +Exec='companion' +Terminal=false +StartupNotify=false +Categories=Application diff --git a/companion/src/companion.qrc b/companion/src/companion.qrc new file mode 100644 index 000000000..acb1591a1 --- /dev/null +++ b/companion/src/companion.qrc @@ -0,0 +1,969 @@ + + + images/customize.png + icon.png + ../../CREDITS.txt + ../../DONATIONS.txt + ../releasenotes.txt + images/9xdb.png + images/9xdl.png + images/9xdr.png + images/9xdt.png + images/9xdb-bl.png + images/9xdl-bl.png + images/9xdr-bl.png + images/9xdt-bl.png + images/9xdb-gr.png + images/9xdl-gr.png + images/9xdr-gr.png + images/9xdt-gr.png + images/9xdb-or.png + images/9xdl-or.png + images/9xdr-or.png + images/9xdt-or.png + images/9xdb-yl.png + images/9xdl-yl.png + images/9xdr-yl.png + images/9xdt-yl.png + images/9xdb-rd.png + images/9xdl-rd.png + images/9xdr-rd.png + images/9xdt-rd.png + images/9xmenu.png + images/9xmenumenu.png + images/9xmenuexit.png + images/9xcurs.png + images/9xcursup.png + images/9xcursplus.png + images/9xcursmin.png + images/9xcursdown.png + images/9xcursphoto.png + images/screenshot.png + images/splash.png + images/splasht.png + images/companion-title.png + images/maps.png + images/track.png + images/track0.png + images/x9b0.png + images/x9l0.png + images/x9l1.png + images/x9l2.png + images/x9l3.png + images/x9l4.png + images/x9r0.png + images/x9r1.png + images/x9r2.png + images/x9r3.png + images/x9s0.png + images/x9t0.png + images/mcw/aicon.png + images/mcw/dicon.png + images/mcw/gicon.png + images/mcw/hicon.png + images/mcw/at1e1r.png + images/mcw/at2e1r.png + images/mcw/atailv.png + images/mcw/aw0a0f.png + images/mcw/aw1a0f.png + images/mcw/aw1a1f.png + images/mcw/aw1a2f.png + images/mcw/aw2a0f.png + images/mcw/aw2a1f.png + images/mcw/aw2a2f.png + images/mcw/h90.png + images/mcw/h120.png + images/mcw/h120x.png + images/mcw/h140.png + images/mcw/hfbl.png + images/mcw/htailg.png + images/mcw/htailng.png + images/mcw/htailfblg.png + images/mcw/htailfblng.png + images/mcw/gt1e1r.png + images/mcw/gt2e1r.png + images/mcw/gtailv.png + images/mcw/gw0t0a0f0s.png + images/mcw/gw0t1a0f0s.png + images/mcw/gw0t1a0f1s.png + images/mcw/gw0t1a0f2s.png + images/mcw/gw0t1a1f0s.png + images/mcw/gw0t1a1f1s.png + images/mcw/gw0t1a1f2s.png + images/mcw/gw0t1a2f0s.png + images/mcw/gw0t1a2f1s.png + images/mcw/gw0t1a2f2s.png + images/mcw/gw0t2a0f0s.png + images/mcw/gw0t2a0f1s.png + images/mcw/gw0t2a0f2s.png + images/mcw/gw0t2a1f0s.png + images/mcw/gw0t2a1f1s.png + images/mcw/gw0t2a1f2s.png + images/mcw/gw0t2a2f0s.png + images/mcw/gw0t2a2f1s.png + images/mcw/gw0t2a2f2s.png + images/mcw/gw1t0a0f0s.png + images/mcw/gw1t1a0f0s.png + images/mcw/gw1t1a0f1s.png + images/mcw/gw1t1a0f2s.png + images/mcw/gw1t1a1f0s.png + images/mcw/gw1t1a1f1s.png + images/mcw/gw1t1a1f2s.png + images/mcw/gw1t1a2f0s.png + images/mcw/gw1t1a2f1s.png + images/mcw/gw1t1a2f2s.png + images/mcw/gw1t2a0f0s.png + images/mcw/gw1t2a0f1s.png + images/mcw/gw1t2a0f2s.png + images/mcw/gw1t2a1f0s.png + images/mcw/gw1t2a1f1s.png + images/mcw/gw1t2a1f2s.png + images/mcw/gw1t2a2f0s.png + images/mcw/gw1t2a2f1s.png + images/mcw/gw1t2a2f2s.png + images/mcw/db0t2e0f0r.png + images/mcw/db0t2e0f1r.png + images/mcw/db0t2e0f2r.png + images/mcw/db0t2e1f0r.png + images/mcw/db0t2e1f1r.png + images/mcw/db0t2e1f2r.png + images/mcw/db0t2e2f0r.png + images/mcw/db0t2e2f1r.png + images/mcw/db0t2e2f2r.png + images/mcw/db1t2e0f0r.png + images/mcw/db1t2e0f1r.png + images/mcw/db1t2e0f2r.png + images/mcw/db1t2e1f0r.png + images/mcw/db1t2e1f1r.png + images/mcw/db1t2e1f2r.png + images/mcw/db1t2e2f0r.png + images/mcw/db1t2e2f1r.png + images/mcw/db1t2e2f2r.png + images/mcw/dt0t2e0f0r.png + images/mcw/dt0t2e0f1r.png + images/mcw/dt0t2e0f2r.png + images/mcw/dt0t2e1f0r.png + images/mcw/dt0t2e1f1r.png + images/mcw/dt0t2e1f2r.png + images/mcw/dt0t2e2f0r.png + images/mcw/dt0t2e2f1r.png + images/mcw/dt0t2e2f2r.png + images/mcw/dt1t2e0f0r.png + images/mcw/dt1t2e0f1r.png + images/mcw/dt1t2e0f2r.png + images/mcw/dt1t2e1f0r.png + images/mcw/dt1t2e1f1r.png + images/mcw/dt1t2e1f2r.png + images/mcw/dt1t2e2f0r.png + images/mcw/dt1t2e2f1r.png + images/mcw/dt1t2e2f2r.png + images/library/00001.png + images/library/00002.png + images/library/00003.png + images/library/00004.png + images/library/00005.png + images/library/00006.png + images/library/00007.png + images/library/00008.png + images/library/00009.png + images/library/00010.png + images/library/00011.png + images/library/00012.png + images/library/00013.png + images/library/00014.png + images/library/00015.png + images/library/00016.png + images/library/01001.png + images/library/01002.png + images/library/01003.png + images/library/01004.png + images/library/01005.png + images/library/01006.png + images/library/01007.png + images/library/01008.png + images/library/10001.png + images/library/10002.png + images/library/10003.png + images/library/10004.png + images/library/10005.png + images/library/10006.png + images/library/10007.png + images/library/10008.png + images/library/10009.png + images/library/10010.png + images/library/10011.png + images/library/10012.png + images/library/10013.png + images/library/10014.png + images/library/10015.png + images/library/10016.png + images/library/10017.png + images/library/10018.png + images/library/10019.png + images/library/10020.png + images/library/10021.png + images/library/10022.png + images/library/10023.png + images/library/10024.png + images/library/10033.png + images/library/10034.png + images/library/10035.png + images/library/10036.png + images/library/10049.png + images/library/10050.png + images/library/10051.png + images/library/10052.png + images/library/10037.png + images/library/10038.png + images/library/10039.png + images/library/10040.png + images/library/10053.png + images/library/10054.png + images/library/10055.png + images/library/10056.png + images/library/10025.png + images/library/10026.png + images/library/10027.png + images/library/10028.png + images/library/10029.png + images/library/10030.png + images/library/10031.png + images/library/10032.png + images/library/10041.png + images/library/10042.png + images/library/10043.png + images/library/10044.png + images/library/10057.png + images/library/10058.png + images/library/10059.png + images/library/10060.png + images/library/10045.png + images/library/10046.png + images/library/10047.png + images/library/10048.png + images/library/10061.png + images/library/10062.png + images/library/10063.png + images/library/10064.png + images/library/10065.png + images/library/10066.png + images/library/10067.png + images/library/10068.png + images/library/10081.png + images/library/10082.png + images/library/10083.png + images/library/10084.png + images/library/10069.png + images/library/10070.png + images/library/10071.png + images/library/10072.png + images/library/10085.png + images/library/10086.png + images/library/10087.png + images/library/10088.png + images/library/10073.png + images/library/10074.png + images/library/10075.png + images/library/10076.png + images/library/10089.png + images/library/10090.png + images/library/10091.png + images/library/10092.png + images/library/10077.png + images/library/10078.png + images/library/10079.png + images/library/10080.png + images/library/10093.png + images/library/10094.png + images/library/10095.png + images/library/10096.png + images/library/10097.png + images/library/10098.png + images/library/10099.png + images/library/10100.png + images/library/10101.png + images/library/10102.png + images/library/10103.png + images/library/10104.png + images/library/20001.png + images/library/20002.png + images/library/20003.png + images/library/20004.png + images/library/30001.png + images/library/30002.png + images/library/30003.png + images/library/30004.png + themes/monochrome/16/paintbrush.png + themes/monochrome/16/open.png + themes/monochrome/16/edit.png + themes/monochrome/16/information.png + themes/monochrome/16/configure.png + themes/monochrome/16/list.png + themes/monochrome/16/wizard.png + themes/monochrome/16/logs.png + themes/monochrome/16/new.png + themes/monochrome/16/save.png + themes/monochrome/16/recentdocument.png + themes/monochrome/16/simulate.png + themes/monochrome/16/changelog.png + themes/monochrome/16/copy.png + themes/monochrome/16/write_flash.png + themes/monochrome/16/read_eeprom_file.png + themes/monochrome/16/clear.png + themes/monochrome/16/play.png + themes/monochrome/16/fuses.png + themes/monochrome/16/arrow-right.png + themes/monochrome/16/exit.png + themes/monochrome/16/moveup.png + themes/monochrome/16/read_eeprom.png + themes/monochrome/16/cut.png + themes/monochrome/16/arrow-left.png + themes/monochrome/16/write_eeprom_file.png + themes/monochrome/16/library.png + themes/monochrome/16/profiles.png + themes/monochrome/16/paste.png + themes/monochrome/16/print.png + themes/monochrome/16/compare.png + themes/monochrome/16/saveas.png + themes/monochrome/16/preferences.png + themes/monochrome/16/movedown.png + themes/monochrome/16/currentmodel.png + themes/monochrome/16/read_flash.png + themes/monochrome/16/duplicate.png + themes/monochrome/16/add.png + themes/monochrome/16/update.png + themes/monochrome/16/contributors.png + themes/monochrome/16/stop.png + themes/monochrome/16/write_eeprom.png + themes/monochrome/24/paintbrush.png + themes/monochrome/24/open.png + themes/monochrome/24/edit.png + themes/monochrome/24/information.png + themes/monochrome/24/configure.png + themes/monochrome/24/list.png + themes/monochrome/24/wizard.png + themes/monochrome/24/logs.png + themes/monochrome/24/new.png + themes/monochrome/24/save.png + themes/monochrome/24/recentdocument.png + themes/monochrome/24/simulate.png + themes/monochrome/24/changelog.png + themes/monochrome/24/copy.png + themes/monochrome/24/write_flash.png + themes/monochrome/24/read_eeprom_file.png + themes/monochrome/24/clear.png + themes/monochrome/24/play.png + themes/monochrome/24/fuses.png + themes/monochrome/24/arrow-right.png + themes/monochrome/24/exit.png + themes/monochrome/24/moveup.png + themes/monochrome/24/read_eeprom.png + themes/monochrome/24/cut.png + themes/monochrome/24/arrow-left.png + themes/monochrome/24/write_eeprom_file.png + themes/monochrome/24/library.png + themes/monochrome/24/profiles.png + themes/monochrome/24/paste.png + themes/monochrome/24/print.png + themes/monochrome/24/compare.png + themes/monochrome/24/saveas.png + themes/monochrome/24/preferences.png + themes/monochrome/24/movedown.png + themes/monochrome/24/currentmodel.png + themes/monochrome/24/read_flash.png + themes/monochrome/24/duplicate.png + themes/monochrome/24/add.png + themes/monochrome/24/update.png + themes/monochrome/24/contributors.png + themes/monochrome/24/stop.png + themes/monochrome/24/write_eeprom.png + themes/monochrome/32/paintbrush.png + themes/monochrome/32/open.png + themes/monochrome/32/edit.png + themes/monochrome/32/information.png + themes/monochrome/32/configure.png + themes/monochrome/32/list.png + themes/monochrome/32/wizard.png + themes/monochrome/32/logs.png + themes/monochrome/32/new.png + themes/monochrome/32/save.png + themes/monochrome/32/recentdocument.png + themes/monochrome/32/simulate.png + themes/monochrome/32/changelog.png + themes/monochrome/32/copy.png + themes/monochrome/32/write_flash.png + themes/monochrome/32/read_eeprom_file.png + themes/monochrome/32/clear.png + themes/monochrome/32/play.png + themes/monochrome/32/fuses.png + themes/monochrome/32/arrow-right.png + themes/monochrome/32/exit.png + themes/monochrome/32/moveup.png + themes/monochrome/32/read_eeprom.png + themes/monochrome/32/cut.png + themes/monochrome/32/arrow-left.png + themes/monochrome/32/write_eeprom_file.png + themes/monochrome/32/library.png + themes/monochrome/32/profiles.png + themes/monochrome/32/paste.png + themes/monochrome/32/print.png + themes/monochrome/32/compare.png + themes/monochrome/32/saveas.png + themes/monochrome/32/preferences.png + themes/monochrome/32/movedown.png + themes/monochrome/32/currentmodel.png + themes/monochrome/32/read_flash.png + themes/monochrome/32/duplicate.png + themes/monochrome/32/add.png + themes/monochrome/32/update.png + themes/monochrome/32/contributors.png + themes/monochrome/32/stop.png + themes/monochrome/32/write_eeprom.png + themes/monochrome/48/paintbrush.png + themes/monochrome/48/open.png + themes/monochrome/48/edit.png + themes/monochrome/48/information.png + themes/monochrome/48/configure.png + themes/monochrome/48/list.png + themes/monochrome/48/wizard.png + themes/monochrome/48/logs.png + themes/monochrome/48/new.png + themes/monochrome/48/save.png + themes/monochrome/48/recentdocument.png + themes/monochrome/48/simulate.png + themes/monochrome/48/changelog.png + themes/monochrome/48/copy.png + themes/monochrome/48/write_flash.png + themes/monochrome/48/read_eeprom_file.png + themes/monochrome/48/clear.png + themes/monochrome/48/play.png + themes/monochrome/48/fuses.png + themes/monochrome/48/arrow-right.png + themes/monochrome/48/exit.png + themes/monochrome/48/moveup.png + themes/monochrome/48/read_eeprom.png + themes/monochrome/48/cut.png + themes/monochrome/48/arrow-left.png + themes/monochrome/48/write_eeprom_file.png + themes/monochrome/48/library.png + themes/monochrome/48/profiles.png + themes/monochrome/48/paste.png + themes/monochrome/48/print.png + themes/monochrome/48/compare.png + themes/monochrome/48/saveas.png + themes/monochrome/48/preferences.png + themes/monochrome/48/movedown.png + themes/monochrome/48/currentmodel.png + themes/monochrome/48/read_flash.png + themes/monochrome/48/duplicate.png + themes/monochrome/48/add.png + themes/monochrome/48/update.png + themes/monochrome/48/contributors.png + themes/monochrome/48/stop.png + themes/monochrome/48/write_eeprom.png + themes/classic/16/paintbrush.png + themes/classic/16/open.png + themes/classic/16/edit.png + themes/classic/16/information.png + themes/classic/16/configure.png + themes/classic/16/list.png + themes/classic/16/wizard.png + themes/classic/16/logs.png + themes/classic/16/new.png + themes/classic/16/save.png + themes/classic/16/recentdocument.png + themes/classic/16/simulate.png + themes/classic/16/changelog.png + themes/classic/16/copy.png + themes/classic/16/write_flash.png + themes/classic/16/read_eeprom_file.png + themes/classic/16/clear.png + themes/classic/16/play.png + themes/classic/16/fuses.png + themes/classic/16/arrow-right.png + themes/classic/16/exit.png + themes/classic/16/moveup.png + themes/classic/16/read_eeprom.png + themes/classic/16/cut.png + themes/classic/16/arrow-left.png + themes/classic/16/write_eeprom_file.png + themes/classic/16/library.png + themes/classic/16/profiles.png + themes/classic/16/paste.png + themes/classic/16/print.png + themes/classic/16/compare.png + themes/classic/16/saveas.png + themes/classic/16/preferences.png + themes/classic/16/movedown.png + themes/classic/16/currentmodel.png + themes/classic/16/read_flash.png + themes/classic/16/duplicate.png + themes/classic/16/add.png + themes/classic/16/update.png + themes/classic/16/contributors.png + themes/classic/16/stop.png + themes/classic/16/write_eeprom.png + themes/classic/24/paintbrush.png + themes/classic/24/open.png + themes/classic/24/edit.png + themes/classic/24/information.png + themes/classic/24/configure.png + themes/classic/24/list.png + themes/classic/24/wizard.png + themes/classic/24/logs.png + themes/classic/24/new.png + themes/classic/24/save.png + themes/classic/24/recentdocument.png + themes/classic/24/simulate.png + themes/classic/24/changelog.png + themes/classic/24/copy.png + themes/classic/24/write_flash.png + themes/classic/24/read_eeprom_file.png + themes/classic/24/clear.png + themes/classic/24/play.png + themes/classic/24/fuses.png + themes/classic/24/arrow-right.png + themes/classic/24/exit.png + themes/classic/24/moveup.png + themes/classic/24/read_eeprom.png + themes/classic/24/cut.png + themes/classic/24/arrow-left.png + themes/classic/24/write_eeprom_file.png + themes/classic/24/library.png + themes/classic/24/profiles.png + themes/classic/24/paste.png + themes/classic/24/print.png + themes/classic/24/compare.png + themes/classic/24/saveas.png + themes/classic/24/preferences.png + themes/classic/24/movedown.png + themes/classic/24/currentmodel.png + themes/classic/24/read_flash.png + themes/classic/24/duplicate.png + themes/classic/24/add.png + themes/classic/24/update.png + themes/classic/24/contributors.png + themes/classic/24/stop.png + themes/classic/24/write_eeprom.png + themes/classic/32/paintbrush.png + themes/classic/32/open.png + themes/classic/32/edit.png + themes/classic/32/information.png + themes/classic/32/configure.png + themes/classic/32/list.png + themes/classic/32/wizard.png + themes/classic/32/logs.png + themes/classic/32/new.png + themes/classic/32/save.png + themes/classic/32/recentdocument.png + themes/classic/32/simulate.png + themes/classic/32/changelog.png + themes/classic/32/copy.png + themes/classic/32/write_flash.png + themes/classic/32/read_eeprom_file.png + themes/classic/32/clear.png + themes/classic/32/play.png + themes/classic/32/fuses.png + themes/classic/32/arrow-right.png + themes/classic/32/exit.png + themes/classic/32/moveup.png + themes/classic/32/read_eeprom.png + themes/classic/32/cut.png + themes/classic/32/arrow-left.png + themes/classic/32/write_eeprom_file.png + themes/classic/32/library.png + themes/classic/32/profiles.png + themes/classic/32/paste.png + themes/classic/32/print.png + themes/classic/32/compare.png + themes/classic/32/saveas.png + themes/classic/32/preferences.png + themes/classic/32/movedown.png + themes/classic/32/currentmodel.png + themes/classic/32/read_flash.png + themes/classic/32/duplicate.png + themes/classic/32/add.png + themes/classic/32/update.png + themes/classic/32/contributors.png + themes/classic/32/stop.png + themes/classic/32/write_eeprom.png + themes/classic/48/paintbrush.png + themes/classic/48/open.png + themes/classic/48/edit.png + themes/classic/48/information.png + themes/classic/48/configure.png + themes/classic/48/list.png + themes/classic/48/wizard.png + themes/classic/48/logs.png + themes/classic/48/new.png + themes/classic/48/save.png + themes/classic/48/recentdocument.png + themes/classic/48/simulate.png + themes/classic/48/changelog.png + themes/classic/48/copy.png + themes/classic/48/write_flash.png + themes/classic/48/read_eeprom_file.png + themes/classic/48/clear.png + themes/classic/48/play.png + themes/classic/48/fuses.png + themes/classic/48/arrow-right.png + themes/classic/48/exit.png + themes/classic/48/moveup.png + themes/classic/48/read_eeprom.png + themes/classic/48/cut.png + themes/classic/48/arrow-left.png + themes/classic/48/write_eeprom_file.png + themes/classic/48/library.png + themes/classic/48/profiles.png + themes/classic/48/paste.png + themes/classic/48/print.png + themes/classic/48/compare.png + themes/classic/48/saveas.png + themes/classic/48/preferences.png + themes/classic/48/movedown.png + themes/classic/48/currentmodel.png + themes/classic/48/read_flash.png + themes/classic/48/duplicate.png + themes/classic/48/add.png + themes/classic/48/update.png + themes/classic/48/contributors.png + themes/classic/48/stop.png + themes/classic/48/write_eeprom.png + themes/monoblue/16/paintbrush.png + themes/monoblue/16/open.png + themes/monoblue/16/edit.png + themes/monoblue/16/information.png + themes/monoblue/16/configure.png + themes/monoblue/16/list.png + themes/monoblue/16/wizard.png + themes/monoblue/16/logs.png + themes/monoblue/16/new.png + themes/monoblue/16/save.png + themes/monoblue/16/recentdocument.png + themes/monoblue/16/simulate.png + themes/monoblue/16/changelog.png + themes/monoblue/16/copy.png + themes/monoblue/16/write_flash.png + themes/monoblue/16/read_eeprom_file.png + themes/monoblue/16/clear.png + themes/monoblue/16/play.png + themes/monoblue/16/fuses.png + themes/monoblue/16/arrow-right.png + themes/monoblue/16/exit.png + themes/monoblue/16/moveup.png + themes/monoblue/16/read_eeprom.png + themes/monoblue/16/cut.png + themes/monoblue/16/arrow-left.png + themes/monoblue/16/write_eeprom_file.png + themes/monoblue/16/library.png + themes/monoblue/16/profiles.png + themes/monoblue/16/paste.png + themes/monoblue/16/print.png + themes/monoblue/16/compare.png + themes/monoblue/16/saveas.png + themes/monoblue/16/preferences.png + themes/monoblue/16/movedown.png + themes/monoblue/16/currentmodel.png + themes/monoblue/16/read_flash.png + themes/monoblue/16/duplicate.png + themes/monoblue/16/add.png + themes/monoblue/16/update.png + themes/monoblue/16/contributors.png + themes/monoblue/16/stop.png + themes/monoblue/16/write_eeprom.png + themes/monoblue/24/paintbrush.png + themes/monoblue/24/open.png + themes/monoblue/24/edit.png + themes/monoblue/24/information.png + themes/monoblue/24/configure.png + themes/monoblue/24/list.png + themes/monoblue/24/wizard.png + themes/monoblue/24/logs.png + themes/monoblue/24/new.png + themes/monoblue/24/save.png + themes/monoblue/24/recentdocument.png + themes/monoblue/24/simulate.png + themes/monoblue/24/changelog.png + themes/monoblue/24/copy.png + themes/monoblue/24/write_flash.png + themes/monoblue/24/read_eeprom_file.png + themes/monoblue/24/clear.png + themes/monoblue/24/play.png + themes/monoblue/24/fuses.png + themes/monoblue/24/arrow-right.png + themes/monoblue/24/exit.png + themes/monoblue/24/moveup.png + themes/monoblue/24/read_eeprom.png + themes/monoblue/24/cut.png + themes/monoblue/24/arrow-left.png + themes/monoblue/24/write_eeprom_file.png + themes/monoblue/24/library.png + themes/monoblue/24/profiles.png + themes/monoblue/24/paste.png + themes/monoblue/24/print.png + themes/monoblue/24/compare.png + themes/monoblue/24/saveas.png + themes/monoblue/24/preferences.png + themes/monoblue/24/movedown.png + themes/monoblue/24/currentmodel.png + themes/monoblue/24/read_flash.png + themes/monoblue/24/duplicate.png + themes/monoblue/24/add.png + themes/monoblue/24/update.png + themes/monoblue/24/contributors.png + themes/monoblue/24/stop.png + themes/monoblue/24/write_eeprom.png + themes/monoblue/32/paintbrush.png + themes/monoblue/32/open.png + themes/monoblue/32/edit.png + themes/monoblue/32/information.png + themes/monoblue/32/configure.png + themes/monoblue/32/list.png + themes/monoblue/32/wizard.png + themes/monoblue/32/logs.png + themes/monoblue/32/new.png + themes/monoblue/32/save.png + themes/monoblue/32/recentdocument.png + themes/monoblue/32/simulate.png + themes/monoblue/32/changelog.png + themes/monoblue/32/copy.png + themes/monoblue/32/write_flash.png + themes/monoblue/32/read_eeprom_file.png + themes/monoblue/32/clear.png + themes/monoblue/32/play.png + themes/monoblue/32/fuses.png + themes/monoblue/32/arrow-right.png + themes/monoblue/32/exit.png + themes/monoblue/32/moveup.png + themes/monoblue/32/read_eeprom.png + themes/monoblue/32/cut.png + themes/monoblue/32/arrow-left.png + themes/monoblue/32/write_eeprom_file.png + themes/monoblue/32/library.png + themes/monoblue/32/profiles.png + themes/monoblue/32/paste.png + themes/monoblue/32/print.png + themes/monoblue/32/compare.png + themes/monoblue/32/saveas.png + themes/monoblue/32/preferences.png + themes/monoblue/32/movedown.png + themes/monoblue/32/currentmodel.png + themes/monoblue/32/read_flash.png + themes/monoblue/32/duplicate.png + themes/monoblue/32/add.png + themes/monoblue/32/update.png + themes/monoblue/32/contributors.png + themes/monoblue/32/stop.png + themes/monoblue/32/write_eeprom.png + themes/monoblue/48/paintbrush.png + themes/monoblue/48/open.png + themes/monoblue/48/edit.png + themes/monoblue/48/information.png + themes/monoblue/48/configure.png + themes/monoblue/48/list.png + themes/monoblue/48/wizard.png + themes/monoblue/48/logs.png + themes/monoblue/48/new.png + themes/monoblue/48/save.png + themes/monoblue/48/recentdocument.png + themes/monoblue/48/simulate.png + themes/monoblue/48/changelog.png + themes/monoblue/48/copy.png + themes/monoblue/48/write_flash.png + themes/monoblue/48/read_eeprom_file.png + themes/monoblue/48/clear.png + themes/monoblue/48/play.png + themes/monoblue/48/fuses.png + themes/monoblue/48/arrow-right.png + themes/monoblue/48/exit.png + themes/monoblue/48/moveup.png + themes/monoblue/48/read_eeprom.png + themes/monoblue/48/cut.png + themes/monoblue/48/arrow-left.png + themes/monoblue/48/write_eeprom_file.png + themes/monoblue/48/library.png + themes/monoblue/48/profiles.png + themes/monoblue/48/paste.png + themes/monoblue/48/print.png + themes/monoblue/48/compare.png + themes/monoblue/48/saveas.png + themes/monoblue/48/preferences.png + themes/monoblue/48/movedown.png + themes/monoblue/48/currentmodel.png + themes/monoblue/48/read_flash.png + themes/monoblue/48/duplicate.png + themes/monoblue/48/add.png + themes/monoblue/48/update.png + themes/monoblue/48/contributors.png + themes/monoblue/48/stop.png + themes/monoblue/48/write_eeprom.png + themes/monowhite/16/paintbrush.png + themes/monowhite/16/open.png + themes/monowhite/16/edit.png + themes/monowhite/16/information.png + themes/monowhite/16/configure.png + themes/monowhite/16/list.png + themes/monowhite/16/wizard.png + themes/monowhite/16/logs.png + themes/monowhite/16/new.png + themes/monowhite/16/save.png + themes/monowhite/16/recentdocument.png + themes/monowhite/16/simulate.png + themes/monowhite/16/changelog.png + themes/monowhite/16/copy.png + themes/monowhite/16/write_flash.png + themes/monowhite/16/read_eeprom_file.png + themes/monowhite/16/clear.png + themes/monowhite/16/play.png + themes/monowhite/16/fuses.png + themes/monowhite/16/arrow-right.png + themes/monowhite/16/exit.png + themes/monowhite/16/moveup.png + themes/monowhite/16/read_eeprom.png + themes/monowhite/16/cut.png + themes/monowhite/16/arrow-left.png + themes/monowhite/16/write_eeprom_file.png + themes/monowhite/16/library.png + themes/monowhite/16/profiles.png + themes/monowhite/16/paste.png + themes/monowhite/16/print.png + themes/monowhite/16/compare.png + themes/monowhite/16/saveas.png + themes/monowhite/16/preferences.png + themes/monowhite/16/movedown.png + themes/monowhite/16/currentmodel.png + themes/monowhite/16/read_flash.png + themes/monowhite/16/duplicate.png + themes/monowhite/16/add.png + themes/monowhite/16/update.png + themes/monowhite/16/contributors.png + themes/monowhite/16/stop.png + themes/monowhite/16/write_eeprom.png + themes/monowhite/24/paintbrush.png + themes/monowhite/24/open.png + themes/monowhite/24/edit.png + themes/monowhite/24/information.png + themes/monowhite/24/configure.png + themes/monowhite/24/list.png + themes/monowhite/24/wizard.png + themes/monowhite/24/logs.png + themes/monowhite/24/new.png + themes/monowhite/24/save.png + themes/monowhite/24/recentdocument.png + themes/monowhite/24/simulate.png + themes/monowhite/24/changelog.png + themes/monowhite/24/copy.png + themes/monowhite/24/write_flash.png + themes/monowhite/24/read_eeprom_file.png + themes/monowhite/24/clear.png + themes/monowhite/24/play.png + themes/monowhite/24/fuses.png + themes/monowhite/24/arrow-right.png + themes/monowhite/24/exit.png + themes/monowhite/24/moveup.png + themes/monowhite/24/read_eeprom.png + themes/monowhite/24/cut.png + themes/monowhite/24/arrow-left.png + themes/monowhite/24/write_eeprom_file.png + themes/monowhite/24/library.png + themes/monowhite/24/profiles.png + themes/monowhite/24/paste.png + themes/monowhite/24/print.png + themes/monowhite/24/compare.png + themes/monowhite/24/saveas.png + themes/monowhite/24/preferences.png + themes/monowhite/24/movedown.png + themes/monowhite/24/currentmodel.png + themes/monowhite/24/read_flash.png + themes/monowhite/24/duplicate.png + themes/monowhite/24/add.png + themes/monowhite/24/update.png + themes/monowhite/24/contributors.png + themes/monowhite/24/stop.png + themes/monowhite/24/write_eeprom.png + themes/monowhite/32/paintbrush.png + themes/monowhite/32/open.png + themes/monowhite/32/edit.png + themes/monowhite/32/information.png + themes/monowhite/32/configure.png + themes/monowhite/32/list.png + themes/monowhite/32/wizard.png + themes/monowhite/32/logs.png + themes/monowhite/32/new.png + themes/monowhite/32/save.png + themes/monowhite/32/recentdocument.png + themes/monowhite/32/simulate.png + themes/monowhite/32/changelog.png + themes/monowhite/32/copy.png + themes/monowhite/32/write_flash.png + themes/monowhite/32/read_eeprom_file.png + themes/monowhite/32/clear.png + themes/monowhite/32/play.png + themes/monowhite/32/fuses.png + themes/monowhite/32/arrow-right.png + themes/monowhite/32/exit.png + themes/monowhite/32/moveup.png + themes/monowhite/32/read_eeprom.png + themes/monowhite/32/cut.png + themes/monowhite/32/arrow-left.png + themes/monowhite/32/write_eeprom_file.png + themes/monowhite/32/library.png + themes/monowhite/32/profiles.png + themes/monowhite/32/paste.png + themes/monowhite/32/print.png + themes/monowhite/32/compare.png + themes/monowhite/32/saveas.png + themes/monowhite/32/preferences.png + themes/monowhite/32/movedown.png + themes/monowhite/32/currentmodel.png + themes/monowhite/32/read_flash.png + themes/monowhite/32/duplicate.png + themes/monowhite/32/add.png + themes/monowhite/32/update.png + themes/monowhite/32/contributors.png + themes/monowhite/32/stop.png + themes/monowhite/32/write_eeprom.png + themes/monowhite/48/paintbrush.png + themes/monowhite/48/open.png + themes/monowhite/48/edit.png + themes/monowhite/48/information.png + themes/monowhite/48/configure.png + themes/monowhite/48/list.png + themes/monowhite/48/wizard.png + themes/monowhite/48/logs.png + themes/monowhite/48/new.png + themes/monowhite/48/save.png + themes/monowhite/48/recentdocument.png + themes/monowhite/48/simulate.png + themes/monowhite/48/changelog.png + themes/monowhite/48/copy.png + themes/monowhite/48/write_flash.png + themes/monowhite/48/read_eeprom_file.png + themes/monowhite/48/clear.png + themes/monowhite/48/play.png + themes/monowhite/48/fuses.png + themes/monowhite/48/arrow-right.png + themes/monowhite/48/exit.png + themes/monowhite/48/moveup.png + themes/monowhite/48/read_eeprom.png + themes/monowhite/48/cut.png + themes/monowhite/48/arrow-left.png + themes/monowhite/48/write_eeprom_file.png + themes/monowhite/48/library.png + themes/monowhite/48/profiles.png + themes/monowhite/48/paste.png + themes/monowhite/48/print.png + themes/monowhite/48/compare.png + themes/monowhite/48/saveas.png + themes/monowhite/48/preferences.png + themes/monowhite/48/movedown.png + themes/monowhite/48/currentmodel.png + themes/monowhite/48/read_flash.png + themes/monowhite/48/duplicate.png + themes/monowhite/48/add.png + themes/monowhite/48/update.png + themes/monowhite/48/contributors.png + themes/monowhite/48/stop.png + themes/monowhite/48/write_eeprom.png + + diff --git a/companion/src/companion9x.desktop b/companion/src/companion9x.desktop deleted file mode 100644 index e50e1551a..000000000 --- a/companion/src/companion9x.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Type=Application -Encoding=UTF-8 -Name=companion9x -GenericName=COMPANION9X -Comment=9x EeProm Editor -Icon=/usr/share/icons/companion9x.png -Exec='companion9x' -Terminal=false -StartupNotify=false -Categories=Application \ No newline at end of file diff --git a/companion/src/companion9x.png b/companion/src/companion9x.png deleted file mode 100644 index 90a961731..000000000 Binary files a/companion/src/companion9x.png and /dev/null differ diff --git a/companion/src/companion9x.qrc b/companion/src/companion9x.qrc deleted file mode 100644 index 8a8409172..000000000 --- a/companion/src/companion9x.qrc +++ /dev/null @@ -1,338 +0,0 @@ - - - icon.png - ../../CREDITS.txt - ../../DONATIONS.txt - ../releasenotes.txt - images/9xdb.png - images/9xdl.png - images/9xdr.png - images/9xdt.png - images/9xdb-bl.png - images/9xdl-bl.png - images/9xdr-bl.png - images/9xdt-bl.png - images/9xdb-gr.png - images/9xdl-gr.png - images/9xdr-gr.png - images/9xdt-gr.png - images/9xdb-or.png - images/9xdl-or.png - images/9xdr-or.png - images/9xdt-or.png - images/9xdb-yl.png - images/9xdl-yl.png - images/9xdr-yl.png - images/9xdt-yl.png - images/9xdb-rd.png - images/9xdl-rd.png - images/9xdr-rd.png - images/9xdt-rd.png - images/9xmenu.png - images/9xmenumenu.png - images/9xmenuexit.png - images/9xcurs.png - images/9xcursup.png - images/9xcursplus.png - images/9xcursmin.png - images/9xcursdown.png - images/9xcursphoto.png - images/copy.png - images/cut.png - images/currentmodel.png - images/new.png - images/open.png - images/paste.png - images/save.png - images/saveas.png - images/screenshot.png - images/splash.png - images/splasht.png - images/companion9x-title.png - images/read_eeprom.png - images/write_eeprom.png - images/write_flash.png - images/read_flash.png - images/simulate.png - images/configure.png - images/customize.png - images/print.png - images/clear.png - images/add.png - images/edit.png - images/wizard.png - images/duplicate.png - images/fuses.png - images/list.png - images/maps.png - images/track.png - images/track0.png - images/play.png - images/stop.png - images/read_eeprom_file.png - images/write_eeprom_file.png - images/moveup.png - images/movedown.png - images/update.png - images/contributors.png - images/changelog.png - images/preferences.png - images/switch_dir.png - images/exit.png - images/recentdocument.png - images/profiles.png - images/library.png - images/logs.png - images/arrow-left.png - images/arrow-right.png - images/compare.png - images/x9b0.png - images/x9l0.png - images/x9l1.png - images/x9l2.png - images/x9l3.png - images/x9l4.png - images/x9r0.png - images/x9r1.png - images/x9r2.png - images/x9r3.png - images/x9s0.png - images/x9t0.png - images/mcw/aicon.png - images/mcw/dicon.png - images/mcw/gicon.png - images/mcw/hicon.png - images/mcw/at1e1r.png - images/mcw/at2e1r.png - images/mcw/atailv.png - images/mcw/aw0a0f.png - images/mcw/aw1a0f.png - images/mcw/aw1a1f.png - images/mcw/aw1a2f.png - images/mcw/aw2a0f.png - images/mcw/aw2a1f.png - images/mcw/aw2a2f.png - images/mcw/h90.png - images/mcw/h120.png - images/mcw/h120x.png - images/mcw/h140.png - images/mcw/hfbl.png - images/mcw/htailg.png - images/mcw/htailng.png - images/mcw/htailfblg.png - images/mcw/htailfblng.png - images/mcw/gt1e1r.png - images/mcw/gt2e1r.png - images/mcw/gtailv.png - images/mcw/gw0t0a0f0s.png - images/mcw/gw0t1a0f0s.png - images/mcw/gw0t1a0f1s.png - images/mcw/gw0t1a0f2s.png - images/mcw/gw0t1a1f0s.png - images/mcw/gw0t1a1f1s.png - images/mcw/gw0t1a1f2s.png - images/mcw/gw0t1a2f0s.png - images/mcw/gw0t1a2f1s.png - images/mcw/gw0t1a2f2s.png - images/mcw/gw0t2a0f0s.png - images/mcw/gw0t2a0f1s.png - images/mcw/gw0t2a0f2s.png - images/mcw/gw0t2a1f0s.png - images/mcw/gw0t2a1f1s.png - images/mcw/gw0t2a1f2s.png - images/mcw/gw0t2a2f0s.png - images/mcw/gw0t2a2f1s.png - images/mcw/gw0t2a2f2s.png - images/mcw/gw1t0a0f0s.png - images/mcw/gw1t1a0f0s.png - images/mcw/gw1t1a0f1s.png - images/mcw/gw1t1a0f2s.png - images/mcw/gw1t1a1f0s.png - images/mcw/gw1t1a1f1s.png - images/mcw/gw1t1a1f2s.png - images/mcw/gw1t1a2f0s.png - images/mcw/gw1t1a2f1s.png - images/mcw/gw1t1a2f2s.png - images/mcw/gw1t2a0f0s.png - images/mcw/gw1t2a0f1s.png - images/mcw/gw1t2a0f2s.png - images/mcw/gw1t2a1f0s.png - images/mcw/gw1t2a1f1s.png - images/mcw/gw1t2a1f2s.png - images/mcw/gw1t2a2f0s.png - images/mcw/gw1t2a2f1s.png - images/mcw/gw1t2a2f2s.png - images/mcw/db0t2e0f0r.png - images/mcw/db0t2e0f1r.png - images/mcw/db0t2e0f2r.png - images/mcw/db0t2e1f0r.png - images/mcw/db0t2e1f1r.png - images/mcw/db0t2e1f2r.png - images/mcw/db0t2e2f0r.png - images/mcw/db0t2e2f1r.png - images/mcw/db0t2e2f2r.png - images/mcw/db1t2e0f0r.png - images/mcw/db1t2e0f1r.png - images/mcw/db1t2e0f2r.png - images/mcw/db1t2e1f0r.png - images/mcw/db1t2e1f1r.png - images/mcw/db1t2e1f2r.png - images/mcw/db1t2e2f0r.png - images/mcw/db1t2e2f1r.png - images/mcw/db1t2e2f2r.png - images/mcw/dt0t2e0f0r.png - images/mcw/dt0t2e0f1r.png - images/mcw/dt0t2e0f2r.png - images/mcw/dt0t2e1f0r.png - images/mcw/dt0t2e1f1r.png - images/mcw/dt0t2e1f2r.png - images/mcw/dt0t2e2f0r.png - images/mcw/dt0t2e2f1r.png - images/mcw/dt0t2e2f2r.png - images/mcw/dt1t2e0f0r.png - images/mcw/dt1t2e0f1r.png - images/mcw/dt1t2e0f2r.png - images/mcw/dt1t2e1f0r.png - images/mcw/dt1t2e1f1r.png - images/mcw/dt1t2e1f2r.png - images/mcw/dt1t2e2f0r.png - images/mcw/dt1t2e2f1r.png - images/mcw/dt1t2e2f2r.png - images/library/00001.png - images/library/00002.png - images/library/00003.png - images/library/00004.png - images/library/00005.png - images/library/00006.png - images/library/00007.png - images/library/00008.png - images/library/00009.png - images/library/00010.png - images/library/00011.png - images/library/00012.png - images/library/00013.png - images/library/00014.png - images/library/00015.png - images/library/00016.png - images/library/01001.png - images/library/01002.png - images/library/01003.png - images/library/01004.png - images/library/01005.png - images/library/01006.png - images/library/01007.png - images/library/01008.png - images/library/10001.png - images/library/10002.png - images/library/10003.png - images/library/10004.png - images/library/10005.png - images/library/10006.png - images/library/10007.png - images/library/10008.png - images/library/10009.png - images/library/10010.png - images/library/10011.png - images/library/10012.png - images/library/10013.png - images/library/10014.png - images/library/10015.png - images/library/10016.png - images/library/10017.png - images/library/10018.png - images/library/10019.png - images/library/10020.png - images/library/10021.png - images/library/10022.png - images/library/10023.png - images/library/10024.png - images/library/10033.png - images/library/10034.png - images/library/10035.png - images/library/10036.png - images/library/10049.png - images/library/10050.png - images/library/10051.png - images/library/10052.png - images/library/10037.png - images/library/10038.png - images/library/10039.png - images/library/10040.png - images/library/10053.png - images/library/10054.png - images/library/10055.png - images/library/10056.png - images/library/10025.png - images/library/10026.png - images/library/10027.png - images/library/10028.png - images/library/10029.png - images/library/10030.png - images/library/10031.png - images/library/10032.png - images/library/10041.png - images/library/10042.png - images/library/10043.png - images/library/10044.png - images/library/10057.png - images/library/10058.png - images/library/10059.png - images/library/10060.png - images/library/10045.png - images/library/10046.png - images/library/10047.png - images/library/10048.png - images/library/10061.png - images/library/10062.png - images/library/10063.png - images/library/10064.png - images/library/10065.png - images/library/10066.png - images/library/10067.png - images/library/10068.png - images/library/10081.png - images/library/10082.png - images/library/10083.png - images/library/10084.png - images/library/10069.png - images/library/10070.png - images/library/10071.png - images/library/10072.png - images/library/10085.png - images/library/10086.png - images/library/10087.png - images/library/10088.png - images/library/10073.png - images/library/10074.png - images/library/10075.png - images/library/10076.png - images/library/10089.png - images/library/10090.png - images/library/10091.png - images/library/10092.png - images/library/10077.png - images/library/10078.png - images/library/10079.png - images/library/10080.png - images/library/10093.png - images/library/10094.png - images/library/10095.png - images/library/10096.png - images/library/10097.png - images/library/10098.png - images/library/10099.png - images/library/10100.png - images/library/10101.png - images/library/10102.png - images/library/10103.png - images/library/10104.png - images/library/20001.png - images/library/20002.png - images/library/20003.png - images/library/20004.png - images/library/30001.png - images/library/30002.png - images/library/30003.png - images/library/30004.png - - diff --git a/companion/src/comparedialog.cpp b/companion/src/comparedialog.cpp index ded52c41c..6b1609c0e 100644 --- a/companion/src/comparedialog.cpp +++ b/companion/src/comparedialog.cpp @@ -21,7 +21,7 @@ public: } bool general_settings; uint8_t models_count; - uint8_t models[C9XMAX_MODELS]; + uint8_t models[C9X_MAX_MODELS]; }; compareDialog::compareDialog(QWidget *parent, GeneralSettings *gg) : @@ -48,7 +48,7 @@ compareDialog::compareDialog(QWidget *parent, GeneralSettings *gg) : void compareDialog::dragMoveEvent(QDragMoveEvent *event) { - if (event->mimeData()->hasFormat("application/x-companion9x")) { + if (event->mimeData()->hasFormat("application/x-companion")) { event->acceptProposedAction(); } else { event->ignore(); @@ -58,7 +58,7 @@ void compareDialog::dragMoveEvent(QDragMoveEvent *event) void compareDialog::dragEnterEvent(QDragEnterEvent *event) { // accept just text/uri-list mime format - if (event->mimeData()->hasFormat("application/x-companion9x")) { + if (event->mimeData()->hasFormat("application/x-companion")) { event->acceptProposedAction(); } else { event->ignore(); @@ -95,8 +95,8 @@ void compareDialog::dropEvent(QDropEvent *event) const QMimeData *mimeData = event->mimeData(); if (child) { if (child->objectName().contains("label_1")) { - if(mimeData->hasFormat("application/x-companion9x")) { - QByteArray gmData = mimeData->data("application/x-companion9x"); + if(mimeData->hasFormat("application/x-companion")) { + QByteArray gmData = mimeData->data("application/x-companion"); DragDropHeader *header = (DragDropHeader *)gmData.data(); if (!header->general_settings) { char *gData = gmData.data()+sizeof(DragDropHeader);//new char[gmData.size() + 1]; @@ -120,8 +120,8 @@ void compareDialog::dropEvent(QDropEvent *event) } } else if (child->objectName().contains("label_2")) { - if(mimeData->hasFormat("application/x-companion9x")) { - QByteArray gmData = mimeData->data("application/x-companion9x"); + if(mimeData->hasFormat("application/x-companion")) { + QByteArray gmData = mimeData->data("application/x-companion"); DragDropHeader *header = (DragDropHeader *)gmData.data(); if (!header->general_settings) { char *gData = gmData.data()+sizeof(DragDropHeader);//new char[gmData.size() + 1]; @@ -305,7 +305,7 @@ void compareDialog::printPhases() str.append(""+tr("Switch")+""+tr("Flight mode name")); str.append(""+tr("IN")+""+tr("OUT")+""); for (i=0; i<4; i++) { - str.append(QString("%1").arg(getStickStr(i))); + str.append(QString("%1").arg(getInputStr(*g_model1, i))); } str.append(""); for (i=0; igetCapability(FlightPhases); i++) { @@ -342,7 +342,7 @@ void compareDialog::printPhases() gvars=1; } if (gvars==1) { - gvarnum=GetEepromInterface()->getCapability(GvarsNum); + gvarnum=GetEepromInterface()->getCapability(Gvars); } if ((gvars==1 && GetEepromInterface()->getCapability(GvarsFlightPhases)) || GetEepromInterface()->getCapability(RotaryEncoders)) { str.append("
"); @@ -406,7 +406,7 @@ void compareDialog::printPhases() str.append(""); for (i=0; i<4; i++) { - str.append(QString("").arg(getStickStr(i))); + str.append(QString("").arg(getInputStr(*g_model1, i))); } str.append(""); for (i=0; igetCapability(FlightPhases); i++) { @@ -564,7 +564,7 @@ void compareDialog::printGvars() int gvarnum=0; if ((GetCurrentFirmwareVariant() & GVARS_VARIANT ) || (!GetEepromInterface()->getCapability(HasVariants) && GetEepromInterface()->getCapability(Gvars))) { gvars=1; - gvarnum=GetEepromInterface()->getCapability(GvarsNum); + gvarnum=GetEepromInterface()->getCapability(Gvars); } if (!GetEepromInterface()->getCapability(GvarsFlightPhases) && (gvars==1 && GetEepromInterface()->getCapability(Gvars))) { @@ -649,7 +649,8 @@ void compareDialog::printExpos() }; str += tr("Weight") + QString("%1").arg(getGVarString(ed->weight)).rightJustified(6, ' '); - str += " " + tr("Expo") + QString("%1").arg(getGVarString(ed->expo)).rightJustified(7, ' '); + str += ed->curve.toString().replace("<", "<").replace(">", ">"); + if (GetEepromInterface()->getCapability(FlightPhases)) { if(ed->phases) { if (ed->phases!=(unsigned int)(1<getCapability(FlightPhases))-1) { @@ -681,21 +682,19 @@ void compareDialog::printExpos() mask <<=1; } str += QString(")"); - } else { + } + else { str += tr("DISABLED")+QString(" !!!"); } } } if (ed->swtch.type) str += " " + tr("Switch") + QString("(%1)").arg(ed->swtch.toString()); - if (ed->curveMode) - if (ed->curveParam) - str += " " + tr("Curve") + QString("(%1)").arg(getCurveStr(ed->curveParam).replace("<", "<").replace(">", ">")); str += ""; } } str.append("
"+tr("Switch")+"
"+tr("Flight mode name")); str.append(""+tr("IN")+""+tr("OUT")+"%1%1
"); - str.append(""+getStickStr(i)+""); + str.append(""+getInputStr(*g_model2, i)+""); str.append(""); str.append(""); for (int j=0; jweight)).rightJustified(6, ' '); - str += " " + tr("Expo") + QString("%1").arg(getGVarString(ed->expo)).rightJustified(7, ' '); + str += ed->curve.toString().replace("<", "<").replace(">", ">"); + if (GetEepromInterface()->getCapability(FlightPhases)) { if(ed->phases) { if (ed->phases!=(unsigned int)(1<getCapability(FlightPhases))-1) { @@ -767,9 +767,7 @@ void compareDialog::printExpos() } if (ed->swtch.type) str += " " + tr("Switch") + QString("(%1)").arg(ed->swtch.toString()); - if (ed->curveMode) - if (ed->curveParam) - str += " " + tr("Curve") + QString("(%1)").arg(getCurveStr(ed->curveParam).replace("<", "<").replace(">", ">")); + str += ""; } } @@ -824,13 +822,8 @@ void compareDialog::printMixers() str += md->srcRaw.toString(); if (md->swtch.type) str += " " + tr("Switch") + QString("(%1)").arg(md->swtch.toString()); if (md->carryTrim) str += " " + tr("noTrim"); - if(GetEepromInterface()->getCapability(MixFmTrim) && md->enableFmTrim==1){ - if (md->sOffset) str += " "+ tr("FMTrim") + QString(" (%1%)").arg(md->sOffset); - } else { - if (md->sOffset) str += " "+ tr("Offset") + QString(" (%1%)").arg(getGVarString(md->sOffset)); - } - if (md->differential) str += " "+ tr("Diff") + QString(" (%1%)").arg(getGVarString(md->differential)); - if (md->curve) str += " " + tr("Curve") + QString("(%1)").arg(getCurveStr(md->curve).replace("<", "<").replace(">", ">")); + if (md->sOffset) str += " "+ tr("Offset") + QString(" (%1%)").arg(getGVarString(md->sOffset)); + str += md->curve.toString().replace("<", "<").replace(">", ">"); if (md->delayDown || md->delayUp) str += tr(" Delay(u%1:d%2)").arg(md->delayUp/scale).arg(md->delayDown/scale); if (md->speedDown || md->speedUp) str += tr(" Slow(u%1:d%2)").arg(md->speedUp/scale).arg(md->speedDown/scale); if (md->mixWarn) str += " "+tr("Warn")+QString("(%1)").arg(md->mixWarn); @@ -907,13 +900,9 @@ void compareDialog::printMixers() str += md->srcRaw.toString(); if (md->swtch.type) str += " " + tr("Switch") + QString("(%1)").arg(md->swtch.toString()); if (md->carryTrim) str += " " + tr("noTrim"); - if(GetEepromInterface()->getCapability(MixFmTrim) && md->enableFmTrim==1){ - if (md->sOffset) str += " "+ tr("FMTrim") + QString(" (%1%)").arg(getGVarString(md->sOffset)); - } else { - if (md->sOffset) str += " "+ tr("Offset") + QString(" (%1%)").arg(getGVarString(md->sOffset)); - } - if (md->differential) str += " "+ tr("Diff") + QString(" (%1%)").arg(getGVarString(md->differential)); - if (md->curve) str += " " + tr("Curve") + QString("(%1)").arg(getCurveStr(md->curve).replace("<", "<").replace(">", ">")); + if (md->sOffset) str += " "+ tr("Offset") + QString(" (%1%)").arg(getGVarString(md->sOffset)); + // TODO if (md->differential) str += " "+ tr("Diff") + QString(" (%1%)").arg(getGVarString(md->differential)); + // TODO if (md->curve) str += " " + tr("Curve") + QString("(%1)").arg(getCurveStr(md->curve).replace("<", "<").replace(">", ">")); if (md->delayDown || md->delayUp) str += tr(" Delay(u%1:d%2)").arg(md->delayUp/scale).arg(md->delayDown/scale); if (md->speedDown || md->speedUp) str += tr(" Slow(u%1:d%2)").arg(md->speedUp/scale).arg(md->speedDown/scale); if (md->mixWarn) str += " "+tr("Warn")+QString("(%1)").arg(md->mixWarn); @@ -1049,7 +1038,7 @@ void compareDialog::printSwitches() int sc=0; QString color; QString str = "
"; - str.append(""); + str.append(""); str.append(""); for (int i=0; i<4; i++) { - str.append(QString("").arg(getStickStr(i))); + str.append(QString("").arg(getInputStr(*g_model, i))); } if (gvars==1) { for (int i=0; i

"+tr("Custom Switches")+"

"+tr("Logical Switches")+"

"); for (int i=0; igetCapability(CustomSwitches); i++) { QString sw1 = getCustomSwitchStr(&g_model1->customSw[i], *g_model1); @@ -1059,9 +1048,9 @@ void compareDialog::printSwitches() color=getColor1(sw1,sw2); str.append(QString(""); if (i<9) { - str.append("").arg(i+1)); + str.append("").arg(i+1)); } else { - str.append(""); + str.append(""); } color=getColor2(sw1,sw2); str.append(QString(""); @@ -1080,7 +1069,7 @@ void compareDialog::printFSwitches() QString color2; int sc=0; QString str = "
").arg(color)+sw1+""+tr("CS")+QString("%1"+tr("LS")+QString("%1"+tr("CS")+('A'+(i-9))+""+tr("LS")+('A'+(i-9))+"").arg(color)+sw2+"
"; - str.append(""); + str.append(""); str.append(""); - value1=getBarValue(fd1->screens[0].body.bars[i].source,fd1->screens[0].body.bars[i].barMin,fd1); - value2=getBarValue(fd2->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].barMin,fd2); + // TODO value1 = getBarValue(fd1->screens[0].body.bars[i].source,fd1->screens[0].body.bars[i].barMin,fd1); + // TODO value2 = getBarValue(fd2->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].barMin,fd2); if (fd1->screens[0].type==fd2->screens[0].type) color=getColor1(value1,value2); str.append(""); - value1=getBarValue(fd1->screens[0].body.bars[i].source,fd1->screens[0].body.bars[i].barMax,fd1); - value2=getBarValue(fd2->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].barMax,fd2); + // TODO value1=getBarValue(fd1->screens[0].body.bars[i].source,fd1->screens[0].body.bars[i].barMax,fd1); + // TODO value2=getBarValue(fd2->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].barMax,fd2); if (fd1->screens[0].type==fd2->screens[0].type) color=getColor1(value1,value2); str.append(""); @@ -1326,6 +1316,7 @@ void compareDialog::printFrSky() } } } +#endif str.append(""); - value1=getBarValue(fd1->screens[0].body.bars[i].source,fd1->screens[0].body.bars[i].barMin,fd1); - value2=getBarValue(fd2->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].barMin,fd2); + // TODO value1=getBarValue(fd1->screens[0].body.bars[i].source,fd1->screens[0].body.bars[i].barMin,fd1); + // TODO value2=getBarValue(fd2->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].barMin,fd2); if (fd1->screens[0].type==fd2->screens[0].type) color=getColor2(value1,value2); str.append(""); - value1=getBarValue(fd1->screens[0].body.bars[i].source,fd1->screens[0].body.bars[i].barMax,fd1); - value2=getBarValue(fd2->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].barMax,fd2); + // TODO value1=getBarValue(fd1->screens[0].body.bars[i].source,fd1->screens[0].body.bars[i].barMax,fd1); + // TODO value2=getBarValue(fd2->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].barMax,fd2); if (fd1->screens[0].type==fd2->screens[0].type) color=getColor2(value1,value2); str.append(""); @@ -1444,6 +1435,7 @@ void compareDialog::printFrSky() } } } +#endif str.append("

"+tr("Custom Functions")+"

"+tr("Switch Assignment")+"

"); str.append(""); str.append(""); @@ -1271,6 +1260,7 @@ void compareDialog::printFrSky() color=getColor1(fd1->rssiAlarms[1].value,fd2->rssiAlarms[1].value); str.append(""); str.append("
"+tr("Switch")+""+tr("Function")+""+QString::number(fd1->rssiAlarms[1].value,10)+"
"); +#if 0 if (GetEepromInterface()->getCapability(TelemetryBars) || GetEepromInterface()->getCapability(TelemetryCSFields)) { int cols=GetEepromInterface()->getCapability(TelemetryColsCSFields); if (cols==0) cols=2; @@ -1311,13 +1301,13 @@ void compareDialog::printFrSky() if (fd1->screens[0].type==fd2->screens[0].type) color=getColor1(fd1->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].source); str.append("
"+getFrSkySrc(fd1->screens[0].body.bars[i].source)+""+QString::number(value1)+""+QString::number(value1)+"
"); str.append(""); @@ -1388,7 +1379,7 @@ void compareDialog::printFrSky() color=getColor2(fd1->rssiAlarms[1].value,fd2->rssiAlarms[1].value); str.append(""); str.append("
"+QString::number(fd2->rssiAlarms[1].value,10)+"

"); - +#if 0 if (GetEepromInterface()->getCapability(TelemetryBars) || GetEepromInterface()->getCapability(TelemetryCSFields)) { int cols=GetEepromInterface()->getCapability(TelemetryColsCSFields); if (cols==0) cols=2; @@ -1429,13 +1420,13 @@ void compareDialog::printFrSky() if (fd1->screens[0].type==fd2->screens[0].type) color=getColor2(fd1->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].source); str.append("
"+getFrSkySrc(fd2->screens[0].body.bars[i].source)+""+QString::number(value2)+""+QString::number(value2)+"
"); te->append(str); } diff --git a/companion/src/comparedialog.ui b/companion/src/comparedialog.ui index 456d1db87..6f11bf138 100644 --- a/companion/src/comparedialog.ui +++ b/companion/src/comparedialog.ui @@ -29,8 +29,8 @@ Dialog - - :/images/print.png:/images/print.png + + :/icon.png:/icon.png @@ -129,7 +129,7 @@ - + diff --git a/companion/src/contributorsdialog.cpp b/companion/src/contributorsdialog.cpp index d60a682db..54d32f9f7 100644 --- a/companion/src/contributorsdialog.cpp +++ b/companion/src/contributorsdialog.cpp @@ -1,7 +1,6 @@ #include "contributorsdialog.h" #include "ui_contributorsdialog.h" #include -#define CLINESEP "=====================================================\n" contributorsDialog::contributorsDialog(QWidget *parent, int contest, QString rnurl) : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint), @@ -9,43 +8,88 @@ contributorsDialog::contributorsDialog(QWidget *parent, int contest, QString rnu { ui->setupUi(this); switch (contest) { - case 0: { - ui->textBrowser->insertPlainText(CLINESEP); - ui->textBrowser->insertPlainText(tr("People who have contributed to this project")+"\n"); - ui->textBrowser->insertPlainText(CLINESEP); - QFile file(":/contributors"); - if(file.open( QIODevice::ReadOnly | QIODevice::Text ) ) { - ui->textBrowser->insertPlainText(file.readAll()); + case 0: + { + QFile file(":/DONATIONS.txt"); + QString str; + str.append(""); + str.append("\n"); + str.append(""); + str.append("
"+tr("People who have contributed to this project")+"
"); + str.append(""); + if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { + int columns=6; + float cwidth=100.0/columns; + while (!file.atEnd()) { + str.append(""); + for (int i=0; i"); + } else { + str.append("class=\"mycss\">"); + } + str.append(line.trimmed()+""); + } else { + str.append("class=\"mycss\"> "); + } + } + str.append(""); + } } - ui->textBrowser->insertPlainText("\n"); - ui->textBrowser->insertPlainText(CLINESEP); - ui->textBrowser->insertPlainText(tr("Coders")+"\n"); - ui->textBrowser->insertPlainText(CLINESEP); - QFile file2(":/coders"); + str.append("
"); + QFile file2(":/CREDITS.txt"); + str.append(""); + str.append(""); + str.append(""); + str.append("
 
"+tr("Coders")+"
"); + str.append(""); if(file2.open( QIODevice::ReadOnly | QIODevice::Text ) ) { - ui->textBrowser->insertPlainText(file2.readAll()); - } - ui->textBrowser->insertPlainText("\n\n\n"); - ui->textBrowser->insertPlainText(tr("Honors go to Rafal Tomczak (RadioClone) and Thomas Husterer (th9x) \nof course. Also to Erez Raviv (er9x) and it's fantastic eePe, from which\ncompanion9x was forked out.")); - ui->textBrowser->insertPlainText("\n\n"); - ui->textBrowser->insertPlainText(tr("Thank you all !!!")); - ui->textBrowser->setReadOnly(true); - ui->textBrowser->verticalScrollBar()->setValue(0); - this->setWindowTitle(tr("Contributors")); + while (!file2.atEnd()) { + str.append(""); + for (int i=0; i<3; i++) { + str.append(""); + } + str.append(""); + } } + str.append(""); + str.append(""); + str.append(""); + str.append("
"); + if (!file2.atEnd()) { + QByteArray line = file2.readLine(); + str.append(line.trimmed()); + } else { + str.append(" "); + } + str.append("
 
" + tr("Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe)") + "
" + tr("Thank you all !!!") + "
"); + str.append(""); + ui->textEditor->setHtml(str); + ui->textEditor->scroll(0, 0); + setWindowTitle(tr("Contributors")); break; + } - case 1:{ - QFile file(":/releasenotes"); + case 1: + { + QFile file(":/releasenotes.txt"); if(file.open( QIODevice::ReadOnly | QIODevice::Text ) ) { - ui->textBrowser->insertHtml(file.readAll()); - } - ui->textBrowser->setReadOnly(true); - ui->textBrowser->verticalScrollBar()->setValue(0); - this->setWindowTitle(tr("Companion9x Release Notes")); + ui->textEditor->setHtml(file.readAll()); } + ui->textEditor->scroll(0,0); + setWindowTitle(tr("Companion Release Notes")); break; - case 2:{ + } + + case 2: + { if (!rnurl.isEmpty()) { this->setWindowTitle(tr("OpenTX Release Notes")); manager = new QNetworkAccessManager(this); @@ -54,7 +98,8 @@ contributorsDialog::contributorsDialog(QWidget *parent, int contest, QString rnu QNetworkRequest request(url); request.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::AlwaysNetwork); manager->get(request); - } else { + } + else { QTimer::singleShot(0, this, SLOT(forceClose())); } break; @@ -64,7 +109,7 @@ contributorsDialog::contributorsDialog(QWidget *parent, int contest, QString rnu void contributorsDialog::showEvent ( QShowEvent * ) { - ui->textBrowser->verticalScrollBar()->setValue(0); + ui->textEditor->scroll(0, 0); } contributorsDialog::~contributorsDialog() @@ -74,9 +119,10 @@ contributorsDialog::~contributorsDialog() void contributorsDialog::replyFinished(QNetworkReply * reply) { - ui->textBrowser->insertHtml(reply->readAll()); + ui->textEditor->setHtml(reply->readAll()); } -void contributorsDialog::forceClose() { +void contributorsDialog::forceClose() +{ accept();; } diff --git a/companion/src/contributorsdialog.ui b/companion/src/contributorsdialog.ui index 1c09ba66d..6ae7866c8 100644 --- a/companion/src/contributorsdialog.ui +++ b/companion/src/contributorsdialog.ui @@ -6,25 +6,25 @@ 0 0 - 926 - 333 + 788 + 528 Dialog - + :/icon.png:/icon.png - + - + diff --git a/companion/src/customizesplashdialog.cpp b/companion/src/customizesplashdialog.cpp index 2358e1c7a..30762142f 100644 --- a/companion/src/customizesplashdialog.cpp +++ b/companion/src/customizesplashdialog.cpp @@ -8,56 +8,60 @@ #include "flashinterface.h" customizeSplashDialog::customizeSplashDialog(QWidget *parent) : -QDialog(parent), -ui(new Ui::customizeSplashDialog) { + QDialog(parent), + ui(new Ui::customizeSplashDialog) +{ ui->setupUi(this); + ui->libraryButton->setIcon(CompanionIcon("library.png")); ui->HowToLabel->clear(); ui->HowToLabel->append("
" + tr("Select an original firmware file") + "
"); } -customizeSplashDialog::~customizeSplashDialog() { +customizeSplashDialog::~customizeSplashDialog() +{ delete ui; } void customizeSplashDialog::on_FlashLoadButton_clicked() { - QString fileName; - QSettings settings("companion9x", "companion9x"); - ui->ImageLoadButton->setDisabled(true); - ui->libraryButton->setDisabled(true); - ui->SaveFlashButton->setDisabled(true); - ui->SaveImageButton->setDisabled(true); - ui->ImageFileName->clear(); - ui->imageLabel->clear(); - ui->HowToLabel->clear(); - ui->HowToLabel->setStyleSheet("background:rgb(255, 255, 0)"); - fileName = QFileDialog::getOpenFileName(this, tr("Open"), settings.value("lastFlashDir").toString(), FLASH_FILES_FILTER); - QFile file(fileName); - if (!file.exists()) { - ui->FWFileName->clear(); - ui->HowToLabel->append("
" + tr("Select an original firmware file") + "
"); - return; - } - if (fileName.isEmpty()) { - ui->FWFileName->clear(); - ui->HowToLabel->append("
" + tr("Select an original firmware file") + "
"); - return; - } + QSettings settings; + QString fileName = QFileDialog::getOpenFileName(this, tr("Open"), settings.value("lastFlashDir").toString(), FLASH_FILES_FILTER); + if (!fileName.isEmpty()) { + ui->ImageLoadButton->setDisabled(true); + ui->libraryButton->setDisabled(true); + ui->SaveFlashButton->setDisabled(true); + ui->SaveImageButton->setDisabled(true); + ui->ImageFileName->clear(); + ui->imageLabel->clear(); + ui->HowToLabel->clear(); + ui->HowToLabel->setStyleSheet("background:rgb(255, 255, 0)"); + QFile file(fileName); + if (!file.exists()) { + ui->FWFileName->clear(); + ui->HowToLabel->append("
" + tr("Select an original firmware file") + "
"); + return; + } + if (fileName.isEmpty()) { + ui->FWFileName->clear(); + ui->HowToLabel->append("
" + tr("Select an original firmware file") + "
"); + return; + } - ui->FWFileName->setText(fileName); - FlashInterface flash(fileName); - if (flash.hasSplash()) { - ui->HowToLabel->append("
" + tr("Select an image to customize your splash
or save actual firmware splash") + "
"); - ui->ImageLoadButton->setEnabled(true); - ui->libraryButton->setEnabled(true); - ui->SaveImageButton->setEnabled(true); - ui->imageLabel->setPixmap(QPixmap::fromImage(flash.getSplash())); - ui->imageLabel->setFixedSize(flash.getSplashWidth()*2,flash.getSplashHeight()*2); - } else { - QMessageBox::information(this, tr("Error"), tr("Could not find bitmap to replace in file")); - return; + ui->FWFileName->setText(fileName); + FlashInterface flash(fileName); + if (flash.hasSplash()) { + ui->HowToLabel->append("
" + tr("Select an image to customize your splash
or save actual firmware splash") + "
"); + ui->ImageLoadButton->setEnabled(true); + ui->libraryButton->setEnabled(true); + ui->SaveImageButton->setEnabled(true); + ui->imageLabel->setPixmap(QPixmap::fromImage(flash.getSplash())); + ui->imageLabel->setFixedSize(flash.getSplashWidth()*2,flash.getSplashHeight()*2); + } else { + QMessageBox::information(this, tr("Error"), tr("Could not find bitmap to replace in file")); + return; + } + settings.setValue("lastFlashDir", QFileInfo(fileName).dir().absolutePath()); } - settings.setValue("lastFlashDir", QFileInfo(fileName).dir().absolutePath()); } void customizeSplashDialog::on_ImageLoadButton_clicked() { @@ -66,7 +70,7 @@ void customizeSplashDialog::on_ImageLoadButton_clicked() { supportedImageFormats += QLatin1String(" *.") + QImageReader::supportedImageFormats()[formatIndex]; } - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString fileName = QFileDialog::getOpenFileName(this, tr("Open Image to load"), settings.value("lastImagesDir").toString(), tr("Images (%1)").arg(supportedImageFormats)); @@ -143,7 +147,7 @@ void customizeSplashDialog::on_libraryButton_clicked() { void customizeSplashDialog::on_SaveFlashButton_clicked() { QString fileName; - QSettings settings("companion9x", "companion9x"); + QSettings settings; ui->HowToLabel->clear(); fileName = QFileDialog::getSaveFileName(this, tr("Write to file"), settings.value("lastFlashDir").toString(), FLASH_FILES_FILTER, 0, QFileDialog::DontConfirmOverwrite); if (fileName.isEmpty()) { @@ -176,7 +180,7 @@ void customizeSplashDialog::on_InvertColorButton_clicked() void customizeSplashDialog::on_SaveImageButton_clicked() { QString fileName; - QSettings settings("companion9x", "companion9x"); + QSettings settings; fileName = QFileDialog::getSaveFileName(this, tr("Write to file"), settings.value("lastImagesDir").toString(), tr("PNG images (*.png);;"), 0, QFileDialog::DontConfirmOverwrite); if (!fileName.isEmpty()) { diff --git a/companion/src/customizesplashdialog.ui b/companion/src/customizesplashdialog.ui index 69762f1ba..15a803656 100644 --- a/companion/src/customizesplashdialog.ui +++ b/companion/src/customizesplashdialog.ui @@ -20,8 +20,8 @@ Customize Splash - - :/images/c_home.png:/images/c_home.png + + :/icon.png:/icon.png @@ -71,7 +71,7 @@ - :/images/customize.png + :/images/customize.png true @@ -211,10 +211,6 @@ p, li { white-space: pre-wrap; } ... - - - :/images/library.png:/images/library.png - 16 @@ -264,7 +260,7 @@ p, li { white-space: pre-wrap; } - + diff --git a/companion/src/downloaddialog.cpp b/companion/src/downloaddialog.cpp index 83da451bd..bfd425619 100644 --- a/companion/src/downloaddialog.cpp +++ b/companion/src/downloaddialog.cpp @@ -21,7 +21,7 @@ downloadDialog::downloadDialog(QWidget *parent, QString src, QString tgt) : file = new QFile(tgt); if (!file->open(QIODevice::WriteOnly)) { - QMessageBox::critical(this, "companion9x", + QMessageBox::critical(this, "Companion", tr("Unable to save the file %1: %2.") .arg(tgt).arg(file->errorString())); QTimer::singleShot(0, this, SLOT(fileError())); @@ -51,7 +51,7 @@ void downloadDialog::httpFinished() if (reply->error()) { file->remove(); - QMessageBox::information(this, tr("companion9x"), + QMessageBox::information(this, tr("Companion"), tr("Download failed: %1.") .arg(reply->errorString())); ok = false; diff --git a/companion/src/downloaddialog.ui b/companion/src/downloaddialog.ui index 9f5681542..dcd05c405 100644 --- a/companion/src/downloaddialog.ui +++ b/companion/src/downloaddialog.ui @@ -14,7 +14,7 @@ Downloading: - + :/icon.png:/icon.png @@ -51,7 +51,7 @@ - + diff --git a/companion/src/eepromimportexport.h b/companion/src/eepromimportexport.h index 370287851..ed5ab9ff5 100644 --- a/companion/src/eepromimportexport.h +++ b/companion/src/eepromimportexport.h @@ -74,7 +74,10 @@ class DataField { QByteArray bytes = bitsToBytes(bits); int result = (offset+bits.count()) % 8; for (int i=0; iDump(level+1, offset); } @@ -547,6 +550,7 @@ class ConversionField: public TransformedField { _field(0), table(table), shift(0), + scale(1), min(INT_MIN), max(INT_MAX), exportFunc(NULL), @@ -562,6 +566,7 @@ class ConversionField: public TransformedField { _field(0), table(table), shift(0), + scale(0), min(INT_MIN), max(INT_MAX), exportFunc(NULL), @@ -577,6 +582,7 @@ class ConversionField: public TransformedField { _field(0), table(NULL), shift(0), + scale(0), min(INT_MIN), max(INT_MAX), exportFunc(exportFunc), @@ -585,13 +591,14 @@ class ConversionField: public TransformedField { { } - ConversionField(int & field, int shift, int min=INT_MIN, int max=INT_MAX, const char *name = "Signed shifted"): + ConversionField(int & field, int shift, int scale=0, int min=INT_MIN, int max=INT_MAX, const char *name = "Signed shifted"): TransformedField(internalField), internalField(_field, name), field(field), _field(0), table(NULL), shift(shift), + scale(scale), min(min), max(max), exportFunc(NULL), @@ -600,13 +607,14 @@ class ConversionField: public TransformedField { { } - ConversionField(unsigned int & field, int shift): + ConversionField(unsigned int & field, int shift, int scale=0): TransformedField(internalField), internalField((unsigned int &)_field), field((int &)field), _field(0), table(NULL), shift(shift), + scale(scale), min(INT_MIN), max(INT_MAX), exportFunc(NULL), @@ -617,19 +625,25 @@ class ConversionField: public TransformedField { virtual void beforeExport() { + int val = field; + + if (scale) { + val /= scale; + } + if (table) { - if (table->exportValue(field, _field)) + if (table->exportValue(val, _field)) return; if (!error.isEmpty()) EEPROMWarnings += error + "\n"; } else if (shift) { - if (field < min) _field = min + shift; - else if (field > max) _field = max + shift; - else _field = field + shift; + if (val < min) _field = min + shift; + else if (val > max) _field = max + shift; + else _field = val + shift; } else { - _field = exportFunc(field); + _field = exportFunc(val); } } @@ -645,6 +659,10 @@ class ConversionField: public TransformedField { else { field = importFunc(_field); } + + if (scale) { + field *= scale; + } } protected: @@ -653,6 +671,7 @@ class ConversionField: public TransformedField { int _field; ConversionTable * table; int shift; + int scale; int min; int max; int (*exportFunc)(int); diff --git a/companion/src/eeprominterface.cpp b/companion/src/eeprominterface.cpp index 497149ca2..cf7686bea 100644 --- a/companion/src/eeprominterface.cpp +++ b/companion/src/eeprominterface.cpp @@ -4,12 +4,16 @@ #include "firmwares/er9x/er9xinterface.h" #include "firmwares/th9x/th9xinterface.h" #include "firmwares/gruvin9x/gruvin9xinterface.h" -#include "firmwares/opentx/open9xinterface.h" +#include "firmwares/opentx/opentxinterface.h" #include "firmwares/ersky9x/ersky9xinterface.h" #include "qsettings.h" +#include "helpers.h" QString EEPROMWarnings; +const char * switches9X[] = { "3POS", "THR", "RUD", "ELE", "AIL", "GEA", "TRN" }; +const char * switchesX9D[] = { "SA", "SB", "SC", "SD", "SE", "SF", "SG", "SH" }; + void setEEPROMString(char *dst, const char *src, int size) { memcpy(dst, src, size); @@ -33,238 +37,141 @@ void getEEPROMString(char *dst, const char *src, int size) } } -int RawSource::getDecimals(const ModelData & Model) +RawSourceRange RawSource::getRange(bool singleprec) { - if(type==SOURCE_TYPE_TELEMETRY) { - switch (index) { - case TELEMETRY_SOURCE_A1: - case TELEMETRY_SOURCE_A2: - return (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].type==0 ? 2: 0); - case TELEMETRY_SOURCE_CELL: - return 2; - case TELEMETRY_SOURCE_CELLS_SUM: - case TELEMETRY_SOURCE_VFAS: - case TELEMETRY_SOURCE_CURRENT: - return 1; - default: - return 0; - } + RawSourceRange result; + + int board = GetEepromInterface()->getBoard(); + + if (!singleprec && !IS_TARANIS(board)) { + singleprec = true; } - return 0; -} -double RawSource::getMin(const ModelData & Model) -{ switch (type) { case SOURCE_TYPE_TELEMETRY: switch (index) { - /*case TELEMETRY_SOURCE_NONE: case TELEMETRY_SOURCE_TX_BATT: + result.step = 0.1; + result.decimals = 1; + result.max = 25.5; + break; case TELEMETRY_SOURCE_TIMER1: case TELEMETRY_SOURCE_TIMER2: - return 0; */ - case TELEMETRY_SOURCE_A1: - case TELEMETRY_SOURCE_A2: - if (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].type==0) { - return (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].offset*Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio)/2550.0; - } - else { - return (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].offset*Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio)/255.0; - } - case TELEMETRY_SOURCE_ALT: - case TELEMETRY_SOURCE_GPS_ALT: - return -500; - case TELEMETRY_SOURCE_T1: - case TELEMETRY_SOURCE_T2: - return -30; - default: - return 0; - } - break; - default: - return (Model.extendedLimits ? -125 :-100); - } -} - -double RawSource::getMax(const ModelData & Model) -{ - switch (type) { - case SOURCE_TYPE_TELEMETRY: - switch (index) { - case TELEMETRY_SOURCE_TIMER1: - case TELEMETRY_SOURCE_TIMER2: - return 765; + result.step = singleprec ? 3 : 1; + result.max = singleprec ? 765 : 7200; + break; case TELEMETRY_SOURCE_RSSI_TX: case TELEMETRY_SOURCE_RSSI_RX: - return 100; + result.max = 100; + break; case TELEMETRY_SOURCE_A1: case TELEMETRY_SOURCE_A2: - if (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].type==0) { - return (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio-(Model.frsky.channels[index-TELEMETRY_SOURCE_A1].offset*Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio)/255.0)/10; - } else { - return Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio-(Model.frsky.channels[index-TELEMETRY_SOURCE_A1].offset*Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio)/255.0; + if (model) { + FrSkyChannelData channel = model->frsky.channels[index-TELEMETRY_SOURCE_A1]; // TODO const & + float ratio = channel.getRatio(); + if (channel.type==0 || channel.type==1 || channel.type==2) + result.decimals = 2; + else + result.decimals = 0; + result.step = ratio / 255; + result.min = channel.offset * result.step; + result.max = ratio + result.min; } + break; case TELEMETRY_SOURCE_ALT: case TELEMETRY_SOURCE_GPS_ALT: - return 1540; - case TELEMETRY_SOURCE_RPM: - return 12750; - case TELEMETRY_SOURCE_FUEL: - return 100; + result.step = singleprec ? 8 : 1; + result.min = -500; + result.max = singleprec ? 1540 : 3000; + break; case TELEMETRY_SOURCE_T1: case TELEMETRY_SOURCE_T2: - return 225; - case TELEMETRY_SOURCE_SPEED: - return 944; - case TELEMETRY_SOURCE_DIST: - return 2040; - case TELEMETRY_SOURCE_CELL: - return 5.1; - case TELEMETRY_SOURCE_CELLS_SUM: - case TELEMETRY_SOURCE_VFAS: - return 25.5; - case TELEMETRY_SOURCE_CURRENT: - return 127.5; - case TELEMETRY_SOURCE_CONSUMPTION: - return 5100; - case TELEMETRY_SOURCE_POWER: - return 1275; - default: - return 125; - } - break; - default: - return (Model.extendedLimits ? 125 :100); - } -} - -double RawSource::getOffset(const ModelData & Model) -{ - if (type==SOURCE_TYPE_TELEMETRY) { - switch (index) { - case TELEMETRY_SOURCE_A1: - case TELEMETRY_SOURCE_A2: - if (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].type==0) { - return (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].offset*Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio)/2550.0; - } - else { - return (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].offset*Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio)/255.0; - } - case TELEMETRY_SOURCE_ALT: - case TELEMETRY_SOURCE_GPS_ALT: - return 524; - case TELEMETRY_SOURCE_RPM: - return 6400; - case TELEMETRY_SOURCE_FUEL: - return 0; - case TELEMETRY_SOURCE_T1: - case TELEMETRY_SOURCE_T2: - return 98; - case TELEMETRY_SOURCE_SPEED: - return 474; - case TELEMETRY_SOURCE_DIST: - return 1024; - case TELEMETRY_SOURCE_CELL: - return 2.56; - default: - return 0; - } - } - return 0; -} - -int RawSource::getRawOffset(const ModelData & Model) -{ - switch (type) { - case SOURCE_TYPE_TELEMETRY: - switch (index) { - case TELEMETRY_SOURCE_TIMER1: - case TELEMETRY_SOURCE_TIMER2: - case TELEMETRY_SOURCE_RSSI_TX: - case TELEMETRY_SOURCE_RSSI_RX: - case TELEMETRY_SOURCE_A1: - case TELEMETRY_SOURCE_A2: - case TELEMETRY_SOURCE_FUEL: - case TELEMETRY_SOURCE_CELLS_SUM: - case TELEMETRY_SOURCE_VFAS: - case TELEMETRY_SOURCE_CURRENT: - case TELEMETRY_SOURCE_CONSUMPTION: - case TELEMETRY_SOURCE_POWER: - return 128; - default: - return 0; - } - default: - return 0; - } -} - -double RawSource::getStep(const ModelData & Model) -{ - switch (type) { - case SOURCE_TYPE_TELEMETRY: - switch (index) { - case TELEMETRY_SOURCE_TIMER1: - case TELEMETRY_SOURCE_TIMER2: - return 3; - case TELEMETRY_SOURCE_A1: - case TELEMETRY_SOURCE_A2: - if (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].type==0) { - return (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio/2550.0); - } - else { - return (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio/255.0); - } - case TELEMETRY_SOURCE_ALT: - case TELEMETRY_SOURCE_GPS_ALT: - return 8; + result.min = -30; + result.max = 225; + break; case TELEMETRY_SOURCE_RPM: - return 50; + result.step = singleprec ? 50 : 1; + result.max = singleprec ? 12750 : 20000; + break; + case TELEMETRY_SOURCE_FUEL: + result.max = 100; + break; case TELEMETRY_SOURCE_SPEED: - return 4; + result.step = singleprec ? 4 : 1; + result.max = singleprec ? 944 : 2000; + if (model && !model->frsky.imperial) { + result.step *= 1.852; + result.max *= 1.852; + } + break; case TELEMETRY_SOURCE_DIST: - return 8; + result.step = singleprec ? 8 : 1; + result.max = singleprec ? 2040 : 10000; + break; case TELEMETRY_SOURCE_CELL: - return 0.02; + result.step = singleprec ? 0.02 : 0.01; + result.max = 5.1; + result.decimals = 2; + break; case TELEMETRY_SOURCE_CELLS_SUM: case TELEMETRY_SOURCE_VFAS: - return 0.1; + result.step = 0.1; + result.max = 25.5; + result.decimals = 1; + break; case TELEMETRY_SOURCE_CURRENT: - return 0.5; + result.step = singleprec ? 0.5 : 0.1; + result.max = singleprec ? 127.5 : 200.0; + result.decimals = 1; + break; case TELEMETRY_SOURCE_CONSUMPTION: - return 20; + result.step = singleprec ? 20 : 1; + result.max = singleprec ? 5100 : 10000; + break; case TELEMETRY_SOURCE_POWER: - return 5; + result.step = singleprec ? 5 : 1; + result.max = singleprec ? 1275 : 2000; + break; default: - return 1; + result.max = 125; + break; + } + if (singleprec) { + result.offset = result.max - (127*result.step); } break; - default: - return 1; + + default: + result.max = (model && model->extendedLimits ? 125 : 100); + result.min = - result.max; + break; } + + return result; +} + +QString AnalogString(int index) +{ + static const QString sticks[] = { QObject::tr("Rud"), QObject::tr("Ele"), QObject::tr("Thr"), QObject::tr("Ail") }; + static const QString pots9X[] = { QObject::tr("P1"), QObject::tr("P2"), QObject::tr("P3") }; + static const QString potsX9D[] = { QObject::tr("S1"), QObject::tr("S2"), QObject::tr("LS"), QObject::tr("RS") }; + + if (index < 4) + return CHECK_IN_ARRAY(sticks, index); + else + return (IS_TARANIS(GetEepromInterface()->getBoard()) ? CHECK_IN_ARRAY(potsX9D, index-4) : CHECK_IN_ARRAY(pots9X, index-4)); +} + +QString RotaryEncoderString(int index) +{ + static const QString rotary[] = { QObject::tr("REa"), QObject::tr("REb") }; + return CHECK_IN_ARRAY(rotary, index); } QString RawSource::toString() { - static const QString sticks[] = { QObject::tr("Rud"), QObject::tr("Ele"), QObject::tr("Thr"), QObject::tr("Ail") }; - static const QString trims[] = { QObject::tr("TrmR"), QObject::tr("TrmE"), QObject::tr("TrmT"), QObject::tr("TrmA")}; - static const QString pots9X[] = { QObject::tr("P1"), QObject::tr("P2"), QObject::tr("P3") }; - - static const QString potsX9D[] = { QObject::tr("S1"), QObject::tr("S2"), QObject::tr("LS"), QObject::tr("RS") }; - - static const QString rotary[] = { QObject::tr("REa"), QObject::tr("REb") }; - - static const QString switches9X[] = { QObject::tr("3POS"), - QObject::tr("THR"), QObject::tr("RUD"), QObject::tr("ELE"), - QObject::tr("AIL"), QObject::tr("GEA"), QObject::tr("TRN"), - }; - - static const QString switchesX9D[] = { QObject::tr("SA"), QObject::tr("SB"), QObject::tr("SC"), QObject::tr("SD"), - QObject::tr("SE"), QObject::tr("SF"), QObject::tr("SG"), QObject::tr("SH"), - }; - static const QString telemetry[] = { QObject::tr("Batt"), QObject::tr("Timer1"), QObject::tr("Timer2"), (IS_TARANIS(GetEepromInterface()->getBoard()) ? QObject::tr("SWR") : QObject::tr("Tx")), (IS_TARANIS(GetEepromInterface()->getBoard()) ? QObject::tr("RSSI") : QObject::tr("Rx")), QObject::tr("A1"), QObject::tr("A2"), QObject::tr("Alt"), QObject::tr("Rpm"), QObject::tr("Fuel"), QObject::tr("T1"), QObject::tr("T2"), QObject::tr("Speed"), QObject::tr("Dist"), QObject::tr("GPS Alt"), QObject::tr("Cell"), QObject::tr("Cels"), QObject::tr("Vfas"), QObject::tr("Curr"), @@ -273,25 +180,27 @@ QString RawSource::toString() QObject::tr("Cur+"), QObject::tr("Pwr+"), QObject::tr("ACC "), QObject::tr("Time"), }; - static const QString virtualSwitches[] = { QObject::tr("CS1"), QObject::tr("CS2"), QObject::tr("CS3"), QObject::tr("CS4"), QObject::tr("CS5"), QObject::tr("CS6"), QObject::tr("CS7"), QObject::tr("CS8"), QObject::tr("CS9"), QObject::tr("CSA"), - QObject::tr("CSB"), QObject::tr("CSC"), QObject::tr("CSD"), QObject::tr("CSE"), QObject::tr("CSF"), QObject::tr("CSG"), QObject::tr("CSH"), QObject::tr("CSI"), QObject::tr("CSJ"), QObject::tr("CSK"), - QObject::tr("CSL"), QObject::tr("CSM"), QObject::tr("CSN"), QObject::tr("CSO"), QObject::tr("CSP"), QObject::tr("CSQ"), QObject::tr("CSR"), QObject::tr("CSS"), QObject::tr("CST"), QObject::tr("CSU"), - QObject::tr("CSV"), QObject::tr("CSW") + static const QString virtualSwitches[] = { QObject::tr("LS1"), QObject::tr("LS2"), QObject::tr("LS3"), QObject::tr("LS4"), QObject::tr("LS5"), QObject::tr("LS6"), QObject::tr("LS7"), QObject::tr("LS8"), QObject::tr("LS9"), QObject::tr("LSA"), + QObject::tr("LSB"), QObject::tr("LSC"), QObject::tr("LSD"), QObject::tr("LSE"), QObject::tr("LSF"), QObject::tr("LSG"), QObject::tr("LSH"), QObject::tr("LSI"), QObject::tr("LSJ"), QObject::tr("LSK"), + QObject::tr("LSL"), QObject::tr("LSM"), QObject::tr("LSN"), QObject::tr("LSO"), QObject::tr("LSP"), QObject::tr("LSQ"), QObject::tr("LSR"), QObject::tr("LSS"), QObject::tr("LST"), QObject::tr("LSU"), + QObject::tr("LSV"), QObject::tr("LSW") }; if (index<0) { return QObject::tr("----"); } - switch(type) { - case SOURCE_TYPE_STICK: - if (index < 4) - return CHECK_IN_ARRAY(sticks, index); + switch (type) { + case SOURCE_TYPE_VIRTUAL_INPUT: + if (model && strlen(model->inputNames[index]) > 0) + return QString(model->inputNames[index]); else - return (IS_TARANIS(GetEepromInterface()->getBoard()) ? CHECK_IN_ARRAY(potsX9D, index-4) : CHECK_IN_ARRAY(pots9X, index-4)); + return QObject::tr("Input %1").arg(index+1); + case SOURCE_TYPE_STICK: + return AnalogString(index); case SOURCE_TYPE_TRIM: return CHECK_IN_ARRAY(trims, index); case SOURCE_TYPE_ROTARY_ENCODER: - return CHECK_IN_ARRAY(rotary, index); + return RotaryEncoderString(index); case SOURCE_TYPE_MAX: return QObject::tr("MAX"); case SOURCE_TYPE_SWITCH: @@ -345,10 +254,10 @@ QString RawSwitch::toString() SwitchUp('H'), SwitchDn('H'), }; - static const QString virtualSwitches[] = { QObject::tr("CS1"), QObject::tr("CS2"), QObject::tr("CS3"), QObject::tr("CS4"), QObject::tr("CS5"), QObject::tr("CS6"), QObject::tr("CS7"), QObject::tr("CS8"), QObject::tr("CS9"), QObject::tr("CSA"), - QObject::tr("CSB"), QObject::tr("CSC"), QObject::tr("CSD"), QObject::tr("CSE"), QObject::tr("CSF"), QObject::tr("CSG"), QObject::tr("CSH"), QObject::tr("CSI"), QObject::tr("CSJ"), QObject::tr("CSK"), - QObject::tr("CSL"), QObject::tr("CSM"), QObject::tr("CSN"), QObject::tr("CSO"), QObject::tr("CSP"), QObject::tr("CSQ"), QObject::tr("CSR"), QObject::tr("CSS"), QObject::tr("CST"), QObject::tr("CSU"), - QObject::tr("CSV"), QObject::tr("CSW") + static const QString virtualSwitches[] = { QObject::tr("LS1"), QObject::tr("LS2"), QObject::tr("LS3"), QObject::tr("LS4"), QObject::tr("LS5"), QObject::tr("LS6"), QObject::tr("LS7"), QObject::tr("LS8"), QObject::tr("LS9"), QObject::tr("LSA"), + QObject::tr("LSB"), QObject::tr("LSC"), QObject::tr("LSD"), QObject::tr("LSE"), QObject::tr("LSF"), QObject::tr("LSG"), QObject::tr("LSH"), QObject::tr("LSI"), QObject::tr("LSJ"), QObject::tr("LSK"), + QObject::tr("LSL"), QObject::tr("LSM"), QObject::tr("LSN"), QObject::tr("LSO"), QObject::tr("LSP"), QObject::tr("LSQ"), QObject::tr("LSR"), QObject::tr("LSS"), QObject::tr("LST"), QObject::tr("LSU"), + QObject::tr("LSV"), QObject::tr("LSW") }; switch(type) { @@ -407,6 +316,25 @@ QString RawSwitch::toString() return QObject::tr("----"); } +QString CurveReference::toString() +{ + if (value == 0) { + return "----"; + } + else { + switch(type) { + case CURVE_REF_DIFF: + return QObject::tr("Diff(%1)").arg(getGVarString(value)); + case CURVE_REF_EXPO: + return QObject::tr("Expo(%1)").arg(getGVarString(value)); + case CURVE_REF_FUNC: + return QObject::tr("Function(%1)").arg(QString("x>0" "x<0" "|x|" "f>0" "f<0" "|f|").mid(3*(value-1), 3)); + default: + return QString(value > 0 ? QObject::tr("Curve(%1)") : QObject::tr("!Curve(%1)")).arg(abs(value)); + } + } +} + GeneralSettings::GeneralSettings() { memset(this, 0, sizeof(GeneralSettings)); @@ -417,7 +345,7 @@ GeneralSettings::GeneralSettings() calibSpanNeg[i] = 0x180; calibSpanPos[i] = 0x180; } - QSettings settings("companion9x", "companion9x"); + QSettings settings; templateSetup = settings.value("default_channel_order", 0).toInt(); stickMode = settings.value("default_mode", 1).toInt(); int profile_id = settings.value("ActiveProfile", 0).toInt(); @@ -534,6 +462,18 @@ ModelData::ModelData() clear(); } +void ModelData::clearInputs() +{ + for (int i=0; igetCapability(CustomCurves); for (int i=0; i=8) - curves[i].clear(9); - else - curves[i].clear(5); + curves[i].clear(5); } swashRingData.clear(); @@ -617,13 +551,13 @@ ModelData ModelData::removeGlobalVars() for (int i=0; i eepromInterfaces; void RegisterEepromInterfaces() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; int rev4a = settings.value("rev4asupport",0).toInt(); eepromInterfaces.push_back(new Open9xInterface(BOARD_STOCK)); eepromInterfaces.push_back(new Open9xInterface(BOARD_M128)); @@ -670,7 +604,7 @@ void RegisterFirmwares() #ifndef __APPLE__ firmwares.push_back(new FirmwareInfo("ersky9x", QObject::tr("ersky9x"), new Ersky9xInterface(), "http://ersky9x.googlecode.com/svn/trunk/ersky9x_rom.bin", ERSKY9X_STAMP)); #endif - default_firmware_variant = GetFirmwareVariant("opentx-stock-heli-templates-en"); + default_firmware_variant = GetFirmwareVariant("opentx-9x-heli-templates-en"); RegisterEepromInterfaces(); } diff --git a/companion/src/eeprominterface.h b/companion/src/eeprominterface.h index 4f91a8719..915387e01 100644 --- a/companion/src/eeprominterface.h +++ b/companion/src/eeprominterface.h @@ -44,14 +44,18 @@ template t LIMIT(t mi, t x, t ma) { return std::min(std::max(mi, x), ma enum BoardEnum { BOARD_STOCK, BOARD_M128, + BOARD_MEGA2560, BOARD_GRUVIN9X, BOARD_SKY9X, BOARD_TARANIS, BOARD_TARANIS_REV4a }; -#define IS_STOCK(board) (board==BOARD_STOCK || board==BOARD_M128) -#define IS_ARM(board) (board==BOARD_SKY9X || board==BOARD_TARANIS || board==BOARD_TARANIS_REV4a) -#define IS_TARANIS(board) (board==BOARD_TARANIS || board==BOARD_TARANIS_REV4a) + +#define IS_9X(board) (board==BOARD_STOCK || board==BOARD_M128) +#define IS_STOCK(board) (board==BOARD_STOCK) +#define IS_2560(board) (board==BOARD_GRUVIN9X || board==BOARD_MEGA2560) +#define IS_ARM(board) (board==BOARD_SKY9X || board==BOARD_TARANIS || board==BOARD_TARANIS_REV4a) +#define IS_TARANIS(board) (board==BOARD_TARANIS || board==BOARD_TARANIS_REV4a) const uint8_t modn12x3[4][4]= { {1, 2, 3, 4}, @@ -59,13 +63,15 @@ const uint8_t modn12x3[4][4]= { {4, 2, 3, 1}, {4, 3, 2, 1} }; -#define C9XMAX_MODELS 60 +#define C9X_MAX_MODELS 60 #define C9X_MAX_PHASES 9 #define C9X_MAX_MIXERS 64 -#define C9X_MAX_EXPOS 32 -#define C9X_MAX_CURVES 16 -#define MAX_POINTS 17 -#define C9X_MAX_GVARS 9 +#define C9X_MAX_INPUTS 32 +#define C9X_MAX_EXPOS 64 +#define C9X_MAX_CURVES 32 +#define C9X_MAX_POINTS 17 +#define C9X_MAX_GVARS 9 +#define C9X_MAX_ENCODERS 2 #define NUM_SAFETY_CHNOUT 16 #define C9X_NUM_CHNOUT 32 // number of real output channels #define C9X_NUM_CSW 32 // number of custom switches @@ -107,6 +113,18 @@ const uint8_t chout_ar[] = { //First number is 0..23 -> template setup, Second 3,1,2,4 , 3,1,4,2 , 3,2,1,4 , 3,2,4,1 , 3,4,1,2 , 3,4,2,1, 4,1,2,3 , 4,1,3,2 , 4,2,1,3 , 4,2,3,1 , 4,3,1,2 , 4,3,2,1 }; // TODO delete it? +// Beep center bits +#define BC_BIT_RUD (0x01) +#define BC_BIT_ELE (0x02) +#define BC_BIT_THR (0x04) +#define BC_BIT_AIL (0x08) +#define BC_BIT_P1 (0x10) +#define BC_BIT_P2 (0x20) +#define BC_BIT_P3 (0x40) +#define BC_BIT_P4 (0x80) +#define BC_BIT_REA (0x80) +#define BC_BIT_REB (0x100) + // TODO remove this enum! enum EnumKeys { KEY_MENU, @@ -185,10 +203,13 @@ enum HeliSwashTypes { #define NUM_CAL_PPM 4 #define NUM_PPM 8 #define NUM_CYC 3 -#define C9X_NUM_SWITCHES 10 -#define C9X_NUM_KEYS 6 +#define C9X_NUM_SWITCHES 10 +#define C9X_NUM_KEYS 6 #define C9X_MAX_TIMERS 2 +extern const char * switches9X[]; +extern const char * switchesX9D[]; + enum TelemetrySource { TELEMETRY_SOURCE_TX_BATT, TELEMETRY_SOURCE_TIMER1, @@ -241,6 +262,8 @@ enum TelemetrySource { enum RawSourceType { SOURCE_TYPE_NONE, + SOURCE_TYPE_VIRTUAL_INPUT, + SOURCE_TYPE_LUA_INPUT, SOURCE_TYPE_STICK, // and POTS SOURCE_TYPE_ROTARY_ENCODER, SOURCE_TYPE_TRIM, @@ -254,25 +277,56 @@ enum RawSourceType { SOURCE_TYPE_TELEMETRY, MAX_SOURCE_TYPE }; + class ModelData; +QString AnalogString(int index); +QString RotaryEncoderString(int index); + +class RawSourceRange +{ + public: + RawSourceRange(): + decimals(0), + min(0.0), + max(0.0), + step(1.0), + offset(0.0) + { + } + + float getValue(int value) { + return min + float(value) * step; + } + + int decimals; + double min; + double max; + double step; + double offset; + +}; + class RawSource { public: RawSource(): type(SOURCE_TYPE_NONE), - index(0) + index(0), + model(NULL) { } - RawSource(int value): + RawSource(int value, const ModelData * model=NULL): type(RawSourceType(abs(value)/65536)), - index(value >= 0 ? abs(value)%65536 : -(abs(value)%65536)) + index(value >= 0 ? abs(value)%65536 : -(abs(value)%65536)), + model(model) { } - RawSource(RawSourceType type, int index=0): + RawSource(RawSourceType type, int index=0, const ModelData * model=NULL): type(type), - index(index) + index(index), + model(model) { } @@ -283,19 +337,19 @@ class RawSource { QString toString(); - int getDecimals(const ModelData & Model); - double getMin(const ModelData & Model); - double getMax(const ModelData & Model); - double getStep(const ModelData & Model); - double getOffset(const ModelData & Model); - int getRawOffset(const ModelData & Model); + RawSourceRange getRange(bool singleprec=false); - bool operator== ( const RawSource& other) { + bool operator == ( const RawSource & other) { return (this->type == other.type) && (this->index == other.index); } + bool operator != ( const RawSource & other) { + return (this->type != other.type) || (this->index != other.index); + } + RawSourceType type; int index; + const ModelData * model; }; enum RawSwitchType { @@ -404,7 +458,6 @@ class GeneralSettings { int timezone; bool optrexDisplay; unsigned int inactivityTimer; - bool throttleReversed; bool minuteBeep; bool preBeep; bool flashBeep; @@ -449,19 +502,47 @@ class GeneralSettings { int backgroundVolume; unsigned int mavbaud; unsigned int switchUnlockStates; + unsigned int hw_uartMode; +}; + +class CurveReference { + public: + enum CurveRefType { + CURVE_REF_DIFF, + CURVE_REF_EXPO, + CURVE_REF_FUNC, + CURVE_REF_CUSTOM + }; + + CurveReference() { clear(); } + + CurveReference(CurveRefType type, int value): + type(type), + value(value) + { + } + + void clear() { memset(this, 0, sizeof(CurveReference)); } + + CurveRefType type; + int value; + + QString toString(); }; class ExpoData { public: ExpoData() { clear(); } + RawSource srcRaw; + unsigned int scale; unsigned int mode; // 0=end, 1=pos, 2=neg, 3=both unsigned int chn; RawSwitch swtch; unsigned int phases; // -5=!FP4, 0=normal, 5=FP4 int weight; - int expo; - unsigned int curveMode; - int curveParam; + int offset; + CurveReference curve; + int carryTrim; char name[10+1]; void clear() { memset(this, 0, sizeof(ExpoData)); } }; @@ -474,11 +555,19 @@ class CurvePoint { class CurveData { public: + enum CurveType { + CURVE_TYPE_STANDARD, + CURVE_TYPE_CUSTOM, + CURVE_TYPE_LAST = CURVE_TYPE_CUSTOM + }; + CurveData() { clear(5); } - bool custom; // 0=end, 1=pos, 2=neg, 3=both - uint8_t count; - CurvePoint points[MAX_POINTS]; - char name[6+1]; + + CurveType type; + bool smooth; + int count; + CurvePoint points[C9X_MAX_POINTS]; + char name[6+1]; void clear(int count) { memset(this, 0, sizeof(CurveData)); this->count = count; } }; @@ -492,7 +581,8 @@ class LimitData { int ppmCenter; bool symetrical; char name[6+1]; - void clear() { memset(this, 0, sizeof(LimitData)); min = -100; max = +100; } + CurveReference curve; + void clear() { memset(this, 0, sizeof(LimitData)); min = -1000; max = +1000; } }; enum MltpxValue { @@ -501,7 +591,6 @@ enum MltpxValue { MLTPX_REP=2 }; - class MixData { public: MixData() { clear(); } @@ -509,9 +598,8 @@ class MixData { RawSource srcRaw; unsigned int srcVariant; int weight; - int differential; RawSwitch swtch; - int curve; //0=symmetrisch + CurveReference curve; //0=symmetrisch unsigned int delayUp; unsigned int delayDown; unsigned int speedUp; // Servogeschwindigkeit aus Tabelle (10ms Cycle) @@ -520,9 +608,7 @@ class MixData { bool noExpo; MltpxValue mltpx; // multiplex method 0=+ 1=* 2=replace unsigned int mixWarn; // mixer warning - unsigned int enableFmTrim; unsigned int phases; // -5=!FP4, 0=normal, 5=FP4 - unsigned int lateOffset; int sOffset; char name[10+1]; @@ -572,10 +658,7 @@ enum AssignFunc { FuncBackgroundMusic, FuncBackgroundMusicPause, FuncAdjustGV1, - FuncAdjustGV2, - FuncAdjustGV3, - FuncAdjustGV4, - FuncAdjustGV5, + FuncAdjustGVLast = FuncAdjustGV1+C9X_MAX_GVARS-1, FuncCount }; @@ -588,7 +671,7 @@ class FuncSwData { // Function Switches data char paramarm[10]; unsigned int enabled; // TODO perhaps not any more the right name unsigned int adjustMode; - unsigned int repeatParam; + int repeatParam; void clear() { memset(this, 0, sizeof(FuncSwData)); } }; @@ -602,7 +685,7 @@ class PhaseData { unsigned int fadeIn; unsigned int fadeOut; int rotaryEncoders[2]; - int gvars[5]; + int gvars[C9X_MAX_GVARS]; void clear() { memset(this, 0, sizeof(PhaseData)); for (int i=0; i off, abs, THs, TH%, THt, sw/!sw, !m_sw/!m_sw - int8_t modeB; - bool minuteBeep; - bool countdownBeep; - bool dir; // 0=>Count Down, 1=>Count Up + TimerMode mode; // timer trigger source -> off, abs, THs, TH%, THt, sw/!sw, !m_sw/!m_sw + bool minuteBeep; + unsigned int countdownBeep; + bool dir; // 0=>Count Down, 1=>Count Up unsigned int val; - bool persistent; - int pvalue; + bool persistent; + int pvalue; void clear() { memset(this, 0, sizeof(TimerData)); } }; @@ -783,7 +876,7 @@ class ModelData { TimerData timers[2]; bool thrTrim; // Enable Throttle Trim bool thrExpo; // Enable Throttle Expo - unsigned int trimInc; // Trim Increments + int trimInc; // Trim Increments bool disableThrottleWarning; unsigned int beepANACenter; // 1<<0->A1.. 1<<6->A7 @@ -794,7 +887,10 @@ class ModelData { PhaseData phaseData[C9X_MAX_PHASES]; MixData mixData[C9X_MAX_MIXERS]; LimitData limitData[C9X_NUM_CHNOUT]; + + char inputNames[C9X_MAX_INPUTS][4+1]; ExpoData expoData[C9X_MAX_EXPOS]; + CurveData curves[C9X_MAX_CURVES]; CustomSwData customSw[C9X_NUM_CSW]; FuncSwData funcSw[C9X_MAX_CUSTOM_FUNCTIONS]; @@ -805,7 +901,9 @@ class ModelData { int8_t t2throttle; // Start timer2 using throttle unsigned int modelId; unsigned int switchWarningStates; + // TODO structure char gvars_names[C9X_MAX_GVARS][6+1]; + bool gvars_popups[C9X_MAX_GVARS]; uint8_t gvsource[5]; uint8_t bt_telemetry; uint8_t numVoice; @@ -828,6 +926,9 @@ class ModelData { ModelData removeGlobalVars(); + void clearMixes(); + void clearInputs(); + protected: void removeGlobalVar(int & var); }; @@ -835,29 +936,26 @@ class ModelData { class RadioData { public: GeneralSettings generalSettings; - ModelData models[C9XMAX_MODELS]; + ModelData models[C9X_MAX_MODELS]; }; +// TODO rename FlightPhase to FlightMode enum Capability { OwnerName, FlightPhases, - FlightPhasesAreNamed, + FlightModesName, FlightPhasesHaveFades, SimulatorType, Mixes, MixesWithoutExpo, Timers, - TimerTriggerB, TimeDivisions, - minuteBeep, - countdownBeep, CustomFunctions, VoicesAsNumbers, VoicesMaxLength, ModelVoice, MultiLangVoice, ModelImage, - InstantTrimSW, Pots, Switches, SwitchesPositions, @@ -867,20 +965,11 @@ enum Capability { CustomSwitchesExt, RotaryEncoders, Outputs, + ChannelsName, ExtraChannels, ExtraInputs, - ExtraTrims, ExtendedTrims, - HasNegCurves, HasInputFilter, - HasExpoCurves, - ExpoIsCurve, - ExpoCurve5, - ExpoCurve9, - CustomCurves, - NumCurves3, - NumCurves5, - NumCurves9, NumCurves, NumCurvePoints, OffsetWeight, @@ -900,7 +989,6 @@ enum Capability { TrainerSwitch, ModelTrainerEnable, Timer2ThrTrig, - HasTTrace, HasExpoNames, HasMixerNames, HasChNames, @@ -910,14 +998,10 @@ enum Capability { HasPPMStart, HasGeneralUnits, HasFAIMode, - NoTimerDirs, - NoThrExpo, OptrexDisplay, PPMExtCtrl, PPMFrameLength, - MixFmTrim, gsSwitchMask, - pmSwitchMask, BLonStickMove, DSM2Indexes, Telemetry, @@ -929,13 +1013,10 @@ enum Capability { GvarsAreNamed, GvarsFlightPhases, GvarsHaveSources, - GvarsAsSources, - GvarsAsWeight, - GvarsNum, - GvarsOfsNum, + GvarsName, NoTelemetryProtocol, - TelemetryCSFields, - TelemetryColsCSFields, + TelemetryCustomScreens, + TelemetryCustomScreensFieldsPerLine, TelemetryRSSIModel, TelemetryAlarm, TelemetryInternalAlarm, @@ -949,11 +1030,8 @@ enum Capability { HasPPMSim, HasCrossTrims, HasStickScroll, - HasFixOffset, HasSoundMixer, NumModules, - FSSwitch, - DiffMixers, PPMCenter, SYMLimits, HasCurrentCalibration, @@ -961,8 +1039,6 @@ enum Capability { HasBrightness, HasContrast, PerModelTimers, - PerModelThrottleWarning, - PerModelThrottleInvert, SlowScale, SlowRange, PermTimers, @@ -970,6 +1046,13 @@ enum Capability { CSFunc, LCDWidth, GetThrSwitch, + VirtualInputs, + LuaInputs, + LimitsPer1000, + EnhancedCurves, + TelemetryInternalAlarms, + HasFasOffset, + HasMahPersistent }; enum UseContext { diff --git a/companion/src/expodialog.cpp b/companion/src/expodialog.cpp deleted file mode 100644 index 9382766b0..000000000 --- a/companion/src/expodialog.cpp +++ /dev/null @@ -1,334 +0,0 @@ -#include "expodialog.h" -#include "ui_expodialog.h" -#include "eeprominterface.h" -#include "helpers.h" - -ExpoDialog::ExpoDialog(QWidget *parent, ExpoData *expoData, int stickMode) : - QDialog(parent), - ui(new Ui::ExpoDialog), - ed(expoData) -{ - ui->setupUi(this); - QLabel * lb_fp[] = {ui->lb_FP0,ui->lb_FP1,ui->lb_FP2,ui->lb_FP3,ui->lb_FP4,ui->lb_FP5,ui->lb_FP6,ui->lb_FP7,ui->lb_FP8 }; - QCheckBox * cb_fp[] = {ui->cb_FP0,ui->cb_FP1,ui->cb_FP2,ui->cb_FP3,ui->cb_FP4,ui->cb_FP5,ui->cb_FP6,ui->cb_FP7,ui->cb_FP8 }; - - setWindowTitle(tr("DEST -> %1").arg(getStickStr(ed->chn))); - QRegExp rx(CHAR_FOR_NAMES_REGEX); - - if (GetEepromInterface()->getCapability(GvarsAsWeight)) { - int gvars=0; - if (GetEepromInterface()->getCapability(HasVariants)) { - if ((GetCurrentFirmwareVariant() & GVARS_VARIANT)) { - gvars=1; - } - } else { - gvars=1; - } - if (gvars==0) { - ui->expoGV->setDisabled(true); - ui->weightGV->setDisabled(true); - ui->expoCurveGV->setDisabled(true); - if (ed->expo>100) { - ed->expo=0; - } - if (ed->weight>100 || ed->weight<-100) { - ed->weight=100; - } - if (ed->curveParam>100 || ed->curveParam<-100) { - ed->curveParam=0; - } - } - populateGVCB(ui->expoCB,ed->expo); - populateGVCB(ui->weightCB,ed->weight); - populateGVCB(ui->expoCurveCB,ed->curveParam); - - ui->weightSB->setMinimum(0); - ui->weightSB->setMaximum(100); - if (ed->weight>100 || ed->weight<0) { - ui->weightGV->setChecked(true); - ui->weightSB->hide(); - ui->weightCB->show(); - } else { - ui->weightGV->setChecked(false); - ui->weightSB->setValue(ed->weight); - ui->weightSB->show(); - ui->weightCB->hide(); - } - - ui->expoSB->setMinimum(-100); - ui->expoSB->setMaximum(100); - if (ed->expo>100 || ed->expo<-100) { - ui->expoGV->setChecked(true); - ui->expoSB->hide(); - ui->expoCB->show(); - } else { - ui->expoGV->setChecked(false); - ui->expoSB->setValue(ed->expo); - ui->expoSB->show(); - ui->expoCB->hide(); - } - - ui->expoCurveSB->setMinimum(-100); - ui->expoCurveSB->setMaximum(100); - if (ed->curveParam>100 || ed->curveParam<-100) { - ui->expoCurveGV->setChecked(true); - ui->expoCurveSB->hide(); - ui->expoCurveCB->show(); - } else { - ui->expoCurveGV->setChecked(false); - ui->expoCurveSB->setValue(ed->curveParam); - ui->expoCurveSB->show(); - ui->expoCurveCB->hide(); - } - } else { - ui->expoGV->hide(); - ui->weightGV->hide(); - ui->expoCurveGV->hide(); - ui->expoSB->setMinimum(-100); - ui->expoSB->setMaximum(100); - ui->expoSB->setValue(ed->expo); - ui->expoCurveSB->setMinimum(-100); - ui->expoCurveSB->setMaximum(100); - ui->expoCurveSB->setValue(ed->curveParam); - ui->weightSB->setMinimum(0); - ui->weightSB->setMaximum(100); - ui->weightSB->setValue(ed->weight); - } - populateSwitchCB(ui->switchesCB,ed->swtch); - if (ed->curveMode==0) { - populateExpoCurvesCB(ui->curvesCB,0); // TODO capacity for er9x - } else { - populateExpoCurvesCB(ui->curvesCB,ed->curveParam); // TODO capacity for er9x - } - ui->modeCB->setCurrentIndex(ed->mode-1); - if (!GetEepromInterface()->getCapability(HasExpoCurves)) { - ui->label_curves->hide(); - ui->curvesCB->hide(); - ed->curveMode=1; - } - if (!GetEepromInterface()->getCapability(ExpoIsCurve)) { - ui->expoCurveCB->hide(); - ui->expoCurveSB->hide(); - ui->expoCurveGV->hide(); - ui->label_curves->setText(tr("Curve")); - } else { - ui->label_expo->hide(); - ui->expoCB->hide(); - ui->expoGV->hide(); - ui->expoSB->hide(); - } - if (!GetEepromInterface()->getCapability(FlightPhases)) { - ui->label_phases->hide(); - for (int i=0; i<9; i++) { - lb_fp[i]->hide(); - cb_fp[i]->hide(); - } - } else { - int mask=1; - for (int i=0; i<9 ; i++) { - if ((ed->phases & mask)==0) { - cb_fp[i]->setChecked(true); - } - mask <<= 1; - } - for (int i=GetEepromInterface()->getCapability(FlightPhases); i<9;i++) { - lb_fp[i]->hide(); - cb_fp[i]->hide(); - } - } - int expolength=GetEepromInterface()->getCapability(HasExpoNames); - if (!expolength) { - ui->label_name->hide(); - ui->expoName->hide(); - } else { - ui->expoName->setMaxLength(expolength); - } - ui->expoName->setValidator(new QRegExpValidator(rx, this)); - ui->expoName->setText(ed->name); - valuesChanged(); - connect(ui->expoName,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); - connect(ui->expoCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->expoSB,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); - connect(ui->expoCurveCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->expoCurveSB,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); - connect(ui->weightCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->weightSB,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); - connect(ui->switchesCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->curvesCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->modeCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->expoGV,SIGNAL(stateChanged(int)),this,SLOT(widgetChanged())); - connect(ui->expoCurveGV,SIGNAL(stateChanged(int)),this,SLOT(widgetChanged())); - connect(ui->weightGV,SIGNAL(stateChanged(int)),this,SLOT(widgetChanged())); - for (int i=0; i<9; i++) { - connect(cb_fp[i],SIGNAL(toggled(bool)),this,SLOT(valuesChanged())); - } - QTimer::singleShot(0, this, SLOT(shrink())); -} - -ExpoDialog::~ExpoDialog() -{ - delete ui; -} - -void ExpoDialog::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - -void ExpoDialog::widgetChanged() -{ - if (GetEepromInterface()->getCapability(GvarsAsWeight)) { - int gvars=0; - if (GetEepromInterface()->getCapability(HasVariants)) { - if ((GetCurrentFirmwareVariant() & GVARS_VARIANT)) { - gvars=1; - } - } else { - gvars=1; - } - if (gvars==1) { - if (!GetEepromInterface()->getCapability(ExpoIsCurve)) { - if (ui->expoGV->isChecked()) { - ui->expoCB->show(); - ui->expoSB->hide(); - } else { - ui->expoCB->hide(); - ui->expoSB->show(); - } - } else { - if (ui->expoCurveGV->isChecked()) { - ui->expoCurveCB->show(); - ui->expoCurveSB->hide(); - } else { - ui->expoCurveCB->hide(); - ui->expoCurveSB->show(); - } - } - if (ui->weightGV->isChecked()) { - ui->weightCB->show(); - ui->weightSB->hide(); - } else { - ui->weightCB->hide(); - ui->weightSB->show(); - } - } - valuesChanged(); - QTimer::singleShot(0, this, SLOT(shrink())); - } -} - - -void ExpoDialog::valuesChanged() -{ - QCheckBox * cb_fp[] = {ui->cb_FP0,ui->cb_FP1,ui->cb_FP2,ui->cb_FP3,ui->cb_FP4,ui->cb_FP5,ui->cb_FP6,ui->cb_FP7,ui->cb_FP8 }; - if (ui->curvesCB->currentIndex()==0) { - if (GetEepromInterface()->getCapability(ExpoIsCurve)) { - ed->curveMode = 0; - ui->expoCurveGV->show(); - if (ui->expoCurveGV->isChecked()) { - ui->expoCurveCB->show(); - ui->expoCurveSB->hide(); - ed->curveParam = ui->expoCurveCB->itemData(ui->expoCurveCB->currentIndex()).toInt(); - } else { - ui->expoCurveCB->hide(); - ui->expoCurveSB->show(); - ed->curveParam = ui->expoCurveSB->value(); - } - ed->expo = ed->curveParam; - } else { - ui->expoCurveCB->hide(); - ui->expoCurveSB->hide(); - ui->expoCurveGV->hide(); - ed->curveMode = 0; - if (ui->expoGV->isChecked()) { - ed->expo = ui->expoCB->itemData(ui->expoCB->currentIndex()).toInt(); - } else { - ed->expo = ui->expoSB->value(); - } - ed->curveParam = ed->expo; - } - } else { - if (!GetEepromInterface()->getCapability(ExpoIsCurve)) { - ed->curveMode = 1; - ed->curveParam = ui->curvesCB->currentIndex(); - if (ui->expoGV->isChecked()) { - ed->expo = ui->expoCB->itemData(ui->expoCB->currentIndex()).toInt(); - } else { - ed->expo = ui->expoSB->value(); - } - } else { - ed->curveMode = 1; - ed->curveParam = ui->curvesCB->currentIndex(); - ed->expo = 0; - } - ui->expoCurveCB->hide(); - ui->expoCurveSB->hide(); - ui->expoCurveGV->hide(); - } - if (ui->weightGV->isChecked()) { - ed->weight = ui->weightCB->itemData(ui->weightCB->currentIndex()).toInt(); - } else { - ed->weight = ui->weightSB->value(); - } - ed->swtch = RawSwitch(ui->switchesCB->itemData(ui->switchesCB->currentIndex()).toInt()); - ed->mode = ui->modeCB->currentIndex() + 1; - int i=0; - for (i=0; iexpoName->text().toAscii().length(); i++) { - ed->name[i]=ui->expoName->text().toAscii().at(i); - } - ed->name[i]=0; - ed->phases=0; - for (int i=8; i>=0 ; i--) { - if (!cb_fp[i]->checkState()) { - ed->phases+=1; - } - ed->phases<<=1; - } - ed->phases>>=1; - if (GetEepromInterface()->getCapability(FlightPhases)) { - int zeros=0; - int ones=0; - int phtemp=ed->phases; - for (int i=0; igetCapability(FlightPhases); i++) { - if (phtemp & 1) { - ones++; - } - else { - zeros++; - } - phtemp >>=1; - } - if (zeros==1) { - phtemp=ed->phases; - for (int i=0; igetCapability(FlightPhases); i++) { - if ((phtemp & 1)==0) { - break; - } - phtemp >>=1; - } - } - else if (ones==1) { - phtemp=ed->phases; - for (int i=0; igetCapability(FlightPhases); i++) { - if (phtemp & 1) { - break; - } - phtemp >>=1; - } - } - } else { - ed->phases=0; - } -} - -void ExpoDialog::shrink() -{ - resize(0,0); -} diff --git a/companion/src/expodialog.h b/companion/src/expodialog.h deleted file mode 100644 index a7630cc87..000000000 --- a/companion/src/expodialog.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef EXPODIALOG_H -#define EXPODIALOG_H - -#include -#include "eeprominterface.h" - -namespace Ui { - class ExpoDialog; -} - -class ExpoDialog : public QDialog { - Q_OBJECT -public: - ExpoDialog(QWidget *parent, ExpoData *mixdata, int stickMode); - ~ExpoDialog(); - -protected: - void changeEvent(QEvent *e); - -private slots: - void valuesChanged(); - void widgetChanged(); - void shrink(); - -private: - Ui::ExpoDialog *ui; - ExpoData *ed; -}; - -#endif // EXPODIALOG_H diff --git a/companion/src/file.cpp b/companion/src/file.cpp index 10c918cf3..404a40db8 100644 --- a/companion/src/file.cpp +++ b/companion/src/file.cpp @@ -323,7 +323,10 @@ unsigned int EFile::readRlc12(uint8_t *buf, unsigned int i_len, bool rlc2) if (read(&m_bRlc, 1) !=1) break; //read how many bytes to read - assert(m_bRlc & 0x7f); + if (!(m_bRlc & 0x7f)) { + qDebug() << "RLC decoding error!"; + return 0; + } if (rlc2) { if(m_bRlc&0x80){ // if contains high byte diff --git a/companion/src/firmwares/er9x/er9xeeprom.cpp b/companion/src/firmwares/er9x/er9xeeprom.cpp index 335121706..a72f22dea 100644 --- a/companion/src/firmwares/er9x/er9xeeprom.cpp +++ b/companion/src/firmwares/er9x/er9xeeprom.cpp @@ -3,26 +3,6 @@ #include "helpers.h" #include -int8_t er9xFromSwitch(const RawSwitch & sw) -{ - switch (sw.type) { - case SWITCH_TYPE_SWITCH: - return sw.index; - case SWITCH_TYPE_VIRTUAL: - return sw.index > 0 ? (9 + sw.index) : (-9 + sw.index); - case SWITCH_TYPE_ON: - return 22; - case SWITCH_TYPE_OFF: - return -22; - case SWITCH_TYPE_MOMENT_SWITCH: - return sw.index > 0 ? (22 + sw.index) : (-22 + sw.index); - case SWITCH_TYPE_MOMENT_VIRTUAL: - return sw.index > 0 ? (31 + sw.index) : (-31 + sw.index); - default: - return 0; - } -} - RawSwitch er9xToSwitch(int8_t sw) { uint8_t swa = abs(sw); @@ -47,15 +27,6 @@ t_Er9xTrainerMix::t_Er9xTrainerMix() memset(this, 0, sizeof(t_Er9xTrainerMix)); } -t_Er9xTrainerMix::t_Er9xTrainerMix(TrainerMix &c9x) -{ - memset(this, 0, sizeof(t_Er9xTrainerMix)); - srcChn = c9x.src; - swtch = er9xFromSwitch(c9x.swtch); - studWeight = (8 * c9x.weight) / 25; - mode = c9x.mode; -} - t_Er9xTrainerMix::operator TrainerMix() { TrainerMix c9x; @@ -71,15 +42,6 @@ t_Er9xTrainerData::t_Er9xTrainerData() memset(this, 0, sizeof(t_Er9xTrainerData)); } -t_Er9xTrainerData::t_Er9xTrainerData(TrainerData &c9x) -{ - memset(this, 0, sizeof(t_Er9xTrainerData)); - for (int i=0; i125) { - if (c9x.weight>0) { - int index=abs(c9x.weight)-10000; - int gvar=125+index; - if (gvar>127) { - gvar-=256; - } - weight = gvar; - } else { - EEPROMWarnings += ::QObject::tr("er9x doesn't have negative gvars as weight") + "\n"; - weight=0; - } - } else { - weight = c9x.weight; - } - - if (abs(c9x.sOffset)>125) { - if (c9x.sOffset>0) { - int index=abs(c9x.sOffset)-10000; - int gvar=125+index; - if (gvar>127) { - gvar-=256; - } - sOffset = gvar; - } else { - EEPROMWarnings += ::QObject::tr("er9x doesn't have negative gvars as offset") + "\n"; - sOffset=0; - } - } else { - sOffset = c9x.sOffset; - } - - if (c9x.curve!=0) { - curve = c9x.curve; - differential=0; - } else { - if (c9x.differential!=0) { - curve=c9x.differential; - differential=1; - } else { - curve=0; - differential=0; - } - } - lateOffset=c9x.lateOffset; - delayUp = c9x.delayUp; - delayDown = c9x.delayDown; - speedUp = c9x.speedUp; - speedDown = c9x.speedDown; - if (c9x.carryTrim<0) { - EEPROMWarnings += ::QObject::tr("er9x doesn't have swappable trims") + "\n"; - carryTrim=1; - } else { - carryTrim = c9x.carryTrim; - } - mltpx = (MltpxValue)c9x.mltpx; - mixWarn = c9x.mixWarn; - enableFmTrim=c9x.enableFmTrim; - -} - t_Er9xMixData::operator MixData () { MixData c9x; @@ -434,14 +215,21 @@ t_Er9xMixData::operator MixData () else { c9x.srcRaw = RawSource(SOURCE_TYPE_GVAR, srcRaw-38); } + if (differential==1) { - c9x.differential=curve; - c9x.curve=0; - } else { - c9x.differential=0; - c9x.curve=curve; + c9x.curve.type = CurveReference::CURVE_REF_DIFF; + c9x.curve.value = differential; } - c9x.lateOffset=lateOffset; + else if (curve > 6) { + c9x.curve.type = CurveReference::CURVE_REF_CUSTOM; + c9x.curve.value = curve - 6; + } + else if (curve > 0) { + c9x.curve.type = CurveReference::CURVE_REF_FUNC; + c9x.curve.value = curve; + } + + // c9x.lateOffset=lateOffset; c9x.delayUp = delayUp; c9x.delayDown = delayDown; c9x.speedUp = speedUp; @@ -449,32 +237,10 @@ t_Er9xMixData::operator MixData () c9x.carryTrim = carryTrim; c9x.mltpx = (MltpxValue)mltpx; c9x.mixWarn = mixWarn; - c9x.enableFmTrim=enableFmTrim; + // c9x.enableFmTrim=enableFmTrim; return c9x; } -int8_t er9xFromSource(RawSource source) -{ - int v1 = 0; - if (source.type == SOURCE_TYPE_STICK) - v1 = 1+source.index; - else if (source.type == SOURCE_TYPE_ROTARY_ENCODER) { - EEPROMWarnings += ::QObject::tr("er9x on this board doesn't have Rotary Encoders") + "\n"; - v1 = 5+source.index; - } - else if (source.type == SOURCE_TYPE_MAX) - v1 = 8; - else if (source.type == SOURCE_TYPE_CYC) - v1 = 10+source.index; - else if (source.type == SOURCE_TYPE_PPM) - v1 = 13+source.index; - else if (source.type == SOURCE_TYPE_CH) - v1 = 21+source.index; - else if (source.type == SOURCE_TYPE_TELEMETRY) - v1 = 36+source.index; - return v1; -} - RawSource er9xToSource(int8_t value) { if (value == 0) { @@ -503,33 +269,6 @@ RawSource er9xToSource(int8_t value) } } -t_Er9xCustomSwData::t_Er9xCustomSwData(CustomSwData &c9x) -{ - func = c9x.func; - v1 = c9x.val1; - v2 = c9x.val2; - - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { - v1 = er9xFromSource(RawSource(c9x.val1)); - } - - if (c9x.func >= CS_FN_EQUAL) { - v2 = er9xFromSource(RawSource(c9x.val2)); - } - - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { - v1 = er9xFromSwitch(RawSwitch(c9x.val1)); - v2 = er9xFromSwitch(RawSwitch(c9x.val2)); - } - - if (func>ER9X_MAX_CSFUNC ) { - EEPROMWarnings += ::QObject::tr("er9x does not support Custom Switch function %1").arg(getFuncName(func)) + "\n"; - func=0; - v1=0; - v2=0; - } -} - Er9xCustomSwData::operator CustomSwData () { CustomSwData c9x; @@ -559,13 +298,6 @@ t_Er9xSafetySwData::t_Er9xSafetySwData() memset(this, 0, sizeof(t_Er9xSafetySwData)); } -t_Er9xSafetySwData::t_Er9xSafetySwData(SafetySwData &c9x) -{ - memset(this, 0, sizeof(t_Er9xSafetySwData)); - swtch = er9xFromSwitch(c9x.swtch); - val = c9x.val; -} - t_Er9xSafetySwData::operator SafetySwData () { SafetySwData c9x; @@ -574,35 +306,11 @@ t_Er9xSafetySwData::operator SafetySwData () return c9x; } - t_Er9xFrSkyChannelData::t_Er9xFrSkyChannelData() { memset(this, 0, sizeof(t_Er9xFrSkyChannelData)); } -t_Er9xFrSkyChannelData::t_Er9xFrSkyChannelData(FrSkyChannelData &c9x) -{ - memset(this, 0, sizeof(t_Er9xFrSkyChannelData)); - ratio = c9x.ratio; - alarms_value[0] = c9x.alarms[0].value; - alarms_value[1] = c9x.alarms[1].value; - alarms_level = (c9x.alarms[1].level << 2) + c9x.alarms[0].level; - alarms_greater = (c9x.alarms[1].greater << 1) + c9x.alarms[0].greater; - if (c9x.type==0) { - if (c9x.multiplier==0) { - type = 0; - } else if (c9x.multiplier==1) { - type = 2; - } else { - EEPROMWarnings += ::QObject::tr("er9x does not support this range for A1/A2") + "\n"; - } - } else if (c9x.type==1 || c9x.type==3) { - type=c9x.type; - } else { - EEPROMWarnings += ::QObject::tr("er9x does not support this telemetry units") + "\n"; - } -} - t_Er9xFrSkyChannelData::operator FrSkyChannelData () { FrSkyChannelData c9x; @@ -622,19 +330,11 @@ t_Er9xFrSkyChannelData::operator FrSkyChannelData () return c9x; } - t_Er9xFrSkyData::t_Er9xFrSkyData() { memset(this, 0, sizeof(t_Er9xFrSkyData)); } -t_Er9xFrSkyData::t_Er9xFrSkyData(FrSkyData &c9x) -{ - memset(this, 0, sizeof(t_Er9xFrSkyData)); - channels[0] = c9x.channels[0]; - channels[1] = c9x.channels[1]; -} - t_Er9xFrSkyData::operator FrSkyData () { FrSkyData c9x; @@ -643,24 +343,6 @@ t_Er9xFrSkyData::operator FrSkyData () return c9x; } -int setEr9xTimerMode(TimerMode mode) -{ - if (mode == TMRMODE_OFF || mode == TMRMODE_ABS) - return mode; - else if (mode == TMRMODE_THs || mode == TMRMODE_THp) - return mode + 4; - else if (mode >= TMRMODE_FIRST_MOMENT_SWITCH) - return 37+mode-TMRMODE_FIRST_MOMENT_SWITCH; - else if (mode >= TMRMODE_FIRST_SWITCH) - return 16+mode-TMRMODE_FIRST_SWITCH; - else if (mode <= TMRMODE_FIRST_NEG_MOMENT_SWITCH) - return -37+mode-TMRMODE_FIRST_NEG_MOMENT_SWITCH; - else if (mode <= TMRMODE_FIRST_NEG_SWITCH) - return -16+mode-TMRMODE_FIRST_NEG_SWITCH; - else - return 0; -} - TimerMode getEr9xTimerMode(int mode) { if (mode <= -33) @@ -675,162 +357,6 @@ TimerMode getEr9xTimerMode(int mode) return TimerMode(TMRMODE_FIRST_MOMENT_SWITCH+(mode-16-21)); } -t_Er9xModelData::t_Er9xModelData(ModelData &c9x) -{ - memset(this, 0, sizeof(t_Er9xModelData)); - - if (c9x.used) { - setEEPROMString(name, c9x.name, sizeof(name)); - modelVoice=c9x.modelVoice; - tmrMode = setEr9xTimerMode(c9x.timers[0].mode); - tmrModeB = c9x.timers[0].modeB; - tmrDir = c9x.timers[0].dir; - tmrVal = c9x.timers[0].val; - switch(c9x.moduleData[0].protocol) { - case PPM: - protocol = 0; - break; - case PXX_DJT: - protocol = 1; - break; - case DSM2: - protocol = 2; - break; - case PPM16: - protocol = 3; - break; - default: - protocol = 0; - EEPROMWarnings += QObject::tr("Er9x doesn't accept this protocol") + "\n"; - // TODO more explicit warning for each protocol - break; - } - traineron = c9x.traineron; - t2throttle = c9x.t2throttle; - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - ppmNCH = (c9x.moduleData[0].channelsCount - 8) / 2; - thrTrim = c9x.thrTrim; - thrExpo = c9x.thrExpo; - trimInc = c9x.trimInc; - ppmDelay = (c9x.moduleData[0].ppmDelay - 300) / 50; - for (unsigned int i=0; iEeFsCreate(eeprom, getEEpromSize(), BOARD_STOCK); - - Er9xGeneral er9xGeneral(radioData.generalSettings); - int sz = efile->writeRlc1(FILE_GENERAL, FILE_TYP_GENERAL, (uint8_t*)&er9xGeneral, sizeof(Er9xGeneral)); - if(sz != sizeof(Er9xGeneral)) { - return 0; - } - - for (int i=0; iwriteRlc1(FILE_MODEL(i), FILE_TYP_MODEL, (uint8_t*)&er9xModel, sizeof(Er9xModelData)); - if(sz != sizeof(Er9xModelData)) { - return 0; - } - } - } - - return getEEpromSize(); + return 0; } int Er9xInterface::getSize(ModelData &model) { - if (model.isempty()) - return 0; - - uint8_t tmp[2*EESIZE_STOCK]; - efile->EeFsCreate(tmp, getEEpromSize(), BOARD_STOCK); - - Er9xModelData er9xModel(model); - int sz = efile->writeRlc1(0, FILE_TYP_MODEL, (uint8_t*)&er9xModel, sizeof(Er9xModelData)); - if(sz != sizeof(Er9xModelData)) { - return -1; - } - return efile->size(0); + return 0; } int Er9xInterface::getSize(GeneralSettings &settings) { - uint8_t tmp[2*EESIZE_STOCK]; - efile->EeFsCreate(tmp, getEEpromSize(), BOARD_STOCK); - - Er9xGeneral er9xGeneral(settings); - int sz = efile->writeRlc1(0, FILE_TYP_GENERAL, (uint8_t*)&er9xGeneral, sizeof(Er9xGeneral)); - if(sz != sizeof(Er9xGeneral)) { - return -1; - } - return efile->size(0); + return 0; } int Er9xInterface::getCapability(const Capability capability) @@ -244,12 +207,6 @@ int Er9xInterface::getCapability(const Capability capability) return 4; case Mixes: return ER9X_MAX_MIXERS; - case NumCurves5: - return ER9X_MAX_CURVE5; - case NumCurves9: - return ER9X_MAX_CURVE5; - case MixFmTrim: - return 1; case PPMExtCtrl: return 1; case ModelTrainerEnable: @@ -286,10 +243,6 @@ int Er9xInterface::getCapability(const Capability capability) return 12; case CustomAndSwitches: return 5; - case GvarsNum: - return 7; - case GvarsOfsNum: - return 5; case CSFunc: return 13; case Outputs: @@ -306,8 +259,6 @@ int Er9xInterface::getCapability(const Capability capability) return TM_HASTELEMETRY|TM_HASWSHH; case TelemetryUnits: return 1; - case TimerTriggerB: - return 1; case TelemetryMaxMultiplier: return 2; case MaxVolume: @@ -325,17 +276,12 @@ int Er9xInterface::getCapability(const Capability capability) case HasStickScroll: case HasAltitudeSel: case HasContrast: - case InstantTrimSW: case HasVolume: case HasBlInvert: case ModelVoice: - case DiffMixers: - case HasNegCurves: - case HasFixOffset: case Gvars: + return 7; case GvarsHaveSources: - case GvarsAsSources: - case GvarsAsWeight: return 1; case GetThrSwitch: return DSW_THR; diff --git a/companion/src/firmwares/ersky9x/ersky9xeeprom.cpp b/companion/src/firmwares/ersky9x/ersky9xeeprom.cpp index f21688f20..8f2831d79 100644 --- a/companion/src/firmwares/ersky9x/ersky9xeeprom.cpp +++ b/companion/src/firmwares/ersky9x/ersky9xeeprom.cpp @@ -3,19 +3,8 @@ #include "ersky9xeeprom.h" #include -extern int8_t er9xFromSwitch(const RawSwitch & sw); extern RawSwitch er9xToSwitch(int8_t sw); -int setErSky9xTimerMode(TimerMode mode) -{ - if (mode == TMRMODE_OFF || mode == TMRMODE_ABS || mode == TMRMODE_THs || mode == TMRMODE_THp) - return mode; - else if (mode >= TMRMODE_FIRST_CHPERC) - return 4+mode-TMRMODE_FIRST_CHPERC; - else - return 0; -} - TimerMode getErSky9xTimerMode(int mode) { if (mode<4) @@ -26,26 +15,6 @@ TimerMode getErSky9xTimerMode(int mode) return TimerMode(0); } -int8_t ersky9xFromSwitch(const RawSwitch & sw) -{ - switch (sw.type) { - case SWITCH_TYPE_SWITCH: - return sw.index; - case SWITCH_TYPE_VIRTUAL: - return sw.index > 0 ? (9 + sw.index) : (-9 + sw.index); - case SWITCH_TYPE_ON: - return 34; - case SWITCH_TYPE_OFF: - return -34; - case SWITCH_TYPE_MOMENT_SWITCH: - return sw.index > 0 ? (34 + sw.index) : (-34 + sw.index); - case SWITCH_TYPE_MOMENT_VIRTUAL: - return sw.index > 0 ? (31 + sw.index) : (-31 + sw.index); - default: - return 0; - } -} - RawSwitch ersky9xToSwitch(int8_t sw) { uint8_t swa = abs(sw); @@ -65,21 +34,11 @@ RawSwitch ersky9xToSwitch(int8_t sw) return RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, sw > 0 ? sw-34-9 : sw+34+9); } - t_Ersky9xTrainerMix::t_Ersky9xTrainerMix() { memset(this, 0, sizeof(t_Ersky9xTrainerMix)); } -t_Ersky9xTrainerMix::t_Ersky9xTrainerMix(TrainerMix &c9x) -{ - memset(this, 0, sizeof(t_Ersky9xTrainerMix)); - srcChn = c9x.src; - swtch = er9xFromSwitch(c9x.swtch); - studWeight = (8 * c9x.weight) / 25; - mode = c9x.mode; -} - t_Ersky9xTrainerMix::operator TrainerMix() { TrainerMix c9x; @@ -95,15 +54,6 @@ t_Ersky9xTrainerData::t_Ersky9xTrainerData() memset(this, 0, sizeof(t_Ersky9xTrainerData)); } -t_Ersky9xTrainerData::t_Ersky9xTrainerData(TrainerData &c9x) -{ - memset(this, 0, sizeof(t_Ersky9xTrainerData)); - for (int i=0; i 6) { + c9x.curve.type = CurveReference::CURVE_REF_CUSTOM; + c9x.curve.value = curve - 6; + } + else if (curve > 0) { + c9x.curve.type = CurveReference::CURVE_REF_FUNC; + c9x.curve.value = curve; + } + c9x.delayUp = delayUp; c9x.delayDown = delayDown; c9x.speedUp = speedUp; @@ -398,7 +221,7 @@ t_Ersky9xMixData_v10::operator MixData () c9x.carryTrim = carryTrim; c9x.mltpx = (MltpxValue)mltpx; c9x.mixWarn = mixWarn; - c9x.enableFmTrim=enableFmTrim; + // c9x.enableFmTrim=enableFmTrim; c9x.sOffset = sOffset; return c9x; } @@ -409,67 +232,6 @@ t_Ersky9xMixData_v11::t_Ersky9xMixData_v11() memset(this, 0, sizeof(t_Ersky9xMixData_v11)); } -t_Ersky9xMixData_v11::t_Ersky9xMixData_v11(MixData &c9x) -{ - memset(this, 0, sizeof(t_Ersky9xMixData_v11)); - destCh = c9x.destCh; - swtch = ersky9xFromSwitch(c9x.swtch); - if (c9x.srcRaw.type == SOURCE_TYPE_NONE) { - srcRaw = 0; - swtch = 0; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_STICK) { - srcRaw = 1 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_ROTARY_ENCODER) { - EEPROMWarnings += ::QObject::tr("ersky9x doesn't have Rotary Encoders") + "\n"; - srcRaw = 5 + c9x.srcRaw.index; // use pots instead - } - else if (c9x.srcRaw.type == SOURCE_TYPE_MAX) { - srcRaw = 8; // MAX - } - /* else if (c9x.srcRaw.type == SOURCE_TYPE_3POS) { - srcRaw = 45; - } */ - else if (c9x.srcRaw.type == SOURCE_TYPE_GVAR) { - srcRaw = 46+c9x.srcRaw.index; // MAX - } - else if (c9x.srcRaw.type == SOURCE_TYPE_SWITCH) { - srcRaw = 9; // FULL - swtch = ersky9xFromSwitch(RawSwitch(c9x.srcRaw.index)); - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CYC) { - srcRaw = 10 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_PPM) { - srcRaw = 13 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CH) { - srcRaw = 21 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_TRIM) { - EEPROMWarnings += ::QObject::tr("ersky9x doesn't have trims as source") + "\n"; - srcRaw = 0; // use pots instead - } - - weight = c9x.weight; - curve = c9x.curve; - delayUp = c9x.delayUp; - delayDown = c9x.delayDown; - speedUp = c9x.speedUp; - speedDown = c9x.speedDown; - if (c9x.carryTrim<0) { - EEPROMWarnings += ::QObject::tr("er9x doesn't have swappable trims") + "\n"; - carryTrim=1; - } else { - carryTrim = c9x.carryTrim; - } - mltpx = (MltpxValue)c9x.mltpx; - mixWarn = c9x.mixWarn; - enableFmTrim=c9x.enableFmTrim; - sOffset = c9x.sOffset; -} - t_Ersky9xMixData_v11::operator MixData () { MixData c9x; @@ -516,7 +278,15 @@ t_Ersky9xMixData_v11::operator MixData () c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-21); } - c9x.curve = curve; + if (curve > 6) { + c9x.curve.type = CurveReference::CURVE_REF_CUSTOM; + c9x.curve.value = curve - 6; + } + else if (curve > 0) { + c9x.curve.type = CurveReference::CURVE_REF_FUNC; + c9x.curve.value = curve; + } + c9x.delayUp = delayUp; c9x.delayDown = delayDown; c9x.speedUp = speedUp; @@ -524,60 +294,11 @@ t_Ersky9xMixData_v11::operator MixData () c9x.carryTrim = carryTrim; c9x.mltpx = (MltpxValue)mltpx; c9x.mixWarn = mixWarn; - c9x.enableFmTrim=enableFmTrim; + // c9x.enableFmTrim=enableFmTrim; c9x.sOffset = sOffset; return c9x; } -int8_t ersky9xFromSource_v10(RawSource source) -{ - int v1 = 0; - if (source.type == SOURCE_TYPE_STICK) - v1 = 1+source.index; - else if (source.type == SOURCE_TYPE_ROTARY_ENCODER) { - EEPROMWarnings += ::QObject::tr("er9x on this board doesn't have Rotary Encoders") + "\n"; - v1 = 5+source.index; - } - else if (source.type == SOURCE_TYPE_MAX) - v1 = 8; - /* else if (source.type == SOURCE_TYPE_3POS) - v1 = 0; */ - else if (source.type == SOURCE_TYPE_CYC) - v1 = 10+source.index; - else if (source.type == SOURCE_TYPE_PPM) - v1 = 13+source.index; - else if (source.type == SOURCE_TYPE_CH) - v1 = 21+source.index; - else if (source.type == SOURCE_TYPE_TELEMETRY) - v1 = 36+source.index; - return v1; -} - -int8_t ersky9xFromSource_v11(RawSource source) -{ - int v1 = 0; - if (source.type == SOURCE_TYPE_STICK) - v1 = 1+source.index; - else if (source.type == SOURCE_TYPE_ROTARY_ENCODER) { - EEPROMWarnings += ::QObject::tr("er9x on this board doesn't have Rotary Encoders") + "\n"; - v1 = 5+source.index; - } - else if (source.type == SOURCE_TYPE_MAX) - v1 = 8; - /* else if (source.type == SOURCE_TYPE_3POS) - v1 = 0; */ - else if (source.type == SOURCE_TYPE_CYC) - v1 = 10+source.index; - else if (source.type == SOURCE_TYPE_PPM) - v1 = 13+source.index; - else if (source.type == SOURCE_TYPE_CH) - v1 = 21+source.index; - else if (source.type == SOURCE_TYPE_TELEMETRY) - v1 = 36+source.index; - return v1; -} - - RawSource ersky9xToSource_v10(int8_t value) { if (value == 0) { @@ -634,33 +355,6 @@ RawSource ersky9xToSource_v11(int8_t value) } } -t_Ersky9xCustomSwData_v10::t_Ersky9xCustomSwData_v10(CustomSwData &c9x) -{ - func = c9x.func; - v1 = c9x.val1; - v2 = c9x.val2; - - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { - v1 = ersky9xFromSource_v10(RawSource(c9x.val1)); - } - - if (c9x.func >= CS_FN_EQUAL) { - v2 = ersky9xFromSource_v10(RawSource(c9x.val2)); - } - - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { - v1 = er9xFromSwitch(RawSwitch(c9x.val1)); - v2 = er9xFromSwitch(RawSwitch(c9x.val2)); - } - - if (func>ERSKY9X_MAX_CSFUNC ) { - EEPROMWarnings += ::QObject::tr("ersky9x does not support Custom Switch function %1").arg(getFuncName(func)) + "\n"; - func=0; - v1=0; - v2=0; - } -} - Ersky9xCustomSwData_v10::operator CustomSwData () { CustomSwData c9x; @@ -684,33 +378,6 @@ Ersky9xCustomSwData_v10::operator CustomSwData () return c9x; } -t_Ersky9xCustomSwData_v11::t_Ersky9xCustomSwData_v11(CustomSwData &c9x) -{ - func = c9x.func; - v1 = c9x.val1; - v2 = c9x.val2; - - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { - v1 = ersky9xFromSource_v11(RawSource(c9x.val1)); - } - - if (c9x.func >= CS_FN_EQUAL) { - v2 = ersky9xFromSource_v11(RawSource(c9x.val2)); - } - - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { - v1 = er9xFromSwitch(RawSwitch(c9x.val1)); - v2 = er9xFromSwitch(RawSwitch(c9x.val2)); - } - - if (func>ERSKY9X_MAX_CSFUNC ) { - EEPROMWarnings += ::QObject::tr("ersky9x does not support Custom Switch function %1").arg(getFuncName(func)) + "\n"; - func=0; - v1=0; - v2=0; - } -} - Ersky9xCustomSwData_v11::operator CustomSwData () { CustomSwData c9x; @@ -739,13 +406,6 @@ t_Ersky9xSafetySwData_v10::t_Ersky9xSafetySwData_v10() memset(this, 0, sizeof(t_Ersky9xSafetySwData_v10)); } -t_Ersky9xSafetySwData_v10::t_Ersky9xSafetySwData_v10(SafetySwData &c9x) -{ - memset(this, 0, sizeof(t_Ersky9xSafetySwData_v10)); - swtch = er9xFromSwitch(c9x.swtch); - val = c9x.val; -} - t_Ersky9xSafetySwData_v10::operator SafetySwData () { SafetySwData c9x; @@ -759,13 +419,6 @@ t_Ersky9xSafetySwData_v11::t_Ersky9xSafetySwData_v11() memset(this, 0, sizeof(t_Ersky9xSafetySwData_v11)); } -t_Ersky9xSafetySwData_v11::t_Ersky9xSafetySwData_v11(SafetySwData &c9x) -{ - memset(this, 0, sizeof(t_Ersky9xSafetySwData_v11)); - opt.ss.swtch = ersky9xFromSwitch(c9x.swtch); - opt.ss.val = c9x.val; -} - t_Ersky9xSafetySwData_v11::operator SafetySwData () { SafetySwData c9x; @@ -779,29 +432,6 @@ t_Ersky9xFrSkyChannelData_v10::t_Ersky9xFrSkyChannelData_v10() memset(this, 0, sizeof(t_Ersky9xFrSkyChannelData_v10)); } -t_Ersky9xFrSkyChannelData_v10::t_Ersky9xFrSkyChannelData_v10(FrSkyChannelData &c9x) -{ - memset(this, 0, sizeof(t_Ersky9xFrSkyChannelData_v10)); - ratio = c9x.ratio; - alarms_value[0] = c9x.alarms[0].value; - alarms_value[1] = c9x.alarms[1].value; - alarms_level = (c9x.alarms[1].level << 2) + c9x.alarms[0].level; - alarms_greater = (c9x.alarms[1].greater << 1) + c9x.alarms[0].greater; - if (c9x.type==0) { - if (c9x.multiplier==0) { - type = 0; - } else if (c9x.multiplier==1) { - type = 2; - } else { - EEPROMWarnings += ::QObject::tr("er9x does not support this range for A1/A2") + "\n"; - } - } else if (c9x.type==1 || c9x.type==3) { - type=c9x.type; - } else { - EEPROMWarnings += ::QObject::tr("er9x does not support this telemetry units") + "\n"; - } -} - t_Ersky9xFrSkyChannelData_v10::operator FrSkyChannelData () { FrSkyChannelData c9x; @@ -826,29 +456,6 @@ t_Ersky9xFrSkyChannelData_v11::t_Ersky9xFrSkyChannelData_v11() memset(this, 0, sizeof(t_Ersky9xFrSkyChannelData_v11)); } -t_Ersky9xFrSkyChannelData_v11::t_Ersky9xFrSkyChannelData_v11(FrSkyChannelData &c9x) -{ - memset(this, 0, sizeof(t_Ersky9xFrSkyChannelData_v11)); - ratio = c9x.ratio; - alarms_value[0] = c9x.alarms[0].value; - alarms_value[1] = c9x.alarms[1].value; - alarms_level = (c9x.alarms[1].level << 2) + c9x.alarms[0].level; - alarms_greater = (c9x.alarms[1].greater << 1) + c9x.alarms[0].greater; - if (c9x.type==0) { - if (c9x.multiplier==0) { - type = 0; - } else if (c9x.multiplier==1) { - type = 2; - } else { - EEPROMWarnings += ::QObject::tr("er9x does not support this range for A1/A2") + "\n"; - } - } else if (c9x.type==1 || c9x.type==3) { - type=c9x.type; - } else { - EEPROMWarnings += ::QObject::tr("er9x does not support this telemetry units") + "\n"; - } -} - t_Ersky9xFrSkyChannelData_v11::operator FrSkyChannelData () { FrSkyChannelData c9x; @@ -873,13 +480,6 @@ t_Ersky9xFrSkyData_v10::t_Ersky9xFrSkyData_v10() memset(this, 0, sizeof(t_Ersky9xFrSkyData_v10)); } -t_Ersky9xFrSkyData_v10::t_Ersky9xFrSkyData_v10(FrSkyData &c9x) -{ - memset(this, 0, sizeof(t_Ersky9xFrSkyData_v10)); - channels[0] = c9x.channels[0]; - channels[1] = c9x.channels[1]; -} - t_Ersky9xFrSkyData_v10::operator FrSkyData () { FrSkyData c9x; @@ -893,13 +493,6 @@ t_Ersky9xFrSkyData_v11::t_Ersky9xFrSkyData_v11() memset(this, 0, sizeof(t_Ersky9xFrSkyData_v11)); } -t_Ersky9xFrSkyData_v11::t_Ersky9xFrSkyData_v11(FrSkyData &c9x) -{ - memset(this, 0, sizeof(t_Ersky9xFrSkyData_v11)); - channels[0] = c9x.channels[0]; - channels[1] = c9x.channels[1]; -} - t_Ersky9xFrSkyData_v11::operator FrSkyData () { FrSkyData c9x; @@ -908,168 +501,6 @@ t_Ersky9xFrSkyData_v11::operator FrSkyData () return c9x; } -t_Ersky9xModelData_v10::t_Ersky9xModelData_v10(ModelData &c9x) -{ - memset(this, 0, sizeof(t_Ersky9xModelData_v10)); - - if (c9x.used) { - setEEPROMString(name, c9x.name, sizeof(name)); - reserved_spare = 0; - spare21 = 0; - sparex = 0; - spare22 = 0; - for (int i=0; i<2; i++) { - timer[i].tmrModeA = setErSky9xTimerMode(c9x.timers[i].mode); - timer[i].tmrModeB = c9x.timers[i].modeB; - timer[i].tmrDir = c9x.timers[i].dir; - timer[i].tmrVal = c9x.timers[i].val; - } - switch(c9x.moduleData[0].protocol) { - case PPM: - protocol = 0; - break; - case PXX_DJT: - protocol = 1; - break; - case DSM2: - protocol = 2; - break; - case PPM16: - protocol = 3; - break; - default: - protocol = 0; - EEPROMWarnings += QObject::tr("Ersky9x doesn't accept this protocol") + "\n"; - // TODO more explicit warning for each protocol - break; - } - traineron = c9x.traineron; - // t2throttle = c9x.t2throttle; - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - ppmNCH = (c9x.moduleData[0].channelsCount - 8) / 2; - thrTrim = c9x.thrTrim; - thrExpo = c9x.thrExpo; - trimInc = c9x.trimInc; - ppmDelay = (c9x.moduleData[0].ppmDelay - 300) / 50; - for (unsigned int i=0; iEeFsCreate(eeprom, EESIZE_SKY9X, BOARD_SKY9X); - - Ersky9xGeneral ersky9xGeneral(radioData.generalSettings); - int sz = efile->writeRlc2(FILE_GENERAL, FILE_TYP_GENERAL, (uint8_t*)&ersky9xGeneral, sizeof(Ersky9xGeneral)); - if(sz != sizeof(Ersky9xGeneral)) { - return 0; - } - - for (int i=0; iwriteRlc2(FILE_MODEL(i), FILE_TYP_MODEL, (uint8_t*)&ersky9xModel, sizeof(Ersky9xModelData_v11)); - if(sz != sizeof(Ersky9xModelData_v11)) { - return 0; - } - } - } - - if (!EEPROMWarnings.isEmpty()) - QMessageBox::warning(NULL, - QObject::tr("Warning"), - QObject::tr("EEPROM saved with these warnings:") + "\n- " + EEPROMWarnings.remove(EEPROMWarnings.length()-1, 1).replace("\n", "\n- ")); - - return EESIZE_SKY9X; + return 0; } int Ersky9xInterface::getSize(ModelData &model) @@ -272,12 +249,6 @@ int Ersky9xInterface::getCapability(const Capability capability) switch (capability) { case Mixes: return ERSKY9X_MAX_MIXERS_V11; - case NumCurves5: - return ERSKY9X_MAX_CURVE5; - case NumCurves9: - return ERSKY9X_MAX_CURVE9; - case MixFmTrim: - return 1; case PPMExtCtrl: return 1; case ModelTrainerEnable: @@ -306,10 +277,8 @@ int Ersky9xInterface::getCapability(const Capability capability) return 2; case Pots: return 3; - case GvarsNum: + case Gvars: return 7; - case GvarsOfsNum: - return 5; case Switches: return 7; case SwitchesPositions: @@ -338,8 +307,6 @@ int Ersky9xInterface::getCapability(const Capability capability) return 1; case OptrexDisplay: return 1; - case TimerTriggerB: - return 2; case HasAltitudeSel: case HasCurrentCalibration: case HasVolume: @@ -350,12 +317,7 @@ int Ersky9xInterface::getCapability(const Capability capability) return 125; case MaxVolume: return 23; - case Gvars: case GvarsHaveSources: - case GvarsAsSources: - case GvarsAsWeight: - return 1; - case InstantTrimSW: return 1; case TelemetryMaxMultiplier: return 2; diff --git a/companion/src/firmwares/gruvin9x/gruvin9xeeprom.cpp b/companion/src/firmwares/gruvin9x/gruvin9xeeprom.cpp index c1c740efb..3296de16f 100644 --- a/companion/src/firmwares/gruvin9x/gruvin9xeeprom.cpp +++ b/companion/src/firmwares/gruvin9x/gruvin9xeeprom.cpp @@ -6,7 +6,6 @@ #define EEPROM_VER 106 -extern void setEEPROMZString(char *dst, const char *src, int size); extern void getEEPROMZString(char *dst, const char *src, int size); RawSwitch gruvin9xToSwitch(int8_t sw) @@ -19,18 +18,6 @@ RawSwitch gruvin9xToSwitch(int8_t sw) return RawSwitch(SWITCH_TYPE_VIRTUAL, sw > 0 ? sw-9 : sw+9); } -int8_t gruvin9xFromSwitch(const RawSwitch & sw) -{ - switch (sw.type) { - case SWITCH_TYPE_SWITCH: - return sw.index; - case SWITCH_TYPE_VIRTUAL: - return sw.index > 0 ? (9 + sw.index) : (-9 + sw.index); - default: - return 0; - } -} - t_Gruvin9xTrainerMix_v103::operator TrainerMix() { TrainerMix c9x; @@ -50,14 +37,6 @@ t_Gruvin9xTrainerMix_v104::operator TrainerMix() return c9x; } -t_Gruvin9xTrainerMix_v104::t_Gruvin9xTrainerMix_v104(TrainerMix &c9x) -{ - memset(this, 0, sizeof(t_Gruvin9xTrainerMix_v104)); - srcChn = c9x.src; - studWeight = c9x.weight; - mode = c9x.mode; -} - t_Gruvin9xTrainerData_v103::operator TrainerData () { TrainerData c9x; @@ -78,16 +57,6 @@ t_Gruvin9xTrainerData_v104::operator TrainerData () return c9x; } -t_Gruvin9xTrainerData_v104::t_Gruvin9xTrainerData_v104(TrainerData &c9x) -{ - memset(this, 0, sizeof(t_Gruvin9xTrainerData_v104)); - for (int i=0; i>=1; - } - if (zeros==G9X_MAX_PHASES || zeros==0) { - phase=0; - negPhase=0; - } else if (zeros==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=ph+1; - negPhase=0; - } else if (ones==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=(ph+1); - negPhase=1; - } else { - phase=0; - EEPROMWarnings += ::QObject::tr("Flight modes settings on expos not exported") + "\n"; - } - weight = c9x.weight; - expo = c9x.expo; -} - t_Gruvin9xExpoData::operator ExpoData () { ExpoData c9x; c9x.mode = mode; c9x.chn = chn; - c9x.curveParam = curve; - c9x.curveMode=1; c9x.swtch = gruvin9xToSwitch(swtch); if (negPhase) { c9x.phases= 1 << (phase -1); @@ -325,7 +180,18 @@ t_Gruvin9xExpoData::operator ExpoData () c9x.phases &= ~(1 << (phase -1)); } c9x.weight = weight; - c9x.expo = expo; + if (expo) { + c9x.curve.type = CurveReference::CURVE_REF_EXPO; + c9x.curve.value = expo; + } + else if (curve > 6) { + c9x.curve.type = CurveReference::CURVE_REF_CUSTOM; + c9x.curve.value = curve - 6; + } + else if (curve > 0) { + c9x.curve.type = CurveReference::CURVE_REF_FUNC; + c9x.curve.value = curve; + } return c9x; } @@ -334,14 +200,6 @@ t_Gruvin9xLimitData::t_Gruvin9xLimitData() memset(this, 0, sizeof(t_Gruvin9xLimitData)); } -t_Gruvin9xLimitData::t_Gruvin9xLimitData(LimitData &c9x) -{ - min = c9x.min+100; - max = c9x.max-100; - revert = c9x.revert; - offset = c9x.offset; -} - t_Gruvin9xLimitData::operator LimitData () { LimitData c9x; @@ -352,67 +210,11 @@ t_Gruvin9xLimitData::operator LimitData () return c9x; } - t_Gruvin9xMixData::t_Gruvin9xMixData() { memset(this, 0, sizeof(t_Gruvin9xMixData)); } -t_Gruvin9xMixData::t_Gruvin9xMixData(MixData &c9x) -{ - destCh = c9x.destCh; - mixWarn = c9x.mixWarn; - swtch = gruvin9xFromSwitch(c9x.swtch); - - if (c9x.srcRaw.type == SOURCE_TYPE_NONE) { - srcRaw = 0; - swtch = 0; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_STICK) { - srcRaw = 1 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_ROTARY_ENCODER) { - EEPROMWarnings += ::QObject::tr("Open9x on this board doesn't have Rotary Encoders") + "\n"; - srcRaw = 5 + c9x.srcRaw.index; // use pots instead - } - else if (c9x.srcRaw.type == SOURCE_TYPE_MAX) { - srcRaw = 8; // MAX - } - else if (c9x.srcRaw.type == SOURCE_TYPE_SWITCH) { - srcRaw = 9; // FULL - swtch = c9x.srcRaw.index+1; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CYC) { - srcRaw = 10 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_PPM) { - srcRaw = 13 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CH) { - srcRaw = 21 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_TRIM) { - EEPROMWarnings += ::QObject::tr("gruvin9x doesn't have trims as source") + "\n"; - srcRaw = 0; // use pots instead - } - - weight = c9x.weight; - curve = c9x.curve; - delayUp = c9x.delayUp; - delayDown = c9x.delayDown; - speedUp = c9x.speedUp; - speedDown = c9x.speedDown; - if (c9x.carryTrim<0) { - EEPROMWarnings += ::QObject::tr("gruvin9x doesn't have swappable trims") + "\n"; - carryTrim=1; - } else { - carryTrim = c9x.carryTrim; - } - mltpx = (MltpxValue)c9x.mltpx; -// phase = c9x.phase; - sOffset = c9x.sOffset; -} - t_Gruvin9xMixData::operator MixData () { MixData c9x; @@ -450,7 +252,6 @@ t_Gruvin9xMixData::operator MixData () c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-21); } - c9x.curve = curve; c9x.delayUp = delayUp; c9x.delayDown = delayDown; c9x.speedUp = speedUp; @@ -458,34 +259,18 @@ t_Gruvin9xMixData::operator MixData () c9x.carryTrim = carryTrim; c9x.mltpx = (MltpxValue)mltpx; c9x.mixWarn = mixWarn; - // c9x.phase = phase; c9x.sOffset = sOffset; - return c9x; -} - -int8_t gruvin9xFromSource(RawSource source) -{ - int v1 = 0; - if (source.type == SOURCE_TYPE_STICK) - v1 = 1+source.index; - else if (source.type == SOURCE_TYPE_ROTARY_ENCODER) { - EEPROMWarnings += ::QObject::tr("gruvin9x on this board doesn't have Rotary Encoders") + "\n"; - v1 = 5+source.index; + if (curve > 6) { + c9x.curve.type = CurveReference::CURVE_REF_CUSTOM; + c9x.curve.value = curve - 6; } - else if (source.type == SOURCE_TYPE_MAX) - v1 = 8; - /* else if (source.type == SOURCE_TYPE_3POS) - v1 = 0; */ - else if (source.type == SOURCE_TYPE_CYC) - v1 = 10+source.index; - else if (source.type == SOURCE_TYPE_PPM) - v1 = 13+source.index; - else if (source.type == SOURCE_TYPE_CH) - v1 = 21+source.index; - else if (source.type == SOURCE_TYPE_TELEMETRY) - v1 = 36+source.index; - return v1; + else if (curve > 0) { + c9x.curve.type = CurveReference::CURVE_REF_FUNC; + c9x.curve.value = curve; + } + + return c9x; } RawSource gruvin9xToSource(int8_t value) @@ -516,33 +301,6 @@ RawSource gruvin9xToSource(int8_t value) } } -t_Gruvin9xCustomSwData::t_Gruvin9xCustomSwData(CustomSwData &c9x) -{ - func = c9x.func; - v1 = c9x.val1; - v2 = c9x.val2; - - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { - v1 = gruvin9xFromSource(RawSource(c9x.val1)); - } - - if (c9x.func >= CS_FN_EQUAL) { - v2 = gruvin9xFromSource(RawSource(c9x.val2)); - } - - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { - v1 = gruvin9xFromSwitch(RawSwitch(c9x.val1)); - v2 = gruvin9xFromSwitch(RawSwitch(c9x.val2)); - } - - if (func>GR9X_MAX_CSFUNC ) { - EEPROMWarnings += ::QObject::tr("gruvin9x does not support Custom Switch function %1").arg(getFuncName(func)) + "\n"; - func=0; - v1=0; - v2=0; - } -} - Gruvin9xCustomSwData::operator CustomSwData () { CustomSwData c9x; @@ -566,12 +324,6 @@ Gruvin9xCustomSwData::operator CustomSwData () return c9x; } -t_Gruvin9xFuncSwData::t_Gruvin9xFuncSwData(FuncSwData &c9x) -{ - swtch = gruvin9xFromSwitch(c9x.swtch); - func = c9x.func - G9X_NUM_CHNOUT; -} - Gruvin9xFuncSwData::operator FuncSwData () { FuncSwData c9x; @@ -580,12 +332,6 @@ Gruvin9xFuncSwData::operator FuncSwData () return c9x; } -t_Gruvin9xSafetySwData::t_Gruvin9xSafetySwData(SafetySwData &c9x) -{ - swtch = gruvin9xFromSwitch(c9x.swtch); - val = c9x.val; -} - t_Gruvin9xSafetySwData::operator SafetySwData () { SafetySwData c9x; @@ -599,16 +345,6 @@ t_Gruvin9xSwashRingData::t_Gruvin9xSwashRingData() memset(this, 0, sizeof(t_Gruvin9xSwashRingData)); } -t_Gruvin9xSwashRingData::t_Gruvin9xSwashRingData(SwashRingData &c9x) -{ - invertELE = c9x.invertELE; - invertAIL = c9x.invertAIL; - invertCOL = c9x.invertCOL; - type = c9x.type; - collectiveSource = gruvin9xFromSource(c9x.collectiveSource); - value = c9x.value; -} - t_Gruvin9xSwashRingData::operator SwashRingData () { SwashRingData c9x; @@ -645,21 +381,7 @@ t_Gruvin9xPhaseData_v106::operator PhaseData () return c9x; } -t_Gruvin9xPhaseData_v106::t_Gruvin9xPhaseData_v106(PhaseData &c9x) -{ - trim_ext = 0; - for (int i=0; i> 2); - trim_ext = (trim_ext & ~(0x03 << (2*i))) + (((c9x.trim[i] & 0x03) << (2*i))); - } - swtch = gruvin9xFromSwitch(c9x.swtch); - setEEPROMZString(name, c9x.name, sizeof(name)); - fadeIn = c9x.fadeIn; - fadeOut = c9x.fadeOut; -} - extern TimerMode getEr9xTimerMode(int mode); -extern int setEr9xTimerMode(TimerMode mode); t_Gruvin9xTimerData::operator TimerData () { @@ -670,29 +392,11 @@ t_Gruvin9xTimerData::operator TimerData () return c9x; } -t_Gruvin9xTimerData::t_Gruvin9xTimerData(TimerData &c9x) -{ - mode = setEr9xTimerMode(c9x.mode); - val = c9x.val; - dir = c9x.dir; -} - t_Gruvin9xFrSkyChannelData::t_Gruvin9xFrSkyChannelData() { memset(this, 0, sizeof(t_Gruvin9xFrSkyChannelData)); } -t_Gruvin9xFrSkyChannelData::t_Gruvin9xFrSkyChannelData(FrSkyChannelData &c9x) -{ - memset(this, 0, sizeof(t_Gruvin9xFrSkyChannelData)); - ratio = c9x.ratio; - alarms_value[0] = c9x.alarms[0].value; - alarms_value[1] = c9x.alarms[1].value; - alarms_level = (c9x.alarms[1].level << 2) + c9x.alarms[0].level; - alarms_greater = (c9x.alarms[1].greater << 1) + c9x.alarms[0].greater; - type = c9x.type; -} - t_Gruvin9xFrSkyChannelData::operator FrSkyChannelData () { FrSkyChannelData c9x; @@ -707,19 +411,11 @@ t_Gruvin9xFrSkyChannelData::operator FrSkyChannelData () return c9x; } - t_Gruvin9xFrSkyData::t_Gruvin9xFrSkyData() { memset(this, 0, sizeof(t_Gruvin9xFrSkyData)); } -t_Gruvin9xFrSkyData::t_Gruvin9xFrSkyData(FrSkyData &c9x) -{ - memset(this, 0, sizeof(t_Gruvin9xFrSkyData)); - channels[0] = c9x.channels[0]; - channels[1] = c9x.channels[1]; -} - t_Gruvin9xFrSkyData::operator FrSkyData () { FrSkyData c9x; @@ -728,7 +424,6 @@ t_Gruvin9xFrSkyData::operator FrSkyData () return c9x; } - t_Gruvin9xModelData_v102::operator ModelData () { ModelData c9x; @@ -763,7 +458,7 @@ t_Gruvin9xModelData_v102::operator ModelData () c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.thrTrim = thrTrim; c9x.thrExpo = thrExpo; - c9x.trimInc = trimInc; + c9x.trimInc = trimInc-2; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.beepANACenter = beepANACenter; c9x.moduleData[0].ppmPulsePol = pulsePol; @@ -778,7 +473,6 @@ t_Gruvin9xModelData_v102::operator ModelData () c9x.expoData[i] = expoData[i]; for (int i=0; i= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - } - else { - memset(this, 0, sizeof(t_Gruvin9xModelData_v106)); - } -} - diff --git a/companion/src/firmwares/gruvin9x/gruvin9xeeprom.h b/companion/src/firmwares/gruvin9x/gruvin9xeeprom.h index f2e0cf1e2..410e96e08 100644 --- a/companion/src/firmwares/gruvin9x/gruvin9xeeprom.h +++ b/companion/src/firmwares/gruvin9x/gruvin9xeeprom.h @@ -38,8 +38,6 @@ PACK(typedef struct t_Gruvin9xTrainerMix_v104 { operator TrainerMix(); t_Gruvin9xTrainerMix_v104() { memset(this, 0, sizeof(t_Gruvin9xTrainerMix_v104)); } - t_Gruvin9xTrainerMix_v104(TrainerMix&); - }) Gruvin9xTrainerMix_v104; // PACK(typedef struct t_Gruvin9xTrainerData_v103 { @@ -55,8 +53,6 @@ PACK(typedef struct t_Gruvin9xTrainerData_v104 { operator TrainerData(); t_Gruvin9xTrainerData_v104() { memset(this, 0, sizeof(t_Gruvin9xTrainerData_v104)); } - t_Gruvin9xTrainerData_v104(TrainerData&); - }) Gruvin9xTrainerData_v104; PACK(typedef struct t_Gruvin9xFrSkyRSSIAlarm { @@ -136,8 +132,6 @@ PACK(typedef struct t_Gruvin9xGeneral_v104 { operator GeneralSettings(); t_Gruvin9xGeneral_v104() { memset(this, 0, sizeof(t_Gruvin9xGeneral_v104)); } - t_Gruvin9xGeneral_v104(GeneralSettings&); - }) Gruvin9xGeneral_v104; typedef Gruvin9xGeneral_v104 Gruvin9xGeneral; @@ -156,8 +150,6 @@ PACK(typedef struct t_Gruvin9xExpoData { operator ExpoData(); t_Gruvin9xExpoData(); - t_Gruvin9xExpoData(ExpoData&); - }) Gruvin9xExpoData; PACK(typedef struct t_Gruvin9xLimitData { @@ -168,8 +160,6 @@ PACK(typedef struct t_Gruvin9xLimitData { operator LimitData(); t_Gruvin9xLimitData(); - t_Gruvin9xLimitData(LimitData&); - }) Gruvin9xLimitData; #define MLTPX_ADD 0 @@ -194,8 +184,6 @@ PACK(typedef struct t_Gruvin9xMixData { operator MixData(); t_Gruvin9xMixData(); - t_Gruvin9xMixData(MixData&); - }) Gruvin9xMixData; PACK(typedef struct t_Gruvin9xCustomSwData { // Custom Switches data @@ -205,8 +193,6 @@ PACK(typedef struct t_Gruvin9xCustomSwData { // Custom Switches data operator CustomSwData(); t_Gruvin9xCustomSwData() { memset(this, 0, sizeof(t_Gruvin9xCustomSwData)); } - t_Gruvin9xCustomSwData(CustomSwData&); - }) Gruvin9xCustomSwData; PACK(typedef struct t_Gruvin9xSafetySwData { // Safety Switches data @@ -215,8 +201,6 @@ PACK(typedef struct t_Gruvin9xSafetySwData { // Safety Switches data operator SafetySwData(); t_Gruvin9xSafetySwData() { memset(this, 0, sizeof(t_Gruvin9xSafetySwData)); } - t_Gruvin9xSafetySwData(SafetySwData&); - }) Gruvin9xSafetySwData; PACK(typedef struct t_Gruvin9xFuncSwData { // Function Switches data @@ -225,8 +209,6 @@ PACK(typedef struct t_Gruvin9xFuncSwData { // Function Switches data operator FuncSwData(); t_Gruvin9xFuncSwData() { memset(this, 0, sizeof(t_Gruvin9xFuncSwData)); } - t_Gruvin9xFuncSwData(FuncSwData&); - }) Gruvin9xFuncSwData; PACK(typedef struct t_Gruvin9xFrSkyChannelData { @@ -242,17 +224,13 @@ PACK(typedef struct t_Gruvin9xFrSkyChannelData { operator FrSkyChannelData(); t_Gruvin9xFrSkyChannelData(); - t_Gruvin9xFrSkyChannelData(FrSkyChannelData&); - }) Gruvin9xFrSkyChannelData; PACK(typedef struct t_Gruvin9xFrSkyData { - Gruvin9xFrSkyChannelData channels[2]; - - operator FrSkyData(); - t_Gruvin9xFrSkyData(); - t_Gruvin9xFrSkyData(FrSkyData&); + Gruvin9xFrSkyChannelData channels[2]; + operator FrSkyData(); + t_Gruvin9xFrSkyData(); }) Gruvin9xFrSkyData; PACK(typedef struct t_Gruvin9xSwashRingData { // Swash Ring data @@ -265,8 +243,6 @@ PACK(typedef struct t_Gruvin9xSwashRingData { // Swash Ring data operator SwashRingData(); t_Gruvin9xSwashRingData(); - t_Gruvin9xSwashRingData(SwashRingData&); - }) Gruvin9xSwashRingData; PACK(typedef struct t_Gruvin9xPhaseData_v102 { @@ -291,7 +267,6 @@ PACK(typedef struct t_Gruvin9xPhaseData_v106 { operator PhaseData(); t_Gruvin9xPhaseData_v106() { memset(this, 0, sizeof(t_Gruvin9xPhaseData_v106)); } - t_Gruvin9xPhaseData_v106(PhaseData &eepe); }) Gruvin9xPhaseData_v106; PACK(typedef struct t_Gruvin9xTimerData { @@ -301,7 +276,6 @@ PACK(typedef struct t_Gruvin9xTimerData { operator TimerData(); t_Gruvin9xTimerData() { memset(this, 0, sizeof(t_Gruvin9xTimerData)); } - t_Gruvin9xTimerData(TimerData &eepe); }) Gruvin9xTimerData; #define G9X_MAX_PHASES 5 @@ -410,8 +384,6 @@ PACK(typedef struct t_Gruvin9xModelData_v105 { operator ModelData(); t_Gruvin9xModelData_v105() { memset(this, 0, sizeof(t_Gruvin9xModelData_v105)); } - t_Gruvin9xModelData_v105(ModelData&); - }) Gruvin9xModelData_v105; PACK(typedef struct t_Gruvin9xModelData_v106 { @@ -443,11 +415,8 @@ PACK(typedef struct t_Gruvin9xModelData_v106 { operator ModelData(); t_Gruvin9xModelData_v106() { memset(this, 0, sizeof(t_Gruvin9xModelData_v106)); } - t_Gruvin9xModelData_v106(ModelData&); - }) Gruvin9xModelData_v106; typedef Gruvin9xModelData_v106 Gruvin9xModelData; #endif -/*eof*/ diff --git a/companion/src/firmwares/gruvin9x/gruvin9xinterface.cpp b/companion/src/firmwares/gruvin9x/gruvin9xinterface.cpp index 114fd3bee..3e60d61be 100644 --- a/companion/src/firmwares/gruvin9x/gruvin9xinterface.cpp +++ b/companion/src/firmwares/gruvin9x/gruvin9xinterface.cpp @@ -47,7 +47,7 @@ const char * Gruvin9xInterface::getName() const int Gruvin9xInterface::getEEpromSize() { if (board == BOARD_STOCK) { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString avrMCU = settings.value("mcu", QString("m64")).toString(); if (avrMCU==QString("m128")) { return EESIZE_STOCK*2; @@ -200,62 +200,20 @@ bool Gruvin9xInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int es int Gruvin9xInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t variant, uint8_t version) { - EEPROMWarnings.clear(); + std::cout << "NO!\n"; + // TODO an error - int size = getEEpromSize(); - - efile->EeFsCreate(eeprom, size, BOARD_STOCK); - - Gruvin9xGeneral gruvin9xGeneral(radioData.generalSettings); - int sz = efile->writeRlc2(FILE_GENERAL, FILE_TYP_GENERAL, (uint8_t*)&gruvin9xGeneral, sizeof(Gruvin9xGeneral)); - if(sz != sizeof(Gruvin9xGeneral)) { - return 0; - } - - for (int i=0; iwriteRlc2(FILE_MODEL(i), FILE_TYP_MODEL, (uint8_t*)&gruvin9xModel, sizeof(Gruvin9xModelData)); - if(sz != sizeof(Gruvin9xModelData)) { - return 0; - } - } - } - - return size; + return 0; } int Gruvin9xInterface::getSize(ModelData &model) { - if (model.isempty()) - return 0; - - uint8_t tmp[EESIZE_GRUVIN9X]; - efile->EeFsCreate(tmp, EESIZE_GRUVIN9X, BOARD_STOCK); - - Gruvin9xModelData gruvin9xModel(model); - int sz = efile->writeRlc2(0, FILE_TYP_MODEL, (uint8_t*)&gruvin9xModel, sizeof(Gruvin9xModelData)); - if(sz != sizeof(Gruvin9xModelData)) { - return -1; - } - return efile->size(0); + return 0; } int Gruvin9xInterface::getSize(GeneralSettings &settings) { - uint8_t tmp[EESIZE_GRUVIN9X]; - efile->EeFsCreate(tmp, EESIZE_GRUVIN9X, BOARD_STOCK); - - Gruvin9xGeneral gruvin9xGeneral(settings); - int sz = efile->writeRlc1(0, FILE_TYP_GENERAL, (uint8_t*)&gruvin9xGeneral, sizeof(gruvin9xGeneral)); - if(sz != sizeof(gruvin9xGeneral)) { - return -1; - } - return efile->size(0); + return 0; } int Gruvin9xInterface::getCapability(const Capability capability) @@ -263,10 +221,6 @@ int Gruvin9xInterface::getCapability(const Capability capability) switch (capability) { case OwnerName: return 0; - case NumCurves5: - return G9X_MAX_CURVE5; - case NumCurves9: - return G9X_MAX_CURVE9; case Mixes: return G9X_MAX_MIXERS; case FlightPhases: @@ -297,7 +251,6 @@ int Gruvin9xInterface::getCapability(const Capability capability) return true; case OffsetWeight: return 125; - case HasExpoCurves: case HasContrast: return true; case Telemetry: diff --git a/companion/src/firmwares/opentx/open9xGruvin9xeeprom.cpp b/companion/src/firmwares/opentx/open9xGruvin9xeeprom.cpp index 74d4d0074..20bd50453 100644 --- a/companion/src/firmwares/opentx/open9xGruvin9xeeprom.cpp +++ b/companion/src/firmwares/opentx/open9xGruvin9xeeprom.cpp @@ -5,10 +5,7 @@ #include #include -extern void setEEPROMZString(char *dst, const char *src, int size); extern void getEEPROMZString(char *dst, const char *src, int size); - -extern int8_t open9xStockFromSwitch(const RawSwitch & sw); extern RawSwitch open9xStockToSwitch(int8_t sw); t_Open9xGruvin9xPhaseData_v207::operator PhaseData () @@ -25,21 +22,6 @@ t_Open9xGruvin9xPhaseData_v207::operator PhaseData () return c9x; } -t_Open9xGruvin9xPhaseData_v207::t_Open9xGruvin9xPhaseData_v207(PhaseData &c9x) -{ - trim_ext = 0; - for (int i=0; i> 2); - trim_ext = (trim_ext & ~(0x03 << (2*i))) + (((c9x.trim[i] & 0x03) << (2*i))); - } - swtch = open9xStockFromSwitch(c9x.swtch); - setEEPROMZString(name, c9x.name, sizeof(name)); - fadeIn = c9x.fadeIn; - fadeOut = c9x.fadeOut; - for (int i=0; i<2; i++) - rotaryEncoders[i] = c9x.rotaryEncoders[i]; -} - t_Open9xGruvin9xPhaseData_v208::operator PhaseData () { PhaseData c9x; @@ -54,107 +36,6 @@ t_Open9xGruvin9xPhaseData_v208::operator PhaseData () return c9x; } -t_Open9xGruvin9xPhaseData_v208::t_Open9xGruvin9xPhaseData_v208(PhaseData &c9x) -{ - for (int i=0; i>=1; - } - if (zeros==O9X_MAX_PHASES || zeros==0) { - phase=0; - } else if (zeros==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=ph+1; - } else if (ones==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=-(ph+1); - } else { - phase=0; - EEPROMWarnings += ::QObject::tr("Flight mode settings on mixers not exported") + "\n"; - } - sOffset = c9x.sOffset; - } - else { - memset(this, 0, sizeof(t_Open9xGruvin9xMixData_v207)); - } -} - t_Open9xGruvin9xMixData_v207::operator MixData () { MixData c9x; @@ -188,9 +69,15 @@ t_Open9xGruvin9xMixData_v207::operator MixData () c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-44); } c9x.weight = weight; - c9x.differential = differential*2; + + if (differential) { + c9x.curve = CurveReference(CurveReference::CURVE_REF_DIFF, differential*2); + } + else { + // TODO c9x.curve = curve; + } + c9x.swtch = open9xStockToSwitch(swtch); - c9x.curve = curve; c9x.delayUp = delayUp; c9x.delayDown = delayDown; c9x.speedUp = speedUp; @@ -198,12 +85,14 @@ t_Open9xGruvin9xMixData_v207::operator MixData () c9x.carryTrim = carryTrim; c9x.mltpx = (MltpxValue)mltpx; c9x.mixWarn = mixWarn; -// c9x.phase = phase; + if (phase<0) { c9x.phases= 1 << (-phase -1); - } else if (phase==0) { + } + else if (phase==0) { c9x.phases=0; - } else { + } + else { c9x.phases=63; c9x.phases &= ~(1 << (phase -1)); } @@ -212,98 +101,6 @@ t_Open9xGruvin9xMixData_v207::operator MixData () return c9x; } -t_Open9xGruvin9xMixData_v209::t_Open9xGruvin9xMixData_v209(MixData &c9x) -{ - if (c9x.destCh) { - destCh = c9x.destCh-1; - mixWarn = c9x.mixWarn; - swtch = open9xStockFromSwitch(c9x.swtch); - if (c9x.srcRaw.type == SOURCE_TYPE_NONE) { - srcRaw = 0; - swtch = 0; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_STICK) { - srcRaw = 1 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_ROTARY_ENCODER) { - srcRaw = 8 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_TRIM) { - srcRaw = 10 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_MAX) { - srcRaw = 14; - } - /* else if (c9x.srcRaw.type == SOURCE_TYPE_3POS) { - srcRaw = 15; - } */ - else if (c9x.srcRaw.type == SOURCE_TYPE_SWITCH) { - srcRaw = 15 + open9xStockFromSwitch(RawSwitch(c9x.srcRaw.index)); - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CYC) { - srcRaw = 37 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_PPM) { - srcRaw = 40 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CH) { - srcRaw = 48 + c9x.srcRaw.index; - } - weight = c9x.weight; - differential = c9x.differential/2; - curve = c9x.curve; - delayUp = c9x.delayUp; - delayDown = c9x.delayDown; - speedUp = c9x.speedUp; - speedDown = c9x.speedDown; - carryTrim = c9x.carryTrim; - mltpx = (MltpxValue)c9x.mltpx; - int zeros=0; - int ones=0; - int phtemp=c9x.phases; - for (int i=0; i>=1; - } - if (zeros==O9X_MAX_PHASES || zeros==0) { - phase=0; - } else if (zeros==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=ph+1; - } else if (ones==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=-(ph+1); - } else { - phase=0; - EEPROMWarnings += ::QObject::tr("Flight mode settings on mixers not exported") + "\n"; - } - sOffset = c9x.sOffset; - } - else { - memset(this, 0, sizeof(t_Open9xGruvin9xMixData_v207)); - } -} - t_Open9xGruvin9xMixData_v209::operator MixData () { MixData c9x; @@ -340,9 +137,15 @@ t_Open9xGruvin9xMixData_v209::operator MixData () c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-48); } c9x.weight = weight; - c9x.differential = differential*2; + + if (differential) { + c9x.curve = CurveReference(CurveReference::CURVE_REF_DIFF, differential*2); + } + else { + // TODO c9x.curve = curve; + } + c9x.swtch = open9xStockToSwitch(swtch); - c9x.curve = curve; c9x.delayUp = delayUp; c9x.delayDown = delayDown; c9x.speedUp = speedUp; @@ -350,12 +153,14 @@ t_Open9xGruvin9xMixData_v209::operator MixData () c9x.carryTrim = carryTrim; c9x.mltpx = (MltpxValue)mltpx; c9x.mixWarn = mixWarn; - // c9x.phase = phase; + if (phase<0) { c9x.phases= 1 << (-phase -1); - } else if (phase==0) { + } + else if (phase==0) { c9x.phases=0; - } else { + } + else { c9x.phases=63; c9x.phases &= ~(1 << (phase -1)); } @@ -364,66 +169,6 @@ t_Open9xGruvin9xMixData_v209::operator MixData () return c9x; } -t_Open9xGruvin9xMixData_v211::t_Open9xGruvin9xMixData_v211(MixData &c9x) -{ - if (c9x.destCh) { - destCh = c9x.destCh-1; - mixWarn = c9x.mixWarn; - swtch = open9xStockFromSwitch(c9x.swtch); - if (c9x.srcRaw.type == SOURCE_TYPE_NONE) { - srcRaw = 0; - swtch = 0; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_STICK) { - srcRaw = 1 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_ROTARY_ENCODER) { - srcRaw = 8 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_TRIM) { - srcRaw = 10 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_MAX) { - srcRaw = 14; - } - /* else if (c9x.srcRaw.type == SOURCE_TYPE_3POS) { - srcRaw = 15; - } */ - else if (c9x.srcRaw.type == SOURCE_TYPE_SWITCH) { - srcRaw = 15 + open9xStockFromSwitch(RawSwitch(c9x.srcRaw.index)); - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CYC) { - srcRaw = 37 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_PPM) { - srcRaw = 40 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CH) { - srcRaw = 48 + c9x.srcRaw.index; - } - weight = c9x.weight; - if (c9x.curve==0) { - curveMode=0; - curveParam=c9x.differential; - } else { - curveMode=1; - curveParam = c9x.curve; - } - delayUp = c9x.delayUp; - delayDown = c9x.delayDown; - speedUp = c9x.speedUp; - speedDown = c9x.speedDown; - carryTrim = c9x.carryTrim; - noExpo = c9x.noExpo; - mltpx = (MltpxValue)c9x.mltpx; - phases = c9x.phases; - sOffset = c9x.sOffset; - } - else { - memset(this, 0, sizeof(t_Open9xGruvin9xMixData_v211)); - } -} - t_Open9xGruvin9xMixData_v211::operator MixData () { MixData c9x; @@ -461,12 +206,14 @@ t_Open9xGruvin9xMixData_v211::operator MixData () } c9x.weight = weight; c9x.swtch = open9xStockToSwitch(swtch); + if (curveMode==0) { - c9x.differential = curveParam; - c9x.curve=0; - } else { - c9x.curve=curveParam; - } + c9x.curve = CurveReference(CurveReference::CURVE_REF_DIFF, curveParam); + } + else { + // TODO c9x.curve = curve; + } + c9x.delayUp = delayUp; c9x.delayDown = delayDown; c9x.speedUp = speedUp; @@ -481,28 +228,6 @@ t_Open9xGruvin9xMixData_v211::operator MixData () return c9x; } -int8_t open9xV4207FromSource(RawSource source) -{ - int v1 = 0; - if (source.type == SOURCE_TYPE_STICK) - v1 = 1+source.index; - else if (source.type == SOURCE_TYPE_ROTARY_ENCODER) - v1 = 8+source.index; - else if (source.type == SOURCE_TYPE_MAX) - v1 = 10; - /* else if (source.type == SOURCE_TYPE_3POS) - v1 = 11; */ - else if (source.type == SOURCE_TYPE_CYC) - v1 = 12+source.index; - else if (source.type == SOURCE_TYPE_PPM) - v1 = 15+source.index; - else if (source.type == SOURCE_TYPE_CH) - v1 = 23+source.index; - else if (source.type == SOURCE_TYPE_TELEMETRY) - v1 = 38+source.index; - return v1; -} - RawSource open9xV4207ToSource(int8_t value) { if (value == 0) { @@ -534,30 +259,6 @@ RawSource open9xV4207ToSource(int8_t value) } } -int8_t open9xV4209FromSource(RawSource source) -{ - int v1 = 0; - if (source.type == SOURCE_TYPE_STICK) - v1 = 1+source.index; - else if (source.type == SOURCE_TYPE_ROTARY_ENCODER) - v1 = 8+source.index; - if (source.type == SOURCE_TYPE_TRIM) - v1 = 10+source.index; - else if (source.type == SOURCE_TYPE_MAX) - v1 = 14; - /* else if (source.type == SOURCE_TYPE_3POS) - v1 = 15; */ - else if (source.type == SOURCE_TYPE_CYC) - v1 = 16+source.index; - else if (source.type == SOURCE_TYPE_PPM) - v1 = 19+source.index; - else if (source.type == SOURCE_TYPE_CH) - v1 = 27+source.index; - else if (source.type == SOURCE_TYPE_TELEMETRY) - v1 = 42+source.index; - return v1; -} - RawSource open9xV4209ToSource(int8_t value) { if (value == 0) { @@ -592,33 +293,6 @@ RawSource open9xV4209ToSource(int8_t value) } } -t_Open9xGruvin9xCustomSwData_v207::t_Open9xGruvin9xCustomSwData_v207(CustomSwData &c9x) -{ - func = c9x.func; - v1 = c9x.val1; - v2 = c9x.val2; - - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { - v1 = open9xV4207FromSource(RawSource(c9x.val1)); - } - - if (c9x.func >= CS_FN_EQUAL) { - v2 = open9xV4207FromSource(RawSource(c9x.val2)); - } - - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { - v1 = open9xStockFromSwitch(RawSwitch(c9x.val1)); - v2 = open9xStockFromSwitch(RawSwitch(c9x.val2)); - } - - if (func>O9X_V4_MAX_CSFUNCOLD ) { - EEPROMWarnings += ::QObject::tr("This version of open9x does not support Custom Switch function %1").arg(getFuncName(func)) + "\n"; - func=0; - v1=0; - v2=0; - } -} - Open9xGruvin9xCustomSwData_v207::operator CustomSwData () { CustomSwData c9x; @@ -642,26 +316,6 @@ Open9xGruvin9xCustomSwData_v207::operator CustomSwData () return c9x; } -t_Open9xGruvin9xCustomSwData_v209::t_Open9xGruvin9xCustomSwData_v209(CustomSwData &c9x) -{ - func = c9x.func; - v1 = c9x.val1; - v2 = c9x.val2; - - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { - v1 = open9xV4209FromSource(RawSource(c9x.val1)); - } - - if (c9x.func >= CS_FN_EQUAL && c9x.func <= CS_FN_ELESS) { - v2 = open9xV4209FromSource(RawSource(c9x.val2)); - } - - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { - v1 = open9xStockFromSwitch(RawSwitch(c9x.val1)); - v2 = open9xStockFromSwitch(RawSwitch(c9x.val2)); - } -} - Open9xGruvin9xCustomSwData_v209::operator CustomSwData () { CustomSwData c9x; @@ -685,45 +339,6 @@ Open9xGruvin9xCustomSwData_v209::operator CustomSwData () return c9x; } -t_Open9xGruvin9xFuncSwData_v203::t_Open9xGruvin9xFuncSwData_v203(FuncSwData &c9x) -{ - swtch = open9xStockFromSwitch(c9x.swtch); - if (c9x.func <= FuncSafetyCh16) { - param = ((c9x.param>>1)<<1); - param |=(c9x.enabled & 0x01); - func = c9x.func; - } else { - param = c9x.param; - if (c9x.func <= FuncTrainerAIL) - func = 16 + c9x.func - FuncTrainer; - else if (c9x.func == FuncInstantTrim) - func = 21; - else if (c9x.func == FuncPlaySound) - func = 22; - else if (c9x.func == FuncPlayHaptic) - func = 23; - else if (c9x.func == FuncReset) - func = 24; - else if (c9x.func == FuncVario) - func = 25; - else if (c9x.func == FuncPlayPrompt) - func = 26; - else if (c9x.func == FuncPlayValue) - func = 27; - else if (c9x.func == FuncLogs) - func = 28; - else if (c9x.func == FuncBacklight) - func = 29; - else if (c9x.func >= FuncAdjustGV1 && c9x.func <= FuncAdjustGV5) - func = 30 + c9x.func - FuncAdjustGV1; - else { - swtch = 0; - func = 0; - param = 0; - } - } -} - t_Open9xGruvin9xFuncSwData_v203::operator FuncSwData () { FuncSwData c9x; @@ -763,37 +378,6 @@ t_Open9xGruvin9xFuncSwData_v203::operator FuncSwData () return c9x; } -t_Open9xGruvin9xFuncSwData_v210::t_Open9xGruvin9xFuncSwData_v210(FuncSwData &c9x) -{ - swtch = open9xStockFromSwitch(c9x.swtch); - param = c9x.param; - if (c9x.func <= FuncInstantTrim) { - func = (uint8_t)c9x.func; - delay = c9x.enabled; - } - else if (c9x.func == FuncPlaySound) - func = 22; - else if (c9x.func == FuncPlayHaptic) - func = 23; - else if (c9x.func == FuncReset) - func = 24; - else if (c9x.func == FuncVario) - func = 25; - else if (c9x.func == FuncPlayPrompt) - func = 26; - else if (c9x.func == FuncPlayValue) - func = 27; - else if (c9x.func == FuncLogs) - func = 28; - else if (c9x.func == FuncBacklight) - func = 29; - else { - swtch = 0; - func = 0; - param = 0; - } -} - t_Open9xGruvin9xFuncSwData_v210::operator FuncSwData () { FuncSwData c9x; @@ -823,16 +407,6 @@ t_Open9xGruvin9xFuncSwData_v210::operator FuncSwData () return c9x; } -t_Open9xGruvin9xSwashRingData_v208::t_Open9xGruvin9xSwashRingData_v208(SwashRingData &c9x) -{ - invertELE = c9x.invertELE; - invertAIL = c9x.invertAIL; - invertCOL = c9x.invertCOL; - type = c9x.type; - collectiveSource = open9xV4207FromSource(c9x.collectiveSource); - value = c9x.value; -} - t_Open9xGruvin9xSwashRingData_v208::operator SwashRingData () { SwashRingData c9x; @@ -845,16 +419,6 @@ t_Open9xGruvin9xSwashRingData_v208::operator SwashRingData () return c9x; } -t_Open9xGruvin9xSwashRingData_v209::t_Open9xGruvin9xSwashRingData_v209(SwashRingData &c9x) -{ - invertELE = c9x.invertELE; - invertAIL = c9x.invertAIL; - invertCOL = c9x.invertCOL; - type = c9x.type; - collectiveSource = open9xV4209FromSource(c9x.collectiveSource); - value = c9x.value; -} - t_Open9xGruvin9xSwashRingData_v209::operator SwashRingData () { SwashRingData c9x; @@ -890,7 +454,7 @@ t_Open9xGruvin9xModelData_v207::operator ModelData () } c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.thrTrim = thrTrim; - c9x.trimInc = trimInc; + c9x.trimInc = trimInc - 2; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.beepANACenter = beepANACenter; c9x.moduleData[0].ppmPulsePol = pulsePol; @@ -915,7 +479,6 @@ t_Open9xGruvin9xModelData_v207::operator ModelData () c9x.expoData[i] = expoData[i]; for (int i=0; i= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - frskyLinesXtra=0; - for (int j=0; j<4; j++) { - frskyLines[j] = 0; - for (int k=0; k<2; k++) { - int value = c9x.frsky.screens[1].body.lines[j].source[k]; - frskyLines[j] |= (k==0 ? (value & 0x0f) : ((value & 0x0f) << 4)); - frskyLinesXtra |= (value / 16) << (4*j+2*k); - } - } - } - else { - memset(this, 0, sizeof(t_Open9xGruvin9xModelData_v207)); - } -} - - t_Open9xGruvin9xModelData_v208::operator ModelData () { ModelData c9x; @@ -1079,7 +538,7 @@ t_Open9xGruvin9xModelData_v208::operator ModelData () } c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.thrTrim = thrTrim; - c9x.trimInc = trimInc; + c9x.trimInc = trimInc - 2; c9x.disableThrottleWarning=disableThrottleWarning; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.beepANACenter = beepANACenter; @@ -1104,7 +563,6 @@ t_Open9xGruvin9xModelData_v208::operator ModelData () for (int i=0; i= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - varioSource = c9x.frsky.varioSource; - varioSpeedUpMin = c9x.frsky.varioCenterMax; - varioSpeedDownMin = c9x.frsky.varioCenterMin; - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - frskyLinesXtra=0; - for (int j=0; j<4; j++) { - frskyLines[j] = 0; - for (int k=0; k<2; k++) { - int value = c9x.frsky.screens[1].body.lines[j].source[k]; - frskyLines[j] |= (k==0 ? (value & 0x0f) : ((value & 0x0f) << 4)); - frskyLinesXtra |= (value / 16) << (4*j+2*k); - } - } - for (int i=0; i= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - varioSource = c9x.frsky.varioSource; - varioSpeedUpMin = c9x.frsky.varioCenterMax; - varioSpeedDownMin = c9x.frsky.varioCenterMin; - switchWarningStates = c9x.switchWarningStates; - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - frskyLinesXtra=0; - for (int j=0; j<4; j++) { - frskyLines[j] = 0; - for (int k=0; k<2; k++) { - int value = c9x.frsky.screens[1].body.lines[j].source[k]; - frskyLines[j] |= (k==0 ? (value & 0x0f) : ((value & 0x0f) << 4)); - frskyLinesXtra |= (value / 16) << (4*j+2*k); - } - } - for (int i=0; i O9X_NUM_POINTS - 5 * O9X_MAX_CURVES) { - EEPROMWarnings += ::QObject::tr("open9x only accepts %1 points in all curves").arg(O9X_NUM_POINTS) + "\n"; - break; - } - curves[i] = offset; - for (int j=0; j= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - switchWarningStates = c9x.switchWarningStates; - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - for (int i=0; i O9X_NUM_POINTS - 5 * O9X_MAX_CURVES) { - EEPROMWarnings += ::QObject::tr("open9x only accepts %1 points in all curves").arg(O9X_NUM_POINTS) + "\n"; - break; - } - curves[i] = offset; - for (int j=0; j= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - switchWarningStates = c9x.switchWarningStates; - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - } -} - diff --git a/companion/src/firmwares/opentx/open9xGruvin9xeeprom.h b/companion/src/firmwares/opentx/open9xGruvin9xeeprom.h index a37ed3d9d..c95dc6742 100644 --- a/companion/src/firmwares/opentx/open9xGruvin9xeeprom.h +++ b/companion/src/firmwares/opentx/open9xGruvin9xeeprom.h @@ -32,7 +32,6 @@ PACK(typedef struct t_Open9xGruvin9xPhaseData_v207 { int16_t rotaryEncoders[2]; operator PhaseData(); t_Open9xGruvin9xPhaseData_v207() { memset(this, 0, sizeof(t_Open9xGruvin9xPhaseData_v207)); } - t_Open9xGruvin9xPhaseData_v207(PhaseData &eepe); }) Open9xGruvin9xPhaseData_v207; PACK(typedef struct t_Open9xGruvin9xPhaseData_v208 { @@ -44,7 +43,6 @@ PACK(typedef struct t_Open9xGruvin9xPhaseData_v208 { int16_t rotaryEncoders[2]; operator PhaseData(); t_Open9xGruvin9xPhaseData_v208() { memset(this, 0, sizeof(t_Open9xGruvin9xPhaseData_v208)); } - t_Open9xGruvin9xPhaseData_v208(PhaseData &eepe); }) Open9xGruvin9xPhaseData_v208; PACK(typedef struct t_Open9xGruvin9xMixData_v207 { @@ -66,8 +64,6 @@ PACK(typedef struct t_Open9xGruvin9xMixData_v207 { operator MixData(); t_Open9xGruvin9xMixData_v207() { memset(this, 0, sizeof(t_Open9xGruvin9xMixData_v207)); } - t_Open9xGruvin9xMixData_v207(MixData&); - }) Open9xGruvin9xMixData_v207; PACK(typedef struct t_Open9xGruvin9xMixData_v209 { @@ -89,8 +85,6 @@ PACK(typedef struct t_Open9xGruvin9xMixData_v209 { operator MixData(); t_Open9xGruvin9xMixData_v209() { memset(this, 0, sizeof(t_Open9xGruvin9xMixData_v209)); } - t_Open9xGruvin9xMixData_v209(MixData&); - }) Open9xGruvin9xMixData_v209; PACK(typedef struct t_Open9xGruvin9xMixData_v211 { @@ -114,8 +108,6 @@ PACK(typedef struct t_Open9xGruvin9xMixData_v211 { operator MixData(); t_Open9xGruvin9xMixData_v211() { memset(this, 0, sizeof(t_Open9xGruvin9xMixData_v211)); } - t_Open9xGruvin9xMixData_v211(MixData&); - }) Open9xGruvin9xMixData_v211; PACK(typedef struct t_Open9xGruvin9xCustomSwData_v207 { // Custom Switches data @@ -125,10 +117,8 @@ PACK(typedef struct t_Open9xGruvin9xCustomSwData_v207 { // Custom Switches data operator CustomSwData(); t_Open9xGruvin9xCustomSwData_v207() { memset(this, 0, sizeof(t_Open9xGruvin9xCustomSwData_v207)); } - t_Open9xGruvin9xCustomSwData_v207(CustomSwData&); int8_t fromSource(RawSource source); RawSource toSource(int8_t value); - }) Open9xGruvin9xCustomSwData_v207; PACK(typedef struct t_Open9xGruvin9xCustomSwData_v209 { // Custom Switches data @@ -138,10 +128,8 @@ PACK(typedef struct t_Open9xGruvin9xCustomSwData_v209 { // Custom Switches data operator CustomSwData(); t_Open9xGruvin9xCustomSwData_v209() { memset(this, 0, sizeof(t_Open9xGruvin9xCustomSwData_v209)); } - t_Open9xGruvin9xCustomSwData_v209(CustomSwData&); int8_t fromSource(RawSource source); RawSource toSource(int8_t value); - }) Open9xGruvin9xCustomSwData_v209; PACK(typedef struct t_Open9xGruvin9xFuncSwData_v203 { // Function Switches data @@ -151,8 +139,6 @@ PACK(typedef struct t_Open9xGruvin9xFuncSwData_v203 { // Function Switches data operator FuncSwData(); t_Open9xGruvin9xFuncSwData_v203() { memset(this, 0, sizeof(t_Open9xGruvin9xFuncSwData_v203)); } - t_Open9xGruvin9xFuncSwData_v203(FuncSwData&); - }) Open9xGruvin9xFuncSwData_v203; PACK(typedef struct t_Open9xGruvin9xFuncSwData_v210 { // Function Switches data @@ -163,8 +149,6 @@ PACK(typedef struct t_Open9xGruvin9xFuncSwData_v210 { // Function Switches data operator FuncSwData(); t_Open9xGruvin9xFuncSwData_v210() { memset(this, 0, sizeof(t_Open9xGruvin9xFuncSwData_v210)); } - t_Open9xGruvin9xFuncSwData_v210(FuncSwData&); - }) Open9xGruvin9xFuncSwData_v210; PACK(typedef struct t_Open9xGruvin9xSwashRingData_v208 { // Swash Ring data @@ -177,8 +161,6 @@ PACK(typedef struct t_Open9xGruvin9xSwashRingData_v208 { // Swash Ring data operator SwashRingData(); t_Open9xGruvin9xSwashRingData_v208() { memset(this, 0, sizeof(t_Open9xGruvin9xSwashRingData_v208)); } - t_Open9xGruvin9xSwashRingData_v208(SwashRingData&); - }) Open9xGruvin9xSwashRingData_v208; PACK(typedef struct t_Open9xGruvin9xSwashRingData_v209 { // Swash Ring data @@ -191,8 +173,6 @@ PACK(typedef struct t_Open9xGruvin9xSwashRingData_v209 { // Swash Ring data operator SwashRingData(); t_Open9xGruvin9xSwashRingData_v209() { memset(this, 0, sizeof(t_Open9xGruvin9xSwashRingData_v209)); } - t_Open9xGruvin9xSwashRingData_v209(SwashRingData&); - }) Open9xGruvin9xSwashRingData_v209; PACK(typedef struct t_Open9xGruvin9xModelData_v207 { @@ -227,8 +207,6 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v207 { operator ModelData(); t_Open9xGruvin9xModelData_v207() { memset(this, 0, sizeof(t_Open9xGruvin9xModelData_v207)); } - t_Open9xGruvin9xModelData_v207(ModelData&); - }) Open9xGruvin9xModelData_v207; PACK(typedef struct t_Open9xGruvin9xModelData_v208 { @@ -268,8 +246,6 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v208 { operator ModelData(); t_Open9xGruvin9xModelData_v208() { memset(this, 0, sizeof(t_Open9xGruvin9xModelData_v208)); } - t_Open9xGruvin9xModelData_v208(ModelData&); - }) Open9xGruvin9xModelData_v208; PACK(typedef struct t_Open9xGruvin9xModelData_v209 { @@ -310,8 +286,6 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v209 { operator ModelData(); t_Open9xGruvin9xModelData_v209() { memset(this, 0, sizeof(t_Open9xGruvin9xModelData_v209)); } - t_Open9xGruvin9xModelData_v209(ModelData&); - }) Open9xGruvin9xModelData_v209; PACK(typedef struct t_Open9xGruvin9xModelData_v210 { @@ -350,8 +324,6 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v210 { operator ModelData(); t_Open9xGruvin9xModelData_v210() { memset(this, 0, sizeof(t_Open9xGruvin9xModelData_v210)); } - t_Open9xGruvin9xModelData_v210(ModelData&); - }) Open9xGruvin9xModelData_v210; PACK(typedef struct t_Open9xGruvin9xModelData_v211 { @@ -388,8 +360,6 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v211 { operator ModelData(); t_Open9xGruvin9xModelData_v211() { memset(this, 0, sizeof(t_Open9xGruvin9xModelData_v211)); } - t_Open9xGruvin9xModelData_v211(ModelData&); - }) Open9xGruvin9xModelData_v211; #endif diff --git a/companion/src/firmwares/opentx/open9xSky9xeeprom.cpp b/companion/src/firmwares/opentx/open9xSky9xeeprom.cpp index afa897700..b9ebaae7a 100644 --- a/companion/src/firmwares/opentx/open9xSky9xeeprom.cpp +++ b/companion/src/firmwares/opentx/open9xSky9xeeprom.cpp @@ -5,31 +5,8 @@ #include #include -extern void setEEPROMZString(char *dst, const char *src, int size); extern void getEEPROMZString(char *dst, const char *src, int size); -int8_t open9xArmFromSwitch(const RawSwitch & sw) -{ - switch (sw.type) { - case SWITCH_TYPE_SWITCH: - return sw.index; - case SWITCH_TYPE_VIRTUAL: - return sw.index > 0 ? (9 + sw.index) : (-9 + sw.index); - case SWITCH_TYPE_ON: - return 42; - case SWITCH_TYPE_OFF: - return -42; - case SWITCH_TYPE_MOMENT_SWITCH: - return sw.index > 0 ? (42 + sw.index) : (-42 + sw.index); - case SWITCH_TYPE_MOMENT_VIRTUAL: - return sw.index > 0 ? (51 + sw.index) : (-51 + sw.index); - case SWITCH_TYPE_ONM: - return 84; - default: - return 0; - } -} - RawSwitch open9xArmToSwitch(int8_t sw) { uint8_t swa = abs(sw); @@ -51,30 +28,6 @@ RawSwitch open9xArmToSwitch(int8_t sw) return RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, sw > 0 ? sw-42-9 : sw+42+9); } -int8_t open9xArm208FromSource(RawSource source) -{ - int v1 = 0; - if (source.type == SOURCE_TYPE_STICK) - v1 = 1+source.index; - else if (source.type == SOURCE_TYPE_ROTARY_ENCODER) { - EEPROMWarnings += ::QObject::tr("Open9x on this board doesn't have Rotary Encoders") + "\n"; - v1 = 5+source.index; - } - else if (source.type == SOURCE_TYPE_MAX) - v1 = 8; - /* else if (source.type == SOURCE_TYPE_3POS) - v1 = 9; */ - else if (source.type == SOURCE_TYPE_CYC) - v1 = 10+source.index; - else if (source.type == SOURCE_TYPE_PPM) - v1 = 13+source.index; - else if (source.type == SOURCE_TYPE_CH) - v1 = 21+source.index; - else if (source.type == SOURCE_TYPE_TELEMETRY) - v1 = 52+source.index; - return v1; -} - RawSource open9xArm208ToSource(int8_t value) { if (value == 0) { @@ -103,32 +56,6 @@ RawSource open9xArm208ToSource(int8_t value) } } -int8_t open9xArm209FromSource(RawSource source) -{ - int v1 = 0; - if (source.type == SOURCE_TYPE_STICK) - v1 = 1+source.index; - else if (source.type == SOURCE_TYPE_ROTARY_ENCODER) { - EEPROMWarnings += ::QObject::tr("Open9x on this board doesn't have Rotary Encoders") + "\n"; - v1 = 5+source.index; - } - else if (source.type == SOURCE_TYPE_TRIM) - v1 = 8 + source.index; - else if (source.type == SOURCE_TYPE_MAX) - v1 = 12; - /* else if (source.type == SOURCE_TYPE_3POS) - v1 = 13; */ - else if (source.type == SOURCE_TYPE_CYC) - v1 = 14+source.index; - else if (source.type == SOURCE_TYPE_PPM) - v1 = 17+source.index; - else if (source.type == SOURCE_TYPE_CH) - v1 = 25+source.index; - else if (source.type == SOURCE_TYPE_TELEMETRY) - v1 = 56+source.index; - return v1; -} - RawSource open9xArm209ToSource(int8_t value) { if (value == 0) { @@ -160,30 +87,6 @@ RawSource open9xArm209ToSource(int8_t value) } } -int8_t open9xArm210FromSource(RawSource source) -{ - int v1 = 0; - if (source.type == SOURCE_TYPE_STICK) - v1 = 1+source.index; - else if (source.type == SOURCE_TYPE_ROTARY_ENCODER) - v1 = 8; - else if (source.type == SOURCE_TYPE_TRIM) - v1 = 9 + source.index; - else if (source.type == SOURCE_TYPE_MAX) - v1 = 13; - /* else if (source.type == SOURCE_TYPE_3POS) - v1 = 14; */ - else if (source.type == SOURCE_TYPE_CYC) - v1 = 15+source.index; - else if (source.type == SOURCE_TYPE_PPM) - v1 = 18+source.index; - else if (source.type == SOURCE_TYPE_CH) - v1 = 26+source.index; - else if (source.type == SOURCE_TYPE_TELEMETRY) - v1 = 57+source.index; - return v1; -} - RawSource open9xArm210ToSource(int8_t value) { if (value == 0) { @@ -239,88 +142,6 @@ t_Open9xArmTimerData_v202::operator TimerData () return c9x; } -t_Open9xArmTimerData_v202::t_Open9xArmTimerData_v202(TimerData &c9x) -{ - val = c9x.val; - - if (c9x.mode >= TMRMODE_OFF && c9x.mode <= TMRMODE_THt) - mode = 0+c9x.mode-TMRMODE_OFF; - else if (c9x.mode >= TMRMODE_FIRST_MOMENT_SWITCH) - mode = 46+c9x.mode-TMRMODE_FIRST_MOMENT_SWITCH; - else if (c9x.mode >= TMRMODE_FIRST_SWITCH) - mode = 5+c9x.mode-TMRMODE_FIRST_SWITCH; - else if (c9x.mode <= TMRMODE_FIRST_NEG_MOMENT_SWITCH) - mode = -42+c9x.mode-TMRMODE_FIRST_NEG_MOMENT_SWITCH; - else if (c9x.mode <= TMRMODE_FIRST_NEG_SWITCH) - mode = -1+c9x.mode-TMRMODE_FIRST_NEG_SWITCH; - else - mode = 0; -} - -t_Open9xArmExpoData_v208::t_Open9xArmExpoData_v208(ExpoData &c9x) -{ - mode = c9x.mode; - chn = c9x.chn; - // 0=no curve, 1-6=std curves, 7-10=CV1-CV4, 11-15=CV9-CV13 - curve = 0; - expo = 0; - if (c9x.curveMode==1) { - if (c9x.curveParam >=0 && c9x.curveParam <= 10) - curve = c9x.curveParam; - else if (c9x.curveParam >= 15 && c9x.curveParam <= 19) - curve = c9x.curveParam - 4; - else - EEPROMWarnings += ::QObject::tr("Open9x doesn't allow Curve%1 in expos").arg(c9x.curveParam-6) + "\n"; - } - else { - expo=c9x.curveParam; - } - - swtch = open9xArmFromSwitch(c9x.swtch); - int zeros=0; - int ones=0; - int phtemp=c9x.phases; - for (int i=0; i>=1; - } - if (zeros==O9X_MAX_PHASES || zeros==0) { - phase=0; - } else if (zeros==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=ph+1; - } else if (ones==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=-(ph+1); - } else { - phase=0; - EEPROMWarnings += ::QObject::tr("Flight modes settings on expos not exported") + "\n"; - } - - weight = c9x.weight; - expo = c9x.expo; -} - t_Open9xArmExpoData_v208::operator ExpoData () { ExpoData c9x; @@ -332,14 +153,10 @@ t_Open9xArmExpoData_v208::operator ExpoData () } else { if (curve == 0) { - c9x.curveMode=0; - c9x.curveParam=expo; - } else { - c9x.curveMode=1; - if (curve <= 10) - c9x.curveParam = curve; - else - c9x.curveParam = curve + 4; + c9x.curve = CurveReference(CurveReference::CURVE_REF_EXPO, expo); + } + else { + // TODO } } c9x.swtch = open9xArmToSwitch(swtch); @@ -355,70 +172,6 @@ t_Open9xArmExpoData_v208::operator ExpoData () return c9x; } -t_Open9xArmExpoData_v210::t_Open9xArmExpoData_v210(ExpoData &c9x) -{ - mode = c9x.mode; - chn = c9x.chn; - // 0=no curve, 1-6=std curves, 7-10=CV1-CV4, 11-15=CV9-CV13 - curve = 0; - expo = 0; - if (c9x.curveMode==1) { - if (c9x.curveParam >=0 && c9x.curveParam <= 10) - curve = c9x.curveParam; - else if (c9x.curveParam >= 15 && c9x.curveParam <= 19) - curve = c9x.curveParam - 4; - else - EEPROMWarnings += ::QObject::tr("Open9x doesn't allow Curve%1 in expos").arg(c9x.curveParam-6) + "\n"; - } - else { - expo=c9x.curveParam; - } - - swtch = open9xArmFromSwitch(c9x.swtch); - int zeros=0; - int ones=0; - int phtemp=c9x.phases; - for (int i=0; i>=1; - } - if (zeros==O9X_MAX_PHASES || zeros==0) { - phase=0; - } else if (zeros==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=ph+1; - } else if (ones==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=-(ph+1); - } else { - phase=0; - EEPROMWarnings += ::QObject::tr("Flight modes settings on expos not exported") + "\n"; - } - weight = c9x.weight; - expo = c9x.expo; - setEEPROMZString(name, c9x.name, sizeof(name)); -} - t_Open9xArmExpoData_v210::operator ExpoData () { ExpoData c9x; @@ -430,53 +183,36 @@ t_Open9xArmExpoData_v210::operator ExpoData () } else { if (curve == 0) { - c9x.curveMode=0; - c9x.curveParam=expo; + c9x.curve = CurveReference(CurveReference::CURVE_REF_EXPO, expo); } else { - c9x.curveMode=1; - if (curve <= 10) - c9x.curveParam = curve; - else - c9x.curveParam = curve + 4; + // TODO } } c9x.swtch = open9xArmToSwitch(swtch); if (phase<0) { c9x.phases= 1 << (-phase -1); - } else if (phase==0) { + } + else if (phase==0) { c9x.phases=0; - } else { + } + else { c9x.phases=63; c9x.phases &= ~(1 << (phase -1)); } c9x.weight = weight; - c9x.expo = expo; getEEPROMZString(c9x.name, name, sizeof(name)); return c9x; } -t_Open9xArmExpoData_v212::t_Open9xArmExpoData_v212(ExpoData &c9x) -{ - mode = c9x.mode; - chn = c9x.chn; - // 0=no curve, 1-6=std curves, 7-10=CV1-CV4, 11-15=CV9-CV13 - curveParam=c9x.curveParam; - curveMode=c9x.curveMode; - swtch = open9xArmFromSwitch(c9x.swtch); - phases=c9x.phases; - weight = c9x.weight; - setEEPROMZString(name, c9x.name, sizeof(name)); -} - t_Open9xArmExpoData_v212::operator ExpoData () { ExpoData c9x; c9x.mode = mode; c9x.chn = chn; - c9x.curveMode=curveMode; - c9x.curveParam=curveParam; + // TODO c9x.curveMode=curveMode; + // c9x.curveParam=curveParam; c9x.swtch = open9xArmToSwitch(swtch); c9x.phases= phases; c9x.weight = weight; @@ -496,16 +232,6 @@ t_Open9xArmPhaseData_v208::operator PhaseData () return c9x; } -t_Open9xArmPhaseData_v208::t_Open9xArmPhaseData_v208(PhaseData &c9x) -{ - for (int i=0; i>=1; - } - if (zeros==O9X_ARM_MAX_PHASES || zeros==0) { - phase=0; - } else if (zeros==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=ph+1; - } else if (ones==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=-(ph+1); - } else { - phase=0; - EEPROMWarnings += ::QObject::tr("Flight modes settings on mixers not exported") + "\n"; - } - sOffset = c9x.sOffset; - } - else { - memset(this, 0, sizeof(t_Open9xArmMixData_v208)); - } -} - t_Open9xArmMixData_v208::operator MixData () { MixData c9x; @@ -646,9 +275,15 @@ t_Open9xArmMixData_v208::operator MixData () c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-10-9-O9X_ARM_NUM_CSW-NUM_CYC-NUM_PPM); } c9x.weight = weight; - c9x.differential = differential*2; c9x.swtch = open9xArmToSwitch(swtch); - c9x.curve = curve; + + if (differential) { + c9x.curve = CurveReference(CurveReference::CURVE_REF_DIFF, differential*2); + } + else { + // TODO c9x.curve = curve; + } + c9x.delayUp = delayUp; c9x.delayDown = delayDown; c9x.speedUp = speedUp; @@ -656,109 +291,23 @@ t_Open9xArmMixData_v208::operator MixData () c9x.carryTrim = carryTrim; c9x.mltpx = (MltpxValue)mltpx; c9x.mixWarn = mixWarn; -// c9x.phase = phase; + if (phase<0) { c9x.phases= 1 << (-phase -1); - } else if (phase==0) { + } + else if (phase==0) { c9x.phases=0; - } else { + } + else { c9x.phases=511; c9x.phases &= ~(1 << (phase -1)); - } + } + c9x.sOffset = sOffset; } return c9x; } -t_Open9xArmMixData_v209::t_Open9xArmMixData_v209(MixData &c9x) -{ - if (c9x.destCh) { - destCh = c9x.destCh-1; - mixWarn = c9x.mixWarn; - swtch = open9xArmFromSwitch(c9x.swtch); - if (c9x.srcRaw.type == SOURCE_TYPE_NONE) { - srcRaw = 0; - swtch = 0; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_STICK) { - srcRaw = 1 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_MAX) { - srcRaw = 8; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_TRIM) { - srcRaw = 9 + c9x.srcRaw.index; - } - /* else if (c9x.srcRaw.type == SOURCE_TYPE_3POS) { - srcRaw = 13; - } */ - else if (c9x.srcRaw.type == SOURCE_TYPE_SWITCH) { - srcRaw = 13 + open9xArmFromSwitch(RawSwitch(c9x.srcRaw.index)); - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CYC) { - srcRaw = 14+9+O9X_ARM_NUM_CSW + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_PPM) { - srcRaw = 14+9+O9X_ARM_NUM_CSW+NUM_CYC + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CH) { - srcRaw = 14+9+O9X_ARM_NUM_CSW+NUM_CYC+NUM_PPM + c9x.srcRaw.index; - } - weight = c9x.weight; - differential = c9x.differential/2; - curve = c9x.curve; - delayUp = c9x.delayUp; - delayDown = c9x.delayDown; - speedUp = c9x.speedUp; - speedDown = c9x.speedDown; - carryTrim = c9x.carryTrim; - mltpx = (MltpxValue)c9x.mltpx; - int zeros=0; - int ones=0; - int phtemp=c9x.phases; - for (int i=0; i>=1; - } - if (zeros==O9X_ARM_MAX_PHASES || zeros==0) { - phase=0; - } else if (zeros==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=ph+1; - } else if (ones==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=-(ph+1); - } else { - phase=0; - EEPROMWarnings += ::QObject::tr("Flight modes settings on mixers not exported") + "\n"; - } - sOffset = c9x.sOffset; - } - else { - memset(this, 0, sizeof(t_Open9xArmMixData_v209)); - } -} - t_Open9xArmMixData_v209::operator MixData () { MixData c9x; @@ -792,9 +341,15 @@ t_Open9xArmMixData_v209::operator MixData () c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-14-9-O9X_ARM_NUM_CSW-NUM_CYC-NUM_PPM); } c9x.weight = weight; - c9x.differential = differential*2; + + if (differential) { + c9x.curve = CurveReference(CurveReference::CURVE_REF_DIFF, differential*2); + } + else { + // TODO c9x.curve = curve; + } + c9x.swtch = open9xArmToSwitch(swtch); - c9x.curve = curve; c9x.delayUp = delayUp; c9x.delayDown = delayDown; c9x.speedUp = speedUp; @@ -802,110 +357,23 @@ t_Open9xArmMixData_v209::operator MixData () c9x.carryTrim = carryTrim; c9x.mltpx = (MltpxValue)mltpx; c9x.mixWarn = mixWarn; - // c9x.phase = phase; + if (phase<0) { c9x.phases= 1 << (-phase -1); - } else if (phase==0) { + } + else if (phase==0) { c9x.phases=0; - } else { + } + else { c9x.phases=511; c9x.phases &= ~(1 << (phase -1)); - } + } + c9x.sOffset = sOffset; } return c9x; } -t_Open9xArmMixData_v210::t_Open9xArmMixData_v210(MixData &c9x) -{ - if (c9x.destCh) { - destCh = c9x.destCh-1; - mixWarn = c9x.mixWarn; - swtch = open9xArmFromSwitch(c9x.swtch); - if (c9x.srcRaw.type == SOURCE_TYPE_NONE) { - srcRaw = 0; - swtch = 0; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_STICK) { - srcRaw = 1 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_TRIM) { - srcRaw = 8 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_MAX) { - srcRaw = 12; - } - /* else if (c9x.srcRaw.type == SOURCE_TYPE_3POS) { - srcRaw = 13; - } */ - else if (c9x.srcRaw.type == SOURCE_TYPE_SWITCH) { - srcRaw = 13 + open9xArmFromSwitch(RawSwitch(c9x.srcRaw.index)); - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CYC) { - srcRaw = 14+9+O9X_ARM_NUM_CSW + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_PPM) { - srcRaw = 14+9+O9X_ARM_NUM_CSW+NUM_CYC + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CH) { - srcRaw = 14+9+O9X_ARM_NUM_CSW+NUM_CYC+NUM_PPM + c9x.srcRaw.index; - } - weight = c9x.weight; - differential = c9x.differential/2; - curve = c9x.curve; - delayUp = c9x.delayUp; - delayDown = c9x.delayDown; - speedUp = c9x.speedUp; - speedDown = c9x.speedDown; - carryTrim = c9x.carryTrim; - mltpx = (MltpxValue)c9x.mltpx; - int zeros=0; - int ones=0; - int phtemp=c9x.phases; - for (int i=0; i>=1; - } - if (zeros==O9X_ARM_MAX_PHASES || zeros==0) { - phase=0; - } else if (zeros==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=ph+1; - } else if (ones==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=-(ph+1); - } else { - phase=0; - EEPROMWarnings += ::QObject::tr("Flight modes settings on mixers not exported") + "\n"; - } - sOffset = c9x.sOffset; - setEEPROMZString(name, c9x.name, sizeof(name)); - } - else { - memset(this, 0, sizeof(t_Open9xArmMixData_v210)); - } -} - t_Open9xArmMixData_v210::operator MixData () { MixData c9x; @@ -939,9 +407,15 @@ t_Open9xArmMixData_v210::operator MixData () c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-14-9-O9X_ARM_NUM_CSW-NUM_CYC-NUM_PPM); } c9x.weight = weight; - c9x.differential = differential*2; + + if (differential) { + c9x.curve = CurveReference(CurveReference::CURVE_REF_DIFF, differential*2); + } + else { + // TODO c9x.curve = curve; + } + c9x.swtch = open9xArmToSwitch(swtch); - c9x.curve = curve; c9x.delayUp = delayUp; c9x.delayDown = delayDown; c9x.speedUp = speedUp; @@ -949,82 +423,24 @@ t_Open9xArmMixData_v210::operator MixData () c9x.carryTrim = carryTrim; c9x.mltpx = (MltpxValue)mltpx; c9x.mixWarn = mixWarn; - // c9x.phase = phase; + if (phase<0) { c9x.phases= 1 << (-phase -1); - } else if (phase==0) { + } + else if (phase==0) { c9x.phases=0; - } else { + } + else { c9x.phases=511; c9x.phases &= ~(1 << (phase -1)); } + c9x.sOffset = sOffset; getEEPROMZString(c9x.name, name, sizeof(name)); } return c9x; } -t_Open9xArmMixData_v212::t_Open9xArmMixData_v212(MixData &c9x) -{ - if (c9x.destCh) { - destCh = c9x.destCh-1; - mixWarn = c9x.mixWarn; - swtch = open9xArmFromSwitch(c9x.swtch); - if (c9x.srcRaw.type == SOURCE_TYPE_NONE) { - srcRaw = 0; - swtch = 0; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_STICK) { - srcRaw = 1 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_ROTARY_ENCODER) { - srcRaw = 8; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_TRIM) { - srcRaw = 9 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_MAX) { - srcRaw = 13; - } - /* else if (c9x.srcRaw.type == SOURCE_TYPE_3POS) { - srcRaw = 14; - } */ - else if (c9x.srcRaw.type == SOURCE_TYPE_SWITCH) { - srcRaw = 14 + open9xArmFromSwitch(RawSwitch(c9x.srcRaw.index)); - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CYC) { - srcRaw = 15+9+O9X_ARM_NUM_CSW + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_PPM) { - srcRaw = 15+9+O9X_ARM_NUM_CSW+NUM_CYC + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CH) { - srcRaw = 15+9+O9X_ARM_NUM_CSW+NUM_CYC+NUM_PPM + c9x.srcRaw.index; - } - weight = c9x.weight; - if (c9x.curve==0) { - curveMode=0; - curveParam=c9x.differential; - } else { - curveMode=1; - curveParam = c9x.curve; - } - delayUp = c9x.delayUp; - delayDown = c9x.delayDown; - speedUp = c9x.speedUp; - speedDown = c9x.speedDown; - carryTrim = c9x.carryTrim; - noExpo = c9x.noExpo; - mltpx = (MltpxValue)c9x.mltpx; - phases = c9x.phases; - sOffset = c9x.sOffset; - setEEPROMZString(name, c9x.name, sizeof(name)); - } - else { - memset(this, 0, sizeof(t_Open9xArmMixData_v210)); - } -} - t_Open9xArmMixData_v212::operator MixData () { MixData c9x; @@ -1061,12 +477,14 @@ t_Open9xArmMixData_v212::operator MixData () c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-15-9-O9X_ARM_NUM_CSW-NUM_CYC-NUM_PPM); } c9x.weight = weight; + if (curveMode==0) { - c9x.differential = curveParam; - c9x.curve=0; - } else { - c9x.curve=curveParam; - } + c9x.curve = CurveReference(CurveReference::CURVE_REF_DIFF, curveParam); + } + else { + // TODO + } + c9x.swtch = open9xArmToSwitch(swtch); c9x.delayUp = delayUp; c9x.delayDown = delayDown; @@ -1083,33 +501,6 @@ t_Open9xArmMixData_v212::operator MixData () return c9x; } -t_Open9xArmCustomSwData_v208::t_Open9xArmCustomSwData_v208(CustomSwData &c9x) -{ - func = c9x.func; - v1 = c9x.val1; - v2 = c9x.val2; - - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { - v1 = open9xArm208FromSource(RawSource(c9x.val1)); - } - - if (c9x.func >= CS_FN_EQUAL) { - v2 = open9xArm208FromSource(RawSource(c9x.val2)); - } - - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { - v1 = open9xArmFromSwitch(RawSwitch(c9x.val1)); - v2 = open9xArmFromSwitch(RawSwitch(c9x.val2)); - } - - if (func>O9X_ARM_MAX_CSFUNCOLD ) { - EEPROMWarnings += ::QObject::tr("This version of open9x does not support Custom Switch function %1").arg(getFuncName(func)) + "\n"; - func=0; - v1=0; - v2=0; - } -} - t_Open9xArmCustomSwData_v208::operator CustomSwData () { CustomSwData c9x; @@ -1133,33 +524,6 @@ t_Open9xArmCustomSwData_v208::operator CustomSwData () return c9x; } -t_Open9xArmCustomSwData_v209::t_Open9xArmCustomSwData_v209(CustomSwData &c9x) -{ - func = c9x.func; - v1 = c9x.val1; - v2 = c9x.val2; - - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { - v1 = open9xArm209FromSource(RawSource(c9x.val1)); - } - - if (c9x.func >= CS_FN_EQUAL) { - v2 = open9xArm209FromSource(RawSource(c9x.val2)); - } - - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { - v1 = open9xArmFromSwitch(RawSwitch(c9x.val1)); - v2 = open9xArmFromSwitch(RawSwitch(c9x.val2)); - } - - if (func>O9X_ARM_MAX_CSFUNCOLD ) { - EEPROMWarnings += ::QObject::tr("This version of open9x does not support Custom Switch function %1").arg(getFuncName(func)) + "\n"; - func=0; - v1=0; - v2=0; - } -} - t_Open9xArmCustomSwData_v209::operator CustomSwData () { CustomSwData c9x; @@ -1183,28 +547,6 @@ t_Open9xArmCustomSwData_v209::operator CustomSwData () return c9x; } -t_Open9xArmCustomSwData_v210::t_Open9xArmCustomSwData_v210(CustomSwData &c9x) -{ - func = c9x.func; - v1 = c9x.val1; - v2 = c9x.val2; - - delay = c9x.delay; - duration = c9x.duration; - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { - v1 = open9xArm210FromSource(RawSource(c9x.val1)); - } - - if (c9x.func >= CS_FN_EQUAL && c9x.func <= CS_FN_ELESS) { - v2 = open9xArm210FromSource(RawSource(c9x.val2)); - } - - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { - v1 = open9xArmFromSwitch(RawSwitch(c9x.val1)); - v2 = open9xArmFromSwitch(RawSwitch(c9x.val2)); - } -} - t_Open9xArmCustomSwData_v210::operator CustomSwData () { CustomSwData c9x; @@ -1230,21 +572,6 @@ t_Open9xArmCustomSwData_v210::operator CustomSwData () return c9x; } -t_Open9xArmFuncSwData_v208::t_Open9xArmFuncSwData_v208(FuncSwData &c9x) -{ - swtch = open9xArmFromSwitch(c9x.swtch); - if (c9x.func <= FuncSafetyCh16) { - param = ((c9x.param>>1)<<1); - param |=(c9x.enabled & 0x01); - } else { - param = c9x.param; - if ((c9x.func == FuncPlayValue || c9x.func == FuncVolume) && param > 7) { - param -= -2; - } - } - func = c9x.func; -} - t_Open9xArmFuncSwData_v208::operator FuncSwData () { FuncSwData c9x; @@ -1263,29 +590,6 @@ t_Open9xArmFuncSwData_v208::operator FuncSwData () return c9x; } -t_Open9xArmFuncSwData_v210::t_Open9xArmFuncSwData_v210(FuncSwData &c9x) -{ - swtch = open9xArmFromSwitch(c9x.swtch); - uint32_t value; - if (c9x.func <= FuncInstantTrim) { - value = ((c9x.param>>1)<<1); - value |=(c9x.enabled & 0x01); - } - else { - if (c9x.func == FuncPlayPrompt || c9x.func == FuncBackgroundMusic) { - memcpy(param, c9x.paramarm, sizeof(param)); - } - else { - value = c9x.param; - if ((c9x.func == FuncPlayValue || c9x.func == FuncVolume) && value > 7) { - value-=2; - } - *((uint32_t *)param) = value; - } - } - func = c9x.func; -} - t_Open9xArmFuncSwData_v210::operator FuncSwData () { FuncSwData c9x; @@ -1310,30 +614,6 @@ t_Open9xArmFuncSwData_v210::operator FuncSwData () return c9x; } -t_Open9xArmFuncSwData_v211::t_Open9xArmFuncSwData_v211(FuncSwData &c9x) -{ - swtch = open9xArmFromSwitch(c9x.swtch); - uint32_t value; - if (c9x.func <= FuncInstantTrim) { - value = c9x.param; - *((uint32_t *)param) = value; - delay=(c9x.enabled & 0x01); - } - else { - if (c9x.func == FuncPlayPrompt || c9x.func == FuncBackgroundMusic) { - memcpy(param, c9x.paramarm, sizeof(param)); - } - else { - value = c9x.param; - if ((c9x.func == FuncPlayValue || c9x.func == FuncVolume || (c9x.func >= FuncAdjustGV1 && c9x.func <= FuncAdjustGV5)) && value > 7) { - value--; - } - *((uint32_t *)param) = value; - } - } - func = c9x.func; -} - t_Open9xArmFuncSwData_v211::operator FuncSwData () { FuncSwData c9x; @@ -1350,7 +630,7 @@ t_Open9xArmFuncSwData_v211::operator FuncSwData () } else { c9x.param = value; - if ((c9x.func == FuncPlayValue || c9x.func == FuncVolume || (c9x.func >= FuncAdjustGV1 && c9x.func <= FuncAdjustGV5)) && value > 7) { + if ((c9x.func == FuncPlayValue || c9x.func == FuncVolume || (c9x.func >= FuncAdjustGV1 && c9x.func <= FuncAdjustGVLast)) && value > 7) { c9x.param++; } } @@ -1358,16 +638,6 @@ t_Open9xArmFuncSwData_v211::operator FuncSwData () return c9x; } -t_Open9xArmSwashRingData_v208::t_Open9xArmSwashRingData_v208(SwashRingData &c9x) -{ - invertELE = c9x.invertELE; - invertAIL = c9x.invertAIL; - invertCOL = c9x.invertCOL; - type = c9x.type; - collectiveSource = open9xArm208FromSource(c9x.collectiveSource); - value = c9x.value; -} - t_Open9xArmSwashRingData_v208::operator SwashRingData () { SwashRingData c9x; @@ -1380,16 +650,6 @@ t_Open9xArmSwashRingData_v208::operator SwashRingData () return c9x; } -t_Open9xArmSwashRingData_v209::t_Open9xArmSwashRingData_v209(SwashRingData &c9x) -{ - invertELE = c9x.invertELE; - invertAIL = c9x.invertAIL; - invertCOL = c9x.invertCOL; - type = c9x.type; - collectiveSource = open9xArm209FromSource(c9x.collectiveSource); - value = c9x.value; -} - t_Open9xArmSwashRingData_v209::operator SwashRingData () { SwashRingData c9x; @@ -1402,16 +662,6 @@ t_Open9xArmSwashRingData_v209::operator SwashRingData () return c9x; } -t_Open9xArmSwashRingData_v210::t_Open9xArmSwashRingData_v210(SwashRingData &c9x) -{ - invertELE = c9x.invertELE; - invertAIL = c9x.invertAIL; - invertCOL = c9x.invertCOL; - type = c9x.type; - collectiveSource = open9xArm210FromSource(c9x.collectiveSource); - value = c9x.value; -} - t_Open9xArmSwashRingData_v210::operator SwashRingData () { SwashRingData c9x; @@ -1452,31 +702,6 @@ t_Open9xArmFrSkyData_v210::operator FrSkyData () return c9x; } -t_Open9xArmFrSkyData_v210::t_Open9xArmFrSkyData_v210(FrSkyData &c9x) -{ - memset(this, 0, sizeof(t_Open9xArmFrSkyData_v210)); - channels[0] = c9x.channels[0]; - channels[1] = c9x.channels[1]; - usrProto = c9x.usrProto; - voltsSource = c9x.voltsSource; - blades = c9x.blades; - currentSource=c9x.currentSource; - for (int i=0; i<4; i++) { - bars[i].source = c9x.screens[0].body.bars[i].source; - bars[i].barMin = c9x.screens[0].body.bars[i].barMin; - bars[i].barMax = c9x.screens[0].body.bars[i].barMax; - } - for (int line=0; line<4; line++) { - for (int col=0; col<2; col++) { - int i=line*2+col; - lines[i]=c9x.screens[1].body.lines[line].source[col]; - } - } - rssiAlarms[0] = Open9xFrSkyRSSIAlarm(0, c9x.rssiAlarms[0]); - rssiAlarms[1] = Open9xFrSkyRSSIAlarm(1, c9x.rssiAlarms[1]); -} - - t_Open9xArmFrSkyData_v211::operator FrSkyData () { FrSkyData c9x; @@ -1509,33 +734,6 @@ t_Open9xArmFrSkyData_v211::operator FrSkyData () return c9x; } -t_Open9xArmFrSkyData_v211::t_Open9xArmFrSkyData_v211(FrSkyData &c9x) -{ - memset(this, 0, sizeof(t_Open9xArmFrSkyData_v211)); - channels[0] = c9x.channels[0]; - channels[1] = c9x.channels[1]; - usrProto = c9x.usrProto; - voltsSource = c9x.voltsSource; - blades = c9x.blades; - currentSource=c9x.currentSource; - for (int i=0; i<4; i++) { - bars[i].source = c9x.screens[0].body.bars[i].source; - bars[i].barMin = c9x.screens[0].body.bars[i].barMin; - bars[i].barMax = c9x.screens[0].body.bars[i].barMax; - } - for (int line=0; line<4; line++) { - for (int col=0; col<2; col++) { - int i=line*2+col; - lines[i]=c9x.screens[1].body.lines[line].source[col]; - } - } - rssiAlarms[0] = Open9xFrSkyRSSIAlarm(0, c9x.rssiAlarms[0]); - rssiAlarms[1] = Open9xFrSkyRSSIAlarm(1, c9x.rssiAlarms[1]); - varioSource = c9x.varioSource; - varioSpeedUpMin = c9x.varioCenterMax; - varioSpeedDownMin = c9x.varioCenterMin; -} - t_Open9xArmModelData_v208::operator ModelData () { ModelData c9x; @@ -1562,7 +760,7 @@ t_Open9xArmModelData_v208::operator ModelData () } c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.thrTrim = thrTrim; - c9x.trimInc = trimInc; + c9x.trimInc = trimInc - 2; c9x.disableThrottleWarning=disableThrottleWarning; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.beepANACenter = beepANACenter; @@ -1587,7 +785,6 @@ t_Open9xArmModelData_v208::operator ModelData () for (int i=0; i= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - varioSource = c9x.frsky.varioSource; - varioSpeedUpMin = c9x.frsky.varioCenterMax; - varioSpeedDownMin = c9x.frsky.varioCenterMin; - - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - frskyLinesXtra=0; - for (int j=0; j<4; j++) { - frskyLines[j] = 0; - for (int k=0; k<2; k++) { - int value = c9x.frsky.screens[1].body.lines[j].source[k]; - frskyLines[j] |= (k==0 ? (value & 0x0f) : ((value & 0x0f) << 4)); - frskyLinesXtra |= (value / 16) << (4*j+2*k); - } - } - for (int i=0; i= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - varioSource = c9x.frsky.varioSource; - varioSpeedUpMin = c9x.frsky.varioCenterMax; - varioSpeedDownMin = c9x.frsky.varioCenterMin; - switchWarningStates = c9x.switchWarningStates; - - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - frskyLinesXtra=0; - for (int j=0; j<4; j++) { - frskyLines[j] = 0; - for (int k=0; k<2; k++) { - int value = c9x.frsky.screens[1].body.lines[j].source[k]; - frskyLines[j] |= (k==0 ? (value & 0x0f) : ((value & 0x0f) << 4)); - frskyLinesXtra |= (value / 16) << (4*j+2*k); - } - } - for (int i=0; i= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - varioSource = c9x.frsky.varioSource; - varioSpeedUpMin = c9x.frsky.varioCenterMax; - varioSpeedDownMin = c9x.frsky.varioCenterMin; - switchWarningStates = c9x.switchWarningStates; - - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - - for (int i=0; i O9X_ARM_NUM_POINTS - 5 * O9X_ARM_MAX_CURVES) { - EEPROMWarnings += ::QObject::tr("open9x only accepts %1 points in all curves").arg(O9X_ARM_NUM_POINTS) + "\n"; - break; - } - curves[i] = offset; - for (int j=0; j= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - switchWarningStates = c9x.switchWarningStates; - - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - - for (int i=0; i O9X_ARM_NUM_POINTS - 5 * O9X_ARM_MAX_CURVES) { - EEPROMWarnings += ::QObject::tr("open9x only accepts %1 points in all curves").arg(O9X_ARM_NUM_POINTS) + "\n"; - break; - } - curves[i] = offset; - for (int j=0; j= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - switchWarningStates = c9x.switchWarningStates; - - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - } -} diff --git a/companion/src/firmwares/opentx/open9xSky9xeeprom.h b/companion/src/firmwares/opentx/open9xSky9xeeprom.h index 1c28d6d18..b313169b8 100644 --- a/companion/src/firmwares/opentx/open9xSky9xeeprom.h +++ b/companion/src/firmwares/opentx/open9xSky9xeeprom.h @@ -36,7 +36,6 @@ PACK(typedef struct t_Open9xArmTimerData_v202 { operator TimerData(); t_Open9xArmTimerData_v202() { memset(this, 0, sizeof(t_Open9xArmTimerData_v202)); } - t_Open9xArmTimerData_v202(TimerData &eepe); }) Open9xArmTimerData_v202; PACK(typedef struct t_Open9xArmExpoData_v208 { @@ -50,8 +49,6 @@ PACK(typedef struct t_Open9xArmExpoData_v208 { operator ExpoData(); t_Open9xArmExpoData_v208() { memset(this, 0, sizeof(t_Open9xArmExpoData_v208)); } - t_Open9xArmExpoData_v208(ExpoData&); - }) Open9xArmExpoData_v208; PACK(typedef struct t_Open9xArmExpoData_v210 { @@ -67,8 +64,6 @@ PACK(typedef struct t_Open9xArmExpoData_v210 { operator ExpoData(); t_Open9xArmExpoData_v210() { memset(this, 0, sizeof(t_Open9xArmExpoData_v210)); } - t_Open9xArmExpoData_v210(ExpoData&); - }) Open9xArmExpoData_v210; PACK(typedef struct t_Open9xArmExpoData_v212 { @@ -83,8 +78,6 @@ PACK(typedef struct t_Open9xArmExpoData_v212 { operator ExpoData(); t_Open9xArmExpoData_v212() { memset(this, 0, sizeof(t_Open9xArmExpoData_v212)); } - t_Open9xArmExpoData_v212(ExpoData&); - }) Open9xArmExpoData_v212; PACK(typedef struct t_Open9xArmMixData_v208 { @@ -106,8 +99,6 @@ PACK(typedef struct t_Open9xArmMixData_v208 { operator MixData(); t_Open9xArmMixData_v208() { memset(this, 0, sizeof(t_Open9xArmMixData_v208)); } - t_Open9xArmMixData_v208(MixData&); - }) Open9xArmMixData_v208; PACK(typedef struct t_Open9xArmMixData_v209 { @@ -129,8 +120,6 @@ PACK(typedef struct t_Open9xArmMixData_v209 { operator MixData(); t_Open9xArmMixData_v209() { memset(this, 0, sizeof(t_Open9xArmMixData_v209)); } - t_Open9xArmMixData_v209(MixData&); - }) Open9xArmMixData_v209; PACK(typedef struct t_Open9xArmMixData_v210 { @@ -154,8 +143,6 @@ PACK(typedef struct t_Open9xArmMixData_v210 { operator MixData(); t_Open9xArmMixData_v210() { memset(this, 0, sizeof(t_Open9xArmMixData_v210)); } - t_Open9xArmMixData_v210(MixData&); - }) Open9xArmMixData_v210; PACK(typedef struct t_Open9xArmMixData_v212 { @@ -180,8 +167,6 @@ PACK(typedef struct t_Open9xArmMixData_v212 { operator MixData(); t_Open9xArmMixData_v212() { memset(this, 0, sizeof(t_Open9xArmMixData_v212)); } - t_Open9xArmMixData_v212(MixData&); - }) Open9xArmMixData_v212; PACK(typedef struct t_Open9xArmPhaseData_v208 { @@ -192,7 +177,6 @@ PACK(typedef struct t_Open9xArmPhaseData_v208 { uint8_t fadeOut:4; operator PhaseData(); t_Open9xArmPhaseData_v208() { memset(this, 0, sizeof(t_Open9xArmPhaseData_v208)); } - t_Open9xArmPhaseData_v208(PhaseData &eepe); }) Open9xArmPhaseData_v208; PACK(typedef struct t_Open9xArmPhaseData_v212 { @@ -204,7 +188,6 @@ PACK(typedef struct t_Open9xArmPhaseData_v212 { int16_t rotaryEncoders[1]; operator PhaseData(); t_Open9xArmPhaseData_v212() { memset(this, 0, sizeof(t_Open9xArmPhaseData_v212)); } - t_Open9xArmPhaseData_v212(PhaseData &eepe); }) Open9xArmPhaseData_v212; PACK(typedef struct t_Open9xArmCustomSwData_v208 { // Custom Switches data @@ -214,7 +197,6 @@ PACK(typedef struct t_Open9xArmCustomSwData_v208 { // Custom Switches data operator CustomSwData(); t_Open9xArmCustomSwData_v208() { memset(this, 0, sizeof(t_Open9xArmCustomSwData_v208)); } - t_Open9xArmCustomSwData_v208(CustomSwData&); }) Open9xArmCustomSwData_v208; PACK(typedef struct t_Open9xArmCustomSwData_v209 { // Custom Switches data @@ -224,7 +206,6 @@ PACK(typedef struct t_Open9xArmCustomSwData_v209 { // Custom Switches data operator CustomSwData(); t_Open9xArmCustomSwData_v209() { memset(this, 0, sizeof(t_Open9xArmCustomSwData_v209)); } - t_Open9xArmCustomSwData_v209(CustomSwData&); }) Open9xArmCustomSwData_v209; PACK(typedef struct t_Open9xArmCustomSwData_v210 { // Custom Switches data @@ -236,7 +217,6 @@ PACK(typedef struct t_Open9xArmCustomSwData_v210 { // Custom Switches data operator CustomSwData(); t_Open9xArmCustomSwData_v210() { memset(this, 0, sizeof(t_Open9xArmCustomSwData_v210)); } - t_Open9xArmCustomSwData_v210(CustomSwData&); }) Open9xArmCustomSwData_v210; PACK(typedef struct t_Open9xArmFuncSwData_v208 { // Function Switches data @@ -246,8 +226,6 @@ PACK(typedef struct t_Open9xArmFuncSwData_v208 { // Function Switches data operator FuncSwData(); t_Open9xArmFuncSwData_v208() { memset(this, 0, sizeof(t_Open9xArmFuncSwData_v208)); } - t_Open9xArmFuncSwData_v208(FuncSwData&); - }) Open9xArmFuncSwData_v208; PACK(typedef struct t_Open9xArmFuncSwData_v210 { // Function Switches data @@ -257,8 +235,6 @@ PACK(typedef struct t_Open9xArmFuncSwData_v210 { // Function Switches data operator FuncSwData(); t_Open9xArmFuncSwData_v210() { memset(this, 0, sizeof(t_Open9xArmFuncSwData_v210)); } - t_Open9xArmFuncSwData_v210(FuncSwData&); - }) Open9xArmFuncSwData_v210; PACK(typedef struct t_Open9xArmFuncSwData_v211 { // Function Switches data @@ -270,8 +246,6 @@ PACK(typedef struct t_Open9xArmFuncSwData_v211 { // Function Switches data operator FuncSwData(); t_Open9xArmFuncSwData_v211() { memset(this, 0, sizeof(t_Open9xArmFuncSwData_v211)); } - t_Open9xArmFuncSwData_v211(FuncSwData&); - }) Open9xArmFuncSwData_v211; PACK(typedef struct t_Open9xArmSwashRingData_v208 { // Swash Ring data @@ -284,8 +258,6 @@ PACK(typedef struct t_Open9xArmSwashRingData_v208 { // Swash Ring data operator SwashRingData(); t_Open9xArmSwashRingData_v208() { memset(this, 0, sizeof(t_Open9xArmSwashRingData_v208)); } - t_Open9xArmSwashRingData_v208(SwashRingData&); - }) Open9xArmSwashRingData_v208; PACK(typedef struct t_Open9xArmSwashRingData_v209 { // Swash Ring data @@ -298,8 +270,6 @@ PACK(typedef struct t_Open9xArmSwashRingData_v209 { // Swash Ring data operator SwashRingData(); t_Open9xArmSwashRingData_v209() { memset(this, 0, sizeof(t_Open9xArmSwashRingData_v209)); } - t_Open9xArmSwashRingData_v209(SwashRingData&); - }) Open9xArmSwashRingData_v209; PACK(typedef struct t_Open9xArmSwashRingData_v210 { // Swash Ring data @@ -312,8 +282,6 @@ PACK(typedef struct t_Open9xArmSwashRingData_v210 { // Swash Ring data operator SwashRingData(); t_Open9xArmSwashRingData_v210() { memset(this, 0, sizeof(t_Open9xArmSwashRingData_v210)); } - t_Open9xArmSwashRingData_v210(SwashRingData&); - }) Open9xArmSwashRingData_v210; @@ -336,7 +304,6 @@ PACK(typedef struct t_Open9xArmFrSkyData_v210 { operator FrSkyData(); t_Open9xArmFrSkyData_v210() { memset(this, 0, sizeof(t_Open9xArmFrSkyData_v210)); } - t_Open9xArmFrSkyData_v210(FrSkyData&); }) Open9xArmFrSkyData_v210; PACK(typedef struct t_Open9xArmFrSkyData_v211 { @@ -355,7 +322,6 @@ PACK(typedef struct t_Open9xArmFrSkyData_v211 { operator FrSkyData(); t_Open9xArmFrSkyData_v211() { memset(this, 0, sizeof(t_Open9xArmFrSkyData_v211)); } - t_Open9xArmFrSkyData_v211(FrSkyData&); }) Open9xArmFrSkyData_v211; PACK(typedef struct t_Open9xArmModelData_v208 { @@ -395,8 +361,6 @@ PACK(typedef struct t_Open9xArmModelData_v208 { operator ModelData(); t_Open9xArmModelData_v208() { memset(this, 0, sizeof(t_Open9xArmModelData_v208)); } - t_Open9xArmModelData_v208(ModelData&); - }) Open9xArmModelData_v208; PACK(typedef struct t_Open9xArmModelData_v209 { @@ -437,8 +401,6 @@ PACK(typedef struct t_Open9xArmModelData_v209 { operator ModelData(); t_Open9xArmModelData_v209() { memset(this, 0, sizeof(t_Open9xArmModelData_v209)); } - t_Open9xArmModelData_v209(ModelData&); - }) Open9xArmModelData_v209; PACK(typedef struct t_Open9xArmModelData_v210 { @@ -477,7 +439,6 @@ PACK(typedef struct t_Open9xArmModelData_v210 { operator ModelData(); t_Open9xArmModelData_v210() { memset(this, 0, sizeof(t_Open9xArmModelData_v210)); } - t_Open9xArmModelData_v210(ModelData&); }) Open9xArmModelData_v210; @@ -517,8 +478,6 @@ PACK(typedef struct t_Open9xArmModelData_v211 { operator ModelData(); t_Open9xArmModelData_v211() { memset(this, 0, sizeof(t_Open9xArmModelData_v211)); } - t_Open9xArmModelData_v211(ModelData&); - }) Open9xArmModelData_v211; PACK(typedef struct t_Open9xArmModelData_v212 { @@ -555,8 +514,6 @@ PACK(typedef struct t_Open9xArmModelData_v212 { operator ModelData(); t_Open9xArmModelData_v212() { memset(this, 0, sizeof(t_Open9xArmModelData_v212)); } - t_Open9xArmModelData_v212(ModelData&); - }) Open9xArmModelData_v212; #endif diff --git a/companion/src/firmwares/opentx/open9xStockeeprom.cpp b/companion/src/firmwares/opentx/open9xStockeeprom.cpp index 274e91be9..9989cf8c5 100644 --- a/companion/src/firmwares/opentx/open9xStockeeprom.cpp +++ b/companion/src/firmwares/opentx/open9xStockeeprom.cpp @@ -62,28 +62,6 @@ void getEEPROMZString(char *dst, const char *src, int size) } } -int8_t open9xStockFromSwitch(const RawSwitch & sw) -{ - switch (sw.type) { - case SWITCH_TYPE_SWITCH: - return sw.index; - case SWITCH_TYPE_VIRTUAL: - return sw.index > 0 ? (9 + sw.index) : (-9 + sw.index); - case SWITCH_TYPE_ON: - return 22; - case SWITCH_TYPE_OFF: - return -22; - case SWITCH_TYPE_MOMENT_SWITCH: - return sw.index > 0 ? (22 + sw.index) : (-22 + sw.index); - case SWITCH_TYPE_MOMENT_VIRTUAL: - return sw.index > 0 ? (31 + sw.index) : (-31 + sw.index); - case SWITCH_TYPE_ONM: - return 44; - default: - return 0; - } -} - RawSwitch open9xStockToSwitch(int8_t sw) { uint8_t swa = abs(sw); @@ -105,70 +83,6 @@ RawSwitch open9xStockToSwitch(int8_t sw) return RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, sw > 0 ? sw-22-9 : sw+22+9); } -t_Open9xExpoData_v201::t_Open9xExpoData_v201(ExpoData &c9x) -{ - mode = c9x.mode; - chn = c9x.chn; - // 0=no curve, 1-6=std curves, 7-10=CV1-CV4, 11-15=CV9-CV13 - curve = 0; - expo = 0; - if (c9x.curveMode == 1) { - if (c9x.curveParam >=0 && c9x.curveParam <= 10) - curve = c9x.curveParam; - else if (c9x.curveParam >= 15 && c9x.curveParam <= 19) - curve = c9x.curveParam - 4; - else - EEPROMWarnings += ::QObject::tr("Open9x doesn't allow Curve%1 in expos").arg(c9x.curveParam-6) + "\n"; - } - else { - expo=c9x.expo; - } - swtch = open9xStockFromSwitch(c9x.swtch); - int zeros=0; - int ones=0; - int phtemp=c9x.phases; - for (int i=0; i>=1; - } - if (zeros==O9X_MAX_PHASES || zeros==0) { - phase=0; - negPhase=0; - } else if (zeros==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=ph+1; - negPhase=0; - } else if (ones==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=(ph+1); - negPhase=1; - } else { - phase=0; - EEPROMWarnings += ::QObject::tr("Flight modes settings on expos not exported") + "\n"; - } - weight = c9x.weight; -} - t_Open9xExpoData_v201::operator ExpoData () { ExpoData c9x; @@ -179,15 +93,10 @@ t_Open9xExpoData_v201::operator ExpoData () } else { if (curve == 0) { - c9x.curveMode = 0; - c9x.curveParam = expo; + c9x.curve = CurveReference(CurveReference::CURVE_REF_EXPO, expo); } else { - c9x.curveMode = 1; - if (curve <= 10) - c9x.curveParam = curve; - else - c9x.curveParam = curve + 4; + // TODO } } c9x.swtch = open9xStockToSwitch(swtch); @@ -205,40 +114,18 @@ t_Open9xExpoData_v201::operator ExpoData () return c9x; } -t_Open9xExpoData_v211::t_Open9xExpoData_v211(ExpoData &c9x) -{ - mode = c9x.mode; - chn = c9x.chn; - // 0=no curve, 1-6=std curves, 7-10=CV1-CV4, 11-15=CV9-CV13 - - swtch = open9xStockFromSwitch(c9x.swtch); - phases = c9x.phases; - weight = c9x.weight; - curveMode = c9x.curveMode; - curveParam = c9x.curveParam; -} - t_Open9xExpoData_v211::operator ExpoData () { ExpoData c9x; c9x.mode = mode; c9x.chn = chn; - c9x.curveMode = curveMode; - c9x.curveParam = curveParam; + // TODO c9x.curve c9x.swtch = open9xStockToSwitch(swtch); c9x.phases = phases; c9x.weight = weight; return c9x; } -t_Open9xLimitData_v201::t_Open9xLimitData_v201(LimitData &c9x) -{ - min = c9x.min+100; - max = c9x.max-100; - revert = c9x.revert; - offset = c9x.offset; -} - t_Open9xLimitData_v201::operator LimitData () { LimitData c9x; @@ -249,16 +136,6 @@ t_Open9xLimitData_v201::operator LimitData () return c9x; } -t_Open9xLimitData_v211::t_Open9xLimitData_v211(LimitData &c9x) -{ - min = c9x.min+100; - max = c9x.max-100; - revert = c9x.revert; - offset = c9x.offset; - ppmCenter = c9x.ppmCenter; - symetrical = c9x.symetrical; -} - t_Open9xLimitData_v211::operator LimitData () { LimitData c9x; @@ -271,90 +148,6 @@ t_Open9xLimitData_v211::operator LimitData () return c9x; } -t_Open9xMixData_v201::t_Open9xMixData_v201(MixData &c9x) -{ - destCh = c9x.destCh; - mixWarn = c9x.mixWarn; - swtch = open9xStockFromSwitch(c9x.swtch); - - if (c9x.srcRaw.type == SOURCE_TYPE_NONE) { - srcRaw = 0; - swtch = 0; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_STICK) { - srcRaw = 1 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_ROTARY_ENCODER) { - EEPROMWarnings += ::QObject::tr("open9x on this board doesn't have Rotary Encoders") + "\n"; - srcRaw = 5 + c9x.srcRaw.index; // use pots instead - } - else if (c9x.srcRaw.type == SOURCE_TYPE_MAX) { - srcRaw = 8; // MAX - } - else if (c9x.srcRaw.type == SOURCE_TYPE_SWITCH) { - srcRaw = 9; // FULL - swtch = open9xStockFromSwitch(RawSwitch(c9x.srcRaw.index)); - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CYC) { - srcRaw = 10 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_PPM) { - srcRaw = 13 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CH) { - srcRaw = 21 + c9x.srcRaw.index; - } - - weight = c9x.weight; - curve = c9x.curve; - delayUp = c9x.delayUp; - delayDown = c9x.delayDown; - speedUp = c9x.speedUp; - speedDown = c9x.speedDown; - carryTrim = c9x.carryTrim; - mltpx = (MltpxValue)c9x.mltpx; - int zeros=0; - int ones=0; - int phtemp=c9x.phases; - for (int i=0; i>=1; - } - if (zeros==O9X_MAX_PHASES || zeros==0) { - phase=0; - } else if (zeros==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=ph+1; - } else if (ones==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=-(ph+1); - } else { - phase=0; - EEPROMWarnings += ::QObject::tr("Flight modes settings on mixers not exported") + "\n"; - } - sOffset = c9x.sOffset; -} - t_Open9xMixData_v201::operator MixData () { MixData c9x; @@ -395,7 +188,7 @@ t_Open9xMixData_v201::operator MixData () c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-21); } - c9x.curve = curve; + // TODO c9x.curve = curve; c9x.delayUp = delayUp; c9x.delayDown = delayDown; c9x.speedUp = speedUp; @@ -403,7 +196,7 @@ t_Open9xMixData_v201::operator MixData () c9x.carryTrim = carryTrim; c9x.mltpx = (MltpxValue)mltpx; c9x.mixWarn = mixWarn; -// c9x.phase = phase; + if (phase<0) { c9x.phases= 1 << (-phase -1); } else if (phase==0) { @@ -416,90 +209,6 @@ t_Open9xMixData_v201::operator MixData () return c9x; } -t_Open9xMixData_v203::t_Open9xMixData_v203(MixData &c9x) -{ - destCh = c9x.destCh; - mixWarn = c9x.mixWarn; - swtch = open9xStockFromSwitch(c9x.swtch); - - if (c9x.srcRaw.type == SOURCE_TYPE_NONE) { - srcRaw = 0; - swtch = 0; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_STICK) { - srcRaw = 1 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_ROTARY_ENCODER) { - EEPROMWarnings += ::QObject::tr("open9x on this board doesn't have Rotary Encoders") + "\n"; - srcRaw = 5 + c9x.srcRaw.index; // use pots instead - } - else if (c9x.srcRaw.type == SOURCE_TYPE_MAX) { - srcRaw = 8; // MAX - } - else if (c9x.srcRaw.type == SOURCE_TYPE_SWITCH) { - srcRaw = 9; // FULL - swtch = open9xStockFromSwitch(RawSwitch(c9x.srcRaw.index)); - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CYC) { - srcRaw = 10 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_PPM) { - srcRaw = 13 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CH) { - srcRaw = 21 + c9x.srcRaw.index; - } - - weight = c9x.weight; - curve = c9x.curve; - delayUp = c9x.delayUp; - delayDown = c9x.delayDown; - speedUp = c9x.speedUp; - speedDown = c9x.speedDown; - carryTrim = c9x.carryTrim; - mltpx = (MltpxValue)c9x.mltpx; - int zeros=0; - int ones=0; - int phtemp=c9x.phases; - for (int i=0; i>=1; - } - if (zeros==O9X_MAX_PHASES || zeros==0) { - phase=0; - } else if (zeros==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=ph+1; - } else if (ones==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=-(ph+1); - } else { - phase=0; - EEPROMWarnings += ::QObject::tr("Flight modes settings on mixers not exported") + "\n"; - } - sOffset = c9x.sOffset; -} - t_Open9xMixData_v203::operator MixData () { MixData c9x; @@ -540,7 +249,7 @@ t_Open9xMixData_v203::operator MixData () c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-21); } - c9x.curve = curve; + // TODO c9x.curve = curve; c9x.delayUp = delayUp; c9x.delayDown = delayDown; c9x.speedUp = speedUp; @@ -548,7 +257,7 @@ t_Open9xMixData_v203::operator MixData () c9x.carryTrim = carryTrim; c9x.mltpx = (MltpxValue)mltpx; c9x.mixWarn = mixWarn; - // c9x.phase = phase; + if (phase<0) { c9x.phases= 1 << (-phase -1); } else if (phase==0) { @@ -561,98 +270,6 @@ t_Open9xMixData_v203::operator MixData () return c9x; } -t_Open9xMixData_v205::t_Open9xMixData_v205(MixData &c9x) -{ - if (c9x.destCh) { - destCh = c9x.destCh-1; - mixWarn = c9x.mixWarn; - swtch = open9xStockFromSwitch(c9x.swtch); - - if (c9x.srcRaw.type == SOURCE_TYPE_NONE) { - srcRaw = 0; - swtch = 0; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_STICK) { - srcRaw = 1 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_ROTARY_ENCODER) { - EEPROMWarnings += ::QObject::tr("Open9x on this board doesn't have Rotary Encoders") + "\n"; - srcRaw = 5 + c9x.srcRaw.index; // use pots instead - } - else if (c9x.srcRaw.type == SOURCE_TYPE_MAX) { - srcRaw = 8; // MAX - } - /* else if (c9x.srcRaw.type == SOURCE_TYPE_3POS) { - srcRaw = 9; - } */ - else if (c9x.srcRaw.type == SOURCE_TYPE_SWITCH) { - srcRaw = 9 + open9xStockFromSwitch(RawSwitch(c9x.srcRaw.index)); - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CYC) { - srcRaw = 31 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_PPM) { - srcRaw = 34 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CH) { - srcRaw = 42 + c9x.srcRaw.index; - } - - weight = c9x.weight; - differential = c9x.differential/2; - curve = c9x.curve; - delayUp = c9x.delayUp; - delayDown = c9x.delayDown; - speedUp = c9x.speedUp; - speedDown = c9x.speedDown; - carryTrim = c9x.carryTrim; - mltpx = (MltpxValue)c9x.mltpx; - int zeros=0; - int ones=0; - int phtemp=c9x.phases; - for (int i=0; i>=1; - } - if (zeros==O9X_MAX_PHASES || zeros==0) { - phase=0; - } else if (zeros==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=ph+1; - } else if (ones==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=-(ph+1); - } else { - phase=0; - EEPROMWarnings += ::QObject::tr("Flight modes settings on mixers not exported") + "\n"; - } - sOffset = c9x.sOffset; - } - else { - memset(this, 0, sizeof(t_Open9xMixData_v205)); - } -} - t_Open9xMixData_v205::operator MixData () { MixData c9x; @@ -686,8 +303,14 @@ t_Open9xMixData_v205::operator MixData () c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-42); } c9x.weight = weight; - c9x.differential = differential*2; - c9x.curve = curve; + + if (differential) { + c9x.curve = CurveReference(CurveReference::CURVE_REF_DIFF, differential*2); + } + else { + // TODO c9x.curve = curve; + } + c9x.delayUp = delayUp; c9x.delayDown = delayDown; c9x.speedUp = speedUp; @@ -695,12 +318,14 @@ t_Open9xMixData_v205::operator MixData () c9x.carryTrim = carryTrim; c9x.mltpx = (MltpxValue)mltpx; c9x.mixWarn = mixWarn; - // c9x.phase = phase; + if (phase<0) { c9x.phases= 1 << (-phase -1); - } else if (phase==0) { + } + else if (phase==0) { c9x.phases=0; - } else { + } + else { c9x.phases=63; c9x.phases &= ~(1 << (phase -1)); } @@ -709,101 +334,6 @@ t_Open9xMixData_v205::operator MixData () return c9x; } -t_Open9xMixData_v209::t_Open9xMixData_v209(MixData &c9x) -{ - if (c9x.destCh) { - destCh = c9x.destCh-1; - mixWarn = c9x.mixWarn; - swtch = open9xStockFromSwitch(c9x.swtch); - - if (c9x.srcRaw.type == SOURCE_TYPE_NONE) { - srcRaw = 0; - swtch = 0; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_STICK) { - srcRaw = 1 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_ROTARY_ENCODER) { - EEPROMWarnings += ::QObject::tr("Open9x on this board doesn't have Rotary Encoders") + "\n"; - srcRaw = 5 + c9x.srcRaw.index; // use pots instead - } - else if (c9x.srcRaw.type == SOURCE_TYPE_TRIM) { - srcRaw = 8 + c9x.srcRaw.index; // use pots instead - } - else if (c9x.srcRaw.type == SOURCE_TYPE_MAX) { - srcRaw = 12; // MAX - } - /* else if (c9x.srcRaw.type == SOURCE_TYPE_3POS) { - srcRaw = 13; - } */ - else if (c9x.srcRaw.type == SOURCE_TYPE_SWITCH) { - srcRaw = 13 + open9xStockFromSwitch(RawSwitch(c9x.srcRaw.index)); - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CYC) { - srcRaw = 35 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_PPM) { - srcRaw = 38 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CH) { - srcRaw = 46 + c9x.srcRaw.index; - } - - weight = c9x.weight; - differential = c9x.differential/2; - curve = c9x.curve; - delayUp = c9x.delayUp; - delayDown = c9x.delayDown; - speedUp = c9x.speedUp; - speedDown = c9x.speedDown; - carryTrim = c9x.carryTrim; - mltpx = (MltpxValue)c9x.mltpx; - int zeros=0; - int ones=0; - int phtemp=c9x.phases; - for (int i=0; i>=1; - } - if (zeros==O9X_MAX_PHASES || zeros==0) { - phase=0; - } else if (zeros==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=ph+1; - } else if (ones==1) { - int phtemp=c9x.phases; - int ph=0; - for (int i=0; i>=1; - } - phase=-(ph+1); - } else { - phase=0; - EEPROMWarnings += ::QObject::tr("Flight modes settings on mixers not exported") + "\n"; - } - sOffset = c9x.sOffset; - } - else { - memset(this, 0, sizeof(t_Open9xMixData_v209)); - } -} - t_Open9xMixData_v209::operator MixData () { MixData c9x; @@ -840,8 +370,14 @@ t_Open9xMixData_v209::operator MixData () c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-46); } c9x.weight = weight; - c9x.differential = differential*2; - c9x.curve = curve; + + if (differential) { + c9x.curve = CurveReference(CurveReference::CURVE_REF_DIFF, differential*2); + } + else { + // TODO c9x.curve = curve; + } + c9x.delayUp = delayUp; c9x.delayDown = delayDown; c9x.speedUp = speedUp; @@ -849,12 +385,14 @@ t_Open9xMixData_v209::operator MixData () c9x.carryTrim = carryTrim; c9x.mltpx = (MltpxValue)mltpx; c9x.mixWarn = mixWarn; - // c9x.phase = phase; + if (phase<0) { c9x.phases= 1 << (-phase -1); - } else if (phase==0) { + } + else if (phase==0) { c9x.phases=0; - } else { + } + else { c9x.phases=63; c9x.phases &= ~(1 << (phase -1)); } @@ -863,70 +401,6 @@ t_Open9xMixData_v209::operator MixData () return c9x; } -t_Open9xMixData_v211::t_Open9xMixData_v211(MixData &c9x) -{ - if (c9x.destCh) { - destCh = c9x.destCh-1; - mixWarn = c9x.mixWarn; - swtch = open9xStockFromSwitch(c9x.swtch); - - if (c9x.srcRaw.type == SOURCE_TYPE_NONE) { - srcRaw = 0; - swtch = 0; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_STICK) { - srcRaw = 1 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_ROTARY_ENCODER) { - EEPROMWarnings += ::QObject::tr("Open9x on this board doesn't have Rotary Encoders") + "\n"; - srcRaw = 5 + c9x.srcRaw.index; // use pots instead - } - else if (c9x.srcRaw.type == SOURCE_TYPE_TRIM) { - srcRaw = 8 + c9x.srcRaw.index; // use pots instead - } - else if (c9x.srcRaw.type == SOURCE_TYPE_MAX) { - srcRaw = 12; // MAX - } - /* else if (c9x.srcRaw.type == SOURCE_TYPE_3POS) { - srcRaw = 13; - } */ - else if (c9x.srcRaw.type == SOURCE_TYPE_SWITCH) { - srcRaw = 13 + open9xStockFromSwitch(RawSwitch(c9x.srcRaw.index)); - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CYC) { - srcRaw = 35 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_PPM) { - srcRaw = 38 + c9x.srcRaw.index; - } - else if (c9x.srcRaw.type == SOURCE_TYPE_CH) { - srcRaw = 46 + c9x.srcRaw.index; - } - - weight = c9x.weight; - if (c9x.curve==0) { - curveMode = 0; - curveParam = c9x.differential; - } - else { - curveMode = 1; - curveParam = c9x.curve; - } - delayUp = c9x.delayUp; - delayDown = c9x.delayDown; - speedUp = c9x.speedUp; - speedDown = c9x.speedDown; - carryTrim = c9x.carryTrim; - noExpo = c9x.noExpo; - mltpx = (MltpxValue)c9x.mltpx; - phases = c9x.phases; - sOffset = c9x.sOffset; - } - else { - memset(this, 0, sizeof(t_Open9xMixData_v211)); - } -} - t_Open9xMixData_v211::operator MixData () { MixData c9x; @@ -963,12 +437,14 @@ t_Open9xMixData_v211::operator MixData () c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-46); } c9x.weight = weight; + if (curveMode==0) { - c9x.differential = curveParam; - c9x.curve=0; - } else { - c9x.curve=curveParam; + c9x.curve = CurveReference(CurveReference::CURVE_REF_DIFF, curveParam); + } + else { + // TODO c9x.curve = curve; } + c9x.delayUp = delayUp; c9x.delayDown = delayDown; c9x.speedUp = speedUp; @@ -983,30 +459,6 @@ t_Open9xMixData_v211::operator MixData () return c9x; } -int8_t open9x208FromSource(RawSource source) -{ - int v1 = 0; - if (source.type == SOURCE_TYPE_STICK) - v1 = 1+source.index; - else if (source.type == SOURCE_TYPE_ROTARY_ENCODER) { - EEPROMWarnings += ::QObject::tr("Open9x on this board doesn't have Rotary Encoders") + "\n"; - v1 = 5+source.index; - } - else if (source.type == SOURCE_TYPE_MAX) - v1 = 8; - /* else if (source.type == SOURCE_TYPE_3POS) - v1 = 9; */ - else if (source.type == SOURCE_TYPE_CYC) - v1 = 10+source.index; - else if (source.type == SOURCE_TYPE_PPM) - v1 = 13+source.index; - else if (source.type == SOURCE_TYPE_CH) - v1 = 21+source.index; - else if (source.type == SOURCE_TYPE_TELEMETRY) - v1 = 36+source.index; - return v1; -} - RawSource open9x208ToSource(int8_t value) { if (value == 0) { @@ -1035,32 +487,6 @@ RawSource open9x208ToSource(int8_t value) } } -int8_t open9xStock209FromSource(RawSource source) -{ - int v1 = 0; - if (source.type == SOURCE_TYPE_STICK) - v1 = 1+source.index; - else if (source.type == SOURCE_TYPE_ROTARY_ENCODER) { - EEPROMWarnings += ::QObject::tr("Open9x on this board doesn't have Rotary Encoders") + "\n"; - v1 = 5+source.index; - } - else if (source.type == SOURCE_TYPE_TRIM) - v1 = 8+source.index; - else if (source.type == SOURCE_TYPE_MAX) - v1 = 12; - /* else if (source.type == SOURCE_TYPE_3POS) - v1 = 13; */ - else if (source.type == SOURCE_TYPE_CYC) - v1 = 14+source.index; - else if (source.type == SOURCE_TYPE_PPM) - v1 = 17+source.index; - else if (source.type == SOURCE_TYPE_CH) - v1 = 25+source.index; - else if (source.type == SOURCE_TYPE_TELEMETRY) - v1 = 40+source.index; - return v1; -} - RawSource open9xStock209ToSource(int8_t value) { if (value == 0) { @@ -1092,33 +518,6 @@ RawSource open9xStock209ToSource(int8_t value) } } -t_Open9xCustomSwData_v208::t_Open9xCustomSwData_v208(CustomSwData &c9x) -{ - func = c9x.func; - v1 = c9x.val1; - v2 = c9x.val2; - - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { - v1 = open9x208FromSource(RawSource(c9x.val1)); - } - - if (c9x.func >= CS_FN_EQUAL) { - v2 = open9x208FromSource(RawSource(c9x.val2)); - } - - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { - v1 = open9xStockFromSwitch(RawSwitch(c9x.val1)); - v2 = open9xStockFromSwitch(RawSwitch(c9x.val2)); - } - - if (func>O9X_MAX_CSFUNCOLD ) { - EEPROMWarnings += ::QObject::tr("This version of open9x does not support Custom Switch function %1").arg(getFuncName(func)) + "\n"; - func=0; - v1=0; - v2=0; - } -} - Open9xCustomSwData_v208::operator CustomSwData () { CustomSwData c9x; @@ -1142,26 +541,6 @@ Open9xCustomSwData_v208::operator CustomSwData () return c9x; } -t_Open9xCustomSwData_v209::t_Open9xCustomSwData_v209(CustomSwData &c9x) -{ - func = c9x.func; - v1 = c9x.val1; - v2 = c9x.val2; - - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { - v1 = open9xStock209FromSource(RawSource(c9x.val1)); - } - - if (c9x.func >= CS_FN_EQUAL && c9x.func <= CS_FN_ELESS) { - v2 = open9xStock209FromSource(RawSource(c9x.val2)); - } - - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { - v1 = open9xStockFromSwitch(RawSwitch(c9x.val1)); - v2 = open9xStockFromSwitch(RawSwitch(c9x.val2)); - } -} - Open9xCustomSwData_v209::operator CustomSwData () { CustomSwData c9x; @@ -1185,12 +564,6 @@ Open9xCustomSwData_v209::operator CustomSwData () return c9x; } -t_Open9xFuncSwData_v201::t_Open9xFuncSwData_v201(FuncSwData &c9x) -{ - swtch = open9xStockFromSwitch(c9x.swtch); - func = c9x.func - O9X_NUM_CHNOUT; -} - t_Open9xFuncSwData_v201::operator FuncSwData () { FuncSwData c9x; @@ -1220,42 +593,11 @@ enum Functions { #endif FUNC_BACKLIGHT, #if defined(DEBUG) - FUNC_TEST, // should remain the last before MAX as not added in companion9x + FUNC_TEST, // should remain the last before MAX as not added in companion #endif FUNC_MAX }; -t_Open9xFuncSwData_v203::t_Open9xFuncSwData_v203(FuncSwData &c9x) -{ - swtch = open9xStockFromSwitch(c9x.swtch); - if (c9x.func <= FuncSafetyCh16) { - param = ((c9x.param>>1)<<1); - param |=(c9x.enabled & 0x01); - func = c9x.func; - } else { - param = c9x.param;; - if (c9x.func <= FuncTrainerAIL) - func = 16 + c9x.func - FuncTrainer; - else if (c9x.func == FuncInstantTrim) - func = 21; - else if (c9x.func == FuncPlaySound) - func = 22; - else if (c9x.func == FuncPlayHaptic) - func = 23; - else if (c9x.func == FuncReset) - func = 24; - else if (c9x.func == FuncVario) - func = 25; - else if (c9x.func == FuncBacklight) - func = 26; - else { - swtch = 0; - func = 0; - param = 0; - } - } -} - t_Open9xFuncSwData_v203::operator FuncSwData () { FuncSwData c9x; @@ -1286,38 +628,6 @@ t_Open9xFuncSwData_v203::operator FuncSwData () return c9x; } -t_Open9xFuncSwData_v210::t_Open9xFuncSwData_v210(FuncSwData &c9x) -{ - swtch = open9xStockFromSwitch(c9x.swtch); - param = c9x.param; - if (c9x.func <= FuncInstantTrim) { - delay = c9x.enabled; - func = (uint8_t)c9x.func; - } - else if (c9x.func == FuncPlaySound) - func = 22; - else if (c9x.func == FuncPlayHaptic) - func = 23; - else if (c9x.func == FuncReset) - func = 24; - else if (c9x.func == FuncVario) - func = 25; - else if (c9x.func == FuncPlayPrompt) - func = 26; - else if (c9x.func == FuncPlayValue) { - func = 27; - if (c9x.param > 7) { - param -= 2; - } - } else if (c9x.func == FuncBacklight) - func = 28; - else { - swtch = 0; - func = 0; - param = 0; - } -} - t_Open9xFuncSwData_v210::operator FuncSwData () { FuncSwData c9x; @@ -1352,12 +662,6 @@ t_Open9xFuncSwData_v210::operator FuncSwData () return c9x; } -t_Open9xSafetySwData::t_Open9xSafetySwData(SafetySwData &c9x) -{ - swtch = open9xStockFromSwitch(c9x.swtch); - val = c9x.val; -} - t_Open9xSafetySwData::operator SafetySwData () { SafetySwData c9x; @@ -1366,16 +670,6 @@ t_Open9xSafetySwData::operator SafetySwData () return c9x; } -t_Open9xSwashRingData_v208::t_Open9xSwashRingData_v208(SwashRingData &c9x) -{ - invertELE = c9x.invertELE; - invertAIL = c9x.invertAIL; - invertCOL = c9x.invertCOL; - type = c9x.type; - collectiveSource = open9x208FromSource(c9x.collectiveSource); - value = c9x.value; -} - t_Open9xSwashRingData_v208::operator SwashRingData () { SwashRingData c9x; @@ -1388,16 +682,6 @@ t_Open9xSwashRingData_v208::operator SwashRingData () return c9x; } -t_Open9xSwashRingData_v209::t_Open9xSwashRingData_v209(SwashRingData &c9x) -{ - invertELE = c9x.invertELE; - invertAIL = c9x.invertAIL; - invertCOL = c9x.invertCOL; - type = c9x.type; - collectiveSource = open9xStock209FromSource(c9x.collectiveSource); - value = c9x.value; -} - t_Open9xSwashRingData_v209::operator SwashRingData () { SwashRingData c9x; @@ -1422,19 +706,6 @@ t_Open9xPhaseData_v201::operator PhaseData () return c9x; } -t_Open9xPhaseData_v201::t_Open9xPhaseData_v201(PhaseData &c9x) -{ - trim_ext = 0; - for (int i=0; i> 2); - trim_ext = (trim_ext & ~(0x03 << (2*i))) + (((c9x.trim[i] & 0x03) << (2*i))); - } - swtch = open9xStockFromSwitch(c9x.swtch); - setEEPROMZString(name, c9x.name, sizeof(name)); - fadeIn = c9x.fadeIn; - fadeOut = c9x.fadeOut; -} - t_Open9xTimerData_v201::operator TimerData () { TimerData c9x; @@ -1466,24 +737,6 @@ t_Open9xTimerData_v202::operator TimerData () return c9x; } -t_Open9xTimerData_v202::t_Open9xTimerData_v202(TimerData &c9x) -{ - val = c9x.val; - - if (c9x.mode >= TMRMODE_OFF && c9x.mode <= TMRMODE_THt) - mode = 0+c9x.mode-TMRMODE_OFF; - else if (c9x.mode >= TMRMODE_FIRST_MOMENT_SWITCH) - mode = 26+c9x.mode-TMRMODE_FIRST_MOMENT_SWITCH; - else if (c9x.mode >= TMRMODE_FIRST_SWITCH) - mode = 5+c9x.mode-TMRMODE_FIRST_SWITCH; - else if (c9x.mode <= TMRMODE_FIRST_NEG_MOMENT_SWITCH) - mode = -22+c9x.mode-TMRMODE_FIRST_NEG_MOMENT_SWITCH; - else if (c9x.mode <= TMRMODE_FIRST_NEG_SWITCH) - mode = -1+c9x.mode-TMRMODE_FIRST_NEG_SWITCH; - else - mode = 0; -} - FrSkyRSSIAlarm t_Open9xFrSkyRSSIAlarm::get(int index) { FrSkyRSSIAlarm c9x; @@ -1492,25 +745,6 @@ FrSkyRSSIAlarm t_Open9xFrSkyRSSIAlarm::get(int index) return c9x; } -t_Open9xFrSkyRSSIAlarm::t_Open9xFrSkyRSSIAlarm(int index, FrSkyRSSIAlarm &c9x) -{ - memset(this, 0, sizeof(t_Open9xFrSkyRSSIAlarm)); - level = (2+c9x.level-index) % 4; - value = c9x.value - 50; -} - -t_Open9xFrSkyChannelData_v201::t_Open9xFrSkyChannelData_v201(FrSkyChannelData &c9x) -{ - memset(this, 0, sizeof(t_Open9xFrSkyChannelData_v201)); - ratio = c9x.ratio; - alarms_value[0] = c9x.alarms[0].value; - alarms_value[1] = c9x.alarms[1].value; - alarms_level = (c9x.alarms[1].level << 2) + c9x.alarms[0].level; - alarms_greater = (c9x.alarms[1].greater << 1) + c9x.alarms[0].greater; - type = c9x.type; - offset = LIMIT(-8, c9x.offset, +7); -} - t_Open9xFrSkyChannelData_v201::operator FrSkyChannelData () { FrSkyChannelData c9x; @@ -1526,18 +760,6 @@ t_Open9xFrSkyChannelData_v201::operator FrSkyChannelData () return c9x; } -t_Open9xFrSkyChannelData_v203::t_Open9xFrSkyChannelData_v203(FrSkyChannelData &c9x) -{ - memset(this, 0, sizeof(t_Open9xFrSkyChannelData_v203)); - ratio = c9x.ratio; - alarms_value[0] = c9x.alarms[0].value; - alarms_value[1] = c9x.alarms[1].value; - alarms_level = (c9x.alarms[1].level << 2) + c9x.alarms[0].level; - alarms_greater = (c9x.alarms[1].greater << 1) + c9x.alarms[0].greater; - type = c9x.type; - offset = c9x.offset; -} - t_Open9xFrSkyChannelData_v203::operator FrSkyChannelData () { FrSkyChannelData c9x; @@ -1553,20 +775,6 @@ t_Open9xFrSkyChannelData_v203::operator FrSkyChannelData () return c9x; } -t_Open9xFrSkyChannelData_v204::t_Open9xFrSkyChannelData_v204(FrSkyChannelData &c9x) -{ - memset(this, 0, sizeof(t_Open9xFrSkyChannelData_v204)); - ratio = c9x.ratio; - type = c9x.type; - multiplier = c9x.multiplier; - alarms_value[0] = c9x.alarms[0].value; - alarms_value[1] = c9x.alarms[1].value; - alarms_level = (c9x.alarms[1].level << 2) + c9x.alarms[0].level; - alarms_greater = (c9x.alarms[1].greater << 1) + c9x.alarms[0].greater; - // TODO multiplier = c9x.multiplier; - offset = c9x.offset; -} - t_Open9xFrSkyChannelData_v204::operator FrSkyChannelData () { FrSkyChannelData c9x; @@ -1584,20 +792,6 @@ t_Open9xFrSkyChannelData_v204::operator FrSkyChannelData () return c9x; } -t_Open9xFrSkyChannelData_v208::t_Open9xFrSkyChannelData_v208(FrSkyChannelData &c9x) -{ - memset(this, 0, sizeof(t_Open9xFrSkyChannelData_v208)); - ratio = c9x.ratio; - type = c9x.type; - multiplier = c9x.multiplier; - alarms_value[0] = c9x.alarms[0].value; - alarms_value[1] = c9x.alarms[1].value; - alarms_level = (c9x.alarms[1].level << 2) + c9x.alarms[0].level; - alarms_greater = (c9x.alarms[1].greater << 1) + c9x.alarms[0].greater; - // TODO multiplier = c9x.multiplier; - offset = c9x.offset; -} - t_Open9xFrSkyChannelData_v208::operator FrSkyChannelData () { FrSkyChannelData c9x; @@ -1632,14 +826,6 @@ t_Open9xFrSkyData_v202::operator FrSkyData () return c9x; } -t_Open9xFrSkyData_v202::t_Open9xFrSkyData_v202(FrSkyData &c9x) -{ - memset(this, 0, sizeof(t_Open9xFrSkyData_v202)); - channels[0] = c9x.channels[0]; - channels[1] = c9x.channels[1]; - usrProto = c9x.usrProto; -} - t_Open9xFrSkyData_v203::operator FrSkyData () { FrSkyData c9x; @@ -1649,14 +835,6 @@ t_Open9xFrSkyData_v203::operator FrSkyData () return c9x; } -t_Open9xFrSkyData_v203::t_Open9xFrSkyData_v203(FrSkyData &c9x) -{ - memset(this, 0, sizeof(t_Open9xFrSkyData_v203)); - channels[0] = c9x.channels[0]; - channels[1] = c9x.channels[1]; - usrProto = c9x.usrProto; -} - t_Open9xFrSkyBarData_v204::operator FrSkyBarData () { FrSkyBarData c9x; @@ -1666,14 +844,6 @@ t_Open9xFrSkyBarData_v204::operator FrSkyBarData () return c9x; } -t_Open9xFrSkyBarData_v204::t_Open9xFrSkyBarData_v204(FrSkyBarData &c9x) -{ - memset(this, 0, sizeof(t_Open9xFrSkyBarData_v204)); - source = c9x.source; - barMin = c9x.barMin; - barMax = c9x.barMax; -} - t_Open9xFrSkyData_v204::operator FrSkyData () { FrSkyData c9x; @@ -1688,18 +858,6 @@ t_Open9xFrSkyData_v204::operator FrSkyData () return c9x; } -t_Open9xFrSkyData_v204::t_Open9xFrSkyData_v204(FrSkyData &c9x) -{ - memset(this, 0, sizeof(t_Open9xFrSkyData_v204)); - channels[0] = c9x.channels[0]; - channels[1] = c9x.channels[1]; - usrProto = c9x.usrProto; - imperial = c9x.imperial; - blades = c9x.blades; - for (int i=0; i<4; i++) - bars[i] = c9x.screens[0].body.bars[i]; -} - t_Open9xFrSkyData_v205::operator FrSkyData () { FrSkyData c9x; @@ -1716,21 +874,6 @@ t_Open9xFrSkyData_v205::operator FrSkyData () return c9x; } -t_Open9xFrSkyData_v205::t_Open9xFrSkyData_v205(FrSkyData &c9x) -{ - memset(this, 0, sizeof(t_Open9xFrSkyData_v205)); - channels[0] = c9x.channels[0]; - channels[1] = c9x.channels[1]; - usrProto = c9x.usrProto; - imperial = c9x.imperial; - blades = c9x.blades; - for (int i=0; i<4; i++) - bars[i] = c9x.screens[0].body.bars[i]; - rssiAlarms[0] = Open9xFrSkyRSSIAlarm(0, c9x.rssiAlarms[0]); - rssiAlarms[1] = Open9xFrSkyRSSIAlarm(1, c9x.rssiAlarms[1]); -} - - t_Open9xFrSkyData_v208::operator FrSkyData () { FrSkyData c9x; @@ -1748,21 +891,6 @@ t_Open9xFrSkyData_v208::operator FrSkyData () return c9x; } -t_Open9xFrSkyData_v208::t_Open9xFrSkyData_v208(FrSkyData &c9x) -{ - memset(this, 0, sizeof(t_Open9xFrSkyData_v208)); - channels[0] = c9x.channels[0]; - channels[1] = c9x.channels[1]; - usrProto = c9x.usrProto; - voltsSource = c9x.voltsSource; - blades = c9x.blades; - currentSource=c9x.currentSource; - for (int i=0; i<4; i++) - bars[i] = c9x.screens[0].body.bars[i]; - rssiAlarms[0] = Open9xFrSkyRSSIAlarm(0, c9x.rssiAlarms[0]); - rssiAlarms[1] = Open9xFrSkyRSSIAlarm(1, c9x.rssiAlarms[1]); -} - t_Open9xFrSkyData_v210::operator FrSkyData () { FrSkyData c9x; @@ -1798,40 +926,6 @@ t_Open9xFrSkyData_v210::operator FrSkyData () return c9x; } -t_Open9xFrSkyData_v210::t_Open9xFrSkyData_v210(FrSkyData &c9x) -{ - memset(this, 0, sizeof(t_Open9xFrSkyData_v210)); - channels[0] = c9x.channels[0]; - channels[1] = c9x.channels[1]; - usrProto = c9x.usrProto; - voltsSource = c9x.voltsSource; - blades = c9x.blades; - currentSource=c9x.currentSource; - - for (int scr=0; scr<2; scr++) { - if (c9x.screens[scr].type == 1) { - for (int i=0; i<4; i++) - bars[i] = c9x.screens[scr].body.bars[i]; - } - else { - linesXtra=0; - for (int j=0; j<4; j++) { - lines[j] = 0; - for (int k=0; k<2; k++) { - int value = c9x.screens[scr].body.lines[j].source[k]; - lines[j] |= (k==0 ? (value & 0x0f) : ((value & 0x0f) << 4)); - linesXtra |= (value / 16) << (4*j+2*k); - } - } - } - } - rssiAlarms[0] = Open9xFrSkyRSSIAlarm(0, c9x.rssiAlarms[0]); - rssiAlarms[1] = Open9xFrSkyRSSIAlarm(1, c9x.rssiAlarms[1]); - varioSource = c9x.varioSource; - varioSpeedUpMin = c9x.varioCenterMax; - varioSpeedDownMin = c9x.varioCenterMin; -} - t_Open9xModelData_v201::operator ModelData () { ModelData c9x; @@ -1856,7 +950,7 @@ t_Open9xModelData_v201::operator ModelData () c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.thrTrim = thrTrim; c9x.thrExpo = thrExpo; - c9x.trimInc = trimInc; + c9x.trimInc = trimInc - 2; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.beepANACenter = beepANACenter; c9x.moduleData[0].ppmPulsePol = pulsePol; @@ -1881,7 +975,6 @@ t_Open9xModelData_v201::operator ModelData () c9x.expoData[i] = expoData[i]; for (int i=0; i= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId=c9x.modelId; - } - else { - memset(this, 0, sizeof(t_Open9xModelData_v202)); - } -} - t_Open9xModelData_v203::operator ModelData () { ModelData c9x; @@ -2090,7 +1100,7 @@ t_Open9xModelData_v203::operator ModelData () } c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.thrTrim = thrTrim; - c9x.trimInc = trimInc; + c9x.trimInc = trimInc - 2; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.beepANACenter = beepANACenter; c9x.moduleData[0].ppmPulsePol = pulsePol; @@ -2115,7 +1125,6 @@ t_Open9xModelData_v203::operator ModelData () c9x.expoData[i] = expoData[i]; for (int i=0; i= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - } - else { - memset(this, 0, sizeof(t_Open9xModelData_v203)); - } -} - t_Open9xModelData_v204::operator ModelData () { ModelData c9x; @@ -2256,7 +1174,7 @@ t_Open9xModelData_v204::operator ModelData () } c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.thrTrim = thrTrim; - c9x.trimInc = trimInc; + c9x.trimInc = trimInc - 2; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.beepANACenter = beepANACenter; c9x.moduleData[0].ppmPulsePol = pulsePol; @@ -2281,7 +1199,6 @@ t_Open9xModelData_v204::operator ModelData () c9x.expoData[i] = expoData[i]; for (int i=0; i= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - frskyRssiAlarms[0] = Open9xFrSkyRSSIAlarm(0, c9x.frsky.rssiAlarms[0]); - frskyRssiAlarms[1] = Open9xFrSkyRSSIAlarm(1, c9x.frsky.rssiAlarms[1]); - } - else { - memset(this, 0, sizeof(t_Open9xModelData_v204)); - } -} - t_Open9xModelData_v205::operator ModelData () { ModelData c9x; @@ -2429,7 +1253,7 @@ t_Open9xModelData_v205::operator ModelData () } c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.thrTrim = thrTrim; - c9x.trimInc = trimInc; + c9x.trimInc = trimInc - 2; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.beepANACenter = beepANACenter; c9x.moduleData[0].ppmPulsePol = pulsePol; @@ -2454,7 +1278,6 @@ t_Open9xModelData_v205::operator ModelData () c9x.expoData[i] = expoData[i]; for (int i=0; i= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - frskyLinesXtra=0; - for (int j=0; j<4; j++) { - frskyLines[j] = 0; - for (int k=0; k<2; k++) { - int value = c9x.frsky.screens[1].body.lines[j].source[k]; - frskyLines[j] |= (k==0 ? (value & 0x0f) : ((value & 0x0f) << 4)); - frskyLinesXtra |= (value / 16) << (4*j+2*k); - } - } - } - else { - memset(this, 0, sizeof(t_Open9xModelData_v205)); - } -} - - t_Open9xModelData_v208::operator ModelData () { ModelData c9x; @@ -2620,7 +1339,7 @@ t_Open9xModelData_v208::operator ModelData () c9x.moduleData[0].channelsCount = 8 + (2 * ppmNCH); c9x.thrTrim = thrTrim; c9x.disableThrottleWarning=disableThrottleWarning; - c9x.trimInc = trimInc; + c9x.trimInc = trimInc - 2; c9x.moduleData[0].ppmDelay = 300 + 50 * ppmDelay; c9x.beepANACenter = beepANACenter; c9x.moduleData[0].ppmPulsePol = pulsePol; @@ -2645,7 +1364,6 @@ t_Open9xModelData_v208::operator ModelData () c9x.expoData[i] = expoData[i]; for (int i=0; i= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - varioSource = c9x.frsky.varioSource; - varioSpeedUpMin = c9x.frsky.varioCenterMax; - varioSpeedDownMin = c9x.frsky.varioCenterMin; - - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - frskyLinesXtra=0; - for (int j=0; j<4; j++) { - frskyLines[j] = 0; - for (int k=0; k<2; k++) { - int value = c9x.frsky.screens[1].body.lines[j].source[k]; - frskyLines[j] |= (k==0 ? (value & 0x0f) : ((value & 0x0f) << 4)); - frskyLinesXtra |= (value / 16) << (4*j+2*k); - } - } - - for (int i=0; i= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - varioSource = c9x.frsky.varioSource; - varioSpeedUpMin = c9x.frsky.varioCenterMax; - varioSpeedDownMin = c9x.frsky.varioCenterMin; - switchWarningStates = c9x.switchWarningStates; - - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - frskyLinesXtra=0; - for (int j=0; j<4; j++) { - frskyLines[j] = 0; - for (int k=0; k<2; k++) { - int value = c9x.frsky.screens[1].body.lines[j].source[k]; - frskyLines[j] |= (k==0 ? (value & 0x0f) : ((value & 0x0f) << 4)); - frskyLinesXtra |= (value / 16) << (4*j+2*k); - } - } - - for (int i=0; i O9X_NUM_POINTS - 5 * O9X_MAX_CURVES) { - EEPROMWarnings += ::QObject::tr("open9x only accepts %1 points in all curves").arg(O9X_NUM_POINTS) + "\n"; - break; - } - curves[i] = offset; - for (int j=0; j= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - - switchWarningStates = c9x.switchWarningStates; - - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - - for (int i=0; i O9X_NUM_POINTS - 5 * O9X_MAX_CURVES) { - EEPROMWarnings += ::QObject::tr("open9x only accepts %1 points in all curves").arg(O9X_NUM_POINTS) + "\n"; - break; - } - curves[i] = offset; - for (int j=0; j= 0) { - phase.trim[j] = 501 + phase.trimRef[j] - (phase.trimRef[j] >= i ? 1 : 0); - } - else { - phase.trim[j] = std::max(-500, std::min(500, phase.trim[j])); - } - } - phaseData[i] = phase; - } - frsky = c9x.frsky; - - switchWarningStates = c9x.switchWarningStates; - - ppmFrameLength = c9x.moduleData[0].ppmFrameLength; - thrTraceSrc = c9x.thrTraceSrc; - modelId = c9x.modelId; - } -} diff --git a/companion/src/firmwares/opentx/open9xStockeeprom.h b/companion/src/firmwares/opentx/open9xStockeeprom.h index 46178281f..59bee09a9 100644 --- a/companion/src/firmwares/opentx/open9xStockeeprom.h +++ b/companion/src/firmwares/opentx/open9xStockeeprom.h @@ -65,7 +65,6 @@ PACK(typedef struct t_Open9xFrSkyRSSIAlarm { int8_t value:6; FrSkyRSSIAlarm get(int index); t_Open9xFrSkyRSSIAlarm() { memset(this, 0, sizeof(t_Open9xFrSkyRSSIAlarm)); } - t_Open9xFrSkyRSSIAlarm(int index, FrSkyRSSIAlarm&); }) Open9xFrSkyRSSIAlarm; PACK(typedef struct t_Open9xExpoData_v201 { @@ -80,8 +79,6 @@ PACK(typedef struct t_Open9xExpoData_v201 { operator ExpoData(); t_Open9xExpoData_v201() { memset(this, 0, sizeof(t_Open9xExpoData_v201)); } - t_Open9xExpoData_v201(ExpoData&); - }) Open9xExpoData_v201; PACK(typedef struct t_Open9xExpoData_v211 { @@ -95,8 +92,6 @@ PACK(typedef struct t_Open9xExpoData_v211 { operator ExpoData(); t_Open9xExpoData_v211() { memset(this, 0, sizeof(t_Open9xExpoData_v211)); } - t_Open9xExpoData_v211(ExpoData&); - }) Open9xExpoData_v211; PACK(typedef struct t_Open9xLimitData_v201 { @@ -107,8 +102,6 @@ PACK(typedef struct t_Open9xLimitData_v201 { operator LimitData(); t_Open9xLimitData_v201() { memset(this, 0, sizeof(t_Open9xLimitData_v201)); } - t_Open9xLimitData_v201(LimitData&); - }) Open9xLimitData_v201; PACK(typedef struct t_Open9xLimitData_v211 { @@ -121,8 +114,6 @@ PACK(typedef struct t_Open9xLimitData_v211 { operator LimitData(); t_Open9xLimitData_v211() { memset(this, 0, sizeof(t_Open9xLimitData_v211)); } - t_Open9xLimitData_v211(LimitData&); - }) Open9xLimitData_v211; PACK(typedef struct t_Open9xMixData_v201 { @@ -143,8 +134,6 @@ PACK(typedef struct t_Open9xMixData_v201 { operator MixData(); t_Open9xMixData_v201() { memset(this, 0, sizeof(t_Open9xMixData_v201)); } - t_Open9xMixData_v201(MixData&); - }) Open9xMixData_v201; PACK(typedef struct t_Open9xMixData_v203 { @@ -165,8 +154,6 @@ PACK(typedef struct t_Open9xMixData_v203 { operator MixData(); t_Open9xMixData_v203() { memset(this, 0, sizeof(t_Open9xMixData_v203)); } - t_Open9xMixData_v203(MixData&); - }) Open9xMixData_v203; PACK(typedef struct t_Open9xMixData_v205 { @@ -188,8 +175,6 @@ PACK(typedef struct t_Open9xMixData_v205 { operator MixData(); t_Open9xMixData_v205() { memset(this, 0, sizeof(t_Open9xMixData_v205)); } - t_Open9xMixData_v205(MixData&); - }) Open9xMixData_v205; PACK(typedef struct t_Open9xMixData_v209 { @@ -211,8 +196,6 @@ PACK(typedef struct t_Open9xMixData_v209 { operator MixData(); t_Open9xMixData_v209() { memset(this, 0, sizeof(t_Open9xMixData_v209)); } - t_Open9xMixData_v209(MixData&); - }) Open9xMixData_v209; PACK(typedef struct t_Open9xMixData_v211 { @@ -236,8 +219,6 @@ PACK(typedef struct t_Open9xMixData_v211 { operator MixData(); t_Open9xMixData_v211() { memset(this, 0, sizeof(t_Open9xMixData_v211)); } - t_Open9xMixData_v211(MixData&); - }) Open9xMixData_v211; PACK(typedef struct t_Open9xCustomSwData_v208 { // Custom Switches data @@ -257,7 +238,6 @@ PACK(typedef struct t_Open9xCustomSwData_v209 { // Custom Switches data operator CustomSwData(); t_Open9xCustomSwData_v209() { memset(this, 0, sizeof(t_Open9xCustomSwData_v209)); } - t_Open9xCustomSwData_v209(CustomSwData&); }) Open9xCustomSwData_v209; PACK(typedef struct t_Open9xSafetySwData { // Safety Switches data @@ -266,8 +246,6 @@ PACK(typedef struct t_Open9xSafetySwData { // Safety Switches data operator SafetySwData(); t_Open9xSafetySwData() { memset(this, 0, sizeof(t_Open9xSafetySwData)); } - t_Open9xSafetySwData(SafetySwData&); - }) Open9xSafetySwData; PACK(typedef struct t_Open9xFuncSwData_v201 { // Function Switches data @@ -276,8 +254,6 @@ PACK(typedef struct t_Open9xFuncSwData_v201 { // Function Switches data operator FuncSwData(); t_Open9xFuncSwData_v201() { memset(this, 0, sizeof(t_Open9xFuncSwData_v201)); } - t_Open9xFuncSwData_v201(FuncSwData&); - }) Open9xFuncSwData_v201; PACK(typedef struct t_Open9xFuncSwData_v203 { // Function Switches data @@ -287,8 +263,6 @@ PACK(typedef struct t_Open9xFuncSwData_v203 { // Function Switches data operator FuncSwData(); t_Open9xFuncSwData_v203() { memset(this, 0, sizeof(t_Open9xFuncSwData_v203)); } - t_Open9xFuncSwData_v203(FuncSwData&); - }) Open9xFuncSwData_v203; PACK(typedef struct t_Open9xFuncSwData_v210 { // Function Switches data @@ -299,8 +273,6 @@ PACK(typedef struct t_Open9xFuncSwData_v210 { // Function Switches data operator FuncSwData(); t_Open9xFuncSwData_v210() { memset(this, 0, sizeof(t_Open9xFuncSwData_v210)); } - t_Open9xFuncSwData_v210(FuncSwData&); - }) Open9xFuncSwData_v210; PACK(typedef struct t_Open9xFrSkyChannelData_v201 { @@ -316,8 +288,6 @@ PACK(typedef struct t_Open9xFrSkyChannelData_v201 { operator FrSkyChannelData(); t_Open9xFrSkyChannelData_v201() { memset(this, 0, sizeof(t_Open9xFrSkyChannelData_v201)); } - t_Open9xFrSkyChannelData_v201(FrSkyChannelData&); - }) Open9xFrSkyChannelData_v201; PACK(typedef struct t_Open9xFrSkyChannelData_v203 { @@ -333,8 +303,6 @@ PACK(typedef struct t_Open9xFrSkyChannelData_v203 { operator FrSkyChannelData(); t_Open9xFrSkyChannelData_v203() { memset(this, 0, sizeof(t_Open9xFrSkyChannelData_v203)); } - t_Open9xFrSkyChannelData_v203(FrSkyChannelData&); - }) Open9xFrSkyChannelData_v203; PACK(typedef struct t_Open9xFrSkyChannelData_v204 { @@ -348,8 +316,6 @@ PACK(typedef struct t_Open9xFrSkyChannelData_v204 { operator FrSkyChannelData(); t_Open9xFrSkyChannelData_v204() { memset(this, 0, sizeof(t_Open9xFrSkyChannelData_v204)); } - t_Open9xFrSkyChannelData_v204(FrSkyChannelData&); - }) Open9xFrSkyChannelData_v204; PACK(typedef struct t_Open9xFrSkyChannelData_v208 { @@ -363,37 +329,30 @@ PACK(typedef struct t_Open9xFrSkyChannelData_v208 { operator FrSkyChannelData(); t_Open9xFrSkyChannelData_v208() { memset(this, 0, sizeof(t_Open9xFrSkyChannelData_v208)); } - t_Open9xFrSkyChannelData_v208(FrSkyChannelData&); - }) Open9xFrSkyChannelData_v208; PACK(typedef struct t_Open9xFrSkyData_v201 { - Open9xFrSkyChannelData_v201 channels[2]; - - operator FrSkyData(); - t_Open9xFrSkyData_v201() { memset(this, 0, sizeof(t_Open9xFrSkyData_v201)); } + Open9xFrSkyChannelData_v201 channels[2]; + operator FrSkyData(); + t_Open9xFrSkyData_v201() { memset(this, 0, sizeof(t_Open9xFrSkyData_v201)); } }) Open9xFrSkyData_v201; PACK(typedef struct t_Open9xFrSkyData_v202 { - Open9xFrSkyChannelData_v201 channels[2]; - uint8_t usrProto:2; // Protocol in FrSky user data, 0=None, 1=FrSky hub, 2=WS HowHigh - uint8_t spare:6; - - operator FrSkyData(); - t_Open9xFrSkyData_v202() { memset(this, 0, sizeof(t_Open9xFrSkyData_v202)); } - t_Open9xFrSkyData_v202(FrSkyData&); + Open9xFrSkyChannelData_v201 channels[2]; + uint8_t usrProto:2; // Protocol in FrSky user data, 0=None, 1=FrSky hub, 2=WS HowHigh + uint8_t spare:6; + operator FrSkyData(); + t_Open9xFrSkyData_v202() { memset(this, 0, sizeof(t_Open9xFrSkyData_v202)); } }) Open9xFrSkyData_v202; PACK(typedef struct t_Open9xFrSkyData_v203 { - Open9xFrSkyChannelData_v203 channels[2]; - uint8_t usrProto; // Protocol in FrSky user data, 0=None, 1=FrSky hub, 2=WS HowHigh - - operator FrSkyData(); - t_Open9xFrSkyData_v203() { memset(this, 0, sizeof(t_Open9xFrSkyData_v203)); } - t_Open9xFrSkyData_v203(FrSkyData&); + Open9xFrSkyChannelData_v203 channels[2]; + uint8_t usrProto; // Protocol in FrSky user data, 0=None, 1=FrSky hub, 2=WS HowHigh + operator FrSkyData(); + t_Open9xFrSkyData_v203() { memset(this, 0, sizeof(t_Open9xFrSkyData_v203)); } }) Open9xFrSkyData_v203; PACK(typedef struct t_Open9xFrSkyBarData_v204 { @@ -403,8 +362,6 @@ PACK(typedef struct t_Open9xFrSkyBarData_v204 { operator FrSkyBarData(); t_Open9xFrSkyBarData_v204() { memset(this, 0, sizeof(t_Open9xFrSkyBarData_v204)); } - t_Open9xFrSkyBarData_v204(FrSkyBarData&); - }) Open9xFrSkyBarData_v204; PACK(typedef struct t_Open9xFrSkyData_v204 { @@ -417,7 +374,6 @@ PACK(typedef struct t_Open9xFrSkyData_v204 { operator FrSkyData(); t_Open9xFrSkyData_v204() { memset(this, 0, sizeof(t_Open9xFrSkyData_v204)); } - t_Open9xFrSkyData_v204(FrSkyData&); }) Open9xFrSkyData_v204; PACK(typedef struct t_Open9xFrSkyData_v205 { @@ -431,7 +387,6 @@ PACK(typedef struct t_Open9xFrSkyData_v205 { operator FrSkyData(); t_Open9xFrSkyData_v205() { memset(this, 0, sizeof(t_Open9xFrSkyData_v205)); } - t_Open9xFrSkyData_v205(FrSkyData&); }) Open9xFrSkyData_v205; PACK(typedef struct t_Open9xFrSkyData_v208 { @@ -445,7 +400,6 @@ PACK(typedef struct t_Open9xFrSkyData_v208 { operator FrSkyData(); t_Open9xFrSkyData_v208() { memset(this, 0, sizeof(t_Open9xFrSkyData_v208)); } - t_Open9xFrSkyData_v208(FrSkyData&); }) Open9xFrSkyData_v208; PACK(typedef struct t_Open9xFrSkyData_v210 { @@ -466,7 +420,6 @@ PACK(typedef struct t_Open9xFrSkyData_v210 { operator FrSkyData(); t_Open9xFrSkyData_v210() { memset(this, 0, sizeof(t_Open9xFrSkyData_v210)); } - t_Open9xFrSkyData_v210(FrSkyData&); }) Open9xFrSkyData_v210; PACK(typedef struct t_Open9xSwashRingData_v208 { // Swash Ring data @@ -479,8 +432,6 @@ PACK(typedef struct t_Open9xSwashRingData_v208 { // Swash Ring data operator SwashRingData(); t_Open9xSwashRingData_v208() { memset(this, 0, sizeof(t_Open9xSwashRingData_v208)); } - t_Open9xSwashRingData_v208(SwashRingData&); - }) Open9xSwashRingData_v208; PACK(typedef struct t_Open9xSwashRingData_v209 { // Swash Ring data @@ -493,8 +444,6 @@ PACK(typedef struct t_Open9xSwashRingData_v209 { // Swash Ring data operator SwashRingData(); t_Open9xSwashRingData_v209() { memset(this, 0, sizeof(t_Open9xSwashRingData_v209)); } - t_Open9xSwashRingData_v209(SwashRingData&); - }) Open9xSwashRingData_v209; PACK(typedef struct t_Open9xPhaseData_v201 { @@ -507,7 +456,6 @@ PACK(typedef struct t_Open9xPhaseData_v201 { operator PhaseData(); t_Open9xPhaseData_v201() { memset(this, 0, sizeof(t_Open9xPhaseData_v201)); } - t_Open9xPhaseData_v201(PhaseData &eepe); }) Open9xPhaseData_v201; PACK(typedef struct t_Open9xTimerData_v201 { @@ -526,7 +474,6 @@ PACK(typedef struct t_Open9xTimerData_v202 { operator TimerData(); t_Open9xTimerData_v202() { memset(this, 0, sizeof(t_Open9xTimerData_v202)); } - t_Open9xTimerData_v202(TimerData &eepe); }) Open9xTimerData_v202; PACK(typedef struct t_Open9xTimerDataExtra { @@ -579,8 +526,6 @@ PACK(typedef struct t_Open9xModelData_v201 { operator ModelData(); t_Open9xModelData_v201() { memset(this, 0, sizeof(t_Open9xModelData_v201)); } - t_Open9xModelData_v201(ModelData&); - }) Open9xModelData_v201; PACK(typedef struct t_Open9xModelData_v202 { @@ -615,8 +560,6 @@ PACK(typedef struct t_Open9xModelData_v202 { operator ModelData(); t_Open9xModelData_v202() { memset(this, 0, sizeof(t_Open9xModelData_v202)); } - t_Open9xModelData_v202(ModelData&); - }) Open9xModelData_v202; PACK(typedef struct t_Open9xModelData_v203 { @@ -650,8 +593,6 @@ PACK(typedef struct t_Open9xModelData_v203 { operator ModelData(); t_Open9xModelData_v203() { memset(this, 0, sizeof(t_Open9xModelData_v203)); } - t_Open9xModelData_v203(ModelData&); - }) Open9xModelData_v203; PACK(typedef struct t_Open9xModelData_v204 { @@ -686,8 +627,6 @@ PACK(typedef struct t_Open9xModelData_v204 { operator ModelData(); t_Open9xModelData_v204() { memset(this, 0, sizeof(t_Open9xModelData_v204)); } - t_Open9xModelData_v204(ModelData&); - }) Open9xModelData_v204; PACK(typedef struct t_Open9xModelData_v205 { @@ -723,8 +662,6 @@ PACK(typedef struct t_Open9xModelData_v205 { operator ModelData(); t_Open9xModelData_v205() { memset(this, 0, sizeof(t_Open9xModelData_v205)); } - t_Open9xModelData_v205(ModelData&); - }) Open9xModelData_v205; PACK(typedef struct t_Open9xModelData_v208 { @@ -764,8 +701,6 @@ PACK(typedef struct t_Open9xModelData_v208 { operator ModelData(); t_Open9xModelData_v208() { memset(this, 0, sizeof(t_Open9xModelData_v208)); } - t_Open9xModelData_v208(ModelData&); - }) Open9xModelData_v208; PACK(typedef struct t_Open9xModelData_v209 { @@ -806,8 +741,6 @@ PACK(typedef struct t_Open9xModelData_v209 { operator ModelData(); t_Open9xModelData_v209() { memset(this, 0, sizeof(t_Open9xModelData_v209)); } - t_Open9xModelData_v209(ModelData&); - }) Open9xModelData_v209; PACK(typedef struct t_Open9xModelData_v210 { @@ -846,8 +779,6 @@ PACK(typedef struct t_Open9xModelData_v210 { operator ModelData(); t_Open9xModelData_v210() { memset(this, 0, sizeof(t_Open9xModelData_v210)); } - t_Open9xModelData_v210(ModelData&); - }) Open9xModelData_v210; PACK(typedef struct t_Open9xModelData_v211 { @@ -884,8 +815,6 @@ PACK(typedef struct t_Open9xModelData_v211 { operator ModelData(); t_Open9xModelData_v211() { memset(this, 0, sizeof(t_Open9xModelData_v211)); } - t_Open9xModelData_v211(ModelData&); - }) Open9xModelData_v211; #endif diff --git a/companion/src/firmwares/opentx/open9xGruvin9xsimulator.cpp b/companion/src/firmwares/opentx/opentxGruvin9xsimulator.cpp similarity index 95% rename from companion/src/firmwares/opentx/open9xGruvin9xsimulator.cpp rename to companion/src/firmwares/opentx/opentxGruvin9xsimulator.cpp index 9cb478b16..0d2f07771 100644 --- a/companion/src/firmwares/opentx/open9xGruvin9xsimulator.cpp +++ b/companion/src/firmwares/opentx/opentxGruvin9xsimulator.cpp @@ -14,9 +14,9 @@ * */ -#include "open9xGruvin9xsimulator.h" -#include "open9xinterface.h" -#include "open9xeeprom.h" +#include "opentxGruvin9xsimulator.h" +#include "opentxinterface.h" +#include "opentxeeprom.h" #define SIMU #define SIMU_EXCEPTIONS @@ -98,7 +98,7 @@ bool hasExtendedTrims() uint8_t getStickMode() { - return g_eeGeneral.stickMode; + return limit(0, g_eeGeneral.stickMode, 3); } } @@ -160,7 +160,7 @@ void Open9xGruvin9xSimulator::setValues(TxInputs &inputs) void Open9xGruvin9xSimulator::setTrim(unsigned int idx, int value) { - idx = Open9xGruvin9x::modn12x3[4*getStickMode() + idx] - 1; + idx = Open9xGruvin9x::modn12x3[4*getStickMode() + idx]; uint8_t phase = getTrimFlightPhase(getFlightPhase(), idx); setTrimValue(phase, idx, value); } @@ -174,7 +174,7 @@ void Open9xGruvin9xSimulator::getTrims(Trims & trims) } for (int i=0; i<2; i++) { - uint8_t idx = Open9xGruvin9x::modn12x3[4*getStickMode() + i] - 1; + uint8_t idx = Open9xGruvin9x::modn12x3[4*getStickMode() + i]; int16_t tmp = trims.values[i]; trims.values[i] = trims.values[idx]; trims.values[idx] = tmp; diff --git a/companion/src/firmwares/opentx/open9xGruvin9xsimulator.h b/companion/src/firmwares/opentx/opentxGruvin9xsimulator.h similarity index 100% rename from companion/src/firmwares/opentx/open9xGruvin9xsimulator.h rename to companion/src/firmwares/opentx/opentxGruvin9xsimulator.h diff --git a/companion/src/firmwares/opentx/open9xM128simulator.cpp b/companion/src/firmwares/opentx/opentxM128simulator.cpp similarity index 94% rename from companion/src/firmwares/opentx/open9xM128simulator.cpp rename to companion/src/firmwares/opentx/opentxM128simulator.cpp index a82b53b0c..f169a10d3 100644 --- a/companion/src/firmwares/opentx/open9xM128simulator.cpp +++ b/companion/src/firmwares/opentx/opentxM128simulator.cpp @@ -14,9 +14,9 @@ * */ -#include "open9xM128simulator.h" -#include "open9xinterface.h" -#include "open9xeeprom.h" +#include "opentxM128simulator.h" +#include "opentxinterface.h" +#include "opentxeeprom.h" #define SIMU #define SIMU_EXCEPTIONS @@ -96,7 +96,7 @@ bool hasExtendedTrims() uint8_t getStickMode() { - return g_eeGeneral.stickMode; + return limit(0, g_eeGeneral.stickMode, 3); } } @@ -154,7 +154,7 @@ void Open9xM128Simulator::setValues(TxInputs &inputs) void Open9xM128Simulator::setTrim(unsigned int idx, int value) { - idx = Open9xM128::modn12x3[4*getStickMode() + idx] - 1; + idx = Open9xM128::modn12x3[4*getStickMode() + idx]; uint8_t phase = getTrimFlightPhase(getFlightPhase(), idx); setTrimValue(phase, idx, value); } @@ -168,7 +168,7 @@ void Open9xM128Simulator::getTrims(Trims & trims) } for (int i=0; i<2; i++) { - uint8_t idx = Open9xM128::modn12x3[4*getStickMode() + i] - 1; + uint8_t idx = Open9xM128::modn12x3[4*getStickMode() + i]; int16_t tmp = trims.values[i]; trims.values[i] = trims.values[idx]; trims.values[idx] = tmp; diff --git a/companion/src/firmwares/opentx/open9xM128simulator.h b/companion/src/firmwares/opentx/opentxM128simulator.h similarity index 100% rename from companion/src/firmwares/opentx/open9xM128simulator.h rename to companion/src/firmwares/opentx/opentxM128simulator.h diff --git a/companion/src/firmwares/opentx/open9xSky9xsimulator.cpp b/companion/src/firmwares/opentx/opentxSky9xsimulator.cpp similarity index 95% rename from companion/src/firmwares/opentx/open9xSky9xsimulator.cpp rename to companion/src/firmwares/opentx/opentxSky9xsimulator.cpp index d724028ec..b9f5f294e 100644 --- a/companion/src/firmwares/opentx/open9xSky9xsimulator.cpp +++ b/companion/src/firmwares/opentx/opentxSky9xsimulator.cpp @@ -14,8 +14,8 @@ * */ -#include "open9xSky9xsimulator.h" -#include "open9xinterface.h" +#include "opentxSky9xsimulator.h" +#include "opentxinterface.h" #define SIMU #define SIMU_EXCEPTIONS @@ -125,7 +125,7 @@ bool hasExtendedTrims() uint8_t getStickMode() { - return g_eeGeneral.stickMode; + return limit(0, g_eeGeneral.stickMode, 3); } } @@ -135,7 +135,7 @@ using namespace Open9xSky9x; Open9xSky9xSimulator::Open9xSky9xSimulator(Open9xInterface * open9xInterface): open9xInterface(open9xInterface) { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString path=settings.value("sdPath", ".").toString()+"/"; int i=0; for (i=0; i< std::min(path.length(),1022); i++) { @@ -193,7 +193,7 @@ void Open9xSky9xSimulator::setValues(TxInputs &inputs) void Open9xSky9xSimulator::setTrim(unsigned int idx, int value) { - idx = Open9xSky9x::modn12x3[4*getStickMode() + idx] - 1; + idx = Open9xSky9x::modn12x3[4*getStickMode() + idx]; uint8_t phase = getTrimFlightPhase(getFlightPhase(), idx); setTrimValue(phase, idx, value); } @@ -207,7 +207,7 @@ void Open9xSky9xSimulator::getTrims(Trims & trims) } for (int i=0; i<2; i++) { - uint8_t idx = Open9xSky9x::modn12x3[4*getStickMode() + i] - 1; + uint8_t idx = Open9xSky9x::modn12x3[4*getStickMode() + i]; int16_t tmp = trims.values[i]; trims.values[i] = trims.values[idx]; trims.values[idx] = tmp; diff --git a/companion/src/firmwares/opentx/open9xSky9xsimulator.h b/companion/src/firmwares/opentx/opentxSky9xsimulator.h similarity index 100% rename from companion/src/firmwares/opentx/open9xSky9xsimulator.h rename to companion/src/firmwares/opentx/opentxSky9xsimulator.h diff --git a/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp b/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp index 6f216273a..47b8fb04a 100644 --- a/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp +++ b/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp @@ -15,7 +15,7 @@ */ #include "opentxTaranisSimulator.h" -#include "open9xinterface.h" +#include "opentxinterface.h" #define SIMU #define SIMU_EXCEPTIONS @@ -35,6 +35,8 @@ #define AUDIO #define VOICE #define PXX +#define DSM2 +#define DSM2_PPM #define DBLKEYS #define AUTOSWITCH #define GRAPHICS @@ -47,6 +49,7 @@ #define PPM_CENTER_ADJUSTABLE #define PPM_LIMITS_SYMETRICAL #define FAI_CHOICE + #define EEPROM_VARIANT 3 #undef min @@ -65,6 +68,7 @@ inline int geteepromsize() { #include "radio/src/targets/taranis/board_taranis.cpp" #include "radio/src/protocols/ppm_arm.cpp" #include "radio/src/protocols/pxx_arm.cpp" +#include "radio/src/protocols/dsm2_arm.cpp" #include "radio/src/targets/taranis/pwr_driver.cpp" #include "radio/src/eeprom_common.cpp" #include "radio/src/eeprom_conversions.cpp" @@ -128,7 +132,7 @@ bool hasExtendedTrims() uint8_t getStickMode() { - return g_eeGeneral.stickMode; + return limit(0, g_eeGeneral.stickMode, 3); } void resetTrims() @@ -145,7 +149,7 @@ OpentxTaranisSimulator::OpentxTaranisSimulator(Open9xInterface * open9xInterface open9xInterface(open9xInterface) { taranisSimulatorBoard = GetEepromInterface()->getBoard(); - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString path=settings.value("sdPath", ".").toString()+"/"; int i=0; for (i=0; i< std::min(path.length(),1022); i++) { @@ -200,7 +204,7 @@ void OpentxTaranisSimulator::setValues(TxInputs &inputs) void OpentxTaranisSimulator::setTrim(unsigned int idx, int value) { - idx = Open9xX9D::modn12x3[4*getStickMode() + idx] - 1; + idx = Open9xX9D::modn12x3[4*getStickMode() + idx]; uint8_t phase = getTrimFlightPhase(getFlightPhase(), idx); setTrimValue(phase, idx, value); } @@ -214,7 +218,7 @@ void OpentxTaranisSimulator::getTrims(Trims & trims) } for (int i=0; i<2; i++) { - uint8_t idx = Open9xX9D::modn12x3[4*getStickMode() + i] - 1; + uint8_t idx = Open9xX9D::modn12x3[4*getStickMode() + i]; int16_t tmp = trims.values[i]; trims.values[i] = trims.values[idx]; trims.values[idx] = tmp; diff --git a/companion/src/firmwares/opentx/open9xeeprom.cpp b/companion/src/firmwares/opentx/opentxeeprom.cpp similarity index 85% rename from companion/src/firmwares/opentx/open9xeeprom.cpp rename to companion/src/firmwares/opentx/opentxeeprom.cpp index 9601cb35a..a238d344d 100644 --- a/companion/src/firmwares/opentx/open9xeeprom.cpp +++ b/companion/src/firmwares/opentx/opentxeeprom.cpp @@ -1,7 +1,7 @@ #include #include #include "helpers.h" -#include "open9xeeprom.h" +#include "opentxeeprom.h" #include #define IS_DBLEEPROM(board, version) ((board==BOARD_GRUVIN9X || board==BOARD_M128) && version >= 213) @@ -18,10 +18,11 @@ #define MAX_PHASES(board, version) (IS_ARM(board) ? 9 : (IS_DBLRAM(board, version) ? 6 : 5)) #define MAX_MIXERS(board, version) (IS_ARM(board) ? 64 : 32) #define MAX_CHANNELS(board, version) (IS_ARM(board) ? 32 : 16) -#define MAX_EXPOS(board, version) (IS_ARM(board) ? 32 : (IS_DBLRAM(board, version) ? 16 : 14)) +#define MAX_EXPOS(board, version) (IS_ARM(board) ? ((IS_TARANIS(board) && version >= 216) ? 64 : 32) : (IS_DBLRAM(board, version) ? 16 : 14)) #define MAX_CUSTOM_SWITCHES(board, version) (IS_ARM(board) ? 32 : (IS_DBLEEPROM(board, version) ? 15 : 12)) #define MAX_CUSTOM_FUNCTIONS(board, version) (IS_ARM(board) ? 32 : (IS_DBLEEPROM(board, version) ? 24 : 16)) -#define MAX_CURVES(board) (IS_ARM(board) ? O9X_ARM_MAX_CURVES : O9X_MAX_CURVES) +#define MAX_CURVES(board, version) (IS_ARM(board) ? ((IS_TARANIS(board) && version >= 216) ? 32 : 16) : O9X_MAX_CURVES) +#define MAX_GVARS(board, version) ((IS_ARM(board) && version >= 216) ? 9 : 5) #define IS_RELEASE_21_MARCH_2013(board, version) (version >= 214 || (!IS_ARM(board) && version >= 213)) #define IS_RELEASE_23_MARCH_2013(board, version) (version >= 214 || (board==BOARD_STOCK && version >= 213)) @@ -134,6 +135,16 @@ class SourcesConversionTable: public ConversionTable { addConversion(RawSource(SOURCE_TYPE_NONE), val++); } + if (IS_TARANIS(board) && version >= 216) { + for (int i=0; i<32; i++) + addConversion(RawSource(SOURCE_TYPE_VIRTUAL_INPUT, i), val++); + for (int i=0; i<3; i++) { + for (int j=0; j<6; j++) { + addConversion(RawSource(SOURCE_TYPE_LUA_INPUT, i*16+j), val++); + } + } + } + for (int i=0; i<4+MAX_POTS(board); i++) addConversion(RawSource(SOURCE_TYPE_STICK, i), val++); @@ -190,7 +201,7 @@ class SourcesConversionTable: public ConversionTable { if (!(flags & FLAG_NOTELEMETRY)) { if (release21March2013) { if ((board != BOARD_STOCK && (board!=BOARD_M128 || version<215)) || (variant & GVARS_VARIANT)) { - for (int i=0; i<5; i++) + for (int i=0; i > { unsigned int _source; }; +class CurveReferenceField: public TransformedField { + public: + CurveReferenceField(CurveReference & curve, BoardEnum board, unsigned int version): + TransformedField(internalField), + curve(curve), + _curve_type(0) + { + internalField.Append(new UnsignedField<8>(_curve_type)); + internalField.Append(new SignedField<8>(curve.value)); + } + + virtual void beforeExport() + { + if (curve.value != 0) + _curve_type = (unsigned int)curve.type; + else + _curve_type = 0; + } + + virtual void afterImport() + { + curve.type = (CurveReference::CurveRefType)_curve_type; + } + + protected: + StructField internalField; + CurveReference & curve; + unsigned int _curve_type; +}; + class HeliField: public StructField { public: HeliField(SwashRingData & heli, BoardEnum board, unsigned int version, unsigned int variant) @@ -409,7 +450,7 @@ class PhaseField: public TransformedField { } if (board != BOARD_STOCK && (board != BOARD_M128 || version < 215)) { - for (int i=0; i(phase.gvars[i])); } } @@ -595,7 +636,25 @@ class MixField: public TransformedField { board(board), version(version) { - if (IS_ARM(board)) { + if (IS_TARANIS(board) && version >= 216) { + internalField.Append(new UnsignedField<8>(_destCh)); + internalField.Append(new UnsignedField<16>(mix.phases)); + internalField.Append(new UnsignedField<8>((unsigned int &)mix.mltpx)); + internalField.Append(new SignedField<16>(_weight)); + internalField.Append(new SwitchField<8>(mix.swtch, board, version)); + internalField.Append(new CurveReferenceField(mix.curve, board, version)); + internalField.Append(new UnsignedField<4>(mix.mixWarn)); + internalField.Append(new UnsignedField<4>(mix.srcVariant)); + internalField.Append(new UnsignedField<8>(mix.delayUp)); + internalField.Append(new UnsignedField<8>(mix.delayDown)); + internalField.Append(new UnsignedField<8>(mix.speedUp)); + internalField.Append(new UnsignedField<8>(mix.speedDown)); + internalField.Append(new SourceField<8>(mix.srcRaw, board, version, FLAG_NOTELEMETRY)); + internalField.Append(new SignedField<16>(_offset)); + internalField.Append(new ZCharField<8>(mix.name)); + internalField.Append(new SpareBitsField<8>()); + } + else if (IS_ARM(board)) { internalField.Append(new UnsignedField<8>(_destCh)); internalField.Append(new UnsignedField<16>(mix.phases)); internalField.Append(new BoolField<1>(_curveMode)); @@ -680,8 +739,18 @@ class MixField: public TransformedField { { if (mix.destCh && mix.srcRaw.type != SOURCE_TYPE_NONE) { _destCh = mix.destCh - 1; - _curveMode = mix.curve; - _curveParam = (mix.curve ? mix.curve : smallGvarToEEPROM(mix.differential)); + if (mix.curve.type == CurveReference::CURVE_REF_CUSTOM) { + _curveMode = true; + _curveParam = 6 + mix.curve.value; + } + else if (mix.curve.type == CurveReference::CURVE_REF_FUNC) { + _curveMode = true; + _curveParam = mix.curve.value; + } + else if (mix.curve.type == CurveReference::CURVE_REF_DIFF) { + _curveMode = 0; + _curveParam = smallGvarToEEPROM(mix.curve.value); + } } else { mix.clear(); @@ -707,12 +776,14 @@ class MixField: public TransformedField { { if (mix.srcRaw.type != SOURCE_TYPE_NONE) { mix.destCh = _destCh + 1; - mix.curve = 0; - mix.differential = 0; - if (_curveMode) - mix.curve = _curveParam; - else - mix.differential = smallGvarToC9x(_curveParam); + if (!IS_ARM(board) || version < 216) { + if (!_curveMode) + mix.curve = CurveReference(CurveReference::CURVE_REF_DIFF, smallGvarToC9x(_curveParam)); + else if (_curveParam > 6) + mix.curve = CurveReference(CurveReference::CURVE_REF_CUSTOM, _curveParam-6); + else + mix.curve = CurveReference(CurveReference::CURVE_REF_FUNC, _curveParam); + } } if (IS_ARM(board)) { @@ -748,9 +819,23 @@ class ExpoField: public TransformedField { TransformedField(internalField), internalField("Expo"), expo(expo), - board(board) + board(board), + version(version) { - if (IS_ARM(board)) { + if (IS_TARANIS(board) && version >= 216) { + internalField.Append(new SourceField<8>(expo.srcRaw, board, version, 0)); + internalField.Append(new UnsignedField<16>(expo.scale)); + internalField.Append(new UnsignedField<8>(expo.chn, "Channel")); + internalField.Append(new SwitchField<8>(expo.swtch, board, version)); + internalField.Append(new UnsignedField<16>(expo.phases)); + internalField.Append(new SignedField<8>(_weight, "Weight")); + internalField.Append(new SignedField<8>(expo.carryTrim)); + internalField.Append(new ZCharField<8>(expo.name)); + internalField.Append(new SignedField<8>(expo.offset, "Offset")); + internalField.Append(new CurveReferenceField(expo.curve, board, version)); + internalField.Append(new SpareBitsField<8>()); + } + else if (IS_ARM(board)) { internalField.Append(new UnsignedField<8>(expo.mode)); internalField.Append(new UnsignedField<8>(expo.chn)); internalField.Append(new SwitchField<8>(expo.swtch, board, version)); @@ -789,22 +874,41 @@ class ExpoField: public TransformedField { virtual void beforeExport() { - _curveMode = (expo.curveMode && expo.curveParam); _weight = smallGvarToEEPROM(expo.weight); - _curveParam = smallGvarToEEPROM(expo.curveParam); + if (!IS_TARANIS(board) || version < 216) { + if (expo.curve.type==CurveReference::CURVE_REF_FUNC && expo.curve.value) { + _curveMode = true; + _curveParam = expo.curve.value; + } + else if (expo.curve.type==CurveReference::CURVE_REF_CUSTOM && expo.curve.value) { + _curveMode = true; + _curveParam = expo.curve.value+6; + } + else { + _curveMode = false; + _curveParam = smallGvarToEEPROM(expo.curve.value); + } + } } virtual void afterImport() { - expo.curveMode = _curveMode; expo.weight = smallGvarToC9x(_weight); - expo.curveParam = smallGvarToC9x(_curveParam); + if (!IS_TARANIS(board) || version < 216) { + if (!_curveMode) + expo.curve = CurveReference(CurveReference::CURVE_REF_EXPO, smallGvarToC9x(_curveParam)); + else if (_curveParam > 6) + expo.curve = CurveReference(CurveReference::CURVE_REF_CUSTOM, _curveParam-6); + else + expo.curve = CurveReference(CurveReference::CURVE_REF_FUNC, _curveParam); + } } protected: StructField internalField; ExpoData & expo; BoardEnum board; + unsigned int version; bool _curveMode; int _weight; int _curveParam; @@ -812,36 +916,56 @@ class ExpoField: public TransformedField { class LimitField: public StructField { public: - LimitField(LimitData & limit, BoardEnum board): + LimitField(LimitData & limit, BoardEnum board, unsigned int version): StructField("Limit") { - Append(new ConversionField< SignedField<8> >(limit.min, +100)); - Append(new ConversionField< SignedField<8> >(limit.max, -100)); + if (IS_ARM(board) && version >= 216) { + Append(new ConversionField< SignedField<16> >(limit.min, +1000)); + Append(new ConversionField< SignedField<16> >(limit.max, -1000)); + } + else { + Append(new ConversionField< SignedField<8> >(limit.min, +100, 10)); + Append(new ConversionField< SignedField<8> >(limit.max, -100, 10)); + } Append(new SignedField<8>(limit.ppmCenter)); Append(new SignedField<14>(limit.offset)); Append(new BoolField<1>(limit.symetrical)); Append(new BoolField<1>(limit.revert)); - if (HAS_LARGE_LCD(board)) + if (HAS_LARGE_LCD(board)) { Append(new ZCharField<6>(limit.name)); + } + if (IS_TARANIS(board) && version >= 216) { + Append(new SignedField<8>(limit.curve.value)); + } } }; class CurvesField: public TransformedField { public: - CurvesField(CurveData * curves, BoardEnum board): + CurvesField(CurveData * curves, BoardEnum board, unsigned int version): TransformedField(internalField), internalField("Curves"), curves(curves), board(board), - maxCurves(MAX_CURVES(board)), + version(version), + maxCurves(MAX_CURVES(board, version)), maxPoints(IS_ARM(board) ? O9X_ARM_NUM_POINTS : O9X_NUM_POINTS) { for (int i=0; i= 216) { + internalField.Append(new UnsignedField<3>((unsigned int &)curves[i].type)); + internalField.Append(new BoolField<1>(curves[i].smooth)); + internalField.Append(new SpareBitsField<4>()); + internalField.Append(new ConversionField< SignedField<8> >(curves[i].count, -5)); + } + else if (IS_ARM(board)) { internalField.Append(new SignedField<16>(_curves[i])); - else + } + else { internalField.Append(new SignedField<8>(_curves[i])); + } } + for (int i=0; i(_points[i])); } @@ -853,46 +977,56 @@ class CurvesField: public TransformedField { int * cur = &_points[0]; int offset = 0; + for (int i=0; icustom ? curve->count * 2 - 2 : curve->count) - 5; - if (offset > maxPoints - 5 * maxCurves) { + int size = (curve->type == CurveData::CURVE_TYPE_CUSTOM ? curve->count * 2 - 2 : curve->count); + if (offset+size > maxPoints) { EEPROMWarnings += ::QObject::tr("openTx only accepts %1 points in all curves").arg(maxPoints) + "\n"; break; } - _curves[i] = offset; + if (!IS_TARANIS(board) || version < 216) { + _curves[i] = offset - (5*i); + } for (int j=0; jcount; j++) { *cur++ = curve->points[j].y; } - if (curve->custom) { + if (curve->type == CurveData::CURVE_TYPE_CUSTOM) { for (int j=1; jcount-1; j++) { *cur++ = curve->points[j].x; } } + offset += size; } } virtual void afterImport() { + int * cur = &_points[0]; + for (int i=0; icount = (size / 2) + 1; - curve->custom = true; + if (!IS_TARANIS(board) || version < 216) { + int * next = &_points[5*(i+1) + _curves[i]]; + int size = next - cur; + if (size % 2 == 0) { + curve->count = (size / 2) + 1; + curve->type = CurveData::CURVE_TYPE_CUSTOM; + } + else { + curve->count = size; + curve->type = CurveData::CURVE_TYPE_STANDARD; + } } - else { - curve->count = size; - curve->custom = false; + + for (int j=0; jcount; j++) { + curve->points[j].y = *cur++; } - for (int j=0; jcount; j++) - curve->points[j].y = cur[j]; - if (curve->custom) { + + if (curve->type == CurveData::CURVE_TYPE_CUSTOM) { curve->points[0].x = -100; for (int j=1; jcount-1; j++) - curve->points[j].x = cur[curve->count+j-1]; + curve->points[j].x = *cur++; curve->points[curve->count-1].x = +100; } else { @@ -906,10 +1040,11 @@ class CurvesField: public TransformedField { StructField internalField; CurveData *curves; BoardEnum board; + unsigned int version; int maxCurves; int maxPoints; - int _curves[O9X_ARM_MAX_CURVES]; - int _points[O9X_ARM_NUM_POINTS]; + int _curves[C9X_MAX_CURVES]; + int _points[C9X_MAX_CURVES*C9X_MAX_POINTS*2]; }; class CustomSwitchesFunctionsTable: public ConversionTable { @@ -1203,10 +1338,10 @@ class CustomFunctionField: public TransformedField { internalField.Append(new CharField<6>(_arm_param)); if (version >= 214) { internalField.Append(new UnsignedField<2>(_mode)); - internalField.Append(new UnsignedField<6>(_delay)); + internalField.Append(new SignedField<6>(_delay)); } else { - internalField.Append(new UnsignedField<8>(_delay)); + internalField.Append(new UnsignedField<8>((unsigned int &)_delay)); } if (version < 214) internalField.Append(new SpareBitsField<8>()); @@ -1229,7 +1364,7 @@ class CustomFunctionField: public TransformedField { if (IS_ARM(board)) { _mode = 0; if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue) - _delay = fn.repeatParam / 5; + _delay = (version >= 216 ? fn.repeatParam : (fn.repeatParam/5)); else _delay = (fn.enabled ? 1 : 0); if (fn.func <= FuncInstantTrim) { @@ -1238,7 +1373,7 @@ class CustomFunctionField: public TransformedField { else if (fn.func == FuncPlayPrompt || fn.func == FuncBackgroundMusic) { memcpy(_arm_param, fn.paramarm, sizeof(_arm_param)); } - else if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGV5) { + else if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast) { unsigned int value; if (version >= 214) { _mode = fn.adjustMode; @@ -1268,7 +1403,7 @@ class CustomFunctionField: public TransformedField { /* the default behavior */ _param = fn.param; _union_param = (fn.enabled ? 1 : 0); - if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGV5) { + if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast) { if (version >= 213) { _union_param += (fn.adjustMode << 1); if (fn.adjustMode == 1) @@ -1304,7 +1439,7 @@ class CustomFunctionField: public TransformedField { { if (IS_ARM(board)) { if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue) - fn.repeatParam = _delay * 5; + fn.repeatParam = (version >= 216 ? _delay : (_delay*5)); else fn.enabled = (_delay & 0x01); @@ -1321,7 +1456,7 @@ class CustomFunctionField: public TransformedField { else if (fn.func == FuncVolume) { sourcesConversionTable->importValue(value, (int &)fn.param); } - else if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGV5) { + else if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast) { if (version >= 214) { fn.adjustMode = _mode; if (fn.adjustMode == 1) @@ -1350,7 +1485,7 @@ class CustomFunctionField: public TransformedField { if (version >= 213) { fn.enabled = (_union_param & 0x01); } - if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGV5) { + if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast) { if (version >= 213) { fn.adjustMode = ((_union_param >> 1) & 0x03); if (fn.adjustMode == 1) @@ -1394,7 +1529,7 @@ class CustomFunctionField: public TransformedField { SourcesConversionTable * sourcesConversionTable; char _arm_param[10]; unsigned int _param; - unsigned int _delay; + int _delay; unsigned int _mode; unsigned int _union_param; }; @@ -1551,7 +1686,13 @@ class FrskyField: public StructField { Append(new UnsignedField<8>(frsky.channels[i].multiplier, 0, 5, "Multiplier")); } Append(new UnsignedField<8>(frsky.usrProto)); - Append(new UnsignedField<8>(frsky.voltsSource)); + if (version >= 216) { + Append(new UnsignedField<7>(frsky.voltsSource)); + Append(new BoolField<1>(frsky.altitudeDisplayed)); + } + else { + Append(new UnsignedField<8>(frsky.voltsSource)); + } Append(new UnsignedField<8>(frsky.blades)); Append(new UnsignedField<8>(frsky.currentSource)); @@ -1575,6 +1716,11 @@ class FrskyField: public StructField { Append(new ConversionField< UnsignedField<2> >(frsky.rssiAlarms[i].level, &rssiConversionTable[i], "RSSI")); Append(new ConversionField< SignedField<6> >(frsky.rssiAlarms[i].value, -45+i*3)); } + if (version >= 216) { + Append(new BoolField<1>(frsky.mAhPersistent)); + Append(new UnsignedField<15>(frsky.storedMah)); + Append(new SignedField<8>(frsky.fasOffset)); + } } else { for (int i=0; i<2; i++) { @@ -1598,7 +1744,7 @@ class FrskyField: public StructField { Append(new SignedField<4>(frsky.varioMax)); for (int i=0; i<2; i++) { Append(new ConversionField< UnsignedField<2> >(frsky.rssiAlarms[i].level, &rssiConversionTable[i], "RSSI level")); - Append(new ConversionField< SignedField<6> >(frsky.rssiAlarms[i].value, -45+i*3, 0, 100, "RSSI value")); + Append(new ConversionField< SignedField<6> >(frsky.rssiAlarms[i].value, -45+i*3, 0, 0, 100, "RSSI value")); } for (int i=0; i<2; i++) { Append(new FrskyScreenField(frsky.screens[i], board, version)); @@ -1607,6 +1753,10 @@ class FrskyField: public StructField { Append(new SignedField<5>(frsky.varioCenterMin)); Append(new UnsignedField<3>(frsky.currentSource)); Append(new SignedField<8>(frsky.varioCenterMax)); + if (version >= 216) { + // TODO int8_t fasOffset; + Append(new SpareBitsField<8>()); + } } } @@ -1658,10 +1808,17 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u for (int i=0; i= 216) { + internalField.Append(new UnsignedField<16>(modelData.timers[i].val)); + internalField.Append(new UnsignedField<2>(modelData.timers[i].countdownBeep)); + internalField.Append(new BoolField<1>(modelData.timers[i].minuteBeep)); + internalField.Append(new BoolField<1>(modelData.timers[i].persistent)); + internalField.Append(new SpareBitsField<4>()); + internalField.Append(new SignedField<16>(modelData.timers[i].pvalue)); + } + else if (release21March2013) { internalField.Append(new UnsignedField<12>(modelData.timers[i].val)); - - internalField.Append(new BoolField<1>(modelData.timers[i].countdownBeep)); + internalField.Append(new BoolField<1>((bool &)modelData.timers[i].countdownBeep)); internalField.Append(new BoolField<1>(modelData.timers[i].minuteBeep)); if (HAS_PERSISTENT_TIMERS(board)) { internalField.Append(new BoolField<1>(modelData.timers[i].persistent)); @@ -1688,15 +1845,19 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u internalField.Append(new BoolField<1>(modelData.thrTrim)); - if (IS_TARANIS(board)) + if (IS_TARANIS(board) || (IS_ARM(board) && version >= 216)) internalField.Append(new SpareBitsField<4>()); else internalField.Append(new ConversionField< SignedField<4> >(modelData.moduleData[0].channelsCount, &channelsConversionTable, "Channels number", ::QObject::tr("OpenTX doesn't allow this number of channels"))); - internalField.Append(new UnsignedField<3>(modelData.trimInc)); + if (version >= 216) + internalField.Append(new SignedField<3>(modelData.trimInc)); + else + internalField.Append(new ConversionField< SignedField<3> >(modelData.trimInc, +2)); + internalField.Append(new BoolField<1>(modelData.disableThrottleWarning)); - if (IS_TARANIS(board)) + if (IS_TARANIS(board) || (IS_ARM(board) && version >= 216)) internalField.Append(new SpareBitsField<1>()); else internalField.Append(new BoolField<1>(modelData.moduleData[0].ppmPulsePol)); @@ -1704,7 +1865,10 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u internalField.Append(new BoolField<1>(modelData.extendedLimits)); internalField.Append(new BoolField<1>(modelData.extendedTrims)); internalField.Append(new BoolField<1>(modelData.throttleReversed)); - internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[0].ppmDelay, exportPpmDelay, importPpmDelay)); + + if (!IS_ARM(board) || version < 216) { + internalField.Append(new ConversionField< SignedField<8> >(modelData.moduleData[0].ppmDelay, exportPpmDelay, importPpmDelay)); + } if (IS_ARM(board) || board==BOARD_GRUVIN9X) internalField.Append(new UnsignedField<16>(modelData.beepANACenter)); @@ -1714,10 +1878,10 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u for (int i=0; i(modelData.moduleData[0].ppmFrameLength)); + + if (!IS_ARM(board) || version < 216) { + internalField.Append(new SignedField<8>(modelData.moduleData[0].ppmFrameLength)); + } + internalField.Append(new UnsignedField<8>(modelData.thrTraceSrc)); - if (!release21March2013) + if (!release21March2013) { internalField.Append(new UnsignedField<8>(modelData.modelId)); + } if (IS_TARANIS(board)) internalField.Append(new UnsignedField<16>(modelData.switchWarningStates)); @@ -1737,15 +1906,19 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u internalField.Append(new SwitchesWarningField<8>(modelData.switchWarningStates, board, version)); if ((board == BOARD_STOCK || (board == BOARD_M128 && version >= 215)) && (variant & GVARS_VARIANT)) { - for (int i=0; i(modelData.phaseData[0].gvars[i])); } } if (board != BOARD_STOCK && (board != BOARD_M128 || version < 215)) { - for (int i=0; i(modelData.gvars_names[i])); + if (version >= 216) { + internalField.Append(new BoolField<1>(modelData.gvars_popups[i])); + internalField.Append(new SpareBitsField<7>()); + } } } @@ -1783,31 +1956,41 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u } if (IS_TARANIS(board)) { - for (int i=0; i(modelData.curves[i].name)); } } + + if (IS_TARANIS(board) && version >= 216) { + // TODO ScriptData scriptsData[MAX_SCRIPTS]; + internalField.Append(new SpareBitsField<720>()); + for (int i=0; i<32; i++) + internalField.Append(new ZCharField<4>(modelData.inputNames[i])); + } } void Open9xModelDataNew::beforeExport() { // qDebug() << QString("before export model") << modelData.name; + for (int module=0; module<3; module++) { if (modelData.moduleData[module].protocol >= PXX_XJT_X16 && modelData.moduleData[module].protocol <= PXX_XJT_LR12) subprotocols[module] = modelData.moduleData[module].protocol - PXX_XJT_X16; + else if (modelData.moduleData[module].protocol >= LP45 && modelData.moduleData[module].protocol <= DSMX) + subprotocols[module] = modelData.moduleData[module].protocol - LP45; else - subprotocols[module] = (module==0 ? -1:0); + subprotocols[module] = (module==0 ? -1 : 0); } } void Open9xModelDataNew::afterImport() { - // qDebug() << QString("after import model") << modelData.name; + // qDebug() << QString("after import model") << modelData.name ; for (int module=0; module<3; module++) { - if (modelData.moduleData[module].protocol == PXX_XJT_X16) { - if (subprotocols[module]>=0) - modelData.moduleData[module].protocol = PXX_XJT_X16 + subprotocols[module]; + if (modelData.moduleData[module].protocol == PXX_XJT_X16 || modelData.moduleData[module].protocol == LP45) { + if (subprotocols[module] >= 0) + modelData.moduleData[module].protocol += subprotocols[module]; else modelData.moduleData[module].protocol = OFF; } @@ -1864,10 +2047,11 @@ Open9xGeneralDataNew::Open9xGeneralDataNew(GeneralSettings & generalData, BoardE internalField.Append(new SpareBitsField<1>()); internalField.Append(new UnsignedField<8>(generalData.inactivityTimer)); - if (IS_STOCK(board) && version >= 215) { + if (IS_9X(board) && version >= 215) { internalField.Append(new UnsignedField<3>(generalData.mavbaud)); - } else { - internalField.Append(new BoolField<1>(generalData.throttleReversed)); + } + else { + internalField.Append(new SpareBitsField<1>()); internalField.Append(new BoolField<1>(generalData.minuteBeep)); internalField.Append(new BoolField<1>(generalData.preBeep)); } @@ -1892,9 +2076,9 @@ Open9xGeneralDataNew::Open9xGeneralDataNew(GeneralSettings & generalData, BoardE internalField.Append(new UnsignedField<8>(generalData.speakerPitch)); if (IS_ARM(board)) - internalField.Append(new ConversionField< SignedField<8> >(generalData.speakerVolume, -12, 0, 23, "Volume")); + internalField.Append(new ConversionField< SignedField<8> >(generalData.speakerVolume, -12, 0, 0, 23, "Volume")); else - internalField.Append(new ConversionField< SignedField<8> >(generalData.speakerVolume, -7, 0, 7, "Volume")); + internalField.Append(new ConversionField< SignedField<8> >(generalData.speakerVolume, -7, 0, 0, 7, "Volume")); if (version >= 214 || (!IS_ARM(board) && version >= 213)) { internalField.Append(new SignedField<8>(generalData.vBatMin)); @@ -1926,6 +2110,9 @@ Open9xGeneralDataNew::Open9xGeneralDataNew(GeneralSettings & generalData, BoardE internalField.Append(new SignedField<8>(generalData.varioVolume)); internalField.Append(new SignedField<8>(generalData.backgroundVolume)); } + if (version >= 216) { + internalField.Append(new UnsignedField<8>(generalData.hw_uartMode)); + } } } diff --git a/companion/src/firmwares/opentx/open9xeeprom.h b/companion/src/firmwares/opentx/opentxeeprom.h similarity index 93% rename from companion/src/firmwares/opentx/open9xeeprom.h rename to companion/src/firmwares/opentx/opentxeeprom.h index 29385f66b..67d051663 100644 --- a/companion/src/firmwares/opentx/open9xeeprom.h +++ b/companion/src/firmwares/opentx/opentxeeprom.h @@ -42,7 +42,6 @@ #define O9X_NUM_FSW 16 // number of functions assigned to switches #define O9X_MAX_CURVES 8 #define O9X_NUM_POINTS (112-O9X_MAX_CURVES) -#define O9X_MAX_GVARS 5 #define O9X_ARM_MAX_PHASES 9 #define O9X_ARM_MAX_MIXERS 64 @@ -50,7 +49,6 @@ #define O9X_ARM_NUM_CHNOUT 32 // number of real output channels CH1-CH16 #define O9X_ARM_NUM_CSW 32 // number of custom switches #define O9X_ARM_NUM_FSW 32 // number of functions assigned to switches -#define O9X_ARM_MAX_CURVES 16 #define O9X_ARM_NUM_POINTS 512 #define O9X_ARM_MAX_CSFUNCOLD 13 #define O9X_ARM_MAX_CSFUNC 15 @@ -76,8 +74,9 @@ class ProtocolsConversionTable: public ConversionTable ProtocolsConversionTable(BoardEnum board) { int val = 0; - if (IS_TARANIS(board)) + if (IS_TARANIS(board)) { addConversion(OFF, val++); + } addConversion(PPM, val++); if (!IS_ARM(board)) { addConversion(PPM16, val++); @@ -88,9 +87,13 @@ class ProtocolsConversionTable: public ConversionTable addConversion(PXX_XJT_D8, val); addConversion(PXX_XJT_LR12, val++); } - addConversion(PXX_DJT, val++); + else { + addConversion(PXX_DJT, val++); + } if (IS_TARANIS(board)) { - addConversion(DSM2, val++); + addConversion(LP45, val); + addConversion(DSM2, val); + addConversion(DSMX, val++); } else { addConversion(LP45, val++); @@ -128,7 +131,7 @@ class Open9xModelDataNew: public TransformedField { private: char name[256]; - signed int subprotocols[C9X_NUM_MODULES+1/*trainer*/]; + int subprotocols[C9X_NUM_MODULES+1/*trainer*/]; ProtocolsConversionTable protocolsConversionTable; ChannelsConversionTable channelsConversionTable; }; diff --git a/companion/src/firmwares/opentx/open9xinterface.cpp b/companion/src/firmwares/opentx/opentxinterface.cpp similarity index 86% rename from companion/src/firmwares/opentx/open9xinterface.cpp rename to companion/src/firmwares/opentx/opentxinterface.cpp index f5e9ce787..178dcf5a1 100644 --- a/companion/src/firmwares/opentx/open9xinterface.cpp +++ b/companion/src/firmwares/opentx/opentxinterface.cpp @@ -16,14 +16,14 @@ #include #include -#include "open9xinterface.h" -#include "open9xeeprom.h" +#include "opentxinterface.h" +#include "opentxeeprom.h" #include "open9xGruvin9xeeprom.h" #include "open9xSky9xeeprom.h" -#include "open9xsimulator.h" -#include "open9xM128simulator.h" -#include "open9xGruvin9xsimulator.h" -#include "open9xSky9xsimulator.h" +#include "opentxsimulator.h" +#include "opentxM128simulator.h" +#include "opentxGruvin9xsimulator.h" +#include "opentxSky9xsimulator.h" #include "opentxTaranisSimulator.h" #include "file.h" @@ -42,14 +42,10 @@ size_t SizeOfArray( T(&)[ N ] ) return N; } -QStringList o9xservers; - Open9xInterface::Open9xInterface(BoardEnum board): EEPROMInterface(board), efile(new EFile()) { - o9xservers.clear(); - o9xservers << "93.51.182.154" << "open9x.9xforums.com"; } Open9xInterface::~Open9xInterface() @@ -278,15 +274,7 @@ bool Open9xInterface::saveGeneral(GeneralSettings &settings, BoardEnum board, ui } template -bool Open9xInterface::saveModel(unsigned int index, ModelData &model) -{ - T open9xModel(model); - int sz = efile->writeRlc2(FILE_MODEL(index), FILE_TYP_MODEL, (uint8_t*)&open9xModel, sizeof(T)); - return (sz == sizeof(T)); -} - -template -bool Open9xInterface::saveModelVariant(unsigned int index, ModelData &model, unsigned int version, unsigned int variant) +bool Open9xInterface::saveModel(unsigned int index, ModelData &model, unsigned int version, unsigned int variant) { T open9xModel(model, board, version, variant); // open9xModel.Dump(); @@ -317,7 +305,7 @@ bool Open9xInterface::load(RadioData &radioData, uint8_t *eeprom, int size) std::cout << " wrong size (" << size << ")\n"; return false; } else { - QMessageBox::warning(NULL,"companion9x", QObject::tr("Your radio probably uses a wrong firmware,\n eeprom size is 4096 but only the first 2048 are used")); + QMessageBox::warning(NULL, "companion", QObject::tr("Your radio probably uses a wrong firmware,\n eeprom size is 4096 but only the first 2048 are used")); size=2048; } } else { @@ -371,16 +359,16 @@ int Open9xInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t varian case BOARD_TARANIS: case BOARD_TARANIS_REV4a: case BOARD_SKY9X: - version = 215; + version = 216; break; case BOARD_GRUVIN9X: - version = 214; + version = 216; break; case BOARD_M128: - version = 215; + version = 216; break; case BOARD_STOCK: - version = 213; + version = 216; break; } } @@ -389,81 +377,21 @@ int Open9xInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t varian efile->EeFsCreate(eeprom, size, board); - int result = 0; - if (board == BOARD_M128) { variant |= M128_VARIANT; } - result = saveGeneral(radioData.generalSettings, board, version, variant); - - if (!result) + int result = saveGeneral(radioData.generalSettings, board, version, variant); + if (!result) { return 0; + } for (int i=0; i(i, radioData.models[i]); - break; - case 203: - result = saveModel(i, radioData.models[i]); - break; - case 204: - result = saveModel(i, radioData.models[i]); - break; - case 205: - result = saveModel(i, radioData.models[i]); - break; - case 207: - if (board == BOARD_GRUVIN9X) - result = saveModel(i, radioData.models[i]); - break; - case 208: - if (board == BOARD_GRUVIN9X) - result = saveModel(i, radioData.models[i]); - else if (board == BOARD_SKY9X) - result = saveModel(i, radioData.models[i]); - else - result = saveModel(i, radioData.models[i]); - break; - case 209: - if (board == BOARD_GRUVIN9X) - result = saveModel(i, radioData.models[i]); - else if (board == BOARD_SKY9X) - result = saveModel(i, radioData.models[i]); - else - result = saveModel(i, radioData.models[i]); - break; - case 210: - if (board == BOARD_GRUVIN9X) - result = saveModel(i, radioData.models[i]); - else if (board == BOARD_SKY9X) - result = saveModel(i, radioData.models[i]); - else - result = saveModel(i, radioData.models[i]); - break; - case 211: - if (board == BOARD_GRUVIN9X) - result = saveModel(i, radioData.models[i]); - else if (board == BOARD_SKY9X) - result = saveModel(i, radioData.models[i]); - else - result = saveModel(i, radioData.models[i]); - break; - case 212: - if (board == BOARD_SKY9X) - result = saveModel(i, radioData.models[i]); - else - result = saveModelVariant(i, radioData.models[i], version, variant); - break; - default: - result = saveModelVariant(i, radioData.models[i], version, variant); - break; + result = saveModel(i, radioData.models[i], version, variant); + if (!result) { + return 0; } - if (!result) - return false; } } @@ -488,7 +416,6 @@ int Open9xInterface::getSize(ModelData &model) efile->EeFsCreate(tmp, EESIZE_RLC_MAX, board); Open9xModelDataNew open9xModel(model, board, 255, GetCurrentFirmwareVariant()); - // open9xModel.Dump(); QByteArray eeprom; open9xModel.Export(eeprom); @@ -562,12 +489,14 @@ int Open9xInterface::getCapability(const Capability capability) return 6; else return 5; - case FlightPhasesAreNamed: case FlightPhasesHaveFades: + return 1; case Gvars: + return IS_ARM(board) ? 9 : 5; + case FlightModesName: + case GvarsName: + return (IS_TARANIS(board) ? 10 : 6); case GvarsInCS: - case GvarsAsWeight: - case ExpoIsCurve: case HasFAIMode: return 1; case GvarsAreNamed: @@ -584,10 +513,6 @@ int Open9xInterface::getCapability(const Capability capability) return 1; else return 0; - case minuteBeep: - return 1; - case countdownBeep: - return 1; case Pots: return (IS_TARANIS(board) ? 4 : 3); case Switches: @@ -663,27 +588,12 @@ int Open9xInterface::getCapability(const Capability capability) return 0; case ExtraInputs: return 1; - case HasNegCurves: - return 1; - case HasExpoCurves: - return true; - case ExpoCurve5: - case ExpoCurve9: - return 4; case ExtendedTrims: return 500; - case ExtraTrims: - return 1; case Simulation: return 1; case DSM2Indexes: return 1; - case FSSwitch: - return 1; - case HasTTrace: - return 1; - case CustomCurves: - return 1; case MixesWithoutExpo: return 1; case NumCurves: @@ -692,36 +602,20 @@ int Open9xInterface::getCapability(const Capability capability) return (IS_ARM(board) ? (IS_TARANIS(board) ? 8 : 6) : false); case HasExpoNames: return (IS_ARM(board) ? (IS_TARANIS(board) ? 8 : 6) : false); - case HasChNames: - return (IS_TARANIS(board) ? 1 : 0); + case ChannelsName: + return (IS_TARANIS(board) ? 6 : 0); case HasCvNames: return (IS_TARANIS(board) ? 1 : 0); - case NoTimerDirs: - return 1; - case NoThrExpo: - return 1; case Telemetry: return TM_HASTELEMETRY|TM_HASOFFSET|TM_HASWSHH; case TelemetryBars: return 1; - case TelemetryCSFields: - if (IS_TARANIS(board)) { - return 36; - } else { - return IS_ARM(board) ? 24 : 16; - } - case TelemetryColsCSFields: - if (IS_TARANIS(board)) { - return 3; - } else { - return 2; - } + case TelemetryCustomScreens: + return IS_TARANIS(board) ? 3 : 2; + case TelemetryCustomScreensFieldsPerLine: + return IS_TARANIS(board) ? 3 : 2; case NoTelemetryProtocol: - if (IS_TARANIS(board)) { - return 1; - } else { - return 0; - } + return IS_TARANIS(board) ? 1 : 0; case TelemetryUnits: return 0; case TelemetryBlades: @@ -734,8 +628,6 @@ int Open9xInterface::getCapability(const Capability capability) return 1; case TelemetryMaxMultiplier: return (IS_ARM(board) ? 32 : 8); - case DiffMixers: - return 1; case PPMCenter: return 1; case SYMLimits: @@ -766,10 +658,6 @@ int Open9xInterface::getCapability(const Capability capability) case HasBrightness: return (IS_ARM(board) ? true : false); case PerModelTimers: - case PerModelThrottleWarning: - case PerModelThrottleInvert: - return 1; - case pmSwitchMask: return 1; case SlowScale: return (IS_ARM(board) ? 10 : 2); @@ -777,15 +665,23 @@ int Open9xInterface::getCapability(const Capability capability) return (IS_ARM(board) ? 250 : 15); case CSFunc: return 18; - case GvarsNum: - case GvarsOfsNum: - return 5; case HasSDLogs: return ((board == BOARD_GRUVIN9X || IS_ARM(board)) ? true : false); case LCDWidth: return (IS_TARANIS(board) ? 212 : 128) ; case GetThrSwitch: - return (IS_TARANIS(board) ?DSW_SF1 : DSW_THR) ; + return (IS_TARANIS(board) ? DSW_SF1 : DSW_THR) ; + case VirtualInputs: + return IS_TARANIS(board) ? 32 : 0; + case LuaInputs: + case LimitsPer1000: + case EnhancedCurves: + case TelemetryInternalAlarms: + return IS_TARANIS(board); + case HasFasOffset: + return (IS_STOCK(board) ? false : true); + case HasMahPersistent: + return (IS_ARM(board) ? true : false); default: return 0; } @@ -814,12 +710,15 @@ int Open9xInterface::isAvailable(Protocol proto, int port) case PXX_XJT_D8: case PXX_XJT_LR12: case PXX_DJT: + case LP45: + case DSM2: + case DSMX: return 1; default: return 0; } break; - case 2: + case -1: switch (proto) { case PPM: return 1; @@ -954,6 +853,9 @@ bool Open9xInterface::checkVersion(unsigned int version) case 215: // M128 revert because too much RAM used! break; + case 216: + // A lot of things (first github release) + break; default: return false; } @@ -1026,14 +928,9 @@ bool Open9xInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esiz QString geturl( int board) { - QString url="http://"; - QSettings settings("companion9x", "companion9x"); - int server = settings.value("fwserver", 0).toInt(); - if (server >= o9xservers.count()) { - server = 0; - settings.setValue("fwserver",server); - } - url.append(o9xservers.at(server)); + QSettings settings; + QString url = settings.value("compilation-server", OPENTX_FIRMWARE_DOWNLOADS).toString(); + switch(board) { case BOARD_STOCK: case BOARD_M128: @@ -1054,27 +951,21 @@ QString geturl( int board) QString getstamp( int board) { - QString url="http://"; - QSettings settings("companion9x", "companion9x"); - int server = settings.value("fwserver",0).toInt(); - if (server >=o9xservers.count()) { - server=0; - settings.setValue("fwserver",server); - } - url.append(o9xservers.at(server)); - url.append("/binaries/stamp-opentx-"); + QSettings settings; + QString url = settings.value("compilation-server", OPENTX_FIRMWARE_DOWNLOADS).toString(); + url.append("/stamp-opentx-"); switch(board) { case BOARD_STOCK: - url.append("stock.txt"); + url.append("9x.txt"); break; case BOARD_M128: - url.append("stock128.txt"); + url.append("9x128.txt"); break; case BOARD_GRUVIN9X: - url.append("v4.txt"); + url.append("gruvin9x.txt"); break; case BOARD_SKY9X: - url.append("arm.txt"); + url.append("sky9x.txt"); break; case BOARD_TARANIS: case BOARD_TARANIS_REV4a: @@ -1089,16 +980,10 @@ QString getstamp( int board) QString getrnurl( int board) { - QString url="http://"; - QSettings settings("companion9x", "companion9x"); - int server = settings.value("fwserver",0).toInt(); - if (server >=o9xservers.count()) { - server=0; - settings.setValue("fwserver",server); - } - url.append(o9xservers.at(server)); - url.append("/docs/releasenotes-"); - switch(board) { + QSettings settings; + QString url = settings.value("compilation-server", OPENTX_FIRMWARE_DOWNLOADS).toString(); + url.append("/releasenotes-"); + switch(board) { case BOARD_STOCK: case BOARD_M128: case BOARD_GRUVIN9X: @@ -1125,7 +1010,7 @@ void RegisterOpen9xFirmwares() Option extr_options[] = { { "frsky", QObject::tr("Support for frsky telemetry mod"), FRSKY_VARIANT }, { "jeti", QObject::tr("Support for jeti telemetry mod"), 0 }, { "ardupilot", QObject::tr("Support for receiving ardupilot data"), 0 }, { "nmea", QObject::tr("Support for receiving NMEA data"), 0 }, { "mavlink", QObject::tr("Support for MAVLINK devices"), MAVLINK_VARIANT }, { NULL } }; Option fai_options[] = { { "faichoice", QObject::tr("Possibility to enable FAI MODE at field") }, { "faimode", QObject::tr("FAI MODE always enabled") }, { NULL } }; /* 9x board */ - open9x = new Open9xFirmware("opentx-stock", QObject::tr("openTx for 9X board"), new Open9xInterface(BOARD_STOCK), geturl(BOARD_STOCK), getstamp(BOARD_STOCK), getrnurl(BOARD_STOCK), false); + open9x = new Open9xFirmware("opentx-9x", QObject::tr("openTx for 9X board"), new Open9xInterface(BOARD_STOCK), geturl(BOARD_STOCK), getstamp(BOARD_STOCK), getrnurl(BOARD_STOCK), false); open9x->addOptions(ext_options); open9x->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support")); open9x->addOption("templates", QObject::tr("Enable TEMPLATES menu")); @@ -1157,11 +1042,12 @@ void RegisterOpen9xFirmwares() open9x->addOption("novario", QObject::tr("No vario support")); open9x->addOption("nogps", QObject::tr("No GPS support")); open9x->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen")); + open9x->addOption("fasoffset", QObject::tr("Allow compensating for offset errors in FrSky FAS current sensors")); open9x->addOptions(fai_options); firmwares.push_back(open9x); /* 9x board with M128 chip */ - open9x = new Open9xFirmware("opentx-stock128", QObject::tr("openTx for M128 / 9X board"), new Open9xInterface(BOARD_M128), geturl(BOARD_M128), getstamp(BOARD_M128),getrnurl(BOARD_M128), false); + open9x = new Open9xFirmware("opentx-9x128", QObject::tr("openTx for M128 / 9X board"), new Open9xInterface(BOARD_M128), geturl(BOARD_M128), getstamp(BOARD_M128),getrnurl(BOARD_M128), false); open9x->addOptions(ext_options); open9x->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support")); open9x->addOption("templates", QObject::tr("Enable TEMPLATES menu")); @@ -1257,7 +1143,7 @@ void RegisterOpen9xFirmwares() firmwares.push_back(open9x); /* Gruvin9x board */ - open9x = new Open9xFirmware("opentx-v4", QObject::tr("openTx for Gruvin9x board / 9X"), new Open9xInterface(BOARD_GRUVIN9X), geturl(BOARD_GRUVIN9X), getstamp(BOARD_GRUVIN9X),getrnurl(BOARD_GRUVIN9X), false); + open9x = new Open9xFirmware("opentx-gruvin9x", QObject::tr("openTx for Gruvin9x board / 9X"), new Open9xInterface(BOARD_GRUVIN9X), geturl(BOARD_GRUVIN9X), getstamp(BOARD_GRUVIN9X),getrnurl(BOARD_GRUVIN9X), false); open9x->setVariantBase(FRSKY_VARIANT); open9x->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support")); open9x->addOption("templates", QObject::tr("Enable TEMPLATES menu")); @@ -1321,7 +1207,7 @@ void RegisterOpen9xFirmwares() open9x->addOptions(fai_options); firmwares.push_back(open9x); - QSettings settings("companion9x", "companion9x"); + QSettings settings; int rev4a = settings.value("rev4asupport",0).toInt(); if (rev4a) { open9x = new Open9xFirmware("opentx-taranisrev4a", QObject::tr("openTx for FrSky Taranis Rev4a"), new Open9xInterface(BOARD_TARANIS_REV4a), geturl(BOARD_TARANIS_REV4a), getstamp(BOARD_TARANIS_REV4a),getrnurl(BOARD_TARANIS), true); diff --git a/companion/src/firmwares/opentx/open9xinterface.h b/companion/src/firmwares/opentx/opentxinterface.h similarity index 93% rename from companion/src/firmwares/opentx/open9xinterface.h rename to companion/src/firmwares/opentx/opentxinterface.h index 351b1ba53..fb7f3df5c 100644 --- a/companion/src/firmwares/opentx/open9xinterface.h +++ b/companion/src/firmwares/opentx/opentxinterface.h @@ -18,6 +18,9 @@ #include "eeprominterface.h" +#define OPENTX_COMPANION_DOWNLOADS "http://downloads.open-tx.org/companion" +#define OPENTX_FIRMWARE_DOWNLOADS "http://downloads.open-tx.org/firmware" + class EFile; class Open9xInterface : public EEPROMInterface @@ -67,10 +70,7 @@ class Open9xInterface : public EEPROMInterface bool loadModel(uint8_t version, ModelData &model, uint8_t *data, int index, unsigned int variant, unsigned int stickMode=0); template - bool saveModel(unsigned int index, ModelData &model); - - template - bool saveModelVariant(unsigned int index, ModelData &model, unsigned int version, unsigned int variant); + bool saveModel(unsigned int index, ModelData &model, unsigned int version, unsigned int variant); template bool loadGeneral(GeneralSettings &settings, unsigned int version); @@ -94,6 +94,7 @@ class Open9xFirmware: public FirmwareInfo { addLanguage("se"); addLanguage("cz"); addLanguage("es"); + addLanguage("pl"); addLanguage("pt"); addTTSLanguage("en"); @@ -103,6 +104,7 @@ class Open9xFirmware: public FirmwareInfo { addTTSLanguage("se"); addTTSLanguage("cz"); addTTSLanguage("sk"); + addTTSLanguage("pl"); addTTSLanguage("pt"); addTTSLanguage("es"); } diff --git a/companion/src/firmwares/opentx/open9xsimulator.cpp b/companion/src/firmwares/opentx/opentxsimulator.cpp similarity index 94% rename from companion/src/firmwares/opentx/open9xsimulator.cpp rename to companion/src/firmwares/opentx/opentxsimulator.cpp index 252ee6ecc..9037afa86 100644 --- a/companion/src/firmwares/opentx/open9xsimulator.cpp +++ b/companion/src/firmwares/opentx/opentxsimulator.cpp @@ -14,9 +14,9 @@ * */ -#include "open9xsimulator.h" -#include "open9xinterface.h" -#include "open9xeeprom.h" +#include "opentxsimulator.h" +#include "opentxinterface.h" +#include "opentxeeprom.h" #define HELI #define SIMU @@ -100,7 +100,7 @@ bool hasExtendedTrims() uint8_t getStickMode() { - return g_eeGeneral.stickMode; + return limit(0, g_eeGeneral.stickMode, 3); } } @@ -162,7 +162,7 @@ void Open9xSimulator::setValues(TxInputs &inputs) void Open9xSimulator::setTrim(unsigned int idx, int value) { - idx = Open9x::modn12x3[4*getStickMode() + idx] - 1; + idx = Open9x::modn12x3[4*getStickMode() + idx]; uint8_t phase = getTrimFlightPhase(getFlightPhase(), idx); setTrimValue(phase, idx, value); } @@ -176,7 +176,7 @@ void Open9xSimulator::getTrims(Trims & trims) } for (int i=0; i<2; i++) { - uint8_t idx = Open9x::modn12x3[4*getStickMode() + i] - 1; + uint8_t idx = Open9x::modn12x3[4*getStickMode() + i]; int16_t tmp = trims.values[i]; trims.values[i] = trims.values[idx]; trims.values[idx] = tmp; diff --git a/companion/src/firmwares/opentx/open9xsimulator.h b/companion/src/firmwares/opentx/opentxsimulator.h similarity index 100% rename from companion/src/firmwares/opentx/open9xsimulator.h rename to companion/src/firmwares/opentx/opentxsimulator.h diff --git a/companion/src/firmwares/opentx/stamp-opentx.h.in b/companion/src/firmwares/opentx/stamp-opentx.h.in index ad88df035..1b56589f5 100644 --- a/companion/src/firmwares/opentx/stamp-opentx.h.in +++ b/companion/src/firmwares/opentx/stamp-opentx.h.in @@ -1,6 +1,5 @@ // Automatically generated file (CMake) - do not edit #define DATE_STR "@DATE@" #define TIME_STR "@TIME@" -#define VERS_STR "c9x" -#define SVN_STR "@FIRMWARE@-r@G9X_WC_REVISION@" +#define VERS_STR "@C9X_VERSION@" #define MOD_STR "FH" diff --git a/companion/src/firmwares/th9x/th9xeeprom.cpp b/companion/src/firmwares/th9x/th9xeeprom.cpp index d09eb979b..8df98e04b 100644 --- a/companion/src/firmwares/th9x/th9xeeprom.cpp +++ b/companion/src/firmwares/th9x/th9xeeprom.cpp @@ -29,15 +29,6 @@ t_Th9xTrainerMix::t_Th9xTrainerMix() memset(this, 0, sizeof(t_Th9xTrainerMix)); } -t_Th9xTrainerMix::t_Th9xTrainerMix(TrainerMix &c9x) -{ - memset(this, 0, sizeof(t_Th9xTrainerMix)); - srcChn = c9x.src; - swtch = th9xFromSwitch(c9x.swtch); - studWeight = (8 * c9x.weight) / 25; - mode = c9x.mode; -} - t_Th9xTrainerMix::operator TrainerMix() { TrainerMix c9x; @@ -53,15 +44,6 @@ t_Th9xTrainerData::t_Th9xTrainerData() memset(this, 0, sizeof(t_Th9xTrainerData)); } -t_Th9xTrainerData::t_Th9xTrainerData(TrainerData &c9x) -{ - memset(this, 0, sizeof(t_Th9xTrainerData)); - for (int i=0; i 6) { + c9x.curve.type = CurveReference::CURVE_REF_CUSTOM; + c9x.curve.value = curve - 6; + } + else if (curve > 0) { + c9x.curve.type = CurveReference::CURVE_REF_FUNC; + c9x.curve.value = curve; + } c9x.mode = mode3; c9x.weight = weight6; c9x.chn = chn; c9x.swtch = th9xToSwitch(drSw); - if (curve) { - c9x.curveMode=1; - c9x.curveParam = curve; - } else { - c9x.curveMode = 0; - c9x.curveParam = exp5; - } return c9x; } @@ -206,15 +134,6 @@ t_Th9xLimitData::t_Th9xLimitData() memset(this, 0, sizeof(t_Th9xLimitData)); } -t_Th9xLimitData::t_Th9xLimitData(LimitData &c9x) -{ - memset(this, 0, sizeof(t_Th9xLimitData)); - min = c9x.min+100; - max = c9x.max-100; - revert = c9x.revert; - offset = c9x.offset; -} - t_Th9xLimitData::operator LimitData () { LimitData c9x; @@ -225,36 +144,11 @@ t_Th9xLimitData::operator LimitData () return c9x; } - t_Th9xMixData::t_Th9xMixData() { memset(this, 0, sizeof(t_Th9xMixData)); } -t_Th9xMixData::t_Th9xMixData(MixData &c9x) -{ - memset(this, 0, sizeof(t_Th9xMixData)); - destCh = c9x.destCh; - mixMode = c9x.mltpx; - if (c9x.srcRaw.type == SOURCE_TYPE_STICK) - srcRaw = c9x.srcRaw.index; - else if (c9x.srcRaw.type == SOURCE_TYPE_MAX) - srcRaw = 10; - else if (c9x.srcRaw.type == SOURCE_TYPE_PPM) - srcRaw = 24 + c9x.srcRaw.index; - else if (c9x.srcRaw.type == SOURCE_TYPE_CH) - srcRaw = 12 + c9x.srcRaw.index; - else - srcRaw = 0; // TODO - switchMode = 1; - curveNeg = 0; - weight = c9x.weight; - swtch = th9xFromSwitch(c9x.swtch); - curve = c9x.curve; - speedUp = c9x.speedUp; - speedDown = c9x.speedDown; -} - t_Th9xMixData::operator MixData () { MixData c9x; @@ -273,41 +167,20 @@ t_Th9xMixData::operator MixData () c9x.srcRaw = RawSource(SOURCE_TYPE_PPM, srcRaw-24); c9x.weight = weight; c9x.swtch = th9xToSwitch(swtch); - c9x.curve = curve; + if (curve > 6) { + c9x.curve.type = CurveReference::CURVE_REF_CUSTOM; + c9x.curve.value = curve - 6; + } + else if (curve > 0) { + c9x.curve.type = CurveReference::CURVE_REF_FUNC; + c9x.curve.value = curve; + } c9x.speedUp = speedUp; c9x.speedDown = speedDown; c9x.mltpx = (MltpxValue)mixMode; return c9x; } - -t_Th9xCustomSwData::t_Th9xCustomSwData(CustomSwData &c9x) -{ - opCmp = c9x.func; - val1 = c9x.val1; - val2 = c9x.val2; - - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { - val1 = fromSource(RawSource(c9x.val1)); - } - - if (c9x.func >= CS_FN_EQUAL) { - val2 = fromSource(RawSource(c9x.val2)); - } - - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { - val1 = th9xFromSwitch(RawSwitch(c9x.val1)); - val2 = th9xFromSwitch(RawSwitch(c9x.val2)); - } - - if (opCmp>TH9X_MAX_CSFUNC ) { - EEPROMWarnings += ::QObject::tr("th9x does not support Custom Switch function %1").arg(getFuncName(opCmp)) + "\n"; - opCmp=0; - val1=0; - val2=0; - } -} - t_Th9xCustomSwData::operator CustomSwData () { CustomSwData c9x; @@ -388,76 +261,6 @@ t_Th9xModelData::t_Th9xModelData() memset(this, 0, sizeof(t_Th9xModelData)); } -t_Th9xModelData::t_Th9xModelData(ModelData &c9x) -{ - memset(this, 0, sizeof(t_Th9xModelData)); - - if (c9x.used) { - setEEPROMString(name, c9x.name, sizeof(name)); - mdVers = MDVERS; - if (c9x.timers[0].mode == TMRMODE_ABS) - tmrMode = 1; - if (c9x.timers[0].mode == TMRMODE_THs) - tmrMode = 2; - if (c9x.timers[0].mode == TMRMODE_THp) - tmrMode = 3; - else - tmrMode = 0; - - // TODO tmrDir = c9x.timers[0].dir; - tmrVal = c9x.timers[0].val; - //protocol = c9x.protocol; - /* - ppmNCH = (c9x.moduleData[0].channelsCount - 8) / 2; - thrTrim = c9x.thrTrim; - thrExpo = c9x.thrExpo; - trimInc = c9x.trimInc; - ppmDelay = (c9x.moduleData[0].ppmDelay - 300) / 50; - for (unsigned int i=0; i 1*4 operator ModelData(); t_Th9xModelData(); - t_Th9xModelData(ModelData&); }) Th9xModelData; - #endif -/*eof*/ diff --git a/companion/src/firmwares/th9x/th9xinterface.cpp b/companion/src/firmwares/th9x/th9xinterface.cpp index 624b077a8..9bd0cbc4a 100644 --- a/companion/src/firmwares/th9x/th9xinterface.cpp +++ b/companion/src/firmwares/th9x/th9xinterface.cpp @@ -44,7 +44,7 @@ const char * Th9xInterface::getName() const int Th9xInterface::getEEpromSize() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString avrMCU = settings.value("mcu", QString("m64")).toString(); if (avrMCU==QString("m128")) { return 2*EESIZE_STOCK; @@ -124,56 +124,20 @@ bool Th9xInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int Th9xInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t variant, uint8_t version) { - EEPROMWarnings.clear(); + std::cout << "NO!\n"; + // TODO a warning - efile->EeFsCreate(eeprom, getEEpromSize(), BOARD_STOCK); - - Th9xGeneral th9xGeneral(radioData.generalSettings); - int sz = efile->writeRlc2(FILE_GENERAL, FILE_TYP_GENERAL, (uint8_t*)&th9xGeneral, sizeof(Th9xGeneral)); - if(sz != sizeof(Th9xGeneral)) { - return 0; - } - - for (int i=0; iwriteRlc2(FILE_MODEL(i), FILE_TYP_MODEL, (uint8_t*)&th9xModel, sizeof(Th9xModelData)); - if(sz != sizeof(Th9xModelData)) { - return 0; - } - } - } - - return getEEpromSize(); + return 0; } int Th9xInterface::getSize(ModelData &model) { - if (model.isempty()) - return 0; - - uint8_t tmp[2*EESIZE_STOCK]; - efile->EeFsCreate(tmp, getEEpromSize(), BOARD_STOCK); - - Th9xModelData th9xModel(model); - int sz = efile->writeRlc2(0, FILE_TYP_MODEL, (uint8_t*)&th9xModel, sizeof(Th9xModelData)); - if(sz != sizeof(Th9xModelData)) { - return -1; - } - return efile->size(0); + return 0; } int Th9xInterface::getSize(GeneralSettings &settings) { - uint8_t tmp[2*EESIZE_STOCK]; - efile->EeFsCreate(tmp, getEEpromSize(), BOARD_STOCK); - - Th9xGeneral th9xGeneral(settings); - int sz = efile->writeRlc2(0, FILE_TYP_GENERAL, (uint8_t*)&th9xGeneral, sizeof(Th9xGeneral)); - if(sz != sizeof(th9xGeneral)) { - return -1; - } - return efile->size(0); + return 0; } int Th9xInterface::getCapability(const Capability capability) @@ -181,12 +145,6 @@ int Th9xInterface::getCapability(const Capability capability) switch (capability) { case Mixes: return TH9X_MAX_MIXERS; - case NumCurves3: - return TH9X_MAX_CURVES3; - case NumCurves5: - return TH9X_MAX_CURVES5; - case NumCurves9: - return TH9X_MAX_CURVES9; case OwnerName: return 0; case Timers: diff --git a/companion/src/fusesdialog.ui b/companion/src/fusesdialog.ui index e6b4acb92..1a32ff96c 100644 --- a/companion/src/fusesdialog.ui +++ b/companion/src/fusesdialog.ui @@ -14,8 +14,8 @@ Fuses - - :/images/fuses.png:/images/fuses.png + + :/icon.png:/icon.png @@ -116,7 +116,7 @@ p, li { white-space: pre-wrap; } - + diff --git a/companion/src/generaledit.cpp b/companion/src/generaledit.cpp index 1f5b179bb..fdff37ae9 100644 --- a/companion/src/generaledit.cpp +++ b/companion/src/generaledit.cpp @@ -20,7 +20,7 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) : ui->setupUi(this); this->setWindowIcon(QIcon(":/icon.png")); - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString firmware_id = settings.value("firmware", default_firmware_variant.id).toString(); ui->tabWidget->setCurrentIndex(settings.value("generalEditTab", 0).toInt()); int profile_id=settings.value("profileId", 0).toInt(); @@ -170,22 +170,10 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) : ui->crosstrimChkB->hide(); ui->crosstrimLB->hide(); } - if (!GetEepromInterface()->getCapability(HasPPMSim)) { + if (!GetEepromInterface()->getCapability(HasPPMSim)) { ui->PPMSimLB->hide(); ui->PPMSimChkB->hide(); } - - if (GetEepromInterface()->getCapability(PerModelThrottleWarning)) { - ui->thrwarnChkB->setDisabled(true); - ui->thrwarnChkB->hide(); - ui->thrwarnLabel->hide(); - } - if (GetEepromInterface()->getCapability(pmSwitchMask)) { - ui->swwarn_label->hide(); - ui->swtchWarnCB->hide(); - ui->swtchWarnChkB->hide(); - layout()->removeItem(ui->swwarn_layout); - } if (!GetEepromInterface()->getCapability( HasPxxCountry)) { ui->countrycode_label->hide(); ui->countrycode_CB->hide(); @@ -322,11 +310,8 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) : ui->swID0ChkB->hide(); ui->swID1ChkB->hide(); ui->swID2ChkB->hide(); - ui->swtchWarnChkB->hide(); this->layout()->removeItem(ui->switchMaskLayout); } else { - ui->swtchWarnCB->setDisabled(true); - ui->swtchWarnCB->hide(); setSwitchDefPos(); } if (!GetEepromInterface()->getCapability(TelemetryAlarm)) { @@ -340,12 +325,6 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) : } else { populateRotEncCB(ui->re_CB, g_eeGeneral.reNavigation, renumber); } - if (GetEepromInterface()->getCapability(PerModelThrottleInvert)) { - ui->label_thrrev->hide(); - ui->thrrevChkB->hide(); - } else { - ui->thrrevChkB->setChecked(g_eeGeneral.throttleReversed); - } ui->telalarmsChkB->setChecked(g_eeGeneral.enableTelemetryAlarm); ui->PotScrollEnableChkB->setChecked(!g_eeGeneral.disablePotScroll); ui->BandGapEnableChkB->setChecked(!g_eeGeneral.disableBG); @@ -359,9 +338,6 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) : ui->StickScrollChkB->setChecked(g_eeGeneral.stickScroll); ui->PPMSimChkB->setChecked(g_eeGeneral.enablePpmsim); ui->inputfilterCB->setCurrentIndex(g_eeGeneral.filterInput); - ui->thrwarnChkB->setChecked(!g_eeGeneral.disableThrottleWarning); //Default is zero=checked - ui->swtchWarnChkB->setChecked(g_eeGeneral.switchWarning == -1); - ui->swtchWarnCB->setCurrentIndex(g_eeGeneral.switchWarning == -1 ? 2 : g_eeGeneral.switchWarning); ui->memwarnChkB->setChecked(!g_eeGeneral.disableMemoryWarning); //Default is zero=checked ui->alarmwarnChkB->setChecked(!g_eeGeneral.disableAlarmWarning);//Default is zero=checked ui->enableTelemetryAlarmChkB->setChecked(g_eeGeneral.enableTelemetryAlarm); @@ -622,36 +598,12 @@ void GeneralEdit::on_inactimerSB_editingFinished() updateSettings(); } -void GeneralEdit::on_thrrevChkB_stateChanged(int ) -{ - g_eeGeneral.throttleReversed = ui->thrrevChkB->isChecked() ? 1 : 0; - updateSettings(); -} - void GeneralEdit::on_inputfilterCB_currentIndexChanged(int index) { g_eeGeneral.filterInput = index; updateSettings(); } -void GeneralEdit::on_thrwarnChkB_stateChanged(int ) -{ - g_eeGeneral.disableThrottleWarning = ui->thrwarnChkB->isChecked() ? 0 : 1; - updateSettings(); -} - -void GeneralEdit::on_swtchWarnCB_currentIndexChanged(int index) -{ - g_eeGeneral.switchWarning = (index == 2 ? -1 : index); - updateSettings(); -} - -void GeneralEdit::on_swtchWarnChkB_stateChanged(int ) -{ - g_eeGeneral.switchWarning = ui->swtchWarnChkB->isChecked() ? -1 : 0; - updateSettings(); -} - void GeneralEdit::on_memwarnChkB_stateChanged(int ) { g_eeGeneral.disableMemoryWarning = ui->memwarnChkB->isChecked() ? 0 : 1; @@ -994,7 +946,7 @@ void GeneralEdit::on_PPM4_editingFinished() void GeneralEdit::on_tabWidget_currentChanged(int index) { // TODO why er9x here - QSettings settings("companion9x", "companion9x"); + QSettings settings; settings.setValue("generalEditTab",index);//ui->tabWidget->currentIndex()); } @@ -1074,7 +1026,7 @@ void GeneralEdit::on_blinvert_cb_stateChanged(int ) void GeneralEdit::on_faimode_CB_stateChanged(int ) { if (ui->faimode_CB->isChecked()) { - int ret = QMessageBox::question(this, "companion9x", + int ret = QMessageBox::question(this, "Companion", tr("If you enable FAI, you loose the vario, the play functions, the telemetry screen.\nThis function cannot be disabled by the radio.\nAre you sure ?") , QMessageBox::Yes | QMessageBox::No); if (ret==QMessageBox::Yes) { @@ -1243,7 +1195,7 @@ void GeneralEdit::on_swGEAChkB_stateChanged(int ) void GeneralEdit::on_calretrieve_PB_clicked() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; int profile_id=ui->profile_CB->itemData(ui->profile_CB->currentIndex()).toInt(); settings.beginGroup("Profiles"); QString profile=QString("profile%1").arg(profile_id); @@ -1360,7 +1312,7 @@ void GeneralEdit::on_calretrieve_PB_clicked() void GeneralEdit::on_calstore_PB_clicked() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; int profile_id=ui->profile_CB->itemData(ui->profile_CB->currentIndex()).toInt(); settings.beginGroup("Profiles"); QString profile=QString("profile%1").arg(profile_id); @@ -1375,7 +1327,7 @@ void GeneralEdit::on_calstore_PB_clicked() } else { QString calib=settings.value("StickPotCalib","").toString(); if (!(calib.isEmpty())) { - int ret = QMessageBox::question(this, "companion9x", + int ret = QMessageBox::question(this, "Companion", tr("Do you want to store calibration in %1 profile
overwriting existing calibration?").arg(name) , QMessageBox::Yes | QMessageBox::No); if (ret == QMessageBox::No) { @@ -1408,7 +1360,7 @@ void GeneralEdit::on_calstore_PB_clicked() settings.setValue("countryCode",QString("%1%2%3").arg((uint8_t)g_eeGeneral.countryCode, 2, 16, QChar('0')).arg((uint8_t)g_eeGeneral.imperial, 2, 16, QChar('0')).arg(g_eeGeneral.ttsLanguage)); settings.endGroup(); settings.endGroup(); - QMessageBox::information(this, "companion9x", tr("Calibration and HW parameters saved.")); + QMessageBox::information(this, "Companion", tr("Calibration and HW parameters saved.")); } } diff --git a/companion/src/generaledit.h b/companion/src/generaledit.h index ac6b12cbc..eb6895d13 100644 --- a/companion/src/generaledit.h +++ b/companion/src/generaledit.h @@ -123,12 +123,8 @@ private slots: void on_channelorderCB_currentIndexChanged(int index); void on_beeperCB_currentIndexChanged(int index); void on_memwarnChkB_stateChanged(int ); - void on_swtchWarnCB_currentIndexChanged(int index); - void on_swtchWarnChkB_stateChanged(int ); void on_telalarmsChkB_stateChanged(int ); - void on_thrwarnChkB_stateChanged(int ); void on_inputfilterCB_currentIndexChanged(int index); - void on_thrrevChkB_stateChanged(int ); void on_inactimerSB_editingFinished(); void on_backlightautoSB_editingFinished(); void on_backlightswCB_currentIndexChanged(int index); diff --git a/companion/src/generaledit.ui b/companion/src/generaledit.ui index 8ac09986a..48a7445b5 100644 --- a/companion/src/generaledit.ui +++ b/companion/src/generaledit.ui @@ -20,7 +20,7 @@ General Edit - + :/icon.png:/icon.png @@ -117,6 +117,13 @@ These will be relevant for all models in the same EEPROM. Setup + + + + + + + @@ -130,7 +137,7 @@ These will be relevant for all models in the same EEPROM. - + @@ -160,13 +167,6 @@ These will be relevant for all models in the same EEPROM. - - - - - - - @@ -174,7 +174,7 @@ These will be relevant for all models in the same EEPROM. - + @@ -188,49 +188,7 @@ These will be relevant for all models in the same EEPROM. - - - - - - - 0 - 0 - - - - - 100 - 16777215 - - - - - Off - - - - - Switches Up - - - - - Switches Down - - - - - - - - - - - - - - + Measurement Units @@ -476,13 +434,6 @@ p, li { white-space: pre-wrap; } - - - - Reverse Throttle Operation - - - @@ -490,7 +441,7 @@ p, li { white-space: pre-wrap; } - + @@ -551,26 +502,40 @@ Mode 4: - - + + - Beeper Mode + - - - - sec + + + + LCD Display Type + + + + + + + + 0 + 0 + - 600 - - 5 + + + + BackLight On Stick Move + + + @@ -598,23 +563,37 @@ p, li { white-space: pre-wrap; } - - - - Reverse throttle operation. -If this is checked the throttle will be reversed. Idle will be forward, trim will also be reversed and the throttle warning will be reversed as well. - - + + + + sec - - + + 600 + + + 5 - - + + - BackLight On Stick Move + Beeper Mode + + + + + + + Timeshift from UTC + + + + + + + RotEnc Navigation @@ -637,47 +616,6 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi - - - - RotEnc Navigation - - - - - - - Timeshift from UTC - - - - - - - - 0 - 0 - - - - 5 - - - - - - - - - - - - - - LCD Display Type - - - @@ -685,14 +623,7 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi - - - - Throttle Startup Warning - - - - + @@ -775,7 +706,7 @@ p, li { white-space: pre-wrap; } - + @@ -800,7 +731,7 @@ p, li { white-space: pre-wrap; } - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. @@ -810,7 +741,7 @@ p, li { white-space: pre-wrap; } - + @@ -948,48 +879,6 @@ This is used by the templated to determine which channel goes to what number out - - - - Alarm Warning - - - - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" text-decoration: underline;">Warnings</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These will define startup warnings.</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Throttle warning - will alert if the throttle is not at idle during startup</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Switch warning - will alert if switches are not in their defaul position</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Memory warning - will alert if there's not a lot of memory left</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Silent mode warning - will alert you if the beeper is set to quiet (0)</p></body></html> - - - - - - true - - - @@ -1046,7 +935,7 @@ p, li { white-space: pre-wrap; } - + FAI Mode @@ -1163,7 +1052,7 @@ p, li { white-space: pre-wrap; } - + -14 @@ -1176,7 +1065,7 @@ p, li { white-space: pre-wrap; } - + @@ -1190,7 +1079,7 @@ p, li { white-space: pre-wrap; } - + @@ -1203,7 +1092,7 @@ p, li { white-space: pre-wrap; } - + Stick Mode @@ -1247,41 +1136,6 @@ p, li { white-space: pre-wrap; } - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" text-decoration: underline;">Warnings</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These will define startup warnings.</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Throttle warning - will alert if the throttle is not at idle during startup</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Switch warning - will alert if switches are not in their defaul position</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Memory warning - will alert if there's not a lot of memory left</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Silent mode warning - will alert you if the beeper is set to quiet (0)</p></body></html> - - - - - - true - - - @@ -1345,13 +1199,6 @@ p, li { white-space: pre-wrap; } - - - - Memory Startup Warning - - - @@ -1532,32 +1379,6 @@ p, li { white-space: pre-wrap; } - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" text-decoration: underline;">Warnings</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These will define startup warnings.</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Throttle warning - will alert if the throttle is not at idle during startup</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Switch warning - will alert if switches are not in their defaul position</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Memory warning - will alert if there's not a lot of memory left</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Silent mode warning - will alert you if the beeper is set to quiet (0)</p></body></html> - - - - - - true - - - false - - - @@ -1565,7 +1386,7 @@ p, li { white-space: pre-wrap; } - + Qt::Vertical @@ -1684,7 +1505,7 @@ Acceptable values are 5v..10v - + Readonly Unlock @@ -1726,13 +1547,6 @@ Acceptable values are 5v..10v - - - - Switch Startup Warning - - - @@ -1740,7 +1554,7 @@ Acceptable values are 5v..10v - + QLayout::SetMinimumSize @@ -2268,6 +2082,90 @@ Acceptable values are 5v..10v + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" text-decoration: underline;">Warnings</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These will define startup warnings.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Throttle warning - will alert if the throttle is not at idle during startup</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Switch warning - will alert if switches are not in their defaul position</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Memory warning - will alert if there's not a lot of memory left</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Silent mode warning - will alert you if the beeper is set to quiet (0)</p></body></html> + + + + + + true + + + + + + + Alarm Warning + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" text-decoration: underline;">Warnings</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These will define startup warnings.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Throttle warning - will alert if the throttle is not at idle during startup</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Switch warning - will alert if switches are not in their defaul position</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Memory warning - will alert if there's not a lot of memory left</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Silent mode warning - will alert you if the beeper is set to quiet (0)</p></body></html> + + + + + + true + + + + + + + Memory Startup Warning + + + @@ -3607,8 +3505,6 @@ p, li { white-space: pre-wrap; } beepMinuteChkB beepCountDownChkB beepFlashChkB - swtchWarnCB - swtchWarnChkB swTHRChkB swRUDChkB swELEChkB @@ -3659,7 +3555,7 @@ p, li { white-space: pre-wrap; } PPM_MultiplierDSB - + diff --git a/companion/src/helpers.cpp b/companion/src/helpers.cpp index 30f2a9c6f..1c69e2207 100644 --- a/companion/src/helpers.cpp +++ b/companion/src/helpers.cpp @@ -12,15 +12,28 @@ QString getPhaseName(int val, char * phasename) phaseName.append(phasename); if (phaseName.isEmpty()) { return QString(val < 0 ? "!" : "") + QObject::tr("FM%1").arg(abs(val) - 1); - } else { + } + else { return QString(val < 0 ? "!" : "") + phaseName; } } } -QString getStickStr(int index) +QString getInputStr(ModelData & model, int index) { - return RawSource(SOURCE_TYPE_STICK, index).toString(); + QString result; + + if (GetEepromInterface()->getCapability(VirtualInputs)) { + result = model.inputNames[index]; + if (result.isEmpty()) { + result = QObject::tr("Input%1").arg(index+1, 2, 10, QChar('0')); + } + } + else { + result = RawSource(SOURCE_TYPE_STICK, index).toString(); + } + + return result; } void populateGvSourceCB(QComboBox *b, int value) @@ -63,7 +76,7 @@ void populateTTraceCB(QComboBox *b, int value) } int channels=(IS_ARM(GetEepromInterface()->getBoard()) ? 32 : 16); for (int i=1; i<= channels; i++) { - b->addItem(QObject::tr("CH")+QString("%1").arg(i,2,10,QChar('0'))); + b->addItem(QObject::tr("CH%1").arg(i, 2, 10, QChar('0'))); } b->setCurrentIndex(value); } @@ -155,21 +168,14 @@ QString getFuncName(unsigned int val) return QObject::tr("Background Music"); else if (val == FuncBackgroundMusicPause) return QObject::tr("Background Music Pause"); - else if (val == FuncAdjustGV1) - return QObject::tr("Adjust GV1"); - else if (val == FuncAdjustGV2) - return QObject::tr("Adjust GV2"); - else if (val == FuncAdjustGV3) - return QObject::tr("Adjust GV3"); - else if (val == FuncAdjustGV4) - return QObject::tr("Adjust GV4"); - else if (val == FuncAdjustGV5) - return QObject::tr("Adjust GV5"); + else if (val >= FuncAdjustGV1 && val <= FuncAdjustGVLast) + return QObject::tr("Adjust GV%1").arg(val-FuncAdjustGV1+1); else { return QString("???"); // Highlight unknown functions with output of question marks.(BTW should not happen that we do not know what a function is) } } +// TODO should be a toString() method in CustoSwData ... QString getCustomSwitchStr(CustomSwData * customSw, const ModelData & model) { QString result = ""; @@ -184,7 +190,8 @@ QString getCustomSwitchStr(CustomSwData * customSw, const ModelData & model) result = QString("TIM(%1 , %2)").arg(ValToTim(customSw->val1)).arg(ValToTim(customSw->val2)); break; case CS_FAMILY_VOFS: { - RawSource source = RawSource(customSw->val1); + RawSource source = RawSource(customSw->val1, &model); + RawSourceRange range = source.getRange(); if (customSw->val1) result += source.toString(); else @@ -199,7 +206,7 @@ QString getCustomSwitchStr(CustomSwData * customSw, const ModelData & model) result += " > "; else if (customSw->func == CS_FN_ANEG || customSw->func == CS_FN_VNEG) result += " < "; - result += QString::number(source.getStep(model) * (customSw->val2 + source.getRawOffset(model)) + source.getOffset(model)); + result += QString::number(range.step * (customSw->val2 /*TODO+ source.getRawOffset(model)*/) + range.offset); break; } case CS_FAMILY_VBOOL: @@ -395,7 +402,7 @@ void populateFuncParamArmTCB(QComboBox *b, ModelData * g_model, char * value, QS } } -void populateFuncParamCB(QComboBox *b, uint function, unsigned int value, unsigned int adjustmode) +void populateFuncParamCB(QComboBox *b, const ModelData & model, uint function, unsigned int value, unsigned int adjustmode) { QStringList qs; b->clear(); @@ -415,22 +422,30 @@ void populateFuncParamCB(QComboBox *b, uint function, unsigned int value, unsign qs.append( QObject::tr("Timer2")); qs.append( QObject::tr("All")); qs.append( QObject::tr("Telemetry")); + int reCount = GetEepromInterface()->getCapability(RotaryEncoders); + if (reCount == 1) { + qs.append( QObject::tr("Rotary Encoder")); + } + else if (reCount == 2) { + qs.append( QObject::tr("REa")); + qs.append( QObject::tr("REb")); + } b->addItems(qs); b->setCurrentIndex(value); } else if (function==FuncVolume) { - populateSourceCB(b, RawSource(value), POPULATE_SOURCES|POPULATE_TRIMS); + populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_TRIMS); } else if (function==FuncPlayValue) { - populateSourceCB(b, RawSource(value), POPULATE_SOURCES|POPULATE_SWITCHES|POPULATE_GVARS|POPULATE_TRIMS|POPULATE_TELEMETRYEXT); + populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_VIRTUAL_INPUTS|POPULATE_SWITCHES|POPULATE_GVARS|POPULATE_TRIMS|POPULATE_TELEMETRYEXT); } - else if (function>=FuncAdjustGV1 && function<=FuncAdjustGV5 ) { + else if (function>=FuncAdjustGV1 && function<=FuncAdjustGVLast) { switch (adjustmode) { case 1: - populateSourceCB(b, RawSource(value), POPULATE_SOURCES|POPULATE_TRIMS|POPULATE_SWITCHES); + populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_TRIMS|POPULATE_SWITCHES); break; case 2: - populateSourceCB(b, RawSource(value), POPULATE_GVARS); + populateSourceCB(b, RawSource(value), model, POPULATE_GVARS); break; case 3: b->clear(); @@ -440,23 +455,11 @@ void populateFuncParamCB(QComboBox *b, uint function, unsigned int value, unsign break; } } - else { b->hide(); } } -void populateRepeatCB(QComboBox *b, unsigned int value) -{ - b->clear(); - b->addItem(QObject::tr("No repeat", 0)); - unsigned int step = IS_ARM(GetEepromInterface()->getBoard()) ? 5 : 10; - for (unsigned int i=step; i<=60; i+=step) { - b->addItem(QObject::tr("%1s").arg(i), i); - if (i==value) b->setCurrentIndex(b->count()-1); - } -} - void populateGVmodeCB(QComboBox *b, unsigned int value) { b->clear(); @@ -480,68 +483,205 @@ void populatePhasesCB(QComboBox *b, int value) b->setCurrentIndex(value + GetEepromInterface()->getCapability(FlightPhases)); } -void populateCurvesCB(QComboBox *b, int value) +bool gvarsEnabled() { - b->clear(); - int numcurves=GetEepromInterface()->getCapability(NumCurves); - if (numcurves==0) { - numcurves=16; - } - for (int i = -(numcurves)*GetEepromInterface()->getCapability(HasNegCurves); i < CURVE_BASE + numcurves; i++) { - if ((i==0) && GetEepromInterface()->getCapability(DiffMixers)) { - b->addItem(QObject::tr("Diff")); - } else { - b->addItem(getCurveStr(i)); + int gvars=0; + if (GetEepromInterface()->getCapability(HasVariants)) { + if ((GetCurrentFirmwareVariant() & GVARS_VARIANT)) { + gvars=1; } } - b->setCurrentIndex(value+numcurves*GetEepromInterface()->getCapability(HasNegCurves)); - b->setMaxVisibleItems(10); + else { + gvars=1; + } + return gvars; } -void populateExpoCurvesCB(QComboBox *b, int value) +GVarGroup::GVarGroup(QCheckBox *weightGV, QSpinBox *weightSB, QComboBox *weightCB, int & weight, const int deflt, const int mini, const int maxi, const unsigned int flags): + QObject(), + weightGV(weightGV), + weightSB(weightSB), + weightCB(weightCB), + weight(weight), + flags(flags), + lock(false) { - b->clear(); - int numcurves=GetEepromInterface()->getCapability(NumCurves); - if (numcurves==0) { - numcurves=16; - } - if (GetEepromInterface()->getCapability(ExpoIsCurve)) { - b->addItem(QObject::tr("Expo")); - } else { - b->addItem(getCurveStr(0)); - } - for (int i = 1; i < CURVE_BASE + numcurves; i++) - b->addItem(getCurveStr(i)); - b->setCurrentIndex(value); - b->setMaxVisibleItems(10); - /* TODO - if (GetEepromInterface()->getCapability(ExpoCurve5)) { - int curve5=GetEepromInterface()->getCapability(ExpoCurve5); - for (int i=CURVE_BASE+curve5; i < CURVE_BASE + MAX_CURVE5; i++) { - // Get the index of the value to disable - QModelIndex index = b->model()->index(i, 0); + lock = true; - // This is the effective 'disable' flag - QVariant v(0); - - //the magic - b->model()->setData(index, v, Qt::UserRole - 1); + if (gvarsEnabled()) { + populateGVCB(weightCB, weight); + connect(weightGV, SIGNAL(stateChanged(int)), this, SLOT(gvarCBChanged(int))); + connect(weightCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged())); + } + else { + weightGV->hide(); + if (weight > maxi || weight < -mini) { + weight = deflt; } } - if (GetEepromInterface()->getCapability(ExpoCurve9)) { - int curve9=GetEepromInterface()->getCapability(ExpoCurve9); - for (int i=CURVE_BASE+MAX_CURVE5+curve9; i < CURVE_BASE + MAX_CURVE5+ MAX_CURVE9; i++) { - // Get the index of the value to disable - QModelIndex index = b->model()->index(i, 0); - // This is the effective 'disable' flag - QVariant v(0); + weightSB->setMinimum(mini); + weightSB->setMaximum(maxi); - //the magic - b->model()->setData(index, v, Qt::UserRole - 1); + if (weight>maxi || weightsetChecked(true); + weightSB->hide(); + weightCB->show(); + } + else { + weightGV->setChecked(false); + weightSB->setValue(weight); + weightSB->show(); + weightCB->hide(); + } + + connect(weightSB, SIGNAL(editingFinished()), this, SLOT(valuesChanged())); + + lock = false; +} + +void GVarGroup::gvarCBChanged(int state) +{ + weightCB->setVisible(state); + weightSB->setVisible(!state); + valuesChanged(); +} + +void GVarGroup::valuesChanged() +{ + if (weightGV->isChecked()) + weight = weightCB->itemData(weightCB->currentIndex()).toInt(); + else + weight = weightSB->value(); +} + +CurveGroup::CurveGroup(QComboBox *curveTypeCB, QCheckBox *curveGVarCB, QComboBox *curveValueCB, QSpinBox *curveValueSB, CurveReference & curve, unsigned int flags): + QObject(), + curveTypeCB(curveTypeCB), + curveGVarCB(curveGVarCB), + curveValueCB(curveValueCB), + curveValueSB(curveValueSB), + curve(curve), + flags(flags), + lock(false), + lastType(-1) +{ + curveTypeCB->addItem(tr("Diff")); + curveTypeCB->addItem(tr("Expo")); + curveTypeCB->addItem(tr("Func")); + curveTypeCB->addItem(tr("Curve")); + + curveValueCB->setMaxVisibleItems(10); + + connect(curveTypeCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged())); + connect(curveGVarCB, SIGNAL(stateChanged(int)), this, SLOT(gvarCBChanged(int))); + connect(curveValueCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged())); + connect(curveValueSB, SIGNAL(editingFinished()), this, SLOT(valuesChanged())); + + update(); +} + +void CurveGroup::update() +{ + lock = true; + + curveTypeCB->setCurrentIndex(curve.type); + + if (curve.type == CurveReference::CURVE_REF_DIFF || curve.type == CurveReference::CURVE_REF_EXPO) { + curveGVarCB->show(); + if (curve.value > 100 || curve.value < -100) { + curveGVarCB->setChecked(true); + if (lastType != CurveReference::CURVE_REF_DIFF && lastType != CurveReference::CURVE_REF_EXPO) { + lastType = curve.type; + populateGVCB(curveValueCB, curve.value); + } + curveValueCB->show(); + curveValueSB->hide(); + } + else { + curveGVarCB->setChecked(false); + curveValueSB->setMinimum(-100); + curveValueSB->setMaximum(100); + curveValueSB->setValue(curve.value); + curveValueSB->show(); + curveValueCB->hide(); } } - */ + else { + curveGVarCB->hide(); + curveValueSB->hide(); + curveValueCB->show(); + switch (curve.type) { + case CurveReference::CURVE_REF_FUNC: + if (lastType != curve.type) { + lastType = curve.type; + curveValueCB->clear(); + for (int i=0; i<=6/*TODO constant*/; i++) { + curveValueCB->addItem(CurveReference(CurveReference::CURVE_REF_FUNC, i).toString()); + } + } + curveValueCB->setCurrentIndex(curve.value); + break; + case CurveReference::CURVE_REF_CUSTOM: + { + int numcurves = GetEepromInterface()->getCapability(NumCurves); + if (lastType != curve.type) { + lastType = curve.type; + curveValueCB->clear(); + for (int i=-numcurves; iaddItem(CurveReference(CurveReference::CURVE_REF_CUSTOM, i).toString()); + } + } + curveValueCB->setCurrentIndex(curve.value+numcurves); + break; + } + default: + break; + } + } + + lock = false; +} + +void CurveGroup::gvarCBChanged(int state) +{ + if (!lock) { + if (state) { + curve.value = 10000; // TODO constant in EEpromInterface ... + } + else { + curve.value = 0; // TODO could be better + } + + update(); + } +} + +void CurveGroup::valuesChanged() +{ + if (!lock) { + switch (curveTypeCB->currentIndex()) { + case 0: + case 1: + { + int value; + if (curveGVarCB->isChecked()) + value = curveValueCB->itemData(curveValueCB->currentIndex()).toInt(); + else + value = curveValueSB->value(); + curve = CurveReference(curveTypeCB->currentIndex() == 0 ? CurveReference::CURVE_REF_DIFF : CurveReference::CURVE_REF_EXPO, value); + break; + } + case 2: + curve = CurveReference(CurveReference::CURVE_REF_FUNC, curveValueCB->currentIndex()); + break; + case 3: + curve = CurveReference(CurveReference::CURVE_REF_CUSTOM, curveValueCB->currentIndex() - GetEepromInterface()->getCapability(NumCurves)); + break; + } + + update(); + } } void populateTrimUseCB(QComboBox *b, unsigned int phase) @@ -560,73 +700,29 @@ void populateTrimUseCB(QComboBox *b, unsigned int phase) void populateGvarUseCB(QComboBox *b, unsigned int phase) { b->addItem(QObject::tr("Own value")); - unsigned int num_phases = GetEepromInterface()->getCapability(FlightPhases); - if (num_phases>0) { - for (unsigned int i = 0; i < num_phases; i++) { - if (i != phase) { - b->addItem(QObject::tr("Flight mode %1 value").arg(i)); - } + for (int i=0; igetCapability(FlightPhases); i++) { + if (i != (int)phase) { + b->addItem(QObject::tr("Flight mode %1 value").arg(i)); } } } -void populateTimerSwitchCB(QComboBox *b, int value, int extrafields) +void populateTimerSwitchCB(QComboBox *b, int value) { b->clear(); - uint8_t endvalue=128; uint8_t count=0; - if (extrafields==2) - endvalue=192; - for (int i=-128; iaddItem(getTimerMode(i), i); if (i==value) b->setCurrentIndex(b->count()-1); - if (extrafields==2 && (i<0 || (i>3 && i model()->index(count, 0); - // This is the effective 'disable' flag - QVariant v(0); - //the magic - b->model()->setData(index, v, Qt::UserRole - 1); - } count++; } } b->setMaxVisibleItems(10); } -void populateTimerSwitchBCB(QComboBox *b, int value, int extrafields) -{ - b->clear(); - if (extrafields!=2) { - int startvalue=-128; - int endvalue=128; - if (extrafields==1) { - startvalue=-25; - endvalue=26; - } - for (int i=startvalue; iaddItem(getTimerMode(i), i); - if (i==value) - b->setCurrentIndex(b->count()-1); - } - } - } else { - for (int i=-33; i<66; i++) { - QString timerMode = getTimerModeB(i); - if (!timerMode.isEmpty()) { - b->addItem(timerMode, i); - if (i==value) - b->setCurrentIndex(b->count()-1); - } - } - } - b->setMaxVisibleItems(10); -} - QString getTimerMode(int tm) { QString stt = "OFFABSTHsTH%THt"; @@ -868,8 +964,10 @@ void populateGVCB(QComboBox *b, int value) { int selected=0; int nullitem; + b->clear(); - int pgvars=GetEepromInterface()->getCapability(GvarsOfsNum); + + int pgvars = GetEepromInterface()->getCapability(Gvars); for (int i=-pgvars; i<=-1; i++) { int16_t gval = (int16_t)(-10000+i); b->addItem(QObject::tr("-GV%1").arg(-i), gval); @@ -878,12 +976,15 @@ void populateGVCB(QComboBox *b, int value) selected=1; } } + b->addItem("---", 0); + nullitem=b->count()-1; if (value == 0) { b->setCurrentIndex(b->count()-1); selected=1; } + for (int i=1; i<=pgvars; i++) { int16_t gval = (int16_t)(10000+i); b->addItem(QObject::tr("GV%1").arg(i), gval); @@ -892,12 +993,12 @@ void populateGVCB(QComboBox *b, int value) selected=1; } } + if (selected==0) b->setCurrentIndex(nullitem); } - -void populateSourceCB(QComboBox *b, const RawSource &source, unsigned int flags) +void populateSourceCB(QComboBox *b, const RawSource & source, const ModelData & model, unsigned int flags) { RawSource item; @@ -907,7 +1008,18 @@ void populateSourceCB(QComboBox *b, const RawSource &source, unsigned int flags) item = RawSource(SOURCE_TYPE_NONE); b->addItem(item.toString(), item.toValue()); if (item == source) b->setCurrentIndex(b->count()-1); + } + if (flags & POPULATE_VIRTUAL_INPUTS) { + int virtualInputs = GetEepromInterface()->getCapability(VirtualInputs); + for (int i=0; iaddItem(item.toString(), item.toValue()); + if (item == source) b->setCurrentIndex(b->count()-1); + } + } + + if (flags & POPULATE_SOURCES) { for (int i=0; i<4+GetEepromInterface()->getCapability(Pots); i++) { item = RawSource(SOURCE_TYPE_STICK, i); b->addItem(item.toString(), item.toValue()); @@ -983,7 +1095,7 @@ void populateSourceCB(QComboBox *b, const RawSource &source, unsigned int flags) } if (flags & POPULATE_GVARS) { - for (int i=0; igetCapability(GvarsNum); i++) { + for (int i=0; igetCapability(Gvars); i++) { item = RawSource(SOURCE_TYPE_GVAR, i); b->addItem(item.toString(), item.toValue()); if (item == source) b->setCurrentIndex(b->count()-1); @@ -1061,25 +1173,20 @@ QString getSignedStr(int value) return value > 0 ? QString("+%1").arg(value) : QString("%1").arg(value); } -QString getCurveStr(int curve) -{ - QString crvStr = "!c16!c15!c14!c13!c12!c11!c10!c9 !c8 !c7 !c6 !c5 !c4 !c3 !c2 !c1 ----x>0 x<0 |x| f>0 f<0 |f| c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16 "; - return crvStr.mid((curve+C9X_MAX_CURVES) * 4, 4).remove(' ').replace("c", QObject::tr("Curve") + " "); -} - QString getGVarString(int16_t val, bool sign) { - if (val >= -10000 && val <= 10000) + if (val >= -10000 && val <= 10000) { if (sign) - return QString("(%1%)").arg(getSignedStr(val)); + return QString("%1%").arg(getSignedStr(val)); else - return QString("(%1%)").arg(val); - else - if (val<0) { - return QObject::tr("(-GV%1)").arg(-val-10000); - } else { - return QObject::tr("(GV%1)").arg(val-10000); - } + return QString("%1%").arg(val); + } + else { + if (val<0) + return QObject::tr("-GV%1").arg(-val-10000); + else + return QObject::tr("GV%1").arg(val-10000); + } } QString image2qstring(QImage image) @@ -1141,12 +1248,6 @@ int findmult(float value, float base) return mult; } -bool checkbit(int value, int bit) -{ - return ((value & (1<channels[0].type==0) - return ((fd->channels[0].ratio*value/255.0)+fd->channels[0].offset)/10; - else - return ((fd->channels[0].ratio*value/255.0)+fd->channels[0].offset); - case TELEMETRY_SOURCE_A2: - case TELEMETRY_SOURCE_A2_MIN: - if (fd->channels[1].type==0) - return ((fd->channels[1].ratio*value/255.0)+fd->channels[1].offset)/10; - else - return ((fd->channels[1].ratio*value/255.0)+fd->channels[1].offset); - case TELEMETRY_SOURCE_ALT: - case TELEMETRY_SOURCE_GPS_ALT: - case TELEMETRY_SOURCE_ALT_MAX: - case TELEMETRY_SOURCE_ALT_MIN: - return (8*value)-500; - case TELEMETRY_SOURCE_RPM: - case TELEMETRY_SOURCE_RPM_MAX: - return value * 50; - case TELEMETRY_SOURCE_T1: - case TELEMETRY_SOURCE_T2: - case TELEMETRY_SOURCE_T1_MAX: - case TELEMETRY_SOURCE_T2_MAX: - return value - 30.0; - case TELEMETRY_SOURCE_CELL: - return value*2.0/100; - case TELEMETRY_SOURCE_CELLS_SUM: - case TELEMETRY_SOURCE_VFAS: - return value/10.0; - case TELEMETRY_SOURCE_HDG: - return std::min(359, value*2); - case TELEMETRY_SOURCE_DIST_MAX: - case TELEMETRY_SOURCE_DIST: - return value * 8; - case TELEMETRY_SOURCE_CURRENT_MAX: - case TELEMETRY_SOURCE_CURRENT: - return value/2.0; - case TELEMETRY_SOURCE_POWER: - return value*5; - case TELEMETRY_SOURCE_CONSUMPTION: - return value * 20; - case TELEMETRY_SOURCE_SPEED: - case TELEMETRY_SOURCE_SPEED_MAX: - if (fd->imperial==1) - return value; - else - return value*1.852; - default: - return value; - } -} - QString getTrimInc(ModelData * g_model) { switch (g_model->trimInc) { @@ -1344,6 +1342,34 @@ QString getProtocol(ModelData * g_model) return str; } +QString getPhasesStr(unsigned int phases, ModelData & model) +{ + int numphases = GetEepromInterface()->getCapability(FlightPhases); + + if (numphases && phases) { + QString str; + int count = 0; + if (phases == (unsigned int)(1< 0) str += QString(", "); + str += getPhaseName(i+1, model.phaseData[i].name); + } + } + } + if (count > 1) + return QObject::tr("Flight modes(%1)").arg(str); + else + return QObject::tr("Flight mode(%1)").arg(str); + } + else { + return ""; + } +} + float c9xexpou(float point, float coeff) { float x=point*1024.0/100.0; @@ -1365,3 +1391,35 @@ QString getCenterBeep(ModelData * g_model) if(g_model->beepANACenter & 0x80) strl << "LS"; return strl.join(", "); } + +QString getTheme() +{ + QSettings settings; + int theme_set = settings.value("theme", 1).toInt(); + QString Theme; + switch(theme_set) { + case 0: + Theme="classic"; + break; + case 2: + Theme="monowhite"; + break; + case 3: + Theme="monoblue"; + break; + default: + Theme="monochrome"; + break; + } + return Theme; +} + +CompanionIcon::CompanionIcon(QString baseimage) +{ + static QString theme = getTheme(); + addFile(":/themes/"+theme+"/16/"+baseimage, QSize(16,16)); + addFile(":/themes/"+theme+"/24/"+baseimage, QSize(24,24)); + addFile(":/themes/"+theme+"/32/"+baseimage, QSize(32,32)); + addFile(":/themes/"+theme+"/48/"+baseimage, QSize(48,48)); +} + diff --git a/companion/src/helpers.h b/companion/src/helpers.h index d37b8f8bd..9cef155e7 100644 --- a/companion/src/helpers.h +++ b/companion/src/helpers.h @@ -6,10 +6,10 @@ #define TMR_NUM_OPTION (TMR_VAROFS+2*9+2*GetEepromInterface()->getCapability(CustomSwitches)-1) -//convert from mode 1 to mode g_eeGeneral.stickMode +//convert from mode 1 to mode generalSettings.stickMode //NOTICE! => 1..4 -> 1..4 -#define CONVERT_MODE(x) (((x)<=4) ? modn12x3[g_eeGeneral.stickMode][((x)-1)] : (x)) -#define CHANNEL_ORDER(x) (chout_ar[g_eeGeneral.templateSetup*4 + (x)-1]) +#define CONVERT_MODE(x) (((x)<=4) ? modn12x3[generalSettings.stickMode][((x)-1)] : (x)) +#define CHANNEL_ORDER(x) (chout_ar[generalSettings.templateSetup*4 + (x)-1]) #define CURVE_BASE 7 #define CH(x) (SRC_CH1+(x)-1-(SRC_SWC-SRC_3POS)) @@ -29,55 +29,101 @@ void populateTTraceCB(QComboBox *b, int value); void populateRotEncCB(QComboBox *b, int value, int renumber); void populateBacklightCB(QComboBox *b, const uint8_t value); +QString getTheme(); + +class CompanionIcon: public QIcon { + public: + CompanionIcon(QString baseimage); +}; + +class GVarGroup : public QObject { + + Q_OBJECT + + public: + GVarGroup(QCheckBox *weightGV, QSpinBox *weightSB, QComboBox *weightCB, int & weight, const int deflt, const int mini, const int maxi, const unsigned int flags=0); + + protected slots: + void gvarCBChanged(int); + void valuesChanged(); + + protected: + QCheckBox *weightGV; + QSpinBox *weightSB; + QComboBox *weightCB; + int & weight; + const unsigned int flags; + bool lock; +}; + +class CurveGroup : public QObject { + + Q_OBJECT + + public: + CurveGroup(QComboBox *curveTypeCB, QCheckBox *curveGVarCB, QComboBox *curveValueCB, QSpinBox *curveValueSB, CurveReference & curve, unsigned int flags=0); + void update(); + + protected slots: + void gvarCBChanged(int); + void valuesChanged(); + + protected: + QComboBox *curveTypeCB; + QCheckBox *curveGVarCB; + QComboBox *curveValueCB; + QSpinBox *curveValueSB; + CurveReference & curve; + unsigned int flags; + bool lock; + int lastType; +}; + #define POPULATE_ONOFF 0x01 #define POPULATE_MSWITCHES 0x02 #define POPULATE_AND_SWITCHES 0x04 void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr=0, UseContext context=DefaultContext); void populateFuncCB(QComboBox *b, unsigned int value); -void populateRepeatCB(QComboBox *b, unsigned int value); void populateGVmodeCB(QComboBox *b, unsigned int value); QString FuncParam(uint function, int value, QString paramT="",unsigned int adjustmode=0); -void populateFuncParamCB(QComboBox *b, uint function, unsigned int value, unsigned int adjustmode=0); +void populateFuncParamCB(QComboBox *b, const ModelData & model, uint function, unsigned int value, unsigned int adjustmode=0); void populateFuncParamArmTCB(QComboBox *b, ModelData * g_model, char * value, QStringList & paramsList); void populatePhasesCB(QComboBox *b, int value); void populateTrimUseCB(QComboBox *b, unsigned int phase); void populateGvarUseCB(QComboBox *b, unsigned int phase); -void populateCurvesCB(QComboBox *b, int value); void populateCustomScreenFieldCB(QComboBox *b, unsigned int value, bool last, int hubproto); -void populateExpoCurvesCB(QComboBox *b, int value); -void populateTimerSwitchCB(QComboBox *b, int value, int extrafields=0); -void populateTimerSwitchBCB(QComboBox *b, int value, int extrafields=0); +void populateTimerSwitchCB(QComboBox *b, int value); QString getCustomSwitchStr(CustomSwData * customSw, const ModelData & model); QString getProtocolStr(const int proto); +QString getPhasesStr(unsigned int phases, ModelData & model); -#define POPULATE_SOURCES 1 -#define POPULATE_TRIMS 2 -#define POPULATE_SWITCHES 4 -#define POPULATE_GVARS 8 -#define POPULATE_TELEMETRY 16 -#define POPULATE_TELEMETRYEXT 32 +#define POPULATE_SOURCES 1 +#define POPULATE_TRIMS 2 +#define POPULATE_SWITCHES 4 +#define POPULATE_GVARS 8 +#define POPULATE_TELEMETRY 16 +#define POPULATE_TELEMETRYEXT 32 +#define POPULATE_VIRTUAL_INPUTS 64 #define GVARS_VARIANT 0x0001 #define FRSKY_VARIANT 0x0002 // void populateGVarCB(QComboBox *b, int value, int min, int max,int pgvars=5); //TODO: Clean Up void populateGVCB(QComboBox *b, int value); -void populateSourceCB(QComboBox *b, const RawSource &source, unsigned int flags); +void populateSourceCB(QComboBox *b, const RawSource &source, const ModelData & model, unsigned int flags); void populateCSWCB(QComboBox *b, int value); QString getTimerMode(int tm); QString getTimerModeB(int tm); QString getPhaseName(int val, char * phasename=NULL); -QString getStickStr(int index); +QString getInputStr(ModelData & model, int index); QString getCSWFunc(int val); QString getFuncName(unsigned int val); QString getRepeatString(unsigned int val); QString getSignedStr(int value); -QString getCurveStr(int curve); QString getGVarString(int16_t val, bool sign=false); QString image2qstring(QImage image); QImage qstring2image(QString imagestr); int findmult(float value, float base); -bool checkbit(int value, int bit); QString getTrimInc(ModelData * g_model); QString getTimerStr(TimerData & timer); @@ -91,8 +137,9 @@ QString getFrSkyUnits(int units); QString getFrSkyProtocol(int protocol); QString getFrSkyMeasure(int units); QString getFrSkySrc(int index); -float getBarValue(int barId, int value, FrSkyData *fd); + float c9xexpou(float point, float coeff); float ValToTim(int value); int TimToVal(float value); + #endif // HELPERS_H diff --git a/companion/src/icon.ico b/companion/src/icon.ico index 2453af4ff..e81c703b7 100644 Binary files a/companion/src/icon.ico and b/companion/src/icon.ico differ diff --git a/companion/src/icon.png b/companion/src/icon.png index 90a961731..2936917c7 100644 Binary files a/companion/src/icon.png and b/companion/src/icon.png differ diff --git a/companion/src/icon.svg b/companion/src/icon.svg deleted file mode 100644 index c36f00f53..000000000 --- a/companion/src/icon.svg +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/companion/src/images/9CX.png b/companion/src/images/9CX.png deleted file mode 100644 index 3c1b8e453..000000000 Binary files a/companion/src/images/9CX.png and /dev/null differ diff --git a/companion/src/images/9xdb-bl.png b/companion/src/images/9xdb-bl.png index 654e2d5ae..ba1dfbd4c 100644 Binary files a/companion/src/images/9xdb-bl.png and b/companion/src/images/9xdb-bl.png differ diff --git a/companion/src/images/9xdb-gr.png b/companion/src/images/9xdb-gr.png index e474dc0dd..89778a54f 100644 Binary files a/companion/src/images/9xdb-gr.png and b/companion/src/images/9xdb-gr.png differ diff --git a/companion/src/images/9xdb-or.png b/companion/src/images/9xdb-or.png index 20bc45640..c61b410ab 100644 Binary files a/companion/src/images/9xdb-or.png and b/companion/src/images/9xdb-or.png differ diff --git a/companion/src/images/9xdb-rd.png b/companion/src/images/9xdb-rd.png index ace3657d4..2d18d84af 100644 Binary files a/companion/src/images/9xdb-rd.png and b/companion/src/images/9xdb-rd.png differ diff --git a/companion/src/images/9xdb-yl.png b/companion/src/images/9xdb-yl.png index e1e9f1e6a..158f1e94e 100644 Binary files a/companion/src/images/9xdb-yl.png and b/companion/src/images/9xdb-yl.png differ diff --git a/companion/src/images/9xdb.png b/companion/src/images/9xdb.png index 602bc9955..e6198c2a7 100644 Binary files a/companion/src/images/9xdb.png and b/companion/src/images/9xdb.png differ diff --git a/companion/src/images/companion-title.png b/companion/src/images/companion-title.png new file mode 100644 index 000000000..05f3b8709 Binary files /dev/null and b/companion/src/images/companion-title.png differ diff --git a/companion/src/images/companion9x-title.png b/companion/src/images/companion9x-title.png deleted file mode 100644 index 358bc8826..000000000 Binary files a/companion/src/images/companion9x-title.png and /dev/null differ diff --git a/companion/src/images/customize.png b/companion/src/images/customize.png index 96259b922..078d0af75 100644 Binary files a/companion/src/images/customize.png and b/companion/src/images/customize.png differ diff --git a/companion/src/images/er9x_manual.png b/companion/src/images/er9x_manual.png deleted file mode 100644 index 98f026c72..000000000 Binary files a/companion/src/images/er9x_manual.png and /dev/null differ diff --git a/companion/src/images/iconmac.icns b/companion/src/images/iconmac.icns index 3c26785d6..579b285c1 100644 Binary files a/companion/src/images/iconmac.icns and b/companion/src/images/iconmac.icns differ diff --git a/companion/src/images/linuxicons/128x128/companion.png b/companion/src/images/linuxicons/128x128/companion.png new file mode 100644 index 000000000..9b4ad31a2 Binary files /dev/null and b/companion/src/images/linuxicons/128x128/companion.png differ diff --git a/companion/src/images/linuxicons/16x16/companion.png b/companion/src/images/linuxicons/16x16/companion.png new file mode 100644 index 000000000..7fa027e14 Binary files /dev/null and b/companion/src/images/linuxicons/16x16/companion.png differ diff --git a/companion/src/images/linuxicons/22x22/companion.png b/companion/src/images/linuxicons/22x22/companion.png new file mode 100644 index 000000000..b71e62d6a Binary files /dev/null and b/companion/src/images/linuxicons/22x22/companion.png differ diff --git a/companion/src/images/linuxicons/24x24/companion.png b/companion/src/images/linuxicons/24x24/companion.png new file mode 100644 index 000000000..0ae5ffe17 Binary files /dev/null and b/companion/src/images/linuxicons/24x24/companion.png differ diff --git a/companion/src/images/linuxicons/256x256/companion.png b/companion/src/images/linuxicons/256x256/companion.png new file mode 100644 index 000000000..1ed7a9ae9 Binary files /dev/null and b/companion/src/images/linuxicons/256x256/companion.png differ diff --git a/companion/src/images/linuxicons/32x32/companion.png b/companion/src/images/linuxicons/32x32/companion.png new file mode 100644 index 000000000..0b7375c0c Binary files /dev/null and b/companion/src/images/linuxicons/32x32/companion.png differ diff --git a/companion/src/images/linuxicons/48x48/companion.png b/companion/src/images/linuxicons/48x48/companion.png new file mode 100644 index 000000000..d591f97d2 Binary files /dev/null and b/companion/src/images/linuxicons/48x48/companion.png differ diff --git a/companion/src/images/linuxicons/512x512/companion.png b/companion/src/images/linuxicons/512x512/companion.png new file mode 100644 index 000000000..6938b2c42 Binary files /dev/null and b/companion/src/images/linuxicons/512x512/companion.png differ diff --git a/companion/src/images/linuxicons/scalable/companion.svg b/companion/src/images/linuxicons/scalable/companion.svg new file mode 100644 index 000000000..95f040b15 --- /dev/null +++ b/companion/src/images/linuxicons/scalable/companion.svg @@ -0,0 +1,340 @@ + +image/svg+xml +O +P +E +N + \ No newline at end of file diff --git a/companion/src/images/originals/9CX.xcf b/companion/src/images/originals/9CX.xcf new file mode 100644 index 000000000..167a1ad10 Binary files /dev/null and b/companion/src/images/originals/9CX.xcf differ diff --git a/companion/src/images/originals/9xdb-bl.xcf b/companion/src/images/originals/9xdb-bl.xcf new file mode 100644 index 000000000..8b09f5c82 Binary files /dev/null and b/companion/src/images/originals/9xdb-bl.xcf differ diff --git a/companion/src/images/originals/9xdb-gr.xcf b/companion/src/images/originals/9xdb-gr.xcf new file mode 100644 index 000000000..416ea3f50 Binary files /dev/null and b/companion/src/images/originals/9xdb-gr.xcf differ diff --git a/companion/src/images/originals/9xdb-or.xcf b/companion/src/images/originals/9xdb-or.xcf new file mode 100644 index 000000000..0bbe3113b Binary files /dev/null and b/companion/src/images/originals/9xdb-or.xcf differ diff --git a/companion/src/images/originals/9xdb-rd.xcf b/companion/src/images/originals/9xdb-rd.xcf new file mode 100644 index 000000000..b1a389465 Binary files /dev/null and b/companion/src/images/originals/9xdb-rd.xcf differ diff --git a/companion/src/images/originals/9xdb-yl.xcf b/companion/src/images/originals/9xdb-yl.xcf new file mode 100644 index 000000000..6fc4e7883 Binary files /dev/null and b/companion/src/images/originals/9xdb-yl.xcf differ diff --git a/companion/src/images/originals/9xdb.xcf b/companion/src/images/originals/9xdb.xcf new file mode 100644 index 000000000..d0ed54593 Binary files /dev/null and b/companion/src/images/originals/9xdb.xcf differ diff --git a/companion/src/images/add.png b/companion/src/images/originals/classical icons/add.png similarity index 100% rename from companion/src/images/add.png rename to companion/src/images/originals/classical icons/add.png diff --git a/companion/src/images/arrow-left.png b/companion/src/images/originals/classical icons/arrow-left.png similarity index 100% rename from companion/src/images/arrow-left.png rename to companion/src/images/originals/classical icons/arrow-left.png diff --git a/companion/src/images/arrow-right.png b/companion/src/images/originals/classical icons/arrow-right.png similarity index 100% rename from companion/src/images/arrow-right.png rename to companion/src/images/originals/classical icons/arrow-right.png diff --git a/companion/src/images/changelog.png b/companion/src/images/originals/classical icons/changelog.png similarity index 100% rename from companion/src/images/changelog.png rename to companion/src/images/originals/classical icons/changelog.png diff --git a/companion/src/images/clear.png b/companion/src/images/originals/classical icons/clear.png similarity index 100% rename from companion/src/images/clear.png rename to companion/src/images/originals/classical icons/clear.png diff --git a/companion/src/images/compare.png b/companion/src/images/originals/classical icons/compare.png similarity index 100% rename from companion/src/images/compare.png rename to companion/src/images/originals/classical icons/compare.png diff --git a/companion/src/images/configure.png b/companion/src/images/originals/classical icons/configure.png similarity index 100% rename from companion/src/images/configure.png rename to companion/src/images/originals/classical icons/configure.png diff --git a/companion/src/images/contributors.png b/companion/src/images/originals/classical icons/contributors.png similarity index 100% rename from companion/src/images/contributors.png rename to companion/src/images/originals/classical icons/contributors.png diff --git a/companion/src/images/copy.png b/companion/src/images/originals/classical icons/copy.png similarity index 100% rename from companion/src/images/copy.png rename to companion/src/images/originals/classical icons/copy.png diff --git a/companion/src/images/currentmodel.png b/companion/src/images/originals/classical icons/currentmodel.png similarity index 100% rename from companion/src/images/currentmodel.png rename to companion/src/images/originals/classical icons/currentmodel.png diff --git a/companion/src/images/cut.png b/companion/src/images/originals/classical icons/cut.png similarity index 100% rename from companion/src/images/cut.png rename to companion/src/images/originals/classical icons/cut.png diff --git a/companion/src/images/duplicate.png b/companion/src/images/originals/classical icons/duplicate.png similarity index 100% rename from companion/src/images/duplicate.png rename to companion/src/images/originals/classical icons/duplicate.png diff --git a/companion/src/images/edit.png b/companion/src/images/originals/classical icons/edit.png similarity index 100% rename from companion/src/images/edit.png rename to companion/src/images/originals/classical icons/edit.png diff --git a/companion/src/images/exit.png b/companion/src/images/originals/classical icons/exit.png similarity index 100% rename from companion/src/images/exit.png rename to companion/src/images/originals/classical icons/exit.png diff --git a/companion/src/images/fuses.png b/companion/src/images/originals/classical icons/fuses.png similarity index 100% rename from companion/src/images/fuses.png rename to companion/src/images/originals/classical icons/fuses.png diff --git a/companion/src/images/originals/classical icons/information.png b/companion/src/images/originals/classical icons/information.png new file mode 100644 index 000000000..76b6d5966 Binary files /dev/null and b/companion/src/images/originals/classical icons/information.png differ diff --git a/companion/src/images/library.png b/companion/src/images/originals/classical icons/library.png similarity index 100% rename from companion/src/images/library.png rename to companion/src/images/originals/classical icons/library.png diff --git a/companion/src/images/list.png b/companion/src/images/originals/classical icons/list.png similarity index 100% rename from companion/src/images/list.png rename to companion/src/images/originals/classical icons/list.png diff --git a/companion/src/images/logs.png b/companion/src/images/originals/classical icons/logs.png similarity index 100% rename from companion/src/images/logs.png rename to companion/src/images/originals/classical icons/logs.png diff --git a/companion/src/images/movedown.png b/companion/src/images/originals/classical icons/movedown.png similarity index 100% rename from companion/src/images/movedown.png rename to companion/src/images/originals/classical icons/movedown.png diff --git a/companion/src/images/moveup.png b/companion/src/images/originals/classical icons/moveup.png similarity index 100% rename from companion/src/images/moveup.png rename to companion/src/images/originals/classical icons/moveup.png diff --git a/companion/src/images/new.png b/companion/src/images/originals/classical icons/new.png similarity index 100% rename from companion/src/images/new.png rename to companion/src/images/originals/classical icons/new.png diff --git a/companion/src/images/open.png b/companion/src/images/originals/classical icons/open.png similarity index 100% rename from companion/src/images/open.png rename to companion/src/images/originals/classical icons/open.png diff --git a/companion/src/images/originals/classical icons/paintbrush.png b/companion/src/images/originals/classical icons/paintbrush.png new file mode 100644 index 000000000..814fdb47e Binary files /dev/null and b/companion/src/images/originals/classical icons/paintbrush.png differ diff --git a/companion/src/images/paste.png b/companion/src/images/originals/classical icons/paste.png similarity index 100% rename from companion/src/images/paste.png rename to companion/src/images/originals/classical icons/paste.png diff --git a/companion/src/images/play.png b/companion/src/images/originals/classical icons/play.png similarity index 100% rename from companion/src/images/play.png rename to companion/src/images/originals/classical icons/play.png diff --git a/companion/src/images/preferences.png b/companion/src/images/originals/classical icons/preferences.png similarity index 100% rename from companion/src/images/preferences.png rename to companion/src/images/originals/classical icons/preferences.png diff --git a/companion/src/images/print.png b/companion/src/images/originals/classical icons/print.png similarity index 100% rename from companion/src/images/print.png rename to companion/src/images/originals/classical icons/print.png diff --git a/companion/src/images/profiles.png b/companion/src/images/originals/classical icons/profiles.png similarity index 100% rename from companion/src/images/profiles.png rename to companion/src/images/originals/classical icons/profiles.png diff --git a/companion/src/images/read_eeprom.png b/companion/src/images/originals/classical icons/read_eeprom.png similarity index 100% rename from companion/src/images/read_eeprom.png rename to companion/src/images/originals/classical icons/read_eeprom.png diff --git a/companion/src/images/read_eeprom_file.png b/companion/src/images/originals/classical icons/read_eeprom_file.png similarity index 100% rename from companion/src/images/read_eeprom_file.png rename to companion/src/images/originals/classical icons/read_eeprom_file.png diff --git a/companion/src/images/read_flash.png b/companion/src/images/originals/classical icons/read_flash.png similarity index 100% rename from companion/src/images/read_flash.png rename to companion/src/images/originals/classical icons/read_flash.png diff --git a/companion/src/images/recentdocument.png b/companion/src/images/originals/classical icons/recentdocument.png similarity index 100% rename from companion/src/images/recentdocument.png rename to companion/src/images/originals/classical icons/recentdocument.png diff --git a/companion/src/images/save.png b/companion/src/images/originals/classical icons/save.png similarity index 100% rename from companion/src/images/save.png rename to companion/src/images/originals/classical icons/save.png diff --git a/companion/src/images/saveas.png b/companion/src/images/originals/classical icons/saveas.png similarity index 100% rename from companion/src/images/saveas.png rename to companion/src/images/originals/classical icons/saveas.png diff --git a/companion/src/images/simulate.png b/companion/src/images/originals/classical icons/simulate.png similarity index 100% rename from companion/src/images/simulate.png rename to companion/src/images/originals/classical icons/simulate.png diff --git a/companion/src/images/stop.png b/companion/src/images/originals/classical icons/stop.png similarity index 100% rename from companion/src/images/stop.png rename to companion/src/images/originals/classical icons/stop.png diff --git a/companion/src/images/switch_dir.png b/companion/src/images/originals/classical icons/switch_dir.png similarity index 100% rename from companion/src/images/switch_dir.png rename to companion/src/images/originals/classical icons/switch_dir.png diff --git a/companion/src/images/update.png b/companion/src/images/originals/classical icons/update.png similarity index 100% rename from companion/src/images/update.png rename to companion/src/images/originals/classical icons/update.png diff --git a/companion/src/images/wizard.png b/companion/src/images/originals/classical icons/wizard.png similarity index 100% rename from companion/src/images/wizard.png rename to companion/src/images/originals/classical icons/wizard.png diff --git a/companion/src/images/write_eeprom.png b/companion/src/images/originals/classical icons/write_eeprom.png similarity index 100% rename from companion/src/images/write_eeprom.png rename to companion/src/images/originals/classical icons/write_eeprom.png diff --git a/companion/src/images/write_eeprom_file.png b/companion/src/images/originals/classical icons/write_eeprom_file.png similarity index 100% rename from companion/src/images/write_eeprom_file.png rename to companion/src/images/originals/classical icons/write_eeprom_file.png diff --git a/companion/src/images/write_flash.png b/companion/src/images/originals/classical icons/write_flash.png similarity index 100% rename from companion/src/images/write_flash.png rename to companion/src/images/originals/classical icons/write_flash.png diff --git a/companion/src/images/originals/companion-title.xcf b/companion/src/images/originals/companion-title.xcf new file mode 100644 index 000000000..808d8f4bc Binary files /dev/null and b/companion/src/images/originals/companion-title.xcf differ diff --git a/companion/src/images/originals/customize.xcf b/companion/src/images/originals/customize.xcf new file mode 100644 index 000000000..d5ef01df8 Binary files /dev/null and b/companion/src/images/originals/customize.xcf differ diff --git a/companion/src/images/originals/logotypes/old_opentx_companion_logo.odg b/companion/src/images/originals/logotypes/old_opentx_companion_logo.odg new file mode 100644 index 000000000..a4c4278c8 Binary files /dev/null and b/companion/src/images/originals/logotypes/old_opentx_companion_logo.odg differ diff --git a/companion/src/images/originals/logotypes/opentx_2_logo.png b/companion/src/images/originals/logotypes/opentx_2_logo.png new file mode 100644 index 000000000..aae169a8a Binary files /dev/null and b/companion/src/images/originals/logotypes/opentx_2_logo.png differ diff --git a/companion/src/images/originals/logotypes/opentx_2_logo.svg b/companion/src/images/originals/logotypes/opentx_2_logo.svg new file mode 100644 index 000000000..41b597ebe --- /dev/null +++ b/companion/src/images/originals/logotypes/opentx_2_logo.svg @@ -0,0 +1,361 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/companion/src/images/originals/logotypes/opentx_companion_logo.png b/companion/src/images/originals/logotypes/opentx_companion_logo.png new file mode 100644 index 000000000..a7c3a9032 Binary files /dev/null and b/companion/src/images/originals/logotypes/opentx_companion_logo.png differ diff --git a/companion/src/images/originals/logotypes/opentx_companion_logo.svg b/companion/src/images/originals/logotypes/opentx_companion_logo.svg new file mode 100644 index 000000000..90a78b883 --- /dev/null +++ b/companion/src/images/originals/logotypes/opentx_companion_logo.svg @@ -0,0 +1,334 @@ + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/companion/src/images/originals/logotypes/opentx_logo.png b/companion/src/images/originals/logotypes/opentx_logo.png new file mode 100644 index 000000000..f1af0cdb4 Binary files /dev/null and b/companion/src/images/originals/logotypes/opentx_logo.png differ diff --git a/companion/src/images/originals/logotypes/opentx_logo.svg b/companion/src/images/originals/logotypes/opentx_logo.svg new file mode 100644 index 000000000..95f040b15 --- /dev/null +++ b/companion/src/images/originals/logotypes/opentx_logo.svg @@ -0,0 +1,340 @@ + +image/svg+xml +O +P +E +N + \ No newline at end of file diff --git a/companion/src/images/originals/logotypes/opentx_logo_128x128.png b/companion/src/images/originals/logotypes/opentx_logo_128x128.png new file mode 100644 index 000000000..9b4ad31a2 Binary files /dev/null and b/companion/src/images/originals/logotypes/opentx_logo_128x128.png differ diff --git a/companion/src/images/originals/logotypes/opentx_logo_16x16.png b/companion/src/images/originals/logotypes/opentx_logo_16x16.png new file mode 100644 index 000000000..7fa027e14 Binary files /dev/null and b/companion/src/images/originals/logotypes/opentx_logo_16x16.png differ diff --git a/companion/src/images/originals/logotypes/opentx_logo_22x22.png b/companion/src/images/originals/logotypes/opentx_logo_22x22.png new file mode 100644 index 000000000..b71e62d6a Binary files /dev/null and b/companion/src/images/originals/logotypes/opentx_logo_22x22.png differ diff --git a/companion/src/images/originals/logotypes/opentx_logo_24x24.png b/companion/src/images/originals/logotypes/opentx_logo_24x24.png new file mode 100644 index 000000000..0ae5ffe17 Binary files /dev/null and b/companion/src/images/originals/logotypes/opentx_logo_24x24.png differ diff --git a/companion/src/images/originals/logotypes/opentx_logo_256x256.png b/companion/src/images/originals/logotypes/opentx_logo_256x256.png new file mode 100644 index 000000000..1ed7a9ae9 Binary files /dev/null and b/companion/src/images/originals/logotypes/opentx_logo_256x256.png differ diff --git a/companion/src/images/originals/logotypes/opentx_logo_32x32.png b/companion/src/images/originals/logotypes/opentx_logo_32x32.png new file mode 100644 index 000000000..0b7375c0c Binary files /dev/null and b/companion/src/images/originals/logotypes/opentx_logo_32x32.png differ diff --git a/companion/src/images/originals/logotypes/opentx_logo_48x48.png b/companion/src/images/originals/logotypes/opentx_logo_48x48.png new file mode 100644 index 000000000..d591f97d2 Binary files /dev/null and b/companion/src/images/originals/logotypes/opentx_logo_48x48.png differ diff --git a/companion/src/images/originals/logotypes/opentx_logo_512x512.png b/companion/src/images/originals/logotypes/opentx_logo_512x512.png new file mode 100644 index 000000000..6938b2c42 Binary files /dev/null and b/companion/src/images/originals/logotypes/opentx_logo_512x512.png differ diff --git a/companion/src/images/originals/logotypes/opentx_logo_64x64.png b/companion/src/images/originals/logotypes/opentx_logo_64x64.png new file mode 100644 index 000000000..0ae7c8682 Binary files /dev/null and b/companion/src/images/originals/logotypes/opentx_logo_64x64.png differ diff --git a/companion/src/images/originals/logotypes/opentx_logo_96x96.png b/companion/src/images/originals/logotypes/opentx_logo_96x96.png new file mode 100644 index 000000000..2936917c7 Binary files /dev/null and b/companion/src/images/originals/logotypes/opentx_logo_96x96.png differ diff --git a/companion/src/images/originals/monochrome icons/add64.png b/companion/src/images/originals/monochrome icons/add64.png new file mode 100644 index 000000000..718fad0c8 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/add64.png differ diff --git a/companion/src/images/originals/monochrome icons/arrow-left64.png b/companion/src/images/originals/monochrome icons/arrow-left64.png new file mode 100644 index 000000000..6fd004a19 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/arrow-left64.png differ diff --git a/companion/src/images/originals/monochrome icons/arrow-right64.png b/companion/src/images/originals/monochrome icons/arrow-right64.png new file mode 100644 index 000000000..69a2e6e09 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/arrow-right64.png differ diff --git a/companion/src/images/originals/monochrome icons/changelog64.png b/companion/src/images/originals/monochrome icons/changelog64.png new file mode 100644 index 000000000..dec43fe54 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/changelog64.png differ diff --git a/companion/src/images/originals/monochrome icons/clear64.png b/companion/src/images/originals/monochrome icons/clear64.png new file mode 100644 index 000000000..3e80f3ff9 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/clear64.png differ diff --git a/companion/src/images/originals/monochrome icons/compare64.png b/companion/src/images/originals/monochrome icons/compare64.png new file mode 100644 index 000000000..d8bc1d69b Binary files /dev/null and b/companion/src/images/originals/monochrome icons/compare64.png differ diff --git a/companion/src/images/originals/monochrome icons/configure64.png b/companion/src/images/originals/monochrome icons/configure64.png new file mode 100644 index 000000000..f0fd78cf1 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/configure64.png differ diff --git a/companion/src/images/originals/monochrome icons/contributors64.png b/companion/src/images/originals/monochrome icons/contributors64.png new file mode 100644 index 000000000..53dd1a7b1 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/contributors64.png differ diff --git a/companion/src/images/originals/monochrome icons/copy64.png b/companion/src/images/originals/monochrome icons/copy64.png new file mode 100644 index 000000000..c68e9211c Binary files /dev/null and b/companion/src/images/originals/monochrome icons/copy64.png differ diff --git a/companion/src/images/originals/monochrome icons/currentmodel64.png b/companion/src/images/originals/monochrome icons/currentmodel64.png new file mode 100644 index 000000000..c3f67e047 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/currentmodel64.png differ diff --git a/companion/src/images/originals/monochrome icons/cut64.png b/companion/src/images/originals/monochrome icons/cut64.png new file mode 100644 index 000000000..fa78a545d Binary files /dev/null and b/companion/src/images/originals/monochrome icons/cut64.png differ diff --git a/companion/src/images/originals/monochrome icons/duplicate64.png b/companion/src/images/originals/monochrome icons/duplicate64.png new file mode 100644 index 000000000..004a932a4 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/duplicate64.png differ diff --git a/companion/src/images/originals/monochrome icons/edit64.png b/companion/src/images/originals/monochrome icons/edit64.png new file mode 100644 index 000000000..68f2da48a Binary files /dev/null and b/companion/src/images/originals/monochrome icons/edit64.png differ diff --git a/companion/src/images/originals/monochrome icons/exit64.png b/companion/src/images/originals/monochrome icons/exit64.png new file mode 100644 index 000000000..d414a0551 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/exit64.png differ diff --git a/companion/src/images/originals/monochrome icons/fuses64.png b/companion/src/images/originals/monochrome icons/fuses64.png new file mode 100644 index 000000000..82b77d669 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/fuses64.png differ diff --git a/companion/src/images/originals/monochrome icons/information64.png b/companion/src/images/originals/monochrome icons/information64.png new file mode 100644 index 000000000..fb4dd298a Binary files /dev/null and b/companion/src/images/originals/monochrome icons/information64.png differ diff --git a/companion/src/images/originals/monochrome icons/library64.png b/companion/src/images/originals/monochrome icons/library64.png new file mode 100644 index 000000000..1b749f913 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/library64.png differ diff --git a/companion/src/images/originals/monochrome icons/list64.png b/companion/src/images/originals/monochrome icons/list64.png new file mode 100644 index 000000000..6245f61cc Binary files /dev/null and b/companion/src/images/originals/monochrome icons/list64.png differ diff --git a/companion/src/images/originals/monochrome icons/logs64.png b/companion/src/images/originals/monochrome icons/logs64.png new file mode 100644 index 000000000..6d0ee00ee Binary files /dev/null and b/companion/src/images/originals/monochrome icons/logs64.png differ diff --git a/companion/src/images/originals/monochrome icons/movedown64.png b/companion/src/images/originals/monochrome icons/movedown64.png new file mode 100644 index 000000000..20613585f Binary files /dev/null and b/companion/src/images/originals/monochrome icons/movedown64.png differ diff --git a/companion/src/images/originals/monochrome icons/moveup64.png b/companion/src/images/originals/monochrome icons/moveup64.png new file mode 100644 index 000000000..c6fde0d86 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/moveup64.png differ diff --git a/companion/src/images/originals/monochrome icons/new64.png b/companion/src/images/originals/monochrome icons/new64.png new file mode 100644 index 000000000..6f346af10 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/new64.png differ diff --git a/companion/src/images/originals/monochrome icons/open64.png b/companion/src/images/originals/monochrome icons/open64.png new file mode 100644 index 000000000..e4e1a7831 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/open64.png differ diff --git a/companion/src/images/originals/monochrome icons/paintbrush.png b/companion/src/images/originals/monochrome icons/paintbrush.png new file mode 100644 index 000000000..437655aee Binary files /dev/null and b/companion/src/images/originals/monochrome icons/paintbrush.png differ diff --git a/companion/src/images/originals/monochrome icons/paste64.png b/companion/src/images/originals/monochrome icons/paste64.png new file mode 100644 index 000000000..4f0f2108c Binary files /dev/null and b/companion/src/images/originals/monochrome icons/paste64.png differ diff --git a/companion/src/images/originals/monochrome icons/preferences64.png b/companion/src/images/originals/monochrome icons/preferences64.png new file mode 100644 index 000000000..058607ea4 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/preferences64.png differ diff --git a/companion/src/images/originals/monochrome icons/print64.png b/companion/src/images/originals/monochrome icons/print64.png new file mode 100644 index 000000000..f3b8c3710 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/print64.png differ diff --git a/companion/src/images/originals/monochrome icons/profiles64.png b/companion/src/images/originals/monochrome icons/profiles64.png new file mode 100644 index 000000000..27899ade0 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/profiles64.png differ diff --git a/companion/src/images/originals/monochrome icons/read_eeprom.png b/companion/src/images/originals/monochrome icons/read_eeprom.png new file mode 100644 index 000000000..cf7285047 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/read_eeprom.png differ diff --git a/companion/src/images/originals/monochrome icons/read_eeprom_2.png b/companion/src/images/originals/monochrome icons/read_eeprom_2.png new file mode 100644 index 000000000..965025aba Binary files /dev/null and b/companion/src/images/originals/monochrome icons/read_eeprom_2.png differ diff --git a/companion/src/images/originals/monochrome icons/read_eeprom_file.png b/companion/src/images/originals/monochrome icons/read_eeprom_file.png new file mode 100644 index 000000000..4a9ddb6e0 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/read_eeprom_file.png differ diff --git a/companion/src/images/originals/monochrome icons/read_eeprom_file_2.png b/companion/src/images/originals/monochrome icons/read_eeprom_file_2.png new file mode 100644 index 000000000..9c575eb53 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/read_eeprom_file_2.png differ diff --git a/companion/src/images/originals/monochrome icons/read_flash.png b/companion/src/images/originals/monochrome icons/read_flash.png new file mode 100644 index 000000000..afaeb0a72 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/read_flash.png differ diff --git a/companion/src/images/originals/monochrome icons/read_flash_2.png b/companion/src/images/originals/monochrome icons/read_flash_2.png new file mode 100644 index 000000000..4f3367a08 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/read_flash_2.png differ diff --git a/companion/src/images/originals/monochrome icons/recentdocument64.png b/companion/src/images/originals/monochrome icons/recentdocument64.png new file mode 100644 index 000000000..d1356671e Binary files /dev/null and b/companion/src/images/originals/monochrome icons/recentdocument64.png differ diff --git a/companion/src/images/originals/monochrome icons/save64.png b/companion/src/images/originals/monochrome icons/save64.png new file mode 100644 index 000000000..50c934166 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/save64.png differ diff --git a/companion/src/images/originals/monochrome icons/saveas64.png b/companion/src/images/originals/monochrome icons/saveas64.png new file mode 100644 index 000000000..df85fb89b Binary files /dev/null and b/companion/src/images/originals/monochrome icons/saveas64.png differ diff --git a/companion/src/images/originals/monochrome icons/simulate64.png b/companion/src/images/originals/monochrome icons/simulate64.png new file mode 100644 index 000000000..be9e47bbc Binary files /dev/null and b/companion/src/images/originals/monochrome icons/simulate64.png differ diff --git a/companion/src/images/originals/monochrome icons/txactionico.svg b/companion/src/images/originals/monochrome icons/txactionico.svg new file mode 100644 index 000000000..2f7ef4085 --- /dev/null +++ b/companion/src/images/originals/monochrome icons/txactionico.svg @@ -0,0 +1,816 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/companion/src/images/originals/monochrome icons/update64.png b/companion/src/images/originals/monochrome icons/update64.png new file mode 100644 index 000000000..acc8d9c43 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/update64.png differ diff --git a/companion/src/images/originals/monochrome icons/wizard64.png b/companion/src/images/originals/monochrome icons/wizard64.png new file mode 100644 index 000000000..71f45dd16 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/wizard64.png differ diff --git a/companion/src/images/originals/monochrome icons/write_eeprom.png b/companion/src/images/originals/monochrome icons/write_eeprom.png new file mode 100644 index 000000000..aba6c6371 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/write_eeprom.png differ diff --git a/companion/src/images/originals/monochrome icons/write_eeprom_2.png b/companion/src/images/originals/monochrome icons/write_eeprom_2.png new file mode 100644 index 000000000..7092df3ab Binary files /dev/null and b/companion/src/images/originals/monochrome icons/write_eeprom_2.png differ diff --git a/companion/src/images/originals/monochrome icons/write_eeprom_file.png b/companion/src/images/originals/monochrome icons/write_eeprom_file.png new file mode 100644 index 000000000..f43584b91 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/write_eeprom_file.png differ diff --git a/companion/src/images/originals/monochrome icons/write_eeprom_file_2.png b/companion/src/images/originals/monochrome icons/write_eeprom_file_2.png new file mode 100644 index 000000000..7c924904f Binary files /dev/null and b/companion/src/images/originals/monochrome icons/write_eeprom_file_2.png differ diff --git a/companion/src/images/originals/monochrome icons/write_flash.png b/companion/src/images/originals/monochrome icons/write_flash.png new file mode 100644 index 000000000..b98ea4d19 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/write_flash.png differ diff --git a/companion/src/images/originals/monochrome icons/write_flash_2.png b/companion/src/images/originals/monochrome icons/write_flash_2.png new file mode 100644 index 000000000..e63f7cae5 Binary files /dev/null and b/companion/src/images/originals/monochrome icons/write_flash_2.png differ diff --git a/companion/src/images/originals/scripts/makeblue.sh b/companion/src/images/originals/scripts/makeblue.sh new file mode 100755 index 000000000..ab0c418fc --- /dev/null +++ b/companion/src/images/originals/scripts/makeblue.sh @@ -0,0 +1,3 @@ +#!/bin/bash +mogrify -modulate 100,100,70 *.png +mogrify +level-colors "#000066","#0000cc" *.png diff --git a/companion/src/images/originals/scripts/makewhite.sh b/companion/src/images/originals/scripts/makewhite.sh new file mode 100755 index 000000000..7f274d057 --- /dev/null +++ b/companion/src/images/originals/scripts/makewhite.sh @@ -0,0 +1,3 @@ +#!/bin/bash +mogrify -negate -level 0,0,0 *.png + diff --git a/companion/src/images/originals/splash.xcf b/companion/src/images/originals/splash.xcf new file mode 100644 index 000000000..4130570dd Binary files /dev/null and b/companion/src/images/originals/splash.xcf differ diff --git a/companion/src/images/originals/splasht.xcf b/companion/src/images/originals/splasht.xcf new file mode 100644 index 000000000..66466d2cc Binary files /dev/null and b/companion/src/images/originals/splasht.xcf differ diff --git a/companion/src/images/originals/windows-icon.xcf b/companion/src/images/originals/windows-icon.xcf new file mode 100644 index 000000000..7cf9bcf71 Binary files /dev/null and b/companion/src/images/originals/windows-icon.xcf differ diff --git a/companion/src/images/splash-2012.png b/companion/src/images/splash-2012.png deleted file mode 100644 index f5afdbafa..000000000 Binary files a/companion/src/images/splash-2012.png and /dev/null differ diff --git a/companion/src/images/splash-2013.png b/companion/src/images/splash-2013.png deleted file mode 100644 index 0afa87174..000000000 Binary files a/companion/src/images/splash-2013.png and /dev/null differ diff --git a/companion/src/images/splash-ambroise.png b/companion/src/images/splash-ambroise.png deleted file mode 100644 index e7df433b5..000000000 Binary files a/companion/src/images/splash-ambroise.png and /dev/null differ diff --git a/companion/src/images/splash-hb.png b/companion/src/images/splash-hb.png deleted file mode 100644 index aadacc645..000000000 Binary files a/companion/src/images/splash-hb.png and /dev/null differ diff --git a/companion/src/images/splash-old.png b/companion/src/images/splash-old.png deleted file mode 100644 index 44a0bab1c..000000000 Binary files a/companion/src/images/splash-old.png and /dev/null differ diff --git a/companion/src/images/splash.png b/companion/src/images/splash.png index 601c590d9..e9aa7e601 100644 Binary files a/companion/src/images/splash.png and b/companion/src/images/splash.png differ diff --git a/companion/src/images/splasht.png b/companion/src/images/splasht.png index 96f1eb7ce..22a942ac5 100644 Binary files a/companion/src/images/splasht.png and b/companion/src/images/splasht.png differ diff --git a/companion/src/joystickdialog.cpp b/companion/src/joystickdialog.cpp index 55b55c761..2c77359a8 100644 --- a/companion/src/joystickdialog.cpp +++ b/companion/src/joystickdialog.cpp @@ -130,7 +130,7 @@ void joystickDialog::on_okButton_clicked() { return; } joystick->close(); - QSettings settings("companion9x", "companion9x"); + QSettings settings; settings.beginGroup("JsCalibration"); for (int i=0; i<8;i++) { settings.remove(QString("stick%1_axe").arg(i)); diff --git a/companion/src/joystickdialog.ui b/companion/src/joystickdialog.ui index 25a5fe2c9..2d18fdb0a 100644 --- a/companion/src/joystickdialog.ui +++ b/companion/src/joystickdialog.ui @@ -909,7 +909,7 @@ - + diff --git a/companion/src/lcdwidget.h b/companion/src/lcdwidget.h index 52133d8cd..9f01a0b17 100644 --- a/companion/src/lcdwidget.h +++ b/companion/src/lcdwidget.h @@ -58,7 +58,7 @@ class lcdWidget : public QWidget { QPixmap buffer(2*lcdWidth, 2*lcdHeight); QPainter p(&buffer); doPaint(p); - QSettings settings("companion9x", "companion9x"); + QSettings settings; bool toclipboard=settings.value("snapshot_to_clipboard", false).toBool(); QApplication::clipboard()->setPixmap( buffer ); if (!toclipboard) { diff --git a/companion/src/logsdialog.cpp b/companion/src/logsdialog.cpp index 4334da516..0c9702239 100644 --- a/companion/src/logsdialog.cpp +++ b/companion/src/logsdialog.cpp @@ -38,7 +38,7 @@ logsDialog::logsDialog(QWidget *parent) : ui->customPlot->legend->setSelectedFont(legendFont); ui->customPlot->legend->setSelectable(QCPLegend::spItems); // legend box shall not be selectable, only legend items ui->customPlot->legend->setVisible(false); - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString Path=settings.value("gePath", "").toString(); if (Path.isEmpty() || !QFile(Path).exists()) { ui->mapsButton->hide(); @@ -202,7 +202,7 @@ void logsDialog::on_mapsButton_clicked() { ,F_F,F_F,F_F,F_F,I_F,I_F,I_F,I_F\ ,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F}; - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString gePath=settings.value("gePath", "").toString(); if (gePath.isEmpty() || !QFile(gePath).exists()) { ui->FieldsTW->setDisabled(false); @@ -262,8 +262,8 @@ void logsDialog::on_mapsButton_clicked() { QTextStream outputStream(&geFile); outputStream << "\n\n"; outputStream << "\t\n\t\t" << logFilename << "\n"; - outputStream << "\t\t\n"; - outputStream << "\t\t\n"; + outputStream << "\t\t\n"; + outputStream << "\t\t\n"; outputStream << "\t\t\n\t\t\t\n\t\t\t\tnormal\n\t\t\t\t#multiTrack_n\n\t\t\t\n\t\t\t\n\t\t\t\thighlight\n\t\t\t\t#multiTrack_h\n\t\t\t\n\t\t\n"; outputStream << "\t\t\n"; outputStream << "\t\t\n"; @@ -295,10 +295,13 @@ void logsDialog::on_mapsButton_clicked() { } else { planeName=logFilename; } - outputStream << "\t\t\n\t\t\tLog Data\n\t\t\t\n\t\t\t\t" << planeName << "\n\t\t\t\t#multiTrack\n\t\t\t\t\n"; + outputStream << "\t\t\n\t\t\tLog Data\n\t\t\t\n\t\t\t\t" << planeName << ""; + outputStream << "\n\t\t\t\t#multiTrack"; + outputStream << "\n\t\t\t\t\n"; + outputStream << "\n\t\t\t\t\tabsolute\n"; for (int i=1; ilogTable->item(i-1,1)->isSelected() &&rangeSelected) || !rangeSelected) { - QString tstamp=csvlog.at(i).at(0)+QString("T")+csvlog.at(i).at(1); + QString tstamp=csvlog.at(i).at(0)+QString("T")+csvlog.at(i).at(1)+QString("Z"); outputStream << "\t\t\t\t\t"<< tstamp <<"\n"; } } @@ -319,7 +322,7 @@ void logsDialog::on_mapsButton_clicked() { } latitude.sprintf("%3.8f", flatitude); longitude.sprintf("%3.8f", flongitude); - outputStream << "\t\t\t\t\t" << longitude << " " << latitude << " " << csvlog.at(i).at(altcol) << "\n" ; + outputStream << "\t\t\t\t\t" << longitude << " " << latitude << " " << csvlog.at(i).at(altcol).toFloat() << " \n" ; } } outputStream << "\t\t\t\t\t\n\t\t\t\t\t\t\n"; @@ -341,10 +344,14 @@ void logsDialog::on_mapsButton_clicked() { outputStream << "\t\t\t\t\t\t\t\n"; } } - outputStream << "\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n"; + outputStream << "\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n"; geFile.close(); - - QStringList parameters; + QStringList parameters; +#ifdef __APPLE__ + gePath = "/usr/bin/open"; + parameters << "-a"; + parameters << "Google\ Earth"; +#endif parameters << geFilename; QProcess *process = new QProcess(this); process->start(gePath, parameters); @@ -578,7 +585,7 @@ void logsDialog::moveLegend() void logsDialog::on_fileOpen_BT_clicked() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString fileName = QFileDialog::getOpenFileName(this,tr("Select your log file"), settings.value("lastLogDir").toString()); if (!fileName.isEmpty()) { settings.setValue("lastLogDir", fileName); @@ -687,7 +694,7 @@ bool logsDialog::cvsFileParse() file.close(); if (errors>1) { - QMessageBox::warning(this, "companion9x", tr("The selected logfile contains %1 invalid lines out of %2 total lines").arg(errors).arg(lines)); + QMessageBox::warning(this, "Companion", tr("The selected logfile contains %1 invalid lines out of %2 total lines").arg(errors).arg(lines)); } plotLock=true; int n=csvlog.count(); diff --git a/companion/src/logsdialog.ui b/companion/src/logsdialog.ui index deee92d6b..c645110d0 100644 --- a/companion/src/logsdialog.ui +++ b/companion/src/logsdialog.ui @@ -11,10 +11,10 @@ - Companion9x log viewer + Companion Log Viewer - + :/icon.png:/icon.png @@ -262,7 +262,7 @@ - + :/images/maps.png:/images/maps.png @@ -285,7 +285,7 @@ - + diff --git a/companion/src/main.cpp b/companion/src/main.cpp index 700536602..ffaea6801 100644 --- a/companion/src/main.cpp +++ b/companion/src/main.cpp @@ -76,54 +76,68 @@ class MyProxyStyle : public QProxyStyle int main(int argc, char *argv[]) { - Q_INIT_RESOURCE(companion9x); - QApplication app(argc, argv); - app.setApplicationName("Companion9x"); + Q_INIT_RESOURCE(companion); + QApplication app(argc, argv); + app.setApplicationName("OpenTX Companion"); + app.setOrganizationName("OpenTX"); + app.setOrganizationDomain("open-tx.org"); + #ifdef __APPLE__ - app.setStyle(new MyProxyStyle); + app.setStyle(new MyProxyStyle); #endif - QString dir; - if(argc) dir = QFileInfo(argv[0]).canonicalPath() + "/lang"; - QSettings settings("companion9x", "companion9x"); - QString locale = settings.value("locale",QLocale::system().name()).toString(); - bool showSplash = settings.value("show_splash", true).toBool(); + // Start by borrowing any left over settings from companion9x + QSettings c9x_settings("companion9x", "companion9x"); + QSettings settings; - QTranslator companion9xTranslator; - companion9xTranslator.load(":/companion9x_" + locale); - QTranslator qtTranslator; - qtTranslator.load((QString)"qt_" + locale.left(2), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); -// qDebug() << locale; -// qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); - app.installTranslator(&companion9xTranslator); - app.installTranslator(&qtTranslator); - - QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); - - QString firmware_id = settings.value("firmware", default_firmware_variant.id).toString(); - firmware_id.replace("open9x", "opentx"); - firmware_id.replace("x9da", "taranis"); - QPixmap pixmap; - if (firmware_id.contains("taranis")) - pixmap = QPixmap(":/images/splasht.png"); - else - pixmap = QPixmap(":/images/splash.png"); - QSplashScreen *splash = new QSplashScreen(pixmap); - - RegisterFirmwares(); - - settings.setValue("firmware", firmware_id); - current_firmware_variant = GetFirmwareVariant(firmware_id); - // qDebug() << current_firmware_variant; - - if (showSplash) { - splash->show(); - splash->showMessage(QObject::tr("")); - sleep(SPLASH_TIME); + if (!settings.contains("pos")) { + QStringList keys = c9x_settings.allKeys(); + for (QStringList::iterator i=keys.begin(); i!=keys.end(); i++) { + settings.setValue(*i, c9x_settings.value(*i)); } + } - MainWindow mainWin; - mainWin.show(); - splash->finish(&mainWin); - return app.exec(); + QString dir; + if (argc) dir = QFileInfo(argv[0]).canonicalPath() + "/lang"; + + QString locale = settings.value("locale",QLocale::system().name()).toString(); + bool showSplash = settings.value("show_splash", true).toBool(); + + QTranslator companionTranslator; + companionTranslator.load(":/companion_" + locale); + QTranslator qtTranslator; + qtTranslator.load((QString)"qt_" + locale.left(2), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); + app.installTranslator(&companionTranslator); + app.installTranslator(&qtTranslator); + + QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); + + QString firmware_id = settings.value("firmware", default_firmware_variant.id).toString(); + firmware_id.replace("open9x", "opentx"); + firmware_id.replace("x9da", "taranis"); + + QPixmap pixmap = QPixmap(firmware_id.contains("taranis") ? ":/images/splasht.png" : ":/images/splash.png"); + QSplashScreen *splash = new QSplashScreen(pixmap); + + RegisterFirmwares(); + + settings.setValue("firmware", firmware_id); + current_firmware_variant = GetFirmwareVariant(firmware_id); + + MainWindow *mainWin = new MainWindow(); + if (showSplash) { + splash->show(); + QTimer::singleShot(1000*SPLASH_TIME, splash, SLOT(close())); + QTimer::singleShot(1000*SPLASH_TIME, mainWin, SLOT(show())); + } + else { + mainWin->show(); + } + + int result = app.exec(); + + delete splash; + delete mainWin; + + return result; } diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index b428332c5..720a003a5 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -59,29 +59,29 @@ #include "burndialog.h" #include "hexinterface.h" #include "warnings.h" -#include "firmwares/opentx/open9xinterface.h" // TODO get rid of this include +#include "helpers.h" +#include "firmwares/opentx/opentxinterface.h" // TODO get rid of this include + +#define DONATE_STR "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QUZ48K4SEXDP2" -#define DONATE_STR "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QUZ48K4SEXDP2" #ifdef __APPLE__ -#define C9X_STAMP "http://companion9x.googlecode.com/svn/trunk/companion9x-macosx.stamp" -#define C9X_INSTALLER "/Companion9xMacUpdate.%1.pkg.zip" -#define C9X_URL "http://companion9x.googlecode.com/files/Companion9xMacUpdate.%1.pkg.zip" + #define C9X_STAMP OPENTX_COMPANION_DOWNLOADS "/companion-macosx.stamp" + #define C9X_INSTALLER "/CompanionMacUpdate.%1.pkg.zip" #else -#define C9X_STAMP "http://companion9x.googlecode.com/svn/trunk/companion9x.stamp" -#define C9X_INSTALLER "/companion9xInstall_v%1.exe" -#define C9X_URL "http://companion9x.googlecode.com/files/companion9xInstall_v%1.exe" + #define C9X_STAMP OPENTX_COMPANION_DOWNLOADS "/companion-windows.stamp" + #define C9X_INSTALLER "/companionInstall_%1.exe" #endif #if defined WIN32 || !defined __GNUC__ -#include -#define sleep(x) Sleep(x*1000) + #include + #define sleep(x) Sleep(x*1000) #else -#include -#include "mountlist.h" + #include + #include "mountlist.h" #endif MainWindow::MainWindow(): -downloadDialog_forWait(NULL) + downloadDialog_forWait(NULL) { mdiArea = new QMdiArea; mdiArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); @@ -94,6 +94,26 @@ downloadDialog_forWait(NULL) this, SLOT(setActiveSubWindow(QWidget*))); MaxRecentFiles=MAX_RECENT; + QSettings settings; + int icon_size=settings.value("icon_size", 1).toInt(); + switch (icon_size) { + case 0: + ISize="16"; + break; + case 1: + ISize="24"; + break; + case 2: + ISize="32"; + break; + case 3: + ISize="48"; + break; + default: + ISize="24"; + break; + } + restoreGeometry(settings.value("mainWindowGeometry").toByteArray()); createActions(); createMenus(); createToolBars(); @@ -103,18 +123,25 @@ downloadDialog_forWait(NULL) readSettings(); FirmwareInfo *firmware = GetCurrentFirmware(); if (ActiveProfile) { - setWindowTitle(tr("companion9x - Models and Settings Editor - %1 - profile %2").arg(firmware->name).arg(ActiveProfileName)); + setWindowTitle(tr("Companion - Models and Settings Editor - %1 - profile %2").arg(firmware->name).arg(ActiveProfileName)); } else { - setWindowTitle(tr("companion9x - Models and Settings Editor - %1").arg(firmware->name)); + setWindowTitle(tr("Companion - Models and Settings Editor - %1").arg(firmware->name)); } setUnifiedTitleAndToolBarOnMac(true); this->setWindowIcon(QIcon(":/icon.png")); + this->setIconSize(QSize(32,32)); QNetworkProxyFactory::setUseSystemConfiguration(true); setAcceptDrops(true); - // give time to the main windows to open before starting updates, delay 1s - QTimer::singleShot(1000, this, SLOT(doAutoUpdates())); - QTimer::singleShot(1000, this, SLOT(displayWarnings())); + // give time to the splash to disappear and main window to open before starting updates + int updateDelay = 1000; + bool showSplash = settings.value("show_splash", true).toBool(); + if (showSplash) { + updateDelay += (SPLASH_TIME*1000); + } + QTimer::singleShot(updateDelay, this, SLOT(doAutoUpdates())); + QTimer::singleShot(updateDelay, this, SLOT(displayWarnings())); + QStringList strl = QApplication::arguments(); QString str; QString printfilename; @@ -161,16 +188,16 @@ downloadDialog_forWait(NULL) void MainWindow::displayWarnings() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; int warnId=settings.value("warningId", 0 ).toInt(); if (warnId0) { - QMessageBox::warning(this, "companion9x", WARNING); - res = QMessageBox::question(this, "companion9x",tr("Display previous warning again at startup ?"),QMessageBox::Yes | QMessageBox::No); + QMessageBox::warning(this, "Companion", WARNING); + res = QMessageBox::question(this, "Companion",tr("Display previous warning again at startup ?"),QMessageBox::Yes | QMessageBox::No); } else { - QMessageBox::about(this, "companion9x", WARNING); - res = QMessageBox::question(this, "companion9x",tr("Display previous message again at startup ?"),QMessageBox::Yes | QMessageBox::No); + QMessageBox::about(this, "Companion", WARNING); + res = QMessageBox::question(this, "Companion",tr("Display previous message again at startup ?"),QMessageBox::Yes | QMessageBox::No); } if (res == QMessageBox::No) { settings.setValue("warningId", WARNING_ID); @@ -195,7 +222,7 @@ void MainWindow::checkForUpdates(bool ignoreSettings, QString & fwId) showcheckForUpdatesResult = ignoreSettings; check1done = true; check2done = true; - QSettings settings("companion9x", "companion9x"); + QSettings settings; fwToUpdate = fwId; QString stamp = GetFirmware(fwToUpdate)->stamp; @@ -243,7 +270,7 @@ void MainWindow::checkForUpdateFinished(QNetworkReply * reply) QString version = qba.mid(i+14, 4); if (version.isNull()) { - QMessageBox::warning(this, "companion9x", tr("Unable to check for updates.")); + QMessageBox::warning(this, "Companion", tr("Unable to check for updates.")); return; } double vnum=version.toDouble(); @@ -257,11 +284,11 @@ void MainWindow::checkForUpdateFinished(QNetworkReply * reply) if (c9xver< vnum) { #if defined WIN32 || !defined __GNUC__ // || defined __APPLE__ // OSX should only notify of updates since no update packages are available. showcheckForUpdatesResult = false; // update is available - do not show dialog - int ret = QMessageBox::question(this, "companion9x", tr("A new version of companion9x is available (version %1)
" + int ret = QMessageBox::question(this, "Companion", tr("A new version of Companion is available (version %1)
" "Would you like to download it?").arg(version) , QMessageBox::Yes | QMessageBox::No); - QSettings settings("companion9x", "companion9x"); + QSettings settings; if (ret == QMessageBox::Yes) { #if defined __APPLE__ @@ -271,28 +298,28 @@ void MainWindow::checkForUpdateFinished(QNetworkReply * reply) #endif if (!fileName.isEmpty()) { settings.setValue("lastUpdatesDir", QFileInfo(fileName).dir().absolutePath()); - downloadDialog * dd = new downloadDialog(this, QString(C9X_URL).arg(version), fileName); + downloadDialog * dd = new downloadDialog(this, QString(OPENTX_COMPANION_DOWNLOADS C9X_INSTALLER).arg(version), fileName); installer_fileName = fileName; connect(dd, SIGNAL(accepted()), this, SLOT(updateDownloaded())); dd->show(); } } #else - QMessageBox::warning(this, tr("New release available"), tr("A new release of companion is available please check the repository")); + QMessageBox::warning(this, tr("New release available"), tr("A new release of Companion is available please check the OpenTX website!")); #endif } else { if (showcheckForUpdatesResult && check1done && check2done) - QMessageBox::information(this, "companion9x", tr("No updates available at this time.")); + QMessageBox::information(this, "Companion", tr("No updates available at this time.")); } } else { if(check1done && check2done) - QMessageBox::warning(this, "companion9x", tr("Unable to check for updates.")); + QMessageBox::warning(this, "Companion", tr("Unable to check for updates.")); } } void MainWindow::updateDownloaded() { - int ret = QMessageBox::question(this, "companion9x", tr("Would you like to launch the installer?") , + int ret = QMessageBox::question(this, "Companion", tr("Would you like to launch the installer?") , QMessageBox::Yes | QMessageBox::No); if (ret == QMessageBox::Yes) { if(QDesktopServices::openUrl(QUrl::fromLocalFile(installer_fileName))) @@ -303,7 +330,7 @@ void MainWindow::updateDownloaded() void MainWindow::downloadLatestFW(FirmwareInfo * firmware, const QString & firmwareId) { QString url, ext, cpuid; - QSettings settings("companion9x", "companion9x"); + QSettings settings; url = firmware->getUrl(firmwareId); cpuid=settings.value("cpuid","").toString(); ext = url.mid(url.lastIndexOf(".")); @@ -326,7 +353,7 @@ void MainWindow::downloadLatestFW(FirmwareInfo * firmware, const QString & firmw void MainWindow::reply1Accepted() { QString errormsg; - QSettings settings("companion9x", "companion9x"); + QSettings settings; bool autoflash=settings.value("burnFirmware", true).toBool(); bool addversion=settings.value("rename_firmware_files", false).toBool(); settings.beginGroup("FwRevisions"); @@ -356,7 +383,7 @@ void MainWindow::reply1Accepted() errormsg=tr("Compilation server too busy, try later"); break; case 4: - errormsg=tr("Compilation server requires registration, please check opentx web site"); + errormsg=tr("Compilation server requires registration, please check OpenTX web site"); break; default: errormsg=tr("Unknown server failure, try later"); @@ -396,7 +423,7 @@ void MainWindow::reply1Accepted() errormsg=tr("Compilation server too busy, try later"); break; case 4: - errormsg=tr("Compilation server requires registration, please check opentx web site"); + errormsg=tr("Compilation server requires registration, please check OpenTX web site"); break; default: errormsg=tr("Unknown server failure, try later"); @@ -427,7 +454,7 @@ void MainWindow::reply1Accepted() } settings.setValue(downloadedFW, currentFWrev); if (autoflash) { - int ret = QMessageBox::question(this, "companion9x", tr("Do you want to write the firmware to the transmitter now ?"), QMessageBox::Yes | QMessageBox::No); + int ret = QMessageBox::question(this, "Companion", tr("Do you want to write the firmware to the transmitter now ?"), QMessageBox::Yes | QMessageBox::No); if (ret == QMessageBox::Yes) { burnToFlash(downloadedFWFilename); } @@ -450,7 +477,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply) // TODO delete downloadDialog_forWait? } - QSettings settings("companion9x", "companion9x"); + QSettings settings; cpuid=settings.value("cpuid","").toString(); QByteArray qba = reply->readAll(); int i = qba.indexOf("SVN_VERS"); @@ -464,7 +491,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply) QString newrev=qba.mid(k).replace('"', "").trimmed(); if(!cres) { - QMessageBox::warning(this, "companion9x", tr("Unable to check for updates.")); + QMessageBox::warning(this, "Companion", tr("Unable to check for updates.")); int server = settings.value("fwserver",0).toInt(); server++; settings.setValue("fwserver",server); @@ -484,6 +511,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply) showcheckForUpdatesResult = false; // update is available - do not show dialog QString rn = GetFirmware(fwToUpdate)->rnurl; QAbstractButton *rnButton; + msgBox.setWindowTitle("Companion"); msgBox.setInformativeText(tr("Firmware %1 does not seem to have ever been downloaded.\nVersion %2 is available.\nDo you want to download it now ?").arg(fwToUpdate).arg(NewFwRev)); QAbstractButton *YesButton = msgBox.addButton(trUtf8("Yes"), QMessageBox::YesRole); msgBox.addButton(trUtf8("No"), QMessageBox::NoRole); @@ -496,7 +524,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply) if( msgBox.clickedButton() == rnButton ) { contributorsDialog *cd = new contributorsDialog(this,2,rn); cd->exec(); - int ret2 = QMessageBox::question(this, "companion9x", tr("Do you want to download release %1 now ?").arg(NewFwRev), + int ret2 = QMessageBox::question(this, "Companion", tr("Do you want to download release %1 now ?").arg(NewFwRev), QMessageBox::Yes | QMessageBox::No); if (ret2 == QMessageBox::Yes) { download = true; @@ -512,7 +540,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply) showcheckForUpdatesResult = false; // update is available - do not show dialog QString rn = GetFirmware(fwToUpdate)->rnurl; QAbstractButton *rnButton; - msgBox.setText("companion9x"); + msgBox.setText("Companion"); msgBox.setInformativeText(tr("A new version of %1 firmware is available (current %2 - newer %3).\nDo you want to download it now ?").arg(fwToUpdate).arg(OldFwRev).arg(NewFwRev)); QAbstractButton *YesButton = msgBox.addButton(trUtf8("Yes"), QMessageBox::YesRole); msgBox.addButton(trUtf8("No"), QMessageBox::NoRole); @@ -526,7 +554,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply) warning=0; contributorsDialog *cd = new contributorsDialog(this,2,rn); cd->exec(); - int ret2 = QMessageBox::question(this, "companion9x", tr("Do you want to download release %1 now ?").arg(NewFwRev), + int ret2 = QMessageBox::question(this, "Companion", tr("Do you want to download release %1 now ?").arg(NewFwRev), QMessageBox::Yes | QMessageBox::No); if (ret2 == QMessageBox::Yes) { download = true; @@ -540,10 +568,10 @@ void MainWindow::reply1Finished(QNetworkReply * reply) } } else { if(showcheckForUpdatesResult && check1done && check2done) - QMessageBox::information(this, "companion9x", tr("No updates available at this time.")); + QMessageBox::information(this, "Companion", tr("No updates available at this time.")); } if (ignore) { - int res = QMessageBox::question(this, "companion9x",tr("Ignore this version (r%1)?").arg(rev), QMessageBox::Yes | QMessageBox::No); + int res = QMessageBox::question(this, "Companion",tr("Ignore this version (r%1)?").arg(rev), QMessageBox::Yes | QMessageBox::No); if (res==QMessageBox::Yes) { settings.beginGroup("FwRevisions"); settings.setValue(fwToUpdate, NewFwRev); @@ -553,7 +581,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply) if (warning>0) { QString rn = GetFirmware(fwToUpdate)->rnurl; if (!rn.isEmpty()) { - int ret2 = QMessageBox::warning(this, "companion9x", tr("Release notes contain very important informations. Do you want to see them now ?"), QMessageBox::Yes | QMessageBox::No); + int ret2 = QMessageBox::warning(this, "Companion", tr("Release notes contain very important informations. Do you want to see them now ?"), QMessageBox::Yes | QMessageBox::No); if (ret2 == QMessageBox::Yes) { contributorsDialog *cd = new contributorsDialog(this,2,rn); cd->exec(); @@ -586,11 +614,11 @@ void MainWindow::reply1Finished(QNetworkReply * reply) } } } else { - QMessageBox::warning(this, "companion9x", tr("Unable to check for updates.")); + QMessageBox::warning(this, "Companion", tr("Unable to check for updates.")); } } else { if(check1done && check2done) { - QMessageBox::warning(this, "companion9x", tr("Unable to check for updates.")); + QMessageBox::warning(this, "Companion", tr("Unable to check for updates.")); int server = settings.value("fwserver",0).toInt(); server++; settings.setValue("fwserver",server); @@ -601,11 +629,14 @@ void MainWindow::reply1Finished(QNetworkReply * reply) void MainWindow::closeEvent(QCloseEvent *event) { + QSettings settings; + settings.setValue("mainWindowGeometry", saveGeometry()); + settings.setValue("mainWindowState", saveState()); mdiArea->closeAllSubWindows(); if (mdiArea->currentSubWindow()) { event->ignore(); - } else { - writeSettings(); + } + else { event->accept(); } } @@ -619,7 +650,7 @@ void MainWindow::newFile() void MainWindow::openFile() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString fileName = QFileDialog::getOpenFileName(this, tr("Open"), settings.value("lastDir").toString(),tr(EEPROM_FILES_FILTER)); if (!fileName.isEmpty()) { settings.setValue("lastDir", QFileInfo(fileName).dir().absolutePath()); @@ -652,7 +683,7 @@ void MainWindow::saveAs() void MainWindow::openRecentFile() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QAction *action = qobject_cast(sender()); if (action) { QString fileName=action->data().toString(); @@ -674,14 +705,14 @@ void MainWindow::openRecentFile() void MainWindow::loadProfile() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QAction *action = qobject_cast(sender()); int chord,defmod, burnfw; bool renfw; if (action) { int profnum=action->data().toInt(); - QSettings settings("companion9x", "companion9x"); + QSettings settings; settings.setValue("ActiveProfile",profnum); settings.beginGroup("Profiles"); QString profile=QString("profile%1").arg(profnum); @@ -712,13 +743,13 @@ void MainWindow::loadProfile() settings.setValue("profileId", profnum); current_firmware_variant = GetFirmwareVariant(firmware_id); FirmwareInfo *firmware = GetCurrentFirmware(); - setWindowTitle(tr("companion9x - Models and Settings Editor - %1").arg(firmware->name)); + setWindowTitle(tr("Companion - Models and Settings Editor - %1").arg(firmware->name)); // settings.setValue("lastDir", QFileInfo(fileName).dir().absolutePath()); foreach (QMdiSubWindow *window, mdiArea->subWindowList()) { MdiChild *mdiChild = qobject_cast(window->widget()); mdiChild->eepromInterfaceChanged(); } - setWindowTitle(tr("companion9x - Models and Settings Editor - %1 - profile %2").arg(firmware->name).arg(ActiveProfileName)); + setWindowTitle(tr("Companion - Models and Settings Editor - %1 - profile %2").arg(firmware->name).arg(ActiveProfileName)); } } @@ -726,10 +757,10 @@ void MainWindow::unloadProfile() { ActiveProfile=0; ActiveProfileName=""; - QSettings settings("companion9x", "companion9x"); - settings.setValue("ActiveProfile",0); + QSettings settings; + settings.setValue("ActiveProfile", 0); FirmwareInfo *firmware = GetCurrentFirmware(); - setWindowTitle(tr("companion9x - Models and Settings Editor - %1").arg(firmware->name)); + setWindowTitle(tr("Companion - Models and Settings Editor - %1").arg(firmware->name)); } void MainWindow::preferences() @@ -738,9 +769,10 @@ void MainWindow::preferences() pd->exec(); FirmwareInfo *firmware = GetCurrentFirmware(); if (ActiveProfile) { - setWindowTitle(tr("companion9x - Models and Settings Editor - %1 - profile %2").arg(firmware->name).arg(ActiveProfileName)); - } else { - setWindowTitle(tr("companion9x - Models and Settings Editor - %1").arg(firmware->name)); + setWindowTitle(tr("Companion - Models and Settings Editor - %1 - profile %2").arg(firmware->name).arg(ActiveProfileName)); + } + else { + setWindowTitle(tr("Companion - Models and Settings Editor - %1").arg(firmware->name)); } foreach (QMdiSubWindow *window, mdiArea->subWindowList()) { @@ -1049,17 +1081,17 @@ void MainWindow::burnFrom() QStringList str; str << path << tempFile; avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Read Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN); - ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); res = ad->exec(); sleep(1); } } else { QStringList str = GetReceiveEEpromCommand(tempFile); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Read Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN); - ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); res = ad->exec(); } - if(QFileInfo(tempFile).exists() && res) { + if (QFileInfo(tempFile).exists() && res) { MdiChild *child = createMdiChild(); child->newFile(); child->loadFile(tempFile, false); @@ -1069,17 +1101,17 @@ void MainWindow::burnFrom() void MainWindow::burnExtenalToEEPROM() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString fileName; bool backup = false; burnDialog *cd = new burnDialog(this, 1, &fileName, &backup); cd->exec(); if (!fileName.isEmpty()) { settings.setValue("lastDir", QFileInfo(fileName).dir().absolutePath()); - int ret = QMessageBox::question(this, "companion9x", tr("Write Models and settings from %1 to the Tx?").arg(QFileInfo(fileName).fileName()), QMessageBox::Yes | QMessageBox::No); + int ret = QMessageBox::question(this, "Companion", tr("Write Models and settings from %1 to the Tx?").arg(QFileInfo(fileName).fileName()), QMessageBox::Yes | QMessageBox::No); if (ret != QMessageBox::Yes) return; if (!isValidEEPROM(fileName)) - ret = QMessageBox::question(this, "companion9x", tr("The file %1\nhas not been recognized as a valid Models and Settings file\nWrite anyway ?").arg(QFileInfo(fileName).fileName()), QMessageBox::Yes | QMessageBox::No); + ret = QMessageBox::question(this, "Companion", tr("The file %1\nhas not been recognized as a valid Models and Settings file\nWrite anyway ?").arg(QFileInfo(fileName).fileName()), QMessageBox::Yes | QMessageBox::No); if (ret != QMessageBox::Yes) return; bool backupEnable = settings.value("backupEnable", true).toBool(); QString backupPath = settings.value("backupPath", "").toString(); @@ -1106,14 +1138,14 @@ void MainWindow::burnExtenalToEEPROM() QStringList str; str << path << backupFile; avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Backup Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN); - ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); ad->exec(); sleep(1); } } else { QStringList str = GetReceiveEEpromCommand(backupFile); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Backup Models and Settings From Tx")); - ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); ad->exec(); sleep(1); } @@ -1123,7 +1155,7 @@ void MainWindow::burnExtenalToEEPROM() QString tempFlash = tempDir + "/flash.bin"; QStringList str = GetReceiveFlashCommand(tempFlash); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Read Firmware From Tx"); - ad->setWindowIcon(QIcon(":/images/read_flash.png")); + ad->setWindowIcon(CompanionIcon("read_flash.png")); ad->exec(); sleep(1); QString restoreFile = tempDir + "/compat.bin"; @@ -1136,7 +1168,8 @@ void MainWindow::burnExtenalToEEPROM() int rev = getEpromVersion(restoreFile); if ((rev / 100) != (oldrev / 100)) { QMessageBox::warning(this, tr("Warning"), tr("The transmitter firmware belongs to another product family, check file and preferences!")); - } else if (rev < oldrev) { + } + else if (rev < oldrev) { QMessageBox::warning(this, tr("Warning"), tr("The transmitter firmware is outdated, please upgrade!")); } fileName = restoreFile; @@ -1156,15 +1189,18 @@ void MainWindow::burnExtenalToEEPROM() QStringList str; str << path << backupFile; avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Backup Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN); - ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); ad->exec(); + delete ad; sleep(1); } - } else { + } + else { QStringList str = ((MainWindow *)this->parent())->GetReceiveEEpromCommand(backupFile); avrOutputDialog *ad = new avrOutputDialog(this, ((MainWindow *)this->parent())->GetAvrdudeLocation(), str, tr("Backup Models and Settings From Tx")); - ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); ad->exec(); + delete ad; sleep(1); } } @@ -1174,19 +1210,23 @@ void MainWindow::burnExtenalToEEPROM() if (path.isEmpty()) { QMessageBox::warning(this, tr("Taranis radio not found"), tr("Impossible to identify the radio on your system, please verify the eeprom disk is connected.")); return; - } else { + } + else { QStringList str; str << fileName << path; avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Write Models and Settings To Tx")); //, AVR_DIALOG_KEEP_OPEN); - ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); ad->exec(); + delete ad; sleep(1); } - } else { + } + else { QStringList str = GetSendEEpromCommand(fileName); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Write Models and Settings To Tx", AVR_DIALOG_SHOW_DONE); - ad->setWindowIcon(QIcon(":/images/write_eeprom.png")); + ad->setWindowIcon(CompanionIcon("write_eeprom.png")); ad->exec(); + delete ad; } } } @@ -1218,34 +1258,29 @@ bool MainWindow::isValidEEPROM(QString eepromfile) return false; } file.close(); - RadioData radioData; - if (!LoadEeprom(radioData, eeprom, eeprom_size)) { - free(eeprom); - return false; - } else { - free(eeprom); - return true; - } - } else if (fileType==FILE_TYPE_BIN) { //read binary + RadioData * radioData = new RadioData(); + bool result = LoadEeprom(*radioData, eeprom, eeprom_size); + free(eeprom); + delete radioData; + return result; + } + else if (fileType==FILE_TYPE_BIN) { //read binary if (!file.open(QFile::ReadOnly)) return false; eeprom_size = file.size(); uint8_t *eeprom = (uint8_t *)malloc(eeprom_size); memset(eeprom, 0, eeprom_size); - long result = file.read((char*)eeprom, eeprom_size); + long read = file.read((char*)eeprom, eeprom_size); file.close(); - if (result != eeprom_size) { + if (read != eeprom_size) { free(eeprom); return false; } - RadioData radioData; - if (!LoadEeprom(radioData, eeprom, eeprom_size)) { - free(eeprom); - return false; - } else { - free(eeprom); - return true; - } + RadioData * radioData = new RadioData(); + bool result = LoadEeprom(*radioData, eeprom, eeprom_size); + free(eeprom); + delete radioData; + return result; } return false; } @@ -1283,7 +1318,8 @@ bool MainWindow::convertEEPROM(QString backupFile, QString restoreFile, QString } else { version = fwBuild.toInt(); // TODO changer le nom de la variable } - } else { + } + else { version = ((Open9xFirmware *)firmware)->getEepromVersion(revision); } } @@ -1300,11 +1336,8 @@ bool MainWindow::convertEEPROM(QString backupFile, QString restoreFile, QString long result = file.read((char*)eeprom, eeprom_size); file.close(); - RadioData radioData; - if (!LoadEeprom(radioData, eeprom, eeprom_size)) - return false; - - if (!firmware->saveEEPROM(eeprom, radioData, variant, version)) + QSharedPointer radioData = QSharedPointer(new RadioData()); + if (!LoadEeprom(*radioData, eeprom, eeprom_size) || !firmware->saveEEPROM(eeprom, *radioData, variant, version)) return false; QFile file2(restoreFile); @@ -1322,7 +1355,7 @@ bool MainWindow::convertEEPROM(QString backupFile, QString restoreFile, QString void MainWindow::burnToFlash(QString fileToFlash) { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString fileName; bool backup = settings.value("backupOnFlash", false).toBool(); if(!fileToFlash.isEmpty()) @@ -1355,14 +1388,17 @@ void MainWindow::burnToFlash(QString fileToFlash) } QStringList str = GetReceiveEEpromCommand(backupFile); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Backup Models and Settings From Tx"), AVR_DIALOG_CLOSE_IF_SUCCESSFUL); - ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); int res = ad->exec(); + delete ad; if (QFileInfo(backupFile).exists() && res) { sleep(1); QStringList str = GetSendFlashCommand(fileName); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Write Firmware To Tx"), AVR_DIALOG_CLOSE_IF_SUCCESSFUL); - ad->setWindowIcon(QIcon(":/images/write_flash.png")); + CompanionIcon iconw("write_eeprom.png"); + ad->setWindowIcon(iconw); int res = ad->exec(); + delete ad; if (res) { QString restoreFile = tempDir + "/restore.bin"; if (!convertEEPROM(backupFile, restoreFile, fileName)) { @@ -1372,18 +1408,22 @@ void MainWindow::burnToFlash(QString fileToFlash) sleep(1); QStringList str = GetSendEEpromCommand(restoreFile); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Restore Models and Settings To Tx"), AVR_DIALOG_CLOSE_IF_SUCCESSFUL); - ad->setWindowIcon(QIcon(":/images/write_eeprom.png")); - res=ad->exec(); + ad->setWindowIcon(iconw); + res = ad->exec(); + delete ad; if (!res) { QMessageBox::warning(this, tr("Restore failed"), tr("Could not restore Models and Settings to TX. The models and settings data file can be found at: %1").arg(backupFile)); } - } else { + } + else { QMessageBox::warning(this, tr("Firmware write failed"), tr("Could not write firmware to to transmitter. The models and settings data file can be found at: %1").arg(backupFile)); } - } else { + } + else { QMessageBox::warning(this, tr("Backup failed"), tr("Cannot backup existing Models and Settings from TX. Firmware write process aborted")); } - } else { + } + else { bool backupEnable=settings.value("backupEnable", true).toBool(); QString backupPath=settings.value("backupPath", "").toString(); if (!QDir(backupPath).exists()) { @@ -1397,22 +1437,24 @@ void MainWindow::burnToFlash(QString fileToFlash) QString backupFile=backupPath+"/backup-"+QDateTime().currentDateTime().toString("yyyy-MM-dd-hhmmss")+".bin"; QStringList str = GetReceiveEEpromCommand(backupFile); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Backup Models and Settings From Tx")); - ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); ad->exec(); + delete ad; sleep(1); } QStringList str = GetSendFlashCommand(fileName); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Write Firmware To Tx"), AVR_DIALOG_SHOW_DONE); - ad->setWindowIcon(QIcon(":/images/write_flash.png")); + ad->setWindowIcon(CompanionIcon("write_flash.png")); ad->exec(); + delete ad; } } } void MainWindow::burnExtenalFromEEPROM() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString fileName = QFileDialog::getSaveFileName(this, tr("Save transmitter Models and Settings to File"), settings.value("lastDir").toString(), tr(EXTERNAL_EEPROM_FILES_FILTER)); if (!fileName.isEmpty()) { EEPROMInterface *eepromInterface = GetEepromInterface(); @@ -1421,26 +1463,30 @@ void MainWindow::burnExtenalFromEEPROM() if (path.isEmpty()) { QMessageBox::warning(this, tr("Taranis radio not found"), tr("Impossible to identify the radio on your system, please verify that the eeprom disk is connected.")); return; - } else { + } + else { QStringList str; str << path << fileName; avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Read Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN); - ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); ad->exec(); + delete ad; } - } else { + } + else { settings.setValue("lastDir", QFileInfo(fileName).dir().absolutePath()); QStringList str = GetReceiveEEpromCommand(fileName); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Read Models and Settings From Tx")); - ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); ad->exec(); + delete ad; } } } void MainWindow::burnFromFlash() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString fileName = QFileDialog::getSaveFileName(this,tr("Read Tx Firmware to File"), settings.value("lastFlashDir").toString(),tr(FLASH_FILES_FILTER)); if (!fileName.isEmpty()) { QFile file(fileName); @@ -1450,10 +1496,10 @@ void MainWindow::burnFromFlash() settings.setValue("lastFlashDir",QFileInfo(fileName).dir().absolutePath()); QStringList str = GetReceiveFlashCommand(fileName); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Read Firmware From Tx"); - ad->setWindowIcon(QIcon(":/images/read_flash.png")); + ad->setWindowIcon(CompanionIcon("read_flash.png")); ad->exec(); + delete ad; } - } void MainWindow::burnConfig() @@ -1488,15 +1534,20 @@ void MainWindow::logFile() void MainWindow::about() { - QString aboutStr = "

"; - aboutStr.append(tr("Copyright") +" Bertrand Songis & Romolo Manfredini © 2011- 2013
"); - aboutStr.append(QString("http://code.google.com/p/companion9x/
")+tr("Version %1 (revision %2), %3").arg(C9X_VERSION).arg(C9X_REVISION).arg(__DATE__)+QString("

")); - aboutStr.append(tr("The companion9x project was originally forked from eePe")+QString(" http://code.google.com/p/eepe

")); - aboutStr.append(tr("If you've found this program useful, please support by")); - aboutStr.append(" "); - aboutStr.append(tr("donating") + "
"); - - QMessageBox::about(this, tr("About companion9x"),aboutStr); + QString aboutStr = "

"; + aboutStr.append(tr("OpenTX Home Page: %1").arg("http://www.open-tx.org")); + aboutStr.append("

"); + aboutStr.append(tr("The OpenTX Companion project was originally forked from eePe").arg("http://code.google.com/p/eepe")); + aboutStr.append("

"); + aboutStr.append(tr("If you've found this program useful, please support by donating").arg(DONATE_STR)); + aboutStr.append("

"); + aboutStr.append(tr("Version %1, %3").arg(C9X_VERSION).arg(__DATE__)); + aboutStr.append("

"); + aboutStr.append(tr("Copyright") + " Bertrand Songis & Romolo Manfredini
© 2011-2014
"); + QMessageBox msgBox(this); + msgBox.setWindowTitle(tr("About Companion")); + msgBox.setText(aboutStr); + msgBox.exec(); } void MainWindow::updateMenus() @@ -1505,12 +1556,6 @@ void MainWindow::updateMenus() saveAct->setEnabled(hasMdiChild); saveAsAct->setEnabled(hasMdiChild); pasteAct->setEnabled(hasMdiChild ? activeMdiChild()->hasPasteData() : false); - closeAct->setEnabled(hasMdiChild); - closeAllAct->setEnabled(hasMdiChild); - tileAct->setEnabled(hasMdiChild); - cascadeAct->setEnabled(hasMdiChild); - nextAct->setEnabled(hasMdiChild); - previousAct->setEnabled(hasMdiChild); burnToAct->setEnabled(hasMdiChild); separatorAct->setVisible(hasMdiChild); @@ -1525,7 +1570,7 @@ void MainWindow::updateMenus() updateRecentFileActions(); updateProfilesActions(); bool notfound=true; - QSettings settings("companion9x", "companion9x"); + QSettings settings; settings.beginGroup("Profiles"); for (int i=0; isetDisabled(notfound); } -void MainWindow::updateWindowMenu() -{ - windowMenu->clear(); - windowMenu->addAction(closeAct); - windowMenu->addAction(closeAllAct); - windowMenu->addSeparator(); - windowMenu->addAction(tileAct); - windowMenu->addAction(cascadeAct); - windowMenu->addSeparator(); - windowMenu->addAction(nextAct); - windowMenu->addAction(previousAct); - windowMenu->addAction(separatorAct); - - QList windows = mdiArea->subWindowList(); - separatorAct->setVisible(!windows.isEmpty()); - - for (int i = 0; i < windows.size(); ++i) { - MdiChild *child = qobject_cast(windows.at(i)->widget()); - - QString text; - if (i < 9) { - text = tr("&%1 %2").arg(i + 1).arg(child->userFriendlyCurrentFile()); - } else { - text = tr("%1 %2").arg(i + 1).arg(child->userFriendlyCurrentFile()); - } - QAction *action = windowMenu->addAction(text); - action->setCheckable(true); - action ->setChecked(child == activeMdiChild()); - connect(action, SIGNAL(triggered()), windowMapper, SLOT(map())); - windowMapper->setMapping(action, windows.at(i)); - } -} - MdiChild *MainWindow::createMdiChild() { MdiChild *child = new MdiChild; @@ -1589,183 +1601,146 @@ MdiChild *MainWindow::createMdiChild() void MainWindow::createActions() { - newAct = new QAction(QIcon(":/images/new.png"), tr("&New"), this); + newAct = new QAction(CompanionIcon("new.png"), tr("&New"), this); newAct->setShortcuts(QKeySequence::New); newAct->setStatusTip(tr("Create a new file")); connect(newAct, SIGNAL(triggered()), this, SLOT(newFile())); - openAct = new QAction(QIcon(":/images/open.png"), tr("&Open..."), this); + openAct = new QAction(CompanionIcon("open.png"), tr("&Open..."), this); openAct->setShortcuts(QKeySequence::Open); openAct->setStatusTip(tr("Open an existing file")); connect(openAct, SIGNAL(triggered()), this, SLOT(openFile())); - loadbackupAct = new QAction(QIcon(":/images/open.png"), tr("&loadBackup..."), this); + loadbackupAct = new QAction(CompanionIcon("open.png"), tr("&loadBackup..."), this); loadbackupAct->setStatusTip(tr("Load backup from file")); connect(loadbackupAct, SIGNAL(triggered()), this, SLOT(loadBackup())); - saveAct = new QAction(QIcon(":/images/save.png"), tr("&Save"), this); + saveAct = new QAction(CompanionIcon("save.png"), tr("&Save"), this); saveAct->setShortcuts(QKeySequence::Save); saveAct->setStatusTip(tr("Save the document to disk")); connect(saveAct, SIGNAL(triggered()), this, SLOT(save())); - saveAsAct = new QAction(QIcon(":/images/saveas.png"), tr("Save &As..."), this); + saveAsAct = new QAction(CompanionIcon("saveas.png"), tr("Save &As..."), this); saveAsAct->setShortcuts(QKeySequence::SaveAs); saveAsAct->setStatusTip(tr("Save the document under a new name")); connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs())); - logsAct = new QAction(QIcon(":/images/logs.png"), tr("Lo&gs"), this); + logsAct = new QAction(CompanionIcon("logs.png"), tr("Lo&gs"), this); logsAct->setShortcut(tr("Ctrl+G")); logsAct->setStatusTip(tr("Open log file")); connect(logsAct, SIGNAL(triggered()), this, SLOT(logFile())); - preferencesAct = new QAction(QIcon(":/images/preferences.png"), tr("&Preferences..."), this); + preferencesAct = new QAction(CompanionIcon("preferences.png"), tr("&Preferences..."), this); preferencesAct->setStatusTip(tr("Edit general preferences")); connect(preferencesAct, SIGNAL(triggered()), this, SLOT(preferences())); - checkForUpdatesAct = new QAction(QIcon(":/images/update.png"), tr("&Check for updates..."), this); - checkForUpdatesAct->setStatusTip(tr("Check for new version of companion9x/er9x")); + checkForUpdatesAct = new QAction(CompanionIcon("update.png"), tr("&Check for updates..."), this); + checkForUpdatesAct->setStatusTip(tr("Check for new version of Companion")); connect(checkForUpdatesAct, SIGNAL(triggered()), this, SLOT(doUpdates())); - contributorsAct = new QAction(QIcon(":/images/contributors.png"), tr("Contributors &List..."), this); - contributorsAct->setStatusTip(tr("Show companion9x contributors list")); + contributorsAct = new QAction(CompanionIcon("contributors.png"), tr("Contributors &List..."), this); + contributorsAct->setStatusTip(tr("Show Companion contributors list")); connect(contributorsAct, SIGNAL(triggered()), this, SLOT(contributors())); - changelogAct = new QAction(QIcon(":/images/changelog.png"), tr("ChangeLog..."), this); - changelogAct->setStatusTip(tr("Show companion9x changelog")); + changelogAct = new QAction(CompanionIcon("changelog.png"), tr("ChangeLog..."), this); + changelogAct->setStatusTip(tr("Show Companion changelog")); connect(changelogAct, SIGNAL(triggered()), this, SLOT(changelog())); - fwchangelogAct = new QAction(QIcon(":/images/changelog.png"), tr("Firmware ChangeLog..."), this); + fwchangelogAct = new QAction(CompanionIcon("changelog.png"), tr("Firmware ChangeLog..."), this); fwchangelogAct->setStatusTip(tr("Show firmware changelog")); connect(fwchangelogAct, SIGNAL(triggered()), this, SLOT(fwchangelog())); - compareAct = new QAction(QIcon(":/images/compare.png"), tr("Compare..."), this); + compareAct = new QAction(CompanionIcon("compare.png"), tr("Compare..."), this); compareAct->setStatusTip(tr("Compare models")); compareAct->setEnabled(false); connect(compareAct, SIGNAL(triggered()), this, SLOT(compare())); - customizeSplashAct = new QAction(QIcon(":/images/customize.png"), tr("Customize your &TX..."), this); + customizeSplashAct = new QAction(CompanionIcon("paintbrush.png"), tr("Customize your &TX..."), this); customizeSplashAct->setStatusTip(tr("Customize the splash screen of your TX")); connect(customizeSplashAct, SIGNAL(triggered()), this, SLOT(customizeSplash())); - -//! [0] - exitAct = new QAction(QIcon(":/images/exit.png"), tr("E&xit"), this); + exitAct = new QAction(CompanionIcon("exit.png"), tr("E&xit"), this); exitAct->setShortcuts(QKeySequence::Quit); exitAct->setStatusTip(tr("Exit the application")); connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows())); -//! [0] - cutAct = new QAction(QIcon(":/images/cut.png"), tr("Cu&t"), this); + cutAct = new QAction(CompanionIcon("cut.png"), tr("Cu&t"), this); cutAct->setShortcuts(QKeySequence::Cut); cutAct->setStatusTip(tr("Cut the current selection's contents to the " "clipboard")); connect(cutAct, SIGNAL(triggered()), this, SLOT(cut())); - copyAct = new QAction(QIcon(":/images/copy.png"), tr("&Copy"), this); + copyAct = new QAction(CompanionIcon("copy.png"), tr("&Copy"), this); copyAct->setShortcuts(QKeySequence::Copy); copyAct->setStatusTip(tr("Copy the current selection's contents to the " "clipboard")); connect(copyAct, SIGNAL(triggered()), this, SLOT(copy())); - pasteAct = new QAction(QIcon(":/images/paste.png"), tr("&Paste"), this); + pasteAct = new QAction(CompanionIcon("paste.png"), tr("&Paste"), this); pasteAct->setShortcuts(QKeySequence::Paste); pasteAct->setStatusTip(tr("Paste the clipboard's contents into the current " "selection")); connect(pasteAct, SIGNAL(triggered()), this, SLOT(paste())); - - burnToAct = new QAction(QIcon(":/images/write_eeprom.png"), tr("&Write Models and Settings To Tx"), this); + burnToAct = new QAction(CompanionIcon("write_eeprom.png"), tr("&Write Models and Settings To Tx"), this); burnToAct->setShortcut(tr("Ctrl+Alt+W")); burnToAct->setStatusTip(tr("Write Models and Settings to transmitter")); connect(burnToAct,SIGNAL(triggered()),this,SLOT(burnTo())); - burnFromAct = new QAction(QIcon(":/images/read_eeprom.png"), tr("&Read Models and Settings From Tx"), this); + burnFromAct = new QAction(CompanionIcon("read_eeprom.png"), tr("&Read Models and Settings From Tx"), this); burnFromAct->setShortcut(tr("Ctrl+Alt+R")); burnFromAct->setStatusTip(tr("Read Models and Settings from transmitter")); connect(burnFromAct,SIGNAL(triggered()),this,SLOT(burnFrom())); - burnToFlashAct = new QAction(QIcon(":/images/write_flash.png"), tr("Write Firmware"), this); + burnToFlashAct = new QAction(CompanionIcon("write_flash.png"), tr("Write Firmware"), this); burnToFlashAct->setStatusTip(tr("Write firmware to transmitter")); connect(burnToFlashAct,SIGNAL(triggered()),this,SLOT(burnToFlash())); - burnExtenalToEEPROMAct = new QAction(QIcon(":/images/write_eeprom_file.png"), tr("Write Models and Settings from file to Tx"), this); + burnExtenalToEEPROMAct = new QAction(CompanionIcon("write_eeprom_file.png"), tr("Write Models and Settings from file to Tx"), this); burnExtenalToEEPROMAct->setStatusTip(tr("Write Models and Settings from file to transmitter")); connect(burnExtenalToEEPROMAct,SIGNAL(triggered()),this,SLOT(burnExtenalToEEPROM())); - burnExtenalFromEEPROMAct = new QAction(QIcon(":/images/read_eeprom_file.png"), tr("Save transmitter Models and Settings to file"), this); + burnExtenalFromEEPROMAct = new QAction(CompanionIcon("read_eeprom_file.png"), tr("Save transmitter Models and Settings to file"), this); burnExtenalFromEEPROMAct->setStatusTip(tr("Save the Models and Settings from the transmitter to a file")); connect(burnExtenalFromEEPROMAct,SIGNAL(triggered()),this,SLOT(burnExtenalFromEEPROM())); - burnFromFlashAct = new QAction(QIcon(":/images/read_flash.png"), tr("Read Firmware"), this); + burnFromFlashAct = new QAction(CompanionIcon("read_flash.png"), tr("Read Firmware"), this); burnFromFlashAct->setStatusTip(tr("Read firmware from transmitter")); connect(burnFromFlashAct,SIGNAL(triggered()),this,SLOT(burnFromFlash())); - burnConfigAct = new QAction(QIcon(":/images/configure.png"), tr("&Configure..."), this); + burnConfigAct = new QAction(CompanionIcon("configure.png"), tr("&Configure..."), this); burnConfigAct->setStatusTip(tr("Configure software for reading from and writing to the transmitter")); connect(burnConfigAct,SIGNAL(triggered()),this,SLOT(burnConfig())); EEPROMInterface *eepromInterface = GetEepromInterface(); if (!IS_ARM(eepromInterface->getBoard())) { - burnListAct = new QAction(QIcon(":/images/list.png"), tr("&List programmers"), this); + burnListAct = new QAction(CompanionIcon("list.png"), tr("&List programmers"), this); burnListAct->setStatusTip(tr("List available programmers")); connect(burnListAct,SIGNAL(triggered()),this,SLOT(burnList())); - burnFusesAct = new QAction(QIcon(":/images/fuses.png"), tr("&Fuses..."), this); + burnFusesAct = new QAction(CompanionIcon("fuses.png"), tr("&Fuses..."), this); burnFusesAct->setStatusTip(tr("Show fuses dialog")); connect(burnFusesAct,SIGNAL(triggered()),this,SLOT(burnFuses())); } - simulateAct = new QAction(QIcon(":/images/simulate.png"), tr("&Simulate"), this); + + simulateAct = new QAction(CompanionIcon("simulate.png"), tr("&Simulate"), this); simulateAct->setShortcut(tr("Alt+S")); simulateAct->setStatusTip(tr("Simulate selected model.")); simulateAct->setEnabled(false); connect(simulateAct,SIGNAL(triggered()),this,SLOT(simulate())); - printAct = new QAction(QIcon(":/images/print.png"), tr("&Print"), this); + printAct = new QAction(CompanionIcon("print.png"), tr("&Print"), this); printAct->setShortcut(tr("Ctrl+P")); printAct->setStatusTip(tr("Print current model.")); printAct->setEnabled(false); connect(printAct,SIGNAL(triggered()),this,SLOT(print())); - closeAct = new QAction(tr("Cl&ose"), this); - closeAct->setStatusTip(tr("Close the active window")); - connect(closeAct, SIGNAL(triggered()), - mdiArea, SLOT(closeActiveSubWindow())); - - closeAllAct = new QAction(tr("Close &All"), this); - closeAllAct->setStatusTip(tr("Close all the windows")); - connect(closeAllAct, SIGNAL(triggered()), - mdiArea, SLOT(closeAllSubWindows())); - - tileAct = new QAction(tr("&Tile"), this); - tileAct->setStatusTip(tr("Tile the windows")); - connect(tileAct, SIGNAL(triggered()), mdiArea, SLOT(tileSubWindows())); - - cascadeAct = new QAction(tr("&Cascade"), this); - cascadeAct->setStatusTip(tr("Cascade the windows")); - connect(cascadeAct, SIGNAL(triggered()), mdiArea, SLOT(cascadeSubWindows())); - - nextAct = new QAction(tr("Ne&xt"), this); - nextAct->setShortcuts(QKeySequence::NextChild); - nextAct->setStatusTip(tr("Move the focus to the next window")); - connect(nextAct, SIGNAL(triggered()), - mdiArea, SLOT(activateNextSubWindow())); - - previousAct = new QAction(tr("Pre&vious"), this); - previousAct->setShortcuts(QKeySequence::PreviousChild); - previousAct->setStatusTip(tr("Move the focus to the previous " - "window")); - connect(previousAct, SIGNAL(triggered()), - mdiArea, SLOT(activatePreviousSubWindow())); - separatorAct = new QAction(this); separatorAct->setSeparator(true); - aboutAct = new QAction(QIcon(":/icon.png"), tr("&About"), this); + aboutAct = new QAction(CompanionIcon("information.png"), tr("&About"), this); aboutAct->setStatusTip(tr("Show the application's About box")); connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); - switchLayoutDirectionAct = new QAction(QIcon(":/images/switch_dir.png"), tr("Switch layout direction"), this); - switchLayoutDirectionAct->setStatusTip(tr("Switch layout Left/Right")); - connect(switchLayoutDirectionAct, SIGNAL(triggered()), this, SLOT(switchLayoutDirection())); for (int i = 0; i < MaxRecentFiles; ++i) { recentFileActs[i] = new QAction(this); recentFileActs[i]->setVisible(false); @@ -1793,8 +1768,8 @@ void MainWindow::createMenus() fileMenu->addAction(saveAct); fileMenu->addAction(saveAsAct); fileMenu->addMenu(recentFileMenu); - recentFileMenu->setIcon(QIcon(":/images/recentdocument.png")); - for ( int i = 0; i < MaxRecentFiles; ++i) + recentFileMenu->setIcon(CompanionIcon("recentdocument.png")); + for (int i=0; iaddAction(recentFileActs[i]); fileMenu->addSeparator(); fileMenu->addAction(logsAct); @@ -1806,10 +1781,9 @@ void MainWindow::createMenus() fileMenu->addAction(preferencesAct); fileMenu->addMenu(profilesMenu); - profilesMenu->setIcon(QIcon(":/images/profiles.png")); - for ( int i = 0; i < MAX_PROFILES; ++i) + profilesMenu->setIcon(CompanionIcon("profiles.png")); + for (int i=0; iaddAction(profileActs[i]); - fileMenu->addAction(switchLayoutDirectionAct); fileMenu->addAction(exitAct); editMenu = menuBar()->addMenu(tr("&Edit")); @@ -1835,18 +1809,14 @@ void MainWindow::createMenus() burnMenu->addAction(burnFusesAct); burnMenu->addAction(burnListAct); } - windowMenu = menuBar()->addMenu(tr("&Window")); - updateWindowMenu(); - connect(windowMenu, SIGNAL(aboutToShow()), this, SLOT(updateWindowMenu())); - menuBar()->addSeparator(); helpMenu = menuBar()->addMenu(tr("&Help")); helpMenu->addSeparator(); - helpMenu->addAction(aboutAct); - helpMenu->addSeparator(); helpMenu->addAction(checkForUpdatesAct); helpMenu->addSeparator(); + helpMenu->addAction(aboutAct); + helpMenu->addSeparator(); helpMenu->addAction(changelogAct); helpMenu->addAction(fwchangelogAct); helpMenu->addSeparator(); @@ -1871,13 +1841,32 @@ QMenu *MainWindow::createProfilesMenu() void MainWindow::createToolBars() { + QSettings settings; + int icon_size=settings.value("icon_size",2 ).toInt(); + QSize size; + switch(icon_size) { + case 0: + size=QSize(16,16); + break; + case 1: + size=QSize(24,24); + break; + case 3: + size=QSize(48,48); + break; + default: + size=QSize(32,32); + break; + } fileToolBar = addToolBar(tr("File")); + fileToolBar->setIconSize(size); + fileToolBar->setObjectName("File"); fileToolBar->addAction(newAct); fileToolBar->addAction(openAct); QToolButton * recentToolButton = new QToolButton; recentToolButton->setPopupMode(QToolButton::InstantPopup); recentToolButton->setMenu(createRecentFileMenu()); - recentToolButton->setIcon(QIcon(":/images/recentdocument.png")); + recentToolButton->setIcon(CompanionIcon("recentdocument.png")); recentToolButton->setToolTip(tr("Recent Files")); fileToolBar->addWidget(recentToolButton); fileToolBar->addAction(saveAct); @@ -1887,11 +1876,10 @@ void MainWindow::createToolBars() profileButton = new QToolButton; profileButton->setPopupMode(QToolButton::InstantPopup); profileButton->setMenu(createProfilesMenu()); - profileButton->setIcon(QIcon(":/images/profiles.png")); + profileButton->setIcon(CompanionIcon("profiles.png")); profileButton->setToolTip(tr("Firmware Profiles")); fileToolBar->addWidget(profileButton); bool notfound=true; - QSettings settings("companion9x", "companion9x"); settings.beginGroup("Profiles"); for (int i=0; iaddAction(compareAct); editToolBar = addToolBar(tr("Edit")); + editToolBar->setIconSize(size); + editToolBar->setObjectName("Edit"); editToolBar->addAction(cutAct); editToolBar->addAction(copyAct); editToolBar->addAction(pasteAct); - burnToolBar = addToolBar(tr("Write")); + + burnToolBar = new QToolBar(tr("Write")); + addToolBar( Qt::LeftToolBarArea, burnToolBar ); + burnToolBar->setIconSize(size); + burnToolBar->setObjectName("Write"); burnToolBar->addAction(burnToAct); burnToolBar->addAction(burnFromAct); burnToolBar->addSeparator(); @@ -1926,8 +1920,10 @@ void MainWindow::createToolBars() burnToolBar->addAction(burnConfigAct); helpToolBar = addToolBar(tr("Help")); - helpToolBar->addAction(aboutAct); + helpToolBar->setIconSize(size); + helpToolBar->setObjectName("Help"); helpToolBar->addAction(checkForUpdatesAct); + helpToolBar->addAction(aboutAct); } void MainWindow::createStatusBar() @@ -1937,12 +1933,9 @@ void MainWindow::createStatusBar() void MainWindow::readSettings() { - QSettings settings("companion9x", "companion9x"); - bool maximized = settings.value("maximized", false).toBool(); - QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint(); - QSize size = settings.value("size", QSize(400, 400)).toSize(); - - checkCompanion9x = settings.value("startup_check_companion9x", true).toBool(); + QSettings settings; + restoreState(settings.value("mainWindowState").toByteArray()); + checkCompanion9x = settings.value("startup_check_companion", true).toBool(); checkFW = settings.value("startup_check_fw", true).toBool(); MaxRecentFiles =settings.value("history_size",10).toInt(); ActiveProfile=settings.value("activeprofile",0).toInt(); @@ -1954,23 +1947,6 @@ void MainWindow::readSettings() settings.endGroup(); settings.endGroup(); } - if (maximized) { - setWindowState(Qt::WindowMaximized); - } else { - move(pos); - resize(size); - } -} - -void MainWindow::writeSettings() -{ - QSettings settings("companion9x", "companion9x"); - - settings.setValue("maximized", isMaximized()); - if(!isMaximized()) { - settings.setValue("pos", pos()); - settings.setValue("size", size()); - } } MdiChild *MainWindow::activeMdiChild() @@ -2010,7 +1986,7 @@ void MainWindow::setActiveSubWindow(QWidget *window) void MainWindow::updateRecentFileActions() { int i,j, numRecentFiles; - QSettings settings("companion9x", "companion9x"); + QSettings settings; QStringList files = settings.value("recentFileList").toStringList(); numRecentFiles = qMin(files.size(), (int)MaxRecentFiles); @@ -2030,7 +2006,7 @@ void MainWindow::updateRecentFileActions() void MainWindow::updateProfilesActions() { int i; - QSettings settings("companion9x", "companion9x"); + QSettings settings; settings.beginGroup("Profiles"); for (i=0; isetupUi(this); - + ui->SimulateTxButton->setIcon(CompanionIcon("simulate.png")); setAttribute(Qt::WA_DeleteOnClose); eepromInterfaceChanged(); @@ -144,13 +144,16 @@ void MdiChild::on_SimulateTxButton_clicked() { if (GetEepromInterface()->getSimulator()) { if (GetEepromInterface()->getCapability(SimulatorType)==1) { - xsimulatorDialog sd(this); - sd.loadParams(radioData); - sd.exec(); - } else { - simulatorDialog sd(this); - sd.loadParams(radioData); - sd.exec(); + xsimulatorDialog * sd = new xsimulatorDialog(this); + sd->loadParams(radioData); + sd->exec(); + delete sd; + } + else { + simulatorDialog * sd = new simulatorDialog(this); + sd->loadParams(radioData); + sd->exec(); + delete sd; } } else { @@ -176,15 +179,15 @@ void MdiChild::OpenEditWindow(bool wizard=false) } if (isNew && !wizard) { int ret; - QSettings settings("companion9x", "companion9x"); + QSettings settings; bool wizardEnable=settings.value("wizardEnable", true).toBool(); if (wizardEnable) { - ret = QMessageBox::question(this, tr("companion9x"), tr("Do you want to use model wizard? "), QMessageBox::Yes | QMessageBox::No); + ret = QMessageBox::question(this, tr("Companion"), tr("Do you want to use model wizard? "), QMessageBox::Yes | QMessageBox::No); if (ret == QMessageBox::Yes) { wizard=true; } else { qSleep(500); - ret = QMessageBox::question(this, tr("companion9x"), tr("Ask this question again ? "), QMessageBox::Yes | QMessageBox::No); + ret = QMessageBox::question(this, tr("Companion"), tr("Ask this question again ? "), QMessageBox::Yes | QMessageBox::No); if (ret == QMessageBox::No) { settings.setValue("wizardEnable", false); } @@ -192,9 +195,9 @@ void MdiChild::OpenEditWindow(bool wizard=false) } } ModelEdit *t = new ModelEdit(radioData, (row - 1), wizard, this); - if (isNew && !wizard) t->applyBaseTemplate(); + // TODO if (isNew && !wizard) t->applyBaseTemplate(); t->setWindowTitle(tr("Editing model %1: ").arg(row) + model.name); - connect(t, SIGNAL(modelValuesChanged()), this, SLOT(setModified())); + connect(t, SIGNAL(modified()), this, SLOT(setModified())); //t->exec(); t->show(); } @@ -343,7 +346,7 @@ bool MdiChild::save() bool MdiChild::saveAs(bool isNew) { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString fileName; if (GetEepromInterface()->getBoard() == BOARD_SKY9X) { curFile.replace(".eepe", ".bin"); @@ -467,7 +470,7 @@ bool MdiChild::maybeSave() { if (fileChanged) { QMessageBox::StandardButton ret; - ret = QMessageBox::warning(this, tr("companion9x"), + ret = QMessageBox::warning(this, tr("Companion"), tr("%1 has been modified.\n" "Do you want to save your changes?").arg(userFriendlyCurrentFile()), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel); @@ -487,7 +490,7 @@ void MdiChild::setCurrentFile(const QString &fileName) fileChanged = false; setWindowModified(false); updateTitle(); - QSettings settings("companion9x", "companion9x"); + QSettings settings; int MaxRecentFiles =settings.value("history_size",10).toInt(); QStringList files = settings.value("recentFileList").toStringList(); files.removeAll(fileName); @@ -505,7 +508,7 @@ QString MdiChild::strippedName(const QString &fullFileName) void MdiChild::burnTo() // write to Tx { - QSettings settings("companion9x", "companion9x"); + QSettings settings; bool backupEnable=settings.value("backupEnable", true).toBool(); QString backupPath=settings.value("backupPath", "").toString(); if (!backupPath.isEmpty()) { @@ -550,15 +553,17 @@ void MdiChild::burnTo() // write to Tx QStringList str; str << path << backupFile; avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Backup EEPROM From Tx")); //, AVR_DIALOG_KEEP_OPEN); - ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); ad->exec(); sleep(1); } - } else { + } + else { QStringList str = ((MainWindow *)this->parent())->GetReceiveEEpromCommand(backupFile); avrOutputDialog *ad = new avrOutputDialog(this, ((MainWindow *)this->parent())->GetAvrdudeLocation(), str, tr("Backup EEPROM From Tx")); - ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); ad->exec(); + delete ad; sleep(1); } } @@ -566,8 +571,9 @@ void MdiChild::burnTo() // write to Tx QString tempFlash=tempDir + "/flash.bin"; QStringList str = ((MainWindow *)this->parent())->GetReceiveFlashCommand(tempFlash); avrOutputDialog *ad = new avrOutputDialog(this, ((MainWindow *)this->parent())->GetAvrdudeLocation(), str, "Read Flash From Tx"); - ad->setWindowIcon(QIcon(":/images/read_flash.png")); + ad->setWindowIcon(CompanionIcon("read_flash.png")); ad->exec(); + delete ad; sleep(1); QString restoreFile = tempDir + "/compat.bin"; if (!((MainWindow *)this->parent())->convertEEPROM(tempFile, restoreFile, tempFlash)) { @@ -575,7 +581,8 @@ void MdiChild::burnTo() // write to Tx QMessageBox::Yes | QMessageBox::No); if (ret==QMessageBox::No) return; - } else { + } + else { int rev=((MainWindow *)this->parent())->getEpromVersion(restoreFile); if ((rev/100)!=(oldrev/100)) { QMessageBox::warning(this,tr("Warning"), tr("Firmware in radio is of a different family of eeprom written, check file and preferences!")); @@ -588,7 +595,8 @@ void MdiChild::burnTo() // write to Tx QByteArray ba = tempFlash.toLatin1(); char *name = ba.data(); unlink(name); - } else { + } + else { if (backupEnable) { QString backupFile=backupPath+"/backup-"+QDateTime().currentDateTime().toString("yyyy-MM-dd-hhmmss")+".bin"; if (IS_TARANIS(eepromInterface->getBoard())) { @@ -596,14 +604,17 @@ void MdiChild::burnTo() // write to Tx if (path.isEmpty()) { QMessageBox::warning(this, tr("Taranis radio not found"), tr("Impossible to identify the radio on your system, please verify the eeprom disk is connected.")); return; - } else { + } + else { QFile::copy(path,backupFile); } - } else { + } + else { QStringList str = ((MainWindow *)this->parent())->GetReceiveEEpromCommand(backupFile); avrOutputDialog *ad = new avrOutputDialog(this, ((MainWindow *)this->parent())->GetAvrdudeLocation(), str, tr("Backup EEPROM From Tx")); - ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); ad->exec(); + delete ad; sleep(1); } } @@ -613,19 +624,23 @@ void MdiChild::burnTo() // write to Tx if (path.isEmpty()) { QMessageBox::warning(this, tr("Taranis radio not found"), tr("Impossible to identify the radio on your system, please verify the eeprom disk is connected.")); return; - } else { + } + else { QStringList str; str << tempFile << path; avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Write EEPROM To Tx"), AVR_DIALOG_SHOW_DONE); //, AVR_DIALOG_KEEP_OPEN); - ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); ad->show(); + delete ad; sleep(1); } - } else { + } + else { QStringList str = ((MainWindow *)this->parent())->GetSendEEpromCommand(tempFile); avrOutputDialog *ad = new avrOutputDialog(this, ((MainWindow *)this->parent())->GetAvrdudeLocation(), str, "Write EEPROM To Tx", AVR_DIALOG_SHOW_DONE); - ad->setWindowIcon(QIcon(":/images/write_eeprom.png")); + ad->setWindowIcon(CompanionIcon("write_eeprom.png")); ad->show(); + delete ad; } } } @@ -675,7 +690,7 @@ void MdiChild::setEEpromAvail(int eavail) bool MdiChild::loadBackup() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString fileName = QFileDialog::getOpenFileName(this, tr("Open"), settings.value("lastDir").toString(),tr(EEPROM_FILES_FILTER)); if (fileName.isEmpty()) return false; diff --git a/companion/src/mdichild.ui b/companion/src/mdichild.ui index 00cf8af7d..b2fb21e2f 100644 --- a/companion/src/mdichild.ui +++ b/companion/src/mdichild.ui @@ -13,6 +13,10 @@ + + + :/icon.png:/icon.png + @@ -22,10 +26,6 @@ Simulate Tx - - - :/images/simulate.png:/images/simulate.png - @@ -38,7 +38,7 @@ - + diff --git a/companion/src/mixerdialog.cpp b/companion/src/mixerdialog.cpp deleted file mode 100644 index 92d7b809f..000000000 --- a/companion/src/mixerdialog.cpp +++ /dev/null @@ -1,361 +0,0 @@ -#include "mixerdialog.h" -#include "ui_mixerdialog.h" -#include "eeprominterface.h" -#include "helpers.h" - -MixerDialog::MixerDialog(QWidget *parent, MixData *mixdata, int stickMode) : - QDialog(parent), - ui(new Ui::MixerDialog), - md(mixdata) -{ - ui->setupUi(this); - QRegExp rx(CHAR_FOR_NAMES_REGEX); - QLabel * lb_fp[] = {ui->lb_FP0,ui->lb_FP1,ui->lb_FP2,ui->lb_FP3,ui->lb_FP4,ui->lb_FP5,ui->lb_FP6,ui->lb_FP7,ui->lb_FP8 }; - QCheckBox * cb_fp[] = {ui->cb_FP0,ui->cb_FP1,ui->cb_FP2,ui->cb_FP3,ui->cb_FP4,ui->cb_FP5,ui->cb_FP6,ui->cb_FP7,ui->cb_FP8 }; - - if (md->destCh > (unsigned int)GetEepromInterface()->getCapability(Outputs)) - this->setWindowTitle(tr("DEST -> X%1").arg(md->destCh-GetEepromInterface()->getCapability(Outputs))); - else - this->setWindowTitle(tr("DEST -> CH%1%2").arg(md->destCh/10).arg(md->destCh%10)); - populateSourceCB(ui->sourceCB, md->srcRaw, POPULATE_SOURCES | POPULATE_SWITCHES | (GetEepromInterface()->getCapability(ExtraTrims) ? POPULATE_TRIMS : 0) | (GetEepromInterface()->getCapability(GvarsAsSources) ? POPULATE_GVARS : 0)); - ui->sourceCB->removeItem(0); - int limit=GetEepromInterface()->getCapability(OffsetWeight); - if (GetEepromInterface()->getCapability(GvarsAsWeight)) { - int gvars=0; - if (GetEepromInterface()->getCapability(HasVariants)) { - if ((GetCurrentFirmwareVariant() & GVARS_VARIANT)) { - gvars=1; - } - } else { - gvars=1; - } - if (gvars==0) { - ui->offsetGV->setDisabled(true); - ui->weightGV->setDisabled(true); - ui->differentialGV->setDisabled(true); - if (md->weight>limit || md->weight<-limit) { - md->weight=100; - } - if (md->sOffset>limit || md->sOffset<-limit) { - md->sOffset=0; - } - if (md->differential>100 || md->weight<-100) { - md->differential=0; - } - } - populateGVCB(ui->offsetCB,md->sOffset); - populateGVCB(ui->weightCB,md->weight); - populateGVCB(ui->differentialCB,md->differential); - ui->weightSB->setMinimum(-limit); - ui->weightSB->setMaximum(limit); - if (md->weight>limit || md->weight<-limit) { - ui->weightGV->setChecked(true); - ui->weightSB->hide(); - ui->weightCB->show(); - } else { - ui->weightGV->setChecked(false); - ui->weightSB->setValue(md->weight); - ui->weightSB->show(); - ui->weightCB->hide(); - } - - ui->offsetSB->setMinimum(-limit); - ui->offsetSB->setMaximum(limit); - if (md->sOffset>limit || md->sOffset<-limit) { - ui->offsetGV->setChecked(true); - ui->offsetSB->hide(); - ui->offsetCB->show(); - } else { - ui->offsetGV->setChecked(false); - ui->offsetSB->setValue(md->sOffset); - ui->offsetSB->show(); - ui->offsetCB->hide(); - } - - ui->differentialSB->setMinimum(-100); - ui->differentialSB->setMaximum(100); - if (md->differential>100 || md->differential<-100) { - ui->differentialGV->setChecked(true); - ui->differentialSB->hide(); - ui->differentialCB->show(); - } else { - ui->differentialGV->setChecked(false); - ui->differentialSB->setValue(md->differential); - ui->differentialSB->show(); - ui->differentialCB->hide(); - } - } else { - ui->offsetGV->hide(); - ui->weightGV->hide(); - ui->differentialGV->hide(); - ui->offsetSB->setMinimum(-limit); - ui->offsetSB->setMaximum(limit); - ui->offsetSB->setValue(md->sOffset); - ui->differentialSB->setMinimum(-100); - ui->differentialSB->setMaximum(100); - ui->differentialSB->setValue(md->differential); - ui->weightSB->setMinimum(-limit); - ui->weightSB->setMaximum(limit); - ui->weightSB->setValue(md->weight); - } - - ui->FixOffsetChkB->setChecked(md->lateOffset); - ui->MixDR_CB->setChecked(md->noExpo==0); - if (md->enableFmTrim==1) { - ui->label_4->setText(tr("FM Trim Value")); - } - else { - ui->label_4->setText(tr("Offset")); - } - if (!GetEepromInterface()->getCapability(MixesWithoutExpo)) { - ui->MixDR_CB->hide(); - ui->label_MixDR->hide(); - } - if (!GetEepromInterface()->getCapability(MixFmTrim)) { - ui->FMtrimChkB->hide(); - ui->label_FMtrim->hide(); - ui->label_4->setText(tr("Offset")); - } - if (!GetEepromInterface()->getCapability(HasFixOffset)) { - ui->FixOffsetChkB->hide(); - ui->label_FixOffset->hide(); - } - if (GetEepromInterface()->getCapability(ExtraTrims)) { - ui->trimCB->addItem(tr("Rud"),1); - ui->trimCB->addItem(tr("Ele"),2); - ui->trimCB->addItem(tr("Thr"),3); - ui->trimCB->addItem(tr("Ail"),4); - } - ui->trimCB->setCurrentIndex((-md->carryTrim)+1); - if (!GetEepromInterface()->getCapability(DiffMixers)) { - ui->differentialGV->hide(); - ui->differentialSB->hide(); - ui->differentialCB->hide(); - ui->label_curve->setText(tr("Curve")); - } - int namelength=GetEepromInterface()->getCapability(HasMixerNames); - if (!namelength) { - ui->label_name->hide(); - ui->mixerName->hide(); - } else { - ui->mixerName->setMaxLength(namelength); - } - if (!GetEepromInterface()->getCapability(FlightPhases)) { - ui->label_phases->hide(); - for (int i=0; i<9; i++) { - lb_fp[i]->hide(); - cb_fp[i]->hide(); - } - } else { - int mask=1; - for (int i=0; i<9 ; i++) { - if ((md->phases & mask)==0) { - cb_fp[i]->setChecked(true); - } - mask <<= 1; - } - for (int i=GetEepromInterface()->getCapability(FlightPhases); i<9;i++) { - lb_fp[i]->hide(); - cb_fp[i]->hide(); - } - } - ui->mixerName->setValidator(new QRegExpValidator(rx, this)); - ui->mixerName->setText(md->name); - populateCurvesCB(ui->curvesCB,md->curve); - populateSwitchCB(ui->switchesCB,md->swtch); - ui->warningCB->setCurrentIndex(md->mixWarn); - ui->mltpxCB->setCurrentIndex(md->mltpx); - int scale=GetEepromInterface()->getCapability(SlowScale); - float range=GetEepromInterface()->getCapability(SlowRange); - ui->slowDownSB->setMaximum(range/scale); - ui->slowDownSB->setSingleStep(1.0/scale); - ui->slowDownSB->setDecimals((scale==1 ? 0 :1)); - ui->slowDownSB->setValue((float)md->speedDown/scale); - ui->slowUpSB->setMaximum(range/scale); - ui->slowUpSB->setSingleStep(1.0/scale); - ui->slowUpSB->setDecimals((scale==1 ? 0 :1)); - ui->slowUpSB->setValue((float)md->speedUp/scale); - ui->delayDownSB->setMaximum(range/scale); - ui->delayDownSB->setSingleStep(1.0/scale); - ui->delayDownSB->setDecimals((scale==1 ? 0 :1)); - ui->delayDownSB->setValue((float)md->delayDown/scale); - ui->delayUpSB->setMaximum(range/scale); - ui->delayUpSB->setSingleStep(1.0/scale); - ui->delayUpSB->setDecimals((scale==1 ? 0 :1)); - ui->delayUpSB->setValue((float)md->delayUp/scale); - QTimer::singleShot(0, this, SLOT(shrink())); - - valuesChanged(); - connect(ui->mixerName,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); - connect(ui->sourceCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->weightCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->offsetCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->differentialCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->weightSB,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); - connect(ui->offsetSB,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); - connect(ui->differentialSB,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); - connect(ui->weightGV,SIGNAL(stateChanged(int)),this,SLOT(widgetChanged())); - connect(ui->offsetGV,SIGNAL(stateChanged(int)),this,SLOT(widgetChanged())); - connect(ui->differentialGV,SIGNAL(stateChanged(int)),this,SLOT(widgetChanged())); - connect(ui->trimCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->MixDR_CB,SIGNAL(toggled(bool)),this,SLOT(valuesChanged())); - connect(ui->FMtrimChkB,SIGNAL(toggled(bool)),this,SLOT(valuesChanged())); - connect(ui->FixOffsetChkB,SIGNAL(toggled(bool)),this,SLOT(valuesChanged())); - connect(ui->curvesCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->switchesCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->warningCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->mltpxCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->delayDownSB,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); - connect(ui->delayUpSB,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); - connect(ui->slowDownSB,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); - connect(ui->slowUpSB,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); - for (int i=0; i<9; i++) { - connect(cb_fp[i],SIGNAL(toggled(bool)),this,SLOT(valuesChanged())); - } -} - -MixerDialog::~MixerDialog() -{ - delete ui; -} - -void MixerDialog::changeEvent(QEvent *e) -{ - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - -void MixerDialog::widgetChanged() -{ - if (GetEepromInterface()->getCapability(GvarsAsWeight)) { - int gvars=0; - if (GetEepromInterface()->getCapability(HasVariants)) { - if ((GetCurrentFirmwareVariant() & GVARS_VARIANT)) { - gvars=1; - } - } else { - gvars=1; - } - if (gvars==1) { - if (!GetEepromInterface()->getCapability(DiffMixers)) { - if (ui->differentialGV->isChecked()) { - ui->differentialCB->show(); - ui->differentialSB->hide(); - } else { - ui->differentialCB->hide(); - ui->differentialSB->show(); - } - } - if (ui->weightGV->isChecked()) { - ui->weightCB->show(); - ui->weightSB->hide(); - } else { - ui->weightCB->hide(); - ui->weightSB->show(); - } - if (ui->offsetGV->isChecked()) { - ui->offsetCB->show(); - ui->offsetSB->hide(); - } else { - ui->offsetCB->hide(); - ui->offsetSB->show(); - } - } - valuesChanged(); - QTimer::singleShot(0, this, SLOT(shrink())); - } -} - -void MixerDialog::valuesChanged() -{ - QCheckBox * cb_fp[] = {ui->cb_FP0,ui->cb_FP1,ui->cb_FP2,ui->cb_FP3,ui->cb_FP4,ui->cb_FP5,ui->cb_FP6,ui->cb_FP7,ui->cb_FP8 }; - md->srcRaw = RawSource(ui->sourceCB->itemData(ui->sourceCB->currentIndex()).toInt()); - if ((ui->sourceCB->itemData(ui->sourceCB->currentIndex()).toInt()-65536)<4) { - if (!GetEepromInterface()->getCapability(MixesWithoutExpo)) { - ui->MixDR_CB->hide(); - ui->label_MixDR->hide(); - } else { - ui->MixDR_CB->setVisible(true); - ui->label_MixDR->setVisible(true); - } - } else { - ui->MixDR_CB->setHidden(true); - ui->label_MixDR->setHidden(true); - } - if (ui->weightGV->isChecked()) { - md->weight = ui->weightCB->itemData(ui->weightCB->currentIndex()).toInt(); - } else { - md->weight = ui->weightSB->value(); - } - if (ui->offsetGV->isChecked()) { - md->sOffset = ui->offsetCB->itemData(ui->offsetCB->currentIndex()).toInt(); - } else { - md->sOffset = ui->offsetSB->value(); - } - md->carryTrim = -(ui->trimCB->currentIndex()-1); - md->noExpo = ui->MixDR_CB->checkState() ? 0 : 1; - md->lateOffset = ui->FixOffsetChkB->checkState() ? 1 : 0; - md->enableFmTrim = ui->FMtrimChkB->checkState() ? 1 : 0; - int numcurves=GetEepromInterface()->getCapability(NumCurves); - if (numcurves==0) { - numcurves=16; - } - if (GetEepromInterface()->getCapability(DiffMixers) && (ui->curvesCB->currentIndex()-(numcurves)*GetEepromInterface()->getCapability(HasNegCurves))==0){ - ui->differentialGV->show(); - if (ui->differentialGV->isChecked()) { - ui->differentialSB->hide(); - ui->differentialCB->show(); - } else { - ui->differentialSB->show(); - ui->differentialCB->hide(); - } - } else { - ui->differentialGV->hide(); - ui->differentialGV->setChecked(false); - ui->differentialSB->hide(); - ui->differentialSB->setValue(0); - ui->differentialCB->hide(); - } - md->curve = ui->curvesCB->currentIndex()-(numcurves)*GetEepromInterface()->getCapability(HasNegCurves); - md->swtch = RawSwitch(ui->switchesCB->itemData(ui->switchesCB->currentIndex()).toInt()); - md->mixWarn = ui->warningCB->currentIndex(); - md->mltpx = (MltpxValue)ui->mltpxCB->currentIndex(); - int scale=GetEepromInterface()->getCapability(SlowScale); - md->delayDown = round(ui->delayDownSB->value()*scale); - md->delayUp = round(ui->delayUpSB->value()*scale); - md->speedDown = round(ui->slowDownSB->value()*scale); - md->speedUp = round(ui->slowUpSB->value()*scale); - if (ui->differentialGV->isChecked()) { - md->differential = ui->differentialCB->itemData(ui->differentialCB->currentIndex()).toInt(); - } else { - md->differential = ui->differentialSB->value(); - } - if (GetEepromInterface()->getCapability(MixFmTrim) && md->enableFmTrim==1) { - ui->label_4->setText(tr("FM Trim Value")); - } else { - ui->label_4->setText(tr("Offset")); - } - int i=0; - for (i=0; imixerName->text().toAscii().length(); i++) { - md->name[i]=ui->mixerName->text().toAscii().at(i); - } - md->name[i]=0; - md->phases=0; - for (int i=8; i>=0 ; i--) { - if (!cb_fp[i]->checkState()) { - md->phases+=1; - } - md->phases<<=1; - } - md->phases>>=1; -} - -void MixerDialog::shrink() { - resize(0,0); -} diff --git a/companion/src/modelconfigdialog.cpp b/companion/src/modelconfigdialog.cpp index d9e245107..49c4a8df0 100644 --- a/companion/src/modelconfigdialog.cpp +++ b/companion/src/modelconfigdialog.cpp @@ -9,7 +9,7 @@ modelConfigDialog::modelConfigDialog(RadioData &radioData, uint64_t * result, QW ui(new Ui::modelConfigDialog), radioData(radioData), result(result), - g_eeGeneral(radioData.generalSettings) + generalSettings(radioData.generalSettings) { ui->setupUi(this); rxLock=false; @@ -930,4 +930,4 @@ void modelConfigDialog::asUpdate() ui->asspo2_CB->hide(); } rxLock=false; -} \ No newline at end of file +} diff --git a/companion/src/modelconfigdialog.h b/companion/src/modelconfigdialog.h index e5418a8a5..f8f508c71 100644 --- a/companion/src/modelconfigdialog.h +++ b/companion/src/modelconfigdialog.h @@ -23,7 +23,7 @@ private: int ModelType; RadioData &radioData; uint64_t * result; - GeneralSettings g_eeGeneral; + GeneralSettings generalSettings; QStringList ruddercolor; QStringList aileroncolor; QStringList elevatorcolor; diff --git a/companion/src/modelconfigdialog.ui b/companion/src/modelconfigdialog.ui index bc36d6ac6..f9c7abba6 100644 --- a/companion/src/modelconfigdialog.ui +++ b/companion/src/modelconfigdialog.ui @@ -26,8 +26,8 @@ Model Configuration Wizard
- - :/images/configure.png:/images/configure.png + + :/icon.png:/icon.png @@ -79,7 +79,7 @@ - :/images/mcw/aw0a0f.png + :/images/mcw/aw0a0f.png false @@ -113,7 +113,7 @@ - :/images/mcw/atailv.png + :/images/mcw/atailv.png false @@ -168,7 +168,7 @@ - + :/images/mcw/aicon.png:/images/mcw/aicon.png @@ -200,7 +200,7 @@ - + :/images/mcw/hicon.png:/images/mcw/hicon.png @@ -226,7 +226,7 @@ - + :/images/mcw/gicon.png:/images/mcw/gicon.png @@ -1208,7 +1208,7 @@ - + :/images/mcw/dicon.png:/images/mcw/dicon.png @@ -1262,7 +1262,7 @@ - + diff --git a/companion/src/modeledit.cpp b/companion/src/modeledit.cpp deleted file mode 100644 index b6b5aade1..000000000 --- a/companion/src/modeledit.cpp +++ /dev/null @@ -1,7433 +0,0 @@ -#include "modeledit.h" -#include "ui_modeledit.h" -#include "helpers.h" -#include "edge.h" -#include "node.h" -#include "expodialog.h" -#include "mixerdialog.h" -#include "simulatordialog.h" -#include "xsimulatordialog.h" -#include "modelconfigdialog.h" -#include -#include -#include - -#define BC_BIT_RUD (0x01) -#define BC_BIT_ELE (0x02) -#define BC_BIT_THR (0x04) -#define BC_BIT_AIL (0x08) -#define BC_BIT_P1 (0x10) -#define BC_BIT_P2 (0x20) -#define BC_BIT_P3 (0x40) -#define BC_BIT_P4 (0x80) -#define BC_BIT_REA (0x80) -#define BC_BIT_REB (0x100) - -#define RUD (1) -#define ELE (2) -#define THR (3) -#define AIL (4) - -#define GFX_MARGIN 16 - -ModelEdit::ModelEdit(RadioData &radioData, uint8_t id, bool openWizard, bool isNew, QWidget *parent) : - QDialog(parent), - redrawCurve(true), - openWizard(openWizard), - isNew(isNew), - ui(new Ui::ModelEdit), - radioData(radioData), - id_model(id), - g_model(radioData.models[id]), - g_eeGeneral(radioData.generalSettings) -{ - ui->setupUi(this); - - setupMixerListWidget(); - setupExposListWidget(); - - QSettings settings("companion9x", "companion9x"); - ui->tabWidget->setCurrentIndex(settings.value("modelEditTab", 0).toInt()); - - QRegExp rx(CHAR_FOR_NAMES_REGEX); - ui->modelNameLE->setValidator(new QRegExpValidator(rx, this)); - ui->phase0Name->setValidator(new QRegExpValidator(rx, this)); - ui->phase1Name->setValidator(new QRegExpValidator(rx, this)); - ui->phase2Name->setValidator(new QRegExpValidator(rx, this)); - ui->phase3Name->setValidator(new QRegExpValidator(rx, this)); - ui->phase4Name->setValidator(new QRegExpValidator(rx, this)); - ui->phase5Name->setValidator(new QRegExpValidator(rx, this)); - ui->phase6Name->setValidator(new QRegExpValidator(rx, this)); - ui->phase7Name->setValidator(new QRegExpValidator(rx, this)); - ui->phase8Name->setValidator(new QRegExpValidator(rx, this)); - ui->cname_LE->setValidator(new QRegExpValidator(rx, this)); - #ifdef PHONON - phononLock=false; - clickObject = new Phonon::MediaObject(this); - clickOutput = new Phonon::AudioOutput(Phonon::NoCategory, this); - Phonon::createPath(clickObject, clickOutput); - connect(clickObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)), this, SLOT(mediaPlayer_state(Phonon::State,Phonon::State))); - #endif - - tabModelEditSetup(); - tabPhases(); - tabExpos(); - tabMixes(); - tabLimits(); - tabCurves(); - tabCustomSwitches(); - selectedSwitch=0; - int telTab=10; - int fswTab=9; - - if (GetEepromInterface()->getCapability(FSSwitch)) { - ui->tabSafetySwitches->setDisabled(true); - ui->tabWidget->removeTab(8); - telTab--; - fswTab--; - } else { - tabSafetySwitches(); - } - - if (GetEepromInterface()->getCapability(CustomFunctions)==0 ) { - ui->tabCustomFunctions->setDisabled(true); - ui->tabWidget->removeTab(fswTab); - telTab--; - } else { - tabCustomFunctions(); - selectedFunction=0; - } - tabTemplates(); - tabHeli(); - if (GetEepromInterface()->getCapability(Telemetry) & TM_HASTELEMETRY) { - tabTelemetry(); - } else { - ui->tabTelemetry->setDisabled(true); - ui->tabWidget->removeTab(telTab); - } - ui->tabWidget->setCurrentIndex(0); - ui->curvePreview->setMinimumWidth(240); - ui->curvePreview->setMinimumHeight(240); - resizeEvent(); - QTimer::singleShot(0, this, SLOT(shrink())); - if (openWizard) { - QTimer::singleShot(1, this, SLOT(wizard())); - } -} - -ModelEdit::~ModelEdit() -{ - delete ui; -} - - -float ModelEdit::getBarStep(int barId) -{ - switch (barId-1) { - case TELEMETRY_SOURCE_TX_BATT: - return 0.1; - break; - case TELEMETRY_SOURCE_TIMER1: - case TELEMETRY_SOURCE_TIMER2: - return 3; - break; - case TELEMETRY_SOURCE_A1: - case TELEMETRY_SOURCE_A1_MIN: - return (ui->a1RatioSB->value()/255); - break; - case TELEMETRY_SOURCE_A2: - case TELEMETRY_SOURCE_A2_MIN: - return (ui->a2RatioSB->value()/255); - break; - case TELEMETRY_SOURCE_ALT: - case TELEMETRY_SOURCE_GPS_ALT: - case TELEMETRY_SOURCE_ALT_MAX: - case TELEMETRY_SOURCE_ALT_MIN: - return 8; - break; - case TELEMETRY_SOURCE_RPM: - case TELEMETRY_SOURCE_RPM_MAX: - return 50; - break; - case TELEMETRY_SOURCE_CELLS_SUM: - case TELEMETRY_SOURCE_VFAS: - return 0.1; - break; - case TELEMETRY_SOURCE_CELL: - return 0.02; - break; - case TELEMETRY_SOURCE_HDG: - return 2; - break; - case TELEMETRY_SOURCE_DIST: - case TELEMETRY_SOURCE_DIST_MAX: - return 8; - break; - case TELEMETRY_SOURCE_CURRENT_MAX: - case TELEMETRY_SOURCE_CURRENT: - return 0.5; - break; - case TELEMETRY_SOURCE_POWER: - return 5; - break; - case TELEMETRY_SOURCE_CONSUMPTION: - return 20; - break; - case TELEMETRY_SOURCE_SPEED: - case TELEMETRY_SOURCE_SPEED_MAX: - if (g_model.frsky.imperial==1) { - return 1; - } else { - return 1.852; - } - break; - default: - return 1; - break; - } -} - -void ModelEdit::setupExposListWidget() -{ - ExposlistWidget = new MixersList(this, true); - QPushButton * qbUp = new QPushButton(this); - QPushButton * qbDown = new QPushButton(this); - QPushButton * qbClear = new QPushButton(this); - - qbUp->setText(tr("Move Up")); - qbUp->setIcon(QIcon(":/images/moveup.png")); - qbUp->setShortcut(QKeySequence(tr("Ctrl+Up"))); - qbDown->setText(tr("Move Down")); - qbDown->setIcon(QIcon(":/images/movedown.png")); - qbDown->setShortcut(QKeySequence(tr("Ctrl+Down"))); - qbClear->setText(tr("Clear Expo Settings")); - qbClear->setIcon(QIcon(":/images/clear.png")); - - ui->exposLayout->addWidget(ExposlistWidget,1,1,1,3); - ui->exposLayout->addWidget(qbUp,2,1); - ui->exposLayout->addWidget(qbClear,2,2); - ui->exposLayout->addWidget(qbDown,2,3); - - connect(ExposlistWidget,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(expolistWidget_customContextMenuRequested(QPoint))); - connect(ExposlistWidget,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(expolistWidget_doubleClicked(QModelIndex))); - connect(ExposlistWidget,SIGNAL(mimeDropped(int,const QMimeData*,Qt::DropAction)),this,SLOT(mimeExpoDropped(int,const QMimeData*,Qt::DropAction))); - - connect(qbUp,SIGNAL(pressed()),SLOT(moveExpoUp())); - connect(qbDown,SIGNAL(pressed()),SLOT(moveExpoDown())); - connect(qbClear,SIGNAL(pressed()),SLOT(clearExpos())); - - connect(ExposlistWidget,SIGNAL(keyWasPressed(QKeyEvent*)), this, SLOT(expolistWidget_KeyPress(QKeyEvent*))); -} - -void ModelEdit::setupMixerListWidget() -{ - MixerlistWidget = new MixersList(this, false); // TODO enum - QPushButton * qbUp = new QPushButton(this); - QPushButton * qbDown = new QPushButton(this); - QPushButton * qbClear = new QPushButton(this); - - qbUp->setText(tr("Move Up")); - qbUp->setIcon(QIcon(":/images/moveup.png")); - qbUp->setShortcut(QKeySequence(tr("Ctrl+Up"))); - qbDown->setText(tr("Move Down")); - qbDown->setIcon(QIcon(":/images/movedown.png")); - qbDown->setShortcut(QKeySequence(tr("Ctrl+Down"))); - qbClear->setText(tr("Clear Mixes")); - qbClear->setIcon(QIcon(":/images/clear.png")); - - ui->mixersLayout->addWidget(MixerlistWidget,1,1,1,3); - ui->mixersLayout->addWidget(qbUp,2,1); - ui->mixersLayout->addWidget(qbClear,2,2); - ui->mixersLayout->addWidget(qbDown,2,3); - - connect(MixerlistWidget,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(mixerlistWidget_customContextMenuRequested(QPoint))); - connect(MixerlistWidget,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(mixerlistWidget_doubleClicked(QModelIndex))); - connect(MixerlistWidget,SIGNAL(mimeDropped(int,const QMimeData*,Qt::DropAction)),this,SLOT(mimeMixerDropped(int,const QMimeData*,Qt::DropAction))); - - connect(qbUp,SIGNAL(pressed()),SLOT(moveMixUp())); - connect(qbDown,SIGNAL(pressed()),SLOT(moveMixDown())); - connect(qbClear,SIGNAL(pressed()),SLOT(clearMixes())); - - connect(MixerlistWidget,SIGNAL(keyWasPressed(QKeyEvent*)), this, SLOT(mixerlistWidget_KeyPress(QKeyEvent*))); -} - -void ModelEdit::resizeEvent(QResizeEvent *event) -{ - - if(ui->curvePreview->scene()) - { - QRect qr = ui->curvePreview->contentsRect(); - ui->curvePreview->scene()->setSceneRect(GFX_MARGIN, GFX_MARGIN, qr.width()-GFX_MARGIN*2, qr.height()-GFX_MARGIN*2); - drawCurve(); - } - - QDialog::resizeEvent(event); - -} - -void ModelEdit::applyBaseTemplate() -{ - clearMixes(false); - applyTemplate(0); - updateSettings(); - tabMixes(); -} - -void ModelEdit::updateSettings() -{ - radioData.models[id_model] = g_model; - emit modelValuesChanged(); -} - -void ModelEdit::on_tabWidget_currentChanged(int index) -{ - QSettings settings("companion9x", "companion9x"); - settings.setValue("modelEditTab",index);//ui->tabWidget->currentIndex()); - resizeEvent(); -} - -void ModelEdit::fssldValueChanged() -{ - if (fsLock) - return; - fsLock=true; - QSpinBox * fssb1[] = { ui->fsm1SB_1, ui->fsm1SB_2,ui->fsm1SB_3,ui->fsm1SB_4,ui->fsm1SB_5,ui->fsm1SB_6,ui->fsm1SB_7,ui->fsm1SB_8, - ui->fsm1SB_9, ui->fsm1SB_10,ui->fsm1SB_11,ui->fsm1SB_12,ui->fsm1SB_13,ui->fsm1SB_14,ui->fsm1SB_15,ui->fsm1SB_16, NULL }; - QSpinBox * fssb2[] = { ui->fsm2SB_1, ui->fsm2SB_2,ui->fsm2SB_3,ui->fsm2SB_4,ui->fsm2SB_5,ui->fsm2SB_6,ui->fsm2SB_7,ui->fsm2SB_8, - ui->fsm2SB_9, ui->fsm2SB_10,ui->fsm2SB_11,ui->fsm2SB_12,ui->fsm2SB_13,ui->fsm2SB_14,ui->fsm2SB_15,ui->fsm2SB_16, NULL }; - QSlider *sl = qobject_cast(sender()); - int fsId=sl->objectName().mid(sl->objectName().lastIndexOf("_")+1).toInt()-1; - int moduleid=sl->objectName().mid(3,1).toInt(); - if (moduleid==1) { - fssb1[fsId]->setValue(sl->value()); - } else { - fssb2[fsId]->setValue(sl->value()); - } - fsLock=false; -} - -void ModelEdit::fssbValueChanged() -{ - if (fsLock) - return; - fsLock=true; - QSlider * fssld1[] = { ui->fsm1SL_1, ui->fsm1SL_2,ui->fsm1SL_3,ui->fsm1SL_4,ui->fsm1SL_5,ui->fsm1SL_6,ui->fsm1SL_7,ui->fsm1SL_8, - ui->fsm1SL_9, ui->fsm1SL_10,ui->fsm1SL_11,ui->fsm1SL_12,ui->fsm1SL_13,ui->fsm1SL_14,ui->fsm1SL_15,ui->fsm1SL_16, NULL }; - QSlider * fssld2[] = { ui->fsm2SL_1, ui->fsm2SL_2,ui->fsm2SL_3,ui->fsm2SL_4,ui->fsm2SL_5,ui->fsm2SL_6,ui->fsm2SL_7,ui->fsm2SL_8, - ui->fsm2SL_9, ui->fsm2SL_10,ui->fsm2SL_11,ui->fsm2SL_12,ui->fsm2SL_13,ui->fsm2SL_14,ui->fsm2SL_15,ui->fsm2SL_16, NULL }; - QSpinBox *sb = qobject_cast(sender()); - int fsId=sb->objectName().mid(sb->objectName().lastIndexOf("_")+1).toInt()-1; - int moduleid=sb->objectName().mid(3,1).toInt(); - if (moduleid==1) { - fssld1[fsId]->setValue(sb->value()); - } else { - fssld2[fsId]->setValue(sb->value()); - } - fsLock=false; -} - -void ModelEdit::fssldEdited() -{ - QSlider *sl = qobject_cast(sender()); - int fsId=sl->objectName().mid(sl->objectName().lastIndexOf("_")+1).toInt()-1; - int moduleid=sl->objectName().mid(3,1).toInt(); - if (moduleid==1) { - g_model.moduleData[0].failsafeChannels[fsId]=sl->value(); - } else { - g_model.moduleData[1].failsafeChannels[fsId]=sl->value(); - } - updateSettings(); -} - -void ModelEdit::fssbEdited() -{ - QSpinBox *sb = qobject_cast(sender()); - int fsId=sb->objectName().mid(sb->objectName().lastIndexOf("_")+1).toInt()-1; - int moduleid=sb->objectName().mid(3,1).toInt(); - if (moduleid==1) { - g_model.moduleData[0].failsafeChannels[fsId]=sb->value(); - } else { - g_model.moduleData[1].failsafeChannels[fsId]=sb->value(); - } - updateSettings(); -} - -void ModelEdit::tabModelEditSetup() -{ - //name - QLabel * pmsl[] = {ui->swwarn_label, ui->swwarn0_label, ui->swwarn4_label, NULL}; - QCheckBox * pmchkb[] = {ui->swwarn1_ChkB,ui->swwarn2_ChkB,ui->swwarn3_ChkB,ui->swwarn5_ChkB,ui->swwarn6_ChkB, NULL}; - QSlider * tpmsld[] = {ui->chkSA, ui->chkSB, ui->chkSC, ui->chkSD, ui->chkSE, ui->chkSF, ui->chkSG, NULL}; - QSlider * fssld1[] = { ui->fsm1SL_1, ui->fsm1SL_2,ui->fsm1SL_3,ui->fsm1SL_4,ui->fsm1SL_5,ui->fsm1SL_6,ui->fsm1SL_7,ui->fsm1SL_8, - ui->fsm1SL_9, ui->fsm1SL_10,ui->fsm1SL_11,ui->fsm1SL_12,ui->fsm1SL_13,ui->fsm1SL_14,ui->fsm1SL_15,ui->fsm1SL_16, NULL }; - QSlider * fssld2[] = { ui->fsm2SL_1, ui->fsm2SL_2,ui->fsm2SL_3,ui->fsm2SL_4,ui->fsm2SL_5,ui->fsm2SL_6,ui->fsm2SL_7,ui->fsm2SL_8, - ui->fsm2SL_9, ui->fsm2SL_10,ui->fsm2SL_11,ui->fsm2SL_12,ui->fsm2SL_13,ui->fsm2SL_14,ui->fsm2SL_15,ui->fsm2SL_16, NULL }; - QSpinBox * fssb1[] = { ui->fsm1SB_1, ui->fsm1SB_2,ui->fsm1SB_3,ui->fsm1SB_4,ui->fsm1SB_5,ui->fsm1SB_6,ui->fsm1SB_7,ui->fsm1SB_8, - ui->fsm1SB_9, ui->fsm1SB_10,ui->fsm1SB_11,ui->fsm1SB_12,ui->fsm1SB_13,ui->fsm1SB_14,ui->fsm1SB_15,ui->fsm1SB_16, NULL }; - QSpinBox * fssb2[] = { ui->fsm2SB_1, ui->fsm2SB_2,ui->fsm2SB_3,ui->fsm2SB_4,ui->fsm2SB_5,ui->fsm2SB_6,ui->fsm2SB_7,ui->fsm2SB_8, - ui->fsm2SB_9, ui->fsm2SB_10,ui->fsm2SB_11,ui->fsm2SB_12,ui->fsm2SB_13,ui->fsm2SB_14,ui->fsm2SB_15,ui->fsm2SB_16, NULL }; - if (IS_TARANIS(GetEepromInterface()->getBoard())) { - ui->modelNameLE->setMaxLength(12); - } else { - ui->modelNameLE->setMaxLength(10); - } - ui->modelNameLE->setText(g_model.name); - fsLock=true; - if (GetEepromInterface()->getCapability(NumModules)<2) { - ui->rf2_GB->hide(); - } - - if (!GetEepromInterface()->getCapability(HasFailsafe)) { - ui->FSGB_1 ->hide(); - ui->FSGB_2->hide(); - ui->ModelSetupTab->setTabEnabled(1,0); - } else { - if (GetEepromInterface()->getCapability(HasFailsafe)<32) { - ui->FSGB_2->hide(); - } - - for (int i=0; fssld1[i]; i++) { - fssld1[i]->setValue(g_model.moduleData[0].failsafeChannels[i]); - fssld2[i]->setValue(g_model.moduleData[1].failsafeChannels[i]); - fssb1[i]->setValue(g_model.moduleData[0].failsafeChannels[i]); - fssb2[i]->setValue(g_model.moduleData[1].failsafeChannels[i]); - connect(fssld1[i],SIGNAL(valueChanged(int)),this,SLOT(fssldValueChanged())); - connect(fssld2[i],SIGNAL(valueChanged(int)),this,SLOT(fssldValueChanged())); - connect(fssb1[i],SIGNAL(valueChanged(int)),this,SLOT(fssbValueChanged())); - connect(fssb2[i],SIGNAL(valueChanged(int)),this,SLOT(fssbValueChanged())); - connect(fssld1[i],SIGNAL(sliderReleased()),this,SLOT(fssldEdited())); - connect(fssld2[i],SIGNAL(sliderReleased()),this,SLOT(fssldEdited())); - connect(fssb1[i],SIGNAL(editingFinished()),this,SLOT(fssbEdited())); - connect(fssb2[i],SIGNAL(editingFinished()),this,SLOT(fssbEdited())); - } - } - fsLock=false; - //timer1 mode direction value - populateTimerSwitchCB(ui->timer1ModeCB,g_model.timers[0].mode,GetEepromInterface()->getCapability(TimerTriggerB)); - int min = g_model.timers[0].val/60; - int sec = g_model.timers[0].val%60; - ui->timer1ValTE->setTime(QTime(0,min,sec)); - ui->timer1DirCB->setCurrentIndex(g_model.timers[0].dir); - if (!GetEepromInterface()->getCapability(ModelVoice)) { - ui->modelVoice_SB->hide(); - ui->modelVoice_label->hide(); - } else { - ui->modelVoice_SB->setValue(g_model.modelVoice+260); - } - if (!GetEepromInterface()->getCapability(PerModelThrottleInvert)) { - ui->label_thrrev->hide(); - ui->thrrevChkB->hide(); - } else { - ui->thrrevChkB->setChecked(g_model.throttleReversed); - } - if (!GetEepromInterface()->getCapability(ModelImage)) { - ui->modelImage_CB->hide(); - ui->modelImage_label->hide(); - ui->modelImage_image->hide(); - } else { - modelImageLock=true; - QStringList items; - items.append(""); - QSettings settings("companion9x", "companion9x"); - QString path=settings.value("sdPath", ".").toString(); - path.append("/BMP/"); - QDir qd(path); - int vml= GetEepromInterface()->getCapability(VoicesMaxLength)+4; - if (qd.exists()) { - QStringList filters; - filters << "*.bmp" << "*.bmp"; - foreach ( QString file, qd.entryList(filters, QDir::Files) ) { - QFileInfo fi(file); - QString temp=fi.completeBaseName(); - if (!items.contains(temp) && temp.length()<=vml) { - items.append(temp); - } - } - } - if (!items.contains(g_model.bitmap)) { - items.append(g_model.bitmap); - } - items.sort(); - ui->modelImage_CB->clear(); - foreach ( QString file, items ) { - ui->modelImage_CB->addItem(file); - if (file==g_model.bitmap) { - ui->modelImage_CB->setCurrentIndex(ui->modelImage_CB->count()-1); - QString fileName=path; - fileName.append(g_model.bitmap); - fileName.append(".bmp"); - QImage image(fileName); - if (image.isNull()) { - fileName=path; - fileName.append(g_model.bitmap); - fileName.append(".BMP"); - image.load(fileName); - } - if (!image.isNull()) { - ui->modelImage_image->setPixmap(QPixmap::fromImage(image.scaled( 64,32)));; - } - } - } - modelImageLock=false; - } - - if (!GetEepromInterface()->getCapability(pmSwitchMask)) { - for (int i=0; pmsl[i]; i++) { - pmsl[i]->hide(); - } - for (int i=0; pmchkb[i]; i++) { - pmchkb[i]->hide(); - } - ui->tswwarn0_CB->hide(); - for (int i=0; tpmsld[i]; i++) { - tpmsld[i]->hide(); - } - ui->swwarn0_line->hide(); - ui->swwarn0_line->hide(); - ui->swwarn0_CB->hide(); - ui->swwarn4_CB->hide(); - ui->swwarn_line0->hide(); - ui->swwarn_line1->hide(); - ui->swwarn_line2->hide(); - ui->swwarn_line3->hide(); - ui->swwarn_line4->hide(); - ui->swwarn_line5->hide(); - ui->tswwarn0_label->hide(); - ui->tswwarn1_label->hide(); - ui->tswwarn2_label->hide(); - ui->tswwarn3_label->hide(); - ui->tswwarn4_label->hide(); - ui->tswwarn5_label->hide(); - ui->tswwarn6_label->hide(); - ui->tswwarn7_label->hide(); - } else { - if (GetEepromInterface()->getCapability(Pots)==3) { - ui->swwarn0_CB->setCurrentIndex(g_model.switchWarningStates & 0x01); - ui->swwarn1_ChkB->setChecked(checkbit(g_model.switchWarningStates, 1)); - ui->swwarn2_ChkB->setChecked(checkbit(g_model.switchWarningStates, 2)); - ui->swwarn3_ChkB->setChecked(checkbit(g_model.switchWarningStates, 3)); - ui->swwarn4_CB->setCurrentIndex((g_model.switchWarningStates & 0x30)>>4); - ui->swwarn5_ChkB->setChecked(checkbit(g_model.switchWarningStates, 6)); - ui->swwarn6_ChkB->setChecked(checkbit(g_model.switchWarningStates, 7)); - for (int i=0; pmchkb[i]; i++) { - connect(pmchkb[i], SIGNAL(stateChanged(int)),this,SLOT(startupSwitchEdited())); - } - connect(ui->swwarn0_CB,SIGNAL(currentIndexChanged(int)),this,SLOT(startupSwitchEdited())); - connect(ui->swwarn4_CB,SIGNAL(currentIndexChanged(int)),this,SLOT(startupSwitchEdited())); - } else { - ui->tswwarn0_CB->setCurrentIndex(g_model.switchWarningStates & 0x01); - uint16_t switchstate=(g_model.switchWarningStates>>1); - ui->chkSA->setValue(switchstate & 0x3); - switchstate >>= 2; - ui->chkSB->setValue(switchstate & 0x3); - switchstate >>= 2; - ui->chkSC->setValue(switchstate & 0x3); - switchstate >>= 2; - ui->chkSD->setValue(switchstate & 0x3); - switchstate >>= 2; - ui->chkSE->setValue(switchstate & 0x3); - switchstate >>= 2; - ui->chkSF->setValue((switchstate & 0x3)/2); - switchstate >>= 2; - ui->chkSG->setValue(switchstate & 0x3); - connect(ui->tswwarn0_CB,SIGNAL(currentIndexChanged(int)),this,SLOT(startupSwitchEdited())); - for (int i=0; tpmsld[i]; i++) { - connect(tpmsld[i], SIGNAL(valueChanged(int)),this,SLOT(startupSwitchEdited())); - } - } - } - int ppmmax=GetEepromInterface()->getCapability(PPMFrameLength); - if (ppmmax>0) { - ui->ppmFrameLengthDSB->setMaximum(ppmmax); - } - if (!GetEepromInterface()->getCapability(InstantTrimSW)) { - ui->instantTrim_label->hide(); - ui->instantTrim_CB->setDisabled(true); - ui->instantTrim_CB->hide(); - } else { - switchEditLock=true; - int found=false; - for (int i=0; i< C9X_MAX_CUSTOM_FUNCTIONS; i++) { - if (g_model.funcSw[i].func==FuncInstantTrim) { - populateSwitchCB(ui->instantTrim_CB,g_model.funcSw[i].swtch,POPULATE_MSWITCHES & POPULATE_ONOFF); - found=true; - break; - } - } - if (found==false) { - populateSwitchCB(ui->instantTrim_CB,RawSwitch(),POPULATE_MSWITCHES & POPULATE_ONOFF); - } - switchEditLock=false; - } - if (GetEepromInterface()->getCapability(NoTimerDirs)) { - ui->timer1DirCB->hide(); - ui->timer2DirCB->hide(); - } - if (GetEepromInterface()->getCapability(NoThrExpo)) { - ui->label_thrExpo->hide(); - ui->thrExpoChkB->hide(); - } - if (!(GetEepromInterface()->getCapability(ExtendedTrims)>0)) { - ui->extendedTrimsChkB->hide(); - ui->extendedTrims_label->hide(); - } - if (!GetEepromInterface()->getCapability(HasTTrace)) { - ui->label_ttrace->hide(); - ui->ttraceCB->hide(); - } else { - populateTTraceCB(ui->ttraceCB,g_model.thrTraceSrc); - } - if (GetEepromInterface()->getCapability(RotaryEncoders)==0) { - ui->bcREaChkB->hide(); - ui->bcREbChkB->hide(); - } - if (GetEepromInterface()->getCapability(Pots)==3) { - ui->tswwarn0_CB->hide(); - ui->tswwarn0_label->hide(); - ui->tswwarn1_label->hide(); - ui->tswwarn2_label->hide(); - ui->tswwarn3_label->hide(); - ui->tswwarn4_label->hide(); - ui->tswwarn5_label->hide(); - ui->tswwarn6_label->hide(); - ui->tswwarn7_label->hide(); - ui->chkSA->hide(); - ui->chkSB->hide(); - ui->chkSC->hide(); - ui->chkSD->hide(); - ui->chkSE->hide(); - ui->chkSF->hide(); - ui->chkSG->hide(); - this->layout()->removeItem(ui->TaranisSwitchStartup); - ui->bcP4ChkB->hide(); - } else { - ui->swwarn0_CB->hide(); - ui->swwarn0_label->hide(); - ui->swwarn0_line->hide(); - ui->swwarn1_ChkB->hide(); - ui->swwarn1_line->hide(); - ui->swwarn2_ChkB->hide(); - ui->swwarn3_ChkB->hide(); - ui->swwarn4_CB->hide(); - ui->swwarn4_label->hide(); - ui->swwarn5_ChkB->hide(); - ui->swwarn6_ChkB->hide(); - ui->swwarn_line0->hide(); - ui->swwarn_line1->hide(); - ui->swwarn_line2->hide(); - ui->swwarn_line3->hide(); - ui->swwarn_line4->hide(); - ui->swwarn_line5->hide(); - this->layout()->removeItem(ui->StockSwitchStartup); - ui->bcP1ChkB->setText(tr("S1")); - ui->bcP2ChkB->setText(tr("S2")); - ui->bcP3ChkB->setText(tr("LS")); - } - - if (!GetEepromInterface()->getCapability(PerModelThrottleWarning)) { - ui->thrwarnChkB->setDisabled(true); - ui->thrwarnChkB->hide(); - ui->thrwarnLabel->hide(); - } else { - switchEditLock=true; - ui->thrwarnChkB->setChecked(g_model.disableThrottleWarning); - switchEditLock=false; - } - if (!GetEepromInterface()->getCapability(TimerTriggerB)) { - ui->timer1ModeBCB->hide(); - ui->timer1ModeB_label->hide(); - ui->timer2ModeBCB->hide(); - ui->timer2ModeB_label->hide(); - } else { - populateTimerSwitchBCB(ui->timer1ModeBCB,g_model.timers[0].modeB,GetEepromInterface()->getCapability(TimerTriggerB)); - populateTimerSwitchBCB(ui->timer2ModeBCB,g_model.timers[1].modeB,GetEepromInterface()->getCapability(TimerTriggerB)); - } - - int index=0; - int selindex; - int selindex2; - protocolEditLock=true; - protocol2EditLock=true; - ui->protocolCB->clear(); - for (int i=0; iisAvailable((Protocol)i)) { - ui->protocolCB->addItem(getProtocolStr(i), (QVariant)i); - if (g_model.moduleData[0].protocol == i) { - selindex = index; - } - index++; - } - } - if (GetEepromInterface()->getCapability(NumModules)>1) { - index=0; - ui->protocolCB_2->clear(); - for (int i=0; iisAvailable((Protocol)i, 1)) { - ui->protocolCB_2->addItem(getProtocolStr(i), (QVariant)i); - if (g_model.moduleData[1].protocol == i) { - selindex2 = index; - } - index++; - } - } - } - if (GetEepromInterface()->getCapability(ModelTrainerEnable)) { - trainerEditLock=true; - if (!(g_model.trainerMode||g_model.traineron)) { - ui->protocolCB_3->setCurrentIndex(0); - ui->label_PPM_3->hide(); - ui->ppmDelaySB_3->hide(); - ui->label_PPMCH_3->hide(); - ui->label_pulsePol_3->hide(); - ui->pulsePolCB_3->hide(); - ui->numChannelsSB_3->hide(); - ui->label_ppmFrameLength_3->hide(); - ui->ppmFrameLengthDSB_3->hide(); - ui->label_numChannelsStart_3->hide(); - ui->numChannelsStart_3->hide(); - } else { - ui->protocolCB_3->setCurrentIndex(1); - ui->label_PPM_3->show(); - ui->ppmDelaySB_3->show(); - ui->label_PPMCH_3->show(); - ui->label_pulsePol_3->show(); - ui->pulsePolCB_3->show(); - ui->numChannelsSB_3->show(); - ui->label_ppmFrameLength_3->show(); - ui->ppmFrameLengthDSB_3->show(); - ui->label_numChannelsStart_3->show(); - ui->numChannelsStart_3->show(); - } - trainerEditLock=false; - on_protocolCB_3_currentIndexChanged(g_model.traineron||g_model.trainerMode); - } else { - ui->rf3_GB->hide(); - } - - ui->label_PPM->hide(); - ui->ppmDelaySB->hide(); - ui->label_PPMCH->hide(); - ui->label_pulsePol->hide(); - ui->pulsePolCB->hide(); - ui->numChannelsSB->hide(); - ui->label_ppmFrameLength->hide(); - ui->ppmFrameLengthDSB->hide(); - ui->label_DSM->hide(); - ui->DSM_Type->hide(); - ui->label_PXX->hide(); - ui->pxxRxNum->hide(); - ui->label_numChannelsStart->hide(); - ui->numChannelsStart->hide(); - ui->pxxRxNum->setEnabled(false); - ui->protocolCB->setCurrentIndex(selindex); - protocolEditLock=false; - on_protocolCB_currentIndexChanged(selindex); - if (GetEepromInterface()->getCapability(NumModules)>1) { - ui->label_PPM_2->hide(); - ui->ppmDelaySB_2->hide(); - ui->label_PPMCH_2->hide(); - ui->label_pulsePol_2->hide(); - ui->pulsePolCB_2->hide(); - ui->numChannelsSB_2->hide(); - ui->label_ppmFrameLength_2->hide(); - ui->ppmFrameLengthDSB_2->hide(); - ui->label_DSM_2->hide(); - ui->DSM_Type_2->hide(); - ui->label_PXX_2->hide(); - ui->pxxRxNum_2->hide(); - ui->label_numChannelsStart_2->hide(); - ui->numChannelsStart_2->hide(); - ui->pxxRxNum_2->setEnabled(false); - ui->protocolCB_2->setCurrentIndex(selindex2); - protocol2EditLock=false; - on_protocolCB_2_currentIndexChanged(selindex2); - } - - //timer2 mode direction value - if (GetEepromInterface()->getCapability(Timers)<2) { - ui->timer2DirCB->hide(); - ui->timer2ValTE->hide(); - ui->timer2DirCB->hide(); - ui->timer2ModeCB->hide(); - ui->timer2ModeBCB->hide(); - ui->timer2ModeB_label->hide(); - ui->label_timer2->hide(); - } else { - populateTimerSwitchCB(ui->timer2ModeCB,g_model.timers[1].mode,GetEepromInterface()->getCapability(TimerTriggerB)); - min = g_model.timers[1].val/60; - sec = g_model.timers[1].val%60; - ui->timer2ValTE->setTime(QTime(0,min,sec)); - ui->timer2DirCB->setCurrentIndex(g_model.timers[1].dir); - } - if (!GetEepromInterface()->getCapability(PermTimers)) { - ui->timer1Perm->hide(); - ui->timer2Perm->hide(); - ui->timer1PermValue->hide(); - ui->timer2PermValue->hide(); - } else { - int sign=1; - int pvalue=g_model.timers[0].pvalue; - if (pvalue<0) { - pvalue=-pvalue; - sign=-1; - } - int hours=pvalue/3600; - pvalue-=hours*3600; - int minutes = pvalue/60; - int seconds = pvalue%60; - ui->timer1PermValue->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'))); - // QString QString::arg ( int a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' ) ) const - sign=1; - pvalue=g_model.timers[1].pvalue; - if (pvalue<0) { - pvalue=-pvalue; - sign=-1; - } - hours=pvalue/3600; - pvalue-=hours*3600; - minutes = pvalue/60; - seconds = pvalue%60; - ui->timer2PermValue->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->timer1Perm->setChecked(g_model.timers[0].persistent); - ui->timer2Perm->setChecked(g_model.timers[1].persistent); - } - if (!GetEepromInterface()->getCapability(minuteBeep)) { - ui->timer1Minute->hide(); - ui->timer2Minute->hide(); - } else { - ui->timer1Minute->setChecked(g_model.timers[0].minuteBeep); - ui->timer2Minute->setChecked(g_model.timers[1].minuteBeep); - } - - if (!GetEepromInterface()->getCapability(countdownBeep)) { - ui->timer1CountDownBeep->hide(); - ui->timer2CountDownBeep->hide(); - } else { - ui->timer1CountDownBeep->setChecked(g_model.timers[0].countdownBeep); - ui->timer2CountDownBeep->setChecked(g_model.timers[1].countdownBeep); - } - - //trim inc, thro trim, thro expo, instatrim - ui->trimIncCB->setCurrentIndex(g_model.trimInc); - ui->thrExpoChkB->setChecked(g_model.thrExpo); - ui->thrTrimChkB->setChecked(g_model.thrTrim); - - //center beep - ui->bcRUDChkB->setChecked(g_model.beepANACenter & BC_BIT_RUD); - ui->bcELEChkB->setChecked(g_model.beepANACenter & BC_BIT_ELE); - ui->bcTHRChkB->setChecked(g_model.beepANACenter & BC_BIT_THR); - ui->bcAILChkB->setChecked(g_model.beepANACenter & BC_BIT_AIL); - ui->bcP1ChkB->setChecked(g_model.beepANACenter & BC_BIT_P1); - ui->bcP2ChkB->setChecked(g_model.beepANACenter & BC_BIT_P2); - ui->bcP3ChkB->setChecked(g_model.beepANACenter & BC_BIT_P3); - ui->bcP4ChkB->setChecked(g_model.beepANACenter & BC_BIT_P4); - ui->bcREaChkB->setChecked(g_model.beepANACenter & BC_BIT_REA); - ui->bcREbChkB->setChecked(g_model.beepANACenter & BC_BIT_REB); - - // PPM settings fields - ui->ppmDelaySB->setEnabled(g_model.moduleData[0].protocol == PPM); - ui->pulsePolCB->setCurrentIndex(g_model.moduleData[0].ppmPulsePol); - ui->ppmDelaySB->setEnabled(g_model.moduleData[0].protocol == PPM); - ui->ppmDelaySB->setValue(g_model.moduleData[0].ppmDelay); - // TODO? ui->numChannelsSB->setEnabled(g_model.moduleData[0].protocol == PPM); - - ui->extendedLimitsChkB->setChecked(g_model.extendedLimits); - ui->T2ThrTrgChkB->setChecked(g_model.t2throttle); - if (!GetEepromInterface()->getCapability(Timer2ThrTrig)) { - ui->T2ThrTrg->hide(); - ui->T2ThrTrgChkB->hide(); - } - ui->ppmFrameLengthDSB->setValue(22.5+((double)g_model.moduleData[0].ppmFrameLength)*0.5); - if (!GetEepromInterface()->getCapability(PPMExtCtrl)) { - ui->ppmFrameLengthDSB->hide(); - ui->label_ppmFrameLength->hide(); - } - switch (g_model.moduleData[0].protocol) { - case PXX_DJT: - case PXX_XJT_X16: - case PXX_XJT_D8: - case PXX_XJT_LR12: - ui->pxxRxNum->setMinimum(0); - ui->pxxRxNum->setValue((g_model.modelId)); - break; - case DSM2: - if (!GetEepromInterface()->getCapability(DSM2Indexes)) { - ui->pxxRxNum->setValue(1); - } - else { - ui->pxxRxNum->setMinimum(0); - ui->pxxRxNum->setValue((g_model.modelId)); - } - ui->numChannelsSB->setValue(8); - break; - default: - ui->label_DSM->hide(); - ui->DSM_Type->hide(); - ui->DSM_Type->setEnabled(false); - ui->label_PXX->hide(); - ui->pxxRxNum->hide(); - ui->pxxRxNum->setEnabled(false); - ui->numChannelsSB->setValue(g_model.moduleData[0].channelsCount); - break; - } -} - -void ModelEdit::on_modelVoice_SB_editingFinished() -{ - g_model.modelVoice=ui->modelVoice_SB->value()-260; - updateSettings(); -} - -void ModelEdit::on_timer1Perm_toggled(bool checked) -{ - g_model.timers[0].persistent=checked; - updateSettings(); -} - -void ModelEdit::on_timer2Perm_toggled(bool checked) -{ - g_model.timers[1].persistent=checked; - updateSettings(); -} - -void ModelEdit::on_timer1Minute_toggled(bool checked) -{ - g_model.timers[0].minuteBeep=checked; - updateSettings(); -} - -void ModelEdit::on_timer2Minute_toggled(bool checked) -{ - g_model.timers[1].minuteBeep=checked; - updateSettings(); -} - -void ModelEdit::on_timer1CountDownBeep_toggled(bool checked) -{ - g_model.timers[0].countdownBeep=checked; - updateSettings(); -} - -void ModelEdit::on_timer2CountDownBeep_toggled(bool checked) -{ - g_model.timers[1].countdownBeep=checked; - updateSettings(); -} - -void ModelEdit::displayOnePhaseOneTrim(unsigned int phase_idx, unsigned int chn, QComboBox *trimUse, QSpinBox *trimVal, QSlider *trimSlider) -{ - PhaseData *phase = &g_model.phaseData[phase_idx]; - int trim = phase->trim[chn]; - if (trimUse) populateTrimUseCB(trimUse, phase_idx); - if (phase->trimRef[chn] >= 0) { - if (trimUse) trimUse->setCurrentIndex(1 + phase->trimRef[chn] - (phase->trimRef[chn] >= (int)phase_idx ? 1 : 0)); - trim = g_model.phaseData[g_model.getTrimFlightPhase(chn, phase_idx)].trim[chn]; - trimVal->setEnabled(false); - trimSlider->setEnabled(false); - } else { - trimVal->setEnabled(true); - trimSlider->setEnabled(true); - if (trimUse) trimUse->setCurrentIndex(0); - } - int trimsMax = GetEepromInterface()->getCapability(ExtendedTrims); - if (trimsMax == 0 || !g_model.extendedTrims) { - trimsMax = 125; - } - /*else if (trimsMax == 500) - trimSlider->setTickInterval(50);*/ - trimSlider->setRange(-trimsMax, +trimsMax); - trimVal->setRange(-trimsMax, +trimsMax); - trimVal->setValue(trim); - trimSlider->setValue(trim); - if (chn == 2 && g_eeGeneral.throttleReversed) - trimSlider->setInvertedAppearance(true); -} - -void ModelEdit::displayOnePhase(unsigned int phase_idx, QLineEdit *name, QComboBox *sw, QDoubleSpinBox *fadeIn, QDoubleSpinBox *fadeOut, - QComboBox *trim1Use, QSpinBox *trim1, QLabel *trim1Label, QSlider *trim1Slider, - QComboBox *trim2Use, QSpinBox *trim2, QLabel *trim2Label, QSlider *trim2Slider, - QComboBox *trim3Use, QSpinBox *trim3, QLabel *trim3Label, QSlider *trim3Slider, - QComboBox *trim4Use, QSpinBox *trim4, QLabel *trim4Label, QSlider *trim4Slider, - QLabel *gv1Label, QComboBox *gv1Use,QSpinBox *gv1Value, - QLabel *gv2Label, QComboBox *gv2Use,QSpinBox *gv2Value, - QLabel *gv3Label, QComboBox *gv3Use,QSpinBox *gv3Value, - QLabel *gv4Label, QComboBox *gv4Use,QSpinBox *gv4Value, - QLabel *gv5Label, QComboBox *gv5Use,QSpinBox *gv5Value, - QLabel *re1Label, QComboBox *re1Use,QSpinBox *re1Value, - QLabel *re2Label, QComboBox *re2Use,QSpinBox *re2Value,bool doConnect=false) -{ - phasesLock=true; - PhaseData *phase = &g_model.phaseData[phase_idx]; - if (IS_TARANIS(GetEepromInterface()->getBoard())) { - if (name) name->setMaxLength(10); - } else { - if (name) name->setMaxLength(6); - } - - if (name) name->setText(phase->name); - if (sw) populateSwitchCB(sw, phase->swtch); - - int scale=GetEepromInterface()->getCapability(SlowScale); - float range=GetEepromInterface()->getCapability(SlowRange); - int fades=GetEepromInterface()->getCapability(FlightPhasesHaveFades); - if (fades && fadeIn) { - fadeIn->setEnabled(true); - fadeOut->setEnabled(true); - fadeIn->setMaximum(range/scale); - fadeIn->setSingleStep(1.0/scale); - fadeIn->setDecimals((scale==1 ? 0 :1) ); - if (fadeIn) { - fadeIn->setValue((double)phase->fadeIn/scale); - } - fadeOut->setMaximum(range/scale); - fadeOut->setSingleStep(1.0/scale); - fadeOut->setDecimals((scale==1 ? 0 :1)); - if (fadeOut) { - fadeOut->setValue((double)phase->fadeOut/scale); - } - } else if ( fadeIn ) { - fadeIn->setDisabled(true); - fadeOut->setDisabled(true); - } - displayOnePhaseOneTrim(phase_idx, CONVERT_MODE(1)-1, trim1Use, trim1, trim1Slider); - displayOnePhaseOneTrim(phase_idx, CONVERT_MODE(2)-1, trim2Use, trim2, trim2Slider); - displayOnePhaseOneTrim(phase_idx, CONVERT_MODE(3)-1, trim3Use, trim3, trim3Slider); - displayOnePhaseOneTrim(phase_idx, CONVERT_MODE(4)-1, trim4Use, trim4, trim4Slider); - - if (gv1Use) { - populateGvarUseCB(gv1Use, phase_idx); - if (phase->gvars[0]>1024) { - gv1Use->setCurrentIndex(phase->gvars[0]-1024); - } - } - gv1Value->setMinimum(-1024); - gv1Value->setMaximum(1024); - if (phase->gvars[0]<1024) { - gv1Value->setValue(phase->gvars[0]); - gv1Value->setEnabled(true); - } else { - uint index=phase->gvars[0]-1025; - if (index>=phase_idx) { - index++; - } - PhaseData *phasegvar = &g_model.phaseData[index]; - gv1Value->setValue(phasegvar->gvars[0]); - gv1Value->setDisabled(true); - } - if (gv2Use) { - populateGvarUseCB(gv2Use, phase_idx); - if (phase->gvars[1]>1024) { - gv2Use->setCurrentIndex(phase->gvars[1]-1024); - } - } - gv2Value->setMinimum(-1024); - gv2Value->setMaximum(1024); - if (phase->gvars[1]<1024) { - gv2Value->setValue(phase->gvars[1]); - gv2Value->setEnabled(true); - } else { - uint index=phase->gvars[1]-1025; - if (index>=phase_idx) { - index++; - } - PhaseData *phasegvar = &g_model.phaseData[index]; - gv2Value->setValue(phasegvar->gvars[1]); - gv2Value->setDisabled(true); - } - if (gv3Use) { - populateGvarUseCB(gv3Use, phase_idx); - if (phase->gvars[2]>1024) { - gv3Use->setCurrentIndex(phase->gvars[2]-1024); - } - } - gv3Value->setMinimum(-1024); - gv3Value->setMaximum(1024); - if (phase->gvars[2]<1024) { - gv3Value->setValue(phase->gvars[2]); - gv3Value->setEnabled(true); - } else { - uint index=phase->gvars[2]-1025; - if (index>=phase_idx) { - index++; - } - PhaseData *phasegvar = &g_model.phaseData[index]; - gv3Value->setValue(phasegvar->gvars[2]); - gv3Value->setDisabled(true); - } - if (gv4Use) { - populateGvarUseCB(gv4Use, phase_idx); - if (phase->gvars[3]>1024) { - gv4Use->setCurrentIndex(phase->gvars[3]-1024); - } - } - gv4Value->setMinimum(-1024); - gv4Value->setMaximum(1024); - if (phase->gvars[3]<1024) { - gv4Value->setValue(phase->gvars[3]); - gv4Value->setEnabled(true); - } else { - uint index=phase->gvars[3]-1025; - if (index>=phase_idx) { - index++; - } - PhaseData *phasegvar = &g_model.phaseData[index]; - gv4Value->setValue(phasegvar->gvars[3]); - gv4Value->setDisabled(true); - } - if (gv5Use) { - populateGvarUseCB(gv5Use, phase_idx); - if (phase->gvars[4]>1024) { - gv5Use->setCurrentIndex(phase->gvars[4]-1024); - } - } - gv5Value->setMinimum(-1024); - gv5Value->setMaximum(1024); - if (phase->gvars[4]<1024) { - gv5Value->setValue(phase->gvars[4]); - gv5Value->setEnabled(true); - } else { - uint index=phase->gvars[4]-1025; - if (index>=phase_idx) { - index++; - } - PhaseData *phasegvar = &g_model.phaseData[index]; - gv5Value->setValue(phasegvar->gvars[4]); - gv5Value->setDisabled(true); - } - if (re1Value) { - re1Value->setMinimum(-1024); - re1Value->setMaximum(1024); - } - if (re2Value) { - re2Value->setMinimum(-1024); - re2Value->setMaximum(1024); - } - if (re1Use) { - populateGvarUseCB(re1Use, phase_idx); - if (phase->rotaryEncoders[0]>1024) { - re1Use->setCurrentIndex(phase->rotaryEncoders[0]-1024); - } - } - if (phase->rotaryEncoders[0]<1024) { - re1Value->setValue(phase->rotaryEncoders[0]); - re1Value->setEnabled(true); - } else { - uint index=phase->rotaryEncoders[0]-1025; - if (index>=phase_idx) { - index++; - } - PhaseData *phasegvar = &g_model.phaseData[index]; - re1Value->setValue(phasegvar->rotaryEncoders[0]); - re1Value->setDisabled(true); - } - if (re2Use) { - populateGvarUseCB(re2Use, phase_idx); - if (phase->rotaryEncoders[0]>1024) { - re1Use->setCurrentIndex(phase->rotaryEncoders[0]-1024); - } - } - if (phase->rotaryEncoders[1]<1024) { - re2Value->setValue(phase->rotaryEncoders[1]); - re2Value->setEnabled(true); - } else { - uint index=phase->rotaryEncoders[1]-1025; - if (index>=phase_idx) { - index++; - } - PhaseData *phasegvar = &g_model.phaseData[index]; - re2Value->setValue(phasegvar->rotaryEncoders[1]); - re2Value->setDisabled(true); - } - if (GetEepromInterface()->getCapability(RotaryEncoders)<2) { - if (re2Label) - re2Label->hide(); - if (re2Use) - re2Use->hide(); - re2Value->hide(); - } - if (GetEepromInterface()->getCapability(RotaryEncoders)<1) { - if (re1Label) - re1Label->hide(); - if (re1Use) - re1Use->hide(); - re1Value->hide(); - } - QString labels[] = { tr("Rud"), tr("Ele"), tr("Thr"), tr("Ail") }; - if (trim1Label) { - trim1Label->setText(labels[CONVERT_MODE(1)-1]); - trim2Label->setText(labels[CONVERT_MODE(2)-1]); - trim3Label->setText(labels[CONVERT_MODE(3)-1]); - trim4Label->setText(labels[CONVERT_MODE(4)-1]); - } - // the connects - if (doConnect) { - connect(name, SIGNAL(editingFinished()), this, SLOT(phaseName_editingFinished())); - if (sw!=NULL) { - connect(sw,SIGNAL(currentIndexChanged(int)),this,SLOT(phaseSwitch_currentIndexChanged())); - connect(trim1Use,SIGNAL(currentIndexChanged(int)),this,SLOT(phaseTrimUse_currentIndexChanged())); - connect(trim2Use,SIGNAL(currentIndexChanged(int)),this,SLOT(phaseTrimUse_currentIndexChanged())); - connect(trim3Use,SIGNAL(currentIndexChanged(int)),this,SLOT(phaseTrimUse_currentIndexChanged())); - connect(trim4Use,SIGNAL(currentIndexChanged(int)),this,SLOT(phaseTrimUse_currentIndexChanged())); - } - if (gv1Use) connect(gv1Use,SIGNAL(currentIndexChanged(int)),this,SLOT(phaseGVUse_currentIndexChanged())); - if (gv2Use) connect(gv2Use,SIGNAL(currentIndexChanged(int)),this,SLOT(phaseGVUse_currentIndexChanged())); - if (gv3Use) connect(gv3Use,SIGNAL(currentIndexChanged(int)),this,SLOT(phaseGVUse_currentIndexChanged())); - if (gv4Use) connect(gv4Use,SIGNAL(currentIndexChanged(int)),this,SLOT(phaseGVUse_currentIndexChanged())); - if (gv5Use) connect(gv5Use,SIGNAL(currentIndexChanged(int)),this,SLOT(phaseGVUse_currentIndexChanged())); - if (re1Use) connect(re1Use,SIGNAL(currentIndexChanged(int)),this,SLOT(phaseREUse_currentIndexChanged())); - if (re2Use) connect(re2Use,SIGNAL(currentIndexChanged(int)),this,SLOT(phaseREUse_currentIndexChanged())); - connect(gv1Value,SIGNAL(editingFinished()),this,SLOT(phaseGVValue_editingFinished())); - connect(gv2Value,SIGNAL(editingFinished()),this,SLOT(phaseGVValue_editingFinished())); - connect(gv3Value,SIGNAL(editingFinished()),this,SLOT(phaseGVValue_editingFinished())); - connect(gv4Value,SIGNAL(editingFinished()),this,SLOT(phaseGVValue_editingFinished())); - connect(gv5Value,SIGNAL(editingFinished()),this,SLOT(phaseGVValue_editingFinished())); - connect(re1Value,SIGNAL(editingFinished()),this,SLOT(phaseREValue_editingFinished())); - connect(re2Value,SIGNAL(editingFinished()),this,SLOT(phaseREValue_editingFinished())); - - connect(fadeIn,SIGNAL(editingFinished()),this,SLOT(phaseFadeIn_editingFinished())); - connect(fadeOut,SIGNAL(editingFinished()),this,SLOT(phaseFadeOut_editingFinished())); - connect(trim1,SIGNAL(valueChanged(int)),this,SLOT(phaseTrim_valueChanged())); - connect(trim2,SIGNAL(valueChanged(int)),this,SLOT(phaseTrim_valueChanged())); - connect(trim3,SIGNAL(valueChanged(int)),this,SLOT(phaseTrim_valueChanged())); - connect(trim4,SIGNAL(valueChanged(int)),this,SLOT(phaseTrim_valueChanged())); - connect(trim1Slider,SIGNAL(valueChanged(int)),this,SLOT(phaseTrimSlider_valueChanged())); - connect(trim2Slider,SIGNAL(valueChanged(int)),this,SLOT(phaseTrimSlider_valueChanged())); - connect(trim3Slider,SIGNAL(valueChanged(int)),this,SLOT(phaseTrimSlider_valueChanged())); - connect(trim4Slider,SIGNAL(valueChanged(int)),this,SLOT(phaseTrimSlider_valueChanged())); - phasesLock=false; - } -} - -void ModelEdit::tabPhases() -{ - QSpinBox * tmp[9][5]={ - {ui->phase0GV1Value,ui->phase0GV2Value,ui->phase0GV3Value,ui->phase0GV4Value,ui->phase0GV5Value} , - {ui->phase1GV1Value,ui->phase1GV2Value,ui->phase1GV3Value,ui->phase1GV4Value,ui->phase1GV5Value} , - {ui->phase2GV1Value,ui->phase2GV2Value,ui->phase2GV3Value,ui->phase2GV4Value,ui->phase2GV5Value} , - {ui->phase3GV1Value,ui->phase3GV2Value,ui->phase3GV3Value,ui->phase3GV4Value,ui->phase3GV5Value} , - {ui->phase4GV1Value,ui->phase4GV2Value,ui->phase4GV3Value,ui->phase4GV4Value,ui->phase4GV5Value} , - {ui->phase5GV1Value,ui->phase5GV2Value,ui->phase5GV3Value,ui->phase5GV4Value,ui->phase5GV5Value} , - {ui->phase6GV1Value,ui->phase6GV2Value,ui->phase6GV3Value,ui->phase6GV4Value,ui->phase6GV5Value} , - {ui->phase7GV1Value,ui->phase7GV2Value,ui->phase7GV3Value,ui->phase7GV4Value,ui->phase7GV5Value} , - {ui->phase8GV1Value,ui->phase8GV2Value,ui->phase8GV3Value,ui->phase8GV4Value,ui->phase8GV5Value} - }; - - QSpinBox * tmp2[9][2]={ - {ui->phase0RE1Value,ui->phase0RE2Value} , - {ui->phase1RE1Value,ui->phase1RE2Value} , - {ui->phase2RE1Value,ui->phase2RE2Value} , - {ui->phase3RE1Value,ui->phase3RE2Value} , - {ui->phase4RE1Value,ui->phase4RE2Value} , - {ui->phase5RE1Value,ui->phase5RE2Value} , - {ui->phase6RE1Value,ui->phase6RE2Value} , - {ui->phase7RE1Value,ui->phase7RE2Value} , - {ui->phase8RE1Value,ui->phase8RE2Value} , - }; - - memcpy(gvarsSB, tmp, sizeof(gvarsSB)); - memcpy(reSB, tmp2, sizeof(reSB)); - - phasesLock = true; - int gvars=0; - if (GetEepromInterface()->getCapability(HasVariants)) { - if (GetCurrentFirmwareVariant() & GVARS_VARIANT) - gvars=1; - } else { - gvars=GetEepromInterface()->getCapability(Gvars); - } - if (!GetEepromInterface()->getCapability(RotaryEncoders)) { - ui->phase0reGB->hide(); - ui->phase1reGB->hide(); - ui->phase2reGB->hide(); - ui->phase3reGB->hide(); - ui->phase4reGB->hide(); - ui->phase5reGB->hide(); - ui->phase6reGB->hide(); - ui->phase7reGB->hide(); - ui->phase8reGB->hide(); - } - if (!GetEepromInterface()->getCapability(GvarsFlightPhases) || gvars==0) { - if (!GetEepromInterface()->getCapability(Gvars) || gvars==0) { - ui->phase0gvGB->hide(); - } - ui->phase1gvGB->hide(); - ui->phase2gvGB->hide(); - ui->phase3gvGB->hide(); - ui->phase4gvGB->hide(); - ui->phase5gvGB->hide(); - ui->phase6gvGB->hide(); - ui->phase7gvGB->hide(); - ui->phase8gvGB->hide(); - } - - if (!GetEepromInterface()->getCapability(GvarsAreNamed)) { - ui->phase0GV1Name->hide(); - ui->phase0GV2Name->hide(); - ui->phase0GV3Name->hide(); - ui->phase0GV4Name->hide(); - ui->phase0GV5Name->hide(); - ui->phase0GV6Name->hide(); - ui->phase0GV7Name->hide(); - } - - if (GetEepromInterface()->getCapability(Gvars) && gvars==1) { - if (!GetEepromInterface()->getCapability(GvarsHaveSources)) { - ui->phase0GV1Source->hide(); - ui->phase0GV2Source->hide(); - ui->phase0GV3Source->hide(); - ui->phase0GV4Source->hide(); - ui->phase0GV5Source->hide(); - ui->phase0GV6Source->hide(); - ui->phase0GV7Source->hide(); - } else { - populateGvSourceCB(ui->phase0GV1Source, g_model.gvsource[0]); - populateGvSourceCB(ui->phase0GV2Source, g_model.gvsource[1]); - populateGvSourceCB(ui->phase0GV3Source, g_model.gvsource[2]); - populateGvSourceCB(ui->phase0GV4Source, g_model.gvsource[3]); - populateGvSourceCB(ui->phase0GV5Source, g_model.gvsource[4]); - connect(ui->phase0GV1Source,SIGNAL(currentIndexChanged(int)),this,SLOT(GVSource_currentIndexChanged())); - connect(ui->phase0GV2Source,SIGNAL(currentIndexChanged(int)),this,SLOT(GVSource_currentIndexChanged())); - connect(ui->phase0GV3Source,SIGNAL(currentIndexChanged(int)),this,SLOT(GVSource_currentIndexChanged())); - connect(ui->phase0GV4Source,SIGNAL(currentIndexChanged(int)),this,SLOT(GVSource_currentIndexChanged())); - connect(ui->phase0GV5Source,SIGNAL(currentIndexChanged(int)),this,SLOT(GVSource_currentIndexChanged())); - } - if (IS_TARANIS(GetEepromInterface()->getBoard())) { - ui->phase0GV1Name->setMaxLength(10); - ui->phase0GV2Name->setMaxLength(10); - ui->phase0GV3Name->setMaxLength(10); - ui->phase0GV4Name->setMaxLength(10); - ui->phase0GV5Name->setMaxLength(10); - } else { - ui->phase0GV1Name->setMaxLength(6); - ui->phase0GV2Name->setMaxLength(6); - ui->phase0GV3Name->setMaxLength(6); - ui->phase0GV4Name->setMaxLength(6); - ui->phase0GV5Name->setMaxLength(6); - } - - ui->phase0GV1Name->setText(g_model.gvars_names[0]); - ui->phase0GV2Name->setText(g_model.gvars_names[1]); - ui->phase0GV3Name->setText(g_model.gvars_names[2]); - ui->phase0GV4Name->setText(g_model.gvars_names[3]); - ui->phase0GV5Name->setText(g_model.gvars_names[4]); - connect(ui->phase0GV1Name,SIGNAL(editingFinished()),this,SLOT(GVName_editingFinished())); - connect(ui->phase0GV2Name,SIGNAL(editingFinished()),this,SLOT(GVName_editingFinished())); - connect(ui->phase0GV3Name,SIGNAL(editingFinished()),this,SLOT(GVName_editingFinished())); - connect(ui->phase0GV4Name,SIGNAL(editingFinished()),this,SLOT(GVName_editingFinished())); - connect(ui->phase0GV5Name,SIGNAL(editingFinished()),this,SLOT(GVName_editingFinished())); - } - if (gvars) { - if (GetEepromInterface()->getCapability(GvarsNum)<7) { - ui->phase0GV6Name->hide(); - ui->phase0GV7Name->hide(); - ui->phase0GV6Source->hide(); - ui->phase0GV7Source->hide(); - ui->phase0GV6Value->hide(); - ui->phase0GV7Value->hide(); - ui->phase0GV6_Label->hide(); - ui->phase0GV7_Label->hide(); - } else { - populateGvSourceCB(ui->phase0GV6Source, g_model.gvsource[5]); - populateGvSourceCB(ui->phase0GV7Source, g_model.gvsource[6]); - connect(ui->phase0GV6Source,SIGNAL(currentIndexChanged(int)),this,SLOT(GVSource_currentIndexChanged())); - connect(ui->phase0GV7Source,SIGNAL(currentIndexChanged(int)),this,SLOT(GVSource_currentIndexChanged())); - ui->phase0GV6Name->setText(g_model.gvars_names[5]); - ui->phase0GV7Name->setText(g_model.gvars_names[6]); - connect(ui->phase0GV6Name,SIGNAL(editingFinished()),this,SLOT(GVName_editingFinished())); - connect(ui->phase0GV7Name,SIGNAL(editingFinished()),this,SLOT(GVName_editingFinished())); - ui->phase0GV6Value->setValue(g_model.phaseData[0].gvars[5]); - ui->phase0GV7Value->setValue(g_model.phaseData[0].gvars[6]); - connect(ui->phase0GV6Value,SIGNAL(editingFinished()),this,SLOT(phaseGVValue_editingFinished())); - connect(ui->phase0GV7Value,SIGNAL(editingFinished()),this,SLOT(phaseGVValue_editingFinished())); - } - } - - displayOnePhase(0, ui->phase0Name, NULL, ui->phase0FadeIn, ui->phase0FadeOut, NULL, ui->phase0Trim1Value, ui->phase0Trim1Label, ui->phase0Trim1Slider, NULL, ui->phase0Trim2Value, ui->phase0Trim2Label, ui->phase0Trim2Slider, NULL, ui->phase0Trim3Value, ui->phase0Trim3Label, ui->phase0Trim3Slider, NULL, ui->phase0Trim4Value, ui->phase0Trim4Label, ui->phase0Trim4Slider, ui->phase0GV1_Label, NULL , ui->phase0GV1Value, ui->phase0GV2_Label, NULL , ui->phase0GV2Value, ui->phase0GV3_Label, NULL , ui->phase0GV3Value, ui->phase0GV4_Label, NULL , ui->phase0GV4Value, ui->phase0GV5_Label, NULL , ui->phase0GV5Value,ui->phase0REA_Label,NULL, ui->phase0RE1Value,ui->phase0REB_Label, NULL, ui->phase0RE2Value, true); - displayOnePhase(1, ui->phase1Name, ui->phase1Switch, ui->phase1FadeIn, ui->phase1FadeOut, ui->phase1Trim1Use, ui->phase1Trim1Value, ui->phase1Trim1Label, ui->phase1Trim1Slider, ui->phase1Trim2Use, ui->phase1Trim2Value, ui->phase1Trim2Label, ui->phase1Trim2Slider, ui->phase1Trim3Use, ui->phase1Trim3Value, ui->phase1Trim3Label, ui->phase1Trim3Slider, ui->phase1Trim4Use, ui->phase1Trim4Value, ui->phase1Trim4Label, ui->phase1Trim4Slider, ui->phase1GV1_Label, ui->phase1GV1Use, ui->phase1GV1Value, ui->phase1GV2_Label, ui->phase1GV2Use, ui->phase1GV2Value, ui->phase1GV3_Label, ui->phase1GV3Use, ui->phase1GV3Value, ui->phase1GV4_Label, ui->phase1GV4Use, ui->phase1GV4Value, ui->phase1GV5_Label, ui->phase1GV5Use, ui->phase1GV5Value,ui->phase1REA_Label, ui->phase1RE1Use, ui->phase1RE1Value,ui->phase1REB_Label, ui->phase1RE2Use, ui->phase1RE2Value, true); - displayOnePhase(2, ui->phase2Name, ui->phase2Switch, ui->phase2FadeIn, ui->phase2FadeOut, ui->phase2Trim1Use, ui->phase2Trim1Value, ui->phase2Trim1Label, ui->phase2Trim1Slider, ui->phase2Trim2Use, ui->phase2Trim2Value, ui->phase2Trim2Label, ui->phase2Trim2Slider, ui->phase2Trim3Use, ui->phase2Trim3Value, ui->phase2Trim3Label, ui->phase2Trim3Slider, ui->phase2Trim4Use, ui->phase2Trim4Value, ui->phase2Trim4Label, ui->phase2Trim4Slider, ui->phase2GV1_Label, ui->phase2GV1Use, ui->phase2GV1Value, ui->phase2GV2_Label, ui->phase2GV2Use, ui->phase2GV2Value, ui->phase2GV3_Label, ui->phase2GV3Use, ui->phase2GV3Value, ui->phase2GV4_Label, ui->phase2GV4Use, ui->phase2GV4Value, ui->phase2GV5_Label, ui->phase2GV5Use, ui->phase2GV5Value,ui->phase2REA_Label, ui->phase2RE1Use, ui->phase2RE1Value,ui->phase2REB_Label, ui->phase2RE2Use, ui->phase2RE2Value, true); - displayOnePhase(3, ui->phase3Name, ui->phase3Switch, ui->phase3FadeIn, ui->phase3FadeOut, ui->phase3Trim1Use, ui->phase3Trim1Value, ui->phase3Trim1Label, ui->phase3Trim1Slider, ui->phase3Trim2Use, ui->phase3Trim2Value, ui->phase3Trim2Label, ui->phase3Trim2Slider, ui->phase3Trim3Use, ui->phase3Trim3Value, ui->phase3Trim3Label, ui->phase3Trim3Slider, ui->phase3Trim4Use, ui->phase3Trim4Value, ui->phase3Trim4Label, ui->phase3Trim4Slider, ui->phase3GV1_Label, ui->phase3GV1Use, ui->phase3GV1Value, ui->phase3GV2_Label, ui->phase3GV2Use, ui->phase3GV2Value, ui->phase3GV3_Label, ui->phase3GV3Use, ui->phase3GV3Value, ui->phase3GV4_Label, ui->phase3GV4Use, ui->phase3GV4Value, ui->phase3GV5_Label, ui->phase3GV5Use, ui->phase3GV5Value,ui->phase3REA_Label, ui->phase3RE1Use, ui->phase3RE1Value,ui->phase3REB_Label, ui->phase3RE2Use, ui->phase3RE2Value, true); - displayOnePhase(4, ui->phase4Name, ui->phase4Switch, ui->phase4FadeIn, ui->phase4FadeOut, ui->phase4Trim1Use, ui->phase4Trim1Value, ui->phase4Trim1Label, ui->phase4Trim1Slider, ui->phase4Trim2Use, ui->phase4Trim2Value, ui->phase4Trim2Label, ui->phase4Trim2Slider, ui->phase4Trim3Use, ui->phase4Trim3Value, ui->phase4Trim3Label, ui->phase4Trim3Slider, ui->phase4Trim4Use, ui->phase4Trim4Value, ui->phase4Trim4Label, ui->phase4Trim4Slider, ui->phase4GV1_Label, ui->phase4GV1Use, ui->phase4GV1Value, ui->phase4GV2_Label, ui->phase4GV2Use, ui->phase4GV2Value, ui->phase4GV3_Label, ui->phase4GV3Use, ui->phase4GV3Value, ui->phase4GV4_Label, ui->phase4GV4Use, ui->phase4GV4Value, ui->phase4GV5_Label, ui->phase4GV5Use, ui->phase4GV5Value,ui->phase4REA_Label, ui->phase4RE1Use, ui->phase4RE1Value,ui->phase4REB_Label, ui->phase4RE2Use, ui->phase4RE2Value, true); - displayOnePhase(5, ui->phase5Name, ui->phase5Switch, ui->phase5FadeIn, ui->phase5FadeOut, ui->phase5Trim1Use, ui->phase5Trim1Value, ui->phase5Trim1Label, ui->phase5Trim1Slider, ui->phase5Trim2Use, ui->phase5Trim2Value, ui->phase5Trim2Label, ui->phase5Trim2Slider, ui->phase5Trim3Use, ui->phase5Trim3Value, ui->phase5Trim3Label, ui->phase5Trim3Slider, ui->phase5Trim4Use, ui->phase5Trim4Value, ui->phase5Trim4Label, ui->phase5Trim4Slider, ui->phase5GV1_Label, ui->phase5GV1Use, ui->phase5GV1Value, ui->phase5GV2_Label, ui->phase5GV2Use, ui->phase5GV2Value, ui->phase5GV3_Label, ui->phase5GV3Use, ui->phase5GV3Value, ui->phase5GV4_Label, ui->phase5GV4Use, ui->phase5GV4Value, ui->phase5GV5_Label, ui->phase5GV5Use, ui->phase5GV5Value,ui->phase5REA_Label, ui->phase5RE1Use, ui->phase5RE1Value,ui->phase5REB_Label, ui->phase5RE2Use, ui->phase5RE2Value, true); - displayOnePhase(6, ui->phase6Name, ui->phase6Switch, ui->phase6FadeIn, ui->phase6FadeOut, ui->phase6Trim1Use, ui->phase6Trim1Value, ui->phase6Trim1Label, ui->phase6Trim1Slider, ui->phase6Trim2Use, ui->phase6Trim2Value, ui->phase6Trim2Label, ui->phase6Trim2Slider, ui->phase6Trim3Use, ui->phase6Trim3Value, ui->phase6Trim3Label, ui->phase6Trim3Slider, ui->phase6Trim4Use, ui->phase6Trim4Value, ui->phase6Trim4Label, ui->phase6Trim4Slider, ui->phase6GV1_Label, ui->phase6GV1Use, ui->phase6GV1Value, ui->phase6GV2_Label, ui->phase6GV2Use, ui->phase6GV2Value, ui->phase6GV3_Label, ui->phase6GV3Use, ui->phase6GV3Value, ui->phase6GV4_Label, ui->phase6GV4Use, ui->phase6GV4Value, ui->phase6GV5_Label, ui->phase6GV5Use, ui->phase6GV5Value,ui->phase6REA_Label, ui->phase6RE1Use, ui->phase6RE1Value,ui->phase6REB_Label, ui->phase6RE2Use, ui->phase6RE2Value, true); - displayOnePhase(7, ui->phase7Name, ui->phase7Switch, ui->phase7FadeIn, ui->phase7FadeOut, ui->phase7Trim1Use, ui->phase7Trim1Value, ui->phase7Trim1Label, ui->phase7Trim1Slider, ui->phase7Trim2Use, ui->phase7Trim2Value, ui->phase7Trim2Label, ui->phase7Trim2Slider, ui->phase7Trim3Use, ui->phase7Trim3Value, ui->phase7Trim3Label, ui->phase7Trim3Slider, ui->phase7Trim4Use, ui->phase7Trim4Value, ui->phase7Trim4Label, ui->phase7Trim4Slider, ui->phase7GV1_Label, ui->phase7GV1Use, ui->phase7GV1Value, ui->phase7GV2_Label, ui->phase7GV2Use, ui->phase7GV2Value, ui->phase7GV3_Label, ui->phase7GV3Use, ui->phase7GV3Value, ui->phase7GV4_Label, ui->phase7GV4Use, ui->phase7GV4Value, ui->phase7GV5_Label, ui->phase7GV5Use, ui->phase7GV5Value,ui->phase7REA_Label, ui->phase7RE1Use, ui->phase7RE1Value,ui->phase7REB_Label, ui->phase7RE2Use, ui->phase7RE2Value, true); - displayOnePhase(8, ui->phase8Name, ui->phase8Switch, ui->phase8FadeIn, ui->phase8FadeOut, ui->phase8Trim1Use, ui->phase8Trim1Value, ui->phase8Trim1Label, ui->phase8Trim1Slider, ui->phase8Trim2Use, ui->phase8Trim2Value, ui->phase8Trim2Label, ui->phase8Trim2Slider, ui->phase8Trim3Use, ui->phase8Trim3Value, ui->phase8Trim3Label, ui->phase8Trim3Slider, ui->phase8Trim4Use, ui->phase8Trim4Value, ui->phase8Trim4Label, ui->phase8Trim4Slider, ui->phase8GV1_Label, ui->phase8GV1Use, ui->phase8GV1Value, ui->phase8GV2_Label, ui->phase8GV2Use, ui->phase8GV2Value, ui->phase8GV3_Label, ui->phase8GV3Use, ui->phase8GV3Value, ui->phase8GV4_Label, ui->phase8GV4Use, ui->phase8GV4Value, ui->phase8GV5_Label, ui->phase8GV5Use, ui->phase8GV5Value,ui->phase8REA_Label, ui->phase8RE1Use, ui->phase8RE1Value,ui->phase8REB_Label, ui->phase8RE2Use, ui->phase8RE2Value, true); - - QSlider * tmpsliders[9][4]={ - {ui->phase0Trim1Slider,ui->phase0Trim2Slider,ui->phase0Trim3Slider,ui->phase0Trim4Slider}, - {ui->phase1Trim1Slider,ui->phase1Trim2Slider,ui->phase1Trim3Slider,ui->phase1Trim4Slider}, - {ui->phase2Trim1Slider,ui->phase2Trim2Slider,ui->phase2Trim3Slider,ui->phase2Trim4Slider}, - {ui->phase3Trim1Slider,ui->phase3Trim2Slider,ui->phase3Trim3Slider,ui->phase3Trim4Slider}, - {ui->phase4Trim1Slider,ui->phase4Trim2Slider,ui->phase4Trim3Slider,ui->phase4Trim4Slider}, - {ui->phase5Trim1Slider,ui->phase5Trim2Slider,ui->phase5Trim3Slider,ui->phase5Trim4Slider}, - {ui->phase6Trim1Slider,ui->phase6Trim2Slider,ui->phase6Trim3Slider,ui->phase6Trim4Slider}, - {ui->phase7Trim1Slider,ui->phase7Trim2Slider,ui->phase7Trim3Slider,ui->phase7Trim4Slider}, - {ui->phase8Trim1Slider,ui->phase8Trim2Slider,ui->phase8Trim3Slider,ui->phase8Trim4Slider} - }; - QSpinBox * tmpspinbox[9][4]={ - {ui->phase0Trim1Value,ui->phase0Trim2Value,ui->phase0Trim3Value,ui->phase0Trim4Value}, - {ui->phase1Trim1Value,ui->phase1Trim2Value,ui->phase1Trim3Value,ui->phase1Trim4Value}, - {ui->phase2Trim1Value,ui->phase2Trim2Value,ui->phase2Trim3Value,ui->phase2Trim4Value}, - {ui->phase3Trim1Value,ui->phase3Trim2Value,ui->phase3Trim3Value,ui->phase3Trim4Value}, - {ui->phase4Trim1Value,ui->phase4Trim2Value,ui->phase4Trim3Value,ui->phase4Trim4Value}, - {ui->phase5Trim1Value,ui->phase5Trim2Value,ui->phase5Trim3Value,ui->phase5Trim4Value}, - {ui->phase6Trim1Value,ui->phase6Trim2Value,ui->phase6Trim3Value,ui->phase6Trim4Value}, - {ui->phase7Trim1Value,ui->phase7Trim2Value,ui->phase7Trim3Value,ui->phase7Trim4Value}, - {ui->phase8Trim1Value,ui->phase8Trim2Value,ui->phase8Trim3Value,ui->phase8Trim4Value} - }; - memcpy(phasesTrimSliders,tmpsliders,sizeof(phasesTrimSliders)); - memcpy(phasesTrimValues,tmpspinbox,sizeof(phasesTrimValues)); - - int phases = GetEepromInterface()->getCapability(FlightPhases); - if (phases < 9) { - ui->phase8->setDisabled(true); - ui->phases->removeTab(8); - } - if (phases < 8) { - ui->phase7->setDisabled(true); - ui->phases->removeTab(7); - } - if (phases < 7) { - ui->phase6->setDisabled(true); - ui->phases->removeTab(6); - } - if (phases < 6) { - ui->phase5->setDisabled(true); - ui->phases->removeTab(5); - } - if (phases < 5) { - ui->phase4->setDisabled(true); - ui->phases->removeTab(4); - } - if (phases < 4) { - ui->phase3->setDisabled(true); - ui->phases->removeTab(3); - } - if (phases < 3) { - ui->phase2->setDisabled(true); - ui->phases->removeTab(2); - } - if (phases < 2) { - ui->phase1->setDisabled(true); - ui->phases->removeTab(1); - ui->phase0Name->setDisabled(true); - ui->phase0FadeIn->setDisabled(true); - ui->phase0FadeOut->setDisabled(true); - } - if ( GetEepromInterface()->getCapability(FlightPhasesAreNamed) ) { - for (int i=0; i < phases; i++) { - QString PhaseName=g_model.phaseData[i].name; - QString TabName; - if (i==0) { - TabName.append(QObject::tr("Flight Mode 0 (Default)")); - } else { - TabName.append(QObject::tr("FM %1").arg(i)); - } - if (!PhaseName.isEmpty()) { - TabName.append(" ("); - TabName.append(PhaseName); - TabName.append(")"); - } - ui->phases->setTabText(i,TabName); - } - } else { - QLineEdit * tmp[]= { ui->phase0Name,ui->phase1Name,ui->phase2Name,ui->phase3Name,ui->phase4Name,ui->phase5Name,ui->phase6Name,ui->phase7Name,ui->phase8Name}; - QLabel * tmp2[] = { ui->label_fm0name,ui->label_fm1name,ui->label_fm2name,ui->label_fm3name,ui->label_fm4name,ui->label_fm5name,ui->label_fm6name,ui->label_fm7name,ui->label_fm8name}; - for (int i=0; i < phases; i++) { - tmp[i]->hide(); - tmp2[i]->hide(); - } - } - ui->phases->setCurrentIndex(0); - phasesLock = false; -} - -void ModelEdit::on_phases_currentChanged(int index) -{ - phasesLock = true; - switch(index) { - case 1: - displayOnePhase(1, NULL, NULL, NULL, NULL, NULL, ui->phase1Trim1Value, NULL, ui->phase1Trim1Slider, NULL, ui->phase1Trim2Value, NULL, ui->phase1Trim2Slider, NULL, ui->phase1Trim3Value, NULL, ui->phase1Trim3Slider, NULL, ui->phase1Trim4Value, NULL, ui->phase1Trim4Slider, NULL, NULL, ui->phase1GV1Value, NULL, NULL, ui->phase1GV2Value, NULL, NULL, ui->phase1GV3Value, NULL, NULL, ui->phase1GV4Value, NULL, NULL, ui->phase1GV5Value,NULL,NULL, ui->phase1RE1Value,NULL,NULL, ui->phase1RE2Value); - break; - case 2: - displayOnePhase(2, NULL, NULL, NULL, NULL, NULL, ui->phase2Trim1Value, NULL, ui->phase2Trim1Slider, NULL, ui->phase2Trim2Value, NULL, ui->phase2Trim2Slider, NULL, ui->phase2Trim3Value, NULL, ui->phase2Trim3Slider, NULL, ui->phase2Trim4Value, NULL, ui->phase2Trim4Slider, NULL, NULL, ui->phase2GV1Value, NULL, NULL, ui->phase2GV2Value, NULL, NULL, ui->phase2GV3Value, NULL, NULL, ui->phase2GV4Value, NULL, NULL, ui->phase2GV5Value,NULL,NULL, ui->phase2RE1Value,NULL,NULL, ui->phase2RE2Value); - break; - case 3: - displayOnePhase(3, NULL, NULL, NULL, NULL, NULL, ui->phase3Trim1Value, NULL, ui->phase3Trim1Slider, NULL, ui->phase3Trim2Value, NULL, ui->phase3Trim2Slider, NULL, ui->phase3Trim3Value, NULL, ui->phase3Trim3Slider, NULL, ui->phase3Trim4Value, NULL, ui->phase3Trim4Slider, NULL, NULL, ui->phase3GV1Value, NULL, NULL, ui->phase3GV2Value, NULL, NULL, ui->phase3GV3Value, NULL, NULL, ui->phase3GV4Value, NULL, NULL, ui->phase3GV5Value,NULL,NULL, ui->phase3RE1Value,NULL,NULL, ui->phase3RE2Value); - break; - case 4: - displayOnePhase(4, NULL, NULL, NULL, NULL, NULL, ui->phase4Trim1Value, NULL, ui->phase4Trim1Slider, NULL, ui->phase4Trim2Value, NULL, ui->phase4Trim2Slider, NULL, ui->phase4Trim3Value, NULL, ui->phase4Trim3Slider, NULL, ui->phase4Trim4Value, NULL, ui->phase4Trim4Slider, NULL, NULL, ui->phase4GV1Value, NULL, NULL, ui->phase4GV2Value, NULL, NULL, ui->phase4GV3Value, NULL, NULL, ui->phase4GV4Value, NULL, NULL, ui->phase4GV5Value,NULL,NULL, ui->phase4RE1Value,NULL,NULL, ui->phase4RE2Value); - break; - case 5: - displayOnePhase(5, NULL, NULL, NULL, NULL, NULL, ui->phase5Trim1Value, NULL, ui->phase5Trim1Slider, NULL, ui->phase5Trim2Value, NULL, ui->phase5Trim2Slider, NULL, ui->phase5Trim3Value, NULL, ui->phase5Trim3Slider, NULL, ui->phase5Trim4Value, NULL, ui->phase5Trim4Slider, NULL, NULL, ui->phase5GV1Value, NULL, NULL, ui->phase5GV2Value, NULL, NULL, ui->phase5GV3Value, NULL, NULL, ui->phase5GV4Value, NULL, NULL, ui->phase5GV5Value,NULL,NULL, ui->phase5RE1Value,NULL,NULL, ui->phase5RE2Value); - break; - case 6: - displayOnePhase(6, NULL, NULL, NULL, NULL, NULL, ui->phase6Trim1Value, NULL, ui->phase6Trim1Slider, NULL, ui->phase6Trim2Value, NULL, ui->phase6Trim2Slider, NULL, ui->phase6Trim3Value, NULL, ui->phase6Trim3Slider, NULL, ui->phase6Trim4Value, NULL, ui->phase6Trim4Slider, NULL, NULL, ui->phase6GV1Value, NULL, NULL, ui->phase6GV2Value, NULL, NULL, ui->phase6GV3Value, NULL, NULL, ui->phase6GV4Value, NULL, NULL, ui->phase6GV5Value,NULL,NULL, ui->phase6RE1Value,NULL,NULL, ui->phase6RE2Value); - break; - case 7: - displayOnePhase(7, NULL, NULL, NULL, NULL, NULL, ui->phase7Trim1Value, NULL, ui->phase7Trim1Slider, NULL, ui->phase7Trim2Value, NULL, ui->phase7Trim2Slider, NULL, ui->phase7Trim3Value, NULL, ui->phase7Trim3Slider, NULL, ui->phase7Trim4Value, NULL, ui->phase7Trim4Slider, NULL, NULL, ui->phase7GV1Value, NULL, NULL, ui->phase7GV2Value, NULL, NULL, ui->phase7GV3Value, NULL, NULL, ui->phase7GV4Value, NULL, NULL, ui->phase7GV5Value,NULL,NULL, ui->phase7RE1Value,NULL,NULL, ui->phase7RE2Value); - break; - case 8: - displayOnePhase(8, NULL, NULL, NULL, NULL, NULL, ui->phase8Trim1Value, NULL, ui->phase8Trim1Slider, NULL, ui->phase8Trim2Value, NULL, ui->phase8Trim2Slider, NULL, ui->phase8Trim3Value, NULL, ui->phase8Trim3Slider, NULL, ui->phase8Trim4Value, NULL, ui->phase8Trim4Slider, NULL, NULL, ui->phase8GV1Value, NULL, NULL, ui->phase8GV2Value, NULL, NULL, ui->phase8GV3Value, NULL, NULL, ui->phase8GV4Value, NULL, NULL, ui->phase8GV5Value,NULL,NULL, ui->phase8RE1Value,NULL,NULL, ui->phase8RE2Value); - break; - } - phasesLock = false; -} - -void ModelEdit::tabExpos() -{ - // curDest -> destination channel - // i -> mixer number - QByteArray qba; - ExposlistWidget->clear(); - int curDest = -1; - - for(int i=0; imode==0) break; - QString str = ""; - while(curDest<(int)md->chn-1) { - curDest++; - str = getStickStr(curDest); - qba.clear(); - qba.append((quint8)-curDest-1); - QListWidgetItem *itm = new QListWidgetItem(str); - itm->setData(Qt::UserRole,qba); - ExposlistWidget->addItem(itm); - } - - if(curDest!=(int)md->chn) { - str = getStickStr(md->chn); - curDest = md->chn; - } else { - str = " "; - } - - switch (md->mode) { - case (1): str += " <-"; break; - case (2): str += " ->"; break; - default: str += " "; break; - }; - - str += tr("Weight") + getGVarString(md->weight).rightJustified(6, ' '); - if (!GetEepromInterface()->getCapability(ExpoIsCurve)) { - if (md->expo!=0) - str += " " + tr("Expo") + getGVarString(md->expo, true).rightJustified(7, ' '); - } else { - if (md->curveMode==0 && md->curveParam!=0) - str += " " + tr("Expo") + getGVarString(md->curveParam, true).rightJustified(7, ' '); - } - if (GetEepromInterface()->getCapability(FlightPhases)) { - if(md->phases) { - if (md->phases!=(unsigned int)(1<getCapability(FlightPhases))-1) { - int mask=1; - int first=0; - for (int i=0; igetCapability(FlightPhases);i++) { - if (!(md->phases & mask)) { - first++; - } - mask <<=1; - } - if (first>1) { - str += " " + tr("Flight modes") + QString("("); - } else { - str += " " + tr("Flight mode") + QString("("); - } - mask=1; - first=1; - for (int i=0; igetCapability(FlightPhases);i++) { - if (!(md->phases & mask)) { - if (!first) { - str += QString(", ")+ QString("%1").arg(getPhaseName(i+1, g_model.phaseData[i].name)); - } else { - str += QString("%1").arg(getPhaseName(i+1,g_model.phaseData[i].name)); - first=0; - } - } - mask <<=1; - } - str += QString(")"); - } else { - str += tr("DISABLED")+QString(" !!!"); - } - } - } - if (md->swtch.type != SWITCH_TYPE_NONE) str += " " + tr("Switch") + QString("(%1)").arg(md->swtch.toString()); - if (md->curveMode) - if (md->curveParam) str += " " + tr("Curve") + QString("(%1)").arg(getCurveStr(md->curveParam)); - if (GetEepromInterface()->getCapability(HasExpoNames)) { - QString ExpoName; - ExpoName.append(md->name); - if (!ExpoName.isEmpty()) { - str+=QString("(%1)").arg(ExpoName); - } - } - qba.clear(); - qba.append((quint8)i); - qba.append((const char*)md, sizeof(ExpoData)); - QListWidgetItem *itm = new QListWidgetItem(str); - itm->setData(Qt::UserRole,qba); // expo number - ExposlistWidget->addItem(itm); //(str); - } - - while(curDestsetData(Qt::UserRole,qba); // add new expo - ExposlistWidget->addItem(itm); - } -} - -void ModelEdit::exposEdited() -{ - updateSettings(); -} - -void ModelEdit::tabMixes() -{ - // curDest -> destination channel4 - // i -> mixer number - QByteArray qba; - MixerlistWidget->clear(); - unsigned int curDest = 0; - int i; - unsigned int outputs = GetEepromInterface()->getCapability(Outputs); - int showNames=ui->showNames_Ckb->isChecked(); - for(i=0; igetCapability(Mixes); i++) { - MixData *md = &g_model.mixData[i]; - if ((md->destCh==0) || (md->destCh>outputs+(unsigned int)GetEepromInterface()->getCapability(ExtraChannels))) continue; - QString str = ""; - while(curDest<(md->destCh-1)) { - curDest++; - if (curDest > outputs) { - str = tr("X%1 ").arg(curDest-outputs); - } else { - str = tr("CH%1%2").arg(curDest/10).arg(curDest%10); - if (GetEepromInterface()->getCapability(HasChNames) && showNames) { - QString name=g_model.limitData[curDest-1].name; - if (!name.isEmpty()) { - name.append(" "); - str=name.left(6); - } - } - } - qba.clear(); - qba.append((quint8)-curDest); - QListWidgetItem *itm = new QListWidgetItem(str); - itm->setData(Qt::UserRole,qba); - MixerlistWidget->addItem(itm); - } - - if (md->destCh > outputs) { - str = tr("X%1 ").arg(md->destCh-outputs); - } else { - str = tr("CH%1%2").arg(md->destCh/10).arg(md->destCh%10); - str.append(" "); - if (GetEepromInterface()->getCapability(HasChNames) && showNames) { - QString name=g_model.limitData[md->destCh-1].name; - if (!name.isEmpty()) { - name.append(" "); - str=name.left(6); - } - } - } - if (curDest != md->destCh) { - curDest = md->destCh; - } else { - str.fill(' '); - } - - switch(md->mltpx) { - case (1): str += " *"; break; - case (2): str += " R"; break; - default: str += " "; break; - }; - - str += " " + getGVarString(md->weight, true).rightJustified(6, ' '); - str += md->srcRaw.toString(); - unsigned int fpCount = GetEepromInterface()->getCapability(FlightPhases); - if (GetEepromInterface()->getCapability(FlightPhases)) { - if(md->phases) { - if (md->phases!=(unsigned int)(1<phases & mask)) { - first++; - } - mask <<=1; - } - if (first>1) { - str += " " + tr("Flight modes") + QString("("); - } else { - str += " " + tr("Flight mode") + QString("("); - } - mask=1; - first=1; - for (unsigned int i=0; iphases & mask)) { - if (!first) { - str += QString(", ")+ QString("%1").arg(getPhaseName(i+1, g_model.phaseData[i].name)); - } - else { - str += QString("%1").arg(getPhaseName(i+1,g_model.phaseData[i].name)); - first=0; - } - } - mask <<=1; - } - str += QString(")"); - } else { - str += tr("DISABLED")+QString(" !!!"); - } - } - } - if(md->swtch.type != SWITCH_TYPE_NONE) str += " " + tr("Switch") + QString("(%1)").arg(md->swtch.toString()); - if(md->carryTrim>0) { - str += " " +tr("No Trim"); - } else if (md->carryTrim<0) { - str += " " + RawSource(SOURCE_TYPE_TRIM, (-(md->carryTrim)-1)).toString(); - } - if(md->noExpo) { - str += " " +tr("No DR/Expo"); - } - if (GetEepromInterface()->getCapability(MixFmTrim) && md->enableFmTrim==1) { - if (md->sOffset) str += " " + tr("FMTrim") + QString("(%1%)").arg(md->sOffset); - } else { - if (md->sOffset) str += " " + tr("Offset") + getGVarString(md->sOffset); - } - if (md->differential) str += " " + tr("Diff") + getGVarString(md->differential); - if (md->curve) str += " " + tr("Curve") + QString("(%1)").arg(getCurveStr(md->curve)); - int scale=GetEepromInterface()->getCapability(SlowScale); - if (scale==0) - scale=1; - if (md->delayDown || md->delayUp) - str += tr(" Delay(u%1:d%2)").arg((double)md->delayUp/scale).arg((double)md->delayDown/scale); - if (md->speedDown || md->speedUp) - str += tr(" Slow(u%1:d%2)").arg((double)md->speedUp/scale).arg((double)md->speedDown/scale); - if (md->mixWarn) str += tr(" Warn(%1)").arg(md->mixWarn); - if (GetEepromInterface()->getCapability(HasMixerNames)) { - QString MixerName; - MixerName.append(md->name); - if (!MixerName.isEmpty()) { - str+=QString("(%1)").arg(MixerName); - } - } - qba.clear(); - qba.append((quint8)i); - qba.append((const char*)md, sizeof(MixData)); - QListWidgetItem *itm = new QListWidgetItem(str); - itm->setData(Qt::UserRole,qba); // mix number - MixerlistWidget->addItem(itm);//(str); - } - - while(curDestgetCapability(ExtraChannels)) { - curDest++; - QString str; - - if (curDest > outputs) { - str = tr("X%1 ").arg(curDest-outputs); - } else { - str = tr("CH%1%2").arg(curDest/10).arg(curDest%10); - if (GetEepromInterface()->getCapability(HasChNames) && showNames) { - QString name=g_model.limitData[curDest-1].name; - if (!name.isEmpty()) { - name.append(" "); - str=name.left(6); - } - } - } - qba.clear(); - qba.append((quint8)-curDest); - QListWidgetItem *itm = new QListWidgetItem(str); - itm->setData(Qt::UserRole,qba); // add new mixer - MixerlistWidget->addItem(itm); - } -} - -void ModelEdit::mixesEdited() -{ - updateSettings(); -} - - -void ModelEdit::tabHeli() -{ - updateHeliTab(); - - connect(ui->swashTypeCB,SIGNAL(currentIndexChanged(int)),this,SLOT(heliEdited())); - connect(ui->swashCollectiveCB,SIGNAL(currentIndexChanged(int)),this,SLOT(heliEdited())); - connect(ui->swashRingValSB,SIGNAL(editingFinished()),this,SLOT(heliEdited())); - connect(ui->swashInvertELE,SIGNAL(stateChanged(int)),this,SLOT(heliEdited())); - connect(ui->swashInvertAIL,SIGNAL(stateChanged(int)),this,SLOT(heliEdited())); - connect(ui->swashInvertCOL,SIGNAL(stateChanged(int)),this,SLOT(heliEdited())); -} - -void ModelEdit::updateHeliTab() -{ - heliEditLock = true; - - ui->swashTypeCB->setCurrentIndex(g_model.swashRingData.type); - populateSourceCB(ui->swashCollectiveCB, g_model.swashRingData.collectiveSource, POPULATE_SOURCES | POPULATE_SWITCHES | POPULATE_TRIMS); - ui->swashRingValSB->setValue(g_model.swashRingData.value); - ui->swashInvertELE->setChecked(g_model.swashRingData.invertELE); - ui->swashInvertAIL->setChecked(g_model.swashRingData.invertAIL); - ui->swashInvertCOL->setChecked(g_model.swashRingData.invertCOL); - - heliEditLock = false; -} - -void ModelEdit::heliEdited() -{ - if(heliEditLock) return; - g_model.swashRingData.type = ui->swashTypeCB->currentIndex(); - g_model.swashRingData.collectiveSource = ui->swashCollectiveCB->itemData(ui->swashCollectiveCB->currentIndex()).toInt(); - g_model.swashRingData.value = ui->swashRingValSB->value(); - g_model.swashRingData.invertELE = ui->swashInvertELE->isChecked(); - g_model.swashRingData.invertAIL = ui->swashInvertAIL->isChecked(); - g_model.swashRingData.invertCOL = ui->swashInvertCOL->isChecked(); - updateSettings(); -} - -void ModelEdit::tabLimits() -{ - limitEditLock=true; - int chnames=GetEepromInterface()->getCapability(HasChNames); - QRegExp rx(CHAR_FOR_NAMES_REGEX); - foreach(QLineEdit *le, findChildren(QRegExp("CHName_[0-9]+"))) { - int len=le->objectName().mid(le->objectName().lastIndexOf("_")+1).toInt()-1; - if (chnames ) { - QString name=g_model.limitData[len].name; - if (name.trimmed().isEmpty()) { - le->setText(tr("CH %1").arg(len+1)); - } else { - le->setText(name); - } - le->setValidator(new QRegExpValidator(rx, this)); - le->setEnabled(true); - le->setReadOnly(false); - connect(le, SIGNAL(editingFinished()), this, SLOT(limitNameEdited())); - } else { - le->setText(tr("CH %1").arg(len+1)); - le->setDisabled(true); - le->setReadOnly(true); - } - } - limitEditLock=false; - foreach(QDoubleSpinBox *sb, findChildren(QRegExp("offsetDSB_[0-9]+"))) { - int sbn=sb->objectName().mid(sb->objectName().lastIndexOf("_")+1).toInt()-1; - sb->setValue(g_model.limitData[sbn].offset/10.0); - connect(sb, SIGNAL(editingFinished()), this, SLOT(limitOffsetEdited())); - } - - foreach(QSpinBox *sb, findChildren(QRegExp("minSB_[0-9]+"))) { - int sbn=sb->objectName().mid(sb->objectName().lastIndexOf("_")+1).toInt()-1; - sb->setValue(g_model.limitData[sbn].min); - connect(sb, SIGNAL(editingFinished()), this, SLOT(limitEdited())); - } - - foreach(QSpinBox *sb, findChildren(QRegExp("maxSB_[0-9]+"))) { - int sbn=sb->objectName().mid(sb->objectName().lastIndexOf("_")+1).toInt()-1; - sb->setValue(g_model.limitData[sbn].max); - connect(sb, SIGNAL(editingFinished()), this, SLOT(limitEdited())); - } - - foreach(QComboBox *cb, findChildren(QRegExp("chInvCB_[0-9]+"))) { - int cbn=cb->objectName().mid(cb->objectName().lastIndexOf("_")+1).toInt()-1; - cb->setCurrentIndex((g_model.limitData[cbn].revert) ? 1 : 0); - connect(cb, SIGNAL(currentIndexChanged(int)), this, SLOT(limitInvEdited())); - } - if (GetEepromInterface()->getCapability(PPMCenter)) { - foreach(QSpinBox *sb, findChildren(QRegExp("ppmcenter_[0-9]+"))) { - int sbn=sb->objectName().mid(sb->objectName().lastIndexOf("_")+1).toInt()-1; - sb->setValue(g_model.limitData[sbn].ppmCenter+1500); - connect(sb, SIGNAL(editingFinished()), this, SLOT(ppmcenterEdited())); - } - } else { - foreach(QSpinBox *sb, findChildren(QRegExp("ppmcenter_[0-9]+"))) { - sb->hide(); - } - ui->ppmc_label1->hide(); - ui->ppmc_label2->hide(); - } - - if (GetEepromInterface()->getCapability(SYMLimits)) { - foreach(QCheckBox *ckb, findChildren(QRegExp("symckb_[0-9]+"))) { - int ckbn=ckb->objectName().mid(ckb->objectName().lastIndexOf("_")+1).toInt()-1; - ckb->setChecked(g_model.limitData[ckbn].symetrical); - connect(ckb, SIGNAL(toggled(bool)), this, SLOT(limitSymEdited())); - } - } else { - foreach(QCheckBox *ckb, findChildren(QRegExp("symckb_[0-9]+"))) { - ckb->hide(); - } - ui->label_sym01->hide(); - ui->label_sym02->hide(); - } - - if (GetEepromInterface()->getCapability(Outputs)<17) { - ui->limitGB2->hide(); - } - setLimitMinMax(); -} - -void ModelEdit::updateCurvesTab() -{ - ControlCurveSignal(true); - foreach(QCheckBox *ChkB, findChildren(QRegExp("plotCB_[0-9]+"))) { - int ChkBn=ChkB->objectName().mid(ChkB->objectName().lastIndexOf("_")+1).toInt()-1; - ChkB->setChecked(plot_curve[ChkBn]); - } - ControlCurveSignal(false); -} - - -void ModelEdit::tabCurves() -{ - QSpinBox* tmpy[17] = { - ui->curvePt01_y, ui->curvePt02_y, ui->curvePt03_y, ui->curvePt04_y, ui->curvePt05_y, - ui->curvePt06_y, ui->curvePt07_y, ui->curvePt08_y, ui->curvePt09_y, ui->curvePt10_y, - ui->curvePt11_y, ui->curvePt12_y, ui->curvePt13_y, ui->curvePt14_y, ui->curvePt15_y, - ui->curvePt16_y, ui->curvePt17_y }; - QSpinBox* tmpx[17] = { - ui->curvePt01_x, ui->curvePt02_x, ui->curvePt03_x, ui->curvePt04_x, ui->curvePt05_x, - ui->curvePt06_x, ui->curvePt07_x, ui->curvePt08_x, ui->curvePt09_x, ui->curvePt10_x, - ui->curvePt11_x, ui->curvePt12_x, ui->curvePt13_x, ui->curvePt14_x, ui->curvePt15_x, - ui->curvePt16_x, ui->curvePt17_x }; - - QPushButton * editb[16]= { - ui->curveEdit_1,ui->curveEdit_2,ui->curveEdit_3,ui->curveEdit_4, - ui->curveEdit_5,ui->curveEdit_6,ui->curveEdit_7,ui->curveEdit_8, - ui->curveEdit_9,ui->curveEdit_10,ui->curveEdit_11,ui->curveEdit_12, - ui->curveEdit_13,ui->curveEdit_14,ui->curveEdit_15,ui->curveEdit_16 }; - - QPushButton * resetb[16]= { - ui->resetCurve_1,ui->resetCurve_2,ui->resetCurve_3,ui->resetCurve_4, - ui->resetCurve_5,ui->resetCurve_6,ui->resetCurve_7,ui->resetCurve_8, - ui->resetCurve_9,ui->resetCurve_10,ui->resetCurve_11,ui->resetCurve_12, - ui->resetCurve_13,ui->resetCurve_14,ui->resetCurve_15,ui->resetCurve_16 }; - - QCheckBox * plotcb[16]= { - ui->plotCB_1,ui->plotCB_2,ui->plotCB_3,ui->plotCB_4, - ui->plotCB_5,ui->plotCB_6,ui->plotCB_7,ui->plotCB_8, - ui->plotCB_9,ui->plotCB_10,ui->plotCB_11,ui->plotCB_12, - ui->plotCB_13,ui->plotCB_14,ui->plotCB_15,ui->plotCB_16 }; - - memcpy(spny, tmpy, sizeof(spny)); - memcpy(spnx, tmpx, sizeof(spnx)); - int numcurves=GetEepromInterface()->getCapability(NumCurves); - if (numcurves==0) { - numcurves=16; - } - - if (!GetEepromInterface()->getCapability(CustomCurves)){ - ui->curvetype_CB->setDisabled(true); - int count=0; - for (int i=0; i< GetEepromInterface()->getCapability(NumCurves3); i++) { - g_model.curves[count].count=3; - g_model.curves[count].custom=false; - count++; - } - for (int i=0; i< GetEepromInterface()->getCapability(NumCurves5); i++) { - g_model.curves[count].count=5; - g_model.curves[count].custom=false; - count++; - } - for (int i=0; i< GetEepromInterface()->getCapability(NumCurves9); i++) { - g_model.curves[count].count=9; - g_model.curves[count].custom=false; - count++; - } - for (int i=count; i< 16; i++) { - editb[i]->hide(); - plotcb[i]->hide(); - resetb[i]->hide(); - } - - } else { - ui->curvetype_CB->setEnabled(true); - } - if (!GetEepromInterface()->getCapability(HasCvNames)){ - ui->cname_LE->hide(); - ui->cname_label->hide(); - } else { - ui->cname_LE->setText(g_model.curves[0].name); - } - - for (int i=numcurves; i<16;i++) { - editb[i]->hide(); - resetb[i]->hide(); - plotcb[i]->hide(); - } - - - for (int i=0; i<16;i++) { - plot_curve[i]=FALSE; - } - redrawCurve=true; - drawing=false; -#ifdef __APPLE__ - ui->curveEdit_1->setStyleSheet("color: #00007f;"); - ui->curveEdit_2->setStyleSheet("color: #007f00;"); - ui->curveEdit_3->setStyleSheet("color: #7f0000;"); - ui->curveEdit_4->setStyleSheet("color: #007f7f;"); - ui->curveEdit_5->setStyleSheet("color: #7f007f;"); - ui->curveEdit_6->setStyleSheet("color: #7f7f00;"); - ui->curveEdit_7->setStyleSheet("color: #7f7f7f;"); - ui->curveEdit_8->setStyleSheet("color: #0000ff;"); - ui->curveEdit_9->setStyleSheet("color: #007fff;"); - ui->curveEdit_10->setStyleSheet("color: #7f00ff;"); - ui->curveEdit_11->setStyleSheet("color: #00ff00;"); - ui->curveEdit_12->setStyleSheet("color: #00ff7f;"); - ui->curveEdit_13->setStyleSheet("color: #7fff00;"); - ui->curveEdit_14->setStyleSheet("color: #ff0000;"); - ui->curveEdit_15->setStyleSheet("color: #ff007f;"); - ui->curveEdit_16->setStyleSheet("color: #ff7f00;"); -#else - ui->curveEdit_1->setStyleSheet("background-color: #00007f; color: white;"); - ui->curveEdit_2->setStyleSheet("background-color: #007f00; color: white;"); - ui->curveEdit_3->setStyleSheet("background-color: #7f0000; color: white;"); - ui->curveEdit_4->setStyleSheet("background-color: #007f7f; color: white;"); - ui->curveEdit_5->setStyleSheet("background-color: #7f007f; color: white;"); - ui->curveEdit_6->setStyleSheet("background-color: #7f7f00; color: white;"); - ui->curveEdit_7->setStyleSheet("background-color: #7f7f7f; color: white;"); - ui->curveEdit_8->setStyleSheet("background-color: #0000ff; color: white;"); - ui->curveEdit_9->setStyleSheet("background-color: #007fff; color: white;"); - ui->curveEdit_10->setStyleSheet("background-color: #7f00ff; color: white;"); - ui->curveEdit_11->setStyleSheet("background-color: #00ff00; color: white;"); - ui->curveEdit_12->setStyleSheet("background-color: #00ff7f; color: white;"); - ui->curveEdit_13->setStyleSheet("background-color: #7fff00; color: white;"); - ui->curveEdit_14->setStyleSheet("background-color: #ff0000; color: white;"); - ui->curveEdit_15->setStyleSheet("background-color: #ff007f; color: white;"); - ui->curveEdit_16->setStyleSheet("background-color: #ff7f00; color: white;"); -#endif - updateCurvesTab(); - - QGraphicsScene *scene = new QGraphicsScene(ui->curvePreview); - scene->setItemIndexMethod(QGraphicsScene::NoIndex); - ui->curvePreview->setScene(scene); - currentCurve = 0; - - connect(ui->clearMixesPB,SIGNAL(pressed()),this,SLOT(clearCurves())); - - foreach(QSpinBox *sb, findChildren(QRegExp("curvePt[0-9]+"))) { - connect(sb, SIGNAL(valueChanged(int)), this, SLOT(curvePointEdited())); - } - - foreach(QPushButton *pb, findChildren(QRegExp("resetCurve_[0-9]+"))) { - connect(pb, SIGNAL(clicked()), this, SLOT(resetCurve())); - } - - foreach(QPushButton *pb, findChildren(QRegExp("curveEdit_[0-9]+"))) { - connect(pb, SIGNAL(clicked()), this, SLOT(editCurve())); - } - - foreach(QCheckBox *ChkB, findChildren(QRegExp("plotCB_[0-9]+"))) { - connect(ChkB, SIGNAL(toggled(bool)), this, SLOT(plotCurve(bool))); - } - setCurrentCurve(currentCurve); - ui->ca_coeff_SB->hide(); - ui->ca_coeff_label->hide(); - ui->ca_ymid_SB->hide(); - ui->ca_ymid_label->hide(); -} - -void ModelEdit::on_ca_ctype_CB_currentIndexChanged() -{ - int index=ui->ca_ctype_CB->currentIndex(); - switch (index) { - case 0: - ui->ca_coeff_SB->hide(); - ui->ca_coeff_label->hide(); - ui->ca_ymid_SB->hide(); - ui->ca_ymid_label->hide(); - ui->ca_ymin_SB->show(); - ui->ca_ymin_label->show(); - ui->ca_ymin_SB->setValue(-100); - ui->ca_ymax_SB->setValue(100); - break; - case 1: - ui->ca_coeff_SB->show(); - ui->ca_coeff_label->show(); - ui->ca_ymid_SB->hide(); - ui->ca_ymid_label->hide(); - ui->ca_ymin_SB->show(); - ui->ca_ymin_label->show(); - ui->ca_ymin_SB->setValue(-100); - ui->ca_ymax_SB->setValue(100); - break; - case 2: - ui->ca_coeff_SB->show(); - ui->ca_coeff_label->show(); - ui->ca_ymid_SB->hide(); - ui->ca_ymid_label->hide(); - ui->ca_ymin_SB->hide(); - ui->ca_ymin_label->hide(); - ui->ca_ymax_SB->setValue(100); - break; - case 3: - ui->ca_coeff_SB->show(); - ui->ca_coeff_label->show(); - ui->ca_ymid_SB->show(); - ui->ca_ymid_label->show(); - ui->ca_ymin_SB->hide(); - ui->ca_ymin_label->hide(); - ui->ca_ymid_SB->setValue(0); - ui->ca_ymax_SB->setValue(100); - break; - } -} - -void ModelEdit::on_ca_apply_PB_clicked() -{ - int index=ui->ca_ctype_CB->currentIndex(); - float x; - int y; - int invert=0; - float a; - if (index==0) { - a=(ui->ca_ymax_SB->value()-ui->ca_ymin_SB->value())/200.0; - int numpoints=g_model.curves[currentCurve].count; - for (int i=0; ica_ymin_SB->value()+a*x; - switch (ui->ca_side_CB->currentIndex()) { - case 0: - g_model.curves[currentCurve].points[i].y=y; - break; - case 1: - if (x>=100) { - g_model.curves[currentCurve].points[i].y=y; - } - break; - case 2: - if (x<100) { - g_model.curves[currentCurve].points[i].y=y; - } - break; - } - } - } else if (index==1) { - int numpoints=g_model.curves[currentCurve].count; - for (int i=0; ica_coeff_SB->value(); - if (a>=0) { - y=round(c9xexpou(x,a)*(ui->ca_ymax_SB->value()-ui->ca_ymin_SB->value())/100.0+ui->ca_ymin_SB->value()); - } else { - a=-a; - x=100-x; - y=round((100.0-c9xexpou(x,a))*(ui->ca_ymax_SB->value()-ui->ca_ymin_SB->value())/100.0+ui->ca_ymin_SB->value()); - } - switch (ui->ca_side_CB->currentIndex()) { - case 0: - g_model.curves[currentCurve].points[i].y=y; - break; - case 1: - if (x>=50) { - g_model.curves[currentCurve].points[i].y=y; - } - break; - case 2: - if (x<50) { - g_model.curves[currentCurve].points[i].y=y; - } - break; - } - } - } else if (index==2) { - int numpoints=g_model.curves[currentCurve].count; - for (int i=0; ica_coeff_SB->value(); - if (x<0) { - x=-x; - invert=1; - } else { - invert=0; - } - if (a>=0) { - y=round(c9xexpou(x,a)*(ui->ca_ymax_SB->value()/100.0)); - } else { - a=-a; - x=100-x; - y=round((100.0-c9xexpou(x,a))*(ui->ca_ymax_SB->value()/100.0)); - } - switch (ui->ca_side_CB->currentIndex()) { - case 0: - if (invert==1) { - g_model.curves[currentCurve].points[i].y=-y; - } else { - g_model.curves[currentCurve].points[i].y=y; - } - break; - case 1: - if (invert==0) { - g_model.curves[currentCurve].points[i].y=y; - } - break; - case 2: - if (invert==1) { - g_model.curves[currentCurve].points[i].y=-y; - } - break; - } - } - } else if (index==3) { - int numpoints=g_model.curves[currentCurve].count; - for (int i=0; i=0); - a=ui->ca_coeff_SB->value(); - if (x<0) { - x=-x; - } - if (a>=0) { - y=round(c9xexpou(x,a)*((ui->ca_ymax_SB->value()-ui->ca_ymid_SB->value())/100.0)+ui->ca_ymid_SB->value()); - } else { - a=-a; - x=100-x; - y=round((100.0-c9xexpou(x,a))*((ui->ca_ymax_SB->value()-ui->ca_ymid_SB->value())/100.0)+ui->ca_ymid_SB->value()); - } - switch (ui->ca_side_CB->currentIndex()) { - case 0: - g_model.curves[currentCurve].points[i].y=y; - break; - case 1: - if (pos) { - g_model.curves[currentCurve].points[i].y=y; - } - break; - case 2: - if (!pos) { - g_model.curves[currentCurve].points[i].y=y; - } - break; - } - } - } - updateSettings(); - setCurrentCurve(currentCurve); - drawCurve(); -} - -void ModelEdit::limitSymEdited() -{ - QCheckBox *ckb = qobject_cast(sender()); - int limitId=ckb->objectName().mid(ckb->objectName().lastIndexOf("_")+1).toInt()-1; - g_model.limitData[limitId].symetrical = (ckb->checkState() ? 1 : 0); - updateSettings(); -} - -void ModelEdit::limitNameEdited() -{ - if(limitEditLock) return; - limitEditLock=true; - QLineEdit *le = qobject_cast(sender()); - int limitId=le->objectName().mid(le->objectName().lastIndexOf("_")+1).toInt()-1; - int i=0; - if (le->text()==tr("CH %1").arg(limitId+1)) { - le->setText(""); - } - for (i=0; itext().toAscii().length(); i++) { - g_model.limitData[limitId].name[i]=le->text().toAscii().at(i); - } - if (le->text().trimmed().isEmpty()) { - le->setText(tr("CH %1").arg(limitId+1)); - } - g_model.limitData[limitId].name[i]=0; - updateSettings(); - tabMixes(); - limitEditLock=false; -} - - -void ModelEdit::limitOffsetEdited() -{ - QDoubleSpinBox *dsb = qobject_cast(sender()); - int limitId=dsb->objectName().mid(dsb->objectName().lastIndexOf("_")+1).toInt()-1; - g_model.limitData[limitId].offset = round(dsb->value()*10); - updateSettings(); -} - -void ModelEdit::limitEdited() -{ - QSpinBox *sb = qobject_cast(sender()); - int limitId=sb->objectName().mid(sb->objectName().lastIndexOf("_")+1).toInt()-1; - if (sb->objectName().indexOf("max")!=-1) { - g_model.limitData[limitId].max = sb->value(); - } - else { - g_model.limitData[limitId].min = sb->value(); - } - updateSettings(); -} - -void ModelEdit::limitInvEdited() -{ - QComboBox *cb = qobject_cast(sender()); - int limitId=cb->objectName().mid(cb->objectName().lastIndexOf("_")+1).toInt()-1; - g_model.limitData[limitId].revert = cb->currentIndex(); - updateSettings(); -} - -void ModelEdit::ppmcenterEdited() -{ - QSpinBox *sb = qobject_cast(sender()); - int limitId=sb->objectName().mid(sb->objectName().lastIndexOf("_")+1).toInt()-1; - g_model.limitData[limitId].ppmCenter = sb->value()-1500; - updateSettings(); -} - -void ModelEdit::startupSwitchEdited() -{ - if (GetEepromInterface()->getCapability(Pots)==3) { - uint8_t i= 0; - i|=(uint8_t)ui->swwarn0_CB->currentIndex(); - if (i==1) { - ui->swwarn1_ChkB->setDisabled(true) ; - ui->swwarn2_ChkB->setDisabled(true) ; - ui->swwarn3_ChkB->setDisabled(true) ; - ui->swwarn4_CB->setDisabled(true) ; - ui->swwarn5_ChkB->setDisabled(true) ; - ui->swwarn6_ChkB->setDisabled(true) ; - } else { - ui->swwarn1_ChkB->setEnabled(true) ; - ui->swwarn2_ChkB->setEnabled(true) ; - ui->swwarn3_ChkB->setEnabled(true) ; - ui->swwarn4_CB->setEnabled(true) ; - ui->swwarn5_ChkB->setEnabled(true) ; - ui->swwarn6_ChkB->setEnabled(true) ; - i|=(ui->swwarn1_ChkB->isChecked() ? 1 : 0)<<1; - i|=(ui->swwarn2_ChkB->isChecked() ? 1 : 0)<<2; - i|=(ui->swwarn3_ChkB->isChecked() ? 1 : 0)<<3; - i|=((uint8_t)ui->swwarn4_CB->currentIndex() & 0x03)<<4; - i|=(ui->swwarn5_ChkB->isChecked() ? 1 : 0)<<6; - i|=(ui->swwarn6_ChkB->isChecked() ? 1 : 0)<<7; - } - g_model.switchWarningStates=i; - } else { - uint16_t i= 0; - i|=(uint16_t)ui->tswwarn0_CB->currentIndex(); - if (i==1) { - ui->chkSA->setDisabled(true); - ui->chkSB->setDisabled(true); - ui->chkSC->setDisabled(true); - ui->chkSD->setDisabled(true); - ui->chkSE->setDisabled(true); - ui->chkSF->setDisabled(true); - ui->chkSG->setDisabled(true); - } else { - ui->chkSA->setEnabled(true); - ui->chkSB->setEnabled(true); - ui->chkSC->setEnabled(true); - ui->chkSD->setEnabled(true); - ui->chkSE->setEnabled(true); - ui->chkSF->setEnabled(true); - ui->chkSG->setEnabled(true); - i|=(((uint16_t)ui->chkSA->value())<<1); - i|=(((uint16_t)ui->chkSB->value())<<3); - i|=(((uint16_t)ui->chkSC->value())<<5); - i|=(((uint16_t)ui->chkSD->value())<<7); - i|=(((uint16_t)ui->chkSE->value())<<9); - i|=(((uint16_t)ui->chkSF->value())<<12); - i|=(((uint16_t)ui->chkSG->value())<<13); - } - g_model.switchWarningStates=i; - } - updateSettings(); -} - -void ModelEdit::setCurrentCurve(int curveId) -{ - currentCurve = curveId; - curvesLock=true; - QString ss = "QSpinBox { background-color:rgb(255, 255, 127);}"; - for (int i=0; ishow(); - spny[i]->setValue(g_model.curves[currentCurve].points[i].y); - if (!g_model.curves[currentCurve].custom || i==0 || i==(g_model.curves[currentCurve].count-1)) { - spnx[i]->hide(); - if (i==0) { - spnx[i]->setValue(-100); - } - if (i==(g_model.curves[currentCurve].count-1)) { - spnx[i]->setValue(100); - } - } else { - spnx[i]->show(); - spnx[i]->setMaximum(g_model.curves[currentCurve].points[i+1].x-1); - spnx[i]->setMinimum(g_model.curves[currentCurve].points[i-1].x+1); - spnx[i]->setValue(g_model.curves[currentCurve].points[i].x); - } - } - for (int i=g_model.curves[currentCurve].count; i<17;i++) { - spny[i]->hide(); - spnx[i]->hide(); - } - int index=0; - if (g_model.curves[currentCurve].count==3) { - index=0; - } else if (g_model.curves[currentCurve].count==5) { - index=2; - } else if (g_model.curves[currentCurve].count==9) { - index=4; - } else if (g_model.curves[currentCurve].count==17) { - index=6; - } - if (g_model.curves[currentCurve].custom) { - index++; - } - if (!GetEepromInterface()->getCapability(HasCvNames)){ - ui->cname_LE->hide(); - ui->cname_label->hide(); - } else { - ui->cname_LE->setText(g_model.curves[currentCurve].name); - } - - ui->curvetype_CB->setCurrentIndex(index); - curvesLock=false; -} - -void ModelEdit::curvePointEdited() -{ - if (curvesLock) { - return; - } - /* for (int i=1; i< g_model.curves[currentCurve].count-1; i++) { - if (g_model.curves[currentCurve].points[i].x>(100-g_model.curves[currentCurve].count+i)) { - g_model.curves[currentCurve].points[i].x=(100-g_model.curves[currentCurve].count+i); - } - if (g_model.curves[currentCurve].points[i].x<=g_model.curves[currentCurve].points[i-1].x) { - spnx[i]->setValue(spnx[i-1]->value()+1); - } - } - */ - for (int i=0; i< 17; i++) { - g_model.curves[currentCurve].points[i].x=spnx[i]->value(); - g_model.curves[currentCurve].points[i].y=spny[i]->value(); - } - if (redrawCurve) - drawCurve(); - updateSettings(); -} - - -void ModelEdit::setSwitchWidgetVisibility(int i) -{ - RawSource source=RawSource(g_model.customSw[i].val1); - switch (getCSFunctionFamily(g_model.customSw[i].func)) - { - case CS_FAMILY_VOFS: - cswitchSource1[i]->setVisible(true); - cswitchSource2[i]->setVisible(false); - cswitchValue[i]->setVisible(false); - cswitchOffset[i]->setVisible(true); - populateSourceCB(cswitchSource1[i], source, POPULATE_SOURCES | (GetEepromInterface()->getCapability(ExtraTrims) ? POPULATE_TRIMS : 0) | POPULATE_SWITCHES | POPULATE_TELEMETRY | (GetEepromInterface()->getCapability(GvarsInCS) ? POPULATE_GVARS : 0)); - cswitchOffset[i]->setDecimals(source.getDecimals(g_model)); - cswitchOffset[i]->setSingleStep(source.getStep(g_model)); - if (g_model.customSw[i].func>CS_FN_ELESS && g_model.customSw[i].funcsetMinimum(source.getStep(g_model)*-127); - cswitchOffset[i]->setMaximum(source.getStep(g_model)*127); - cswitchOffset[i]->setValue(source.getStep(g_model)*g_model.customSw[i].val2); - } else { - cswitchOffset[i]->setMinimum(source.getMin(g_model)); - cswitchOffset[i]->setMaximum(source.getMax(g_model)); - cswitchOffset[i]->setValue(source.getStep(g_model)*(g_model.customSw[i].val2+source.getRawOffset(g_model))+source.getOffset(g_model)); - } - break; - case CS_FAMILY_VBOOL: - cswitchSource1[i]->setVisible(true); - cswitchSource2[i]->setVisible(true); - cswitchValue[i]->setVisible(false); - cswitchOffset[i]->setVisible(false); - populateSwitchCB(cswitchSource1[i], RawSwitch(g_model.customSw[i].val1)); - populateSwitchCB(cswitchSource2[i], RawSwitch(g_model.customSw[i].val2)); - break; - case CS_FAMILY_VCOMP: - cswitchSource1[i]->setVisible(true); - cswitchSource2[i]->setVisible(true); - cswitchValue[i]->setVisible(false); - cswitchOffset[i]->setVisible(false); - populateSourceCB(cswitchSource1[i], RawSource(g_model.customSw[i].val1), POPULATE_SOURCES | (GetEepromInterface()->getCapability(ExtraTrims) ? POPULATE_TRIMS : 0) | POPULATE_SWITCHES | POPULATE_TELEMETRY | (GetEepromInterface()->getCapability(GvarsInCS) ? POPULATE_GVARS : 0)); - populateSourceCB(cswitchSource2[i], RawSource(g_model.customSw[i].val2), POPULATE_SOURCES | (GetEepromInterface()->getCapability(ExtraTrims) ? POPULATE_TRIMS : 0) | POPULATE_SWITCHES | POPULATE_TELEMETRY | (GetEepromInterface()->getCapability(GvarsInCS) ? POPULATE_GVARS : 0)); - break; - case CS_FAMILY_TIMERS: - cswitchSource1[i]->setVisible(false); - cswitchSource2[i]->setVisible(false); - cswitchValue[i]->setVisible(true); - cswitchOffset[i]->setVisible(true); - cswitchOffset[i]->setDecimals(1); - cswitchOffset[i]->setMinimum(0.1); - cswitchOffset[i]->setMaximum(175); - float value=ValToTim(g_model.customSw[i].val2); - cswitchOffset[i]->setSingleStep(0.1); - if (value>60) { - cswitchOffset[i]->setSingleStep(1); - } else if (value>2) { - cswitchOffset[i]->setSingleStep(0.5); - } - cswitchOffset[i]->setValue(value); - - cswitchValue[i]->setDecimals(1); - cswitchValue[i]->setMinimum(0.1); - cswitchValue[i]->setMaximum(175); - value=ValToTim(g_model.customSw[i].val1); - cswitchValue[i]->setSingleStep(0.1); - if (value>60) { - cswitchValue[i]->setSingleStep(1); - } else if (value>2) { - cswitchValue[i]->setSingleStep(0.5); - } - cswitchValue[i]->setValue(value); - break; - } - cswitchAnd[i]->setVisible(true); - populateSwitchCB(cswitchAnd[i], RawSwitch(g_model.customSw[i].andsw), POPULATE_AND_SWITCHES); - if (GetEepromInterface()->getCapability(CustomSwitchesExt)) { - cswitchDuration[i]->setVisible(true); - cswitchDuration[i]->setValue(g_model.customSw[i].duration/2.0); - cswitchDelay[i]->setVisible(true); - cswitchDelay[i]->setValue(g_model.customSw[i].delay/2.0); - } -} - -void ModelEdit::updateSwitchesTab() -{ - switchEditLock = true; - int num_csw=GetEepromInterface()->getCapability(CustomSwitches); - for (int i=0; i< num_csw; i++) { - populateCSWCB(csw[i], g_model.customSw[i].func); - setSwitchWidgetVisibility(i); - } - switchEditLock = false; -} - -void ModelEdit::tabCustomSwitches() -{ - switchEditLock = true; - QComboBox* tmpcsw[C9X_NUM_CSW] = {ui->cswitchFunc_1, ui->cswitchFunc_2, ui->cswitchFunc_3, ui->cswitchFunc_4, - ui->cswitchFunc_5, ui->cswitchFunc_6, ui->cswitchFunc_7, ui->cswitchFunc_8, - ui->cswitchFunc_9, ui->cswitchFunc_10, ui->cswitchFunc_11, ui->cswitchFunc_12, - ui->cswitchFunc_13, ui->cswitchFunc_14, ui->cswitchFunc_15, ui->cswitchFunc_16, - ui->cswitchFunc_17, ui->cswitchFunc_18, ui->cswitchFunc_19, ui->cswitchFunc_20, - ui->cswitchFunc_21, ui->cswitchFunc_22, ui->cswitchFunc_23, ui->cswitchFunc_24, - ui->cswitchFunc_25, ui->cswitchFunc_26, ui->cswitchFunc_27, ui->cswitchFunc_28, - ui->cswitchFunc_29, ui->cswitchFunc_30, ui->cswitchFunc_31, ui->cswitchFunc_32 }; - QLabel* cswlabel[C9X_NUM_CSW] = { ui->cswlabel_01, ui->cswlabel_02, ui->cswlabel_03, ui->cswlabel_04, - ui->cswlabel_05, ui->cswlabel_06, ui->cswlabel_07, ui->cswlabel_08, - ui->cswlabel_09, ui->cswlabel_10, ui->cswlabel_11, ui->cswlabel_12, - ui->cswlabel_13, ui->cswlabel_14, ui->cswlabel_15, ui->cswlabel_16, - ui->cswlabel_17, ui->cswlabel_18, ui->cswlabel_19, ui->cswlabel_20, - ui->cswlabel_21, ui->cswlabel_22, ui->cswlabel_23, ui->cswlabel_24, - ui->cswlabel_25, ui->cswlabel_26, ui->cswlabel_27, ui->cswlabel_28, - ui->cswlabel_29, ui->cswlabel_30, ui->cswlabel_31, ui->cswlabel_32}; - - memcpy(csw, tmpcsw, sizeof(csw)); - int num_csw=GetEepromInterface()->getCapability(CustomSwitches); - for(int i=0; i<16; i++) { - if (isetProperty("index",i); - cswitchSource1[i] = new QComboBox(this); - cswitchSource1[i]->setProperty("index",i); - connect(cswitchSource1[i],SIGNAL(currentIndexChanged(int)),this,SLOT(customSwitchesEdited())); - ui->gridLayout_21->addWidget(cswitchSource1[i],i+1,2); - cswitchSource1[i]->setVisible(false); - cswitchValue[i] = new QDoubleSpinBox(this); - cswitchValue[i]->setMaximum(125); - cswitchValue[i]->setMinimum(-125); - cswitchValue[i]->setAccelerated(true); - cswitchValue[i]->setDecimals(0); - cswitchValue[i]->setProperty("index",i); - connect(cswitchValue[i],SIGNAL(editingFinished()),this,SLOT(customSwitchesEdited())); - ui->gridLayout_21->addWidget(cswitchValue[i],i+1,2); - cswitchValue[i]->setVisible(false); - - cswitchSource2[i] = new QComboBox(this); - cswitchSource2[i]->setProperty("index",i); - connect(cswitchSource2[i],SIGNAL(currentIndexChanged(int)),this,SLOT(customSwitchesEdited())); - ui->gridLayout_21->addWidget(cswitchSource2[i],i+1,3); - cswitchSource2[i]->setVisible(false); - - cswitchOffset[i] = new QDoubleSpinBox(this); - cswitchOffset[i]->setProperty("index",i); - cswitchOffset[i]->setMaximum(125); - cswitchOffset[i]->setMinimum(-125); - cswitchOffset[i]->setAccelerated(true); - cswitchOffset[i]->setDecimals(0); - connect(cswitchOffset[i],SIGNAL(editingFinished()),this,SLOT(customSwitchesEdited())); - ui->gridLayout_21->addWidget(cswitchOffset[i],i+1,3); - cswitchOffset[i]->setVisible(false); - cswitchAnd[i] = new QComboBox(this); - cswitchAnd[i]->setProperty("index",i); - connect(cswitchAnd[i],SIGNAL(currentIndexChanged(int)),this,SLOT(customSwitchesEdited())); - ui->gridLayout_21->addWidget(cswitchAnd[i],i+1,4); - cswitchAnd[i]->setVisible(false); - if (GetEepromInterface()->getCapability(CustomSwitchesExt)) { - cswitchDuration[i] = new QDoubleSpinBox(this); - cswitchDuration[i]->setProperty("index",i); - cswitchDuration[i]->setSingleStep(0.5); - cswitchDuration[i]->setMaximum(50); - cswitchDuration[i]->setMinimum(0); - cswitchDuration[i]->setAccelerated(true); - cswitchDuration[i]->setDecimals(1); - connect(cswitchDuration[i],SIGNAL(editingFinished()),this,SLOT(customSwitchesEdited())); - ui->gridLayout_21->addWidget(cswitchDuration[i],i+1,5); - cswitchDuration[i]->setVisible(false); - - cswitchDelay[i] = new QDoubleSpinBox(this); - cswitchDelay[i]->setProperty("index",i); - cswitchDelay[i]->setSingleStep(0.5); - cswitchDelay[i]->setMaximum(50); - cswitchDelay[i]->setMinimum(0); - cswitchDelay[i]->setAccelerated(true); - cswitchDelay[i]->setDecimals(1); - connect(cswitchDelay[i],SIGNAL(editingFinished()),this,SLOT(customSwitchesEdited())); - ui->gridLayout_21->addWidget(cswitchDelay[i],i+1,6); - cswitchDelay[i]->setVisible(false); - } else { - ui->cswCol3->hide(); - ui->cswCol4->hide(); - } - connect(cswlabel[i],SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(csw_customContextMenuRequested(QPoint))); - } else { - csw[i]->hide(); - cswlabel[i]->hide(); - } - } - if (num_csw>16) { - for(int i=16; i<32; i++) { - if (i<=num_csw) { - tmpcsw[i]->setProperty("index",i); - cswitchSource1[i] = new QComboBox(this); - cswitchSource1[i]->setProperty("index",i); - connect(cswitchSource1[i],SIGNAL(currentIndexChanged(int)),this,SLOT(customSwitchesEdited())); - ui->gridLayout_22->addWidget(cswitchSource1[i],i-15,2); - cswitchSource1[i]->setVisible(false); - cswitchValue[i] = new QDoubleSpinBox(this); - cswitchValue[i]->setProperty("index",i); - cswitchValue[i]->setMaximum(125); - cswitchValue[i]->setMinimum(-125); - cswitchValue[i]->setAccelerated(true); - cswitchValue[i]->setDecimals(0); - connect(cswitchValue[i],SIGNAL(editingFinished()),this,SLOT(customSwitchesEdited())); - ui->gridLayout_22->addWidget(cswitchValue[i],i-15,2); - cswitchValue[i]->setVisible(false); - - cswitchSource2[i] = new QComboBox(this); - cswitchSource2[i]->setProperty("index",i); - connect(cswitchSource2[i],SIGNAL(currentIndexChanged(int)),this,SLOT(customSwitchesEdited())); - ui->gridLayout_22->addWidget(cswitchSource2[i],i-15,3); - cswitchSource2[i]->setVisible(false); - - cswitchOffset[i] = new QDoubleSpinBox(this); - cswitchOffset[i]->setProperty("index",i); - cswitchOffset[i]->setMaximum(125); - cswitchOffset[i]->setMinimum(-125); - cswitchOffset[i]->setAccelerated(true); - cswitchOffset[i]->setDecimals(0); - connect(cswitchOffset[i],SIGNAL(editingFinished()),this,SLOT(customSwitchesEdited())); - ui->gridLayout_22->addWidget(cswitchOffset[i],i-15,3); - cswitchOffset[i]->setVisible(false); - cswitchAnd[i] = new QComboBox(this); - cswitchAnd[i]->setProperty("index",i); - connect(cswitchAnd[i],SIGNAL(currentIndexChanged(int)),this,SLOT(customSwitchesEdited())); - ui->gridLayout_22->addWidget(cswitchAnd[i],i-15,4); - cswitchAnd[i]->setVisible(false); - if (GetEepromInterface()->getCapability(CustomSwitchesExt)) { - cswitchDuration[i] = new QDoubleSpinBox(this); - cswitchDuration[i]->setProperty("index",i); - cswitchDuration[i]->setSingleStep(0.5); - cswitchDuration[i]->setMaximum(50); - cswitchDuration[i]->setMinimum(0); - cswitchDuration[i]->setAccelerated(true); - cswitchDuration[i]->setDecimals(1); - connect(cswitchDuration[i],SIGNAL(editingFinished()),this,SLOT(customSwitchesEdited())); - ui->gridLayout_22->addWidget(cswitchDuration[i],i-15,5); - cswitchDuration[i]->setVisible(false); - - cswitchDelay[i] = new QDoubleSpinBox(this); - cswitchDelay[i]->setProperty("index",i); - cswitchDelay[i]->setSingleStep(0.5); - cswitchDelay[i]->setMaximum(50); - cswitchDelay[i]->setMinimum(0); - cswitchDelay[i]->setAccelerated(true); - cswitchDelay[i]->setDecimals(1); - connect(cswitchDelay[i],SIGNAL(editingFinished()),this,SLOT(customSwitchesEdited())); - ui->gridLayout_22->addWidget(cswitchDelay[i],i-15,6); - cswitchDelay[i]->setVisible(false); - } else { - ui->cswCol3_2->hide(); - ui->cswCol4_2->hide(); - } - connect(cswlabel[i],SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(csw_customContextMenuRequested(QPoint))); - } else { - csw[i]->hide(); - cswlabel[i]->hide(); - } - } - } else { - ui->cswitchGB2->hide(); - } - updateSwitchesTab(); - //connects - for (int i=0; igetCapability(CustomFunctions); - - QStringList paramarmList; - if (!GetEepromInterface()->getCapability(VoicesAsNumbers)) { - for (int i=0; igetCapability(VoicesMaxLength)+4; - if (qd.exists()) { - QStringList filters; - filters << "*.wav" << "*.WAV"; - foreach ( QString file, qd.entryList(filters, QDir::Files) ) { - QFileInfo fi(file); - QString temp=fi.completeBaseName(); - if (!paramarmList.contains(temp) && temp.length()<=vml) { - paramarmList.append(temp); - } - } - } - } - - for (int i=0; i= 16 ? ui->fswitchlayout2 : ui->fswitchlayout1; - - fswLabel[i] = new QLabel(this); - fswLabel[i]->setFrameStyle(QFrame::Panel | QFrame::Raised); - fswLabel[i]->setSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed); - fswLabel[i]->setContextMenuPolicy(Qt::CustomContextMenu); - fswLabel[i]->setMouseTracking(true); - fswLabel[i]->setProperty("FunctionId", i+1); - fswLabel[i]->setText(tr("CF%1").arg(i+1)); - layout->addWidget(fswLabel[i],(i%16)+1,0); - connect(fswLabel[i],SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(fsw_customContextMenuRequested(QPoint))); - - fswtchSwtch[i] = new QComboBox(this); - fswtchSwtch[i]->setProperty("functionIndex", i); - connect(fswtchSwtch[i],SIGNAL(currentIndexChanged(int)),this,SLOT(customFunctionEdited())); - layout->addWidget(fswtchSwtch[i],(i%16)+1,1); - populateSwitchCB(fswtchSwtch[i], g_model.funcSw[i].swtch, POPULATE_MSWITCHES|POPULATE_ONOFF); - - fswtchFunc[i] = new QComboBox(this); - fswtchFunc[i]->setProperty("functionIndex", i); - connect(fswtchFunc[i],SIGNAL(currentIndexChanged(int)),this,SLOT(customFunctionEdited())); - layout->addWidget(fswtchFunc[i],(i%16)+1,2); - populateFuncCB(fswtchFunc[i], g_model.funcSw[i].func); - - QHBoxLayout *paramLayout = new QHBoxLayout(); - layout->addLayout(paramLayout, (i%16)+1, 3); - - fswtchGVmode[i] = new QComboBox(this); - fswtchGVmode[i]->setProperty("functionIndex", i); - connect(fswtchGVmode[i],SIGNAL(currentIndexChanged(int)),this,SLOT(customFunctionEdited())); - paramLayout->addWidget(fswtchGVmode[i]); - populateGVmodeCB(fswtchGVmode[i], g_model.funcSw[i].adjustMode); - - fswtchParamGV[i] = new QCheckBox(this); - fswtchParamGV[i]->setProperty("functionIndex", i); - fswtchParamGV[i]->setText("GV"); - fswtchParamGV[i]->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum); - connect(fswtchParamGV[i],SIGNAL(stateChanged(int)),this,SLOT(customFunctionEdited())); - paramLayout->addWidget(fswtchParamGV[i]); - - fswtchParam[i] = new QDoubleSpinBox(this); - fswtchParam[i]->setProperty("functionIndex", i); - fswtchParam[i]->setAccelerated(true); - fswtchParam[i]->setDecimals(0); - connect(fswtchParam[i],SIGNAL(editingFinished()),this,SLOT(customFunctionEdited())); - paramLayout->addWidget(fswtchParam[i]); - - fswtchParamT[i] = new QComboBox(this); - fswtchParamT[i]->setProperty("functionIndex", i); - paramLayout->addWidget(fswtchParamT[i]); - populateFuncParamCB(fswtchParamT[i], func, g_model.funcSw[i].param, g_model.funcSw[i].adjustMode); - connect(fswtchParamT[i],SIGNAL(currentIndexChanged(int)),this,SLOT(customFunctionEdited())); - - fswtchParamArmT[i] = new QComboBox(this); - fswtchParamArmT[i]->setProperty("functionIndex", i); - populateFuncParamArmTCB(fswtchParamArmT[i],&g_model, g_model.funcSw[i].paramarm, paramarmList); - fswtchParamArmT[i]->setEditable(true); - paramLayout->addWidget(fswtchParamArmT[i]); - - connect(fswtchParamArmT[i],SIGNAL(currentIndexChanged(int)),this,SLOT(customFunctionEdited())); - connect(fswtchParamArmT[i],SIGNAL(editTextChanged ( const QString)),this,SLOT(customFunctionEdited())); - -#ifdef PHONON - playBT[i] = new QPushButton(this); - playBT[i]->setObjectName(QString("play_%1").arg(i)); - playBT[i]->setIcon(QIcon(":/images/play.png")); - paramLayout->addWidget(playBT[i]); - connect(playBT[i],SIGNAL(pressed()),this,SLOT(playMusic())); -#endif - - QHBoxLayout *repeatLayout = new QHBoxLayout(); - layout->addLayout(repeatLayout, (i%16)+1, 4); - - fswtchRepeat[i] = new QComboBox(this); - fswtchRepeat[i]->setProperty("functionIndex", i); - connect(fswtchRepeat[i],SIGNAL(currentIndexChanged(int)),this,SLOT(customFunctionEdited())); - repeatLayout->addWidget(fswtchRepeat[i],(i%16)+1); - populateRepeatCB(fswtchRepeat[i], g_model.funcSw[i].repeatParam); - - fswtchEnable[i] = new QCheckBox(this); - fswtchEnable[i]->setProperty("functionIndex", i); - fswtchEnable[i]->setText(tr("ON")); - repeatLayout->addWidget(fswtchEnable[i],(i%16)+1); - fswtchEnable[i]->setChecked(g_model.funcSw[i].enabled); - connect(fswtchEnable[i],SIGNAL(stateChanged(int)),this,SLOT(customFunctionEdited())); - - refreshCustomFunction(i); - } - - if (num_fsw <= 16) { - ui->FSwitchGB2->hide(); - } - - switchEditLock = false; -} - -void ModelEdit::tabSafetySwitches() -{ - for(int i=0; igrid_tabSafetySwitches->addWidget(safetySwitchSwtch[i],i+1,1); - connect(safetySwitchSwtch[i],SIGNAL(currentIndexChanged(int)),this,SLOT(safetySwitchesEdited())); - - safetySwitchValue[i] = new QSpinBox(this); - safetySwitchValue[i]->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - safetySwitchValue[i]->setMaximum(125); - safetySwitchValue[i]->setMinimum(-125); - safetySwitchValue[i]->setAccelerated(true); - safetySwitchValue[i]->setValue(g_model.safetySw[i].val); - ui->grid_tabSafetySwitches->addWidget(safetySwitchValue[i],i+1,2); - connect(safetySwitchValue[i],SIGNAL(editingFinished()),this,SLOT(safetySwitchesEdited())); - } -} - -void ModelEdit::customFieldEdited() -{ - if (telemetryLock) return; - int cols=GetEepromInterface()->getCapability(TelemetryColsCSFields); - if (cols==0) cols=2; - - for (int i=0; igetCapability(TelemetryCSFields); i++) { - int screen=i/(4*cols); - int r=((i%(4*cols))%4); - int c=((i%(4*cols))/4); - if (g_model.frsky.screens[screen].type==0) { - g_model.frsky.screens[screen].body.lines[r].source[c]=csf[i]->currentIndex(); - } - } - updateSettings(); -} - -void ModelEdit::customSwitchesEdited() -{ - if(switchEditLock) return; - - switchEditLock = true; - int i=-1; - QString indextext=sender()->property("index").toString(); - if (!indextext.isEmpty()) { - i=indextext.toInt(); - } else { - // should not happen - switchEditLock = false; - return; - } - bool chAr; - float value, step; - int newval; - chAr = (getCSFunctionFamily(g_model.customSw[i].func) != getCSFunctionFamily(csw[i]->itemData(csw[i]->currentIndex()).toInt())); - g_model.customSw[i].func = csw[i]->itemData(csw[i]->currentIndex()).toInt(); - if(chAr) { - if (getCSFunctionFamily(g_model.customSw[i].func)==CS_FAMILY_TIMERS) { - g_model.customSw[i].val1 = -119; - g_model.customSw[i].val2 = -119; - } else { - g_model.customSw[i].val1 = 0; - g_model.customSw[i].val2 = 0; - } - g_model.customSw[i].andsw = 0; - setSwitchWidgetVisibility(i); - } - if (GetEepromInterface()->getCapability(CustomSwitchesExt)) { - g_model.customSw[i].duration= (uint8_t)round(cswitchDuration[i]->value()*2); - g_model.customSw[i].delay= (uint8_t)round(cswitchDelay[i]->value()*2); - } - RawSource source; - switch (getCSFunctionFamily(g_model.customSw[i].func)) - { - case (CS_FAMILY_VOFS): - if (g_model.customSw[i].val1 != cswitchSource1[i]->itemData(cswitchSource1[i]->currentIndex()).toInt()) { - source=RawSource(g_model.customSw[i].val1); - g_model.customSw[i].val1 = cswitchSource1[i]->itemData(cswitchSource1[i]->currentIndex()).toInt(); - RawSource newSource = RawSource(g_model.customSw[i].val1); - if (newSource.type == SOURCE_TYPE_TELEMETRY) { - if (g_model.customSw[i].func>CS_FN_ELESS && g_model.customSw[i].funcCS_FN_ELESS && g_model.customSw[i].funcvalue()/source.getStep(g_model)); - } else { - g_model.customSw[i].val2 = ((cswitchOffset[i]->value()-source.getOffset(g_model))/source.getStep(g_model))-source.getRawOffset(g_model); - } - } - setSwitchWidgetVisibility(i); - } else { - source=RawSource(g_model.customSw[i].val1); - if (g_model.customSw[i].func>CS_FN_ELESS && g_model.customSw[i].funcvalue()/source.getStep(g_model)); - cswitchOffset[i]->setValue(g_model.customSw[i].val2*source.getStep(g_model)); - } else { - g_model.customSw[i].val2 = ((cswitchOffset[i]->value()-source.getOffset(g_model))/source.getStep(g_model))-source.getRawOffset(g_model); - cswitchOffset[i]->setValue((g_model.customSw[i].val2 +source.getRawOffset(g_model))*source.getStep(g_model)+source.getOffset(g_model)); - } - } - break; - case (CS_FAMILY_TIMERS): { - value=cswitchOffset[i]->value(); - newval=TimToVal(value); - if (newval>g_model.customSw[i].val2) { - if (value >=60) { - value=round(value); - step=1; - } else if (value>=2) { - value=(round(value*2.0)/2); - step=0.5; - } else { - step=0.1; - } - } else { - if (value <=2) { - step=0.1; - } else if (value<=60) { - value=(round(value*2.0)/2); - step=0.5; - } else { - value=round(value); - step=1; - } - } - g_model.customSw[i].val2=TimToVal(value); - value=ValToTim(g_model.customSw[i].val2); - cswitchOffset[i]->setValue(value); - cswitchOffset[i]->setSingleStep(step); - - value=cswitchValue[i]->value(); - newval=TimToVal(value); - if (newval>g_model.customSw[i].val1) { - if (value >=60) { - value=round(value); - step=1; - } else if (value>=2) { - value=(round(value*2.0)/2); - step=0.5; - } else { - step=0.1; - } - } else { - if (value <=2) { - step=0.1; - } else if (value<=60) { - value=(round(value*2.0)/2); - step=0.5; - } else { - value=round(value); - step=1; - } - } - g_model.customSw[i].val1=TimToVal(value); - value=ValToTim(g_model.customSw[i].val1); - cswitchValue[i]->setValue(value); - cswitchValue[i]->setSingleStep(step); - break; - } - case (CS_FAMILY_VBOOL): - case (CS_FAMILY_VCOMP): - g_model.customSw[i].val1 = cswitchSource1[i]->itemData(cswitchSource1[i]->currentIndex()).toInt(); - g_model.customSw[i].val2 = cswitchSource2[i]->itemData(cswitchSource2[i]->currentIndex()).toInt(); - break; - } - g_model.customSw[i].andsw = cswitchAnd[i]->itemData(cswitchAnd[i]->currentIndex()).toInt(); - updateSettings(); - switchEditLock = false; -} - -#ifdef PHONON - -void ModelEdit::mediaPlayer_state(Phonon::State newState, Phonon::State oldState) -{ - if (phononLock) - return; - phononLock=true; - if ((newState==Phonon::StoppedState || newState==Phonon::PausedState) && oldState==Phonon::PlayingState) { - clickObject->stop(); - clickObject->clearQueue(); - clickObject->clear(); - for (int i=0; igetCapability(CustomFunctions); i++) { - playBT[i]->setObjectName(QString("play_%1").arg(i)); - playBT[i]->setIcon(QIcon(":/images/play.png")); - } - } - if (newState==Phonon::ErrorState) { - clickObject->stop(); - clickObject->clearQueue(); - clickObject->clear(); - for (int i=0; igetCapability(CustomFunctions); i++) { - playBT[i]->setObjectName(QString("play_%1").arg(i)); - playBT[i]->setIcon(QIcon(":/images/play.png")); - } - } - - phononLock=false; -} -#endif - -void ModelEdit::playMusic() -{ - QPushButton *playButton = qobject_cast(sender()); - int index=playButton->objectName().mid(5,2).toInt(); - QString function=playButton->objectName().left(4); - QSettings settings("companion9x", "companion9x"); - QString path=settings.value("sdPath", ".").toString(); - QDir qd(path); - QString track; - if (qd.exists()) { - if (GetEepromInterface()->getCapability(VoicesAsNumbers)) { - track=path+QString("/%1.wav").arg(int(fswtchParam[index]->value()),4,10,(const QChar)'0'); - } else { - path.append("/SOUNDS/"); - QString lang=radioData.generalSettings.ttsLanguage; - if (lang.isEmpty()) - lang="en"; - path.append(lang); - if (fswtchParamArmT[index]->currentText()!="----") { - track=path+"/"+fswtchParamArmT[index]->currentText()+".wav"; - } - } - QFile file(track); - if (!file.exists()) { - QMessageBox::critical(this, tr("Error"), tr("Unable to find sound file %1!").arg(track)); - track.clear(); - } -#ifdef PHONON - if (function=="play" && !track.isEmpty()) { - clickObject->clear(); - clickObject->setCurrentSource(Phonon::MediaSource(track)); - clickObject->play(); - playBT[index]->setObjectName(QString("stop_%1").arg(index)); - playBT[index]->setIcon(QIcon(":/images/stop.png")); - } else { - clickObject->stop(); - clickObject->clear(); - playBT[index]->setObjectName(QString("play_%1").arg(index)); - playBT[index]->setIcon(QIcon(":/images/play.png")); - } -#endif - } -} - -#define CUSTOM_FUNCTION_NUMERIC_PARAM (1<<0) -#define CUSTOM_FUNCTION_SOURCE_PARAM (1<<1) -#define CUSTOM_FUNCTION_FILE_PARAM (1<<2) -#define CUSTOM_FUNCTION_GV_MODE (1<<3) -#define CUSTOM_FUNCTION_GV_TOOGLE (1<<4) -#define CUSTOM_FUNCTION_ENABLE (1<<5) -#define CUSTOM_FUNCTION_REPEAT (1<<6) -#define CUSTOM_FUNCTION_PLAY (1<<7) - -void ModelEdit::customFunctionEdited() -{ - if (switchEditLock) return; - switchEditLock = true; - - int index = sender()->property("functionIndex").toInt(); - refreshCustomFunction(index, true); - - updateSettings(); - switchEditLock = false; -} - -void ModelEdit::refreshCustomFunction(int i, bool modified) -{ - unsigned int widgetsMask = 0; - if (modified) { - g_model.funcSw[i].swtch = RawSwitch(fswtchSwtch[i]->itemData(fswtchSwtch[i]->currentIndex()).toInt()); - g_model.funcSw[i].func = (AssignFunc)fswtchFunc[i]->currentIndex(); - g_model.funcSw[i].enabled =fswtchEnable[i]->isChecked(); - g_model.funcSw[i].repeatParam = (AssignFunc)fswtchRepeat[i]->currentIndex(); - g_model.funcSw[i].adjustMode = (AssignFunc)fswtchGVmode[i]->currentIndex(); - } - - int index = fswtchFunc[i]->currentIndex(); - - if (index>=FuncSafetyCh1 && index<=FuncSafetyCh16) { - fswtchParam[i]->setDecimals(0); - fswtchParam[i]->setSingleStep(1); - fswtchParam[i]->setMinimum(-125); - fswtchParam[i]->setMaximum(125); - if (modified) { - g_model.funcSw[i].param = fswtchParam[i]->value(); - } - fswtchParam[i]->setValue(g_model.funcSw[i].param); - widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM + CUSTOM_FUNCTION_ENABLE; - } else if (index==FuncLogs) { - fswtchParam[i]->setDecimals(1); - fswtchParam[i]->setMinimum(0); - fswtchParam[i]->setMaximum(25.5); - fswtchParam[i]->setSingleStep(0.1); - if (modified) g_model.funcSw[i].param = fswtchParam[i]->value()*10.0; - fswtchParam[i]->setValue(g_model.funcSw[i].param/10.0); - widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM + CUSTOM_FUNCTION_ENABLE; - } else if (index>=FuncAdjustGV1 && index<=FuncAdjustGV5) { - if (modified) g_model.funcSw[i].adjustMode = fswtchGVmode[i]->currentIndex(); - widgetsMask |= CUSTOM_FUNCTION_GV_MODE + CUSTOM_FUNCTION_ENABLE; - if (g_model.funcSw[i].adjustMode==0) { - if (modified) g_model.funcSw[i].param = fswtchParam[i]->value(); - fswtchParam[i]->setDecimals(0); - fswtchParam[i]->setSingleStep(1); - fswtchParam[i]->setMinimum(-125); - fswtchParam[i]->setMaximum(125); - fswtchParam[i]->setValue(g_model.funcSw[i].param); - widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM; - } else { - if (modified) g_model.funcSw[i].param = fswtchParamT[i]->itemData(fswtchParamT[i]->currentIndex()).toInt(); - populateFuncParamCB(fswtchParamT[i], index, g_model.funcSw[i].param, g_model.funcSw[i].adjustMode); - widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM; - } - } else if (index==FuncReset) { - if (modified) g_model.funcSw[i].param = (uint8_t)fswtchParamT[i]->currentIndex(); - populateFuncParamCB(fswtchParamT[i], index, g_model.funcSw[i].param); - widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM; - } else if (index==FuncVolume) { - if (modified) g_model.funcSw[i].param = fswtchParamT[i]->itemData(fswtchParamT[i]->currentIndex()).toInt(); - populateFuncParamCB(fswtchParamT[i], index, g_model.funcSw[i].param); - widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM + CUSTOM_FUNCTION_ENABLE; - } else if (index==FuncPlaySound || index==FuncPlayHaptic || index==FuncPlayValue || index==FuncPlayPrompt || index==FuncPlayBoth || index==FuncBackgroundMusic) { - if (modified) g_model.funcSw[i].repeatParam = fswtchRepeat[i]->itemData(fswtchRepeat[i]->currentIndex()).toInt(); - if (index != FuncBackgroundMusic) { - if (GetEepromInterface()->getCapability(HasFuncRepeat)) { - widgetsMask |= CUSTOM_FUNCTION_REPEAT; - } - } - if (index==FuncPlayValue) { - if (modified) g_model.funcSw[i].param = fswtchParamT[i]->itemData(fswtchParamT[i]->currentIndex()).toInt(); - populateFuncParamCB(fswtchParamT[i], index, g_model.funcSw[i].param); - widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM + CUSTOM_FUNCTION_REPEAT; - } else if (index==FuncPlayPrompt || index==FuncPlayBoth) { - if (GetEepromInterface()->getCapability(VoicesAsNumbers)) { - fswtchParam[i]->setDecimals(0); - fswtchParam[i]->setSingleStep(1); - fswtchParam[i]->setMinimum(0); - if (index==FuncPlayPrompt) { - widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM + CUSTOM_FUNCTION_REPEAT + CUSTOM_FUNCTION_GV_TOOGLE; - } else { - widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM + CUSTOM_FUNCTION_REPEAT; - fswtchParamGV[i]->setChecked(false); - } - fswtchParam[i]->setMaximum(index==FuncPlayBoth ? 254 : 255); - if (modified) { - if (fswtchParamGV[i]->isChecked()) { - fswtchParam[i]->setMinimum(1); - g_model.funcSw[i].param = std::min(fswtchParam[i]->value(),5.0)+(fswtchParamGV[i]->isChecked() ? 250 : 0); - } else { - g_model.funcSw[i].param = fswtchParam[i]->value(); - } - } - if (g_model.funcSw[i].param>250 && (index!=FuncPlayBoth)) { - fswtchParamGV[i]->setChecked(true); - fswtchParam[i]->setValue(g_model.funcSw[i].param-250); - fswtchParam[i]->setMaximum(5); - } else { - fswtchParamGV[i]->setChecked(false); - fswtchParam[i]->setValue(g_model.funcSw[i].param); - } - if (g_model.funcSw[i].param < 251) - widgetsMask |= CUSTOM_FUNCTION_PLAY; - } else { - widgetsMask |= CUSTOM_FUNCTION_FILE_PARAM; - if (modified) { - memset(g_model.funcSw[i].paramarm, 0, sizeof(g_model.funcSw[i].paramarm)); - int vml=GetEepromInterface()->getCapability(VoicesMaxLength); - if (fswtchParamArmT[i]->currentText() != "----") { - widgetsMask |= CUSTOM_FUNCTION_PLAY; - for (int j=0; jcurrentText().length(),vml); j++) { - g_model.funcSw[i].paramarm[j] = fswtchParamArmT[i]->currentText().toAscii().at(j); - } - } - } - } - } else if (index==FuncBackgroundMusic) { - widgetsMask |= CUSTOM_FUNCTION_FILE_PARAM; - if (modified) { - memset(g_model.funcSw[i].paramarm, 0, sizeof(g_model.funcSw[i].paramarm)); - int vml=GetEepromInterface()->getCapability(VoicesMaxLength); - if (fswtchParamArmT[i]->currentText() != "----") { - widgetsMask |= CUSTOM_FUNCTION_PLAY; - for (int j=0; jcurrentText().length(),vml); j++) { - g_model.funcSw[i].paramarm[j] = fswtchParamArmT[i]->currentText().toAscii().at(j); - } - } - } - } else if (index==FuncPlaySound) { - if (modified) g_model.funcSw[i].param = (uint8_t)fswtchParamT[i]->currentIndex(); - populateFuncParamCB(fswtchParamT[i], index, g_model.funcSw[i].param); - widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM; - } else if (index==FuncPlayHaptic) { - if (modified) g_model.funcSw[i].param = (uint8_t)fswtchParamT[i]->currentIndex(); - populateFuncParamCB(fswtchParamT[i], index, g_model.funcSw[i].param); - widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM; - } - } else if (g_model.funcSw[i].swtch.type!=SWITCH_TYPE_NONE) { - if (modified) g_model.funcSw[i].param = fswtchParam[i]->value(); - fswtchParam[i]->setDecimals(0); - fswtchParam[i]->setSingleStep(1); - fswtchParam[i]->setValue(g_model.funcSw[i].param); - if (index<=FuncInstantTrim) { - widgetsMask |= CUSTOM_FUNCTION_ENABLE; - } - } - - fswtchParam[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_NUMERIC_PARAM); - fswtchParamGV[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_GV_TOOGLE); - fswtchParamT[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_SOURCE_PARAM); - fswtchParamArmT[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_FILE_PARAM); - fswtchEnable[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_ENABLE); - if (!(widgetsMask & CUSTOM_FUNCTION_ENABLE)) fswtchEnable[i]->setChecked(false); - fswtchRepeat[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_REPEAT); - fswtchGVmode[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_GV_MODE); -#ifdef PHONON - playBT[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_PLAY); -#endif -} - -void ModelEdit::tabTelemetry() -{ - QSettings settings("companion9x", "companion9x"); - QString firmware_id = settings.value("firmware", default_firmware_variant.id).toString(); - float a1ratio; - float a2ratio; - - QGroupBox* barsgb[3] = { ui->CS1Bars, ui->CS2Bars, ui->CS3Bars }; - QGroupBox* numsgb[3] = { ui->CS1Nums, ui->CS2Nums, ui->CS3Nums }; - - QComboBox* barscb[12] = { ui->telBarCS1B1_CB, ui->telBarCS1B2_CB, ui->telBarCS1B3_CB, ui->telBarCS1B4_CB, - ui->telBarCS2B1_CB, ui->telBarCS2B2_CB, ui->telBarCS2B3_CB, ui->telBarCS2B4_CB, - ui->telBarCS3B1_CB, ui->telBarCS3B2_CB, ui->telBarCS3B3_CB, ui->telBarCS3B4_CB}; - QDoubleSpinBox* minsb[12] = { ui->telMinCS1SB1, ui->telMinCS1SB2, ui->telMinCS1SB3, ui->telMinCS1SB4, - ui->telMinCS2SB1, ui->telMinCS2SB2, ui->telMinCS2SB3, ui->telMinCS2SB4, - ui->telMinCS3SB1, ui->telMinCS3SB2, ui->telMinCS3SB3, ui->telMinCS3SB4}; - QDoubleSpinBox* maxsb[12] = { ui->telMaxCS1SB1, ui->telMaxCS1SB2, ui->telMaxCS1SB3, ui->telMaxCS1SB4, - ui->telMaxCS2SB1, ui->telMaxCS2SB2, ui->telMaxCS2SB3, ui->telMaxCS2SB4, - ui->telMaxCS3SB1, ui->telMaxCS3SB2, ui->telMaxCS3SB3, ui->telMaxCS3SB4}; - QComboBox* tmp[36] = { ui->telemetryCS1F1_CB, ui->telemetryCS1F2_CB, ui->telemetryCS1F3_CB, ui->telemetryCS1F4_CB, ui->telemetryCS1F5_CB, ui->telemetryCS1F6_CB, ui->telemetryCS1F7_CB, ui->telemetryCS1F8_CB, ui->telemetryCS1F9_CB, ui->telemetryCS1F10_CB, ui->telemetryCS1F11_CB, ui->telemetryCS1F12_CB, - ui->telemetryCS2F1_CB, ui->telemetryCS2F2_CB, ui->telemetryCS2F3_CB, ui->telemetryCS2F4_CB, ui->telemetryCS2F5_CB, ui->telemetryCS2F6_CB, ui->telemetryCS2F7_CB, ui->telemetryCS2F8_CB, ui->telemetryCS2F9_CB, ui->telemetryCS2F10_CB, ui->telemetryCS2F11_CB, ui->telemetryCS2F12_CB, - ui->telemetryCS3F1_CB, ui->telemetryCS3F2_CB, ui->telemetryCS3F3_CB, ui->telemetryCS3F4_CB, ui->telemetryCS3F5_CB, ui->telemetryCS3F6_CB, ui->telemetryCS3F7_CB, ui->telemetryCS3F8_CB, ui->telemetryCS3F9_CB, ui->telemetryCS3F10_CB, ui->telemetryCS3F11_CB, ui->telemetryCS3F12_CB}; - - memcpy(barsGB, barsgb, sizeof(barsGB)); - memcpy(numsGB, numsgb, sizeof(numsGB)); - memcpy(barsCB, barscb, sizeof(barsCB)); - memcpy(maxSB, maxsb, sizeof(maxSB)); - memcpy(minSB, minsb, sizeof(minSB)); - memcpy(csf, tmp, sizeof(csf)); - - telemetryLock=true; - ui->telemetryCSType1->setCurrentIndex(g_model.frsky.screens[0].type); - ui->telemetryCSType2->setCurrentIndex(g_model.frsky.screens[1].type); - ui->telemetryCSType3->setCurrentIndex(g_model.frsky.screens[2].type); - - for (int i=0; i<3; i++) { - bool isNum = (g_model.frsky.screens[i].type==0); - barsGB[i]->setVisible(!isNum); - numsGB[i]->setVisible(isNum); - } - - connect(ui->telemetryCSType1,SIGNAL(currentIndexChanged(int)),this,SLOT(ScreenTypeCBcurrentIndexChanged(int))); - connect(ui->telemetryCSType2,SIGNAL(currentIndexChanged(int)),this,SLOT(ScreenTypeCBcurrentIndexChanged(int))); - connect(ui->telemetryCSType3,SIGNAL(currentIndexChanged(int)),this,SLOT(ScreenTypeCBcurrentIndexChanged(int))); - - //frsky Settings - if (!GetEepromInterface()->getCapability(TelemetryRSSIModel) ) { - ui->RSSIGB->hide(); - } - ui->rssiAlarm1SB->setValue(g_model.frsky.rssiAlarms[0].value); - ui->rssiAlarm2SB->setValue(g_model.frsky.rssiAlarms[1].value); - ui->rssiAlarm1CB->setCurrentIndex(g_model.frsky.rssiAlarms[0].level); - ui->rssiAlarm2CB->setCurrentIndex(g_model.frsky.rssiAlarms[1].level); - - if (!GetEepromInterface()->getCapability(HasAltitudeSel)) { - ui->AltitudeGPS_ChkB->hide(); - } else { - ui->AltitudeGPS_ChkB->setChecked(g_model.frsky.FrSkyGpsAlt); - } - int varioCap=GetEepromInterface()->getCapability(HasVario); - // if (IS_TARANIS(GetEepromInterface()->getBoard())) { - if (false) { - ui->AltitudeToolbar_ChkB->setChecked(g_model.frsky.altitudeDisplayed); - } else { - ui->AltitudeToolbar_ChkB->hide(); - } - if (!varioCap) { - ui->varioLimitMax_DSB->hide(); - ui->varioLimitMinOff_ChkB->hide(); - ui->varioLimitMin_DSB->hide(); - ui->varioLimitCenterMin_DSB->hide(); - ui->varioLimitCenterMax_DSB->hide(); - ui->varioLimit_label->hide(); - ui->VarioLabel_1->hide(); - ui->VarioLabel_2->hide(); - ui->VarioLabel_3->hide(); - ui->VarioLabel_4->hide(); - ui->varioSourceCB->hide(); - ui->varioSource_label->hide(); - } else { - if (!GetEepromInterface()->getCapability(HasVarioSink)) { - ui->varioLimitMinOff_ChkB->hide(); - ui->varioLimitMin_DSB->hide(); - ui->varioLimitCenterMin_DSB->hide(); - ui->VarioLabel_1->hide(); - ui->VarioLabel_2->hide(); - } - ui->varioLimitMin_DSB->setValue(g_model.frsky.varioMin-10); - ui->varioLimitMax_DSB->setValue(g_model.frsky.varioMax+10); - ui->varioLimitCenterMax_DSB->setValue((g_model.frsky.varioCenterMax/10.0)+0.5); - ui->varioSourceCB->setCurrentIndex(g_model.frsky.varioSource); - if (g_model.frsky.varioCenterMin==-16) { - ui->varioLimitMinOff_ChkB->setChecked(true); - ui->varioLimitCenterMin_DSB->setValue(-2.0); - ui->varioLimitCenterMin_DSB->setDisabled(true); - } else { - ui->varioLimitMinOff_ChkB->setChecked(false); - ui->varioLimitCenterMin_DSB->setValue((g_model.frsky.varioCenterMin/10.0)-0.5); - } - int mask=1; - for (int i=0; i< ui->varioSourceCB->count(); i++) { - if (!(varioCap&mask)) { - QModelIndex index = ui->varioSourceCB->model()->index(i, 0); - QVariant v(0); - ui->varioSourceCB->model()->setData(index, v, Qt::UserRole - 1); - } - mask <<=1; - } - } - - if (!(GetEepromInterface()->getCapability(HasAltitudeSel)||GetEepromInterface()->getCapability(HasVario))) { - ui->altimetryGB->hide(); - } - if (GetEepromInterface()->getCapability(NoTelemetryProtocol)) { - g_model.frsky.usrProto=1; - ui->frskyProtoCB->setDisabled(true); - } else { - ui->frskyProtoCB->setEnabled(true); - } - - if (GetEepromInterface()->getCapability(TelemetryCSFields)==0) { - ui->groupBox_5->hide(); - } else { - if (GetEepromInterface()->getCapability(TelemetryCSFields)==8) { - ui->tabCsView->removeTab(1); - ui->tabCsView->removeTab(2); - } - if (GetEepromInterface()->getCapability(TelemetryCSFields)==16) { - ui->tabCsView->removeTab(2); - } - int cols=GetEepromInterface()->getCapability(TelemetryColsCSFields); - if (cols==0) cols=2; - for (int screen=0; screen<(GetEepromInterface()->getCapability(TelemetryCSFields)/(4*cols)); screen++) { - for (int c=0; chide(); - } - } - } - } - - if (!GetEepromInterface()->getCapability(TelemetryUnits)) { - ui->frskyUnitsCB->setDisabled(true); - int index=0; - if (firmware_id.contains("imperial")) { - index=1; - } - ui->frskyUnitsCB->setCurrentIndex(index); - } - if ((GetEepromInterface()->getCapability(Telemetry)&TM_HASWSHH)) { - ui->frskyProtoCB->addItem(tr("Winged Shadow How High")); - } else { - ui->frskyProtoCB->addItem(tr("Winged Shadow How High (not supported)")); - } - ui->a1UnitCB->setCurrentIndex(g_model.frsky.channels[0].type); - if (g_model.frsky.channels[0].type==0 || g_model.frsky.channels[0].type==1 || g_model.frsky.channels[0].type==2) { - a1ratio=(g_model.frsky.channels[0].ratio<a1RatioSB->setDecimals(1); - ui->a1RatioSB->setMaximum(25.5*GetEepromInterface()->getCapability(TelemetryMaxMultiplier)); - } else { - a1ratio=g_model.frsky.channels[0].ratio<a1RatioSB->setDecimals(0); - ui->a1RatioSB->setMaximum(255*GetEepromInterface()->getCapability(TelemetryMaxMultiplier)); - } - ui->a1RatioSB->setValue(a1ratio); - - updateA1Fields(); - - if (g_model.frsky.channels[1].type==0 || g_model.frsky.channels[1].type==1 || g_model.frsky.channels[1].type==2) { - a2ratio=(g_model.frsky.channels[1].ratio<a2RatioSB->setDecimals(1); - ui->a2RatioSB->setMaximum(25.5*GetEepromInterface()->getCapability(TelemetryMaxMultiplier)); - } else { - a2ratio=g_model.frsky.channels[1].ratio<a2RatioSB->setDecimals(0); - ui->a2RatioSB->setMaximum(255*GetEepromInterface()->getCapability(TelemetryMaxMultiplier)); - } - ui->a2RatioSB->setValue(a2ratio); - updateA2Fields(); - - ui->a11LevelCB->setCurrentIndex(g_model.frsky.channels[0].alarms[0].level); - ui->a11GreaterCB->setCurrentIndex(g_model.frsky.channels[0].alarms[0].greater); - ui->a12LevelCB->setCurrentIndex(g_model.frsky.channels[0].alarms[1].level); - ui->a12GreaterCB->setCurrentIndex(g_model.frsky.channels[0].alarms[1].greater); - ui->a2UnitCB->setCurrentIndex(g_model.frsky.channels[1].type); - ui->a21LevelCB->setCurrentIndex(g_model.frsky.channels[1].alarms[0].level); - ui->a21GreaterCB->setCurrentIndex(g_model.frsky.channels[1].alarms[0].greater); - ui->a22LevelCB->setCurrentIndex(g_model.frsky.channels[1].alarms[1].level); - ui->a22GreaterCB->setCurrentIndex(g_model.frsky.channels[1].alarms[1].greater); - if (!(GetEepromInterface()->getCapability(Telemetry)&TM_HASOFFSET)) { - ui->a1CalibSB->hide(); - ui->a2CalibSB->hide(); - ui->a1CalibLabel->hide(); - ui->a2CalibLabel->hide(); - } else { - ui->label_A1Max->setText(tr("Range")); - ui->label_A2Max->setText(tr("Range")); - } - ui->frskyProtoCB->setCurrentIndex(g_model.frsky.usrProto); - ui->frskyUnitsCB->setCurrentIndex(g_model.frsky.imperial); - ui->frskyBladesCB->setCurrentIndex(g_model.frsky.blades); - ui->frskyCurrentCB->setCurrentIndex(g_model.frsky.currentSource); - ui->frskyVoltCB->setCurrentIndex(g_model.frsky.voltsSource); - - for (int screen=0; screen<2;screen++) { - for (int rows=0; rows<4; rows++) { - for (int cols=0; cols<3; cols++) { - int index=screen*12+cols*4+rows; - populateCustomScreenFieldCB(csf[index], g_model.frsky.screens[screen].body.lines[rows].source[cols], (rows<4), g_model.frsky.usrProto); - } - } - } - - for (int j=0; j<12; j++) { - int screen = j/4; - int field = j%4; - populateCustomScreenFieldCB(barsCB[j], g_model.frsky.screens[screen].body.bars[field].source, false, g_model.frsky.usrProto); - switch (g_model.frsky.screens[screen].body.bars[field].source-1) { - case TELEMETRY_SOURCE_TX_BATT: - case TELEMETRY_SOURCE_A1: - case TELEMETRY_SOURCE_A1_MIN: - case TELEMETRY_SOURCE_A2: - case TELEMETRY_SOURCE_A2_MIN: - case TELEMETRY_SOURCE_CELLS_SUM: - case TELEMETRY_SOURCE_VFAS: - case TELEMETRY_SOURCE_CURRENT_MAX: - case TELEMETRY_SOURCE_CURRENT: - minsb[j]->setDecimals(1); - maxsb[j]->setDecimals(1); - break; - case TELEMETRY_SOURCE_CELL: - minsb[j]->setDecimals(2); - maxsb[j]->setDecimals(2); - break; - default: - minsb[j]->setDecimals(0); - maxsb[j]->setDecimals(0); - } - minsb[j]->setMinimum(getBarValue(g_model.frsky.screens[screen].body.bars[field].source, 0, &g_model.frsky)); - minsb[j]->setMaximum(getBarValue(g_model.frsky.screens[screen].body.bars[field].source, 255, &g_model.frsky)); - minsb[j]->setSingleStep(getBarStep(g_model.frsky.screens[screen].body.bars[field].source)); - minsb[j]->setValue(getBarValue(g_model.frsky.screens[screen].body.bars[field].source, g_model.frsky.screens[screen].body.bars[field].barMin, &g_model.frsky)); - maxsb[j]->setMinimum(getBarValue(g_model.frsky.screens[screen].body.bars[field].source, 0, &g_model.frsky)); - maxsb[j]->setMaximum(getBarValue(g_model.frsky.screens[screen].body.bars[field].source, 255, &g_model.frsky)); - maxsb[j]->setSingleStep(getBarStep(g_model.frsky.screens[screen].body.bars[field].source)); - maxsb[j]->setValue(getBarValue(g_model.frsky.screens[screen].body.bars[field].source, (255-g_model.frsky.screens[screen].body.bars[field].barMax), &g_model.frsky)); - - if (g_model.frsky.screens[screen].body.bars[field].source==0 || g_model.frsky.screens[screen].type==0) { - minsb[j]->setDisabled(true); - maxsb[j]->setDisabled(true); - } - connect(barsCB[j],SIGNAL(currentIndexChanged(int)),this,SLOT(telBarCBcurrentIndexChanged(int))); - connect(maxSB[j],SIGNAL(editingFinished()),this,SLOT(telMaxSBeditingFinished())); - connect(minSB[j],SIGNAL(editingFinished()),this,SLOT(telMinSBeditingFinished())); - } - telemetryLock=false; -} - -void ModelEdit::updateA1Fields() -{ - float a1ratio,a11value, a12value; - if (g_model.frsky.channels[0].ratio==0) { - ui->a11ValueSB->setMinimum(0); - ui->a11ValueSB->setMaximum(0); - ui->a12ValueSB->setMinimum(0); - ui->a12ValueSB->setMaximum(0); - ui->a1CalibSB->setMinimum(0); - ui->a1CalibSB->setMaximum(0); - ui->a1CalibSB->setValue(0); - ui->a11ValueSB->setValue(0); - ui->a12ValueSB->setValue(0); - return; - } - - if (g_model.frsky.channels[0].type==0 || g_model.frsky.channels[0].type==1 || g_model.frsky.channels[0].type==2) { - a1ratio=(g_model.frsky.channels[0].ratio<a11ValueSB->setDecimals(2); - ui->a11ValueSB->setSingleStep(a1ratio/255.0); - ui->a12ValueSB->setDecimals(2); - ui->a12ValueSB->setSingleStep(a1ratio/255.0); - ui->a11ValueSB->setMinimum((g_model.frsky.channels[0].ratio*1.0*g_model.frsky.channels[0].offset)/2550.0); - ui->a11ValueSB->setMaximum(a1ratio+(g_model.frsky.channels[0].ratio*1.0*g_model.frsky.channels[0].offset)/2550.0); - ui->a12ValueSB->setMinimum((g_model.frsky.channels[0].offset*1.0*g_model.frsky.channels[0].ratio)/2550.0); - ui->a12ValueSB->setMaximum(a1ratio+(g_model.frsky.channels[0].offset*1.0*g_model.frsky.channels[0].ratio)/2550.0); - } else { - a1ratio=g_model.frsky.channels[0].ratio<a11ValueSB->setDecimals(2); - ui->a11ValueSB->setSingleStep(a1ratio/255.0); - ui->a12ValueSB->setDecimals(2); - ui->a12ValueSB->setSingleStep(a1ratio/255.0); - ui->a11ValueSB->setMinimum((g_model.frsky.channels[0].offset*1.0*g_model.frsky.channels[0].ratio)/255.0); - ui->a11ValueSB->setMaximum(a1ratio+(g_model.frsky.channels[0].offset*1.0*g_model.frsky.channels[0].ratio)/255.0); - ui->a12ValueSB->setMinimum((g_model.frsky.channels[0].offset*1.0*g_model.frsky.channels[0].ratio)/255.0); - ui->a12ValueSB->setMaximum(a1ratio+(g_model.frsky.channels[0].offset*1.0*g_model.frsky.channels[0].ratio)/255.0); - } - ui->a1CalibSB->setDecimals(2); - ui->a1CalibSB->setMaximum((a1ratio*127)/255.0); - ui->a1CalibSB->setMinimum((-a1ratio*128)/255.0); - ui->a1CalibSB->setSingleStep(a1ratio/255.0); - ui->a1CalibSB->setValue((g_model.frsky.channels[0].offset*a1ratio)/255); - a11value=a1ratio*(g_model.frsky.channels[0].alarms[0].value/255.0+g_model.frsky.channels[0].offset/255.0); - a12value=a1ratio*(g_model.frsky.channels[0].alarms[1].value/255.0+g_model.frsky.channels[0].offset/255.0);; - ui->a11ValueSB->setValue(a11value); - ui->a12ValueSB->setValue(a12value); -} - -void ModelEdit::updateA2Fields() -{ - float a2ratio,a21value, a22value; - if (g_model.frsky.channels[1].ratio==0) { - ui->a21ValueSB->setMinimum(0); - ui->a21ValueSB->setMaximum(0); - ui->a22ValueSB->setMinimum(0); - ui->a22ValueSB->setMaximum(0); - ui->a2CalibSB->setMinimum(0); - ui->a2CalibSB->setMaximum(0); - ui->a2CalibSB->setValue(0); - ui->a21ValueSB->setValue(0); - ui->a22ValueSB->setValue(0); - return; - } - if (g_model.frsky.channels[1].type==0) { - a2ratio=g_model.frsky.channels[1].ratio/10.0; - ui->a21ValueSB->setDecimals(2); - ui->a21ValueSB->setSingleStep(a2ratio/255.0); - ui->a22ValueSB->setDecimals(2); - ui->a22ValueSB->setSingleStep(a2ratio/255.0); - ui->a21ValueSB->setMinimum((g_model.frsky.channels[1].offset*1.0*g_model.frsky.channels[1].ratio)/2550.0); - ui->a21ValueSB->setMaximum(a2ratio+(g_model.frsky.channels[1].offset*1.0*g_model.frsky.channels[1].ratio)/2550.0); - ui->a22ValueSB->setMinimum((g_model.frsky.channels[1].offset*1.0*g_model.frsky.channels[1].ratio*1.0)/2550.0); - ui->a22ValueSB->setMaximum(a2ratio+(g_model.frsky.channels[1].offset*1.0*g_model.frsky.channels[1].ratio)/2550.0); - } else { - a2ratio=g_model.frsky.channels[1].ratio; - ui->a21ValueSB->setDecimals(2); - ui->a21ValueSB->setSingleStep(a2ratio/255.0); - ui->a22ValueSB->setDecimals(2); - ui->a22ValueSB->setSingleStep(a2ratio/255.0); - ui->a21ValueSB->setMinimum((g_model.frsky.channels[1].offset*1.0*g_model.frsky.channels[1].ratio)/255.0); - ui->a21ValueSB->setMaximum(a2ratio+(g_model.frsky.channels[1].offset*1.0*g_model.frsky.channels[1].ratio)/255.0); - ui->a22ValueSB->setMinimum((g_model.frsky.channels[1].offset*1.0*g_model.frsky.channels[1].ratio)/255.0); - ui->a22ValueSB->setMaximum(a2ratio+(g_model.frsky.channels[1].offset*1.0*g_model.frsky.channels[1].ratio)/255.0); - } - ui->a2CalibSB->setDecimals(2); - ui->a2CalibSB->setMaximum((a2ratio*127)/255.0); - ui->a2CalibSB->setMinimum((-a2ratio*128)/255.0); - ui->a2CalibSB->setSingleStep(a2ratio/255.0); - ui->a2CalibSB->setValue((g_model.frsky.channels[1].offset*a2ratio)/255.0); - a21value=a2ratio*(g_model.frsky.channels[1].alarms[0].value/255.0+g_model.frsky.channels[1].offset/255.0); - a22value=a2ratio*(g_model.frsky.channels[1].alarms[1].value/255.0+g_model.frsky.channels[1].offset/255.0); - ui->a21ValueSB->setValue(a21value); - ui->a22ValueSB->setValue(a22value); -} - -void ModelEdit::tabTemplates() -{ - ui->templateList->clear(); - ui->templateList->addItem(tr("Simple 4-CH")); - ui->templateList->addItem(tr("T-Cut")); - ui->templateList->addItem(tr("Sticky T-Cut")); - ui->templateList->addItem(tr("V-Tail")); - ui->templateList->addItem(tr("Elevon\\Delta")); - ui->templateList->addItem(tr("Heli Setup")); - ui->templateList->addItem(tr("Heli Setup with gyro gain control")); - ui->templateList->addItem(tr("Gyro gain control")); - ui->templateList->addItem(tr("Heli Setup (Futaba's channel assignment style)")); - ui->templateList->addItem(tr("Heli Setup with gyro gain control (Futaba's channel assignment style)")); - ui->templateList->addItem(tr("Gyro gain control (Futaba's channel assignment style)")); - ui->templateList->addItem(tr("Servo Test")); - ui->templateList->addItem(tr("MultiCopter")); - ui->templateList->addItem(tr("Use Model Config Wizard")); -} - -void ModelEdit::on_modelNameLE_editingFinished() -{ - int length=ui->modelNameLE->maxLength(); - strncpy(g_model.name, ui->modelNameLE->text().toAscii(), length); - updateSettings(); -} - -void ModelEdit::on_modelImage_CB_currentIndexChanged(int index) -{ - if (modelImageLock) - return; - strncpy(g_model.bitmap, ui->modelImage_CB->currentText().toAscii(), GetEepromInterface()->getCapability(VoicesMaxLength)); - QSettings settings("companion9x", "companion9x"); - QString path=settings.value("sdPath", ".").toString(); - path.append("/BMP/"); - QDir qd(path); - if (qd.exists()) { - QString fileName=path; - fileName.append(g_model.bitmap); - fileName.append(".bmp"); - QImage image(fileName); - if (image.isNull()) { - fileName=path; - fileName.append(g_model.bitmap); - fileName.append(".BMP"); - image.load(fileName); - } - if (!image.isNull()) { - ui->modelImage_image->setPixmap(QPixmap::fromImage(image.scaled( 64,32)));; - } else { - ui->modelImage_image->clear(); - } - } else { - ui->modelImage_image->clear(); - } - updateSettings(); -} - -void ModelEdit::phaseName_editingFinished() -{ - QLineEdit *lineEdit = qobject_cast(sender()); - int phase = lineEdit->objectName().mid(5,1).toInt(); - QString PhaseName=lineEdit->text(); - QString TabName; - if (phase==0) { - TabName.append(QObject::tr("Flight Mode 0 (Default)")); - } else { - TabName.append(QObject::tr("FM %1").arg(phase)); - } - - if (!PhaseName.isEmpty()) { - TabName.append(" ("); - TabName.append(PhaseName); - TabName.append(")"); - } - ui->phases->setTabText(phase,TabName); - int length=lineEdit->maxLength(); - strncpy(g_model.phaseData[phase].name, lineEdit->text().toAscii(), length); - updateSettings(); -} - -void ModelEdit::phaseSwitch_currentIndexChanged() -{ - QComboBox *comboBox = qobject_cast(sender()); - int phase = comboBox->objectName().mid(5,1).toInt(); - g_model.phaseData[phase].swtch = RawSwitch(comboBox->itemData(comboBox->currentIndex()).toInt()); - updateSettings(); -} - -void ModelEdit::phaseFadeIn_editingFinished() -{ - QDoubleSpinBox *spinBox = qobject_cast(sender()); - int phase = spinBox->objectName().mid(5,1).toInt(); - int scale=GetEepromInterface()->getCapability(SlowScale); - g_model.phaseData[phase].fadeIn = round(spinBox->value()*scale); - updateSettings(); -} - -void ModelEdit::phaseFadeOut_editingFinished() -{ - QDoubleSpinBox *spinBox = qobject_cast(sender()); - int phase = spinBox->objectName().mid(5,1).toInt(); - int scale=GetEepromInterface()->getCapability(SlowScale); - g_model.phaseData[phase].fadeOut = round(spinBox->value()*scale); - updateSettings(); -} - -void ModelEdit::on_timer1ModeCB_currentIndexChanged(int index) -{ - g_model.timers[0].mode = TimerMode(ui->timer1ModeCB->itemData(index).toInt()); - updateSettings(); -} - -void ModelEdit::on_timer1DirCB_currentIndexChanged(int index) -{ - g_model.timers[0].dir = index; - updateSettings(); -} - -void ModelEdit::on_timer1ValTE_editingFinished() -{ - g_model.timers[0].val = ui->timer1ValTE->time().minute()*60 + ui->timer1ValTE->time().second(); - updateSettings(); -} - -void ModelEdit::on_timer1ModeBCB_currentIndexChanged(int index) -{ - g_model.timers[0].modeB = ui->timer1ModeBCB->itemData(index).toInt(); - updateSettings(); -} - -void ModelEdit::on_timer2ModeCB_currentIndexChanged(int index) -{ - g_model.timers[1].mode = TimerMode(ui->timer2ModeCB->itemData(index).toInt()); - updateSettings(); -} - -void ModelEdit::on_timer2DirCB_currentIndexChanged(int index) -{ - g_model.timers[1].dir = index; - updateSettings(); -} - -void ModelEdit::on_timer2ValTE_editingFinished() -{ - g_model.timers[1].val = ui->timer2ValTE->time().minute()*60 + ui->timer2ValTE->time().second(); - updateSettings(); -} - -void ModelEdit::on_timer2ModeBCB_currentIndexChanged(int index) -{ - g_model.timers[1].modeB = ui->timer2ModeBCB->itemData(index).toInt(); - updateSettings(); -} - -void ModelEdit::on_trimIncCB_currentIndexChanged(int index) -{ - g_model.trimInc = index; - updateSettings(); -} - -void ModelEdit::on_ttraceCB_currentIndexChanged(int index) -{ - g_model.thrTraceSrc = index; - updateSettings(); -} - -void ModelEdit::on_pulsePolCB_currentIndexChanged(int index) -{ - g_model.moduleData[0].ppmPulsePol = index; - updateSettings(); -} - -void ModelEdit::on_pulsePolCB_2_currentIndexChanged(int index) -{ - g_model.moduleData[1].ppmPulsePol = index; - updateSettings(); -} - -void ModelEdit::on_pulsePolCB_3_currentIndexChanged(int index) -{ - g_model.moduleData[2].ppmPulsePol = index; - updateSettings(); -} - -void ModelEdit::on_protocolCB_currentIndexChanged(int index) -{ - if (!protocolEditLock) { - protocolEditLock=true; - - g_model.moduleData[0].protocol=(Protocol)ui->protocolCB->itemData(index).toInt(); - int protocol=g_model.moduleData[0].protocol; - // g_model.protocol = (Protocol)index; - if (protocol==PXX_XJT_D8 || protocol==OFF) { - ui->FSGB_1->hide(); - } else { - ui->fsm1CB->setCurrentIndex(g_model.moduleData[0].failsafeMode); - on_fsm1CB_currentIndexChanged(g_model.moduleData[0].failsafeMode); - ui->FSGB_1->show(); - } - updateSettings(); - - ui->ppmDelaySB->setEnabled(!protocol); - ui->numChannelsSB->setEnabled(!protocol); - - if (GetEepromInterface()->getCapability(HasPPMStart)) { - ui->numChannelsSB->setSingleStep(1); - } else { - ui->numChannelsSB->setSingleStep(2); - } - - switch (protocol) { - case OFF: - ui->label_PPM->hide(); - ui->ppmDelaySB->hide(); - ui->label_PPMCH->hide(); - ui->label_pulsePol->hide(); - ui->pulsePolCB->hide(); - ui->numChannelsSB->hide(); - ui->label_ppmFrameLength->hide(); - ui->ppmFrameLengthDSB->hide(); - ui->label_DSM->hide(); - ui->DSM_Type->hide(); - ui->label_PXX->hide(); - ui->pxxRxNum->hide(); - ui->label_numChannelsStart->hide(); - ui->numChannelsStart->hide(); - break; - case PXX_XJT_X16: - case PXX_XJT_D8: - case PXX_XJT_LR12: - case PXX_DJT: - ui->label_PPM->hide(); - ui->ppmDelaySB->hide(); - ui->ppmDelaySB->setEnabled(false); - ui->label_PPMCH->show(); - ui->label_pulsePol->hide(); - ui->pulsePolCB->hide(); - ui->numChannelsSB->show(); - ui->numChannelsSB->setEnabled(true); - ui->label_ppmFrameLength->hide(); - ui->ppmFrameLengthDSB->hide(); - ui->ppmFrameLengthDSB->setEnabled(false); - ui->label_DSM->hide(); - ui->DSM_Type->hide(); - ui->DSM_Type->setEnabled(false); - ui->label_PXX->show(); - ui->pxxRxNum->setMinimum(0); - ui->pxxRxNum->show(); - ui->pxxRxNum->setEnabled(true); - ui->pxxRxNum->setValue((g_model.moduleData[0].channelsCount-8)/2+1); - ui->label_numChannelsStart->show(); - ui->numChannelsStart->show(); - ui->numChannelsStart->setValue(g_model.moduleData[0].channelsStart+1); - ui->numChannelsSB->setMinimum(g_model.moduleData[0].channelsStart+4); - ui->numChannelsSB->setValue(g_model.moduleData[0].channelsStart+g_model.moduleData[0].channelsCount); - break; - case LP45: - case DSM2: - case DSMX: - ui->label_pulsePol->hide(); - ui->pulsePolCB->hide(); - ui->label_PPM->hide(); - ui->ppmDelaySB->hide(); - ui->ppmDelaySB->setEnabled(false); - ui->label_PPMCH->hide(); - ui->label_numChannelsStart->hide(); - ui->numChannelsStart->hide(); - ui->numChannelsSB->hide(); - ui->numChannelsSB->setEnabled(false); - ui->label_ppmFrameLength->hide(); - ui->ppmFrameLengthDSB->hide(); - ui->ppmFrameLengthDSB->setEnabled(false); - if (!GetEepromInterface()->getCapability(DSM2Indexes)) { - ui->label_PXX->hide(); - ui->pxxRxNum->hide(); - ui->pxxRxNum->setEnabled(false); - } - else { - ui->pxxRxNum->setMinimum(0); - ui->pxxRxNum->setValue(g_model.modelId); - ui->label_PXX->show(); - ui->pxxRxNum->show(); - ui->pxxRxNum->setEnabled(true); - } - ui->DSM_Type->setEnabled(false); - ui->label_DSM->hide(); - ui->DSM_Type->hide(); - break; - default: - if (GetEepromInterface()->getCapability(HasPPMStart)) { - ui->label_numChannelsStart->show(); - ui->numChannelsStart->show(); - } - else { - ui->label_numChannelsStart->hide(); - ui->numChannelsStart->hide(); - } - ui->numChannelsStart->setValue(g_model.moduleData[0].channelsStart+1); - ui->numChannelsSB->setMinimum(g_model.moduleData[0].channelsStart+4); - ui->numChannelsSB->setValue(g_model.moduleData[0].channelsStart + g_model.moduleData[0].channelsCount); - ui->label_pulsePol->show(); - ui->pulsePolCB->show(); - ui->label_DSM->hide(); - ui->DSM_Type->hide(); - ui->DSM_Type->setEnabled(false); - ui->label_PXX->hide(); - ui->pxxRxNum->hide(); - ui->pxxRxNum->setEnabled(false); - ui->label_PPM->show(); - ui->ppmDelaySB->show(); - ui->ppmDelaySB->setEnabled(true); - ui->label_PPMCH->show(); - ui->numChannelsSB->show(); - ui->numChannelsSB->setEnabled(true); - ui->ppmFrameLengthDSB->setEnabled(true); - ui->ppmFrameLengthDSB->setMinimum(g_model.moduleData[0].channelsCount*(g_model.extendedLimits ? 2.250 :2)+3.5); - if (GetEepromInterface()->getCapability(PPMExtCtrl)) { - ui->ppmFrameLengthDSB->show(); - ui->label_ppmFrameLength->show(); - } - - break; - } - protocolEditLock=false; - } -} - -void ModelEdit::on_protocolCB_2_currentIndexChanged(int index) -{ - if (!protocol2EditLock) { - protocol2EditLock=true; - - g_model.moduleData[1].protocol=(Protocol)ui->protocolCB_2->itemData(index).toInt(); - int protocol=g_model.moduleData[1].protocol; - if (protocol==PXX_XJT_X16 || protocol==PXX_XJT_LR12) { - ui->FSGB_2->show(); - ui->fsm2CB->setCurrentIndex(g_model.moduleData[1].failsafeMode); - on_fsm2CB_currentIndexChanged(g_model.moduleData[1].failsafeMode); - } else { - ui->FSGB_2->hide(); - } - // g_model.protocol = (Protocol)index; - updateSettings(); - - ui->ppmDelaySB_2->setEnabled(!protocol); - ui->numChannelsSB_2->setEnabled(!protocol); - - if (GetEepromInterface()->getCapability(HasPPMStart)) { - ui->numChannelsSB_2->setSingleStep(1); - } else { - ui->numChannelsSB_2->setSingleStep(2); - } - - switch (protocol) { - case OFF: - ui->label_PPM_2->hide(); - ui->ppmDelaySB_2->hide(); - ui->label_PPMCH_2->hide(); - ui->label_pulsePol_2->hide(); - ui->pulsePolCB_2->hide(); - ui->numChannelsSB_2->hide(); - ui->label_ppmFrameLength_2->hide(); - ui->ppmFrameLengthDSB_2->hide(); - ui->label_DSM_2->hide(); - ui->DSM_Type_2->hide(); - ui->label_PXX_2->hide(); - ui->pxxRxNum_2->hide(); - ui->label_numChannelsStart_2->hide(); - ui->numChannelsStart_2->hide(); - break; - case PXX_XJT_X16: - case PXX_XJT_D8: - case PXX_XJT_LR12: - case PXX_DJT: - ui->label_PPM_2->hide(); - ui->ppmDelaySB_2->hide(); - ui->ppmDelaySB_2->setEnabled(false); - ui->label_PPMCH_2->show(); - ui->label_pulsePol_2->hide(); - ui->pulsePolCB_2->hide(); - ui->numChannelsSB_2->show(); - ui->numChannelsSB_2->setEnabled(true); - ui->label_ppmFrameLength_2->hide(); - ui->ppmFrameLengthDSB_2->hide(); - ui->ppmFrameLengthDSB_2->setEnabled(false); - ui->label_DSM_2->hide(); - ui->DSM_Type_2->hide(); - ui->DSM_Type_2->setEnabled(false); - ui->label_PXX_2->show(); - ui->pxxRxNum_2->setMinimum(0); - ui->pxxRxNum_2->show(); - ui->pxxRxNum_2->setEnabled(true); - ui->pxxRxNum_2->setValue(g_model.modelId); - ui->label_numChannelsStart_2->show(); - ui->numChannelsStart_2->show(); - ui->numChannelsStart_2->setValue(g_model.moduleData[1].channelsStart+1); - ui->numChannelsSB_2->setMinimum(g_model.moduleData[1].channelsStart+4); - ui->numChannelsSB_2->setValue(g_model.moduleData[1].channelsStart+g_model.moduleData[1].channelsCount); - break; - case LP45: - case DSM2: - case DSMX: - ui->label_pulsePol_2->hide(); - ui->pulsePolCB_2->hide(); - ui->label_PPM_2->hide(); - ui->ppmDelaySB_2->hide(); - ui->ppmDelaySB_2->setEnabled(false); - ui->label_PPMCH_2->hide(); - ui->numChannelsSB_2->hide(); - ui->numChannelsSB_2->setEnabled(false); - ui->label_ppmFrameLength_2->hide(); - ui->ppmFrameLengthDSB_2->hide(); - ui->ppmFrameLengthDSB_2->setEnabled(false); - if (!GetEepromInterface()->getCapability(DSM2Indexes)) { - ui->label_PXX_2->hide(); - ui->pxxRxNum_2->hide(); - ui->pxxRxNum_2->setEnabled(false); - } else { - ui->pxxRxNum_2->setMinimum(0); - ui->pxxRxNum_2->setValue(g_model.modelId); - ui->label_PXX_2->show(); - ui->pxxRxNum_2->show(); - ui->pxxRxNum_2->setEnabled(true); - } - ui->DSM_Type_2->setEnabled(false); - ui->label_DSM_2->hide(); - ui->DSM_Type_2->hide(); - break; - default: - if (GetEepromInterface()->getCapability(HasPPMStart)) { - ui->label_numChannelsStart_2->show(); - ui->numChannelsStart_2->show(); - } else { - ui->label_numChannelsStart_2->hide(); - ui->numChannelsStart_2->hide(); - } - ui->numChannelsStart_2->setValue(g_model.moduleData[1].channelsStart+1); - ui->numChannelsSB_2->setMinimum(g_model.moduleData[1].channelsStart+4); - ui->numChannelsSB_2->setValue(g_model.moduleData[1].channelsStart+g_model.moduleData[1].channelsCount); - ui->label_pulsePol_2->show(); - ui->pulsePolCB_2->show(); - ui->pulsePolCB_2->setCurrentIndex(g_model.moduleData[1].ppmPulsePol); - ui->label_DSM_2->hide(); - ui->DSM_Type_2->hide(); - ui->DSM_Type_2->setEnabled(false); - ui->label_PXX_2->hide(); - ui->pxxRxNum_2->hide(); - ui->pxxRxNum_2->setEnabled(false); - ui->label_PPM_2->show(); - ui->ppmDelaySB_2->show(); - ui->ppmDelaySB_2->setEnabled(true); - ui->ppmDelaySB_2->setValue(g_model.moduleData[1].ppmDelay); - ui->label_PPMCH_2->show(); - ui->numChannelsSB_2->show(); - ui->numChannelsSB_2->setEnabled(true); - ui->ppmFrameLengthDSB_2->setEnabled(true); - ui->ppmFrameLengthDSB_2->setMinimum(g_model.moduleData[1].channelsCount*(g_model.extendedLimits ? 2.250 :2)+3.5); - if (GetEepromInterface()->getCapability(PPMExtCtrl)) { - ui->ppmFrameLengthDSB_2->show(); - ui->label_ppmFrameLength_2->show(); - ui->ppmFrameLengthDSB_2->setValue(g_model.moduleData[1].ppmFrameLength/2.0+22.5); - } - break; - } - protocol2EditLock=false; - } -} - -void ModelEdit::on_protocolCB_3_currentIndexChanged(int index) -{ - if (!trainerEditLock) { - trainerEditLock=true; - - g_model.moduleData[2].protocol=ui->protocolCB_3->currentIndex(); - g_model.trainerMode=ui->protocolCB_3->currentIndex(); - updateSettings(); - switch (index) { - case 0: - ui->label_PPM_3->hide(); - ui->ppmDelaySB_3->hide(); - ui->label_PPMCH_3->hide(); - ui->label_pulsePol_3->hide(); - ui->pulsePolCB_3->hide(); - ui->numChannelsSB_3->hide(); - ui->label_ppmFrameLength_3->hide(); - ui->ppmFrameLengthDSB_3->hide(); - ui->label_numChannelsStart_3->hide(); - ui->numChannelsStart_3->hide(); - break; - default: - ui->label_PPM_3->show(); - ui->ppmDelaySB_3->show(); - ui->label_PPMCH_3->show(); - ui->label_pulsePol_3->show(); - ui->pulsePolCB_3->show(); - ui->numChannelsSB_3->show(); - ui->label_ppmFrameLength_3->show(); - ui->ppmFrameLengthDSB_3->show(); - ui->label_numChannelsStart_3->show(); - ui->numChannelsStart_3->show(); - ui->numChannelsStart_3->setValue(g_model.moduleData[2].channelsStart+1); - ui->numChannelsSB_3->setMinimum(g_model.moduleData[2].channelsStart+4); - ui->numChannelsSB_3->setValue(g_model.moduleData[2].channelsStart+g_model.moduleData[2].channelsCount); - ui->pulsePolCB_3->setCurrentIndex(g_model.moduleData[2].ppmPulsePol); - ui->ppmDelaySB_3->setValue(g_model.moduleData[2].ppmDelay); - ui->ppmFrameLengthDSB_3->setMinimum(g_model.moduleData[2].channelsCount*(g_model.extendedLimits ? 2.250 :2)+3.5); - if (GetEepromInterface()->getCapability(PPMExtCtrl)) { - ui->ppmFrameLengthDSB_3->show(); - ui->label_ppmFrameLength_3->show(); - ui->ppmFrameLengthDSB_3->setValue(g_model.moduleData[2].ppmFrameLength/2.0+22.5); - } - break; - } - trainerEditLock=false; - } -} - - -void ModelEdit::on_numChannelsSB_editingFinished() -{ - // TODO only accept valid values - g_model.moduleData[0].channelsCount = 1+ui->numChannelsSB->value()-ui->numChannelsStart->value(); - ui->ppmFrameLengthDSB->setMinimum(g_model.moduleData[0].channelsCount*(g_model.extendedLimits ? 2.250 :2)+3.5); - updateSettings(); -} - -void ModelEdit::on_numChannelsSB_2_editingFinished() -{ - // TODO only accept valid values - g_model.moduleData[1].channelsCount = 1+ui->numChannelsSB_2->value()-ui->numChannelsStart_2->value(); - ui->ppmFrameLengthDSB_2->setMinimum(g_model.moduleData[1].channelsCount*(g_model.extendedLimits ? 2.250 :2.0)+3.5); - updateSettings(); -} - -void ModelEdit::on_numChannelsSB_3_editingFinished() -{ - // TODO only accept valid values - g_model.moduleData[2].channelsCount = 1+ui->numChannelsSB_3->value()-ui->numChannelsStart_3->value(); - ui->ppmFrameLengthDSB_3->setMinimum(g_model.moduleData[2].channelsCount*(g_model.extendedLimits ? 2.250 :2)+3.5); - updateSettings(); -} - -void ModelEdit::on_numChannelsStart_editingFinished() -{ - // TODO only accept valid values - g_model.moduleData[0].channelsStart = ui->numChannelsStart->value()-1; - ui->numChannelsSB->setMinimum(g_model.moduleData[0].channelsStart+4); - ui->numChannelsSB->setValue(g_model.moduleData[0].channelsStart+g_model.moduleData[0].channelsCount); - updateSettings(); -} - -void ModelEdit::on_numChannelsStart_2_editingFinished() -{ - // TODO only accept valid values - g_model.moduleData[1].channelsStart = ui->numChannelsStart_2->value()-1; - ui->numChannelsSB_2->setMinimum(g_model.moduleData[1].channelsStart+4); - ui->numChannelsSB_2->setValue(g_model.moduleData[1].channelsStart+g_model.moduleData[1].channelsCount); - updateSettings(); -} - -void ModelEdit::on_numChannelsStart_3_editingFinished() -{ - // TODO only accept valid values - g_model.moduleData[2].channelsStart = ui->numChannelsStart_3->value()-1; - ui->numChannelsSB_3->setMinimum(g_model.moduleData[2].channelsStart+4); - ui->numChannelsSB_3->setValue(g_model.moduleData[2].channelsStart+g_model.moduleData[2].channelsCount); - updateSettings(); -} - -void ModelEdit::on_ppmDelaySB_editingFinished() -{ - if(protocolEditLock) return; - // TODO only accept valid values - g_model.moduleData[0].ppmDelay = ui->ppmDelaySB->value(); - updateSettings(); -} - -void ModelEdit::on_ppmDelaySB_2_editingFinished() -{ - if(protocol2EditLock) return; - // TODO only accept valid values - g_model.moduleData[1].ppmDelay = ui->ppmDelaySB_2->value(); - updateSettings(); -} - -void ModelEdit::on_ppmDelaySB_3_editingFinished() -{ - if(trainerEditLock) return; - // TODO only accept valid values - g_model.moduleData[2].ppmDelay = ui->ppmDelaySB_3->value(); - updateSettings(); -} - -void ModelEdit::on_DSM_Type_currentIndexChanged(int index) -{ - if(protocolEditLock) return; - // g_model.moduleData[0].channelsCount = (index*2)+8; - updateSettings(); -} - -void ModelEdit::on_DSM_Type_2_currentIndexChanged(int index) -{ - if(protocol2EditLock) return; - // g_model.moduleData[1].channelsCount = (index*2)+8; - updateSettings(); -} - -void ModelEdit::on_pxxRxNum_editingFinished() -{ - if(protocolEditLock) - return; - - if (!GetEepromInterface()->getCapability(DSM2Indexes)) { - // g_model.moduleData[0].channelsCount = (ui->pxxRxNum->value()-1)*2+8; - } else { - g_model.modelId = ui->pxxRxNum->value(); - } - updateSettings(); -} - -void ModelEdit::on_pxxRxNum_2_editingFinished() -{ - if(protocol2EditLock) - return; - - /* if (!GetEepromInterface()->getCapability(DSM2Indexes)) { - g_model.moduleData[1].channelsCount = (ui->pxxRxNum_2->value()-1)*2+8; - } */ - updateSettings(); -} - -void ModelEdit::on_ppmFrameLengthDSB_editingFinished() -{ - g_model.moduleData[0].ppmFrameLength = (ui->ppmFrameLengthDSB->value()-22.5)/0.5; - updateSettings(); -} - -void ModelEdit::on_ppmFrameLengthDSB_2_editingFinished() -{ - g_model.moduleData[1].ppmFrameLength = (ui->ppmFrameLengthDSB_2->value()-22.5)/0.5; - updateSettings(); -} - -void ModelEdit::on_ppmFrameLengthDSB_3_editingFinished() -{ - g_model.moduleData[2].ppmFrameLength = (ui->ppmFrameLengthDSB_3->value()-22.5)/0.5; - updateSettings(); -} - -void ModelEdit::on_fsm1CB_currentIndexChanged(int index) -{ - QSpinBox * fssb[] = { ui->fsm1SB_1, ui->fsm1SB_2,ui->fsm1SB_3,ui->fsm1SB_4,ui->fsm1SB_5,ui->fsm1SB_6,ui->fsm1SB_7,ui->fsm1SB_8, - ui->fsm1SB_9, ui->fsm1SB_10,ui->fsm1SB_11,ui->fsm1SB_12,ui->fsm1SB_13,ui->fsm1SB_14,ui->fsm1SB_15,ui->fsm1SB_16, NULL }; - QSlider * fssld[] = { ui->fsm1SL_1, ui->fsm1SL_2,ui->fsm1SL_3,ui->fsm1SL_4,ui->fsm1SL_5,ui->fsm1SL_6,ui->fsm1SL_7,ui->fsm1SL_8, - ui->fsm1SL_9, ui->fsm1SL_10,ui->fsm1SL_11,ui->fsm1SL_12,ui->fsm1SL_13,ui->fsm1SL_14,ui->fsm1SL_15,ui->fsm1SL_16, NULL }; - g_model.moduleData[0].failsafeMode=index; - for (int i=0; fssb[i]; i++) { - if (index==1) { - fssb[i]->setEnabled(true); - fssld[i]->setEnabled(true); - } else { - fssb[i]->setDisabled(true); - fssld[i]->setDisabled(true); - } - } - updateSettings(); -} - -void ModelEdit::on_fsm2CB_currentIndexChanged(int index) -{ - QSpinBox * fssb[] = { ui->fsm2SB_1, ui->fsm2SB_2,ui->fsm2SB_3,ui->fsm2SB_4,ui->fsm2SB_5,ui->fsm2SB_6,ui->fsm2SB_7,ui->fsm2SB_8, - ui->fsm2SB_9, ui->fsm2SB_10,ui->fsm2SB_11,ui->fsm2SB_12,ui->fsm2SB_13,ui->fsm2SB_14,ui->fsm2SB_15,ui->fsm2SB_16, NULL }; - QSlider * fssld[] = { ui->fsm2SL_1, ui->fsm2SL_2,ui->fsm2SL_3,ui->fsm2SL_4,ui->fsm2SL_5,ui->fsm2SL_6,ui->fsm2SL_7,ui->fsm2SL_8, - ui->fsm2SL_9, ui->fsm2SL_10,ui->fsm2SL_11,ui->fsm2SL_12,ui->fsm2SL_13,ui->fsm2SL_14,ui->fsm2SL_15,ui->fsm2SL_16, NULL }; - g_model.moduleData[1].failsafeMode=index; - for (int i=0; fssb[i]; i++) { - if (index==1) { - fssb[i]->setEnabled(true); - fssld[i]->setEnabled(true); - } else { - fssb[i]->setDisabled(true); - fssld[i]->setDisabled(true); - } - } - updateSettings(); -} - -void ModelEdit::on_instantTrim_CB_currentIndexChanged(int index) -{ - if(switchEditLock) return; - bool found=false; - for (int i=0; i< C9X_MAX_CUSTOM_FUNCTIONS; i++) { - if (g_model.funcSw[i].func==FuncInstantTrim) { - g_model.funcSw[i].swtch = RawSwitch(ui->instantTrim_CB->itemData(ui->instantTrim_CB->currentIndex()).toInt()); - found=true; - } - } - if (found==false) { - for (int i=0; i< C9X_MAX_CUSTOM_FUNCTIONS; i++) { - if (g_model.funcSw[i].swtch==RawSwitch()) { - g_model.funcSw[i].swtch = RawSwitch(ui->instantTrim_CB->itemData(ui->instantTrim_CB->currentIndex()).toInt()); - g_model.funcSw[i].func = FuncInstantTrim; - break; - } - } - } - updateSettings(); -} - -void ModelEdit::on_a1UnitCB_currentIndexChanged(int index) { - float a1ratio; - g_model.frsky.channels[0].type=index; - switch (index) { - case 0: - case 1: - case 2: - ui->a1RatioSB->setDecimals(1); - ui->a1RatioSB->setMaximum(25.5*GetEepromInterface()->getCapability(TelemetryMaxMultiplier)); - a1ratio=(g_model.frsky.channels[0].ratio<a1RatioSB->setDecimals(0); - ui->a1RatioSB->setMaximum(255*GetEepromInterface()->getCapability(TelemetryMaxMultiplier)); - a1ratio=(g_model.frsky.channels[0].ratio<a1RatioSB->setValue(a1ratio); - updateA1Fields(); - updateSettings(); -} - -void ModelEdit::on_a1RatioSB_valueChanged() -{ - if (telemetryLock) return; - if (g_model.frsky.channels[0].type==0 || g_model.frsky.channels[0].type==1 || g_model.frsky.channels[0].type==2) { - g_model.frsky.channels[0].multiplier = findmult(ui->a1RatioSB->value(), 25.5); - float singlestep =(1<a1RatioSB->setSingleStep(singlestep); - ui->a1RatioSB->setValue(round(ui->a1RatioSB->value()/singlestep)*singlestep); - telemetryLock=false; - } else { - g_model.frsky.channels[0].multiplier = findmult(ui->a1RatioSB->value(), 255); - float singlestep =(1<a1RatioSB->setSingleStep(singlestep); - ui->a1RatioSB->setValue(round(ui->a1RatioSB->value()/singlestep)*singlestep); - telemetryLock=false; - } -} - -void ModelEdit::on_a1RatioSB_editingFinished() -{ - float a1ratio, a1calib, a11value,a12value; - if (telemetryLock) return; - if (g_model.frsky.channels[0].type==0 || g_model.frsky.channels[0].type==1 || g_model.frsky.channels[0].type==2) { - g_model.frsky.channels[0].multiplier = findmult(ui->a1RatioSB->value(), 25.5); - ui->a1CalibSB->setSingleStep((1<a11ValueSB->setSingleStep((1<a12ValueSB->setSingleStep((1<a1RatioSB->value()*10))/(1 <a1RatioSB->value(), 255); - ui->a1CalibSB->setSingleStep(1<a11ValueSB->setSingleStep(1<a12ValueSB->setSingleStep(1<a1RatioSB->value()/(1 << g_model.frsky.channels[0].multiplier)); - } - ui->a1CalibSB->setMaximum((ui->a1RatioSB->value()*127)/255); - ui->a1CalibSB->setMinimum((ui->a1RatioSB->value()*-128)/255); - ui->a11ValueSB->setMaximum(ui->a1RatioSB->value()); - ui->a12ValueSB->setMaximum(ui->a1RatioSB->value()); - repaint(); - a1ratio=g_model.frsky.channels[0].ratio * (1 << g_model.frsky.channels[0].multiplier); - a1calib=ui->a1CalibSB->value(); - a11value=ui->a11ValueSB->value(); - a12value=ui->a12ValueSB->value(); - if (g_model.frsky.channels[0].type==0) { - a1calib*=10; - a11value*=10; - a12value*=10; - } - if (a1calib>0) { - if (a1calib>((a1ratio*127)/255)) { - g_model.frsky.channels[0].offset=127; - } else { - g_model.frsky.channels[0].offset=round(a1calib*255/a1ratio); - } - } - if (a1calib<0) { - if (a1calib<((a1ratio*-128)/255)) { - g_model.frsky.channels[0].offset=-128; - } else { - g_model.frsky.channels[0].offset=round(a1calib*255/a1ratio); - } - } - g_model.frsky.channels[0].alarms[0].value=round((a11value*255-g_model.frsky.channels[0].offset*(g_model.frsky.channels[0].ratio<a1CalibSB->value()/a1ratio)); - a1calib=a1ratio*g_model.frsky.channels[0].offset/255.0; - a11value=ui->a11ValueSB->value(); - a12value=ui->a12ValueSB->value(); - if (a11value(a1ratio+a1calib)) { - a11value=a1ratio+a1calib; - } - if (a12value(a1ratio+a1calib)) { - a12value=a1ratio+a1calib; - } - g_model.frsky.channels[0].alarms[0].value=round(((a11value-a1calib)*255)/a1ratio); - g_model.frsky.channels[0].alarms[1].value=round(((a12value-a1calib)*255)/a1ratio); - } else { - g_model.frsky.channels[0].offset=0; - g_model.frsky.channels[0].alarms[0].value=0; - g_model.frsky.channels[0].alarms[1].value=0; - } - updateA1Fields(); - telBarUpdate(); - updateSettings(); -} - -void ModelEdit::on_a11LevelCB_currentIndexChanged(int index) -{ - g_model.frsky.channels[0].alarms[0].level = index; - updateSettings(); -} - -void ModelEdit::on_frskyUnitsCB_currentIndexChanged(int index) -{ - g_model.frsky.imperial=index; - updateSettings(); -} - -void ModelEdit::on_frskyBladesCB_currentIndexChanged(int index) -{ - g_model.frsky.blades=index; - updateSettings(); -} - -void ModelEdit::on_frskyCurrentCB_currentIndexChanged(int index) -{ - g_model.frsky.currentSource=index; - updateSettings(); -} - -void ModelEdit::on_frskyVoltCB_currentIndexChanged(int index) -{ - g_model.frsky.voltsSource=index; - updateSettings(); -} - -void ModelEdit::on_frskyProtoCB_currentIndexChanged(int index) -{ - if (telemetryLock) return; - int bindex[12]; - telemetryLock=true; - for (int i=0; i<12; i++) { - bindex[i]=barsCB[i]->currentIndex(); - g_model.frsky.usrProto=index; - populateCustomScreenFieldCB(barsCB[i], bindex[i], false, g_model.frsky.usrProto); - } - if (!GetEepromInterface()->getCapability(TelemetryCSFields)) { - ui->groupBox_5->hide(); - } else { - for (int screen=0; screen<2;screen++) { - for (int rows=0; rows<4; rows++) { - for (int cols=0; cols<3; cols++) { - int index=screen*12+cols*4+rows; - populateCustomScreenFieldCB(csf[index], g_model.frsky.screens[screen].body.lines[rows].source[cols], (rows<4), g_model.frsky.usrProto); - } - } - } - } - telemetryLock=false; - if (index==0) { - for (int i=0; i<12; i++) { - if (bindex[i]>2) { - barsCB[i]->setCurrentIndex(0); - } else { - barsCB[i]->setCurrentIndex(bindex[i]); - } - } - } else if (index==2) { - for (int i=0; i<12; i++) { - if (bindex[i]>3) { - barsCB[i]->setCurrentIndex(0); - } else { - barsCB[i]->setCurrentIndex(bindex[i]); - } - } - } else { - for (int i=0; i<12; i++) { - barsCB[i]->setCurrentIndex(bindex[i]); - } - } - updateSettings(); -} - -void ModelEdit::on_a11GreaterCB_currentIndexChanged(int index) -{ - g_model.frsky.channels[0].alarms[0].greater = index; - updateSettings(); -} - -void ModelEdit::on_a11ValueSB_editingFinished() -{ - float a1ratio, a1calib, a11value; - a1ratio=g_model.frsky.channels[0].ratio<a11ValueSB->value(); - if (g_model.frsky.channels[0].type==0) { - a1ratio/=10; - } - if (a11value<((a1calib*a1ratio)/255)) { - g_model.frsky.channels[0].alarms[0].value=0; - } else if (a11value>(a1ratio+(a1calib*a1ratio)/255)) { - g_model.frsky.channels[0].alarms[0].value=255; - } else { - g_model.frsky.channels[0].alarms[0].value = round((a11value-((a1calib*a1ratio)/255))/a1ratio*255); - } - updateA1Fields(); - updateSettings(); -} - -void ModelEdit::on_a12LevelCB_currentIndexChanged(int index) -{ - g_model.frsky.channels[0].alarms[1].level = index; - updateSettings(); -} - -void ModelEdit::on_a12GreaterCB_currentIndexChanged(int index) -{ - g_model.frsky.channels[0].alarms[1].greater = index; - updateSettings(); -} - -void ModelEdit::on_a12ValueSB_editingFinished() -{ - float a1ratio, a1calib, a12value; - a1ratio=g_model.frsky.channels[0].ratio<a12ValueSB->value(); - if (g_model.frsky.channels[0].type==0) { - a1ratio/=10; - } - if (a12value<((a1calib*a1ratio)/255)) { - g_model.frsky.channels[0].alarms[1].value=0; - } else if (a12value>(a1ratio+(a1calib*a1ratio)/255)) { - g_model.frsky.channels[0].alarms[1].value=255; - } else { - g_model.frsky.channels[0].alarms[1].value = round((a12value-((a1calib*a1ratio)/255))/a1ratio*255); - } - updateA1Fields(); - updateSettings(); -} - -void ModelEdit::on_a2UnitCB_currentIndexChanged(int index) { - float a2ratio; - g_model.frsky.channels[1].type=index; - switch (index) { - case 0: - case 1: - case 2: - ui->a2RatioSB->setDecimals(1); - ui->a2RatioSB->setMaximum(25.5*GetEepromInterface()->getCapability(TelemetryMaxMultiplier)); - a2ratio=(g_model.frsky.channels[1].ratio<a2RatioSB->setDecimals(0); - ui->a2RatioSB->setMaximum(255*GetEepromInterface()->getCapability(TelemetryMaxMultiplier)); - a2ratio=g_model.frsky.channels[1].ratio<a2RatioSB->setValue(a2ratio); - updateA2Fields(); - updateSettings(); -} - -void ModelEdit::on_a2RatioSB_valueChanged() -{ - if (telemetryLock) return; - if (g_model.frsky.channels[1].type==0 || g_model.frsky.channels[1].type==1 || g_model.frsky.channels[1].type==2) { - g_model.frsky.channels[1].multiplier = findmult(ui->a2RatioSB->value(), 25.5); - float singlestep =(1<a2RatioSB->setSingleStep(singlestep); - ui->a2RatioSB->setValue(round(ui->a2RatioSB->value()/singlestep)*singlestep); - telemetryLock=false; - } else { - g_model.frsky.channels[1].multiplier = findmult(ui->a2RatioSB->value(), 255); - float singlestep =(1<a2RatioSB->setSingleStep(singlestep); - ui->a2RatioSB->setValue(round(ui->a2RatioSB->value()/singlestep)*singlestep); - telemetryLock=false; - } -} - -void ModelEdit::on_a2RatioSB_editingFinished() -{ - float a2ratio, a2calib, a21value,a22value; - if (telemetryLock) return; - if (g_model.frsky.channels[1].type==0 || g_model.frsky.channels[1].type==1 || g_model.frsky.channels[1].type==2) { - g_model.frsky.channels[1].multiplier = findmult(ui->a2RatioSB->value(), 25.5); - ui->a2CalibSB->setSingleStep((1<a21ValueSB->setSingleStep((1<a22ValueSB->setSingleStep((1<a2RatioSB->value()*10))/(1 << g_model.frsky.channels[1].multiplier)); - } else { - g_model.frsky.channels[1].multiplier = findmult(ui->a2RatioSB->value(), 255); - ui->a2CalibSB->setSingleStep(1<a21ValueSB->setSingleStep(1<a22ValueSB->setSingleStep(1<a2RatioSB->value()/(1 << g_model.frsky.channels[1].multiplier)); - } - ui->a2CalibSB->setMaximum((ui->a2RatioSB->value()*127)/255); - ui->a2CalibSB->setMinimum((ui->a2RatioSB->value()*-128)/255); - ui->a21ValueSB->setMaximum(ui->a2RatioSB->value()); - ui->a22ValueSB->setMaximum(ui->a2RatioSB->value()); - repaint(); - a2ratio=g_model.frsky.channels[1].ratio * (1 << g_model.frsky.channels[1].multiplier); - a2calib=ui->a2CalibSB->value(); - a21value=ui->a21ValueSB->value(); - a22value=ui->a22ValueSB->value(); - if (g_model.frsky.channels[1].type==0 || g_model.frsky.channels[1].type==1 || g_model.frsky.channels[1].type==2) { - a2calib*=10; - a21value*=10; - a22value*=10; - } - if (a2calib>0) { - if (a2calib>((a2ratio*127)/255)) { - g_model.frsky.channels[1].offset=127; - } else { - g_model.frsky.channels[1].offset=round(a2calib*255/a2ratio); - } - } - if (a2calib<0) { - if (a2calib<((a2ratio*-128)/255)) { - g_model.frsky.channels[1].offset=-128; - } else { - g_model.frsky.channels[1].offset=round(a2calib*255/a2ratio); - } - } - g_model.frsky.channels[1].alarms[0].value=round((a21value*255-g_model.frsky.channels[1].offset*(g_model.frsky.channels[1].ratio<a2CalibSB->value()/a2ratio)); - a2calib=a2ratio*g_model.frsky.channels[1].offset/255.0; - a21value=ui->a21ValueSB->value(); - a22value=ui->a22ValueSB->value(); - if (a21value(a2ratio+a2calib)) { - a21value=a2ratio+a2calib; - } - if (a22value(a2ratio+a2calib)) { - a22value=a2ratio+a2calib; - } - g_model.frsky.channels[1].alarms[0].value=round(((a21value-a2calib)*255)/a2ratio); - g_model.frsky.channels[1].alarms[1].value=round(((a22value-a2calib)*255)/a2ratio); - } else { - g_model.frsky.channels[1].offset=0; - g_model.frsky.channels[1].alarms[0].value=0; - g_model.frsky.channels[1].alarms[1].value=0; - } - updateA2Fields(); - telBarUpdate(); - updateSettings(); -} - -void ModelEdit::on_a21LevelCB_currentIndexChanged(int index) -{ - g_model.frsky.channels[1].alarms[0].level = index; - updateSettings(); -} - -void ModelEdit::on_a21GreaterCB_currentIndexChanged(int index) -{ - g_model.frsky.channels[1].alarms[0].greater = index; - updateSettings(); -} - -void ModelEdit::on_a21ValueSB_editingFinished() -{ - float a2ratio, a2calib, a21value; - a2ratio=g_model.frsky.channels[1].ratio<a21ValueSB->value(); - if (g_model.frsky.channels[1].type==0) { - a2ratio/=10; - } - if (a21value<((a2calib*a2ratio)/255)) { - g_model.frsky.channels[1].alarms[0].value=0; - } else if (a21value>(a2ratio+(a2calib*a2ratio)/255)) { - g_model.frsky.channels[1].alarms[0].value=255; - } else { - g_model.frsky.channels[1].alarms[0].value = round((a21value-((a2calib*a2ratio)/255))/a2ratio*255); - } - updateA2Fields(); - updateSettings(); -} - -void ModelEdit::on_a22LevelCB_currentIndexChanged(int index) -{ - g_model.frsky.channels[1].alarms[1].level = index; - updateSettings(); -} - -void ModelEdit::on_a22GreaterCB_currentIndexChanged(int index) -{ - g_model.frsky.channels[1].alarms[1].greater = index; - updateSettings(); -} - -void ModelEdit::on_a22ValueSB_editingFinished() -{ - float a2ratio, a2calib, a22value; - a2ratio=g_model.frsky.channels[1].ratio<a22ValueSB->value(); - if (g_model.frsky.channels[1].type==0) { - a2ratio/=10; - } - if (a22value<((a2calib*a2ratio)/255)) { - g_model.frsky.channels[1].alarms[1].value=0; - } else if (a22value>(a2ratio+(a2calib*a2ratio)/255)) { - g_model.frsky.channels[1].alarms[1].value=255; - } else { - g_model.frsky.channels[1].alarms[1].value = round((a22value-((a2calib*a2ratio)/255))/a2ratio*255); - } - updateA2Fields(); - updateSettings(); -} - -void ModelEdit::on_rssiAlarm1CB_currentIndexChanged(int index) { - if (telemetryLock) return; - g_model.frsky.rssiAlarms[0].level=index; - updateSettings(); -} - -void ModelEdit::on_rssiAlarm2CB_currentIndexChanged(int index) { - if (telemetryLock) return; - g_model.frsky.rssiAlarms[1].level=index; - updateSettings(); -} - -void ModelEdit::on_rssiAlarm1SB_editingFinished() { - if (telemetryLock) return; - g_model.frsky.rssiAlarms[0].value=(ui->rssiAlarm1SB->value()); - updateSettings(); -} - -void ModelEdit::on_rssiAlarm2SB_editingFinished() { - if (telemetryLock) return; - g_model.frsky.rssiAlarms[1].value=(ui->rssiAlarm2SB->value()); - updateSettings(); -} - -void ModelEdit::on_AltitudeGPS_ChkB_toggled(bool checked) -{ - if (telemetryLock) return; - g_model.frsky.FrSkyGpsAlt = checked; - updateSettings(); - //AltitudeGPS_CB -} - -void ModelEdit::on_showNames_Ckb_toggled(bool checked) -{ - tabMixes(); -} -void ModelEdit::on_varioSourceCB_currentIndexChanged(int index) -{ - if (telemetryLock) return; - g_model.frsky.varioSource = index; - updateSettings(); -} - -void ModelEdit::on_varioLimitMin_DSB_editingFinished() -{ - if (telemetryLock) return; - g_model.frsky.varioMin= round(ui->varioLimitMin_DSB->value()+10); - updateSettings(); -} - -void ModelEdit::on_varioLimitMax_DSB_editingFinished() -{ - if (telemetryLock) return; - g_model.frsky.varioMax= round(ui->varioLimitMax_DSB->value()-10); - updateSettings(); -} - -void ModelEdit::on_varioLimitCenterMin_DSB_editingFinished() -{ - if (telemetryLock) return; - if (ui->varioLimitCenterMin_DSB->value()>ui->varioLimitCenterMax_DSB->value()) { - ui->varioLimitCenterMax_DSB->setValue(ui->varioLimitCenterMin_DSB->value()); - } - g_model.frsky.varioCenterMin= round((ui->varioLimitCenterMin_DSB->value()+0.5)*10); - updateSettings(); -} - -void ModelEdit::on_varioLimitMinOff_ChkB_toggled(bool checked) -{ - if (telemetryLock) return; - g_model.frsky.varioCenterMin = -16; - if (!checked) { - telemetryLock=true; - ui->varioLimitCenterMin_DSB->setValue(-2.0); - ui->varioLimitCenterMin_DSB->setEnabled(true); - telemetryLock=false; - } else { - ui->varioLimitCenterMin_DSB->setValue(-2.0); - ui->varioLimitCenterMin_DSB->setDisabled(true); - } - updateSettings(); -} - -void ModelEdit::on_varioLimitCenterMax_DSB_editingFinished() -{ - if (telemetryLock) return; - if (ui->varioLimitCenterMin_DSB->value()>ui->varioLimitCenterMax_DSB->value()) { - ui->varioLimitCenterMax_DSB->setValue(ui->varioLimitCenterMin_DSB->value()); - } - g_model.frsky.varioCenterMax= round((ui->varioLimitCenterMax_DSB->value()-0.5)*10); - updateSettings(); -} - -void ModelEdit::telBarUpdate() -{ - int index; - telemetryLock=true; - for (int i=0; i<12; i++) { - int screen=i/4; - index=barsCB[i]->currentIndex(); - if (index==TELEMETRY_SOURCE_A1 || index==TELEMETRY_SOURCE_A1 || index==TELEMETRY_SOURCE_A1_MIN || index==TELEMETRY_SOURCE_A2_MIN) { - minSB[i]->setMinimum(getBarValue(index, 0, &g_model.frsky)); - minSB[i]->setMaximum(getBarValue(index, 255, &g_model.frsky)); - minSB[i]->setSingleStep(getBarStep(index)); - maxSB[i]->setMinimum(getBarValue(index, 0, &g_model.frsky)); - maxSB[i]->setMaximum(getBarValue(index, 255, &g_model.frsky)); - maxSB[i]->setSingleStep(getBarStep(index)); - minSB[i]->setValue(getBarValue(index, g_model.frsky.screens[screen].body.bars[i%4].barMin, &g_model.frsky)); - maxSB[i]->setValue(getBarValue(index, 255-g_model.frsky.screens[screen].body.bars[i%4].barMax, &g_model.frsky)); - } - } - telemetryLock=false; -} - -void ModelEdit::ScreenTypeCBcurrentIndexChanged(int index) -{ - if (telemetryLock) return; - - QComboBox *comboBox = qobject_cast(sender()); - int screen = comboBox->objectName().right(1).toInt() -1; - telemetryLock=true; - g_model.frsky.screens[screen].type=index; - - for (int i=0; i<3; i++) { - bool isNum = (g_model.frsky.screens[i].type==0); - barsGB[i]->setVisible(!isNum); - numsGB[i]->setVisible(isNum); - } - - telemetryLock=false; - updateSettings(); -} - -void ModelEdit::telBarCBcurrentIndexChanged(int index) -{ - if (telemetryLock) return; - QComboBox *comboBox = qobject_cast(sender()); - int screenId = comboBox->objectName().mid(8,1).toInt() - 1; - int barId = comboBox->objectName().mid(10,1).toInt() - 1; - int bar=barId+screenId*4; - g_model.frsky.screens[screenId].body.bars[barId].source=index; - telemetryLock=true; - if (index==0) { - g_model.frsky.screens[screenId].body.bars[barId].barMin=0; - g_model.frsky.screens[screenId].body.bars[barId].barMax=0; - minSB[bar]->setDisabled(true); - maxSB[bar]->setDisabled(true); - } else { - minSB[bar]->setEnabled(true); - maxSB[bar]->setEnabled(true); - } - switch (index-1) { - case TELEMETRY_SOURCE_TX_BATT: - case TELEMETRY_SOURCE_A1: - case TELEMETRY_SOURCE_A1_MIN: - case TELEMETRY_SOURCE_A2: - case TELEMETRY_SOURCE_A2_MIN: - case TELEMETRY_SOURCE_CELLS_SUM: - case TELEMETRY_SOURCE_VFAS: - case TELEMETRY_SOURCE_CURRENT_MAX: - case TELEMETRY_SOURCE_CURRENT: - minSB[bar]->setDecimals(1); - maxSB[bar]->setDecimals(1); - break; - case TELEMETRY_SOURCE_CELL: - minSB[bar]->setDecimals(2); - maxSB[bar]->setDecimals(2); - break; - default: - minSB[bar]->setDecimals(0); - maxSB[bar]->setDecimals(0); - } - minSB[bar]->setMinimum(getBarValue(index, 0, &g_model.frsky)); - minSB[bar]->setMaximum(getBarValue(index, 255, &g_model.frsky)); - minSB[bar]->setSingleStep(getBarStep(index)); - maxSB[bar]->setMinimum(getBarValue(index, 0, &g_model.frsky)); - maxSB[bar]->setMaximum(getBarValue(index, 255, &g_model.frsky)); - maxSB[bar]->setSingleStep(getBarStep(index)); - minSB[bar]->setValue(getBarValue(index, g_model.frsky.screens[screenId].body.bars[barId].barMin, &g_model.frsky)); - maxSB[bar]->setValue(getBarValue(index, 255-g_model.frsky.screens[screenId].body.bars[barId].barMax, &g_model.frsky)); - telemetryLock=false; - updateSettings(); -} - -void ModelEdit::telMinSBeditingFinished() -{ - if (telemetryLock) return; - QDoubleSpinBox *spinBox = qobject_cast(sender()); - int screenId = spinBox->objectName().mid(8,1).toInt() - 1; - int barId = spinBox->objectName().right(1).toInt() - 1; - int minId = barId+screenId*4; - telemetryLock=true; - if (g_model.frsky.screens[screenId].body.bars[barId].source==TELEMETRY_SOURCE_A1 || g_model.frsky.screens[screenId].body.bars[barId].source==TELEMETRY_SOURCE_A1_MIN) { - g_model.frsky.screens[screenId].body.bars[barId].barMin=round((minSB[minId]->value()-ui->a1CalibSB->value())/getBarStep(g_model.frsky.screens[screenId].body.bars[barId].source)); - } else if (g_model.frsky.screens[screenId].body.bars[minId].source==TELEMETRY_SOURCE_A2 || g_model.frsky.screens[screenId].body.bars[minId].source==TELEMETRY_SOURCE_A2_MIN) { - g_model.frsky.screens[screenId].body.bars[barId].barMin=round((minSB[minId]->value()-ui->a2CalibSB->value())/getBarStep(g_model.frsky.screens[screenId].body.bars[barId].source)); - } else { - g_model.frsky.screens[screenId].body.bars[barId].barMin=round((minSB[minId]->value()-getBarValue(g_model.frsky.screens[screenId].body.bars[barId].source, 0, &g_model.frsky))/getBarStep(g_model.frsky.screens[screenId].body.bars[barId].source)); - } - spinBox->setValue(getBarValue(g_model.frsky.screens[screenId].body.bars[barId].source, g_model.frsky.screens[screenId].body.bars[barId].barMin, &g_model.frsky)); - if (maxSB[minId]->value()value()) { - g_model.frsky.screens[screenId].body.bars[minId].barMax=(255-g_model.frsky.screens[screenId].body.bars[barId].barMin+1); - maxSB[minId]->setValue(getBarValue(g_model.frsky.screens[screenId].body.bars[barId].source, 255-g_model.frsky.screens[screenId].body.bars[barId].barMax, &g_model.frsky)); - } - maxSB[minId]->setMinimum(getBarValue(g_model.frsky.screens[screenId].body.bars[barId].source, (g_model.frsky.screens[screenId].body.bars[barId].barMin+1), &g_model.frsky)); - telemetryLock=false; - updateSettings(); -} - -void ModelEdit::telMaxSBeditingFinished() -{ - if (telemetryLock) return; - QDoubleSpinBox *spinBox = qobject_cast(sender()); - int screenId = spinBox->objectName().mid(8,1).toInt() - 1; - int barId = spinBox->objectName().right(1).toInt() - 1; - telemetryLock=true; - if (g_model.frsky.screens[screenId].body.bars[barId].source==5) { - g_model.frsky.screens[screenId].body.bars[barId].barMax = (255-round((spinBox->value()-ui->a1CalibSB->value())/getBarStep(g_model.frsky.screens[screenId].body.bars[barId].source))); - } else if (g_model.frsky.screens[screenId].body.bars[barId].source==6) { - g_model.frsky.screens[screenId].body.bars[barId].barMax = (255-round((spinBox->value()-ui->a2CalibSB->value())/getBarStep(g_model.frsky.screens[screenId].body.bars[barId].source))); - } else { - g_model.frsky.screens[screenId].body.bars[barId].barMax = (255-round((spinBox->value()-getBarValue(g_model.frsky.screens[screenId].body.bars[barId].source, 0, &g_model.frsky))/getBarStep(g_model.frsky.screens[screenId].body.bars[barId].source) )); - } - spinBox->setValue(getBarValue(g_model.frsky.screens[screenId].body.bars[barId].source, (255-g_model.frsky.screens[screenId].body.bars[barId].barMax), &g_model.frsky)); - telemetryLock=false; - updateSettings(); -} - -void ModelEdit::on_thrTrimChkB_toggled(bool checked) -{ - g_model.thrTrim = checked; - updateSettings(); -} - -void ModelEdit::on_thrExpoChkB_toggled(bool checked) -{ - g_model.thrExpo = checked; - updateSettings(); -} - -void ModelEdit::on_AltitudeToolbar_ChkB_toggled(bool checked) -{ - g_model.frsky.altitudeDisplayed = checked; - updateSettings(); -} - -void ModelEdit::on_bcRUDChkB_toggled(bool checked) -{ - if(checked) { - g_model.beepANACenter |= BC_BIT_RUD; - } else { - g_model.beepANACenter &= ~BC_BIT_RUD; - } - updateSettings(); -} - -void ModelEdit::on_bcELEChkB_toggled(bool checked) -{ - if(checked) { - g_model.beepANACenter |= BC_BIT_ELE; - } else { - g_model.beepANACenter &= ~BC_BIT_ELE; - } - updateSettings(); -} - -void ModelEdit::on_bcTHRChkB_toggled(bool checked) -{ - if(checked) { - g_model.beepANACenter |= BC_BIT_THR; - } else { - g_model.beepANACenter &= ~BC_BIT_THR; - } - updateSettings(); -} - -void ModelEdit::on_bcAILChkB_toggled(bool checked) -{ - if(checked) { - g_model.beepANACenter |= BC_BIT_AIL; - } else { - g_model.beepANACenter &= ~BC_BIT_AIL; - } - updateSettings(); -} - -void ModelEdit::on_bcP1ChkB_toggled(bool checked) -{ - if(checked) { - g_model.beepANACenter |= BC_BIT_P1; - } else { - g_model.beepANACenter &= ~BC_BIT_P1; - } - updateSettings(); -} - -void ModelEdit::on_bcP2ChkB_toggled(bool checked) -{ - if(checked) { - g_model.beepANACenter |= BC_BIT_P2; - } else { - g_model.beepANACenter &= ~BC_BIT_P2; - } - updateSettings(); -} - -void ModelEdit::on_bcP3ChkB_toggled(bool checked) -{ - if(checked) { - g_model.beepANACenter |= BC_BIT_P3; - } else { - g_model.beepANACenter &= ~BC_BIT_P3; - } - updateSettings(); -} - -void ModelEdit::on_bcP4ChkB_toggled(bool checked) -{ - if(checked) { - g_model.beepANACenter |= BC_BIT_P4; - } else { - g_model.beepANACenter &= ~BC_BIT_P4; - } - updateSettings(); -} - -void ModelEdit::on_bcREaChkB_toggled(bool checked) -{ - if(checked) { - g_model.beepANACenter |= BC_BIT_REA; - } else { - g_model.beepANACenter &= ~BC_BIT_REA; - } - updateSettings(); -} - -void ModelEdit::on_bcREbChkB_toggled(bool checked) -{ - if(checked) { - g_model.beepANACenter |= BC_BIT_REB; - } else { - g_model.beepANACenter &= ~BC_BIT_REB; - } - updateSettings(); -} - -void ModelEdit::phaseGVValue_editingFinished() -{ - if (phasesLock) return; - QSpinBox *spinBox = qobject_cast(sender()); - int phase = spinBox->objectName().mid(5,1).toInt(); - int gvar = spinBox->objectName().mid(8,1).toInt()-1; - g_model.phaseData[phase].gvars[gvar] = spinBox->value(); - updateSettings(); -} - -void ModelEdit::GVName_editingFinished() -{ - if (phasesLock) return; - QLineEdit *lineedit = qobject_cast(sender()); - int gvar = lineedit->objectName().mid(8,1).toInt()-1; - memset(&g_model.gvars_names[gvar],0,sizeof(g_model.gvars_names[gvar])); - const char * le=lineedit->text().toAscii(); - strncpy(g_model.gvars_names[gvar], le, sizeof(g_model.gvars_names[gvar])-1); - updateSettings(); -} - -void ModelEdit::GVSource_currentIndexChanged() -{ - QComboBox *comboBox = qobject_cast(sender()); - int gvar = comboBox->objectName().mid(8,1).toInt()-1; - int index=comboBox->currentIndex(); - g_model.gvsource[gvar]=index; - updateSettings(); -} - -void ModelEdit::phaseGVUse_currentIndexChanged() -{ - if (phasesLock) return; - phasesLock=true; - QComboBox *comboBox = qobject_cast(sender()); - int phase = comboBox->objectName().mid(5,1).toInt(); - int gvar = comboBox->objectName().mid(8,1).toInt()-1; - int index=comboBox->currentIndex(); - if (index == 0) { - int value=g_model.phaseData[phase].gvars[gvar]; - if (value>1024) { - value=0; - } - gvarsSB[phase][gvar]->setValue(value); - gvarsSB[phase][gvar]->setEnabled(true); - g_model.phaseData[phase].gvars[gvar]=value; - } else { - g_model.phaseData[phase].gvars[gvar]=1024+index; - int value=gvarsSB[index+(index>phase ?0 :-1)][gvar]->value(); - gvarsSB[phase][gvar]->setValue(value); - gvarsSB[phase][gvar]->setDisabled(true); - } - phasesLock=false; - updateSettings(); -} - -void ModelEdit::phaseREValue_editingFinished() -{ - if (phasesLock) return; - QSpinBox *spinBox = qobject_cast(sender()); - int phase = spinBox->objectName().mid(5,1).toInt(); - int gvar = spinBox->objectName().mid(8,1).toInt()-1; - g_model.phaseData[phase].rotaryEncoders[gvar] = spinBox->value(); - updateSettings(); -} - -void ModelEdit::phaseREUse_currentIndexChanged() -{ - if (phasesLock) return; - phasesLock=true; - QComboBox *comboBox = qobject_cast(sender()); - int phase = comboBox->objectName().mid(5,1).toInt(); - int re = comboBox->objectName().mid(8,1).toInt()-1; - int index=comboBox->currentIndex(); - if (index == 0) { - int value=g_model.phaseData[phase].rotaryEncoders[re]; - if (value>1024) { - value=0; - } - reSB[phase][re]->setValue(value); - reSB[phase][re]->setEnabled(true); - g_model.phaseData[phase].rotaryEncoders[re]=value; - } else { - g_model.phaseData[phase].rotaryEncoders[re]=1024+index; - int value=reSB[index+(index>phase ?0 :-1)][re]->value(); - reSB[phase][re]->setValue(value); - reSB[phase][re]->setDisabled(true) ; - } - phasesLock=false; - updateSettings(); -} - -void ModelEdit::phaseTrimUse_currentIndexChanged() -{ - if (phasesLock) return; - QComboBox *comboBox = qobject_cast(sender()); - int phase = comboBox->objectName().mid(5,1).toInt(); - int trim = comboBox->objectName().mid(10,1).toInt(); - - int chn = CONVERT_MODE(trim)-1; - int index=comboBox->currentIndex(); - - if (index == 0) { - g_model.phaseData[phase].trim[chn] = g_model.phaseData[g_model.getTrimFlightPhase(chn, phase)].trim[chn]; - g_model.phaseData[phase].trimRef[chn] = -1; - } else { - g_model.phaseData[phase].trim[chn] = 0; - g_model.phaseData[phase].trimRef[chn] = index - 1 + (index > (int)phase ? 1 : 0); - } - - phasesLock = true; - displayOnePhaseOneTrim(phase, chn, NULL, phasesTrimValues[phase][trim-1], phasesTrimSliders[phase][trim-1]); - phasesLock = false; - updateSettings(); -} - -void ModelEdit::phaseTrim_valueChanged() -{ - if (phasesLock) return; - QSpinBox *spinBox = qobject_cast(sender()); - int phase = spinBox->objectName().mid(5,1).toInt(); - int trim = spinBox->objectName().mid(10,1).toInt(); - - int chn = CONVERT_MODE(trim)-1; - g_model.phaseData[phase].trim[chn] = spinBox->value(); - phasesLock=true; - phasesTrimSliders[phase][trim-1]->setValue(spinBox->value()); - phasesLock=false; - updateSettings(); -} - -void ModelEdit::phaseTrimSlider_valueChanged() -{ - if (phasesLock) return; - QSlider *slider = qobject_cast(sender()); - int phase = slider->objectName().mid(5,1).toInt(); - int trim = slider->objectName().mid(10,1).toInt(); - - int chn = CONVERT_MODE(trim)-1; - g_model.phaseData[phase].trim[chn] = slider->value(); - phasesLock=true; - phasesTrimValues[phase][trim-1]->setValue(slider->value()); - phasesLock=false; - updateSettings(); -} - -QSpinBox *ModelEdit::getNodeSB(int i) // get the SpinBox that corresponds to the selected node -{ - return spny[i]; -} - -QSpinBox *ModelEdit::getNodeSBX(int i) // get the SpinBox that corresponds to the selected node -{ - return spnx[i]; -} - -void ModelEdit::drawCurve() -{ - - if (drawing) - return; - drawing=true; - curvesLock=true; - int k,i; - QColor * plot_color[16]; - - plot_color[0]=new QColor(0,0,127); - plot_color[1]=new QColor(0,127,0); - plot_color[2]=new QColor(127,0,0); - plot_color[3]=new QColor(0,127,127); - plot_color[4]=new QColor(127,0,127); - plot_color[5]=new QColor(127,127,0); - plot_color[6]=new QColor(127,127,127); - plot_color[7]=new QColor(0,0,255); - plot_color[8]=new QColor(0,127,255); - plot_color[9]=new QColor(127,0,255); - plot_color[10]=new QColor(0,255,0); - plot_color[11]=new QColor(0,255,127); - plot_color[12]=new QColor(127,255,0); - plot_color[13]=new QColor(255,0,0); - plot_color[14]=new QColor(255,0,127); - plot_color[15]=new QColor(255,127,0); - - if(currentCurve<0 || currentCurve>15) return; - - Node *nodel = 0; - Node *nodex = 0; - - QGraphicsScene *scene = ui->curvePreview->scene(); - QPen pen; - QColor color; - scene->clear(); - - qreal width = scene->sceneRect().width(); - qreal height = scene->sceneRect().height(); - - qreal centerX = scene->sceneRect().left() + width/2; //center X - qreal centerY = scene->sceneRect().top() + height/2; //center Y - - QGraphicsSimpleTextItem *ti; - ti = scene->addSimpleText(tr("Editing curve %1").arg(currentCurve+1)); - ti->setPos(3,3); - - scene->addLine(centerX,GFX_MARGIN,centerX,height+GFX_MARGIN); - scene->addLine(GFX_MARGIN,centerY,width+GFX_MARGIN,centerY); - pen.setWidth(2); - pen.setStyle(Qt::SolidLine); - int numcurves=GetEepromInterface()->getCapability(NumCurves); - if (numcurves==0) { - numcurves=16; - } - - for(k=0; kaddLine(GFX_MARGIN + i*width/(numpoints-1),centerY - (qreal)g_model.curves[k].points[i].y*height/200,GFX_MARGIN + (i+1)*width/(numpoints-1),centerY - (qreal)g_model.curves[k].points[i+1].y*height/200,pen); - } else { - scene->addLine(centerX + (qreal)g_model.curves[k].points[i].x*width/200,centerY - (qreal)g_model.curves[k].points[i].y*height/200,centerX + (qreal)g_model.curves[k].points[i+1].x*width/200,centerY - (qreal)g_model.curves[k].points[i+1].y*height/200,pen); - } - } - } - } - int numpoints=g_model.curves[currentCurve].count; - - for(int i=0; isetColor(*plot_color[currentCurve]); - if (!g_model.curves[currentCurve].custom) { - nodex->setFixedX(true); - nodex->setPos(GFX_MARGIN + i*width/(numpoints-1),centerY - (qreal)g_model.curves[currentCurve].points[i].y*height/200); - } else { - if (i>0 && i<(numpoints-1)) { - nodex->setFixedX(false); - nodex->setMinX(g_model.curves[currentCurve].points[i-1].x+1); - nodex->setMaxX(g_model.curves[currentCurve].points[i+1].x-1); - spnx[i]->setMaximum(g_model.curves[currentCurve].points[i+1].x-1); - spnx[i]->setMinimum(g_model.curves[currentCurve].points[i-1].x+1); - } else { - nodex->setFixedX(true); - } - nodex->setPos(centerX + (qreal)g_model.curves[currentCurve].points[i].x*width/200,centerY - (qreal)g_model.curves[currentCurve].points[i].y*height/200); - } - scene->addItem(nodex); - if(i>0) scene->addItem(new Edge(nodel, nodex)); - } - curvesLock=false; - drawing=false; -} - - -bool ModelEdit::gm_insertMix(int idx) -{ - if (idx<0 || idx>=GetEepromInterface()->getCapability(Mixes) || g_model.mixData[GetEepromInterface()->getCapability(Mixes)-1].destCh > 0) { - QMessageBox::information(this, "companion9x", tr("Not enough available mixers!")); - return false; - } - - int i = g_model.mixData[idx].destCh; - memmove(&g_model.mixData[idx+1],&g_model.mixData[idx], - (GetEepromInterface()->getCapability(Mixes)-(idx+1))*sizeof(MixData) ); - memset(&g_model.mixData[idx],0,sizeof(MixData)); - g_model.mixData[idx].srcRaw = RawSource(SOURCE_TYPE_NONE); - g_model.mixData[idx].destCh = i; - g_model.mixData[idx].weight = 100; - return true; -} - -void ModelEdit::gm_deleteMix(int index) -{ - memmove(&g_model.mixData[index],&g_model.mixData[index+1], - (GetEepromInterface()->getCapability(Mixes)-(index+1))*sizeof(MixData)); - memset(&g_model.mixData[GetEepromInterface()->getCapability(Mixes)-1],0,sizeof(MixData)); -} - -void ModelEdit::gm_openMix(int index) -{ - if(index<0 || index>=GetEepromInterface()->getCapability(Mixes)) return; - - MixData mixd(g_model.mixData[index]); - updateSettings(); - tabMixes(); - - MixerDialog *g = new MixerDialog(this, &mixd, g_eeGeneral.stickMode); - if(g->exec()) { - g_model.mixData[index] = mixd; - updateSettings(); - tabMixes(); - } else { - if (mixInserted) { - gm_deleteMix(index); - } - mixInserted=false; - updateSettings(); - tabMixes(); - } -} - -int ModelEdit::getMixerIndex(unsigned int dch) -{ - int i = 0; - while ((g_model.mixData[i].destCh<=dch) && (g_model.mixData[i].destCh) && (igetCapability(Mixes))) i++; - if(i==GetEepromInterface()->getCapability(Mixes)) return -1; - return i; -} - -bool ModelEdit::gm_insertExpo(int idx) -{ - if (idx<0 || idx>=C9X_MAX_EXPOS || g_model.expoData[C9X_MAX_EXPOS-1].mode > 0) { - QMessageBox::information(this, "companion9x", tr("Not enough available expos!")); - return false; - } - - int chn = g_model.expoData[idx].chn; - memmove(&g_model.expoData[idx+1],&g_model.expoData[idx], - (C9X_MAX_EXPOS-(idx+1))*sizeof(ExpoData) ); - memset(&g_model.expoData[idx],0,sizeof(ExpoData)); - g_model.expoData[idx].chn = chn; - g_model.expoData[idx].weight = 100; - g_model.expoData[idx].mode = 3 /* TODO enum */; - return true; -} - -void ModelEdit::gm_deleteExpo(int index) -{ - memmove(&g_model.expoData[index],&g_model.expoData[index+1], - (C9X_MAX_EXPOS-(index+1))*sizeof(ExpoData)); - memset(&g_model.expoData[C9X_MAX_EXPOS-1],0,sizeof(ExpoData)); -} - -void ModelEdit::gm_openExpo(int index) -{ - if(index<0 || index>=C9X_MAX_EXPOS) return; - - ExpoData mixd(g_model.expoData[index]); - updateSettings(); - tabExpos(); - - ExpoDialog *g = new ExpoDialog(this, &mixd, g_eeGeneral.stickMode); - if(g->exec()) { - g_model.expoData[index] = mixd; - updateSettings(); - tabExpos(); - } else { - if (expoInserted) { - gm_deleteExpo(index); - } - expoInserted=false; - updateSettings(); - tabExpos(); - } -} - -int ModelEdit::getExpoIndex(unsigned int dch) -{ - unsigned int i = 0; - while (g_model.expoData[i].chn<=dch && g_model.expoData[i].mode && iitem(index.row())->data(Qt::UserRole).toByteArray().at(0); - if (idx<0) { - int i = -idx; - idx = getMixerIndex(i); //get mixer index to insert - if (!gm_insertMix(idx)) - return; - g_model.mixData[idx].destCh = i; - mixInserted=true; - } else { - mixInserted=false; - } - gm_openMix(idx); -} - - -void ModelEdit::expolistWidget_doubleClicked(QModelIndex index) -{ - expoOpen(ExposlistWidget->item(index.row())); -} - -void ModelEdit::exposDeleteList(QList list) -{ - qSort(list.begin(), list.end()); - - int iDec = 0; - foreach(int idx, list) { - gm_deleteExpo(idx-iDec); - iDec++; - } -} - -void ModelEdit::mixersDeleteList(QList list) -{ - qSort(list.begin(), list.end()); - - int iDec = 0; - foreach(int idx, list) { - gm_deleteMix(idx-iDec); - iDec++; - } -} - -QList ModelEdit::createMixListFromSelected() -{ - QList list; - foreach(QListWidgetItem *item, MixerlistWidget->selectedItems()) { - int idx= item->data(Qt::UserRole).toByteArray().at(0); - if(idx>=0 && idxgetCapability(Mixes)) list << idx; - } - return list; -} - -QList ModelEdit::createExpoListFromSelected() -{ - QList list; - foreach(QListWidgetItem *item, ExposlistWidget->selectedItems()) { - int idx= item->data(Qt::UserRole).toByteArray().at(0); - if(idx>=0 && idx list) -{ - for(int i=0; icount(); i++) { - int t = MixerlistWidget->item(i)->data(Qt::UserRole).toByteArray().at(0); - if(list.contains(t)) - MixerlistWidget->item(i)->setSelected(true); - } -} - -void ModelEdit::setSelectedByExpoList(QList list) -{ - for(int i=0; icount(); i++) { - int t = ExposlistWidget->item(i)->data(Qt::UserRole).toByteArray().at(0); - if(list.contains(t)) - ExposlistWidget->item(i)->setSelected(true); - } -} - -void ModelEdit::mixersDelete(bool ask) -{ - QMessageBox::StandardButton ret = QMessageBox::No; - - if(ask) - ret = QMessageBox::warning(this, "companion9x", - tr("Delete Selected Mixes?"), - QMessageBox::Yes | QMessageBox::No); - - - if ((ret == QMessageBox::Yes) || (!ask)) { - mixersDeleteList(createMixListFromSelected()); - updateSettings(); - tabMixes(); - } -} - -void ModelEdit::mixersCut() -{ - mixersCopy(); - mixersDelete(false); -} - -void ModelEdit::mixersCopy() -{ - - QList list = createMixListFromSelected(); - - QByteArray mxData; - foreach(int idx, list) { - mxData.append((char*)&g_model.mixData[idx],sizeof(MixData)); - } - - QMimeData *mimeData = new QMimeData; - mimeData->setData("application/x-companion9x-mix", mxData); - QApplication::clipboard()->setMimeData(mimeData,QClipboard::Clipboard); -} - -void ModelEdit::exposDelete(bool ask) -{ - QMessageBox::StandardButton ret = QMessageBox::No; - - if(ask) - ret = QMessageBox::warning(this, "companion9x", - tr("Delete Selected Expos?"), - QMessageBox::Yes | QMessageBox::No); - - - if ((ret == QMessageBox::Yes) || (!ask)) { - exposDeleteList(createExpoListFromSelected()); - updateSettings(); - tabExpos(); - } -} - -void ModelEdit::exposCut() -{ - exposCopy(); - exposDelete(false); -} - -void ModelEdit::exposCopy() -{ - QList list = createExpoListFromSelected(); - - QByteArray mxData; - foreach(int idx, list) { - mxData.append((char*)&g_model.expoData[idx],sizeof(ExpoData)); - } - - QMimeData *mimeData = new QMimeData; - mimeData->setData("application/x-companion9x-expo", mxData); - QApplication::clipboard()->setMimeData(mimeData,QClipboard::Clipboard); -} - -void ModelEdit::mimeExpoDropped(int index, const QMimeData *data, Qt::DropAction /*action*/) -{ - int idx = ExposlistWidget->item(index > 0 ? index-1 : 0)->data(Qt::UserRole).toByteArray().at(0); - pasteExpoMimeData(data, idx); -} - -void ModelEdit::mimeMixerDropped(int index, const QMimeData *data, Qt::DropAction /*action*/) -{ - int idx= MixerlistWidget->item(index > 0 ? index-1 : 0)->data(Qt::UserRole).toByteArray().at(0); - pasteMixerMimeData(data, idx); -} - -void ModelEdit::pasteMixerMimeData(const QMimeData * mimeData, int destIdx) -{ - if(mimeData->hasFormat("application/x-companion9x-mix")) { - int idx; // mixer index - int dch; - - if(destIdx<0) { - dch = -destIdx; - idx = getMixerIndex(dch) - 1; //get mixer index to insert - } else { - idx = destIdx; - dch = g_model.mixData[idx].destCh; - } - - QByteArray mxData = mimeData->data("application/x-companion9x-mix"); - - int i = 0; - while(igetCapability(Mixes)) break; - - if (!gm_insertMix(idx)) - break; - MixData *md = &g_model.mixData[idx]; - memcpy(md,mxData.mid(i,sizeof(MixData)).constData(),sizeof(MixData)); - md->destCh = dch; - i += sizeof(MixData); - } - - updateSettings(); - tabMixes(); - } -} -#include -#include -void ModelEdit::pasteExpoMimeData(const QMimeData * mimeData, int destIdx) -{ - if (mimeData->hasFormat("application/x-companion9x-expo")) { - int idx; // mixer index - int dch; - - if (destIdx < 0) { - dch = -destIdx - 1; - idx = getExpoIndex(dch) - 1; //get expo index to insert - } else { - idx = destIdx; - dch = g_model.expoData[idx].chn; - } - - QByteArray mxData = mimeData->data("application/x-companion9x-expo"); - - int i = 0; - while (i < mxData.size()) { - idx++; - if (!gm_insertExpo(idx)) - break; - ExpoData *md = &g_model.expoData[idx]; - memcpy(md, mxData.mid(i, sizeof(ExpoData)).constData(), sizeof(ExpoData)); - md->chn = dch; - i += sizeof(ExpoData); - } - - updateSettings(); - tabExpos(); - } -} - -void ModelEdit::mixersPaste() -{ - const QClipboard *clipboard = QApplication::clipboard(); - const QMimeData *mimeData = clipboard->mimeData(); - QListWidgetItem *item = MixerlistWidget->currentItem(); - if (item) - pasteMixerMimeData(mimeData, item->data(Qt::UserRole).toByteArray().at(0)); -} - -void ModelEdit::mixersDuplicate() -{ - mixersCopy(); - mixersPaste(); -} - -void ModelEdit::exposPaste() -{ - const QClipboard *clipboard = QApplication::clipboard(); - const QMimeData *mimeData = clipboard->mimeData(); - QListWidgetItem *item = ExposlistWidget->currentItem(); - if (item) - pasteExpoMimeData(mimeData, item->data(Qt::UserRole).toByteArray().at(0)); -} - -void ModelEdit::exposDuplicate() -{ - exposCopy(); - exposPaste(); -} - -void ModelEdit::mixerOpen() -{ - int idx = MixerlistWidget->currentItem()->data(Qt::UserRole).toByteArray().at(0); - if(idx<0) { - int i = -idx; - idx = getMixerIndex(i); //get mixer index to insert - if (!gm_insertMix(idx)) - return; - g_model.mixData[idx].destCh = i; - mixInserted=true; - } else { - mixInserted=false; - } - - gm_openMix(idx); -} - -void ModelEdit::mixerAdd() -{ - if (!MixerlistWidget->currentItem()) - return; - int index = MixerlistWidget->currentItem()->data(Qt::UserRole).toByteArray().at(0); - - if(index<0) { // if empty then return relavent index - int i = -index; - index = getMixerIndex(i); //get mixer index to insert - if (!gm_insertMix(index)) - return; - g_model.mixData[index].destCh = i; - mixInserted=true; - } else { - index++; - if (!gm_insertMix(index)) - return; - g_model.mixData[index].destCh = g_model.mixData[index-1].destCh; - mixInserted=true; - } - gm_openMix(index); -} - -void ModelEdit::expoOpen(QListWidgetItem *item) -{ - if (!item) - item = ExposlistWidget->currentItem(); - - int idx = item->data(Qt::UserRole).toByteArray().at(0); - if (idx<0) { - int ch = -idx-1; - idx = getExpoIndex(ch); // get expo index to insert - if (!gm_insertExpo(idx)) - return; - g_model.expoData[idx].chn = ch; - expoInserted=true; - } else { - expoInserted=false; - } - gm_openExpo(idx); -} - -void ModelEdit::expoAdd() -{ - int index = ExposlistWidget->currentItem()->data(Qt::UserRole).toByteArray().at(0); - - if(index<0) { // if empty then return relevant index - expoOpen(); - } else { - index++; - if (!gm_insertExpo(index)) - return; - g_model.expoData[index].chn = g_model.expoData[index-1].chn; - } - gm_openExpo(index); -} - -void ModelEdit::mixerlistWidget_customContextMenuRequested(QPoint pos) -{ - QPoint globalPos = MixerlistWidget->mapToGlobal(pos); - - const QClipboard *clipboard = QApplication::clipboard(); - const QMimeData *mimeData = clipboard->mimeData(); - bool hasData = mimeData->hasFormat("application/x-companion9x-mix"); - - QMenu contextMenu; - contextMenu.addAction(QIcon(":/images/add.png"), tr("&Add"),this,SLOT(mixerAdd()),tr("Ctrl+A")); - contextMenu.addAction(QIcon(":/images/edit.png"), tr("&Edit"),this,SLOT(mixerOpen()),tr("Enter")); - contextMenu.addSeparator(); - contextMenu.addAction(QIcon(":/images/clear.png"), tr("&Delete"),this,SLOT(mixersDelete()),tr("Delete")); - contextMenu.addAction(QIcon(":/images/copy.png"), tr("&Copy"),this,SLOT(mixersCopy()),tr("Ctrl+C")); - contextMenu.addAction(QIcon(":/images/cut.png"), tr("&Cut"),this,SLOT(mixersCut()),tr("Ctrl+X")); - contextMenu.addAction(QIcon(":/images/paste.png"), tr("&Paste"),this,SLOT(mixersPaste()),tr("Ctrl+V"))->setEnabled(hasData); - contextMenu.addAction(QIcon(":/images/duplicate.png"), tr("Du&plicate"),this,SLOT(mixersDuplicate()),tr("Ctrl+U")); - contextMenu.addSeparator(); - contextMenu.addAction(QIcon(":/images/moveup.png"), tr("Move Up"),this,SLOT(moveMixUp()),tr("Ctrl+Up")); - contextMenu.addAction(QIcon(":/images/movedown.png"), tr("Move Down"),this,SLOT(moveMixDown()),tr("Ctrl+Down")); - - contextMenu.exec(globalPos); -} - -void ModelEdit::expolistWidget_customContextMenuRequested(QPoint pos) -{ - QPoint globalPos = ExposlistWidget->mapToGlobal(pos); - - const QClipboard *clipboard = QApplication::clipboard(); - const QMimeData *mimeData = clipboard->mimeData(); - bool hasData = mimeData->hasFormat("application/x-companion9x-expo"); - - QMenu contextMenu; - contextMenu.addAction(QIcon(":/images/add.png"), tr("&Add"),this,SLOT(expoAdd()),tr("Ctrl+A")); - contextMenu.addAction(QIcon(":/images/edit.png"), tr("&Edit"),this,SLOT(expoOpen()),tr("Enter")); - contextMenu.addSeparator(); - contextMenu.addAction(QIcon(":/images/clear.png"), tr("&Delete"),this,SLOT(exposDelete()),tr("Delete")); - contextMenu.addAction(QIcon(":/images/copy.png"), tr("&Copy"),this,SLOT(exposCopy()),tr("Ctrl+C")); - contextMenu.addAction(QIcon(":/images/cut.png"), tr("&Cut"),this,SLOT(exposCut()),tr("Ctrl+X")); - contextMenu.addAction(QIcon(":/images/paste.png"), tr("&Paste"),this,SLOT(exposPaste()),tr("Ctrl+V"))->setEnabled(hasData); - contextMenu.addAction(QIcon(":/images/duplicate.png"), tr("Du&plicate"),this,SLOT(exposDuplicate()),tr("Ctrl+U")); - contextMenu.addSeparator(); - contextMenu.addAction(QIcon(":/images/moveup.png"), tr("Move Up"),this,SLOT(moveExpoUp()),tr("Ctrl+Up")); - contextMenu.addAction(QIcon(":/images/movedown.png"), tr("Move Down"),this,SLOT(moveExpoDown()),tr("Ctrl+Down")); - - contextMenu.exec(globalPos); -} - -void ModelEdit::cswPaste() -{ - const QClipboard *clipboard = QApplication::clipboard(); - const QMimeData *mimeData = clipboard->mimeData(); - if (mimeData->hasFormat("application/x-companion9x-csw")) { - QByteArray cswData = mimeData->data("application/x-companion9x-csw"); - - CustomSwData *csw = &g_model.customSw[selectedSwitch]; - memcpy(csw, cswData.mid(0, sizeof(CustomSwData)).constData(), sizeof(CustomSwData)); - updateSettings(); - updateSelectedSwitch(); - } -} - -void ModelEdit::cswDelete() -{ - g_model.customSw[selectedSwitch].clear(); - updateSettings(); - updateSelectedSwitch(); -} - -void ModelEdit::cswCopy() -{ - QByteArray cswData; - cswData.append((char*)&g_model.customSw[selectedSwitch],sizeof(CustomSwData)); - QMimeData *mimeData = new QMimeData; - mimeData->setData("application/x-companion9x-csw", cswData); - QApplication::clipboard()->setMimeData(mimeData,QClipboard::Clipboard); -} - -void ModelEdit::updateSelectedSwitch() -{ - switchEditLock = true; - populateCSWCB(csw[selectedSwitch], g_model.customSw[selectedSwitch].func); - setSwitchWidgetVisibility(selectedSwitch); - switchEditLock = false; -} - -void ModelEdit::cswCut() -{ - cswCopy(); - cswDelete(); -} - -void ModelEdit::csw_customContextMenuRequested(QPoint pos) -{ - QLabel *label = (QLabel *)sender(); - if (!label) - return; - QString name=label->objectName(); - if (!name.startsWith("cswlabel")) - return; - selectedSwitch=name.mid(9,2).toInt()-1; - - QPoint globalPos = label->mapToGlobal(pos); - - const QClipboard *clipboard = QApplication::clipboard(); - const QMimeData *mimeData = clipboard->mimeData(); - bool hasData = mimeData->hasFormat("application/x-companion9x-csw"); - - QMenu contextMenu; - contextMenu.addAction(QIcon(":/images/clear.png"), tr("&Delete"),this,SLOT(cswDelete()),tr("Delete")); - contextMenu.addAction(QIcon(":/images/copy.png"), tr("&Copy"),this,SLOT(cswCopy()),tr("Ctrl+C")); - contextMenu.addAction(QIcon(":/images/cut.png"), tr("&Cut"),this,SLOT(cswCut()),tr("Ctrl+X")); - contextMenu.addAction(QIcon(":/images/paste.png"), tr("&Paste"),this,SLOT(cswPaste()),tr("Ctrl+V"))->setEnabled(hasData); - - contextMenu.exec(globalPos); -} - -void ModelEdit::fsw_customContextMenuRequested(QPoint pos) -{ - QLabel *label = (QLabel *)sender(); - if (!label) - return; - int fsw=label->property("FunctionId").toInt(); - if (!(fsw>0 && fsw<=32)) - return; - selectedFunction=fsw-1; - - QPoint globalPos = label->mapToGlobal(pos); - - const QClipboard *clipboard = QApplication::clipboard(); - const QMimeData *mimeData = clipboard->mimeData(); - bool hasData = mimeData->hasFormat("application/x-companion9x-fsw"); - - QMenu contextMenu; - contextMenu.addAction(QIcon(":/images/clear.png"), tr("&Delete"),this,SLOT(fswDelete()),tr("Delete")); - contextMenu.addAction(QIcon(":/images/copy.png"), tr("&Copy"),this,SLOT(fswCopy()),tr("Ctrl+C")); - contextMenu.addAction(QIcon(":/images/cut.png"), tr("&Cut"),this,SLOT(fswCut()),tr("Ctrl+X")); - contextMenu.addAction(QIcon(":/images/paste.png"), tr("&Paste"),this,SLOT(fswPaste()),tr("Ctrl+V"))->setEnabled(hasData); - - contextMenu.exec(globalPos); -} - -void ModelEdit::fswPaste() -{ - const QClipboard *clipboard = QApplication::clipboard(); - const QMimeData *mimeData = clipboard->mimeData(); - if (mimeData->hasFormat("application/x-companion9x-fsw")) { - QByteArray fswData = mimeData->data("application/x-companion9x-fsw"); - - FuncSwData *fsw = &g_model.funcSw[selectedFunction]; - memcpy(fsw, fswData.mid(0, sizeof(FuncSwData)).constData(), sizeof(FuncSwData)); - updateSettings(); - tabCustomFunctions(); - } -} - -void ModelEdit::fswDelete() -{ - g_model.funcSw[selectedFunction].clear(); - updateSettings(); - tabCustomFunctions(); -} - -void ModelEdit::fswCopy() -{ - QByteArray fswData; - fswData.append((char*)&g_model.funcSw[selectedFunction],sizeof(FuncSwData)); - QMimeData *mimeData = new QMimeData; - mimeData->setData("application/x-companion9x-fsw", fswData); - QApplication::clipboard()->setMimeData(mimeData,QClipboard::Clipboard); -} - -void ModelEdit::fswCut() -{ - fswCopy(); - fswDelete(); -} - -void ModelEdit::mixerlistWidget_KeyPress(QKeyEvent *event) -{ - if(event->matches(QKeySequence::SelectAll)) mixerAdd(); //Ctrl A - if(event->matches(QKeySequence::Delete)) mixersDelete(); - if(event->matches(QKeySequence::Copy)) mixersCopy(); - if(event->matches(QKeySequence::Cut)) mixersCut(); - if(event->matches(QKeySequence::Paste)) mixersPaste(); - if(event->matches(QKeySequence::Underline)) mixersDuplicate(); - - if(event->key()==Qt::Key_Return || event->key()==Qt::Key_Enter) mixerOpen(); - if(event->matches(QKeySequence::MoveToNextLine)) - MixerlistWidget->setCurrentRow(MixerlistWidget->currentRow()+1); - if(event->matches(QKeySequence::MoveToPreviousLine)) - MixerlistWidget->setCurrentRow(MixerlistWidget->currentRow()-1); -} - -void ModelEdit::expolistWidget_KeyPress(QKeyEvent *event) -{ - if(event->matches(QKeySequence::SelectAll)) expoAdd(); //Ctrl A - if(event->matches(QKeySequence::Delete)) exposDelete(); - if(event->matches(QKeySequence::Copy)) exposCopy(); - if(event->matches(QKeySequence::Cut)) exposCut(); - if(event->matches(QKeySequence::Paste)) exposPaste(); - if(event->matches(QKeySequence::Underline)) exposDuplicate(); - - if(event->key()==Qt::Key_Return || event->key()==Qt::Key_Enter) expoOpen(); - if(event->matches(QKeySequence::MoveToNextLine)) - ExposlistWidget->setCurrentRow(ExposlistWidget->currentRow()+1); - if(event->matches(QKeySequence::MoveToPreviousLine)) - ExposlistWidget->setCurrentRow(ExposlistWidget->currentRow()-1); -} - -int ModelEdit::gm_moveMix(int idx, bool dir) //true=inc=down false=dec=up -{ - if(idx>GetEepromInterface()->getCapability(Mixes) || (idx==0 && !dir) || (idx==GetEepromInterface()->getCapability(Mixes) && dir)) return idx; - - int tdx = dir ? idx+1 : idx-1; - MixData &src=g_model.mixData[idx]; - MixData &tgt=g_model.mixData[tdx]; - - unsigned int outputs = GetEepromInterface()->getCapability(Outputs); - if((src.destCh==0) || (src.destCh>outputs) || (tgt.destCh>outputs)) return idx; - - if(tgt.destCh!=src.destCh) { - if ((dir) && (src.destCh0)) src.destCh--; - return idx; - } - - //flip between idx and tgt - MixData temp; - memcpy(&temp,&src,sizeof(MixData)); - memcpy(&src,&tgt,sizeof(MixData)); - memcpy(&tgt,&temp,sizeof(MixData)); - return tdx; -} - -void ModelEdit::moveMixUp() -{ - QList list = createMixListFromSelected(); - QList highlightList; - foreach(int idx, list) { - highlightList << gm_moveMix(idx, false); - } - updateSettings(); - tabMixes(); - setSelectedByMixList(highlightList); -} - -void ModelEdit::moveMixDown() -{ - QList list = createMixListFromSelected(); - QList highlightList; - foreach(int idx, list) { - highlightList << gm_moveMix(idx, true); - } - updateSettings(); - tabMixes(); - setSelectedByMixList(highlightList); -} - -int ModelEdit::gm_moveExpo(int idx, bool dir) //true=inc=down false=dec=up -{ - if(idx>C9X_MAX_EXPOS || (idx==C9X_MAX_EXPOS && dir)) return idx; - - int tdx = dir ? idx+1 : idx-1; - ExpoData temp; - temp.clear(); - ExpoData &src=g_model.expoData[idx]; - ExpoData &tgt=g_model.expoData[tdx]; - if (!dir && tdx<0 && src.chn>0) { - src.chn--; - return idx; - } else if (!dir && tdx<0) { - return idx; - } - - if(memcmp(&src,&temp,sizeof(ExpoData))==0) return idx; - bool tgtempty=(memcmp(&tgt,&temp,sizeof(ExpoData))==0 ? 1:0); - if(tgt.chn!=src.chn || tgtempty) { - if ((dir) && (src.chn<(NUM_STICKS-1))) src.chn++; - if ((!dir) && (src.chn>0)) src.chn--; - return idx; - } - - //flip between idx and tgt - memcpy(&temp,&src,sizeof(ExpoData)); - memcpy(&src,&tgt,sizeof(ExpoData)); - memcpy(&tgt,&temp,sizeof(ExpoData)); - return tdx; -} - -void ModelEdit::moveExpoUp() -{ - QList list = createExpoListFromSelected(); - QList highlightList; - foreach(int idx, list) { - highlightList << gm_moveExpo(idx, false); - } - updateSettings(); - tabExpos(); - setSelectedByExpoList(highlightList); -} - -void ModelEdit::moveExpoDown() -{ - QList list = createExpoListFromSelected(); - QList highlightList; - foreach(int idx, list) { - highlightList << gm_moveExpo(idx, true); - } - updateSettings(); - tabExpos(); - setSelectedByExpoList(highlightList); -} - -void ModelEdit::launchSimulation() -{ - if (GetEepromInterface()->getSimulator()) { - RadioData *simuData = new RadioData; - *simuData = radioData; - simuData->models[id_model] = g_model; - if (GetEepromInterface()->getCapability(SimulatorType)) { - xsimulatorDialog sd(this); - sd.loadParams(*simuData, id_model); - sd.exec(); - } else { - simulatorDialog sd(this); - sd.loadParams(*simuData, id_model); - sd.exec(); - } - } else { - QMessageBox::warning(NULL, - QObject::tr("Warning"), - QObject::tr("Simulator for this firmware is not yet available")); - } -} - -void ModelEdit::on_pushButton_clicked() -{ - launchSimulation(); -} - -void ModelEdit::resetCurve() -{ - QPushButton *button = (QPushButton *)sender(); - int btn=button->objectName().mid(button->objectName().lastIndexOf("_")+1).toInt()-1; - if (btn!=currentCurve) { - int res = QMessageBox::question(this, "companion9x",tr("Are you sure you want to delete curve %1 ?").arg(btn+1),QMessageBox::Yes | QMessageBox::No); - if (res == QMessageBox::No) { - return; - } - } - memset(g_model.curves[btn].name,0,sizeof(g_model.curves[btn].name)); - ui->cname_LE->clear(); - g_model.curves[btn].count=5; - g_model.curves[btn].custom=false; - curvesLock=true; - for (int i=0; i<17; i++) { - g_model.curves[btn].points[i].x=0; - g_model.curves[btn].points[i].y=0; - spnx[i]->setMinimum(-100); - spnx[i]->setMaximum(100); - spnx[i]->setValue(0); - spny[i]->setValue(0); - } - curvesLock=false; - updateCurvesTab(); - if (btn==currentCurve) { - ui->curvetype_CB->setCurrentIndex(2); - } - updateSettings(); - drawCurve(); -} - -void ModelEdit::editCurve() -{ - QPushButton *button = (QPushButton *)sender(); - int btn=button->objectName().mid(button->objectName().lastIndexOf("_")+1).toInt()-1; - setCurrentCurve(btn); - drawCurve(); -} - -void ModelEdit::plotCurve(bool checked) -{ - QCheckBox *chk = (QCheckBox *)sender(); - int btn=chk->objectName().mid(chk->objectName().lastIndexOf("_")+1).toInt()-1; - plot_curve[btn] = checked; - drawCurve(); -} - -void ModelEdit::on_T2ThrTrgChkB_toggled(bool checked) -{ - g_model.t2throttle = checked; - updateSettings(); -} - -void ModelEdit::on_extendedLimitsChkB_toggled(bool checked) -{ - g_model.extendedLimits = checked; - setLimitMinMax(); - updateSettings(); -} - -void ModelEdit::on_thrwarnChkB_toggled(bool checked) -{ - if (switchEditLock) - return; - g_model.disableThrottleWarning = checked; - updateSettings(); -} - -void ModelEdit::on_thrrevChkB_toggled(bool checked) -{ - g_model.throttleReversed = checked; - updateSettings(); -} - -void ModelEdit::on_extendedTrimsChkB_toggled(bool checked) -{ - g_model.extendedTrims = checked; - tabPhases(); - updateSettings(); -} - -void ModelEdit::setLimitMinMax() -{ - on_numChannelsSB_editingFinished(); - on_numChannelsSB_2_editingFinished(); - on_numChannelsSB_3_editingFinished(); - int v = g_model.extendedLimits ? 125 : 100; - foreach(QSpinBox *sb, findChildren(QRegExp("minSB_[0-9]+"))) { - sb->setMaximum(25); - sb->setMinimum(-v); - } - foreach(QSpinBox *sb, findChildren(QRegExp("maxSB_[0-9]+"))) { - sb->setMaximum(v); - sb->setMinimum(-25); - } -} - - -void ModelEdit::safetySwitchesEdited() -{ - for(int i=0; iitemData(safetySwitchSwtch[i]->currentIndex()).toInt()); - g_model.safetySw[i].val = safetySwitchValue[i]->value(); - } - updateSettings(); -} - - - -void ModelEdit::on_templateList_doubleClicked(QModelIndex index) -{ - QString text = ui->templateList->item(index.row())->text(); - if (index.row()==13) { - uint64_t result=0xffffffff; - modelConfigDialog *mcw = new modelConfigDialog(radioData, &result, this); - mcw->exec(); - if (result!=0xffffffff) { - applyNumericTemplate(result); - updateSettings(); - tabMixes(); - } - } else { - int res = QMessageBox::question(this,tr("Apply Template?"),tr("Apply template \"%1\"?").arg(text),QMessageBox::Yes | QMessageBox::No); - if(res!=QMessageBox::Yes) return; - applyTemplate(index.row()); - updateSettings(); - tabMixes(); - } -} - - -MixData* ModelEdit::setDest(uint8_t dch) -{ - uint8_t i = 0; - while ((g_model.mixData[i].destCh<=dch) && (g_model.mixData[i].destCh) && (igetCapability(Mixes))) i++; - if(i==GetEepromInterface()->getCapability(Mixes)) return &g_model.mixData[0]; - - memmove(&g_model.mixData[i+1],&g_model.mixData[i], - (GetEepromInterface()->getCapability(Mixes)-(i+1))*sizeof(MixData) ); - memset(&g_model.mixData[i],0,sizeof(MixData)); - g_model.mixData[i].destCh = dch; - return &g_model.mixData[i]; -} - -void ModelEdit::clearExpos(bool ask) -{ - if(ask) { - int res = QMessageBox::question(this,tr("Clear Expos?"),tr("Really clear all the expos?"),QMessageBox::Yes | QMessageBox::No); - if(res!=QMessageBox::Yes) return; - } - memset(g_model.expoData,0,sizeof(g_model.expoData)); //clear all expos - updateSettings(); - tabExpos(); -} - -void ModelEdit::clearMixes(bool ask) -{ - if(ask) { - int res = QMessageBox::question(this,tr("Clear Mixes?"),tr("Really clear all the mixes?"),QMessageBox::Yes | QMessageBox::No); - if(res!=QMessageBox::Yes) return; - } - memset(g_model.mixData,0,sizeof(g_model.mixData)); //clear all mixes - updateSettings(); - tabMixes(); -} - -void ModelEdit::clearCurves(bool ask) -{ - if(ask) { - int res = QMessageBox::question(this,tr("Clear Curves?"),tr("Really clear all the curves?"),QMessageBox::Yes | QMessageBox::No); - if(res!=QMessageBox::Yes) return; - } - curvesLock=true; - if (!GetEepromInterface()->getCapability(CustomCurves)){ - ui->curvetype_CB->setDisabled(true); - int count=0; - for (int j=0; j< GetEepromInterface()->getCapability(NumCurves3); j++) { - g_model.curves[count].count=3; - g_model.curves[count].custom=false; - memset(g_model.curves[j].name,0,sizeof(g_model.curves[j].name)); - for (int i=0; i<17; i++) { - g_model.curves[count].points[i].x=0; - g_model.curves[count].points[i].y=0; - } - count++; - } - for (int j=0; j< GetEepromInterface()->getCapability(NumCurves5); j++) { - g_model.curves[count].count=5; - g_model.curves[count].custom=false; - memset(g_model.curves[j].name,0,sizeof(g_model.curves[j].name)); - for (int i=0; i<17; i++) { - g_model.curves[count].points[i].x=0; - g_model.curves[count].points[i].y=0; - } - count++; - } - for (int j=0; j< GetEepromInterface()->getCapability(NumCurves9); j++) { - g_model.curves[count].count=9; - g_model.curves[count].custom=false; - memset(g_model.curves[j].name,0,sizeof(g_model.curves[j].name)); - for (int i=0; i<17; i++) { - g_model.curves[count].points[i].x=0; - g_model.curves[count].points[i].y=0; - } - count++; - } - for (int j=count; j<16; j++) { - g_model.curves[j].count=5; - g_model.curves[j].custom=false; - memset(g_model.curves[j].name,0,sizeof(g_model.curves[j].name)); - for (int i=0; i<17; i++) { - g_model.curves[j].points[i].x=0; - g_model.curves[j].points[i].y=0; - } - } - } else { - for (int j=0; j<16; j++) { - g_model.curves[j].count=5; - g_model.curves[j].custom=false; - memset(g_model.curves[j].name,0,sizeof(g_model.curves[j].name)); - for (int i=0; i<17; i++) { - g_model.curves[j].points[i].x=0; - g_model.curves[j].points[i].y=0; - } - } - } - for (int i=0; i<17; i++) { - spnx[i]->setMinimum(-100); - spnx[i]->setMaximum(100); - spnx[i]->setValue(0); - spny[i]->setValue(0); - } - currentCurve=0; - curvesLock=false; - if (GetEepromInterface()->getCapability(NumCurves3)>0) { - ui->curvetype_CB->setCurrentIndex(0); - } else { - ui->curvetype_CB->setCurrentIndex(2); - } - ui->cname_LE->clear(); - updateSettings(); - drawCurve(); -} - -void ModelEdit::setCurve(uint8_t c, int8_t ar[]) -{ - int len=sizeof(ar)/sizeof(int8_t); - if (GetEepromInterface()->getCapability(CustomCurves)) { - if (GetEepromInterface()->getCapability(NumCurves)>c) { - if (len<9) { - g_model.curves[c].count=5; - g_model.curves[c].custom=false; - for (int i=0; i< 5; i++) { - g_model.curves[c].points[i].y=ar[i]; - } - } else { - g_model.curves[c].count=5; - g_model.curves[c].custom=false; - for (int i=0; i< 5; i++) { - g_model.curves[c].points[i].y=ar[i]; - } - } - } - } else { - if (len<9) { - g_model.curves[c].count=5; - g_model.curves[c].custom=false; - for (int i=0; i< 5; i++) { - g_model.curves[c].points[i].y=ar[i]; - } - } else { - g_model.curves[c+8].count=5; - g_model.curves[c+8].custom=false; - for (int i=0; i< 5; i++) { - g_model.curves[c+8].points[i].y=ar[i]; - } - } - } -} - -void ModelEdit::setSwitch(unsigned int idx, unsigned int func, int v1, int v2) -{ - g_model.customSw[idx-1].func = func; - g_model.customSw[idx-1].val1 = v1; - g_model.customSw[idx-1].val2 = v2; -} - -void ModelEdit::applyNumericTemplate(uint64_t tpl) -{ - clearCurves(false); - clearExpos(false); - clearMixes(false); - int8_t heli_ar1[] = {-100, -20, 30, 70, 90}; - int8_t heli_ar2[] = {80, 70, 60, 70, 100}; - int8_t heli_ar3[] = {100, 90, 80, 90, 100}; - int8_t heli_ar4[] = {-30, -15, 0, 50, 100}; - int8_t heli_ar5[] = {-100, -50, 0, 50, 100}; - bool rx[10]; - for (int i=0; i<10 ; i++) { - rx[i]=false; - } - int thrsw=GetEepromInterface()->getCapability(GetThrSwitch); - MixData *md = &g_model.mixData[0]; - uint8_t spo2ch=(tpl & 0x0F); - tpl>>=4; - uint8_t spo1ch=(tpl & 0x0F); - tpl>>=4; - uint8_t fla2ch=(tpl & 0x0F); - tpl>>=4; - uint8_t fla1ch=(tpl & 0x0F); - tpl>>=4; - uint8_t rud2ch=(tpl & 0x0F); - tpl>>=4; - uint8_t ele2ch=(tpl & 0x0F); - tpl>>=4; - uint8_t ail2ch=(tpl & 0x0F); - tpl>>=4; - uint8_t chstyle=(tpl & 0x03); - tpl>>=2; - uint8_t gyro=(tpl & 0x03); - tpl>>=2; - uint8_t tailtype=(tpl & 0x03); - tpl>>=2; - uint8_t swashtype=(tpl & 0x07); - tpl>>=3; - uint8_t ruddertype=(tpl & 0x03); - tpl>>=2; - uint8_t spoilertype=(tpl & 0x3); - tpl>>=2; - uint8_t flaptype=(tpl & 0x03); - tpl>>=2; - uint8_t ailerontype=(tpl & 0x03); - tpl>>=2; - uint8_t enginetype=(tpl & 0x03); - tpl>>=2; - uint8_t modeltype=(tpl & 0x03); - - #define ICC(x) icc[(x)-1] - uint8_t icc[4] = {0}; - for(uint8_t i=1; i<=4; i++) //generate inverse array - for(uint8_t j=1; j<=4; j++) if(CC(i)==j) icc[j-1]=i; - - int ailerons; - int flaps; - int throttle; - int spoilers; - int elevators; - int rudders; - int sign; - uint8_t rxch; - switch (modeltype) { - case 0: - ailerons=ailerontype; - flaps=flaptype; - throttle=1; - switch (tailtype) { - case 0: - case 1: - rudders=1; - elevators=1; - break; - case 2: - rudders=1; - elevators=2; - break; - } - rxch=ICC(STK_RUD); - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6); - if (tailtype==1) { - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); - } - rx[rxch-1]=true; - rxch=ICC(STK_ELE); - if (tailtype==1) { - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6); - } - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); - rx[rxch-1]=true; - rxch=ICC(STK_THR); - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("THR").toAscii().data(),6); - rx[rxch-1]=true; - if (ail2ch > 0) { - rx[ail2ch-1]=true; - } - if (ele2ch > 0) { - rx[ele2ch-1]=true; - } - if (fla1ch > 0) { - rx[fla1ch-1]=true; - } - if (fla2ch > 0) { - rx[fla2ch-1]=true; - } - if (ailerons>0) { - rxch=ICC(STK_AIL); - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6); - rx[rxch-1]=true; - } - if (ailerons>1) { - if (ail2ch==0) { - for (int j=0; j<10 ; j++) { - if (!rx[j]) { - md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL2").toAscii().data(),6); - rx[j]=true; - break; - } - } - } else { - md=setDest(ail2ch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL2").toAscii().data(),6); - } - } - if (elevators>1) { - if (ele2ch==0) { - for (int j=0; j<10 ; j++) { - if (!rx[j]) { - md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();;strncpy(md->name, tr("ELE2").toAscii().data(),6); - rx[j]=true; - break; - } - } - }else{ - md=setDest(ele2ch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();;strncpy(md->name, tr("ELE2").toAscii().data(),6); - } - } - if (flaps>0) { - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->speedUp=4; md->speedDown=4; - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->speedUp=4; md->speedDown=4; - } - sign=-1; - for (uint8_t i=0; i< flaps; i++) { - sign*=-1; - int index; - if (i==0) { - index=fla1ch; - } else { - index=fla2ch; - } - if (index==0) { - for (int j=0; j<10 ; j++) { - if (!rx[j]) { - md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6); - rx[j]=true; - break; - } - } - } else { - md=setDest(index); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6); - } - } - break; - case 1: - setCurve(CURVE5(1),heli_ar1); - setCurve(CURVE5(2),heli_ar2); - setCurve(CURVE5(3),heli_ar3); - setCurve(CURVE5(4),heli_ar4); - setCurve(CURVE5(5),heli_ar5); - setCurve(CURVE5(6),heli_ar5); - switch (swashtype) { - case 0: - g_model.swashRingData.type = HELI_SWASH_TYPE_90; - break; - case 1: - g_model.swashRingData.type = HELI_SWASH_TYPE_120; - break; - case 2: - g_model.swashRingData.type = HELI_SWASH_TYPE_120X; - break; - case 3: - g_model.swashRingData.type = HELI_SWASH_TYPE_140; - break; - case 4: - g_model.swashRingData.type = HELI_SWASH_TYPE_NONE; - break; - } - g_model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10); - - if (chstyle==0) { - if (swashtype!=4) { - md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); - md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6); - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("PITCH").toAscii().data(),6); - } else { - md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); - md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6); - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("PITCH").toAscii().data(),6); - } - md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6); - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF; - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF; - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF; - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP; - switch (gyro) { - case 1: - md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6); - md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6); - break; - case 2: - md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6); - md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6); - break; - } - } else { - if (swashtype!=4) { - md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6); - md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); - md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("PITCH").toAscii().data(),6); - } else { - md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6); - md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); - md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("PITCH").toAscii().data(),6); - } - md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6); - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF; - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF; - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF; - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP; - switch (gyro) { - case 1: - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6); - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6); - break; - case 2: - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6); - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6); - break; - } - } - // collective - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF; - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF; - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF; - break; - case 2: - ailerons=ailerontype; - flaps=flaptype; - spoilers=spoilertype; - throttle=enginetype; - switch (tailtype) { - case 0: - case 1: - rudders=1; - elevators=1; - break; - case 2: - rudders=1; - elevators=2; - break; - } - if (throttle==1) { - rxch=ICC(STK_THR); - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("THR").toAscii().data(),6); - rx[rxch-1]=true; - } - rxch=ICC(STK_RUD); - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6); - if (tailtype==1) { - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6); - } - rx[rxch-1]=true; - rxch=ICC(STK_ELE); - if (tailtype==1) { - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); - } - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); - rx[rxch-1]=true; - if (ail2ch > 0) { - rx[ail2ch-1]=true; - } - if (ele2ch > 0) { - rx[ele2ch-1]=true; - } - if (fla1ch > 0) { - rx[fla1ch-1]=true; - } - if (fla2ch > 0) { - rx[fla2ch-1]=true; - } - if (spo1ch > 0) { - rx[spo1ch-1]=true; - } - if (spo2ch > 0) { - rx[spo2ch-1]=true; - } - - if (ailerons>0) { - rxch=ICC(STK_AIL); - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6); - rx[rxch-1]=true; - } - if (ailerons>1) { - if (ail2ch==0) { - for (int j=0; j<10 ; j++) { - if (!rx[j]) { - md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL2").toAscii().data(),6); - rx[j]=true; - break; - } - } - } else { - md=setDest(ail2ch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL2").toAscii().data(),6); - } - } - if (elevators>1) { - if (ele2ch==0) { - for (int j=0; j<10 ; j++) { - if (!rx[j]) { - md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE2").toAscii().data(),6); - rx[j]=true; - break; - } - } - } else { - md=setDest(ele2ch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE2").toAscii().data(),6); - } - } - if (flaps>0) { - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6);md->speedUp=4; md->speedDown=4; - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6);md->speedUp=4; md->speedDown=4; - } - sign=-1; - for (uint8_t i=0; i< flaps; i++) { - sign*=-1; - int index; - if (i==0) { - index=fla1ch; - } else { - index=fla2ch; - } - if (index==0) { - for (int j=0; j<10 ; j++) { - if (!rx[j]) { - md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6); - rx[j]=true; - break; - } - } - } else { - md=setDest(index); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6); - } - } - if (spoilers>0) { - md=setDest(12); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA);strncpy(md->name, tr("SPOIL").toAscii().data(),6); md->speedUp=4;;md->speedDown=4; - md=setDest(12); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA);strncpy(md->name, tr("SPOIL").toAscii().data(),6);md->speedUp=4;md->speedDown=4; - } - sign=-1; - for (uint8_t i=0; i< spoilers; i++) { - sign*=-1; - int index; - if (i==0) { - index=spo1ch; - } else { - index=spo2ch; - } - if (index==0) { - for (int j=0; j<10 ; j++) { - if (!rx[j]) { - md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_CH, 11); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("SPOIL%1").arg(i+1).toAscii().data(),6); - rx[j]=true; - break; - } - } - } else { - md=setDest(index); md->srcRaw=RawSource(SOURCE_TYPE_CH, 11); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("SPOIL%1").arg(i+1).toAscii().data(),6); - } - } - break; - case 3: - flaps=flaptype; - throttle=enginetype; - rudders=ruddertype; - if (throttle==1) { - rxch=ICC(STK_THR); - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("THR").toAscii().data(),6); - rx[rxch-1]=true; - } - rxch=ICC(STK_ELE); - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); - rx[rxch-1]=true; - rxch=ICC(STK_AIL); - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6); - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6); - rx[rxch-1]=true; - if (rudders>0) { - rxch=ICC(STK_RUD); - md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6); - rx[rxch-1]=true; - } - if (rud2ch > 0) { - rx[rud2ch-1]=true; - } - if (fla1ch > 0) { - rx[fla1ch-1]=true; - } - if (fla2ch > 0) { - rx[fla2ch-1]=true; - } - if (rudders>1) { - if (rud2ch==0) { - for (int j=0; j<10 ; j++) { - if (!rx[j]) { - md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD2").toAscii().data(),6); - rx[j]=true; - break; - } - } - } else { - md=setDest(rud2ch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD2").toAscii().data(),6); - } - } - if (flaps>0) { - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->sOffset=0; md->speedUp=4; - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->sOffset=0; md->speedUp=4; - } - sign=-1; - for (uint8_t i=0; i< flaps; i++) { - sign*=-1; - int index; - if (i==0) { - index=fla1ch; - } else { - index=fla2ch; - } - if (index==0) { - for (int j=0; j<10 ; j++) { - if (!rx[j]) { - md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->speedUp=4; md->speedDown=4; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6); - rx[j]=true; - break; - } - } - } else { - md=setDest(index); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->speedUp=4; md->speedDown=4; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6); - } - } - break; - } - updateHeliTab(); - updateCurvesTab(); - if (modeltype==1 && swashtype!=4) { - ui->tabWidget->setCurrentIndex(1); - } else { - ui->tabWidget->setCurrentIndex(4); - } - resizeEvent(); -} - -void ModelEdit::applyTemplate(uint8_t idx) -{ - int8_t heli_ar1[] = {-100, -20, 30, 70, 90}; - int8_t heli_ar2[] = {80, 70, 60, 70, 100}; - int8_t heli_ar3[] = {100, 90, 80, 90, 100}; - int8_t heli_ar4[] = {-30, -15, 0, 50, 100}; - int8_t heli_ar5[] = {-100, -50, 0, 50, 100}; - - int thrsw=GetEepromInterface()->getCapability(GetThrSwitch); - MixData *md = &g_model.mixData[0]; - - //CC(STK) -> vSTK - //ICC(vSTK) -> STK - #define ICC(x) icc[(x)-1] - uint8_t icc[4] = {0}; - for(uint8_t i=1; i<=4; i++) //generate inverse array - for(uint8_t j=1; j<=4; j++) if(CC(i)==j) icc[j-1]=i; - - - uint8_t j = 0; - - //Simple 4-Ch - if(idx==j++) { - if (md->destCh) - clearMixes(); - md=setDest(ICC(STK_RUD)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch(); - md=setDest(ICC(STK_ELE)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=100; md->swtch=RawSwitch(); - md=setDest(ICC(STK_THR)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(); - md=setDest(ICC(STK_AIL)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch(); - } - - //T-Cut - if(idx==j++) { - md=setDest(ICC(STK_THR)); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP; - } - - //sticky t-cut - if(idx==j++) { - md=setDest(ICC(STK_THR)); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_VIRTUAL, 12); md->mltpx=MLTPX_REP; - md=setDest(14); md->srcRaw=RawSource(SOURCE_TYPE_CH, 13); md->weight= 100; md->swtch=RawSwitch(); - md=setDest(14); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_VIRTUAL, 11); md->mltpx=MLTPX_REP; - md=setDest(14); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP; - setSwitch(0xB, CS_FN_VNEG, RawSource(SOURCE_TYPE_STICK, 2).toValue(), -99); - setSwitch(0xC, CS_FN_VPOS, RawSource(SOURCE_TYPE_CH, 13).toValue(), 0); - updateSwitchesTab(); - } - - //V-Tail - if(idx==j++) { - clearMixes(); - md=setDest(ICC(STK_THR)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(); - md=setDest(ICC(STK_AIL)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch(); - md=setDest(ICC(STK_RUD)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight= 100; md->swtch=RawSwitch(); - md=setDest(ICC(STK_RUD)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch(); - md=setDest(ICC(STK_ELE)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight= 100; md->swtch=RawSwitch(); - md=setDest(ICC(STK_ELE)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight= 100; md->swtch=RawSwitch(); - } - - //Elevon\\Delta - if(idx==j++) { - clearMixes(); - md=setDest(ICC(STK_THR)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(); - md=setDest(ICC(STK_RUD)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch(); - md=setDest(ICC(STK_ELE)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight= 100; md->swtch=RawSwitch(); - md=setDest(ICC(STK_ELE)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight= 100; md->swtch=RawSwitch(); - md=setDest(ICC(STK_AIL)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch(); - md=setDest(ICC(STK_AIL)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch(); - } - - //Heli Setup - if(idx==j++) { - clearMixes(); //This time we want a clean slate - clearCurves(); - - // Set up Mixes - // 3 cyclic channels - md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch(); - md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch(); - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch(); - - // rudder - md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch(); - - // throttle - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF; - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF; - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF; - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP; - - // gyro gain - md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); - md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); - - // collective - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF; - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF; - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF; - - g_model.swashRingData.type = HELI_SWASH_TYPE_120; - g_model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10); - - // set up Curves - setCurve(CURVE5(1),heli_ar1); - setCurve(CURVE5(2),heli_ar2); - setCurve(CURVE5(3),heli_ar3); - setCurve(CURVE5(4),heli_ar4); - setCurve(CURVE5(5),heli_ar5); - setCurve(CURVE5(6),heli_ar5); - - // make sure curves are redrawn - updateHeliTab(); - updateCurvesTab(); - resizeEvent(); - } - - //Heli Setup gyro gain control - if(idx==j++) { - clearMixes(); //This time we want a clean slate - clearCurves(); - - // Set up Mixes - // 3 cyclic channels - md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch(); - md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch(); - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch(); - - // rudder - md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch(); - - // throttle - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF; - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF; - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF; - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP; - - // gyro gain - md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100; - md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100; - - // collective - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF; - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF; - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF; - - g_model.swashRingData.type = HELI_SWASH_TYPE_120; - g_model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10); - - // set up Curves - setCurve(CURVE5(1),heli_ar1); - setCurve(CURVE5(2),heli_ar2); - setCurve(CURVE5(3),heli_ar3); - setCurve(CURVE5(4),heli_ar4); - setCurve(CURVE5(5),heli_ar5); - setCurve(CURVE5(6),heli_ar5); - - // make sure curves are redrawn - updateHeliTab(); - updateCurvesTab(); - resizeEvent(); - } - - // gyro gain control - if(idx==j++) { - int res = QMessageBox::question(this,tr("Clear Mixes?"),tr("Really clear existing mixes on CH6?"),QMessageBox::Yes | QMessageBox::No); - if(res!=QMessageBox::Yes) return; - // first clear mix on ch6 - bool found=true; - while (found) { - found=false; - for (int i=0; i< GetEepromInterface()->getCapability(Mixes); i++) { - if (g_model.mixData[i].destCh==6) { - gm_deleteMix(i); - found=true; - break; - } - } - } - md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100; - md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100; - } - - //Heli Setup futaba style - if(idx==j++) { - clearMixes(); //This time we want a clean slate - clearCurves(); - - // Set up Mixes - // 3 cyclic channels - md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch(); - md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch(); - md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch(); - - // rudder - md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch(); - - // throttle - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF; - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF; - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF; - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP; - - // gyro gain - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); - - // collective - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF; - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF; - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF; - - g_model.swashRingData.type = HELI_SWASH_TYPE_120; - g_model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10); - - // set up Curves - setCurve(CURVE5(1),heli_ar1); - setCurve(CURVE5(2),heli_ar2); - setCurve(CURVE5(3),heli_ar3); - setCurve(CURVE5(4),heli_ar4); - setCurve(CURVE5(5),heli_ar5); - setCurve(CURVE5(6),heli_ar5); - - // make sure curves are redrawn - updateHeliTab(); - updateCurvesTab(); - resizeEvent(); - } - - // Heli setup futaba style with gyro gain control - if(idx==j++) { - clearMixes(); //This time we want a clean slate - clearCurves(); - - // Set up Mixes - // 3 cyclic channels - md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch(); - md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch(); - md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch(); - - // rudder - md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch(); - - // throttle - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF; - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF; - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF; - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP; - - // gyro gain - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100; - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100; - - // collective - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF; - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF; - md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF; - - g_model.swashRingData.type = HELI_SWASH_TYPE_120; - g_model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10); - - // set up Curves - setCurve(CURVE5(1),heli_ar1); - setCurve(CURVE5(2),heli_ar2); - setCurve(CURVE5(3),heli_ar3); - setCurve(CURVE5(4),heli_ar4); - setCurve(CURVE5(5),heli_ar5); - setCurve(CURVE5(6),heli_ar5); - - // make sure curves are redrawn - updateHeliTab(); - updateCurvesTab(); - resizeEvent(); - } - - // gyro gain control futaba style - if(idx==j++) { - int res = QMessageBox::question(this,tr("Clear Mixes?"),tr("Really clear existing mixes on CH5?"),QMessageBox::Yes | QMessageBox::No); - if(res!=QMessageBox::Yes) return; - // first clear mix on ch6 - bool found=true; - while (found) { - found=false; - for (int i=0; i< GetEepromInterface()->getCapability(Mixes); i++) { - if (g_model.mixData[i].destCh==5) { - gm_deleteMix(i); - found=true; - break; - } - } - } - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100; - md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100; - } - - //Servo Test - if(idx==j++) { - md=setDest(15); md->srcRaw=RawSource(SOURCE_TYPE_CH, 15); md->weight= 100; md->speedUp = 8; md->speedDown = 8; md->swtch=RawSwitch(); - md=setDest(16); md->srcRaw=RawSource(SOURCE_TYPE_CUSTOM_SWITCH, 0); md->weight= 110; md->swtch=RawSwitch(); - md=setDest(16); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-110; md->swtch=RawSwitch(SWITCH_TYPE_VIRTUAL, 2); md->mltpx=MLTPX_REP; - md=setDest(16); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight= 110; md->swtch=RawSwitch(SWITCH_TYPE_VIRTUAL, 3); md->mltpx=MLTPX_REP; - setSwitch(1, CS_FN_LESS, RawSource(SOURCE_TYPE_CH, 14).toValue(), RawSource(SOURCE_TYPE_CH, 15).toValue()); - setSwitch(2, CS_FN_VPOS, RawSource(SOURCE_TYPE_CH, 14).toValue(), 105); - setSwitch(3, CS_FN_VNEG, RawSource(SOURCE_TYPE_CH, 14).toValue(), -105); - - // redraw switches tab - updateSwitchesTab(); - } - - //MultiCopter - if(idx==j++) { - if (md->destCh) - clearMixes(); - md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=50; md->swtch=RawSwitch(); //CH1 AIL - md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-50; md->swtch=RawSwitch(); //CH2 ELE - md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(); //CH3 THR - md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch(); //CH4 RUD - } -} - -void ModelEdit::ControlCurveSignal(bool flag) -{ - foreach(QSpinBox *sb, findChildren(QRegExp("curvePt[0-9]+"))) { - sb->blockSignals(flag); - } -} - -void ModelEdit::shrink() { -#if defined __APPLE__ - QSettings settings("companion9x", "companion9x"); - QPoint pos = settings.value("mepos", QPoint(0, 0)).toPoint(); - QSize size = settings.value("mesize", QSize(800, 625)).toSize(); - move(pos); - resize(size); -# else - const int height = QApplication::desktop()->height(); - QSettings settings("companion9x", "companion9x"); - QPoint pos = settings.value("mepos", QPoint(100, 100)).toPoint(); - QSize size = settings.value("mesize", QSize(800, 625)).toSize(); - if (size.height() < height) { - move(pos); - resize(size); - } else { - resize(0,0); - } -#endif - ui->curvePreview->repaint(); -} - -void ModelEdit::on_cname_LE_editingFinished() { - if (GetEepromInterface()->getCapability(HasCvNames)) { - int i=0; - for (i=0; icname_LE->text().toAscii().length(); i++) { - g_model.curves[currentCurve].name[i]=ui->cname_LE->text().toAscii().at(i); - } - g_model.curves[currentCurve].name[i]=0; - } - updateSettings(); -} - -void ModelEdit::on_curvetype_CB_currentIndexChanged(int index) { - if (curvesLock) - return; - int numcurves=GetEepromInterface()->getCapability(NumCurves); - if (numcurves==0) { - numcurves=16; - } - int numpoint[]={3,3,5,5,9,9,17,17}; - bool custom[]={false,true,false,true,false,true,false,true}; - int currpoints=g_model.curves[currentCurve].count; - bool currcustom=g_model.curves[currentCurve].custom; - curvesLock=true; - int totalpoints=0; - for (int i=0; i< numcurves; i++) { - if (i!=currentCurve) { - totalpoints+=g_model.curves[i].count; - if (g_model.curves[i].custom) { - totalpoints+=g_model.curves[i].count-2; - } - } - } - totalpoints+=numpoint[index]; - if (currcustom) { - totalpoints+=numpoint[index]-2; - } - int fwpoints=GetEepromInterface()->getCapability(NumCurvePoints); - if (fwpoints!=0) { - if (fwpointscurvetype_CB->setCurrentIndex(oldindex); - curvesLock=false; - return; - } - } - // let's be sure that for standard curves X values are set correctly. - if (!currcustom) { - for (int i=0; i< currpoints; i++) { - spnx[i]->setMinimum(-100); - spnx[i]->setMaximum(100); - spnx[i]->setValue(-100+((200*i)/(currpoints-1))); - } - } - if (numpoint[index]==currpoints) { - for (int i=0; i< currpoints; i++) { - spnx[i]->setMinimum(-100); - spnx[i]->setMaximum(100); - spnx[i]->setValue(-100+((200*i)/(currpoints-1))); - } - for (int i=currpoints; i< 17; i++) { - spnx[i]->setMinimum(-100); - spnx[i]->setMaximum(100); - spnx[i]->setValue(0); - spny[i]->setValue(0); - } - } else if (numpoint[index]>currpoints) { - for (int i=0; i< 17; i++) { - g_model.curves[currentCurve].points[i].x=spnx[i]->value(); - g_model.curves[currentCurve].points[i].y=spny[i]->value(); - spnx[i]->setMinimum(-100); - spnx[i]->setMaximum(100); - } - int currintervals=currpoints-1; - int diffpoints=numpoint[index]-currpoints; - int skip=diffpoints/currintervals; - for (int i=0; i< currpoints; i++) { - if (custom[index]) { - spnx[i+(skip*i)]->setValue(g_model.curves[currentCurve].points[i].x); - } else { - spnx[i+(skip*i)]->setValue(-100+(200*i)/currintervals); - } - spny[i+(skip*i)]->setValue(g_model.curves[currentCurve].points[i].y); - if (i>0) { - int diffx=spnx[i+(skip*i)]->value()-spnx[(i-1)+(skip*(i-1))]->value(); - int diffy=spny[i+(skip*i)]->value()-spny[(i-1)+(skip*(i-1))]->value(); - for (int j=1; j<= skip; j++) { - spny[(i-1)+skip*(i-1)+j]->setValue(spny[(i-1)+(skip*(i-1))]->value()+((diffy*j)/(skip+1))); - spnx[(i-1)+skip*(i-1)+j]->setValue(spnx[(i-1)+(skip*(i-1))]->value()+((diffx*j)/(skip+1))); - } - } - } - } else { - int intervals=numpoint[index]-1; - int diffpoints=currpoints-numpoint[index]; - int skip=diffpoints/intervals; - for (int i=0; i< numpoint[index]; i++) { - spnx[i]->setMinimum(-100); - spnx[i]->setMaximum(100); - if (custom[index]) { - spnx[i]->setValue(spnx[i+skip*i]->value()); - } else { - spnx[i]->setValue(-100+(200*i)/intervals); - } - spny[i]->setValue(spny[i+skip*i]->value()); - } - for (int i=numpoint[index]; i< 17; i++) { - spnx[i]->setValue(0); - spny[i]->setValue(0); - } - } - curvesLock=false; - for (int i=0; i< 17; i++) { - g_model.curves[currentCurve].points[i].x=spnx[i]->value(); - g_model.curves[currentCurve].points[i].y=spny[i]->value(); - } - g_model.curves[currentCurve].count=numpoint[index]; - g_model.curves[currentCurve].custom=custom[index]; - setCurrentCurve(currentCurve); - if (redrawCurve) - drawCurve(); - updateSettings(); -} - -void ModelEdit::closeEvent(QCloseEvent *event) -{ - QSettings settings("companion9x", "companion9x"); - settings.setValue("mepos", pos()); - settings.setValue("mesize", size()); - event->accept(); -} - -void ModelEdit::wizard() -{ - uint64_t result=0xffffffff; - modelConfigDialog *mcw = new modelConfigDialog(radioData, &result, this); - mcw->exec(); - if (result!=0xffffffff) { - applyNumericTemplate(result); - updateSettings(); - tabMixes(); - } else if (this->isNew) { - memset(&g_model, 0, sizeof(ModelData)); - accept(); - } -} diff --git a/companion/src/modeledit.h b/companion/src/modeledit.h deleted file mode 100644 index f6a2785c3..000000000 --- a/companion/src/modeledit.h +++ /dev/null @@ -1,393 +0,0 @@ -#ifndef MODELEDIT_H -#define MODELEDIT_H - -#include -#include -#include -#include "eeprominterface.h" -#include "mixerslist.h" -#ifdef PHONON -#include -#include -#include -#endif -namespace Ui { - class ModelEdit; -} - -class ModelEdit : public QDialog -{ - Q_OBJECT - -public: - explicit ModelEdit(RadioData &radioData, uint8_t id , bool openWizard =false, bool inNew =false, QWidget *parent = 0); - ~ModelEdit(); - - void applyBaseTemplate(); - bool redrawCurve; - void drawCurve(); - bool drawing; - bool mixInserted; - bool expoInserted; - bool openWizard; - bool isNew; -private: - Ui::ModelEdit *ui; - - QSpinBox* spny[17]; - QSpinBox* spnx[17]; - QSpinBox* gvarsSB[9][5]; - QSpinBox* reSB[9][2]; - QGroupBox* barsGB[3]; - QGroupBox* numsGB[3]; - QComboBox* barsCB[12]; - QDoubleSpinBox* minSB[12]; - QDoubleSpinBox* maxSB[12]; - QComboBox* csf[36]; - QComboBox* csw[C9X_NUM_CSW]; - MixersList *ExposlistWidget; - - MixersList *MixerlistWidget; - - RadioData &radioData; - int id_model; - ModelData g_model; - GeneralSettings g_eeGeneral; - bool protocolEditLock; - bool protocol2EditLock; - bool trainerEditLock; - bool switchEditLock; - bool heliEditLock; - bool limitEditLock; - bool phasesLock; - bool telemetryLock; - bool curvesLock; - bool phononLock; - bool fsLock; - bool modelImageLock; - bool plot_curve[16]; - int selectedSwitch; - int selectedFunction; - QDoubleSpinBox * cswitchValue[C9X_NUM_CSW]; - QDoubleSpinBox * cswitchOffset[C9X_NUM_CSW]; - QComboBox * cswitchAnd[C9X_NUM_CSW]; - QDoubleSpinBox * cswitchDuration[C9X_NUM_CSW]; - QDoubleSpinBox * cswitchDelay[C9X_NUM_CSW]; - QComboBox * cswitchSource1[C9X_NUM_CSW]; - QComboBox * cswitchSource2[C9X_NUM_CSW]; - QLabel * fswLabel[C9X_MAX_CUSTOM_FUNCTIONS]; - QComboBox * fswtchSwtch[C9X_MAX_CUSTOM_FUNCTIONS]; - QComboBox * fswtchFunc[C9X_MAX_CUSTOM_FUNCTIONS]; - QCheckBox * fswtchParamGV[C9X_MAX_CUSTOM_FUNCTIONS]; - QDoubleSpinBox * fswtchParam[C9X_MAX_CUSTOM_FUNCTIONS]; - QPushButton * playBT[C9X_MAX_CUSTOM_FUNCTIONS]; - QComboBox * fswtchParamT[C9X_MAX_CUSTOM_FUNCTIONS]; - QComboBox * fswtchParamArmT[C9X_MAX_CUSTOM_FUNCTIONS]; - QCheckBox * fswtchEnable[C9X_MAX_CUSTOM_FUNCTIONS]; - QComboBox * fswtchRepeat[C9X_MAX_CUSTOM_FUNCTIONS]; - QComboBox * fswtchGVmode[C9X_MAX_CUSTOM_FUNCTIONS]; - - QSpinBox * safetySwitchValue[C9X_NUM_CHNOUT]; - QComboBox * safetySwitchSwtch[C9X_NUM_CHNOUT]; - QSlider * phasesTrimSliders[9][4]; - QSpinBox * phasesTrimValues[9][4]; - - void setupExposListWidget(); - void setupMixerListWidget(); - float getBarStep(int barId); - void telBarUpdate(); - - void updateSettings(); - void tabModelEditSetup(); - void tabPhases(); - void tabExpos(); - void tabMixes(); - void tabHeli(); - void tabLimits(); - void tabCurves(); - void tabCustomSwitches(); - void tabSafetySwitches(); - void tabCustomFunctions(); - void tabTelemetry(); - void tabTemplates(); - void updateCurvesTab(); - void setSwitchWidgetVisibility(int i); - void setLimitMinMax(); - void updateSelectedSwitch(); - void updateSwitchesTab(); - void updateHeliTab(); - void updateA1Fields(); - void updateA2Fields(); - - void launchSimulation(); - void resizeEvent(QResizeEvent *event = 0); - - - int currentCurve; - void setCurrentCurve(int curveId); - - QSpinBox *getNodeSB(int i); - QSpinBox *getNodeSBX(int i); - - int getExpoIndex(unsigned int dch); - bool gm_insertExpo(int idx); - void gm_deleteExpo(int index); - void gm_openExpo(int index); - int gm_moveExpo(int idx, bool dir); - void exposDeleteList(QList list); - QList createExpoListFromSelected(); - void setSelectedByExpoList(QList list); - - int getMixerIndex(unsigned int dch); - bool gm_insertMix(int idx); - void gm_deleteMix(int index); - void gm_openMix(int index); - int gm_moveMix(int idx, bool dir); - void mixersDeleteList(QList list); - QList createMixListFromSelected(); - void setSelectedByMixList(QList list); - - void applyTemplate(uint8_t idx); - void applyNumericTemplate(uint64_t tpl); - MixData* setDest(uint8_t dch); - void setCurve(uint8_t c, int8_t ar[]); - void setSwitch(unsigned int idx, unsigned int func, int v1, int v2); - void on_phaseSwitch_currentIndexChanged(unsigned int phase, int index); - void on_phaseFadeIn_valueChanged(unsigned int phase, int value); - void on_phaseFadeOut_valueChanged(unsigned int phase, int value); - void on_phaseTrim_valueChanged(unsigned int phase, unsigned int stick, int value); - void on_phaseTrimUse_currentIndexChanged(unsigned int phase, unsigned int stick, int index, QSpinBox *trim, QSlider *slider); - void displayOnePhaseOneTrim(unsigned int phase_idx, unsigned int trim_idx, QComboBox *trimUse, QSpinBox *trimVal, QSlider *trimSlider); - void displayOnePhase(unsigned int phase_idx, QLineEdit *name, QComboBox *sw, QDoubleSpinBox *fadeIn, QDoubleSpinBox *fadeOut, QComboBox *trim1Use, QSpinBox *trim1, QLabel *trim1Label, QSlider *trim1Slider, QComboBox *trim2Use, QSpinBox *trim2, QLabel *trim2Label, QSlider *trim2Slider, QComboBox *trim3Use, QSpinBox *trim3, QLabel *trim3Label, QSlider *trim3Slider, QComboBox *trim4Use, QSpinBox *trim4, QLabel *trim4Label, QSlider *trim4Slider, QLabel *gv1Label, QComboBox *gv1Use,QSpinBox *gv1Value, QLabel *gv2Label, QComboBox *gv2Use,QSpinBox *gv2Value, QLabel *gv3Label, QComboBox *gv3Use,QSpinBox *gv3Value, QLabel *gv4Label, QComboBox *gv4Use,QSpinBox *gv4Value, QLabel *gv5Label, QComboBox *gv5Use,QSpinBox *gv5Value, QLabel *re1Label, QComboBox *re1Use,QSpinBox *re1Value, QLabel *re2Label, QComboBox *re2Use,QSpinBox *re2Value,bool doConnect); - - void incSubtrim(uint8_t idx, int16_t inc); -#ifdef PHONON - Phonon::MediaObject *clickObject; - Phonon::AudioOutput *clickOutput; -#endif - -signals: - void modelValuesChanged(); - -private slots: - void clearExpos(bool ask=true); - void clearMixes(bool ask=true); - void clearCurves(bool ask=true); - void on_modelVoice_SB_editingFinished(); - void on_T2ThrTrgChkB_toggled(bool checked); - void on_ttraceCB_currentIndexChanged(int index); - void on_instantTrim_CB_currentIndexChanged(int index); - void on_extendedLimitsChkB_toggled(bool checked); - void on_extendedTrimsChkB_toggled(bool checked); - void on_thrwarnChkB_toggled(bool checked); - void on_thrrevChkB_toggled(bool checked); - void on_timer1Perm_toggled(bool checked); - void on_timer2Perm_toggled(bool checked); - void on_timer1Minute_toggled(bool checked); - void on_timer2Minute_toggled(bool checked); - void on_timer1CountDownBeep_toggled(bool checked); - void on_timer2CountDownBeep_toggled(bool checked); - void fssldEdited(); - void fssbEdited(); - void fssldValueChanged(); - void fssbValueChanged(); - void resetCurve(); - void editCurve(); - void playMusic(); -#ifdef PHONON - void mediaPlayer_state(Phonon::State newState, Phonon::State oldState); -#endif - - void plotCurve(bool checked); -//phases slots - void phaseName_editingFinished(); - void phaseSwitch_currentIndexChanged(); - void phaseFadeIn_editingFinished(); - void phaseFadeOut_editingFinished(); - void phaseTrimUse_currentIndexChanged(); - void phaseTrim_valueChanged(); - void phaseTrimSlider_valueChanged(); - void GVName_editingFinished(); - void GVSource_currentIndexChanged(); - void phaseGVValue_editingFinished(); - void phaseGVUse_currentIndexChanged(); - void phaseREValue_editingFinished(); - void phaseREUse_currentIndexChanged(); - - void mimeMixerDropped(int index, const QMimeData *data, Qt::DropAction action); - void pasteMixerMimeData(const QMimeData * mimeData, int destIdx); - - void mimeExpoDropped(int index, const QMimeData *data, Qt::DropAction action); - void pasteExpoMimeData(const QMimeData * mimeData, int destIdx); - - void on_pushButton_clicked(); - - void exposDelete(bool ask=true); - void exposCut(); - void exposCopy(); - void exposPaste(); - void exposDuplicate(); - void expoOpen(QListWidgetItem *item = NULL); - void expoAdd(); - - void cswDelete(); - void cswCopy(); - void cswPaste(); - void cswCut(); - - void fswDelete(); - void fswCopy(); - void fswPaste(); - void fswCut(); - - void moveExpoUp(); - void moveExpoDown(); - - void mixersDelete(bool ask=true); - void mixersCut(); - void mixersCopy(); - void mixersPaste(); - void mixersDuplicate(); - void mixerOpen(); - void mixerAdd(); - void moveMixUp(); - void moveMixDown(); - - void expolistWidget_customContextMenuRequested(QPoint pos); - void expolistWidget_doubleClicked(QModelIndex index); - void expolistWidget_KeyPress(QKeyEvent *event); - - - void mixerlistWidget_customContextMenuRequested(QPoint pos); - void mixerlistWidget_doubleClicked(QModelIndex index); - void mixerlistWidget_KeyPress(QKeyEvent *event); - - void csw_customContextMenuRequested(QPoint pos); - void fsw_customContextMenuRequested(QPoint pos); - - - void curvePointEdited(); - void on_ca_ctype_CB_currentIndexChanged(); - void on_ca_apply_PB_clicked(); - - void on_cname_LE_editingFinished(); - void limitOffsetEdited(); - void limitSymEdited(); - void limitEdited(); - void limitNameEdited(); - void limitInvEdited(); - void ppmcenterEdited(); - void customSwitchesEdited(); - void safetySwitchesEdited(); - void customFunctionEdited(); - void refreshCustomFunction(int index, bool modified=false); - void startupSwitchEdited(); - void exposEdited(); - void mixesEdited(); - void heliEdited(); - - void on_bcRUDChkB_toggled(bool checked); - void on_bcELEChkB_toggled(bool checked); - void on_bcTHRChkB_toggled(bool checked); - void on_bcAILChkB_toggled(bool checked); - void on_bcP1ChkB_toggled(bool checked); - void on_bcP2ChkB_toggled(bool checked); - void on_bcP3ChkB_toggled(bool checked); - void on_bcP4ChkB_toggled(bool checked); - void on_bcREaChkB_toggled(bool checked); - void on_bcREbChkB_toggled(bool checked); - - void on_thrExpoChkB_toggled(bool checked); - void on_thrTrimChkB_toggled(bool checked); - void on_a1UnitCB_currentIndexChanged(int index); - void on_a2UnitCB_currentIndexChanged(int index); - void on_a1RatioSB_editingFinished(); - void on_a1RatioSB_valueChanged(); - void on_a1CalibSB_editingFinished(); - void on_a11LevelCB_currentIndexChanged(int index); - void on_a11GreaterCB_currentIndexChanged(int index); - void on_a11ValueSB_editingFinished(); - void on_a12LevelCB_currentIndexChanged(int index); - void on_a12GreaterCB_currentIndexChanged(int index); - void on_a12ValueSB_editingFinished(); - void on_a2RatioSB_editingFinished(); - void on_a2RatioSB_valueChanged(); - void on_a2CalibSB_editingFinished(); - void on_a21LevelCB_currentIndexChanged(int index); - void on_a21GreaterCB_currentIndexChanged(int index); - void on_a21ValueSB_editingFinished(); - void on_a22LevelCB_currentIndexChanged(int index); - void on_a22GreaterCB_currentIndexChanged(int index); - void on_a22ValueSB_editingFinished(); - void on_frskyProtoCB_currentIndexChanged(int index); - void on_frskyUnitsCB_currentIndexChanged(int index); - void on_frskyBladesCB_currentIndexChanged(int index); - void on_frskyCurrentCB_currentIndexChanged(int index); - void on_frskyVoltCB_currentIndexChanged(int index); - void on_AltitudeToolbar_ChkB_toggled(bool checked); - void on_rssiAlarm1CB_currentIndexChanged(int index); - void on_rssiAlarm2CB_currentIndexChanged(int index); - void on_rssiAlarm1SB_editingFinished(); - void on_rssiAlarm2SB_editingFinished(); - void on_AltitudeGPS_ChkB_toggled(bool checked); - void on_showNames_Ckb_toggled(bool checked); - void on_varioSourceCB_currentIndexChanged(int index); - void on_varioLimitMin_DSB_editingFinished(); - void on_varioLimitMax_DSB_editingFinished(); - void on_varioLimitCenterMin_DSB_editingFinished(); - void on_varioLimitMinOff_ChkB_toggled(bool checked); - void on_varioLimitCenterMax_DSB_editingFinished(); - void telBarCBcurrentIndexChanged(int index); - void ScreenTypeCBcurrentIndexChanged(int index); - void telMaxSBeditingFinished(); - void telMinSBeditingFinished(); - void customFieldEdited(); - void on_ppmDelaySB_editingFinished(); - void on_ppmDelaySB_2_editingFinished(); - void on_ppmDelaySB_3_editingFinished(); - void on_numChannelsSB_editingFinished(); - void on_numChannelsSB_2_editingFinished(); - void on_numChannelsSB_3_editingFinished(); - void on_numChannelsStart_editingFinished(); - void on_numChannelsStart_2_editingFinished(); - void on_numChannelsStart_3_editingFinished(); -// void void ModelEdit::on_numChannelsStart_3_editingFinished(); - void on_protocolCB_currentIndexChanged(int index); - void on_protocolCB_2_currentIndexChanged(int index); - void on_protocolCB_3_currentIndexChanged(int index); - void on_pulsePolCB_currentIndexChanged(int index); - void on_pulsePolCB_2_currentIndexChanged(int index); - void on_pulsePolCB_3_currentIndexChanged(int index); - void on_ppmFrameLengthDSB_editingFinished(); - void on_ppmFrameLengthDSB_2_editingFinished(); - void on_ppmFrameLengthDSB_3_editingFinished(); - void on_DSM_Type_currentIndexChanged(int index); - void on_DSM_Type_2_currentIndexChanged(int index); - void on_pxxRxNum_editingFinished(); - void on_pxxRxNum_2_editingFinished(); - void on_fsm1CB_currentIndexChanged(int index); - void on_fsm2CB_currentIndexChanged(int index); - - // TODO void on_trimSWCB_currentIndexChanged(int index); - void on_trimIncCB_currentIndexChanged(int index); - void on_timer1DirCB_currentIndexChanged(int index); - void on_timer1ModeCB_currentIndexChanged(int index); - void on_timer1ValTE_editingFinished(); - void on_timer1ModeBCB_currentIndexChanged(int index); - void on_timer2DirCB_currentIndexChanged(int index); - void on_timer2ModeCB_currentIndexChanged(int index); - void on_timer2ValTE_editingFinished(); - void on_timer2ModeBCB_currentIndexChanged(int index); - void on_modelNameLE_editingFinished(); - void on_modelImage_CB_currentIndexChanged(int index); - void on_phases_currentChanged(int index); - void on_tabWidget_currentChanged(int index); - void on_templateList_doubleClicked(QModelIndex index); - void ControlCurveSignal(bool flag); - void shrink(); - void wizard(); - void closeEvent(QCloseEvent *event); - void on_curvetype_CB_currentIndexChanged(int index); -}; - -#endif // MODELEDIT_H diff --git a/companion/src/modeledit.ui b/companion/src/modeledit.ui deleted file mode 100644 index e4f3119f1..000000000 --- a/companion/src/modeledit.ui +++ /dev/null @@ -1,24504 +0,0 @@ - - - ModelEdit - - - - 0 - 0 - 1130 - 698 - - - - - 0 - 0 - - - - Dialog - - - - :/icon.png:/icon.png - - - true - - - - - - Simulate - - - - :/images/simulate.png:/images/simulate.png - - - - - - - QTabWidget::North - - - 0 - - - - Setup - - - - - - true - - - 0 - - - true - - - false - - - - ModelSetup - - - - - - Timer2 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Disable Throttle Warning - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - - - - Extended Limits - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Throttle Trim - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Throttle Source - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::Horizontal - - - - - - - Center beep - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Trim Increment - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - Exponential - - - - - Extra Fine - - - - - Fine - - - - - Medium - - - - - Coarse - - - - - - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - Switch startup Warning - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 6 - - - 0 - - - - - - 0 - 0 - - - - Qt::Vertical - - - - - - - - 0 - 0 - - - - Qt::Vertical - - - - - - - - 0 - 0 - - - - Qt::Vertical - - - - - - - - 0 - 0 - - - - 3POS - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - Check - - - Qt::AlignCenter - - - - - - - Qt::LeftToRight - - - THR - - - - - - - - ON - - - - - OFF - - - - - - - - Qt::LeftToRight - - - RUD - - - - - - - Qt::LeftToRight - - - ELE - - - - - - - Qt::LeftToRight - - - AIL - - - - - - - Qt::LeftToRight - - - GEA - - - - - - - true - - - - ID0 - - - - - ID1 - - - - - ID2 - - - - - - - - - 0 - 0 - - - - Qt::Vertical - - - - - - - - 0 - 0 - - - - Qt::Vertical - - - - - - - - 0 - 0 - - - - Qt::Vertical - - - - - - - - - QLayout::SetMinimumSize - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - ON - - - - - OFF - - - - - - - - - 0 - 0 - - - - SB - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - SD - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - SA - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - Check - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 0 - 50 - - - - - 16777215 - 50 - - - - 0 - - - 2 - - - 1 - - - 0 - - - Qt::Vertical - - - true - - - QSlider::TicksBothSides - - - 1 - - - - - - - - 0 - 0 - - - - - 0 - 50 - - - - - 16777215 - 50 - - - - 0 - - - 2 - - - 1 - - - 0 - - - Qt::Vertical - - - true - - - QSlider::TicksBothSides - - - 1 - - - - - - - - 0 - 0 - - - - SC - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 0 - 50 - - - - - 16777215 - 50 - - - - 0 - - - 2 - - - 1 - - - 0 - - - Qt::Vertical - - - true - - - QSlider::TicksBothSides - - - 1 - - - - - - - - 0 - 0 - - - - SG - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - SE - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 0 - 50 - - - - - 16777215 - 50 - - - - 0 - - - 2 - - - 1 - - - 0 - - - Qt::Vertical - - - true - - - QSlider::TicksBothSides - - - 1 - - - - - - - - 0 - 0 - - - - - 0 - 50 - - - - - 16777215 - 50 - - - - 0 - - - 2 - - - 1 - - - 0 - - - Qt::Vertical - - - true - - - QSlider::TicksBothSides - - - 1 - - - - - - - - 0 - 0 - - - - SF - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 0 - 50 - - - - - 16777215 - 50 - - - - 0 - - - 2 - - - 1 - - - 0 - - - Qt::Vertical - - - true - - - QSlider::TicksBothSides - - - 1 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 0 - 50 - - - - - 16777215 - 50 - - - - 0 - - - 1 - - - 1 - - - 1 - - - 0 - - - Qt::Vertical - - - true - - - QSlider::TicksBothSides - - - 1 - - - - - - - - - - - REa - - - - - - - RUD - - - - - - - ELE - - - - - - - THR - - - - - - - AIL - - - - - - - P1 - - - - - - - P2 - - - - - - - P3 - - - - - - - REb - - - - - - - RS - - - - - - - - - - - - - - - - Throttle2Trig - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 16777215 - 16777215 - - - - - - - - - 0 - 0 - - - - - - - - - - - Instant Trim - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - - - - - - - - - - - Extended Trims - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - - - - - - - - - - - - Reverse Throttle Operation - - - - - - - Reverse throttle operation. -If this is checked the throttle will be reversed. Idle will be forward, trim will also be reversed and the throttle warning will be reversed as well. - - - - - - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 20 - 0 - - - - - - - - - - - - - - - Master - - - - - Slave - - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - usec - - - 100 - - - 800 - - - 50 - - - 300 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - PPM delay - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Pulse Shift (polarity) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Trainer Mode - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - mSec - - - 1 - - - 12.500000000000000 - - - 32.500000000000000 - - - 0.500000000000000 - - - 22.500000000000000 - - - - - - - - 0 - 0 - - - - - Negative - - - - - Positive - - - - - - - - PPM Frame Length - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - font-weight:bold; - - - Master/Trainer Port - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - ch - - - 1 - - - 16 - - - 2 - - - 8 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - ch - - - 1 - - - 32 - - - 1 - - - 8 - - - - - - - - 0 - 0 - - - - Channels - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Start - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - - - - - - - - - PPM delay - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - Polarity - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - Negative - - - - - Positive - - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - usec - - - 100 - - - 800 - - - 50 - - - 300 - - - - - - - - 0 - 0 - - - - PPM Frame Length - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - mSec - - - 1 - - - 12.500000000000000 - - - 32.500000000000000 - - - 0.500000000000000 - - - 22.500000000000000 - - - - - - - - 0 - 0 - - - - - - - 1 - - - 125 - - - 1 - - - 1 - - - - - - - Qt::Horizontal - - - - 5 - 20 - - - - - - - - - 0 - 0 - - - - DSM Type - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - LP4/LP5 - - - - - DSM2only - - - - - DSM2/DSMX - - - - - - - - - 0 - 0 - - - - RX Number - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - PPM - - - - - Silver A - - - - - Silver B - - - - - Silver C - - - - - Trac 09 - - - - - - - - font-weight: bold; - - - RF Module 1 - - - - - - - - 0 - 0 - - - - Protocol - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 20 - 0 - - - - - - - - - - Start - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - ch - - - 1 - - - 32 - - - 1 - - - 1 - - - - - - - - 0 - 0 - - - - Channels - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - ch - - - 1 - - - 16 - - - 2 - - - 8 - - - - - - - - - - - - - - - - - - PPM delay - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - usec - - - 100 - - - 800 - - - 50 - - - 300 - - - - - - - - 0 - 0 - - - - - Negative - - - - - Positive - - - - - - - - - 0 - 0 - - - - Polarity - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - RX Number - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - - - 1 - - - 125 - - - 1 - - - 1 - - - - - - - - 0 - 0 - - - - DSM Type - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - LP4/LP5 - - - - - DSM2only - - - - - DSM2/DSMX - - - - - - - - font-weight:bold; - - - RF Module 2 - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 20 - 0 - - - - - - - - - 0 - 0 - - - - PPM Frame Length - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - mSec - - - 1 - - - 12.500000000000000 - - - 32.500000000000000 - - - 0.500000000000000 - - - 22.500000000000000 - - - - - - - Qt::Horizontal - - - - 5 - 20 - - - - - - - - - PPM - - - - - Silver A - - - - - Silver B - - - - - Silver C - - - - - Trac 09 - - - - - - - - - 0 - 0 - - - - Protocol - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Start - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - ch - - - 1 - - - 32 - - - 1 - - - 1 - - - - - - - - 0 - 0 - - - - Channels - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - ch - - - 1 - - - 16 - - - 2 - - - 8 - - - - - - - - - - - - - - Throttle Expo - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Model Name - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Timer1 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 2 - - - - - true - - - QDateTimeEdit::MinuteSection - - - mm:ss - - - - - - - - Count Down - - - - - Count Up - - - - - - - - - - - - 0 - 0 - - - - TriggerB - - - - - - - - - - Persistent - - - - - - - (00:00:00) - - - - - - - MinuteBeep - - - - - - - CountDownBeep - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 2 - - - - - true - - - QDateTimeEdit::MinuteSection - - - mm:ss - - - - - - - - Count Down - - - - - Count Up - - - - - - - - - - - - 0 - 0 - - - - TriggerB - - - - - - - - - - Persistent - - - - - - - (00:00:00) - - - - - - - MinuteBeep - - - - - - - CountDownBeep - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 0 - 0 - - - - 10 - - - - - - - Model Voice - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - - - 260 - - - 511 - - - 1 - - - 260 - - - - - - - Model Image - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 64 - 32 - - - - - 64 - 32 - - - - QFrame::Panel - - - QFrame::Raised - - - - - - true - - - - - - - - - - - - - Failsafe - - - - - - External module - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - -100 - - - 100 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - -100 - - - 100 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - CH12 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - -100 - - - 100 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - CH01 - - - - - - - CH04 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - -100 - - - 100 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - CH10 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - -100 - - - 100 - - - - - - - CH02 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - -100 - - - 100 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - -100 - - - 100 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - CH11 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - CH03 - - - - - - - CH09 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - -100 - - - 100 - - - - - - - CH05 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - -100 - - - 100 - - - - - - - CH06 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - -100 - - - 100 - - - - - - - CH07 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - -100 - - - 100 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - -100 - - - 100 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - CH08 - - - - - - - Qt::Vertical - - - - - - - CH13 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - -100 - - - 100 - - - - - - - CH14 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - -100 - - - 100 - - - - - - - CH15 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - -100 - - - 100 - - - - - - - CH16 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - true - - - -100 - - - 100 - - - - - - - Qt::Vertical - - - - - - - Qt::Vertical - - - - - - - - - Failsafe Mode - - - - - - - - Hold - - - - - Custom - - - - - No Pulses - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 1 - - - - - - - - Internal Module - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - CH14 - - - - - - - CH09 - - - - - - - CH02 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - CH01 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - CH04 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - CH12 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - CH10 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - CH03 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - CH11 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - CH05 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - CH06 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - CH07 - - - - - - - CH08 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - CH13 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - CH15 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - CH16 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - Qt::Vertical - - - - - - - Qt::Vertical - - - - - - - Qt::Vertical - - - - - - - - - Failsafe Mode - - - - - - - - Hold - - - - - Custom - - - - - No Pulses - - - - - - - - - - - - - - - - - - Heli Setup - - - - - - Qt::Horizontal - - - - 647 - 20 - - - - - - - - Swash Ring - - - - - - - - - - Swash Type - - - - - - - - Off - - - - - 120 - - - - - 120X - - - - - 140 - - - - - 90 - - - - - - - - - - Invert Elevator - - - - - - - Invert Aileron - - - - - - - Invert Collective - - - - - - - - - Invert - - - - - - - Collective - - - - - - - - - - 0 - - - 100 - - - 1 - - - 0 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - Flight Modes - - - - - - - - 0 - - - - Flight Mode 0 (Default) - - - - - - - - Fade In - - - - - - - 1 - - - - - - - 1 - - - - - - - Fade Out - - - - - - - 6 - - - - - - - Flight Mode Name - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Qt::Vertical - - - QSlider::TicksBothSides - - - 25 - - - - - - - Qt::Vertical - - - false - - - false - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - - trim1 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - 1 - 0 - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - trim2 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 1 - 0 - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - trim4 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 1 - 0 - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - trim3 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 1 - 0 - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Horizontal - - - - - - - - - - - - GVAR1 - - - - - - - 6 - - - - - - - 6 - - - - - - - -100 - - - 100 - - - - - - - GVAR2 - - - - - - - 6 - - - - - - - -100 - - - 100 - - - - - - - GVAR3 - - - - - - - -100 - - - 100 - - - - - - - GVAR4 - - - - - - - 6 - - - - - - - -100 - - - 100 - - - - - - - GVAR5 - - - - - - - 6 - - - - - - - -100 - - - 100 - - - - - - - - - - - - - - - - - - - - - - -100 - - - 100 - - - - - - - - - - GVAR6 - - - - - - - 6 - - - - - - - GVAR7 - - - - - - - - - - - - - 6 - - - - - - - -100 - - - 100 - - - - - - - - - - - - - Rotary encoder B - - - - - - - -100 - - - 100 - - - - - - - -100 - - - 100 - - - - - - - Rotary encoder A - - - - - - - - - - - - - FM 1 - - - - - - - - 1 - - - - - - - 6 - - - - - - - Flight Mode Name - - - - - - - Switch - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Fade Out - - - - - - - 1 - - - - - - - Fade In - - - - - - - - - - - Qt::Vertical - - - QSlider::TicksBothSides - - - 25 - - - - - - - Qt::Vertical - - - false - - - false - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - - trim1 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - trim2 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - trim4 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - trim3 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - - - - - - GVAR1 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR2 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR3 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR4 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR5 - - - - - - - - - - -100 - - - 100 - - - - - - - - - - - - - Rotary encoder A - - - - - - - - - - Rotary encoder B - - - - - - - -100 - - - 100 - - - - - - - -100 - - - 100 - - - - - - - - - - - - - - - Qt::Horizontal - - - - - - - - FM 2 - - - - - - - - 1 - - - - - - - 1 - - - - - - - Fade Out - - - - - - - 6 - - - - - - - Flight Mode Name - - - - - - - Switch - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Fade In - - - - - - - - - - - Qt::Vertical - - - QSlider::TicksBothSides - - - 25 - - - - - - - Qt::Vertical - - - false - - - false - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - - trim1 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - trim2 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - trim4 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - trim3 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - Qt::Horizontal - - - - - - - - - - - - GVAR1 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR2 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR3 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR4 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR5 - - - - - - - - - - -100 - - - 100 - - - - - - - - - - - - - Rotary encoder A - - - - - - - - - - -100 - - - 100 - - - - - - - Rotary encoder B - - - - - - - - - - -100 - - - 100 - - - - - - - - - - - - - FM 3 - - - - - - - - Fade Out - - - - - - - Fade In - - - - - - - 6 - - - - - - - Flight Mode Name - - - - - - - Switch - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - 1 - - - - - - - 1 - - - - - - - - - - - Qt::Vertical - - - QSlider::TicksBothSides - - - 25 - - - - - - - Qt::Vertical - - - false - - - false - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - - trim1 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - trim2 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - trim4 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - trim3 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - Qt::Horizontal - - - - - - - - - - - - GVAR1 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR2 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR3 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR4 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR5 - - - - - - - - - - -100 - - - 100 - - - - - - - - - - - - - Rotary encoder A - - - - - - - - - - -100 - - - 100 - - - - - - - Rotary encoder B - - - - - - - - - - -100 - - - 100 - - - - - - - - - - - - - FM 4 - - - - - - - - Flight Mode Name - - - - - - - 6 - - - - - - - Switch - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Fade In - - - - - - - Fade Out - - - - - - - 1 - - - - - - - 1 - - - - - - - - - - - Qt::Vertical - - - QSlider::TicksBothSides - - - 25 - - - - - - - Qt::Vertical - - - false - - - false - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - - trim1 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - trim2 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - trim4 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - trim3 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - Qt::Horizontal - - - - - - - - - - - - GVAR1 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR2 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR3 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR4 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR5 - - - - - - - - - - -100 - - - 100 - - - - - - - - - - - - - Rotary encoder A - - - - - - - - - - -100 - - - 100 - - - - - - - Rotary encoder B - - - - - - - - - - -100 - - - 100 - - - - - - - - - - - - - FM 5 - - - - - - - - Qt::Vertical - - - QSlider::TicksBothSides - - - 25 - - - - - - - Qt::Vertical - - - false - - - false - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - - trim1 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - trim2 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - trim4 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - trim3 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - - - Flight Mode Name - - - - - - - 6 - - - - - - - Switch - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - 1 - - - - - - - 1 - - - - - - - Fade In - - - - - - - Fade Out - - - - - - - - - Qt::Horizontal - - - - - - - - - - - - GVAR1 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR2 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR3 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR4 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR5 - - - - - - - - - - -100 - - - 100 - - - - - - - - - - - - - Rotary encoder A - - - - - - - - - - -100 - - - 100 - - - - - - - Rotary encoder B - - - - - - - - - - -100 - - - 100 - - - - - - - - - - - - - FM 6 - - - - - - - - Qt::Vertical - - - QSlider::TicksBothSides - - - 25 - - - - - - - Qt::Vertical - - - false - - - false - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - - trim1 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - trim2 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - trim4 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - trim3 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - 0 - 0 - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - - - 6 - - - - - - - Flight Mode Name - - - - - - - Switch - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Fade In - - - - - - - 1 - - - - - - - 1 - - - - - - - Fade Out - - - - - - - - - - - - - - GVAR1 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR2 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR3 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR4 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR5 - - - - - - - - - - -100 - - - 100 - - - - - - - - - - - - - Rotary encoder A - - - - - - - - - - -100 - - - 100 - - - - - - - Rotary encoder B - - - - - - - - - - -100 - - - 100 - - - - - - - - - - - - Qt::Horizontal - - - - - - - - FM 7 - - - - - - Qt::Horizontal - - - - - - - - - 6 - - - - - - - Flight Mode Name - - - - - - - Switch - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - 1 - - - - - - - 1 - - - - - - - Fade In - - - - - - - Fade Out - - - - - - - - - - - Qt::Vertical - - - QSlider::TicksBothSides - - - 25 - - - - - - - Qt::Vertical - - - false - - - false - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - - trim1 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - trim2 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - trim4 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - trim3 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - - - - - - GVAR1 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR2 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR3 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR4 - - - - - - - - - - -100 - - - 100 - - - - - - - GVAR5 - - - - - - - - - - -100 - - - 100 - - - - - - - - - - - - - Rotary encoder A - - - - - - - - - - -100 - - - 100 - - - - - - - Rotary encoder B - - - - - - - - - - -100 - - - 100 - - - - - - - - - - - - - FM 8 - - - - - - - - Qt::Vertical - - - QSlider::TicksBothSides - - - 25 - - - - - - - Qt::Vertical - - - false - - - false - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - - trim1 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - trim2 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - trim4 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - trim3 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Qt::AlignCenter - - - true - - - -896 - - - 896 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - Qt::Horizontal - - - - - - - - - 1 - - - - - - - Flight Mode Name - - - - - - - Switch - - - - - - - - - - 6 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Fade In - - - - - - - Fade Out - - - - - - - 1 - - - - - - - - - - - - - - GVAR5 - - - - - - - -100 - - - 100 - - - - - - - - - - -100 - - - 100 - - - - - - - -100 - - - 100 - - - - - - - -100 - - - 100 - - - - - - - - - - GVAR4 - - - - - - - GVAR2 - - - - - - - - - - - - - GVAR1 - - - - - - - -100 - - - 100 - - - - - - - GVAR3 - - - - - - - - - - - - - - - - Rotary encoder B - - - - - - - - - - -100 - - - 100 - - - - - - - - - - -100 - - - 100 - - - - - - - Rotary encoder A - - - - - - - - - - - - - - - - - - - Sticks - - - - - - - - - - Mixes - - - - - - - - - Show channels names in mixes - - - - - - - - Limits - - - - - - true - - - - - 0 - 0 - 998 - 481 - - - - - 0 - 0 - - - - - - - - 0 - 0 - - - - - - - - QLayout::SetMinimumSize - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - Offset - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - Min - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - Max - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - Invert - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - Center - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - Sym - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - Channel - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - - - Qt::Vertical - - - - 20 - 1 - - - - - - - - - 0 - 0 - - - - - - - - QLayout::SetMinimumSize - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - Offset - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - Min - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - Max - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - Invert - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - 1 - - - -100.000000000000000 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - - --- - - - - - INV - - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - Center - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1375 - - - 1625 - - - 1500 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - Sym - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - Channel - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - - - - - - 0 - 0 - - - - 6 - - - true - - - - - - - - - - - - - - - Curves - - - - - - - 1 - 0 - - - - Qt::ScrollBarAsNeeded - - - true - - - - - 0 - 0 - 969 - 467 - - - - - 0 - 0 - - - - - - - Qt::Horizontal - - - - 5 - 20 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - - 0 - 0 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 0 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 0 - 127 - - - - - - - 150 - 147 - 145 - - - - - - - - Curve 1 - - - - - - - - - - - - 127 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - - - 127 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - - - 127 - 0 - 0 - - - - - - - 150 - 147 - 145 - - - - - - - - Curve 3 - - - - - - - - 0 - 0 - - - - - - - - :/images/clear.png:/images/clear.png - - - - 14 - 14 - - - - - - - - true - - - - 0 - 0 - - - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 127 - - - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 127 - - - - - - - - - 146 - 145 - 144 - - - - - - - 0 - 0 - 127 - - - - - - - 165 - 164 - 164 - - - - - - - 151 - 150 - 149 - - - - - - - 244 - 244 - 244 - - - - - - - - - - - - - - - - 0 - 0 - - - - - - - - :/images/clear.png:/images/clear.png - - - - 14 - 14 - - - - - - - - - 0 - 0 - - - - - - - - :/images/clear.png:/images/clear.png - - - - 14 - 14 - - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 128 - 0 - 0 - - - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 128 - 0 - 0 - - - - - - - - - 146 - 145 - 144 - - - - - - - 127 - 0 - 0 - - - - - - - 165 - 164 - 164 - - - - - - - 151 - 150 - 149 - - - - - - - 244 - 244 - 244 - - - - - - - - - - - - - - - - 0 - 0 - - - - - - - - :/images/clear.png:/images/clear.png - - - - 14 - 14 - - - - - - - - - - - - - 0 - 127 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 127 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 127 - 0 - - - - - - - 150 - 147 - 145 - - - - - - - - Curve 2 - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 127 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 127 - 0 - - - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 127 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 127 - 0 - - - - - - - - - 146 - 145 - 144 - - - - - - - 0 - 127 - 0 - - - - - - - 165 - 164 - 164 - - - - - - - 151 - 150 - 149 - - - - - - - 244 - 244 - 244 - - - - - - - - - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 0 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 0 - 127 - - - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 0 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 0 - 127 - - - - - - - - - 146 - 145 - 144 - - - - - - - 127 - 0 - 127 - - - - - - - 165 - 164 - 164 - - - - - - - 151 - 150 - 149 - - - - - - - 244 - 244 - 244 - - - - - - - - - - - - - - - - 0 - 0 - - - - - - - - :/images/clear.png:/images/clear.png - - - - 14 - 14 - - - - - - - - - - - - - 0 - 127 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 127 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 127 - 127 - - - - - - - 150 - 147 - 145 - - - - - - - - Curve 4 - - - - - - - - 0 - 0 - - - - - - - - :/images/clear.png:/images/clear.png - - - - 14 - 14 - - - - - - - - - - - - - 255 - 0 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - - - 255 - 0 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - - - 255 - 0 - 127 - - - - - - - 150 - 147 - 145 - - - - - - - - Curve 15 - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 0 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 0 - 127 - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 0 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 0 - 127 - - - - - - - - - 146 - 145 - 144 - - - - - - - 255 - 0 - 127 - - - - - - - 165 - 164 - 164 - - - - - - - 151 - 150 - 149 - - - - - - - 244 - 244 - 244 - - - - - - - - - - - - - - - - 0 - 0 - - - - - - - - :/images/clear.png:/images/clear.png - - - - 14 - 14 - - - - - - - - - - - - - 255 - 127 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - - - 255 - 127 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - - - 255 - 127 - 0 - - - - - - - 150 - 147 - 145 - - - - - - - - Curve 16 - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 127 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 127 - 0 - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 127 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 127 - 0 - - - - - - - - - 146 - 145 - 144 - - - - - - - 255 - 127 - 0 - - - - - - - 165 - 164 - 164 - - - - - - - 151 - 150 - 149 - - - - - - - 244 - 244 - 244 - - - - - - - - - - - - - - - - 0 - 0 - - - - - - - - :/images/clear.png:/images/clear.png - - - - 14 - 14 - - - - - - - - - - - - - 127 - 127 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - - - 127 - 127 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - - - 127 - 127 - 0 - - - - - - - 150 - 147 - 145 - - - - - - - - Curve 6 - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 127 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 127 - 0 - - - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 127 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 127 - 0 - - - - - - - - - 146 - 145 - 144 - - - - - - - 127 - 127 - 0 - - - - - - - 165 - 164 - 164 - - - - - - - 151 - 150 - 149 - - - - - - - 244 - 244 - 244 - - - - - - - - - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 127 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 128 - 128 - - - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 127 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 128 - 128 - - - - - - - - - 146 - 145 - 144 - - - - - - - 0 - 127 - 127 - - - - - - - 165 - 164 - 164 - - - - - - - 151 - 150 - 149 - - - - - - - 244 - 244 - 244 - - - - - - - - - - - - - - - - - - - - 127 - 0 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - - - 127 - 0 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - - - 127 - 0 - 127 - - - - - - - 150 - 147 - 145 - - - - - - - - Curve 5 - - - - - - - - 0 - 0 - - - - - - - - :/images/clear.png:/images/clear.png - - - - 14 - 14 - - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 123 - 0 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 0 - 255 - - - - - - - - - 255 - 255 - 255 - - - - - - - 123 - 0 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 0 - 255 - - - - - - - - - 146 - 145 - 144 - - - - - - - 123 - 0 - 255 - - - - - - - 165 - 164 - 164 - - - - - - - 151 - 150 - 149 - - - - - - - 244 - 244 - 244 - - - - - - - - - - - - - - - - - - - - 0 - 128 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 128 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 128 - 255 - - - - - - - 150 - 147 - 145 - - - - - - - - Curve 9 - - - - - - - - - - - - 0 - 255 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 255 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 255 - 0 - - - - - - - 150 - 147 - 145 - - - - - - - - Curve 11 - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 255 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 255 - 0 - - - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 255 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 255 - 0 - - - - - - - - - 146 - 145 - 144 - - - - - - - 0 - 255 - 0 - - - - - - - 165 - 164 - 164 - - - - - - - 151 - 150 - 149 - - - - - - - 244 - 244 - 244 - - - - - - - - - - - - - - - - 0 - 0 - - - - - - - - :/images/clear.png:/images/clear.png - - - - 14 - 14 - - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 255 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 255 - 127 - - - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 255 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 255 - 127 - - - - - - - - - 146 - 145 - 144 - - - - - - - 0 - 255 - 127 - - - - - - - 165 - 164 - 164 - - - - - - - 151 - 150 - 149 - - - - - - - 244 - 244 - 244 - - - - - - - - - - - - - - - - - - - - 0 - 255 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 255 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 255 - 127 - - - - - - - 150 - 147 - 145 - - - - - - - - Curve 12 - - - - - - - - 0 - 0 - - - - - - - - :/images/clear.png:/images/clear.png - - - - 14 - 14 - - - - - - - - - - - - - 127 - 127 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - - - 127 - 127 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - - - 127 - 127 - 127 - - - - - - - 150 - 147 - 145 - - - - - - - - Curve 7 - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 127 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 127 - 127 - - - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 127 - 127 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 127 - 127 - - - - - - - - - 146 - 145 - 144 - - - - - - - 127 - 127 - 127 - - - - - - - 165 - 164 - 164 - - - - - - - 151 - 150 - 149 - - - - - - - 244 - 244 - 244 - - - - - - - - - - - - - - - - 0 - 0 - - - - - - - - :/images/clear.png:/images/clear.png - - - - 14 - 14 - - - - - - - - - - - - - 0 - 0 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 0 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 0 - 0 - 255 - - - - - - - 150 - 147 - 145 - - - - - - - - Curve 8 - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 255 - - - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 255 - - - - - - - - - 146 - 145 - 144 - - - - - - - 0 - 0 - 255 - - - - - - - 165 - 164 - 164 - - - - - - - 151 - 150 - 149 - - - - - - - 244 - 244 - 244 - - - - - - - - - - - - - - - - 0 - 0 - - - - - - - - :/images/clear.png:/images/clear.png - - - - 14 - 14 - - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 128 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 127 - 255 - - - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 128 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 127 - 255 - - - - - - - - - 146 - 145 - 144 - - - - - - - 0 - 128 - 255 - - - - - - - 165 - 164 - 164 - - - - - - - 151 - 150 - 149 - - - - - - - 244 - 244 - 244 - - - - - - - - - - - - - - - - 0 - 0 - - - - - - - - :/images/clear.png:/images/clear.png - - - - 14 - 14 - - - - - - - - - - - - - 123 - 0 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 123 - 0 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - - - 123 - 0 - 255 - - - - - - - 150 - 147 - 145 - - - - - - - - Curve 10 - - - - - - - - 0 - 0 - - - - - - - - :/images/clear.png:/images/clear.png - - - - 14 - 14 - - - - - - - - - - - - - 127 - 255 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - - - 127 - 255 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - - - 127 - 255 - 0 - - - - - - - 150 - 147 - 145 - - - - - - - - Curve 13 - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 255 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 255 - 0 - - - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 255 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 127 - 255 - 0 - - - - - - - - - 146 - 145 - 144 - - - - - - - 127 - 255 - 0 - - - - - - - 165 - 164 - 164 - - - - - - - 151 - 150 - 149 - - - - - - - 244 - 244 - 244 - - - - - - - - - - - - - - - - 0 - 0 - - - - - - - - :/images/clear.png:/images/clear.png - - - - 14 - 14 - - - - - - - - - - - - - 255 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - - - 255 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - - - 255 - 0 - 0 - - - - - - - 150 - 147 - 145 - - - - - - - - Curve 14 - - - - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 0 - 0 - - - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 255 - 255 - - - - - - - 255 - 0 - 0 - - - - - - - - - 146 - 145 - 144 - - - - - - - 255 - 0 - 0 - - - - - - - 165 - 164 - 164 - - - - - - - 151 - 150 - 149 - - - - - - - 244 - 244 - 244 - - - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 5 - - - - - - - - - - - - Curve type - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 3 points - - - - - 3 points custom - - - - - 5 points - - - - - 5 points custom - - - - - 9 points - - - - - 9 points custom - - - - - 17 points - - - - - 17 points custom - - - - - - - - Curve name - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 6 - - - - - - - - 0 - 0 - - - - - 400 - 400 - - - - Qt::AlignCenter - - - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 20 - 0 - - - - - - - - 0 - - - 2 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true - - - -100 - - - 100 - - - - - - - Qt::Vertical - - - - 5 - 20 - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 5 - 20 - - - - - - - - - 50 - false - - - - false - - - Curve Creator - - - - - - Y at X=100 - - - - - - - - Both - - - - - x>0 - - - - - x<0 - - - - - - - - - Linear - - - - - Single Expo - - - - - Symmetrical f(x)=-f(-x) - - - - - Symmetrical f(x)=f(-x) - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Apply - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Side - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Y at X=-100 - - - - - - - Y at X=0 - - - - - - - - 0 - 0 - - - - -100 - - - 100 - - - - - - - Curve type - - - - - - - Coefficient - - - - - - - - 0 - 0 - - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - -100 - - - 100 - - - - - - - - 0 - 0 - - - - -100 - - - 100 - - - - - - - - - - - - - - Clear All Curves - - - - :/images/clear.png:/images/clear.png - - - - - - - - Custom switches - - - - - - true - - - - - 0 - 0 - 716 - 482 - - - - - - - - 0 - 0 - - - - - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CS9 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - Duration - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSF - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSD - - - - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - AND - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - V2 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - V1 - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CS6 - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - false - - - QFrame::Panel - - - QFrame::Raised - - - CS1 - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CS8 - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CS7 - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSA - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSB - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSC - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CS5 - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - Function - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CS3 - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CS2 - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSE - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSG - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CS4 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - Delay - - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CST - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - AND - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - V2 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - V1 - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSM - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSP - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSH - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSO - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSN - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSQ - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSR - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSS - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSL - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSK - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - Function - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSJ - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSI - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSU - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSV - - - - - - - - 0 - 0 - - - - true - - - Qt::CustomContextMenu - - - QFrame::Panel - - - QFrame::Raised - - - CSW - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - Duration - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - Delay - - - - - - - - - - - - Qt::Vertical - - - - 20 - 1 - - - - - - - - - - - - - Safety Switches - - - - - - - 0 - 0 - - - - true - - - - - 0 - 0 - 163 - 354 - - - - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - Channel - - - Qt::AlignCenter - - - 3 - - - - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - Switch - - - Qt::AlignCenter - - - 3 - - - - - - - QFrame::Panel - - - QFrame::Raised - - - 0 - - - Value - - - Qt::AlignCenter - - - 3 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - CH1 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - CH2 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - CH3 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - CH4 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - CH5 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - CH6 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - CH7 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - CH8 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - CH9 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - CH10 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - CH11 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - CH12 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - CH13 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - CH14 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - CH15 - - - - - - - - 0 - 0 - - - - QFrame::Panel - - - QFrame::Raised - - - CH16 - - - - - - - Qt::Vertical - - - - 20 - 1 - - - - - - - - - - - - - Custom Functions - - - - - - true - - - - - 0 - 0 - 526 - 48 - - - - - - - - 0 - 0 - - - - - - - - - - QLayout::SetNoConstraint - - - - - QFrame::Panel - - - QFrame::Raised - - - Switch - - - Qt::AlignCenter - - - - - - - QFrame::Panel - - - QFrame::Raised - - - Function - - - Qt::AlignCenter - - - - - - - QFrame::Panel - - - QFrame::Raised - - - Param - - - Qt::AlignCenter - - - - - - - QFrame::Panel - - - QFrame::Raised - - - Enable - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - 0 - 0 - - - - - - - - - - QLayout::SetNoConstraint - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - QFrame::Panel - - - QFrame::Raised - - - Switch - - - Qt::AlignCenter - - - - - - - QFrame::Panel - - - QFrame::Raised - - - Function - - - Qt::AlignCenter - - - - - - - QFrame::Panel - - - QFrame::Raised - - - Param - - - Qt::AlignCenter - - - - - - - QFrame::Panel - - - QFrame::Raised - - - Enable - - - - - - - - - - - - Qt::Vertical - - - - 20 - 579 - - - - - - - - - - - - - Telemetry - - - - - - - - QLayout::SetMinimumSize - - - - - - 0 - 0 - - - - Serial Protocol - - - - 1 - - - 1 - - - - - - - - 0 - 0 - - - - Volt source - - - - - - - - 0 - 0 - - - - - Metric - - - - - Imperial - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Current source - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - Protocol - - - - - - - - 0 - 0 - - - - - NONE - - - - - A1 - - - - - A2 - - - - - FAS - - - - - - - - - 0 - 0 - - - - - None - - - - - FrSky Sensor Hub - - - - - - - - - 0 - 0 - - - - - A1 - - - - - A2 - - - - - FAS - - - - - CEL - - - - - - - - - 0 - 0 - - - - - 2 - - - - - 3 - - - - - 4 - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Units - - - - - - - - 0 - 0 - - - - Blades - - - - - - - - - - - - - 0 - 0 - - - - Altimetry / Vario - - - - 1 - - - 1 - - - - - - - - 0 - 0 - - - - - Alti - - - - - Alti+ - - - - - Vario - - - - - A1 - - - - - A2 - - - - - - - - - - - 0 - 0 - - - - Sink Max - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - 1 - - - -2.000000000000000 - - - 0.000000000000000 - - - 0.100000000000000 - - - -0.500000000000000 - - - - - - - - 0 - 0 - - - - 1 - - - -1.000000000000000 - - - 2.000000000000000 - - - 0.100000000000000 - - - 0.500000000000000 - - - - - - - - 0 - 0 - - - - 0 - - - 3.000000000000000 - - - 17.000000000000000 - - - 10.000000000000000 - - - - - - - - 0 - 0 - - - - 0 - - - -17.000000000000000 - - - -3.000000000000000 - - - -10.000000000000000 - - - - - - - - 0 - 0 - - - - Off - - - - - - - - 0 - 0 - - - - Climb Max - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - Sink Min - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - Climb Min - - - Qt::AlignCenter - - - - - - - - - Vario source - - - - - - - Vario limits - - - - - - - - - - 0 - 0 - - - - Use GPS as altitude source - - - - - - - - 0 - 0 - - - - Display altitude in toolbar - - - - - - - - - - - - - - - - QLayout::SetMinimumSize - - - - - - 0 - 0 - - - - true - - - - - - A1 - - - false - - - - 1 - - - 1 - - - - - - - - 0 - 0 - - - - Unit - - - - - - - - 0 - 0 - - - - Max Value - - - - - - - - 0 - 0 - - - - Alarm 1 - - - - - - - - 0 - 0 - - - - - ---- - - - - - Yellow - - - - - Orange - - - - - Red - - - - - - - - - 0 - 0 - - - - - < - - - - - > - - - - - - - - - 0 - 0 - - - - Alarm 2 - - - - - - - - 0 - 0 - - - - - ---- - - - - - Yellow - - - - - Orange - - - - - Red - - - - - - - - - 0 - 0 - - - - - < - - - - - > - - - - - - - - - 0 - 0 - - - - Min Value - - - - - - - true - - - - 0 - 0 - - - - 0 - - - 255.000000000000000 - - - - - - - - 0 - 0 - - - - 2 - - - -12.800000000000001 - - - 12.699999999999999 - - - 0.100000000000000 - - - - - - - true - - - - 0 - 0 - - - - 0 - - - 255.000000000000000 - - - - - - - true - - - - 0 - 0 - - - - 0 - - - 255.000000000000000 - - - - - - - - 0 - 0 - - - - - Volts (V) - - - - - Amps (A) - - - - - Speed (m/s or ft/s) - - - - - Raw (-) - - - - - Speed (km/h or miles/h) - - - - - Meters (m or ft) - - - - - Temp (°) - - - - - Fuel (%) - - - - - mAmps (mA) - - - - - - - - - - - - - A2 - - - - 1 - - - 1 - - - - - - - - 0 - 0 - - - - Unit - - - - - - - - 0 - 0 - - - - Max Value - - - - - - - - 0 - 0 - - - - Alarm 1 - - - - - - - - 0 - 0 - - - - - ---- - - - - - Yellow - - - - - Orange - - - - - Red - - - - - - - - - 0 - 0 - - - - - < - - - - - > - - - - - - - - - 0 - 0 - - - - Alarm 2 - - - - - - - - 0 - 0 - - - - - ---- - - - - - Yellow - - - - - Orange - - - - - Red - - - - - - - - - 0 - 0 - - - - - < - - - - - > - - - - - - - - - 0 - 0 - - - - Min Value - - - - - - - true - - - - 0 - 0 - - - - 0 - - - 255.000000000000000 - - - - - - - - 0 - 0 - - - - 2 - - - -0.800000000000000 - - - 0.700000000000000 - - - 0.100000000000000 - - - - - - - true - - - - 0 - 0 - - - - 0 - - - 255.000000000000000 - - - - - - - true - - - - 0 - 0 - - - - 0 - - - 255.000000000000000 - - - - - - - - 0 - 0 - - - - - Volts (V) - - - - - Amps (A) - - - - - Speed (m/s or ft/s) - - - - - Raw (-) - - - - - Speed (km/h or miles/h) - - - - - Meters (m or ft) - - - - - Temp (°) - - - - - Fuel (%) - - - - - mAmps (mA) - - - - - - - - - - - - - - 0 - 0 - - - - RSSI - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - - - Alarm 1 - - - - - - - - 0 - 0 - - - - - ---- - - - - - Yellow - - - - - Orange - - - - - Red - - - - - - - - true - - - - 0 - 0 - - - - - - - 20 - - - 80 - - - 1 - - - 50 - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Alarm 2 - - - - - - - - 0 - 0 - - - - - ---- - - - - - Yellow - - - - - Orange - - - - - Red - - - - - - - - true - - - - 0 - 0 - - - - - - - 20 - - - 80 - - - 1 - - - 50 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - - - 0 - 0 - - - - - - - - 1 - - - 1 - - - - - - 0 - 0 - - - - 0 - - - - Telemetry screen 1 - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Custom Screen Type - - - - - - - - 0 - 0 - - - - - 90 - 0 - - - - - Nums - - - - - Bars - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - - - - - - Source - - - Qt::AlignCenter - - - - - - - Min - - - Qt::AlignCenter - - - - - - - Gauge - - - Qt::AlignCenter - - - - - - - Max - - - Qt::AlignCenter - - - - - - - - - - 0 - - - - - - - false - - - Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),) - - - - QFrame::Panel - - - QFrame::Raised - - - Gauge 1 - - - Qt::AlignCenter - - - - - - - 0 - - - - - - - - - - 0 - - - - - - - false - - - Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),) - - - - QFrame::Panel - - - QFrame::Raised - - - Gauge 2 - - - Qt::AlignCenter - - - - - - - 0 - - - - - - - - - - 0 - - - - - - - false - - - Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),) - - - - QFrame::Panel - - - QFrame::Raised - - - Gauge 3 - - - Qt::AlignCenter - - - - - - - 0 - - - - - - - - - - 0 - - - - - - - false - - - Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),) - - - - QFrame::Panel - - - QFrame::Raised - - - Gauge 4 - - - Qt::AlignCenter - - - - - - - 0 - - - - - - - - - - - Telemetry screen 2 - - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - - - - - - Source - - - Qt::AlignCenter - - - - - - - Min - - - Qt::AlignCenter - - - - - - - Gauge - - - Qt::AlignCenter - - - - - - - Max - - - Qt::AlignCenter - - - - - - - - - - 0 - - - - - - - false - - - Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),) - - - - QFrame::Panel - - - QFrame::Raised - - - Gauge 1 - - - Qt::AlignCenter - - - - - - - 0 - - - - - - - - - - 0 - - - - - - - false - - - Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),) - - - - QFrame::Panel - - - QFrame::Raised - - - Gauge 2 - - - Qt::AlignCenter - - - - - - - 0 - - - - - - - - - - 0 - - - - - - - false - - - Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),) - - - - QFrame::Panel - - - QFrame::Raised - - - Gauge 3 - - - Qt::AlignCenter - - - - - - - 0 - - - - - - - - - - 0 - - - - - - - false - - - Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),) - - - - QFrame::Panel - - - QFrame::Raised - - - Gauge 4 - - - Qt::AlignCenter - - - - - - - 0 - - - - - - - - - - - - - 0 - 0 - - - - Custom Screen Type - - - - - - - - 0 - 0 - - - - - 90 - 0 - - - - - Nums - - - - - Bars - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - Telemetry screen 3 - - - - - - - - - 0 - 0 - - - - Custom Screen Type - - - - - - - - 0 - 0 - - - - - 90 - 0 - - - - - Nums - - - - - Bars - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - - - - - - - - - - Source - - - Qt::AlignCenter - - - - - - - Min - - - Qt::AlignCenter - - - - - - - Gauge - - - Qt::AlignCenter - - - - - - - Max - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - - - - 0 - - - - - - - false - - - Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),) - - - - QFrame::Panel - - - QFrame::Raised - - - Gauge 1 - - - Qt::AlignCenter - - - - - - - 0 - - - - - - - - - - 0 - - - - - - - false - - - Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),) - - - - QFrame::Panel - - - QFrame::Raised - - - Gauge 2 - - - Qt::AlignCenter - - - - - - - 0 - - - - - - - - - - 0 - - - - - - - false - - - Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),) - - - - QFrame::Panel - - - QFrame::Raised - - - Gauge 3 - - - Qt::AlignCenter - - - - - - - 0 - - - - - - - - - - 0 - - - - - - - false - - - Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),) - - - - QFrame::Panel - - - QFrame::Raised - - - Gauge 4 - - - Qt::AlignCenter - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 1 - - - - - - - - - Templates - - - - - - - - - - - - - tabWidget - modelNameLE - modelVoice_SB - timer1ValTE - timer1DirCB - timer1ModeCB - timer1ModeBCB - timer1Perm - timer1Minute - timer1CountDownBeep - timer2ValTE - timer2DirCB - timer2ModeCB - timer2ModeBCB - timer2Perm - timer2Minute - timer2CountDownBeep - swwarn0_CB - swwarn1_ChkB - swwarn2_ChkB - swwarn3_ChkB - swwarn4_CB - swwarn5_ChkB - swwarn6_ChkB - tswwarn0_CB - chkSA - chkSB - chkSC - chkSD - chkSE - chkSF - chkSG - bcRUDChkB - bcELEChkB - bcTHRChkB - bcAILChkB - bcP1ChkB - bcP2ChkB - bcP3ChkB - bcP4ChkB - bcREaChkB - bcREbChkB - swashTypeCB - swashCollectiveCB - swashRingValSB - swashInvertELE - swashInvertAIL - swashInvertCOL - phase0Name - phase0Trim2Slider - phase0Trim1Slider - phase0Trim4Slider - phase0Trim3Slider - phase0Trim2Value - phase0Trim3Value - phase0Trim1Value - phase0Trim4Value - phase0GV1Source - phase0GV1Name - phase0GV1Value - phase0GV2Source - phase0GV2Name - phase0GV2Value - phase0GV3Source - phase0GV3Name - phase0GV3Value - phase0GV4Source - phase0GV4Name - phase0GV4Value - phase0GV5Source - phase0GV5Name - phase0GV5Value - phase0RE1Value - phase0RE2Value - phase1Name - phase1Switch - phase1Trim2Slider - phase1Trim1Slider - phase1Trim4Slider - phase1Trim3Slider - phase1Trim2Use - phase1Trim2Value - phase1Trim3Use - phase1Trim3Value - phase1Trim1Use - phase1Trim1Value - phase1Trim4Use - phase1Trim4Value - phase1GV1Use - phase1GV1Value - phase1GV2Use - phase1GV2Value - phase1GV3Use - phase1GV3Value - phase1GV4Use - phase1GV4Value - phase1GV5Use - phase1GV5Value - phase1RE1Use - phase1RE1Value - phase1RE2Use - phase1RE2Value - phase2Name - phase2Switch - phase2Trim2Slider - phase2Trim1Slider - phase2Trim4Slider - phase2Trim3Slider - phase2Trim2Use - phase2Trim2Value - phase2Trim3Use - phase2Trim3Value - phase2Trim1Use - phase2Trim1Value - phase2Trim4Use - phase2Trim4Value - phase2GV1Use - phase2GV1Value - phase2GV2Use - phase2GV2Value - phase2GV3Use - phase2GV3Value - phase2GV4Use - phase2GV4Value - phase2GV5Use - phase2GV5Value - phase2RE1Use - phase2RE1Value - phase2RE2Use - phase2RE2Value - phase3Name - phase3Switch - phase3Trim2Slider - phase3Trim1Slider - phase3Trim4Slider - phase3Trim3Slider - phase3Trim2Use - phase3Trim2Value - phase3Trim3Use - phase3Trim3Value - phase3Trim1Use - phase3Trim1Value - phase3Trim4Use - phase3Trim4Value - phase3GV1Use - phase3GV1Value - phase3GV2Use - phase3GV2Value - phase3GV3Use - phase3GV3Value - phase3GV4Use - phase3GV4Value - phase3GV5Use - phase3GV5Value - phase3RE1Use - phase3RE1Value - phase3RE2Use - phase3RE2Value - phase4Name - phase4Switch - phase4Trim2Slider - phase4Trim1Slider - phase4Trim4Slider - phase4Trim3Slider - phase4Trim2Use - phase4Trim2Value - phase4Trim3Use - phase4Trim3Value - phase4Trim1Use - phase4Trim1Value - phase4Trim4Use - phase4Trim4Value - phase4GV1Use - phase4GV1Value - phase4GV2Use - phase4GV2Value - phase4GV3Use - phase4GV3Value - phase4GV4Use - phase4GV4Value - phase4GV5Use - phase4GV5Value - phase4RE1Use - phase4RE1Value - phase4RE2Use - phase4RE2Value - phase5Name - phase5Switch - phase5Trim2Slider - phase5Trim1Slider - phase5Trim4Slider - phase5Trim3Slider - phase5Trim2Use - phase5Trim2Value - phase5Trim3Use - phase5Trim3Value - phase5Trim1Use - phase5Trim1Value - phase5Trim4Use - phase5Trim4Value - phase5GV1Use - phase5GV1Value - phase5GV2Use - phase5GV2Value - phase5GV3Use - phase5GV3Value - phase5GV4Use - phase5GV4Value - phase5GV5Use - phase5GV5Value - phase5RE1Use - phase5RE1Value - phase5RE2Use - phase5RE2Value - phase6Name - phase6Switch - phase6Trim2Slider - phase6Trim1Slider - phase6Trim4Slider - phase6Trim3Slider - phase6Trim2Use - phase6Trim2Value - phase6Trim3Use - phase6Trim3Value - phase6Trim1Use - phase6Trim1Value - phase6Trim4Use - phase6Trim4Value - phase6GV1Use - phase6GV1Value - phase6GV2Use - phase6GV2Value - phase6GV3Use - phase6GV3Value - phase6GV4Use - phase6GV4Value - phase6GV5Use - phase6GV5Value - phase6RE1Use - phase6RE1Value - phase6RE2Use - phase6RE2Value - phase7Name - phase7Switch - phase7Trim2Slider - phase7Trim1Slider - phase7Trim4Slider - phase7Trim3Slider - phase7Trim2Use - phase7Trim2Value - phase7Trim3Use - phase7Trim3Value - phase7Trim1Use - phase7Trim1Value - phase7Trim4Use - phase7Trim4Value - phase7GV1Use - phase7GV1Value - phase7GV2Use - phase7GV2Value - phase7GV3Use - phase7GV3Value - phase7GV4Use - phase7GV4Value - phase7GV5Use - phase7GV5Value - phase7RE1Use - phase7RE1Value - phase7RE2Use - phase7RE2Value - phase8Name - phase8Switch - phase8Trim2Slider - phase8Trim1Slider - phase8Trim4Slider - phase8Trim3Slider - phase8Trim2Use - phase8Trim2Value - phase8Trim3Use - phase8Trim3Value - phase8Trim1Use - phase8Trim1Value - phase8Trim4Use - phase8Trim4Value - phase8GV1Use - phase8GV1Value - phase8GV2Use - phase8GV2Value - phase8GV3Use - phase8GV3Value - phase8GV4Use - phase8GV4Value - phase8GV5Use - phase8GV5Value - phase8RE1Use - phase8RE1Value - phase8RE2Use - phase8RE2Value - CHName_01 - offsetDSB_1 - symckb_1 - minSB_1 - maxSB_1 - chInvCB_1 - ppmcenter_1 - CHName_02 - offsetDSB_2 - symckb_2 - minSB_2 - maxSB_2 - chInvCB_2 - ppmcenter_2 - CHName_03 - offsetDSB_3 - symckb_3 - minSB_3 - maxSB_3 - chInvCB_3 - ppmcenter_3 - CHName_04 - offsetDSB_4 - symckb_4 - minSB_4 - maxSB_4 - chInvCB_4 - ppmcenter_4 - CHName_05 - offsetDSB_5 - symckb_5 - minSB_5 - maxSB_5 - chInvCB_5 - ppmcenter_5 - CHName_06 - offsetDSB_6 - symckb_6 - minSB_6 - maxSB_6 - chInvCB_6 - ppmcenter_6 - CHName_07 - offsetDSB_7 - symckb_7 - minSB_7 - maxSB_7 - chInvCB_7 - ppmcenter_7 - CHName_08 - offsetDSB_8 - symckb_8 - minSB_8 - maxSB_8 - chInvCB_8 - ppmcenter_8 - CHName_09 - offsetDSB_9 - symckb_9 - minSB_9 - maxSB_9 - chInvCB_9 - ppmcenter_9 - CHName_10 - offsetDSB_10 - symckb_10 - minSB_10 - maxSB_10 - chInvCB_10 - ppmcenter_10 - CHName_11 - offsetDSB_11 - symckb_11 - minSB_11 - maxSB_11 - chInvCB_11 - ppmcenter_11 - CHName_12 - offsetDSB_12 - symckb_12 - minSB_12 - maxSB_12 - chInvCB_12 - ppmcenter_12 - CHName_13 - offsetDSB_13 - symckb_13 - minSB_13 - maxSB_13 - chInvCB_13 - ppmcenter_13 - CHName_14 - offsetDSB_14 - symckb_14 - minSB_14 - maxSB_14 - chInvCB_14 - ppmcenter_14 - CHName_15 - offsetDSB_15 - symckb_15 - minSB_15 - maxSB_15 - chInvCB_15 - ppmcenter_15 - CHName_16 - offsetDSB_16 - symckb_16 - minSB_16 - maxSB_16 - chInvCB_16 - ppmcenter_16 - CHName_17 - offsetDSB_17 - symckb_17 - minSB_17 - maxSB_17 - chInvCB_17 - ppmcenter_17 - CHName_18 - offsetDSB_18 - symckb_18 - minSB_18 - maxSB_18 - chInvCB_18 - ppmcenter_18 - CHName_19 - offsetDSB_19 - symckb_19 - minSB_19 - maxSB_19 - chInvCB_19 - ppmcenter_19 - CHName_20 - offsetDSB_20 - symckb_20 - minSB_20 - maxSB_20 - chInvCB_20 - ppmcenter_20 - CHName_21 - offsetDSB_21 - symckb_21 - minSB_21 - maxSB_21 - chInvCB_21 - ppmcenter_21 - CHName_22 - offsetDSB_22 - symckb_22 - minSB_22 - maxSB_22 - chInvCB_22 - ppmcenter_22 - CHName_23 - offsetDSB_23 - symckb_23 - minSB_23 - maxSB_23 - chInvCB_23 - ppmcenter_23 - CHName_24 - offsetDSB_24 - symckb_24 - minSB_24 - maxSB_24 - chInvCB_24 - ppmcenter_24 - CHName_25 - offsetDSB_25 - symckb_25 - minSB_25 - maxSB_25 - chInvCB_25 - ppmcenter_25 - CHName_26 - offsetDSB_26 - symckb_26 - minSB_26 - maxSB_26 - chInvCB_26 - ppmcenter_26 - CHName_27 - offsetDSB_27 - symckb_27 - minSB_27 - maxSB_27 - chInvCB_27 - ppmcenter_27 - CHName_28 - offsetDSB_28 - symckb_28 - minSB_28 - maxSB_28 - chInvCB_28 - ppmcenter_28 - CHName_29 - offsetDSB_29 - symckb_29 - minSB_29 - maxSB_29 - chInvCB_29 - ppmcenter_29 - CHName_30 - offsetDSB_30 - symckb_30 - minSB_30 - maxSB_30 - chInvCB_30 - ppmcenter_30 - CHName_31 - offsetDSB_31 - symckb_31 - minSB_31 - maxSB_31 - chInvCB_31 - ppmcenter_31 - CHName_32 - offsetDSB_32 - symckb_32 - minSB_32 - maxSB_32 - chInvCB_32 - ppmcenter_32 - a11LevelCB - a1RatioSB - a11ValueSB - a22GreaterCB - a1CalibSB - scrollArea - a21ValueSB - a21LevelCB - scrollArea_5 - a1UnitCB - a2CalibSB - a12ValueSB - a22ValueSB - a21GreaterCB - a22LevelCB - clearMixesPB - pushButton - a12GreaterCB - a2RatioSB - templateList - a11GreaterCB - a12LevelCB - scrollArea_2 - curvePt01_y - curvePt01_x - curvePt02_y - curvePt02_x - curvePt03_y - curvePt03_x - curvePt04_y - curvePt04_x - curvePt05_y - curvePt05_x - curvePt06_y - curvePt06_x - curvePt07_y - curvePt07_x - curvePt08_y - curvePt08_x - curvePt09_y - curvePt09_x - curvePt10_y - curvePt10_x - curvePt11_y - curvePt11_x - curvePt12_y - curvePt12_x - curvePt13_y - curvePt13_x - curvePt14_y - curvePt14_x - curvePt15_y - curvePt15_x - curvePt16_y - curvePt16_x - curvePt17_y - curvePt17_x - resetCurve_1 - curveEdit_1 - plotCB_1 - resetCurve_2 - curveEdit_2 - plotCB_2 - resetCurve_3 - curveEdit_3 - plotCB_3 - resetCurve_4 - curveEdit_4 - plotCB_4 - resetCurve_5 - curveEdit_5 - plotCB_5 - resetCurve_6 - curveEdit_6 - plotCB_6 - resetCurve_7 - curveEdit_7 - plotCB_7 - resetCurve_8 - curveEdit_8 - plotCB_8 - resetCurve_9 - curveEdit_9 - plotCB_9 - resetCurve_10 - curveEdit_10 - plotCB_10 - resetCurve_11 - curveEdit_11 - plotCB_11 - resetCurve_12 - curveEdit_12 - plotCB_12 - resetCurve_13 - curveEdit_13 - plotCB_13 - resetCurve_14 - curveEdit_14 - plotCB_14 - resetCurve_15 - curveEdit_15 - plotCB_15 - resetCurve_16 - curveEdit_16 - plotCB_16 - curvePreview - curvetype_CB - cswitchFunc_15 - cswitchFunc_13 - cswitchFunc_14 - cswitchFunc_4 - cswitchFunc_8 - cswitchFunc_7 - cswitchFunc_9 - cswitchFunc_10 - cswitchFunc_11 - cswitchFunc_12 - cswitchFunc_6 - cswitchFunc_1 - cswitchFunc_5 - cswitchFunc_2 - cswitchFunc_3 - cswitchFunc_16 - cswitchFunc_31 - cswitchFunc_32 - cswitchFunc_30 - cswitchFunc_29 - cswitchFunc_25 - cswitchFunc_20 - cswitchFunc_23 - cswitchFunc_26 - cswitchFunc_27 - cswitchFunc_28 - cswitchFunc_22 - cswitchFunc_17 - cswitchFunc_18 - cswitchFunc_19 - cswitchFunc_24 - cswitchFunc_21 - frskyUnitsCB - frskyCurrentCB - frskyProtoCB - frskyVoltCB - frskyBladesCB - varioSourceCB - varioLimitCenterMin_DSB - varioLimitCenterMax_DSB - varioLimitMax_DSB - varioLimitMin_DSB - varioLimitMinOff_ChkB - a2UnitCB - rssiAlarm1CB - rssiAlarm1SB - tabCsView - telemetryCSType1 - telemetryCS1F1_CB - telemetryCS1F3_CB - telBarCS1B1_CB - telMinCS1SB1 - telMaxCS1SB1 - telBarCS1B2_CB - telMinCS1SB2 - telMaxCS1SB2 - telBarCS1B3_CB - telMinCS1SB3 - telMaxCS1SB3 - telBarCS1B4_CB - telMinCS1SB4 - telMaxCS1SB4 - telemetryCS2F1_CB - telemetryCS2F3_CB - telBarCS2B1_CB - telMinCS2SB1 - telMaxCS2SB1 - telBarCS2B2_CB - telMinCS2SB2 - telMaxCS2SB2 - telBarCS2B3_CB - telMinCS2SB3 - telMaxCS2SB3 - telBarCS2B4_CB - telMinCS2SB4 - telMaxCS2SB4 - telemetryCS3F1_CB - telemetryCS3F3_CB - telBarCS3B1_CB - telMinCS3SB1 - telMaxCS3SB1 - telBarCS3B2_CB - telMinCS3SB2 - telMaxCS3SB2 - telBarCS3B3_CB - telMinCS3SB3 - telMaxCS3SB3 - telBarCS3B4_CB - telMinCS3SB4 - telMaxCS3SB4 - - - - - - diff --git a/companion/src/modeledit/CMakeLists.txt b/companion/src/modeledit/CMakeLists.txt new file mode 100644 index 000000000..827ecf656 --- /dev/null +++ b/companion/src/modeledit/CMakeLists.txt @@ -0,0 +1,57 @@ +include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) + +set(modeledit_NAMES + modeledit + setup + heli + curves + telemetry + expodialog + mixerdialog +) + +set(modeledit_SRCS + modelpanel.cpp + flightmodes.cpp + inputs.cpp + mixes.cpp + channels.cpp + customswitches.cpp + customfunctions.cpp + # templates.cpp + mixerslist.cpp + node.cpp + edge.cpp +) + +set(modeledit_HDRS + modelpanel.h + flightmodes.h + inputs.h + mixes.h + channels.h + customswitches.h + customfunctions.h + # templates.h + mixerslist.h + node.h +) + +set(modeledit_UIS + setup_timer.ui + setup_module.ui + flightmode.ui + telemetry_analog.ui + telemetry_customscreen.ui +) + +foreach(name ${modeledit_NAMES}) + set(modeledit_SRCS ${modeledit_SRCS} ${name}.cpp) + set(modeledit_HDRS ${modeledit_HDRS} ${name}.h) + set(modeledit_UIS ${modeledit_UIS} ${name}.ui) +endforeach() + +qt4_wrap_ui(modeledit_SRCS ${modeledit_UIS}) +qt4_wrap_cpp(modeledit_SRCS ${modeledit_HDRS}) + +add_library(modeledit ${modeledit_SRCS}) \ No newline at end of file diff --git a/companion/src/modeledit/channels.cpp b/companion/src/modeledit/channels.cpp new file mode 100644 index 000000000..070a0fcdc --- /dev/null +++ b/companion/src/modeledit/channels.cpp @@ -0,0 +1,178 @@ +#include "channels.h" +#include +#include +#include +#include +#include +#include + +Channels::Channels(QWidget * parent, ModelData & model): + ModelPanel(parent, model) +{ + QGridLayout * gridLayout = new QGridLayout(this); + + int col = 1; + if (GetEepromInterface()->getCapability(ChannelsName)) + addLabel(gridLayout, tr("Name"), col++); + addLabel(gridLayout, tr("Offset"), col++); + addLabel(gridLayout, tr("Min"), col++); + addLabel(gridLayout, tr("Max"), col++); + addLabel(gridLayout, tr("Invert"), col++); + if (GetEepromInterface()->getCapability(PPMCenter)) + addLabel(gridLayout, tr("Center"), col++); + if (GetEepromInterface()->getCapability(SYMLimits)) + addLabel(gridLayout, tr("Sym"), col++); + + for (int i=0; igetCapability(Outputs); i++) { + col = 0; + + // Channel label + QLabel *label = new QLabel(this); + label->setText(tr("Channel %1").arg(i+1)); + gridLayout->addWidget(label, i+1, col++, 1, 1); + + // Channel name + int nameLen = GetEepromInterface()->getCapability(ChannelsName); + if (nameLen > 0) { + QLineEdit * name = new QLineEdit(this); + name->setProperty("index", i); + name->setMaxLength(nameLen); + QRegExp rx(CHAR_FOR_NAMES_REGEX); + name->setValidator(new QRegExpValidator(rx, this)); + name->setText(model.limitData[i].name); + connect(name, SIGNAL(editingFinished()), this, SLOT(nameEdited())); + gridLayout->addWidget(name, i+1, col++, 1, 1); + } + + // Channel offset + QDoubleSpinBox * offset = new QDoubleSpinBox(this); + offset->setProperty("index", i); + offset->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + offset->setAccelerated(true); + offset->setDecimals(1); + offset->setMinimum(-100); + offset->setSingleStep(0.1); + offset->setValue(float(model.limitData[i].offset) / 10); + connect(offset, SIGNAL(editingFinished()), this, SLOT(offsetEdited())); + gridLayout->addWidget(offset, i+1, col++, 1, 1); + + // Channel min + QDoubleSpinBox * minSB = new QDoubleSpinBox(this); + minSB->setProperty("index", i); + minSB->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + minSB->setAccelerated(true); + minSB->setDecimals(1); + minSB->setMinimum(model.extendedLimits ? -125 : -100); + minSB->setMaximum(0); + minSB->setValue(float(model.limitData[i].min) / 10); + connect(minSB, SIGNAL(editingFinished()), this, SLOT(minEdited())); + gridLayout->addWidget(minSB, i+1, col++, 1, 1); + + // Channel max + QDoubleSpinBox * maxSB = new QDoubleSpinBox(this); + maxSB->setProperty("index", i); + maxSB->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + maxSB->setAccelerated(true); + maxSB->setDecimals(1); + maxSB->setMinimum(0); + maxSB->setMaximum(model.extendedLimits ? 125 : 100); + maxSB->setValue(float(model.limitData[i].max) / 10); + connect(maxSB, SIGNAL(editingFinished()), this, SLOT(maxEdited())); + gridLayout->addWidget(maxSB, i+1, col++, 1, 1); + + // Channel inversion + QComboBox * invCB = new QComboBox(this); + invCB->insertItems(0, QStringList() << tr("---") << tr("INV")); + invCB->setProperty("index", i); + invCB->setCurrentIndex((model.limitData[i].revert) ? 1 : 0); + connect(invCB, SIGNAL(currentIndexChanged(int)), this, SLOT(invEdited())); + gridLayout->addWidget(invCB, i+1, col++, 1, 1); + + // PPM center + if (GetEepromInterface()->getCapability(PPMCenter)) { + QSpinBox * center = new QSpinBox(this); + center->setProperty("index", i); + center->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + center->setMinimum(1375); + center->setMaximum(1625); + center->setValue(1500); + center->setValue(model.limitData[i].ppmCenter + 1500); + connect(center, SIGNAL(editingFinished()), this, SLOT(ppmcenterEdited())); + gridLayout->addWidget(center, i+1, col++, 1, 1); + } + + // Symetrical limits + if (GetEepromInterface()->getCapability(SYMLimits)) { + QCheckBox * symlimits = new QCheckBox(this); + symlimits->setProperty("index", i); + symlimits->setChecked(model.limitData[i].symetrical); + connect(symlimits, SIGNAL(toggled(bool)), this, SLOT(symlimitsEdited())); + gridLayout->addWidget(symlimits, i+1, col++, 1, 1); + } + } +} + +Channels::~Channels() +{ +} + +void Channels::symlimitsEdited() +{ + QCheckBox * ckb = qobject_cast(sender()); + int index = ckb->property("index").toInt(); + model.limitData[index].symetrical = (ckb->checkState() ? 1 : 0); + emit modified(); +} + +void Channels::nameEdited() +{ + if (!lock) { + lock = true; + QLineEdit *le = qobject_cast(sender()); + int index = le->property("index").toInt(); + strcpy(model.limitData[index].name, le->text().toAscii()); + lock = false; + emit modified(); + } +} + +void Channels::offsetEdited() +{ + QDoubleSpinBox *dsb = qobject_cast(sender()); + int index = dsb->property("index").toInt(); + model.limitData[index].offset = round(dsb->value() * 10); + emit modified(); +} + +void Channels::minEdited() +{ + QDoubleSpinBox *sb = qobject_cast(sender()); + int index = sb->property("index").toInt(); + model.limitData[index].min = round(sb->value() * 10); + emit modified(); +} + +void Channels::maxEdited() +{ + QDoubleSpinBox *sb = qobject_cast(sender()); + int index = sb->property("index").toInt(); + model.limitData[index].max = round(sb->value() * 10); + emit modified(); +} + +void Channels::invEdited() +{ + QComboBox *cb = qobject_cast(sender()); + int index = cb->property("index").toInt(); + model.limitData[index].revert = cb->currentIndex(); + emit modified(); +} + +void Channels::ppmcenterEdited() +{ + QSpinBox *sb = qobject_cast(sender()); + int index = sb->property("index").toInt(); + model.limitData[index].ppmCenter = sb->value() - 1500; + emit modified(); +} + diff --git a/companion/src/modeledit/channels.h b/companion/src/modeledit/channels.h new file mode 100644 index 000000000..ee372ecd7 --- /dev/null +++ b/companion/src/modeledit/channels.h @@ -0,0 +1,25 @@ +#ifndef CHANNELS_H +#define CHANNELS_H + +#include "modelpanel.h" + +class Channels : public ModelPanel +{ + Q_OBJECT + + public: + Channels(QWidget *parent, ModelData & model); + ~Channels(); + + private slots: + void symlimitsEdited(); + void nameEdited(); + void offsetEdited(); + void minEdited(); + void maxEdited(); + void invEdited(); + void ppmcenterEdited(); + +}; + +#endif // CHANNELS_H diff --git a/companion/src/modeledit/curvedialog.ui b/companion/src/modeledit/curvedialog.ui new file mode 100644 index 000000000..f8ccccba3 --- /dev/null +++ b/companion/src/modeledit/curvedialog.ui @@ -0,0 +1,217 @@ + + + Dialog + + + + 0 + 0 + 400 + 300 + + + + Dialog + + + + + + + + Curve type + + + + + + + + 0 + 0 + + + + -100 + + + 100 + + + + + + + Coefficient + + + + + + + + Both + + + + + x>0 + + + + + x<0 + + + + + + + + Y at X=0 + + + + + + + + 0 + 0 + + + + -100 + + + 100 + + + + + + + + 0 + 0 + + + + -100 + + + 100 + + + + + + + Side + + + + + + + Y at X=-100 + + + + + + + + 0 + 0 + + + + -100 + + + 100 + + + + + + + Y at X=100 + + + + + + + + Linear + + + + + Single Expo + + + + + Symmetrical f(x)=-f(-x) + + + + + Symmetrical f(x)=f(-x) + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + Dialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + Dialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/companion/src/modeledit/curves.cpp b/companion/src/modeledit/curves.cpp new file mode 100644 index 000000000..fe54f3d7d --- /dev/null +++ b/companion/src/modeledit/curves.cpp @@ -0,0 +1,683 @@ +#include "curves.h" +#include "ui_curves.h" +#include "node.h" +#include "edge.h" +#include "helpers.h" +#include +#include +#include +#include + +#define GFX_MARGIN 16 + +static const QColor colors[C9X_MAX_CURVES] = { + QColor(0,0,127), + QColor(0,127,0), + QColor(127,0,0), + QColor(0,127,127), + QColor(127,0,127), + QColor(127,127,0), + QColor(127,127,127), + QColor(0,0,255), + QColor(0,127,255), + QColor(127,0,255), + QColor(0,255,0), + QColor(0,255,127), + QColor(127,255,0), + QColor(255,0,0), + QColor(255,0,127), + QColor(255,127,0), +}; + +#if 0 +#ifdef __APPLE__ + ui->curveEdit_1->setStyleSheet("color: #00007f;"); + ui->curveEdit_2->setStyleSheet("color: #007f00;"); + ui->curveEdit_3->setStyleSheet("color: #7f0000;"); + ui->curveEdit_4->setStyleSheet("color: #007f7f;"); + ui->curveEdit_5->setStyleSheet("color: #7f007f;"); + ui->curveEdit_6->setStyleSheet("color: #7f7f00;"); + ui->curveEdit_7->setStyleSheet("color: #7f7f7f;"); + ui->curveEdit_8->setStyleSheet("color: #0000ff;"); + ui->curveEdit_9->setStyleSheet("color: #007fff;"); + ui->curveEdit_10->setStyleSheet("color: #7f00ff;"); + ui->curveEdit_11->setStyleSheet("color: #00ff00;"); + ui->curveEdit_12->setStyleSheet("color: #00ff7f;"); + ui->curveEdit_13->setStyleSheet("color: #7fff00;"); + ui->curveEdit_14->setStyleSheet("color: #ff0000;"); + ui->curveEdit_15->setStyleSheet("color: #ff007f;"); + ui->curveEdit_16->setStyleSheet("color: #ff7f00;"); +#else + ui->curveEdit_1->setStyleSheet("background-color: #00007f; color: white;"); + ui->curveEdit_2->setStyleSheet("background-color: #007f00; color: white;"); + ui->curveEdit_3->setStyleSheet("background-color: #7f0000; color: white;"); + ui->curveEdit_4->setStyleSheet("background-color: #007f7f; color: white;"); + ui->curveEdit_5->setStyleSheet("background-color: #7f007f; color: white;"); + ui->curveEdit_6->setStyleSheet("background-color: #7f7f00; color: white;"); + ui->curveEdit_7->setStyleSheet("background-color: #7f7f7f; color: white;"); + ui->curveEdit_8->setStyleSheet("background-color: #0000ff; color: white;"); + ui->curveEdit_9->setStyleSheet("background-color: #007fff; color: white;"); + ui->curveEdit_10->setStyleSheet("background-color: #7f00ff; color: white;"); + ui->curveEdit_11->setStyleSheet("background-color: #00ff00; color: white;"); + ui->curveEdit_12->setStyleSheet("background-color: #00ff7f; color: white;"); + ui->curveEdit_13->setStyleSheet("background-color: #7fff00; color: white;"); + ui->curveEdit_14->setStyleSheet("background-color: #ff0000; color: white;"); + ui->curveEdit_15->setStyleSheet("background-color: #ff007f; color: white;"); + ui->curveEdit_16->setStyleSheet("background-color: #ff7f00; color: white;"); +#endif +#endif + +Curves::Curves(QWidget * parent, ModelData & model): + ModelPanel(parent, model), + ui(new Ui::Curves), + currentCurve(0) +{ + ui->setupUi(this); + + lock = true; + + if (!GetEepromInterface()->getCapability(HasCvNames)) { + ui->curveName->hide(); + ui->curveNameLabel->hide(); + } + + QGraphicsScene *scene = new QGraphicsScene(ui->curvePreview); + scene->setItemIndexMethod(QGraphicsScene::NoIndex); + ui->curvePreview->setScene(scene); + + for (int i=0; igetCapability(NumCurves); i++) { + visibleCurves[i] = false; + + // The reset curve button + QPushButton * reset = new QPushButton(this); + reset->setProperty("index", i); + reset->setMinimumSize(QSize(0, 0)); + reset->setIcon(CompanionIcon("clear.png")); + reset->setIconSize(QSize(14, 14)); + connect(reset, SIGNAL(clicked()), this, SLOT(resetCurve())); + ui->curvesLayout->addWidget(reset, i, 0, 1, 1); + + // The edit curve button + QPushButton * edit = new QPushButton(this); + edit->setProperty("index", i); + QPalette palette; + palette.setBrush(QPalette::Active, QPalette::Button, QBrush(colors[i])); + palette.setBrush(QPalette::Active, QPalette::ButtonText, QBrush(Qt::white)); + edit->setPalette(palette); + edit->setText(tr("Curve %1").arg(i+1)); + connect(edit, SIGNAL(clicked()), this, SLOT(editCurve())); + ui->curvesLayout->addWidget(edit, i, 1, 1, 1); + + // The curve plot checkbox + QCheckBox * plot = new QCheckBox(this); + plot->setProperty("index", i); + plot->setPalette(palette); + connect(plot, SIGNAL(toggled(bool)), this, SLOT(plotCurve(bool))); + ui->curvesLayout->addWidget(plot, i, 2, 1, 1); + } + + for (int i=0; isetProperty("index", i); + spny[i]->setMinimum(-100); + spny[i]->setMaximum(+100); + spny[i]->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + spny[i]->setAccelerated(true); + connect(spny[i], SIGNAL(valueChanged(int)), this, SLOT(onPointEdited())); + ui->pointsLayout->addWidget(spny[i], i, 0, 1, 1); + + spnx[i] = new QSpinBox(this); + spnx[i]->setProperty("index", i); + spnx[i]->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); + spnx[i]->setAccelerated(true); + connect(spnx[i], SIGNAL(valueChanged(int)), this, SLOT(onPointEdited())); + ui->pointsLayout->addWidget(spnx[i], i, 1, 1, 1); + + bool insert; + if (GetEepromInterface()->getCapability(EnhancedCurves)) { + insert = (i >= 1); + } + else { + insert = (i==2 || i==4 || i==8 || i==16); + } + if (insert) { + ui->curvePoints->addItem(tr("%1 points").arg(i+1), i+1); + } + } + + lock = false; +} + +Curves::~Curves() +{ + delete ui; +} + +void Curves::editCurve() +{ + QPushButton *button = (QPushButton *)sender(); + int index = button->property("index").toInt(); + setCurrentCurve(index); + update(); +} + +void Curves::resetCurve() +{ + QPushButton *button = (QPushButton *)sender(); + int index = button->property("index").toInt(); + int res = QMessageBox::question(this, "companion", tr("Are you sure you want to reset curve %1 ?").arg(index+1), QMessageBox::Yes | QMessageBox::No); + if (res == QMessageBox::Yes) { + model.curves[index].clear(5); + update(); + emit modified(); + } +} + +void Curves::plotCurve(bool checked) +{ + QCheckBox *chk = (QCheckBox *)sender(); + int index = chk->property("index").toInt(); + visibleCurves[index] = checked; + updateCurve(); +} + +void Curves::update() +{ + lock = true; + + if (GetEepromInterface()->getCapability(HasCvNames)) { + ui->curveName->setText(model.curves[currentCurve].name); + } + + int count = model.curves[currentCurve].count; + for (int i=0; ishow(); + spny[i]->setValue(model.curves[currentCurve].points[i].y); + if (model.curves[currentCurve].type == CurveData::CURVE_TYPE_CUSTOM) { + spnx[i]->show(); + if (i==0 || i==model.curves[currentCurve].count-1) { + spnx[i]->setDisabled(true); + spnx[i]->setMaximum(+100); + spnx[i]->setMinimum(-100); + } + else { + spnx[i]->setMaximum(model.curves[currentCurve].points[i+1].x); + spnx[i]->setMinimum(model.curves[currentCurve].points[i-1].x); + } + spnx[i]->setValue(model.curves[currentCurve].points[i].x); + } + else { + spnx[i]->hide(); + } + } + for (int i=count; ihide(); + spnx[i]->hide(); + } + + updateCurveType(); + updateCurve(); + + lock = false; +} + +void Curves::setCurrentCurve(int index) +{ + currentCurve = index; +} + +void Curves::updateCurveType() +{ + lock = true; + + int index = 0; + + if (GetEepromInterface()->getCapability(EnhancedCurves)) { + index = model.curves[currentCurve].count - 2; + } + else { + if (model.curves[currentCurve].count == 5) + index += 2; + else if (model.curves[currentCurve].count == 9) + index += 4; + else if (model.curves[currentCurve].count == 17) + index += 6; + } + + ui->curvePoints->setCurrentIndex(index); + ui->curveCustom->setCurrentIndex(model.curves[currentCurve].type); + ui->curveSmooth->setCurrentIndex(model.curves[currentCurve].smooth); + + lock = false; +} + +void Curves::updateCurve() +{ + Node * nodel = 0; + Node * nodex = 0; + QColor color; + + QGraphicsScene *scene = ui->curvePreview->scene(); + scene->clear(); + + qreal width = scene->sceneRect().width(); + qreal height = scene->sceneRect().height(); + + qreal centerX = scene->sceneRect().left() + width/2; //center X + qreal centerY = scene->sceneRect().top() + height/2; //center Y + + QGraphicsSimpleTextItem *ti = scene->addSimpleText(tr("Editing curve %1").arg(currentCurve+1)); + ti->setPos(3, 3); + + scene->addLine(centerX, GFX_MARGIN, centerX, height+GFX_MARGIN); + scene->addLine(GFX_MARGIN, centerY, width+GFX_MARGIN, centerY); + + QPen pen; + pen.setWidth(1); + pen.setStyle(Qt::SolidLine); + + int numcurves = GetEepromInterface()->getCapability(NumCurves); + for (int k=0; kaddLine(centerX + (qreal)model.curves[k].points[i].x*width/200,centerY - (qreal)model.curves[k].points[i].y*height/200,centerX + (qreal)model.curves[k].points[i+1].x*width/200,centerY - (qreal)model.curves[k].points[i+1].y*height/200, pen); + else + scene->addLine(GFX_MARGIN + i*width/(numpoints-1),centerY - (qreal)model.curves[k].points[i].y*height/200,GFX_MARGIN + (i+1)*width/(numpoints-1),centerY - (qreal)model.curves[k].points[i+1].y*height/200, pen); + } + } + } + + int numpoints = model.curves[currentCurve].count; + for (int i=0; isetProperty("index", i); + nodex->setColor(colors[currentCurve]); + if (model.curves[currentCurve].type == CurveData::CURVE_TYPE_CUSTOM) { + if (i>0 && isetFixedX(false); + nodex->setMinX(model.curves[currentCurve].points[i-1].x); + nodex->setMaxX(model.curves[currentCurve].points[i+1].x); + } + else { + nodex->setFixedX(true); + } + nodex->setPos(centerX + (qreal)model.curves[currentCurve].points[i].x*width/200,centerY - (qreal)model.curves[currentCurve].points[i].y*height/200); + } + else { + nodex->setFixedX(true); + nodex->setPos(GFX_MARGIN + i*width/(numpoints-1), centerY - (qreal)model.curves[currentCurve].points[i].y*height/200); + } + connect(nodex, SIGNAL(moved(int, int)), this, SLOT(onNodeMoved(int, int))); + connect(nodex, SIGNAL(focus()), this, SLOT(onNodeFocus())); + connect(nodex, SIGNAL(unfocus()), this, SLOT(onNodeUnfocus())); + scene->addItem(nodex); + if (i>0) scene->addItem(new Edge(nodel, nodex)); + } +} + +void Curves::onPointEdited() +{ + if (!lock) { + lock = true; + int index = sender()->property("index").toInt(); + model.curves[currentCurve].points[index].x = spnx[index]->value(); + model.curves[currentCurve].points[index].y = spny[index]->value(); + updateCurve(); + emit modified(); + lock = false; + } +} + +void Curves::onNodeMoved(int x, int y) +{ + if (!lock) { + lock = true; + int index = sender()->property("index").toInt(); + model.curves[currentCurve].points[index].x = x; + model.curves[currentCurve].points[index].y = y; + spnx[index]->setValue(x); + spny[index]->setValue(y); + emit modified(); + lock = false; + } +} + +void Curves::onNodeFocus() +{ + int index = sender()->property("index").toInt(); + spny[index]->setFocus(); +} + +void Curves::onNodeUnfocus() +{ + int index = sender()->property("index").toInt(); + spny[index]->clearFocus(); + updateCurve(); +} + +bool Curves::allowCurveType(int points, CurveData::CurveType type) +{ + int numcurves = GetEepromInterface()->getCapability(NumCurves); + + int totalpoints = 0; + for (int i=0; igetCapability(NumCurvePoints); + if (totalpoints > fwpoints) { + QMessageBox::warning(this, "companion", tr("Not enough free points in EEPROM to store the curve.")); + return false; + } + else { + return true; + } +} + +void Curves::on_curvePoints_currentIndexChanged(int index) +{ + if (!lock) { + int numpoints = ((QComboBox *)sender())->itemData(index).toInt(); + + if (allowCurveType(numpoints, model.curves[currentCurve].type)) { + model.curves[currentCurve].count = numpoints; + + // TODO something better + reuse! + for (int i=0; i= model.curves[currentCurve].count-1 ? +100 : -100 + (200*i)/(numpoints-1)); + model.curves[currentCurve].points[i].y = 0; + } + + update(); + emit modified(); + } + else { + updateCurveType(); + } + } +} + +void Curves::on_curveCustom_currentIndexChanged(int index) +{ + if (!lock) { + CurveData::CurveType type = (CurveData::CurveType)index; + int numpoints = ui->curvePoints->itemData(ui->curvePoints->currentIndex()).toInt(); + if (allowCurveType(model.curves[currentCurve].count, type)) { + model.curves[currentCurve].type = type; + + // TODO something better + reuse! + for (int i=0; i= model.curves[currentCurve].count-1 ? +100 : -100 + (200*i)/(numpoints-1)); + model.curves[currentCurve].points[i].y = 0; + } + + update(); + emit modified(); + } + else { + updateCurveType(); + } + } +} + +void Curves::on_curveSmooth_currentIndexChanged(int index) +{ + model.curves[currentCurve].smooth = index; + update(); +} + +void Curves::on_curveName_editingFinished() +{ + memset(model.curves[currentCurve].name, 0, sizeof(model.curves[currentCurve].name)); + strcpy(model.curves[currentCurve].name, ui->curveName->text().toAscii()); + emit modified(); +} + +void Curves::resizeEvent(QResizeEvent *event) +{ + QRect qr = ui->curvePreview->contentsRect(); + ui->curvePreview->scene()->setSceneRect(GFX_MARGIN, GFX_MARGIN, qr.width()-GFX_MARGIN*2, qr.height()-GFX_MARGIN*2); + updateCurve(); + + ModelPanel::resizeEvent(event); +} + +#if 0 +void ModelEdit::on_ca_ctype_CB_currentIndexChanged() +{ + int index=ui->ca_ctype_CB->currentIndex(); + switch (index) { + case 0: + ui->ca_coeff_SB->hide(); + ui->ca_coeff_label->hide(); + ui->ca_ymid_SB->hide(); + ui->ca_ymid_label->hide(); + ui->ca_ymin_SB->show(); + ui->ca_ymin_label->show(); + ui->ca_ymin_SB->setValue(-100); + ui->ca_ymax_SB->setValue(100); + break; + case 1: + ui->ca_coeff_SB->show(); + ui->ca_coeff_label->show(); + ui->ca_ymid_SB->hide(); + ui->ca_ymid_label->hide(); + ui->ca_ymin_SB->show(); + ui->ca_ymin_label->show(); + ui->ca_ymin_SB->setValue(-100); + ui->ca_ymax_SB->setValue(100); + break; + case 2: + ui->ca_coeff_SB->show(); + ui->ca_coeff_label->show(); + ui->ca_ymid_SB->hide(); + ui->ca_ymid_label->hide(); + ui->ca_ymin_SB->hide(); + ui->ca_ymin_label->hide(); + ui->ca_ymax_SB->setValue(100); + break; + case 3: + ui->ca_coeff_SB->show(); + ui->ca_coeff_label->show(); + ui->ca_ymid_SB->show(); + ui->ca_ymid_label->show(); + ui->ca_ymin_SB->hide(); + ui->ca_ymin_label->hide(); + ui->ca_ymid_SB->setValue(0); + ui->ca_ymax_SB->setValue(100); + break; + } +} + +void ModelEdit::on_ca_apply_PB_clicked() +{ + int index=ui->ca_ctype_CB->currentIndex(); + float x; + int y; + int invert=0; + float a; + if (index==0) { + a=(ui->ca_ymax_SB->value()-ui->ca_ymin_SB->value())/200.0; + int numpoints=model.curves[currentCurve].count; + for (int i=0; ica_ymin_SB->value()+a*x; + switch (ui->ca_side_CB->currentIndex()) { + case 0: + model.curves[currentCurve].points[i].y=y; + break; + case 1: + if (x>=100) { + model.curves[currentCurve].points[i].y=y; + } + break; + case 2: + if (x<100) { + model.curves[currentCurve].points[i].y=y; + } + break; + } + } + } else if (index==1) { + int numpoints=model.curves[currentCurve].count; + for (int i=0; ica_coeff_SB->value(); + if (a>=0) { + y=round(c9xexpou(x,a)*(ui->ca_ymax_SB->value()-ui->ca_ymin_SB->value())/100.0+ui->ca_ymin_SB->value()); + } else { + a=-a; + x=100-x; + y=round((100.0-c9xexpou(x,a))*(ui->ca_ymax_SB->value()-ui->ca_ymin_SB->value())/100.0+ui->ca_ymin_SB->value()); + } + switch (ui->ca_side_CB->currentIndex()) { + case 0: + model.curves[currentCurve].points[i].y=y; + break; + case 1: + if (x>=50) { + model.curves[currentCurve].points[i].y=y; + } + break; + case 2: + if (x<50) { + model.curves[currentCurve].points[i].y=y; + } + break; + } + } + } else if (index==2) { + int numpoints=model.curves[currentCurve].count; + for (int i=0; ica_coeff_SB->value(); + if (x<0) { + x=-x; + invert=1; + } else { + invert=0; + } + if (a>=0) { + y=round(c9xexpou(x,a)*(ui->ca_ymax_SB->value()/100.0)); + } else { + a=-a; + x=100-x; + y=round((100.0-c9xexpou(x,a))*(ui->ca_ymax_SB->value()/100.0)); + } + switch (ui->ca_side_CB->currentIndex()) { + case 0: + if (invert==1) { + model.curves[currentCurve].points[i].y=-y; + } else { + model.curves[currentCurve].points[i].y=y; + } + break; + case 1: + if (invert==0) { + model.curves[currentCurve].points[i].y=y; + } + break; + case 2: + if (invert==1) { + model.curves[currentCurve].points[i].y=-y; + } + break; + } + } + } else if (index==3) { + int numpoints=model.curves[currentCurve].count; + for (int i=0; i=0); + a=ui->ca_coeff_SB->value(); + if (x<0) { + x=-x; + } + if (a>=0) { + y=round(c9xexpou(x,a)*((ui->ca_ymax_SB->value()-ui->ca_ymid_SB->value())/100.0)+ui->ca_ymid_SB->value()); + } else { + a=-a; + x=100-x; + y=round((100.0-c9xexpou(x,a))*((ui->ca_ymax_SB->value()-ui->ca_ymid_SB->value())/100.0)+ui->ca_ymid_SB->value()); + } + switch (ui->ca_side_CB->currentIndex()) { + case 0: + model.curves[currentCurve].points[i].y=y; + break; + case 1: + if (pos) { + model.curves[currentCurve].points[i].y=y; + } + break; + case 2: + if (!pos) { + model.curves[currentCurve].points[i].y=y; + } + break; + } + } + } + updateSettings(); + setCurrentCurve(currentCurve); + drawCurve(); +} + +void ModelEdit::clearCurves(bool ask) +{ + if (ask) { + int res = QMessageBox::question(this, tr("Clear Curves?"), tr("Really clear all the curves?"), QMessageBox::Yes | QMessageBox::No); + if (res!=QMessageBox::Yes) return; + } + curvesLock=true; + for (int j=0; j<16; j++) { + model.curves[j].count = 5; + model.curves[j].custom = false; + memset(model.curves[j].name, 0, sizeof(model.curves[j].name)); + for (int i=0; i<17; i++) { + model.curves[j].points[i].x = 0; + model.curves[j].points[i].y = 0; + } + } + for (int i=0; i<17; i++) { + spnx[i]->setMinimum(-100); + spnx[i]->setMaximum(100); + spnx[i]->setValue(0); + spny[i]->setValue(0); + } + currentCurve=0; + curvesLock=false; + ui->curvetype_CB->setCurrentIndex(2); + ui->curveName->clear(); + updateSettings(); + drawCurve(); +} + +void ModelEdit::ControlCurveSignal(bool flag) +{ + foreach(QSpinBox *sb, findChildren(QRegExp("curvePt[0-9]+"))) { + sb->blockSignals(flag); + } +} +#endif diff --git a/companion/src/modeledit/curves.h b/companion/src/modeledit/curves.h new file mode 100644 index 000000000..e8915cf65 --- /dev/null +++ b/companion/src/modeledit/curves.h @@ -0,0 +1,50 @@ +#ifndef CURVES_H +#define CURVES_H + +#include "modelpanel.h" +#include + +namespace Ui { + class Curves; +} + +class Curves : public ModelPanel +{ + Q_OBJECT + + public: + Curves(QWidget *parent, ModelData & model); + virtual ~Curves(); + + virtual void update(); + + private slots: + void resetCurve(); + void editCurve(); + void plotCurve(bool checked); + void on_curveName_editingFinished(); + void on_curvePoints_currentIndexChanged(int index); + void on_curveCustom_currentIndexChanged(int index); + void on_curveSmooth_currentIndexChanged(int index); + void onPointEdited(); + void onNodeMoved(int x, int y); + void onNodeFocus(); + void onNodeUnfocus(); + + protected: + virtual void resizeEvent(QResizeEvent *event); + + private: + Ui::Curves *ui; + int currentCurve; + bool visibleCurves[C9X_MAX_CURVES]; + QSpinBox * spnx[C9X_MAX_POINTS]; + QSpinBox * spny[C9X_MAX_POINTS]; + void setCurrentCurve(int index); + void updateCurve(); + void updateCurveType(); + bool allowCurveType(int points, CurveData::CurveType type); + +}; + +#endif // CURVES_H diff --git a/companion/src/modeledit/curves.ui b/companion/src/modeledit/curves.ui new file mode 100644 index 000000000..ed9800e89 --- /dev/null +++ b/companion/src/modeledit/curves.ui @@ -0,0 +1,161 @@ + + + Curves + + + + 0 + 0 + 638 + 587 + + + + Form + + + + + + + + + + + + + 0 + + + + + + + + + Standard + + + + + Custom + + + + + + + + + Lines + + + + + Smooth + + + + + + + + + + Curve type + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Curve name + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 6 + + + + + + + + 0 + 0 + + + + + 400 + 400 + + + + Qt::AlignCenter + + + + + + + + + 0 + + + 2 + + + 0 + + + 0 + + + + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 20 + 0 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + diff --git a/companion/src/modeledit/customfunctions.cpp b/companion/src/modeledit/customfunctions.cpp new file mode 100644 index 000000000..bbbe15fdf --- /dev/null +++ b/companion/src/modeledit/customfunctions.cpp @@ -0,0 +1,510 @@ +#include "customfunctions.h" +#include +#include +#include +#include +#include +#include +#include "helpers.h" + +RepeatComboBox::RepeatComboBox(QWidget *parent, int & repeatParam): + QComboBox(parent), + repeatParam(repeatParam) +{ + unsigned int step = IS_ARM(GetEepromInterface()->getBoard()) ? 1 : 10; + int value = repeatParam/step; + + if (step == 1) { + addItem(QObject::tr("Played once, not during startup"), -1); + value++; + } + + addItem(QObject::tr("No repeat"), 0); + + for (unsigned int i=step; i<=60; i+=step) { + addItem(QObject::tr("%1s").arg(i), i); + } + + setCurrentIndex(value); + + connect(this, SIGNAL(currentIndexChanged(int)), this, SLOT(onIndexChanged(int))); +} + +void RepeatComboBox::onIndexChanged(int index) +{ + repeatParam = itemData(index).toInt(); + emit modified(); +} + +CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model, GeneralSettings & generalSettings): + ModelPanel(parent, model), + generalSettings(generalSettings), + phononLock(false) +{ + QGridLayout * gridLayout = new QGridLayout(this); + + int col = 1; + addLabel(gridLayout, tr("Switch"), col++); + addLabel(gridLayout, tr("Action"), col++); + addLabel(gridLayout, tr("Parameters"), col++); + addLabel(gridLayout, tr("Enable"), col++); + + lock = true; + int num_fsw = GetEepromInterface()->getCapability(CustomFunctions); + + QStringList paramarmList; + if (!GetEepromInterface()->getCapability(VoicesAsNumbers)) { + for (int i=0; igetCapability(VoicesMaxLength)+4; + if (qd.exists()) { + QStringList filters; + filters << "*.wav" << "*.WAV"; + foreach ( QString file, qd.entryList(filters, QDir::Files) ) { + QFileInfo fi(file); + QString temp=fi.completeBaseName(); + if (!paramarmList.contains(temp) && temp.length()<=vml) { + paramarmList.append(temp); + } + } + } + } + + for (int i=0; isetProperty("index", i); + connect(fswtchSwtch[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited())); + gridLayout->addWidget(fswtchSwtch[i], i+1, 1); + populateSwitchCB(fswtchSwtch[i], model.funcSw[i].swtch, POPULATE_MSWITCHES|POPULATE_ONOFF); + + // The function + fswtchFunc[i] = new QComboBox(this); + fswtchFunc[i]->setProperty("index", i); + connect(fswtchFunc[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited())); + gridLayout->addWidget(fswtchFunc[i], i+1, 2); + populateFuncCB(fswtchFunc[i], model.funcSw[i].func); + + QHBoxLayout *paramLayout = new QHBoxLayout(); + gridLayout->addLayout(paramLayout, i+1, 3); + + fswtchGVmode[i] = new QComboBox(this); + fswtchGVmode[i]->setProperty("index", i); + connect(fswtchGVmode[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited())); + paramLayout->addWidget(fswtchGVmode[i]); + populateGVmodeCB(fswtchGVmode[i], model.funcSw[i].adjustMode); + + fswtchParamGV[i] = new QCheckBox(this); + fswtchParamGV[i]->setProperty("index", i); + fswtchParamGV[i]->setText("GV"); + fswtchParamGV[i]->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum); + connect(fswtchParamGV[i], SIGNAL(stateChanged(int)), this, SLOT(customFunctionEdited())); + paramLayout->addWidget(fswtchParamGV[i]); + + fswtchParam[i] = new QDoubleSpinBox(this); + fswtchParam[i]->setProperty("index", i); + fswtchParam[i]->setAccelerated(true); + fswtchParam[i]->setDecimals(0); + connect(fswtchParam[i], SIGNAL(editingFinished()), this, SLOT(customFunctionEdited())); + paramLayout->addWidget(fswtchParam[i]); + + fswtchParamT[i] = new QComboBox(this); + fswtchParamT[i]->setProperty("index", i); + paramLayout->addWidget(fswtchParamT[i]); + populateFuncParamCB(fswtchParamT[i], model, func, model.funcSw[i].param, model.funcSw[i].adjustMode); + connect(fswtchParamT[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited())); + + fswtchParamArmT[i] = new QComboBox(this); + fswtchParamArmT[i]->setProperty("index", i); + populateFuncParamArmTCB(fswtchParamArmT[i],&model, model.funcSw[i].paramarm, paramarmList); + fswtchParamArmT[i]->setEditable(true); + paramLayout->addWidget(fswtchParamArmT[i]); + + connect(fswtchParamArmT[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited())); + connect(fswtchParamArmT[i], SIGNAL(editTextChanged ( const QString)), this, SLOT(customFunctionEdited())); + +#ifdef PHONON + playBT[i] = new QPushButton(this); + playBT[i]->setObjectName(QString("play_%1").arg(i)); + playBT[i]->setIcon(CompanionIcon("play.png")); + paramLayout->addWidget(playBT[i]); + connect(playBT[i], SIGNAL(pressed()), this, SLOT(playMusic())); +#endif + + QHBoxLayout *repeatLayout = new QHBoxLayout(); + gridLayout->addLayout(repeatLayout, i+1, 4); + fswtchRepeat[i] = new RepeatComboBox(this, model.funcSw[i].repeatParam); + repeatLayout->addWidget(fswtchRepeat[i], i+1); + connect(fswtchRepeat[i], SIGNAL(modified()), this, SLOT(onChildModified())); + + fswtchEnable[i] = new QCheckBox(this); + fswtchEnable[i]->setProperty("index", i); + fswtchEnable[i]->setText(tr("ON")); + repeatLayout->addWidget(fswtchEnable[i], i+1); + fswtchEnable[i]->setChecked(model.funcSw[i].enabled); + connect(fswtchEnable[i], SIGNAL(stateChanged(int)), this, SLOT(customFunctionEdited())); + } + + lock = false; +} + +CustomFunctionsPanel::~CustomFunctionsPanel() +{ +} + +#ifdef PHONON + +void CustomFunctionsPanel::mediaPlayer_state(Phonon::State newState, Phonon::State oldState) +{ + if (phononLock) + return; + + phononLock=true; + if ((newState==Phonon::StoppedState || newState==Phonon::PausedState) && oldState==Phonon::PlayingState) { + clickObject->stop(); + clickObject->clearQueue(); + clickObject->clear(); + for (int i=0; igetCapability(CustomFunctions); i++) { + playBT[i]->setObjectName(QString("play_%1").arg(i)); + playBT[i]->setIcon(CompanionIcon("play.png")); + } + } + if (newState==Phonon::ErrorState) { + clickObject->stop(); + clickObject->clearQueue(); + clickObject->clear(); + for (int i=0; igetCapability(CustomFunctions); i++) { + playBT[i]->setObjectName(QString("play_%1").arg(i)); + playBT[i]->setIcon(CompanionIcon("play.png")); + } + } + + phononLock=false; +} +#endif + +void CustomFunctionsPanel::playMusic() +{ + QPushButton *playButton = qobject_cast(sender()); + int index=playButton->objectName().mid(5,2).toInt(); + QString function=playButton->objectName().left(4); + QSettings settings; + QString path = settings.value("sdPath", ".").toString(); + QDir qd(path); + QString track; + if (qd.exists()) { + if (GetEepromInterface()->getCapability(VoicesAsNumbers)) { + track=path+QString("/%1.wav").arg(int(fswtchParam[index]->value()),4,10,(const QChar)'0'); + } + else { + path.append("/SOUNDS/"); + QString lang = generalSettings.ttsLanguage; + if (lang.isEmpty()) + lang="en"; + path.append(lang); + if (fswtchParamArmT[index]->currentText()!="----") { + track=path+"/"+fswtchParamArmT[index]->currentText()+".wav"; + } + } + QFile file(track); + if (!file.exists()) { + QMessageBox::critical(this, tr("Error"), tr("Unable to find sound file %1!").arg(track)); + track.clear(); + } +#ifdef PHONON + if (function=="play" && !track.isEmpty()) { + clickObject->clear(); + clickObject->setCurrentSource(Phonon::MediaSource(track)); + clickObject->play(); + playBT[index]->setObjectName(QString("stop_%1").arg(index)); + playBT[index]->setIcon(CompanionIcon("stop.png")); + } else { + clickObject->stop(); + clickObject->clear(); + playBT[index]->setObjectName(QString("play_%1").arg(index)); + playBT[index]->setIcon(CompanionIcon("play.png")); + } +#endif + } +} + +#define CUSTOM_FUNCTION_NUMERIC_PARAM (1<<0) +#define CUSTOM_FUNCTION_SOURCE_PARAM (1<<1) +#define CUSTOM_FUNCTION_FILE_PARAM (1<<2) +#define CUSTOM_FUNCTION_GV_MODE (1<<3) +#define CUSTOM_FUNCTION_GV_TOOGLE (1<<4) +#define CUSTOM_FUNCTION_ENABLE (1<<5) +#define CUSTOM_FUNCTION_REPEAT (1<<6) +#define CUSTOM_FUNCTION_PLAY (1<<7) + +void CustomFunctionsPanel::customFunctionEdited() +{ + if (!lock) { + lock = true; + + int index = sender()->property("index").toInt(); + refreshCustomFunction(index, true); + + emit modified(); + lock = false; + } +} + +void CustomFunctionsPanel::onChildModified() +{ + emit modified(); +} + +void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified) +{ + unsigned int widgetsMask = 0; + if (modified) { + model.funcSw[i].swtch = RawSwitch(fswtchSwtch[i]->itemData(fswtchSwtch[i]->currentIndex()).toInt()); + model.funcSw[i].func = (AssignFunc)fswtchFunc[i]->currentIndex(); + model.funcSw[i].enabled = fswtchEnable[i]->isChecked(); + model.funcSw[i].adjustMode = (AssignFunc)fswtchGVmode[i]->currentIndex(); + } + + int index = fswtchFunc[i]->currentIndex(); + + if (index>=FuncSafetyCh1 && index<=FuncSafetyCh16) { + fswtchParam[i]->setDecimals(0); + fswtchParam[i]->setSingleStep(1); + fswtchParam[i]->setMinimum(-125); + fswtchParam[i]->setMaximum(125); + if (modified) { + model.funcSw[i].param = fswtchParam[i]->value(); + } + fswtchParam[i]->setValue(model.funcSw[i].param); + widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM + CUSTOM_FUNCTION_ENABLE; + } + else if (index==FuncLogs) { + fswtchParam[i]->setDecimals(1); + fswtchParam[i]->setMinimum(0); + fswtchParam[i]->setMaximum(25.5); + fswtchParam[i]->setSingleStep(0.1); + if (modified) model.funcSw[i].param = fswtchParam[i]->value()*10.0; + fswtchParam[i]->setValue(model.funcSw[i].param/10.0); + widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM; + } + else if (index>=FuncAdjustGV1 && index<=FuncAdjustGVLast) { + if (modified) model.funcSw[i].adjustMode = fswtchGVmode[i]->currentIndex(); + widgetsMask |= CUSTOM_FUNCTION_GV_MODE + CUSTOM_FUNCTION_ENABLE; + if (model.funcSw[i].adjustMode==0) { + if (modified) model.funcSw[i].param = fswtchParam[i]->value(); + fswtchParam[i]->setDecimals(0); + fswtchParam[i]->setSingleStep(1); + fswtchParam[i]->setMinimum(-125); + fswtchParam[i]->setMaximum(125); + fswtchParam[i]->setValue(model.funcSw[i].param); + widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM; + } + else { + if (modified) model.funcSw[i].param = fswtchParamT[i]->itemData(fswtchParamT[i]->currentIndex()).toInt(); + populateFuncParamCB(fswtchParamT[i], model, index, model.funcSw[i].param, model.funcSw[i].adjustMode); + widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM; + } + } + else if (index==FuncReset) { + if (modified) model.funcSw[i].param = (uint8_t)fswtchParamT[i]->currentIndex(); + populateFuncParamCB(fswtchParamT[i], model, index, model.funcSw[i].param); + widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM | CUSTOM_FUNCTION_ENABLE; + } + else if (index==FuncVolume) { + if (modified) model.funcSw[i].param = fswtchParamT[i]->itemData(fswtchParamT[i]->currentIndex()).toInt(); + populateFuncParamCB(fswtchParamT[i], model, index, model.funcSw[i].param); + 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 && GetEepromInterface()->getCapability(HasFuncRepeat)) { + widgetsMask |= CUSTOM_FUNCTION_REPEAT; + } + if (index==FuncPlayValue) { + if (modified) model.funcSw[i].param = fswtchParamT[i]->itemData(fswtchParamT[i]->currentIndex()).toInt(); + populateFuncParamCB(fswtchParamT[i], model, index, model.funcSw[i].param); + widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM + CUSTOM_FUNCTION_REPEAT; + } + else if (index==FuncPlayPrompt || index==FuncPlayBoth) { + if (GetEepromInterface()->getCapability(VoicesAsNumbers)) { + fswtchParam[i]->setDecimals(0); + fswtchParam[i]->setSingleStep(1); + fswtchParam[i]->setMinimum(0); + if (index==FuncPlayPrompt) { + widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM + CUSTOM_FUNCTION_REPEAT + CUSTOM_FUNCTION_GV_TOOGLE; + } + else { + widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM + CUSTOM_FUNCTION_REPEAT; + fswtchParamGV[i]->setChecked(false); + } + fswtchParam[i]->setMaximum(index==FuncPlayBoth ? 254 : 255); + if (modified) { + if (fswtchParamGV[i]->isChecked()) { + fswtchParam[i]->setMinimum(1); + model.funcSw[i].param = std::min(fswtchParam[i]->value(),5.0)+(fswtchParamGV[i]->isChecked() ? 250 : 0); + } + else { + model.funcSw[i].param = fswtchParam[i]->value(); + } + } + if (model.funcSw[i].param>250 && (index!=FuncPlayBoth)) { + fswtchParamGV[i]->setChecked(true); + fswtchParam[i]->setValue(model.funcSw[i].param-250); + fswtchParam[i]->setMaximum(5); + } + else { + fswtchParamGV[i]->setChecked(false); + fswtchParam[i]->setValue(model.funcSw[i].param); + } + if (model.funcSw[i].param < 251) + widgetsMask |= CUSTOM_FUNCTION_PLAY; + } + else { + widgetsMask |= CUSTOM_FUNCTION_FILE_PARAM; + if (modified) { + memset(model.funcSw[i].paramarm, 0, sizeof(model.funcSw[i].paramarm)); + int vml=GetEepromInterface()->getCapability(VoicesMaxLength); + if (fswtchParamArmT[i]->currentText() != "----") { + widgetsMask |= CUSTOM_FUNCTION_PLAY; + for (int j=0; jcurrentText().length(),vml); j++) { + model.funcSw[i].paramarm[j] = fswtchParamArmT[i]->currentText().toAscii().at(j); + } + } + } + } + } + else if (index==FuncBackgroundMusic) { + widgetsMask |= CUSTOM_FUNCTION_FILE_PARAM; + if (modified) { + memset(model.funcSw[i].paramarm, 0, sizeof(model.funcSw[i].paramarm)); + int vml=GetEepromInterface()->getCapability(VoicesMaxLength); + if (fswtchParamArmT[i]->currentText() != "----") { + widgetsMask |= CUSTOM_FUNCTION_PLAY; + for (int j=0; jcurrentText().length(),vml); j++) { + model.funcSw[i].paramarm[j] = fswtchParamArmT[i]->currentText().toAscii().at(j); + } + } + } + } + else if (index==FuncPlaySound) { + if (modified) model.funcSw[i].param = (uint8_t)fswtchParamT[i]->currentIndex(); + populateFuncParamCB(fswtchParamT[i], model, index, model.funcSw[i].param); + widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM; + } + else if (index==FuncPlayHaptic) { + if (modified) model.funcSw[i].param = (uint8_t)fswtchParamT[i]->currentIndex(); + populateFuncParamCB(fswtchParamT[i], model, index, model.funcSw[i].param); + widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM; + } + } + else { + if (modified) model.funcSw[i].param = fswtchParam[i]->value(); + fswtchParam[i]->setDecimals(0); + fswtchParam[i]->setSingleStep(1); + fswtchParam[i]->setValue(model.funcSw[i].param); + if (index <= FuncInstantTrim) { + widgetsMask |= CUSTOM_FUNCTION_ENABLE; + } + } + + fswtchParam[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_NUMERIC_PARAM); + fswtchParamGV[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_GV_TOOGLE); + fswtchParamT[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_SOURCE_PARAM); + fswtchParamArmT[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_FILE_PARAM); + fswtchEnable[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_ENABLE); + if (!(widgetsMask & CUSTOM_FUNCTION_ENABLE)) fswtchEnable[i]->setChecked(false); + fswtchRepeat[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_REPEAT); + fswtchGVmode[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_GV_MODE); +#ifdef PHONON + playBT[i]->setVisible(widgetsMask & CUSTOM_FUNCTION_PLAY); +#endif +} + +void CustomFunctionsPanel::update() +{ + lock = true; + for (int i=0; igetCapability(CustomFunctions); i++) { + refreshCustomFunction(i); + } + lock = false; +} + +void CustomFunctionsPanel::fswPaste() +{ + const QClipboard *clipboard = QApplication::clipboard(); + const QMimeData *mimeData = clipboard->mimeData(); + if (mimeData->hasFormat("application/x-companion-fsw")) { + QByteArray fswData = mimeData->data("application/x-companion-fsw"); + + FuncSwData *fsw = &model.funcSw[selectedFunction]; + memcpy(fsw, fswData.mid(0, sizeof(FuncSwData)).constData(), sizeof(FuncSwData)); + // TODO update switch and func + populateSwitchCB(fswtchSwtch[selectedFunction], model.funcSw[selectedFunction].swtch, POPULATE_MSWITCHES|POPULATE_ONOFF); + populateFuncCB(fswtchFunc[selectedFunction], model.funcSw[selectedFunction].func); + refreshCustomFunction(selectedFunction); + emit modified(); + } +} + +void CustomFunctionsPanel::fswDelete() +{ + model.funcSw[selectedFunction].clear(); + // TODO update switch and func + populateSwitchCB(fswtchSwtch[selectedFunction], model.funcSw[selectedFunction].swtch, POPULATE_MSWITCHES|POPULATE_ONOFF); + populateFuncCB(fswtchFunc[selectedFunction], model.funcSw[selectedFunction].func); + refreshCustomFunction(selectedFunction); + emit modified(); +} + +void CustomFunctionsPanel::fswCopy() +{ + QByteArray fswData; + fswData.append((char*)&model.funcSw[selectedFunction],sizeof(FuncSwData)); + QMimeData *mimeData = new QMimeData; + mimeData->setData("application/x-companion-fsw", fswData); + QApplication::clipboard()->setMimeData(mimeData,QClipboard::Clipboard); +} + +void CustomFunctionsPanel::fswCut() +{ + fswCopy(); + fswDelete(); +} + +void CustomFunctionsPanel::fsw_customContextMenuRequested(QPoint pos) +{ + QLabel *label = (QLabel *)sender(); + selectedFunction = label->property("index").toInt(); + + QPoint globalPos = label->mapToGlobal(pos); + + const QClipboard *clipboard = QApplication::clipboard(); + const QMimeData *mimeData = clipboard->mimeData(); + bool hasData = mimeData->hasFormat("application/x-companion-fsw"); + + QMenu contextMenu; + contextMenu.addAction(CompanionIcon("clear.png"), tr("&Delete"),this,SLOT(fswDelete()),tr("Delete")); + contextMenu.addAction(CompanionIcon("copy.png"), tr("&Copy"),this,SLOT(fswCopy()),tr("Ctrl+C")); + contextMenu.addAction(CompanionIcon("cut.png"), tr("&Cut"),this,SLOT(fswCut()),tr("Ctrl+X")); + contextMenu.addAction(CompanionIcon("paste.png"), tr("&Paste"),this,SLOT(fswPaste()),tr("Ctrl+V"))->setEnabled(hasData); + + contextMenu.exec(globalPos); +} diff --git a/companion/src/modeledit/customfunctions.h b/companion/src/modeledit/customfunctions.h new file mode 100644 index 000000000..ccb73582e --- /dev/null +++ b/companion/src/modeledit/customfunctions.h @@ -0,0 +1,79 @@ +#ifndef CUSTOMFUNCTIONS_H +#define CUSTOMFUNCTIONS_H + +#include "modelpanel.h" +#include +#include +#include +#include +#include +#ifdef PHONON +#include +#include +#include +#endif + +class RepeatComboBox: public QComboBox +{ + Q_OBJECT + + public: + RepeatComboBox(QWidget *parent, int & repeatParam); + + signals: + void modified(); + + private slots: + void onIndexChanged(int); + + protected: + int & repeatParam; +}; + +class CustomFunctionsPanel : public ModelPanel +{ + Q_OBJECT + + public: + CustomFunctionsPanel(QWidget *parent, ModelData & model, GeneralSettings & generalSettings); + ~CustomFunctionsPanel(); + + virtual void update(); + + private slots: + void customFunctionEdited(); + void fsw_customContextMenuRequested(QPoint pos); + void refreshCustomFunction(int index, bool modified=false); + void playMusic(); + void onChildModified(); +#ifdef PHONON + void mediaPlayer_state(Phonon::State newState, Phonon::State oldState); +#endif + void fswDelete(); + void fswCopy(); + void fswPaste(); + void fswCut(); + + private: + GeneralSettings & generalSettings; + bool phononLock; + QComboBox * fswtchSwtch[C9X_MAX_CUSTOM_FUNCTIONS]; + QComboBox * fswtchFunc[C9X_MAX_CUSTOM_FUNCTIONS]; + QCheckBox * fswtchParamGV[C9X_MAX_CUSTOM_FUNCTIONS]; + QDoubleSpinBox * fswtchParam[C9X_MAX_CUSTOM_FUNCTIONS]; + QPushButton * playBT[C9X_MAX_CUSTOM_FUNCTIONS]; + QComboBox * fswtchParamT[C9X_MAX_CUSTOM_FUNCTIONS]; + QComboBox * fswtchParamArmT[C9X_MAX_CUSTOM_FUNCTIONS]; + QCheckBox * fswtchEnable[C9X_MAX_CUSTOM_FUNCTIONS]; + QComboBox * fswtchRepeat[C9X_MAX_CUSTOM_FUNCTIONS]; + QComboBox * fswtchGVmode[C9X_MAX_CUSTOM_FUNCTIONS]; +#ifdef PHONON + Phonon::MediaObject *clickObject; + Phonon::AudioOutput *clickOutput; +#endif + + int selectedFunction; + +}; + +#endif // CUSTOMFUNCTIONS_H diff --git a/companion/src/modeledit/customswitches.cpp b/companion/src/modeledit/customswitches.cpp new file mode 100644 index 000000000..68d3fc34f --- /dev/null +++ b/companion/src/modeledit/customswitches.cpp @@ -0,0 +1,408 @@ +#include "customswitches.h" +#include +#include +#include +#include +#include +#include +#include "helpers.h" + +CustomSwitchesPanel::CustomSwitchesPanel(QWidget * parent, ModelData & model): + ModelPanel(parent, model), + selectedSwitch(0) +{ + QGridLayout * gridLayout = new QGridLayout(this); + + int col = 1; + addLabel(gridLayout, tr("Condition"), col++); + addLabel(gridLayout, tr("V1"), col++); + addLabel(gridLayout, tr("V2"), col++); + addLabel(gridLayout, tr("AND"), col++); + if (GetEepromInterface()->getCapability(CustomSwitchesExt)) { + addLabel(gridLayout, tr("Duration"), col++); + addLabel(gridLayout, tr("Delay"), col++); + } + + lock = true; + for (int i=0; igetCapability(CustomSwitches); i++) { + // The label + QLabel * label = new QLabel(this); + label->setProperty("index", i); + if (i < 9) + label->setText(tr("LS%1").arg(i+1)); + else + label->setText(tr("LS%1").arg(QChar('A'+i-9))); + label->setContextMenuPolicy(Qt::CustomContextMenu); + label->setMouseTracking(true); + connect(label, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(csw_customContextMenuRequested(QPoint))); + gridLayout->addWidget(label, i+1, 0); + + // The function + csw[i] = new QComboBox(this); + csw[i]->setProperty("index", i); + connect(csw[i], SIGNAL(currentIndexChanged(int)), this, SLOT(edited())); + gridLayout->addWidget(csw[i], i+1, 1); + + // V1 + cswitchSource1[i] = new QComboBox(this); + cswitchSource1[i]->setProperty("index",i); + connect(cswitchSource1[i], SIGNAL(currentIndexChanged(int)), this, SLOT(edited())); + gridLayout->addWidget(cswitchSource1[i], i+1, 2); + cswitchSource1[i]->setVisible(false); + cswitchValue[i] = new QDoubleSpinBox(this); + cswitchValue[i]->setMaximum(125); + cswitchValue[i]->setMinimum(-125); + cswitchValue[i]->setAccelerated(true); + cswitchValue[i]->setDecimals(0); + cswitchValue[i]->setProperty("index", i); + connect(cswitchValue[i], SIGNAL(editingFinished()), this, SLOT(edited())); + gridLayout->addWidget(cswitchValue[i], i+1, 2); + cswitchValue[i]->setVisible(false); + + // V2 + cswitchSource2[i] = new QComboBox(this); + cswitchSource2[i]->setProperty("index", i); + connect(cswitchSource2[i], SIGNAL(currentIndexChanged(int)), this, SLOT(edited())); + gridLayout->addWidget(cswitchSource2[i], i+1, 3); + cswitchSource2[i]->setVisible(false); + cswitchOffset[i] = new QDoubleSpinBox(this); + cswitchOffset[i]->setProperty("index",i); + cswitchOffset[i]->setMaximum(125); + cswitchOffset[i]->setMinimum(-125); + cswitchOffset[i]->setAccelerated(true); + cswitchOffset[i]->setDecimals(0); + connect(cswitchOffset[i], SIGNAL(editingFinished()), this, SLOT(edited())); + gridLayout->addWidget(cswitchOffset[i], i+1, 3); + cswitchOffset[i]->setVisible(false); + + // AND + cswitchAnd[i] = new QComboBox(this); + cswitchAnd[i]->setProperty("index", i); + connect(cswitchAnd[i], SIGNAL(currentIndexChanged(int)), this, SLOT(edited())); + gridLayout->addWidget(cswitchAnd[i], i+1, 4); + cswitchAnd[i]->setVisible(false); + + if (GetEepromInterface()->getCapability(CustomSwitchesExt)) { + // Duration + cswitchDuration[i] = new QDoubleSpinBox(this); + cswitchDuration[i]->setProperty("index", i); + cswitchDuration[i]->setSingleStep(0.5); + cswitchDuration[i]->setMaximum(50); + cswitchDuration[i]->setMinimum(0); + cswitchDuration[i]->setAccelerated(true); + cswitchDuration[i]->setDecimals(1); + connect(cswitchDuration[i],SIGNAL(editingFinished()), this, SLOT(edited())); + gridLayout->addWidget(cswitchDuration[i], i+1, 5); + cswitchDuration[i]->setVisible(false); + + // Delay + cswitchDelay[i] = new QDoubleSpinBox(this); + cswitchDelay[i]->setProperty("index", i); + cswitchDelay[i]->setSingleStep(0.5); + cswitchDelay[i]->setMaximum(50); + cswitchDelay[i]->setMinimum(0); + cswitchDelay[i]->setAccelerated(true); + cswitchDelay[i]->setDecimals(1); + connect(cswitchDelay[i], SIGNAL(editingFinished()), this, SLOT(edited())); + gridLayout->addWidget(cswitchDelay[i], i+1, 6); + cswitchDelay[i]->setVisible(false); + } + } + + lock = false; +} + +CustomSwitchesPanel::~CustomSwitchesPanel() +{ +} + +void CustomSwitchesPanel::edited() +{ + if (!lock) { + lock = true; + int i = sender()->property("index").toInt(); + bool chAr; + float value, step; + int newval; + chAr = (getCSFunctionFamily(model.customSw[i].func) != getCSFunctionFamily(csw[i]->itemData(csw[i]->currentIndex()).toInt())); + model.customSw[i].func = csw[i]->itemData(csw[i]->currentIndex()).toInt(); + if(chAr) { + if (getCSFunctionFamily(model.customSw[i].func)==CS_FAMILY_TIMERS) { + model.customSw[i].val1 = -119; + model.customSw[i].val2 = -119; + } else { + model.customSw[i].val1 = 0; + model.customSw[i].val2 = 0; + } + model.customSw[i].andsw = 0; + setSwitchWidgetVisibility(i); + } + if (GetEepromInterface()->getCapability(CustomSwitchesExt)) { + model.customSw[i].duration= (uint8_t)round(cswitchDuration[i]->value()*2); + model.customSw[i].delay= (uint8_t)round(cswitchDelay[i]->value()*2); + } + RawSource source; + switch (getCSFunctionFamily(model.customSw[i].func)) + { + case (CS_FAMILY_VOFS): + if (model.customSw[i].val1 != cswitchSource1[i]->itemData(cswitchSource1[i]->currentIndex()).toInt()) { + source = RawSource(model.customSw[i].val1, &model); + model.customSw[i].val1 = cswitchSource1[i]->itemData(cswitchSource1[i]->currentIndex()).toInt(); + RawSource newSource = RawSource(model.customSw[i].val1, &model); + if (newSource.type == SOURCE_TYPE_TELEMETRY) { + if (model.customSw[i].func>CS_FN_ELESS && model.customSw[i].funcCS_FN_ELESS && model.customSw[i].funcvalue() / range.step); + } + else { + model.customSw[i].val2 = (cswitchOffset[i]->value() - range.offset) / range.step/* TODO - source.getRawOffset(model)*/; + } + } + setSwitchWidgetVisibility(i); + } + else { + source = RawSource(model.customSw[i].val1, &model); + RawSourceRange range = source.getRange(); + if (model.customSw[i].func>CS_FN_ELESS && model.customSw[i].funcvalue() / range.step); + cswitchOffset[i]->setValue(model.customSw[i].val2*range.step); + } + else { + model.customSw[i].val2 = ((cswitchOffset[i]->value()-range.offset)/range.step)/* TODO - source.getRawOffset(model)*/; + cswitchOffset[i]->setValue((model.customSw[i].val2 /* + TODO source.getRawOffset(model)*/)*range.step+range.offset); + } + } + break; + case (CS_FAMILY_TIMERS): { + value = cswitchOffset[i]->value(); + newval=TimToVal(value); + if (newval>model.customSw[i].val2) { + if (value >=60) { + value=round(value); + step=1; + } else if (value>=2) { + value=(round(value*2.0)/2); + step=0.5; + } else { + step=0.1; + } + } else { + if (value <=2) { + step=0.1; + } else if (value<=60) { + value=(round(value*2.0)/2); + step=0.5; + } else { + value=round(value); + step=1; + } + } + model.customSw[i].val2=TimToVal(value); + value=ValToTim(model.customSw[i].val2); + cswitchOffset[i]->setValue(value); + cswitchOffset[i]->setSingleStep(step); + + value=cswitchValue[i]->value(); + newval=TimToVal(value); + if (newval>model.customSw[i].val1) { + if (value >=60) { + value=round(value); + step=1; + } else if (value>=2) { + value=(round(value*2.0)/2); + step=0.5; + } else { + step=0.1; + } + } else { + if (value <=2) { + step=0.1; + } else if (value<=60) { + value=(round(value*2.0)/2); + step=0.5; + } else { + value=round(value); + step=1; + } + } + model.customSw[i].val1=TimToVal(value); + value=ValToTim(model.customSw[i].val1); + cswitchValue[i]->setValue(value); + cswitchValue[i]->setSingleStep(step); + break; + } + case (CS_FAMILY_VBOOL): + case (CS_FAMILY_VCOMP): + model.customSw[i].val1 = cswitchSource1[i]->itemData(cswitchSource1[i]->currentIndex()).toInt(); + model.customSw[i].val2 = cswitchSource2[i]->itemData(cswitchSource2[i]->currentIndex()).toInt(); + break; + } + model.customSw[i].andsw = cswitchAnd[i]->itemData(cswitchAnd[i]->currentIndex()).toInt(); + emit modified(); + lock = false; + } +} + +void CustomSwitchesPanel::setSwitchWidgetVisibility(int i) +{ + RawSource source = RawSource(model.customSw[i].val1, &model); + RawSourceRange range = source.getRange(); + + switch (getCSFunctionFamily(model.customSw[i].func)) + { + case CS_FAMILY_VOFS: + cswitchSource1[i]->setVisible(true); + cswitchSource2[i]->setVisible(false); + cswitchValue[i]->setVisible(false); + cswitchOffset[i]->setVisible(true); + populateSourceCB(cswitchSource1[i], source, model, POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_TRIMS | POPULATE_SWITCHES | POPULATE_TELEMETRY | (GetEepromInterface()->getCapability(GvarsInCS) ? POPULATE_GVARS : 0)); + cswitchOffset[i]->setDecimals(range.decimals); + cswitchOffset[i]->setSingleStep(range.step); + if (model.customSw[i].func>CS_FN_ELESS && model.customSw[i].funcsetMinimum(range.step*-127); + cswitchOffset[i]->setMaximum(range.step*127); + cswitchOffset[i]->setValue(range.step*model.customSw[i].val2); + } else { + cswitchOffset[i]->setMinimum(range.min); + cswitchOffset[i]->setMaximum(range.max); + cswitchOffset[i]->setValue(range.step*(model.customSw[i].val2/* TODO+source.getRawOffset(model)*/)+range.offset); + } + break; + case CS_FAMILY_VBOOL: + cswitchSource1[i]->setVisible(true); + cswitchSource2[i]->setVisible(true); + cswitchValue[i]->setVisible(false); + cswitchOffset[i]->setVisible(false); + populateSwitchCB(cswitchSource1[i], RawSwitch(model.customSw[i].val1)); + populateSwitchCB(cswitchSource2[i], RawSwitch(model.customSw[i].val2)); + break; + case CS_FAMILY_VCOMP: + cswitchSource1[i]->setVisible(true); + cswitchSource2[i]->setVisible(true); + cswitchValue[i]->setVisible(false); + cswitchOffset[i]->setVisible(false); + populateSourceCB(cswitchSource1[i], RawSource(model.customSw[i].val1), model, POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_TRIMS | POPULATE_SWITCHES | POPULATE_TELEMETRY | (GetEepromInterface()->getCapability(GvarsInCS) ? POPULATE_GVARS : 0)); + populateSourceCB(cswitchSource2[i], RawSource(model.customSw[i].val2), model, POPULATE_SOURCES | POPULATE_TRIMS | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TELEMETRY | (GetEepromInterface()->getCapability(GvarsInCS) ? POPULATE_GVARS : 0)); + break; + case CS_FAMILY_TIMERS: + cswitchSource1[i]->setVisible(false); + cswitchSource2[i]->setVisible(false); + cswitchValue[i]->setVisible(true); + cswitchOffset[i]->setVisible(true); + cswitchOffset[i]->setDecimals(1); + cswitchOffset[i]->setMinimum(0.1); + cswitchOffset[i]->setMaximum(175); + float value=ValToTim(model.customSw[i].val2); + cswitchOffset[i]->setSingleStep(0.1); + if (value>60) { + cswitchOffset[i]->setSingleStep(1); + } else if (value>2) { + cswitchOffset[i]->setSingleStep(0.5); + } + cswitchOffset[i]->setValue(value); + + cswitchValue[i]->setDecimals(1); + cswitchValue[i]->setMinimum(0.1); + cswitchValue[i]->setMaximum(175); + value=ValToTim(model.customSw[i].val1); + cswitchValue[i]->setSingleStep(0.1); + if (value>60) { + cswitchValue[i]->setSingleStep(1); + } else if (value>2) { + cswitchValue[i]->setSingleStep(0.5); + } + cswitchValue[i]->setValue(value); + break; + } + cswitchAnd[i]->setVisible(true); + populateSwitchCB(cswitchAnd[i], RawSwitch(model.customSw[i].andsw), POPULATE_AND_SWITCHES); + if (GetEepromInterface()->getCapability(CustomSwitchesExt)) { + cswitchDuration[i]->setVisible(true); + cswitchDuration[i]->setValue(model.customSw[i].duration/2.0); + cswitchDelay[i]->setVisible(true); + cswitchDelay[i]->setValue(model.customSw[i].delay/2.0); + } +} + +void CustomSwitchesPanel::update() +{ + lock = true; + for (int i=0; igetCapability(CustomSwitches); i++) { + populateCSWCB(csw[i], model.customSw[i].func); + setSwitchWidgetVisibility(i); + } + lock = false; +} + +void CustomSwitchesPanel::cswPaste() +{ + const QClipboard *clipboard = QApplication::clipboard(); + const QMimeData *mimeData = clipboard->mimeData(); + if (mimeData->hasFormat("application/x-companion-csw")) { + QByteArray cswData = mimeData->data("application/x-companion-csw"); + + CustomSwData *csw = &model.customSw[selectedSwitch]; + memcpy(csw, cswData.mid(0, sizeof(CustomSwData)).constData(), sizeof(CustomSwData)); + emit modified(); + updateSelectedSwitch(); + } +} + +void CustomSwitchesPanel::cswDelete() +{ + model.customSw[selectedSwitch].clear(); + emit modified(); + updateSelectedSwitch(); +} + +void CustomSwitchesPanel::cswCopy() +{ + QByteArray cswData; + cswData.append((char*)&model.customSw[selectedSwitch],sizeof(CustomSwData)); + QMimeData *mimeData = new QMimeData; + mimeData->setData("application/x-companion-csw", cswData); + QApplication::clipboard()->setMimeData(mimeData,QClipboard::Clipboard); +} + +void CustomSwitchesPanel::updateSelectedSwitch() +{ + lock = true; + populateCSWCB(csw[selectedSwitch], model.customSw[selectedSwitch].func); + setSwitchWidgetVisibility(selectedSwitch); + lock = false; +} + +void CustomSwitchesPanel::cswCut() +{ + cswCopy(); + cswDelete(); +} + +// TODO make something generic here! +void CustomSwitchesPanel::csw_customContextMenuRequested(QPoint pos) +{ + QLabel *label = (QLabel *)sender(); + selectedSwitch = label->property("index").toInt(); + + QPoint globalPos = label->mapToGlobal(pos); + + const QClipboard *clipboard = QApplication::clipboard(); + const QMimeData *mimeData = clipboard->mimeData(); + bool hasData = mimeData->hasFormat("application/x-companion-csw"); + + QMenu contextMenu; + contextMenu.addAction(CompanionIcon("clear.png"), tr("&Delete"),this,SLOT(cswDelete()),tr("Delete")); + contextMenu.addAction(CompanionIcon("copy.png"), tr("&Copy"),this,SLOT(cswCopy()),tr("Ctrl+C")); + contextMenu.addAction(CompanionIcon("cut.png"), tr("&Cut"),this,SLOT(cswCut()),tr("Ctrl+X")); + contextMenu.addAction(CompanionIcon("paste.png"), tr("&Paste"),this,SLOT(cswPaste()),tr("Ctrl+V"))->setEnabled(hasData); + + contextMenu.exec(globalPos); +} diff --git a/companion/src/modeledit/customswitches.h b/companion/src/modeledit/customswitches.h new file mode 100644 index 000000000..c00ad60b6 --- /dev/null +++ b/companion/src/modeledit/customswitches.h @@ -0,0 +1,42 @@ +#ifndef CUSTOMSWITCHES_H +#define CUSTOMSWITCHES_H + +#include "modelpanel.h" +#include +#include + +class CustomSwitchesPanel : public ModelPanel +{ + Q_OBJECT + + public: + CustomSwitchesPanel(QWidget *parent, ModelData & model); + virtual ~CustomSwitchesPanel(); + + virtual void update(); + + private slots: + void edited(); + void csw_customContextMenuRequested(QPoint pos); + void cswDelete(); + void cswCopy(); + void cswPaste(); + void cswCut(); + + private: + QComboBox * csw[C9X_NUM_CSW]; + QDoubleSpinBox * cswitchValue[C9X_NUM_CSW]; + QDoubleSpinBox * cswitchOffset[C9X_NUM_CSW]; + QComboBox * cswitchAnd[C9X_NUM_CSW]; + QDoubleSpinBox * cswitchDuration[C9X_NUM_CSW]; + QDoubleSpinBox * cswitchDelay[C9X_NUM_CSW]; + QComboBox * cswitchSource1[C9X_NUM_CSW]; + QComboBox * cswitchSource2[C9X_NUM_CSW]; + void setSwitchWidgetVisibility(int i); + int selectedSwitch; + + void updateSelectedSwitch(); + +}; + +#endif // CUSTOMSWITCHES_H diff --git a/companion/src/edge.cpp b/companion/src/modeledit/edge.cpp similarity index 100% rename from companion/src/edge.cpp rename to companion/src/modeledit/edge.cpp diff --git a/companion/src/edge.h b/companion/src/modeledit/edge.h similarity index 100% rename from companion/src/edge.h rename to companion/src/modeledit/edge.h diff --git a/companion/src/modeledit/expodialog.cpp b/companion/src/modeledit/expodialog.cpp new file mode 100644 index 000000000..49e86fc8a --- /dev/null +++ b/companion/src/modeledit/expodialog.cpp @@ -0,0 +1,189 @@ +#include "expodialog.h" +#include "ui_expodialog.h" +#include "eeprominterface.h" +#include "helpers.h" + +ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, int stickMode) : + QDialog(parent), + ui(new Ui::ExpoDialog), + model(model), + ed(expoData) +{ + ui->setupUi(this); + QLabel * lb_fp[] = {ui->lb_FP0,ui->lb_FP1,ui->lb_FP2,ui->lb_FP3,ui->lb_FP4,ui->lb_FP5,ui->lb_FP6,ui->lb_FP7,ui->lb_FP8 }; + QCheckBox * cb_fp[] = {ui->cb_FP0,ui->cb_FP1,ui->cb_FP2,ui->cb_FP3,ui->cb_FP4,ui->cb_FP5,ui->cb_FP6,ui->cb_FP7,ui->cb_FP8 }; + + setWindowTitle(tr("Edit %1").arg(getInputStr(model, ed->chn))); + QRegExp rx(CHAR_FOR_NAMES_REGEX); + + gvGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, ed->weight, 100, 0, 100); + curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB, ed->curve); + + populateSwitchCB(ui->switchesCB,ed->swtch); + + ui->sideCB->setCurrentIndex(ed->mode-1); + + if (!GetEepromInterface()->getCapability(FlightPhases)) { + ui->label_phases->hide(); + for (int i=0; i<9; i++) { + lb_fp[i]->hide(); + cb_fp[i]->hide(); + } + } + else { + int mask=1; + for (int i=0; i<9 ; i++) { + if ((ed->phases & mask)==0) { + cb_fp[i]->setChecked(true); + } + mask <<= 1; + } + for (int i=GetEepromInterface()->getCapability(FlightPhases); i<9;i++) { + lb_fp[i]->hide(); + cb_fp[i]->hide(); + } + } + + if (GetEepromInterface()->getCapability(VirtualInputs)) { + ui->sideLabel->hide(); + ui->sideCB->hide(); + ui->inputName->setMaxLength(4); + populateSourceCB(ui->sourceCB, ed->srcRaw, model, POPULATE_SOURCES | POPULATE_SWITCHES | POPULATE_TRIMS | POPULATE_TELEMETRY); + ui->sourceCB->removeItem(0); + } + else { + ui->inputNameLabel->hide(); + ui->inputName->hide(); + ui->sourceLabel->hide(); + ui->sourceCB->hide(); + ui->trimLabel->hide(); + ui->trimCB->hide(); + } + + ui->trimCB->addItem(tr("Rud"), 1); + ui->trimCB->addItem(tr("Ele"), 2); + ui->trimCB->addItem(tr("Thr"), 3); + ui->trimCB->addItem(tr("Ail"), 4); + ui->trimCB->setCurrentIndex(1 - ed->carryTrim); + + int expolength = GetEepromInterface()->getCapability(HasExpoNames); + if (!expolength) { + ui->lineNameLabel->hide(); + ui->lineName->hide(); + } + else { + ui->lineName->setMaxLength(expolength); + } + + ui->inputName->setValidator(new QRegExpValidator(rx, this)); + ui->inputName->setText(model.inputNames[ed->chn]); + + ui->lineName->setValidator(new QRegExpValidator(rx, this)); + ui->lineName->setText(ed->name); + + updateScale(); + valuesChanged(); + + connect(ui->lineName, SIGNAL(editingFinished()), this, SLOT(valuesChanged())); + connect(ui->sourceCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged())); + connect(ui->scale, SIGNAL(editingFinished()), this, SLOT(valuesChanged())); + connect(ui->trimCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged())); + connect(ui->switchesCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged())); + connect(ui->sideCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged())); + for (int i=0; i<9; i++) { + connect(cb_fp[i], SIGNAL(toggled(bool)), this, SLOT(valuesChanged())); + } + QTimer::singleShot(0, this, SLOT(shrink())); +} + +ExpoDialog::~ExpoDialog() +{ + delete gvGroup; + delete curveGroup; + delete ui; +} + +void ExpoDialog::updateScale() +{ + if (GetEepromInterface()->getCapability(VirtualInputs) && ed->srcRaw.type == SOURCE_TYPE_TELEMETRY) { + RawSourceRange range = ed->srcRaw.getRange(); + ui->scaleLabel->show(); + ui->scale->show(); + ui->scale->setDecimals(range.decimals); + ui->scale->setMinimum(range.min); + ui->scale->setMaximum(range.max); + ui->scale->setValue(round(range.step * ed->scale)); + } + else { + ui->scaleLabel->hide(); + ui->scale->hide(); + } +} + +void ExpoDialog::valuesChanged() +{ + QCheckBox * cb_fp[] = {ui->cb_FP0,ui->cb_FP1,ui->cb_FP2,ui->cb_FP3,ui->cb_FP4,ui->cb_FP5,ui->cb_FP6,ui->cb_FP7,ui->cb_FP8 }; + + RawSource srcRaw = RawSource(ui->sourceCB->itemData(ui->sourceCB->currentIndex()).toInt()); + if (ed->srcRaw != srcRaw) { + ed->srcRaw = srcRaw; + updateScale(); + } + + RawSourceRange range = srcRaw.getRange(); + ed->scale = round(float(ui->scale->value()) / range.step); + ed->carryTrim = 1 - ui->trimCB->currentIndex(); + ed->swtch = RawSwitch(ui->switchesCB->itemData(ui->switchesCB->currentIndex()).toInt()); + ed->mode = ui->sideCB->currentIndex() + 1; + + strcpy(ed->name, ui->lineName->text().toAscii().data()); + strcpy(model.inputNames[ed->chn], ui->inputName->text().toAscii().data()); + + ed->phases=0; + for (int i=8; i>=0 ; i--) { + if (!cb_fp[i]->checkState()) { + ed->phases+=1; + } + ed->phases<<=1; + } + ed->phases>>=1; + if (GetEepromInterface()->getCapability(FlightPhases)) { + int zeros=0; + int ones=0; + int phtemp=ed->phases; + for (int i=0; igetCapability(FlightPhases); i++) { + if (phtemp & 1) { + ones++; + } + else { + zeros++; + } + phtemp >>=1; + } + if (zeros==1) { + phtemp=ed->phases; + for (int i=0; igetCapability(FlightPhases); i++) { + if ((phtemp & 1)==0) { + break; + } + phtemp >>=1; + } + } + else if (ones==1) { + phtemp=ed->phases; + for (int i=0; igetCapability(FlightPhases); i++) { + if (phtemp & 1) { + break; + } + phtemp >>=1; + } + } + } else { + ed->phases=0; + } +} + +void ExpoDialog::shrink() +{ + resize(0, 0); +} diff --git a/companion/src/modeledit/expodialog.h b/companion/src/modeledit/expodialog.h new file mode 100644 index 000000000..2d96b130a --- /dev/null +++ b/companion/src/modeledit/expodialog.h @@ -0,0 +1,35 @@ +#ifndef EXPODIALOG_H +#define EXPODIALOG_H + +#include +#include "eeprominterface.h" + +class GVarGroup; +class CurveGroup; + +namespace Ui { + class ExpoDialog; +} + +class ExpoDialog : public QDialog { + Q_OBJECT + public: + ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expodata, int stickMode); + ~ExpoDialog(); + + protected: + void updateScale(); + + private slots: + void valuesChanged(); + void shrink(); + + private: + Ui::ExpoDialog * ui; + ModelData & model; + ExpoData * ed; + GVarGroup * gvGroup; + CurveGroup * curveGroup; +}; + +#endif // EXPODIALOG_H diff --git a/companion/src/expodialog.ui b/companion/src/modeledit/expodialog.ui similarity index 63% rename from companion/src/expodialog.ui rename to companion/src/modeledit/expodialog.ui index d3acba4e6..82d16dbc2 100644 --- a/companion/src/expodialog.ui +++ b/companion/src/modeledit/expodialog.ui @@ -6,8 +6,8 @@ 0 0 - 370 - 289 + 381 + 414 @@ -26,32 +26,39 @@ - + :/icon.png:/icon.png + + + + The source for the mixer + + + - + - Name + Input name - + 6 - + Weight - + @@ -66,7 +73,7 @@ - Phase used by the expo. + Phase used by the input. @@ -85,55 +92,14 @@ - - - - Expo - - - - - - - - - GV - - - - - - - - - - Phase used by the expo. - - - - - - - Qt::Horizontal - - - - 40 - 0 - - - - - - - + Flight modes - + @@ -290,68 +256,30 @@ - + Switch - + - Switch used by the expo. -If blank then the expo is considered to be "ON" all the time. + Switch used by the input. +If blank then the input is considered to be "ON" all the time. - - - - Curve/Exponential - - - - - - - - - - - - The curve used by the expo - - - - - - - GV - - - - - - - - - - - - - - - - - + + Stick Side - - + + NEG @@ -369,7 +297,7 @@ If blank then the expo is considered to be "ON" all the time. - + @@ -388,7 +316,7 @@ If blank then the expo is considered to be "ON" all the time. - + Qt::Vertical @@ -396,15 +324,151 @@ If blank then the expo is considered to be "ON" all the time. 20 - 40 + 30 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; text-decoration: underline;">Delay ans Slow</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These values control the speed and delay of the output of the mix. </p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If Delay is not zero the actuation of the mix will be delayed by the specified amount of seconds.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If Slow is not zero then the speed of the mix will be set by the value specified -&gt; the value states the number of seconds it takes to transit from -100 to 100.</p></body></html> + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1 + + + + + + + Scale + + + + + + + Include Trim + + + + + + + + No + + + + + Yes + + + + + + + + Curve + + + + + + + + + + + + The curve used by the input + + + + + + + GV + + + + + + + + + + + + + + + + + + + Source + + + + + + + Line name + + + + + + + 6 + + + + + inputName + lineName + sourceCB + scale + trimCB + weightGV + weightSB + weightCB + curveTypeCB + curveGVarCB + curveValueCB + curveValueSB + cb_FP0 + cb_FP1 + cb_FP2 + cb_FP3 + cb_FP4 + cb_FP5 + cb_FP6 + cb_FP7 + cb_FP8 + switchesCB + sideCB + buttonBox + - + diff --git a/companion/src/modeledit/flightmode.ui b/companion/src/modeledit/flightmode.ui new file mode 100644 index 000000000..6ed3d8769 --- /dev/null +++ b/companion/src/modeledit/flightmode.ui @@ -0,0 +1,449 @@ + + + FlightMode + + + + 0 + 0 + 610 + 499 + + + + Form + + + + + + + + Fade In + + + + + + + 1 + + + + + + + 1 + + + + + + + Fade Out + + + + + + + 6 + + + + + + + Name + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Switch + + + + + + + + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + QSlider::TicksBothSides + + + 25 + + + + + + + Qt::Vertical + + + QSlider::TicksBothSides + + + 25 + + + + + + + Qt::Vertical + + + false + + + false + + + QSlider::TicksBothSides + + + 25 + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + QSlider::TicksBothSides + + + 25 + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + + trim1 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + Qt::AlignCenter + + + true + + + -896 + + + 896 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + Qt::AlignCenter + + + true + + + -896 + + + 896 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + trim2 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + + trim4 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + trim3 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + Qt::AlignCenter + + + true + + + -896 + + + 896 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + Qt::AlignCenter + + + true + + + -896 + + + 896 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + + + Qt::Horizontal + + + + + + + + + + + + + + + + + + diff --git a/companion/src/modeledit/flightmodes.cpp b/companion/src/modeledit/flightmodes.cpp new file mode 100644 index 000000000..4a4e5e651 --- /dev/null +++ b/companion/src/modeledit/flightmodes.cpp @@ -0,0 +1,484 @@ +#include "flightmodes.h" +#include "ui_flightmode.h" +// #include "firmwares/opentx/opentxeeprom.h" // TODO shouldn't be there +#include "helpers.h" +#include +#include + +FlightMode::FlightMode(QWidget * parent, ModelData & model, int phaseIdx, GeneralSettings & generalSettings): + ModelPanel(parent, model), + ui(new Ui::FlightMode), + generalSettings(generalSettings), + phaseIdx(phaseIdx), + phase(model.phaseData[phaseIdx]), + reCount(GetEepromInterface()->getCapability(RotaryEncoders)), + gvCount(((!GetEepromInterface()->getCapability(HasVariants)) || (GetCurrentFirmwareVariant() & GVARS_VARIANT)) ? + GetEepromInterface()->getCapability(Gvars) : 0) +{ + ui->setupUi(this); + + // Phase name + QRegExp rx(CHAR_FOR_NAMES_REGEX); + if (GetEepromInterface()->getCapability(FlightPhases)) { + ui->name->setValidator(new QRegExpValidator(rx, this)); + ui->name->setMaxLength(GetEepromInterface()->getCapability(FlightModesName)); + connect(ui->name, SIGNAL(editingFinished()), this, SLOT(phaseName_editingFinished())); + } + else { + ui->name->setDisabled(true); + } + + // Phase switch + if (phaseIdx > 0) { + populateSwitchCB(ui->swtch, phase.swtch); + connect(ui->swtch, SIGNAL(currentIndexChanged(int)), this, SLOT(phaseSwitch_currentIndexChanged(int))); + } + else { + ui->swtch->hide(); + } + + // FadeIn / FadeOut + if (GetEepromInterface()->getCapability(FlightPhasesHaveFades)) { + int scale = GetEepromInterface()->getCapability(SlowScale); + int range = GetEepromInterface()->getCapability(SlowRange); + ui->fadeIn->setMaximum(float(range)/scale); + ui->fadeIn->setSingleStep(1.0/scale); + ui->fadeIn->setDecimals((scale==1 ? 0 :1) ); + connect(ui->fadeIn, SIGNAL(editingFinished()), this, SLOT(phaseFadeIn_editingFinished())); + ui->fadeOut->setMaximum(float(range)/scale); + ui->fadeOut->setSingleStep(1.0/scale); + ui->fadeOut->setDecimals((scale==1 ? 0 :1)); + connect(ui->fadeOut, SIGNAL(editingFinished()), this, SLOT(phaseFadeOut_editingFinished())); + } + else { + ui->fadeIn->setDisabled(true); + ui->fadeOut->setDisabled(true); + } + + // The trims + QString labels[] = { tr("Rud"), tr("Ele"), tr("Thr"), tr("Ail") }; // TODO is elsewhere for sure + + trimsLabel << ui->trim1Label << ui->trim2Label << ui->trim3Label << ui->trim4Label; + trimsUse << ui->trim1Use << ui->trim2Use << ui->trim3Use << ui->trim4Use; + trimsValue << ui->trim1Value << ui->trim2Value << ui->trim3Value << ui->trim4Value; + trimsSlider << ui->trim1Slider << ui->trim2Slider << ui->trim3Slider << ui->trim4Slider; + + for (int i=0; i<4; i++) { + trimsLabel[i]->setText(labels[CONVERT_MODE(i+1)-1]); + + if (phaseIdx > 0) { + trimsUse[i]->setProperty("index", i); + populateTrimUseCB(trimsUse[i], phaseIdx); + connect(trimsUse[i], SIGNAL(currentIndexChanged(int)), this, SLOT(phaseTrimUse_currentIndexChanged(int))); + } + else { + trimsUse[i]->hide(); + } + + trimsValue[i]->setProperty("index", i); + connect(trimsValue[i], SIGNAL(valueChanged(int)), this, SLOT(phaseTrim_valueChanged())); + + trimsSlider[i]->setProperty("index", i); + connect(trimsSlider[i], SIGNAL(valueChanged(int)), this, SLOT(phaseTrimSlider_valueChanged())); + } + + // Rotary encoders + if (reCount > 0) { + QGridLayout *reLayout = new QGridLayout(ui->reGB); + for (int i=0; ireGB); + label->setText(tr("Rotary Encoder %1").arg(i+1)); + reLayout->addWidget(label, i, 0, 1, 1); + if (phaseIdx > 0) { + // RE link to another RE + QComboBox *link = new QComboBox(ui->gvGB); + link->setProperty("index", i); + populateGvarUseCB(link, phaseIdx); + connect(link, SIGNAL(currentIndexChanged(int)), this, SLOT(phaseREUse_currentIndexChanged(int))); + if (phase.rotaryEncoders[i] > 1024) { + link->setCurrentIndex(phase.rotaryEncoders[i] - 1024); + } + reLayout->addWidget(link, i, 1, 1, 1); + } + // RE value + reValues[i] = new QSpinBox(ui->reGB); + reValues[i]->setProperty("index", i); + reValues[i]->setMinimum(-1024); + reValues[i]->setMaximum(1024); + connect(reValues[i], SIGNAL(editingFinished()), this, SLOT(phaseREValue_editingFinished())); + reLayout->addWidget(reValues[i], i, 2, 1, 1); + } + } + else { + ui->reGB->hide(); + } + + // GVars + if (gvCount > 0) { + QGridLayout *gvLayout = new QGridLayout(ui->gvGB); + for (int i=0; igvGB); + label->setText(tr("GVAR%1").arg(i+1)); + gvLayout->addWidget(label, i, col++, 1, 1); +#if 0 + // TODO remove this capability? + // GVar source (er9x/ersky9x) + if (GetEepromInterface()->getCapability(GvarsHaveSources)) { + QComboBox *source = new QComboBox(ui->gvGB); + source->setProperty("index", i); + populateGvSourceCB(source, model.gvsource[i]); + // connect(source, SIGNAL(currentIndexChanged(int)), this, SLOT(phaseGVSource_currentIndexChanged(int))); + gvLayout->addWidget(source, i, col++, 1, 1); + } +#endif + // GVar name + int nameLen = GetEepromInterface()->getCapability(GvarsName); + if (nameLen > 0) { + gvNames[i] = new QLineEdit(ui->gvGB); + gvNames[i]->setProperty("index", i); + gvNames[i]->setMaxLength(nameLen); + connect(gvNames[i], SIGNAL(editingFinished()), this, SLOT(GVName_editingFinished())); + gvLayout->addWidget(gvNames[i], i, col++, 1, 1); + } + if (phaseIdx > 0) { + // GVar link to another GVar + QComboBox *link = new QComboBox(ui->gvGB); + link->setProperty("index", i); + populateGvarUseCB(link, phaseIdx); + if (phase.gvars[i] > 1024) { + link->setCurrentIndex(phase.gvars[i] - 1024); + } + connect(link, SIGNAL(currentIndexChanged(int)), this, SLOT(phaseGVUse_currentIndexChanged(int))); + gvLayout->addWidget(link, i, col++, 1, 1); + } + // GVar value + gvValues[i] = new QSpinBox(ui->gvGB); + gvValues[i]->setProperty("index", i); + connect(gvValues[i], SIGNAL(editingFinished()), this, SLOT(phaseGVValue_editingFinished())); + gvValues[i]->setMinimum(-1024); + gvValues[i]->setMaximum(1024); + gvLayout->addWidget(gvValues[i], i, col++, 1, 1); + } + } + else { + ui->gvGB->hide(); + } + + update(); +} + +FlightMode::~FlightMode() +{ + delete ui; +} + +void FlightMode::update() +{ + ui->name->setText(phase.name); + + int scale = GetEepromInterface()->getCapability(SlowScale); + ui->fadeIn->setValue(float(phase.fadeIn)/scale); + ui->fadeOut->setValue(float(phase.fadeOut)/scale); + + for (int i=0; i<4; i++) { + int trimsMax = GetEepromInterface()->getCapability(ExtendedTrims); + if (trimsMax == 0 || !model.extendedTrims) { + trimsMax = 125; + } + trimsSlider[i]->setRange(-trimsMax, +trimsMax); + trimsValue[i]->setRange(-trimsMax, +trimsMax); + int chn = CONVERT_MODE(i+1)-1; + if (chn == 2/*TODO constant*/ && model.throttleReversed) + trimsSlider[i]->setInvertedAppearance(true); + + trimUpdate(i); + } + + for (int i=0; isetText(model.gvars_names[i]); + if (phase.gvars[i] < 1024) { + gvValues[i]->setValue(phase.gvars[i]); + gvValues[i]->setDisabled(false); + } + else { + int idx = phase.gvars[i] - 1025; + if (idx >= i) idx++; + // TODO no!!!! + PhaseData *phasegvar = &model.phaseData[idx]; + gvValues[i]->setValue(phasegvar->gvars[i]); + gvValues[i]->setDisabled(true); + } + } + + for (int i=0; isetValue(phase.rotaryEncoders[i]); + reValues[i]->setDisabled(false); + } + else { + int idx = phase.rotaryEncoders[i] - 1025; + if (idx >= i) idx++; + // TODO no!!!! + PhaseData *phasere = &model.phaseData[idx]; + reValues[i]->setValue(phasere->rotaryEncoders[i]); + reValues[i]->setDisabled(true); + } + } +} + +void FlightMode::phaseName_editingFinished() +{ + QLineEdit *lineEdit = qobject_cast(sender()); + strcpy(phase.name, lineEdit->text().toAscii()); + emit modified(); + emit nameModified(); +} + +void FlightMode::phaseSwitch_currentIndexChanged(int index) +{ + QComboBox *comboBox = qobject_cast(sender()); + phase.swtch = RawSwitch(comboBox->itemData(index).toInt()); + emit modified(); +} + +void FlightMode::phaseFadeIn_editingFinished() +{ + QDoubleSpinBox *spinBox = qobject_cast(sender()); + int scale = GetEepromInterface()->getCapability(SlowScale); + phase.fadeIn = round(spinBox->value()*scale); + emit modified(); +} + +void FlightMode::phaseFadeOut_editingFinished() +{ + QDoubleSpinBox *spinBox = qobject_cast(sender()); + int scale = GetEepromInterface()->getCapability(SlowScale); + phase.fadeOut = round(spinBox->value()*scale); + emit modified(); +} + +void FlightMode::trimUpdate(unsigned int trim) +{ + lock = true; + int chn = CONVERT_MODE(trim+1)-1; + int value = phase.trim[chn]; + if (phaseIdx > 0 && phase.trimRef[chn] >= 0) { + trimsUse[trim]->setCurrentIndex(1 + phase.trimRef[chn] - (phase.trimRef[chn] >= phaseIdx ? 1 : 0)); + value = model.phaseData[model.getTrimFlightPhase(chn, phaseIdx)].trim[chn]; + trimsValue[trim]->setEnabled(false); + trimsSlider[trim]->setEnabled(false); + } + else { + if (phaseIdx > 0) trimsUse[trim]->setCurrentIndex(0); + trimsValue[trim]->setEnabled(true); + trimsSlider[trim]->setEnabled(true); + } + trimsSlider[trim]->setValue(value); + trimsValue[trim]->setValue(value); + lock = false; +} + +void FlightMode::phaseGVValue_editingFinished() +{ + if (!lock) { + QSpinBox *spinBox = qobject_cast(sender()); + int gvar = spinBox->property("index").toInt(); + phase.gvars[gvar] = spinBox->value(); + emit modified(); + } +} + +void FlightMode::GVName_editingFinished() +{ + if (!lock) { + QLineEdit *lineedit = qobject_cast(sender()); + int gvar = lineedit->property("index").toInt(); + memset(&model.gvars_names[gvar], 0, sizeof(model.gvars_names[gvar])); + strcpy(model.gvars_names[gvar], lineedit->text().toAscii()); + emit modified(); + } +} + +void FlightMode::GVSource_currentIndexChanged(int index) +{ + QComboBox *comboBox = qobject_cast(sender()); + int gvar = comboBox->property("index").toInt(); + model.gvsource[gvar] = index; + emit modified(); +} + +void FlightMode::phaseGVUse_currentIndexChanged(int index) +{ + if (!lock) { + lock = true; + QComboBox *comboBox = qobject_cast(sender()); + int gvar = comboBox->property("index").toInt(); + if (index == 0) { + int value = phase.gvars[gvar]; + if (value>1024) { + value=0; + } + gvValues[gvar]->setValue(value); + gvValues[gvar]->setEnabled(true); + phase.gvars[gvar]=value; + } + else { + phase.gvars[gvar] = 1024+index; + // TOTO it's wrong!!! + int value = model.phaseData[index + (index>phaseIdx ? 0 :-1)].gvars[gvar]; + gvValues[gvar]->setValue(value); + gvValues[gvar]->setDisabled(true); + } + emit modified(); + lock = false; + } +} + +void FlightMode::phaseREValue_editingFinished() +{ + if (!lock) { + QSpinBox *spinBox = qobject_cast(sender()); + int gvar = spinBox->property("index").toInt(); + phase.rotaryEncoders[gvar] = spinBox->value(); + emit modified(); + } +} + +void FlightMode::phaseREUse_currentIndexChanged(int index) +{ + if (!lock) { + lock = true; + QComboBox *comboBox = qobject_cast(sender()); + int re = comboBox->property("index").toInt(); + if (index == 0) { + // TODO no!!! + int value = phase.rotaryEncoders[re]; + if (value > 1024) { + value = 0; + } + reValues[re]->setValue(value); + reValues[re]->setEnabled(true); + phase.rotaryEncoders[re] = value; + } + else { + phase.rotaryEncoders[re] = 1024 + index; + int value = model.phaseData[index + (index>phaseIdx ? 0 :-1)].rotaryEncoders[re]; + reValues[re]->setValue(value); + reValues[re]->setDisabled(true) ; + } + lock = false; + emit modified(); + } +} + +void FlightMode::phaseTrimUse_currentIndexChanged(int index) +{ + if (!lock) { + QComboBox *comboBox = qobject_cast(sender()); + int trim = comboBox->property("index").toInt(); + int chn = CONVERT_MODE(trim+1)-1; + if (index == 0) { + phase.trim[chn] = model.phaseData[model.getTrimFlightPhase(chn, phaseIdx)].trim[chn]; + phase.trimRef[chn] = -1; + } + else { + phase.trim[chn] = 0; + phase.trimRef[chn] = index - 1 + (index > (int)phaseIdx ? 1 : 0); + } + + trimUpdate(trim); + emit modified(); + } +} + +void FlightMode::phaseTrim_valueChanged() +{ + if (!lock) { + QSpinBox *spinBox = qobject_cast(sender()); + int trim = spinBox->property("index").toInt(); + int chn = CONVERT_MODE(trim+1)-1; + int value = spinBox->value(); + phase.trim[chn] = value; + lock = true; + trimsSlider[trim]->setValue(value); + lock = false; + emit modified(); + } +} + +void FlightMode::phaseTrimSlider_valueChanged() +{ + if (!lock) { + QSlider *slider = qobject_cast(sender()); + int trim = slider->property("index").toInt(); + int chn = CONVERT_MODE(trim+1)-1; + int value = slider->value(); + phase.trim[chn] = value; + lock = true; + trimsValue[trim]->setValue(value); + lock = false; + emit modified(); + } +} + +/**********************************************************/ + +FlightModes::FlightModes(QWidget * parent, ModelData & model, GeneralSettings & generalSettings): + ModelPanel(parent, model), + modesCount(GetEepromInterface()->getCapability(FlightPhases)) +{ + QGridLayout * gridLayout = new QGridLayout(this); + tabWidget = new QTabWidget(this); + for (int i=0; isetProperty("index", i); + panels << tab; + connect(tab, SIGNAL(modified()), this, SLOT(onPhaseModified())); + connect(tab, SIGNAL(nameModified()), this, SLOT(onPhaseNameChanged())); + tabWidget->addTab(tab, getTabName(i)); + } + gridLayout->addWidget(tabWidget, 0, 0, 1, 1); + connect(tabWidget, SIGNAL(currentChanged(int)), this, SLOT(on_tabWidget_currentChanged(int))); +} + +FlightModes::~FlightModes() +{ +} + +void FlightModes::onPhaseModified() +{ + emit modified(); +} + +QString FlightModes::getTabName(int index) +{ + QString result = tr("Flight Mode %1").arg(index); + const char *name = model.phaseData[index].name; + if (GetEepromInterface()->getCapability(FlightModesName) && strlen(name) > 0) { + result += tr(" (%1)").arg(name); + } + else if (index == 0) { + result += tr(" (default)"); + } + + return result; +} + +void FlightModes::onPhaseNameChanged() +{ + int index = sender()->property("index").toInt(); + tabWidget->setTabText(index, getTabName(index)); +} + +void FlightModes::update() +{ + on_tabWidget_currentChanged(tabWidget->currentIndex()); +} + +void FlightModes::on_tabWidget_currentChanged(int index) +{ + panels[index]->update(); +} diff --git a/companion/src/modeledit/flightmodes.h b/companion/src/modeledit/flightmodes.h new file mode 100644 index 000000000..0a09f279b --- /dev/null +++ b/companion/src/modeledit/flightmodes.h @@ -0,0 +1,86 @@ +#ifndef FLIGHTMODES_H +#define FLIGHTMODES_H + +#include "modelpanel.h" +#include +#include +#include +#include +#include + +namespace Ui { + class FlightMode; +} + +class FlightMode : public ModelPanel +{ + Q_OBJECT + + public: + FlightMode(QWidget *parent, ModelData &model, int modeIdx, GeneralSettings & generalSettings); + virtual ~FlightMode(); + + virtual void update(); + + signals: + void nameModified(); + + private slots: + void phaseName_editingFinished(); + void phaseSwitch_currentIndexChanged(int index); + void phaseFadeIn_editingFinished(); + void phaseFadeOut_editingFinished(); + void phaseTrimUse_currentIndexChanged(int index); + void phaseTrim_valueChanged(); + void phaseTrimSlider_valueChanged(); + void GVName_editingFinished(); + void GVSource_currentIndexChanged(int index); + void phaseGVValue_editingFinished(); + void phaseGVUse_currentIndexChanged(int index); + void phaseREValue_editingFinished(); + void phaseREUse_currentIndexChanged(int index); + + private: + Ui::FlightMode *ui; + GeneralSettings & generalSettings; + int phaseIdx; + PhaseData & phase; + int reCount; + int gvCount; + QVector trimsLabel; + QLineEdit * gvNames[C9X_MAX_GVARS]; + QSpinBox * gvValues[C9X_MAX_GVARS]; + QSpinBox * reValues[C9X_MAX_ENCODERS]; + QVector trimsUse; + QVector trimsValue; + QVector trimsSlider; + + void trimUpdate(unsigned int trim); + +}; + +class FlightModes : public ModelPanel +{ + Q_OBJECT + + public: + FlightModes(QWidget *parent, ModelData & model, GeneralSettings & generalSettings); + virtual ~FlightModes(); + + virtual void update(); + + private slots: + void onPhaseModified(); + void onPhaseNameChanged(); + void on_tabWidget_currentChanged(int index); + + private: + int modesCount; + QTabWidget *tabWidget; + QString getTabName(int index); + QVector panels; + +}; + +#endif // FLIGHTMODES_H + diff --git a/companion/src/modeledit/heli.cpp b/companion/src/modeledit/heli.cpp new file mode 100644 index 000000000..a6a97a1b9 --- /dev/null +++ b/companion/src/modeledit/heli.cpp @@ -0,0 +1,49 @@ +#include "heli.h" +#include "ui_heli.h" +#include "helpers.h" + +HeliPanel::HeliPanel(QWidget *parent, ModelData & model): + ModelPanel(parent, model), + ui(new Ui::Heli) +{ + ui->setupUi(this); + + connect(ui->swashTypeCB, SIGNAL(currentIndexChanged(int)), this, SLOT(edited())); + connect(ui->swashCollectiveCB, SIGNAL(currentIndexChanged(int)), this, SLOT(edited())); + connect(ui->swashRingValSB, SIGNAL(editingFinished()), this, SLOT(edited())); + connect(ui->swashInvertELE, SIGNAL(stateChanged(int)), this, SLOT(edited())); + connect(ui->swashInvertAIL, SIGNAL(stateChanged(int)), this, SLOT(edited())); + connect(ui->swashInvertCOL, SIGNAL(stateChanged(int)), this, SLOT(edited())); +} + +HeliPanel::~HeliPanel() +{ + delete ui; +} + +void HeliPanel::update() +{ + lock = true; + + ui->swashTypeCB->setCurrentIndex(model.swashRingData.type); + populateSourceCB(ui->swashCollectiveCB, model.swashRingData.collectiveSource, model, POPULATE_SOURCES | POPULATE_SWITCHES | POPULATE_TRIMS); + ui->swashRingValSB->setValue(model.swashRingData.value); + ui->swashInvertELE->setChecked(model.swashRingData.invertELE); + ui->swashInvertAIL->setChecked(model.swashRingData.invertAIL); + ui->swashInvertCOL->setChecked(model.swashRingData.invertCOL); + + lock = false; +} + +void HeliPanel::edited() +{ + if (!lock) { + model.swashRingData.type = ui->swashTypeCB->currentIndex(); + model.swashRingData.collectiveSource = ui->swashCollectiveCB->itemData(ui->swashCollectiveCB->currentIndex()).toInt(); + model.swashRingData.value = ui->swashRingValSB->value(); + model.swashRingData.invertELE = ui->swashInvertELE->isChecked(); + model.swashRingData.invertAIL = ui->swashInvertAIL->isChecked(); + model.swashRingData.invertCOL = ui->swashInvertCOL->isChecked(); + emit modified(); + } +} diff --git a/companion/src/modeledit/heli.h b/companion/src/modeledit/heli.h new file mode 100644 index 000000000..7b5e3a73d --- /dev/null +++ b/companion/src/modeledit/heli.h @@ -0,0 +1,26 @@ +#ifndef HELI_H +#define HELI_H + +#include "modelpanel.h" + +namespace Ui { + class Heli; +} + +class HeliPanel : public ModelPanel +{ + Q_OBJECT + + public: + HeliPanel(QWidget *parent, ModelData & model); + ~HeliPanel(); + void update(); + + private slots: + void edited(); + + private: + Ui::Heli *ui; +}; + +#endif // HELI_H diff --git a/companion/src/modeledit/heli.ui b/companion/src/modeledit/heli.ui new file mode 100644 index 000000000..c9741fde9 --- /dev/null +++ b/companion/src/modeledit/heli.ui @@ -0,0 +1,141 @@ + + + Heli + + + + 0 + 0 + 795 + 307 + + + + Form + + + + 6 + + + + + + + Invert Elevator + + + + + + + Invert Aileron + + + + + + + Invert Collective + + + + + + + + + Invert + + + + + + + + Off + + + + + 120 + + + + + 120X + + + + + 140 + + + + + 90 + + + + + + + + Collective + + + + + + + + + + Swash Type + + + + + + + + + + 0 + + + 100 + + + 1 + + + 0 + + + + + + + Swash Ring + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + diff --git a/companion/src/modeledit/inputs.cpp b/companion/src/modeledit/inputs.cpp new file mode 100644 index 000000000..870ab81b7 --- /dev/null +++ b/companion/src/modeledit/inputs.cpp @@ -0,0 +1,468 @@ +#include "inputs.h" +#include +#include "expodialog.h" +#include "helpers.h" + +InputsPanel::InputsPanel(QWidget *parent, ModelData & model, GeneralSettings & generalSettings): + ModelPanel(parent, model), + generalSettings(generalSettings), + expoInserted(false) +{ + QGridLayout * exposLayout = new QGridLayout(this); + + ExposlistWidget = new MixersList(this, true); + QPushButton * qbUp = new QPushButton(this); + QPushButton * qbDown = new QPushButton(this); + QPushButton * qbClear = new QPushButton(this); + + qbUp->setText(tr("Move Up")); + qbUp->setIcon(CompanionIcon("moveup.png")); + qbUp->setShortcut(QKeySequence(tr("Ctrl+Up"))); + qbDown->setText(tr("Move Down")); + qbDown->setIcon(CompanionIcon("movedown.png")); + qbDown->setShortcut(QKeySequence(tr("Ctrl+Down"))); + qbClear->setText(tr("Clear All Settings")); + qbClear->setIcon(CompanionIcon("clear.png")); + + exposLayout->addWidget(ExposlistWidget,1,1,1,3); + exposLayout->addWidget(qbUp,2,1); + exposLayout->addWidget(qbClear,2,2); + exposLayout->addWidget(qbDown,2,3); + + connect(ExposlistWidget, SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(expolistWidget_customContextMenuRequested(QPoint))); + connect(ExposlistWidget, SIGNAL(doubleClicked(QModelIndex)),this,SLOT(expolistWidget_doubleClicked(QModelIndex))); + connect(ExposlistWidget, SIGNAL(mimeDropped(int,const QMimeData*,Qt::DropAction)),this,SLOT(mimeExpoDropped(int,const QMimeData*,Qt::DropAction))); + + connect(qbUp, SIGNAL(pressed()),SLOT(moveExpoUp())); + connect(qbDown, SIGNAL(pressed()),SLOT(moveExpoDown())); + connect(qbClear, SIGNAL(pressed()),SLOT(clearExpos())); + + connect(ExposlistWidget, SIGNAL(keyWasPressed(QKeyEvent*)), this, SLOT(expolistWidget_KeyPress(QKeyEvent*))); +} + +InputsPanel::~InputsPanel() +{ +} + +void InputsPanel::update() +{ + lock = true; + + int inputsCount = GetEepromInterface()->getCapability(VirtualInputs); + if (inputsCount == 0) + inputsCount = NUM_STICKS; + + // curDest -> destination channel + // i -> mixer number + QByteArray qba; + ExposlistWidget->clear(); + int curDest = -1; + + for(int i=0; imode==0) break; + + QString str; + + while (curDest<(int)md->chn-1) { + curDest++; + str = getInputStr(model, curDest); + qba.clear(); + qba.append((quint8)-curDest-1); + QListWidgetItem *itm = new QListWidgetItem(str); + itm->setData(Qt::UserRole,qba); + ExposlistWidget->addItem(itm); + } + + if (curDest!=(int)md->chn) { + if (GetEepromInterface()->getCapability(VirtualInputs)) + str = QString("%1").arg(getInputStr(model, md->chn), -8, ' '); + else + str = getInputStr(model, md->chn); + curDest = md->chn; + } + else { + str = " "; + } + + if (GetEepromInterface()->getCapability(VirtualInputs)) { + str += " " + tr("Source(%1)").arg(md->srcRaw.toString()); + if (md->carryTrim>0) { + str += " " + tr("No Trim"); + } + else if (md->carryTrim<0) { + str += " " + RawSource(SOURCE_TYPE_TRIM, (-(md->carryTrim)-1)).toString(); + } + } + else { + switch (md->mode) { + case (1): str += " <-"; break; + case (2): str += " ->"; break; + default: str += " "; break; + }; + } + + str += " " + tr("Weight(%1)").arg(getGVarString(md->weight)); + + if (md->curve.value) str += " " + md->curve.toString(); + + QString phasesStr = getPhasesStr(md->phases, model); + if (!phasesStr.isEmpty()) str += " " + phasesStr; + + if (md->swtch.type != SWITCH_TYPE_NONE) str += " " + tr("Switch(%1)").arg(md->swtch.toString()); + + if (GetEepromInterface()->getCapability(HasExpoNames)) { + QString expoName = md->name; + if (!expoName.isEmpty()) str += QString(" [%1]").arg(expoName); + } + + qba.clear(); + qba.append((quint8)i); + qba.append((const char*)md, sizeof(ExpoData)); + QListWidgetItem *itm = new QListWidgetItem(str); + itm->setData(Qt::UserRole,qba); // expo number + ExposlistWidget->addItem(itm); //(str); + } + + while (curDestsetData(Qt::UserRole,qba); // add new expo + ExposlistWidget->addItem(itm); + } + + lock = false; +} + + +bool InputsPanel::gm_insertExpo(int idx) +{ + if (idx<0 || idx>=C9X_MAX_EXPOS || model.expoData[C9X_MAX_EXPOS-1].mode > 0) { + QMessageBox::information(this, "companion", tr("Not enough available inputs!")); + return false; + } + + int chn = model.expoData[idx].chn; + memmove(&model.expoData[idx+1],&model.expoData[idx], + (C9X_MAX_EXPOS-(idx+1))*sizeof(ExpoData) ); + memset(&model.expoData[idx],0,sizeof(ExpoData)); + model.expoData[idx].chn = chn; + model.expoData[idx].weight = 100; + model.expoData[idx].mode = 3 /* TODO enum */; + return true; +} + +void InputsPanel::gm_deleteExpo(int index) +{ + memmove(&model.expoData[index],&model.expoData[index+1], + (C9X_MAX_EXPOS-(index+1))*sizeof(ExpoData)); + memset(&model.expoData[C9X_MAX_EXPOS-1],0,sizeof(ExpoData)); +} + +void InputsPanel::gm_openExpo(int index) +{ + if(index<0 || index>=C9X_MAX_EXPOS) return; + + ExpoData mixd(model.expoData[index]); + emit modified(); + update(); + + ExpoDialog *g = new ExpoDialog(this, model, &mixd, generalSettings.stickMode); + if (g->exec()) { + model.expoData[index] = mixd; + emit modified(); + update(); + } + else { + if (expoInserted) { + gm_deleteExpo(index); + } + expoInserted=false; + emit modified(); + update(); + } +} + +int InputsPanel::getExpoIndex(unsigned int dch) +{ + unsigned int i = 0; + while (model.expoData[i].chn<=dch && model.expoData[i].mode && i InputsPanel::createExpoListFromSelected() +{ + QList list; + foreach(QListWidgetItem *item, ExposlistWidget->selectedItems()) { + int idx= item->data(Qt::UserRole).toByteArray().at(0); + if(idx>=0 && idx list) +{ + for(int i=0; icount(); i++) { + int t = ExposlistWidget->item(i)->data(Qt::UserRole).toByteArray().at(0); + if(list.contains(t)) + ExposlistWidget->item(i)->setSelected(true); + } +} + +void InputsPanel::exposDelete(bool ask) +{ + QMessageBox::StandardButton ret = QMessageBox::No; + + if(ask) + ret = QMessageBox::warning(this, "companion", + tr("Delete Selected Inputs?"), + QMessageBox::Yes | QMessageBox::No); + + + if ((ret == QMessageBox::Yes) || (!ask)) { + exposDeleteList(createExpoListFromSelected()); + emit modified(); + update(); + } +} + +void InputsPanel::exposCut() +{ + exposCopy(); + exposDelete(false); +} + +void InputsPanel::exposCopy() +{ + QList list = createExpoListFromSelected(); + + QByteArray mxData; + foreach(int idx, list) { + mxData.append((char*)&model.expoData[idx],sizeof(ExpoData)); + } + + QMimeData *mimeData = new QMimeData; + mimeData->setData("application/x-companion-expo", mxData); + QApplication::clipboard()->setMimeData(mimeData,QClipboard::Clipboard); +} + +void InputsPanel::mimeExpoDropped(int index, const QMimeData *data, Qt::DropAction /*action*/) +{ + int idx = ExposlistWidget->item(index > 0 ? index-1 : 0)->data(Qt::UserRole).toByteArray().at(0); + pasteExpoMimeData(data, idx); +} + +#include +#include +void InputsPanel::pasteExpoMimeData(const QMimeData * mimeData, int destIdx) +{ + if (mimeData->hasFormat("application/x-companion-expo")) { + int idx; // mixer index + int dch; + + if (destIdx < 0) { + dch = -destIdx - 1; + idx = getExpoIndex(dch) - 1; //get expo index to insert + } else { + idx = destIdx; + dch = model.expoData[idx].chn; + } + + QByteArray mxData = mimeData->data("application/x-companion-expo"); + + int i = 0; + while (i < mxData.size()) { + idx++; + if (!gm_insertExpo(idx)) + break; + ExpoData *md = &model.expoData[idx]; + memcpy(md, mxData.mid(i, sizeof(ExpoData)).constData(), sizeof(ExpoData)); + md->chn = dch; + i += sizeof(ExpoData); + } + + emit modified(); + update(); + } +} + + +void InputsPanel::exposPaste() +{ + const QClipboard *clipboard = QApplication::clipboard(); + const QMimeData *mimeData = clipboard->mimeData(); + QListWidgetItem *item = ExposlistWidget->currentItem(); + if (item) + pasteExpoMimeData(mimeData, item->data(Qt::UserRole).toByteArray().at(0)); +} + +void InputsPanel::exposDuplicate() +{ + exposCopy(); + exposPaste(); +} + + +void InputsPanel::expoOpen(QListWidgetItem *item) +{ + if (!item) + item = ExposlistWidget->currentItem(); + + int idx = item->data(Qt::UserRole).toByteArray().at(0); + if (idx<0) { + int ch = -idx-1; + idx = getExpoIndex(ch); // get expo index to insert + if (!gm_insertExpo(idx)) + return; + model.expoData[idx].chn = ch; + expoInserted=true; + } else { + expoInserted=false; + } + gm_openExpo(idx); +} + +void InputsPanel::expoAdd() +{ + int index = ExposlistWidget->currentItem()->data(Qt::UserRole).toByteArray().at(0); + + if(index<0) { // if empty then return relevant index + expoOpen(); + } else { + index++; + if (!gm_insertExpo(index)) + return; + model.expoData[index].chn = model.expoData[index-1].chn; + } + gm_openExpo(index); +} + + +void InputsPanel::expolistWidget_customContextMenuRequested(QPoint pos) +{ + QPoint globalPos = ExposlistWidget->mapToGlobal(pos); + + const QClipboard *clipboard = QApplication::clipboard(); + const QMimeData *mimeData = clipboard->mimeData(); + bool hasData = mimeData->hasFormat("application/x-companion-expo"); + + QMenu contextMenu; + contextMenu.addAction(CompanionIcon("add.png"), tr("&Add"),this,SLOT(expoAdd()),tr("Ctrl+A")); + contextMenu.addAction(CompanionIcon("edit.png"), tr("&Edit"),this,SLOT(expoOpen()),tr("Enter")); + contextMenu.addSeparator(); + contextMenu.addAction(CompanionIcon("clear.png"), tr("&Delete"),this,SLOT(exposDelete()),tr("Delete")); + contextMenu.addAction(CompanionIcon("copy.png"), tr("&Copy"),this,SLOT(exposCopy()),tr("Ctrl+C")); + contextMenu.addAction(CompanionIcon("cut.png"), tr("&Cut"),this,SLOT(exposCut()),tr("Ctrl+X")); + contextMenu.addAction(CompanionIcon("paste.png"), tr("&Paste"),this,SLOT(exposPaste()),tr("Ctrl+V"))->setEnabled(hasData); + contextMenu.addAction(CompanionIcon("duplicate.png"), tr("Du&plicate"),this,SLOT(exposDuplicate()),tr("Ctrl+U")); + contextMenu.addSeparator(); + contextMenu.addAction(CompanionIcon("moveup.png"), tr("Move Up"),this,SLOT(moveExpoUp()),tr("Ctrl+Up")); + contextMenu.addAction(CompanionIcon("movedown.png"), tr("Move Down"),this,SLOT(moveExpoDown()),tr("Ctrl+Down")); + + contextMenu.exec(globalPos); +} + + +void InputsPanel::expolistWidget_KeyPress(QKeyEvent *event) +{ + if(event->matches(QKeySequence::SelectAll)) expoAdd(); //Ctrl A + if(event->matches(QKeySequence::Delete)) exposDelete(); + if(event->matches(QKeySequence::Copy)) exposCopy(); + if(event->matches(QKeySequence::Cut)) exposCut(); + if(event->matches(QKeySequence::Paste)) exposPaste(); + if(event->matches(QKeySequence::Underline)) exposDuplicate(); + + if(event->key()==Qt::Key_Return || event->key()==Qt::Key_Enter) expoOpen(); + if(event->matches(QKeySequence::MoveToNextLine)) + ExposlistWidget->setCurrentRow(ExposlistWidget->currentRow()+1); + if(event->matches(QKeySequence::MoveToPreviousLine)) + ExposlistWidget->setCurrentRow(ExposlistWidget->currentRow()-1); +} + + +int InputsPanel::gm_moveExpo(int idx, bool dir) //true=inc=down false=dec=up +{ + if(idx>C9X_MAX_EXPOS || (idx==C9X_MAX_EXPOS && dir)) return idx; + + int tdx = dir ? idx+1 : idx-1; + ExpoData temp; + temp.clear(); + ExpoData &src=model.expoData[idx]; + ExpoData &tgt=model.expoData[tdx]; + if (!dir && tdx<0 && src.chn>0) { + src.chn--; + return idx; + } else if (!dir && tdx<0) { + return idx; + } + + if(memcmp(&src,&temp,sizeof(ExpoData))==0) return idx; + bool tgtempty=(memcmp(&tgt,&temp,sizeof(ExpoData))==0 ? 1:0); + if(tgt.chn!=src.chn || tgtempty) { + if ((dir) && (src.chn<(NUM_STICKS-1))) src.chn++; + if ((!dir) && (src.chn>0)) src.chn--; + return idx; + } + + //flip between idx and tgt + memcpy(&temp,&src,sizeof(ExpoData)); + memcpy(&src,&tgt,sizeof(ExpoData)); + memcpy(&tgt,&temp,sizeof(ExpoData)); + return tdx; +} + +void InputsPanel::moveExpoUp() +{ + QList list = createExpoListFromSelected(); + QList highlightList; + foreach(int idx, list) { + highlightList << gm_moveExpo(idx, false); + } + emit modified(); + update(); + setSelectedByExpoList(highlightList); +} + +void InputsPanel::moveExpoDown() +{ + QList list = createExpoListFromSelected(); + QList highlightList; + foreach(int idx, list) { + highlightList << gm_moveExpo(idx, true); + } + emit modified(); + update(); + setSelectedByExpoList(highlightList); +} + +void InputsPanel::expolistWidget_doubleClicked(QModelIndex index) +{ + expoOpen(ExposlistWidget->item(index.row())); +} + +void InputsPanel::exposDeleteList(QList list) +{ + qSort(list.begin(), list.end()); + + int iDec = 0; + foreach(int idx, list) { + gm_deleteExpo(idx-iDec); + iDec++; + } +} + +void InputsPanel::clearExpos() +{ + if (QMessageBox::question(this, tr("Clear Inputs?"), tr("Really clear all the inputs?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { + model.clearInputs(); + emit modified(); + update(); + } +} diff --git a/companion/src/modeledit/inputs.h b/companion/src/modeledit/inputs.h new file mode 100644 index 000000000..4164caac9 --- /dev/null +++ b/companion/src/modeledit/inputs.h @@ -0,0 +1,50 @@ +#ifndef INPUTS_H +#define INPUTS_H + +#include "modelpanel.h" +#include "mixerslist.h" + +class InputsPanel : public ModelPanel +{ + Q_OBJECT + + public: + InputsPanel(QWidget *parent, ModelData & model, GeneralSettings & generalSettings); + virtual ~InputsPanel(); + + virtual void update(); + + private slots: + void clearExpos(); + void moveExpoUp(); + void moveExpoDown(); + void mimeExpoDropped(int index, const QMimeData *data, Qt::DropAction action); + void expolistWidget_customContextMenuRequested(QPoint pos); + void expolistWidget_doubleClicked(QModelIndex index); + void expolistWidget_KeyPress(QKeyEvent *event); + void exposDelete(bool ask=true); + void exposCut(); + void exposCopy(); + void exposPaste(); + void exposDuplicate(); + void expoOpen(QListWidgetItem *item = NULL); + void expoAdd(); + + private: + GeneralSettings & generalSettings; + bool expoInserted; + MixersList *ExposlistWidget; + + int getExpoIndex(unsigned int dch); + bool gm_insertExpo(int idx); + void gm_deleteExpo(int index); + void gm_openExpo(int index); + int gm_moveExpo(int idx, bool dir); + void exposDeleteList(QList list); + QList createExpoListFromSelected(); + void setSelectedByExpoList(QList list); + void pasteExpoMimeData(const QMimeData * mimeData, int destIdx); + +}; + +#endif // INPUTS_H diff --git a/companion/src/modeledit/mixerdialog.cpp b/companion/src/modeledit/mixerdialog.cpp new file mode 100644 index 000000000..7ef03fdca --- /dev/null +++ b/companion/src/modeledit/mixerdialog.cpp @@ -0,0 +1,195 @@ +#include "mixerdialog.h" +#include "ui_mixerdialog.h" +#include "eeprominterface.h" +#include "helpers.h" + +MixerDialog::MixerDialog(QWidget *parent, ModelData & model, MixData *mixdata, int stickMode) : + QDialog(parent), + ui(new Ui::MixerDialog), + model(model), + md(mixdata), + lock(false) +{ + ui->setupUi(this); + QRegExp rx(CHAR_FOR_NAMES_REGEX); + QLabel * lb_fp[] = {ui->lb_FP0,ui->lb_FP1,ui->lb_FP2,ui->lb_FP3,ui->lb_FP4,ui->lb_FP5,ui->lb_FP6,ui->lb_FP7,ui->lb_FP8 }; + QCheckBox * cb_fp[] = {ui->cb_FP0,ui->cb_FP1,ui->cb_FP2,ui->cb_FP3,ui->cb_FP4,ui->cb_FP5,ui->cb_FP6,ui->cb_FP7,ui->cb_FP8 }; + + if (md->destCh > (unsigned int)GetEepromInterface()->getCapability(Outputs)) + this->setWindowTitle(tr("DEST -> X%1").arg(md->destCh-GetEepromInterface()->getCapability(Outputs))); + else + this->setWindowTitle(tr("DEST -> CH%1%2").arg(md->destCh/10).arg(md->destCh%10)); + + populateSourceCB(ui->sourceCB, md->srcRaw, model, POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TRIMS); + ui->sourceCB->removeItem(0); + + int limit = GetEepromInterface()->getCapability(OffsetWeight); + + gvWeightGroup = new GVarGroup(ui->weightGV, ui->weightSB, ui->weightCB, md->weight, 100, -limit, limit); + gvOffsetGroup = new GVarGroup(ui->offsetGV, ui->offsetSB, ui->offsetCB, md->sOffset, 0, -limit, limit); + + if (GetEepromInterface()->getCapability(VirtualInputs)) { + ui->trimLabel->hide(); + ui->trimCB->hide(); + } + + curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB, md->curve); + + ui->MixDR_CB->setChecked(md->noExpo==0); + if (!GetEepromInterface()->getCapability(MixesWithoutExpo)) { + ui->MixDR_CB->hide(); + ui->label_MixDR->hide(); + } + + ui->trimCB->addItem(tr("Rud"), 1); + ui->trimCB->addItem(tr("Ele"), 2); + ui->trimCB->addItem(tr("Thr"), 3); + ui->trimCB->addItem(tr("Ail"), 4); + ui->trimCB->setCurrentIndex(1 - md->carryTrim); + + int namelength = GetEepromInterface()->getCapability(HasMixerNames); + if (!namelength) { + ui->label_name->hide(); + ui->mixerName->hide(); + } + else { + ui->mixerName->setMaxLength(namelength); + } + ui->mixerName->setValidator(new QRegExpValidator(rx, this)); + ui->mixerName->setText(md->name); + + if (!GetEepromInterface()->getCapability(FlightPhases)) { + ui->label_phases->hide(); + for (int i=0; i<9; i++) { + lb_fp[i]->hide(); + cb_fp[i]->hide(); + } + } + else { + int mask=1; + for (int i=0; i<9 ; i++) { + if ((md->phases & mask)==0) { + cb_fp[i]->setChecked(true); + } + mask <<= 1; + } + for (int i=GetEepromInterface()->getCapability(FlightPhases); i<9;i++) { + lb_fp[i]->hide(); + cb_fp[i]->hide(); + } + } + + populateSwitchCB(ui->switchesCB,md->swtch); + ui->warningCB->setCurrentIndex(md->mixWarn); + ui->mltpxCB->setCurrentIndex(md->mltpx); + int scale=GetEepromInterface()->getCapability(SlowScale); + float range=GetEepromInterface()->getCapability(SlowRange); + ui->slowDownSB->setMaximum(range/scale); + ui->slowDownSB->setSingleStep(1.0/scale); + ui->slowDownSB->setDecimals((scale==1 ? 0 :1)); + ui->slowDownSB->setValue((float)md->speedDown/scale); + ui->slowUpSB->setMaximum(range/scale); + ui->slowUpSB->setSingleStep(1.0/scale); + ui->slowUpSB->setDecimals((scale==1 ? 0 :1)); + ui->slowUpSB->setValue((float)md->speedUp/scale); + ui->delayDownSB->setMaximum(range/scale); + ui->delayDownSB->setSingleStep(1.0/scale); + ui->delayDownSB->setDecimals((scale==1 ? 0 :1)); + ui->delayDownSB->setValue((float)md->delayDown/scale); + ui->delayUpSB->setMaximum(range/scale); + ui->delayUpSB->setSingleStep(1.0/scale); + ui->delayUpSB->setDecimals((scale==1 ? 0 :1)); + ui->delayUpSB->setValue((float)md->delayUp/scale); + QTimer::singleShot(0, this, SLOT(shrink())); + + valuesChanged(); + connect(ui->mixerName,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); + connect(ui->sourceCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); + connect(ui->trimCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); + connect(ui->MixDR_CB,SIGNAL(toggled(bool)),this,SLOT(valuesChanged())); + connect(ui->switchesCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); + connect(ui->warningCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); + connect(ui->mltpxCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); + connect(ui->delayDownSB,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); + connect(ui->delayUpSB,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); + connect(ui->slowDownSB,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); + connect(ui->slowUpSB,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); + for (int i=0; i<9; i++) { + connect(cb_fp[i],SIGNAL(toggled(bool)),this,SLOT(valuesChanged())); + } +} + +MixerDialog::~MixerDialog() +{ + delete gvWeightGroup; + delete gvOffsetGroup; + delete curveGroup; + delete ui; +} + +void MixerDialog::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void MixerDialog::valuesChanged() +{ + if (!lock) { + lock = true; + QCheckBox * cb_fp[] = {ui->cb_FP0,ui->cb_FP1,ui->cb_FP2,ui->cb_FP3,ui->cb_FP4,ui->cb_FP5,ui->cb_FP6,ui->cb_FP7,ui->cb_FP8 }; + md->srcRaw = RawSource(ui->sourceCB->itemData(ui->sourceCB->currentIndex()).toInt(), &model); + if ((ui->sourceCB->itemData(ui->sourceCB->currentIndex()).toInt()-65536)<4) { + if (!GetEepromInterface()->getCapability(MixesWithoutExpo)) { + ui->MixDR_CB->hide(); + ui->label_MixDR->hide(); + } + else { + ui->MixDR_CB->setVisible(true); + ui->label_MixDR->setVisible(true); + } + } + else { + ui->MixDR_CB->setHidden(true); + ui->label_MixDR->setHidden(true); + } + md->carryTrim = -(ui->trimCB->currentIndex()-1); + md->noExpo = ui->MixDR_CB->checkState() ? 0 : 1; + md->swtch = RawSwitch(ui->switchesCB->itemData(ui->switchesCB->currentIndex()).toInt()); + md->mixWarn = ui->warningCB->currentIndex(); + md->mltpx = (MltpxValue)ui->mltpxCB->currentIndex(); + int scale=GetEepromInterface()->getCapability(SlowScale); + md->delayDown = round(ui->delayDownSB->value()*scale); + md->delayUp = round(ui->delayUpSB->value()*scale); + md->speedDown = round(ui->slowDownSB->value()*scale); + md->speedUp = round(ui->slowUpSB->value()*scale); + + int i=0; + for (i=0; imixerName->text().toAscii().length(); i++) { + md->name[i]=ui->mixerName->text().toAscii().at(i); + } + md->name[i]=0; + md->phases=0; + for (int i=8; i>=0 ; i--) { + if (!cb_fp[i]->checkState()) { + md->phases+=1; + } + md->phases<<=1; + } + md->phases>>=1; + + lock = false; + } +} + +void MixerDialog::shrink() +{ + resize(0, 0); +} diff --git a/companion/src/mixerdialog.h b/companion/src/modeledit/mixerdialog.h similarity index 50% rename from companion/src/mixerdialog.h rename to companion/src/modeledit/mixerdialog.h index fcf8c5b2f..437d9ca21 100644 --- a/companion/src/mixerdialog.h +++ b/companion/src/modeledit/mixerdialog.h @@ -4,28 +4,34 @@ #include #include "eeprominterface.h" +class GVarGroup; +class CurveGroup; + namespace Ui { - class MixerDialog; + class MixerDialog; } class MixerDialog : public QDialog { Q_OBJECT -public: - MixerDialog(QWidget *parent, MixData *mixdata, int stickMode); + public: + MixerDialog(QWidget *parent, ModelData & model, MixData *mixdata, int stickMode); ~MixerDialog(); -protected: + protected: void changeEvent(QEvent *e); -private slots: - void widgetChanged(); + private slots: void valuesChanged(); void shrink(); - -private: + private: Ui::MixerDialog *ui; + ModelData & model; MixData *md; + bool lock; + GVarGroup * gvWeightGroup; + GVarGroup * gvOffsetGroup; + CurveGroup * curveGroup; }; #endif // MIXERDIALOG_H diff --git a/companion/src/mixerdialog.ui b/companion/src/modeledit/mixerdialog.ui similarity index 94% rename from companion/src/mixerdialog.ui rename to companion/src/modeledit/mixerdialog.ui index 594d26356..04d876b80 100644 --- a/companion/src/mixerdialog.ui +++ b/companion/src/modeledit/mixerdialog.ui @@ -6,8 +6,8 @@ 0 0 - 367 - 475 + 364 + 434 @@ -20,7 +20,7 @@ Dialog - + :/icon.png:/icon.png @@ -178,42 +178,28 @@ p, li { white-space: pre-wrap; } - - - - Multiplexer - -This determines how mixer values are added. - -"+" means the value of the current mix is added to the previous mixes in the same channel. -"*" means the value of the current mix is amultiplied with the previous mixes in the same channel. -"R" means the value replaces the previous values. If the switch is off the value will be ignored. - - - - ADD - - - - - MULTIPLY - - - - - REPLACE - - - - - - - - The source for the mixer + + + + Include Trim - + + + + Offset + + + + + + + Weight + + + + @@ -370,20 +356,6 @@ This determines how mixer values are added. - - - - Warning - - - - - - - Multiplex - - - @@ -398,52 +370,24 @@ This determines how mixer values are added. - - + + - Weight - - - - - - - Offset - - - - - - - Curve/Differential - - - - - - - Include Trim - - - - - - - Enable FM Trim + Multiplex - + - Flight modes + Warning - - - - Switch + + + + The curve used by the mix @@ -454,14 +398,28 @@ This determines how mixer values are added. - - + + - Fix Offset + Flight modes - + + + + Switch + + + + + + + + + + + Mixer warning. @@ -489,38 +447,18 @@ Setting this value will cause a beep to be emmitted when this value is active. - - - - The curve used by the mix - - - - - - - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - + + + + + No + + + + + Yes + + @@ -557,18 +495,46 @@ Setting this value will cause a beep to be emmitted when this value is active. - - + + + + Multiplexer + +This determines how mixer values are added. + +"+" means the value of the current mix is added to the previous mixes in the same channel. +"*" means the value of the current mix is amultiplied with the previous mixes in the same channel. +"R" means the value replaces the previous values. If the switch is off the value will be ignored. + - No + ADD - Yes + MULTIPLY + + + REPLACE + + + + + + + + The source for the mixer + + + + + + + Curve + @@ -605,7 +571,7 @@ Setting this value will cause a beep to be emmitted when this value is active. - + Switch used by the mix. @@ -623,21 +589,21 @@ If blank then the mix is considered to be "ON" all the time. - + GV - + The source for the mixer - + @@ -646,7 +612,7 @@ If blank then the mix is considered to be "ON" all the time. - + diff --git a/companion/src/mixerslist.cpp b/companion/src/modeledit/mixerslist.cpp similarity index 86% rename from companion/src/mixerslist.cpp rename to companion/src/modeledit/mixerslist.cpp index 4d2f90320..06d8cd3f5 100644 --- a/companion/src/mixerslist.cpp +++ b/companion/src/modeledit/mixerslist.cpp @@ -40,9 +40,9 @@ bool MixersList::dropMimeData( int index, const QMimeData * data, Qt::DropAction { QMimeData *mimeData = new QMimeData; if (expo) - mimeData->setData("application/x-companion9x-expo", qba); + mimeData->setData("application/x-companion-expo", qba); else - mimeData->setData("application/x-companion9x-mix", qba); + mimeData->setData("application/x-companion-mix", qba); emit mimeDropped(index, mimeData, action); } diff --git a/companion/src/mixerslist.h b/companion/src/modeledit/mixerslist.h similarity index 100% rename from companion/src/mixerslist.h rename to companion/src/modeledit/mixerslist.h diff --git a/companion/src/modeledit/mixes.cpp b/companion/src/modeledit/mixes.cpp new file mode 100644 index 000000000..ed6016e57 --- /dev/null +++ b/companion/src/modeledit/mixes.cpp @@ -0,0 +1,515 @@ +#include "mixes.h" +#include "helpers.h" +// #include +// #include "expodialog.h" + +MixesPanel::MixesPanel(QWidget *parent, ModelData & model, GeneralSettings & generalSettings): + ModelPanel(parent, model), + generalSettings(generalSettings), + mixInserted(false) +{ + QGridLayout * mixesLayout = new QGridLayout(this); + + MixerlistWidget = new MixersList(this, false); // TODO enum + QPushButton * qbUp = new QPushButton(this); + QPushButton * qbDown = new QPushButton(this); + QPushButton * qbClear = new QPushButton(this); + qbUp->setText(tr("Move Up")); + qbUp->setIcon(CompanionIcon("moveup.png")); + qbUp->setShortcut(QKeySequence(tr("Ctrl+Up"))); + qbDown->setText(tr("Move Down")); + qbDown->setIcon(CompanionIcon("movedown.png")); + qbDown->setShortcut(QKeySequence(tr("Ctrl+Down"))); + qbClear->setText(tr("Clear Mixes")); + qbClear->setIcon(CompanionIcon("clear.png")); + + mixesLayout->addWidget(MixerlistWidget,1,1,1,3); + mixesLayout->addWidget(qbUp,2,1); + mixesLayout->addWidget(qbClear,2,2); + mixesLayout->addWidget(qbDown,2,3); + + connect(MixerlistWidget,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(mixerlistWidget_customContextMenuRequested(QPoint))); + connect(MixerlistWidget,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(mixerlistWidget_doubleClicked(QModelIndex))); + connect(MixerlistWidget,SIGNAL(mimeDropped(int,const QMimeData*,Qt::DropAction)),this,SLOT(mimeMixerDropped(int,const QMimeData*,Qt::DropAction))); + + connect(qbUp,SIGNAL(pressed()),SLOT(moveMixUp())); + connect(qbDown,SIGNAL(pressed()),SLOT(moveMixDown())); + connect(qbClear,SIGNAL(pressed()),SLOT(clearMixes())); + + connect(MixerlistWidget,SIGNAL(keyWasPressed(QKeyEvent*)), this, SLOT(mixerlistWidget_KeyPress(QKeyEvent*))); +} + +MixesPanel::~MixesPanel() +{ +} + +void MixesPanel::update() +{ + // curDest -> destination channel4 + // i -> mixer number + QByteArray qba; + MixerlistWidget->clear(); + unsigned int curDest = 0; + int i; + unsigned int outputs = GetEepromInterface()->getCapability(Outputs); + int showNames = false; // TODO in a menu ui->showNames_Ckb->isChecked(); + for(i=0; igetCapability(Mixes); i++) { + MixData *md = &model.mixData[i]; + if ((md->destCh==0) || (md->destCh>outputs+(unsigned int)GetEepromInterface()->getCapability(ExtraChannels))) continue; + QString str = ""; + while(curDest<(md->destCh-1)) { + curDest++; + if (curDest > outputs) { + str = tr("X%1 ").arg(curDest-outputs); + } else { + str = tr("CH%1%2").arg(curDest/10).arg(curDest%10); + if (GetEepromInterface()->getCapability(HasChNames) && showNames) { + QString name=model.limitData[curDest-1].name; + if (!name.isEmpty()) { + name.append(" "); + str=name.left(6); + } + } + } + qba.clear(); + qba.append((quint8)-curDest); + QListWidgetItem *itm = new QListWidgetItem(str); + itm->setData(Qt::UserRole,qba); + MixerlistWidget->addItem(itm); + } + + if (md->destCh > outputs) { + str = tr("X%1 ").arg(md->destCh-outputs); + } else { + str = tr("CH%1%2").arg(md->destCh/10).arg(md->destCh%10); + str.append(" "); + if (GetEepromInterface()->getCapability(HasChNames) && showNames) { + QString name=model.limitData[md->destCh-1].name; + if (!name.isEmpty()) { + name.append(" "); + str=name.left(6); + } + } + } + if (curDest != md->destCh) { + curDest = md->destCh; + } else { + str.fill(' '); + } + + switch(md->mltpx) { + case (1): str += " *"; break; + case (2): str += " R"; break; + default: str += " "; break; + }; + + str += " " + md->srcRaw.toString(); + + str += " " + tr("Weight(%1)").arg(getGVarString(md->weight, true)); + + QString phasesStr = getPhasesStr(md->phases, model); + if (!phasesStr.isEmpty()) str += " " + phasesStr; + + if (md->swtch.type != SWITCH_TYPE_NONE) str += " " + tr("Switch(%1)").arg(md->swtch.toString()); + + if (!GetEepromInterface()->getCapability(VirtualInputs)) { + if (md->carryTrim>0) { + str += " " + tr("No Trim"); + } + else if (md->carryTrim<0) { + str += " " + RawSource(SOURCE_TYPE_TRIM, (-(md->carryTrim)-1)).toString(); + } + } + + if (md->noExpo) str += " " + tr("No DR/Expo"); + if (md->sOffset) str += " " + tr("Offset(%1)").arg(getGVarString(md->sOffset)); + if (md->curve.value) str += " " + md->curve.toString(); + + int scale=GetEepromInterface()->getCapability(SlowScale); + if (scale==0) + scale=1; + if (md->delayDown || md->delayUp) + str += tr(" Delay(u%1:d%2)").arg((double)md->delayUp/scale).arg((double)md->delayDown/scale); + if (md->speedDown || md->speedUp) + str += tr(" Slow(u%1:d%2)").arg((double)md->speedUp/scale).arg((double)md->speedDown/scale); + if (md->mixWarn) str += tr(" Warn(%1)").arg(md->mixWarn); + if (GetEepromInterface()->getCapability(HasMixerNames)) { + QString MixerName; + MixerName.append(md->name); + if (!MixerName.isEmpty()) { + str += QString("(%1)").arg(MixerName); + } + } + qba.clear(); + qba.append((quint8)i); + qba.append((const char*)md, sizeof(MixData)); + QListWidgetItem *itm = new QListWidgetItem(str); + itm->setData(Qt::UserRole,qba); // mix number + MixerlistWidget->addItem(itm);//(str); + } + + while(curDestgetCapability(ExtraChannels)) { + curDest++; + QString str; + + if (curDest > outputs) { + str = tr("X%1 ").arg(curDest-outputs); + } + else { + str = tr("CH%1%2").arg(curDest/10).arg(curDest%10); + if (GetEepromInterface()->getCapability(HasChNames) && showNames) { + QString name=model.limitData[curDest-1].name; + if (!name.isEmpty()) { + name.append(" "); + str=name.left(6); + } + } + } + qba.clear(); + qba.append((quint8)-curDest); + QListWidgetItem *itm = new QListWidgetItem(str); + itm->setData(Qt::UserRole,qba); // add new mixer + MixerlistWidget->addItem(itm); + } +} + + +bool MixesPanel::gm_insertMix(int idx) +{ + if (idx<0 || idx>=GetEepromInterface()->getCapability(Mixes) || model.mixData[GetEepromInterface()->getCapability(Mixes)-1].destCh > 0) { + QMessageBox::information(this, "companion", tr("Not enough available mixers!")); + return false; + } + + int i = model.mixData[idx].destCh; + memmove(&model.mixData[idx+1],&model.mixData[idx], + (GetEepromInterface()->getCapability(Mixes)-(idx+1))*sizeof(MixData) ); + memset(&model.mixData[idx],0,sizeof(MixData)); + model.mixData[idx].srcRaw = RawSource(SOURCE_TYPE_NONE); + model.mixData[idx].destCh = i; + model.mixData[idx].weight = 100; + return true; +} + +void MixesPanel::gm_deleteMix(int index) +{ + memmove(&model.mixData[index],&model.mixData[index+1], + (GetEepromInterface()->getCapability(Mixes)-(index+1))*sizeof(MixData)); + memset(&model.mixData[GetEepromInterface()->getCapability(Mixes)-1],0,sizeof(MixData)); +} + +void MixesPanel::gm_openMix(int index) +{ + if(index<0 || index>=GetEepromInterface()->getCapability(Mixes)) return; + + MixData mixd(model.mixData[index]); + emit modified(); + update(); + + MixerDialog *g = new MixerDialog(this, model, &mixd, generalSettings.stickMode); + if(g->exec()) { + model.mixData[index] = mixd; + emit modified(); + update(); + } else { + if (mixInserted) { + gm_deleteMix(index); + } + mixInserted=false; + emit modified(); + update(); + } +} + +int MixesPanel::getMixerIndex(unsigned int dch) +{ + int i = 0; + while ((model.mixData[i].destCh<=dch) && (model.mixData[i].destCh) && (igetCapability(Mixes))) i++; + if(i==GetEepromInterface()->getCapability(Mixes)) return -1; + return i; +} + +void MixesPanel::mixerlistWidget_doubleClicked(QModelIndex index) +{ + int idx= MixerlistWidget->item(index.row())->data(Qt::UserRole).toByteArray().at(0); + if (idx<0) { + int i = -idx; + idx = getMixerIndex(i); //get mixer index to insert + if (!gm_insertMix(idx)) + return; + model.mixData[idx].destCh = i; + mixInserted=true; + } else { + mixInserted=false; + } + gm_openMix(idx); +} + +void MixesPanel::mixersDeleteList(QList list) +{ + qSort(list.begin(), list.end()); + + int iDec = 0; + foreach(int idx, list) { + gm_deleteMix(idx-iDec); + iDec++; + } +} + +QList MixesPanel::createMixListFromSelected() +{ + QList list; + foreach(QListWidgetItem *item, MixerlistWidget->selectedItems()) { + int idx= item->data(Qt::UserRole).toByteArray().at(0); + if(idx>=0 && idxgetCapability(Mixes)) list << idx; + } + return list; +} + +// TODO duplicated code +void MixesPanel::setSelectedByMixList(QList list) +{ + for(int i=0; icount(); i++) { + int t = MixerlistWidget->item(i)->data(Qt::UserRole).toByteArray().at(0); + if(list.contains(t)) + MixerlistWidget->item(i)->setSelected(true); + } +} + + +void MixesPanel::mixersDelete(bool ask) +{ + QMessageBox::StandardButton ret = QMessageBox::No; + + if(ask) + ret = QMessageBox::warning(this, "companion", + tr("Delete Selected Mixes?"), + QMessageBox::Yes | QMessageBox::No); + + + if ((ret == QMessageBox::Yes) || (!ask)) { + mixersDeleteList(createMixListFromSelected()); + emit modified(); + update(); + } +} + +void MixesPanel::mixersCut() +{ + mixersCopy(); + mixersDelete(false); +} + +void MixesPanel::mixersCopy() +{ + + QList list = createMixListFromSelected(); + + QByteArray mxData; + foreach(int idx, list) { + mxData.append((char*)&model.mixData[idx],sizeof(MixData)); + } + + QMimeData *mimeData = new QMimeData; + mimeData->setData("application/x-companion-mix", mxData); + QApplication::clipboard()->setMimeData(mimeData,QClipboard::Clipboard); +} + +void MixesPanel::pasteMixerMimeData(const QMimeData * mimeData, int destIdx) +{ + if(mimeData->hasFormat("application/x-companion-mix")) { + int idx; // mixer index + int dch; + + if(destIdx<0) { + dch = -destIdx; + idx = getMixerIndex(dch) - 1; //get mixer index to insert + } else { + idx = destIdx; + dch = model.mixData[idx].destCh; + } + + QByteArray mxData = mimeData->data("application/x-companion-mix"); + + int i = 0; + while(igetCapability(Mixes)) break; + + if (!gm_insertMix(idx)) + break; + MixData *md = &model.mixData[idx]; + memcpy(md,mxData.mid(i,sizeof(MixData)).constData(),sizeof(MixData)); + md->destCh = dch; + i += sizeof(MixData); + } + + emit modified(); + update(); + } +} + + +void MixesPanel::mixersPaste() +{ + const QClipboard *clipboard = QApplication::clipboard(); + const QMimeData *mimeData = clipboard->mimeData(); + QListWidgetItem *item = MixerlistWidget->currentItem(); + if (item) + pasteMixerMimeData(mimeData, item->data(Qt::UserRole).toByteArray().at(0)); +} + +void MixesPanel::mixersDuplicate() +{ + mixersCopy(); + mixersPaste(); +} + +void MixesPanel::mixerOpen() +{ + int idx = MixerlistWidget->currentItem()->data(Qt::UserRole).toByteArray().at(0); + if(idx<0) { + int i = -idx; + idx = getMixerIndex(i); //get mixer index to insert + if (!gm_insertMix(idx)) + return; + model.mixData[idx].destCh = i; + mixInserted=true; + } else { + mixInserted=false; + } + + gm_openMix(idx); +} + +void MixesPanel::mixerAdd() +{ + if (!MixerlistWidget->currentItem()) + return; + int index = MixerlistWidget->currentItem()->data(Qt::UserRole).toByteArray().at(0); + + if(index<0) { // if empty then return relavent index + int i = -index; + index = getMixerIndex(i); //get mixer index to insert + if (!gm_insertMix(index)) + return; + model.mixData[index].destCh = i; + mixInserted=true; + } else { + index++; + if (!gm_insertMix(index)) + return; + model.mixData[index].destCh = model.mixData[index-1].destCh; + mixInserted=true; + } + gm_openMix(index); +} + +void MixesPanel::mixerlistWidget_customContextMenuRequested(QPoint pos) +{ + QPoint globalPos = MixerlistWidget->mapToGlobal(pos); + + const QClipboard *clipboard = QApplication::clipboard(); + const QMimeData *mimeData = clipboard->mimeData(); + bool hasData = mimeData->hasFormat("application/x-companion-mix"); + + QMenu contextMenu; + contextMenu.addAction(CompanionIcon("add.png"), tr("&Add"),this,SLOT(mixerAdd()),tr("Ctrl+A")); + contextMenu.addAction(CompanionIcon("edit.png"), tr("&Edit"),this,SLOT(mixerOpen()),tr("Enter")); + contextMenu.addSeparator(); + contextMenu.addAction(CompanionIcon("clear.png"), tr("&Delete"),this,SLOT(mixersDelete()),tr("Delete")); + contextMenu.addAction(CompanionIcon("copy.png"), tr("&Copy"),this,SLOT(mixersCopy()),tr("Ctrl+C")); + contextMenu.addAction(CompanionIcon("cut.png"), tr("&Cut"),this,SLOT(mixersCut()),tr("Ctrl+X")); + contextMenu.addAction(CompanionIcon("paste.png"), tr("&Paste"),this,SLOT(mixersPaste()),tr("Ctrl+V"))->setEnabled(hasData); + contextMenu.addAction(CompanionIcon("duplicate.png"), tr("Du&plicate"),this,SLOT(mixersDuplicate()),tr("Ctrl+U")); + contextMenu.addSeparator(); + contextMenu.addAction(CompanionIcon("moveup.png"), tr("Move Up"),this,SLOT(moveMixUp()),tr("Ctrl+Up")); + contextMenu.addAction(CompanionIcon("movedown.png"), tr("Move Down"),this,SLOT(moveMixDown()),tr("Ctrl+Down")); + + contextMenu.exec(globalPos); +} + +void MixesPanel::mimeMixerDropped(int index, const QMimeData *data, Qt::DropAction /*action*/) +{ + int idx= MixerlistWidget->item(index > 0 ? index-1 : 0)->data(Qt::UserRole).toByteArray().at(0); + pasteMixerMimeData(data, idx); +} + +void MixesPanel::mixesEdited() +{ + emit modified(); +} + +void MixesPanel::mixerlistWidget_KeyPress(QKeyEvent *event) +{ + if(event->matches(QKeySequence::SelectAll)) mixerAdd(); //Ctrl A + if(event->matches(QKeySequence::Delete)) mixersDelete(); + if(event->matches(QKeySequence::Copy)) mixersCopy(); + if(event->matches(QKeySequence::Cut)) mixersCut(); + if(event->matches(QKeySequence::Paste)) mixersPaste(); + if(event->matches(QKeySequence::Underline)) mixersDuplicate(); + + if(event->key()==Qt::Key_Return || event->key()==Qt::Key_Enter) mixerOpen(); + if(event->matches(QKeySequence::MoveToNextLine)) + MixerlistWidget->setCurrentRow(MixerlistWidget->currentRow()+1); + if(event->matches(QKeySequence::MoveToPreviousLine)) + MixerlistWidget->setCurrentRow(MixerlistWidget->currentRow()-1); +} + +int MixesPanel::gm_moveMix(int idx, bool dir) //true=inc=down false=dec=up +{ + if(idx>GetEepromInterface()->getCapability(Mixes) || (idx==0 && !dir) || (idx==GetEepromInterface()->getCapability(Mixes) && dir)) return idx; + + int tdx = dir ? idx+1 : idx-1; + MixData &src=model.mixData[idx]; + MixData &tgt=model.mixData[tdx]; + + unsigned int outputs = GetEepromInterface()->getCapability(Outputs); + if((src.destCh==0) || (src.destCh>outputs) || (tgt.destCh>outputs)) return idx; + + if (tgt.destCh!=src.destCh) { + if ((dir) && (src.destCh0)) src.destCh--; + return idx; + } + + //flip between idx and tgt + MixData temp; + memcpy(&temp,&src,sizeof(MixData)); + memcpy(&src,&tgt,sizeof(MixData)); + memcpy(&tgt,&temp,sizeof(MixData)); + return tdx; +} + +void MixesPanel::moveMixUp() +{ + QList list = createMixListFromSelected(); + QList highlightList; + foreach(int idx, list) { + highlightList << gm_moveMix(idx, false); + } + emit modified(); + update(); + setSelectedByMixList(highlightList); +} + +void MixesPanel::moveMixDown() +{ + QList list = createMixListFromSelected(); + QList highlightList; + foreach(int idx, list) { + highlightList << gm_moveMix(idx, true); + } + emit modified(); + update(); + setSelectedByMixList(highlightList); +} + +void MixesPanel::clearMixes() +{ + if (QMessageBox::question(this, tr("Clear Mixes?"), tr("Really clear all the mixes?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { + model.clearMixes(); + emit modified(); + update(); + } +} diff --git a/companion/src/modeledit/mixes.h b/companion/src/modeledit/mixes.h new file mode 100644 index 000000000..5e5dc4e80 --- /dev/null +++ b/companion/src/modeledit/mixes.h @@ -0,0 +1,56 @@ +#ifndef MIXES_H +#define MIXES_H + +#include "modelpanel.h" +#include "mixerslist.h" +#include "mixerdialog.h" + +class MixesPanel : public ModelPanel +{ + Q_OBJECT + + public: + MixesPanel(QWidget *parent, ModelData & model, GeneralSettings & generalSettings); + virtual ~MixesPanel(); + + virtual void update(); + + private slots: + // TODO all slots? + void clearMixes(); + void mixersDelete(bool ask=true); + void mixersCut(); + void mixersCopy(); + void mixersPaste(); + void mixersDuplicate(); + void mixerOpen(); + void mixerAdd(); + void moveMixUp(); + void moveMixDown(); + + void mixerlistWidget_customContextMenuRequested(QPoint pos); + void mixerlistWidget_doubleClicked(QModelIndex index); + void mixerlistWidget_KeyPress(QKeyEvent *event); + + void mimeMixerDropped(int index, const QMimeData *data, Qt::DropAction action); + void pasteMixerMimeData(const QMimeData * mimeData, int destIdx); + + void mixesEdited(); + + private: + GeneralSettings & generalSettings; + MixersList *MixerlistWidget; + bool mixInserted; + + int getMixerIndex(unsigned int dch); + bool gm_insertMix(int idx); + void gm_deleteMix(int index); + void gm_openMix(int index); + int gm_moveMix(int idx, bool dir); + void mixersDeleteList(QList list); + QList createMixListFromSelected(); + void setSelectedByMixList(QList list); + +}; + +#endif // MIXES_H diff --git a/companion/src/modeledit/modeledit.cpp b/companion/src/modeledit/modeledit.cpp new file mode 100644 index 000000000..3aed2b38f --- /dev/null +++ b/companion/src/modeledit/modeledit.cpp @@ -0,0 +1,141 @@ +#include "modeledit.h" +#include "ui_modeledit.h" +#include "setup.h" +#include "heli.h" +#include "flightmodes.h" +#include "inputs.h" +#include "mixes.h" +#include "channels.h" +#include "curves.h" +#include "../helpers.h" +#include "customswitches.h" +#include "customfunctions.h" +#include "telemetry.h" +#include + +ModelEdit::ModelEdit(RadioData & radioData, int modelId, bool openWizard, bool isNew, QWidget *parent) : + QDialog(parent), + ui(new Ui::ModelEdit), + modelId(modelId), + model(radioData.models[modelId]), + generalSettings(radioData.generalSettings) +{ + ui->setupUi(this); + QSettings settings; + restoreGeometry(settings.value("modelEditGeometry").toByteArray()); + ui->pushButton->setIcon(CompanionIcon("simulate.png")); + addTab(new Setup(this, model), tr("Setup")); + addTab(new HeliPanel(this, model), tr("Heli")); + addTab(new FlightModes(this, model, radioData.generalSettings), tr("Flight Modes")); + addTab(new InputsPanel(this, model, radioData.generalSettings), tr("Inputs")); + addTab(new MixesPanel(this, model, radioData.generalSettings), tr("Mixes")); + addTab(new Channels(this, model), tr("Channels")); + addTab(new CustomSwitchesPanel(this, model), tr("Logical Switches")); + if (GetEepromInterface()->getCapability(CustomFunctions)) + addTab(new CustomFunctionsPanel(this, model, radioData.generalSettings), tr("Switch Assignment")); + addTab(new Curves(this, model), tr("Curves")); + if (GetEepromInterface()->getCapability(Telemetry) & TM_HASTELEMETRY) + addTab(new TelemetryPanel(this, model), tr("Telemetry")); +} + +ModelEdit::~ModelEdit() +{ + delete ui; +} + +void ModelEdit::closeEvent(QCloseEvent *event) +{ + QSettings settings; + settings.setValue("modelEditGeometry", saveGeometry()); +} + +class VerticalScrollArea : public QScrollArea +{ + public: + VerticalScrollArea(QWidget * parent, ModelPanel * panel); + + protected: + virtual bool eventFilter(QObject *o, QEvent *e); + + private: + ModelPanel * panel; + QWidget * parent; +}; + +VerticalScrollArea::VerticalScrollArea(QWidget * parent, ModelPanel * panel): + QScrollArea(parent), + panel(panel), + parent(parent) +{ + setWidgetResizable(true); + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setWidget(panel); + panel->installEventFilter(this); +} + +bool VerticalScrollArea::eventFilter(QObject *o, QEvent *e) +{ + if (o == panel && e->type() == QEvent::Resize) { + setMinimumWidth(panel->minimumSizeHint().width() + verticalScrollBar()->width()); + } + return false; +} + +void ModelEdit::addTab(ModelPanel *panel, QString text) +{ + panels << panel; + QWidget * widget = new QWidget(ui->tabWidget); + QVBoxLayout *baseLayout = new QVBoxLayout(widget); + VerticalScrollArea * area = new VerticalScrollArea(widget, panel); + baseLayout->addWidget(area); + ui->tabWidget->addTab(widget, text); + connect(panel, SIGNAL(modified()), this, SLOT(onTabModified())); +} + +void ModelEdit::onTabModified() +{ + emit modified(); +} + +void ModelEdit::on_tabWidget_currentChanged(int index) +{ + panels[index]->update(); +} + +void ModelEdit::on_pushButton_clicked() +{ + launchSimulation(); +} + +// TODO merge both +#include "simulatordialog.h" +#include "xsimulatordialog.h" + +void ModelEdit::launchSimulation() +{ + if (GetEepromInterface()->getSimulator()) { + RadioData *simuData = new RadioData(); + simuData->generalSettings = generalSettings; + simuData->models[modelId] = model; + if (GetEepromInterface()->getCapability(SimulatorType)) { + xsimulatorDialog *sd = new xsimulatorDialog(this); + sd->loadParams(*simuData, modelId); + sd->exec(); + delete sd; + } + else { + simulatorDialog *sd = new simulatorDialog(this); + sd->loadParams(*simuData, modelId); + sd->exec(); + delete sd; + } + delete simuData; + } + else { + QMessageBox::warning(NULL, + QObject::tr("Warning"), + QObject::tr("Simulator for this firmware is not yet available")); + } +} + + diff --git a/companion/src/modeledit/modeledit.h b/companion/src/modeledit/modeledit.h new file mode 100644 index 000000000..9450d90d4 --- /dev/null +++ b/companion/src/modeledit/modeledit.h @@ -0,0 +1,42 @@ +#ifndef MODELEDIT_H +#define MODELEDIT_H + +#include +#include "modelpanel.h" + +namespace Ui { + class ModelEdit; +} + +class ModelEdit : public QDialog +{ + Q_OBJECT + + public: + explicit ModelEdit(RadioData & radioData, int modelId , bool openWizard =false, bool inNew =false, QWidget *parent = 0); + ~ModelEdit(); + + protected: + void closeEvent(QCloseEvent *event); + + signals: + void modified(); + + private slots: + void onTabModified(); + void on_pushButton_clicked(); + void on_tabWidget_currentChanged(int index); + + private: + Ui::ModelEdit *ui; + int modelId; + ModelData & model; + GeneralSettings & generalSettings; + QVector panels; + + void addTab(ModelPanel *panel, QString text); + void launchSimulation(); + +}; + +#endif // MODELEDIT_H diff --git a/companion/src/modeledit/modeledit.ui b/companion/src/modeledit/modeledit.ui new file mode 100644 index 000000000..9002e383b --- /dev/null +++ b/companion/src/modeledit/modeledit.ui @@ -0,0 +1,63 @@ + + + ModelEdit + + + + 0 + 0 + 339 + 385 + + + + + 0 + 0 + + + + Dialog + + + + :/icon.png:/icon.png + + + true + + + + + + QLayout::SetMinimumSize + + + + + true + + + QTabWidget::North + + + -1 + + + + + + + Simulate + + + + + + + + + + + + diff --git a/companion/src/modeledit/modelpanel.cpp b/companion/src/modeledit/modelpanel.cpp new file mode 100644 index 000000000..b4c257aba --- /dev/null +++ b/companion/src/modeledit/modelpanel.cpp @@ -0,0 +1,30 @@ +#include "modelpanel.h" +#include + +ModelPanel::ModelPanel(QWidget * parent, ModelData & model): + QWidget(parent), + model(model), + lock(false) +{ +} + +ModelPanel::~ModelPanel() +{ +} + +void ModelPanel::update() +{ +} + +void ModelPanel::addLabel(QGridLayout * gridLayout, QString text, int col) +{ + QLabel *label = new QLabel(this); + label->setFrameShape(QFrame::Panel); + label->setFrameShadow(QFrame::Raised); + label->setMidLineWidth(0); + label->setAlignment(Qt::AlignCenter); + label->setMargin(3); + label->setText(text); + gridLayout->addWidget(label, 0, col, 1, 1); +} + diff --git a/companion/src/modeledit/modelpanel.h b/companion/src/modeledit/modelpanel.h new file mode 100644 index 000000000..8e37010dd --- /dev/null +++ b/companion/src/modeledit/modelpanel.h @@ -0,0 +1,29 @@ +#ifndef MODELPANEL_H +#define MODELPANEL_H + +#include +#include +#include "eeprominterface.h" + +class ModelPanel : public QWidget +{ + Q_OBJECT + + public: + ModelPanel(QWidget *parent, ModelData & model); + virtual ~ModelPanel(); + + signals: + void modified(); + + public slots: + virtual void update(); + + protected: + ModelData & model; + bool lock; + void addLabel(QGridLayout * gridLayout, QString text, int col); + +}; + +#endif // CHANNELS_H diff --git a/companion/src/node.cpp b/companion/src/modeledit/node.cpp similarity index 74% rename from companion/src/node.cpp rename to companion/src/modeledit/node.cpp index 66fa209b1..b421490f9 100644 --- a/companion/src/node.cpp +++ b/companion/src/modeledit/node.cpp @@ -46,32 +46,28 @@ #include "edge.h" #include "node.h" -#include "modeledit.h" -Node::Node(QSpinBox *sb,QSpinBox *sbx) +Node::Node(): + minX(-100), + maxX(+100) { - setFlag(ItemIsMovable); - setFlag(ItemSendsGeometryChanges); - setCacheMode(DeviceCoordinateCache); - setZValue(-1); - nodecolor = QColor(Qt::yellow); - qsb = sb; - qsbx = sbx; - bPressed = false; - centerX = true; - centerY = true; - fixedX = false; - fixedY = false; - ballSize = DEFAULT_BALL_SIZE; - minX=-100; - maxX=100; - + setFlag(ItemIsMovable); + setFlag(ItemSendsGeometryChanges); + setCacheMode(DeviceCoordinateCache); + setZValue(-1); + nodecolor = QColor(Qt::yellow); + bPressed = false; + centerX = true; + centerY = true; + fixedX = false; + fixedY = false; + ballSize = DEFAULT_BALL_SIZE; } void Node::addEdge(Edge *edge) { - edgeList << edge; - edge->adjust(); + edgeList << edge; + edge->adjust(); } void Node::stepToCenter(qreal step) @@ -105,7 +101,7 @@ void Node::stepToCenter(qreal step) } -void Node::setColor(QColor color) +void Node::setColor(const QColor & color) { nodecolor=color; } @@ -190,26 +186,23 @@ QVariant Node::itemChange(GraphicsItemChange change, const QVariant &value) if(fixedY) newPos.setY(y());//make sure x doesn't change newPos.setX(qMin(rect.right(), qMax(newPos.x(), rect.left())));// bound X newPos.setY(qMin(rect.bottom(), qMax(newPos.y(), rect.top())));// bound Y - if (qsb) { - ModelEdit* modeledit = qobject_cast(qsb->parent()->parent()->parent()->parent()->parent()->parent()->parent()); - modeledit->redrawCurve = false; - qsb->setValue(100+(rect.top()-y())*200/rect.height()); - if (qsbx && !getFixedX()) { - int newX = -100 + ( (newPos.x()-rect.left()) * 200) / rect.width(); - if (newX < minX) newX = minX; - if (newX > maxX) newX = maxX; - newPos.setX(((newX+100)*rect.width()/200+rect.left())); - qsbx->setValue(newX); - } - modeledit->redrawCurve = true; + + int newX = -100 + ( (newPos.x()-rect.left()) * 200) / rect.width(); + int newY = 100+(rect.top()-y())*200/rect.height(); + if (newX < minX) newX = minX; + if (newX > maxX) newX = maxX; + + if (!getFixedX()) { + newPos.setX(((newX+100)*rect.width()/200+rect.left())); } + + emit moved(newX, newY); return newPos; } break; case ItemPositionHasChanged: - foreach (Edge *edge, edgeList) - edge->adjust(); + edge->adjust(); break; default: break; @@ -222,25 +215,19 @@ void Node::mousePressEvent(QGraphicsSceneMouseEvent *event) { update(); bPressed = true; - if(qsb) qsb->setFocus(); QGraphicsItem::mousePressEvent(event); + emit focus(); } void Node::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { update(); bPressed = false; - if(scene()) { - if(qsb) { - qsb->clearFocus(); - ModelEdit* modeledit = qobject_cast(qsb->parent()->parent()->parent()->parent()->parent()->parent()->parent()); - QGraphicsItem::mouseReleaseEvent(event); - modeledit->drawCurve(); - } else { - QGraphicsItem::mouseReleaseEvent(event); - } - //need to tell SB that it needs to write the value - } else { + if (scene()) { + QGraphicsItem::mouseReleaseEvent(event); + emit unfocus(); + } + else { QGraphicsItem::mouseReleaseEvent(event); } } diff --git a/companion/src/node.h b/companion/src/modeledit/node.h similarity index 91% rename from companion/src/node.h rename to companion/src/modeledit/node.h index 7d33f111f..9bc699cb6 100644 --- a/companion/src/node.h +++ b/companion/src/modeledit/node.h @@ -52,11 +52,12 @@ QT_BEGIN_NAMESPACE class QGraphicsSceneMouseEvent; QT_END_NAMESPACE -class Node : public QGraphicsItem +class Node : public QGraphicsObject { + Q_OBJECT -public: - Node(QSpinBox *sb = 0, QSpinBox *sbx = 0); + public: + Node(); void addEdge(Edge *edge); QList edges() const; @@ -80,16 +81,19 @@ public: bool getFixedY() {return fixedY;} void setMinX(int val) {minX = val;}; void setMaxX(int val) {maxX = val;}; - void setColor(QColor color); + void setColor(const QColor & color); -protected: - QVariant itemChange(GraphicsItemChange change, const QVariant &value); + signals: + void moved(int x, int y); + void focus(); + void unfocus(); + protected: + QVariant itemChange(GraphicsItemChange change, const QVariant &value); void mousePressEvent(QGraphicsSceneMouseEvent *event); void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); -private: - + private: bool bPressed; bool centerX; bool centerY; @@ -98,8 +102,6 @@ private: int ballSize; int minX; int maxX; - QSpinBox *qsb; - QSpinBox *qsbx; QList edgeList; QPointF newPos; QColor nodecolor; diff --git a/companion/src/modeledit/setup.cpp b/companion/src/modeledit/setup.cpp new file mode 100644 index 000000000..4d0b24efa --- /dev/null +++ b/companion/src/modeledit/setup.cpp @@ -0,0 +1,648 @@ +#include "setup.h" +#include "ui_setup.h" +#include "ui_setup_timer.h" +#include "ui_setup_module.h" +#include "helpers.h" + +TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer): + ModelPanel(parent, model), + timer(timer), + ui(new Ui::Timer) +{ + ui->setupUi(this); + + // Mode + populateTimerSwitchCB(ui->mode, timer.mode); + + if (!GetEepromInterface()->getCapability(PermTimers)) { + ui->persistent->hide(); + ui->persistentValue->hide(); + } + + ui->countdownBeep->addItem(tr("None")); + ui->countdownBeep->addItem(tr("Beeps")); + if (IS_ARM(GetEepromInterface()->getBoard()) || IS_2560(GetEepromInterface()->getBoard())) + ui->countdownBeep->addItem(tr("Countdown")); +} + +TimerPanel::~TimerPanel() +{ + delete ui; +} + +void TimerPanel::update() +{ + int min = timer.val / 60; + int sec = timer.val % 60; + ui->value->setTime(QTime(0, min, sec)); + + if (GetEepromInterface()->getCapability(PermTimers)) { + int sign = 1; + int pvalue = timer.pvalue; + if (pvalue < 0) { + pvalue = -pvalue; + sign = -1; + } + int hours = pvalue / 3600; + pvalue -= hours * 3600; + int minutes = pvalue / 60; + int seconds = pvalue % 60; + ui->persistent->setChecked(timer.persistent); + 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); +} + +void TimerPanel::on_value_editingFinished() +{ + timer.val = ui->value->time().minute()*60 + ui->value->time().second(); + emit modified(); +} + +void TimerPanel::on_mode_currentIndexChanged(int index) +{ + timer.mode = TimerMode(ui->mode->itemData(index).toInt()); + emit modified(); +} + +void TimerPanel::on_persistent_toggled(bool checked) +{ + timer.persistent = 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; + emit modified(); +} + +/******************************************************************************/ + +ModulePanel::ModulePanel(QWidget *parent, ModelData & model, ModuleData & module, int moduleIdx): + ModelPanel(parent, model), + module(module), + moduleIdx(moduleIdx), + ui(new Ui::Module) +{ + lock = true; + + ui->setupUi(this); + + QString label; + if (moduleIdx < 0) { + label = tr("Trainer Output"); + ui->trainerMode->setCurrentIndex(model.trainerMode); + } + else { + ui->label_trainerMode->hide(); + ui->trainerMode->hide(); + if (moduleIdx == 0) + label = tr("Internal Radio System"); + else + label = tr("External Radio Module"); + + } + ui->label_module->setText(label); + + // The protocols available on this board + for (int i=0; iisAvailable((Protocol)i, moduleIdx)) { + ui->protocol->addItem(getProtocolStr(i), (QVariant)i); + if (i == module.protocol) ui->protocol->setCurrentIndex(ui->protocol->count()-1); + } + } + + if (GetEepromInterface()->getCapability(HasFailsafe)) { + for (int i=0; i<16; i++) { + QSlider * slider = new QSlider(this); + slider->setMinimumSize(QSize(30, 50)); + slider->setRange(-100, 100); + QSpinBox * spinbox = new QSpinBox(this); + spinbox->setMinimumSize(QSize(20, 0)); + spinbox->setRange(-100, 100); + slider->setProperty("index", i); + spinbox->setProperty("index", i); + failsafeSliders << slider; + failsafeSpins << spinbox; + ui->failsafesLayout->addWidget(slider, 2*(i/8), i%8, Qt::AlignHCenter); + ui->failsafesLayout->addWidget(spinbox, 1+2*(i/8), i%8, Qt::AlignHCenter); + connect(slider, SIGNAL(valueChanged(int)), this, SLOT(onFailsafeChannelChanged(int))); + connect(slider, SIGNAL(valueChanged(int)), this, SLOT(onFailsafeChannelChanged(int))); + } + } + + lock = false; +} + +ModulePanel::~ModulePanel() +{ + delete ui; +} + +#define MASK_PROTOCOL 1 +#define MASK_CHANNELS_COUNT 2 +#define MASK_RX_NUMBER 4 +#define MASK_CHANNELS_RANGE 8 +#define MASK_PPM_FIELDS 16 +#define MASK_FAILSAFES 32 + +void ModulePanel::update() +{ + unsigned int mask = 0; + Protocol protocol = (Protocol)module.protocol; + + if (moduleIdx >= 0 || model.trainerMode != 0) { + mask |= MASK_PROTOCOL; + switch (protocol) { + case OFF: + break; + case PXX_XJT_X16: + case PXX_XJT_D8: + case PXX_XJT_LR12: + case PXX_DJT: + mask |= MASK_CHANNELS_RANGE | MASK_CHANNELS_COUNT | MASK_RX_NUMBER; + if (protocol==PXX_XJT_X16) mask |= MASK_FAILSAFES; + break; + case LP45: + case DSM2: + case DSMX: + mask |= MASK_CHANNELS_RANGE | MASK_RX_NUMBER; + module.channelsCount = 8; + break; + default: + mask |= MASK_PPM_FIELDS | MASK_CHANNELS_RANGE| MASK_CHANNELS_COUNT; + break; + } + } + + ui->label_protocol->setVisible(mask & MASK_PROTOCOL); + ui->protocol->setVisible(mask & MASK_PROTOCOL); + ui->label_rxNumber->setVisible(mask & MASK_PROTOCOL); + ui->rxNumber->setVisible(mask & MASK_PROTOCOL); + ui->rxNumber->setEnabled(mask & MASK_RX_NUMBER); + ui->rxNumber->setValue(model.modelId); + ui->label_channelsStart->setVisible(mask & MASK_CHANNELS_RANGE); + ui->channelsStart->setVisible(mask & MASK_CHANNELS_RANGE); + ui->channelsStart->setValue(module.channelsStart+1); + ui->label_channelsCount->setVisible(mask & MASK_CHANNELS_RANGE); + ui->channelsCount->setVisible(mask & MASK_CHANNELS_RANGE); + ui->channelsCount->setEnabled(mask & MASK_CHANNELS_COUNT); + ui->channelsCount->setValue(module.channelsCount); + ui->channelsCount->setSingleStep(GetEepromInterface()->getCapability(HasPPMStart) ? 1 : 2); + + // PPM settings fields + ui->label_ppmPolarity->setVisible(mask & MASK_PPM_FIELDS); + ui->ppmPolarity->setVisible(mask & MASK_PPM_FIELDS); + ui->ppmPolarity->setCurrentIndex(module.ppmPulsePol); + ui->label_ppmDelay->setVisible(mask & MASK_PPM_FIELDS); + ui->ppmDelay->setVisible(mask & MASK_PPM_FIELDS); + ui->ppmDelay->setValue(module.ppmDelay); + ui->label_ppmFrameLength->setVisible(mask & MASK_PPM_FIELDS); + ui->ppmFrameLength->setVisible(mask & MASK_PPM_FIELDS); + ui->ppmFrameLength->setMinimum(module.channelsCount*(model.extendedLimits ? 2.250 :2)+3.5); + ui->ppmFrameLength->setMaximum(GetEepromInterface()->getCapability(PPMFrameLength)); + ui->ppmFrameLength->setValue(22.5+((double)module.ppmFrameLength)*0.5); + + if (GetEepromInterface()->getCapability(HasFailsafe)) { + ui->label_failsafeMode->setVisible(mask & MASK_FAILSAFES); + ui->failsafeMode->setVisible(mask & MASK_FAILSAFES); + ui->failsafeMode->setCurrentIndex(module.failsafeMode); + ui->failsafesFrame->setEnabled(module.failsafeMode == 1); + for (int i=0; isetValue(module.failsafeChannels[i]); + failsafeSpins[i]->setValue(module.failsafeChannels[i]); + } + } + else { + mask = 0; + } + + ui->failsafesLayoutLabel->setVisible(mask & MASK_FAILSAFES); + ui->failsafesFrame->setVisible(mask & MASK_FAILSAFES); +} + +void ModulePanel::on_trainerMode_currentIndexChanged(int index) +{ + if (!lock) { + model.trainerMode = index; + update(); + emit modified(); + } +} + +void ModulePanel::on_protocol_currentIndexChanged(int index) +{ + if (!lock) { + module.protocol = ui->protocol->itemData(index).toInt(); + update(); + emit modified(); + } +} + +void ModulePanel::on_ppmPolarity_currentIndexChanged(int index) +{ + module.ppmPulsePol = index; + emit modified(); +} + +void ModulePanel::on_channelsCount_editingFinished() +{ + if (!lock) { + module.channelsCount = ui->channelsCount->value(); + update(); + emit modified(); + } +} + +void ModulePanel::on_channelsStart_editingFinished() +{ + if (!lock) { + module.channelsStart = ui->channelsStart->value() - 1; + update(); + emit modified(); + } +} + +void ModulePanel::on_ppmDelay_editingFinished() +{ + if (!lock) { + // TODO only accept valid values + module.ppmDelay = ui->ppmDelay->value(); + emit modified(); + } +} + +void ModulePanel::on_rxNumber_editingFinished() +{ + model.modelId = ui->rxNumber->value(); + emit modified(); +} + +void ModulePanel::on_ppmFrameLength_editingFinished() +{ + module.ppmFrameLength = (ui->ppmFrameLength->value()-22.5) / 0.5; + emit modified(); +} + +void ModulePanel::on_failsafeMode_currentIndexChanged(int value) +{ + if (!lock) { + module.failsafeMode = value; + update(); + emit modified(); + } +} + +void ModulePanel::onFailsafeChannelChanged(int value) +{ + if (!lock) { + lock = true; + int index = sender()->property("index").toInt(); + module.failsafeChannels[index] = value; + failsafeSpins[index]->setValue(value); + failsafeSliders[index]->setValue(value); + emit modified(); + lock = false; + } +} + +/******************************************************************************/ + +Setup::Setup(QWidget *parent, ModelData & model): + ModelPanel(parent, model), + ui(new Ui::Setup) +{ + lock = true; + + memset(modules, 0, sizeof(modules)); + + ui->setupUi(this); + + ui->name->setMaxLength(IS_TARANIS(GetEepromInterface()->getBoard()) ? 12 : 10); + + for (int i=0; igridLayout->addWidget(timers[i], 1+i, 1); + connect(timers[i], SIGNAL(modified()), this, SLOT(onChildModified())); + } + + for (int i=0; igetCapability(NumModules); i++) { + modules[i] = new ModulePanel(this, model, model.moduleData[i], i); + ui->modulesLayout->addWidget(modules[i]); + connect(modules[i], SIGNAL(modified()), this, SLOT(onChildModified())); + } + + if (GetEepromInterface()->getCapability(ModelTrainerEnable)) { + modules[C9X_NUM_MODULES] = new ModulePanel(this, model, model.moduleData[C9X_NUM_MODULES], -1); + ui->modulesLayout->addWidget(modules[C9X_NUM_MODULES]); + } + + if (GetEepromInterface()->getCapability(ModelImage)) { + QStringList items; + items.append(""); + QSettings settings; + QString path = settings.value("sdPath", ".").toString(); + path.append("/BMP/"); + QDir qd(path); + int vml = GetEepromInterface()->getCapability(VoicesMaxLength)+4; + if (qd.exists()) { + QStringList filters; + filters << "*.bmp" << "*.bmp"; + foreach ( QString file, qd.entryList(filters, QDir::Files) ) { + QFileInfo fi(file); + QString temp = fi.completeBaseName(); + if (!items.contains(temp) && temp.length() <= vml) { + items.append(temp); + } + } + } + if (!items.contains(model.bitmap)) { + items.append(model.bitmap); + } + items.sort(); + foreach ( QString file, items ) { + ui->image->addItem(file); + if (file == model.bitmap) { + ui->image->setCurrentIndex(ui->image->count()-1); + QString fileName = path; + fileName.append(model.bitmap); + fileName.append(".bmp"); + QImage image(fileName); + if (image.isNull()) { + fileName = path; + fileName.append(model.bitmap); + fileName.append(".BMP"); + image.load(fileName); + } + if (!image.isNull()) { + ui->imagePreview->setPixmap(QPixmap::fromImage(image.scaled( 64,32)));; + } + } + } + } + else { + ui->image->hide(); + ui->modelImage_label->hide(); + ui->imagePreview->hide(); + } + + // Beep Center checkboxes + int analogs = 4 + GetEepromInterface()->getCapability(Pots); + for (int i=0; igetCapability(RotaryEncoders); i++) { + QCheckBox * checkbox = new QCheckBox(this); + checkbox->setProperty("index", i); + checkbox->setText(icenterBeepLayout->addWidget(checkbox, 0, i+1); + connect(checkbox, SIGNAL(toggled(bool)), this, SLOT(onBeepCenterToggled(bool))); + centerBeepCheckboxes << checkbox; + } + ui->switchesStartupLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, analogs+GetEepromInterface()->getCapability(RotaryEncoders)); + + // Startup switches warnings + ui->switchesStartupWarning->setProperty("index", 0); + connect(ui->switchesStartupWarning, SIGNAL(currentIndexChanged(int)), this, SLOT(startupSwitchEdited(int))); + for (int i=0; igetCapability(Switches)-1; i++) { + QLabel * label = new QLabel(); + QSlider * slider = new QSlider(); + slider->setProperty("index", i+1); + slider->setOrientation(Qt::Vertical); + slider->setMinimum(0); + slider->setSingleStep(1); + slider->setPageStep(1); + slider->setInvertedAppearance(true); + slider->setTickPosition(QSlider::TicksBothSides); + slider->setTickInterval(1); + slider->setMinimumSize(QSize(30, 50)); + slider->setMaximumSize(QSize(50, 50)); + if (IS_TARANIS(GetEepromInterface()->getBoard())) { + label->setText(switchesX9D[i]); + slider->setMaximum(i==5 ? 1 : 2); + } + else { + label->setText(switches9X[i]); + slider->setMaximum(i==0 ? 2 : 1); + } + ui->switchesStartupLayout->addWidget(label, 0, i+1); + ui->switchesStartupLayout->addWidget(slider, 1, i+1); + connect(slider, SIGNAL(valueChanged(int)), this, SLOT(startupSwitchEdited(int))); + startupSwitchesSliders << slider; + } + ui->switchesStartupLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, GetEepromInterface()->getCapability(Switches)); + + lock = false; +} + +Setup::~Setup() +{ + delete ui; +} + +void Setup::on_extendedLimits_toggled(bool checked) +{ + model.extendedLimits = checked; + emit modified(); +} + +void Setup::on_throttleWarning_toggled(bool checked) +{ + model.disableThrottleWarning = checked; + emit modified(); +} + +void Setup::on_throttleReverse_toggled(bool checked) +{ + model.throttleReversed = checked; + emit modified(); +} + +void Setup::on_extendedTrims_toggled(bool checked) +{ + model.extendedTrims = checked; + emit modified(); +} + +void Setup::on_trimIncrement_currentIndexChanged(int index) +{ + model.trimInc = index-2; + emit modified(); +} + +void Setup::on_throttleSource_currentIndexChanged(int index) +{ + model.thrTraceSrc = index; + emit modified(); +} + +void Setup::on_name_editingFinished() +{ + int length = ui->name->maxLength(); + strncpy(model.name, ui->name->text().toAscii(), length); + emit modified(); +} + +void Setup::on_image_currentIndexChanged(int index) +{ + if (!lock) { + strncpy(model.bitmap, ui->image->currentText().toAscii(), GetEepromInterface()->getCapability(VoicesMaxLength)); + QSettings settings; + QString path=settings.value("sdPath", ".").toString(); + path.append("/BMP/"); + QDir qd(path); + if (qd.exists()) { + QString fileName=path; + fileName.append(model.bitmap); + fileName.append(".bmp"); + QImage image(fileName); + if (image.isNull()) { + fileName=path; + fileName.append(model.bitmap); + fileName.append(".BMP"); + image.load(fileName); + } + if (!image.isNull()) { + ui->imagePreview->setPixmap(QPixmap::fromImage(image.scaled( 64,32)));; + } + else { + ui->imagePreview->clear(); + } + } + else { + ui->imagePreview->clear(); + } + emit modified(); + } +} + +void Setup::update() +{ + ui->name->setText(model.name); + + ui->throttleReverse->setChecked(model.throttleReversed); + populateTTraceCB(ui->throttleSource, model.thrTraceSrc); + ui->throttleWarning->setChecked(model.disableThrottleWarning); + + //trim inc, thro trim, thro expo, instatrim + ui->trimIncrement->setCurrentIndex(model.trimInc+2); + ui->throttleTrim->setChecked(model.thrTrim); + ui->extendedLimits->setChecked(model.extendedLimits); + ui->extendedTrims->setChecked(model.extendedTrims); + + updateBeepCenter(); + updateStartupSwitches(); + + for (int i=0; iupdate(); + + for (int i=0; iupdate(); +} + +void Setup::updateBeepCenter() +{ + for (int i=0; isetChecked(model.beepANACenter & (0x01 << i)); + } +} + +void Setup::updateStartupSwitches() +{ + lock = true; + + unsigned int switchStates = model.switchWarningStates; + bool enabled = !(switchStates & 0x01); + ui->switchesStartupWarning->setCurrentIndex(switchStates & 0x01); + switchStates >>= 1; + + for (int i=0; igetCapability(Switches)-1; i++) { + QSlider * slider = startupSwitchesSliders[i]; + slider->setEnabled(enabled); + if (IS_TARANIS(GetEepromInterface()->getBoard())) { + slider->setValue(i==5 ? (switchStates & 0x3)/2 : switchStates & 0x3); + switchStates >>= 2; + } + else { + slider->setValue(i==0 ? switchStates & 0x3 : switchStates & 0x1); + switchStates >>= (i==0 ? 2 : 1); + } + } + + lock = false; +} + +void Setup::startupSwitchEdited(int value) +{ + if (!lock) { + int shift = 0; + unsigned int mask; + int index = sender()->property("index").toInt(); + + if (index == 0) { + mask = 0x01; + } + else if (IS_TARANIS(GetEepromInterface()->getBoard())) { + if (index == 6) + mask = 0x02 << (index*2 - 1); + else { + shift = index*2 - 1; + mask = 0x03 << shift; + } + } + else { + if (index == 1) { + shift = 1; + mask = 0x03 << shift; + } + else { + mask = 0x01 << (index+1); + } + } + + model.switchWarningStates &= ~mask; + + if (value) { + if (shift == 0) { + model.switchWarningStates |= mask; + } + else { + model.switchWarningStates |= (value << shift); + } + } + + updateStartupSwitches(); + emit modified(); + } +} + +void Setup::on_throttleTrim_toggled(bool checked) +{ + model.thrTrim = checked; + emit modified(); +} + +void Setup::onBeepCenterToggled(bool checked) +{ + if (!lock) { + int index = sender()->property("index").toInt(); + unsigned int mask = (0x01 << index); + if (checked) + model.beepANACenter |= mask; + else + model.beepANACenter &= ~mask; + emit modified(); + } +} + +void Setup::onChildModified() +{ + emit modified(); +} diff --git a/companion/src/modeledit/setup.h b/companion/src/modeledit/setup.h new file mode 100644 index 000000000..d1392e1dd --- /dev/null +++ b/companion/src/modeledit/setup.h @@ -0,0 +1,102 @@ +#ifndef SETUP_H +#define SETUP_H + +#include "modelpanel.h" +#include +#include +#include +#include + +namespace Ui { + class Setup; + class Timer; + class Module; +} + +class TimerPanel : public ModelPanel +{ + Q_OBJECT + + public: + TimerPanel(QWidget *parent, ModelData & model, TimerData & timer); + virtual ~TimerPanel(); + + virtual void update(); + + private slots: + void on_mode_currentIndexChanged(int index); + 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; + Ui::Timer *ui; +}; + +class ModulePanel : public ModelPanel +{ + Q_OBJECT + + public: + ModulePanel(QWidget *parent, ModelData & model, ModuleData & module, int moduleIdx); + virtual ~ModulePanel(); + + virtual void update(); + + private slots: + void on_trainerMode_currentIndexChanged(int index); + void on_protocol_currentIndexChanged(int index); + void on_ppmDelay_editingFinished(); + void on_channelsCount_editingFinished(); + void on_channelsStart_editingFinished(); + void on_ppmPolarity_currentIndexChanged(int index); + void on_ppmFrameLength_editingFinished(); + void on_rxNumber_editingFinished(); + void on_failsafeMode_currentIndexChanged(int value); + void onFailsafeChannelChanged(int value); + + private: + ModuleData & module; + int moduleIdx; + Ui::Module *ui; + QVector failsafeSpins; + QVector failsafeSliders; +}; + +class Setup : public ModelPanel +{ + Q_OBJECT + + public: + Setup(QWidget *parent, ModelData & model); + virtual ~Setup(); + + virtual void update(); + + private slots: + void on_name_editingFinished(); + void on_throttleSource_currentIndexChanged(int index); + void on_throttleTrim_toggled(bool checked); + void on_extendedLimits_toggled(bool checked); + void on_extendedTrims_toggled(bool checked); + void on_throttleWarning_toggled(bool checked); + void on_throttleReverse_toggled(bool checked); + void on_image_currentIndexChanged(int index); + void on_trimIncrement_currentIndexChanged(int index); + void onBeepCenterToggled(bool checked); + void startupSwitchEdited(int value); + void onChildModified(); + + private: + Ui::Setup *ui; + QVector startupSwitchesSliders; + QVector centerBeepCheckboxes; + ModulePanel * modules[C9X_NUM_MODULES+1]; + TimerPanel * timers[C9X_MAX_TIMERS]; + void updateStartupSwitches(); + void updateBeepCenter(); +}; + +#endif // SETUP_H diff --git a/companion/src/modeledit/setup.ui b/companion/src/modeledit/setup.ui new file mode 100644 index 000000000..c4a632c00 --- /dev/null +++ b/companion/src/modeledit/setup.ui @@ -0,0 +1,378 @@ + + + Setup + + + + 0 + 0 + 782 + 334 + + + + Form + + + + + + + + Model Name + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Timer2 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Timer1 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Throttle Source + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Switch startup Warning + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Center beep + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Trim Increment + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + QLayout::SetMinimumSize + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + ON + + + + + OFF + + + + + + + + + 0 + 0 + + + + Check + + + Qt::AlignCenter + + + + + + + + + + + + + + + 0 + 0 + + + + + 64 + 32 + + + + + 64 + 32 + + + + QFrame::Panel + + + QFrame::Raised + + + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Model Image + + + + + + + + 0 + 0 + + + + 10 + + + + + + + + + + + + 0 + 0 + + + + + Exponential + + + + + Extra Fine + + + + + Fine + + + + + Medium + + + + + Coarse + + + + + + + + Qt::RightToLeft + + + Extended Limits + + + + + + + Qt::RightToLeft + + + Extended Trims + + + + + + + + + + + + 0 + 0 + + + + + + + + Qt::RightToLeft + + + Throttle Trim + + + + + + + Qt::RightToLeft + + + Throttle Warning + + + + + + + Reverse throttle operation. +If this is checked the throttle will be reversed. Idle will be forward, trim will also be reversed and the throttle warning will be reversed as well. + + + + + Qt::RightToLeft + + + Reverse Throttle + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + diff --git a/companion/src/modeledit/setup_module.ui b/companion/src/modeledit/setup_module.ui new file mode 100644 index 000000000..406488f96 --- /dev/null +++ b/companion/src/modeledit/setup_module.ui @@ -0,0 +1,497 @@ + + + Module + + + + 0 + 0 + 694 + 340 + + + + Form + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 700 + 16777215 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + + + + + + + + + + + 16777215 + 16777215 + + + + Failsafe Mode + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 16777215 + 16777215 + + + + Start + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 125 + 16777215 + + + + + + + + + 16777215 + 16777215 + + + + PPM delay + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 125 + 16777215 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + usec + + + 100 + + + 800 + + + 50 + + + 300 + + + + + + + + 0 + 0 + + + + + 125 + 16777215 + + + + + Negative + + + + + Positive + + + + + + + + + 16777215 + 16777215 + + + + RX Number + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 125 + 16777215 + + + + + Master + + + + + Slave + + + + + + + + + 16777215 + 16777215 + + + + Polarity + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 16777215 + 16777215 + + + + Trainer Mode + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 125 + 16777215 + + + + + + + 1 + + + 125 + + + 1 + + + 1 + + + + + + + + 0 + 0 + + + + + 125 + 16777215 + + + + mSec + + + 1 + + + 12.500000000000000 + + + 32.500000000000000 + + + 0.500000000000000 + + + 22.500000000000000 + + + + + + + + 16777215 + 16777215 + + + + PPM Frame Length + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + font-weight: bold; + + + Label + + + + + + + + 125 + 16777215 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + ch + + + 1 + + + 16 + + + 2 + + + 8 + + + + + + + + 125 + 16777215 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + ch + + + 1 + + + 32 + + + 1 + + + 1 + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + Channels + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 125 + 16777215 + + + + + Hold + + + + + Custom + + + + + No Pulses + + + + + + + + + 16777215 + 16777215 + + + + Failsafe Positions + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 16777215 + 16777215 + + + + Protocol + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + diff --git a/companion/src/modeledit/setup_timer.ui b/companion/src/modeledit/setup_timer.ui new file mode 100644 index 000000000..e87ed86b8 --- /dev/null +++ b/companion/src/modeledit/setup_timer.ui @@ -0,0 +1,84 @@ + + + Timer + + + + 0 + 0 + 586 + 38 + + + + Form + + + + 0 + + + + + true + + + QDateTimeEdit::MinuteSection + + + mm:ss + + + + + + + + + + Countdown + + + + + + + + + + MinuteBeep + + + + + + + Persistent + + + + + + + (00:00:00) + + + + + + + Qt::Horizontal + + + + 255 + 17 + + + + + + + + + diff --git a/companion/src/modeledit/telemetry.cpp b/companion/src/modeledit/telemetry.cpp new file mode 100644 index 000000000..014def777 --- /dev/null +++ b/companion/src/modeledit/telemetry.cpp @@ -0,0 +1,741 @@ +#include "telemetry.h" +#include "ui_telemetry.h" +#include "ui_telemetry_analog.h" +#include "ui_telemetry_customscreen.h" +#include "helpers.h" + +TelemetryAnalog::TelemetryAnalog(QWidget *parent, FrSkyChannelData & analog): + QWidget(parent), + ui(new Ui::TelemetryAnalog), + analog(analog), + lock(false) +{ + ui->setupUi(this); + + float ratio = analog.getRatio(); + + if (analog.type==0 || analog.type==1 || analog.type==2) { + ui->RatioSB->setDecimals(1); + ui->RatioSB->setMaximum(25.5*GetEepromInterface()->getCapability(TelemetryMaxMultiplier)); + } + else { + ui->RatioSB->setDecimals(0); + ui->RatioSB->setMaximum(255*GetEepromInterface()->getCapability(TelemetryMaxMultiplier)); + } + ui->RatioSB->setValue(ratio); + + update(); + + ui->UnitCB->setCurrentIndex(analog.type); + ui->alarm1LevelCB->setCurrentIndex(analog.alarms[0].level); + ui->alarm1GreaterCB->setCurrentIndex(analog.alarms[0].greater); + ui->alarm2LevelCB->setCurrentIndex(analog.alarms[1].level); + ui->alarm2GreaterCB->setCurrentIndex(analog.alarms[1].greater); + + if (!(GetEepromInterface()->getCapability(Telemetry) & TM_HASOFFSET)) { + ui->CalibSB->hide(); + ui->CalibLabel->hide(); + } + else { + ui->label_Max->setText(tr("Range")); + } +} + +void TelemetryAnalog::update() +{ + float ratio = analog.getRatio(); + float step = ratio / 255; + float mini = (ratio * analog.offset) / 255; + float maxi = mini + ratio; + + ui->alarm1ValueSB->setDecimals(2); + ui->alarm1ValueSB->setSingleStep(step); + ui->alarm1ValueSB->setMinimum(mini); + ui->alarm1ValueSB->setMaximum(maxi); + ui->alarm1ValueSB->setValue(mini + step*analog.alarms[0].value); + + ui->alarm2ValueSB->setDecimals(2); + ui->alarm2ValueSB->setSingleStep(step); + ui->alarm2ValueSB->setMinimum(mini); + ui->alarm2ValueSB->setMaximum(maxi); + ui->alarm2ValueSB->setValue(mini + step*analog.alarms[1].value); + + ui->CalibSB->setDecimals(2); + ui->CalibSB->setMaximum(step*127); + ui->CalibSB->setMinimum(-step*128); + ui->CalibSB->setSingleStep(step); + ui->CalibSB->setValue(mini); +} + +void TelemetryAnalog::on_UnitCB_currentIndexChanged(int index) +{ + float ratio = analog.getRatio(); + analog.type = index; + switch (index) { + case 0: + case 1: + case 2: + ui->RatioSB->setDecimals(1); + ui->RatioSB->setMaximum(25.5*GetEepromInterface()->getCapability(TelemetryMaxMultiplier)); + break; + default: + ui->RatioSB->setDecimals(0); + ui->RatioSB->setMaximum(255*GetEepromInterface()->getCapability(TelemetryMaxMultiplier)); + break; + } + ui->RatioSB->setValue(ratio); + update(); + emit modified(); +} + +void TelemetryAnalog::on_RatioSB_valueChanged() +{ + if (!lock) { + if (analog.type==0 || analog.type==1 || analog.type==2) { + analog.multiplier = findmult(ui->RatioSB->value(), 25.5); + float singlestep =(1<RatioSB->setSingleStep(singlestep); + ui->RatioSB->setValue(round(ui->RatioSB->value()/singlestep)*singlestep); + lock=false; + } + else { + analog.multiplier = findmult(ui->RatioSB->value(), 255); + float singlestep = (1<RatioSB->setSingleStep(singlestep); + ui->RatioSB->setValue(round(ui->RatioSB->value()/singlestep)*singlestep); + lock = false; + } + emit modified(); + } +} + +void TelemetryAnalog::on_RatioSB_editingFinished() +{ + if (!lock) { + float ratio, calib, alarm1value,alarm2value; + + if (analog.type==0 || analog.type==1 || analog.type==2) { + analog.multiplier = findmult(ui->RatioSB->value(), 25.5); + ui->CalibSB->setSingleStep((1<alarm1ValueSB->setSingleStep((1<alarm2ValueSB->setSingleStep((1<RatioSB->value()*10))/(1 <RatioSB->value(), 255); + ui->CalibSB->setSingleStep(1<alarm1ValueSB->setSingleStep(1<alarm2ValueSB->setSingleStep(1<RatioSB->value()/(1 << analog.multiplier)); + } + ui->CalibSB->setMaximum((ui->RatioSB->value()*127)/255); + ui->CalibSB->setMinimum((ui->RatioSB->value()*-128)/255); + ui->alarm1ValueSB->setMaximum(ui->RatioSB->value()); + ui->alarm2ValueSB->setMaximum(ui->RatioSB->value()); + repaint(); + ratio=analog.ratio * (1 << analog.multiplier); + calib=ui->CalibSB->value(); + alarm1value=ui->alarm1ValueSB->value(); + alarm2value=ui->alarm2ValueSB->value(); + if (analog.type==0) { + calib*=10; + alarm1value*=10; + alarm2value*=10; + } + if (calib>0) { + if (calib>((ratio*127)/255)) { + analog.offset=127; + } + else { + analog.offset=round(calib*255/ratio); + } + } + if (calib<0) { + if (calib<((ratio*-128)/255)) { + analog.offset=-128; + } else { + analog.offset=round(calib*255/ratio); + } + } + analog.alarms[0].value=round((alarm1value*255-analog.offset*(analog.ratio<CalibSB->value()/ratio)); + calib=ratio*analog.offset/255.0; + alarm1value=ui->alarm1ValueSB->value(); + alarm2value=ui->alarm2ValueSB->value(); + if (alarm1value(ratio+calib)) { + alarm1value=ratio+calib; + } + if (alarm2value(ratio+calib)) { + alarm2value=ratio+calib; + } + analog.alarms[0].value=round(((alarm1value-calib)*255)/ratio); + analog.alarms[1].value=round(((alarm2value-calib)*255)/ratio); + } else { + analog.offset=0; + analog.alarms[0].value=0; + analog.alarms[1].value=0; + } + update(); + emit modified(); +} + +void TelemetryAnalog::on_alarm1LevelCB_currentIndexChanged(int index) +{ + analog.alarms[0].level = index; + emit modified(); +} + + +void TelemetryAnalog::on_alarm1GreaterCB_currentIndexChanged(int index) +{ + analog.alarms[0].greater = index; + emit modified(); +} + +void TelemetryAnalog::on_alarm1ValueSB_editingFinished() +{ + float ratio = analog.getRatio(); + float calib, alarm1value; + + calib=analog.offset; + alarm1value=ui->alarm1ValueSB->value(); + + if (alarm1value<((calib*ratio)/255)) { + analog.alarms[0].value=0; + } + else if (alarm1value>(ratio+(calib*ratio)/255)) { + analog.alarms[0].value=255; + } + else { + analog.alarms[0].value = round((alarm1value-((calib*ratio)/255))/ratio*255); + } + update(); + emit modified(); +} + +void TelemetryAnalog::on_alarm2LevelCB_currentIndexChanged(int index) +{ + analog.alarms[1].level = index; + emit modified(); +} + +void TelemetryAnalog::on_alarm2GreaterCB_currentIndexChanged(int index) +{ + analog.alarms[1].greater = index; + emit modified(); +} + +void TelemetryAnalog::on_alarm2ValueSB_editingFinished() +{ + float calib, alarm2value; + float ratio = analog.getRatio(); + calib = analog.offset; + alarm2value = ui->alarm2ValueSB->value(); + if (alarm2value<((calib*ratio)/255)) { + analog.alarms[1].value=0; + } + else if (alarm2value>(ratio+(calib*ratio)/255)) { + analog.alarms[1].value=255; + } else { + analog.alarms[1].value = round((alarm2value-((calib*ratio)/255))/ratio*255); + } + update(); + emit modified(); +} + +TelemetryAnalog::~TelemetryAnalog() +{ + delete ui; +} + +/******************************************************/ + +TelemetryCustomScreen::TelemetryCustomScreen(QWidget *parent, ModelData & model, FrSkyScreenData & screen): + ModelPanel(parent, model), + ui(new Ui::TelemetryCustomScreen), + screen(screen) +{ + ui->setupUi(this); + + for (int l=0; l<4; l++) { + for (int c=0; cgetCapability(TelemetryCustomScreensFieldsPerLine); c++) { + fieldsCB[l][c] = new QComboBox(this); + fieldsCB[l][c]->setProperty("index", c + (l<<8)); + populateCustomScreenFieldCB(fieldsCB[l][c], screen.body.lines[l].source[c], (l<4), model.frsky.usrProto); + ui->screenNumsLayout->addWidget(fieldsCB[l][c], l, c, 1, 1); + connect(fieldsCB[l][c], SIGNAL(currentIndexChanged(int)), this, SLOT(customFieldChanged(int))); + } + } + + for (int l=0; l<4; l++) { + barsCB[l] = new QComboBox(this); + barsCB[l]->setProperty("index", l); + populateCustomScreenFieldCB(barsCB[l], screen.body.bars[l].source, false, model.frsky.usrProto); + connect(barsCB[l], SIGNAL(currentIndexChanged(int)), this, SLOT(barSourceChanged(int))); + ui->screenBarsLayout->addWidget(barsCB[l], l, 0, 1, 1); + + minSB[l] = new QDoubleSpinBox(this); + minSB[l]->setProperty("index", l); + connect(minSB[l], SIGNAL(valueChanged(double)), this, SLOT(barMinChanged(double))); + ui->screenBarsLayout->addWidget(minSB[l], l, 1, 1, 1); + + QLabel * label = new QLabel(this); + label->setAutoFillBackground(false); + label->setStyleSheet(QString::fromUtf8("Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),)\n""")); + label->setFrameShape(QFrame::Panel); + label->setFrameShadow(QFrame::Raised); + label->setAlignment(Qt::AlignCenter); + ui->screenBarsLayout->addWidget(label, l, 2, 1, 1); + + maxSB[l] = new QDoubleSpinBox(this); + maxSB[l]->setProperty("index", l); + connect(maxSB[l], SIGNAL(valueChanged(double)), this, SLOT(barMaxChanged(double))); + ui->screenBarsLayout->addWidget(maxSB[l], l, 3, 1, 1); + } + + update(); +} + +TelemetryCustomScreen::~TelemetryCustomScreen() +{ + delete ui; +} + +void TelemetryCustomScreen::update() +{ + lock = true; + + ui->screenType->setCurrentIndex(screen.type); + ui->screenNums->setVisible(screen.type == 0); + ui->screenBars->setVisible(screen.type != 0); + + if (screen.type == 0) { + for (int l=0; l<4; l++) { + for (int c=0; cgetCapability(TelemetryCustomScreensFieldsPerLine); c++) { + fieldsCB[l][c]->setCurrentIndex(screen.body.lines[l].source[c]); + } + } + } + else { + for (int i=0; i<4; i++) { + updateBar(i); + } + } + + lock = false; +} + +void TelemetryCustomScreen::updateBar(int line) +{ + int index = screen.body.bars[line].source; + barsCB[line]->setCurrentIndex(index); + if (index) { + RawSource source = RawSource(SOURCE_TYPE_TELEMETRY, index-1, &model); + RawSourceRange range = source.getRange(true); + int max = round((range.max - range.min) / range.step); + if (255-screen.body.bars[line].barMax > max) + screen.body.bars[line].barMax = 255 - max; + minSB[line]->setEnabled(true); + minSB[line]->setDecimals(range.decimals); + minSB[line]->setMinimum(range.min); + minSB[line]->setMaximum(range.max); + minSB[line]->setSingleStep(range.step); + minSB[line]->setValue(range.getValue(screen.body.bars[line].barMin)); + maxSB[line]->setEnabled(true); + maxSB[line]->setDecimals(range.decimals); + maxSB[line]->setMinimum(range.min); + maxSB[line]->setMaximum(range.max); + maxSB[line]->setSingleStep(range.step); + maxSB[line]->setValue(range.getValue(255 - screen.body.bars[line].barMax)); + } + else { + minSB[line]->setDisabled(true); + maxSB[line]->setDisabled(true); + } +} + +void TelemetryCustomScreen::on_screenType_currentIndexChanged(int index) +{ + if (!lock) { + memset(&screen.body, 0, sizeof(screen.body)); + screen.type = index; + update(); + emit modified(); + } +} + +void TelemetryCustomScreen::customFieldChanged(int value) +{ + int index = sender()->property("index").toInt(); + screen.body.lines[index/256].source[index%256] = value; + emit modified(); +} + +void TelemetryCustomScreen::barSourceChanged(int index) +{ + QComboBox * cb = qobject_cast(sender()); + int line = cb->property("index").toInt(); + screen.body.bars[line].source = index; + screen.body.bars[line].barMin = 0; + screen.body.bars[line].barMax = 0; + updateBar(line); + emit modified(); +} + +void TelemetryCustomScreen::barMinChanged(double value) +{ + if (!lock) { + int line = sender()->property("index").toInt(); + screen.body.bars[line].barMin = round((value-minSB[line]->minimum()) / minSB[line]->singleStep()); + // TODO set min (maxSB) + emit modified(); + } +} + +void TelemetryCustomScreen::barMaxChanged(double value) +{ + if (!lock) { + int line = sender()->property("index").toInt(); + screen.body.bars[line].barMax = 255 - round((value-minSB[line]->minimum()) / maxSB[line]->singleStep()); + // TODO set max (minSB) + emit modified(); + } +} + +/******************************************************/ + +TelemetryPanel::TelemetryPanel(QWidget *parent, ModelData & model): + ModelPanel(parent, model), + ui(new Ui::Telemetry) +{ + ui->setupUi(this); + + if (GetEepromInterface()->getCapability(NoTelemetryProtocol)) { + model.frsky.usrProto = 1; + } + + analogs[0] = new TelemetryAnalog(this, model.frsky.channels[0]); + ui->A1Layout->addWidget(analogs[0]); + connect(analogs[0], SIGNAL(modified()), this, SLOT(onAnalogModified())); + + analogs[1] = new TelemetryAnalog(this, model.frsky.channels[1]); + ui->A2Layout->addWidget(analogs[1]); + connect(analogs[1], SIGNAL(modified()), this, SLOT(onAnalogModified())); + + for (int i=0; igetCapability(TelemetryCustomScreens); i++) { + TelemetryCustomScreen * tab = new TelemetryCustomScreen(this, model, model.frsky.screens[i]); + ui->customScreens->addTab(tab, tr("Telemetry screen %1").arg(i+1)); + } + + setup(); +} + +TelemetryPanel::~TelemetryPanel() +{ + delete ui; +} + +void TelemetryPanel::setup() +{ + QSettings settings; + QString firmware_id = settings.value("firmware", default_firmware_variant.id).toString(); + + lock=true; + + //frsky Settings + if (!GetEepromInterface()->getCapability(TelemetryRSSIModel) ) { + ui->RSSIGB->hide(); + } + ui->rssiAlarm1SB->setValue(model.frsky.rssiAlarms[0].value); + ui->rssiAlarm2SB->setValue(model.frsky.rssiAlarms[1].value); + ui->rssiAlarm1CB->setCurrentIndex(model.frsky.rssiAlarms[0].level); + ui->rssiAlarm2CB->setCurrentIndex(model.frsky.rssiAlarms[1].level); + + if (!GetEepromInterface()->getCapability(HasAltitudeSel)) { + ui->AltitudeGPS_ChkB->hide(); + } + else { + ui->AltitudeGPS_ChkB->setChecked(model.frsky.FrSkyGpsAlt); + } + + if (IS_TARANIS(GetEepromInterface()->getBoard())) { + ui->AltitudeToolbar_ChkB->setChecked(model.frsky.altitudeDisplayed); + } + else { + ui->AltitudeToolbar_ChkB->hide(); + } + + int varioCap = GetEepromInterface()->getCapability(HasVario); + if (!varioCap) { + ui->varioLimitMax_DSB->hide(); + ui->varioLimitMinOff_ChkB->hide(); + ui->varioLimitMin_DSB->hide(); + ui->varioLimitCenterMin_DSB->hide(); + ui->varioLimitCenterMax_DSB->hide(); + ui->varioLimit_label->hide(); + ui->VarioLabel_1->hide(); + ui->VarioLabel_2->hide(); + ui->VarioLabel_3->hide(); + ui->VarioLabel_4->hide(); + ui->varioSourceCB->hide(); + ui->varioSource_label->hide(); + } + else { + if (!GetEepromInterface()->getCapability(HasVarioSink)) { + ui->varioLimitMinOff_ChkB->hide(); + ui->varioLimitMin_DSB->hide(); + ui->varioLimitCenterMin_DSB->hide(); + ui->VarioLabel_1->hide(); + ui->VarioLabel_2->hide(); + } + ui->varioLimitMin_DSB->setValue(model.frsky.varioMin-10); + ui->varioLimitMax_DSB->setValue(model.frsky.varioMax+10); + ui->varioLimitCenterMax_DSB->setValue((model.frsky.varioCenterMax/10.0)+0.5); + ui->varioSourceCB->setCurrentIndex(model.frsky.varioSource); + if (model.frsky.varioCenterMin==-16) { + ui->varioLimitMinOff_ChkB->setChecked(true); + ui->varioLimitCenterMin_DSB->setValue(-2.0); + ui->varioLimitCenterMin_DSB->setDisabled(true); + } else { + ui->varioLimitMinOff_ChkB->setChecked(false); + ui->varioLimitCenterMin_DSB->setValue((model.frsky.varioCenterMin/10.0)-0.5); + } + int mask=1; + for (int i=0; i< ui->varioSourceCB->count(); i++) { + if (!(varioCap&mask)) { + QModelIndex index = ui->varioSourceCB->model()->index(i, 0); + QVariant v(0); + ui->varioSourceCB->model()->setData(index, v, Qt::UserRole - 1); + } + mask <<=1; + } + } + + if (!(GetEepromInterface()->getCapability(HasAltitudeSel)||GetEepromInterface()->getCapability(HasVario))) { + ui->altimetryGB->hide(); + } + + if (GetEepromInterface()->getCapability(NoTelemetryProtocol)) { + ui->frskyProtoCB->setDisabled(true); + } + else { + ui->frskyProtoCB->setEnabled(true); + } + + if (!GetEepromInterface()->getCapability(TelemetryUnits)) { + ui->frskyUnitsCB->setDisabled(true); + int index=0; + if (firmware_id.contains("imperial")) { + index=1; + } + ui->frskyUnitsCB->setCurrentIndex(index); + } + + if ((GetEepromInterface()->getCapability(Telemetry)&TM_HASWSHH)) { + ui->frskyProtoCB->addItem(tr("Winged Shadow How High")); + } + else { + ui->frskyProtoCB->addItem(tr("Winged Shadow How High (not supported)")); + } + + ui->variousGB->hide(); + if (!(GetEepromInterface()->getCapability(HasFasOffset)) && !(firmware_id.contains("fasoffset"))) { + ui->fasOffset_label->hide(); + ui->fasOffset_DSB->hide(); + } + else { + ui->fasOffset_DSB->setValue(model.frsky.fasOffset/10.0); + ui->variousGB->show(); + } + + if (!(GetEepromInterface()->getCapability(HasMahPersistent))) { + ui->mahCount_label->hide(); + ui->mahCount_SB->hide(); + ui->mahCount_ChkB->hide(); + } + else { + if (model.frsky.mAhPersistent) { + ui->mahCount_ChkB->setChecked(true); + ui->mahCount_SB->setValue(model.frsky.storedMah); + } + else { + ui->mahCount_SB->setDisabled(true); + } + ui->variousGB->show(); + } + + ui->frskyProtoCB->setCurrentIndex(model.frsky.usrProto); + ui->frskyUnitsCB->setCurrentIndex(model.frsky.imperial); + ui->frskyBladesCB->setCurrentIndex(model.frsky.blades); + ui->frskyCurrentCB->setCurrentIndex(model.frsky.currentSource); + ui->frskyVoltCB->setCurrentIndex(model.frsky.voltsSource); + + lock=false; +} + +void TelemetryPanel::onAnalogModified() +{ + emit modified(); +} + +void TelemetryPanel::on_frskyUnitsCB_currentIndexChanged(int index) +{ + model.frsky.imperial=index; + emit modified(); +} + +void TelemetryPanel::on_frskyBladesCB_currentIndexChanged(int index) +{ + model.frsky.blades=index; + emit modified(); +} + +void TelemetryPanel::on_frskyCurrentCB_currentIndexChanged(int index) +{ + model.frsky.currentSource=index; + emit modified(); +} + +void TelemetryPanel::on_frskyVoltCB_currentIndexChanged(int index) +{ + model.frsky.voltsSource=index; + emit modified(); +} + +void TelemetryPanel::on_frskyProtoCB_currentIndexChanged(int index) +{ + model.frsky.usrProto = index; + emit modified(); +} + +void TelemetryPanel::on_rssiAlarm1CB_currentIndexChanged(int index) +{ + model.frsky.rssiAlarms[0].level = index; + emit modified(); +} + +void TelemetryPanel::on_rssiAlarm2CB_currentIndexChanged(int index) +{ + model.frsky.rssiAlarms[1].level = index; + emit modified(); +} + +void TelemetryPanel::on_rssiAlarm1SB_editingFinished() +{ + model.frsky.rssiAlarms[0].value = ui->rssiAlarm1SB->value(); + emit modified(); +} + +void TelemetryPanel::on_rssiAlarm2SB_editingFinished() +{ + model.frsky.rssiAlarms[1].value = ui->rssiAlarm2SB->value(); + emit modified(); +} + +void TelemetryPanel::on_AltitudeGPS_ChkB_toggled(bool checked) +{ + model.frsky.FrSkyGpsAlt = checked; + emit modified(); +} + +void TelemetryPanel::on_AltitudeToolbar_ChkB_toggled(bool checked) +{ + model.frsky.altitudeDisplayed = checked; + emit modified(); +} + +void TelemetryPanel::on_varioSourceCB_currentIndexChanged(int index) +{ + model.frsky.varioSource = index; + emit modified(); +} + +void TelemetryPanel::on_varioLimitMin_DSB_editingFinished() +{ + model.frsky.varioMin = round(ui->varioLimitMin_DSB->value()+10); + emit modified(); +} + +void TelemetryPanel::on_varioLimitMax_DSB_editingFinished() +{ + model.frsky.varioMax = round(ui->varioLimitMax_DSB->value()-10); + emit modified(); +} + +void TelemetryPanel::on_varioLimitCenterMin_DSB_editingFinished() +{ + if (!lock) { + if (ui->varioLimitCenterMin_DSB->value()>ui->varioLimitCenterMax_DSB->value()) { + ui->varioLimitCenterMax_DSB->setValue(ui->varioLimitCenterMin_DSB->value()); + } + model.frsky.varioCenterMin = round((ui->varioLimitCenterMin_DSB->value()+0.5)*10); + emit modified(); + } +} + +void TelemetryPanel::on_varioLimitMinOff_ChkB_toggled(bool checked) +{ + if (!lock) { + model.frsky.varioCenterMin = -16; + if (!checked) { + lock=true; + ui->varioLimitCenterMin_DSB->setValue(-2.0); + ui->varioLimitCenterMin_DSB->setEnabled(true); + lock=false; + } + else { + ui->varioLimitCenterMin_DSB->setValue(-2.0); + ui->varioLimitCenterMin_DSB->setDisabled(true); + } + emit modified(); + } +} + +void TelemetryPanel::on_varioLimitCenterMax_DSB_editingFinished() +{ + if (!lock) { + if (ui->varioLimitCenterMin_DSB->value()>ui->varioLimitCenterMax_DSB->value()) { + ui->varioLimitCenterMax_DSB->setValue(ui->varioLimitCenterMin_DSB->value()); + } + model.frsky.varioCenterMax = round((ui->varioLimitCenterMax_DSB->value()-0.5)*10); + emit modified(); + } +} + +void TelemetryPanel::on_fasOffset_DSB_editingFinished() +{ + model.frsky.fasOffset = ui->fasOffset_DSB->value() * 10; + emit modified(); +} + +void TelemetryPanel::on_mahCount_SB_editingFinished() +{ + model.frsky.storedMah = ui->mahCount_SB->value(); + emit modified(); +} + +void TelemetryPanel::on_mahCount_ChkB_toggled(bool checked) +{ + model.frsky.mAhPersistent = checked; + ui->mahCount_SB->setDisabled(!checked); + emit modified(); +} diff --git a/companion/src/modeledit/telemetry.h b/companion/src/modeledit/telemetry.h new file mode 100644 index 000000000..44233f79c --- /dev/null +++ b/companion/src/modeledit/telemetry.h @@ -0,0 +1,116 @@ +#ifndef TELEMETRY_H +#define TELEMETRY_H + +#include "modelpanel.h" +#include +#include +#include + +namespace Ui { + class TelemetryAnalog; + class TelemetryCustomScreen; + class Telemetry; +} + +class TelemetryAnalog : public QWidget +{ + Q_OBJECT + + friend class TelemetryPanel; + + public: + TelemetryAnalog(QWidget *parent, FrSkyChannelData & analog); + virtual ~TelemetryAnalog(); + + signals: + void modified(); + + private slots: + void on_UnitCB_currentIndexChanged(int index); + void on_RatioSB_editingFinished(); + void on_RatioSB_valueChanged(); + void on_CalibSB_editingFinished(); + void on_alarm1LevelCB_currentIndexChanged(int index); + void on_alarm1GreaterCB_currentIndexChanged(int index); + void on_alarm1ValueSB_editingFinished(); + void on_alarm2LevelCB_currentIndexChanged(int index); + void on_alarm2GreaterCB_currentIndexChanged(int index); + void on_alarm2ValueSB_editingFinished(); + + private: + Ui::TelemetryAnalog *ui; + FrSkyChannelData & analog; + bool lock; + + void update(); +}; + +class TelemetryCustomScreen : public ModelPanel +{ + Q_OBJECT + + public: + TelemetryCustomScreen(QWidget *parent, ModelData & model, FrSkyScreenData & screen); + ~TelemetryCustomScreen(); + void update(); + + private slots: + void on_screenType_currentIndexChanged(int index); + void customFieldChanged(int index); + void barSourceChanged(int index); + void barMinChanged(double value); + void barMaxChanged(double value); + + private: + void updateBar(int line); + Ui::TelemetryCustomScreen * ui; + FrSkyScreenData & screen; + QComboBox * fieldsCB[4][3]; + QComboBox * barsCB[4]; + QDoubleSpinBox * minSB[4]; + QDoubleSpinBox * maxSB[4]; +}; + +class TelemetryPanel : public ModelPanel +{ + Q_OBJECT + + public: + TelemetryPanel(QWidget *parent, ModelData & model); + virtual ~TelemetryPanel(); + + signals: + void modified(); + + private slots: + void onAnalogModified(); + void on_frskyProtoCB_currentIndexChanged(int index); + void on_frskyUnitsCB_currentIndexChanged(int index); + void on_frskyBladesCB_currentIndexChanged(int index); + void on_frskyCurrentCB_currentIndexChanged(int index); + void on_frskyVoltCB_currentIndexChanged(int index); + void on_AltitudeToolbar_ChkB_toggled(bool checked); + void on_rssiAlarm1CB_currentIndexChanged(int index); + void on_rssiAlarm2CB_currentIndexChanged(int index); + void on_rssiAlarm1SB_editingFinished(); + void on_rssiAlarm2SB_editingFinished(); + void on_AltitudeGPS_ChkB_toggled(bool checked); + void on_varioSourceCB_currentIndexChanged(int index); + void on_varioLimitMin_DSB_editingFinished(); + void on_varioLimitMax_DSB_editingFinished(); + void on_varioLimitCenterMin_DSB_editingFinished(); + void on_varioLimitMinOff_ChkB_toggled(bool checked); + void on_varioLimitCenterMax_DSB_editingFinished(); + void on_fasOffset_DSB_editingFinished(); + void on_mahCount_SB_editingFinished(); + void on_mahCount_ChkB_toggled(bool checked); + + private: + Ui::Telemetry *ui; + TelemetryAnalog * analogs[2]; + + void setup(); + void telBarUpdate(); +}; + +#endif // TELEMETRY_H diff --git a/companion/src/modeledit/telemetry.ui b/companion/src/modeledit/telemetry.ui new file mode 100644 index 000000000..6a3a6d618 --- /dev/null +++ b/companion/src/modeledit/telemetry.ui @@ -0,0 +1,903 @@ + + + Telemetry + + + + 0 + 0 + 692 + 457 + + + + Form + + + + + + QLayout::SetMinimumSize + + + + + + 0 + 0 + + + + true + + + + + + A1 + + + false + + + + 1 + + + 1 + + + + + + + + A2 + + + + 1 + + + 1 + + + + + + + + + 0 + 0 + + + + RSSI + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + Alarm 1 + + + + + + + + 0 + 0 + + + + + ---- + + + + + Yellow + + + + + Orange + + + + + Red + + + + + + + + true + + + + 0 + 0 + + + + + + + 20 + + + 80 + + + 1 + + + 50 + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Alarm 2 + + + + + + + + 0 + 0 + + + + + ---- + + + + + Yellow + + + + + Orange + + + + + Red + + + + + + + + true + + + + 0 + 0 + + + + + + + 20 + + + 80 + + + 1 + + + 50 + + + + + + + Qt::Vertical + + + + 20 + 0 + + + + + + + + + + + + + QLayout::SetMinimumSize + + + + + + 0 + 0 + + + + Serial Protocol + + + + 1 + + + 1 + + + + + + + + 0 + 0 + + + + Volt source + + + + + + + + 0 + 0 + + + + + Metric + + + + + Imperial + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Current source + + + + + + + + 0 + 0 + + + + + 100 + 0 + + + + Protocol + + + + + + + + 0 + 0 + + + + + NONE + + + + + A1 + + + + + A2 + + + + + FAS + + + + + + + + + 0 + 0 + + + + + None + + + + + FrSky Sensor Hub + + + + + + + + + 0 + 0 + + + + + A1 + + + + + A2 + + + + + FAS + + + + + CEL + + + + + + + + + 0 + 0 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Units + + + + + + + + 0 + 0 + + + + Blades + + + + + + + + + + + + + 0 + 0 + + + + Altimetry / Vario + + + + 1 + + + 1 + + + + + + + + 0 + 0 + + + + + Alti + + + + + Alti+ + + + + + Vario + + + + + A1 + + + + + A2 + + + + + + + + + + + 0 + 0 + + + + Sink Max + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + 1 + + + -2.000000000000000 + + + 0.000000000000000 + + + 0.100000000000000 + + + -0.500000000000000 + + + + + + + + 0 + 0 + + + + 1 + + + -1.000000000000000 + + + 2.000000000000000 + + + 0.100000000000000 + + + 0.500000000000000 + + + + + + + + 0 + 0 + + + + 0 + + + 3.000000000000000 + + + 17.000000000000000 + + + 10.000000000000000 + + + + + + + + 0 + 0 + + + + 0 + + + -17.000000000000000 + + + -3.000000000000000 + + + -10.000000000000000 + + + + + + + + 0 + 0 + + + + Off + + + + + + + + 0 + 0 + + + + Climb Max + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + Sink Min + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + Climb Min + + + Qt::AlignCenter + + + + + + + + + Vario source + + + + + + + Vario limits + + + + + + + + + + 0 + 0 + + + + Use GPS as altitude source + + + + + + + + 0 + 0 + + + + Display altitude in toolbar + + + + + + + + + + + + + + + + + 0 + 0 + + + + Various + + + + 1 + + + 1 + + + + + + + + 0 + 0 + + + + 32767 + + + + + + + mAh count + + + + + + + + 0 + 0 + + + + FAS Offset + + + + + + + Persistent mAh + + + + + + + + 0 + 0 + + + + 1 + + + -1.500000000000000 + + + 1.500000000000000 + + + 0.100000000000000 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + 0 + 0 + + + + -1 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + diff --git a/companion/src/modeledit/telemetry_analog.ui b/companion/src/modeledit/telemetry_analog.ui new file mode 100644 index 000000000..d8b713105 --- /dev/null +++ b/companion/src/modeledit/telemetry_analog.ui @@ -0,0 +1,324 @@ + + + TelemetryAnalog + + + + 0 + 0 + 272 + 118 + + + + Form + + + + + + + + + 0 + 0 + + + + Unit + + + + + + + + 0 + 0 + + + + Max Value + + + + + + + + 0 + 0 + + + + Alarm 1 + + + + + + + + 0 + 0 + + + + + ---- + + + + + Yellow + + + + + Orange + + + + + Red + + + + + + + + + 0 + 0 + + + + + < + + + + + > + + + + + + + + + 0 + 0 + + + + Alarm 2 + + + + + + + + 0 + 0 + + + + + ---- + + + + + Yellow + + + + + Orange + + + + + Red + + + + + + + + + 0 + 0 + + + + + < + + + + + > + + + + + + + + true + + + + 0 + 0 + + + + 0 + + + 255.000000000000000 + + + + + + + + 0 + 0 + + + + 2 + + + -12.800000000000001 + + + 12.699999999999999 + + + 0.100000000000000 + + + + + + + true + + + + 0 + 0 + + + + 0 + + + 255.000000000000000 + + + + + + + true + + + + 0 + 0 + + + + 0 + + + 255.000000000000000 + + + + + + + + 0 + 0 + + + + Min Value + + + + + + + + 0 + 0 + + + + + Volts (V) + + + + + Amps (A) + + + + + Speed (m/s or ft/s) + + + + + Raw (-) + + + + + Speed (km/h or miles/h) + + + + + Meters (m or ft) + + + + + Temp (°) + + + + + Fuel (%) + + + + + mAmps (mA) + + + + + + + + + + + diff --git a/companion/src/modeledit/telemetry_customscreen.ui b/companion/src/modeledit/telemetry_customscreen.ui new file mode 100644 index 000000000..b01417450 --- /dev/null +++ b/companion/src/modeledit/telemetry_customscreen.ui @@ -0,0 +1,138 @@ + + + TelemetryCustomScreen + + + + 0 + 0 + 650 + 393 + + + + Form + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Custom Screen Type + + + + + + + + 0 + 0 + + + + + 90 + 0 + + + + + Nums + + + + + Bars + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + + + Min + + + Qt::AlignCenter + + + + + + + Source + + + Qt::AlignCenter + + + + + + + Gauge + + + Qt::AlignCenter + + + + + + + Max + + + Qt::AlignCenter + + + + + + + + + + + + + diff --git a/companion/src/modeledit/templates.cpp b/companion/src/modeledit/templates.cpp new file mode 100644 index 000000000..6bfb52247 --- /dev/null +++ b/companion/src/modeledit/templates.cpp @@ -0,0 +1,874 @@ +#include "templates.h" +#include +#include + +void ModelEdit::setCurve(uint8_t c, int8_t ar[]) +{ + int len=sizeof(ar)/sizeof(int8_t); + + if (GetEepromInterface()->getCapability(NumCurves)>c) { + if (len<9) { + model.curves[c].count=5; + model.curves[c].custom=false; + for (int i=0; i< 5; i++) { + model.curves[c].points[i].y=ar[i]; + } + } + else { + model.curves[c].count=5; + model.curves[c].custom=false; + for (int i=0; i< 5; i++) { + model.curves[c].points[i].y=ar[i]; + } + } + } +} + +Templates::Templates(QWidget * parent, ModelData & model): + QWidget(parent), + model(model) +{ + QGridLayout * gridLayout = new QGridLayout(this); + QListWidget * templateList = new QListWidget(this); + gridLayout->addWidget(templateList, 0, 0, 1, 1); + + templateList->addItem(tr("Simple 4-CH")); + templateList->addItem(tr("T-Cut")); + templateList->addItem(tr("Sticky T-Cut")); + templateList->addItem(tr("V-Tail")); + templateList->addItem(tr("Elevon\\Delta")); + templateList->addItem(tr("Heli Setup")); + templateList->addItem(tr("Heli Setup with gyro gain control")); + templateList->addItem(tr("Gyro gain control")); + templateList->addItem(tr("Heli Setup (Futaba's channel assignment style)")); + templateList->addItem(tr("Heli Setup with gyro gain control (Futaba's channel assignment style)")); + templateList->addItem(tr("Gyro gain control (Futaba's channel assignment style)")); + templateList->addItem(tr("Servo Test")); + templateList->addItem(tr("MultiCopter")); + templateList->addItem(tr("Use Model Config Wizard")); + + connect(templateList, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(doubleClicked(QModelIndex))); +} + +Templates::~Templates() +{ +} + +void Templates::setSwitch(unsigned int idx, unsigned int func, int v1, int v2) +{ + g_model.customSw[idx-1].func = func; + g_model.customSw[idx-1].val1 = v1; + g_model.customSw[idx-1].val2 = v2; +} + +void Templates::onDoubleClicked(QModelIndex index) +{ + QString text = ui->templateList->item(index.row())->text(); + if (index.row()==13) { + uint64_t result=0xffffffff; + modelConfigDialog *mcw = new modelConfigDialog(radioData, &result, this); + mcw->exec(); + if (result!=0xffffffff) { + applyNumericTemplate(result); + updateSettings(); + tabMixes(); + } + } else { + int res = QMessageBox::question(this,tr("Apply Template?"),tr("Apply template \"%1\"?").arg(text),QMessageBox::Yes | QMessageBox::No); + if(res!=QMessageBox::Yes) return; + applyTemplate(index.row()); + updateSettings(); + tabMixes(); + } +} + +void Templates::applyNumericTemplate(uint64_t tpl) +{ + clearCurves(); + clearExpos(false); + clearMixes(false); + int8_t heli_ar1[] = {-100, -20, 30, 70, 90}; + int8_t heli_ar2[] = {80, 70, 60, 70, 100}; + int8_t heli_ar3[] = {100, 90, 80, 90, 100}; + int8_t heli_ar4[] = {-30, -15, 0, 50, 100}; + int8_t heli_ar5[] = {-100, -50, 0, 50, 100}; + bool rx[10]; + for (int i=0; i<10 ; i++) { + rx[i]=false; + } + int thrsw=GetEepromInterface()->getCapability(GetThrSwitch); + MixData *md = &model.mixData[0]; + uint8_t spo2ch=(tpl & 0x0F); + tpl>>=4; + uint8_t spo1ch=(tpl & 0x0F); + tpl>>=4; + uint8_t fla2ch=(tpl & 0x0F); + tpl>>=4; + uint8_t fla1ch=(tpl & 0x0F); + tpl>>=4; + uint8_t rud2ch=(tpl & 0x0F); + tpl>>=4; + uint8_t ele2ch=(tpl & 0x0F); + tpl>>=4; + uint8_t ail2ch=(tpl & 0x0F); + tpl>>=4; + uint8_t chstyle=(tpl & 0x03); + tpl>>=2; + uint8_t gyro=(tpl & 0x03); + tpl>>=2; + uint8_t tailtype=(tpl & 0x03); + tpl>>=2; + uint8_t swashtype=(tpl & 0x07); + tpl>>=3; + uint8_t ruddertype=(tpl & 0x03); + tpl>>=2; + uint8_t spoilertype=(tpl & 0x3); + tpl>>=2; + uint8_t flaptype=(tpl & 0x03); + tpl>>=2; + uint8_t ailerontype=(tpl & 0x03); + tpl>>=2; + uint8_t enginetype=(tpl & 0x03); + tpl>>=2; + uint8_t modeltype=(tpl & 0x03); + + #define ICC(x) icc[(x)-1] + uint8_t icc[4] = {0}; + for(uint8_t i=1; i<=4; i++) //generate inverse array + for(uint8_t j=1; j<=4; j++) if(CC(i)==j) icc[j-1]=i; + + int ailerons; + int flaps; + int throttle; + int spoilers; + int elevators; + int rudders; + int sign; + uint8_t rxch; + switch (modeltype) { + case 0: + ailerons=ailerontype; + flaps=flaptype; + throttle=1; + switch (tailtype) { + case 0: + case 1: + rudders=1; + elevators=1; + break; + case 2: + rudders=1; + elevators=2; + break; + } + rxch=ICC(STK_RUD); + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6); + if (tailtype==1) { + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); + } + rx[rxch-1]=true; + rxch=ICC(STK_ELE); + if (tailtype==1) { + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6); + } + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); + rx[rxch-1]=true; + rxch=ICC(STK_THR); + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("THR").toAscii().data(),6); + rx[rxch-1]=true; + if (ail2ch > 0) { + rx[ail2ch-1]=true; + } + if (ele2ch > 0) { + rx[ele2ch-1]=true; + } + if (fla1ch > 0) { + rx[fla1ch-1]=true; + } + if (fla2ch > 0) { + rx[fla2ch-1]=true; + } + if (ailerons>0) { + rxch=ICC(STK_AIL); + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6); + rx[rxch-1]=true; + } + if (ailerons>1) { + if (ail2ch==0) { + for (int j=0; j<10 ; j++) { + if (!rx[j]) { + md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL2").toAscii().data(),6); + rx[j]=true; + break; + } + } + } else { + md=setDest(ail2ch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL2").toAscii().data(),6); + } + } + if (elevators>1) { + if (ele2ch==0) { + for (int j=0; j<10 ; j++) { + if (!rx[j]) { + md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();;strncpy(md->name, tr("ELE2").toAscii().data(),6); + rx[j]=true; + break; + } + } + }else{ + md=setDest(ele2ch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();;strncpy(md->name, tr("ELE2").toAscii().data(),6); + } + } + if (flaps>0) { + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->speedUp=4; md->speedDown=4; + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->speedUp=4; md->speedDown=4; + } + sign=-1; + for (uint8_t i=0; i< flaps; i++) { + sign*=-1; + int index; + if (i==0) { + index=fla1ch; + } else { + index=fla2ch; + } + if (index==0) { + for (int j=0; j<10 ; j++) { + if (!rx[j]) { + md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6); + rx[j]=true; + break; + } + } + } else { + md=setDest(index); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6); + } + } + break; + case 1: + setCurve(CURVE5(1),heli_ar1); + setCurve(CURVE5(2),heli_ar2); + setCurve(CURVE5(3),heli_ar3); + setCurve(CURVE5(4),heli_ar4); + setCurve(CURVE5(5),heli_ar5); + setCurve(CURVE5(6),heli_ar5); + switch (swashtype) { + case 0: + model.swashRingData.type = HELI_SWASH_TYPE_90; + break; + case 1: + model.swashRingData.type = HELI_SWASH_TYPE_120; + break; + case 2: + model.swashRingData.type = HELI_SWASH_TYPE_120X; + break; + case 3: + model.swashRingData.type = HELI_SWASH_TYPE_140; + break; + case 4: + model.swashRingData.type = HELI_SWASH_TYPE_NONE; + break; + } + model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10); + + if (chstyle==0) { + if (swashtype!=4) { + md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); + md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6); + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("PITCH").toAscii().data(),6); + } else { + md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); + md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6); + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("PITCH").toAscii().data(),6); + } + md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6); + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF; + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF; + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF; + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP; + switch (gyro) { + case 1: + md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6); + md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6); + break; + case 2: + md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6); + md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6); + break; + } + } else { + if (swashtype!=4) { + md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6); + md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); + md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("PITCH").toAscii().data(),6); + } else { + md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6); + md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); + md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight= 100; md->swtch=RawSwitch();strncpy(md->name, tr("PITCH").toAscii().data(),6); + } + md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6); + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF; + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF; + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF; + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP; + switch (gyro) { + case 1: + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6); + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA);strncpy(md->name, tr("GYRO").toAscii().data(),6); + break; + case 2: + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6); + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100;strncpy(md->name, tr("GYRO").toAscii().data(),6); + break; + } + } + // collective + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF; + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF; + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF; + break; + case 2: + ailerons=ailerontype; + flaps=flaptype; + spoilers=spoilertype; + throttle=enginetype; + switch (tailtype) { + case 0: + case 1: + rudders=1; + elevators=1; + break; + case 2: + rudders=1; + elevators=2; + break; + } + if (throttle==1) { + rxch=ICC(STK_THR); + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("THR").toAscii().data(),6); + rx[rxch-1]=true; + } + rxch=ICC(STK_RUD); + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6); + if (tailtype==1) { + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6); + } + rx[rxch-1]=true; + rxch=ICC(STK_ELE); + if (tailtype==1) { + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); + } + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); + rx[rxch-1]=true; + if (ail2ch > 0) { + rx[ail2ch-1]=true; + } + if (ele2ch > 0) { + rx[ele2ch-1]=true; + } + if (fla1ch > 0) { + rx[fla1ch-1]=true; + } + if (fla2ch > 0) { + rx[fla2ch-1]=true; + } + if (spo1ch > 0) { + rx[spo1ch-1]=true; + } + if (spo2ch > 0) { + rx[spo2ch-1]=true; + } + + if (ailerons>0) { + rxch=ICC(STK_AIL); + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6); + rx[rxch-1]=true; + } + if (ailerons>1) { + if (ail2ch==0) { + for (int j=0; j<10 ; j++) { + if (!rx[j]) { + md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL2").toAscii().data(),6); + rx[j]=true; + break; + } + } + } else { + md=setDest(ail2ch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL2").toAscii().data(),6); + } + } + if (elevators>1) { + if (ele2ch==0) { + for (int j=0; j<10 ; j++) { + if (!rx[j]) { + md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE2").toAscii().data(),6); + rx[j]=true; + break; + } + } + } else { + md=setDest(ele2ch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE2").toAscii().data(),6); + } + } + if (flaps>0) { + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6);md->speedUp=4; md->speedDown=4; + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6);md->speedUp=4; md->speedDown=4; + } + sign=-1; + for (uint8_t i=0; i< flaps; i++) { + sign*=-1; + int index; + if (i==0) { + index=fla1ch; + } else { + index=fla2ch; + } + if (index==0) { + for (int j=0; j<10 ; j++) { + if (!rx[j]) { + md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6); + rx[j]=true; + break; + } + } + } else { + md=setDest(index); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6); + } + } + if (spoilers>0) { + md=setDest(12); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA);strncpy(md->name, tr("SPOIL").toAscii().data(),6); md->speedUp=4;;md->speedDown=4; + md=setDest(12); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA);strncpy(md->name, tr("SPOIL").toAscii().data(),6);md->speedUp=4;md->speedDown=4; + } + sign=-1; + for (uint8_t i=0; i< spoilers; i++) { + sign*=-1; + int index; + if (i==0) { + index=spo1ch; + } else { + index=spo2ch; + } + if (index==0) { + for (int j=0; j<10 ; j++) { + if (!rx[j]) { + md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_CH, 11); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("SPOIL%1").arg(i+1).toAscii().data(),6); + rx[j]=true; + break; + } + } + } else { + md=setDest(index); md->srcRaw=RawSource(SOURCE_TYPE_CH, 11); md->weight=100*sign; md->sOffset=0; md->swtch=RawSwitch();strncpy(md->name, tr("SPOIL%1").arg(i+1).toAscii().data(),6); + } + } + break; + case 3: + flaps=flaptype; + throttle=enginetype; + rudders=ruddertype; + if (throttle==1) { + rxch=ICC(STK_THR); + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("THR").toAscii().data(),6); + rx[rxch-1]=true; + } + rxch=ICC(STK_ELE); + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("ELE").toAscii().data(),6); + rx[rxch-1]=true; + rxch=ICC(STK_AIL); + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6); + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("AIL").toAscii().data(),6); + rx[rxch-1]=true; + if (rudders>0) { + rxch=ICC(STK_RUD); + md=setDest(rxch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD").toAscii().data(),6); + rx[rxch-1]=true; + } + if (rud2ch > 0) { + rx[rud2ch-1]=true; + } + if (fla1ch > 0) { + rx[fla1ch-1]=true; + } + if (fla2ch > 0) { + rx[fla2ch-1]=true; + } + if (rudders>1) { + if (rud2ch==0) { + for (int j=0; j<10 ; j++) { + if (!rx[j]) { + md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD2").toAscii().data(),6); + rx[j]=true; + break; + } + } + } else { + md=setDest(rud2ch); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=-100; md->swtch=RawSwitch();strncpy(md->name, tr("RUD2").toAscii().data(),6); + } + } + if (flaps>0) { + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->sOffset=0; md->speedUp=4; + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_AIL);strncpy(md->name, tr("FLAPS").toAscii().data(),6); md->sOffset=0; md->speedUp=4; + } + sign=-1; + for (uint8_t i=0; i< flaps; i++) { + sign*=-1; + int index; + if (i==0) { + index=fla1ch; + } else { + index=fla2ch; + } + if (index==0) { + for (int j=0; j<10 ; j++) { + if (!rx[j]) { + md=setDest(j+1); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->speedUp=4; md->speedDown=4; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6); + rx[j]=true; + break; + } + } + } else { + md=setDest(index); md->srcRaw=RawSource(SOURCE_TYPE_CH, 10); md->weight=100*sign; md->sOffset=0; md->speedUp=4; md->speedDown=4; md->swtch=RawSwitch();strncpy(md->name, tr("FLAP%1").arg(i+1).toAscii().data(),6); + } + } + break; + } + updateHeliTab(); + updateCurvesTab(); + if (modeltype==1 && swashtype!=4) { + ui->tabWidget->setCurrentIndex(1); + } else { + ui->tabWidget->setCurrentIndex(4); + } + resizeEvent(); +} + +void Templates::applyTemplate(uint8_t idx) +{ + int8_t heli_ar1[] = {-100, -20, 30, 70, 90}; + int8_t heli_ar2[] = {80, 70, 60, 70, 100}; + int8_t heli_ar3[] = {100, 90, 80, 90, 100}; + int8_t heli_ar4[] = {-30, -15, 0, 50, 100}; + int8_t heli_ar5[] = {-100, -50, 0, 50, 100}; + + int thrsw=GetEepromInterface()->getCapability(GetThrSwitch); + MixData *md = &model.mixData[0]; + + //CC(STK) -> vSTK + //ICC(vSTK) -> STK + #define ICC(x) icc[(x)-1] + uint8_t icc[4] = {0}; + for(uint8_t i=1; i<=4; i++) //generate inverse array + for(uint8_t j=1; j<=4; j++) if(CC(i)==j) icc[j-1]=i; + + + uint8_t j = 0; + + //Simple 4-Ch + if(idx==j++) { + if (md->destCh) + clearMixes(); + md=setDest(ICC(STK_RUD)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch(); + md=setDest(ICC(STK_ELE)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=100; md->swtch=RawSwitch(); + md=setDest(ICC(STK_THR)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(); + md=setDest(ICC(STK_AIL)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch(); + } + + //T-Cut + if(idx==j++) { + md=setDest(ICC(STK_THR)); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP; + } + + //sticky t-cut + if(idx==j++) { + md=setDest(ICC(STK_THR)); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_VIRTUAL, 12); md->mltpx=MLTPX_REP; + md=setDest(14); md->srcRaw=RawSource(SOURCE_TYPE_CH, 13); md->weight= 100; md->swtch=RawSwitch(); + md=setDest(14); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_VIRTUAL, 11); md->mltpx=MLTPX_REP; + md=setDest(14); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP; + setSwitch(0xB, CS_FN_VNEG, RawSource(SOURCE_TYPE_STICK, 2).toValue(), -99); + setSwitch(0xC, CS_FN_VPOS, RawSource(SOURCE_TYPE_CH, 13).toValue(), 0); + updateSwitchesTab(); + } + + //V-Tail + if(idx==j++) { + clearMixes(); + md=setDest(ICC(STK_THR)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(); + md=setDest(ICC(STK_AIL)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch(); + md=setDest(ICC(STK_RUD)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight= 100; md->swtch=RawSwitch(); + md=setDest(ICC(STK_RUD)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch(); + md=setDest(ICC(STK_ELE)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight= 100; md->swtch=RawSwitch(); + md=setDest(ICC(STK_ELE)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight= 100; md->swtch=RawSwitch(); + } + + //Elevon\\Delta + if(idx==j++) { + clearMixes(); + md=setDest(ICC(STK_THR)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(); + md=setDest(ICC(STK_RUD)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch(); + md=setDest(ICC(STK_ELE)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight= 100; md->swtch=RawSwitch(); + md=setDest(ICC(STK_ELE)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight= 100; md->swtch=RawSwitch(); + md=setDest(ICC(STK_AIL)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-100; md->swtch=RawSwitch(); + md=setDest(ICC(STK_AIL)); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=100; md->swtch=RawSwitch(); + } + + //Heli Setup + if(idx==j++) { + clearMixes(); //This time we want a clean slate + clearCurves(); + + // Set up Mixes + // 3 cyclic channels + md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch(); + md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch(); + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch(); + + // rudder + md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch(); + + // throttle + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF; + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF; + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF; + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP; + + // gyro gain + md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); + md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); + + // collective + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF; + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF; + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF; + + model.swashRingData.type = HELI_SWASH_TYPE_120; + model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10); + + // set up Curves + setCurve(CURVE5(1),heli_ar1); + setCurve(CURVE5(2),heli_ar2); + setCurve(CURVE5(3),heli_ar3); + setCurve(CURVE5(4),heli_ar4); + setCurve(CURVE5(5),heli_ar5); + setCurve(CURVE5(6),heli_ar5); + + // make sure curves are redrawn + updateHeliTab(); + updateCurvesTab(); + resizeEvent(); + } + + //Heli Setup gyro gain control + if(idx==j++) { + clearMixes(); //This time we want a clean slate + clearCurves(); + + // Set up Mixes + // 3 cyclic channels + md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch(); + md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch(); + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch(); + + // rudder + md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch(); + + // throttle + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF; + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF; + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF; + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP; + + // gyro gain + md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100; + md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100; + + // collective + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF; + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF; + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF; + + model.swashRingData.type = HELI_SWASH_TYPE_120; + model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10); + + // set up Curves + setCurve(CURVE5(1),heli_ar1); + setCurve(CURVE5(2),heli_ar2); + setCurve(CURVE5(3),heli_ar3); + setCurve(CURVE5(4),heli_ar4); + setCurve(CURVE5(5),heli_ar5); + setCurve(CURVE5(6),heli_ar5); + + // make sure curves are redrawn + updateHeliTab(); + updateCurvesTab(); + resizeEvent(); + } + + // gyro gain control + if(idx==j++) { + int res = QMessageBox::question(this,tr("Clear Mixes?"),tr("Really clear existing mixes on CH6?"),QMessageBox::Yes | QMessageBox::No); + if(res!=QMessageBox::Yes) return; + // first clear mix on ch6 + bool found=true; + while (found) { + found=false; + for (int i=0; i< GetEepromInterface()->getCapability(Mixes); i++) { + if (model.mixData[i].destCh==6) { + gm_deleteMix(i); + found=true; + break; + } + } + } + md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100; + md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100; + } + + //Heli Setup futaba style + if(idx==j++) { + clearMixes(); //This time we want a clean slate + clearCurves(); + + // Set up Mixes + // 3 cyclic channels + md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch(); + md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch(); + md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch(); + + // rudder + md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch(); + + // throttle + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF; + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF; + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF; + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP; + + // gyro gain + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-30; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); + + // collective + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF; + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF; + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF; + + model.swashRingData.type = HELI_SWASH_TYPE_120; + model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10); + + // set up Curves + setCurve(CURVE5(1),heli_ar1); + setCurve(CURVE5(2),heli_ar2); + setCurve(CURVE5(3),heli_ar3); + setCurve(CURVE5(4),heli_ar4); + setCurve(CURVE5(5),heli_ar5); + setCurve(CURVE5(6),heli_ar5); + + // make sure curves are redrawn + updateHeliTab(); + updateCurvesTab(); + resizeEvent(); + } + + // Heli setup futaba style with gyro gain control + if(idx==j++) { + clearMixes(); //This time we want a clean slate + clearCurves(); + + // Set up Mixes + // 3 cyclic channels + md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 1); md->weight= 100; md->swtch=RawSwitch(); + md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 0); md->weight= 100; md->swtch=RawSwitch(); + md=setDest(6); md->srcRaw=RawSource(SOURCE_TYPE_CYC, 2); md->weight= 100; md->swtch=RawSwitch(); + + // rudder + md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch(); + + // throttle + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(1); md->carryTrim=TRIM_OFF; + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(2); md->carryTrim=TRIM_OFF; + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight= 100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(3); md->carryTrim=TRIM_OFF; + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,thrsw); md->mltpx=MLTPX_REP; + + // gyro gain + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100; + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100; + + // collective + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID0); md->curve=CV(4); md->carryTrim=TRIM_OFF; + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID1); md->curve=CV(5); md->carryTrim=TRIM_OFF; + md=setDest(11); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_ID2); md->curve=CV(6); md->carryTrim=TRIM_OFF; + + model.swashRingData.type = HELI_SWASH_TYPE_120; + model.swashRingData.collectiveSource = RawSource(SOURCE_TYPE_CH, 10); + + // set up Curves + setCurve(CURVE5(1),heli_ar1); + setCurve(CURVE5(2),heli_ar2); + setCurve(CURVE5(3),heli_ar3); + setCurve(CURVE5(4),heli_ar4); + setCurve(CURVE5(5),heli_ar5); + setCurve(CURVE5(6),heli_ar5); + + // make sure curves are redrawn + updateHeliTab(); + updateCurvesTab(); + resizeEvent(); + } + + // gyro gain control futaba style + if(idx==j++) { + int res = QMessageBox::question(this,tr("Clear Mixes?"),tr("Really clear existing mixes on CH5?"),QMessageBox::Yes | QMessageBox::No); + if(res!=QMessageBox::Yes) return; + // first clear mix on ch6 + bool found=true; + while (found) { + found=false; + for (int i=0; i< GetEepromInterface()->getCapability(Mixes); i++) { + if (model.mixData[i].destCh==5) { + gm_deleteMix(i); + found=true; + break; + } + } + } + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight= 50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,-DSW_GEA); md->sOffset=100; + md=setDest(5); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 5); md->weight=-50; md->swtch=RawSwitch(SWITCH_TYPE_SWITCH,DSW_GEA); md->sOffset=100; + } + + //Servo Test + if(idx==j++) { + md=setDest(15); md->srcRaw=RawSource(SOURCE_TYPE_CH, 15); md->weight= 100; md->speedUp = 8; md->speedDown = 8; md->swtch=RawSwitch(); + md=setDest(16); md->srcRaw=RawSource(SOURCE_TYPE_CUSTOM_SWITCH, 0); md->weight= 110; md->swtch=RawSwitch(); + md=setDest(16); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight=-110; md->swtch=RawSwitch(SWITCH_TYPE_VIRTUAL, 2); md->mltpx=MLTPX_REP; + md=setDest(16); md->srcRaw=RawSource(SOURCE_TYPE_MAX); md->weight= 110; md->swtch=RawSwitch(SWITCH_TYPE_VIRTUAL, 3); md->mltpx=MLTPX_REP; + setSwitch(1, CS_FN_LESS, RawSource(SOURCE_TYPE_CH, 14).toValue(), RawSource(SOURCE_TYPE_CH, 15).toValue()); + setSwitch(2, CS_FN_VPOS, RawSource(SOURCE_TYPE_CH, 14).toValue(), 105); + setSwitch(3, CS_FN_VNEG, RawSource(SOURCE_TYPE_CH, 14).toValue(), -105); + + // redraw switches tab + updateSwitchesTab(); + } + + //MultiCopter + if(idx==j++) { + if (md->destCh) + clearMixes(); + md=setDest(1); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 3); md->weight=50; md->swtch=RawSwitch(); //CH1 AIL + md=setDest(2); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 1); md->weight=-50; md->swtch=RawSwitch(); //CH2 ELE + md=setDest(3); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 2); md->weight=100; md->swtch=RawSwitch(); //CH3 THR + md=setDest(4); md->srcRaw=RawSource(SOURCE_TYPE_STICK, 0); md->weight=100; md->swtch=RawSwitch(); //CH4 RUD + } +} + +MixData* Templates::setDest(uint8_t dch) +{ + uint8_t i = 0; + while ((g_model.mixData[i].destCh<=dch) && (g_model.mixData[i].destCh) && (igetCapability(Mixes))) i++; + if(i==GetEepromInterface()->getCapability(Mixes)) return &g_model.mixData[0]; + + memmove(&g_model.mixData[i+1],&g_model.mixData[i], + (GetEepromInterface()->getCapability(Mixes)-(i+1))*sizeof(MixData) ); + memset(&g_model.mixData[i],0,sizeof(MixData)); + g_model.mixData[i].destCh = dch; + return &g_model.mixData[i]; +} diff --git a/companion/src/modeledit/templates.h b/companion/src/modeledit/templates.h new file mode 100644 index 000000000..2f485f41e --- /dev/null +++ b/companion/src/modeledit/templates.h @@ -0,0 +1,23 @@ +#ifndef TEMPLATES_H +#define TEMPLATES_H + +#include +#include "eeprominterface.h" + +class Templates : public QWidget +{ + Q_OBJECT + + public: + Templates(QWidget *parent, ModelData & model); + ~Templates(); + + private slots: + void onDoubleClicked(QModelIndex index); + + private: + void applyNumericTemplate(uint64_t tpl); + ModelData & model; +}; + +#endif // TEMPLATES_H diff --git a/companion/src/modelslist.cpp b/companion/src/modelslist.cpp index e63959491..088945f12 100644 --- a/companion/src/modelslist.cpp +++ b/companion/src/modelslist.cpp @@ -41,6 +41,7 @@ #include "modelslist.h" #include "mdichild.h" +#include "helpers.h" class DragDropHeader { public: @@ -51,7 +52,7 @@ public: } bool general_settings; uint8_t models_count; - uint8_t models[C9XMAX_MODELS]; + uint8_t models[C9X_MAX_MODELS]; }; ModelsListWidget::ModelsListWidget(QWidget *parent): @@ -81,24 +82,24 @@ void ModelsListWidget::ShowContextMenu(const QPoint& pos) const QClipboard *clipboard = QApplication::clipboard(); const QMimeData *mimeData = clipboard->mimeData(); - bool hasData = mimeData->hasFormat("application/x-companion9x"); + bool hasData = mimeData->hasFormat("application/x-companion"); QMenu contextMenu; - contextMenu.addAction(QIcon(":/images/edit.png"), tr("&Edit"),this,SLOT(OpenEditWindow())); - contextMenu.addAction(QIcon(":/images/open.png"), tr("&Restore from backup"),this,SLOT(LoadBackup())); - contextMenu.addAction(QIcon(":/images/wizard.png"), tr("&Model Wizard"),this,SLOT(OpenWizard())); + contextMenu.addAction(CompanionIcon("edit.png"), tr("&Edit"),this,SLOT(OpenEditWindow())); + contextMenu.addAction(CompanionIcon("open.png"), tr("&Restore from backup"),this,SLOT(LoadBackup())); + contextMenu.addAction(CompanionIcon("wizard.png"), tr("&Model Wizard"),this,SLOT(OpenWizard())); contextMenu.addSeparator(); - contextMenu.addAction(QIcon(":/images/clear.png"), tr("&Delete"),this,SLOT(confirmDelete()),tr("Delete")); - contextMenu.addAction(QIcon(":/images/copy.png"), tr("&Copy"),this,SLOT(copy()),tr("Ctrl+C")); - contextMenu.addAction(QIcon(":/images/cut.png"), tr("&Cut"),this,SLOT(cut()),tr("Ctrl+X")); - contextMenu.addAction(QIcon(":/images/paste.png"), tr("&Paste"),this,SLOT(paste()),tr("Ctrl+V"))->setEnabled(hasData); - contextMenu.addAction(QIcon(":/images/duplicate.png"), tr("D&uplicate"),this,SLOT(duplicate()),tr("Ctrl+U")); + contextMenu.addAction(CompanionIcon("clear.png"), tr("&Delete"),this,SLOT(confirmDelete()),tr("Delete")); + contextMenu.addAction(CompanionIcon("copy.png"), tr("&Copy"),this,SLOT(copy()),tr("Ctrl+C")); + contextMenu.addAction(CompanionIcon("cut.png"), tr("&Cut"),this,SLOT(cut()),tr("Ctrl+X")); + contextMenu.addAction(CompanionIcon("paste.png"), tr("&Paste"),this,SLOT(paste()),tr("Ctrl+V"))->setEnabled(hasData); + contextMenu.addAction(CompanionIcon("duplicate.png"), tr("D&uplicate"),this,SLOT(duplicate()),tr("Ctrl+U")); contextMenu.addSeparator(); - contextMenu.addAction(QIcon(":/images/currentmodel.png"), tr("&Use as default"),this,SLOT(setdefault())); + contextMenu.addAction(CompanionIcon("currentmodel.png"), tr("&Use as default"),this,SLOT(setdefault())); contextMenu.addSeparator(); - contextMenu.addAction(QIcon(":/images/print.png"), tr("P&rint model"),this, SLOT(print()),tr("Alt+R")); + contextMenu.addAction(CompanionIcon("print.png"), tr("P&rint model"),this, SLOT(print()),tr("Alt+R")); contextMenu.addSeparator(); - contextMenu.addAction(QIcon(":/images/simulate.png"), tr("&Simulate model"),this, SLOT(simulate()),tr("Alt+S")); + contextMenu.addAction(CompanionIcon("simulate.png"), tr("&Simulate model"),this, SLOT(simulate()),tr("Alt+S")); contextMenu.exec(globalPos); } @@ -161,7 +162,7 @@ void ModelsListWidget::mouseMoveEvent(QMouseEvent *event) doCopy(&gmData); QMimeData *mimeData = new QMimeData; - mimeData->setData("application/x-companion9x", gmData); + mimeData->setData("application/x-companion", gmData); drag->setMimeData(mimeData); @@ -189,7 +190,7 @@ void ModelsListWidget::restoreSelection() void ModelsListWidget::dragEnterEvent(QDragEnterEvent *event) { - if (event->mimeData()->hasFormat("application/x-companion9x")) + if (event->mimeData()->hasFormat("application/x-companion")) { event->acceptProposedAction(); saveSelection(); @@ -205,9 +206,9 @@ void ModelsListWidget::dragMoveEvent(QDragMoveEvent *event) { int row=this->indexAt(event->pos()).row(); const QMimeData *mimeData = event->mimeData(); - if (mimeData->hasFormat("application/x-companion9x")) + if (mimeData->hasFormat("application/x-companion")) { - QByteArray gmData = mimeData->data("application/x-companion9x"); + QByteArray gmData = mimeData->data("application/x-companion"); event->acceptProposedAction(); clearSelection(); DragDropHeader *header = (DragDropHeader *)gmData.data(); @@ -226,11 +227,11 @@ void ModelsListWidget::dropEvent(QDropEvent *event) if (row < 0) return; - // QMessageBox::warning(this, tr("companion9x"),tr("Index :%1").arg(row)); + // QMessageBox::warning(this, tr("Companion"),tr("Index :%1").arg(row)); const QMimeData *mimeData = event->mimeData(); - if(mimeData->hasFormat("application/x-companion9x")) + if(mimeData->hasFormat("application/x-companion")) { - QByteArray gmData = mimeData->data("application/x-companion9x"); + QByteArray gmData = mimeData->data("application/x-companion"); if (event->source() && event->dropAction() == Qt::MoveAction) ((ModelsListWidget*)event->source())->doCut(&gmData); doPaste(&gmData, row); @@ -360,9 +361,9 @@ void ModelsListWidget::deleteSelected(bool ask=true) } if (isModel==true) { if (radioData->generalSettings.currModel != selModel) { - ret = QMessageBox::warning(this, "companion9x", tr("Delete Selected Models?"), QMessageBox::Yes | QMessageBox::No); + ret = QMessageBox::warning(this, "Companion", tr("Delete Selected Models?"), QMessageBox::Yes | QMessageBox::No); } else { - ret = QMessageBox::warning(this, "companion9x", tr("Cannot delete default model."), QMessageBox::Ok); + ret = QMessageBox::warning(this, "Companion", tr("Cannot delete default model."), QMessageBox::Ok); } } } @@ -373,9 +374,9 @@ void ModelsListWidget::deleteSelected(bool ask=true) ((MdiChild *)parent())->setModified(); } else if (index.row()>0) { if (ask) { - ret = QMessageBox::warning(this, "companion9x", tr("Cannot delete default model."), QMessageBox::Ok); + ret = QMessageBox::warning(this, "Companion", tr("Cannot delete default model."), QMessageBox::Ok); } else { - ret = QMessageBox::warning(this, "companion9x", tr("Cannot cut default model."), QMessageBox::Ok); + ret = QMessageBox::warning(this, "Companion", tr("Cannot cut default model."), QMessageBox::Ok); } } } @@ -425,7 +426,7 @@ void ModelsListWidget::copy() doCopy(&gmData); QMimeData *mimeData = new QMimeData; - mimeData->setData("application/x-companion9x", gmData); + mimeData->setData("application/x-companion", gmData); QClipboard *clipboard = QApplication::clipboard(); clipboard->setMimeData(mimeData,QClipboard::Clipboard); @@ -433,7 +434,7 @@ void ModelsListWidget::copy() void ModelsListWidget::doPaste(QByteArray *gmData, int index) { - //QByteArray gmData = mimeD->data("application/x-companion9x"); + //QByteArray gmData = mimeD->data("application/x-companion"); char *gData = gmData->data()+sizeof(DragDropHeader);//new char[gmData.size() + 1]; int i = sizeof(DragDropHeader); int id = index; @@ -445,7 +446,7 @@ void ModelsListWidget::doPaste(QByteArray *gmData, int index) i++; gData++; if(c=='G') { //General settings - ret = QMessageBox::question(this, "companion9x", tr("Do you want to overwrite TX general settings?"), + ret = QMessageBox::question(this, "Companion", tr("Do you want to overwrite TX general settings?"), QMessageBox::Yes | QMessageBox::No); if (ret == QMessageBox::Yes) { radioData->generalSettings = *((GeneralSettings *)gData); @@ -456,7 +457,7 @@ void ModelsListWidget::doPaste(QByteArray *gmData, int index) } else { //model data if (!radioData->models[id-1].isempty()) { - ret = QMessageBox::question(this, "companion9x", tr("You are pasting on an not empty model, are you sure?"), + ret = QMessageBox::question(this, "Companion", tr("You are pasting on an not empty model, are you sure?"), QMessageBox::Yes | QMessageBox::No); if (ret == QMessageBox::Yes) { radioData->models[id-1] = *((ModelData *)gData); @@ -490,7 +491,7 @@ bool ModelsListWidget::hasPasteData() const QClipboard *clipboard = QApplication::clipboard(); const QMimeData *mimeData = clipboard->mimeData(); - return mimeData->hasFormat("application/x-companion9x"); + return mimeData->hasFormat("application/x-companion"); } void ModelsListWidget::paste() @@ -499,7 +500,7 @@ void ModelsListWidget::paste() const QClipboard *clipboard = QApplication::clipboard(); const QMimeData *mimeData = clipboard->mimeData(); - QByteArray gmData = mimeData->data("application/x-companion9x"); + QByteArray gmData = mimeData->data("application/x-companion"); doPaste(&gmData,this->currentRow()); } } @@ -519,7 +520,7 @@ void ModelsListWidget::duplicate() i++; } if (i==GetEepromInterface()->getMaxModels()) { - QMessageBox::warning(this, "companion9x", tr("No free slot available, cannot duplicate"), QMessageBox::Ok); + QMessageBox::warning(this, "Companion", tr("No free slot available, cannot duplicate"), QMessageBox::Ok); } } } diff --git a/companion/src/modelslist.h b/companion/src/modelslist.h index 02e1f6f73..8d6e73e83 100644 --- a/companion/src/modelslist.h +++ b/companion/src/modelslist.h @@ -48,7 +48,7 @@ struct CurrentSelection { QListWidgetItem *current_item; - bool selected[C9XMAX_MODELS+1]; + bool selected[C9X_MAX_MODELS+1]; }; class ModelsListWidget : public QListWidget diff --git a/companion/src/preferencesdialog.cpp b/companion/src/preferencesdialog.cpp index 6afa8ee9a..a8c50452c 100644 --- a/companion/src/preferencesdialog.cpp +++ b/companion/src/preferencesdialog.cpp @@ -17,7 +17,9 @@ preferencesDialog::preferencesDialog(QWidget *parent) : updateLock(false) { ui->setupUi(this); - + setWindowIcon(CompanionIcon("preferences.png")); + ui->splashLibraryButton->setIcon(CompanionIcon("library.png")); + ui->clearImageButton->setIcon(CompanionIcon("clear.png")); QCheckBox * OptionCheckBox[]= { ui->optionCheckBox_1, ui->optionCheckBox_2, ui->optionCheckBox_3, ui->optionCheckBox_4, ui->optionCheckBox_5, ui->optionCheckBox_6, ui->optionCheckBox_7, @@ -225,7 +227,7 @@ void preferencesDialog::firmwareChanged() ui->CPU_ID_LE->hide(); ui->CPU_ID_LABEL->hide(); } - QSettings settings("companion9x", "companion9x"); + QSettings settings; settings.beginGroup("FwRevisions"); int fwrev = settings.value(variant.id, -1).toInt(); settings.endGroup(); @@ -239,11 +241,11 @@ void preferencesDialog::firmwareChanged() } else { if (ui->fw_dnld->isEnabled()) { - ui->FwInfo->setText(tr("The selected firmware has never been downloaded by companion9x.")); + ui->FwInfo->setText(tr("The selected firmware has never been downloaded by Companion.")); ui->checkFWUpdates->hide(); } else { - ui->FwInfo->setText(tr("The selected firmware cannot be downloaded by companion9x.")); + ui->FwInfo->setText(tr("The selected firmware cannot be downloaded by Companion.")); ui->checkFWUpdates->hide(); } } @@ -251,7 +253,7 @@ void preferencesDialog::firmwareChanged() void preferencesDialog::writeValues() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; if (ui->locale_QB->currentIndex() > 0) settings.setValue("locale", ui->locale_QB->itemData(ui->locale_QB->currentIndex())); else @@ -260,11 +262,13 @@ void preferencesDialog::writeValues() settings.setValue("default_channel_order", ui->channelorderCB->currentIndex()); settings.setValue("default_mode", ui->stickmodeCB->currentIndex()); settings.setValue("cpu_id", ui->CPU_ID_LE->text()); - settings.setValue("startup_check_companion9x", ui->startupCheck_companion9x->isChecked()); + settings.setValue("startup_check_companion", ui->startupCheck_companion9x->isChecked()); settings.setValue("startup_check_fw", ui->startupCheck_fw->isChecked()); settings.setValue("rename_firmware_files", ui->renameFirmware->isChecked()); settings.setValue("wizardEnable", ui->wizardEnable_ChkB->isChecked()); settings.setValue("show_splash", ui->showSplash->isChecked()); + settings.setValue("theme", ui->theme_CB->currentIndex()); + settings.setValue("icon_size", ui->iconSize_CB->currentIndex()); settings.setValue("simuSW", ui->simuSW->isChecked()); settings.setValue("history_size", ui->historySize->value()); settings.setValue("burnFirmware", ui->burnFirmware->isChecked()); @@ -382,7 +386,7 @@ void preferencesDialog::populateFirmwareOptions(const FirmwareInfo * firmware) void preferencesDialog::initSettings() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; int i = ui->locale_QB->findData(settings.value("locale")); if (i < 0) i = 0; ui->locale_QB->setCurrentIndex(i); @@ -400,10 +404,12 @@ void preferencesDialog::initSettings() } ui->channelorderCB->setCurrentIndex(settings.value("default_channel_order", 0).toInt()); ui->stickmodeCB->setCurrentIndex(settings.value("default_mode", 1).toInt()); - ui->startupCheck_companion9x->setChecked(settings.value("startup_check_companion9x", true).toBool()); + ui->startupCheck_companion9x->setChecked(settings.value("startup_check_companion", true).toBool()); ui->renameFirmware->setChecked(settings.value("rename_firmware_files", false).toBool()); ui->wizardEnable_ChkB->setChecked(settings.value("wizardEnable", true).toBool()); ui->showSplash->setChecked(settings.value("show_splash", true).toBool()); + ui->theme_CB->setCurrentIndex(settings.value("theme", 1).toInt()); + ui->iconSize_CB->setCurrentIndex(settings.value("icon_size", 2).toInt()); ui->historySize->setValue(settings.value("history_size", 10).toInt()); ui->backLightColor->setCurrentIndex(settings.value("backLight", 0).toInt()); ui->startupCheck_fw->setChecked(settings.value("startup_check_fw", true).toBool()); @@ -506,10 +512,10 @@ void preferencesDialog::populateLocale() if (!strl.count()) return; QDir directory = QDir(":/"); - QStringList files = directory.entryList(QStringList("companion9x_*.qm"), QDir::Files | QDir::NoSymLinks); + QStringList files = directory.entryList(QStringList("companion_*.qm"), QDir::Files | QDir::NoSymLinks); foreach(QString file, files) { - QLocale loc(file.mid(12, 2)); + QLocale loc(file.mid(10, 2)); ui->locale_QB->addItem(QLocale::languageToString(loc.language()), loc.name()); } } @@ -521,7 +527,7 @@ void preferencesDialog::on_fw_dnld_clicked() writeValues(); if (!variant.firmware->getUrl(variant.id).isNull()) { if (ui->burnFirmware->isChecked()) { - QSettings settings("companion9x", "companion9x"); + QSettings settings; current_firmware_variant = getFirmwareVariant(); settings.setValue("firmware", current_firmware_variant.id); } @@ -542,7 +548,7 @@ void preferencesDialog::on_voice_dnld_clicked() void preferencesDialog::on_libraryPathButton_clicked() { ui->ProfSave_PB->setEnabled(true); - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString fileName = QFileDialog::getExistingDirectory(this,tr("Select your library folder"), settings.value("libraryPath").toString()); if (!fileName.isEmpty()) { settings.setValue("libraryPath", fileName); @@ -552,7 +558,7 @@ void preferencesDialog::on_libraryPathButton_clicked() void preferencesDialog::on_snapshotPathButton_clicked() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString fileName = QFileDialog::getExistingDirectory(this,tr("Select your snapshot folder"), settings.value("snapshotPath").toString()); if (!fileName.isEmpty()) { settings.setValue("snapshotpath", fileName); @@ -563,7 +569,7 @@ void preferencesDialog::on_snapshotPathButton_clicked() void preferencesDialog::on_snapshotClipboardCKB_clicked() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; if (ui->snapshotClipboardCKB->isChecked()) { ui->snapshotPath->setDisabled(true); ui->snapshotPathButton->setDisabled(true); @@ -579,7 +585,7 @@ void preferencesDialog::on_snapshotClipboardCKB_clicked() void preferencesDialog::on_backupPathButton_clicked() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString fileName = QFileDialog::getExistingDirectory(this,tr("Select your Models and Settings backup folder"), settings.value("backupPath").toString()); if (!fileName.isEmpty()) { settings.setValue("backupPath", fileName); @@ -590,7 +596,7 @@ void preferencesDialog::on_backupPathButton_clicked() void preferencesDialog::on_ge_pathButton_clicked() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString fileName = QFileDialog::getOpenFileName(this, tr("Select Google Earth executable"),ui->ge_lineedit->text()); if (!fileName.isEmpty()) { ui->ge_lineedit->setText(fileName); @@ -616,7 +622,7 @@ void preferencesDialog::on_splashLibraryButton_clicked() void preferencesDialog::on_sdPathButton_clicked() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString fileName = QFileDialog::getExistingDirectory(this,tr("Select the folder replicating your SD structure"), settings.value("sdPath").toString()); if (!fileName.isEmpty()) { ui->sdPath->setText(fileName); @@ -626,7 +632,7 @@ void preferencesDialog::on_sdPathButton_clicked() void preferencesDialog::on_ProfSlot_SB_valueChanged() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; settings.beginGroup("Profiles"); QString profile=QString("profile%1").arg(ui->ProfSlot_SB->value()); settings.beginGroup(profile); @@ -655,12 +661,12 @@ void preferencesDialog::on_ProfSlot_SB_valueChanged() void preferencesDialog::on_ProfSave_PB_clicked() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; settings.beginGroup("Profiles"); QString profile=QString("profile%1").arg(ui->ProfSlot_SB->value()); QString name=ui->ProfName_LE->text(); if (name.isEmpty()) { - int ret = QMessageBox::question(this, "companion9x", + int ret = QMessageBox::question(this, "Companion", tr("Profile name is empty, profile slot %1 will be deleted.
Are you sure ?").arg(ui->ProfSlot_SB->value()) , QMessageBox::Yes | QMessageBox::No); if (ret==QMessageBox::Yes) { @@ -694,7 +700,7 @@ void preferencesDialog::on_ProfSave_PB_clicked() void preferencesDialog::on_export_PB_clicked() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString profile=QString("profile%1").arg(ui->ProfSlot_SB->value()); QString name=ui->ProfName_LE->text(); if (!name.isEmpty()) { @@ -715,11 +721,11 @@ void preferencesDialog::on_export_PB_clicked() void preferencesDialog::on_import_PB_clicked() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString profile=QString("profile%1").arg(ui->ProfSlot_SB->value()); QString name=ui->ProfName_LE->text(); if (!name.isEmpty()) { - int ret = QMessageBox::question(this, "companion9x", + int ret = QMessageBox::question(this, "Companion", tr("Profile slot is not empty, profile slot %1 will we overwritten.
Are you sure ?").arg(ui->ProfSlot_SB->value()) , QMessageBox::Yes | QMessageBox::No); if (ret==QMessageBox::No) { @@ -748,7 +754,7 @@ void preferencesDialog::on_SplashSelect_clicked() supportedImageFormats += QLatin1String(" *.") + QImageReader::supportedImageFormats()[formatIndex]; } - QSettings settings("companion9x", "companion9x"); + QSettings settings; QString fileName = QFileDialog::getOpenFileName(this, tr("Open Image to load"), settings.value("lastImagesDir").toString(), tr("Images (%1)").arg(supportedImageFormats)); @@ -825,7 +831,7 @@ void preferencesDialog::on_joystickChkB_clicked() { } void preferencesDialog::on_joystickcalButton_clicked() { - //QSettings settings("companion9x", "companion9x"); + //QSettings settings; //settings.setValue("joystick-name",ui->joystickCB->currentText()); joystickDialog * jd=new joystickDialog(this, ui->joystickCB->currentIndex()); jd->exec(); @@ -837,7 +843,7 @@ void preferencesDialog::on_checkFWUpdates_clicked() { FirmwareVariant variant = getFirmwareVariant(); if (ui->burnFirmware->isChecked()) { - QSettings settings("companion9x", "companion9x"); + QSettings settings; current_firmware_variant = variant; settings.setValue("firmware", variant.id); } diff --git a/companion/src/preferencesdialog.ui b/companion/src/preferencesdialog.ui index b52060211..31acbd438 100644 --- a/companion/src/preferencesdialog.ui +++ b/companion/src/preferencesdialog.ui @@ -7,7 +7,7 @@ 0 0 685 - 710 + 838 @@ -25,10 +25,6 @@ Preferences - - - :/images/preferences.png:/images/preferences.png - QLayout::SetMinimumSize @@ -39,7 +35,32 @@ 4 - + + + + + + true + + + + + + + Open Folder + + + + + + + auto backup before write + + + + + + @@ -48,18 +69,96 @@ - Show Splash Screen + Show Splash At Start - + + + + + + Enable + + + + + + + + 0 + 0 + + + + + + + + Calibrate + + + + + + + + + Automatic Backup Folder + + + + + + + + + + 40 + 0 + + + + 15 + + + 10 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Ask use of wizard for new models + + + true + + + + + + Qt::Horizontal - + @@ -75,41 +174,7 @@ - - - - - - Check for updates on startup - - - true - - - - - - - Check for selected Fw updates - - - true - - - - - - - - - Ask use of wizard for new models - - - true - - - - + @@ -160,25 +225,18 @@ ... - - - :/images/clear.png:/images/clear.png - - - - - + Remember switches in simulator - + @@ -207,7 +265,7 @@ - + 6 @@ -227,10 +285,6 @@ ... - - - :/images/library.png:/images/library.png - @@ -248,33 +302,27 @@
- - + + - - - - true + Simulator capture folder - - + + - - 40 + + 0 0 - - 15 - - - 10 + + Language (requires restart) - + @@ -418,7 +466,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -431,35 +479,7 @@ This is used by the templated to determine which channel goes to what number out - - - - - - Enable - - - - - - - - 0 - 0 - - - - - - - - Calibrate - - - - - - + 1 @@ -483,7 +503,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -507,7 +527,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -520,7 +540,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -563,7 +583,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -590,7 +610,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -638,20 +658,7 @@ This is used by the templated to determine which channel goes to what number out - - - - - 0 - 0 - - - - Language (requires restart) - - - - + 1 @@ -682,7 +689,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -695,7 +702,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -711,7 +718,7 @@ This is used by the templated to determine which channel goes to what number out - + Mode selection: @@ -759,95 +766,14 @@ Mode 4: - - - - - 0 - 0 - - - - Joystick - - - - - - - - 0 - 0 - - - - - Include companion splashes - - - - - Only user defined splashes - - - - - - - - - 0 - 0 - - - - Splash library behaviour - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - + Profile slot - - - - Automatic Backup Folder - - - - - - - - - true - - - - - - - Open Folder - - - - - - - auto backup before write - - - - - - + Qt::Vertical @@ -863,7 +789,7 @@ Mode 4: - + @@ -890,7 +816,7 @@ Mode 4: - + QLayout::SetMaximumSize @@ -981,7 +907,7 @@ May be different from firmware language - + @@ -1021,13 +947,6 @@ May be different from firmware language - - - - Simulator capture folder - - - @@ -1041,14 +960,14 @@ May be different from firmware language - + Qt::Horizontal - + QLayout::SetMaximumSize @@ -1601,7 +1520,217 @@ May be different from firmware language - + + + + + 0 + 0 + + + + Splash library behaviour + + + + + + + + 0 + 0 + + + + + Include companion splashes + + + + + Only user defined splashes + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + Theme + + + + + + + Requires restart + + + + Classic + + + + + Monochrome + + + + + MonoWhite + + + + + MonoBlue + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 20 + + + + + + + + + + + Icon size + + + + + + + Requires restart + + + + Small + + + + + Normal + + + + + Big + + + + + Huge + + + + + + + + + + + + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Check for updates on startup + + + true + + + + + + + Check for selected Fw updates + + + true + + + + + + + + + + 0 + 0 + + + + Joystick + + + + + + + Google Earth Executable + + + + @@ -1619,17 +1748,9 @@ May be different from firmware language - - - - Google Earth Executable - - - - locale_QB InvertPixels clearImageButton SplashFileName @@ -1649,7 +1770,7 @@ May be different from firmware language buttonBox - + diff --git a/companion/src/printdialog.cpp b/companion/src/printdialog.cpp index 6a287179e..45d149c97 100644 --- a/companion/src/printdialog.cpp +++ b/companion/src/printdialog.cpp @@ -157,7 +157,7 @@ QString printDialog::printPhases() if ((GetCurrentFirmwareVariant() & GVARS_VARIANT ) || (!GetEepromInterface()->getCapability(HasVariants) && GetEepromInterface()->getCapability(Gvars))) { if (GetEepromInterface()->getCapability(GvarsFlightPhases)) { gvars=1; - gvarnum=GetEepromInterface()->getCapability(GvarsNum); + gvarnum=GetEepromInterface()->getCapability(Gvars); } } @@ -176,7 +176,7 @@ QString printDialog::printPhases() str.append("
"+tr("Switch")+"
"+tr("Flight mode name")); str.append(""+tr("IN")+""+tr("OUT")+"%1%1"); if(lastCHN!=ed->chn) { lastCHN=ed->chn; - str.append(""+getStickStr(ed->chn)+""); + str.append(""+getInputStr(*g_model, ed->chn)+""); } else str.append(" "); @@ -261,23 +261,8 @@ void printDialog::printExpo() }; str += tr("Weight") + QString("%1").arg(getGVarString(ed->weight,true)).rightJustified(6, ' '); - if (!GetEepromInterface()->getCapability(ExpoIsCurve)) { - if (ed->expo!=0) { - if (ed->expo<126) { - str += " " + tr("Expo") + QString("%1").arg(getGVarString(ed->expo)).rightJustified(7, ' '); - } else { - str += " " + tr("Expo") + QString("%1").arg(getGVarString(ed->expo)).rightJustified(7, ' '); - } - } - } else { - if (ed->curveMode==0 && ed->curveParam!=0) { - if (ed->curveParam<126) { - str += " " + tr("Expo") + QString("%1").arg(getGVarString(ed->curveParam)).rightJustified(7, ' '); - } else { - str += " " + tr("Expo") + QString("%1").arg(getGVarString(ed->curveParam)).rightJustified(7, ' '); - } - } - } + str += ed->curve.toString().replace("<", "<").replace(">", ">"); + if (GetEepromInterface()->getCapability(FlightPhases)) { if(ed->phases) { if (ed->phases!=(unsigned int)(1<getCapability(FlightPhases))-1) { @@ -316,9 +301,7 @@ void printDialog::printExpo() } if (ed->swtch.type) str += " " + tr("Switch") + QString("(%1)").arg(ed->swtch.toString()); - if (ed->curveMode) - if (ed->curveParam) - str += " " + tr("Curve") + QString("(%1)").arg(getCurveStr(ed->curveParam).replace("<", "<").replace(">", ">")); + str += ed->curve.toString().replace("<", "<").replace(">", ">"); if (GetEepromInterface()->getCapability(HasExpoNames)) { QString ExpoName; ExpoName.append(ed->name); @@ -370,13 +353,8 @@ void printDialog::printMixes() str += md->srcRaw.toString(); if (md->swtch.type) str += " " + tr("Switch") + QString("(%1)").arg(md->swtch.toString()); if (md->carryTrim) str += " " + tr("noTrim"); - if(GetEepromInterface()->getCapability(MixFmTrim) && md->enableFmTrim==1){ - if (md->sOffset) str += " "+ tr("FMTrim") + QString(" %1").arg(getGVarString(md->sOffset)); - } else { - if (md->sOffset) str += " "+ tr("Offset") + QString(" %1").arg(getGVarString(md->sOffset)); - } - if (md->differential) str += " "+ tr("Diff") + QString(" %1").arg(getGVarString(md->differential)); - if (md->curve) str += " " + tr("Curve") + QString("(%1)").arg(getCurveStr(md->curve).replace("<", "<").replace(">", ">")); + if (md->sOffset) str += " "+ tr("Offset") + QString(" %1").arg(getGVarString(md->sOffset)); + str += md->curve.toString().replace("<", "<").replace(">", ">"); float scale=GetEepromInterface()->getCapability(SlowScale); if (md->delayDown || md->delayUp) str += tr(" Delay(u%1:d%2)").arg(md->delayUp/scale).arg(md->delayDown/scale); if (md->speedDown || md->speedUp) str += tr(" Slow(u%1:d%2)").arg(md->speedUp/scale).arg(md->speedDown/scale); @@ -566,101 +544,7 @@ void printDialog::printCurves() if (numcurves==0) { numcurves=16; } - if (!GetEepromInterface()->getCapability(CustomCurves)) { - QImage qi(ISIZE+1,ISIZE+1,QImage::Format_RGB32); - QPainter painter(&qi); - painter.setBrush(QBrush("#FFFFFF")); - painter.setPen(QColor(0,0,0)); - painter.drawRect(0,0,ISIZE,ISIZE); - str.append("
"+tr("5 Points Curves")+QString("
").arg(curvefile5)); - str.append(""); - str.append(doTC(" ")); - for(i=0; i<5; i++) - str.append(doTC(tr("pt %1").arg(i+1), "", true)); - str.append(""); - for(i=0; i<8; i++) { - pen.setColor(*qplot_color[i]); - painter.setPen(pen); - qplot_color[i]->getRgb(&r,&g,&b); - c=r; - c*=256; - c+=g; - c*=256; - c+=b; - sprintf(buffer,"%06x",c); - str.append(""); - str.append(QString("").arg(i+1)); - count=0; - for(int j=0; j<5; j++) { - if (g_model->curves[i].points[j].y!=0) - count++; - } - for(int j=0; j<5; j++) { - str.append(doTR(QString::number(g_model->curves[i].points[j].y),"green")); - if (j>0 && count!=0) { - painter.drawLine(ISIZE*(j-1)/4,ISIZE/2-(ISIZE*g_model->curves[i].points[j-1].y)/200,ISIZE*(j)/4,ISIZE/2-(ISIZE*g_model->curves[i].points[j].y)/200); - } - } - str.append(""); - } - str.append("
").arg(buffer)+tr("Curve")+QString(" %1
"); - painter.setPen(QColor(0,0,0)); - painter.drawLine(0,ISIZE/2,ISIZE,ISIZE/2); - painter.drawLine(ISIZE/2,0,ISIZE/2,ISIZE); - for(i=0; i<5; i++) { - painter.drawLine(ISIZE/2-2,(ISIZE*i)/4,ISIZE/2+2,(ISIZE*i)/4); - painter.drawLine((ISIZE*i)/4,ISIZE/2-2,(ISIZE*i)/4,ISIZE/2+2); - } - - qi.save(curvefile5, "png",100); - str.append("
"+tr("9 Points Curves")+QString("
").arg(curvefile9)); - str.append(""); - for(i=0; i<9; i++) str.append(doTC(tr("pt %1").arg(i+1), "", true)); - str.append(""); - - painter.setBrush(QBrush("#FFFFFF")); - painter.setPen(QColor(0,0,0)); - painter.drawRect(0,0,ISIZE,ISIZE); - for(i=0; i<9; i++) { - painter.drawLine(ISIZE/2-2,(ISIZE*i)/8,ISIZE/2+2,(ISIZE*i)/8); - painter.drawLine((ISIZE*i)/8,ISIZE/2-2,(ISIZE*i)/8,ISIZE/2+2); - } - for(i=0; i<8; i++) { - pen.setColor(*qplot_color[i]); - painter.setPen(pen); - qplot_color[i]->getRgb(&r,&g,&b); - c=r; - c*=256; - c+=g; - c*=256; - c+=b; - sprintf(buffer,"%06x",c); - str.append(""); - str.append(QString("").arg(i+9)); - count=0; - for(int j=0; j<9; j++) { - if (g_model->curves[i].points[j].y!=0) - count++; - } - for(int j=0; j<9; j++) { - str.append(doTR(QString::number(g_model->curves[i].points[j].y),"green")); - if (j>0 && count!=0) { - painter.drawLine(ISIZE*(j-1)/8,ISIZE/2-(ISIZE*g_model->curves[i+8].points[j-1].y)/200,ISIZE*(j)/8,ISIZE/2-(ISIZE*g_model->curves[i+8].points[j].y)/200); - } - } - str.append(""); - } - str.append("
 
").arg(buffer)+tr("Curve")+QString(" %1
"); - str.append("
"); - painter.setPen(QColor(0,0,0)); - painter.drawLine(0,ISIZE/2,ISIZE,ISIZE/2); - painter.drawLine(ISIZE/2,0,ISIZE/2,ISIZE); - for(i=0; i<9; i++) { - painter.drawLine(ISIZE/2-2,(ISIZE*i)/8,ISIZE/2+2,(ISIZE*i)/8); - painter.drawLine((ISIZE*i)/8,ISIZE/2-2,(ISIZE*i)/8,ISIZE/2+2); - } - qi.save(curvefile9, "png",100); - } else { + { QImage qi(ISIZEW+1,ISIZEW+1,QImage::Format_RGB32); QPainter painter(&qi); painter.setBrush(QBrush("#FFFFFF")); @@ -703,11 +587,10 @@ void printDialog::printCurves() sprintf(buffer,"%06x",c); str.append(""); int curvepoints=g_model->curves[i].count; - if (!g_model->curves[i].custom) { - str.append(QString("").arg(buffer)+tr("Curve")+QString(" %1Y").arg(i+1)); - } else { + if (g_model->curves[i].type == CurveData::CURVE_TYPE_CUSTOM) str.append(QString("").arg(buffer)+tr("Curve")+QString(" %1Y").arg(i+1)); - } + else + str.append(QString("").arg(buffer)+tr("Curve")+QString(" %1Y").arg(i+1)); count=0; for(int j=0; jcurves[i].points[j].y!=0) @@ -716,18 +599,17 @@ void printDialog::printCurves() for(int j=0; jcurves[i].points[j].y),"green")); if (j>0 && count!=0) { - if (!g_model->curves[i].custom) { - painter.drawLine(ISIZEW*(j-1)/(curvepoints-1),ISIZEW/2-(ISIZEW*g_model->curves[i].points[j-1].y)/200,ISIZEW*(j)/(curvepoints-1),ISIZEW/2-(ISIZEW*g_model->curves[i].points[j].y)/200); - } else { + if (g_model->curves[i].type == CurveData::CURVE_TYPE_CUSTOM) painter.drawLine(ISIZEW/2+(ISIZEW*g_model->curves[i].points[j-1].x)/200,ISIZEW/2-(ISIZEW*g_model->curves[i].points[j-1].y)/200,ISIZEW/2+(ISIZEW*g_model->curves[i].points[j].x)/200,ISIZEW/2-(ISIZEW*g_model->curves[i].points[j].y)/200); - } + else + painter.drawLine(ISIZEW*(j-1)/(curvepoints-1),ISIZEW/2-(ISIZEW*g_model->curves[i].points[j-1].y)/200,ISIZEW*(j)/(curvepoints-1),ISIZEW/2-(ISIZEW*g_model->curves[i].points[j].y)/200); } } for(int j=curvepoints; j"); - if (g_model->curves[i].custom) { + if (g_model->curves[i].type == CurveData::CURVE_TYPE_CUSTOM) { str.append("X"); for(int j=0; jcurves[i].points[j].x),"green")); @@ -758,16 +640,16 @@ void printDialog::printSwitches() { int sc=0; QString str = ""; - str.append(""); + str.append(""); str.append("

"+tr("Custom Switches")+"

"+tr("Logical Switches")+"

"); for (int i=0; igetCapability(CustomSwitches); i++) { if (g_model->customSw[i].func) { str.append(""); if (i<9) { - str.append("").arg(i+1)); + str.append("").arg(i+1)); } else { - str.append(""); + str.append(""); } QString tstr = getCustomSwitchStr(&g_model->customSw[i], *g_model); str.append(doTC(tstr,"green")); @@ -787,7 +669,7 @@ void printDialog::printGvars() int gvarnum=0; if ((GetCurrentFirmwareVariant() & GVARS_VARIANT ) || (!GetEepromInterface()->getCapability(HasVariants) && GetEepromInterface()->getCapability(Gvars))) { gvars=1; - gvarnum=GetEepromInterface()->getCapability(GvarsNum); + gvarnum=GetEepromInterface()->getCapability(Gvars); } if (!GetEepromInterface()->getCapability(GvarsFlightPhases) && (gvars==1 && GetEepromInterface()->getCapability(Gvars))) { QString str = "
"+tr("CS")+QString("%1"+tr("LS")+QString("%1"+tr("CS")+('A'+(i-9))+""+tr("LS")+('A'+(i-9))+"
"; @@ -842,9 +724,8 @@ void printDialog::printFSwitches() { int sc=0; QString str = "
"; - str.append(""); + str.append(""); str.append(""); + // TODO str.append(""); } str.append("

"+tr("Function Switches")+"

"+tr("Switch Assignments")+"

"); - str.append(""); str.append(doTC(tr("Switch"), "", true)); str.append(doTL(tr("Function"), "", true)); str.append(doTL(tr("Parameter"), "", true)); @@ -854,7 +735,6 @@ void printDialog::printFSwitches() for(int i=0; igetCapability(CustomFunctions); i++) { if (g_model->funcSw[i].swtch.type!=SWITCH_TYPE_NONE) { str.append(""); - str.append(doTC(tr("CF")+QString("%1").arg(i+1),"",true)); str.append(doTC(g_model->funcSw[i].swtch.toString(),"green")); str.append(doTC(getFuncName(g_model->funcSw[i].func),"green")); str.append(doTC(FuncParam(g_model->funcSw[i].func,g_model->funcSw[i].param,g_model->funcSw[i].paramarm, g_model->funcSw[i].adjustMode),"green")); @@ -916,7 +796,7 @@ void printDialog::printFrSky() str.append(""); str.append(""); str.append("
 
"+tr("System of units")+""+getFrSkyMeasure(fd->imperial)+"
"+tr("Propeller blades")+""+getFrSkyBlades(fd->blades)+"
"); - +#if 0 if (GetEepromInterface()->getCapability(TelemetryBars) || (GetEepromInterface()->getCapability(TelemetryCSFields))) { int cols=GetEepromInterface()->getCapability(TelemetryColsCSFields); if (cols==0) cols=2; @@ -954,12 +834,13 @@ void printDialog::printFrSky() for (int i=0; i<4; i++) { if (fd->screens[j].body.bars[i].source!=0) tc++; - str.append("
"+QString::number(i+1,10)+""+getFrSkySrc(fd->screens[j].body.bars[i].source)+""+(fd->screens[j].body.bars[i].source>0 ? QString::number(getBarValue(fd->screens[j].body.bars[i].source, fd->screens[j].body.bars[i].barMin,fd)):"----")+""+(fd->screens[j].body.bars[i].source>0 ? QString::number(getBarValue(fd->screens[j].body.bars[i].source,(255-fd->screens[j].body.bars[i].barMax),fd)) :"----")+"
"+QString::number(i+1,10)+""+getFrSkySrc(fd->screens[j].body.bars[i].source)+""+(fd->screens[j].body.bars[i].source>0 ? QString::number(getBarValue(fd->screens[j].body.bars[i].source, fd->screens[j].body.bars[i].barMin,fd)):"----")+""+(fd->screens[j].body.bars[i].source>0 ? QString::number(getBarValue(fd->screens[j].body.bars[i].source,(255-fd->screens[j].body.bars[i].barMax),fd)) :"----")+"
"); } } } +#endif if (tc>0) te->append(str); } diff --git a/companion/src/printdialog.ui b/companion/src/printdialog.ui index 3cff71f1b..169c33103 100644 --- a/companion/src/printdialog.ui +++ b/companion/src/printdialog.ui @@ -26,8 +26,8 @@ Dialog - - :/images/print.png:/images/print.png + + :/icon.png:/icon.png @@ -78,7 +78,7 @@ - + diff --git a/companion/src/simulatordialog.cpp b/companion/src/simulatordialog.cpp index b55a4db82..1bbddf4ef 100644 --- a/companion/src/simulatordialog.cpp +++ b/companion/src/simulatordialog.cpp @@ -32,7 +32,7 @@ simulatorDialog::simulatorDialog(QWidget *parent) : beepVal = 0; beepShow = 0; - QSettings settings("companion9x", "companion9x"); + QSettings settings; backLight = settings.value("backLight",0).toInt(); bool simuSW=settings.value("simuSW",false).toBool(); switch (backLight) { @@ -211,7 +211,7 @@ void simulatorDialog::setupTimer() void simulatorDialog::onButtonPressed(int value) { if (value==Qt::Key_Print) { - QSettings settings("companion9x", "companion9x"); + QSettings settings; bool toclipboard=settings.value("snapshot_to_clipboard", false).toBool(); QString fileName =""; if (!toclipboard) { @@ -227,7 +227,7 @@ void simulatorDialog::onTimerEvent() { static unsigned int lcd_counter = 0; if (!simulator->timer10ms()) { - QMessageBox::critical(this, "companion9x", QString(tr("Firmware %1 error: %2")).arg(txInterface->getName()).arg(simulator->getError())); + QMessageBox::critical(this, "Companion", QString(tr("Firmware %1 error: %2")).arg(txInterface->getName()).arg(simulator->getError())); timer->stop(); return; } diff --git a/companion/src/simulatordialog.h b/companion/src/simulatordialog.h index b50629a7a..65edcb9e5 100644 --- a/companion/src/simulatordialog.h +++ b/companion/src/simulatordialog.h @@ -2,7 +2,7 @@ #define SIMULATORDIALOG_H #include -#include "node.h" +#include "modeledit/node.h" #include "eeprominterface.h" #ifdef JOYSTICKS #include "joystick.h" diff --git a/companion/src/simulatordialog.ui b/companion/src/simulatordialog.ui index 2c9b67de3..de9a3a43a 100644 --- a/companion/src/simulatordialog.ui +++ b/companion/src/simulatordialog.ui @@ -23,11 +23,11 @@ - Companion9x Simulator + Companion Simulator - - :/images/simulate.png:/images/simulate.png + + :/icon.png:/icon.png @@ -3708,7 +3708,7 @@ border-radius: 4px; - + diff --git a/companion/src/splashlibrary.cpp b/companion/src/splashlibrary.cpp index 0c2b431b6..49aef10e4 100644 --- a/companion/src/splashlibrary.cpp +++ b/companion/src/splashlibrary.cpp @@ -9,6 +9,8 @@ splashLibrary::splashLibrary(QWidget *parent, QString * fileName) : QDialog(parent), ui(new Ui::splashLibrary) { splashFileName = fileName; ui->setupUi(this); + ui->nextPage->setIcon(CompanionIcon("arrow-right.png")); + ui->prevPage->setIcon(CompanionIcon("arrow-left.png")); page = 0; getFileList(); if (imageList.size() > 20) { @@ -59,7 +61,7 @@ void splashLibrary::setupPage(int page) { } void splashLibrary::getFileList() { - QSettings settings("companion9x", "companion9x"); + QSettings settings; imageList.clear(); if (settings.value("embedded_splashes", 0).toInt() == 0) { QDir myRes(":/images/library"); @@ -144,4 +146,4 @@ void splashLibrary::on_prevPage_clicked() { ui->nextPage->setEnabled(true); } setupPage(page); -} \ No newline at end of file +} diff --git a/companion/src/splashlibrary.ui b/companion/src/splashlibrary.ui index e5e8c5de6..9507a2d08 100644 --- a/companion/src/splashlibrary.ui +++ b/companion/src/splashlibrary.ui @@ -25,6 +25,10 @@ + + + :/icon.png:/icon.png + @@ -46,10 +50,6 @@ ... - - - :/images/arrow-left.png:/images/arrow-left.png - 50 @@ -945,10 +945,6 @@ ... - - - :/images/arrow-right.png:/images/arrow-right.png - 50 @@ -967,7 +963,7 @@ - + diff --git a/companion/src/themes/classic/16/add.png b/companion/src/themes/classic/16/add.png new file mode 100644 index 000000000..7976174fd Binary files /dev/null and b/companion/src/themes/classic/16/add.png differ diff --git a/companion/src/themes/classic/16/arrow-left.png b/companion/src/themes/classic/16/arrow-left.png new file mode 100644 index 000000000..a1b3d0964 Binary files /dev/null and b/companion/src/themes/classic/16/arrow-left.png differ diff --git a/companion/src/themes/classic/16/arrow-right.png b/companion/src/themes/classic/16/arrow-right.png new file mode 100644 index 000000000..1311fb52f Binary files /dev/null and b/companion/src/themes/classic/16/arrow-right.png differ diff --git a/companion/src/themes/classic/16/changelog.png b/companion/src/themes/classic/16/changelog.png new file mode 100644 index 000000000..9e4e6ae57 Binary files /dev/null and b/companion/src/themes/classic/16/changelog.png differ diff --git a/companion/src/themes/classic/16/clear.png b/companion/src/themes/classic/16/clear.png new file mode 100644 index 000000000..12c465218 Binary files /dev/null and b/companion/src/themes/classic/16/clear.png differ diff --git a/companion/src/themes/classic/16/compare.png b/companion/src/themes/classic/16/compare.png new file mode 100644 index 000000000..eda5f13b9 Binary files /dev/null and b/companion/src/themes/classic/16/compare.png differ diff --git a/companion/src/themes/classic/16/configure.png b/companion/src/themes/classic/16/configure.png new file mode 100644 index 000000000..a627160f9 Binary files /dev/null and b/companion/src/themes/classic/16/configure.png differ diff --git a/companion/src/themes/classic/16/contributors.png b/companion/src/themes/classic/16/contributors.png new file mode 100644 index 000000000..439d2bcb8 Binary files /dev/null and b/companion/src/themes/classic/16/contributors.png differ diff --git a/companion/src/themes/classic/16/copy.png b/companion/src/themes/classic/16/copy.png new file mode 100644 index 000000000..0d016ee10 Binary files /dev/null and b/companion/src/themes/classic/16/copy.png differ diff --git a/companion/src/themes/classic/16/currentmodel.png b/companion/src/themes/classic/16/currentmodel.png new file mode 100644 index 000000000..691f8f92d Binary files /dev/null and b/companion/src/themes/classic/16/currentmodel.png differ diff --git a/companion/src/themes/classic/16/cut.png b/companion/src/themes/classic/16/cut.png new file mode 100644 index 000000000..600e320c6 Binary files /dev/null and b/companion/src/themes/classic/16/cut.png differ diff --git a/companion/src/themes/classic/16/duplicate.png b/companion/src/themes/classic/16/duplicate.png new file mode 100644 index 000000000..90c7319e5 Binary files /dev/null and b/companion/src/themes/classic/16/duplicate.png differ diff --git a/companion/src/themes/classic/16/edit.png b/companion/src/themes/classic/16/edit.png new file mode 100644 index 000000000..5358d50bb Binary files /dev/null and b/companion/src/themes/classic/16/edit.png differ diff --git a/companion/src/themes/classic/16/exit.png b/companion/src/themes/classic/16/exit.png new file mode 100644 index 000000000..c188d80d8 Binary files /dev/null and b/companion/src/themes/classic/16/exit.png differ diff --git a/companion/src/themes/classic/16/fuses.png b/companion/src/themes/classic/16/fuses.png new file mode 100644 index 000000000..512a067ed Binary files /dev/null and b/companion/src/themes/classic/16/fuses.png differ diff --git a/companion/src/themes/classic/16/information.png b/companion/src/themes/classic/16/information.png new file mode 100644 index 000000000..aca1565dd Binary files /dev/null and b/companion/src/themes/classic/16/information.png differ diff --git a/companion/src/themes/classic/16/library.png b/companion/src/themes/classic/16/library.png new file mode 100644 index 000000000..2a4df7457 Binary files /dev/null and b/companion/src/themes/classic/16/library.png differ diff --git a/companion/src/themes/classic/16/list.png b/companion/src/themes/classic/16/list.png new file mode 100644 index 000000000..6bac38a45 Binary files /dev/null and b/companion/src/themes/classic/16/list.png differ diff --git a/companion/src/themes/classic/16/logs.png b/companion/src/themes/classic/16/logs.png new file mode 100644 index 000000000..880923fb6 Binary files /dev/null and b/companion/src/themes/classic/16/logs.png differ diff --git a/companion/src/themes/classic/16/movedown.png b/companion/src/themes/classic/16/movedown.png new file mode 100644 index 000000000..f609f5581 Binary files /dev/null and b/companion/src/themes/classic/16/movedown.png differ diff --git a/companion/src/themes/classic/16/moveup.png b/companion/src/themes/classic/16/moveup.png new file mode 100644 index 000000000..f44bf8b64 Binary files /dev/null and b/companion/src/themes/classic/16/moveup.png differ diff --git a/companion/src/themes/classic/16/new.png b/companion/src/themes/classic/16/new.png new file mode 100644 index 000000000..b40281b64 Binary files /dev/null and b/companion/src/themes/classic/16/new.png differ diff --git a/companion/src/themes/classic/16/open.png b/companion/src/themes/classic/16/open.png new file mode 100644 index 000000000..48509ab56 Binary files /dev/null and b/companion/src/themes/classic/16/open.png differ diff --git a/companion/src/themes/classic/16/paintbrush.png b/companion/src/themes/classic/16/paintbrush.png new file mode 100644 index 000000000..fc99fd5f2 Binary files /dev/null and b/companion/src/themes/classic/16/paintbrush.png differ diff --git a/companion/src/themes/classic/16/paste.png b/companion/src/themes/classic/16/paste.png new file mode 100644 index 000000000..7f1b0a7a8 Binary files /dev/null and b/companion/src/themes/classic/16/paste.png differ diff --git a/companion/src/themes/classic/16/play.png b/companion/src/themes/classic/16/play.png new file mode 100644 index 000000000..d4720f2d8 Binary files /dev/null and b/companion/src/themes/classic/16/play.png differ diff --git a/companion/src/themes/classic/16/preferences.png b/companion/src/themes/classic/16/preferences.png new file mode 100644 index 000000000..dae98ee8a Binary files /dev/null and b/companion/src/themes/classic/16/preferences.png differ diff --git a/companion/src/themes/classic/16/print.png b/companion/src/themes/classic/16/print.png new file mode 100644 index 000000000..9f1d39eee Binary files /dev/null and b/companion/src/themes/classic/16/print.png differ diff --git a/companion/src/themes/classic/16/profiles.png b/companion/src/themes/classic/16/profiles.png new file mode 100644 index 000000000..8343cc5c1 Binary files /dev/null and b/companion/src/themes/classic/16/profiles.png differ diff --git a/companion/src/themes/classic/16/read_eeprom.png b/companion/src/themes/classic/16/read_eeprom.png new file mode 100644 index 000000000..c9ef59ca4 Binary files /dev/null and b/companion/src/themes/classic/16/read_eeprom.png differ diff --git a/companion/src/themes/classic/16/read_eeprom_file.png b/companion/src/themes/classic/16/read_eeprom_file.png new file mode 100644 index 000000000..7617c17ba Binary files /dev/null and b/companion/src/themes/classic/16/read_eeprom_file.png differ diff --git a/companion/src/themes/classic/16/read_flash.png b/companion/src/themes/classic/16/read_flash.png new file mode 100644 index 000000000..3591516de Binary files /dev/null and b/companion/src/themes/classic/16/read_flash.png differ diff --git a/companion/src/themes/classic/16/recentdocument.png b/companion/src/themes/classic/16/recentdocument.png new file mode 100644 index 000000000..965e45f2d Binary files /dev/null and b/companion/src/themes/classic/16/recentdocument.png differ diff --git a/companion/src/themes/classic/16/save.png b/companion/src/themes/classic/16/save.png new file mode 100644 index 000000000..fbcbc53a4 Binary files /dev/null and b/companion/src/themes/classic/16/save.png differ diff --git a/companion/src/themes/classic/16/saveas.png b/companion/src/themes/classic/16/saveas.png new file mode 100644 index 000000000..2e4ba2b82 Binary files /dev/null and b/companion/src/themes/classic/16/saveas.png differ diff --git a/companion/src/themes/classic/16/simulate.png b/companion/src/themes/classic/16/simulate.png new file mode 100644 index 000000000..94a8a4003 Binary files /dev/null and b/companion/src/themes/classic/16/simulate.png differ diff --git a/companion/src/themes/classic/16/stop.png b/companion/src/themes/classic/16/stop.png new file mode 100644 index 000000000..f2bb8792b Binary files /dev/null and b/companion/src/themes/classic/16/stop.png differ diff --git a/companion/src/themes/classic/16/update.png b/companion/src/themes/classic/16/update.png new file mode 100644 index 000000000..0af079b3f Binary files /dev/null and b/companion/src/themes/classic/16/update.png differ diff --git a/companion/src/themes/classic/16/wizard.png b/companion/src/themes/classic/16/wizard.png new file mode 100644 index 000000000..6bb4d070b Binary files /dev/null and b/companion/src/themes/classic/16/wizard.png differ diff --git a/companion/src/themes/classic/16/write_eeprom.png b/companion/src/themes/classic/16/write_eeprom.png new file mode 100644 index 000000000..3dd15566a Binary files /dev/null and b/companion/src/themes/classic/16/write_eeprom.png differ diff --git a/companion/src/themes/classic/16/write_eeprom_file.png b/companion/src/themes/classic/16/write_eeprom_file.png new file mode 100644 index 000000000..efbce2843 Binary files /dev/null and b/companion/src/themes/classic/16/write_eeprom_file.png differ diff --git a/companion/src/themes/classic/16/write_flash.png b/companion/src/themes/classic/16/write_flash.png new file mode 100644 index 000000000..c82b8c9e8 Binary files /dev/null and b/companion/src/themes/classic/16/write_flash.png differ diff --git a/companion/src/themes/classic/24/add.png b/companion/src/themes/classic/24/add.png new file mode 100644 index 000000000..073c0b2f1 Binary files /dev/null and b/companion/src/themes/classic/24/add.png differ diff --git a/companion/src/themes/classic/24/arrow-left.png b/companion/src/themes/classic/24/arrow-left.png new file mode 100644 index 000000000..9ad670cce Binary files /dev/null and b/companion/src/themes/classic/24/arrow-left.png differ diff --git a/companion/src/themes/classic/24/arrow-right.png b/companion/src/themes/classic/24/arrow-right.png new file mode 100644 index 000000000..084d6597c Binary files /dev/null and b/companion/src/themes/classic/24/arrow-right.png differ diff --git a/companion/src/themes/classic/24/changelog.png b/companion/src/themes/classic/24/changelog.png new file mode 100644 index 000000000..7f26eafcc Binary files /dev/null and b/companion/src/themes/classic/24/changelog.png differ diff --git a/companion/src/themes/classic/24/clear.png b/companion/src/themes/classic/24/clear.png new file mode 100644 index 000000000..5a2f16f23 Binary files /dev/null and b/companion/src/themes/classic/24/clear.png differ diff --git a/companion/src/themes/classic/24/compare.png b/companion/src/themes/classic/24/compare.png new file mode 100644 index 000000000..2d9e035d8 Binary files /dev/null and b/companion/src/themes/classic/24/compare.png differ diff --git a/companion/src/themes/classic/24/configure.png b/companion/src/themes/classic/24/configure.png new file mode 100644 index 000000000..f3972b18f Binary files /dev/null and b/companion/src/themes/classic/24/configure.png differ diff --git a/companion/src/themes/classic/24/contributors.png b/companion/src/themes/classic/24/contributors.png new file mode 100644 index 000000000..c35d8737e Binary files /dev/null and b/companion/src/themes/classic/24/contributors.png differ diff --git a/companion/src/themes/classic/24/copy.png b/companion/src/themes/classic/24/copy.png new file mode 100644 index 000000000..714a0d590 Binary files /dev/null and b/companion/src/themes/classic/24/copy.png differ diff --git a/companion/src/themes/classic/24/currentmodel.png b/companion/src/themes/classic/24/currentmodel.png new file mode 100644 index 000000000..192a227fe Binary files /dev/null and b/companion/src/themes/classic/24/currentmodel.png differ diff --git a/companion/src/themes/classic/24/cut.png b/companion/src/themes/classic/24/cut.png new file mode 100644 index 000000000..33b947198 Binary files /dev/null and b/companion/src/themes/classic/24/cut.png differ diff --git a/companion/src/themes/classic/24/duplicate.png b/companion/src/themes/classic/24/duplicate.png new file mode 100644 index 000000000..8ff23def9 Binary files /dev/null and b/companion/src/themes/classic/24/duplicate.png differ diff --git a/companion/src/themes/classic/24/edit.png b/companion/src/themes/classic/24/edit.png new file mode 100644 index 000000000..259e39bd3 Binary files /dev/null and b/companion/src/themes/classic/24/edit.png differ diff --git a/companion/src/themes/classic/24/exit.png b/companion/src/themes/classic/24/exit.png new file mode 100644 index 000000000..ba91c7bfc Binary files /dev/null and b/companion/src/themes/classic/24/exit.png differ diff --git a/companion/src/themes/classic/24/fuses.png b/companion/src/themes/classic/24/fuses.png new file mode 100644 index 000000000..38ce749a1 Binary files /dev/null and b/companion/src/themes/classic/24/fuses.png differ diff --git a/companion/src/themes/classic/24/information.png b/companion/src/themes/classic/24/information.png new file mode 100644 index 000000000..ccf17132b Binary files /dev/null and b/companion/src/themes/classic/24/information.png differ diff --git a/companion/src/themes/classic/24/library.png b/companion/src/themes/classic/24/library.png new file mode 100644 index 000000000..97e9bf596 Binary files /dev/null and b/companion/src/themes/classic/24/library.png differ diff --git a/companion/src/themes/classic/24/list.png b/companion/src/themes/classic/24/list.png new file mode 100644 index 000000000..5eeb66474 Binary files /dev/null and b/companion/src/themes/classic/24/list.png differ diff --git a/companion/src/themes/classic/24/logs.png b/companion/src/themes/classic/24/logs.png new file mode 100644 index 000000000..a9c247b27 Binary files /dev/null and b/companion/src/themes/classic/24/logs.png differ diff --git a/companion/src/themes/classic/24/movedown.png b/companion/src/themes/classic/24/movedown.png new file mode 100644 index 000000000..47f210256 Binary files /dev/null and b/companion/src/themes/classic/24/movedown.png differ diff --git a/companion/src/themes/classic/24/moveup.png b/companion/src/themes/classic/24/moveup.png new file mode 100644 index 000000000..1bf02bdff Binary files /dev/null and b/companion/src/themes/classic/24/moveup.png differ diff --git a/companion/src/themes/classic/24/new.png b/companion/src/themes/classic/24/new.png new file mode 100644 index 000000000..0181a1ca2 Binary files /dev/null and b/companion/src/themes/classic/24/new.png differ diff --git a/companion/src/themes/classic/24/open.png b/companion/src/themes/classic/24/open.png new file mode 100644 index 000000000..45e64135a Binary files /dev/null and b/companion/src/themes/classic/24/open.png differ diff --git a/companion/src/themes/classic/24/paintbrush.png b/companion/src/themes/classic/24/paintbrush.png new file mode 100644 index 000000000..de9e1806f Binary files /dev/null and b/companion/src/themes/classic/24/paintbrush.png differ diff --git a/companion/src/themes/classic/24/paste.png b/companion/src/themes/classic/24/paste.png new file mode 100644 index 000000000..2a762fbfb Binary files /dev/null and b/companion/src/themes/classic/24/paste.png differ diff --git a/companion/src/themes/classic/24/play.png b/companion/src/themes/classic/24/play.png new file mode 100644 index 000000000..7e1b547d9 Binary files /dev/null and b/companion/src/themes/classic/24/play.png differ diff --git a/companion/src/themes/classic/24/preferences.png b/companion/src/themes/classic/24/preferences.png new file mode 100644 index 000000000..ebca2028c Binary files /dev/null and b/companion/src/themes/classic/24/preferences.png differ diff --git a/companion/src/themes/classic/24/print.png b/companion/src/themes/classic/24/print.png new file mode 100644 index 000000000..edb7bcfb1 Binary files /dev/null and b/companion/src/themes/classic/24/print.png differ diff --git a/companion/src/themes/classic/24/profiles.png b/companion/src/themes/classic/24/profiles.png new file mode 100644 index 000000000..394e8079f Binary files /dev/null and b/companion/src/themes/classic/24/profiles.png differ diff --git a/companion/src/themes/classic/24/read_eeprom.png b/companion/src/themes/classic/24/read_eeprom.png new file mode 100644 index 000000000..9a0bbd6b7 Binary files /dev/null and b/companion/src/themes/classic/24/read_eeprom.png differ diff --git a/companion/src/themes/classic/24/read_eeprom_file.png b/companion/src/themes/classic/24/read_eeprom_file.png new file mode 100644 index 000000000..9f557a3c7 Binary files /dev/null and b/companion/src/themes/classic/24/read_eeprom_file.png differ diff --git a/companion/src/themes/classic/24/read_flash.png b/companion/src/themes/classic/24/read_flash.png new file mode 100644 index 000000000..ed77ff739 Binary files /dev/null and b/companion/src/themes/classic/24/read_flash.png differ diff --git a/companion/src/themes/classic/24/recentdocument.png b/companion/src/themes/classic/24/recentdocument.png new file mode 100644 index 000000000..1e3d9266b Binary files /dev/null and b/companion/src/themes/classic/24/recentdocument.png differ diff --git a/companion/src/themes/classic/24/save.png b/companion/src/themes/classic/24/save.png new file mode 100644 index 000000000..bec9b6c13 Binary files /dev/null and b/companion/src/themes/classic/24/save.png differ diff --git a/companion/src/themes/classic/24/saveas.png b/companion/src/themes/classic/24/saveas.png new file mode 100644 index 000000000..83df4c639 Binary files /dev/null and b/companion/src/themes/classic/24/saveas.png differ diff --git a/companion/src/themes/classic/24/simulate.png b/companion/src/themes/classic/24/simulate.png new file mode 100644 index 000000000..8bc4db398 Binary files /dev/null and b/companion/src/themes/classic/24/simulate.png differ diff --git a/companion/src/themes/classic/24/stop.png b/companion/src/themes/classic/24/stop.png new file mode 100644 index 000000000..00f4ab1c1 Binary files /dev/null and b/companion/src/themes/classic/24/stop.png differ diff --git a/companion/src/themes/classic/24/update.png b/companion/src/themes/classic/24/update.png new file mode 100644 index 000000000..f50b423b9 Binary files /dev/null and b/companion/src/themes/classic/24/update.png differ diff --git a/companion/src/themes/classic/24/wizard.png b/companion/src/themes/classic/24/wizard.png new file mode 100644 index 000000000..63879342f Binary files /dev/null and b/companion/src/themes/classic/24/wizard.png differ diff --git a/companion/src/themes/classic/24/write_eeprom.png b/companion/src/themes/classic/24/write_eeprom.png new file mode 100644 index 000000000..8591f6f70 Binary files /dev/null and b/companion/src/themes/classic/24/write_eeprom.png differ diff --git a/companion/src/themes/classic/24/write_eeprom_file.png b/companion/src/themes/classic/24/write_eeprom_file.png new file mode 100644 index 000000000..a3cd7898c Binary files /dev/null and b/companion/src/themes/classic/24/write_eeprom_file.png differ diff --git a/companion/src/themes/classic/24/write_flash.png b/companion/src/themes/classic/24/write_flash.png new file mode 100644 index 000000000..8ef65965f Binary files /dev/null and b/companion/src/themes/classic/24/write_flash.png differ diff --git a/companion/src/themes/classic/32/add.png b/companion/src/themes/classic/32/add.png new file mode 100644 index 000000000..9b1e2ebf3 Binary files /dev/null and b/companion/src/themes/classic/32/add.png differ diff --git a/companion/src/themes/classic/32/arrow-left.png b/companion/src/themes/classic/32/arrow-left.png new file mode 100644 index 000000000..94f5afcb4 Binary files /dev/null and b/companion/src/themes/classic/32/arrow-left.png differ diff --git a/companion/src/themes/classic/32/arrow-right.png b/companion/src/themes/classic/32/arrow-right.png new file mode 100644 index 000000000..5b26520c7 Binary files /dev/null and b/companion/src/themes/classic/32/arrow-right.png differ diff --git a/companion/src/themes/classic/32/changelog.png b/companion/src/themes/classic/32/changelog.png new file mode 100644 index 000000000..952a231dd Binary files /dev/null and b/companion/src/themes/classic/32/changelog.png differ diff --git a/companion/src/themes/classic/32/clear.png b/companion/src/themes/classic/32/clear.png new file mode 100644 index 000000000..e1d481f35 Binary files /dev/null and b/companion/src/themes/classic/32/clear.png differ diff --git a/companion/src/themes/classic/32/compare.png b/companion/src/themes/classic/32/compare.png new file mode 100644 index 000000000..4cf84e940 Binary files /dev/null and b/companion/src/themes/classic/32/compare.png differ diff --git a/companion/src/themes/classic/32/configure.png b/companion/src/themes/classic/32/configure.png new file mode 100644 index 000000000..9fd4c2cd9 Binary files /dev/null and b/companion/src/themes/classic/32/configure.png differ diff --git a/companion/src/themes/classic/32/contributors.png b/companion/src/themes/classic/32/contributors.png new file mode 100644 index 000000000..d90cc70de Binary files /dev/null and b/companion/src/themes/classic/32/contributors.png differ diff --git a/companion/src/themes/classic/32/copy.png b/companion/src/themes/classic/32/copy.png new file mode 100644 index 000000000..a24bb4b1d Binary files /dev/null and b/companion/src/themes/classic/32/copy.png differ diff --git a/companion/src/themes/classic/32/currentmodel.png b/companion/src/themes/classic/32/currentmodel.png new file mode 100644 index 000000000..6fde618ef Binary files /dev/null and b/companion/src/themes/classic/32/currentmodel.png differ diff --git a/companion/src/themes/classic/32/cut.png b/companion/src/themes/classic/32/cut.png new file mode 100644 index 000000000..d68161089 Binary files /dev/null and b/companion/src/themes/classic/32/cut.png differ diff --git a/companion/src/themes/classic/32/duplicate.png b/companion/src/themes/classic/32/duplicate.png new file mode 100644 index 000000000..a6c66b117 Binary files /dev/null and b/companion/src/themes/classic/32/duplicate.png differ diff --git a/companion/src/themes/classic/32/edit.png b/companion/src/themes/classic/32/edit.png new file mode 100644 index 000000000..a00693407 Binary files /dev/null and b/companion/src/themes/classic/32/edit.png differ diff --git a/companion/src/themes/classic/32/exit.png b/companion/src/themes/classic/32/exit.png new file mode 100644 index 000000000..7eb24a666 Binary files /dev/null and b/companion/src/themes/classic/32/exit.png differ diff --git a/companion/src/themes/classic/32/fuses.png b/companion/src/themes/classic/32/fuses.png new file mode 100644 index 000000000..c0bb8bf4c Binary files /dev/null and b/companion/src/themes/classic/32/fuses.png differ diff --git a/companion/src/themes/classic/32/information.png b/companion/src/themes/classic/32/information.png new file mode 100644 index 000000000..47fa8f3fe Binary files /dev/null and b/companion/src/themes/classic/32/information.png differ diff --git a/companion/src/themes/classic/32/library.png b/companion/src/themes/classic/32/library.png new file mode 100644 index 000000000..763983830 Binary files /dev/null and b/companion/src/themes/classic/32/library.png differ diff --git a/companion/src/themes/classic/32/list.png b/companion/src/themes/classic/32/list.png new file mode 100644 index 000000000..3b6f45e45 Binary files /dev/null and b/companion/src/themes/classic/32/list.png differ diff --git a/companion/src/themes/classic/32/logs.png b/companion/src/themes/classic/32/logs.png new file mode 100644 index 000000000..11af72b25 Binary files /dev/null and b/companion/src/themes/classic/32/logs.png differ diff --git a/companion/src/themes/classic/32/movedown.png b/companion/src/themes/classic/32/movedown.png new file mode 100644 index 000000000..8d2671cc1 Binary files /dev/null and b/companion/src/themes/classic/32/movedown.png differ diff --git a/companion/src/themes/classic/32/moveup.png b/companion/src/themes/classic/32/moveup.png new file mode 100644 index 000000000..7d52059e2 Binary files /dev/null and b/companion/src/themes/classic/32/moveup.png differ diff --git a/companion/src/themes/classic/32/new.png b/companion/src/themes/classic/32/new.png new file mode 100644 index 000000000..3c79b7994 Binary files /dev/null and b/companion/src/themes/classic/32/new.png differ diff --git a/companion/src/themes/classic/32/open.png b/companion/src/themes/classic/32/open.png new file mode 100644 index 000000000..516ad06c0 Binary files /dev/null and b/companion/src/themes/classic/32/open.png differ diff --git a/companion/src/themes/classic/32/paintbrush.png b/companion/src/themes/classic/32/paintbrush.png new file mode 100644 index 000000000..33d2249c0 Binary files /dev/null and b/companion/src/themes/classic/32/paintbrush.png differ diff --git a/companion/src/themes/classic/32/paste.png b/companion/src/themes/classic/32/paste.png new file mode 100644 index 000000000..17c82102a Binary files /dev/null and b/companion/src/themes/classic/32/paste.png differ diff --git a/companion/src/themes/classic/32/play.png b/companion/src/themes/classic/32/play.png new file mode 100644 index 000000000..d47a3040e Binary files /dev/null and b/companion/src/themes/classic/32/play.png differ diff --git a/companion/src/themes/classic/32/preferences.png b/companion/src/themes/classic/32/preferences.png new file mode 100644 index 000000000..a9cee976b Binary files /dev/null and b/companion/src/themes/classic/32/preferences.png differ diff --git a/companion/src/themes/classic/32/print.png b/companion/src/themes/classic/32/print.png new file mode 100644 index 000000000..6c27107b5 Binary files /dev/null and b/companion/src/themes/classic/32/print.png differ diff --git a/companion/src/themes/classic/32/profiles.png b/companion/src/themes/classic/32/profiles.png new file mode 100644 index 000000000..03fab9601 Binary files /dev/null and b/companion/src/themes/classic/32/profiles.png differ diff --git a/companion/src/themes/classic/32/read_eeprom.png b/companion/src/themes/classic/32/read_eeprom.png new file mode 100644 index 000000000..9e1aa0e2a Binary files /dev/null and b/companion/src/themes/classic/32/read_eeprom.png differ diff --git a/companion/src/themes/classic/32/read_eeprom_file.png b/companion/src/themes/classic/32/read_eeprom_file.png new file mode 100644 index 000000000..6c6997046 Binary files /dev/null and b/companion/src/themes/classic/32/read_eeprom_file.png differ diff --git a/companion/src/themes/classic/32/read_flash.png b/companion/src/themes/classic/32/read_flash.png new file mode 100644 index 000000000..2ebd0f34b Binary files /dev/null and b/companion/src/themes/classic/32/read_flash.png differ diff --git a/companion/src/themes/classic/32/recentdocument.png b/companion/src/themes/classic/32/recentdocument.png new file mode 100644 index 000000000..e4bdc52da Binary files /dev/null and b/companion/src/themes/classic/32/recentdocument.png differ diff --git a/companion/src/themes/classic/32/save.png b/companion/src/themes/classic/32/save.png new file mode 100644 index 000000000..380fb7264 Binary files /dev/null and b/companion/src/themes/classic/32/save.png differ diff --git a/companion/src/themes/classic/32/saveas.png b/companion/src/themes/classic/32/saveas.png new file mode 100644 index 000000000..e2af8d1fa Binary files /dev/null and b/companion/src/themes/classic/32/saveas.png differ diff --git a/companion/src/themes/classic/32/simulate.png b/companion/src/themes/classic/32/simulate.png new file mode 100644 index 000000000..c67e7cb99 Binary files /dev/null and b/companion/src/themes/classic/32/simulate.png differ diff --git a/companion/src/themes/classic/32/stop.png b/companion/src/themes/classic/32/stop.png new file mode 100644 index 000000000..a0338d139 Binary files /dev/null and b/companion/src/themes/classic/32/stop.png differ diff --git a/companion/src/themes/classic/32/update.png b/companion/src/themes/classic/32/update.png new file mode 100644 index 000000000..9f57be2d7 Binary files /dev/null and b/companion/src/themes/classic/32/update.png differ diff --git a/companion/src/themes/classic/32/wizard.png b/companion/src/themes/classic/32/wizard.png new file mode 100644 index 000000000..ff5161498 Binary files /dev/null and b/companion/src/themes/classic/32/wizard.png differ diff --git a/companion/src/themes/classic/32/write_eeprom.png b/companion/src/themes/classic/32/write_eeprom.png new file mode 100644 index 000000000..005766b0b Binary files /dev/null and b/companion/src/themes/classic/32/write_eeprom.png differ diff --git a/companion/src/themes/classic/32/write_eeprom_file.png b/companion/src/themes/classic/32/write_eeprom_file.png new file mode 100644 index 000000000..1ead1095b Binary files /dev/null and b/companion/src/themes/classic/32/write_eeprom_file.png differ diff --git a/companion/src/themes/classic/32/write_flash.png b/companion/src/themes/classic/32/write_flash.png new file mode 100644 index 000000000..231b72041 Binary files /dev/null and b/companion/src/themes/classic/32/write_flash.png differ diff --git a/companion/src/themes/classic/48/add.png b/companion/src/themes/classic/48/add.png new file mode 100644 index 000000000..fe8a28097 Binary files /dev/null and b/companion/src/themes/classic/48/add.png differ diff --git a/companion/src/themes/classic/48/arrow-left.png b/companion/src/themes/classic/48/arrow-left.png new file mode 100644 index 000000000..f6bb5eb08 Binary files /dev/null and b/companion/src/themes/classic/48/arrow-left.png differ diff --git a/companion/src/themes/classic/48/arrow-right.png b/companion/src/themes/classic/48/arrow-right.png new file mode 100644 index 000000000..25dfe0dab Binary files /dev/null and b/companion/src/themes/classic/48/arrow-right.png differ diff --git a/companion/src/themes/classic/48/changelog.png b/companion/src/themes/classic/48/changelog.png new file mode 100644 index 000000000..bf3ed7459 Binary files /dev/null and b/companion/src/themes/classic/48/changelog.png differ diff --git a/companion/src/themes/classic/48/clear.png b/companion/src/themes/classic/48/clear.png new file mode 100644 index 000000000..4cc914074 Binary files /dev/null and b/companion/src/themes/classic/48/clear.png differ diff --git a/companion/src/themes/classic/48/compare.png b/companion/src/themes/classic/48/compare.png new file mode 100644 index 000000000..499c40192 Binary files /dev/null and b/companion/src/themes/classic/48/compare.png differ diff --git a/companion/src/themes/classic/48/configure.png b/companion/src/themes/classic/48/configure.png new file mode 100644 index 000000000..9b0506ed5 Binary files /dev/null and b/companion/src/themes/classic/48/configure.png differ diff --git a/companion/src/themes/classic/48/contributors.png b/companion/src/themes/classic/48/contributors.png new file mode 100644 index 000000000..98bc58202 Binary files /dev/null and b/companion/src/themes/classic/48/contributors.png differ diff --git a/companion/src/themes/classic/48/copy.png b/companion/src/themes/classic/48/copy.png new file mode 100644 index 000000000..9bc5c654c Binary files /dev/null and b/companion/src/themes/classic/48/copy.png differ diff --git a/companion/src/themes/classic/48/currentmodel.png b/companion/src/themes/classic/48/currentmodel.png new file mode 100644 index 000000000..860941f75 Binary files /dev/null and b/companion/src/themes/classic/48/currentmodel.png differ diff --git a/companion/src/themes/classic/48/cut.png b/companion/src/themes/classic/48/cut.png new file mode 100644 index 000000000..45d111adf Binary files /dev/null and b/companion/src/themes/classic/48/cut.png differ diff --git a/companion/src/themes/classic/48/duplicate.png b/companion/src/themes/classic/48/duplicate.png new file mode 100644 index 000000000..903afdd6c Binary files /dev/null and b/companion/src/themes/classic/48/duplicate.png differ diff --git a/companion/src/themes/classic/48/edit.png b/companion/src/themes/classic/48/edit.png new file mode 100644 index 000000000..2869e5bbd Binary files /dev/null and b/companion/src/themes/classic/48/edit.png differ diff --git a/companion/src/themes/classic/48/exit.png b/companion/src/themes/classic/48/exit.png new file mode 100644 index 000000000..159dccb93 Binary files /dev/null and b/companion/src/themes/classic/48/exit.png differ diff --git a/companion/src/themes/classic/48/fuses.png b/companion/src/themes/classic/48/fuses.png new file mode 100644 index 000000000..d7fb789c4 Binary files /dev/null and b/companion/src/themes/classic/48/fuses.png differ diff --git a/companion/src/themes/classic/48/information.png b/companion/src/themes/classic/48/information.png new file mode 100644 index 000000000..e62f8ee19 Binary files /dev/null and b/companion/src/themes/classic/48/information.png differ diff --git a/companion/src/themes/classic/48/library.png b/companion/src/themes/classic/48/library.png new file mode 100644 index 000000000..df4cf1e0c Binary files /dev/null and b/companion/src/themes/classic/48/library.png differ diff --git a/companion/src/themes/classic/48/list.png b/companion/src/themes/classic/48/list.png new file mode 100644 index 000000000..564d76118 Binary files /dev/null and b/companion/src/themes/classic/48/list.png differ diff --git a/companion/src/themes/classic/48/logs.png b/companion/src/themes/classic/48/logs.png new file mode 100644 index 000000000..55c6f8d0b Binary files /dev/null and b/companion/src/themes/classic/48/logs.png differ diff --git a/companion/src/themes/classic/48/movedown.png b/companion/src/themes/classic/48/movedown.png new file mode 100644 index 000000000..7f6cb094d Binary files /dev/null and b/companion/src/themes/classic/48/movedown.png differ diff --git a/companion/src/themes/classic/48/moveup.png b/companion/src/themes/classic/48/moveup.png new file mode 100644 index 000000000..62f818d20 Binary files /dev/null and b/companion/src/themes/classic/48/moveup.png differ diff --git a/companion/src/themes/classic/48/new.png b/companion/src/themes/classic/48/new.png new file mode 100644 index 000000000..35ba8e361 Binary files /dev/null and b/companion/src/themes/classic/48/new.png differ diff --git a/companion/src/themes/classic/48/open.png b/companion/src/themes/classic/48/open.png new file mode 100644 index 000000000..04aebb09f Binary files /dev/null and b/companion/src/themes/classic/48/open.png differ diff --git a/companion/src/themes/classic/48/paintbrush.png b/companion/src/themes/classic/48/paintbrush.png new file mode 100644 index 000000000..8f90906c7 Binary files /dev/null and b/companion/src/themes/classic/48/paintbrush.png differ diff --git a/companion/src/themes/classic/48/paste.png b/companion/src/themes/classic/48/paste.png new file mode 100644 index 000000000..bbc349158 Binary files /dev/null and b/companion/src/themes/classic/48/paste.png differ diff --git a/companion/src/themes/classic/48/play.png b/companion/src/themes/classic/48/play.png new file mode 100644 index 000000000..740f36842 Binary files /dev/null and b/companion/src/themes/classic/48/play.png differ diff --git a/companion/src/themes/classic/48/preferences.png b/companion/src/themes/classic/48/preferences.png new file mode 100644 index 000000000..713e2cbeb Binary files /dev/null and b/companion/src/themes/classic/48/preferences.png differ diff --git a/companion/src/themes/classic/48/print.png b/companion/src/themes/classic/48/print.png new file mode 100644 index 000000000..5bafa08d8 Binary files /dev/null and b/companion/src/themes/classic/48/print.png differ diff --git a/companion/src/themes/classic/48/profiles.png b/companion/src/themes/classic/48/profiles.png new file mode 100644 index 000000000..52721bd5f Binary files /dev/null and b/companion/src/themes/classic/48/profiles.png differ diff --git a/companion/src/themes/classic/48/read_eeprom.png b/companion/src/themes/classic/48/read_eeprom.png new file mode 100644 index 000000000..a7ef5d2c0 Binary files /dev/null and b/companion/src/themes/classic/48/read_eeprom.png differ diff --git a/companion/src/themes/classic/48/read_eeprom_file.png b/companion/src/themes/classic/48/read_eeprom_file.png new file mode 100644 index 000000000..fdd2e5588 Binary files /dev/null and b/companion/src/themes/classic/48/read_eeprom_file.png differ diff --git a/companion/src/themes/classic/48/read_flash.png b/companion/src/themes/classic/48/read_flash.png new file mode 100644 index 000000000..0b5440588 Binary files /dev/null and b/companion/src/themes/classic/48/read_flash.png differ diff --git a/companion/src/themes/classic/48/recentdocument.png b/companion/src/themes/classic/48/recentdocument.png new file mode 100644 index 000000000..2f8eb1ba9 Binary files /dev/null and b/companion/src/themes/classic/48/recentdocument.png differ diff --git a/companion/src/themes/classic/48/save.png b/companion/src/themes/classic/48/save.png new file mode 100644 index 000000000..9153bd84c Binary files /dev/null and b/companion/src/themes/classic/48/save.png differ diff --git a/companion/src/themes/classic/48/saveas.png b/companion/src/themes/classic/48/saveas.png new file mode 100644 index 000000000..1bb79a525 Binary files /dev/null and b/companion/src/themes/classic/48/saveas.png differ diff --git a/companion/src/themes/classic/48/simulate.png b/companion/src/themes/classic/48/simulate.png new file mode 100644 index 000000000..e9c338619 Binary files /dev/null and b/companion/src/themes/classic/48/simulate.png differ diff --git a/companion/src/themes/classic/48/stop.png b/companion/src/themes/classic/48/stop.png new file mode 100644 index 000000000..c513babaa Binary files /dev/null and b/companion/src/themes/classic/48/stop.png differ diff --git a/companion/src/themes/classic/48/update.png b/companion/src/themes/classic/48/update.png new file mode 100644 index 000000000..27112e871 Binary files /dev/null and b/companion/src/themes/classic/48/update.png differ diff --git a/companion/src/themes/classic/48/wizard.png b/companion/src/themes/classic/48/wizard.png new file mode 100644 index 000000000..3fbd7d780 Binary files /dev/null and b/companion/src/themes/classic/48/wizard.png differ diff --git a/companion/src/themes/classic/48/write_eeprom.png b/companion/src/themes/classic/48/write_eeprom.png new file mode 100644 index 000000000..1c873f8e0 Binary files /dev/null and b/companion/src/themes/classic/48/write_eeprom.png differ diff --git a/companion/src/themes/classic/48/write_eeprom_file.png b/companion/src/themes/classic/48/write_eeprom_file.png new file mode 100644 index 000000000..57804bd68 Binary files /dev/null and b/companion/src/themes/classic/48/write_eeprom_file.png differ diff --git a/companion/src/themes/classic/48/write_flash.png b/companion/src/themes/classic/48/write_flash.png new file mode 100644 index 000000000..3600b5e37 Binary files /dev/null and b/companion/src/themes/classic/48/write_flash.png differ diff --git a/companion/src/themes/monoblue/16/add.png b/companion/src/themes/monoblue/16/add.png new file mode 100644 index 000000000..277d59088 Binary files /dev/null and b/companion/src/themes/monoblue/16/add.png differ diff --git a/companion/src/themes/monoblue/16/arrow-left.png b/companion/src/themes/monoblue/16/arrow-left.png new file mode 100644 index 000000000..a8f69c534 Binary files /dev/null and b/companion/src/themes/monoblue/16/arrow-left.png differ diff --git a/companion/src/themes/monoblue/16/arrow-right.png b/companion/src/themes/monoblue/16/arrow-right.png new file mode 100644 index 000000000..82386c8a6 Binary files /dev/null and b/companion/src/themes/monoblue/16/arrow-right.png differ diff --git a/companion/src/themes/monoblue/16/changelog.png b/companion/src/themes/monoblue/16/changelog.png new file mode 100644 index 000000000..3fa3310e7 Binary files /dev/null and b/companion/src/themes/monoblue/16/changelog.png differ diff --git a/companion/src/themes/monoblue/16/clear.png b/companion/src/themes/monoblue/16/clear.png new file mode 100644 index 000000000..6371aefdb Binary files /dev/null and b/companion/src/themes/monoblue/16/clear.png differ diff --git a/companion/src/themes/monoblue/16/compare.png b/companion/src/themes/monoblue/16/compare.png new file mode 100644 index 000000000..76eca0e72 Binary files /dev/null and b/companion/src/themes/monoblue/16/compare.png differ diff --git a/companion/src/themes/monoblue/16/configure.png b/companion/src/themes/monoblue/16/configure.png new file mode 100644 index 000000000..138f0fda9 Binary files /dev/null and b/companion/src/themes/monoblue/16/configure.png differ diff --git a/companion/src/themes/monoblue/16/contributors.png b/companion/src/themes/monoblue/16/contributors.png new file mode 100644 index 000000000..6e622a7c8 Binary files /dev/null and b/companion/src/themes/monoblue/16/contributors.png differ diff --git a/companion/src/themes/monoblue/16/copy.png b/companion/src/themes/monoblue/16/copy.png new file mode 100644 index 000000000..f7d827109 Binary files /dev/null and b/companion/src/themes/monoblue/16/copy.png differ diff --git a/companion/src/themes/monoblue/16/currentmodel.png b/companion/src/themes/monoblue/16/currentmodel.png new file mode 100644 index 000000000..347dd5cea Binary files /dev/null and b/companion/src/themes/monoblue/16/currentmodel.png differ diff --git a/companion/src/themes/monoblue/16/cut.png b/companion/src/themes/monoblue/16/cut.png new file mode 100644 index 000000000..548289d3a Binary files /dev/null and b/companion/src/themes/monoblue/16/cut.png differ diff --git a/companion/src/themes/monoblue/16/duplicate.png b/companion/src/themes/monoblue/16/duplicate.png new file mode 100644 index 000000000..09e2c3781 Binary files /dev/null and b/companion/src/themes/monoblue/16/duplicate.png differ diff --git a/companion/src/themes/monoblue/16/edit.png b/companion/src/themes/monoblue/16/edit.png new file mode 100644 index 000000000..73c3a3948 Binary files /dev/null and b/companion/src/themes/monoblue/16/edit.png differ diff --git a/companion/src/themes/monoblue/16/exit.png b/companion/src/themes/monoblue/16/exit.png new file mode 100644 index 000000000..bd2c9660c Binary files /dev/null and b/companion/src/themes/monoblue/16/exit.png differ diff --git a/companion/src/themes/monoblue/16/fuses.png b/companion/src/themes/monoblue/16/fuses.png new file mode 100644 index 000000000..65ced789a Binary files /dev/null and b/companion/src/themes/monoblue/16/fuses.png differ diff --git a/companion/src/themes/monoblue/16/information.png b/companion/src/themes/monoblue/16/information.png new file mode 100644 index 000000000..bda9648c1 Binary files /dev/null and b/companion/src/themes/monoblue/16/information.png differ diff --git a/companion/src/themes/monoblue/16/library.png b/companion/src/themes/monoblue/16/library.png new file mode 100644 index 000000000..5c6eee61e Binary files /dev/null and b/companion/src/themes/monoblue/16/library.png differ diff --git a/companion/src/themes/monoblue/16/list.png b/companion/src/themes/monoblue/16/list.png new file mode 100644 index 000000000..e3de01dae Binary files /dev/null and b/companion/src/themes/monoblue/16/list.png differ diff --git a/companion/src/themes/monoblue/16/logs.png b/companion/src/themes/monoblue/16/logs.png new file mode 100644 index 000000000..5c836986f Binary files /dev/null and b/companion/src/themes/monoblue/16/logs.png differ diff --git a/companion/src/themes/monoblue/16/movedown.png b/companion/src/themes/monoblue/16/movedown.png new file mode 100644 index 000000000..468cb4cb7 Binary files /dev/null and b/companion/src/themes/monoblue/16/movedown.png differ diff --git a/companion/src/themes/monoblue/16/moveup.png b/companion/src/themes/monoblue/16/moveup.png new file mode 100644 index 000000000..63a22678f Binary files /dev/null and b/companion/src/themes/monoblue/16/moveup.png differ diff --git a/companion/src/themes/monoblue/16/new.png b/companion/src/themes/monoblue/16/new.png new file mode 100644 index 000000000..d007f8573 Binary files /dev/null and b/companion/src/themes/monoblue/16/new.png differ diff --git a/companion/src/themes/monoblue/16/open.png b/companion/src/themes/monoblue/16/open.png new file mode 100644 index 000000000..c8b830f77 Binary files /dev/null and b/companion/src/themes/monoblue/16/open.png differ diff --git a/companion/src/themes/monoblue/16/paintbrush.png b/companion/src/themes/monoblue/16/paintbrush.png new file mode 100644 index 000000000..568e64931 Binary files /dev/null and b/companion/src/themes/monoblue/16/paintbrush.png differ diff --git a/companion/src/themes/monoblue/16/paste.png b/companion/src/themes/monoblue/16/paste.png new file mode 100644 index 000000000..acabe060c Binary files /dev/null and b/companion/src/themes/monoblue/16/paste.png differ diff --git a/companion/src/themes/monoblue/16/play.png b/companion/src/themes/monoblue/16/play.png new file mode 100644 index 000000000..a7807340c Binary files /dev/null and b/companion/src/themes/monoblue/16/play.png differ diff --git a/companion/src/themes/monoblue/16/preferences.png b/companion/src/themes/monoblue/16/preferences.png new file mode 100644 index 000000000..566b610b2 Binary files /dev/null and b/companion/src/themes/monoblue/16/preferences.png differ diff --git a/companion/src/themes/monoblue/16/print.png b/companion/src/themes/monoblue/16/print.png new file mode 100644 index 000000000..975b98c47 Binary files /dev/null and b/companion/src/themes/monoblue/16/print.png differ diff --git a/companion/src/themes/monoblue/16/profiles.png b/companion/src/themes/monoblue/16/profiles.png new file mode 100644 index 000000000..790f1009c Binary files /dev/null and b/companion/src/themes/monoblue/16/profiles.png differ diff --git a/companion/src/themes/monoblue/16/read_eeprom.png b/companion/src/themes/monoblue/16/read_eeprom.png new file mode 100644 index 000000000..ba785d6ac Binary files /dev/null and b/companion/src/themes/monoblue/16/read_eeprom.png differ diff --git a/companion/src/themes/monoblue/16/read_eeprom_file.png b/companion/src/themes/monoblue/16/read_eeprom_file.png new file mode 100644 index 000000000..8d2ae0e0b Binary files /dev/null and b/companion/src/themes/monoblue/16/read_eeprom_file.png differ diff --git a/companion/src/themes/monoblue/16/read_flash.png b/companion/src/themes/monoblue/16/read_flash.png new file mode 100644 index 000000000..234c83d6c Binary files /dev/null and b/companion/src/themes/monoblue/16/read_flash.png differ diff --git a/companion/src/themes/monoblue/16/recentdocument.png b/companion/src/themes/monoblue/16/recentdocument.png new file mode 100644 index 000000000..f1ada6d84 Binary files /dev/null and b/companion/src/themes/monoblue/16/recentdocument.png differ diff --git a/companion/src/themes/monoblue/16/save.png b/companion/src/themes/monoblue/16/save.png new file mode 100644 index 000000000..ab1ee8b03 Binary files /dev/null and b/companion/src/themes/monoblue/16/save.png differ diff --git a/companion/src/themes/monoblue/16/saveas.png b/companion/src/themes/monoblue/16/saveas.png new file mode 100644 index 000000000..a1054dae1 Binary files /dev/null and b/companion/src/themes/monoblue/16/saveas.png differ diff --git a/companion/src/themes/monoblue/16/simulate.png b/companion/src/themes/monoblue/16/simulate.png new file mode 100644 index 000000000..2b7fef775 Binary files /dev/null and b/companion/src/themes/monoblue/16/simulate.png differ diff --git a/companion/src/themes/monoblue/16/stop.png b/companion/src/themes/monoblue/16/stop.png new file mode 100644 index 000000000..4c654f4d4 Binary files /dev/null and b/companion/src/themes/monoblue/16/stop.png differ diff --git a/companion/src/themes/monoblue/16/update.png b/companion/src/themes/monoblue/16/update.png new file mode 100644 index 000000000..17897ad5d Binary files /dev/null and b/companion/src/themes/monoblue/16/update.png differ diff --git a/companion/src/themes/monoblue/16/wizard.png b/companion/src/themes/monoblue/16/wizard.png new file mode 100644 index 000000000..75a85e2e2 Binary files /dev/null and b/companion/src/themes/monoblue/16/wizard.png differ diff --git a/companion/src/themes/monoblue/16/write_eeprom.png b/companion/src/themes/monoblue/16/write_eeprom.png new file mode 100644 index 000000000..ad71d967c Binary files /dev/null and b/companion/src/themes/monoblue/16/write_eeprom.png differ diff --git a/companion/src/themes/monoblue/16/write_eeprom_file.png b/companion/src/themes/monoblue/16/write_eeprom_file.png new file mode 100644 index 000000000..08f6ca577 Binary files /dev/null and b/companion/src/themes/monoblue/16/write_eeprom_file.png differ diff --git a/companion/src/themes/monoblue/16/write_flash.png b/companion/src/themes/monoblue/16/write_flash.png new file mode 100644 index 000000000..985cad5ef Binary files /dev/null and b/companion/src/themes/monoblue/16/write_flash.png differ diff --git a/companion/src/themes/monoblue/24/add.png b/companion/src/themes/monoblue/24/add.png new file mode 100644 index 000000000..573b67a3f Binary files /dev/null and b/companion/src/themes/monoblue/24/add.png differ diff --git a/companion/src/themes/monoblue/24/arrow-left.png b/companion/src/themes/monoblue/24/arrow-left.png new file mode 100644 index 000000000..804b9ca79 Binary files /dev/null and b/companion/src/themes/monoblue/24/arrow-left.png differ diff --git a/companion/src/themes/monoblue/24/arrow-right.png b/companion/src/themes/monoblue/24/arrow-right.png new file mode 100644 index 000000000..6cbd72642 Binary files /dev/null and b/companion/src/themes/monoblue/24/arrow-right.png differ diff --git a/companion/src/themes/monoblue/24/changelog.png b/companion/src/themes/monoblue/24/changelog.png new file mode 100644 index 000000000..362c93e97 Binary files /dev/null and b/companion/src/themes/monoblue/24/changelog.png differ diff --git a/companion/src/themes/monoblue/24/clear.png b/companion/src/themes/monoblue/24/clear.png new file mode 100644 index 000000000..f9d716714 Binary files /dev/null and b/companion/src/themes/monoblue/24/clear.png differ diff --git a/companion/src/themes/monoblue/24/compare.png b/companion/src/themes/monoblue/24/compare.png new file mode 100644 index 000000000..5af1549a5 Binary files /dev/null and b/companion/src/themes/monoblue/24/compare.png differ diff --git a/companion/src/themes/monoblue/24/configure.png b/companion/src/themes/monoblue/24/configure.png new file mode 100644 index 000000000..f3a1c5258 Binary files /dev/null and b/companion/src/themes/monoblue/24/configure.png differ diff --git a/companion/src/themes/monoblue/24/contributors.png b/companion/src/themes/monoblue/24/contributors.png new file mode 100644 index 000000000..ba7065668 Binary files /dev/null and b/companion/src/themes/monoblue/24/contributors.png differ diff --git a/companion/src/themes/monoblue/24/copy.png b/companion/src/themes/monoblue/24/copy.png new file mode 100644 index 000000000..d1b713f6f Binary files /dev/null and b/companion/src/themes/monoblue/24/copy.png differ diff --git a/companion/src/themes/monoblue/24/currentmodel.png b/companion/src/themes/monoblue/24/currentmodel.png new file mode 100644 index 000000000..c6d56f883 Binary files /dev/null and b/companion/src/themes/monoblue/24/currentmodel.png differ diff --git a/companion/src/themes/monoblue/24/cut.png b/companion/src/themes/monoblue/24/cut.png new file mode 100644 index 000000000..6f6dd8649 Binary files /dev/null and b/companion/src/themes/monoblue/24/cut.png differ diff --git a/companion/src/themes/monoblue/24/duplicate.png b/companion/src/themes/monoblue/24/duplicate.png new file mode 100644 index 000000000..642b3e319 Binary files /dev/null and b/companion/src/themes/monoblue/24/duplicate.png differ diff --git a/companion/src/themes/monoblue/24/edit.png b/companion/src/themes/monoblue/24/edit.png new file mode 100644 index 000000000..bf4ab6cba Binary files /dev/null and b/companion/src/themes/monoblue/24/edit.png differ diff --git a/companion/src/themes/monoblue/24/exit.png b/companion/src/themes/monoblue/24/exit.png new file mode 100644 index 000000000..6c3417e41 Binary files /dev/null and b/companion/src/themes/monoblue/24/exit.png differ diff --git a/companion/src/themes/monoblue/24/fuses.png b/companion/src/themes/monoblue/24/fuses.png new file mode 100644 index 000000000..5dc29a92a Binary files /dev/null and b/companion/src/themes/monoblue/24/fuses.png differ diff --git a/companion/src/themes/monoblue/24/information.png b/companion/src/themes/monoblue/24/information.png new file mode 100644 index 000000000..351bf90ba Binary files /dev/null and b/companion/src/themes/monoblue/24/information.png differ diff --git a/companion/src/themes/monoblue/24/library.png b/companion/src/themes/monoblue/24/library.png new file mode 100644 index 000000000..72ebd44fc Binary files /dev/null and b/companion/src/themes/monoblue/24/library.png differ diff --git a/companion/src/themes/monoblue/24/list.png b/companion/src/themes/monoblue/24/list.png new file mode 100644 index 000000000..eff436442 Binary files /dev/null and b/companion/src/themes/monoblue/24/list.png differ diff --git a/companion/src/themes/monoblue/24/logs.png b/companion/src/themes/monoblue/24/logs.png new file mode 100644 index 000000000..35ea626ea Binary files /dev/null and b/companion/src/themes/monoblue/24/logs.png differ diff --git a/companion/src/themes/monoblue/24/movedown.png b/companion/src/themes/monoblue/24/movedown.png new file mode 100644 index 000000000..d4812b3b4 Binary files /dev/null and b/companion/src/themes/monoblue/24/movedown.png differ diff --git a/companion/src/themes/monoblue/24/moveup.png b/companion/src/themes/monoblue/24/moveup.png new file mode 100644 index 000000000..dc343cac5 Binary files /dev/null and b/companion/src/themes/monoblue/24/moveup.png differ diff --git a/companion/src/themes/monoblue/24/new.png b/companion/src/themes/monoblue/24/new.png new file mode 100644 index 000000000..af4c268ca Binary files /dev/null and b/companion/src/themes/monoblue/24/new.png differ diff --git a/companion/src/themes/monoblue/24/open.png b/companion/src/themes/monoblue/24/open.png new file mode 100644 index 000000000..047a2ee81 Binary files /dev/null and b/companion/src/themes/monoblue/24/open.png differ diff --git a/companion/src/themes/monoblue/24/paintbrush.png b/companion/src/themes/monoblue/24/paintbrush.png new file mode 100644 index 000000000..d2982fa7c Binary files /dev/null and b/companion/src/themes/monoblue/24/paintbrush.png differ diff --git a/companion/src/themes/monoblue/24/paste.png b/companion/src/themes/monoblue/24/paste.png new file mode 100644 index 000000000..ad82f633b Binary files /dev/null and b/companion/src/themes/monoblue/24/paste.png differ diff --git a/companion/src/themes/monoblue/24/play.png b/companion/src/themes/monoblue/24/play.png new file mode 100644 index 000000000..17a4d9988 Binary files /dev/null and b/companion/src/themes/monoblue/24/play.png differ diff --git a/companion/src/themes/monoblue/24/preferences.png b/companion/src/themes/monoblue/24/preferences.png new file mode 100644 index 000000000..91ff56782 Binary files /dev/null and b/companion/src/themes/monoblue/24/preferences.png differ diff --git a/companion/src/themes/monoblue/24/print.png b/companion/src/themes/monoblue/24/print.png new file mode 100644 index 000000000..fc3497b0c Binary files /dev/null and b/companion/src/themes/monoblue/24/print.png differ diff --git a/companion/src/themes/monoblue/24/profiles.png b/companion/src/themes/monoblue/24/profiles.png new file mode 100644 index 000000000..bf1d80650 Binary files /dev/null and b/companion/src/themes/monoblue/24/profiles.png differ diff --git a/companion/src/themes/monoblue/24/read_eeprom.png b/companion/src/themes/monoblue/24/read_eeprom.png new file mode 100644 index 000000000..b8f02c0e0 Binary files /dev/null and b/companion/src/themes/monoblue/24/read_eeprom.png differ diff --git a/companion/src/themes/monoblue/24/read_eeprom_file.png b/companion/src/themes/monoblue/24/read_eeprom_file.png new file mode 100644 index 000000000..763a611c2 Binary files /dev/null and b/companion/src/themes/monoblue/24/read_eeprom_file.png differ diff --git a/companion/src/themes/monoblue/24/read_flash.png b/companion/src/themes/monoblue/24/read_flash.png new file mode 100644 index 000000000..aa78e35e6 Binary files /dev/null and b/companion/src/themes/monoblue/24/read_flash.png differ diff --git a/companion/src/themes/monoblue/24/recentdocument.png b/companion/src/themes/monoblue/24/recentdocument.png new file mode 100644 index 000000000..ba4d54f5e Binary files /dev/null and b/companion/src/themes/monoblue/24/recentdocument.png differ diff --git a/companion/src/themes/monoblue/24/save.png b/companion/src/themes/monoblue/24/save.png new file mode 100644 index 000000000..ee19aa9ee Binary files /dev/null and b/companion/src/themes/monoblue/24/save.png differ diff --git a/companion/src/themes/monoblue/24/saveas.png b/companion/src/themes/monoblue/24/saveas.png new file mode 100644 index 000000000..10f92827b Binary files /dev/null and b/companion/src/themes/monoblue/24/saveas.png differ diff --git a/companion/src/themes/monoblue/24/simulate.png b/companion/src/themes/monoblue/24/simulate.png new file mode 100644 index 000000000..1b486d1bf Binary files /dev/null and b/companion/src/themes/monoblue/24/simulate.png differ diff --git a/companion/src/themes/monoblue/24/stop.png b/companion/src/themes/monoblue/24/stop.png new file mode 100644 index 000000000..c9cdef387 Binary files /dev/null and b/companion/src/themes/monoblue/24/stop.png differ diff --git a/companion/src/themes/monoblue/24/update.png b/companion/src/themes/monoblue/24/update.png new file mode 100644 index 000000000..dc97c9a86 Binary files /dev/null and b/companion/src/themes/monoblue/24/update.png differ diff --git a/companion/src/themes/monoblue/24/wizard.png b/companion/src/themes/monoblue/24/wizard.png new file mode 100644 index 000000000..a869d1b7a Binary files /dev/null and b/companion/src/themes/monoblue/24/wizard.png differ diff --git a/companion/src/themes/monoblue/24/write_eeprom.png b/companion/src/themes/monoblue/24/write_eeprom.png new file mode 100644 index 000000000..28478731e Binary files /dev/null and b/companion/src/themes/monoblue/24/write_eeprom.png differ diff --git a/companion/src/themes/monoblue/24/write_eeprom_file.png b/companion/src/themes/monoblue/24/write_eeprom_file.png new file mode 100644 index 000000000..24df56702 Binary files /dev/null and b/companion/src/themes/monoblue/24/write_eeprom_file.png differ diff --git a/companion/src/themes/monoblue/24/write_flash.png b/companion/src/themes/monoblue/24/write_flash.png new file mode 100644 index 000000000..105953506 Binary files /dev/null and b/companion/src/themes/monoblue/24/write_flash.png differ diff --git a/companion/src/themes/monoblue/32/add.png b/companion/src/themes/monoblue/32/add.png new file mode 100644 index 000000000..526d2ebd8 Binary files /dev/null and b/companion/src/themes/monoblue/32/add.png differ diff --git a/companion/src/themes/monoblue/32/arrow-left.png b/companion/src/themes/monoblue/32/arrow-left.png new file mode 100644 index 000000000..1c51f3977 Binary files /dev/null and b/companion/src/themes/monoblue/32/arrow-left.png differ diff --git a/companion/src/themes/monoblue/32/arrow-right.png b/companion/src/themes/monoblue/32/arrow-right.png new file mode 100644 index 000000000..9bbc927e2 Binary files /dev/null and b/companion/src/themes/monoblue/32/arrow-right.png differ diff --git a/companion/src/themes/monoblue/32/changelog.png b/companion/src/themes/monoblue/32/changelog.png new file mode 100644 index 000000000..a47a28a33 Binary files /dev/null and b/companion/src/themes/monoblue/32/changelog.png differ diff --git a/companion/src/themes/monoblue/32/clear.png b/companion/src/themes/monoblue/32/clear.png new file mode 100644 index 000000000..57b07f2ca Binary files /dev/null and b/companion/src/themes/monoblue/32/clear.png differ diff --git a/companion/src/themes/monoblue/32/compare.png b/companion/src/themes/monoblue/32/compare.png new file mode 100644 index 000000000..78bf27cbc Binary files /dev/null and b/companion/src/themes/monoblue/32/compare.png differ diff --git a/companion/src/themes/monoblue/32/configure.png b/companion/src/themes/monoblue/32/configure.png new file mode 100644 index 000000000..c701b52be Binary files /dev/null and b/companion/src/themes/monoblue/32/configure.png differ diff --git a/companion/src/themes/monoblue/32/contributors.png b/companion/src/themes/monoblue/32/contributors.png new file mode 100644 index 000000000..aa8f130b5 Binary files /dev/null and b/companion/src/themes/monoblue/32/contributors.png differ diff --git a/companion/src/themes/monoblue/32/copy.png b/companion/src/themes/monoblue/32/copy.png new file mode 100644 index 000000000..e16499332 Binary files /dev/null and b/companion/src/themes/monoblue/32/copy.png differ diff --git a/companion/src/themes/monoblue/32/currentmodel.png b/companion/src/themes/monoblue/32/currentmodel.png new file mode 100644 index 000000000..ba8d29bf5 Binary files /dev/null and b/companion/src/themes/monoblue/32/currentmodel.png differ diff --git a/companion/src/themes/monoblue/32/cut.png b/companion/src/themes/monoblue/32/cut.png new file mode 100644 index 000000000..98083340e Binary files /dev/null and b/companion/src/themes/monoblue/32/cut.png differ diff --git a/companion/src/themes/monoblue/32/duplicate.png b/companion/src/themes/monoblue/32/duplicate.png new file mode 100644 index 000000000..1053d8c2f Binary files /dev/null and b/companion/src/themes/monoblue/32/duplicate.png differ diff --git a/companion/src/themes/monoblue/32/edit.png b/companion/src/themes/monoblue/32/edit.png new file mode 100644 index 000000000..56fc6bd72 Binary files /dev/null and b/companion/src/themes/monoblue/32/edit.png differ diff --git a/companion/src/themes/monoblue/32/exit.png b/companion/src/themes/monoblue/32/exit.png new file mode 100644 index 000000000..e24a7e034 Binary files /dev/null and b/companion/src/themes/monoblue/32/exit.png differ diff --git a/companion/src/themes/monoblue/32/fuses.png b/companion/src/themes/monoblue/32/fuses.png new file mode 100644 index 000000000..813fa99fd Binary files /dev/null and b/companion/src/themes/monoblue/32/fuses.png differ diff --git a/companion/src/themes/monoblue/32/information.png b/companion/src/themes/monoblue/32/information.png new file mode 100644 index 000000000..896c7c3c6 Binary files /dev/null and b/companion/src/themes/monoblue/32/information.png differ diff --git a/companion/src/themes/monoblue/32/library.png b/companion/src/themes/monoblue/32/library.png new file mode 100644 index 000000000..6f7ee85dd Binary files /dev/null and b/companion/src/themes/monoblue/32/library.png differ diff --git a/companion/src/themes/monoblue/32/list.png b/companion/src/themes/monoblue/32/list.png new file mode 100644 index 000000000..b0d0cd20d Binary files /dev/null and b/companion/src/themes/monoblue/32/list.png differ diff --git a/companion/src/themes/monoblue/32/logs.png b/companion/src/themes/monoblue/32/logs.png new file mode 100644 index 000000000..dc676c68e Binary files /dev/null and b/companion/src/themes/monoblue/32/logs.png differ diff --git a/companion/src/themes/monoblue/32/movedown.png b/companion/src/themes/monoblue/32/movedown.png new file mode 100644 index 000000000..ada0c6685 Binary files /dev/null and b/companion/src/themes/monoblue/32/movedown.png differ diff --git a/companion/src/themes/monoblue/32/moveup.png b/companion/src/themes/monoblue/32/moveup.png new file mode 100644 index 000000000..7748b9a42 Binary files /dev/null and b/companion/src/themes/monoblue/32/moveup.png differ diff --git a/companion/src/themes/monoblue/32/new.png b/companion/src/themes/monoblue/32/new.png new file mode 100644 index 000000000..123d49588 Binary files /dev/null and b/companion/src/themes/monoblue/32/new.png differ diff --git a/companion/src/themes/monoblue/32/open.png b/companion/src/themes/monoblue/32/open.png new file mode 100644 index 000000000..eaf97c2c2 Binary files /dev/null and b/companion/src/themes/monoblue/32/open.png differ diff --git a/companion/src/themes/monoblue/32/paintbrush.png b/companion/src/themes/monoblue/32/paintbrush.png new file mode 100644 index 000000000..648687ca8 Binary files /dev/null and b/companion/src/themes/monoblue/32/paintbrush.png differ diff --git a/companion/src/themes/monoblue/32/paste.png b/companion/src/themes/monoblue/32/paste.png new file mode 100644 index 000000000..f8a34a8d4 Binary files /dev/null and b/companion/src/themes/monoblue/32/paste.png differ diff --git a/companion/src/themes/monoblue/32/play.png b/companion/src/themes/monoblue/32/play.png new file mode 100644 index 000000000..c6c3d6cf0 Binary files /dev/null and b/companion/src/themes/monoblue/32/play.png differ diff --git a/companion/src/themes/monoblue/32/preferences.png b/companion/src/themes/monoblue/32/preferences.png new file mode 100644 index 000000000..dbeafbc37 Binary files /dev/null and b/companion/src/themes/monoblue/32/preferences.png differ diff --git a/companion/src/themes/monoblue/32/print.png b/companion/src/themes/monoblue/32/print.png new file mode 100644 index 000000000..9ff0f7e2d Binary files /dev/null and b/companion/src/themes/monoblue/32/print.png differ diff --git a/companion/src/themes/monoblue/32/profiles.png b/companion/src/themes/monoblue/32/profiles.png new file mode 100644 index 000000000..fda77416f Binary files /dev/null and b/companion/src/themes/monoblue/32/profiles.png differ diff --git a/companion/src/themes/monoblue/32/read_eeprom.png b/companion/src/themes/monoblue/32/read_eeprom.png new file mode 100644 index 000000000..407584ed7 Binary files /dev/null and b/companion/src/themes/monoblue/32/read_eeprom.png differ diff --git a/companion/src/themes/monoblue/32/read_eeprom_file.png b/companion/src/themes/monoblue/32/read_eeprom_file.png new file mode 100644 index 000000000..b6e3f6347 Binary files /dev/null and b/companion/src/themes/monoblue/32/read_eeprom_file.png differ diff --git a/companion/src/themes/monoblue/32/read_flash.png b/companion/src/themes/monoblue/32/read_flash.png new file mode 100644 index 000000000..d07532291 Binary files /dev/null and b/companion/src/themes/monoblue/32/read_flash.png differ diff --git a/companion/src/themes/monoblue/32/recentdocument.png b/companion/src/themes/monoblue/32/recentdocument.png new file mode 100644 index 000000000..0dade16b4 Binary files /dev/null and b/companion/src/themes/monoblue/32/recentdocument.png differ diff --git a/companion/src/themes/monoblue/32/save.png b/companion/src/themes/monoblue/32/save.png new file mode 100644 index 000000000..b96b8a51a Binary files /dev/null and b/companion/src/themes/monoblue/32/save.png differ diff --git a/companion/src/themes/monoblue/32/saveas.png b/companion/src/themes/monoblue/32/saveas.png new file mode 100644 index 000000000..031468408 Binary files /dev/null and b/companion/src/themes/monoblue/32/saveas.png differ diff --git a/companion/src/themes/monoblue/32/simulate.png b/companion/src/themes/monoblue/32/simulate.png new file mode 100644 index 000000000..9a6e2ec74 Binary files /dev/null and b/companion/src/themes/monoblue/32/simulate.png differ diff --git a/companion/src/themes/monoblue/32/stop.png b/companion/src/themes/monoblue/32/stop.png new file mode 100644 index 000000000..091d96563 Binary files /dev/null and b/companion/src/themes/monoblue/32/stop.png differ diff --git a/companion/src/themes/monoblue/32/update.png b/companion/src/themes/monoblue/32/update.png new file mode 100644 index 000000000..250147a57 Binary files /dev/null and b/companion/src/themes/monoblue/32/update.png differ diff --git a/companion/src/themes/monoblue/32/wizard.png b/companion/src/themes/monoblue/32/wizard.png new file mode 100644 index 000000000..41999d5b6 Binary files /dev/null and b/companion/src/themes/monoblue/32/wizard.png differ diff --git a/companion/src/themes/monoblue/32/write_eeprom.png b/companion/src/themes/monoblue/32/write_eeprom.png new file mode 100644 index 000000000..b4ec61822 Binary files /dev/null and b/companion/src/themes/monoblue/32/write_eeprom.png differ diff --git a/companion/src/themes/monoblue/32/write_eeprom_file.png b/companion/src/themes/monoblue/32/write_eeprom_file.png new file mode 100644 index 000000000..6042ddf03 Binary files /dev/null and b/companion/src/themes/monoblue/32/write_eeprom_file.png differ diff --git a/companion/src/themes/monoblue/32/write_flash.png b/companion/src/themes/monoblue/32/write_flash.png new file mode 100644 index 000000000..ec5397d7a Binary files /dev/null and b/companion/src/themes/monoblue/32/write_flash.png differ diff --git a/companion/src/themes/monoblue/48/add.png b/companion/src/themes/monoblue/48/add.png new file mode 100644 index 000000000..b398f4584 Binary files /dev/null and b/companion/src/themes/monoblue/48/add.png differ diff --git a/companion/src/themes/monoblue/48/arrow-left.png b/companion/src/themes/monoblue/48/arrow-left.png new file mode 100644 index 000000000..86f02dea9 Binary files /dev/null and b/companion/src/themes/monoblue/48/arrow-left.png differ diff --git a/companion/src/themes/monoblue/48/arrow-right.png b/companion/src/themes/monoblue/48/arrow-right.png new file mode 100644 index 000000000..45ea123d5 Binary files /dev/null and b/companion/src/themes/monoblue/48/arrow-right.png differ diff --git a/companion/src/themes/monoblue/48/changelog.png b/companion/src/themes/monoblue/48/changelog.png new file mode 100644 index 000000000..f63510e0c Binary files /dev/null and b/companion/src/themes/monoblue/48/changelog.png differ diff --git a/companion/src/themes/monoblue/48/clear.png b/companion/src/themes/monoblue/48/clear.png new file mode 100644 index 000000000..11c9979b9 Binary files /dev/null and b/companion/src/themes/monoblue/48/clear.png differ diff --git a/companion/src/themes/monoblue/48/compare.png b/companion/src/themes/monoblue/48/compare.png new file mode 100644 index 000000000..ba3870011 Binary files /dev/null and b/companion/src/themes/monoblue/48/compare.png differ diff --git a/companion/src/themes/monoblue/48/configure.png b/companion/src/themes/monoblue/48/configure.png new file mode 100644 index 000000000..ea1e7009a Binary files /dev/null and b/companion/src/themes/monoblue/48/configure.png differ diff --git a/companion/src/themes/monoblue/48/contributors.png b/companion/src/themes/monoblue/48/contributors.png new file mode 100644 index 000000000..c8b3c2cba Binary files /dev/null and b/companion/src/themes/monoblue/48/contributors.png differ diff --git a/companion/src/themes/monoblue/48/copy.png b/companion/src/themes/monoblue/48/copy.png new file mode 100644 index 000000000..4918af9f7 Binary files /dev/null and b/companion/src/themes/monoblue/48/copy.png differ diff --git a/companion/src/themes/monoblue/48/currentmodel.png b/companion/src/themes/monoblue/48/currentmodel.png new file mode 100644 index 000000000..865fae91f Binary files /dev/null and b/companion/src/themes/monoblue/48/currentmodel.png differ diff --git a/companion/src/themes/monoblue/48/cut.png b/companion/src/themes/monoblue/48/cut.png new file mode 100644 index 000000000..a6bfe6361 Binary files /dev/null and b/companion/src/themes/monoblue/48/cut.png differ diff --git a/companion/src/themes/monoblue/48/duplicate.png b/companion/src/themes/monoblue/48/duplicate.png new file mode 100644 index 000000000..7222708f4 Binary files /dev/null and b/companion/src/themes/monoblue/48/duplicate.png differ diff --git a/companion/src/themes/monoblue/48/edit.png b/companion/src/themes/monoblue/48/edit.png new file mode 100644 index 000000000..ec4fa326f Binary files /dev/null and b/companion/src/themes/monoblue/48/edit.png differ diff --git a/companion/src/themes/monoblue/48/exit.png b/companion/src/themes/monoblue/48/exit.png new file mode 100644 index 000000000..8e3d37ff5 Binary files /dev/null and b/companion/src/themes/monoblue/48/exit.png differ diff --git a/companion/src/themes/monoblue/48/fuses.png b/companion/src/themes/monoblue/48/fuses.png new file mode 100644 index 000000000..47d3e7025 Binary files /dev/null and b/companion/src/themes/monoblue/48/fuses.png differ diff --git a/companion/src/themes/monoblue/48/information.png b/companion/src/themes/monoblue/48/information.png new file mode 100644 index 000000000..e63138475 Binary files /dev/null and b/companion/src/themes/monoblue/48/information.png differ diff --git a/companion/src/themes/monoblue/48/library.png b/companion/src/themes/monoblue/48/library.png new file mode 100644 index 000000000..354bca34a Binary files /dev/null and b/companion/src/themes/monoblue/48/library.png differ diff --git a/companion/src/themes/monoblue/48/list.png b/companion/src/themes/monoblue/48/list.png new file mode 100644 index 000000000..043c4d42a Binary files /dev/null and b/companion/src/themes/monoblue/48/list.png differ diff --git a/companion/src/themes/monoblue/48/logs.png b/companion/src/themes/monoblue/48/logs.png new file mode 100644 index 000000000..092b19e61 Binary files /dev/null and b/companion/src/themes/monoblue/48/logs.png differ diff --git a/companion/src/themes/monoblue/48/movedown.png b/companion/src/themes/monoblue/48/movedown.png new file mode 100644 index 000000000..dc6db146e Binary files /dev/null and b/companion/src/themes/monoblue/48/movedown.png differ diff --git a/companion/src/themes/monoblue/48/moveup.png b/companion/src/themes/monoblue/48/moveup.png new file mode 100644 index 000000000..c68fc663d Binary files /dev/null and b/companion/src/themes/monoblue/48/moveup.png differ diff --git a/companion/src/themes/monoblue/48/new.png b/companion/src/themes/monoblue/48/new.png new file mode 100644 index 000000000..838cd9ff9 Binary files /dev/null and b/companion/src/themes/monoblue/48/new.png differ diff --git a/companion/src/themes/monoblue/48/open.png b/companion/src/themes/monoblue/48/open.png new file mode 100644 index 000000000..d1e79c283 Binary files /dev/null and b/companion/src/themes/monoblue/48/open.png differ diff --git a/companion/src/themes/monoblue/48/paintbrush.png b/companion/src/themes/monoblue/48/paintbrush.png new file mode 100644 index 000000000..660bf62c7 Binary files /dev/null and b/companion/src/themes/monoblue/48/paintbrush.png differ diff --git a/companion/src/themes/monoblue/48/paste.png b/companion/src/themes/monoblue/48/paste.png new file mode 100644 index 000000000..79954699b Binary files /dev/null and b/companion/src/themes/monoblue/48/paste.png differ diff --git a/companion/src/themes/monoblue/48/play.png b/companion/src/themes/monoblue/48/play.png new file mode 100644 index 000000000..984ba0295 Binary files /dev/null and b/companion/src/themes/monoblue/48/play.png differ diff --git a/companion/src/themes/monoblue/48/preferences.png b/companion/src/themes/monoblue/48/preferences.png new file mode 100644 index 000000000..3b4d91a3b Binary files /dev/null and b/companion/src/themes/monoblue/48/preferences.png differ diff --git a/companion/src/themes/monoblue/48/print.png b/companion/src/themes/monoblue/48/print.png new file mode 100644 index 000000000..bd9eac8b8 Binary files /dev/null and b/companion/src/themes/monoblue/48/print.png differ diff --git a/companion/src/themes/monoblue/48/profiles.png b/companion/src/themes/monoblue/48/profiles.png new file mode 100644 index 000000000..20722810e Binary files /dev/null and b/companion/src/themes/monoblue/48/profiles.png differ diff --git a/companion/src/themes/monoblue/48/read_eeprom.png b/companion/src/themes/monoblue/48/read_eeprom.png new file mode 100644 index 000000000..6f545247f Binary files /dev/null and b/companion/src/themes/monoblue/48/read_eeprom.png differ diff --git a/companion/src/themes/monoblue/48/read_eeprom_file.png b/companion/src/themes/monoblue/48/read_eeprom_file.png new file mode 100644 index 000000000..d8476f45d Binary files /dev/null and b/companion/src/themes/monoblue/48/read_eeprom_file.png differ diff --git a/companion/src/themes/monoblue/48/read_flash.png b/companion/src/themes/monoblue/48/read_flash.png new file mode 100644 index 000000000..3af289f1a Binary files /dev/null and b/companion/src/themes/monoblue/48/read_flash.png differ diff --git a/companion/src/themes/monoblue/48/recentdocument.png b/companion/src/themes/monoblue/48/recentdocument.png new file mode 100644 index 000000000..795883872 Binary files /dev/null and b/companion/src/themes/monoblue/48/recentdocument.png differ diff --git a/companion/src/themes/monoblue/48/save.png b/companion/src/themes/monoblue/48/save.png new file mode 100644 index 000000000..d05062e95 Binary files /dev/null and b/companion/src/themes/monoblue/48/save.png differ diff --git a/companion/src/themes/monoblue/48/saveas.png b/companion/src/themes/monoblue/48/saveas.png new file mode 100644 index 000000000..cf57499c9 Binary files /dev/null and b/companion/src/themes/monoblue/48/saveas.png differ diff --git a/companion/src/themes/monoblue/48/simulate.png b/companion/src/themes/monoblue/48/simulate.png new file mode 100644 index 000000000..f33c8bf0d Binary files /dev/null and b/companion/src/themes/monoblue/48/simulate.png differ diff --git a/companion/src/themes/monoblue/48/stop.png b/companion/src/themes/monoblue/48/stop.png new file mode 100644 index 000000000..daf3459c7 Binary files /dev/null and b/companion/src/themes/monoblue/48/stop.png differ diff --git a/companion/src/themes/monoblue/48/update.png b/companion/src/themes/monoblue/48/update.png new file mode 100644 index 000000000..9b64290cf Binary files /dev/null and b/companion/src/themes/monoblue/48/update.png differ diff --git a/companion/src/themes/monoblue/48/wizard.png b/companion/src/themes/monoblue/48/wizard.png new file mode 100644 index 000000000..d7f879798 Binary files /dev/null and b/companion/src/themes/monoblue/48/wizard.png differ diff --git a/companion/src/themes/monoblue/48/write_eeprom.png b/companion/src/themes/monoblue/48/write_eeprom.png new file mode 100644 index 000000000..fb32ada8d Binary files /dev/null and b/companion/src/themes/monoblue/48/write_eeprom.png differ diff --git a/companion/src/themes/monoblue/48/write_eeprom_file.png b/companion/src/themes/monoblue/48/write_eeprom_file.png new file mode 100644 index 000000000..bfd3c46af Binary files /dev/null and b/companion/src/themes/monoblue/48/write_eeprom_file.png differ diff --git a/companion/src/themes/monoblue/48/write_flash.png b/companion/src/themes/monoblue/48/write_flash.png new file mode 100644 index 000000000..7c5167a70 Binary files /dev/null and b/companion/src/themes/monoblue/48/write_flash.png differ diff --git a/companion/src/themes/monochrome/16/add.png b/companion/src/themes/monochrome/16/add.png new file mode 100644 index 000000000..e2cb16737 Binary files /dev/null and b/companion/src/themes/monochrome/16/add.png differ diff --git a/companion/src/themes/monochrome/16/arrow-left.png b/companion/src/themes/monochrome/16/arrow-left.png new file mode 100644 index 000000000..df382a723 Binary files /dev/null and b/companion/src/themes/monochrome/16/arrow-left.png differ diff --git a/companion/src/themes/monochrome/16/arrow-right.png b/companion/src/themes/monochrome/16/arrow-right.png new file mode 100644 index 000000000..c2cf8ab8b Binary files /dev/null and b/companion/src/themes/monochrome/16/arrow-right.png differ diff --git a/companion/src/themes/monochrome/16/changelog.png b/companion/src/themes/monochrome/16/changelog.png new file mode 100644 index 000000000..e1eba6ff6 Binary files /dev/null and b/companion/src/themes/monochrome/16/changelog.png differ diff --git a/companion/src/themes/monochrome/16/clear.png b/companion/src/themes/monochrome/16/clear.png new file mode 100644 index 000000000..3d142f8af Binary files /dev/null and b/companion/src/themes/monochrome/16/clear.png differ diff --git a/companion/src/themes/monochrome/16/compare.png b/companion/src/themes/monochrome/16/compare.png new file mode 100644 index 000000000..553ddaa10 Binary files /dev/null and b/companion/src/themes/monochrome/16/compare.png differ diff --git a/companion/src/themes/monochrome/16/configure.png b/companion/src/themes/monochrome/16/configure.png new file mode 100644 index 000000000..6a3295aab Binary files /dev/null and b/companion/src/themes/monochrome/16/configure.png differ diff --git a/companion/src/themes/monochrome/16/contributors.png b/companion/src/themes/monochrome/16/contributors.png new file mode 100644 index 000000000..ca7664737 Binary files /dev/null and b/companion/src/themes/monochrome/16/contributors.png differ diff --git a/companion/src/themes/monochrome/16/copy.png b/companion/src/themes/monochrome/16/copy.png new file mode 100644 index 000000000..ffb5ad2f9 Binary files /dev/null and b/companion/src/themes/monochrome/16/copy.png differ diff --git a/companion/src/themes/monochrome/16/currentmodel.png b/companion/src/themes/monochrome/16/currentmodel.png new file mode 100644 index 000000000..2f9d72888 Binary files /dev/null and b/companion/src/themes/monochrome/16/currentmodel.png differ diff --git a/companion/src/themes/monochrome/16/cut.png b/companion/src/themes/monochrome/16/cut.png new file mode 100644 index 000000000..b590d2f13 Binary files /dev/null and b/companion/src/themes/monochrome/16/cut.png differ diff --git a/companion/src/themes/monochrome/16/duplicate.png b/companion/src/themes/monochrome/16/duplicate.png new file mode 100644 index 000000000..e2f532dfb Binary files /dev/null and b/companion/src/themes/monochrome/16/duplicate.png differ diff --git a/companion/src/themes/monochrome/16/edit.png b/companion/src/themes/monochrome/16/edit.png new file mode 100644 index 000000000..f4786d4b0 Binary files /dev/null and b/companion/src/themes/monochrome/16/edit.png differ diff --git a/companion/src/themes/monochrome/16/exit.png b/companion/src/themes/monochrome/16/exit.png new file mode 100644 index 000000000..b2b3c569c Binary files /dev/null and b/companion/src/themes/monochrome/16/exit.png differ diff --git a/companion/src/themes/monochrome/16/fuses.png b/companion/src/themes/monochrome/16/fuses.png new file mode 100644 index 000000000..521de6d3a Binary files /dev/null and b/companion/src/themes/monochrome/16/fuses.png differ diff --git a/companion/src/themes/monochrome/16/information.png b/companion/src/themes/monochrome/16/information.png new file mode 100644 index 000000000..d7016086e Binary files /dev/null and b/companion/src/themes/monochrome/16/information.png differ diff --git a/companion/src/themes/monochrome/16/library.png b/companion/src/themes/monochrome/16/library.png new file mode 100644 index 000000000..62b811606 Binary files /dev/null and b/companion/src/themes/monochrome/16/library.png differ diff --git a/companion/src/themes/monochrome/16/list.png b/companion/src/themes/monochrome/16/list.png new file mode 100644 index 000000000..5e71cd167 Binary files /dev/null and b/companion/src/themes/monochrome/16/list.png differ diff --git a/companion/src/themes/monochrome/16/logs.png b/companion/src/themes/monochrome/16/logs.png new file mode 100644 index 000000000..0cc2864d4 Binary files /dev/null and b/companion/src/themes/monochrome/16/logs.png differ diff --git a/companion/src/themes/monochrome/16/movedown.png b/companion/src/themes/monochrome/16/movedown.png new file mode 100644 index 000000000..ed017edfb Binary files /dev/null and b/companion/src/themes/monochrome/16/movedown.png differ diff --git a/companion/src/themes/monochrome/16/moveup.png b/companion/src/themes/monochrome/16/moveup.png new file mode 100644 index 000000000..0430b1a8e Binary files /dev/null and b/companion/src/themes/monochrome/16/moveup.png differ diff --git a/companion/src/themes/monochrome/16/new.png b/companion/src/themes/monochrome/16/new.png new file mode 100644 index 000000000..34930ebba Binary files /dev/null and b/companion/src/themes/monochrome/16/new.png differ diff --git a/companion/src/themes/monochrome/16/open.png b/companion/src/themes/monochrome/16/open.png new file mode 100644 index 000000000..4ee6b1cbd Binary files /dev/null and b/companion/src/themes/monochrome/16/open.png differ diff --git a/companion/src/themes/monochrome/16/paintbrush.png b/companion/src/themes/monochrome/16/paintbrush.png new file mode 100644 index 000000000..4333818ef Binary files /dev/null and b/companion/src/themes/monochrome/16/paintbrush.png differ diff --git a/companion/src/themes/monochrome/16/paste.png b/companion/src/themes/monochrome/16/paste.png new file mode 100644 index 000000000..e5d50479d Binary files /dev/null and b/companion/src/themes/monochrome/16/paste.png differ diff --git a/companion/src/themes/monochrome/16/play.png b/companion/src/themes/monochrome/16/play.png new file mode 100644 index 000000000..d4720f2d8 Binary files /dev/null and b/companion/src/themes/monochrome/16/play.png differ diff --git a/companion/src/themes/monochrome/16/preferences.png b/companion/src/themes/monochrome/16/preferences.png new file mode 100644 index 000000000..7b6770309 Binary files /dev/null and b/companion/src/themes/monochrome/16/preferences.png differ diff --git a/companion/src/themes/monochrome/16/print.png b/companion/src/themes/monochrome/16/print.png new file mode 100644 index 000000000..39191c939 Binary files /dev/null and b/companion/src/themes/monochrome/16/print.png differ diff --git a/companion/src/themes/monochrome/16/profiles.png b/companion/src/themes/monochrome/16/profiles.png new file mode 100644 index 000000000..01b13e3c7 Binary files /dev/null and b/companion/src/themes/monochrome/16/profiles.png differ diff --git a/companion/src/themes/monochrome/16/read_eeprom.png b/companion/src/themes/monochrome/16/read_eeprom.png new file mode 100644 index 000000000..b58582958 Binary files /dev/null and b/companion/src/themes/monochrome/16/read_eeprom.png differ diff --git a/companion/src/themes/monochrome/16/read_eeprom_file.png b/companion/src/themes/monochrome/16/read_eeprom_file.png new file mode 100644 index 000000000..214e82c4d Binary files /dev/null and b/companion/src/themes/monochrome/16/read_eeprom_file.png differ diff --git a/companion/src/themes/monochrome/16/read_flash.png b/companion/src/themes/monochrome/16/read_flash.png new file mode 100644 index 000000000..530c62174 Binary files /dev/null and b/companion/src/themes/monochrome/16/read_flash.png differ diff --git a/companion/src/themes/monochrome/16/recentdocument.png b/companion/src/themes/monochrome/16/recentdocument.png new file mode 100644 index 000000000..d3cf237f5 Binary files /dev/null and b/companion/src/themes/monochrome/16/recentdocument.png differ diff --git a/companion/src/themes/monochrome/16/save.png b/companion/src/themes/monochrome/16/save.png new file mode 100644 index 000000000..dbf6d8695 Binary files /dev/null and b/companion/src/themes/monochrome/16/save.png differ diff --git a/companion/src/themes/monochrome/16/saveas.png b/companion/src/themes/monochrome/16/saveas.png new file mode 100644 index 000000000..791c7be33 Binary files /dev/null and b/companion/src/themes/monochrome/16/saveas.png differ diff --git a/companion/src/themes/monochrome/16/simulate.png b/companion/src/themes/monochrome/16/simulate.png new file mode 100644 index 000000000..5ce854790 Binary files /dev/null and b/companion/src/themes/monochrome/16/simulate.png differ diff --git a/companion/src/themes/monochrome/16/stop.png b/companion/src/themes/monochrome/16/stop.png new file mode 100644 index 000000000..42610e416 Binary files /dev/null and b/companion/src/themes/monochrome/16/stop.png differ diff --git a/companion/src/themes/monochrome/16/update.png b/companion/src/themes/monochrome/16/update.png new file mode 100644 index 000000000..31b90cf36 Binary files /dev/null and b/companion/src/themes/monochrome/16/update.png differ diff --git a/companion/src/themes/monochrome/16/wizard.png b/companion/src/themes/monochrome/16/wizard.png new file mode 100644 index 000000000..d1301c613 Binary files /dev/null and b/companion/src/themes/monochrome/16/wizard.png differ diff --git a/companion/src/themes/monochrome/16/write_eeprom.png b/companion/src/themes/monochrome/16/write_eeprom.png new file mode 100644 index 000000000..6815c7668 Binary files /dev/null and b/companion/src/themes/monochrome/16/write_eeprom.png differ diff --git a/companion/src/themes/monochrome/16/write_eeprom_file.png b/companion/src/themes/monochrome/16/write_eeprom_file.png new file mode 100644 index 000000000..a7e7c36f8 Binary files /dev/null and b/companion/src/themes/monochrome/16/write_eeprom_file.png differ diff --git a/companion/src/themes/monochrome/16/write_flash.png b/companion/src/themes/monochrome/16/write_flash.png new file mode 100644 index 000000000..81cdccdbc Binary files /dev/null and b/companion/src/themes/monochrome/16/write_flash.png differ diff --git a/companion/src/themes/monochrome/24/add.png b/companion/src/themes/monochrome/24/add.png new file mode 100644 index 000000000..99c48a4c0 Binary files /dev/null and b/companion/src/themes/monochrome/24/add.png differ diff --git a/companion/src/themes/monochrome/24/arrow-left.png b/companion/src/themes/monochrome/24/arrow-left.png new file mode 100644 index 000000000..3e93c4017 Binary files /dev/null and b/companion/src/themes/monochrome/24/arrow-left.png differ diff --git a/companion/src/themes/monochrome/24/arrow-right.png b/companion/src/themes/monochrome/24/arrow-right.png new file mode 100644 index 000000000..be45fe369 Binary files /dev/null and b/companion/src/themes/monochrome/24/arrow-right.png differ diff --git a/companion/src/themes/monochrome/24/changelog.png b/companion/src/themes/monochrome/24/changelog.png new file mode 100644 index 000000000..2956077f3 Binary files /dev/null and b/companion/src/themes/monochrome/24/changelog.png differ diff --git a/companion/src/themes/monochrome/24/clear.png b/companion/src/themes/monochrome/24/clear.png new file mode 100644 index 000000000..e8eac19c2 Binary files /dev/null and b/companion/src/themes/monochrome/24/clear.png differ diff --git a/companion/src/themes/monochrome/24/compare.png b/companion/src/themes/monochrome/24/compare.png new file mode 100644 index 000000000..b2e3aedf7 Binary files /dev/null and b/companion/src/themes/monochrome/24/compare.png differ diff --git a/companion/src/themes/monochrome/24/configure.png b/companion/src/themes/monochrome/24/configure.png new file mode 100644 index 000000000..74b5af4bc Binary files /dev/null and b/companion/src/themes/monochrome/24/configure.png differ diff --git a/companion/src/themes/monochrome/24/contributors.png b/companion/src/themes/monochrome/24/contributors.png new file mode 100644 index 000000000..39a67f9f2 Binary files /dev/null and b/companion/src/themes/monochrome/24/contributors.png differ diff --git a/companion/src/themes/monochrome/24/copy.png b/companion/src/themes/monochrome/24/copy.png new file mode 100644 index 000000000..d430d14d2 Binary files /dev/null and b/companion/src/themes/monochrome/24/copy.png differ diff --git a/companion/src/themes/monochrome/24/currentmodel.png b/companion/src/themes/monochrome/24/currentmodel.png new file mode 100644 index 000000000..4bb610c08 Binary files /dev/null and b/companion/src/themes/monochrome/24/currentmodel.png differ diff --git a/companion/src/themes/monochrome/24/cut.png b/companion/src/themes/monochrome/24/cut.png new file mode 100644 index 000000000..3bae751c0 Binary files /dev/null and b/companion/src/themes/monochrome/24/cut.png differ diff --git a/companion/src/themes/monochrome/24/duplicate.png b/companion/src/themes/monochrome/24/duplicate.png new file mode 100644 index 000000000..d2bdebf91 Binary files /dev/null and b/companion/src/themes/monochrome/24/duplicate.png differ diff --git a/companion/src/themes/monochrome/24/edit.png b/companion/src/themes/monochrome/24/edit.png new file mode 100644 index 000000000..51eb06643 Binary files /dev/null and b/companion/src/themes/monochrome/24/edit.png differ diff --git a/companion/src/themes/monochrome/24/exit.png b/companion/src/themes/monochrome/24/exit.png new file mode 100644 index 000000000..c59387463 Binary files /dev/null and b/companion/src/themes/monochrome/24/exit.png differ diff --git a/companion/src/themes/monochrome/24/fuses.png b/companion/src/themes/monochrome/24/fuses.png new file mode 100644 index 000000000..c73efbb28 Binary files /dev/null and b/companion/src/themes/monochrome/24/fuses.png differ diff --git a/companion/src/themes/monochrome/24/information.png b/companion/src/themes/monochrome/24/information.png new file mode 100644 index 000000000..fe114efee Binary files /dev/null and b/companion/src/themes/monochrome/24/information.png differ diff --git a/companion/src/themes/monochrome/24/library.png b/companion/src/themes/monochrome/24/library.png new file mode 100644 index 000000000..d4713ac0c Binary files /dev/null and b/companion/src/themes/monochrome/24/library.png differ diff --git a/companion/src/themes/monochrome/24/list.png b/companion/src/themes/monochrome/24/list.png new file mode 100644 index 000000000..cb8b7d88d Binary files /dev/null and b/companion/src/themes/monochrome/24/list.png differ diff --git a/companion/src/themes/monochrome/24/logs.png b/companion/src/themes/monochrome/24/logs.png new file mode 100644 index 000000000..f57bb38fb Binary files /dev/null and b/companion/src/themes/monochrome/24/logs.png differ diff --git a/companion/src/themes/monochrome/24/movedown.png b/companion/src/themes/monochrome/24/movedown.png new file mode 100644 index 000000000..1f8c99746 Binary files /dev/null and b/companion/src/themes/monochrome/24/movedown.png differ diff --git a/companion/src/themes/monochrome/24/moveup.png b/companion/src/themes/monochrome/24/moveup.png new file mode 100644 index 000000000..828dc5de2 Binary files /dev/null and b/companion/src/themes/monochrome/24/moveup.png differ diff --git a/companion/src/themes/monochrome/24/new.png b/companion/src/themes/monochrome/24/new.png new file mode 100644 index 000000000..b5ffec497 Binary files /dev/null and b/companion/src/themes/monochrome/24/new.png differ diff --git a/companion/src/themes/monochrome/24/open.png b/companion/src/themes/monochrome/24/open.png new file mode 100644 index 000000000..28b83b508 Binary files /dev/null and b/companion/src/themes/monochrome/24/open.png differ diff --git a/companion/src/themes/monochrome/24/paintbrush.png b/companion/src/themes/monochrome/24/paintbrush.png new file mode 100644 index 000000000..98ae20c4a Binary files /dev/null and b/companion/src/themes/monochrome/24/paintbrush.png differ diff --git a/companion/src/themes/monochrome/24/paste.png b/companion/src/themes/monochrome/24/paste.png new file mode 100644 index 000000000..029692c5e Binary files /dev/null and b/companion/src/themes/monochrome/24/paste.png differ diff --git a/companion/src/themes/monochrome/24/play.png b/companion/src/themes/monochrome/24/play.png new file mode 100644 index 000000000..7e1b547d9 Binary files /dev/null and b/companion/src/themes/monochrome/24/play.png differ diff --git a/companion/src/themes/monochrome/24/preferences.png b/companion/src/themes/monochrome/24/preferences.png new file mode 100644 index 000000000..b5d585d1e Binary files /dev/null and b/companion/src/themes/monochrome/24/preferences.png differ diff --git a/companion/src/themes/monochrome/24/print.png b/companion/src/themes/monochrome/24/print.png new file mode 100644 index 000000000..7bc7237e9 Binary files /dev/null and b/companion/src/themes/monochrome/24/print.png differ diff --git a/companion/src/themes/monochrome/24/profiles.png b/companion/src/themes/monochrome/24/profiles.png new file mode 100644 index 000000000..1de64f42a Binary files /dev/null and b/companion/src/themes/monochrome/24/profiles.png differ diff --git a/companion/src/themes/monochrome/24/read_eeprom.png b/companion/src/themes/monochrome/24/read_eeprom.png new file mode 100644 index 000000000..c178e259b Binary files /dev/null and b/companion/src/themes/monochrome/24/read_eeprom.png differ diff --git a/companion/src/themes/monochrome/24/read_eeprom_file.png b/companion/src/themes/monochrome/24/read_eeprom_file.png new file mode 100644 index 000000000..b2e76b0d1 Binary files /dev/null and b/companion/src/themes/monochrome/24/read_eeprom_file.png differ diff --git a/companion/src/themes/monochrome/24/read_flash.png b/companion/src/themes/monochrome/24/read_flash.png new file mode 100644 index 000000000..2f57c0438 Binary files /dev/null and b/companion/src/themes/monochrome/24/read_flash.png differ diff --git a/companion/src/themes/monochrome/24/recentdocument.png b/companion/src/themes/monochrome/24/recentdocument.png new file mode 100644 index 000000000..e1fa23d42 Binary files /dev/null and b/companion/src/themes/monochrome/24/recentdocument.png differ diff --git a/companion/src/themes/monochrome/24/save.png b/companion/src/themes/monochrome/24/save.png new file mode 100644 index 000000000..25c779bf5 Binary files /dev/null and b/companion/src/themes/monochrome/24/save.png differ diff --git a/companion/src/themes/monochrome/24/saveas.png b/companion/src/themes/monochrome/24/saveas.png new file mode 100644 index 000000000..f18ad7783 Binary files /dev/null and b/companion/src/themes/monochrome/24/saveas.png differ diff --git a/companion/src/themes/monochrome/24/simulate.png b/companion/src/themes/monochrome/24/simulate.png new file mode 100644 index 000000000..b344c419a Binary files /dev/null and b/companion/src/themes/monochrome/24/simulate.png differ diff --git a/companion/src/themes/monochrome/24/stop.png b/companion/src/themes/monochrome/24/stop.png new file mode 100644 index 000000000..00f4ab1c1 Binary files /dev/null and b/companion/src/themes/monochrome/24/stop.png differ diff --git a/companion/src/themes/monochrome/24/update.png b/companion/src/themes/monochrome/24/update.png new file mode 100644 index 000000000..9ed1124cc Binary files /dev/null and b/companion/src/themes/monochrome/24/update.png differ diff --git a/companion/src/themes/monochrome/24/wizard.png b/companion/src/themes/monochrome/24/wizard.png new file mode 100644 index 000000000..6185d56c5 Binary files /dev/null and b/companion/src/themes/monochrome/24/wizard.png differ diff --git a/companion/src/themes/monochrome/24/write_eeprom.png b/companion/src/themes/monochrome/24/write_eeprom.png new file mode 100644 index 000000000..60e7f0ea5 Binary files /dev/null and b/companion/src/themes/monochrome/24/write_eeprom.png differ diff --git a/companion/src/themes/monochrome/24/write_eeprom_file.png b/companion/src/themes/monochrome/24/write_eeprom_file.png new file mode 100644 index 000000000..11b4444c5 Binary files /dev/null and b/companion/src/themes/monochrome/24/write_eeprom_file.png differ diff --git a/companion/src/themes/monochrome/24/write_flash.png b/companion/src/themes/monochrome/24/write_flash.png new file mode 100644 index 000000000..dc7242a10 Binary files /dev/null and b/companion/src/themes/monochrome/24/write_flash.png differ diff --git a/companion/src/themes/monochrome/32/add.png b/companion/src/themes/monochrome/32/add.png new file mode 100644 index 000000000..17697d5eb Binary files /dev/null and b/companion/src/themes/monochrome/32/add.png differ diff --git a/companion/src/themes/monochrome/32/arrow-left.png b/companion/src/themes/monochrome/32/arrow-left.png new file mode 100644 index 000000000..9fb8a885d Binary files /dev/null and b/companion/src/themes/monochrome/32/arrow-left.png differ diff --git a/companion/src/themes/monochrome/32/arrow-right.png b/companion/src/themes/monochrome/32/arrow-right.png new file mode 100644 index 000000000..ba8e1440d Binary files /dev/null and b/companion/src/themes/monochrome/32/arrow-right.png differ diff --git a/companion/src/themes/monochrome/32/changelog.png b/companion/src/themes/monochrome/32/changelog.png new file mode 100644 index 000000000..2e97b00a0 Binary files /dev/null and b/companion/src/themes/monochrome/32/changelog.png differ diff --git a/companion/src/themes/monochrome/32/clear.png b/companion/src/themes/monochrome/32/clear.png new file mode 100644 index 000000000..345e70b62 Binary files /dev/null and b/companion/src/themes/monochrome/32/clear.png differ diff --git a/companion/src/themes/monochrome/32/compare.png b/companion/src/themes/monochrome/32/compare.png new file mode 100644 index 000000000..34e437850 Binary files /dev/null and b/companion/src/themes/monochrome/32/compare.png differ diff --git a/companion/src/themes/monochrome/32/configure.png b/companion/src/themes/monochrome/32/configure.png new file mode 100644 index 000000000..8be5e988f Binary files /dev/null and b/companion/src/themes/monochrome/32/configure.png differ diff --git a/companion/src/themes/monochrome/32/contributors.png b/companion/src/themes/monochrome/32/contributors.png new file mode 100644 index 000000000..a51bc3c56 Binary files /dev/null and b/companion/src/themes/monochrome/32/contributors.png differ diff --git a/companion/src/themes/monochrome/32/copy.png b/companion/src/themes/monochrome/32/copy.png new file mode 100644 index 000000000..aae5f5302 Binary files /dev/null and b/companion/src/themes/monochrome/32/copy.png differ diff --git a/companion/src/themes/monochrome/32/currentmodel.png b/companion/src/themes/monochrome/32/currentmodel.png new file mode 100644 index 000000000..816752faf Binary files /dev/null and b/companion/src/themes/monochrome/32/currentmodel.png differ diff --git a/companion/src/themes/monochrome/32/cut.png b/companion/src/themes/monochrome/32/cut.png new file mode 100644 index 000000000..efbb2cd5d Binary files /dev/null and b/companion/src/themes/monochrome/32/cut.png differ diff --git a/companion/src/themes/monochrome/32/duplicate.png b/companion/src/themes/monochrome/32/duplicate.png new file mode 100644 index 000000000..43041429c Binary files /dev/null and b/companion/src/themes/monochrome/32/duplicate.png differ diff --git a/companion/src/themes/monochrome/32/edit.png b/companion/src/themes/monochrome/32/edit.png new file mode 100644 index 000000000..cebabbd9f Binary files /dev/null and b/companion/src/themes/monochrome/32/edit.png differ diff --git a/companion/src/themes/monochrome/32/exit.png b/companion/src/themes/monochrome/32/exit.png new file mode 100644 index 000000000..8de0aade5 Binary files /dev/null and b/companion/src/themes/monochrome/32/exit.png differ diff --git a/companion/src/themes/monochrome/32/fuses.png b/companion/src/themes/monochrome/32/fuses.png new file mode 100644 index 000000000..fee85de8b Binary files /dev/null and b/companion/src/themes/monochrome/32/fuses.png differ diff --git a/companion/src/themes/monochrome/32/information.png b/companion/src/themes/monochrome/32/information.png new file mode 100644 index 000000000..2e9c398f6 Binary files /dev/null and b/companion/src/themes/monochrome/32/information.png differ diff --git a/companion/src/themes/monochrome/32/library.png b/companion/src/themes/monochrome/32/library.png new file mode 100644 index 000000000..a3d112626 Binary files /dev/null and b/companion/src/themes/monochrome/32/library.png differ diff --git a/companion/src/themes/monochrome/32/list.png b/companion/src/themes/monochrome/32/list.png new file mode 100644 index 000000000..f94bafb12 Binary files /dev/null and b/companion/src/themes/monochrome/32/list.png differ diff --git a/companion/src/themes/monochrome/32/logs.png b/companion/src/themes/monochrome/32/logs.png new file mode 100644 index 000000000..f8f96b505 Binary files /dev/null and b/companion/src/themes/monochrome/32/logs.png differ diff --git a/companion/src/themes/monochrome/32/movedown.png b/companion/src/themes/monochrome/32/movedown.png new file mode 100644 index 000000000..0097679e1 Binary files /dev/null and b/companion/src/themes/monochrome/32/movedown.png differ diff --git a/companion/src/themes/monochrome/32/moveup.png b/companion/src/themes/monochrome/32/moveup.png new file mode 100644 index 000000000..ba68dcaa5 Binary files /dev/null and b/companion/src/themes/monochrome/32/moveup.png differ diff --git a/companion/src/themes/monochrome/32/new.png b/companion/src/themes/monochrome/32/new.png new file mode 100644 index 000000000..e9531c78a Binary files /dev/null and b/companion/src/themes/monochrome/32/new.png differ diff --git a/companion/src/themes/monochrome/32/open.png b/companion/src/themes/monochrome/32/open.png new file mode 100644 index 000000000..6f437856c Binary files /dev/null and b/companion/src/themes/monochrome/32/open.png differ diff --git a/companion/src/themes/monochrome/32/paintbrush.png b/companion/src/themes/monochrome/32/paintbrush.png new file mode 100644 index 000000000..34e25a170 Binary files /dev/null and b/companion/src/themes/monochrome/32/paintbrush.png differ diff --git a/companion/src/themes/monochrome/32/paste.png b/companion/src/themes/monochrome/32/paste.png new file mode 100644 index 000000000..33948a231 Binary files /dev/null and b/companion/src/themes/monochrome/32/paste.png differ diff --git a/companion/src/themes/monochrome/32/play.png b/companion/src/themes/monochrome/32/play.png new file mode 100644 index 000000000..d47a3040e Binary files /dev/null and b/companion/src/themes/monochrome/32/play.png differ diff --git a/companion/src/themes/monochrome/32/preferences.png b/companion/src/themes/monochrome/32/preferences.png new file mode 100644 index 000000000..d2ba00eaa Binary files /dev/null and b/companion/src/themes/monochrome/32/preferences.png differ diff --git a/companion/src/themes/monochrome/32/print.png b/companion/src/themes/monochrome/32/print.png new file mode 100644 index 000000000..1495a1eac Binary files /dev/null and b/companion/src/themes/monochrome/32/print.png differ diff --git a/companion/src/themes/monochrome/32/profiles.png b/companion/src/themes/monochrome/32/profiles.png new file mode 100644 index 000000000..0d5c86a47 Binary files /dev/null and b/companion/src/themes/monochrome/32/profiles.png differ diff --git a/companion/src/themes/monochrome/32/read_eeprom.png b/companion/src/themes/monochrome/32/read_eeprom.png new file mode 100644 index 000000000..46a4dfd50 Binary files /dev/null and b/companion/src/themes/monochrome/32/read_eeprom.png differ diff --git a/companion/src/themes/monochrome/32/read_eeprom_file.png b/companion/src/themes/monochrome/32/read_eeprom_file.png new file mode 100644 index 000000000..fd6479993 Binary files /dev/null and b/companion/src/themes/monochrome/32/read_eeprom_file.png differ diff --git a/companion/src/themes/monochrome/32/read_flash.png b/companion/src/themes/monochrome/32/read_flash.png new file mode 100644 index 000000000..546400894 Binary files /dev/null and b/companion/src/themes/monochrome/32/read_flash.png differ diff --git a/companion/src/themes/monochrome/32/recentdocument.png b/companion/src/themes/monochrome/32/recentdocument.png new file mode 100644 index 000000000..1dfbadb5d Binary files /dev/null and b/companion/src/themes/monochrome/32/recentdocument.png differ diff --git a/companion/src/themes/monochrome/32/save.png b/companion/src/themes/monochrome/32/save.png new file mode 100644 index 000000000..6466d6528 Binary files /dev/null and b/companion/src/themes/monochrome/32/save.png differ diff --git a/companion/src/themes/monochrome/32/saveas.png b/companion/src/themes/monochrome/32/saveas.png new file mode 100644 index 000000000..9cc2a72ef Binary files /dev/null and b/companion/src/themes/monochrome/32/saveas.png differ diff --git a/companion/src/themes/monochrome/32/simulate.png b/companion/src/themes/monochrome/32/simulate.png new file mode 100644 index 000000000..a7020777f Binary files /dev/null and b/companion/src/themes/monochrome/32/simulate.png differ diff --git a/companion/src/themes/monochrome/32/stop.png b/companion/src/themes/monochrome/32/stop.png new file mode 100644 index 000000000..a0338d139 Binary files /dev/null and b/companion/src/themes/monochrome/32/stop.png differ diff --git a/companion/src/themes/monochrome/32/update.png b/companion/src/themes/monochrome/32/update.png new file mode 100644 index 000000000..be4c746b0 Binary files /dev/null and b/companion/src/themes/monochrome/32/update.png differ diff --git a/companion/src/themes/monochrome/32/wizard.png b/companion/src/themes/monochrome/32/wizard.png new file mode 100644 index 000000000..edd01da61 Binary files /dev/null and b/companion/src/themes/monochrome/32/wizard.png differ diff --git a/companion/src/themes/monochrome/32/write_eeprom.png b/companion/src/themes/monochrome/32/write_eeprom.png new file mode 100644 index 000000000..deeec3b48 Binary files /dev/null and b/companion/src/themes/monochrome/32/write_eeprom.png differ diff --git a/companion/src/themes/monochrome/32/write_eeprom_file.png b/companion/src/themes/monochrome/32/write_eeprom_file.png new file mode 100644 index 000000000..925fecf47 Binary files /dev/null and b/companion/src/themes/monochrome/32/write_eeprom_file.png differ diff --git a/companion/src/themes/monochrome/32/write_flash.png b/companion/src/themes/monochrome/32/write_flash.png new file mode 100644 index 000000000..e5943a509 Binary files /dev/null and b/companion/src/themes/monochrome/32/write_flash.png differ diff --git a/companion/src/themes/monochrome/48/add.png b/companion/src/themes/monochrome/48/add.png new file mode 100644 index 000000000..023cdc45d Binary files /dev/null and b/companion/src/themes/monochrome/48/add.png differ diff --git a/companion/src/themes/monochrome/48/arrow-left.png b/companion/src/themes/monochrome/48/arrow-left.png new file mode 100644 index 000000000..c48e48c8e Binary files /dev/null and b/companion/src/themes/monochrome/48/arrow-left.png differ diff --git a/companion/src/themes/monochrome/48/arrow-right.png b/companion/src/themes/monochrome/48/arrow-right.png new file mode 100644 index 000000000..5264359aa Binary files /dev/null and b/companion/src/themes/monochrome/48/arrow-right.png differ diff --git a/companion/src/themes/monochrome/48/changelog.png b/companion/src/themes/monochrome/48/changelog.png new file mode 100644 index 000000000..28d60390d Binary files /dev/null and b/companion/src/themes/monochrome/48/changelog.png differ diff --git a/companion/src/themes/monochrome/48/clear.png b/companion/src/themes/monochrome/48/clear.png new file mode 100644 index 000000000..881bd0353 Binary files /dev/null and b/companion/src/themes/monochrome/48/clear.png differ diff --git a/companion/src/themes/monochrome/48/compare.png b/companion/src/themes/monochrome/48/compare.png new file mode 100644 index 000000000..993f6cf3f Binary files /dev/null and b/companion/src/themes/monochrome/48/compare.png differ diff --git a/companion/src/themes/monochrome/48/configure.png b/companion/src/themes/monochrome/48/configure.png new file mode 100644 index 000000000..fc799d600 Binary files /dev/null and b/companion/src/themes/monochrome/48/configure.png differ diff --git a/companion/src/themes/monochrome/48/contributors.png b/companion/src/themes/monochrome/48/contributors.png new file mode 100644 index 000000000..5c14d9e6b Binary files /dev/null and b/companion/src/themes/monochrome/48/contributors.png differ diff --git a/companion/src/themes/monochrome/48/copy.png b/companion/src/themes/monochrome/48/copy.png new file mode 100644 index 000000000..71cd70edc Binary files /dev/null and b/companion/src/themes/monochrome/48/copy.png differ diff --git a/companion/src/themes/monochrome/48/currentmodel.png b/companion/src/themes/monochrome/48/currentmodel.png new file mode 100644 index 000000000..d316a2b7b Binary files /dev/null and b/companion/src/themes/monochrome/48/currentmodel.png differ diff --git a/companion/src/themes/monochrome/48/cut.png b/companion/src/themes/monochrome/48/cut.png new file mode 100644 index 000000000..765a1b82c Binary files /dev/null and b/companion/src/themes/monochrome/48/cut.png differ diff --git a/companion/src/themes/monochrome/48/duplicate.png b/companion/src/themes/monochrome/48/duplicate.png new file mode 100644 index 000000000..0fa780134 Binary files /dev/null and b/companion/src/themes/monochrome/48/duplicate.png differ diff --git a/companion/src/themes/monochrome/48/edit.png b/companion/src/themes/monochrome/48/edit.png new file mode 100644 index 000000000..41975a687 Binary files /dev/null and b/companion/src/themes/monochrome/48/edit.png differ diff --git a/companion/src/themes/monochrome/48/exit.png b/companion/src/themes/monochrome/48/exit.png new file mode 100644 index 000000000..45707ae3e Binary files /dev/null and b/companion/src/themes/monochrome/48/exit.png differ diff --git a/companion/src/themes/monochrome/48/fuses.png b/companion/src/themes/monochrome/48/fuses.png new file mode 100644 index 000000000..b239abd99 Binary files /dev/null and b/companion/src/themes/monochrome/48/fuses.png differ diff --git a/companion/src/themes/monochrome/48/information.png b/companion/src/themes/monochrome/48/information.png new file mode 100644 index 000000000..4c4bea488 Binary files /dev/null and b/companion/src/themes/monochrome/48/information.png differ diff --git a/companion/src/themes/monochrome/48/library.png b/companion/src/themes/monochrome/48/library.png new file mode 100644 index 000000000..9a8e06146 Binary files /dev/null and b/companion/src/themes/monochrome/48/library.png differ diff --git a/companion/src/themes/monochrome/48/list.png b/companion/src/themes/monochrome/48/list.png new file mode 100644 index 000000000..7c0f3b575 Binary files /dev/null and b/companion/src/themes/monochrome/48/list.png differ diff --git a/companion/src/themes/monochrome/48/logs.png b/companion/src/themes/monochrome/48/logs.png new file mode 100644 index 000000000..0817b2f88 Binary files /dev/null and b/companion/src/themes/monochrome/48/logs.png differ diff --git a/companion/src/themes/monochrome/48/movedown.png b/companion/src/themes/monochrome/48/movedown.png new file mode 100644 index 000000000..9200c09c9 Binary files /dev/null and b/companion/src/themes/monochrome/48/movedown.png differ diff --git a/companion/src/themes/monochrome/48/moveup.png b/companion/src/themes/monochrome/48/moveup.png new file mode 100644 index 000000000..eff5c6e8b Binary files /dev/null and b/companion/src/themes/monochrome/48/moveup.png differ diff --git a/companion/src/themes/monochrome/48/new.png b/companion/src/themes/monochrome/48/new.png new file mode 100644 index 000000000..b4a0993ef Binary files /dev/null and b/companion/src/themes/monochrome/48/new.png differ diff --git a/companion/src/themes/monochrome/48/open.png b/companion/src/themes/monochrome/48/open.png new file mode 100644 index 000000000..5a151c74d Binary files /dev/null and b/companion/src/themes/monochrome/48/open.png differ diff --git a/companion/src/themes/monochrome/48/paintbrush.png b/companion/src/themes/monochrome/48/paintbrush.png new file mode 100644 index 000000000..cc15507e6 Binary files /dev/null and b/companion/src/themes/monochrome/48/paintbrush.png differ diff --git a/companion/src/themes/monochrome/48/paste.png b/companion/src/themes/monochrome/48/paste.png new file mode 100644 index 000000000..377ace021 Binary files /dev/null and b/companion/src/themes/monochrome/48/paste.png differ diff --git a/companion/src/themes/monochrome/48/play.png b/companion/src/themes/monochrome/48/play.png new file mode 100644 index 000000000..740f36842 Binary files /dev/null and b/companion/src/themes/monochrome/48/play.png differ diff --git a/companion/src/themes/monochrome/48/preferences.png b/companion/src/themes/monochrome/48/preferences.png new file mode 100644 index 000000000..8f1199953 Binary files /dev/null and b/companion/src/themes/monochrome/48/preferences.png differ diff --git a/companion/src/themes/monochrome/48/print.png b/companion/src/themes/monochrome/48/print.png new file mode 100644 index 000000000..c830db3ea Binary files /dev/null and b/companion/src/themes/monochrome/48/print.png differ diff --git a/companion/src/themes/monochrome/48/profiles.png b/companion/src/themes/monochrome/48/profiles.png new file mode 100644 index 000000000..0489ffaa6 Binary files /dev/null and b/companion/src/themes/monochrome/48/profiles.png differ diff --git a/companion/src/themes/monochrome/48/read_eeprom.png b/companion/src/themes/monochrome/48/read_eeprom.png new file mode 100644 index 000000000..c5d3a1167 Binary files /dev/null and b/companion/src/themes/monochrome/48/read_eeprom.png differ diff --git a/companion/src/themes/monochrome/48/read_eeprom_file.png b/companion/src/themes/monochrome/48/read_eeprom_file.png new file mode 100644 index 000000000..48396fbfe Binary files /dev/null and b/companion/src/themes/monochrome/48/read_eeprom_file.png differ diff --git a/companion/src/themes/monochrome/48/read_flash.png b/companion/src/themes/monochrome/48/read_flash.png new file mode 100644 index 000000000..356a6f9ad Binary files /dev/null and b/companion/src/themes/monochrome/48/read_flash.png differ diff --git a/companion/src/themes/monochrome/48/recentdocument.png b/companion/src/themes/monochrome/48/recentdocument.png new file mode 100644 index 000000000..aed0796fe Binary files /dev/null and b/companion/src/themes/monochrome/48/recentdocument.png differ diff --git a/companion/src/themes/monochrome/48/save.png b/companion/src/themes/monochrome/48/save.png new file mode 100644 index 000000000..0b9663106 Binary files /dev/null and b/companion/src/themes/monochrome/48/save.png differ diff --git a/companion/src/themes/monochrome/48/saveas.png b/companion/src/themes/monochrome/48/saveas.png new file mode 100644 index 000000000..496e95e6c Binary files /dev/null and b/companion/src/themes/monochrome/48/saveas.png differ diff --git a/companion/src/themes/monochrome/48/simulate.png b/companion/src/themes/monochrome/48/simulate.png new file mode 100644 index 000000000..7c05d5604 Binary files /dev/null and b/companion/src/themes/monochrome/48/simulate.png differ diff --git a/companion/src/themes/monochrome/48/stop.png b/companion/src/themes/monochrome/48/stop.png new file mode 100644 index 000000000..c513babaa Binary files /dev/null and b/companion/src/themes/monochrome/48/stop.png differ diff --git a/companion/src/themes/monochrome/48/update.png b/companion/src/themes/monochrome/48/update.png new file mode 100644 index 000000000..6128f49d7 Binary files /dev/null and b/companion/src/themes/monochrome/48/update.png differ diff --git a/companion/src/themes/monochrome/48/wizard.png b/companion/src/themes/monochrome/48/wizard.png new file mode 100644 index 000000000..4d1a67729 Binary files /dev/null and b/companion/src/themes/monochrome/48/wizard.png differ diff --git a/companion/src/themes/monochrome/48/write_eeprom.png b/companion/src/themes/monochrome/48/write_eeprom.png new file mode 100644 index 000000000..0318d748a Binary files /dev/null and b/companion/src/themes/monochrome/48/write_eeprom.png differ diff --git a/companion/src/themes/monochrome/48/write_eeprom_file.png b/companion/src/themes/monochrome/48/write_eeprom_file.png new file mode 100644 index 000000000..2d9d43eaa Binary files /dev/null and b/companion/src/themes/monochrome/48/write_eeprom_file.png differ diff --git a/companion/src/themes/monochrome/48/write_flash.png b/companion/src/themes/monochrome/48/write_flash.png new file mode 100644 index 000000000..d20eb763a Binary files /dev/null and b/companion/src/themes/monochrome/48/write_flash.png differ diff --git a/companion/src/themes/monowhite/16/add.png b/companion/src/themes/monowhite/16/add.png new file mode 100644 index 000000000..0d768aa67 Binary files /dev/null and b/companion/src/themes/monowhite/16/add.png differ diff --git a/companion/src/themes/monowhite/16/arrow-left.png b/companion/src/themes/monowhite/16/arrow-left.png new file mode 100644 index 000000000..66e5655a6 Binary files /dev/null and b/companion/src/themes/monowhite/16/arrow-left.png differ diff --git a/companion/src/themes/monowhite/16/arrow-right.png b/companion/src/themes/monowhite/16/arrow-right.png new file mode 100644 index 000000000..bb5de71d8 Binary files /dev/null and b/companion/src/themes/monowhite/16/arrow-right.png differ diff --git a/companion/src/themes/monowhite/16/changelog.png b/companion/src/themes/monowhite/16/changelog.png new file mode 100644 index 000000000..3a20018b3 Binary files /dev/null and b/companion/src/themes/monowhite/16/changelog.png differ diff --git a/companion/src/themes/monowhite/16/clear.png b/companion/src/themes/monowhite/16/clear.png new file mode 100644 index 000000000..b76693837 Binary files /dev/null and b/companion/src/themes/monowhite/16/clear.png differ diff --git a/companion/src/themes/monowhite/16/compare.png b/companion/src/themes/monowhite/16/compare.png new file mode 100644 index 000000000..cd3ac1c4a Binary files /dev/null and b/companion/src/themes/monowhite/16/compare.png differ diff --git a/companion/src/themes/monowhite/16/configure.png b/companion/src/themes/monowhite/16/configure.png new file mode 100644 index 000000000..80ad99455 Binary files /dev/null and b/companion/src/themes/monowhite/16/configure.png differ diff --git a/companion/src/themes/monowhite/16/contributors.png b/companion/src/themes/monowhite/16/contributors.png new file mode 100644 index 000000000..f7a642e0d Binary files /dev/null and b/companion/src/themes/monowhite/16/contributors.png differ diff --git a/companion/src/themes/monowhite/16/copy.png b/companion/src/themes/monowhite/16/copy.png new file mode 100644 index 000000000..955d49339 Binary files /dev/null and b/companion/src/themes/monowhite/16/copy.png differ diff --git a/companion/src/themes/monowhite/16/currentmodel.png b/companion/src/themes/monowhite/16/currentmodel.png new file mode 100644 index 000000000..380545d7a Binary files /dev/null and b/companion/src/themes/monowhite/16/currentmodel.png differ diff --git a/companion/src/themes/monowhite/16/cut.png b/companion/src/themes/monowhite/16/cut.png new file mode 100644 index 000000000..4805fef12 Binary files /dev/null and b/companion/src/themes/monowhite/16/cut.png differ diff --git a/companion/src/themes/monowhite/16/duplicate.png b/companion/src/themes/monowhite/16/duplicate.png new file mode 100644 index 000000000..a87833097 Binary files /dev/null and b/companion/src/themes/monowhite/16/duplicate.png differ diff --git a/companion/src/themes/monowhite/16/edit.png b/companion/src/themes/monowhite/16/edit.png new file mode 100644 index 000000000..8c7d5ecac Binary files /dev/null and b/companion/src/themes/monowhite/16/edit.png differ diff --git a/companion/src/themes/monowhite/16/exit.png b/companion/src/themes/monowhite/16/exit.png new file mode 100644 index 000000000..dba574237 Binary files /dev/null and b/companion/src/themes/monowhite/16/exit.png differ diff --git a/companion/src/themes/monowhite/16/fuses.png b/companion/src/themes/monowhite/16/fuses.png new file mode 100644 index 000000000..f49e7fc46 Binary files /dev/null and b/companion/src/themes/monowhite/16/fuses.png differ diff --git a/companion/src/themes/monowhite/16/information.png b/companion/src/themes/monowhite/16/information.png new file mode 100644 index 000000000..d31b660b5 Binary files /dev/null and b/companion/src/themes/monowhite/16/information.png differ diff --git a/companion/src/themes/monowhite/16/library.png b/companion/src/themes/monowhite/16/library.png new file mode 100644 index 000000000..0073fb1e2 Binary files /dev/null and b/companion/src/themes/monowhite/16/library.png differ diff --git a/companion/src/themes/monowhite/16/list.png b/companion/src/themes/monowhite/16/list.png new file mode 100644 index 000000000..e79516bbf Binary files /dev/null and b/companion/src/themes/monowhite/16/list.png differ diff --git a/companion/src/themes/monowhite/16/logs.png b/companion/src/themes/monowhite/16/logs.png new file mode 100644 index 000000000..887c222db Binary files /dev/null and b/companion/src/themes/monowhite/16/logs.png differ diff --git a/companion/src/themes/monowhite/16/movedown.png b/companion/src/themes/monowhite/16/movedown.png new file mode 100644 index 000000000..917982429 Binary files /dev/null and b/companion/src/themes/monowhite/16/movedown.png differ diff --git a/companion/src/themes/monowhite/16/moveup.png b/companion/src/themes/monowhite/16/moveup.png new file mode 100644 index 000000000..bd7f80940 Binary files /dev/null and b/companion/src/themes/monowhite/16/moveup.png differ diff --git a/companion/src/themes/monowhite/16/new.png b/companion/src/themes/monowhite/16/new.png new file mode 100644 index 000000000..86e90a978 Binary files /dev/null and b/companion/src/themes/monowhite/16/new.png differ diff --git a/companion/src/themes/monowhite/16/open.png b/companion/src/themes/monowhite/16/open.png new file mode 100644 index 000000000..a5b958161 Binary files /dev/null and b/companion/src/themes/monowhite/16/open.png differ diff --git a/companion/src/themes/monowhite/16/paintbrush.png b/companion/src/themes/monowhite/16/paintbrush.png new file mode 100644 index 000000000..c2724c510 Binary files /dev/null and b/companion/src/themes/monowhite/16/paintbrush.png differ diff --git a/companion/src/themes/monowhite/16/paste.png b/companion/src/themes/monowhite/16/paste.png new file mode 100644 index 000000000..c24f818b7 Binary files /dev/null and b/companion/src/themes/monowhite/16/paste.png differ diff --git a/companion/src/themes/monowhite/16/play.png b/companion/src/themes/monowhite/16/play.png new file mode 100644 index 000000000..a3bb9afc2 Binary files /dev/null and b/companion/src/themes/monowhite/16/play.png differ diff --git a/companion/src/themes/monowhite/16/preferences.png b/companion/src/themes/monowhite/16/preferences.png new file mode 100644 index 000000000..e0b1438ee Binary files /dev/null and b/companion/src/themes/monowhite/16/preferences.png differ diff --git a/companion/src/themes/monowhite/16/print.png b/companion/src/themes/monowhite/16/print.png new file mode 100644 index 000000000..81033fef9 Binary files /dev/null and b/companion/src/themes/monowhite/16/print.png differ diff --git a/companion/src/themes/monowhite/16/profiles.png b/companion/src/themes/monowhite/16/profiles.png new file mode 100644 index 000000000..6039ba23c Binary files /dev/null and b/companion/src/themes/monowhite/16/profiles.png differ diff --git a/companion/src/themes/monowhite/16/read_eeprom.png b/companion/src/themes/monowhite/16/read_eeprom.png new file mode 100644 index 000000000..da655ea1c Binary files /dev/null and b/companion/src/themes/monowhite/16/read_eeprom.png differ diff --git a/companion/src/themes/monowhite/16/read_eeprom_file.png b/companion/src/themes/monowhite/16/read_eeprom_file.png new file mode 100644 index 000000000..beda75e23 Binary files /dev/null and b/companion/src/themes/monowhite/16/read_eeprom_file.png differ diff --git a/companion/src/themes/monowhite/16/read_flash.png b/companion/src/themes/monowhite/16/read_flash.png new file mode 100644 index 000000000..5c96aea72 Binary files /dev/null and b/companion/src/themes/monowhite/16/read_flash.png differ diff --git a/companion/src/themes/monowhite/16/recentdocument.png b/companion/src/themes/monowhite/16/recentdocument.png new file mode 100644 index 000000000..9ac53e0f3 Binary files /dev/null and b/companion/src/themes/monowhite/16/recentdocument.png differ diff --git a/companion/src/themes/monowhite/16/save.png b/companion/src/themes/monowhite/16/save.png new file mode 100644 index 000000000..25c1dc9b8 Binary files /dev/null and b/companion/src/themes/monowhite/16/save.png differ diff --git a/companion/src/themes/monowhite/16/saveas.png b/companion/src/themes/monowhite/16/saveas.png new file mode 100644 index 000000000..129a54394 Binary files /dev/null and b/companion/src/themes/monowhite/16/saveas.png differ diff --git a/companion/src/themes/monowhite/16/simulate.png b/companion/src/themes/monowhite/16/simulate.png new file mode 100644 index 000000000..981976c19 Binary files /dev/null and b/companion/src/themes/monowhite/16/simulate.png differ diff --git a/companion/src/themes/monowhite/16/stop.png b/companion/src/themes/monowhite/16/stop.png new file mode 100644 index 000000000..886a8459c Binary files /dev/null and b/companion/src/themes/monowhite/16/stop.png differ diff --git a/companion/src/themes/monowhite/16/update.png b/companion/src/themes/monowhite/16/update.png new file mode 100644 index 000000000..ce5250fad Binary files /dev/null and b/companion/src/themes/monowhite/16/update.png differ diff --git a/companion/src/themes/monowhite/16/wizard.png b/companion/src/themes/monowhite/16/wizard.png new file mode 100644 index 000000000..09f0ac05d Binary files /dev/null and b/companion/src/themes/monowhite/16/wizard.png differ diff --git a/companion/src/themes/monowhite/16/write_eeprom.png b/companion/src/themes/monowhite/16/write_eeprom.png new file mode 100644 index 000000000..e5f1f5dc5 Binary files /dev/null and b/companion/src/themes/monowhite/16/write_eeprom.png differ diff --git a/companion/src/themes/monowhite/16/write_eeprom_file.png b/companion/src/themes/monowhite/16/write_eeprom_file.png new file mode 100644 index 000000000..6bcdbc23b Binary files /dev/null and b/companion/src/themes/monowhite/16/write_eeprom_file.png differ diff --git a/companion/src/themes/monowhite/16/write_flash.png b/companion/src/themes/monowhite/16/write_flash.png new file mode 100644 index 000000000..50350ff62 Binary files /dev/null and b/companion/src/themes/monowhite/16/write_flash.png differ diff --git a/companion/src/themes/monowhite/24/add.png b/companion/src/themes/monowhite/24/add.png new file mode 100644 index 000000000..fb461e23a Binary files /dev/null and b/companion/src/themes/monowhite/24/add.png differ diff --git a/companion/src/themes/monowhite/24/arrow-left.png b/companion/src/themes/monowhite/24/arrow-left.png new file mode 100644 index 000000000..5a0d451f4 Binary files /dev/null and b/companion/src/themes/monowhite/24/arrow-left.png differ diff --git a/companion/src/themes/monowhite/24/arrow-right.png b/companion/src/themes/monowhite/24/arrow-right.png new file mode 100644 index 000000000..ae71f1037 Binary files /dev/null and b/companion/src/themes/monowhite/24/arrow-right.png differ diff --git a/companion/src/themes/monowhite/24/changelog.png b/companion/src/themes/monowhite/24/changelog.png new file mode 100644 index 000000000..b57433a35 Binary files /dev/null and b/companion/src/themes/monowhite/24/changelog.png differ diff --git a/companion/src/themes/monowhite/24/clear.png b/companion/src/themes/monowhite/24/clear.png new file mode 100644 index 000000000..204df5685 Binary files /dev/null and b/companion/src/themes/monowhite/24/clear.png differ diff --git a/companion/src/themes/monowhite/24/compare.png b/companion/src/themes/monowhite/24/compare.png new file mode 100644 index 000000000..696cc9ee4 Binary files /dev/null and b/companion/src/themes/monowhite/24/compare.png differ diff --git a/companion/src/themes/monowhite/24/configure.png b/companion/src/themes/monowhite/24/configure.png new file mode 100644 index 000000000..10933599f Binary files /dev/null and b/companion/src/themes/monowhite/24/configure.png differ diff --git a/companion/src/themes/monowhite/24/contributors.png b/companion/src/themes/monowhite/24/contributors.png new file mode 100644 index 000000000..240b20e65 Binary files /dev/null and b/companion/src/themes/monowhite/24/contributors.png differ diff --git a/companion/src/themes/monowhite/24/copy.png b/companion/src/themes/monowhite/24/copy.png new file mode 100644 index 000000000..7f2c32d2a Binary files /dev/null and b/companion/src/themes/monowhite/24/copy.png differ diff --git a/companion/src/themes/monowhite/24/currentmodel.png b/companion/src/themes/monowhite/24/currentmodel.png new file mode 100644 index 000000000..b42dce8da Binary files /dev/null and b/companion/src/themes/monowhite/24/currentmodel.png differ diff --git a/companion/src/themes/monowhite/24/cut.png b/companion/src/themes/monowhite/24/cut.png new file mode 100644 index 000000000..819a864a7 Binary files /dev/null and b/companion/src/themes/monowhite/24/cut.png differ diff --git a/companion/src/themes/monowhite/24/duplicate.png b/companion/src/themes/monowhite/24/duplicate.png new file mode 100644 index 000000000..16a36c3f5 Binary files /dev/null and b/companion/src/themes/monowhite/24/duplicate.png differ diff --git a/companion/src/themes/monowhite/24/edit.png b/companion/src/themes/monowhite/24/edit.png new file mode 100644 index 000000000..1a50c1a29 Binary files /dev/null and b/companion/src/themes/monowhite/24/edit.png differ diff --git a/companion/src/themes/monowhite/24/exit.png b/companion/src/themes/monowhite/24/exit.png new file mode 100644 index 000000000..1b240513f Binary files /dev/null and b/companion/src/themes/monowhite/24/exit.png differ diff --git a/companion/src/themes/monowhite/24/fuses.png b/companion/src/themes/monowhite/24/fuses.png new file mode 100644 index 000000000..38f4a0cf7 Binary files /dev/null and b/companion/src/themes/monowhite/24/fuses.png differ diff --git a/companion/src/themes/monowhite/24/information.png b/companion/src/themes/monowhite/24/information.png new file mode 100644 index 000000000..3404bc82b Binary files /dev/null and b/companion/src/themes/monowhite/24/information.png differ diff --git a/companion/src/themes/monowhite/24/library.png b/companion/src/themes/monowhite/24/library.png new file mode 100644 index 000000000..433519ac6 Binary files /dev/null and b/companion/src/themes/monowhite/24/library.png differ diff --git a/companion/src/themes/monowhite/24/list.png b/companion/src/themes/monowhite/24/list.png new file mode 100644 index 000000000..ba570f3e9 Binary files /dev/null and b/companion/src/themes/monowhite/24/list.png differ diff --git a/companion/src/themes/monowhite/24/logs.png b/companion/src/themes/monowhite/24/logs.png new file mode 100644 index 000000000..dd75b973e Binary files /dev/null and b/companion/src/themes/monowhite/24/logs.png differ diff --git a/companion/src/themes/monowhite/24/movedown.png b/companion/src/themes/monowhite/24/movedown.png new file mode 100644 index 000000000..7d99daf0a Binary files /dev/null and b/companion/src/themes/monowhite/24/movedown.png differ diff --git a/companion/src/themes/monowhite/24/moveup.png b/companion/src/themes/monowhite/24/moveup.png new file mode 100644 index 000000000..fd887b4f0 Binary files /dev/null and b/companion/src/themes/monowhite/24/moveup.png differ diff --git a/companion/src/themes/monowhite/24/new.png b/companion/src/themes/monowhite/24/new.png new file mode 100644 index 000000000..35b2f9dc4 Binary files /dev/null and b/companion/src/themes/monowhite/24/new.png differ diff --git a/companion/src/themes/monowhite/24/open.png b/companion/src/themes/monowhite/24/open.png new file mode 100644 index 000000000..dac2360a0 Binary files /dev/null and b/companion/src/themes/monowhite/24/open.png differ diff --git a/companion/src/themes/monowhite/24/paintbrush.png b/companion/src/themes/monowhite/24/paintbrush.png new file mode 100644 index 000000000..bbb1bad65 Binary files /dev/null and b/companion/src/themes/monowhite/24/paintbrush.png differ diff --git a/companion/src/themes/monowhite/24/paste.png b/companion/src/themes/monowhite/24/paste.png new file mode 100644 index 000000000..b18ede978 Binary files /dev/null and b/companion/src/themes/monowhite/24/paste.png differ diff --git a/companion/src/themes/monowhite/24/play.png b/companion/src/themes/monowhite/24/play.png new file mode 100644 index 000000000..4d469ea5f Binary files /dev/null and b/companion/src/themes/monowhite/24/play.png differ diff --git a/companion/src/themes/monowhite/24/preferences.png b/companion/src/themes/monowhite/24/preferences.png new file mode 100644 index 000000000..06571c513 Binary files /dev/null and b/companion/src/themes/monowhite/24/preferences.png differ diff --git a/companion/src/themes/monowhite/24/print.png b/companion/src/themes/monowhite/24/print.png new file mode 100644 index 000000000..58fb27833 Binary files /dev/null and b/companion/src/themes/monowhite/24/print.png differ diff --git a/companion/src/themes/monowhite/24/profiles.png b/companion/src/themes/monowhite/24/profiles.png new file mode 100644 index 000000000..45d781190 Binary files /dev/null and b/companion/src/themes/monowhite/24/profiles.png differ diff --git a/companion/src/themes/monowhite/24/read_eeprom.png b/companion/src/themes/monowhite/24/read_eeprom.png new file mode 100644 index 000000000..1f7fb9e4f Binary files /dev/null and b/companion/src/themes/monowhite/24/read_eeprom.png differ diff --git a/companion/src/themes/monowhite/24/read_eeprom_file.png b/companion/src/themes/monowhite/24/read_eeprom_file.png new file mode 100644 index 000000000..53d89e9c0 Binary files /dev/null and b/companion/src/themes/monowhite/24/read_eeprom_file.png differ diff --git a/companion/src/themes/monowhite/24/read_flash.png b/companion/src/themes/monowhite/24/read_flash.png new file mode 100644 index 000000000..816ac9bcf Binary files /dev/null and b/companion/src/themes/monowhite/24/read_flash.png differ diff --git a/companion/src/themes/monowhite/24/recentdocument.png b/companion/src/themes/monowhite/24/recentdocument.png new file mode 100644 index 000000000..bee2f4c59 Binary files /dev/null and b/companion/src/themes/monowhite/24/recentdocument.png differ diff --git a/companion/src/themes/monowhite/24/save.png b/companion/src/themes/monowhite/24/save.png new file mode 100644 index 000000000..6861f1349 Binary files /dev/null and b/companion/src/themes/monowhite/24/save.png differ diff --git a/companion/src/themes/monowhite/24/saveas.png b/companion/src/themes/monowhite/24/saveas.png new file mode 100644 index 000000000..2dfa4f21e Binary files /dev/null and b/companion/src/themes/monowhite/24/saveas.png differ diff --git a/companion/src/themes/monowhite/24/simulate.png b/companion/src/themes/monowhite/24/simulate.png new file mode 100644 index 000000000..a836dd016 Binary files /dev/null and b/companion/src/themes/monowhite/24/simulate.png differ diff --git a/companion/src/themes/monowhite/24/stop.png b/companion/src/themes/monowhite/24/stop.png new file mode 100644 index 000000000..d882a7270 Binary files /dev/null and b/companion/src/themes/monowhite/24/stop.png differ diff --git a/companion/src/themes/monowhite/24/update.png b/companion/src/themes/monowhite/24/update.png new file mode 100644 index 000000000..64f732f1c Binary files /dev/null and b/companion/src/themes/monowhite/24/update.png differ diff --git a/companion/src/themes/monowhite/24/wizard.png b/companion/src/themes/monowhite/24/wizard.png new file mode 100644 index 000000000..d25dcf529 Binary files /dev/null and b/companion/src/themes/monowhite/24/wizard.png differ diff --git a/companion/src/themes/monowhite/24/write_eeprom.png b/companion/src/themes/monowhite/24/write_eeprom.png new file mode 100644 index 000000000..481cefa9e Binary files /dev/null and b/companion/src/themes/monowhite/24/write_eeprom.png differ diff --git a/companion/src/themes/monowhite/24/write_eeprom_file.png b/companion/src/themes/monowhite/24/write_eeprom_file.png new file mode 100644 index 000000000..2401be1a2 Binary files /dev/null and b/companion/src/themes/monowhite/24/write_eeprom_file.png differ diff --git a/companion/src/themes/monowhite/24/write_flash.png b/companion/src/themes/monowhite/24/write_flash.png new file mode 100644 index 000000000..dc0ba7db2 Binary files /dev/null and b/companion/src/themes/monowhite/24/write_flash.png differ diff --git a/companion/src/themes/monowhite/32/add.png b/companion/src/themes/monowhite/32/add.png new file mode 100644 index 000000000..cea176a31 Binary files /dev/null and b/companion/src/themes/monowhite/32/add.png differ diff --git a/companion/src/themes/monowhite/32/arrow-left.png b/companion/src/themes/monowhite/32/arrow-left.png new file mode 100644 index 000000000..48deb7182 Binary files /dev/null and b/companion/src/themes/monowhite/32/arrow-left.png differ diff --git a/companion/src/themes/monowhite/32/arrow-right.png b/companion/src/themes/monowhite/32/arrow-right.png new file mode 100644 index 000000000..3e6566edb Binary files /dev/null and b/companion/src/themes/monowhite/32/arrow-right.png differ diff --git a/companion/src/themes/monowhite/32/changelog.png b/companion/src/themes/monowhite/32/changelog.png new file mode 100644 index 000000000..397a99c2c Binary files /dev/null and b/companion/src/themes/monowhite/32/changelog.png differ diff --git a/companion/src/themes/monowhite/32/clear.png b/companion/src/themes/monowhite/32/clear.png new file mode 100644 index 000000000..ac0931302 Binary files /dev/null and b/companion/src/themes/monowhite/32/clear.png differ diff --git a/companion/src/themes/monowhite/32/compare.png b/companion/src/themes/monowhite/32/compare.png new file mode 100644 index 000000000..415091a75 Binary files /dev/null and b/companion/src/themes/monowhite/32/compare.png differ diff --git a/companion/src/themes/monowhite/32/configure.png b/companion/src/themes/monowhite/32/configure.png new file mode 100644 index 000000000..9f32d1d02 Binary files /dev/null and b/companion/src/themes/monowhite/32/configure.png differ diff --git a/companion/src/themes/monowhite/32/contributors.png b/companion/src/themes/monowhite/32/contributors.png new file mode 100644 index 000000000..89fbf7950 Binary files /dev/null and b/companion/src/themes/monowhite/32/contributors.png differ diff --git a/companion/src/themes/monowhite/32/copy.png b/companion/src/themes/monowhite/32/copy.png new file mode 100644 index 000000000..837b2365d Binary files /dev/null and b/companion/src/themes/monowhite/32/copy.png differ diff --git a/companion/src/themes/monowhite/32/currentmodel.png b/companion/src/themes/monowhite/32/currentmodel.png new file mode 100644 index 000000000..89af84e37 Binary files /dev/null and b/companion/src/themes/monowhite/32/currentmodel.png differ diff --git a/companion/src/themes/monowhite/32/cut.png b/companion/src/themes/monowhite/32/cut.png new file mode 100644 index 000000000..c67cdbc05 Binary files /dev/null and b/companion/src/themes/monowhite/32/cut.png differ diff --git a/companion/src/themes/monowhite/32/duplicate.png b/companion/src/themes/monowhite/32/duplicate.png new file mode 100644 index 000000000..5bbda5fa9 Binary files /dev/null and b/companion/src/themes/monowhite/32/duplicate.png differ diff --git a/companion/src/themes/monowhite/32/edit.png b/companion/src/themes/monowhite/32/edit.png new file mode 100644 index 000000000..8076a8794 Binary files /dev/null and b/companion/src/themes/monowhite/32/edit.png differ diff --git a/companion/src/themes/monowhite/32/exit.png b/companion/src/themes/monowhite/32/exit.png new file mode 100644 index 000000000..47e97403a Binary files /dev/null and b/companion/src/themes/monowhite/32/exit.png differ diff --git a/companion/src/themes/monowhite/32/fuses.png b/companion/src/themes/monowhite/32/fuses.png new file mode 100644 index 000000000..9df1d5ff4 Binary files /dev/null and b/companion/src/themes/monowhite/32/fuses.png differ diff --git a/companion/src/themes/monowhite/32/information.png b/companion/src/themes/monowhite/32/information.png new file mode 100644 index 000000000..04344bd26 Binary files /dev/null and b/companion/src/themes/monowhite/32/information.png differ diff --git a/companion/src/themes/monowhite/32/library.png b/companion/src/themes/monowhite/32/library.png new file mode 100644 index 000000000..a7b1a1e61 Binary files /dev/null and b/companion/src/themes/monowhite/32/library.png differ diff --git a/companion/src/themes/monowhite/32/list.png b/companion/src/themes/monowhite/32/list.png new file mode 100644 index 000000000..b88fb9322 Binary files /dev/null and b/companion/src/themes/monowhite/32/list.png differ diff --git a/companion/src/themes/monowhite/32/logs.png b/companion/src/themes/monowhite/32/logs.png new file mode 100644 index 000000000..6a67d1060 Binary files /dev/null and b/companion/src/themes/monowhite/32/logs.png differ diff --git a/companion/src/themes/monowhite/32/movedown.png b/companion/src/themes/monowhite/32/movedown.png new file mode 100644 index 000000000..89429747d Binary files /dev/null and b/companion/src/themes/monowhite/32/movedown.png differ diff --git a/companion/src/themes/monowhite/32/moveup.png b/companion/src/themes/monowhite/32/moveup.png new file mode 100644 index 000000000..a241f0d7f Binary files /dev/null and b/companion/src/themes/monowhite/32/moveup.png differ diff --git a/companion/src/themes/monowhite/32/new.png b/companion/src/themes/monowhite/32/new.png new file mode 100644 index 000000000..5f70d2256 Binary files /dev/null and b/companion/src/themes/monowhite/32/new.png differ diff --git a/companion/src/themes/monowhite/32/open.png b/companion/src/themes/monowhite/32/open.png new file mode 100644 index 000000000..36416d017 Binary files /dev/null and b/companion/src/themes/monowhite/32/open.png differ diff --git a/companion/src/themes/monowhite/32/paintbrush.png b/companion/src/themes/monowhite/32/paintbrush.png new file mode 100644 index 000000000..62cefc607 Binary files /dev/null and b/companion/src/themes/monowhite/32/paintbrush.png differ diff --git a/companion/src/themes/monowhite/32/paste.png b/companion/src/themes/monowhite/32/paste.png new file mode 100644 index 000000000..1a38652de Binary files /dev/null and b/companion/src/themes/monowhite/32/paste.png differ diff --git a/companion/src/themes/monowhite/32/play.png b/companion/src/themes/monowhite/32/play.png new file mode 100644 index 000000000..6e56f6766 Binary files /dev/null and b/companion/src/themes/monowhite/32/play.png differ diff --git a/companion/src/themes/monowhite/32/preferences.png b/companion/src/themes/monowhite/32/preferences.png new file mode 100644 index 000000000..2fc0fcada Binary files /dev/null and b/companion/src/themes/monowhite/32/preferences.png differ diff --git a/companion/src/themes/monowhite/32/print.png b/companion/src/themes/monowhite/32/print.png new file mode 100644 index 000000000..95a8e23bd Binary files /dev/null and b/companion/src/themes/monowhite/32/print.png differ diff --git a/companion/src/themes/monowhite/32/profiles.png b/companion/src/themes/monowhite/32/profiles.png new file mode 100644 index 000000000..1a2317540 Binary files /dev/null and b/companion/src/themes/monowhite/32/profiles.png differ diff --git a/companion/src/themes/monowhite/32/read_eeprom.png b/companion/src/themes/monowhite/32/read_eeprom.png new file mode 100644 index 000000000..b5f4060f1 Binary files /dev/null and b/companion/src/themes/monowhite/32/read_eeprom.png differ diff --git a/companion/src/themes/monowhite/32/read_eeprom_file.png b/companion/src/themes/monowhite/32/read_eeprom_file.png new file mode 100644 index 000000000..85d75a31d Binary files /dev/null and b/companion/src/themes/monowhite/32/read_eeprom_file.png differ diff --git a/companion/src/themes/monowhite/32/read_flash.png b/companion/src/themes/monowhite/32/read_flash.png new file mode 100644 index 000000000..af4186962 Binary files /dev/null and b/companion/src/themes/monowhite/32/read_flash.png differ diff --git a/companion/src/themes/monowhite/32/recentdocument.png b/companion/src/themes/monowhite/32/recentdocument.png new file mode 100644 index 000000000..4a4f21252 Binary files /dev/null and b/companion/src/themes/monowhite/32/recentdocument.png differ diff --git a/companion/src/themes/monowhite/32/save.png b/companion/src/themes/monowhite/32/save.png new file mode 100644 index 000000000..461af833d Binary files /dev/null and b/companion/src/themes/monowhite/32/save.png differ diff --git a/companion/src/themes/monowhite/32/saveas.png b/companion/src/themes/monowhite/32/saveas.png new file mode 100644 index 000000000..cf56da9b6 Binary files /dev/null and b/companion/src/themes/monowhite/32/saveas.png differ diff --git a/companion/src/themes/monowhite/32/simulate.png b/companion/src/themes/monowhite/32/simulate.png new file mode 100644 index 000000000..9fe222a8a Binary files /dev/null and b/companion/src/themes/monowhite/32/simulate.png differ diff --git a/companion/src/themes/monowhite/32/stop.png b/companion/src/themes/monowhite/32/stop.png new file mode 100644 index 000000000..4feabacb9 Binary files /dev/null and b/companion/src/themes/monowhite/32/stop.png differ diff --git a/companion/src/themes/monowhite/32/update.png b/companion/src/themes/monowhite/32/update.png new file mode 100644 index 000000000..88e4c4638 Binary files /dev/null and b/companion/src/themes/monowhite/32/update.png differ diff --git a/companion/src/themes/monowhite/32/wizard.png b/companion/src/themes/monowhite/32/wizard.png new file mode 100644 index 000000000..a9cfa82e9 Binary files /dev/null and b/companion/src/themes/monowhite/32/wizard.png differ diff --git a/companion/src/themes/monowhite/32/write_eeprom.png b/companion/src/themes/monowhite/32/write_eeprom.png new file mode 100644 index 000000000..0dc5c1f57 Binary files /dev/null and b/companion/src/themes/monowhite/32/write_eeprom.png differ diff --git a/companion/src/themes/monowhite/32/write_eeprom_file.png b/companion/src/themes/monowhite/32/write_eeprom_file.png new file mode 100644 index 000000000..9dfe9a116 Binary files /dev/null and b/companion/src/themes/monowhite/32/write_eeprom_file.png differ diff --git a/companion/src/themes/monowhite/32/write_flash.png b/companion/src/themes/monowhite/32/write_flash.png new file mode 100644 index 000000000..4d8d752ea Binary files /dev/null and b/companion/src/themes/monowhite/32/write_flash.png differ diff --git a/companion/src/themes/monowhite/48/add.png b/companion/src/themes/monowhite/48/add.png new file mode 100644 index 000000000..827d7b244 Binary files /dev/null and b/companion/src/themes/monowhite/48/add.png differ diff --git a/companion/src/themes/monowhite/48/arrow-left.png b/companion/src/themes/monowhite/48/arrow-left.png new file mode 100644 index 000000000..e4220b5dd Binary files /dev/null and b/companion/src/themes/monowhite/48/arrow-left.png differ diff --git a/companion/src/themes/monowhite/48/arrow-right.png b/companion/src/themes/monowhite/48/arrow-right.png new file mode 100644 index 000000000..52b41558c Binary files /dev/null and b/companion/src/themes/monowhite/48/arrow-right.png differ diff --git a/companion/src/themes/monowhite/48/changelog.png b/companion/src/themes/monowhite/48/changelog.png new file mode 100644 index 000000000..c9e897edb Binary files /dev/null and b/companion/src/themes/monowhite/48/changelog.png differ diff --git a/companion/src/themes/monowhite/48/clear.png b/companion/src/themes/monowhite/48/clear.png new file mode 100644 index 000000000..5ff3688e2 Binary files /dev/null and b/companion/src/themes/monowhite/48/clear.png differ diff --git a/companion/src/themes/monowhite/48/compare.png b/companion/src/themes/monowhite/48/compare.png new file mode 100644 index 000000000..87e99c8c5 Binary files /dev/null and b/companion/src/themes/monowhite/48/compare.png differ diff --git a/companion/src/themes/monowhite/48/configure.png b/companion/src/themes/monowhite/48/configure.png new file mode 100644 index 000000000..6ace3af19 Binary files /dev/null and b/companion/src/themes/monowhite/48/configure.png differ diff --git a/companion/src/themes/monowhite/48/contributors.png b/companion/src/themes/monowhite/48/contributors.png new file mode 100644 index 000000000..ab347bfb7 Binary files /dev/null and b/companion/src/themes/monowhite/48/contributors.png differ diff --git a/companion/src/themes/monowhite/48/copy.png b/companion/src/themes/monowhite/48/copy.png new file mode 100644 index 000000000..dd08c322b Binary files /dev/null and b/companion/src/themes/monowhite/48/copy.png differ diff --git a/companion/src/themes/monowhite/48/currentmodel.png b/companion/src/themes/monowhite/48/currentmodel.png new file mode 100644 index 000000000..9c5e3a5ee Binary files /dev/null and b/companion/src/themes/monowhite/48/currentmodel.png differ diff --git a/companion/src/themes/monowhite/48/cut.png b/companion/src/themes/monowhite/48/cut.png new file mode 100644 index 000000000..b81fb0d9d Binary files /dev/null and b/companion/src/themes/monowhite/48/cut.png differ diff --git a/companion/src/themes/monowhite/48/duplicate.png b/companion/src/themes/monowhite/48/duplicate.png new file mode 100644 index 000000000..a5f716f82 Binary files /dev/null and b/companion/src/themes/monowhite/48/duplicate.png differ diff --git a/companion/src/themes/monowhite/48/edit.png b/companion/src/themes/monowhite/48/edit.png new file mode 100644 index 000000000..c318f72b6 Binary files /dev/null and b/companion/src/themes/monowhite/48/edit.png differ diff --git a/companion/src/themes/monowhite/48/exit.png b/companion/src/themes/monowhite/48/exit.png new file mode 100644 index 000000000..e0f7e38fe Binary files /dev/null and b/companion/src/themes/monowhite/48/exit.png differ diff --git a/companion/src/themes/monowhite/48/fuses.png b/companion/src/themes/monowhite/48/fuses.png new file mode 100644 index 000000000..37ad3a434 Binary files /dev/null and b/companion/src/themes/monowhite/48/fuses.png differ diff --git a/companion/src/themes/monowhite/48/information.png b/companion/src/themes/monowhite/48/information.png new file mode 100644 index 000000000..dfc2f154f Binary files /dev/null and b/companion/src/themes/monowhite/48/information.png differ diff --git a/companion/src/themes/monowhite/48/library.png b/companion/src/themes/monowhite/48/library.png new file mode 100644 index 000000000..5d363913a Binary files /dev/null and b/companion/src/themes/monowhite/48/library.png differ diff --git a/companion/src/themes/monowhite/48/list.png b/companion/src/themes/monowhite/48/list.png new file mode 100644 index 000000000..1f516f5fd Binary files /dev/null and b/companion/src/themes/monowhite/48/list.png differ diff --git a/companion/src/themes/monowhite/48/logs.png b/companion/src/themes/monowhite/48/logs.png new file mode 100644 index 000000000..12e4dad65 Binary files /dev/null and b/companion/src/themes/monowhite/48/logs.png differ diff --git a/companion/src/themes/monowhite/48/movedown.png b/companion/src/themes/monowhite/48/movedown.png new file mode 100644 index 000000000..fcf443163 Binary files /dev/null and b/companion/src/themes/monowhite/48/movedown.png differ diff --git a/companion/src/themes/monowhite/48/moveup.png b/companion/src/themes/monowhite/48/moveup.png new file mode 100644 index 000000000..937bb7d5e Binary files /dev/null and b/companion/src/themes/monowhite/48/moveup.png differ diff --git a/companion/src/themes/monowhite/48/new.png b/companion/src/themes/monowhite/48/new.png new file mode 100644 index 000000000..f5ddb9077 Binary files /dev/null and b/companion/src/themes/monowhite/48/new.png differ diff --git a/companion/src/themes/monowhite/48/open.png b/companion/src/themes/monowhite/48/open.png new file mode 100644 index 000000000..2e705e8f0 Binary files /dev/null and b/companion/src/themes/monowhite/48/open.png differ diff --git a/companion/src/themes/monowhite/48/paintbrush.png b/companion/src/themes/monowhite/48/paintbrush.png new file mode 100644 index 000000000..8d73a2df3 Binary files /dev/null and b/companion/src/themes/monowhite/48/paintbrush.png differ diff --git a/companion/src/themes/monowhite/48/paste.png b/companion/src/themes/monowhite/48/paste.png new file mode 100644 index 000000000..f10703657 Binary files /dev/null and b/companion/src/themes/monowhite/48/paste.png differ diff --git a/companion/src/themes/monowhite/48/play.png b/companion/src/themes/monowhite/48/play.png new file mode 100644 index 000000000..8f5a7f6bd Binary files /dev/null and b/companion/src/themes/monowhite/48/play.png differ diff --git a/companion/src/themes/monowhite/48/preferences.png b/companion/src/themes/monowhite/48/preferences.png new file mode 100644 index 000000000..67221199e Binary files /dev/null and b/companion/src/themes/monowhite/48/preferences.png differ diff --git a/companion/src/themes/monowhite/48/print.png b/companion/src/themes/monowhite/48/print.png new file mode 100644 index 000000000..0a82c819b Binary files /dev/null and b/companion/src/themes/monowhite/48/print.png differ diff --git a/companion/src/themes/monowhite/48/profiles.png b/companion/src/themes/monowhite/48/profiles.png new file mode 100644 index 000000000..520c7def6 Binary files /dev/null and b/companion/src/themes/monowhite/48/profiles.png differ diff --git a/companion/src/themes/monowhite/48/read_eeprom.png b/companion/src/themes/monowhite/48/read_eeprom.png new file mode 100644 index 000000000..2c919f049 Binary files /dev/null and b/companion/src/themes/monowhite/48/read_eeprom.png differ diff --git a/companion/src/themes/monowhite/48/read_eeprom_file.png b/companion/src/themes/monowhite/48/read_eeprom_file.png new file mode 100644 index 000000000..dc05a30e3 Binary files /dev/null and b/companion/src/themes/monowhite/48/read_eeprom_file.png differ diff --git a/companion/src/themes/monowhite/48/read_flash.png b/companion/src/themes/monowhite/48/read_flash.png new file mode 100644 index 000000000..39ffc14fa Binary files /dev/null and b/companion/src/themes/monowhite/48/read_flash.png differ diff --git a/companion/src/themes/monowhite/48/recentdocument.png b/companion/src/themes/monowhite/48/recentdocument.png new file mode 100644 index 000000000..4390a48a7 Binary files /dev/null and b/companion/src/themes/monowhite/48/recentdocument.png differ diff --git a/companion/src/themes/monowhite/48/save.png b/companion/src/themes/monowhite/48/save.png new file mode 100644 index 000000000..b6d380085 Binary files /dev/null and b/companion/src/themes/monowhite/48/save.png differ diff --git a/companion/src/themes/monowhite/48/saveas.png b/companion/src/themes/monowhite/48/saveas.png new file mode 100644 index 000000000..94fccbe10 Binary files /dev/null and b/companion/src/themes/monowhite/48/saveas.png differ diff --git a/companion/src/themes/monowhite/48/simulate.png b/companion/src/themes/monowhite/48/simulate.png new file mode 100644 index 000000000..9f448daef Binary files /dev/null and b/companion/src/themes/monowhite/48/simulate.png differ diff --git a/companion/src/themes/monowhite/48/stop.png b/companion/src/themes/monowhite/48/stop.png new file mode 100644 index 000000000..7818a3d4c Binary files /dev/null and b/companion/src/themes/monowhite/48/stop.png differ diff --git a/companion/src/themes/monowhite/48/update.png b/companion/src/themes/monowhite/48/update.png new file mode 100644 index 000000000..29eacea07 Binary files /dev/null and b/companion/src/themes/monowhite/48/update.png differ diff --git a/companion/src/themes/monowhite/48/wizard.png b/companion/src/themes/monowhite/48/wizard.png new file mode 100644 index 000000000..7a61ffae7 Binary files /dev/null and b/companion/src/themes/monowhite/48/wizard.png differ diff --git a/companion/src/themes/monowhite/48/write_eeprom.png b/companion/src/themes/monowhite/48/write_eeprom.png new file mode 100644 index 000000000..1563c9de3 Binary files /dev/null and b/companion/src/themes/monowhite/48/write_eeprom.png differ diff --git a/companion/src/themes/monowhite/48/write_eeprom_file.png b/companion/src/themes/monowhite/48/write_eeprom_file.png new file mode 100644 index 000000000..9ae0c19c7 Binary files /dev/null and b/companion/src/themes/monowhite/48/write_eeprom_file.png differ diff --git a/companion/src/themes/monowhite/48/write_flash.png b/companion/src/themes/monowhite/48/write_flash.png new file mode 100644 index 000000000..d66faf613 Binary files /dev/null and b/companion/src/themes/monowhite/48/write_flash.png differ diff --git a/companion/src/translations.qrc.in b/companion/src/translations.qrc.in index d01dd945f..434cbd225 100644 --- a/companion/src/translations.qrc.in +++ b/companion/src/translations.qrc.in @@ -1,12 +1,12 @@ - companion9x_fr.qm - companion9x_de.qm - companion9x_he.qm - companion9x_it.qm - companion9x_pt.qm - companion9x_ru.qm - companion9x_sv.qm - companion9x_cs.qm + companion_fr.qm + companion_de.qm + companion_he.qm + companion_it.qm + companion_pt.qm + companion_ru.qm + companion_sv.qm + companion_cs.qm diff --git a/companion/src/translations/companion9x_cs.ts b/companion/src/translations/companion_cs.ts similarity index 94% rename from companion/src/translations/companion9x_cs.ts rename to companion/src/translations/companion_cs.ts index c6bef50cc..d656507aa 100644 --- a/companion/src/translations/companion9x_cs.ts +++ b/companion/src/translations/companion_cs.ts @@ -1239,9 +1239,9 @@ Opravdu to takto chcete ? - - - + + + File loaded Soubor byl načten @@ -1259,22 +1259,21 @@ Opravdu to takto chcete ? - - + + Unable to check for updates. Nelze ověřit aktualizace. - A new version of companion9x is available (version %1)<br>Would you like to download it? - Je dostupná nová verze companion9x (verze %1)<br>Chcete ji stáhnout nyní? + Je dostupná nová verze companion9x (verze %1)<br>Chcete ji stáhnout nyní? - - + + Save As Uložit jako @@ -1289,13 +1288,12 @@ Opravdu to takto chcete ? Je dostupné nové vydání - A new release of companion is available please check the repository - Je dostupné nové vydání companion9x, prosím zkontrolujte repozitář + Je dostupné nové vydání companion9x, prosím zkontrolujte repozitář - + No updates available at this time. žádné aktualizace nejsou nyní dostupné. @@ -1309,24 +1307,24 @@ Opravdu to takto chcete ? - - - - - - - - - + + + + + + + + + Error Chyba - - - + + + Error opening file %1: %2. Chyba při otevírání souboru %1: @@ -1366,10 +1364,8 @@ Opravdu to takto chcete ? Server companion je zaneprázdněn, zkuste to později - - Compilation server requires registration, please check opentx web site - Kompilační server vyžaduje registraci. Více najdete na webu opentx. + Kompilační server vyžaduje registraci. Více najdete na webu opentx. @@ -1382,7 +1378,7 @@ Opravdu to takto chcete ? Chcete nyní zapsat firmware do rádia ? - + Firmware %1 does not seem to have ever been downloaded. Version %2 is available. Do you want to download it now ? @@ -1391,31 +1387,31 @@ Verze %2 je dostupná. Chcete ho nyní stáhnout ? - - + + Yes Ano - - + + No Ne - - + + Release Notes Poznámky k vydání - - + + Do you want to download release %1 now ? Chcete nyní stáhnout vydání %1 ? - + A new version of %1 firmware is available (current %2 - newer %3). Do you want to download it now ? Nová verze firmware %1 je dostupná. @@ -1423,57 +1419,57 @@ Do you want to download it now ? Chcete ji stáhnout nyní ? - + Ignore this version (r%1)? Ignorovat tuto verzi (r%1)? - + Release notes contain very important informations. Do you want to see them now ? Poznámky k vydání mohou obsahovat důležité informace. Chcete si je přečíst nyní ? - + Open Otevřít - - + + File saved Soubor byl uložen - + Firmware updates Aktualizace firmwaru - + Current firmware does not provide release notes informations. K tomuto firmwaru nejsou poznámky k vydání. - + Cannot write file %1: %2. Nelze zapsat soubor %1: %2. - - - - - + + + + + Taranis radio not found Radio Taranis nenalezeno - - - - + + + + Impossible to identify the radio on your system, please verify the eeprom disk is connected. Nebylo možné identifikovat rádio ve vašem systému, zkontrolujte zda je eeprom disk připojen. @@ -1494,16 +1490,16 @@ nebyl rozpoznán jako platná EEPROM Chcete ji přesto naprogramovat? - - - + + + Backup is impossible Není možné zálohovat - - - + + + The backup dir set in preferences does not exist Složka pro zálohování zvolená v předvolbách neexistuje @@ -1516,8 +1512,8 @@ Chcete ji přesto naprogramovat? Nelze ověřit kompatibilitu EEprom! Mám přesto pokračovat? - - + + Warning Varování @@ -1538,7 +1534,7 @@ Chcete ji přesto naprogramovat? Zapsat do paměti FLASH rádia - + Conversion failed Porovnání selhalo @@ -1551,7 +1547,7 @@ Chcete ji přesto naprogramovat? Zapsat EEPROM do rádia - + Restore failed Zápis selhal @@ -1568,7 +1564,7 @@ Chcete ji přesto naprogramovat? Nemohu naprogramovat rádio, původní EEPROM najdete zde: %1 - + Backup failed Zálohování selhalo @@ -1585,19 +1581,12 @@ Chcete ji přesto naprogramovat? Načíst paměť FLASH z rádia do souboru - - - companion9x - Models and Settings Editor - %1 - profile %2 - companion9x - Editor nastavení rádia a modelů - %1 - profile %2 + companion9x - Editor nastavení rádia a modelů - %1 - profile %2 - - - - companion9x - Models and Settings Editor - %1 - companion9x - Editor nastavení rádia a modelů - %1 + companion9x - Editor nastavení rádia a modelů - %1 @@ -1605,10 +1594,10 @@ Chcete ji přesto naprogramovat? Chcete zapsat firmware do rádia nyní ? - - - - + + + + Read Models and Settings From Tx Načíst modely a nastavení z rádia @@ -1617,18 +1606,49 @@ Chcete ji přesto naprogramovat? Firmware does not longer fit in the Tx, due to selected firmware options Firmware s těmito vybranými součástmi, se již nevejde do rádia + + + + + Companion - Models and Settings Editor - %1 - profile %2 + + + + + + + + Companion - Models and Settings Editor - %1 + + + + + A new version of Companion is available (version %1)<br>Would you like to download it? + + + + + A new release of Companion is available please check the repository + + + + + + Compilation server requires registration, please check OpenTX web site + + Firmware does not fit in the Tx, due to selected firmware options Firmware s těmito vybranými součástmi, se již nevejde do rádia - + Write Models and settings from %1 to the Tx? Zapsat modely a nastavení z %1 do rádia? - + The file %1 has not been recognized as a valid Models and Settings file Write anyway ? @@ -1637,386 +1657,406 @@ neobsahuje platná data modelů a nastavení Chcete ho přesto zapsat ? - - - - - - + + + + + + Backup Models and Settings From Tx Zálohovat modely a nastavení z rádia - + Cannot check Models and Settings compatibility! Continue anyway? Nelze ověřit kompatibilitu dat modelů a nastavení! Chcete přesto pokračovat? - + The transmitter firmware belongs to another product family, check file and preferences! Firmware patří do jiné produktové rodiny, zkontrolujte nastavení předvoleb! - + The transmitter firmware is outdated, please upgrade! Firmware rádia je zastaralý, aktualizujte ho prosím! - + Write Models and Settings To Tx Zapsat modely a nastavení do rádia - - + + Write Firmware To Tx Zapsat firmware do rádia - + Cannot convert Models and Settings for use with this firmware, original data will be used Nemohu konvertovat modely a nastavení pro použití s tímto firmwarem, budou použita původní data - + Restore Models and Settings To Tx Obnovit modely a nastavení do rádia - + Could not restore Models and Settings to TX. The models and settings data file can be found at: %1 Nelze obnovit modely a nastavení do rádia. Soubor s modely a nastavením najdete v: %1 - + Firmware write failed Zápis firmware selhal - + Could not write firmware to to transmitter. The models and settings data file can be found at: %1 Nelze zapsat firmware do rádio. Data modelů a nastavení najdete v: %1 - + Cannot backup existing Models and Settings from TX. Firmware write process aborted Nemohu zálohovat stávající modely a nastavení z rádia. Zápis firmware byl přerušen - + Save transmitter Models and Settings to File Uložit modely a nastavení do souboru - + Impossible to identify the radio on your system, please verify that the eeprom disk is connected. Nebylo možné identifikovat rádio ve vašem systému, zkontrolujte zda je eeprom disk připojen. - + Read Tx Firmware to File Načíst firmware z rádia a uložit do souboru - + Copyright - + Version %1 (revision %2), %3 Verze %1 (revize %2), %3 - The companion9x project was originally forked from eePe - Projekt companion9x vznikl oddělením z eePe + Projekt companion9x vznikl oddělením z eePe - + If you've found this program useful, please support by Pokud vám byl tento program užitečný, podpořte jej - + donating darem - About companion9x - O aplikaci Companion9x + O aplikaci Companion9x - - - + + + &%1 %2 - + %1 %2 - + &New &Nový - + Create a new file Vytvořit nový soubor - + &Open... &Otevřít... - + Open an existing file Otevřít existující soubor - + &loadBackup... &Načíst zálohu... - + Load backup from file Načíst zálohu ze souboru - + &Save &Uložit - + Save the document to disk Uložit dokument na disk - + Save &As... Uložit j&ako... - + Save the document under a new name Uložit dokument s novým jménem - + Lo&gs Lo&gy - + Ctrl+G - + Open log file Otevřít soubor s logy - + &Preferences... &Předvolby... - + Edit general preferences Nastavení obecných předvoleb - + &Check for updates... &Zkontrolovat aktualizace... - Check for new version of companion9x/er9x - Zkontolovat dostupnost nové verze companion9x/er9x + Zkontolovat dostupnost nové verze companion9x/er9x - + Contributors &List... &Seznam přispěvatelů... - Show companion9x contributors list - Zobrazit seznam přispěvatelů companion9x + Zobrazit seznam přispěvatelů companion9x - + ChangeLog... Změny... - Show companion9x changelog - Zobrazit změny ve verzích companion9x + Zobrazit změny ve verzích companion9x - + + The Companion project was originally forked from eePe + + + + + About Companion + + + + + Check for new version of Companion + + + + + Show Companion contributors list + + + + + Show Companion changelog + + + + Firmware ChangeLog... Změny firmware... - + Show firmware changelog Zobrazit změny ve firmware - + Compare... Porovnat... - + Compare models Porovnat modely - + Customize your &TX... &Přizpůsobení loga... - + Customize the splash screen of your TX Přizpůsobení úvodního logo vašeho rádia - + E&xit U&končit - + Exit the application Ukončit aplikaci companion9x - + Cu&t &Vyjmout - + Cut the current selection's contents to the clipboard Vyjmout aktuální výběr a uložit do schránky - + &Copy &Kopírovat - + Copy the current selection's contents to the clipboard Kopírovat aktuální výběr do schránky - + &Paste &Vložit - + Paste the clipboard's contents into the current selection Vložit obsah schránky na aktuální pozici - + &Write Models and Settings To Tx &Zapsat modely a nastavení do rádia - + Write Models and Settings to transmitter Zapsat modely a nastavení do rádia - + &Read Models and Settings From Tx &Načíst modely a nastavení z rádia - + Read Models and Settings from transmitter Načíst modely a nastavení z rádia - + Write Firmware Zapsat firmware - + Write firmware to transmitter Zapsat firmware do rádia - + Write Models and Settings from file to Tx Zapsat modely a nastavení ze souboru do rádia - + Write Models and Settings from file to transmitter Zapsat modely a nastavení ze souboru do rádia - + Save transmitter Models and Settings to file Uložit modely a nastavení z rádia do souboru - + Save the Models and Settings from the transmitter to a file Uložit modely a nastavení z rádia do souboru - + Read Firmware Načíst firmware - + Read firmware from transmitter Načíst firmware z rádia - + Configure software for reading from and writing to the transmitter Nastavení softwaru pro čtení a zápis do rádia - + &Read/Write Čtení/&Zápis - + Write Zápis - - + + Invalid Models and Settings File %1 Neplatný soubor modelů a nastavení %1 - + Invalid binary Models and Settings File %1 Neplatný binární soubor modelů a nastavení %1 @@ -2025,7 +2065,7 @@ Chcete ho přesto zapsat ? &Zapsat do EEPROM rádia - + Ctrl+Alt+W @@ -2038,7 +2078,7 @@ Chcete ho přesto zapsat ? &Načíst EEPROM z rádia - + Ctrl+Alt+R @@ -2079,7 +2119,7 @@ Chcete ho přesto zapsat ? Načíst paměť FLASH z rádia - + &Configure... &Konfigurace... @@ -2088,154 +2128,154 @@ Chcete ho přesto zapsat ? Konfigurace programátoru - + &List programmers &Seznam programátorů - + List available programmers Seznam použitelných programátorů - + &Fuses... Pojistky &mikrokontroléru... - + Show fuses dialog Zobrazit dialog nastavení pojistek mikrokontroléru - + &Simulate &Simulátor - + Alt+S - + Simulate selected model. Simulovat vybraný model. - + &Print &Tisk - + Ctrl+P - + Print current model. Vytisknout aktuální model. - + Cl&ose &Zavřít - + Close the active window Zavřít aktivní okno - + Close &All Zavřít &Vše - + Close all the windows Zavřít všechna okna - + &Tile D&laždice - + Tile the windows Uspořádat okna jako dlaždice - + &Cascade &Kaskáda - + Cascade the windows Uspořádat okna do kaskády - + Ne&xt &Další - + Move the focus to the next window Aktivovat následující okno - + Pre&vious &Předchozí - + Move the focus to the previous window Aktivovat předchozí okno - + &About &O aplikaci - + Show the application's About box O aplikaci companion9x - + Switch layout direction Přepnout styl panelu - + Switch layout Left/Right Přepnout styl rozložení panelu vlevo/vpravo - - + + Recent Files Nedávné soubory - - + + Firmware Profiles Profily firmwaru - + &File &Soubor - + &Edit &Úpravy @@ -2244,22 +2284,22 @@ Chcete ho přesto zapsat ? &Programátor - + &Window &Okno - + &Help &Nápověda - + File Soubor - + Edit Úpravy @@ -2268,17 +2308,17 @@ Chcete ho přesto zapsat ? Programátor - + Help Nápověda - + Ready Připraven - + Unable to find file %1! Nemohu nalézt soubor %1! @@ -2287,7 +2327,7 @@ Chcete ho přesto zapsat ? Neplatný soubor EEPROM %1 - + Error reading file %1: %2. Chyba při otevírání souboru %1: @@ -2396,15 +2436,15 @@ Chcete ho přesto zapsat ? - - - companion9x - + Do you want to use model wizard? + Chcete použít průvodce nastavením modelu? - Do you want to use model wizard? - Chcete použít průvodce nastavením modelu? + + + Companion + @@ -7772,18 +7812,26 @@ Formát ukládání obrázku loga v nastavení předvoleb se změnil. Zkontrolujte si nastavení loga v předvolbách. - Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next openTX/C9x funding model. We are really sensible to that! The openTX/C9X Team. - Děkujeme všem za příspěvky, dobré nápady a přátelské emaily k chystenému modelu financování openTX/C9x. + Děkujeme všem za příspěvky, dobré nápady a přátelské emaily k chystenému modelu financování openTX/C9x. Vážíme si toho a nasloucháme! Tým OpenTX/C9X. + + + Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next OpenTX/Companion funding model. + +We are really appreciative for that! + +The OpenTX/Companion Team. + + avrOutputDialog @@ -8146,8 +8194,8 @@ m2560 pro V4 desky - companion9x - + Companion + @@ -8251,6 +8299,11 @@ m2560 pro V4 desky Browse for file Procházet ... + + + Allows Companion to write to older version of the firmware + + Backup and restore Models and Settings @@ -8262,9 +8315,8 @@ m2560 pro V4 desky Logo nastavené v předvolbách - Allows companion9x to write to older version of the firmware - Povolí zápis do starší verze firmware + Povolí zápis do starší verze firmware @@ -9147,29 +9199,39 @@ m2560 pro V4 desky Honors go to Rafal Tomczak (RadioClone) and Thomas Husterer (th9x) +of course. Also to Erez Raviv (er9x) and the fantastic eePe program +which was the staring point for OpenTX Companion. + + + + + Companion Release Notes + + + + Honors go to Rafal Tomczak (RadioClone) and Thomas Husterer (th9x) of course. Also to Erez Raviv (er9x) and it's fantastic eePe, from which companion9x was forked out. - Speciální poděkování patří Rafalu Tomczakovi (RadioClone), + Speciální poděkování patří Rafalu Tomczakovi (RadioClone), Thomasi Husteterovi (th9x) a také Erazovi Ravivovi(er9x) a jeho fantastickému eePe, na jehož základech companion9x vznikl. - + Thank you all !!! Děkujeme vám všem !!! - + Contributors Přispěvatelé - Companion9x Release Notes - Poznámky k vydání Companion9x + Poznámky k vydání Companion9x - + OpenTX Release Notes Poznámky k vydání OpenTX @@ -9324,8 +9386,8 @@ Obsahuje firmware podporu loga? - companion9x - + Companion + @@ -9668,9 +9730,13 @@ Tlačítkem Zrušit přerušíte kalibraci logsDialog - Companion9x log viewer - Companion9x - zobrazení logu + Companion9x - zobrazení logu + + + + Companion Log Viewer + @@ -9683,47 +9749,59 @@ Tlačítkem Zrušit přerušíte kalibraci Otevřít - + Zoom - + X - + Y - + Fly sessions Lety - + Telemetry logs Logy telemetrie - + Time Čas - + + Error + Chyba + + + + Cannot write file %1: +%2. + Nelze zapsat soubor %1: +%2. + + + Select your log file Vyberte soubor s logy - + Available fields Dostupná pole - + The selected logfile contains %1 invalid lines out of %2 total lines Zvolený soubor logu obsahuje %1neplatných řádků z celkových %2 @@ -10181,84 +10259,84 @@ Tlačítkem Zrušit přerušíte kalibraci Předvolby - + Check for selected Fw updates Aktualizace vybraného firmware - + Ask use of wizard for new models Zeptat se na použití průvodce pro nový model - + Invert Pixels Invertovat - - + + ... - + Remember switches in simulator Pamatovat si přepínače v simulátoru - + Enable Povolit - + Calibrate Kalibrovat - - - - + + + + Open Folder Vybrat složku - + FwInfo - + Check for updates Zkontrolovat aktualizace - + Open Image Načíst obrázek - + Language Jazyk - - + + Download Stáhnout - + Set language of voice. May be different from firmware language Vyberte jazykovou verzi hlasu tts(voice). Může být jiná než verze firmwaru - + Voice Hlas tts @@ -10309,63 +10387,63 @@ Může být jiná než verze firmwaru - + Ask for flashing after Download Po stažení firmwaru se zeptat, zda ho hned zapsat do rádia - + Export Profile Exportovat profil - + Import Profile Importovat profil - + Profile Name Název profilu - + Automatically add version number to the filename after download Přidat číslo verze do názvu souboru staženého firmwaru - + Save Profile Uložit profil - + Simu BackLight BackLight Color Barva podsvětlení Simu - + Blue Modrá - + Green Zelená - + Red Červená - + Orange Oranžová - + Yellow Žlutá @@ -10374,22 +10452,22 @@ Může být jiná než verze firmwaru Kontrolovat aktualizace vybraného firmwaru - + Check for updates on startup Aktualizace při spuštění - + Language (requires restart) Jazyk companion (vyžaduje restart) - + Custom TX splash screen Vlastní úvodní logo - + Channel order This is used by the templated to determine which channel goes to what number output. @@ -10399,27 +10477,27 @@ Toto je použito šablonami k určení který kanál patří ke kterému výstupu. - + Firmware - + Default Stick Mode Výchozí mód vysílačky - + Default Channel Order Výchozí pořadí kanálů - + Show Splash Screen Zobrazit úvodní logo - + Personal splash library Vlastní knihovna s logy @@ -10428,7 +10506,7 @@ který kanál patří ke kterému výstupu. Pamatovat polohu přepínačů - + Mode selection: Mode 1: @@ -10469,57 +10547,57 @@ Mode 4: - + Mode 1 (RUD ELE THR AIL) Mode 1 (Směr.Výšk.Plyn.Křid) - + Mode 2 (RUD THR ELE AIL) Mode 2 (Směr.Plyn.Výšk.Křid) - + Mode 3 (AIL ELE THR RUD) Mode 3 (Křid.Výšk.Plyn.Směr) - + Mode 4 (AIL THR ELE RUD) Mode 4 (Křid.Plyn.Výšk.Směr) - + Joystick - + Include companion splashes Zahrnout i výchozí loga - + Only user defined splashes Jen vlastní loga - + Splash library behaviour Chování knihovny s logy - + Automatic Backup Folder Složka pro automatické zálohy - + SD Structure path Cesta k obsahu SD karty - + Processor ID ID procesoru @@ -10529,7 +10607,17 @@ Mode 4: Počet položek nedávné historie - + + Find Executable + + + + + Google Earth Executable + + + + Profile slot Slot profilu @@ -10538,7 +10626,7 @@ Mode 4: Složka pro zálohy EEprom - + auto backup before write zálohovat před zápisem @@ -10547,53 +10635,66 @@ Mode 4: Složka zvukových dat - + Simulator capture folder Složka pro snímky obrazovky Simu - + Use clipboard only Kopírovat pouze do schránky - + Last downloaded release: %1 Naposledy stažené vydání: %1 - The selected firmware has never been downloaded by companion9x. - Zvolený firmware ještě nebyl stažen pomocí companion9x. + Zvolený firmware ještě nebyl stažen pomocí companion9x. - The selected firmware cannot be downloaded by companion9x. - Companion9x nemůže stáhnout zvolený firmware. + Companion9x nemůže stáhnout zvolený firmware. - + + The selected firmware has never been downloaded by Companion. + + + + + The selected firmware cannot be downloaded by Companion. + + + + Image stored in settings Logo nastavené v předvolbách - - + + No joysticks found Joystick nenalezen - + Select your Models and Settings backup folder Zvolte složku pro automatické zálohy modelů a nastavení - + + Select Google Earth executable + + + + Select the folder replicating your SD structure Vyberte složku která představuje obsah SD karty rádia - + Profile name is empty, profile slot %1 will be deleted.<br>Are you sure ? Název profilu je prázdný, slot %1 bude smazán.<br>Jste si jist ? @@ -10660,7 +10761,7 @@ zatim ve zkušební verzi Podpora DSM2 modulů s použitím PPM místo sériového protokolu - + Select your library folder Support for SD memory card Vyberte složkus s logy @@ -10739,7 +10840,7 @@ nutno zastavět hlasový modul Bez uživatelsky definovatelných křivek - + Select your snapshot folder Vyberte složku pro snímky obrazovky simulátoru @@ -10748,14 +10849,14 @@ nutno zastavět hlasový modul Vyber složku pro zálohování eeprom - - + + Error Chyba - - + + Cannot load %1. Nemohu načíst %1. @@ -10768,27 +10869,27 @@ nutno zastavět hlasový modul Název profilu je prázdný, slot %1 bude odstraněn.<br>Souhlasíte ? - + Export profile As Exportovat profil jako - + Profile slot is not empty, profile slot %1 will we overwritten.<br>Are you sure ? Slot profilu není prázdný, slot %1 bude přepsán.<br>Jste si jist ? - + Open Profile to import Zvolte profil k importu - + Open Image to load Otevřít soubor - + Images (%1) obrázky (%1) @@ -11397,9 +11498,13 @@ nutno zastavět hlasový modul simulatorDialog - Companion9x Simulator - Companion9x Simulátor + Companion9x Simulátor + + + + Companion Simulator + @@ -11514,157 +11619,157 @@ nutno zastavět hlasový modul 9x Simulátor - + Outputs Výstupy - + CS1 VS1 - + CS2 VS2 - + CS3 VS3 - + CS4 VS4 - + CS5 VS5 - + CS6 VS6 - + CS7 VS7 - + CS8 VS8 - + CS9 VS9 - + CSA VSA - + CSB VSB - + CSC VSC - + CSD VSD - + CSE VSE - + CSF VSF - + CSG VSG - + CSH VSH - + CSI VSI - + CSJ VSJ - + CSL VSL - + CSM VSM - + CSN VSN - + CSO VSO - + CSP VSP - + CSQ VSQ - + CSR VSR - + CSS VSS - + CST VST - + CSU VSU - + CSV VSV @@ -11750,7 +11855,7 @@ nutno zastavět hlasový modul VSJ - + CSK SWK VSK @@ -11800,108 +11905,108 @@ nutno zastavět hlasový modul VSV - + CSW SWW VSW - + CH1 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + -100.1 - + CH9 - + CH2 - + CH10 - + CH3 - + CH11 - + CH4 - + CH12 - + CH5 - + CH13 - + CH6 - + CH14 - + CH7 - + CH15 - + CH8 - + CH16 @@ -11983,9 +12088,8 @@ nutno zastavět hlasový modul xsimulatorDialog - Companion9x Simulator - Companion9x Simulátor + Companion9x Simulátor @@ -12223,6 +12327,11 @@ nutno zastavět hlasový modul Taranis Simulator Taranis Simulátor + + + Companion Simulator + + @@ -12230,16 +12339,16 @@ nutno zastavět hlasový modul - - - - - - - - - - + + + + + + + + + + -100.1 @@ -12274,207 +12383,207 @@ nutno zastavět hlasový modul - + CH12 - + CH5 - + CH13 - + CH6 - + CH14 - + CH7 - + CH15 - + CH8 - + CH16 - + CSK VSK - + CSC VSC - + CSD VSD - + CS7 VS7 - + CSL VSL - + CSB VSB - + CS1 VS1 - + CSH VSH - + CSG VSG - + CSE VSE - + CSF VSF - + CS8 VS8 - + CS9 VS9 - + CSA VSA - + CSM VSM - + CSJ VSJ - + CSI VSI - + CS4 VS4 - + CS5 VS5 - + CS2 VS2 - + CS3 VS3 - + CS6 VS6 - + CSN VSN - + CSO VSO - + CSP VSP - + CSQ VSQ - + CSR VSR - + CSS VSS - + CST VST - + CSU VSU - + CSV VSV - + CSW VSW diff --git a/companion/src/translations/companion9x_de.ts b/companion/src/translations/companion_de.ts similarity index 95% rename from companion/src/translations/companion9x_de.ts rename to companion/src/translations/companion_de.ts index 23280e633..fd62aa4cd 100644 --- a/companion/src/translations/companion9x_de.ts +++ b/companion/src/translations/companion_de.ts @@ -1304,9 +1304,9 @@ Are you sure ? - - - + + + File loaded Datei geladen @@ -1322,8 +1322,8 @@ Are you sure ? - - + + Save As Speichern unter @@ -1333,7 +1333,7 @@ Are you sure ? - + No updates available at this time. Kein Update vorhanden. @@ -1341,8 +1341,8 @@ Are you sure ? - - + + Unable to check for updates. Kann nicht auf Updates überprüfen. @@ -1365,14 +1365,20 @@ Are you sure ? Möchtest Du das Installationsprogramm starten ? - + + + Compilation server requires registration, please check OpenTX web site + + + + A new version of %1 firmware is available (current %2 - newer %3). Do you want to download it now ? Eine neue Version der %1-Firmware ist verfügbar (aktuell %2 - neueste %3).. Möchten Sie sie jetzt herunterladen? - + Open Öffnen @@ -1381,8 +1387,8 @@ Möchten Sie sie jetzt herunterladen? EEPROM Dateien (*.bin *.hex);;BIN Dateien (*.bin);;HEX Dateien (*.hex) - - + + File saved Datei gespeichert @@ -1423,7 +1429,7 @@ Möchten Sie sie jetzt herunterladen? Lese Flash und speichere in Datei - + Copyright Copyright @@ -1433,7 +1439,7 @@ Möchten Sie sie jetzt herunterladen? Wenn Du dieses Programm und/oder die Firmware nützlich findest dann unterstütze uns durch - + donating spenden @@ -1442,69 +1448,69 @@ Möchten Sie sie jetzt herunterladen? Über eePe - - - + + + &%1 %2 &%1 %2 - + %1 %2 %1 %2 - + &New &Neu - + Create a new file Neue Datei erstellen - + &Open... Datei ö&ffnen... - + Open an existing file Öffne eine bestehende Datei - + &Save Datei &speichern - + Save the document to disk Speichere das Dokument auf Festplatte - + Save &As... Speichern &unter... - + Save the document under a new name Speichere das Dokument unter einem neuen Namen - + &Preferences... &Einstellungen... - + Edit general preferences Bearbeite generelle Einstellungen - + &Check for updates... &Überprüfe auf Updates... @@ -1518,44 +1524,38 @@ Möchten Sie sie jetzt herunterladen? - A new version of companion9x is available (version %1)<br>Would you like to download it? Wether in french, which form of address do you prefer? - Eine neue Version von companion9x ist verfügbar (version %1)<br>Möchten Sie sie herunterladen? + Eine neue Version von companion9x ist verfügbar (version %1)<br>Möchten Sie sie herunterladen? New release available - - - A new release of companion is available please check the repository - - - - - - - - - - - + + + + + + + + + Error Fehler - - - + + + Error opening file %1: %2. Fehler beim Öffnen der Datei %1: @@ -1571,6 +1571,31 @@ Möchten Sie sie jetzt herunterladen? Display previous message again at startup ? + + + + + Companion - Models and Settings Editor - %1 - profile %2 + + + + + + + + Companion - Models and Settings Editor - %1 + + + + + A new version of Companion is available (version %1)<br>Would you like to download it? + + + + + A new release of Companion is available please check the repository + + Firmware does not longer fit in the Tx, due to selected firmware options @@ -1587,12 +1612,6 @@ Möchten Sie sie jetzt herunterladen? Compilation server too busy, try later - - - - Compilation server requires registration, please check opentx web site - - @@ -1605,7 +1624,7 @@ Möchten Sie sie jetzt herunterladen? - + Firmware %1 does not seem to have ever been downloaded. Version %2 is available. Do you want to download it now ? @@ -1614,65 +1633,65 @@ Version %2 ist verfügbar. Möchten Sie sie jetzt herunterladen? - - + + Yes Ja - - + + No Nein - - + + Release Notes - - + + Do you want to download release %1 now ? - + Release notes contain very important informations. Do you want to see them now ? - + Firmware updates - + Current firmware does not provide release notes informations. - + Cannot write file %1: %2. Kann Datei %1: %2 nicht schreiben. - - - - - + + + + + Taranis radio not found - - - - + + + + Impossible to identify the radio on your system, please verify the eeprom disk is connected. @@ -1685,16 +1704,16 @@ wurde nicht als gültige EEPROM Datei erkannt. Trotzdem brennen? - - - + + + Backup is impossible - - - + + + The backup dir set in preferences does not exist @@ -1703,8 +1722,8 @@ Trotzdem brennen? Sicherung EEPROM von Tx - - + + Warning Warnung @@ -1713,7 +1732,7 @@ Trotzdem brennen? Brenne Flash in den Tx - + Conversion failed Umwandlung gescheitert @@ -1726,7 +1745,7 @@ Trotzdem brennen? EEPROM in Tx zurückspeichern - + Restore failed Zurückspeicherung gescheitert @@ -1743,7 +1762,7 @@ Trotzdem brennen? Flashen des Tx nicht möglich, ursprüngliche EEProm Dateil ist verfügbar unter: %1 - + Backup failed Sicherung fehlgeschlagen @@ -1751,340 +1770,341 @@ Trotzdem brennen? Cannot backup existing EEProm from TX, Flash process aborted Sicherung des bestehenden EEEPROMs vom Tx gescheitert, Flash Prozess abgebrochen - - - - - companion9x - Models and Settings Editor - %1 - profile %2 - - - - - - - - companion9x - Models and Settings Editor - %1 - - Do you want to write the firmware to the transmitter now ? - - - - + + + + Read Models and Settings From Tx - + Write Models and settings from %1 to the Tx? - + The file %1 has not been recognized as a valid Models and Settings file Write anyway ? - - - - - - + + + + + + Backup Models and Settings From Tx - + Cannot check Models and Settings compatibility! Continue anyway? - + The transmitter firmware belongs to another product family, check file and preferences! - + The transmitter firmware is outdated, please upgrade! - + Write Models and Settings To Tx - - + + Write Firmware To Tx - + Cannot convert Models and Settings for use with this firmware, original data will be used - + Restore Models and Settings To Tx - + Could not restore Models and Settings to TX. The models and settings data file can be found at: %1 - + Firmware write failed - + Could not write firmware to to transmitter. The models and settings data file can be found at: %1 - + Cannot backup existing Models and Settings from TX. Firmware write process aborted - + Save transmitter Models and Settings to File - + Impossible to identify the radio on your system, please verify that the eeprom disk is connected. - + Read Tx Firmware to File - + Version %1 (revision %2), %3 Version %1 (Revision %2), %3 - The companion9x project was originally forked from eePe - Das 'companion9x' Projekt ist ursprünglich aus eePe entstanden. + Das 'companion9x' Projekt ist ursprünglich aus eePe entstanden. - + If you've found this program useful, please support by Wenn Sie diese Programm hilfreich finden, bitte unterstützen Sie - About companion9x - Über companion9x + Über companion9x - + &loadBackup... - + Load backup from file - + Lo&gs - + Ctrl+G - + Open log file - Check for new version of companion9x/er9x - Überprüfe auf neue Version von companion9x/er9x + Überprüfe auf neue Version von companion9x/er9x - + Contributors &List... &Mitwirkende... - Show companion9x contributors list - Zeige die Liste der Mitwirkenden von 'companion9x' + Zeige die Liste der Mitwirkenden von 'companion9x' - + ChangeLog... - - Show companion9x changelog + + The Companion project was originally forked from eePe - - Firmware ChangeLog... + + About Companion + + + + + Check for new version of Companion + + + + + Show Companion contributors list + + + + + Show Companion changelog + Firmware ChangeLog... + + + + Show firmware changelog - + Compare... - + Compare models - + Customize your &TX... Passe Deinen &TX an... - + Customize the splash screen of your TX Persönliche Anpassung des Tx Startbildschirmes - + E&xit Be&enden - + Exit the application Beendet die Anwendung - + Cu&t &Ausschneiden - + Cut the current selection's contents to the clipboard Scheidet die momentane Auwahl aus und kopiert den Inhalt in den Zwischenspeicher - + &Copy &Kopieren - + Copy the current selection's contents to the clipboard Kopiert die momentane Auswahl in den Zwischenspeicher - + &Paste &Einfügen - + Paste the clipboard's contents into the current selection Fügt den Inhalt des Zwischenspeichers in die momentane Auswahl ein - + &Write Models and Settings To Tx - + Write Models and Settings to transmitter - + &Read Models and Settings From Tx - + Read Models and Settings from transmitter - + Write Firmware - + Write firmware to transmitter - + Write Models and Settings from file to Tx - + Write Models and Settings from file to transmitter - + Save transmitter Models and Settings to file - + Save the Models and Settings from the transmitter to a file - + Read Firmware - + Read firmware from transmitter - + Configure software for reading from and writing to the transmitter - - + + Invalid Models and Settings File %1 - + Invalid binary Models and Settings File %1 @@ -2093,7 +2113,7 @@ Write anyway ? &Schreibe EEPROM in den Sender - + Ctrl+Alt+W Ctrl+Alt+W @@ -2106,7 +2126,7 @@ Write anyway ? &Lese EEPROM vom Sender - + Ctrl+Alt+R Ctrl+Alt+R @@ -2147,7 +2167,7 @@ Write anyway ? Lese Flash Speicher und schreibe in den Sender - + &Configure... &Einstellungen... @@ -2156,143 +2176,143 @@ Write anyway ? Einstellungen Brennsoftware - + &List programmers &Programmiergeräte - + List available programmers Programmiergeräte - + &Fuses... &Fuses... - + Show fuses dialog Zeige Fuses Einstellungen - + &Simulate &Simulation - + Alt+S Alt+S - + Simulate selected model. Simuliert das ausgewählte Modell. - + &Print &Drucken - + Ctrl+P Ctrl+P - + Print current model. Drucke momentane Modelleinstellungen. - + Cl&ose &Schliessen - + Close the active window Schliesst das aktuelle Fenster - + Close &All Schliesse &Alles - + Close all the windows Schliesst alle Fenster - + &Tile &Anordnen - + Tile the windows Nebeneinander Ordnen von Fenstern - + &Cascade &Kaskadieren - + Cascade the windows Kaskadiere die Fenster - + Ne&xt Nä&chstes - + Move the focus to the next window Nächstes Fenster aufrufen - + Pre&vious Vor&hergehendes - + Move the focus to the previous window Vorhergehendes Fenster aufrufen - + &About &Über - + Show the application's About box Zeige das Infofenster - - + + Recent Files Letzte Dateien - + &Read/Write - + Write - + Unable to find file %1! Kann die Datei %1 nicht finden ! @@ -2301,7 +2321,7 @@ Write anyway ? Ungültige EEPROM Datei %1 - + Error reading file %1: %2. Fehler beim Lesen der Datei %1: @@ -2320,23 +2340,23 @@ Write anyway ? Zeige die er9x/eePe Mitwirkende - + Switch layout Left/Right Schalte Layout um Rechts/Links - - + + Firmware Profiles - + &File &Datei - + Switch layout direction Schalte Programmlayout um @@ -2350,7 +2370,7 @@ Write anyway ? Überprüfe auf Updates - + Ignore this version (r%1)? Diese Version ignorieren (%1)? @@ -2359,7 +2379,7 @@ Write anyway ? Eine neue Version von eePe ist vorhanden /r%1)<br>Möchtest Du diese herunterladen ? - + &Edit &Bearbeiten @@ -2368,22 +2388,22 @@ Write anyway ? B&rennen - + &Window &Fenster - + &Help &Hilfe - + File Datei - + Edit Bearbeiten @@ -2392,12 +2412,12 @@ Write anyway ? Brennen - + Help Hilfe - + Ready Fertig @@ -2562,6 +2582,13 @@ Möchtest Du die Änderungen speichern ? Do you want to use model wizard? + + + + + Companion + + Ask this question again ? @@ -2646,11 +2673,8 @@ Möchtest Du die Änderungen speichern ? - - - companion9x - companion9x + companion9x @@ -8253,11 +8277,11 @@ Right - Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next openTX/C9x funding model. + Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next OpenTX/Companion funding model. -We are really sensible to that! +We are really appreciative for that! -The openTX/C9X Team. +The OpenTX/Companion Team. @@ -8640,8 +8664,12 @@ Bitte nutze dies nur wenn Du weißt was Du machst. Es gibt keine Plausibilitäts + Companion + + + companion9x - companion9x + companion9x @@ -8768,6 +8796,11 @@ m2560 fürRadios mit v4.1 Boards Substitute image in firmware Ersetze Bild in Firmware + + + Allows Companion to write to older version of the firmware + + Backup and restore Models and Settings @@ -8800,11 +8833,6 @@ m2560 fürRadios mit v4.1 Boards Browse for file - - - Allows companion9x to write to older version of the firmware - - Check Firmware compatibility @@ -9671,29 +9699,35 @@ m2560 fürRadios mit v4.1 Boards Honors go to Rafal Tomczak (RadioClone) and Thomas Husterer (th9x) +of course. Also to Erez Raviv (er9x) and the fantastic eePe program +which was the staring point for OpenTX Companion. + + + + + Companion Release Notes + + + + Honors go to Rafal Tomczak (RadioClone) and Thomas Husterer (th9x) of course. Also to Erez Raviv (er9x) and it's fantastic eePe, from which companion9x was forked out. - Ehre gebührt Rafal Tomczak (RadioClone) und natürlich Thomas + Ehre gebührt Rafal Tomczak (RadioClone) und natürlich Thomas Husterer (th9x) und auch Erez Raviv (er9x) und sein fantastisches eePe, worauf companion9x basiert. - + Thank you all !!! Besten Dank an alle! - + Contributors Mitwirkende - - Companion9x Release Notes - - - - + OpenTX Release Notes @@ -9858,8 +9892,12 @@ p, li { white-space: pre-wrap; } + Companion + + + companion9x - companion9x + companion9x eePe @@ -10279,7 +10317,7 @@ Wähle "abbrechen", um die Kalibration abzubrechen logsDialog - Companion9x log viewer + Companion Log Viewer @@ -10293,47 +10331,59 @@ Wähle "abbrechen", um die Kalibration abzubrechen - + Zoom - + X - + Y - + Fly sessions - + Telemetry logs - + Time - + + Error + Fehler + + + + Cannot write file %1: +%2. + Kann Datei %1: +%2 nicht schreiben. + + + Select your log file - + Available fields - + The selected logfile contains %1 invalid lines out of %2 total lines @@ -10791,7 +10841,7 @@ Wähle "abbrechen", um die Kalibration abzubrechen Einstellungen - + Language (requires restart) Sprache (Benötigt Neustart) @@ -10804,7 +10854,7 @@ Wähle "abbrechen", um die Kalibration abzubrechen eePe - + Show Splash Screen Startbild anzeigen @@ -10830,18 +10880,18 @@ Wähle "abbrechen", um die Kalibration abzubrechen Anzahl zuletzt geöffnete Dateien - - + + Download Download - + Default Channel Order Standardeinstellung Kanalzuordnung - + Channel order This is used by the templated to determine which channel goes to what number output. @@ -10850,12 +10900,12 @@ This is used by the templated to determine which channel goes to what number out Hier wird die Zuordnung der Kanäle zum Ausgang festgelegt. - + Default Stick Mode Standard Knüppelmodus - + Mode selection: Mode 1: @@ -10900,117 +10950,117 @@ Mode 4: Prüfe ausgewählte Fw Updates - + Mode 1 (RUD ELE THR AIL) Mode 1 (RUD ELE THR AIL) - + Mode 2 (RUD THR ELE AIL) Mode 2 (RUD THR ELE AIL) - + Mode 3 (AIL ELE THR RUD) Mode 3 (AIL ELE THR RUD) - + Mode 4 (AIL THR ELE RUD) Mode 4 (AIL THR ELE RUD) - + Automatic Backup Folder - + Automatically add version number to the filename after download - + Voice - + Set language of voice. May be different from firmware language - + Firmware Firmware - + Check for updates on startup Überprüfe auf Aktualisierung beim Start - - + + ... ... - + Splash library behaviour Verhalten Startbild Bibliothek - + Include companion splashes 'companion' Startbilder einschliessen - + Only user defined splashes Nur Benutzer Startbilder - + Custom TX splash screen Benutzer Startbild - + Personal splash library Benutzer Startbild Bibliothek - + Joystick Joystick - - - - + + + + Open Folder Verzeichnis öffnen - + SD Structure path - + Processor ID - + Simulator capture folder - + Use clipboard only @@ -11061,113 +11111,123 @@ May be different from firmware language CheckBox - + Check for updates Prüfe für Updates - + Language - + Profile Name - + Export Profile - + Save Profile - + Import Profile - + Simu BackLight - + Check for selected Fw updates - + Ask use of wizard for new models - + Remember switches in simulator - + Blue Blu blau - + Green grün - + Red rot - + Orange orange - + Yellow gelb - + Profile slot - + auto backup before write - + + Find Executable + + + + + Google Earth Executable + + + + Ask for flashing after Download - + Enable aktivieren - + Calibrate kalibrieren - + Open Image Bild öffnen - + Invert Pixels Pixel invertieren @@ -11176,63 +11236,66 @@ May be different from firmware language HG Beleuchtung - + FwInfo FwInfo - + Last downloaded release: %1 Letzte geladene Version: %1 - The selected firmware has never been downloaded by companion9x. - Die gewählte Firmware wurde noch nie von companion9x geladen. + Die gewählte Firmware wurde noch nie von companion9x geladen. - The selected firmware cannot be downloaded by companion9x. - Die gewählte Firmware kann von companio9x nicht geladen werden. + Die gewählte Firmware kann von companio9x nicht geladen werden. - + Image stored in settings Gewähltes Bild in Einstellungen - - + + No joysticks found kein Joystick gefunden - + Select your Models and Settings backup folder - + + Select Google Earth executable + + + + Select the folder replicating your SD structure - + Profile name is empty, profile slot %1 will be deleted.<br>Are you sure ? - + Export profile As - + Profile slot is not empty, profile slot %1 will we overwritten.<br>Are you sure ? - + Open Profile to import @@ -11241,34 +11304,44 @@ May be different from firmware language Bitte Bibliothek Verzeichnis wählen - + Open Image to load Bilddatei öffnen - + Images (%1) Bilder (%1) - - + + Error Fehler - + + The selected firmware has never been downloaded by Companion. + + + + + The selected firmware cannot be downloaded by Companion. + + + + Select your library folder - + Select your snapshot folder - - + + Cannot load %1. Kann %1 nicht laden. @@ -12026,10 +12099,9 @@ May be different from firmware language simulatorDialog - Companion9x Simulator ER9x Simulator - Companion9x Simulator + Companion9x Simulator @@ -12165,7 +12237,7 @@ May be different from firmware language 9x Simulator - + Outputs Ausgaben @@ -12205,264 +12277,269 @@ May be different from firmware language SW12 - + CSK SWK - + CS1 - + + Companion Simulator + + + + CS2 - + CS3 - + CS4 - + CS5 - + CS6 - + CS7 - + CS8 - + CS9 - + CSA - + CSB - + CSC - + CSD - + CSE - + CSF - + CSG - + CSH - + CSI - + CSJ - + CSL - + CSM - + CSN - + CSO - + CSP - + CSQ - + CSR - + CSS - + CST - + CSU - + CSV - + CSW SWW - + CH1 CH1 - + CH9 CH9 - + CH2 CH2 - + CH10 CH10 - + CH3 CH3 - + CH11 CH11 - + CH4 CH4 - + CH12 CH12 - + CH5 CH5 - + CH13 CH13 - + CH6 CH6 - + CH14 CH14 - + CH7 CH7 - + CH15 CH15 - + CH8 CH8 - + CH16 CH16 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + -100.1 -100.1 @@ -12544,9 +12621,8 @@ May be different from firmware language xsimulatorDialog - Companion9x Simulator - Companion9x Simulator + Companion9x Simulator @@ -12655,7 +12731,7 @@ May be different from firmware language Ausgaben - + CSK SWK @@ -12723,6 +12799,11 @@ May be different from firmware language S2 + + + Companion Simulator + + @@ -12753,16 +12834,16 @@ May be different from firmware language - - - - - - - - - - + + + + + + + + + + -100.1 -100.1 @@ -12797,202 +12878,202 @@ May be different from firmware language CH4 - + CH12 CH12 - + CH5 CH5 - + CH13 CH13 - + CH6 CH6 - + CH14 CH14 - + CH7 CH7 - + CH15 CH15 - + CH8 CH8 - + CH16 CH16 - + CSC - + CSD - + CS7 - + CSL - + CSB - + CS1 - + CSH - + CSG - + CSE - + CSF - + CS8 - + CS9 - + CSA - + CSM - + CSJ - + CSI - + CS4 - + CS5 - + CS2 - + CS3 - + CS6 - + CSN - + CSO - + CSP - + CSQ - + CSR - + CSS - + CST - + CSU - + CSV - + CSW SWW diff --git a/companion/src/translations/companion9x_fr.ts b/companion/src/translations/companion_fr.ts similarity index 94% rename from companion/src/translations/companion9x_fr.ts rename to companion/src/translations/companion_fr.ts index 46f1297e4..d62d3e8c8 100644 --- a/companion/src/translations/companion9x_fr.ts +++ b/companion/src/translations/companion_fr.ts @@ -1202,7 +1202,7 @@ Are you sure ? MainWindow - + &New &Nouveau @@ -1211,17 +1211,17 @@ Are you sure ? Flasher - + Cu&t C&ouper - + Edit Edition - + File Fichier @@ -1240,33 +1240,32 @@ Are you sure ? Nouvelle version disponible - A new release of companion is available please check the repository - Une nouvelle version de companion9x est disponible, veuillez vérifier dans l'espace de téléchargement + Une nouvelle version de companion9x est disponible, veuillez vérifier dans l'espace de téléchargement - - - - - - - - - + + + + + + + + + Error Erreur - - - + + + Error opening file %1: %2. Erreur à l'ouverture du fichier %1: @@ -1306,10 +1305,8 @@ Are you sure ? Serveur de compilation trop occupé - - Compilation server requires registration, please check opentx web site - Le serveur de compilation nécessite d'être enregistré, veuillez vous référer au site web d'openTx + Le serveur de compilation nécessite d'être enregistré, veuillez vous référer au site web d'openTx @@ -1322,70 +1319,70 @@ Are you sure ? Voulez-vous flasher ce firmware maintenant ? - - + + Yes Oui - - + + No Non - - + + Release Notes Release Notes - - + + Do you want to download release %1 now ? Voulez-vous télécharger la release %1 ? - + Release notes contain very important informations. Do you want to see them now ? Les notes de version contiennent des informations très importantes. Voulez-vous les voir maintenant? - + Open Ouvrir - + Firmware updates Mises à jour de firmware - + Current firmware does not provide release notes informations. Le firmware actuel ne contient pas de notes de version. - + Cannot write file %1: %2. Ecriture fichier %1 impossible: %2. - - - - - + + + + + Taranis radio not found Radio Taranis non détectée - - - - + + + + Impossible to identify the radio on your system, please verify the eeprom disk is connected. Impossible de trouver la radio, vérifiez qu'elle est bien sous tension et connectée. @@ -1396,16 +1393,16 @@ Burn anyway ? Le fichier %1 n'est pas reconnu comme une EEPROM valide. Confirmer le transfert ? - - - + + + Backup is impossible Sauvegarde impossible - - - + + + The backup dir set in preferences does not exist Le dossier de sauvegarde configuré dans les préférences n'existe pas @@ -1418,8 +1415,8 @@ Burn anyway ? Impossible de vérifier la compatibilité de l'EEPROM! Continuer quand même? - - + + Warning Avertissement @@ -1440,7 +1437,7 @@ Burn anyway ? Flasher l'émetteur - + Conversion failed La conversion a échoué @@ -1453,7 +1450,7 @@ Burn anyway ? Restaurer l'EEPROM vers l'émetteur - + Restore failed Erreur lors de la restauration @@ -1470,7 +1467,7 @@ Burn anyway ? Impossible de flasher l'émetteur, l'EEPROM d'origine se trouve dans : %1 - + Backup failed Erreur lors de la sauvegarde @@ -1479,87 +1476,86 @@ Burn anyway ? Impossible de sauvegarder l'EEPROM. Flashage annulé - + %1 %2 - + &loadBackup... c&harger sauvegarde... - + Load backup from file Charger une sauvegarde à partir du fichier - + Lo&gs - + Ctrl+G - + Open log file Ouvrir fichier de log - + ChangeLog... Historique des changements... - Show companion9x changelog - Historique des changements de companion9x + Historique des changements de companion9x - + Firmware ChangeLog... Historique des changements du firmware... - + Show firmware changelog Montrer l'historique des changements du firmware - + Compare... Comparer... - + Compare models Comparer les modèles - + Configure software for reading from and writing to the transmitter Configure le programme pour communiquer correctement avec la radio - + Show fuses dialog Afficher les réglages des fusibles - + &Read/Write &Lire/Ecrire - + Write Ecrire - + Unable to find file %1! Fichier %1 introuvable! @@ -1568,7 +1564,7 @@ Burn anyway ? Fichier EEPROM %1 invalide - + Error reading file %1: %2. Fichier %1 corrompu: @@ -1587,78 +1583,119 @@ Burn anyway ? Fl&asher - + &Copy &Copier - + &Edit Éditio&n - + &File &Fichier - + &Help &Aide - + &Save &Enregistrer - + &Tile &Mosaïque - + E&xit &Quitter - + Alt+S - + &Simulate &Simulation + + + + + Companion - Models and Settings Editor - %1 - profile %2 + + + + + + + + Companion - Models and Settings Editor - %1 + + + + + A new version of Companion is available (version %1)<br>Would you like to download it? + + + + + A new release of Companion is available please check the repository + + Firmware does not longer fit in the Tx, due to selected firmware options Le firmware sélectionné est trop gros pour la mémoire de la radio, veuillez sélectionner moins d'options + + + + Compilation server requires registration, please check OpenTX web site + + Firmware does not fit in the Tx, due to selected firmware options Le firmware sélectionné est trop gros pour la mémoire de la radio, veuillez sélectionner moins d'options - + Write Models and settings from %1 to the Tx? Ecrire les réglages et modèles de %1 dans la radio? - + + Show Companion contributors list + + + + + Show Companion changelog + + + + Ne&xt Sui&vante - - + + Firmware Profiles Profils de firmware - + Ready Prêt @@ -1667,39 +1704,39 @@ Burn anyway ? Enregistrer la mémoire Flash sous - + Show the application's About box Afficher la fenêtre "A propos" de l'application - - - + + + &%1 %2 - + &About &À Propos - + &Paste Co&ller - + &Print Im&primer - + Save &As... Enregistrer &Sous... - + Cascade the windows Disposer les fenêtres en cascade @@ -1708,32 +1745,32 @@ Burn anyway ? Lire la mémoire Flash - + Paste the clipboard's contents into the current selection Coller le contenu du presse-papier à l'emplacement sélectionné - + Open an existing file Ouvrir un fichier existant - + &Configure... &Configurer la communication... - + Cl&ose &Fermer - + Ctrl+P - + Print current model. Imprimer les données du modèle sélectionné. @@ -1742,7 +1779,7 @@ Burn anyway ? Charger l'EEPROM de l'émetteur - + Close all the windows Fermer toutes les fenêtres @@ -1751,56 +1788,56 @@ Burn anyway ? Écrire dans la mémoire Flash de l'émetteur - + donating don - + &Open... &Ouvrir... - + Create a new file Créer un nouveau fichier - + Close the active window Fermer la fenêtre active - - - + + + File loaded Fichier chargé - - + + File saved Fichier sauvegardé - + Switch layout direction Inverser l'interface - + Move the focus to the previous window Activer la fenêtre précedente - + Pre&vious P&récédente - + Exit the application Quitter l'application @@ -1809,32 +1846,32 @@ Burn anyway ? Écrire la mémoire Flash - + List available programmers Lister les programmateurs supportés - + Save the document to disk Enregistrer sur le disque - + Close &All Fermer To&ut - + &Cascade &Cascade - + Simulate selected model. Simuler le modèle sélectionné - + Tile the windows Disposer les fenêtres en mosaïque @@ -1843,47 +1880,46 @@ Burn anyway ? Lire la mémoire Flash de l'émetteur - + Save the document under a new name Enregistrer sous un nom différent - + &Window Fe&nêtre - + Edit general preferences Définir les préférences générales - + &Preferences... &Préférences... - About companion9x - À propos de companion9x + À propos de companion9x - + &Fuses... &Fusibles... - + Copy the current selection's contents to the clipboard Copier la sélection dans le presse-papier - + Move the focus to the next window Activer la fenêtre suivante - + &List programmers &Programmateurs supportés @@ -1892,17 +1928,17 @@ Burn anyway ? Transférer l'EEPROM vers l'émetteur - + Cut the current selection's contents to the clipboard Couper la sélection et la copier dans le presse-papier - + Ctrl+Alt+R - + Ctrl+Alt+W @@ -1923,22 +1959,21 @@ Burn anyway ? Enregistrer l'EEPROM de l'émetteur dans un fichier - + Version %1 (revision %2), %3 Version %1 (révision %2), %3 - The companion9x project was originally forked from eePe - Le projet companion9x a été créé à partir de eePe + Le projet companion9x a été créé à partir de eePe - + Customize your &TX... &Personnaliser votre émetteur... - + Customize the splash screen of your TX Personnaliser l'écran de démarrage de votre émetteur @@ -1962,8 +1997,8 @@ Burn anyway ? - - + + Save As Enregistrer Sous @@ -1974,7 +2009,7 @@ Burn anyway ? - + No updates available at this time. Aucune mise à jour disponible. @@ -1982,8 +2017,8 @@ Burn anyway ? - - + + Unable to check for updates. Impossible de rechercher des mises à jour. @@ -1993,7 +2028,7 @@ Burn anyway ? Voulez-vous lancer l'installation ? - + A new version of %1 firmware is available (current %2 - newer %3). Do you want to download it now ? Une nouvelle version du firmware %1 est disponible (courante %2 - nouvelle %3). @@ -2004,32 +2039,31 @@ Voulez vous la télécharger maintenant ? Transférer %1 dans la mémoire EEPROM de l'émetteur ? - + &Check for updates... Re&chercher des mises à jour... - Check for new version of companion9x/er9x - Vérifier l'existence d'une nouvelle version de companion9x et du firmware sélectionné + Vérifier l'existence d'une nouvelle version de companion9x et du firmware sélectionné - + Copyright Copyright - + Switch layout Left/Right Inverser l'interface gauche/droite - + Ignore this version (r%1)? Ignorer cette version (r%1)? - + Help Aide @@ -2039,24 +2073,16 @@ Voulez vous la télécharger maintenant ? Recherche de mises à jour - - - companion9x - Models and Settings Editor - %1 - profile %2 - companion9x - Editeur de réglages et modèles - %1 - profil %2 + companion9x - Editeur de réglages et modèles - %1 - profil %2 - - - - companion9x - Models and Settings Editor - %1 - companion9x - Editeur de réglages et modèles - %1 + companion9x - Editeur de réglages et modèles - %1 - A new version of companion9x is available (version %1)<br>Would you like to download it? - Une nouvelle version de companion9x est disponible (r%1)<br>Voulez-vous la télécharger ? + Une nouvelle version de companion9x est disponible (r%1)<br>Voulez-vous la télécharger ? @@ -2064,7 +2090,7 @@ Voulez vous la télécharger maintenant ? Voulez-vous vraiment flasher le firmware de la radio? - + Firmware %1 does not seem to have ever been downloaded. Version %2 is available. Do you want to download it now ? @@ -2073,15 +2099,15 @@ La version %2 est disponible. Voulez-vous la télécharger maintenant ? - - - - + + + + Read Models and Settings From Tx Lire les réglages et modèles depuis la radio - + The file %1 has not been recognized as a valid Models and Settings file Write anyway ? @@ -2090,158 +2116,172 @@ n'a pas été reconnu comme un fichier de réglage et modèles valide. Ecrire quand même? - - - - - - + + + + + + Backup Models and Settings From Tx Sauvegarder les réglages et modèles depuis la radio - + Cannot check Models and Settings compatibility! Continue anyway? Impossible de vérifier la compatibilité des réglages et modèles. Continuer quand même? - + The transmitter firmware belongs to another product family, check file and preferences! Le firmware sélectionné est destiné à un différent type de radio, veuillez vérifier le fichier et les préférences! - + The transmitter firmware is outdated, please upgrade! Le firmware de la radio est obsolète, veuillez mettre à jour! - + Write Models and Settings To Tx Ecrire les réglages et modèles dans la radio - - + + Write Firmware To Tx Flasher le firmware de la radio - + Cannot convert Models and Settings for use with this firmware, original data will be used Impossible de convertir les réglages et modèles pour ce firmware, les données originales vont être utilisées - + Restore Models and Settings To Tx Restaurer une sauvegarde de réglages et modèles - + Could not restore Models and Settings to TX. The models and settings data file can be found at: %1 Impossible de restaurerles réglages et modèles. Une copie du fichier est placée ici: %1 - + Firmware write failed L'écriture du firmware a échoué. - + Could not write firmware to to transmitter. The models and settings data file can be found at: %1 Impossible de flasher le firmware. Une copie du fichier de réglages et modèles est placée ici: %1 - + Cannot backup existing Models and Settings from TX. Firmware write process aborted Impossible de sauvegarder les réglages et modèles de la radio. Le flashage est abandonné. - + Save transmitter Models and Settings to File Sauvegarder les réglages et modèles depuis la radio dans un fichier - + Impossible to identify the radio on your system, please verify that the eeprom disk is connected. Impossible de trouver la radio, veuillez vérifier que la radio est sous tension sur la page d'accueil et connectée. - + Read Tx Firmware to File Sauvegarder le firmware de la radio dans un fichier + The Companion project was originally forked from eePe + + + + If you've found this program useful, please support by Si vous trouvez ce programme utile, merci d'apporter votre soutien en effectuant un - + + About Companion + + + + + Check for new version of Companion + + + + Contributors &List... &Liste des contributeurs... - Show companion9x contributors list - Lister les contributeurs de companion9x + Lister les contributeurs de companion9x - + &Write Models and Settings To Tx &Transférer les réglages et modèles à la radio - + Write Models and Settings to transmitter Transférer les réglages et modèles à la radio - + &Read Models and Settings From Tx &Lire les réglages et modèles depuis la radio - + Read Models and Settings from transmitter Lire les réglages et modèles depuis la radio - + Write Firmware Flasher le firmware - + Write firmware to transmitter Flasher le firmware de la radio - + Write Models and Settings from file to Tx Restaurer les réglages et modèles depuis un fichier - + Write Models and Settings from file to transmitter Restaurer les réglages et modèles depuis un fichier - + Save transmitter Models and Settings to file Sauvegarder les réglages et modèles dans un fichier - + Save the Models and Settings from the transmitter to a file Sauvegarder les réglages et modèles dans un fichier - + Read Firmware Lire le firmware de la radio - + Read firmware from transmitter Lire le firmware de la radio @@ -2254,32 +2294,25 @@ Ecrire quand même? Configure le programme pour communiquer correctement avec la radio - - + + Recent Files Derniers documents utilisés - - + + Invalid Models and Settings File %1 Fichier de réglages et modèles invalide: %1 - + Invalid binary Models and Settings File %1 Fichier binaire de réglages et modèles invalide: %1 MdiChild - - - - - companion9x - - @@ -2373,6 +2406,13 @@ Ecrire quand même? Do you want to use model wizard? Voulez-vous utiliser l'assistant de configuration de modèle ? + + + + + Companion + + Ask this question again ? @@ -7355,18 +7395,26 @@ Check your settings again. Attention, le format de l'écran d'accueil personnalisé dans les préférences a changé. Veuillez le sélectionner à nouveau le cas échéant. - Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next openTX/C9x funding model. We are really sensible to that! The openTX/C9X Team. - Merci pour vos donations, messages, bonnes idées, propositions constructives pour le nouveau système de financement d'openTx. + Merci pour vos donations, messages, bonnes idées, propositions constructives pour le nouveau système de financement d'openTx. Nous en sommes très reconnaissants! L'équipe d'openTx/C9X + + + Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next OpenTX/Companion funding model. + +We are really appreciative for that! + +The OpenTX/Companion Team. + + avrOutputDialog @@ -7631,6 +7679,12 @@ Consulter la documentation du programmateur utilisé et celle d'AVRDUDE pou Select Location Choisir l'emplacement + + + + Companion + + <b><u>WARNING!</u></b><br>This will reset the fuses of %1 to the factory settings.<br>Writing fuses can mess up your radio.<br>Do this only if you are sure they are wrong!<br>Are you sure you want to continue? @@ -7731,10 +7785,8 @@ m2560 for v4.1 boards Port série de SAM-BA - - companion9x - companion9x + companion9x @@ -7784,6 +7836,11 @@ m2560 for v4.1 boards Browse for file Parcourir... + + + Allows Companion to write to older version of the firmware + + Backup and restore Models and Settings @@ -7831,9 +7888,8 @@ m2560 for v4.1 boards Variante - Allows companion9x to write to older version of the firmware - Permet à companion9x de programmer des anciennes versions de firmware + Permet à companion9x de programmer des anciennes versions de firmware @@ -8607,28 +8663,38 @@ m2560 for v4.1 boards Honors go to Rafal Tomczak (RadioClone) and Thomas Husterer (th9x) +of course. Also to Erez Raviv (er9x) and the fantastic eePe program +which was the staring point for OpenTX Companion. + + + + + Companion Release Notes + + + + Honors go to Rafal Tomczak (RadioClone) and Thomas Husterer (th9x) of course. Also to Erez Raviv (er9x) and it's fantastic eePe, from which companion9x was forked out. - Un merci tout particulier à Rafal Tomczak (RadioClone) et Thomas Husterer (th9x) bien sûr. + Un merci tout particulier à Rafal Tomczak (RadioClone) et Thomas Husterer (th9x) bien sûr. Egalement à Erez Raviv (er9x) et son fantastique programme eePe d'où est parti companion9x. - + Thank you all !!! Merci à tous !!! - + Contributors Contributeurs - Companion9x Release Notes - Notes de version de companion9x + Notes de version de companion9x - + OpenTX Release Notes Notes de version d'openTx @@ -8778,8 +8844,12 @@ p, li { white-space: pre-wrap; } + Companion + + + companion9x - companion9x + companion9x @@ -9132,9 +9202,13 @@ Press cancel to abort joystick calibration logsDialog - Companion9x log viewer - Visualiseur de log + Visualiseur de log + + + + Companion Log Viewer + @@ -9147,47 +9221,59 @@ Press cancel to abort joystick calibration Ouvrir fichier de log - + Zoom - + X - + Y - + Fly sessions Sessions de vol - + Telemetry logs Enregistrements de télémesure - + Time Heure - + + Error + Erreur + + + + Cannot write file %1: +%2. + Ecriture fichier %1 impossible: +%2. + + + Select your log file Sélectionnez votre fichier log - + Available fields Champs disponibles - + The selected logfile contains %1 invalid lines out of %2 total lines Le fichier de log sélectionné contient %1 lignes invalides sur %2 @@ -9642,17 +9728,17 @@ Press cancel to abort joystick calibration preferencesDialog - + Mode 2 (RUD THR ELE AIL) Mode 2 (DIR GAZ PROF AIL) - + Mode 4 (AIL THR ELE RUD) Mode 4 (AIL GAZ PROF DIR) - + Mode selection: Mode 1: @@ -9693,88 +9779,88 @@ Manche Droit: Profondeur, Direction - + Mode 3 (AIL ELE THR RUD) Mode 3 (AIL PROF GAZ DIR) - + Firmware - - + + ... - + Enable Actif - + Calibrate Calibrer - - - - + + + + Open Folder Ouvrir le répertoire - + Set language of voice. May be different from firmware language Langue des voix. Peut être différente de la langue du firmware - + Export Profile Exporter le profil - + Import Profile Importer le profil - + Custom TX splash screen Personnaliser l'écran d'accueil - + Automatic Backup Folder Dossier de sauvegardes automatiques - + Automatically add version number to the filename after download Ajouter le numéro de version au nom de fichier après téléchargement - + SD Structure path Chemin de la structure de la carte SD - + Processor ID ID du processeur - + Simulator capture folder Dossier de sauvegarde des captures d'écran - + Use clipboard only Utiliser le presse-papiers @@ -9825,12 +9911,12 @@ Peut être différente de la langue du firmware - + Check for updates Vérifier les mises à jour - + Channel order This is used by the templated to determine which channel goes to what number output. @@ -9838,138 +9924,148 @@ This is used by the templated to determine which channel goes to what number out Indique l'affectation voie / numéro de canal par défaut utilisée lors de la création d'un modèle. - + Language Langue - + Voice Voix - + Profile Name Nom du profil - + Save Profile Sauvegarder profil - + Simu BackLight Rétroéclairage simu - + Check for selected Fw updates Vérifier les mises à jour de firmwares au démarrage - + Ask use of wizard for new models Utiliser l'assistant de configuration de modèle - + Remember switches in simulator Mémoriser les inters pour le simulateur - + Blue Blu Bleu - + Green Vert - + Red Rouge - + Orange Orange - + Yellow Jaune - + Personal splash library Bibliothèque de splashs personnalisés - + Profile slot Numéro de profil + + + Find Executable + + + + + Google Earth Executable + + eEprom backup folder Dossier de sauvegarde de l'EEPROM - + auto backup before write Sauvegarde automatique avant programmation - + Ask for flashing after Download Demander pour flasher après téléchargement - + Splash library behaviour Utilisation de la bibliothèque de Splashes - + Include companion splashes Inclure les écrans d'accueil de companion9x - + Only user defined splashes Seulement vos écrans d'accueil - + Joystick Joystick - + Open Image Charger une image - + Invert Pixels Inverser les couleurs - + FwInfo - + Language (requires restart) Version française par Pascal Dugué / Octobre 2010. Langue (nécessite un redémarrage de companion9x) - + Default Channel Order Ordre des voies par défaut @@ -9979,22 +10075,22 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de Préférences - + Default Stick Mode Mode par défaut - + Mode 1 (RUD ELE THR AIL) Mode 1 (DIR PROF GAZ AIL) - + Check for updates on startup Vérifier les mises à jour au démarrage - + Show Splash Screen Afficher l'écran d'accueil au démarrage @@ -10004,90 +10100,103 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de Taille de l'historique des derniers documents utilisés - - + + Download Télécharger - + Last downloaded release: %1 Dernière version téléchargée : %1 - The selected firmware has never been downloaded by companion9x. - Le firmware sélectionné n'a jamais été téléchargé par companion9x. + Le firmware sélectionné n'a jamais été téléchargé par companion9x. - The selected firmware cannot be downloaded by companion9x. - Le firmware sélectionné ne peut pas être téléchargé par companion9x. + Le firmware sélectionné ne peut pas être téléchargé par companion9x. - + Image stored in settings Image enregistrée dans les paramètres - - + + No joysticks found Aucun joystick - + Select your Models and Settings backup folder Sélectionner le dossier dans lequel une sauvegarde des réglages et modèles sera placée automatiquement lors de chaque opération - + + Select Google Earth executable + + + + Select the folder replicating your SD structure Sélectionner un dossier contenant une copie des dossiers de la carte SD - + Profile name is empty, profile slot %1 will be deleted.<br>Are you sure ? Le nom du profil est vide, le profil %1 va être effacé.<br>Etes-vous sûr? - + Export profile As Exporter le profil sous - + Profile slot is not empty, profile slot %1 will we overwritten.<br>Are you sure ? L'emplacement %1 n'est pas vide, il va être écrasé. Continuer? - + Open Profile to import Ouvrir le profil à importer - + Open Image to load Ouvre l'image à charger - + Images (%1) Images (%1) - - + + Error Erreur - + + The selected firmware has never been downloaded by Companion. + + + + + The selected firmware cannot be downloaded by Companion. + + + + Select your library folder Sélectionner le dossier de bibliothèque - + Select your snapshot folder Sélectionner le dossier où stocker les captures d'écran @@ -10096,8 +10205,8 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de Sélectionner le dossier de sauvegarde d'EEPROM - - + + Cannot load %1. Impossible de charger %1. @@ -10625,59 +10734,59 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de - + CSK SWK IPK - + CSW SWW IPW - + CH1 - + CH2 - + CH3 - + CH4 - + CH5 - + CH6 - + CH7 - + CH8 - + CH9 @@ -10742,187 +10851,192 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de BIP - + + Companion Simulator + + + + CS1 IP1 - + CS2 IP2 - + CS3 IP3 - + CS4 IP4 - + CS5 IP5 - + CS6 IP6 - + CS7 IP7 - + CS8 IP8 - + CS9 IP9 - + CSA IPA - + CSB IPB - + CSC IPC - + CSD IPD - + CSE IPE - + CSF IPF - + CSG IPG - + CSH IPH - + CSI IPI - + CSJ IPJ - + CSL IPL - + CSM IPM - + CSN IPN - + CSO IPO - + CSP IPQ - + CSQ IPR - + CSR IPS - + CSS IPS - + CST IPT - + CSU IPU - + CSV IPV - + CH10 - + CH11 - + CH12 - + CH13 - + CH14 - + CH15 - + CH16 @@ -10939,22 +11053,22 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de Verrou Y - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + -100.1 @@ -10984,9 +11098,8 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de - Companion9x Simulator - Simulateur companion9x + Simulateur companion9x @@ -10994,7 +11107,7 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de Simulateur 9x - + Outputs Sorties @@ -11068,9 +11181,8 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de xsimulatorDialog - Companion9x Simulator - Simulateur companion9x + Simulateur companion9x @@ -11191,7 +11303,7 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de Sorties - + CSK SWK IPK @@ -11201,6 +11313,11 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de CH1 VOIE1 + + + Companion Simulator + + Taranis Simulator @@ -11213,16 +11330,16 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de - - - - - - - - - - + + + + + + + + + + -100.1 @@ -11257,202 +11374,202 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de VOIE4 - + CH12 VOIE12 - + CH5 VOIE5 - + CH13 VOIE13 - + CH6 VOIE6 - + CH14 VOIE14 - + CH7 VOIE7 - + CH15 VOIE15 - + CH8 VOIE8 - + CH16 VOIE16 - + CSC IPC - + CSD IPD - + CS7 IP7 - + CSL IPL - + CSB IPB - + CS1 IP1 - + CSH IPH - + CSG IPG - + CSE IPE - + CSF IPF - + CS8 IP8 - + CS9 IP9 - + CSA IPA - + CSM IPM - + CSJ IPJ - + CSI IPI - + CS4 IP4 - + CS5 IP5 - + CS2 IP2 - + CS3 IP3 - + CS6 IP6 - + CSN IPN - + CSO IPO - + CSP IPQ - + CSQ IPR - + CSR IPS - + CSS IPS - + CST IPT - + CSU IPU - + CSV IPV - + CSW SWW IPW diff --git a/companion/src/translations/companion9x_he.ts b/companion/src/translations/companion_he.ts similarity index 94% rename from companion/src/translations/companion9x_he.ts rename to companion/src/translations/companion_he.ts index c8d66f2f5..ddfaa4e3d 100644 --- a/companion/src/translations/companion9x_he.ts +++ b/companion/src/translations/companion_he.ts @@ -1149,29 +1149,24 @@ Are you sure ? MainWindow - - - + + + File loaded - - - A new version of companion9x is available (version %1)<br>Would you like to download it? - - - - + + Save As - + No updates available at this time. @@ -1179,26 +1174,11 @@ Are you sure ? - - + + Unable to check for updates. - - - - - companion9x - Models and Settings Editor - %1 - profile %2 - - - - - - - - companion9x - Models and Settings Editor - %1 - - Checking for updates @@ -1220,102 +1200,102 @@ Are you sure ? - + Firmware %1 does not seem to have ever been downloaded. Version %2 is available. Do you want to download it now ? - + Open - - + + File saved - + Copyright - + donating - - - + + + &%1 %2 - + %1 %2 - + &New - + Create a new file - + &Open... - + Open an existing file - + &Save - + Save the document to disk - + Save &As... - + Save the document under a new name - + &Preferences... - + Edit general preferences - + &Check for updates... - + If you've found this program useful, please support by @@ -1329,34 +1309,29 @@ Do you want to download it now ? New release available - - - A new release of companion is available please check the repository - - - - - - - - - - - + + + + + + + + + Error - - - + + + Error opening file %1: %2. @@ -1387,12 +1362,6 @@ Do you want to download it now ? Compilation server too busy, try later - - - - Compilation server requires registration, please check opentx web site - - @@ -1405,640 +1374,671 @@ Do you want to download it now ? - - + + Yes - - + + No - - + + Release Notes - - + + Do you want to download release %1 now ? - + A new version of %1 firmware is available (current %2 - newer %3). Do you want to download it now ? - + Ignore this version (r%1)? - + Release notes contain very important informations. Do you want to see them now ? - + Firmware updates - + Current firmware does not provide release notes informations. - + Cannot write file %1: %2. - - - - - + + + + + Taranis radio not found - - - - + + + + Impossible to identify the radio on your system, please verify the eeprom disk is connected. - + Write Models and settings from %1 to the Tx? - - - + + + Backup is impossible - - - + + + The backup dir set in preferences does not exist - - + + Warning - + Conversion failed - + Restore failed - + Backup failed - + Version %1 (revision %2), %3 - - The companion9x project was originally forked from eePe - - - - - About companion9x - - - - + &loadBackup... - + Load backup from file - + Lo&gs - + Ctrl+G - + Open log file - - Check for new version of companion9x/er9x - - - - + Contributors &List... - - Show companion9x contributors list - - - - + ChangeLog... - - Show companion9x changelog - - - - + Firmware ChangeLog... - + Show firmware changelog - + Compare... - + Compare models - + Customize your &TX... - + Customize the splash screen of your TX - + E&xit - + Exit the application - + Cu&t - + Cut the current selection's contents to the clipboard - + &Copy - + Copy the current selection's contents to the clipboard - + &Paste - + Paste the clipboard's contents into the current selection - + Ctrl+Alt+W - + Ctrl+Alt+R - + &Configure... - + Configure software for reading from and writing to the transmitter - + &List programmers - + List available programmers - + &Fuses... - + Show fuses dialog - + &Simulate - + Alt+S - + Simulate selected model. - + &Print - + Ctrl+P - + Print current model. - + Cl&ose - + Close the active window - + Close &All - + Close all the windows - + &Tile - + Tile the windows - + &Cascade - + Cascade the windows - + Ne&xt - + Move the focus to the next window - + Pre&vious - + Move the focus to the previous window - + &About - + Show the application's About box - - + + Recent Files - + &Read/Write - + Write - + Unable to find file %1! - + Error reading file %1: %2. - + Switch layout Left/Right - + &File - + Switch layout direction - - - - + + + + Companion - Models and Settings Editor - %1 - profile %2 + + + + + + + + Companion - Models and Settings Editor - %1 + + + + + A new version of Companion is available (version %1)<br>Would you like to download it? + + + + + A new release of Companion is available please check the repository + + + + + + Compilation server requires registration, please check OpenTX web site + + + + + + + Read Models and Settings From Tx - + The file %1 has not been recognized as a valid Models and Settings file Write anyway ? - - - - - - + + + + + + Backup Models and Settings From Tx - + Cannot check Models and Settings compatibility! Continue anyway? - + The transmitter firmware belongs to another product family, check file and preferences! - + The transmitter firmware is outdated, please upgrade! - + Write Models and Settings To Tx - - + + Write Firmware To Tx - + Cannot convert Models and Settings for use with this firmware, original data will be used - + Restore Models and Settings To Tx - + Could not restore Models and Settings to TX. The models and settings data file can be found at: %1 - + Firmware write failed - + Could not write firmware to to transmitter. The models and settings data file can be found at: %1 - + Cannot backup existing Models and Settings from TX. Firmware write process aborted - + Save transmitter Models and Settings to File - + Impossible to identify the radio on your system, please verify that the eeprom disk is connected. - + Read Tx Firmware to File - + + The Companion project was originally forked from eePe + + + + + About Companion + + + + + Check for new version of Companion + + + + + Show Companion contributors list + + + + + Show Companion changelog + + + + &Write Models and Settings To Tx - + Write Models and Settings to transmitter - + &Read Models and Settings From Tx - + Read Models and Settings from transmitter - + Write Firmware - + Write firmware to transmitter - + Write Models and Settings from file to Tx - + Write Models and Settings from file to transmitter - + Save transmitter Models and Settings to file - + Save the Models and Settings from the transmitter to a file - + Read Firmware - + Read firmware from transmitter - - + + Firmware Profiles - + &Edit - - + + Invalid Models and Settings File %1 - + Invalid binary Models and Settings File %1 - + &Window - + &Help - + File - + Edit - + Help - + Ready @@ -2130,14 +2130,14 @@ Write anyway ? - - - companion9x + Do you want to use model wizard? - Do you want to use model wizard? + + + Companion @@ -7026,18 +7026,6 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi th9x doesn't support curve with %1 point as curve%2 - - - Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next openTX/C9x funding model. - -We are really sensible to that! - -The openTX/C9X Team. - Warning! -Telemetry channel order has been changed, please check function switches and telemetry settings! -Expos settings have been changed, please verify before flight! - - @@ -7073,6 +7061,15 @@ Expos settings have been changed, please verify before flight! OpenTX doesn't allow this number of channels + + + Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next OpenTX/Companion funding model. + +We are really appreciative for that! + +The OpenTX/Companion Team. + + avrOutputDialog @@ -7395,7 +7392,7 @@ Please only use this if you know what you are doing. There are no error checks - companion9x + Companion @@ -7466,6 +7463,11 @@ m2560 for v4.1 boards Browse for file + + + Allows Companion to write to older version of the firmware + + Backup and restore Models and Settings @@ -7512,11 +7514,6 @@ m2560 for v4.1 boards Variant - - - Allows companion9x to write to older version of the firmware - - Check Firmware compatibility @@ -8243,27 +8240,27 @@ m2560 for v4.1 boards Honors go to Rafal Tomczak (RadioClone) and Thomas Husterer (th9x) -of course. Also to Erez Raviv (er9x) and it's fantastic eePe, from which -companion9x was forked out. +of course. Also to Erez Raviv (er9x) and the fantastic eePe program +which was the staring point for OpenTX Companion. - + + Companion Release Notes + + + + Thank you all !!! - + Contributors - - Companion9x Release Notes - - - - + OpenTX Release Notes @@ -8413,7 +8410,7 @@ p, li { white-space: pre-wrap; } - companion9x + Companion @@ -8740,7 +8737,7 @@ Press cancel to abort joystick calibration logsDialog - Companion9x log viewer + Companion Log Viewer @@ -8754,47 +8751,58 @@ Press cancel to abort joystick calibration - + Zoom - + X - + Y - + Fly sessions - + Telemetry logs - + Time - + + Error + + + + + Cannot write file %1: +%2. + + + + Select your log file - + Available fields - + The selected logfile contains %1 invalid lines out of %2 total lines @@ -9252,27 +9260,27 @@ Press cancel to abort joystick calibration - + Language (requires restart) - + SD Structure path - + Processor ID - + Simulator capture folder - + Use clipboard only @@ -9282,40 +9290,40 @@ Press cancel to abort joystick calibration - - + + Download - + Default Channel Order - + Default Stick Mode - + Channel order This is used by the templated to determine which channel goes to what number output. - + FwInfo - + Show Splash Screen - + Mode selection: Mode 1: @@ -9338,97 +9346,107 @@ Mode 4: - + Mode 1 (RUD ELE THR AIL) - + Mode 2 (RUD THR ELE AIL) - + Mode 3 (AIL ELE THR RUD) - + Mode 4 (AIL THR ELE RUD) - + Automatic Backup Folder - + Automatically add version number to the filename after download - + Voice - + Set language of voice. May be different from firmware language - + Firmware - + + Find Executable + + + + + Google Earth Executable + + + + Check for updates on startup - - + + ... - + Splash library behaviour - + Include companion splashes - + Only user defined splashes - + Custom TX splash screen - + Personal splash library - + Joystick - - - - + + + + Open Folder @@ -9479,201 +9497,206 @@ May be different from firmware language - + Check for updates - + Language - + Profile Name - + Export Profile - + Save Profile - + Import Profile - + Blue Blu - + Simu BackLight - + Check for selected Fw updates - + Ask use of wizard for new models - + Remember switches in simulator - + Green - + Red - + Orange - + Yellow - + Profile slot - + auto backup before write - + Ask for flashing after Download - + Enable - + Calibrate - + Open Image - + Invert Pixels - + Last downloaded release: %1 - - The selected firmware has never been downloaded by companion9x. - - - - - The selected firmware cannot be downloaded by companion9x. - - - - + Image stored in settings - - + + No joysticks found - + Select your Models and Settings backup folder - + + Select Google Earth executable + + + + Select the folder replicating your SD structure - + Profile name is empty, profile slot %1 will be deleted.<br>Are you sure ? - + Export profile As - + Profile slot is not empty, profile slot %1 will we overwritten.<br>Are you sure ? - + Open Profile to import - + Open Image to load - + Images (%1) - - + + Error - + + The selected firmware has never been downloaded by Companion. + + + + + The selected firmware cannot be downloaded by Companion. + + + + Select your library folder - + Select your snapshot folder - - + + Cannot load %1. @@ -10174,12 +10197,6 @@ May be different from firmware language simulatorDialog - - - Companion9x Simulator - ER9x Simulator - - P1 @@ -10285,6 +10302,11 @@ May be different from firmware language Right Double Click to Reset + + + Companion Simulator + + @@ -10298,267 +10320,267 @@ May be different from firmware language - + Outputs - + CS1 - + CS2 - + CS3 - + CS4 - + CS5 - + CS6 - + CS7 - + CS8 - + CS9 - + CSA - + CSB - + CSC - + CSD - + CSE - + CSF - + CSG - + CSH - + CSI - + CSJ - + CSK - + CSL - + CSM - + CSN - + CSO - + CSP - + CSQ - + CSR - + CSS - + CST - + CSU - + CSV - + CSW - + CH1 - + CH9 - + CH2 - + CH10 - + CH3 - + CH11 - + CH4 - + CH12 - + CH5 - + CH13 - + CH6 - + CH14 - + CH7 - + CH15 - + CH8 - + CH16 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + -100.1 @@ -10635,11 +10657,6 @@ May be different from firmware language xsimulatorDialog - - - Companion9x Simulator - - @@ -10758,6 +10775,11 @@ May be different from firmware language LS + + + Companion Simulator + + Taranis Simulator @@ -10775,16 +10797,16 @@ May be different from firmware language - - - - - - - - - - + + + + + + + + + + -100.1 @@ -10819,207 +10841,207 @@ May be different from firmware language - + CH12 - + CH5 - + CH13 - + CH6 - + CH14 - + CH7 - + CH15 - + CH8 - + CH16 - + CSK - + CSC - + CSD - + CS7 - + CSL - + CSB - + CS1 - + CSH - + CSG - + CSE - + CSF - + CS8 - + CS9 - + CSA - + CSM - + CSJ - + CSI - + CS4 - + CS5 - + CS2 - + CS3 - + CS6 - + CSN - + CSO - + CSP - + CSQ - + CSR - + CSS - + CST - + CSU - + CSV - + CSW diff --git a/companion/src/translations/companion9x_it.ts b/companion/src/translations/companion_it.ts similarity index 94% rename from companion/src/translations/companion9x_it.ts rename to companion/src/translations/companion_it.ts index 952477a89..d880d890b 100644 --- a/companion/src/translations/companion9x_it.ts +++ b/companion/src/translations/companion_it.ts @@ -1210,9 +1210,9 @@ Siete sicuri ? MainWindow - - - + + + File loaded Documento caricato @@ -1230,22 +1230,21 @@ Siete sicuri ? - - + + Unable to check for updates. Impossibile controllare gli aggiornamenti. - A new version of companion9x is available (version %1)<br>Would you like to download it? - Una nuova versione di companion9x è disponibile (versione %1)<br>Desiderate scaricarla ? + Una nuova versione di companion9x è disponibile (versione %1)<br>Desiderate scaricarla ? - - + + Save As Salva come @@ -1260,13 +1259,12 @@ Siete sicuri ? Nuova versione disponibile - A new release of companion is available please check the repository - Una nuova versione di companion9x è stata rilasciata, controllate il repository SVN + Una nuova versione di companion9x è stata rilasciata, controllate il repository SVN - + No updates available at this time. Nessun aggiornamento disponibile. @@ -1278,9 +1276,9 @@ Siete sicuri ? - - - + + + Error opening file %1: %2. Errore durante l'apertura del file %1: @@ -1302,19 +1300,12 @@ Siete sicuri ? Il server di compilazione è occupato, provate più tardi - - - companion9x - Models and Settings Editor - %1 - profile %2 - Companion9x - EEPROM Editor - %1- profilo %2 + Companion9x - EEPROM Editor - %1- profilo %2 - - - - companion9x - Models and Settings Editor - %1 - Companion9x - EEPROM Editor - %1 + Companion9x - EEPROM Editor - %1 Firmware does not longer fit in program memory, due to selected firmware options @@ -1331,7 +1322,7 @@ Siete sicuri ? Volete scrivere il nuovo firmware sulla radio ora ? - + Firmware %1 does not seem to have ever been downloaded. Version %2 is available. Do you want to download it now ? @@ -1340,25 +1331,25 @@ E' disponibile la versione %2. Volete scaricarla adesso ? - + A new version of %1 firmware is available (current %2 - newer %3). Do you want to download it now ? Una nuova versione del firmware %1 è disponibile (attuale %2 - nuova %3). Volete scaricarla ora ? - + Ignore this version (r%1)? Ignorare questa versione (r%1) ? - + Open Apri - - + + File saved Documento salvato @@ -1367,15 +1358,15 @@ Volete scaricarla ora ? - - - - - - - - - + + + + + + + + + Error Errore @@ -1402,10 +1393,8 @@ Volete scaricarla ora ? Guasto temporaneo del server di compilazione, riprovate più tardi - - Compilation server requires registration, please check opentx web site - Il server di compilazione richiede una registrazione, controllate il sito di opentx + Il server di compilazione richiede una registrazione, controllate il sito di opentx Firmware does not fit in program memory, due to selected firmware options @@ -1417,65 +1406,65 @@ Volete scaricarla ora ? Volete scrivere il nuovo firmware sulla radio ora ? - - + + Yes Si - - + + No No - - + + Release Notes Note di aggiornamento - - + + Do you want to download release %1 now ? Volete scaricare la versione %1 adesso ? - + Release notes contain very important informations. Do you want to see them now ? Le note di rilascio includono informazioni molto importanti. Volete vederle ora ? - + Firmware updates Aggiornamenti firmware - + Current firmware does not provide release notes informations. Il firmware selezionato non fornisce note di aggiornamento. - + Cannot write file %1: %2. Non posso scrivere il file %1: %2. - - - - - + + + + + Taranis radio not found Radio taranis non trovata - - - - + + + + Impossible to identify the radio on your system, please verify the eeprom disk is connected. Impossibile identificare la radio sul vostro sistema, verificate che il disco della eeprom sia connesso. @@ -1496,16 +1485,16 @@ non è stato riconosciuto come una EEProm valida Scriverlo ugualmente ? - - - + + + Backup is impossible Impossibile effettuare il Backup - - - + + + The backup dir set in preferences does not exist La directory per i backup impostata in preferenze non esiste @@ -1518,8 +1507,8 @@ Scriverlo ugualmente ? Non posso controllare la compatibilità delle impostazioni! Continuare ugualmente ? - - + + Warning Avviso @@ -1540,7 +1529,7 @@ Scriverlo ugualmente ? Scrivi il fimware sulla radio - + Conversion failed Conversione fallita @@ -1553,7 +1542,7 @@ Scriverlo ugualmente ? Ripristina memoria sulla Radio - + Restore failed Ripristino fallito @@ -1570,7 +1559,7 @@ Scriverlo ugualmente ? Non posso aggiornare il firmware, la memoria dei settaggi originale può essere trovata in %1 - + Backup failed Salvataggio fallito @@ -1587,10 +1576,10 @@ Scriverlo ugualmente ? Scrivi il firmware in un documento - - - - + + + + Read Models and Settings From Tx Leggi le impostazioni dalla radio @@ -1609,12 +1598,12 @@ Scriverlo ugualmente ? Il firmware richiesto è troppo grande per la radio a causa delle opzioni selezionate - + Write Models and settings from %1 to the Tx? Scrivere le impostazioni sulla radio da %1? - + The file %1 has not been recognized as a valid Models and Settings file Write anyway ? @@ -1623,365 +1612,360 @@ non è stato riconosciuto come un file di impostazioni valido. Scriverlo ugualmente ? - - - - - - + + + + + + Backup Models and Settings From Tx Salva impostazioni della radio - + Cannot check Models and Settings compatibility! Continue anyway? Non posso controllare la compatibilità delle impostazioni! Continuare ugualmente ? - + The transmitter firmware belongs to another product family, check file and preferences! Il firmware nella radio è di una famiglia differente\n rispetto a quello delle impostazioni che si stanno scrivendo.\n Controllare il documento e le preferenze! - + The transmitter firmware is outdated, please upgrade! Il firmware della radio è obsoleto, pianificate un aggiornamento! - + Write Models and Settings To Tx Scrivi le impostazioni nella radio - - + + Write Firmware To Tx Scrivi il fimware sulla radio - + Cannot convert Models and Settings for use with this firmware, original data will be used Non posso convertire le impostazioni per questo firmware, verranno usate le impostazioni originali - + Restore Models and Settings To Tx Ripristina le impostazioni sulla Radio - + Could not restore Models and Settings to TX. The models and settings data file can be found at: %1 Non posso ripristinare le impostazioni sulla radio, il file originale può essere trovato in %1 - + Firmware write failed Scrittura del firmware fallita - + Could not write firmware to to transmitter. The models and settings data file can be found at: %1 Non posso aggiornare il firmware, le impostazioni originali possono essere trovate nel file %1 - + Cannot backup existing Models and Settings from TX. Firmware write process aborted Non riesco a salvare le impostazioni della radio, l'aggiornamento firmware viene annullato - + Save transmitter Models and Settings to File Salva le impostazioni dalla radio e scrivile in un documento - + Impossible to identify the radio on your system, please verify that the eeprom disk is connected. Impossibile identificare la radio sul vostro sistema, verificate che il disco della eeprom sia connesso. - + Read Tx Firmware to File Scrivi il firmware in un documento - + Copyright Copyright - + Version %1 (revision %2), %3 Versione %1 (revisione %2), %3 - The companion9x project was originally forked from eePe - Il progetto companion9x è stato inizialmente derivato da eePe + Il progetto companion9x è stato inizialmente derivato da eePe - + If you've found this program useful, please support by Se trovate questo programma utile, supportatelo mediante una - + donating donazione - About companion9x - Informazioni su companion9x + Informazioni su companion9x - - - + + + &%1 %2 - + %1 %2 - + &New &Nuovo - + Create a new file Crea un nuovo documento - + &Open... &Apri... - + Open an existing file Apri un documente esistente - + &loadBackup... carica&Backup... - + Load backup from file Carica backup da file - + &Save &Salva - + Save the document to disk Salva il documento su disco - + Save &As... S&alva come... - + Save the document under a new name Salva il documento con un nuovo nome - + Lo&gs Lo&gs - + Ctrl+G - + Open log file Apri file di log - + &Preferences... &Preferenze... - + Edit general preferences Modifica preferenze - + &Check for updates... &Controlla aggiornamenti... - Check for new version of companion9x/er9x - Controlla per nuove versioni di companion9x + Controlla per nuove versioni di companion9x - + Contributors &List... E&lenco collaboratori... - Show companion9x contributors list - Mostra l'elenco di quelli che hanno contribuito a companion9x + Mostra l'elenco di quelli che hanno contribuito a companion9x - + ChangeLog... Cambiamenti... - Show companion9x changelog - Mostra l'elenco dei cambiamenti in Companion9x + Mostra l'elenco dei cambiamenti in Companion9x - + Firmware ChangeLog... Cambiamenti del firmware... - + Show firmware changelog Mostra l'elenco dei cambiamenti del firmware - + Compare... Confronta... - + Compare models Confronta due modelli - + Customize your &TX... Personalizza il &TX... - + Customize the splash screen of your TX Personalizza la schermata di avvio della radio - + E&xit Es&ci - + Exit the application Esci dall'applicazione - + Cu&t Ta&glia - + Cut the current selection's contents to the clipboard Taglia la selezione negli appunti - + &Copy &Copia - + Copy the current selection's contents to the clipboard Copia la selezione negli appunti - + &Paste &Incolla - + Paste the clipboard's contents into the current selection Incolla gli appunti nella selezione corrente - + &Write Models and Settings To Tx Scri&vi le impostazioni nella radio - + Write Models and Settings to transmitter Scrivi le impostazioni nella radio - + &Read Models and Settings From Tx &Leggi le impostazioni dalla radio - + Read Models and Settings from transmitter Leggi le impostazioni dalla radio - + Write Firmware Scrivi il fimware - + Write firmware to transmitter Scrivi il firmware nella radio - + Write Models and Settings from file to Tx Scrivi le impostazioni nella radio da un documento - + Write Models and Settings from file to transmitter Scrivi le impostazioni nella radio da un documento - + Save transmitter Models and Settings to file Salva le impostazioni dalla radio e scrivile in un documento - + Save the Models and Settings from the transmitter to a file Leggi le impostazioni dalla radio e scrivile in un file - + Read Firmware Leggi firmware - + Read firmware from transmitter Leggi il firmware dalla radio - + Configure software for reading from and writing to the transmitter Configura il software per la lettura/scrittura del microprocessore @@ -1994,23 +1978,23 @@ Scriverlo ugualmente ? Configura il programmatore del microprocessore - + &Read/Write &Leggi/Scrivi - + Write Scrivi - - + + Invalid Models and Settings File %1 File impostazioni non valido %1 - + Invalid binary Models and Settings File %1 File binario delle impostazioni non valido %1 @@ -2019,7 +2003,7 @@ Scriverlo ugualmente ? &Scrivi la memoria nella radio - + Ctrl+Alt+W Ctrl+Alt+W @@ -2032,7 +2016,7 @@ Scriverlo ugualmente ? &Leggi la memoria dalla radio - + Ctrl+Alt+R Ctrl+Alt+R @@ -2073,7 +2057,7 @@ Scriverlo ugualmente ? Leggi il firmware dalla radio - + &Configure... &Configura... @@ -2082,154 +2066,210 @@ Scriverlo ugualmente ? Configura il programmatore del microprocessore - + + + + Companion - Models and Settings Editor - %1 - profile %2 + + + + + + + + Companion - Models and Settings Editor - %1 + + + + + A new version of Companion is available (version %1)<br>Would you like to download it? + + + + + A new release of Companion is available please check the repository + + + + + + Compilation server requires registration, please check OpenTX web site + + + + + The Companion project was originally forked from eePe + + + + + About Companion + + + + + Check for new version of Companion + + + + + Show Companion contributors list + + + + + Show Companion changelog + + + + &List programmers E&lenco programmatori - + List available programmers Lista dei programmatori supportati - + &Fuses... &Fuses... - + Show fuses dialog Mostra finestra di dialogo Fuses - + &Simulate Si&mula - + Alt+S - + Simulate selected model. Simula modello selezionato. - + &Print Stam&pa - + Ctrl+P - + Print current model. Stampa modello corrente. - + Cl&ose C&hiudi - + Close the active window Chiudi finestra corrente - + Close &All Chiudi &Tutto - + Close all the windows Chiudi dutte le finestre - + &Tile Aff&ianca - + Tile the windows Affianca fineste - + &Cascade &Disponi - + Cascade the windows Disponi finestre a cascata - + Ne&xt Successi&va - + Move the focus to the next window Sposta il fuoco sulla finestra seguente - + Pre&vious P&recedente - + Move the focus to the previous window Sposta il fuoco sulla finestra precedente - + &About &Informazioni su - + Show the application's About box Mostra la finestra Informazioni Su - + Switch layout direction Cambia orientamento - + Switch layout Left/Right Cambia orientazione Sinistra/Destra - - + + Recent Files Documenti Recenti - - + + Firmware Profiles Profili personalizzati - + &File &Documento - + &Edit &Modifica @@ -2238,22 +2278,22 @@ Scriverlo ugualmente ? &Programma - + &Window &Finestra - + &Help &Aiuto - + File Documento - + Edit Modifica @@ -2262,17 +2302,17 @@ Scriverlo ugualmente ? Scrivi - + Help Aiuto - + Ready Pronto - + Unable to find file %1! Impossibile trovare il file %1! @@ -2281,7 +2321,7 @@ Scriverlo ugualmente ? File impostazioni non valido %1 - + Error reading file %1: %2. Error durante la lettura del file %1: @@ -2304,6 +2344,13 @@ Scriverlo ugualmente ? Do you want to use model wizard? Utilizzare l'assistente di configurazione dei modelli ? + + + + + Companion + + Ask this question again ? @@ -2466,11 +2513,8 @@ Scriverlo ugualmente ? File di backup binario non valido %1 - - - companion9x - companion9x + companion9x @@ -7380,11 +7424,11 @@ la eeprom è 4096 bytes ma solo 2048 vengono utilizzati - Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next openTX/C9x funding model. + Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next OpenTX/Companion funding model. -We are really sensible to that! +We are really appreciative for that! -The openTX/C9X Team. +The OpenTX/Companion Team. @@ -7731,8 +7775,12 @@ utilizzatelo solo se sapete cosa state facendo. Non viene fatto alcun controllo + Companion + + + companion9x - companion9x + companion9x @@ -7808,6 +7856,11 @@ m2560 per le schede v4.1 Browse for file Apri file + + + Allows Companion to write to older version of the firmware + + Backup and restore Models and Settings @@ -7855,9 +7908,8 @@ m2560 per le schede v4.1 Variante - Allows companion9x to write to older version of the firmware - Abilita companion a scrivere in versioni precedenti o diverse del firmware + Abilita companion a scrivere in versioni precedenti o diverse del firmware @@ -8625,29 +8677,39 @@ m2560 per le schede v4.1 Honors go to Rafal Tomczak (RadioClone) and Thomas Husterer (th9x) +of course. Also to Erez Raviv (er9x) and the fantastic eePe program +which was the staring point for OpenTX Companion. + + + + + Companion Release Notes + + + + Honors go to Rafal Tomczak (RadioClone) and Thomas Husterer (th9x) of course. Also to Erez Raviv (er9x) and it's fantastic eePe, from which companion9x was forked out. - Sentiti ringraziamenti a Rafal Tomczak (RadioClone) e Thomas Husterer (th9x). + Sentiti ringraziamenti a Rafal Tomczak (RadioClone) e Thomas Husterer (th9x). Anche a Erez Raviv (er9x) e al fantastico eePe dal quale è stato derivato companion9x. - + Thank you all !!! Grazie a tutti !!! - + Contributors Amici e Programmatori - Companion9x Release Notes - informazioni su aggiornamenti Companion9x + informazioni su aggiornamenti Companion9x - + OpenTX Release Notes informazioni su aggiornamenti OpenTX @@ -8796,8 +8858,12 @@ p, li { white-space: pre-wrap; } + Companion + + + companion9x - companion9x + companion9x @@ -9165,9 +9231,13 @@ Premere annulla per cancellare l'operazione logsDialog - Companion9x log viewer - Visualizzatore di file di log di Companion9x + Visualizzatore di file di log di Companion9x + + + + Companion Log Viewer + @@ -9180,47 +9250,59 @@ Premere annulla per cancellare l'operazione Apri file di log - + Zoom Ingrandimento - + X - + Y - + Fly sessions Sessioni di volo - + Telemetry logs Log telemetrici - + Time Tempo - + + Error + Errore + + + + Cannot write file %1: +%2. + Non posso scrivere il file %1: +%2. + + + Select your log file Selezionare il file di log - + Available fields Campi disponibili - + The selected logfile contains %1 invalid lines out of %2 total lines Il file di log selezionato contiene %1 righe errate su un totale di %2 righe @@ -9678,27 +9760,27 @@ Premere annulla per cancellare l'operazione Preferenze - + Language (requires restart) Lingua (richiede il riavvio) - + Firmware Firmware - + Check for updates on startup Controllo aggiornamenti all'avvio - + FwInfo - + Show Splash Screen Mostra schermata iniziale @@ -9708,18 +9790,18 @@ Premere annulla per cancellare l'operazione File recenti - - + + Download Scarica - + Default Channel Order Ordine canali predefinito - + Channel order This is used by the templated to determine which channel goes to what number output. @@ -9728,12 +9810,12 @@ This is used by the templated to determine which channel goes to what number out Utilizzato dai Modelli per stabilire quale uscita viene assegnata ai canali. - + Default Stick Mode Modalità Stick - + Mode selection: Mode 1: @@ -9774,63 +9856,63 @@ Mode 4: - - + + ... - + Enable Abilita - + Calibrate Calibrazione - - - - + + + + Open Folder Apri Cartella - + Automatic Backup Folder Cartella per backup - + Set language of voice. May be different from firmware language Impostazione del linguaggio della voce. Può essere differente dalla lingua del firmware - + Voice Voce - + Ask for flashing after Download Scrivere dopo aggiornamento - + Export Profile Esporta Profilo - + Import Profile Importa Profilo - + Custom TX splash screen Schermo personalizzato @@ -9839,32 +9921,32 @@ Può essere differente dalla lingua del firmware Cartella per backup - + auto backup before write Esegui backup prima di ogni scrittura - + Automatically add version number to the filename after download Aggiungi automaticamente il numero di versione al nome del file dopo il download - + SD Structure path Cartella Struttura Scheda SD - + Processor ID ID del processore - + Simulator capture folder Cartella per cattura schermate - + Use clipboard only Usa solo gli appunti @@ -9915,173 +9997,196 @@ Può essere differente dalla lingua del firmware CheckBox - + Check for updates Verifica aggiornamenti - + Check for selected Fw updates Controlla aggiornamenti Fw - + Ask use of wizard for new models Chiedi l'utilizzo dell'assistente per i nuovi modelli - + Remember switches in simulator Ricorda la posizione degli switches nel simulatore - + Mode 1 (RUD ELE THR AIL) Modo 1 (DIR ELE MOT ALE) - + Mode 2 (RUD THR ELE AIL) Modo 2 (DIR MOTO ELE ALE) - + Mode 3 (AIL ELE THR RUD) Modo 3 (ALE ELE MOT DIR) - + Mode 4 (AIL THR ELE RUD) Modo 4 (ALE MOT ELE DIR) - + Profile slot Profilo personalizzato - + + Find Executable + + + + + Google Earth Executable + + + + Profile Name Descrizione - + Save Profile Salva Profilo - + Blue Blu - + Language Lingua - + Green Verde - + Red Rosso - + Orange Arancione - + Yellow Giallo - + Personal splash library Libreria sfondi personale - + Splash library behaviour Caratteristiche libreria sfondi - + Include companion splashes Includi sfondi predefiniti - + Only user defined splashes Solamente sfondi utente - + Joystick Joystick - + Open Image Apri immagine - + Invert Pixels Negativo - + Simu BackLight Colore Retroilluminazione - + Last downloaded release: %1 Ultima versione scaricata: %1 - The selected firmware has never been downloaded by companion9x. - Il firmware selezionato non è mai stato scaricato da companion9x. + Il firmware selezionato non è mai stato scaricato da companion9x. - The selected firmware cannot be downloaded by companion9x. - Il firmware selezionato non può essere scaricato da companion9x. + Il firmware selezionato non può essere scaricato da companion9x. - + Image stored in settings Immagine predefinita - - + + No joysticks found Nessun joystick trovato - + Select your Models and Settings backup folder Selezionare la cartella per i backup - + + Select Google Earth executable + + + + Profile name is empty, profile slot %1 will be deleted.<br>Are you sure ? La descrizione del profilo è vuota. Il profilo %1 sarà cancellato.<br>Siete sicuri ? - + Select your library folder Selezionare la cartella degli sfondi - + + The selected firmware has never been downloaded by Companion. + + + + + The selected firmware cannot be downloaded by Companion. + + + + Select your snapshot folder Selezionare la cartella per le schermate del simulatore @@ -10090,44 +10195,44 @@ Può essere differente dalla lingua del firmware Selezionare la cartella per i backup - + Select the folder replicating your SD structure Selezionare la cartella contenente la struttura della scheda SD - + Export profile As Esporta il profilo come - + Profile slot is not empty, profile slot %1 will we overwritten.<br>Are you sure ? La descrizione del profilo è vuota. Il profilo %1 sarà sovrascritto.<br>Siete sicuri ? - + Open Profile to import Apri il profile da importare - + Open Image to load Apri l'immagine da caricare - + Images (%1) Immagini (%1) - - + + Error Errore - - + + Cannot load %1. Non posso caricare %1. @@ -10633,9 +10738,8 @@ Può essere differente dalla lingua del firmware simulatorDialog - Companion9x Simulator - companion9x + companion9x @@ -10657,6 +10761,11 @@ Può essere differente dalla lingua del firmware THR THR + + + Companion Simulator + + @@ -10750,157 +10859,157 @@ Può essere differente dalla lingua del firmware Simulatore 9x - + Outputs Uscite - + CS1 CS1 - + CS2 CS2 - + CS3 CS3 - + CS4 CS4 - + CS5 CS5 - + CS6 CS6 - + CS7 CS7 - + CS8 CS8 - + CS9 CS9 - + CSA CSA - + CSB CSB - + CSC CSC - + CSD CSD - + CSE CSE - + CSF CSF - + CSG CSG - + CSH CSH - + CSI CSI - + CSJ CSJ - + CSL CSL - + CSM CSM - + CSN CSN - + CSO CSO - + CSP CSP - + CSQ CSQ - + CSR CSR - + CSS CSS - + CST CST - + CSU CSU - + CSV CSV @@ -10910,114 +11019,114 @@ Può essere differente dalla lingua del firmware SUONO - + CSK SWK CSK - + CSW SWW CSW - + CH1 CH1 - + CH9 CH9 - + CH2 CH2 - + CH10 CH10 - + CH3 CH3 - + CH11 CH11 - + CH4 CH4 - + CH12 CH12 - + CH5 CH5 - + CH13 CH13 - + CH6 CH6 - + CH14 CH14 - + CH7 CH7 - + CH15 CH15 - + CH8 CH8 - + CH16 CH16 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + -100.1 -100.1 @@ -11095,9 +11204,8 @@ Può essere differente dalla lingua del firmware xsimulatorDialog - Companion9x Simulator - companion9x + companion9x @@ -11223,13 +11331,13 @@ Può essere differente dalla lingua del firmware Uscite - + CSK SWK CSK - + CSW SWW CSW @@ -11239,6 +11347,11 @@ Può essere differente dalla lingua del firmware CH1 CH1 + + + Companion Simulator + + @@ -11246,16 +11359,16 @@ Può essere differente dalla lingua del firmware - - - - - - - - - - + + + + + + + + + + -100.1 -100.1 @@ -11290,197 +11403,197 @@ Può essere differente dalla lingua del firmware CH4 - + CH12 CH12 - + CH5 CH5 - + CH13 CH13 - + CH6 CH6 - + CH14 CH14 - + CH7 CH7 - + CH15 CH15 - + CH8 CH8 - + CH16 CH16 - + CSC CSC - + CSD CSD - + CS7 CS7 - + CSL CSL - + CSB CSB - + CS1 CS1 - + CSH CSH - + CSG CSG - + CSE CSE - + CSF CSF - + CS8 CS8 - + CS9 CS9 - + CSA CSA - + CSM CSM - + CSJ CSJ - + CSI CSI - + CS4 CS4 - + CS5 CS5 - + CS2 CS2 - + CS3 CS3 - + CS6 CS6 - + CSN CSN - + CSO CSO - + CSP CSP - + CSQ CSQ - + CSR CSR - + CSS CSS - + CST CST - + CSU CSU - + CSV CSV diff --git a/companion/src/translations/companion9x_pt.ts b/companion/src/translations/companion_pt.ts similarity index 94% rename from companion/src/translations/companion9x_pt.ts rename to companion/src/translations/companion_pt.ts index de3d9bf28..97da176bb 100644 --- a/companion/src/translations/companion9x_pt.ts +++ b/companion/src/translations/companion_pt.ts @@ -1233,9 +1233,9 @@ Are you sure ? - - - + + + File loaded Ficheiro carregado @@ -1247,8 +1247,8 @@ Are you sure ? - - + + Save As Gravar Como @@ -1258,7 +1258,7 @@ Are you sure ? - + No updates available at this time. @@ -1266,8 +1266,8 @@ Are you sure ? - - + + Unable to check for updates. @@ -1286,13 +1286,13 @@ Are you sure ? Ficheiros EEPROM (*.bin *.hex);;BIN files (*.bin);;HEX files (*.hex) - + Open Abrir - - + + File saved Ficheiro gravado @@ -1313,15 +1313,10 @@ Are you sure ? Ficheiros HEX (*.hex);;BIN files (*.bin);;FLASH files (*.bin *.hex) - + Copyright - - - A new version of companion9x is available (version %1)<br>Would you like to download it? - - Display previous warning again at startup ? @@ -1332,34 +1327,29 @@ Are you sure ? New release available - - - A new release of companion is available please check the repository - - - - - - - - - - - + + + + + + + + + Error Erro - - - + + + Error opening file %1: %2. @@ -1374,6 +1364,21 @@ Are you sure ? Display previous message again at startup ? + + + + + Companion - Models and Settings Editor - %1 - profile %2 + + + + + + + + Companion - Models and Settings Editor - %1 + + Firmware does not longer fit in the Tx, due to selected firmware options @@ -1390,12 +1395,6 @@ Are you sure ? Compilation server too busy, try later - - - - Compilation server requires registration, please check opentx web site - - @@ -1408,343 +1407,322 @@ Are you sure ? - - + + Yes - - + + No - - + + Release Notes - - + + Do you want to download release %1 now ? - + A new version of %1 firmware is available (current %2 - newer %3). Do you want to download it now ? - + Ignore this version (r%1)? - + Release notes contain very important informations. Do you want to see them now ? - + Firmware updates - + Current firmware does not provide release notes informations. - + Cannot write file %1: %2. - - - - - + + + + + Taranis radio not found - - - - + + + + Impossible to identify the radio on your system, please verify the eeprom disk is connected. - + Write Models and settings from %1 to the Tx? - - - + + + Backup is impossible - - - + + + The backup dir set in preferences does not exist - - + + Warning Aviso - + Conversion failed - + Restore failed - + Backup failed - + Version %1 (revision %2), %3 - - The companion9x project was originally forked from eePe - - - - + If you've found this program useful, please support by - + donating doar - About companion9x - Sobre o companion9x + Sobre o companion9x - - - + + + &%1 %2 &%1 %2 - + %1 %2 %1 %2 - + &New &Novo - + Create a new file Criar um novo ficheiro - + &Open... &Abrir... - + Open an existing file Abrir um ficheiro existente - + &loadBackup... - + Load backup from file - + &Save &Gravar - + Save the document to disk Gravar o documento no disco - + Save &As... Gravar &Como... - + Save the document under a new name Gravar o documento com um novo nome - + Lo&gs - + Ctrl+G - + Open log file - + &Preferences... &Preferências - + Edit general preferences Editar preferências gerais - + &Check for updates... - - Check for new version of companion9x/er9x - - - - + Contributors &List... - - Show companion9x contributors list - - - - + ChangeLog... - - Show companion9x changelog - - - - + Firmware ChangeLog... - + Show firmware changelog - + Compare... - + Compare models - + Customize your &TX... - + Customize the splash screen of your TX - + E&xit &Sair - + Exit the application Sair da aplicação - + Cu&t Cor&tar - + Cut the current selection's contents to the clipboard Cortar a selecção corrente para a zona de transferência - + &Copy &Copiar - + Copy the current selection's contents to the clipboard Copiar a selecção corrente para a zona de transferência - + &Paste Co&lar - + Paste the clipboard's contents into the current selection Colar o conteúdo na zona de transferência para a selecção corrente - + Configure software for reading from and writing to the transmitter - - + + Invalid Models and Settings File %1 - + Invalid binary Models and Settings File %1 @@ -1753,7 +1731,7 @@ Do you want to download it now ? &Gravar EEPROM no Rádio - + Ctrl+Alt+W Ctrl+Alt+W @@ -1766,7 +1744,7 @@ Do you want to download it now ? &Ler EEPROM do Rádio - + Ctrl+Alt+R Ctrl-Alt-R @@ -1791,7 +1769,7 @@ Do you want to download it now ? Ler memória Flash do Rádio - + &Configure... &Configurar... @@ -1800,148 +1778,148 @@ Do you want to download it now ? Configurar aplicação de gravação do Rádio - + &List programmers &Listar programadores - + List available programmers Lista os programadores disponíveis - + &Fuses... - + Show fuses dialog - + &Simulate &Simular - + Alt+S Alt+S - + Simulate selected model. Simular o modelo seleccionado - + &Print &Imprimir - + Ctrl+P Ctrl+P - + Print current model. Imprimir o modelo corrente - + Cl&ose &Fechar - + Close the active window Fechar a janela activa - + Close &All Fechar &Todas - + Close all the windows Fechar todas as janelas - + &Tile &Mosaico - + Tile the windows Apresentar as janelas abertas em mosaico - + &Cascade &Cascata - + Cascade the windows Apresentar as janelas abertas em cascata - + Ne&xt &Próxima - + Move the focus to the next window Selecciona janela seguinte - + Pre&vious &Anterior - + Move the focus to the previous window Selecciona janela anterior - + &About A&cerca - + Show the application's About box Sobre a aplicação - - + + Recent Files - + &Read/Write - + Write - + Unable to find file %1! Impossível encontrar o ficheiro %1! - + Error reading file %1: %2. @@ -1955,236 +1933,262 @@ Do you want to download it now ? Lista de contribuidores do er9x/companion9x - + Switch layout Left/Right - + &File &Ficheiro - + Switch layout direction Mudar apresentação dos menus - - - - - companion9x - Models and Settings Editor - %1 - profile %2 - - - - - - - - companion9x - Models and Settings Editor - %1 - - Checking for updates + + + A new version of Companion is available (version %1)<br>Would you like to download it? + + + + + A new release of Companion is available please check the repository + + + + + + Compilation server requires registration, please check OpenTX web site + + Do you want to write the firmware to the transmitter now ? - + Firmware %1 does not seem to have ever been downloaded. Version %2 is available. Do you want to download it now ? - - - - + + + + Read Models and Settings From Tx - + The file %1 has not been recognized as a valid Models and Settings file Write anyway ? - - - - - - + + + + + + Backup Models and Settings From Tx - + Cannot check Models and Settings compatibility! Continue anyway? - + The transmitter firmware belongs to another product family, check file and preferences! - + The transmitter firmware is outdated, please upgrade! - + Write Models and Settings To Tx - - + + Write Firmware To Tx - + Cannot convert Models and Settings for use with this firmware, original data will be used - + Restore Models and Settings To Tx - + Could not restore Models and Settings to TX. The models and settings data file can be found at: %1 - + Firmware write failed - + Could not write firmware to to transmitter. The models and settings data file can be found at: %1 - + Cannot backup existing Models and Settings from TX. Firmware write process aborted - + Save transmitter Models and Settings to File - + Impossible to identify the radio on your system, please verify that the eeprom disk is connected. - + Read Tx Firmware to File - + + The Companion project was originally forked from eePe + + + + + About Companion + + + + + Check for new version of Companion + + + + + Show Companion contributors list + + + + + Show Companion changelog + + + + &Write Models and Settings To Tx - + Write Models and Settings to transmitter - + &Read Models and Settings From Tx - + Read Models and Settings from transmitter - + Write Firmware - + Write firmware to transmitter - + Write Models and Settings from file to Tx - + Write Models and Settings from file to transmitter - + Save transmitter Models and Settings to file - + Save the Models and Settings from the transmitter to a file - + Read Firmware - + Read firmware from transmitter - - + + Firmware Profiles - + &Edit &Editar - + &Window &Janela - + &Help &Ajuda - + File Ficheiro - + Edit Editar @@ -2193,12 +2197,12 @@ Write anyway ? Gravar - + Help - + Ready Pronto @@ -2210,11 +2214,8 @@ Write anyway ? Parâmetros Gerais - - - companion9x - companion9x + companion9x Delete Selected Models? @@ -2298,6 +2299,13 @@ Write anyway ? Do you want to use model wizard? + + + + + Companion + + Ask this question again ? @@ -7625,11 +7633,11 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi - Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next openTX/C9x funding model. + Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next OpenTX/Companion funding model. -We are really sensible to that! +We are really appreciative for that! -The openTX/C9X Team. +The OpenTX/Companion Team. @@ -7996,8 +8004,12 @@ Please only use this if you know what you are doing. There are no error checks + Companion + + + companion9x - companion9x + companion9x @@ -8067,6 +8079,11 @@ m2560 for v4.1 boards Browse for file + + + Allows Companion to write to older version of the firmware + + Backup and restore Models and Settings @@ -8113,11 +8130,6 @@ m2560 for v4.1 boards Variant - - - Allows companion9x to write to older version of the firmware - - Check Firmware compatibility @@ -8900,27 +8912,27 @@ m2560 for v4.1 boards Honors go to Rafal Tomczak (RadioClone) and Thomas Husterer (th9x) -of course. Also to Erez Raviv (er9x) and it's fantastic eePe, from which -companion9x was forked out. +of course. Also to Erez Raviv (er9x) and the fantastic eePe program +which was the staring point for OpenTX Companion. - + + Companion Release Notes + + + + Thank you all !!! - + Contributors - - Companion9x Release Notes - - - - + OpenTX Release Notes @@ -9077,8 +9089,12 @@ p, li { white-space: pre-wrap; } + Companion + + + companion9x - companion9x + companion9x @@ -9408,7 +9424,7 @@ Press cancel to abort joystick calibration logsDialog - Companion9x log viewer + Companion Log Viewer @@ -9422,47 +9438,58 @@ Press cancel to abort joystick calibration - + Zoom - + X - + Y - + Fly sessions - + Telemetry logs - + Time - + + Error + Erro + + + + Cannot write file %1: +%2. + + + + Select your log file - + Available fields - + The selected logfile contains %1 invalid lines out of %2 total lines @@ -9920,7 +9947,7 @@ Press cancel to abort joystick calibration Preferências - + Language (requires restart) Língua (necessita uma reinicialização) @@ -9930,23 +9957,23 @@ Press cancel to abort joystick calibration - - + + Download - + Default Channel Order Ordem dos Canais por Defeito - + Default Stick Mode Modo do Rádio por Defeito - + Channel order This is used by the templated to determine which channel goes to what number output. @@ -9957,12 +9984,12 @@ This is used by the templated to determine which channel goes to what number out companion9x - + Show Splash Screen - + Mode selection: Mode 1: @@ -9985,117 +10012,127 @@ Mode 4: - + Mode 1 (RUD ELE THR AIL) Modo 1 (RUD ELE THR AIL) - + Mode 2 (RUD THR ELE AIL) Modo 2 (RUD THR ELE AIL) - + Mode 3 (AIL ELE THR RUD) Modo 3 (AIL ELE THR RUD) - + Mode 4 (AIL THR ELE RUD) Modo 4 (AIL THR ELE RUD) - + Automatic Backup Folder - + Automatically add version number to the filename after download - + Voice - + Set language of voice. May be different from firmware language - + Firmware - + + Find Executable + + + + + Google Earth Executable + + + + Check for updates on startup - - + + ... - + Splash library behaviour - + Include companion splashes - + Only user defined splashes - + Custom TX splash screen - + Personal splash library - + Joystick - - - - + + + + Open Folder - + SD Structure path - + Processor ID - + Simulator capture folder - + Use clipboard only @@ -10146,206 +10183,211 @@ May be different from firmware language - + Check for updates - + Language - + Profile Name - + Export Profile - + Save Profile - + Import Profile - + Simu BackLight - + Check for selected Fw updates - + Ask use of wizard for new models - + Remember switches in simulator - + Blue Blu - + Green - + Red - + Orange - + Yellow - + Profile slot - + auto backup before write - + Ask for flashing after Download - + Enable - + Calibrate - + Open Image - + Invert Pixels - + FwInfo - + Last downloaded release: %1 - - The selected firmware has never been downloaded by companion9x. - - - - - The selected firmware cannot be downloaded by companion9x. - - - - + Image stored in settings - - + + No joysticks found - + Select your snapshot folder - + Select your Models and Settings backup folder - + + Select Google Earth executable + + + + Select the folder replicating your SD structure - + Profile name is empty, profile slot %1 will be deleted.<br>Are you sure ? - + Export profile As - + Profile slot is not empty, profile slot %1 will we overwritten.<br>Are you sure ? - + Open Profile to import - + Open Image to load - + Images (%1) - - + + Error Erro - + + The selected firmware has never been downloaded by Companion. + + + + + The selected firmware cannot be downloaded by Companion. + + + + Select your library folder - - + + Cannot load %1. @@ -11027,10 +11069,9 @@ May be different from firmware language simulatorDialog - Companion9x Simulator ER9x Simulator - Simulador ER9x + Simulador ER9x @@ -11166,7 +11207,7 @@ May be different from firmware language - + Outputs @@ -11206,264 +11247,269 @@ May be different from firmware language SW12 - + CSK SWK - + CS1 - + + Companion Simulator + + + + CS2 - + CS3 - + CS4 - + CS5 - + CS6 - + CS7 - + CS8 - + CS9 - + CSA - + CSB - + CSC - + CSD - + CSE - + CSF - + CSG - + CSH - + CSI - + CSJ - + CSL - + CSM - + CSN - + CSO - + CSP - + CSQ - + CSR - + CSS - + CST - + CSU - + CSV - + CSW SWW - + CH1 CH1 - + CH9 CH9 - + CH2 CH2 - + CH10 CH10 - + CH3 CH3 - + CH11 CH11 - + CH4 CH4 - + CH12 CH12 - + CH5 CH5 - + CH13 CH13 - + CH6 CH6 - + CH14 CH14 - + CH7 CH7 - + CH15 CH15 - + CH8 CH8 - + CH16 CH16 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + -100.1 -100.1 @@ -11545,9 +11591,8 @@ May be different from firmware language xsimulatorDialog - Companion9x Simulator - Simulador ER9x + Simulador ER9x @@ -11718,6 +11763,11 @@ May be different from firmware language S2 + + + Companion Simulator + + @@ -11748,16 +11798,16 @@ May be different from firmware language - - - - - - - - - - + + + + + + + + + + -100.1 -100.1 @@ -11792,207 +11842,207 @@ May be different from firmware language CH4 - + CH12 CH12 - + CH5 CH5 - + CH13 CH13 - + CH6 CH6 - + CH14 CH14 - + CH7 CH7 - + CH15 CH15 - + CH8 CH8 - + CH16 CH16 - + CSK - + CSC - + CSD - + CS7 - + CSL - + CSB - + CS1 - + CSH - + CSG - + CSE - + CSF - + CS8 - + CS9 - + CSA - + CSM - + CSJ - + CSI - + CS4 - + CS5 - + CS2 - + CS3 - + CS6 - + CSN - + CSO - + CSP - + CSQ - + CSR - + CSS - + CST - + CSU - + CSV - + CSW diff --git a/companion/src/translations/companion9x_ru.ts b/companion/src/translations/companion_ru.ts similarity index 94% rename from companion/src/translations/companion9x_ru.ts rename to companion/src/translations/companion_ru.ts index c6fb8c1ef..92c12ee9b 100644 --- a/companion/src/translations/companion9x_ru.ts +++ b/companion/src/translations/companion_ru.ts @@ -1225,29 +1225,24 @@ Are you sure ? MainWindow - - - + + + File loaded Файл загружен - - - A new version of companion9x is available (version %1)<br>Would you like to download it? - - - - + + Save As Сохранить как... - + No updates available at this time. @@ -1255,8 +1250,8 @@ Are you sure ? - - + + Unable to check for updates. @@ -1275,13 +1270,13 @@ Are you sure ? файлы EEPROM (*.bin *.hex);;файлы BIN (*.bin);;файлы HEX (*.hex) - + Open Открыть - - + + File saved Файл записан @@ -1310,7 +1305,7 @@ Are you sure ? Считать прошивку в файл - + Copyright @@ -1320,7 +1315,7 @@ Are you sure ? Если эта программа и/или прошивка оказалась полезной, вы можете - + donating поддержать ее @@ -1329,74 +1324,74 @@ Are you sure ? О eePe - - - + + + &%1 %2 - + %1 %2 - + &New Новый - + Create a new file Создать новый файл - + &Open... Открыть - + Open an existing file Открыть файл - + &Save Сохранить - + Save the document to disk Записать на диск - + Save &As... Сохранить как... - + Save the document under a new name Записать с другим именем - + &Preferences... Настройки - + Edit general preferences Редактировать основные настройки - + &Check for updates... - + If you've found this program useful, please support by @@ -1410,34 +1405,29 @@ Are you sure ? New release available - - - A new release of companion is available please check the repository - - - - - - - - - - - + + + + + + + + + Error Ошибка - - - + + + Error opening file %1: %2. @@ -1452,6 +1442,21 @@ Are you sure ? Display previous message again at startup ? + + + + + Companion - Models and Settings Editor - %1 - profile %2 + + + + + + + + Companion - Models and Settings Editor - %1 + + Firmware does not longer fit in the Tx, due to selected firmware options @@ -1468,12 +1473,6 @@ Are you sure ? Compilation server too busy, try later - - - - Compilation server requires registration, please check opentx web site - - @@ -1486,256 +1485,231 @@ Are you sure ? - - + + Yes - - + + No - - + + Release Notes - - + + Do you want to download release %1 now ? - + A new version of %1 firmware is available (current %2 - newer %3). Do you want to download it now ? - + Ignore this version (r%1)? - + Release notes contain very important informations. Do you want to see them now ? - + Firmware updates - + Current firmware does not provide release notes informations. - + Cannot write file %1: %2. Не удается записать файл %1: %2. - - - - - + + + + + Taranis radio not found - - - - + + + + Impossible to identify the radio on your system, please verify the eeprom disk is connected. - + Write Models and settings from %1 to the Tx? - - - + + + Backup is impossible - - - + + + The backup dir set in preferences does not exist - - + + Warning Звук - + Conversion failed - + Restore failed - + Backup failed - + Version %1 (revision %2), %3 - - The companion9x project was originally forked from eePe - - - - - About companion9x - - - - + &loadBackup... - + Load backup from file - + Lo&gs - + Ctrl+G - + Open log file - - Check for new version of companion9x/er9x - - - - + Contributors &List... - - Show companion9x contributors list - - - - + ChangeLog... - - Show companion9x changelog - - - - + Firmware ChangeLog... - + Show firmware changelog - + Compare... - + Compare models - + Customize your &TX... - + Customize the splash screen of your TX - + E&xit Выход - + Exit the application Выйти из программы - + Cu&t Вырезать - + Cut the current selection's contents to the clipboard Вырезать выделение в буфер обмена - + &Copy Копировать - + Copy the current selection's contents to the clipboard Копировать выделение в буфер обмена - + &Paste Вставить - + Paste the clipboard's contents into the current selection Вставить выделение из буфера обмена - + Configure software for reading from and writing to the transmitter @@ -1744,7 +1718,7 @@ Do you want to download it now ? Записать EEPROM в TX - + Ctrl+Alt+W @@ -1757,7 +1731,7 @@ Do you want to download it now ? Считать EEPROM из TX - + Ctrl+Alt+R @@ -1798,7 +1772,7 @@ Do you want to download it now ? Считать прошивку из передатчика - + &Configure... Настройка @@ -1807,148 +1781,148 @@ Do you want to download it now ? Настроить программатор - + &List programmers Список программаторов - + List available programmers Показать список программаторов - + &Fuses... Фьюзы - + Show fuses dialog Показать диалог установки фьюзов - + &Simulate Симуляция - + Alt+S - + Simulate selected model. Запустить симуляцию - + &Print Печать - + Ctrl+P - + Print current model. Распечатать текущую модель - + Cl&ose Закрыть - + Close the active window Закрыть активное окно - + Close &All Закрыть все - + Close all the windows Закрыть все окна - + &Tile Мозаика - + Tile the windows Расположить окна мозаикой - + &Cascade Каскад - + Cascade the windows Разместить окна каскадом - + Ne&xt Следующее - + Move the focus to the next window Переместить фокус на следующее окно - + Pre&vious Предыдущее - + Move the focus to the previous window Переместить фокус на предыдущее окно - + &About О программе - + Show the application's About box Показать окно "О программе" - - + + Recent Files - + &Read/Write - + Write - + Unable to find file %1! Невозможно найти файл %1! - + Error reading file %1: %2. Ошибка при считывании файла %1: @@ -1959,227 +1933,253 @@ Do you want to download it now ? Авторы - + Switch layout Left/Right - + &File Файл - + Switch layout direction Зеркало - - - - - companion9x - Models and Settings Editor - %1 - profile %2 - - - - - - - - companion9x - Models and Settings Editor - %1 - - Checking for updates + + + A new version of Companion is available (version %1)<br>Would you like to download it? + + + + + A new release of Companion is available please check the repository + + + + + + Compilation server requires registration, please check OpenTX web site + + Do you want to write the firmware to the transmitter now ? - + Firmware %1 does not seem to have ever been downloaded. Version %2 is available. Do you want to download it now ? - - - - + + + + Read Models and Settings From Tx - + The file %1 has not been recognized as a valid Models and Settings file Write anyway ? - - - - - - + + + + + + Backup Models and Settings From Tx - + Cannot check Models and Settings compatibility! Continue anyway? - + The transmitter firmware belongs to another product family, check file and preferences! - + The transmitter firmware is outdated, please upgrade! - + Write Models and Settings To Tx - - + + Write Firmware To Tx - + Cannot convert Models and Settings for use with this firmware, original data will be used - + Restore Models and Settings To Tx - + Could not restore Models and Settings to TX. The models and settings data file can be found at: %1 - + Firmware write failed - + Could not write firmware to to transmitter. The models and settings data file can be found at: %1 - + Cannot backup existing Models and Settings from TX. Firmware write process aborted - + Save transmitter Models and Settings to File - + Impossible to identify the radio on your system, please verify that the eeprom disk is connected. - + Read Tx Firmware to File - + + The Companion project was originally forked from eePe + + + + + About Companion + + + + + Check for new version of Companion + + + + + Show Companion contributors list + + + + + Show Companion changelog + + + + &Write Models and Settings To Tx - + Write Models and Settings to transmitter - + &Read Models and Settings From Tx - + Read Models and Settings from transmitter - + Write Firmware - + Write firmware to transmitter - + Write Models and Settings from file to Tx - + Write Models and Settings from file to transmitter - + Save transmitter Models and Settings to file - + Save the Models and Settings from the transmitter to a file - + Read Firmware - + Read firmware from transmitter - - + + Firmware Profiles - + &Edit Правка - - + + Invalid Models and Settings File %1 - + Invalid binary Models and Settings File %1 @@ -2188,22 +2188,22 @@ Write anyway ? Запись - + &Window Окна - + &Help Помощь - + File Файл - + Edit Правка @@ -2212,12 +2212,12 @@ Write anyway ? Запись - + Help - + Ready Готово @@ -2321,6 +2321,13 @@ Write anyway ? Do you want to use model wizard? + + + + + Companion + + Ask this question again ? @@ -2422,13 +2429,6 @@ Write anyway ? Invalid binary backup File %1 - - - - - companion9x - - %1 has been modified. @@ -7506,11 +7506,11 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi - Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next openTX/C9x funding model. + Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next OpenTX/Companion funding model. -We are really sensible to that! +We are really appreciative for that! -The openTX/C9X Team. +The OpenTX/Companion Team. @@ -7840,7 +7840,7 @@ Please only use this if you know what you are doing. There are no error checks - companion9x + Companion @@ -7915,6 +7915,11 @@ m2560 for v4.1 boards Browse for file + + + Allows Companion to write to older version of the firmware + + Backup and restore Models and Settings @@ -7961,11 +7966,6 @@ m2560 for v4.1 boards Variant - - - Allows companion9x to write to older version of the firmware - - Check Firmware compatibility @@ -8743,27 +8743,27 @@ m2560 for v4.1 boards Honors go to Rafal Tomczak (RadioClone) and Thomas Husterer (th9x) -of course. Also to Erez Raviv (er9x) and it's fantastic eePe, from which -companion9x was forked out. +of course. Also to Erez Raviv (er9x) and the fantastic eePe program +which was the staring point for OpenTX Companion. - + + Companion Release Notes + + + + Thank you all !!! - + Contributors - - Companion9x Release Notes - - - - + OpenTX Release Notes @@ -8920,7 +8920,7 @@ p, li { white-space: pre-wrap; } - companion9x + Companion @@ -9247,7 +9247,7 @@ Press cancel to abort joystick calibration logsDialog - Companion9x log viewer + Companion Log Viewer @@ -9261,47 +9261,59 @@ Press cancel to abort joystick calibration - + Zoom - + X - + Y - + Fly sessions - + Telemetry logs - + Time - + + Error + Ошибка + + + + Cannot write file %1: +%2. + Не удается записать файл %1: +%2. + + + Select your log file - + Available fields - + The selected logfile contains %1 invalid lines out of %2 total lines @@ -9759,7 +9771,7 @@ Press cancel to abort joystick calibration Настройки - + Language (requires restart) Язык (треб. перезапуск) @@ -9769,23 +9781,23 @@ Press cancel to abort joystick calibration - - + + Download - + Default Channel Order Порядок следов. каналов - + Default Stick Mode Режим стиков - + Channel order This is used by the templated to determine which channel goes to what number output. @@ -9794,17 +9806,17 @@ This is used by the templated to determine which channel goes to what number out Шаблон для определения порядка следования каналов. - + FwInfo - + Show Splash Screen - + Mode selection: Mode 1: @@ -9827,117 +9839,127 @@ Mode 4: - + Mode 1 (RUD ELE THR AIL) - + Mode 2 (RUD THR ELE AIL) - + Mode 3 (AIL ELE THR RUD) - + Mode 4 (AIL THR ELE RUD) - + Automatic Backup Folder - + Automatically add version number to the filename after download - + Voice - + Set language of voice. May be different from firmware language - + Firmware - + + Find Executable + + + + + Google Earth Executable + + + + Check for updates on startup Проверять обновления - - + + ... - + Splash library behaviour - + Include companion splashes - + Only user defined splashes - + Custom TX splash screen - + Personal splash library - + Joystick - - - - + + + + Open Folder - + SD Structure path - + Processor ID - + Simulator capture folder - + Use clipboard only @@ -9988,201 +10010,206 @@ May be different from firmware language - + Check for updates - + Language - + Profile Name - + Export Profile - + Save Profile - + Import Profile - + Simu BackLight - + Check for selected Fw updates - + Ask use of wizard for new models - + Remember switches in simulator - + Blue Blu - + Green - + Red - + Orange - + Yellow - + Profile slot - + auto backup before write - + Ask for flashing after Download - + Enable - + Calibrate - + Open Image - + Invert Pixels - + Last downloaded release: %1 - - The selected firmware has never been downloaded by companion9x. - - - - - The selected firmware cannot be downloaded by companion9x. - - - - + Image stored in settings - - + + No joysticks found - + Select your snapshot folder - + Select your Models and Settings backup folder - + + Select Google Earth executable + + + + Select the folder replicating your SD structure - + Profile name is empty, profile slot %1 will be deleted.<br>Are you sure ? - + Export profile As - + Profile slot is not empty, profile slot %1 will we overwritten.<br>Are you sure ? - + Open Profile to import - + Open Image to load - + Images (%1) - - + + Error Ошибка - + + The selected firmware has never been downloaded by Companion. + + + + + The selected firmware cannot be downloaded by Companion. + + + + Select your library folder - - + + Cannot load %1. @@ -10756,10 +10783,9 @@ May be different from firmware language simulatorDialog - Companion9x Simulator ER9x Simulator - ER9x Симулятор + ER9x Симулятор @@ -10879,269 +10905,274 @@ May be different from firmware language - + Outputs - + CSK SWK - + CS1 - + + Companion Simulator + + + + CS2 - + CS3 - + CS4 - + CS5 - + CS6 - + CS7 - + CS8 - + CS9 - + CSA - + CSB - + CSC - + CSD - + CSE - + CSF - + CSG - + CSH - + CSI - + CSJ - + CSL - + CSM - + CSN - + CSO - + CSP - + CSQ - + CSR - + CSS - + CST - + CSU - + CSV - + CSW SWW - + CH1 - + CH9 - + CH2 - + CH10 - + CH3 - + CH11 - + CH4 - + CH12 - + CH5 - + CH13 - + CH6 - + CH14 - + CH7 - + CH15 - + CH8 - + CH16 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + -100.1 @@ -11219,9 +11250,8 @@ May be different from firmware language xsimulatorDialog - Companion9x Simulator - ER9x Симулятор + ER9x Симулятор @@ -11328,6 +11358,11 @@ May be different from firmware language S2 + + + Companion Simulator + + @@ -11358,16 +11393,16 @@ May be different from firmware language - - - - - - - - - - + + + + + + + + + + -100.1 @@ -11402,207 +11437,207 @@ May be different from firmware language - + CH12 - + CH5 - + CH13 - + CH6 - + CH14 - + CH7 - + CH15 - + CH8 - + CH16 - + CSK - + CSC - + CSD - + CS7 - + CSL - + CSB - + CS1 - + CSH - + CSG - + CSE - + CSF - + CS8 - + CS9 - + CSA - + CSM - + CSJ - + CSI - + CS4 - + CS5 - + CS2 - + CS3 - + CS6 - + CSN - + CSO - + CSP - + CSQ - + CSR - + CSS - + CST - + CSU - + CSV - + CSW diff --git a/companion/src/translations/companion9x_sv.ts b/companion/src/translations/companion_sv.ts similarity index 78% rename from companion/src/translations/companion9x_sv.ts rename to companion/src/translations/companion_sv.ts index bf7422eac..975950d96 100644 --- a/companion/src/translations/companion9x_sv.ts +++ b/companion/src/translations/companion_sv.ts @@ -2,47 +2,465 @@ - ExpoDialog + Channels - + + Name + Namn + + + + Offset + Offset + + + + Min + Min + + + + Max + Max + + + + Invert + Invertera + + + + Center + Centrum + + + + Sym + Sym + + + + Channel %1 + Kanal %1 + + + + --- + ---- + + + + INV + INV + + + + CurveGroup + + + Diff + Diff + + + Expo Expo - - - Phase used by the expo. - Flygläge som används av expo. + + Func + Funk - + + Curve + Kurva + + + + Curves + + + Form + Form + + + + Standard + Standard + + + + Custom + Special + + + + Lines + Rader + + + + Smooth + Mjuk + + + + Curve type + Kurvtyp + + + + Curve name + Kurvans namn + + + + Curve %1 + Kurva %1 + + + + %1 points + %1 punkter + + + + Are you sure you want to reset curve %1 ? + Vill du verkligen nollställa kurvan %1 ? + + + + Editing curve %1 + Redigera kurvan %1 + + + + Not enough free points in EEPROM to store the curve. + Kurvan får inte plats i minnet. + + + + CustomFunctionsPanel + + Switch Brytare - - Switch used by the expo. -If blank then the expo is considered to be "ON" all the time. - Brytare som används av expo. -Om fältet lämnas tomt så är expo påslaget hela tiden. + + Parameters + Parametrar - + + Enable + Slå på + + + + Action + Effekt + + + + ON + På + + + + Error + Fel + + + + Unable to find sound file %1! + Kan inte hitta ljudfilen %1! + + + + &Delete + &Ta bort + + + + Delete + Ta bort + + + + &Copy + &Kopiera + + + + Ctrl+C + Ctrl+C + + + + &Cut + Klipp &Ut + + + + Ctrl+X + Ctrl+X + + + + &Paste + Klistra &In + + + + Ctrl+V + Ctrl+V + + + + CustomSwitchesPanel + + + V1 + V1 + + + + V2 + V2 + + + + AND + OCH + + + + Duration + Varaktighet + + + + Delay + Fördröjning + + + + Condition + Villkor + + + + + LS%1 + LB%1 + + + + &Delete + &Ta bort + + + + Delete + Ta bort + + + + &Copy + &Kopiera + + + + Ctrl+C + Ctrl+C + + + + &Cut + Klipp &Ut + + + + Ctrl+X + Ctrl+X + + + + &Paste + Klistra &In + + + + Ctrl+V + Ctrl+V + + + + Dialog + + + Dialog + Dialog + + + + Curve type + Kurvtyp + + + + Coefficient + Koeffecient + + + + Both + Båda + + + + x>0 + x>0 + + + + x<0 + x<0 + + + + Y at X=0 + Y vid X=0 + + + + Side + Sida + + + + Y at X=-100 + Y vid X=100 + + + + Y at X=100 + Y vid X=100 + + + + Linear + Linjär + + + + Single Expo + Single Expo + + + + Symmetrical f(x)=-f(-x) + Symmetrisk f(x)=-f(-x) + + + + Symmetrical f(x)=f(-x) + Symmetrisk f(x)=f(-x) + + + + ExpoDialog + + + Switch + Brytare + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; text-decoration: underline;">Delay ans Slow</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">These values control the speed and delay of the output of the mix. </p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If Delay is not zero the actuation of the mix will be delayed by the specified amount of seconds.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">If Slow is not zero then the speed of the mix will be set by the value specified -&gt; the value states the number of seconds it takes to transit from -100 to 100.</p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; text-decoration: underline;">Fördröjning och Tröghet</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Dessa värden kontrollerar fördröjning och tröghet i utdata till mixern. </p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Om Fördröjningen inte är noll kommer påverkan på mixen att fördröjas med det angivna antelet sekunder.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Om Tröghet inte är noll kommer hastigheten i förändringar att begränsas av det angivna värdet -&gt; värdet specificerar det antal sekunder det tar att gå från fullt negativt utslag (-100) till fullt positivt utslag(100).</p></body></html> + + + + Scale + Skala + + + + Include Trim + Inkludera trim + + + + No + Nej + + + + Yes + Ja + + + Curve Kurva - - The curve used by the expo - Kurvan som används av expo + + Source + Källa - + + Line name + Linjenamn + + + NEG Negativa - + + The source for the mixer + Mixerkälla + + + + Input name + Filternamn + + + + Switch used by the input. +If blank then the input is considered to be "ON" all the time. + Brytare som används av filret. +Om fältet lämnas tomt så är filtret aktivt hela tiden. + + + POS Positiva @@ -52,22 +470,17 @@ Om fältet lämnas tomt så är expo påslaget hela tiden. Alla - + Weight Vikt - - DEST -> %1 - DEST -> %1 + + Phase used by the input. + Flygläge som används av filtret. - - Name - Namn - - - + 0 0 @@ -112,27 +525,147 @@ Om fältet lämnas tomt så är expo påslaget hela tiden. 8 - - Curve/Exponential - Kurva/Expo + + The curve used by the input + Kurva som används av filtret - - - + + GV GV - + Flight modes Flyglägen - + Stick Side Spakvärden + + + Edit %1 + Redigera %1 + + + + Rud + Rod + + + + Ele + Höj + + + + Thr + Gas + + + + Ail + Ske + + + + FlightMode + + + Form + Form + + + + Fade In + Tona in + + + + Fade Out + Tona ut + + + + Name + Namn + + + + Switch + Brytare + + + + trim1 + trim1 + + + + trim2 + trim2 + + + + trim4 + trim4 + + + + trim3 + trim3 + + + + Rud + Rod + + + + Ele + Höj + + + + Thr + Gas + + + + Ail + Ske + + + + Rotary Encoder %1 + Inmatningshjul %1 + + + + GVAR%1 + GVAR%1 + + + + FlightModes + + + Flight Mode %1 + Flygläge %1 + + + + (%1) + (%1) + + + + (default) + (default) + GeneralEdit @@ -154,13 +687,13 @@ Dessa inställningar gäller för alla modeller. Sändarinställningar - + Contrast LCD-kontrast - - + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -175,12 +708,12 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Värden mellan 20 och 45</span></p></body></html> - + Sound Mode Ljudläge - + Beeper Summer @@ -190,7 +723,7 @@ p, li { white-space: pre-wrap; } Högtalarton (endast högtalare) - + Battery Warning Batterivarning @@ -218,7 +751,7 @@ This value will be added to the measured battery voltage. Use this value to cal Detta värde läggs till det uppmätta värdet för batterispänningen. Använd värdet för att kalibrera den inbyggda spänningsmätaren. - + This is the switch selectrion for turning on the backlight (if installed). @@ -232,18 +765,18 @@ Detta värde läggs till det uppmätta värdet för batterispänningen. Använd Anger antaletl sekunder som bakgrundsbelysningenförblir påslagen efter senaste knapptryck. - - + + sec sek - + Inactivity Timer Inaktivitetstimer - + If not zero will sound beeps if the transmitter has been left without inputs for the specified number of minutes. Efter det angivna antalet minuter av inaktivitet ljuder en varningssignal. 0 förhindrar larm. @@ -253,12 +786,12 @@ Detta värde läggs till det uppmätta värdet för batterispänningen. Använd min - + Timer Beeps Timerpip - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -304,44 +837,22 @@ p, li { white-space: pre-wrap; } Blinka vid pip - - Reverse Throttle Operation - Inverterad gas - - - - Reverse throttle operation. -If this is checked the throttle will be reversed. Idle will be forward, trim will also be reversed and the throttle warning will be reversed as well. - - - Inverterad gas. -Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och gasvarning reverseras också. - - - - - + Show Splash Screen on Startup - Visa bild vid start av sändare + Visa Startbild - + Show splash screen on startup Visa bild vid start av sändare - - Throttle Startup Warning - Varning för påslagen gas vid start - - - - - - - - + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -366,27 +877,22 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Tyst varning - varnar om summern är satt till tyst läge</p></body></html> - - Switch Startup Warning - Brytarvarning vid start - - - + Memory Startup Warning Minnesvarning vid start - + Alarm Warning Alarmvarning vid start - + Channel Order (For Templates) Kanalordning (för mallar) - + Channel order This is used by the templated to determine which channel goes to what number output. @@ -395,12 +901,12 @@ This is used by the templated to determine which channel goes to what number out Används av mallarna för att koppla ihop kanaler med numrerade utgångar. - + Stick Mode Spak-tilldelning - + Mode selection: Mode 1: @@ -461,13 +967,13 @@ Mode 4: Mode 4 (SKE GAS HÖJ ROD) - + Beeper Mode Summerläge - - + + @@ -491,19 +997,19 @@ Mode 4: 4 - Extra högt. - - + + Quiet Tyst - - + + No Keys Ej vid knapptryck - + Normal Normal @@ -515,7 +1021,7 @@ Mode 4: Lång - + Input Filter Filtrering av indata @@ -535,13 +1041,12 @@ Mode 4: Filter - + Owner Name Ägare - - + @@ -549,17 +1054,7 @@ Mode 4: Av - - Switches Up - Brytare upp - - - - Switches Down - Brytare ned - - - + @@ -596,28 +1091,28 @@ Mode 4: Läge - + Telemetry NO DATA Alarm Slå på telemetrilarm - + Show Owner Name on Splash Visa ägarens namn på startbilden - + Only Alarms Endast vid alarm - + All För alla händelser - + THR GAS @@ -657,12 +1152,12 @@ Mode 4: ID2 - + Beeper Length Längd på summerton - + X-Short Extra Kort @@ -685,12 +1180,12 @@ Mode 4: Vibrationsläge - + Readonly Unlock Upphäv Skrivskyddet - + SC SC @@ -730,7 +1225,7 @@ Mode 4: SG - + Weight Vikt @@ -836,12 +1331,12 @@ Mode 4: PPM Multiplikator - + Pot Scrolling Enable Bläddra med potentiometer - + Bandgap Measuring Enable Mät bandluckor @@ -851,7 +1346,7 @@ Mode 4: Endast för alarm - + Trainer Slavsändare @@ -888,12 +1383,12 @@ Mode 4: POT 3 - + Timeshift from UTC Tidsdifferens till UTC - + GPS Coordinates GPS-koordinater @@ -908,17 +1403,17 @@ Mode 4: NMEA - + Haptic Length Vibrationstid - + LCD Display Type LCD-typ - + Standard Standard @@ -928,7 +1423,7 @@ Mode 4: Optrex - + Store calib. and hw settings in selected profile Spara kalibrering och hårdvaruinställningar i vald profil @@ -938,22 +1433,22 @@ Mode 4: Hämta kalibrering och hårdvaruinställningar från vald profil - + Speaker Volume Högtalarvolym - + Haptic Strength Vibrationsstyrka - + BackLight Brightness Belysningens ljusstyrka - + Negative span Negativa värden @@ -976,7 +1471,7 @@ Mode 4: Spänning - + Warning Varning @@ -1002,7 +1497,7 @@ Mode 4: Kalibrering ojch hårdvaruinställningar sparades. - + Speaker Högtalare @@ -1017,42 +1512,42 @@ Mode 4: Högtalarton - + RotEnc Navigation RotEnc Navigering - + BackLight Auto OFF after Belysning av efter - + BackLight Switch Belysningsbrytare - + BackLight On Stick Move Belysning vid spakrörelse - + BackLight Invert Invertera belysningen - + FrSky Internal Alarm FrSky Internlarm - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. Om du väljer FAI-läget så stängs varion, uppspelningsfunktionerna och telemetri-skärmen av permanent. FAI-funktionen kan inte slås av i sändaren. - + FAI Mode FAI-läge @@ -1062,12 +1557,12 @@ Mode 4: Spakscrollning - + CrossTrim Kross-trimning - + Country Code Landskod @@ -1087,7 +1582,7 @@ Mode 4: Amerika - + Metric Meter, Centimeter, Millimeter @@ -1097,17 +1592,17 @@ Mode 4: Yard, Fot, Tum - + Measurement Units Måttenheter - + Voice Language Språk för Röst - + PPMSim PPMSim @@ -1141,12 +1636,12 @@ FAI-funktionen kan inte slås av i sändaren. Ljudstyrka Bakgrund - + MAVLink Baud Rate MAVLink Baud Rate - + 4800 Baud 4800 Baud @@ -1186,7 +1681,7 @@ FAI-funktionen kan inte slås av i sändaren. 115200 Baud - + @@ -1207,57 +1702,252 @@ FAI-funktionen kan inte slås av i sändaren. POT 4 + + Heli + + + Form + Form + + + + Invert Elevator + Invertera höjdroder + + + + Invert Aileron + Invertera skevroder + + + + Invert Collective + Invertera collective + + + + Invert + Invertera + + + + Off + Av + + + + 120 + 120 + + + + 120X + 120X + + + + 140 + 140 + + + + 90 + 90 + + + + Collective + Collective + + + + Swash Type + Swashtyp + + + + Swash Ring + Swashring + + + + InputsPanel + + + + Move Up + Flytta uppåt + + + + + Ctrl+Up + Ctrl+Up + + + + + Move Down + Flytta nedåt + + + + + Ctrl+Down + Ctrl+Down + + + + Source(%1) + Källa(%1) + + + + No Trim + Ingen Trim + + + + Weight(%1) + Vikt(%1) + + + + Switch(%1) + Brytare(%1) + + + + Clear All Settings + Radera alla inställningar + + + + Not enough available inputs! + För få filter är tillgängliga! + + + + Delete Selected Inputs? + Radera valda filter? + + + + &Add + &Lägg till + + + + Ctrl+A + CTRL+A + + + + &Edit + &Redigera + + + + Enter + Retur + + + + &Delete + &Ta bort + + + + Delete + Ta bort + + + + &Copy + &Kopiera + + + + Ctrl+C + Ctrl+C + + + + &Cut + Klipp &Ut + + + + Ctrl+X + Ctrl+X + + + + &Paste + Klistra &In + + + + Ctrl+V + Ctrl+V + + + + Du&plicate + &Duplicera + + + + Ctrl+U + Ctrl+U + + + + Clear Inputs? + Radera Filter? + + + + Really clear all the inputs? + Vill du verkligen ta bort alla filter? + + MainWindow - - + + - + File loaded Filen har laddats - + - + Save As Spara Som - - + + No updates available at this time. Inga updateringar finns tillgängliga. - + - + Unable to check for updates. Det gick inte att söka efter uppdateringar. - - - - companion9x - Models and Settings Editor - %1 - profile %2 - companion9x - Editor för Modeller och Inställningar - %1 - profile %2 - - - - - - - companion9x - Models and Settings Editor - %1 - companion9x - Editor för Modeller och Inställningar - %1 - - - + Executable (*.exe) Program (*.exe) @@ -1272,14 +1962,14 @@ FAI-funktionen kan inte slås av i sändaren. Vill du skriva firmware till sändaren nu? - + A new version of %1 firmware is available (current %2 - newer %3). Do you want to download it now ? En ny version finns tillgänglig av %1 fimware (Din version %2 - Ny version %3). Vill du ladda ned den nya versionen nu ? - + Open Öppna @@ -1290,29 +1980,18 @@ Vill du ladda ned den nya versionen nu ? Filen sparades - + Copyright Copyright - - donating - bidra - - - - + &%1 %2 &%1 %2 - - %1 %2 - %1 %2 - - - + &New &Ny @@ -1367,12 +2046,7 @@ Vill du ladda ned den nya versionen nu ? &Sök efter uppdateringar... - - A new version of companion9x is available (version %1)<br>Would you like to download it? - An ny version av companion9x finns tillgänglig (version %1)<br>Vill du ladda ned den? - - - + Display previous message again at startup ? Skall föregående varning visas igen vid uppstart ? @@ -1387,18 +2061,12 @@ Vill du ladda ned den nya versionen nu ? Tillfälligt fel i byggservern. Försök igen senare - - - Compilation server requires registration, please check opentx web site - Byggservern kräver registrering. Var god kontrollera openTX webbsida - - - + Firmware does not fit in the Tx, due to selected firmware options Firmware får inte rum i minnet på grund av att för många funktioner aktiverats - + Firmware %1 does not seem to have ever been downloaded. Version %2 is available. Do you want to download it now ? @@ -1407,57 +2075,27 @@ Version %2 finns tillgänglig. Vill du ladda ned den nu ? - + Write Models and settings from %1 to the Tx? Skriv Modeller och Inställningar från %1 till sändaren? - + Conversion failed Konverteringen misslyckades - + Restore failed Återställningen misslyckade - + Backup failed Säkerhetskopieringen misslyckades - - Version %1 (revision %2), %3 - Version %1 (revision %2), %3 - - - - The companion9x project was originally forked from eePe - Ursprungligen grenades companion9x av från eePe - - - - If you've found this program useful, please support by - Om du tycker att programet är användbart så kan du stödja utvecklingen genom att - - - - About companion9x - Om companion9x - - - - Check for new version of companion9x/er9x - Sök efter ny version av companion9x/er9x - - - - Show companion9x contributors list - Visa vilka som bidragit till companion9x - - - + Customize your &TX... Sändari&nställningar... @@ -1467,7 +2105,7 @@ Vill du ladda ned den nu ? Ställ in din sändares startlbild - + E&xit &Avsluta @@ -1477,7 +2115,7 @@ Vill du ladda ned den nu ? Avsluta programmet - + Cu&t Klipp &Ut @@ -1507,7 +2145,7 @@ Vill du ladda ned den nu ? Klistra in klippbokens innehåll i det valda avsnittet - + Ctrl+Alt+W Ctrl+Alt+W @@ -1547,7 +2185,7 @@ Vill du ladda ned den nu ? Visa säkrings-dialog - + &Simulate S&imulera @@ -1577,67 +2215,7 @@ Vill du ladda ned den nu ? Skriv ut den valda modellen. - - Cl&ose - &Stäng - - - - Close the active window - Stäng det aktiva fönstret - - - - Close &All - Stäng &Alla - - - - Close all the windows - Stäng alla fönster - - - - &Tile - Sida &vid sida - - - - Tile the windows - Ordna fönstren bredvid varandra - - - - &Cascade - &Överlappande - - - - Cascade the windows - Låt fönstren överlappa varandra - - - - Ne&xt - &Nästa - - - - Move the focus to the next window - Ge fokus till nästa fönster - - - - Pre&vious - &Föregående - - - - Move the focus to the previous window - Ge fokus till föregående fönster - - - + &About &Om @@ -1647,38 +2225,73 @@ Vill du ladda ned den nu ? Visa information om programmet - - + + Recent Files Senaste Filer - - Switch layout Left/Right - Byt layout Höger/Vänster - - - + &File &Arkiv - - Switch layout direction - Byt layout-riktning + + + + Companion - Models and Settings Editor - %1 - profile %2 + Companion - Editor för Modeller och Inställningar - %1 - profile %2 - + + + + + Companion - Models and Settings Editor - %1 + Companion - Editor för Modeller och Inställningar - %1 + + + Checking for updates Letar efter uppdateringar - + + A new release of Companion is available please check the OpenTX website! + En ny version av Companion finns tillgänglig. Var god kontrollera OpenTX webbsida! + + + Ignore this version (r%1)? Ladda inte ned versionen (r%1)? - + + OpenTX Home Page: <a href='%1'>%1</a> + OpenTX Hemsida: <a href='%1'>%1</a> + + + + The OpenTX Companion project was originally forked from <a href='%2'>eePe</a> + OpenTX-projektet grenades ursprungligen av från <a href='%2'>eePe</a> + + + + If you've found this program useful, please support by <a href='%1'>donating</a> + Om du tycker att programet är användbart så kan du stödja utvecklingen genom att <a href='%1'>donera</a> + + + + Version %1, %3 + Version %1, %3 + + + + Show Companion changelog + Visa en lista med förändringar av Companion + + + &Write Models and Settings To Tx &Skriv Modeller och Inställningar till sändaren @@ -1738,55 +2351,42 @@ Vill du ladda ned den nu ? Läs firmware från sändaren - &Configure Communication... - &Kommunikationsinställningar... - - - Configure software for communication with the transmitter - Inställningar för mjukvaran som kommunicerar med sändaren - - - + &Edit &Redigera - - &Window - &Fönster - - - + &Help &Hjälp - + File Arkiv - + Edit Redigera - + Help Hjälp - + Ready Redo - + Contributors &List... &Bidragsgivare... - + Display previous warning again at startup ? SKall föregående varning visas igen vid uppstart ? @@ -1795,8 +2395,8 @@ Vill du ladda ned den nu ? - - + + @@ -1808,26 +2408,21 @@ Vill du ladda ned den nu ? Fel - + Cannot write file %1: %2. Filen %1 kunde inte skrivas: %2. - + New release available En ny version finns tillgänglig - - - A new release of companion is available please check the repository - En ny version av companion finns tillgänglig. Kontrollera källkods-repository - - + Error opening file %1: @@ -1836,7 +2431,7 @@ Vill du ladda ned den nu ? %2. - + Compilation server termporary failure, try later Tillfälligt fel i byggservern. Försök igen senare @@ -1853,7 +2448,7 @@ Vill du ladda ned den nu ? Okänt server-fel. Försök igen senare - + Compare... Jämför... @@ -1863,43 +2458,43 @@ Vill du ladda ned den nu ? Jämför modeller - - - + + + Backup is impossible Säkerhetskopiering kan inte utföras - - - + + + The backup dir set in preferences does not exist Foldern för säkerhetskopior existerar inte - - + + Warning Varning - - + + Firmware Profiles Profiler för Firmware - + &Read/Write &Läs/Skriv - + Write Skriv - + Unable to find file %1! Kan inte hitta filen %1 ! @@ -1911,7 +2506,7 @@ Vill du ladda ned den nu ? %2. - + &loadBackup... ladda&Backup... @@ -1936,30 +2531,41 @@ Vill du ladda ned den nu ? Öppna loggfil - + - - - + + + Taranis radio not found Hittade inte någon Taranis-sändare - + - - + + Impossible to identify the radio on your system, please verify the eeprom disk is connected. Det går inte att identifiera sändaren. Verifiera att EEPOROM-skivan är ansluteten. - + Yes Ja - + + A new version of Companion is available (version %1)<br>Would you like to download it? + An ny version av Companion finns tillgänglig (version %1)<br>Vill du ladda ned den? + + + + + Compilation server requires registration, please check OpenTX web site + Byggservern kräver registrering. Var god kontrollera OpenTX webbsida + + + No Nej @@ -1982,7 +2588,7 @@ Vill du ladda ned den nu ? Release notes innehåller väldigt viktig information. Vill du läsa dem nu? - + Firmware updates Firmware-uppdatering @@ -1994,13 +2600,13 @@ Vill du ladda ned den nu ? - - + + Read Models and Settings From Tx Läs Modeller och Inställningar från sändaren - + The file %1 has not been recognized as a valid Models and Settings file Write anyway ? @@ -2011,15 +2617,15 @@ Starta skrivningen i alla fall ? - - - - + + + + Backup Models and Settings From Tx Säkerhetskopiera Modeller och Inställningar från sändaren - + Cannot check Models and Settings compatibility! Continue anyway? Det går inte att verifiera att Modeller och Inställningar är kompatibla. Fortsätt i alla fall? @@ -2029,23 +2635,23 @@ Starta skrivningen i alla fall ? Sändarens firmware är av en annan typ än den aktuella. Kontrollera Arkiv och Inställningar! - + The transmitter firmware is outdated, please upgrade! Firmware i sändaren är föråldrad. Var god uppgradera! - + Write Models and Settings To Tx Skriv Modeller och Inställningar till sändaren - - + + Write Firmware To Tx Skriv firmware till sändaren - + Cannot convert Models and Settings for use with this firmware, original data will be used Modeller och Inställningar kan inte översättas till denna firmware. Ingen information uppdateras @@ -2055,12 +2661,12 @@ Starta skrivningen i alla fall ? Återställ Modeller och Inställningar till sändaren - + Could not restore Models and Settings to TX. The models and settings data file can be found at: %1 Det gick inte att återställa Modeller och Inställningar till sändaren. Modeller och Inställningar finns i filen %1 - + Firmware write failed Skrivningen av firware misslyckades @@ -2070,12 +2676,12 @@ Starta skrivningen i alla fall ? Det gick inte att skriva firmware till sändaren. Modeller och Inställningar finns i filen %1 - + Cannot backup existing Models and Settings from TX. Firmware write process aborted Det gick inte att säkerhetskopiera sändarens Modeller och Inställningar. Skrikvningen av firmware avbröts - + Save transmitter Models and Settings to File Spara sändarens Modeller och Inställningar till en fil @@ -2085,22 +2691,32 @@ Starta skrivningen i alla fall ? Det går inte att identifiera sändaren. - + Read Tx Firmware to File Läs Sändarens Firmware till Fil - + + About Companion + Om Companion + + + + Check for new version of Companion + Sök efter ny version av Companion + + + + Show Companion contributors list + Visa vilka som bidragit till Companion + + + ChangeLog... Förändringar... - - Show companion9x changelog - Visa en lista med förändringar av companion9x - - - + Firmware ChangeLog... Firmware-förändringar... @@ -2110,7 +2726,7 @@ Starta skrivningen i alla fall ? Visa firmware-förändringar - + Invalid Models and Settings File %1 Filen innehåller inte Modeller och Inställningar: %1 @@ -2124,7 +2740,7 @@ Starta skrivningen i alla fall ? MdiChild - + @@ -2139,7 +2755,7 @@ Starta skrivningen i alla fall ? - + @@ -2147,36 +2763,36 @@ Starta skrivningen i alla fall ? Fel - + Editing model %1: Redigera modell %1: - + Unable to find file %1! Kan inte hitta filen %1 ! - - + + Error reading file %1: %2. Fel vid inläsning från filen %1: %2. - + - + Error opening file %1: %2. Fel vid öppning av filen %1: %2. - + @@ -2202,12 +2818,12 @@ Starta skrivningen i alla fall ? %2. - + free bytes bytes lediga - + Invalid EEPROM File %1 Ogiltig modelldatafil %1 @@ -2218,14 +2834,7 @@ Starta skrivningen i alla fall ? Ogiltig binär modelldatafil %1 - - - - companion9x - companion9x - - - + %1 has been modified. Do you want to save your changes? %1 har förändrats. @@ -2242,24 +2851,31 @@ Vill du spara förändringarna? Säkerhetskopierin kan ej utföras - + + + + Companion + Companion + + + The backup dir set in preferences does not exist Katalog för säkerhetskopiering saknas i inställningarna - - + + Backup EEPROM From Tx Säkerhetskopiera modelldata från sändaren - + Cannot check eeprom compatibility! Continue anyway? Det går inte att veriifiera att modelldata är kompatibla. Fortsätt i alla fall? - + Warning Varning @@ -2275,7 +2891,7 @@ Vill du spara förändringarna? Firmware i flashminnet är föråldrat. Var god uppgradera! - + Open Öppna @@ -2285,26 +2901,26 @@ Vill du spara förändringarna? Den binära backupfilen är felaktig %1 - - - + + + Taranis radio not found Taranis-sändaren hittades ej - - - + + + Impossible to identify the radio on your system, please verify the eeprom disk is connected. Det går inte att identifiera sändaren. Verifiera att EEPOROM-skivan är ansluteten. - + Write EEPROM To Tx Skriv EEPROM till sändaren - + Do you want to use model wizard? Vill du använda modell-guiden? @@ -2317,70 +2933,67 @@ Vill du spara förändringarna? MixerDialog - + Dialog Dialog - + Source Källa - - - + + + The source for the mixer Mixerkälla - + Weight Vikt - - - - + Offset Offset - + Include Trim Inkludera trim - + Curve Kurva - + The curve used by the mix Mixerkurvan - + Switch Brytare - + Switch used by the mix. If blank then the mix is considered to be "ON" all the time. Brytare som används av mixen. Om fältet är blankt så är mixern påslagen hela tiden. - + Warning Varning - + Mixer warning. Setting this value will cause a beep to be emmitted when this value is active. Not clear what that means... @@ -2408,12 +3021,12 @@ Om ett värde anges så ljuder alarmet när värdet är aktivt. 3 Pip - + Multiplex Multiplex - + Multiplexer This determines how mixer values are added. @@ -2445,12 +3058,7 @@ Anger hur mixervärden påverkar kanalen. Ersätt - - Enable FM Trim - Slå på FM-Trim - - - + Delay Fördröjning @@ -2498,18 +3106,12 @@ p, li { white-space: pre-wrap; } Ned - + DEST -> CH%1%2 DEST -> KN%1%2 - - - FM Trim Value - Värde för FM-Trim - - - + Yes Ja @@ -2519,7 +3121,7 @@ p, li { white-space: pre-wrap; } Nej - + Rud Rod @@ -2539,22 +3141,17 @@ p, li { white-space: pre-wrap; } Ske - + Name Namn - - - Curve/Differential - Kurva/Diff - Include DR/Expo Inkludera DR/Expo - + 0 0 @@ -2599,940 +3196,95 @@ p, li { white-space: pre-wrap; } 8 - + DEST -> X%1 DEST -> X%1 - + Flight modes - Flygmoder + Flyglägen - - Fix Offset - Fast Offset - - - - + + GV GV - ModelEdit + MixesPanel - - Dialog - Dialog + + + Move Up + Flytta uppåt - - - - PPM Frame Length - Längd för PPM-ram + + + Ctrl+Up + Ctrl+Up - - - - mSec - mSec + + + Move Down + Flytta nedåt - - - DSM Type - DSM-typ + + + Ctrl+Down + Ctrl+Down - - - LP4/LP5 - LP4/LP5 - - - - - DSM2only - Bara DSM2 - - - - - DSM2/DSMX - DSM2/DSM - - - - - RX Number - Mottagarnummer - - - - Throttle Source - Throttle Trace - Gas-kontroll - - - - - CH01 - KN01 - - - - - CH02 - KN02 - - - - - CH03 - KN03 - - - - - CH04 - KN04 - - - - - CH05 - KN05 - - - - - CH06 - KN06 - - - - - CH07 - KN07 - - - - - CH08 - KN08 - - - - - CH09 - KN09 - - - - - CH10 - KN10 - - - - - CH11 - KN11 - - - - - CH12 - KN12 - - - - - CH13 - KN13 - - - - - CH14 - KN14 - - - - - CH15 - KN15 - - - - - CH16 - KN16 - - - - - Param - Parametrar - - - - Telemetry - Telemetri - - - - - - - A1 - A1 - - - - - Unit - Enhet - - - - - Raw (-) - Rå (-) - - - - - Max Value - Maxvärde - - - - - Alarm 1 - Alarm 1 - - - - - - - - - ---- - ---- - - - - - - - - - Yellow - Gul - - - - - - - - - Orange - Orange - - - - - - - - - Red - Röd - - - - - - - < - < - - - - - - - > - > - - - - - - Alarm 2 - Alarm 2 - - - - - Min Value - Minvärde - - - - - - - A2 - A2 - - - - Serial Protocol - Serieprotokoll - - - - Units - Enheter - - - - None - Inget - - - - FrSky Sensor Hub - FrSky Sensor-hub - - - - Metric - Metriska - - - - Imperial - Imperial - - - - 2 - 2 - - - - 3 - 3 - - - - 4 - 4 - - - - Blades - Blad - - - - - - Source - Källa - - - - - - Gauge - Mätare - - - - - - Gauge 1 - Mätare 1 - - - - - - Gauge 2 - Mätare 2 - - - - - - Gauge 3 - Mätare 3 - - - - - - Gauge 4 - Mätare 4 - - - - Templates - Mallar - - - - Simulate - Simulera - - - - Setup - Konfiguration - - - - Model Name - Modellnamn - - - - - Count Down - Nedräkning - - - - - Count Up - Uppräkning - - - - - mm:ss - mm:ss - - - - Trim Increment - Trimsteg - - - - Exponential - Exponentiella - - - - Extra Fine - Extrafina - - - - Fine - Fina - - - - Medium - Medium - - - - Coarse - Grova - - - - Throttle Trim - Gastrim - - - - Throttle Expo - Expo Gas - - - - Center beep - Centrumpip - - - - - - - - - - - - RUD - ROD - - - - - - - - - - - - - - - ELE - HÖJ - - - - - - - - THR - GAS - - - - - - - - - - - - - AIL - SKE - - - - P1 - P1 - - - - P2 - P2 - - - - P3 - P3 - - - - Pulse Shift (polarity) - Pulsskifte (Polaritet) - - - - - - Positive - Positiv - - - - - - Negative - Negativ - - - - - - Protocol - Protokoll - - - - - - Channels - Kanaler - - - - - - - - - ch - kn - - - - - - usec - usec - - - - Extended Limits - Utökade gränser - - - - - Heli Setup - Helikopter - - - - Swash Type - Swashtyp - - - - - Off - Av - - - - 120 - 120 - - - - 120X - 120X - - - - 140 - 140 - - - - 90 - 90 + + Clear Mixes + Nollställ mixarna - Collective - Collective - - - - Swash Ring - Swashring - - - - Invert Elevator - Invertera höjdroder - - - - Invert Aileron - Invertera skevroder - - - - Mixes - Mixar - - - - Limits - Gränser - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INV - INV - - - - - - Channel - Kanal - - - - - - Offset - Offset - - - - - - - - Min - Min - - - - - - - - Max - Max - - - - - - Invert - Invertera - - - - Curves - Kurvor - - - - Curve 1 - Kurva 1 - - - - Curve 2 - Kurva 2 - - - - Timer1 - Timer1 - - - - Timer2 - Timer2 - - - - - - PPM delay - PPM-fördröjning - - - - Extended Trims - Utökade trimmar - - - - - - - - - - - - Fade In - Tona in - - - - - - - - - - - - Fade Out - Tona ut - - - - Curve 3 - Kurva 3 - - - - Curve 4 - Kurva 4 - - - - Curve 5 - Kurva 5 - - - - Curve 6 - Kurva 6 - - - - Curve 7 - Kurva 7 - - - - Curve 8 - Kurva 8 - - - - Curve 9 - Kurva 9 - - - - Curve 10 - Kurva 10 - - - - Curve 11 - Kurva 11 - - - - Curve 12 - Kurva 12 - - - - Curve 13 - Kurva 13 - - - - Curve 14 - Kurva 14 - - - - Curve 15 - Kurva 15 - - - - Curve 16 - Kurva 16 - - - - Clear All Curves - Clear All Mixes - Nollställ alla kurvor - - - - - - - Function - Funktion - - - - Custom switches - Logiska Brytare - - - - - V1 - V1 - - - - - V2 - V2 - - - - Safety Switches - Säkerhetsbrytare - - - - - - - - - - - - - - - - Switch - Brytare - - - - Value - Värde - - - - + + X%1 + X%1 + + + + + CH%1%2 KN%1%2 - + + Weight(%1) + Vikt(%1) + + + + Switch(%1) + Brytare(%1) + + + + No Trim + Ingen Trim + + + + No DR/Expo + Ingen DR/Expo + + + + Offset(%1) + Offset(%1) + + + Delay(u%1:d%2) Fördröjning(u%1:d%2) @@ -3547,233 +3299,155 @@ p, li { white-space: pre-wrap; } Varn(%1) - - - Expo - Expo - - - - - Curve - Kurva - - - - FMTrim - FMTrim - - - - Winged Shadow How High - Winged Shadow How High - - - - Winged Shadow How High (not supported) - Winged Shadow How High (stöds ej) - - - - - Range - Räckvidd - - - + Not enough available mixers! För få mixar är tillgängliga! - - Not enough available expos! - För få expos är tillgängliga! - - - + Delete Selected Mixes? Ta bort valda mixar? - - + &Add &Lägg till - - + Ctrl+A CTRL+A - - + &Edit &Redigera - - - - + + Enter + Retur + + + &Delete &Ta bort - - - - + Delete - Radera + Ta bort - - - - + &Copy &Kopiera - - - - + Ctrl+C - Ctrl*C + Ctrl+C - - - - + &Cut Klipp &Ut - - - - + Ctrl+X Ctrl+X - - - - + &Paste Klistra &In - - - - + Ctrl+V Ctrl+V - - + Du&plicate &Duplicera - - - - - - Move Up - Flytta uppåt - - - - - - - Ctrl+Up - Ctrl+Up - - - - - - - Move Down - Flytta nedåt - - - - - - - Ctrl+Down - Ctrl+Down - - - - Clear Expo Settings - Ta bort expo-inställningar - - - - Clear Mixes - Nollställ mixarna - - - - Weight - Weight(+%1%) - Vikt - - - - Editing curve %1 - Redigera kurvan %1 - - - - Delete Selected Expos? - Ta bort valda Expos? - - - - Apply Template? - Använd mall? - - Apply template "%1"? - Använd mallen "%1"? + Ctrl+U + Ctrl+U - - Clear Expos? - Nollställ Expos? - - - - Really clear all the expos? - Vill du verkligen nollställa alla Expos? - - - - - + Clear Mixes? Ta bort mixarna? - + Really clear all the mixes? Vill du verkligen ta bort alla mixar? + + + ModelEdit - + + Dialog + Dialog + + + + Heli + Heli + + + + Inputs + Filter + + + + Telemetry + Telemetri + + + + Simulate + Simulera + + + + Setup + Konfiguration + + + + Channels + Kanaler + + + + Mixes + Mixar + + + + Logical Switches + Logiska Brytare + + + + Switch Assignment + BrytarEffekter + + + + Curves + Kurvor + + + Clear Curves? Ta bort kurvorna? @@ -3783,1309 +3457,15 @@ p, li { white-space: pre-wrap; } Vill du verkligen ta bort alla kurvor ? - - - Ctrl+U - Ctrl+U - - - - Diff - Diff - - - - - Enter - Retur - - - - Throttle2Trig - Gas->Trig - - - - - - - - - - - - trim1 - trim1 - - - - - - - - - - - - trim2 - trim2 - - - - - - - - - - - - trim4 - trim4 - - - - - - - - - - - - trim3 - trim3 - - - - RSSI - RSSI - - - - Alarm 1 - Alarm 1 - - - - Disable Throttle Warning - Ingen Gasvarning - - - - Switch startup Warning - Brytarvarning vid start - - - - Instant Trim - Snabbtrim - - - - REa - REa - - - - REb - REb - - - - 3POS - 3POS - - - - - Check - Kontrollera - - - - - - ON - På - - - - - OFF - Av - - - - GEA - LAN - - - - ID0 - ID0 - - - - ID1 - ID1 - - - - ID2 - ID2 - - - - - TriggerB - Utlösare - - - - - Enable - Slå på - - - - Altimetry / Vario - Höjdmätare / Vario - - - - Vario source - Vario-källa - - - - Vario limits - Vario-gränser - - - - Use GPS as altitude source - Använd GPS som höjdmätare - - - - Display altitude in toolbar - - - - - - Volts (V) - Volt (V) - - - - - Amps (A) - Ampere (A) - - - - - Speed (m/s or ft/s) - Hastighet (m/s eller ft/s) - - - - - Speed (km/h or miles/h) - Hastighet (Km/h eller miles/h) - - - - - Meters (m or ft) - Meter (m eller ft) - - - - - Temp (°) - Temp (°) - - - - - Fuel (%) - Tank (%) - - - - - mAmps (mA) - mAmpere (mA) - - - - No Trim - Ingen Trim - - - - Really clear existing mixes on CH6? - Vill du nollställa alla mixar på kanal 6? - - - - Really clear existing mixes on CH5? - Vill du nollställa alla mixar på kanal 5? - - - - Model Voice - Röst för modell - - - - - Sym - Sym - - - - - Curve type - Kurvtyp - - - - 3 points - 3-punkts - - - - 3 points custom - 3-punkts special - - - - 5 points - 5-punkts - - - - 5 points custom - 5-punkts special - - - - 9 points - 9-punkts - - - - 9 points custom - 9-punkts special - - - - 17 points - 17-punkts - - - - 17 points custom - 17-punkts special - - - - - Duration - Varaktighet - - - - - Delay - Fördröjning - - - - Volt source - Volt-källa - - - - Current source - Ström-källa - - - - NONE - Ingen - - - - - FAS - FAS - - - - CEL - BAT - - - - Telemetry screen 1 - Telemetriskärm 1 - - - - Telemetry screen 2 - Telemetriskärm 2 - - - - Rud - Rod - - - - Ele - Höj - - - - Thr - Gas - - - - Ail - Ske - - - - - DISABLED - INAKTIV - - - - No DR/Expo - Ingen DR/Expo - - - - CF%1 - CF%1 - - - - Simple 4-CH - Enkel 4-KN - - - - T-Cut - Gas-Klippning - - - - Sticky T-Cut - Seg Gasklippning - - - - V-Tail - V-stjärt - - - - Elevon\Delta - Deltavinge - - - - Heli Setup with gyro gain control - Helikopter med gyro gain kontroll - - - - Gyro gain control - Gyro gain kontroll - - - - Heli Setup (Futaba's channel assignment style) - Helikopterinställning (Futabas kanalordning) - - - - Heli Setup with gyro gain control (Futaba's channel assignment style) - Helikopterinställning med gyro gain kontroll (Futabas kanalordning) - - - - Gyro gain control (Futaba's channel assignment style) - Gyro gain kontroll (Futabas kanalordning) - - - - Servo Test - Servotest - - - - MultiCopter - Multikopter - - - - Use Model Config Wizard - Använd modell-guiden - - - - Are you sure you want to delete curve %1 ? - Vill du verkligen ta bort kurvan %1 ? - - - - - - - AIL2 - SKE2 - - - - - - - ELE2 - HÖJ2 - - - - - - - - - FLAPS - FLAPS - - - - - - - - - FLAP%1 - FLAP%1 - - - - - - - PITCH - PITCH - - - - - - - - - - - GYRO - GYRO - - - - - SPOIL - SPOIL - - - - - SPOIL%1 - SPOIL%1 - - - - - RUD2 - ROD2 - - - - Not enough free points in eeprom to store the curve. - Kurvan får inte plats i minnet. - - - - - - - - - - - - GVAR1 - GVAR1 - - - - - - - - - - - - GVAR2 - GVAR2 - - - - - - - - - - - - GVAR3 - GVAR3 - - - - - - - - - - - - GVAR4 - GVAR4 - - - - - - - - - - - - GVAR5 - GVAR5 - - - - - - - - - - - - Rotary encoder B - Inmatningshjul B - - - - - - - - - - - - Rotary encoder A - Inmatningshjul A - - - - Custom Functions - Specialfunktioner - - - - Vario - Vario - - - - - - Nums - Nummer - - - - - - Bars - Staplar - - - - Telemetry screen 3 - Telemetriskärm 3 - - - - - - X%1 - X%1 - - - - Error - Fel - - - - Unable to find sound file %1! - Kan inte hitta ljudfilen %1! - - - - Invert Collective - Invertera collective - - - - - AND - OCH - - - - Alti - Höjd - - - - Alti+ - Höjd+ - - - - - - Custom Screen Type - Visa data som - - - - ModelSetup - Modelinställningar - - - - Model Image - Modell-ikon - - - - - Persistent - Bestående - - - - - MinuteBeep - Minutpip - - - - - CountDownBeep - Nedräkningspip - - - - SB - SB - - - - SD - SD - - - - SA - SA - - - - SC - SC - - - - SG - SG - - - - SE - SE - - - - SF - SF - - - - RS - RS - - - - Reverse Throttle Operation - Inverterad gas - - - - Reverse throttle operation. -If this is checked the throttle will be reversed. Idle will be forward, trim will also be reversed and the throttle warning will be reversed as well. - - - Inverterad gas. -Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och gasvarning reverseras också. - - - - - - RF Module 1 - RF-modul 1 - - - - - - Start - Start - - - - RF Module 2 - RF-modul 2 - - - - Trainer Mode - Trainerläge - - - - Master - Lärare - - - - Slave - Elev - - - - Master/Trainer Port - Trainer-port - - - - Failsafe - Failsafe - - - - External module - Extern modul - - - - Internal Module - Intern modul - - - + Flight Modes Flyglägen - - - Flight Mode 0 (Default) - Flygläge 0 (Default) - - - - - - - - - - - - Flight Mode Name - Flyglägets namn - - - - GVAR6 - GVAR6 - - - - GVAR7 - GVAR7 - - - - FM 1 - FL 1 - - - - FM 2 - FL 2 - - - - FM 3 - FL 3 - - - - FM 4 - FL 4 - - - - FM 5 - FL 5 - - - - FM 6 - FL 6 - - - - FM 7 - FL 7 - - - - FM 8 - FL 8 - - - - Curve name - Kurvans namn - - - - S1 - S1 - - - - S2 - S2 - - - - LS - LS - - - - - Flight modes - Flygmoder - - - - - Flight mode - Flygmod - - - - - - - CH %1 - KN %1 - - - - - Polarity - Polaritet - - - - - (00:00:00) - (00:00:00) - - - - - Failsafe Mode - Failsafe-läge - - - - - Hold - Håll senaste - - - - - Custom - Special - - - - - No Pulses - Inga pulser - - - - Sticks - Spakar - - - - Show channels names in mixes - Visa kanalnamn i mixar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- - ---- - - - - - Center - Centrum - - - - Curve Creator - Kurveditor - - - - Y at X=100 - Y vid X=100 - - - - Both - Båda - - - - x>0 - x>0 - - - - x<0 - - - - - Linear - Linjär - - - - Single Expo - Single Expo - - - - Symmetrical f(x)=-f(-x) - Symmetrisk f(x)=-f(-x) - - - - Symmetrical f(x)=f(-x) - Symmetrisk f(x)=f(-x) - - - - Apply - Tillämpa - - - - Side - Sida - - - - Y at X=-100 - Y vid X=100 - - - - Y at X=0 - Y vid X=0 - - - - Coefficient - Koeffecient - - - - CS9 - LB9 - - - - CSF - LBF - - - - CSD - LBD - - - - CS6 - LB6 - - - - CS1 - LB1 - - - - CS8 - LB8 - - - - CS7 - LB7 - - - - CSA - LBA - - - - CSB - LBB - - - - CSC - LBC - - - - CS5 - LB5 - - - - CS3 - LB3 - - - - CS2 - LB2 - - - - CSE - LBE - - - - CSG - LBG - - - - CS4 - LB4 - - - - CST - LBT - - - - CSM - LBM - - - - CSP - LBP - - - - CSH - LBH - - - - CSO - LBO - - - - CSN - LBN - - - - CSQ - LBQ - - - - CSR - LBR - - - - CSS - LBS - - - - CSL - LBL - - - - CSK - LBK - - - - CSJ - LBJ - - - - CSI - LBI - - - - CSU - LBU - - - - CSV - LBV - - - - CSW - LBW - - - - Sink Max - Sunk Max - Sjunk Max - - - - Climb Max - Raise Max - Höj Max - - - - Sink Min - Sunk Min - Sjunk Min - - - - Climb Min - Raise Min - Höj Min - ModelsListWidget - + &Edit &Redigera @@ -5212,11 +3592,143 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Det går inte att klippa ut standard-modellen. + + Module + + + Form + Form + + + + Failsafe Mode + Failsafe-läge + + + + Start + Start + + + + PPM delay + PPM-fördröjning + + + + usec + usec + + + + Negative + Negativ + + + + Positive + Positiv + + + + RX Number + Mottagarnummer + + + + Master + Lärare + + + + Slave + Elev + + + + Polarity + Polaritet + + + + Trainer Mode + Trainerläge + + + + mSec + mSec + + + + PPM Frame Length + Längd för PPM-ram + + + + Label + Etikett + + + + + ch + kn + + + + Channels + Kanaler + + + + Hold + Håll senaste + + + + Custom + Special + + + + No Pulses + Inga pulser + + + + Failsafe Positions + Failsafe-lägen + + + + Protocol + Protokoll + + + + ModulePanel + + + Trainer Output + TrainerUttag + + + + Internal Radio System + Intern Radosändare + + + + External Radio Module + Extern Sändarmodul + + QObject - - + + P1 P1 @@ -5236,12 +3748,12 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga P3 - + MAX MAX - + A1 A1 @@ -5261,57 +3773,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga T2 - - Curve - Kurva - - - - gruvin9x only accepts %1 expos - gruvin9x accepterar enbart %1 expos - - - - - - - - - - - - - - - - - - - - - Open9x doesn't accept this protocol - Open9x accepterar inte detta protokoll - - - - - - - - - - - - - - - - open9x only accepts %1 expos - Gruvin9x firmware only accepts %1 expos - open9x accepterar enbart %1 expos - - - + th9x th9x @@ -5321,13 +3783,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga er9x - - - Er9x doesn't accept this protocol - Er9x accepterar inte detta protokoll - - - + Trainer Trainer @@ -5367,16 +3823,16 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Starta loggning - - + + - + ---- ---- - - + + Rud Rod @@ -5399,13 +3855,8 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Ske - - 3POS - 3POS - - - - + + Timer1 Timer1 @@ -5418,80 +3869,44 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Timer2 - - - - Open9x doesn't allow Curve%1 in expos - Open9x accepterar inte kurvan %1 i expos - - - - + - - + + Warning Varning - EEPROM saved with these warnings: Modelldata sparades, men med dessa varningar: - + ersky9x ersky9x - - er9x doesn't have Rotary Encoders - er9x saknar inställningshjul - - - - - ersky9x doesn't have Rotary Encoders - ersky9x saknar inställningshjul - - - - - Ersky9x doesn't accept this protocol - Er9x saknar inställningshjul - - - - - + + + Simulator for this firmware is not yet available Det finns ännu ingen simulator för denna typ av firmware - - - - - - - - - Open9x on this board doesn't have Rotary Encoders - Open9x for detta kort saknar inställningshjul - - - + + REa REa + REb REb - + Alt Höj @@ -5526,7 +3941,204 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Batt - + + + LS1 + LB1 + + + + + LS2 + LB2 + + + + + LS3 + LB3 + + + + + LS4 + LB4 + + + + + LS5 + LB5 + + + + + LS6 + LB6 + + + + + LS7 + LB7 + + + + + LS8 + LB8 + + + + + LS9 + LB9 + + + + + LSA + LBA + + + + + LSB + LBB + + + + + LSC + LBC + + + + + LSD + LBD + + + + + LSE + LBE + + + + + LSF + LBF + + + + + LSG + LBG + + + + + LSH + LBH + + + + + LSI + LBI + + + + + LSJ + LBJ + + + + + LSK + LBK + + + + + LSL + LBL + + + + + LSM + LBM + + + + + LSN + LBN + + + + + LSO + LBO + + + + + LSP + LBP + + + + + LSQ + LBQ + + + + + LSR + LBR + + + + + LSS + LBS + + + + + LST + LBT + + + + + LSU + LBU + + + + + LSV + LBV + + + + + LSW + LBW + + + + Input %1 + Filter %1 + + + CYC%1 CYC%1 @@ -5536,22 +4148,19 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga PPM%1 - - - + + THR GAS - - + RUD ROD - - + ELE HÖJ @@ -5571,26 +4180,23 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga ID2 - - + AIL SKE - - + GEA LAN - - + TRN TRN - + ON På @@ -5601,35 +4207,17 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Av - - - - er9x on this board doesn't have Rotary Encoders - er9x stödjer inte inställningshjul för detta sändarkort - - - - gruvin9x on this board doesn't have Rotary Encoders - gruvin9x stödjer inte inställningshjul för detta sändarkort - - - + Safety %1 Säkring %1 - - - open9x on this board doesn't have Rotary Encoders - open9x stödjer inte inställningshjul för detta sändarkort - - - + th9x on this board doesn't have Rotary Encoders th9x stödjer inte inställningshjul för detta sändarkort - + TrmR TrmR @@ -5648,48 +4236,6 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga TrmA TrmA - - - er9x doesn't have trims as source - er9x kan inte använda trimmar som källa - - - - - - er9x doesn't have swappable trims - er9x saknar trimmar som kan bytas ut - - - - - - er9x does not support this range for A1/A2 - er9x saknar stöd för angivet område för A1/A2 - - - - - - er9x does not support this telemetry units - er9x saknar stöd för denna telemetri-enhet - - - - - ersky9x doesn't have trims as source - ersky9x kan inte använda trimmar som källa - - - - gruvin9x doesn't have trims as source - gruvin9x kan inte använda trimmar som källa - - - - gruvin9x doesn't have swappable trims - gruvin9x saknar trimmar som kan bytas ut - Play Haptic @@ -5706,7 +4252,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Vario - + All För alla händelser @@ -5718,12 +4264,12 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Telemetri - + Play Value Spela Värde - + Cels Celsius @@ -5802,62 +4348,6 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Time Tid - - - er9x does not support Custom Switch function %1 - er9x stöder inte LB-funktionen %1 - - - - - Er9x doesn't support custom curves as curve%1, curve as been exported as fixed point - Er9x stöder inte specialkurvor som kurva %1. Kurvan har exporterats som en punktkurva - - - - - Er9x doesn't support curve with %1 point as curve%2 - Er9x stödjer inte %1-punktskurvor som kurva %2 - - - - - ersky9x does not support Custom Switch function %1 - ersky9x stöder inte LB-funktionen %1 - - - - - - - ErSky9x doesn't support custom curves as curve%1, curve as been exported as fixed point - ErSky9x stöder inte specialkurvor som kurva %1. Kurvan har exporterats som en punktkurva - - - - - - - ErSky9x doesn't support curve with %1 point as curve%2 - ErSky9x stödjer inte %1-punktskurvor som kurva %2 - - - - gruvin9x does not support Custom Switch function %1 - gruvin9x stöder inte LB-funktionen %1 - - - - - gruvin9x doesn't support custom curves as curve%1, curve as been exported as fixed point - gruvin9x stöder inte specialkurvor som kurva %1. Kurvan har exporterats som en punktkurva - - - - - gruvin9x doesn't support curve with %1 point as curve%2 - gruvin9x stödjer inte %1-punktskurvor som kurva %2 - No @@ -5904,22 +4394,12 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Belysning - - Diff - Diff - - - - Expo - Expo - - - + Own trim Egen trim - + Keys Knappar @@ -5934,36 +4414,18 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Knappar + Spakar - - + + Simultaneous usage of expo and curves is no longer supported Expo och pspecialkurva kan inte längre kombineras - - - - - This version of open9x does not support Custom Switch function %1 - Denna verion ov open9x stödjer inte LB-funktion %1 - - - - - - - - - open9x only accepts %1 points in all curves - open9x kan bara ha %1 punkter i kurvor - - - + Simultaneous usage of expo and curves is no longer supported in open9x Det går inte att använda Expo på en specialkurva i open9x - + Support for frsky telemetry mod Stöd för FrSky telemeri @@ -5988,7 +4450,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga - + @@ -5996,8 +4458,8 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Slå på helikoptermenyn och stöd för cyklisk mix - - + + @@ -6006,16 +4468,16 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Slå på menyn Mallar - - + + No splash screen Ingen startbild - - + + @@ -6024,16 +4486,16 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Slå av menyn för kurvor - - + + Support for radio modified with regular speaker Stöd för sändare modifierad med en vanlig högtalare - - + + @@ -6041,8 +4503,8 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Används om en röstmodul monterats i sändaren - - + + Used if you have modified your radio with haptic mode @@ -6054,8 +4516,8 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Stöd för FrSky PXX-protokoll - - + + @@ -6063,8 +4525,8 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Stöd för DSM2-moduler - - + + @@ -6073,8 +4535,8 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Justering av PPM-centrum i menyn för Gränser - - + + @@ -6083,8 +4545,8 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Symetriska Gränser - - + + @@ -6092,14 +4554,14 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Använd potentiometrar förr menyskrollning - - + + SmartieParts 2.2 Backlight support Stöd för belysning mha. SmartieParts v2.2 - - + + @@ -6108,16 +4570,16 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Använd brytarna för att ställa brytarvärden i menyer - - + + Enable resetting values by pressing up and down at the same time Slå på nollställning av värden genom att hålla ned upp- och ned-knappen samtidigt - - + + @@ -6126,8 +4588,8 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Använd inte grafiska kontroller - - + + @@ -6144,8 +4606,8 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Visa skrivning av modelldata - - + + @@ -6153,8 +4615,8 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga British Imperial Units - - + + @@ -6178,26 +4640,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Slå på helikoptermenyn och stöd för cyklisk mix - - th9x does not support Custom Switch function %1 - th9x stöder inte LB-funktionen %1 - - - - - - th9x doesn't support custom curves as curve%1, curve as been exported as fixed point - th9x stöder inte specialkurvor som kurva %1. Kurvan har exporterats som en punktkurva - - - - - - th9x doesn't support curve with %1 point as curve%2 - th9x stödjer inte %1-punktskurvor som kurva %2 - - - + CH%1%2 KN%1%2 @@ -6208,18 +4651,19 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga - + + GV%1 GV%1 - - + + --- ---- - + Rud Trim Rod.Trim @@ -6249,7 +4693,12 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Svenska - + + CH%1 + KN%1 + + + Background Music Bakgrundsmusik @@ -6259,32 +4708,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Paus i bakgrundsmusiken - - Adjust GV1 - Justera GV1 - - - - Adjust GV2 - Justera GV2 - - - - Adjust GV3 - Justera GV3 - - - - Adjust GV4 - Justera GV4 - - - - Adjust GV5 - Justera GV5 - - - + Delay %1 sec Fördröjning %1 s @@ -6294,33 +4718,29 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Varaktighet %1 s - + + Rotary Encoder + Inmatningshjul + + + Own value Eget värde - + + -GV%1 -GV%1 - - (-GV%1) - (-GV%1) - - - - (GV%1) - (GV%1) - - - + Support for telemetry easy board Stöd för TelemetryEZ-kort - + @@ -6336,8 +4756,8 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Blåtandsinterface - - + + S1 S1 @@ -6360,7 +4780,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga RS - + Batt Batt @@ -6406,12 +4826,12 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga - + No repeat Repetera ej - + %1 sec %1 sek @@ -6421,7 +4841,12 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Spela båda - + + Adjust GV%1 + Justera GV%1 + + + <font color=red><b>Inconsistent parameter</b></font> @@ -6443,12 +4868,17 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Öka: - + + Played once, not during startup + Spelas en gång, ej vid uppstart + + + %1s %1s - + Value Värde @@ -6468,7 +4898,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Ökning - + Yellow Gul @@ -6499,11 +4929,12 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga + None Ingen - + Imperial Imperial @@ -6558,7 +4989,17 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga : %1 Kanaler, %2msec Fördröjning - + + Flight modes(%1) + Flyglägen(%1) + + + + Flight mode(%1) + Flygläge(%1) + + + Rudder Sidroder @@ -6578,7 +5019,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Skevroder - + Rotary Encoder use in menus navigation Använd inmatningshjul för att navigera i menyer @@ -6589,7 +5030,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga - + @@ -6618,47 +5059,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga openTx för FrSky Taranis - - SA - SA - - - - SB - SB - - - - SC - SC - - - - SD - SD - - - - SE - SE - - - - SF - SF - - - - SG - SG - - - - SH - SH - - - + SWR SWR @@ -6673,199 +5074,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga - - - CS1 - LB1 - - - - - CS2 - LB2 - - - - - CS3 - LB3 - - - - - CS4 - LB4 - - - - - CS5 - LB5 - - - - - CS6 - LB6 - - - - - CS7 - LB7 - - - - - CS8 - LB8 - - - - - CS9 - LB9 - - - - - CSA - LBA - - - - - CSB - LBB - - - - - CSC - LBC - - - - - CSD - LBD - - - - - CSE - LBE - - - - - CSF - LBF - - - - - CSG - LBG - - - - - CSH - LBH - - - - - CSI - LBI - - - - - CSJ - LBJ - - - - - CSK - LBK - - - - - CSL - LBL - - - - - CSM - LBM - - - - - CSN - LBN - - - - - CSO - LBO - - - - - CSP - LBP - - - - - CSQ - LBQ - - - - - CSR - LBR - - - - - CSS - LBS - - - - - CST - LBT - - - - - CSU - LBU - - - - - CSV - LBV - - - - - CSW - LBW - - - + ONE ONE @@ -6895,31 +5104,43 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga REAl - - er9x doesn't have negative gvars as weight - er9x kan inte använda negativa gvar-värden som vikter + + Diff(%1) + Diff(%1) - - er9x doesn't have negative gvars as offset - er9x kan inte använda negativa gvar-värden som offset + + Expo(%1) + Expo(%1) - - - - - Flight modes settings on expos not exported - Flygmod-inställningar för expos stöds inte + + Function(%1) + Funktion(%1) - + + Curve(%1) + Kurva(%1) + + + + !Curve(%1) + !Kurva(%1) + + + FM%1 FM%1 - + + Input%1 + Filter%1 + + + English Engelska @@ -6959,97 +5180,74 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Portugisiska - - CH - KN - - - + !Flight mode %1 - !Flygmod %1 + !Flygläge %1 Flight mode %1 - Flygmod %1 + Flygläge %1 - + Flight mode %1 trim Fligmod %1 trim - + Flight mode %1 value - Flygmod %1 värde + Flygläge %1 värde - - - Flight Mode 0 (Default) - Flygmod 0 (Default) - - - - - FM %1 - FM %1 - - - + openTx only accepts %1 points in all curves openTX accepterar bar %1 punkter i alla kurvor - + OpenTX on this board doesn't accept this function OpenTX stödjer inte funktionen för den aktuella hårdvaran - - + + OpenTX doesn't accept this protocol OpenTX accepterar inte detta protokoll - + OpenTX doesn't allow this number of channels OpenTX accepterar inte detta antal kanaler - - - Flight mode settings on mixers not exported - Flygmod-inställningar för expos stöds inte - - - + Your radio probably uses a wrong firmware, eeprom size is 4096 but only the first 2048 are used Din sändare har antagligen laddats med felaktig programvara. eeprom-storleken är 4096, men enbart den första hälften används - + Support for MAVLINK devices Stöd för MAVLINK-enheter - + No flight modes - Inga flygmoder + Inga flyglägen - - + + @@ -7058,8 +5256,8 @@ eeprom-storleken är 4096, men enbart den första hälften användsVälj automatisk kontroller i menyn för modelinställningar genom att använda dem - - + + @@ -7070,44 +5268,49 @@ eeprom-storleken är 4096, men enbart den första hälften användsAnvänd SQT5-typsnittet - - + + Enable the throttle trace in Statistics Slå på gasspårning i statistiken - + EEprom write progress bar Grafisk visning av skrivning till eeprom - + No Winged Shadow How High support Inget stöd för Winged Shadow How High - - + + No vario support Vario stöds ej - - + + No GPS support GPS-stöd saknas - - + + No gauges in the custom telemetry screen Inga mätare i på telemetri-skärmen - + + Allow compensating for offset errors in FrSky FAS current sensors + Tillåt justering av offsett-fel i FrSkys FAS ström-sensorer + + + openTx for 9XR openTX för 9XR @@ -7145,18 +5348,7 @@ eeprom-storleken är 4096, men enbart den första hälften användsopenTX för FrSky Taranis Rev 4a - - - - - - - - Flight modes settings on mixers not exported - Mixerinställningar för flygmoder exporteras inte - - - + Possibility to enable FAI MODE at field Möjlighet att slå på FAI-LÄGE före pflygning @@ -7167,16 +5359,644 @@ eeprom-storleken är 4096, men enbart den första hälften används - Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next openTX/C9x funding model. + Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next OpenTX/Companion funding model. -We are really sensible to that! +We are really appreciative for that! -The openTX/C9X Team. - Tack för alla donationer, vänliga meddelanden, goda idéer och konstruktiva förslag för att bekosta fortsatt utveckling av openTX/companion9x +The OpenTX/Companion Team. + Tack för alla donationer, vänliga meddelanden, goda idéer och konstruktiva förslag för att bekosta fortsatt utveckling av OpenTX/Companion -Vi uppkskattar ert stöd! +Vi uppskattar ert stöd! -Gruppen bakum openTX/companion9X. +Gruppen bakom OpenTX/Companion. + + + + Setup + + + Form + Form + + + + Model Name + Modellnamn + + + + Timer2 + Timer2 + + + + Timer1 + Timer1 + + + + Throttle Source + Gas-kontroll + + + + Switch startup Warning + Brytarvarning vid start + + + + Center beep + Centrumpip + + + + Trim Increment + Trimsteg + + + + ON + På + + + + OFF + Av + + + + Check + Kontrollera + + + + Model Image + Modell-ikon + + + + Exponential + Exponentiella + + + + Extra Fine + Extrafina + + + + Fine + Fina + + + + Medium + Medium + + + + Coarse + Grova + + + + Extended Limits + Utökade gränser + + + + Extended Trims + Utökade trimmar + + + + Throttle Trim + Gastrim + + + + Throttle Warning + Gas-varning + + + + Reverse throttle operation. +If this is checked the throttle will be reversed. Idle will be forward, trim will also be reversed and the throttle warning will be reversed as well. + + + Inverterad gas. +Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och gasvarning reverseras också. + + + + + + Reverse Throttle + Inverterad gas + + + + Telemetry + + + Form + Form + + + + + + + A1 + A1 + + + + + + + A2 + A2 + + + + RSSI + RSSI + + + + Alarm 1 + Alarm 1 + + + + + ---- + ---- + + + + + Yellow + Gul + + + + + Orange + Orange + + + + + Red + Röd + + + + Alarm 2 + Alarm 2 + + + + Serial Protocol + Serieprotokoll + + + + Volt source + Volt-källa + + + + Metric + Metriska + + + + Imperial + Imperial + + + + Current source + Ström-källa + + + + Protocol + Protokoll + + + + NONE + Inget + + + + + FAS + FAS + + + + None + Ingen + + + + FrSky Sensor Hub + FrSky Sensor-hub + + + + CEL + BAT + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + Units + Enheter + + + + Blades + Blad + + + + Altimetry / Vario + Höjdmätare / Vario + + + + Alti + Höjd + + + + Alti+ + Höjd+ + + + + Vario + Vario + + + + Sink Max + Sjunk Max + + + + Off + Av + + + + Climb Max + Höj Max + + + + Sink Min + Sjunk Min + + + + Climb Min + Höj Min + + + + Vario source + Vario-källa + + + + Vario limits + Vario-gränser + + + + Use GPS as altitude source + Använd GPS som höjdmätare + + + + Display altitude in toolbar + Visa höjden i verktygslisten + + + + Various + Diverse + + + + mAh count + mAh-antal + + + + FAS Offset + FAS-offset + + + + Persistent mAh + Bestående mAh + + + + Telemetry screen 1 + Telemetriskärm 1 + + + + + + Custom Screen Type + Visa data som + + + + + + Nums + Nummer + + + + + + Bars + Staplar + + + + + + Source + Källa + + + + + + Min + Min + + + + + + Gauge + Mätare + + + + + + Max + Max + + + + + + Gauge 1 + Mätare 1 + + + + + + Gauge 2 + Mätare 2 + + + + + + Gauge 3 + Mätare 3 + + + + + + Gauge 4 + Mätare 4 + + + + Telemetry screen 2 + Telemetriskärm 2 + + + + Telemetry screen 3 + Telemetriskärm 3 + + + + TelemetryAnalog + + + Form + Form + + + + Unit + Enhet + + + + Max Value + Maxvärde + + + + Alarm 1 + Alarm 1 + + + + + ---- + ---- + + + + + Yellow + Gul + + + + + Orange + Orange + + + + + Red + Röd + + + + + < + < + + + + + > + > + + + + Alarm 2 + Alarm 2 + + + + Min Value + Minvärde + + + + Volts (V) + Volt (V) + + + + Amps (A) + Ampere (A) + + + + Speed (m/s or ft/s) + Hastighet (m/s eller ft/s) + + + + Raw (-) + Rå (-) + + + + Speed (km/h or miles/h) + Hastighet (Km/h eller miles/h) + + + + Meters (m or ft) + Meter (m eller ft) + + + + Temp (°) + Temp (°) + + + + Fuel (%) + Tank (%) + + + + mAmps (mA) + mAmpere (mA) + + + + Range + Räckvidd + + + + TelemetryPanel + + + Winged Shadow How High + Winged Shadow How High + + + + Winged Shadow How High (not supported) + Winged Shadow How High (stöds ej) + + + + Timer + + + Form + Form + + + + mm:ss + mm:ss + + + + Countdown + Nedräkning + + + + MinuteBeep + Minutpip + + + + Persistent + Bestående + + + + (00:00:00) + (00:00:00) + + + + TimerPanel + + + None + Ingen + + + + Beeps + Pip + + + + Countdown + Nedräkning @@ -7444,18 +6264,12 @@ OBS. Fyll enbart i detta fällt om du är säker på vad du gör. Ingen kontroll Sökväg till AVRDUDE - + Select Location Välj sökväg - - - - companion9x - companion9x - @@ -7473,7 +6287,7 @@ m2560 for v4.1 boards m2560 för v4.1-kort - + <b><u>WARNING!</u></b><br>This will reset the fuses of %1 to the factory settings.<br>Writing fuses can mess up your radio.<br>Do this only if you are sure they are wrong!<br>Are you sure you want to continue? <b><u>VARNING!</u></b><br>Detta åerställer säkringarna för %1 till deras ursprungliga värden.<br>Att ändra dessa värden kan skapa allvarliga problem med din sändare.<br>Ändra säkringarna bara om du är helt säker på att de har fel värde!<br>Är du säker på att du vill fortsätta? @@ -7526,7 +6340,7 @@ m2560 för v4.1-kort Använd avancerade kontroller - + <b><u>WARNING!</u></b><br>Normally CPU type is automatically selected according to the chosen firmware.<br>If you change the CPU type the resulting eeprom could be inconsistent. <b><u>VARNING!</u></b><br>I vanliga fall väljs CPU-typ utgående från den programvara som valts för skrivning.<br>Om du ändrar CPU-typ så kan resultetet bli ett ogiltigt eeprom. @@ -7536,7 +6350,7 @@ m2560 för v4.1-kort Inställningar för Programmerare - + DFU-UTIL Configuration Inställningar för DFU-UTIL @@ -7550,6 +6364,12 @@ m2560 för v4.1-kort AVRDUDE Configuration Inställningar för AVRDUDE + + + + Companion + Companion + burnDialog @@ -7569,7 +6389,12 @@ m2560 för v4.1-kort Subversion - + + Allows Companion to write to older version of the firmware + Tillåter Companon att skriva till äldre firmware-versioner + + + Load Image Ladda Bild @@ -7590,7 +6415,7 @@ m2560 för v4.1-kort - + Write to TX Skriv till sändaren @@ -7615,18 +6440,18 @@ m2560 för v4.1-kort Avbryt - + Write firmware to TX Skriv firmware till sändaren - + Open Öppna - - + + @@ -7635,12 +6460,12 @@ m2560 för v4.1-kort Varning - + Burn anyway ! Starta bränningen! - + Open Image to load Öppna bilden som skall laddas @@ -7650,13 +6475,13 @@ m2560 för v4.1-kort Bilder (%1) - + - - + + - + @@ -7664,30 +6489,30 @@ m2560 för v4.1-kort Fel - + Write Models and Settings to TX Skriv Modeller och Inställningar till sändaren - + Write Models and Settings in %1 to TX Skriv Modeller och Inställningar från %1 till sändaren - + Choose file to load Models and Settings from Välj fil att ladda Modeller och Inställningar från - + - + Invalid binary Models and Settings File %1, Proceed anyway ? Ogiltig binärfil med Modeller och Inställningar: %1. Fortsätt i alla fall ? - + Cannot load %1. Det går inte att ladda %1. @@ -7717,7 +6542,7 @@ m2560 för v4.1-kort Felaktig information i profilen, sändarens inställningar kunde inte läsas in - + %1 is not a known firmware %1 är inte en fimware-fil @@ -7743,17 +6568,12 @@ m2560 för v4.1-kort - + Browse for file Välj fil - - Allows companion9x to write to older version of the firmware - Tillåter companon9x att skriva till äldre firmware-versioner - - - + Backup and restore Models and Settings Säkerhetskopiera Modeller och Inställningar @@ -7763,19 +6583,19 @@ m2560 för v4.1-kort Nuvarande Profil - + Current profile Nuvarande profil - + Unable to find file %1! Kan inte hitta filen %1 ! - - + + Error opening file %1: %2. Fel vid öppning av filen %1: @@ -7789,7 +6609,7 @@ m2560 för v4.1-kort %2. - + Cannot write file %1: %2. @@ -7938,11 +6758,11 @@ m2560 för v4.1-kort - - - - - + + + + + @@ -7950,7 +6770,7 @@ m2560 för v4.1-kort Brytare - + IN IN @@ -7970,33 +6790,33 @@ m2560 för v4.1-kort - - - + + + Offset Offset - + - + Min Min - + - + Max Max - + Invert @@ -8007,13 +6827,13 @@ m2560 för v4.1-kort - - + + CH KN - + INV INV @@ -8031,64 +6851,42 @@ m2560 för v4.1-kort - + Weight Vikt - - - Expo - Expo - - - - - - - + Curve Kurva - + Mixers Mixar - + noTrim ingenTrim - - - FMTrim - FMTrim - - - - - Diff - Diff - - - - + + Delay(u%1:d%2) Fördröjning(u%1:d%2) - - + + Slow(u%1:d%2) Tröghet(u%1:d%2) - - + + Warn Varn @@ -8116,12 +6914,7 @@ m2560 för v4.1-kort 9-punktskurva - - Custom Switches - Logiska Brytare - - - + Function Funktion @@ -8201,7 +6994,23 @@ m2560 för v4.1-kort Värde - + + Logical Switches + Logiska Brytare + + + + + LS + LB + + + + Switch Assignment + BrytarEffekter + + + RSSI Alarm RSSI-alarm @@ -8241,27 +7050,21 @@ m2560 för v4.1-kort Välj PDF-fil att skriva till - + No name Inget namn - + + + - - DISABLED INAKTIV - - - CS - LB - - - + Param Param @@ -8273,7 +7076,7 @@ m2560 för v4.1-kort Slå på - + Gvars Gvars @@ -8296,12 +7099,7 @@ m2560 för v4.1-kort GV - - Custom Functions - Specialfunktioner - - - + Repeat Upprepa @@ -8312,9 +7110,9 @@ m2560 för v4.1-kort Säkerhetsbrytare - + Flight modes Settings - Inställningar för flygmod + Inställningar för flyglägen @@ -8322,7 +7120,7 @@ m2560 för v4.1-kort Flight mode name - Namn för flygmod + Namn för flygläget @@ -8339,20 +7137,20 @@ m2560 för v4.1-kort FM - + + + - - Flight modes - Flygmoder + Flyglägen - + + + - - Flight mode - Flygmod + Flygläge @@ -8363,41 +7161,37 @@ m2560 för v4.1-kort Dialog - + People who have contributed to this project De som har bidragit till detta projekt - + Coders Programmerare - - Honors go to Rafal Tomczak (RadioClone) and Thomas Husterer (th9x) -of course. Also to Erez Raviv (er9x) and it's fantastic eePe, from which -companion9x was forked out. - All heder åt Rafal Tomczak (RadioClone) och Thomas Husterer (th9x) naturligtvis. -Dessutom till Erez Raviv (er9x) och dess fantastiska eePe, från vilken -companion9x grenades av. + + Companion Release Notes + Companion Release Notes - + Thank you all !!! Tack till er alla !!! - + + Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe) + All ära åt Rafal Tomczak (RadioClone), Thomas Husterer (th9x) och Erez Raviv (er9x and eePe) + + + Contributors Bidragande - - Companion9x Release Notes - Companion9x Release Notes - - - + OpenTX Release Notes OpenTX Release Notes @@ -8435,37 +7229,37 @@ companion9x grenades av. Öppna bildbibliotek - - + + Select an original firmware file Välj original-firmware - + Open Öppna - + Select an image to customize your splash <br />or save actual firmware splash Välj vilken bild som skall visas när sändaren slås på<br/>eller spara bilden som finns i firmware - + Error Fel - + Could not find bitmap to replace in file Det finns ingen bild att byta i firmware-filen - + Open Image to load Öppna bild för laddning @@ -8531,7 +7325,7 @@ p, li { white-space: pre-wrap; } <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> - + Save Firmware Spara Firmware @@ -8550,8 +7344,8 @@ p, li { white-space: pre-wrap; } - companion9x - companion9x + Companion + Companion @@ -8931,8 +7725,8 @@ Tryck på Avbryt för att avburyta kalibreringen logsDialog - Companion9x log viewer - Companion9x loggläsare + Companion Log Viewer + Companion Logg-läsare @@ -8945,7 +7739,7 @@ Tryck på Avbryt för att avburyta kalibreringen Öppna Loggfil - + Zoom Zoom @@ -8960,7 +7754,7 @@ Tryck på Avbryt för att avburyta kalibreringen Y - + Telemetry logs Telemetriloggar @@ -8970,7 +7764,19 @@ Tryck på Avbryt för att avburyta kalibreringen Tid - + + Error + Fel + + + + Cannot write file %1: +%2. + Filen %1 kunde inte skrivas: +%2. + + + Select your log file Välj loggfil @@ -8980,7 +7786,7 @@ Tryck på Avbryt för att avburyta kalibreringen Tillgängliga fält - + The selected logfile contains %1 invalid lines out of %2 total lines Denn aktuella filen innehåller %1 felaktiga rader. Totalt innehåller filen %2 rader @@ -8993,7 +7799,7 @@ Tryck på Avbryt för att avburyta kalibreringen mdiChild - + Simulate Tx Simulera sändare @@ -9443,33 +8249,28 @@ Tryck på Avbryt för att avburyta kalibreringen Inställningar - + Language (requires restart) Språk (kräver omstart) - - Show Splash Screen - Visa bild vid start av sändare - - - + Recent History Size Loggstorlek - + Download Nedladdning - + Default Channel Order Kanalordning - + Channel order This is used by the templated to determine which channel goes to what number output. @@ -9478,7 +8279,12 @@ This is used by the templated to determine which channel goes to what number out Detta används av mallen för att koppla kanal till output-nummer. - + + Show Splash At Start + Visa Startbild + + + Default Stick Mode Spaktilldelning @@ -9544,51 +8350,117 @@ Mode 4: Mode 4 (SKE GAS HÖJ ROD) - + Automatic Backup Folder Säkerhetskopiera till folder - + Firmware Firmware - + + Theme + Tema + + + + + Requires restart + Kräver omstart + + + + Classic + Klassiskt + + + + Monochrome + Monokromt + + + + MonoWhite + Monokromt Vitt + + + + MonoBlue + Monokromt Blått + + + + Icon size + Ikonstorlek + + + + Small + Liten + + + + Normal + Normal + + + + Big + Stor + + + + Huge + Enorm + + + + Find Executable + Sök Program + + + + Google Earth Executable + Sökväg till Google Earth + + + Check for updates on startup Sök efter uppdateringar vid start - - + + ... ... - + Splash library behaviour Beteende för bildbibliotek - + Personal splash library Personligt bildbibliotek - + Joystick Joystick - - - - + + + + Open Folder Öppna katalog - + @@ -9634,12 +8506,12 @@ Mode 4: Kryssruta - + Check for updates Sök efter uppdateringar - + Blue Blu Blå @@ -9665,7 +8537,7 @@ Mode 4: Gul - + Enable Slå på @@ -9675,48 +8547,43 @@ Mode 4: Kalibrera - + Open Image Öppna bild - + Invert Pixels Invertera bild - + FwInfo Firmware-info - + Last downloaded release: %1 Senast nedladdade release: %1 - - The selected firmware has never been downloaded by companion9x. - Firmware-filen har aldrig laddats ned av companion9x. - - - - The selected firmware cannot be downloaded by companion9x. - Firmware-filen kan inte laddas ned av companion9x. - - - - + + No joysticks found Ingen joystick hittades - + Select your Models and Settings backup folder Välj folder för automatisk säkerhetskopiering - + + Select Google Earth executable + Sökväg till Google Earth + + + Open Image to load Öppna bild för laddning @@ -9726,24 +8593,34 @@ Mode 4: Bilder (%1) - - + + Error Fel - - + + The selected firmware has never been downloaded by Companion. + Firmware-filen har aldrig laddats ned av Companion. + + + + The selected firmware cannot be downloaded by Companion. + Firmware-filen kan inte laddas ned av Companion. + + + + Cannot load %1. %1 kunde inte laddas. - + Image stored in settings Bilden lagras i inställningar - + Include companion splashes Användarens bilder och companion-bilder @@ -9753,22 +8630,22 @@ Mode 4: Enbart användarens bilder - + Custom TX splash screen Egen uppstartsbild - + Ask for flashing after Download Fråga om skrivning efter Nedladdning - + Language Språk - + Profile Name Profilnamn @@ -9778,12 +8655,12 @@ Mode 4: Spara Profil - + Profile slot Profilplats - + auto backup before write säkerhetskopiera innan skrivning @@ -9793,7 +8670,7 @@ Mode 4: Välj bibliotekskatalog - + Export Profile Exportera Profil @@ -9803,7 +8680,7 @@ Mode 4: Importera Profil - + Automatically add version number to the filename after download Lägg automatiskt till ett versionsnummer till filnamnet @@ -9820,7 +8697,7 @@ May be different from firmware language Får skilja från språket för mjukvaran - + Export profile As Exportera profil som @@ -9835,52 +8712,52 @@ Får skilja från språket för mjukvaran Öppna profil för import - + Simu BackLight Simulatorbelysning - + Processor ID Processortyp - + Simulator capture folder Katalog för simulator-data - + Use clipboard only Använd bara clipboard - + Select your snapshot folder Välj katalog för snapshots - + Profile name is empty, profile slot %1 will be deleted.<br>Are you sure ? Profilnamn saknas, profilplats %1 kommer att raderas.<br> Är du säker? - + Check for selected Fw updates Sök efter updatering av vald FW - + Ask use of wizard for new models Använd modell-guiden för nya modeller - + Remember switches in simulator Minns brytare i simulator - + SD Structure path Sökväg till SD-struktur @@ -9919,14 +8796,14 @@ Får skilja från språket för mjukvaran - + Name Namn - + printed on: %1 Utskriven: %1 @@ -9968,12 +8845,12 @@ Får skilja från språket för mjukvaran - + Enabled Aktiv - + Disabled Inaktiv @@ -10004,7 +8881,7 @@ Får skilja från språket för mjukvaran Centrumpip - + Delay(u%1:d%2) Fördröjning(u%1:d%2) @@ -10014,42 +8891,56 @@ Får skilja från språket för mjukvaran Tröghet(u%1:d%2) - - - + pt %1 pt %1 - + + Logical Switches + Logiska Brytare + + + + + LS + LB + + + + Switch Assignments + BrytarEffekter + + + Source Källa - - + + - + Offset Offset - + Function Funktion - - - - - + + + + + Switch Brytare - + IN IN @@ -10064,50 +8955,33 @@ Får skilja från språket för mjukvaran Viktning - - - - - Expo - Expo - - - - - - - + Curve Kurva - + Mixers Mixar - + - + CH KN - + noTrim ingenTrim - - FMTrim - FMTrim - - - + Warn Varn @@ -10120,20 +8994,20 @@ Får skilja från språket för mjukvaran - + Min Minimum - + - + Max Maximum - + Invert @@ -10159,28 +9033,13 @@ Får skilja från språket för mjukvaran Kurvor - - 5 Points Curves - 5-punktskurva - - - - 9 Points Curves - 9-punktskurva - - - - Custom Switches - Logiska Brytare - - - + Safety Switches Säkerhetsbrytare - + @@ -10188,17 +9047,7 @@ Får skilja från språket för mjukvaran Värde - - Function Switches - Brytarfunktioner - - - - CF - CF - - - + Telemetry Settings Inställningar för Telemetri @@ -10276,17 +9125,12 @@ Får skilja från språket för mjukvaran Välj PDF-fil att skriva till - + OUT UT - - Diff - Diff - - - + A%1 A%1 @@ -10307,24 +9151,18 @@ Får skilja från språket för mjukvaran Egna inställning av telemetriskärmen - - + + DISABLED INAKTIV - - - CS - LB - - - + Parameter Parameter - + Gvars Gvars @@ -10334,7 +9172,7 @@ Får skilja från språket för mjukvaran Inm.Hjul. - + Global Variables Globala Variabler @@ -10344,19 +9182,19 @@ Får skilja från språket för mjukvaran GV - + Repeat Upprepa - + Flight modes Settings - Inställningar för flygmod + Inställningar för flyglägen Flight mode name - Namn på flygmode + Namn på flygläget @@ -10367,19 +9205,19 @@ Får skilja från språket för mjukvaran FM - - + + Flight modes - Flygmoder + Flyglägen - - + + Flight mode - Flygmod + Flygläge - + ODF files (*.odt);;PDF Files(*.pdf);;HTML-Files (*.htm *.html);;All Files (*) ODF filer (*.odt);;PDF Filer(*.pdf);;HTML-Filer (*.htm *.html);;Alla Filer (*) @@ -10387,13 +9225,7 @@ Får skilja från språket för mjukvaran simulatorDialog - - Companion9x Simulator - ER9x Simulator - Companion 9x Simulator - - - + P1 P1 @@ -10498,7 +9330,12 @@ Får skilja från språket för mjukvaran Höger dubbelklick nollställer - + + Companion Simulator + Companion Simulator + + + 9x Simulator Simulator för 9x @@ -10814,13 +9651,13 @@ Får skilja från språket för mjukvaran splashLibrary - - + + ... ... - + Splash Library - page %1 of %2 Bildbibliotek - Sida %1 av %2 @@ -10848,12 +9685,7 @@ Får skilja från språket för mjukvaran xsimulatorDialog - - Companion9x Simulator - Companion 9x-Simulator - - - + SE SE @@ -10923,7 +9755,12 @@ Får skilja från språket för mjukvaran SG - + + Companion Simulator + Companion Simulator + + + SD SD @@ -11056,7 +9893,7 @@ Får skilja från språket för mjukvaran Joysticken kan inte hittas. Joysticken stängs av - + Firmware %1 error: %2 Firmware %1 fel: %2 diff --git a/companion/src/version.h.in b/companion/src/version.h.in index cbd6b87f2..e0770040e 100644 --- a/companion/src/version.h.in +++ b/companion/src/version.h.in @@ -1,3 +1,2 @@ #define C9X_VERSION "@C9X_VERSION@" -#define C9X_REVISION @C9X_WC_REVISION@ diff --git a/companion/src/warnings.h b/companion/src/warnings.h index 2f18a736d..c8fb4753e 100644 --- a/companion/src/warnings.h +++ b/companion/src/warnings.h @@ -2,7 +2,7 @@ #define WARNINGS_H #define WARNING_LEVEL 0 #define WARNING_ID 6 -#define WARNING QObject::tr("Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next openTX/C9x funding model.\n\nWe are really sensible to that!\n\nThe openTX/C9X Team.") +#define WARNING QObject::tr("Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next OpenTX/Companion funding model.\n\nWe are really appreciative for that!\n\nThe OpenTX/Companion Team.") #endif /* WARNINGS_H */ diff --git a/companion/src/xmlinterface.cpp b/companion/src/xmlinterface.cpp index 67d8be5ce..b3514383d 100644 --- a/companion/src/xmlinterface.cpp +++ b/companion/src/xmlinterface.cpp @@ -91,8 +91,6 @@ void saveGeneralSettings(GeneralSettings & settings, global_settings & gs) gs.warnings(warns); gs.beeper(settings.beeperMode); sticks stks(settings.stickMode); - if (settings.throttleReversed) - stks.throttle_reverse(true); gs.sticks(stks); gs.inactivity_timer(settings.inactivityTimer); if (settings.minuteBeep || settings.preBeep || settings.flashBeep) { @@ -195,7 +193,7 @@ bool XmlInterface::save(RadioData &radioData) // the models models xml_models; models::model_sequence & model_sequence (xml_models.model()); - for (int i=0; isetupUi(this); ui->lcd->setFocus(); - QSettings settings("companion9x", "companion9x"); + QSettings settings; ui->lcd->setBackgroundColor(47, 123, 227); setupSticks(); resize(0, 0); // to force min height, min width @@ -179,7 +179,7 @@ void xsimulatorDialog::setupTimer() void xsimulatorDialog::onButtonPressed(int value) { if (value==Qt::Key_Print) { - QSettings settings("companion9x", "companion9x"); + QSettings settings; bool toclipboard=settings.value("snapshot_to_clipboard", false).toBool(); QString fileName =""; if (!toclipboard) { @@ -194,12 +194,13 @@ void xsimulatorDialog::onButtonPressed(int value) void xsimulatorDialog::onTimerEvent() { static unsigned int lcd_counter = 0; + if (!simulator->timer10ms()) { - QMessageBox::critical(this, "companion9x", QString(tr("Firmware %1 error: %2")).arg(txInterface->getName()).arg(simulator->getError())); + QMessageBox::critical(this, "companion", tr("Firmware %1 error: %2").arg(txInterface->getName()).arg(simulator->getError())); timer->stop(); return; } - + getValues(); if (g_modelIdx >= 0) { diff --git a/companion/src/xsimulatordialog.h b/companion/src/xsimulatordialog.h index 3d2e5a958..a78143fc7 100644 --- a/companion/src/xsimulatordialog.h +++ b/companion/src/xsimulatordialog.h @@ -2,7 +2,7 @@ #define XSIMULATORDIALOG_H #include -#include "node.h" +#include "modeledit/node.h" #include "eeprominterface.h" #ifdef JOYSTICKS #include "joystick.h" diff --git a/companion/src/xsimulatordialog.ui b/companion/src/xsimulatordialog.ui index d2bc64bfe..4a5454c5d 100644 --- a/companion/src/xsimulatordialog.ui +++ b/companion/src/xsimulatordialog.ui @@ -23,11 +23,11 @@ - Companion9x Simulator + Companion Simulator - - :/images/simulate.png:/images/simulate.png + + :/icon.png:/icon.png @@ -3900,7 +3900,7 @@ border-radius: 4px; - + diff --git a/companion/targets/windows/companion9x-msys.nsi.in b/companion/targets/windows/companion-msys.nsi.in similarity index 80% rename from companion/targets/windows/companion9x-msys.nsi.in rename to companion/targets/windows/companion-msys.nsi.in index ed7bf33fb..3b38bb303 100644 --- a/companion/targets/windows/companion9x-msys.nsi.in +++ b/companion/targets/windows/companion-msys.nsi.in @@ -1,186 +1,186 @@ -;NSIS Modern User Interface -;Start Menu Folder Selection Example Script -;Written by Joost Verburg - -;-------------------------------- -;Include Modern UI - - !include "MUI2.nsh" - !include "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\FileAssociation.nsh" - -;-------------------------------- -;General - - ;Name and file - Name "companion9x" - OutFile "companion9xInstall_v@C9X_VERSION@.exe" - - ;Default installation folder - InstallDir "$PROGRAMFILES\companion9x" - - ;Get installation folder from registry if available - InstallDirRegKey HKCU "Software\companion9x" "" - - ;Compressor options - SetCompressor /FINAL /SOLID lzma - SetCompressorDictSize 64 - - ;Request application privileges for Windows Vista - RequestExecutionLevel admin - -;-------------------------------- -;Variables - - Var StartMenuFolder - -;-------------------------------- -;Interface Settings - - !define MUI_ABORTWARNING - -;-------------------------------- -;Pages - - !insertmacro MUI_PAGE_LICENSE "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt" - !insertmacro MUI_PAGE_COMPONENTS - !insertmacro MUI_PAGE_DIRECTORY - - ;Start Menu Folder Page Configuration - !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU" - !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\companion9x" - !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" - - !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder - - !insertmacro MUI_PAGE_INSTFILES - - # These indented statements modify settings for MUI_PAGE_FINISH - !define MUI_FINISHPAGE_NOAUTOCLOSE - !define MUI_FINISHPAGE_RUN - !define MUI_FINISHPAGE_RUN_CHECKED - !define MUI_FINISHPAGE_RUN_TEXT "Launch companion9x" - !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink" - # !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED - # !define MUI_FINISHPAGE_SHOWREADME $INSTDIR\readme.txt - !insertmacro MUI_PAGE_FINISH - - !insertmacro MUI_UNPAGE_CONFIRM - !insertmacro MUI_UNPAGE_INSTFILES - -;-------------------------------- -;Languages - - !insertmacro MUI_LANGUAGE "English" - !insertmacro MUI_LANGUAGE "French" - -;-------------------------------- -;Installer Sections - -Section "companion9x" SecDummy - - SetOutPath "$INSTDIR" - - File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt" - File "companion9x.exe" - File "C:\Programs\xerces\src\.libs\libxerces-c-3-1.dll" - File "C:\MinGW\bin\libgcc_s_dw2-1.dll" - File "C:\MinGW\bin\mingwm10.dll" - File "C:\MinGW\bin\libstdc++-6.dll" - File "@QT_BINARY_DIR@\QtCore4.dll" - File "@QT_BINARY_DIR@\QtGui4.dll" - File "@QT_BINARY_DIR@\QtXml4.dll" - File "@QT_BINARY_DIR@\QtNetwork4.dll" - File "@QT_BINARY_DIR@\Phonon4.dll" - File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.exe" - File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.conf" - File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\libusb0.dll" - File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\dfu-util.exe" - - CreateDirectory "$INSTDIR\lang" - SetOutPath "$INSTDIR\lang" - File "*.qm" - - SetOutPath "$INSTDIR" - ;Store installation folder - WriteRegStr HKCU "Software\companion9x" "" $INSTDIR - - ;Associate with extentions ,bin and .hex - ${registerExtension} "$INSTDIR\companion9x.exe" ".bin" "BIN_File" - ${registerExtension} "$INSTDIR\companion9x.exe" ".hex" "HEX_File" - ${registerExtension} "$INSTDIR\companion9x.exe" ".companion9x" "EEPE_File" - ${registerExtension} "$INSTDIR\companion9x.exe" ".eepm" "EEPM_File" - - - ;Create uninstaller - WriteUninstaller "$INSTDIR\Uninstall.exe" - - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - - ;Create shortcuts - CreateDirectory "$SMPROGRAMS\$StartMenuFolder" - CreateShortCut "$SMPROGRAMS\$StartMenuFolder\companion9x.lnk" "$INSTDIR\companion9x.exe" - CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe" - - !insertmacro MUI_STARTMENU_WRITE_END - -SectionEnd - -;-------------------------------- -;Descriptions - - ;Language strings - LangString DESC_SecDummy ${LANG_ENGLISH} "companion9x EEPROM editor." - LangString DESC_SecDummy ${LANG_FRENCH} "companion9x editeur d'EEPROM" - - ;Assign language strings to sections - !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy) - !insertmacro MUI_FUNCTION_DESCRIPTION_END - -;-------------------------------- -;Uninstaller Section - -Section "Uninstall" - - ;ADD YOUR OWN FILES HERE... - - Delete "$INSTDIR\license.txt" - Delete "$INSTDIR\companion9x.exe" - Delete "$INSTDIR\libxerces-c-3-1.dll" - Delete "$INSTDIR\libgcc_s_dw2-1.dll" - Delete "$INSTDIR\mingwm10.dll" - Delete "$INSTDIR\libstdc++-6.dll" - Delete "$INSTDIR\QtCore4.dll" - Delete "$INSTDIR\QtGui4.dll" - Delete "$INSTDIR\QtNetwork4.dll" - Delete "$INSTDIR\Phonon4.dll" - Delete "$INSTDIR\QtXml4.dll" - Delete "$INSTDIR\avrdude.exe" - Delete "$INSTDIR\avrdude.conf" - Delete "$INSTDIR\libusb0.dll" - Delete "$INSTDIR\dfu-util.exe" - Delete "$INSTDIR\Uninstall.exe" - - Delete "$INSTDIR\lang\*.*" - - RMDir "$INSTDIR\lang" - RMDir "$INSTDIR" - - ${unregisterExtension} ".bin" "BIN File" - ${unregisterExtension} ".hex" "HEX File" - ${unregisterExtension} ".eepm" "EEPE File" - ${unregisterExtension} ".companion9x" "EEPM File" - - !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder - - Delete "$SMPROGRAMS\$StartMenuFolder\companion9x.lnk" - Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" - RMDir "$SMPROGRAMS\$StartMenuFolder" - - DeleteRegKey /ifempty HKCU "Software\companion9x" - -SectionEnd - -Function LaunchLink - ExecShell "" "$INSTDIR\companion9x.exe" -FunctionEnd +;NSIS Modern User Interface +;Start Menu Folder Selection Example Script +;Written by Joost Verburg + +;-------------------------------- +;Include Modern UI + + !include "MUI2.nsh" + !include "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\FileAssociation.nsh" + +;-------------------------------- +;General + + ;Name and file + Name "openTx companion" + OutFile "companionInstall_v@C9X_VERSION@.exe" + + ;Default installation folder + InstallDir "$PROGRAMFILES\openTx companion" + + ;Get installation folder from registry if available + InstallDirRegKey HKCU "Software\companion9x" "" + + ;Compressor options + SetCompressor /FINAL /SOLID lzma + SetCompressorDictSize 64 + + ;Request application privileges for Windows Vista + RequestExecutionLevel admin + +;-------------------------------- +;Variables + + Var StartMenuFolder + +;-------------------------------- +;Interface Settings + + !define MUI_ABORTWARNING + +;-------------------------------- +;Pages + + !insertmacro MUI_PAGE_LICENSE "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt" + !insertmacro MUI_PAGE_COMPONENTS + !insertmacro MUI_PAGE_DIRECTORY + + ;Start Menu Folder Page Configuration + !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU" + !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\companion9x" + !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" + + !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder + + !insertmacro MUI_PAGE_INSTFILES + + # These indented statements modify settings for MUI_PAGE_FINISH + !define MUI_FINISHPAGE_NOAUTOCLOSE + !define MUI_FINISHPAGE_RUN + !define MUI_FINISHPAGE_RUN_CHECKED + !define MUI_FINISHPAGE_RUN_TEXT "Launch companion" + !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink" + # !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED + # !define MUI_FINISHPAGE_SHOWREADME $INSTDIR\readme.txt + !insertmacro MUI_PAGE_FINISH + + !insertmacro MUI_UNPAGE_CONFIRM + !insertmacro MUI_UNPAGE_INSTFILES + +;-------------------------------- +;Languages + + !insertmacro MUI_LANGUAGE "English" + !insertmacro MUI_LANGUAGE "French" + +;-------------------------------- +;Installer Sections + +Section "openTx companion" SecDummy + + SetOutPath "$INSTDIR" + + File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt" + File "companion.exe" + File "C:\Programs\xerces\src\.libs\libxerces-c-3-1.dll" + File "C:\MinGW\bin\libgcc_s_dw2-1.dll" + File "C:\MinGW\bin\mingwm10.dll" + File "C:\MinGW\bin\libstdc++-6.dll" + File "@QT_BINARY_DIR@\QtCore4.dll" + File "@QT_BINARY_DIR@\QtGui4.dll" + File "@QT_BINARY_DIR@\QtXml4.dll" + File "@QT_BINARY_DIR@\QtNetwork4.dll" + File "@QT_BINARY_DIR@\Phonon4.dll" + File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.exe" + File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.conf" + File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\libusb0.dll" + File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\dfu-util.exe" + + CreateDirectory "$INSTDIR\lang" + SetOutPath "$INSTDIR\lang" + File "*.qm" + + SetOutPath "$INSTDIR" + ;Store installation folder + WriteRegStr HKCU "Software\companion9x" "" $INSTDIR + + ;Associate with extentions ,bin and .hex + ${registerExtension} "$INSTDIR\companion.exe" ".bin" "BIN_File" + ${registerExtension} "$INSTDIR\companion.exe" ".hex" "HEX_File" + ${registerExtension} "$INSTDIR\companion.exe" ".companion" "EEPE_File" + ${registerExtension} "$INSTDIR\companion.exe" ".eepm" "EEPM_File" + + + ;Create uninstaller + WriteUninstaller "$INSTDIR\Uninstall.exe" + + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + + ;Create shortcuts + CreateDirectory "$SMPROGRAMS\$StartMenuFolder" + CreateShortCut "$SMPROGRAMS\$StartMenuFolder\companion.lnk" "$INSTDIR\companion.exe" + CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe" + + !insertmacro MUI_STARTMENU_WRITE_END + +SectionEnd + +;-------------------------------- +;Descriptions + + ;Language strings + LangString DESC_SecDummy ${LANG_ENGLISH} "Models and settings editor for openTx" + LangString DESC_SecDummy ${LANG_FRENCH} "Editeur de réglages et modèles pour openTx" + + ;Assign language strings to sections + !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy) + !insertmacro MUI_FUNCTION_DESCRIPTION_END + +;-------------------------------- +;Uninstaller Section + +Section "Uninstall" + + ;ADD YOUR OWN FILES HERE... + + Delete "$INSTDIR\license.txt" + Delete "$INSTDIR\companion.exe" + Delete "$INSTDIR\libxerces-c-3-1.dll" + Delete "$INSTDIR\libgcc_s_dw2-1.dll" + Delete "$INSTDIR\mingwm10.dll" + Delete "$INSTDIR\libstdc++-6.dll" + Delete "$INSTDIR\QtCore4.dll" + Delete "$INSTDIR\QtGui4.dll" + Delete "$INSTDIR\QtNetwork4.dll" + Delete "$INSTDIR\Phonon4.dll" + Delete "$INSTDIR\QtXml4.dll" + Delete "$INSTDIR\avrdude.exe" + Delete "$INSTDIR\avrdude.conf" + Delete "$INSTDIR\libusb0.dll" + Delete "$INSTDIR\dfu-util.exe" + Delete "$INSTDIR\Uninstall.exe" + + Delete "$INSTDIR\lang\*.*" + + RMDir "$INSTDIR\lang" + RMDir "$INSTDIR" + + ${unregisterExtension} ".bin" "BIN File" + ${unregisterExtension} ".hex" "HEX File" + ${unregisterExtension} ".eepm" "EEPE File" + ${unregisterExtension} ".companion" "EEPM File" + + !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder + + Delete "$SMPROGRAMS\$StartMenuFolder\companion.lnk" + Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" + RMDir "$SMPROGRAMS\$StartMenuFolder" + + DeleteRegKey /ifempty HKCU "Software\companion9x" + +SectionEnd + +Function LaunchLink + ExecShell "" "$INSTDIR\companion.exe" +FunctionEnd diff --git a/companion/targets/windows/companion9x-vs.nsi.in b/companion/targets/windows/companion-vs.nsi.in similarity index 82% rename from companion/targets/windows/companion9x-vs.nsi.in rename to companion/targets/windows/companion-vs.nsi.in index 3e5950ada..340abc782 100644 --- a/companion/targets/windows/companion9x-vs.nsi.in +++ b/companion/targets/windows/companion-vs.nsi.in @@ -1,214 +1,214 @@ -;NSIS Modern User Interface -;Start Menu Folder Selection Example Script -;Written by Joost Verburg - -;-------------------------------- -;Include Modern UI - - !include "MUI2.nsh" - !include "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\FileAssociation.nsh" - -;-------------------------------- -;General - - ;Name and file - Name "companion9x" - OutFile "companion9xInstall_v@C9X_VERSION@.exe" - - ;Default installation folder - InstallDir "$PROGRAMFILES\companion9x" - - ;Get installation folder from registry if available - InstallDirRegKey HKCU "Software\companion9x" "" - - ;Compressor options - SetCompressor /FINAL /SOLID lzma - SetCompressorDictSize 64 - - ;Request application privileges for Windows Vista - RequestExecutionLevel admin - -;-------------------------------- -;Variables - - Var StartMenuFolder - -;-------------------------------- -;Interface Settings - - !define MUI_ABORTWARNING - -;-------------------------------- -;File Exists Macro - -; See http://nsis.sourceforge.net/Check_if_a_file_exists_at_compile_time for documentation -!macro !defineifexist _VAR_NAME _FILE_NAME - !tempfile _TEMPFILE - !ifdef NSIS_WIN32_MAKENSIS - ; Windows - cmd.exe - !system 'if exist "${_FILE_NAME}" echo !define ${_VAR_NAME} > "${_TEMPFILE}"' - !else - ; Posix - sh - !system 'if [ -e "${_FILE_NAME}" ]; then echo "!define ${_VAR_NAME}" > "${_TEMPFILE}"; fi' - !endif - !include '${_TEMPFILE}' - !delfile '${_TEMPFILE}' - !undef _TEMPFILE -!macroend -!define !defineifexist "!insertmacro !defineifexist" - -;-------------------------------- -;Pages - - !insertmacro MUI_PAGE_LICENSE "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt" - !insertmacro MUI_PAGE_COMPONENTS - !insertmacro MUI_PAGE_DIRECTORY - - ;Start Menu Folder Page Configuration - !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU" - !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\companion9x" - !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" - - !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder - - !insertmacro MUI_PAGE_INSTFILES - - # These indented statements modify settings for MUI_PAGE_FINISH - !define MUI_FINISHPAGE_NOAUTOCLOSE - !define MUI_FINISHPAGE_RUN - !define MUI_FINISHPAGE_RUN_CHECKED - !define MUI_FINISHPAGE_RUN_TEXT "Launch companion9x" - !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink" - # !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED - # !define MUI_FINISHPAGE_SHOWREADME $INSTDIR\readme.txt - !insertmacro MUI_PAGE_FINISH - - !insertmacro MUI_UNPAGE_CONFIRM - !insertmacro MUI_UNPAGE_INSTFILES - -;-------------------------------- -;Languages - - !insertmacro MUI_LANGUAGE "English" - !insertmacro MUI_LANGUAGE "French" - -;-------------------------------- -;Installer Sections - -Section "companion9x" SecDummy - - SetOutPath "$INSTDIR" - - File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt" - File "Release\companion9x.exe" - ${!defineifexist} PTHREAD_WINDIR "C:\Programs\pthreads\Pre-built.2\lib\pthreadVC2.dll" - !ifdef PTHREAD_WINDIR - File "C:\Programs\pthreads\Pre-built.2\lib\pthreadVC2.dll" - !else - File "@SYSDIR@\system32\pthreadVC2.dll" - !endif - File "C:\Programs\xerces-vc\bin\xerces-c_3_1.dll" - File "C:\Programs\SDL\lib\SDL.dll" - File "@SYSDIR@\msvcp100.dll" - File "@SYSDIR@\msvcr100.dll" - File "@QT_BINARY_DIR@\QtCore4.dll" - File "@QT_BINARY_DIR@\QtGui4.dll" - File "@QT_BINARY_DIR@\QtNetwork4.dll" - File "@QT_BINARY_DIR@\Phonon4.dll" - File "@QT_BINARY_DIR@\QtXml4.dll" - File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.exe" - File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.conf" - File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\libusb0.dll" - File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\dfu-util.exe" - File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\libusb-1.0.dll" - - CreateDirectory "$INSTDIR\lang" - SetOutPath "$INSTDIR\lang" - File "*.qm" - - SetOutPath "$INSTDIR" - ;Store installation folder - WriteRegStr HKCU "Software\companion9x" "" $INSTDIR - - ;Associate with extentions ,bin and .hex - ${registerExtension} "$INSTDIR\companion9x.exe" ".bin" "BIN_File" - ${registerExtension} "$INSTDIR\companion9x.exe" ".hex" "HEX_File" - ${registerExtension} "$INSTDIR\companion9x.exe" ".companion9x" "EEPE_File" - ${registerExtension} "$INSTDIR\companion9x.exe" ".eepm" "EEPM_File" - - - ;Create uninstaller - WriteUninstaller "$INSTDIR\Uninstall.exe" - - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - - ;Create shortcuts - CreateDirectory "$SMPROGRAMS\$StartMenuFolder" - CreateShortCut "$SMPROGRAMS\$StartMenuFolder\companion9x.lnk" "$INSTDIR\companion9x.exe" - CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe" - - !insertmacro MUI_STARTMENU_WRITE_END - -SectionEnd - -;-------------------------------- -;Descriptions - - ;Language strings - LangString DESC_SecDummy ${LANG_ENGLISH} "companion9x EEPROM editor." - LangString DESC_SecDummy ${LANG_FRENCH} "companion9x editeur d'EEPROM" - - ;Assign language strings to sections - !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy) - !insertmacro MUI_FUNCTION_DESCRIPTION_END - -;-------------------------------- -;Uninstaller Section - -Section "Uninstall" - - ;ADD YOUR OWN FILES HERE... - - Delete "$INSTDIR\license.txt" - Delete "$INSTDIR\companion9x.exe" - Delete "$INSTDIR\pthreadVC2.dll" - Delete "$INSTDIR\xerces-c_3_1.dll" - Delete "$INSTDIR\SDL.dll" - Delete "$INSTDIR\msvcp100.dll" - Delete "$INSTDIR\msvcr100.dll" - Delete "$INSTDIR\QtCore4.dll" - Delete "$INSTDIR\QtGui4.dll" - Delete "$INSTDIR\QtXml4.dll" - Delete "$INSTDIR\QtNetwork4.dll" - Delete "$INSTDIR\Phonon4.dll" - Delete "$INSTDIR\avrdude.exe" - Delete "$INSTDIR\avrdude.conf" - Delete "$INSTDIR\libusb0.dll" - Delete "$INSTDIR\dfu-util.exe" - Delete "$INSTDIR\libusb-1.0.dll" - Delete "$INSTDIR\Uninstall.exe" - - Delete "$INSTDIR\lang\*.*" - - RMDir "$INSTDIR\lang" - RMDir "$INSTDIR" - - ${unregisterExtension} ".bin" "BIN File" - ${unregisterExtension} ".hex" "HEX File" - ${unregisterExtension} ".eepm" "EEPE File" - ${unregisterExtension} ".companion9x" "EEPM File" - - !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder - - Delete "$SMPROGRAMS\$StartMenuFolder\companion9x.lnk" - Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" - RMDir "$SMPROGRAMS\$StartMenuFolder" - - DeleteRegKey /ifempty HKCU "Software\companion9x" - -SectionEnd - -Function LaunchLink - ExecShell "" "$INSTDIR\companion9x.exe" -FunctionEnd +;NSIS Modern User Interface +;Start Menu Folder Selection Example Script +;Written by Joost Verburg + +;-------------------------------- +;Include Modern UI + + !include "MUI2.nsh" + !include "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\FileAssociation.nsh" + +;-------------------------------- +;General + + ;Name and file + Name "openTx companion" + OutFile "companionInstall_v@C9X_VERSION@.exe" + + ;Default installation folder + InstallDir "$PROGRAMFILES\openTx companion" + + ;Get installation folder from registry if available + InstallDirRegKey HKCU "Software\companion9x" "" + + ;Compressor options + SetCompressor /FINAL /SOLID lzma + SetCompressorDictSize 64 + + ;Request application privileges for Windows Vista + RequestExecutionLevel admin + +;-------------------------------- +;Variables + + Var StartMenuFolder + +;-------------------------------- +;Interface Settings + + !define MUI_ABORTWARNING + +;-------------------------------- +;File Exists Macro + +; See http://nsis.sourceforge.net/Check_if_a_file_exists_at_compile_time for documentation +!macro !defineifexist _VAR_NAME _FILE_NAME + !tempfile _TEMPFILE + !ifdef NSIS_WIN32_MAKENSIS + ; Windows - cmd.exe + !system 'if exist "${_FILE_NAME}" echo !define ${_VAR_NAME} > "${_TEMPFILE}"' + !else + ; Posix - sh + !system 'if [ -e "${_FILE_NAME}" ]; then echo "!define ${_VAR_NAME}" > "${_TEMPFILE}"; fi' + !endif + !include '${_TEMPFILE}' + !delfile '${_TEMPFILE}' + !undef _TEMPFILE +!macroend +!define !defineifexist "!insertmacro !defineifexist" + +;-------------------------------- +;Pages + + !insertmacro MUI_PAGE_LICENSE "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt" + !insertmacro MUI_PAGE_COMPONENTS + !insertmacro MUI_PAGE_DIRECTORY + + ;Start Menu Folder Page Configuration + !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU" + !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\companion9x" + !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" + + !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder + + !insertmacro MUI_PAGE_INSTFILES + + # These indented statements modify settings for MUI_PAGE_FINISH + !define MUI_FINISHPAGE_NOAUTOCLOSE + !define MUI_FINISHPAGE_RUN + !define MUI_FINISHPAGE_RUN_CHECKED + !define MUI_FINISHPAGE_RUN_TEXT "Launch companion" + !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink" + # !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED + # !define MUI_FINISHPAGE_SHOWREADME $INSTDIR\readme.txt + !insertmacro MUI_PAGE_FINISH + + !insertmacro MUI_UNPAGE_CONFIRM + !insertmacro MUI_UNPAGE_INSTFILES + +;-------------------------------- +;Languages + + !insertmacro MUI_LANGUAGE "English" + !insertmacro MUI_LANGUAGE "French" + +;-------------------------------- +;Installer Sections + +Section "openTx companion" SecDummy + + SetOutPath "$INSTDIR" + + File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt" + File "Release\companion.exe" + ${!defineifexist} PTHREAD_WINDIR "C:\Programs\pthreads\Pre-built.2\lib\pthreadVC2.dll" + !ifdef PTHREAD_WINDIR + File "C:\Programs\pthreads\Pre-built.2\lib\pthreadVC2.dll" + !else + File "@SYSDIR@\system32\pthreadVC2.dll" + !endif + File "C:\Programs\xerces-vc\bin\xerces-c_3_1.dll" + File "C:\Programs\SDL\lib\SDL.dll" + File "@SYSDIR@\msvcp100.dll" + File "@SYSDIR@\msvcr100.dll" + File "@QT_BINARY_DIR@\QtCore4.dll" + File "@QT_BINARY_DIR@\QtGui4.dll" + File "@QT_BINARY_DIR@\QtNetwork4.dll" + File "@QT_BINARY_DIR@\Phonon4.dll" + File "@QT_BINARY_DIR@\QtXml4.dll" + File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.exe" + File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.conf" + File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\libusb0.dll" + File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\dfu-util.exe" + File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\libusb-1.0.dll" + + CreateDirectory "$INSTDIR\lang" + SetOutPath "$INSTDIR\lang" + File "*.qm" + + SetOutPath "$INSTDIR" + ;Store installation folder + WriteRegStr HKCU "Software\companion9x" "" $INSTDIR + + ;Associate with extentions ,bin and .hex + ${registerExtension} "$INSTDIR\companion.exe" ".bin" "BIN_File" + ${registerExtension} "$INSTDIR\companion.exe" ".hex" "HEX_File" + ${registerExtension} "$INSTDIR\companion.exe" ".companion" "EEPE_File" + ${registerExtension} "$INSTDIR\companion.exe" ".eepm" "EEPM_File" + + + ;Create uninstaller + WriteUninstaller "$INSTDIR\Uninstall.exe" + + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + + ;Create shortcuts + CreateDirectory "$SMPROGRAMS\$StartMenuFolder" + CreateShortCut "$SMPROGRAMS\$StartMenuFolder\companion.lnk" "$INSTDIR\companion.exe" + CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe" + + !insertmacro MUI_STARTMENU_WRITE_END + +SectionEnd + +;-------------------------------- +;Descriptions + + ;Language strings + LangString DESC_SecDummy ${LANG_ENGLISH} "Models and settings editor for openTx" + LangString DESC_SecDummy ${LANG_FRENCH} "Editeur de réglages et modèles pour openTx" + + ;Assign language strings to sections + !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy) + !insertmacro MUI_FUNCTION_DESCRIPTION_END + +;-------------------------------- +;Uninstaller Section + +Section "Uninstall" + + ;ADD YOUR OWN FILES HERE... + + Delete "$INSTDIR\license.txt" + Delete "$INSTDIR\companion.exe" + Delete "$INSTDIR\pthreadVC2.dll" + Delete "$INSTDIR\xerces-c_3_1.dll" + Delete "$INSTDIR\SDL.dll" + Delete "$INSTDIR\msvcp100.dll" + Delete "$INSTDIR\msvcr100.dll" + Delete "$INSTDIR\QtCore4.dll" + Delete "$INSTDIR\QtGui4.dll" + Delete "$INSTDIR\QtXml4.dll" + Delete "$INSTDIR\QtNetwork4.dll" + Delete "$INSTDIR\Phonon4.dll" + Delete "$INSTDIR\avrdude.exe" + Delete "$INSTDIR\avrdude.conf" + Delete "$INSTDIR\libusb0.dll" + Delete "$INSTDIR\dfu-util.exe" + Delete "$INSTDIR\libusb-1.0.dll" + Delete "$INSTDIR\Uninstall.exe" + + Delete "$INSTDIR\lang\*.*" + + RMDir "$INSTDIR\lang" + RMDir "$INSTDIR" + + ${unregisterExtension} ".bin" "BIN File" + ${unregisterExtension} ".hex" "HEX File" + ${unregisterExtension} ".eepm" "EEPE File" + ${unregisterExtension} ".companion" "EEPM File" + + !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder + + Delete "$SMPROGRAMS\$StartMenuFolder\companion.lnk" + Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" + RMDir "$SMPROGRAMS\$StartMenuFolder" + + DeleteRegKey /ifempty HKCU "Software\companion9x" + +SectionEnd + +Function LaunchLink + ExecShell "" "$INSTDIR\companion.exe" +FunctionEnd diff --git a/radio/src/Makefile b/radio/src/Makefile index 73515c551..4ce991777 100644 --- a/radio/src/Makefile +++ b/radio/src/Makefile @@ -159,6 +159,10 @@ PPM_UNIT = PERCENT_PREC1 # Values = YES, NO FRSKY_HUB = YES +# FrSky FAS current sensor offset compensation +# Values = YES, NO +FAS_OFFSET = NO + # WS HowHigh # Values = YES, NO WS_HOW_HIGH = YES @@ -256,7 +260,7 @@ MENUS_LOCK == NO SHELL = sh IMG2LBM = -python ../util/img2lbm.py TRANSLATE = -python ../util/translate.py -SVNREV = $(shell sh -c "svnversion | egrep -o '[[:digit:]]+[[:alpha:]]*$$'") +VERSION = 2.0 SRC = CPPSRC = @@ -332,6 +336,10 @@ ifeq ($(PCB), $(filter $(PCB), STD 9X 9XR)) ifeq ($(SP22), YES) CPPDEFS += -DSP22 endif + + ifeq ($(FAS_OFFSET), YES) + CPPDEFS += -DFAS_OFFSET + endif endif ifeq ($(PCB), $(filter $(PCB), STD128 9X128 9XR128)) @@ -779,10 +787,8 @@ ifneq ($(PCB), TARANIS) endif ifneq ($(FONT), STD) - CPPDEFS += -DFONT_$(FONT) INCDIRS += fonts/$(shell sh -c "echo $(FONT) | tr '[:upper:]' '[:lower:]'") endif - INCDIRS += fonts/std ifeq ($(THR_TRACE), YES) @@ -1063,91 +1069,83 @@ stamp_header: @echo "//Automatically generated file (Makefile) - do not edit" > stamp-opentx.h @echo "#define DATE_STR \"`date +%Y-%m-%d | tr -d '\r\n'`\"" >> stamp-opentx.h @echo "#define TIME_STR \"`date +%H:%M:%S | tr -d '\r\n'`\"" >> stamp-opentx.h - @echo "#define SVN_STR \"opentx-r$(SVNREV)\"" >> stamp-opentx.h + @echo "#define VERS_STR \"$(VERSION)\"" >> stamp-opentx.h @cat stamp-opentx.h -stock-stamp: - @echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-stock.txt - @echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-stock.txt - @echo "#define SVN_VERS \"opentx-r$(SVNREV)\"" >> stamp-opentx-stock.txt - @cat stamp-opentx-stock.txt +9x-stamp: + @echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-9x.txt + @echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-9x.txt + @echo "#define VERS_STR \"$(VERSION)\"" >> stamp-opentx-9x.txt + @cat stamp-opentx-9x.txt -stock128-stamp: - @echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-stock128.txt - @echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-stock128.txt - @echo "#define SVN_VERS \"opentx-r$(SVNREV)\"" >> stamp-opentx-stock128.txt - @cat stamp-opentx-stock128.txt +9x128-stamp: + @echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-9x128.txt + @echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-9x128.txt + @echo "#define VERS_STR \"$(VERSION)\"" >> stamp-opentx-9x128.txt + @cat stamp-opentx-9x128.txt -stock2561-stamp: - @echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-stock2561.txt - @echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-stock2561.txt - @echo "#define SVN_VERS \"opentx-r$(SVNREV)\"" >> stamp-opentx-stock2561.txt - @cat stamp-opentx-stock2561.txt +9x2561-stamp: + @echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-9x2561.txt + @echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-9x2561.txt + @echo "#define VERS_STR \"$(VERSION)\"" >> stamp-opentx-9x2561.txt + @cat stamp-opentx-9x2561.txt -v4-stamp: - @echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-v4.txt - @echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-v4.txt - @echo "#define SVN_VERS \"opentx-r$(SVNREV)\"" >> stamp-opentx-v4.txt - @cat stamp-opentx-v4.txt +gruvin9x-stamp: + @echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-gruvin9x.txt + @echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-gruvin9x.txt + @echo "#define VERS_STR \"$(VERSION)\"" >> stamp-opentx-gruvin9x.txt + @cat stamp-opentx-9x.txt -arm-stamp: - @echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-arm.txt - @echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-arm.txt - @echo "#define SVN_VERS \"opentx-r$(SVNREV)\"" >> stamp-opentx-arm.txt - @cat stamp-opentx-arm.txt +sky9x-stamp: + @echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-sky9x.txt + @echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-sky9x.txt + @echo "#define VERS_STR \"$(VERSION)\"" >> stamp-opentx-sky9x.txt + @cat stamp-opentx-sky9x.txt taranis-stamp: @echo "#define DATE_STR \"`date +%Y-%m-%d`\"" > stamp-opentx-taranis.txt @echo "#define TIME_STR \"`date +%H:%M:%S`\"" >> stamp-opentx-taranis.txt - @echo "#define SVN_VERS \"opentx-r$(SVNREV)\"" >> stamp-opentx-taranis.txt + @echo "#define VERS_STR \"$(VERSION)\"" >> stamp-opentx-taranis.txt @cat stamp-opentx-taranis.txt translations/cz.h: translations/cz.h.txt @echo - @echo "Create language specific header files" - @echo "Czech" + @echo "Create Czech language specific header files" $(TRANSLATE) translations/cz.h.txt translations/cz.h cz translations/de.h: translations/de.h.txt @echo - @echo "Create language specific header files" - @echo "German" + @echo "Create German language specific header files" $(TRANSLATE) translations/de.h.txt translations/de.h de translations/es.h: translations/es.h.txt @echo - @echo "Create language specific header files" - @echo "Spanish" + @echo "Create Spanish language specific header files" $(TRANSLATE) translations/es.h.txt translations/es.h es translations/fr.h: translations/fr.h.txt @echo - @echo "Create language specific header files" - @echo "French" + @echo "Create French language specific header files" $(TRANSLATE) translations/fr.h.txt translations/fr.h fr translations/it.h: translations/it.h.txt @echo - @echo "Create language specific header files" - @echo "Italian" + @echo "Create Italian language specific header files" $(TRANSLATE) translations/it.h.txt translations/it.h it translations/pl.h: translations/pl.h.txt @echo - @echo "Create language specific header files" - @echo "Polish" + @echo "Create Polish language specific header files" $(TRANSLATE) translations/pl.h.txt translations/pl.h pl translations/pt.h: translations/pt.h.txt @echo - @echo "Create language specific header files" - @echo "Portugese" + @echo "Create Portugese language specific header files" $(TRANSLATE) translations/pt.h.txt translations/pt.h pt translations/se.h: translations/se.h.txt @echo - @echo "Create language specific header files" - @echo "Swedish" + @echo "Create Swedish language specific header files" $(TRANSLATE) translations/se.h.txt translations/se.h se .PHONY: fonts @@ -1299,12 +1297,7 @@ clean_list : $(REMOVE) $(TARGET).lss $(REMOVE) $(TARGET).lst $(REMOVE) $(SRC:.c=.s) - $(REMOVE) *.o - $(REMOVE) */*.o - $(REMOVE) */*/*.o - $(REMOVE) */*/*/*.o - $(REMOVE) */*/*/*/*.o - $(REMOVE) */*/*/*/*/*.o + $(REMOVE) `find . -name "*.o"` $(REMOVE) *.d $(REMOVE) *.lst $(REMOVE) allsrc.cpp @@ -1368,11 +1361,11 @@ GTEST_SRCS_ = $(GTEST_DIR)/src/*.cc $(GTEST_DIR)/src/*.h $(GTEST_HEADERS) # conservative and not optimized. This is fine as Google Test # compiles fast and for ordinary users its source rarely changes. gtest-all.o : $(GTEST_SRCS_) - $(CXX) $(CPPFLAGS) -I$(GTEST_DIR) -c \ + $(CXX) $(CPPFLAGS) -I$(GTEST_DIR) -I$(GTEST_DIR)/include -c \ $(GTEST_DIR)/src/gtest-all.cc gtest_main.o : $(GTEST_SRCS_) - $(CXX) $(CPPFLAGS) -I$(GTEST_DIR) -c \ + $(CXX) $(CPPFLAGS) -I$(GTEST_DIR) -I$(GTEST_DIR)/include -c \ $(GTEST_DIR)/src/gtest_main.cc gtest.a : gtest-all.o @@ -1386,4 +1379,4 @@ gtest_main.a : gtest-all.o gtest_main.o # function. gtests: $(BOARDSRC) $(CPPSRC) gtests.cpp simpgmspace.cpp *.h gtest_main.a - g++ -std=gnu++0x $(CPPFLAGS) $(BOARDSRC) $(CPPSRC) gtests.cpp simpgmspace.cpp -I$(GTEST_DIR) -o gtests -lpthread -MD -DSIMU gtest_main.a + g++ -std=gnu++0x $(CPPFLAGS) $(BOARDSRC) $(CPPSRC) gtests.cpp simpgmspace.cpp -I$(GTEST_DIR) ${INCFLAGS} -I$(GTEST_DIR)/include -o gtests -lpthread -MD -DSIMU gtest_main.a diff --git a/radio/src/audio_arm.cpp b/radio/src/audio_arm.cpp index 83988b215..3fff37af0 100644 --- a/radio/src/audio_arm.cpp +++ b/radio/src/audio_arm.cpp @@ -337,10 +337,15 @@ void AudioQueue::pushBuffer(AudioBuffer *buffer) { buffer->state = AUDIO_BUFFER_FILLED; - if (dacQueue(buffer)) - buffer->state = AUDIO_BUFFER_PLAYING; + __disable_irq(); bufferWIdx = nextBufferIdx(bufferWIdx); + + if (dacQueue(buffer)) { + buffer->state = AUDIO_BUFFER_PLAYING; + } + + __enable_irq(); } void mix(uint16_t * result, int sample, unsigned int fade) @@ -380,10 +385,13 @@ int AudioQueue::mixWav(AudioContext &context, AudioBuffer *buffer, int volume, u result = FR_DENIED; } while (result == FR_OK && memcmp(wavSamplesPtr, "data", 4) != 0) { - result = (size < 256 ? f_read(&context.state.wav.file, wavBuffer, size+8, &read) : FR_DENIED); - if (read != size+8) result = FR_DENIED; - wavSamplesPtr = (uint32_t *)(wavBuffer + size); - size = wavSamplesPtr[1]; + result = f_lseek(&context.state.wav.file, f_tell(&context.state.wav.file)+size); + if (result == FR_OK) { + result = f_read(&context.state.wav.file, wavBuffer, 8, &read); + if (read != 8) result = FR_DENIED; + wavSamplesPtr = (uint32_t *)wavBuffer; + size = wavSamplesPtr[1]; + } } context.state.wav.size = size; } diff --git a/radio/src/bitmaps/.gitignore b/radio/src/bitmaps/.gitignore new file mode 100644 index 000000000..82b82bcbf --- /dev/null +++ b/radio/src/bitmaps/.gitignore @@ -0,0 +1 @@ +/*.lbm diff --git a/radio/src/bitmaps/about_9x.lbm b/radio/src/bitmaps/about_9x.lbm deleted file mode 100644 index 8b45bad17..000000000 --- a/radio/src/bitmaps/about_9x.lbm +++ /dev/null @@ -1,4 +0,0 @@ -11,17, -0x00,0x80,0x80,0xbe,0xe3,0xc1,0xc1,0xc1,0xe3,0xff,0xff, -0x00,0xe7,0x24,0x3c,0x00,0x00,0x00,0x00,0x3f,0x3f,0xff, -0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, diff --git a/radio/src/bitmaps/about_taranis.lbm b/radio/src/bitmaps/about_taranis.lbm deleted file mode 100644 index b7a363165..000000000 --- a/radio/src/bitmaps/about_taranis.lbm +++ /dev/null @@ -1,9 +0,0 @@ -60,64, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0xe0,0xe0,0x70,0xf8,0xf0,0xf0,0xf8,0xf0,0xf8,0xf8,0xf8,0xf0,0xf8,0xf8,0xf8,0xf0,0xf0,0xf0,0xf8,0x00,0xe0,0xe0,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x01,0x00,0x01,0x00,0x01,0x03,0x16,0x0c,0x0b,0x07,0x1e,0x32,0x2c,0x1f,0xb6,0x03,0x7b,0xfc,0xb8,0x2f,0xcf,0xf0,0x20,0xbf,0x3f,0xc0,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x02,0xfe,0xfe,0x01,0x12,0xf6,0xf1,0x0f,0x37,0xd1,0xce,0x3f,0x7c,0xea,0xd2,0x3c,0x40,0xc8,0xf8,0x30,0x40,0xc0,0xf0,0x30,0x40,0xc0,0xf0,0x30,0x40,0xc0,0xf0,0x30,0x40,0xc0,0xf0,0x30,0x60,0xc0,0x30,0xf0,0xc0,0x10,0xe0,0xf0,0x20,0xc0,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x18,0x10,0x18,0x18,0x58,0x30,0x38,0x18,0xf8,0xf0,0xf8,0xf8,0xf8,0xf1,0xf9,0xf8,0xf8,0xf0,0xf9,0xf9,0xf9,0xf1,0xf8,0xf9,0xf9,0xf0,0xf9,0xf8,0xf8,0xf0,0xf8,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x09,0x01,0x00,0xf9,0xf8,0x07,0xff,0x71,0x01,0xfe,0xff,0x23,0x03,0x03,0xfc,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x06,0x01,0x00,0xff,0xff,0x00,0xff,0xff,0xf5,0xf6,0x08,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x00,0x80,0x60,0xa0,0xc0,0xea,0x84,0x74,0xf8,0xfd,0xa1,0x9e,0x7f,0x26,0xee,0xe1,0x1f,0x06,0xfe,0xfe,0x01,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x40,0x7f,0x7f,0x80,0x60,0x5f,0x9f,0xe0,0x70,0x3f,0xdf,0xe0,0x70,0xbf,0xdf,0x60,0x50,0x1f,0x7f,0x60,0x50,0x1f,0x7f,0x60,0x50,0x1f,0x7f,0x60,0x10,0x1f,0x7f,0x60,0x72,0x1c,0x60,0x7f,0x1f,0x40,0x3f,0x7f,0x0d,0x3b,0x18,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x40,0x20,0xe0,0xc0,0xa0,0x00,0x80,0xc0,0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x04,0x00,0x00,0x06,0x06,0x04,0x06,0x04,0x07,0x06,0x06,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x04,0x07,0x06,0x06,0x06,0x06,0x04,0x06,0x06,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x00,0x80,0x80,0x00,0x80,0xa0,0x00,0x80,0xc0,0x40,0x20,0xe0,0xc0,0x40,0x90,0x70,0xe0,0xa0,0xc8,0xb8,0x70,0x52,0xe4,0xdc,0x38,0x2c,0xf0,0xec,0x1e,0x1b,0xf1,0xf6,0x0f,0x03,0xfa,0xf9,0x07,0x03,0xfe,0xfe,0x01,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x80,0xff,0xff,0x00,0x00,0xbf,0x3f,0xc0,0x80,0x2f,0xcf,0xf0,0xe2,0x0b,0x73,0xfc,0x1e,0xe3,0x5c,0x3f,0x3f,0x04,0x13,0x0f,0x01,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0xfe,0xfe,0x01,0x03,0xff,0xfe,0x01,0x03,0xfc,0xfd,0x03,0x05,0xfc,0xff,0x03,0x06,0xf9,0xfa,0x07,0x0e,0xfd,0xfb,0x06,0x00,0xf0,0xf6,0x0e,0x06,0xf8,0xf4,0x0e,0x1c,0xfa,0xf6,0x0c,0x1a,0xf8,0xf4,0x0c,0x04,0xe4,0xe8,0x1c,0x04,0xe6,0xe8,0x1c,0x0e,0xe4,0xe8,0x1c,0x1e,0xe4,0xe8,0x1c,0x0e,0xe4,0xe8,0x1c,0x06,0xe4,0xe8,0x1c,0x04,0xe4,0xe8,0x1c,0x18,0xf8,0xf4,0x0c,0x1c,0xfa,0xf6,0x0c,0x06,0xf8,0xf4,0x0e,0x04,0xf0,0xf6,0x0e,0x0e,0xfd,0xfb,0x06,0x06,0xf9,0xfa,0x07,0x07,0xfe,0xfd,0x03,0x03,0xfc,0xfd,0x03,0x03,0xff,0xfe,0x01,0x00,0xfe,0xfe,0x01,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x03,0xff,0xff,0x00,0x04,0xfe,0xfd,0x03,0x0b,0xfc,0xfb,0x07,0x17,0x7b,0x75,0x8e,0x5e,0x14,0x8a,0xfc,0xdc,0x08,0xf4,0xf8,0xb8,0x90,0xe8,0x70,0x50,0x00,0x50,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x3f,0xbf,0xc0,0xc0,0xff,0x7f,0x80,0x00,0xff,0x7f,0x80,0x00,0x7f,0x7f,0x80,0x80,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x00,0xff,0xff,0x00,0x80,0xff,0xff,0x00,0x00,0x7f,0x7f,0x80,0x00,0xff,0x7f,0x80,0xc0,0xff,0x7f,0x80,0x00,0x3f,0xbf,0xc0,0x80,0x7f,0xbf,0xc0,0x00,0x1f,0xdf,0xe0,0x40,0xbf,0x5f,0xe0,0x40,0x8f,0xef,0x70,0x20,0xdf,0x2f,0x70,0x68,0x4f,0x7f,0x30,0xe8,0x5f,0xaf,0x70,0xd0,0xbf,0x5f,0xe0,0xa0,0x7f,0xbf,0xc0,0xc0,0xff,0x7f,0x80,0x80,0xff,0xff,0x00,0x80,0x7f,0x7f,0x80,0x00,0x3f,0xbf,0xc0,0xc0,0x5f,0x9f,0xe0,0x70,0xbf,0x5f,0xe0,0x68,0xdf,0x2f,0x70,0x74,0x2f,0x57,0x38,0x2a,0x07,0x3b,0x1c,0x1e,0x0a,0x14,0x0f,0x0f,0x05,0x0a,0x07,0x05,0x06,0x01,0x03,0x01,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x01,0x01,0x00,0x01,0x01,0x02,0x03,0x01,0x03,0x00,0x01,0x03,0x02,0x06,0x05,0x03,0x07,0x01,0xfe,0xff,0x83,0x02,0xfc,0xff,0xfe,0xff,0x7f,0x80,0x00,0xff,0x7f,0x80,0x00,0xff,0x7f,0x80,0x80,0x7f,0x7f,0x80,0x80,0x7f,0x7f,0x80,0x00,0x7f,0x7f,0x80,0x00,0x7f,0x7f,0x80,0x00,0x7f,0x7f,0x80,0x00,0x7f,0x7f,0x80,0x00,0x7f,0x7f,0x80,0x00,0x7f,0x7f,0x80,0x80,0x7f,0x7f,0x80,0x00,0xff,0x7f,0x80,0x00,0xff,0x7f,0x80,0xfe,0xff,0x7f,0x80,0xbb,0x3a,0xc4,0xff,0x83,0x01,0xfe,0xff,0x02,0x06,0x05,0x03,0x03,0x00,0x01,0x03,0x01,0x02,0x03,0x01,0x01,0x01,0x00,0x01,0x01,0x00,0x00,0x01,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x03,0x01,0x02,0x01,0x07,0x02,0x05,0x03,0x02,0x00,0x03,0x07,0x05,0x00,0x07,0x03,0x03,0x02,0x03,0x01,0x01,0x02,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x02,0x02,0x01,0x01,0x01,0x02,0x03,0x01,0x03,0x02,0x03,0x01,0x03,0x00,0x01,0x03,0x01,0x02,0x01,0x03,0x03,0x02,0x01,0x03,0x03,0x02,0x01,0x03,0x03,0x02,0x01,0x03,0x00,0x00,0x03,0x03,0x02,0x02,0x01,0x03,0x03,0x02,0x01,0x03,0x03,0x02,0x01,0x03,0x01,0x02,0x01,0x03,0x03,0x00,0x01,0x03,0x03,0x02,0x03,0x01,0x01,0x02,0x03,0x01,0x02,0x02,0x01,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, diff --git a/radio/src/bitmaps/asterisk.lbm b/radio/src/bitmaps/asterisk.lbm deleted file mode 100644 index dcd2243b3..000000000 --- a/radio/src/bitmaps/asterisk.lbm +++ /dev/null @@ -1,5 +0,0 @@ -27,32, -0xfc,0x04,0x04,0x04,0x04,0x04,0x04,0x84,0xc4,0x84,0x04,0xe4,0xf4,0xe4,0x04,0x84,0xc4,0xc4,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0xfc, -0xff,0x00,0x00,0x00,0xfc,0xfe,0x00,0xff,0xff,0xff,0x80,0xff,0xff,0xff,0x80,0xff,0xff,0xff,0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0xff, -0xff,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0xfc,0xff,0x3f,0x0f,0x03,0x00,0x00,0xff, -0x3f,0x20,0x20,0x20,0x21,0x27,0x27,0x2f,0x2f,0x2f,0x2b,0x27,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x27,0x23,0x20,0x20,0x20,0x20,0x20,0x20,0x3f, diff --git a/radio/src/bitmaps/asterisk_4bits.lbm b/radio/src/bitmaps/asterisk_4bits.lbm deleted file mode 100644 index 4bc1844d8..000000000 --- a/radio/src/bitmaps/asterisk_4bits.lbm +++ /dev/null @@ -1,9 +0,0 @@ -60,64, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x3f,0xbf,0x3f,0xbf,0xdf,0x9f,0xdf,0x9f,0xef,0xff,0xef,0xef,0xf7,0xf7,0xf7,0xf7,0xf3,0x73,0x73,0x7b,0x3b,0x3b,0x3b,0x3b,0x1b,0x1b,0x1b,0x3b,0x1b,0x1b,0x1b,0x3b,0x3b,0x3b,0x3b,0x3b,0x7b,0xfb,0xf3,0x7b,0xf7,0xf7,0xf7,0xf7,0xef,0xef,0xef,0xef,0x5f,0x9f,0x9f,0x1f,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0x3f,0xbf,0x3f,0x3f,0x7f,0x7f,0x7f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0x7f,0x7f,0xbf,0xbf,0x3f,0x3f,0xdf,0xdf,0xdf,0xdf,0xcf,0xcf,0xcf,0xef,0xef,0xef,0xef,0xef,0xef,0xef,0xef,0xef,0xef,0xef,0xef,0xef,0xf7,0xe7,0xe7,0xe7,0xf3,0xfd,0xf1,0xf9,0xff,0xfe,0xfe,0xfe,0xff,0xff,0xff,0xff,0x0f,0x0f,0x07,0x07,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x07,0x07,0x07,0x07,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x1f,0xff,0x0f,0x07,0x03,0x07,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x0f,0x03,0x07,0x03,0x1f,0x0f,0xff,0x0f,0xfe,0xff,0xfe,0xff,0xfe,0xfc,0xfe,0xfc,0xf9,0xf1,0x01,0x01,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2f,0xff,0x80,0x80,0xff,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0x3f,0x3f,0xbf,0xbf,0x7f,0x7f,0x7f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0xe0,0xc0,0xf9,0xf9,0xfe,0xf8,0xff,0xff,0xff,0xff,0x7f,0x3f,0x3f,0x1f,0x0f,0x07,0x07,0x07,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x5b,0xf7,0xa7,0xc7,0xff,0xff,0xff,0xff,0xfe,0xff,0xfe,0xfe,0x1f,0x01,0x01,0x01,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0xc0,0xe0,0xe0,0xc0,0xc0,0xe0,0xe0,0xe0,0xe0,0xf0,0xe0,0xf0,0xe0,0x70,0x70,0x70,0x70,0x70,0x78,0x70,0x70,0x3f,0x3f,0x7e,0x7e,0x3f,0x3f,0x7f,0x3f,0x0f,0x0f,0x1f,0x0f,0x03,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x90,0x20,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0x1f,0x3f,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xbf,0x7f,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x40,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xe0,0xc0,0x00,0xf8,0xfc,0xfc,0xf8,0xff,0xff,0xfe,0xfe,0x1d,0x7f,0x3f,0x1f,0x07,0x07,0x07,0x07,0x01,0x03,0x03,0x01,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x40,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0xdf,0x1f,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x07,0x07,0x07,0x03,0x0f,0x1f,0x1f,0x0f,0x3f,0x3f,0x3f,0x3f,0xfc,0x7c,0x78,0x7c,0xf0,0xf0,0xf0,0xf0,0xe0,0xe0,0xe0,0xe0,0xc0,0xc0,0xc0,0xc0,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0xc0,0xc0,0xc0,0xc0,0xe0,0xe0,0xe0,0xe0,0xf0,0xf0,0xf0,0xf0,0xfc,0x7c,0x7c,0x78,0x3f,0x3f,0x3e,0x3f,0x0f,0x07,0x0f,0x0f,0x03,0x01,0x01,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x01,0x01,0x01,0x01,0x03,0x03,0x03,0x03,0x07,0x07,0x07,0x03,0x07,0x07,0x07,0x07,0x06,0x07,0x06,0x0f,0x0e,0x0e,0x0e,0x0e,0x1c,0x0e,0x0e,0x0e,0x1c,0x1e,0x0c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x3c,0x18,0x1c,0x1c,0x1c,0x38,0x1c,0x18,0x18,0x18,0x3c,0x18,0x18,0x1c,0x38,0x18,0x1c,0x1c,0x38,0x18,0x1c,0x18,0x3c,0x18,0x3c,0x1c,0x1c,0x18,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1e,0x0c,0x1e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x07,0x07,0x0f,0x07,0x01,0x07,0x07,0x07,0x03,0x03,0x07,0x03,0x03,0x03,0x03,0x03,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, diff --git a/radio/src/bitmaps/icons.lbm b/radio/src/bitmaps/icons.lbm deleted file mode 100644 index b111790e1..000000000 --- a/radio/src/bitmaps/icons.lbm +++ /dev/null @@ -1,2 +0,0 @@ -111,8, -0xff,0xff,0x00,0x00,0xff,0xff,0x1c,0x1c,0x6b,0xff,0xb6,0x22,0xbf,0xff,0xc0,0x80,0xff,0xff,0xe8,0xe8,0xbf,0xff,0xc0,0x80,0x6b,0xff,0xb6,0x22,0xff,0xff,0x1c,0x1c,0xff,0xff,0x00,0x00,0xff,0xff,0x38,0x38,0xbb,0xff,0x7c,0x38,0x7d,0xff,0xfe,0x7c,0xff,0xff,0xfe,0xfe,0xff,0xff,0x00,0x00,0xff,0xff,0x50,0x50,0xff,0xff,0x20,0x20,0xff,0xff,0x50,0x50,0xff,0xff,0x38,0x38,0xbb,0xff,0x7c,0x38,0x7d,0xff,0xfe,0x7c,0xff,0xff,0xfe,0xfe,0xff,0xff,0x00,0x00,0xff,0xff,0x40,0x40,0xff,0xff,0x40,0x40,0xff,0xff,0x40,0x40,0xff,0xff,0x38,0x38,0xbb,0xff,0x7c,0x38,0x7d,0xff,0xfe,0x7c,0xff,0xff,0xfe,0xfe,0xff,0xff,0x00,0x00,0xff,0xff,0x50,0x50,0xff,0xff,0x50,0x50,0xff,0xff,0x50,0x50,0xff,0xff,0x38,0x38,0xbb,0xff,0x7c,0x38,0x7d,0xff,0xfe,0x7c,0xff,0xff,0xfe,0xfe,0xff,0xff,0x00,0x00,0xff,0xff,0x54,0x54,0xff,0xff,0x54,0x54,0xff,0xff,0x54,0x54,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0xff,0xc1,0x41,0x41,0xff,0xfd,0x7d,0x7d,0xff,0xfd,0x7d,0x7d,0xff,0xfd,0x7d,0x7d,0xff,0xfd,0x7d,0x7d,0xfd,0xfb,0x7b,0x79,0xfb,0xc7,0x47,0x43,0xff,0xff,0x7f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xe3,0xff,0x77,0x63,0xdd,0xff,0x63,0x41,0xdd,0xff,0x41,0x41,0xdd,0xff,0x63,0x41,0xe3,0xff,0x77,0x63,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0xff,0xff,0xfd,0xff,0x43,0x41,0xff,0xff,0x7d,0x7d,0xff,0xff,0x73,0x73,0xff,0xff,0x7d,0x7d,0xdd,0xff,0x63,0x41,0xff,0xff,0x5f,0x5f,0xff,0xff,0x59,0x59,0xdd,0xff,0x63,0x41,0xff,0xff,0x79,0x79,0xff,0xff,0xff,0xff,0xff,0xff,0x79,0x79,0xdd,0xff,0x63,0x41,0xff,0xff,0x59,0x59,0xff,0xff,0x5f,0x5f,0xf5,0xff,0x5b,0x51,0xff,0xff,0x55,0x55,0xff,0xff,0x55,0x55,0xff,0xff,0x55,0x55,0xd7,0xff,0x6d,0x45,0xff,0xff,0xff,0xff,0xff,0xff,0x63,0x63,0xff,0xff,0x63,0x63,0xff,0xff,0x77,0x77,0xff,0xff,0x73,0x73,0xff,0xff,0x65,0x65,0xfd,0xff,0x57,0x55,0xff,0xff,0x77,0x77,0xff,0xff,0x63,0x63,0xeb,0xff,0x77,0x63,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x51,0x51,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0x7f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0x40,0x40,0xff,0xff,0x20,0x20,0xff,0xff,0x10,0x10,0xff,0xff,0x08,0x08,0xff,0xff,0x10,0x10,0xff,0xff,0x08,0x08,0xff,0xff,0x06,0x06,0xff,0xff,0x18,0x18,0xff,0xff,0xe0,0xe0, diff --git a/radio/src/bitmaps/logo_taranis.lbm b/radio/src/bitmaps/logo_taranis.lbm deleted file mode 100644 index abf5d8db6..000000000 --- a/radio/src/bitmaps/logo_taranis.lbm +++ /dev/null @@ -1,5 +0,0 @@ -64,32, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x59,0x09,0x0b,0x02,0x46,0x1a,0x49,0x2b,0x0d,0x53,0x48,0x2b,0x28,0x2c,0x52,0x4b,0x9f,0x84,0xdb,0x52,0xaa,0x14,0xb2,0x96,0x38,0x2e,0x66,0x24,0xf0,0x48,0xcc,0xcc,0xb4,0x98,0x98,0x18,0xf8,0x20,0x30,0x70,0xe0,0xe0,0xe0,0xc0,0x80,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xe0,0xc0,0xe0,0xc0,0xf8,0xf8,0xf8,0xf0,0xfd,0xfd,0xfc,0xfe,0xbe,0x7e,0xff,0x7f,0x1e,0x3e,0x3f,0x3f,0x0a,0x36,0x37,0x33,0x32,0x11,0x33,0x33,0x32,0x31,0x33,0x33,0x12,0x11,0x33,0x33,0x92,0x03,0x83,0x03,0xc1,0xe3,0xe0,0xc3,0xfc,0xfc,0xf0,0xf8,0xfc,0xf8,0xf8,0xfc,0x7c,0xf8,0x38,0x7c,0x38,0x18,0x18,0x1c,0x18,0x08,0x0c,0x18,0x1c,0x1c,0x1c,0x08,0x0c,0x18,0x08,0x1c,0x04,0x00,0x00,0x0c,0x00,0x00,0x03,0x01,0x00,0x04,0x03,0x02,0x00,0x01,0x00,0x00,0x07,0x03,0x03,0x03,0x01,0x03,0x00,0x00,0x05,0x03,0x03,0x03,0x53,0x23,0x40,0x23,0x30,0x78,0x70,0x78,0x3e,0x7e,0x7e,0x7c,0x3e,0x7f,0x7f,0x7e,0x3f,0x7f,0x7e,0x7f,0xfe,0x7a,0xf7,0xfb,0xf2,0xf9,0xf3,0xfb,0xf2,0xf9,0xf3,0xfb,0xfa,0xf9,0xf3,0xfb,0x5a,0x71,0x33,0x3b,0x02,0x13,0x03,0x03,0xc3,0xe0,0x83,0xc0,0xf0,0xe0,0xf8,0xf0,0xfa,0xfd,0xfe,0xfc,0x7e,0x7e,0x7f,0xff,0x3e,0x3e,0x7f,0x3f,0xf2,0x36,0x3b,0xf7,0xf9,0xf9,0xfa,0xf1,0xf8,0xfc,0xfc,0xf8,0xfe,0xfe,0xfc,0xfc,0xf2,0xa7,0xc2,0x06,0x02,0x03,0x03,0x03,0x03,0x02,0x01,0x01,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x00,0x00,0x86,0xf6,0xef,0x9f,0xfe,0xfe,0xff,0xff,0xfe,0xfe,0xff,0xff,0x7e,0xfe,0xff,0xff,0x31,0x71,0x36,0x38,0x18,0x30,0x10,0x18,0x08,0x1c,0x08,0x0c,0x06,0x04,0x0c,0x06,0x06,0x03,0x06,0x03,0x03,0x03,0x03,0x01,0x00,0x00,0x01,0x00, -0xf8,0xfa,0xfa,0xf8,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xf9,0xf9,0xfb,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xfa,0xfa,0xf8,0xfb,0xfb,0xfb,0xfb,0x7b,0xfb,0xfb,0x7b,0xbb,0x7b,0xfb,0x3b,0x7a,0xb8,0xbb,0xb9,0x78,0xb8,0xb8,0xb8,0xb8,0x78,0xf8,0x38,0x78,0xf8,0xf8,0x78,0xf8,0xf8,0xf8,0xf8,0x38,0x38,0x38,0x38,0xb8,0xb8,0xb8,0xb8,0x78,0x38,0xb8,0xb8,0xb8,0x78,0x38,0x78,0xf8,0xf8,0xf8,0xf8,0x38,0x38,0x38,0x38,0xba,0xb8,0xb8,0xb8,0xbb,0xba,0xbb,0xbb,0xba,0xba,0xbb,0xbb,0xfa,0xfb,0xfa,0xfb,0x3a,0x3b,0x3a,0x3b,0x7a,0x7b,0x7a,0x3b,0x7b,0xfb,0xfa,0x7b,0xfb,0xfb,0xfb,0xfb,0xf9,0xfb,0xfb,0xfb,0x3b,0x39,0x3b,0x39,0xf9,0xf9,0xf8,0xf8,0xf8,0xfa,0xf8,0x78,0xfb,0xfb,0xfa,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0x9b,0x99,0x99,0x9b,0x9b,0x98,0x98,0x98,0x98,0x18,0x18,0x18,0x18,0x1a,0x1b,0x1a,0x19,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0xfb,0xfb,0xfb,0x9b,0xfa,0xf9,0xfa,0xdb,0xd8,0x58,0x98,0x98,0x18,0x18,0x18,0x18,0x78,0x78,0x18,0x38,0x7a,0x78,0xf8,0x78,0x58,0x1b,0x1b,0x3a,0x9b,0x1b,0x1b,0x1b,0x5b,0x9b,0xdb,0x9b,0xdb,0xfb,0xdb,0xfb,0xfa,0xf8,0xf9,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8,0xf8, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0xfc,0xfc,0xd8,0xf4,0xfb,0xff,0xd3,0xfb,0xf7,0xf7,0xd7,0xfb,0xf7,0xf7,0xd7,0xf4,0xfb,0xff,0xd3,0xfb,0xfc,0xfc,0xd8,0xff,0xff,0xff,0xdf,0xf0,0xf0,0xf0,0xd0,0xfd,0xfd,0xfd,0xdd,0xfc,0xfc,0xfd,0xdd,0xfc,0xfc,0xfc,0xde,0xff,0xff,0xff,0xdf,0xf0,0xf0,0xf0,0xd0,0xf6,0xf6,0xf6,0xd6,0xf6,0xf6,0xf6,0xd6,0xf6,0xf7,0xf6,0xd6,0xff,0xff,0xff,0xdf,0xf0,0xf0,0xf0,0xd0,0xff,0xfe,0xff,0xde,0xfe,0xfc,0xfe,0xdc,0xf9,0xfc,0xfd,0xd8,0xfb,0xf9,0xfb,0xd1,0xf0,0xf0,0xf0,0xd0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xeb,0xdf,0xff,0xdf,0xd7,0xcf,0xc7,0xcf,0xc7,0xe0,0xc6,0xc3,0xe8,0xe0,0xe0,0xf0,0xf8,0xf8,0xf0,0xf8,0xc2,0xf0,0xf0,0xe0,0xc7,0xc7,0xc6,0xc3,0xd7,0xc7,0xcf,0xcf,0xff,0xdf,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, diff --git a/radio/src/bitmaps/splash_9x.lbm b/radio/src/bitmaps/splash_9x.lbm deleted file mode 100644 index 4441422ee..000000000 --- a/radio/src/bitmaps/splash_9x.lbm +++ /dev/null @@ -1,9 +0,0 @@ -128,64, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0xff,0xff,0xe7,0xc7,0x07,0x07,0x07,0x07,0x07,0x07,0x1f,0x7f,0xff,0xff,0xff,0x3f,0x0f,0x07,0x07,0x07,0x07,0x07,0x87,0xe7,0xf7,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x07,0x03,0x03,0xc1,0xf1,0xf8,0xf8,0xf8,0xf8,0xf0,0xf1,0xc1,0x03,0x03,0x07,0x1f,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xf8,0xf8,0xf8,0x70,0x00,0x01,0x03,0x07,0xff,0xff,0x00,0x00,0x00,0x00,0x38,0x38,0x38,0x38,0x38,0x38,0xff,0xff,0x00,0x00,0x00,0x00,0x81,0x03,0x0f,0x1f,0x3f,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0x00,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0xfe,0xf8,0xf0,0xc0,0x80,0x00,0x00,0x01,0x03,0x00,0x00,0x00,0xc0,0xe0,0xf8,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0xe0,0xc0,0xc0,0x83,0x8f,0x1f,0x1f,0x1f,0x1f,0x1f,0x8f,0x83,0xc0,0xc0,0xe0,0xf8,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xf8,0xf8,0xf8,0xf8,0xf8,0xfc,0xfc,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xfc,0xf8,0xf0,0xc0,0x81,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0x00,0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x1f,0x0f,0x03,0x01,0x00,0x00,0x80,0xe0,0xf0,0xc0,0x00,0x00,0x00,0x03,0x07,0x1f,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xe7,0xe1,0xe0,0xe0,0xe0,0xe0,0xe0,0xf0,0xf8,0xfe,0xff,0xff,0xff,0xff,0xff,0xfc,0xf8,0xe0,0xe0,0xe0,0xe0,0xe0,0xe1,0xe7,0xef,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, diff --git a/radio/src/bitmaps/splash_taranis.lbm b/radio/src/bitmaps/splash_taranis.lbm deleted file mode 100644 index 87b04381a..000000000 --- a/radio/src/bitmaps/splash_taranis.lbm +++ /dev/null @@ -1,9 +0,0 @@ -212,64, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0x7f,0x3f,0x3f,0x7f,0x1f,0x3f,0x3f,0x1f,0x1f,0x0f,0x0f,0x1f,0x1f,0x07,0x0f,0x0f,0x07,0x0f,0x0f,0x07,0x07,0x03,0x07,0x07,0x03,0x03,0x03,0x07,0x07,0x03,0x07,0x03,0x83,0x07,0x83,0x03,0x03,0x03,0x03,0x83,0x03,0x03,0x03,0x83,0x83,0x07,0x83,0x03,0x07,0x03,0x07,0x03,0x03,0x03,0x03,0x07,0x07,0x03,0x07,0x07,0x07,0x0f,0x0f,0x07,0x1f,0x07,0x0f,0x0f,0x1f,0x0f,0x0f,0x1f,0x1f,0x3f,0x3f,0x1f,0x7f,0x3f,0x3f,0x7f,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x03,0x03,0xff,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x83,0x83,0x83,0xc3,0x83,0x83,0x83,0xc3,0xc3,0xc3,0xc3,0x83,0x83,0xc3,0x83,0x83,0x03,0x83,0x87,0x03,0x07,0x03,0x07,0x03,0x07,0x03,0x03,0x07,0x07,0x0f,0x07,0x07,0x1f,0x0f,0x07,0x0f,0x0f,0x2f,0x1f,0x1f,0x3f,0x7f,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x43,0x03,0x83,0x83,0x83,0xc3,0x83,0x83,0x83,0xc3,0x83,0x83,0x83,0xc3,0x83,0x83,0x83,0xc3,0x83,0x83,0x83,0xc3,0x83,0x83,0x83,0xc3,0x83,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x03,0x03,0xff,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x0b,0x07,0x03,0x07,0x0f,0x07,0x1f,0x0f,0x1f,0x1f,0x1f,0x3f,0xbf,0xbf,0x7f,0x7f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0x03,0xff,0xff,0xff,0xff,0xfb,0x07,0xf7,0xf7,0xff,0x0f,0xcf,0xdf,0xdf,0x3f,0xdf,0xbf,0xbf,0x7f,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0xff,0xff,0xff,0x03,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfb,0xfb,0xff,0xff,0xf3,0xf3,0xf3,0xfb,0xf3,0xd3,0xe3,0xe3,0xc3,0x83,0x83,0xc3,0x83,0x03,0x83,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x07,0x0b,0x03,0x07,0x3f,0x0f,0x0f,0x1f,0xff,0x3f,0x3f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0x7f,0xff,0x5f,0x1f,0x1f,0x3f,0x17,0x07,0x07,0x0f,0x07,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x83,0x43,0x83,0x83,0xe3,0xe3,0xe3,0xc3,0xe3,0xeb,0xf3,0xf3,0xfb,0xff,0xff,0xfb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x4f,0x09,0x7b,0x87,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x38,0x74,0xf8,0xfc,0xfc,0xfc,0xfe,0xff,0xfe,0xff,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xfe,0xff,0xfe,0xfc,0xfc,0xfc,0xfe,0xf0,0x38,0x74,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x4f,0x09,0x7b,0x87,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x0f,0x1f,0x0f,0x1f,0x17,0x0e,0x07,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x00,0xc0,0xc0,0x80,0xe0,0xc8,0xef,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x07,0x07,0x07,0x0f,0x07,0x07,0x07,0x0f,0x07,0x07,0x07,0x0f,0x07,0x07,0x07,0x0f,0x07,0x07,0x07,0x0f,0x07,0x0f,0x0f,0xff,0x07,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xf8,0xf8,0xf0,0xd0,0xd0,0xe0,0xe0,0xa0,0x80,0x80,0xc0,0x80,0x00,0x80,0x00,0x01,0x01,0x01,0x00,0x05,0x03,0x01,0x03,0x03,0x07,0x0f,0x07,0x0f,0x0f,0x0f,0x1f,0x5f,0x5f,0x3f,0x3f,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xfe,0xfe,0xff,0x01,0xfb,0xf9,0xfb,0x07,0xfb,0xf7,0xf7,0x0f,0xef,0xff,0xef,0x1f,0x5f,0xdf,0x7f,0xbf,0xbf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xfe,0xfc,0xfe,0xf8,0xfc,0xfc,0xf8,0xe0,0xe8,0xf0,0xf0,0xc0,0xc0,0xc0,0xe0,0xc0,0x40,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x01,0x07,0x03,0x03,0x07,0x02,0x03,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x80,0x00,0xa0,0xc0,0x80,0xc0,0xc0,0xe0,0xf0,0xe0,0xf8,0xf0,0xf0,0xf8,0xfe,0xfa,0xfc,0xfc,0xfe,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xfe,0xff,0xfa,0xf4,0xfc,0xf8,0xf8,0xe0,0xe0,0xf0,0xc0,0xe0,0xe0,0xc0,0x80,0x80,0x80,0xc0,0x00,0x00,0x80,0x80,0x00,0x01,0x80,0x00,0x01,0x03,0x03,0x01,0x07,0x03,0x07,0x03,0x07,0x03,0x07,0x07,0x0f,0x07,0x0f,0x07,0x07,0x07,0x07,0x0f,0x07,0x07,0x07,0x0f,0x0f,0x07,0x0f,0x07,0x07,0x03,0x07,0x07,0x07,0x03,0x07,0x03,0x01,0x03,0x03,0x01,0x00,0x01,0x80,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0xc0,0xc0,0xe0,0xe0,0xc0,0xf8,0xe0,0xe0,0xf0,0xfa,0xf4,0xfc,0xf8,0xfe,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfc,0xfc,0xfe,0xfc,0xfc,0xfc,0xfe,0xfc,0xfc,0xfc,0xfe,0xfc,0xfc,0xfc,0xfe,0xfc,0xfc,0xfc,0xfe,0xfe,0xfe,0xfc,0xfe,0xff,0xfe,0xfe,0xfe,0xff,0xff,0xff,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x0f,0x0f,0x0f,0x1f,0x0f,0x0f,0x0f,0x1f,0x0f,0x0f,0x0f,0x1f,0x0f,0x0f,0x0f,0x1f,0x0f,0x0f,0x0f,0x1f,0x0f,0x0f,0x0f,0x1f,0x0f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfd,0xfe,0xfc,0xfe,0xf4,0xfc,0xfc,0xf8,0xe8,0xe8,0xf0,0xf0,0xc0,0xc0,0xc0,0xe0,0x00,0x80,0xc0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x7f,0x7f,0x7f,0x80,0x3f,0xff,0xbf,0xc0,0xcf,0xcf,0xef,0xf0,0xef,0xf7,0xf7,0xf8,0xff,0xff,0xfb,0xfc,0xfe,0xfc,0xfe,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0x7f,0x7f,0x1f,0x3f,0x1f,0x3f,0x1f,0x0f,0x1f,0x0f,0x03,0x0b,0x07,0x07,0x01,0x01,0x01,0x03,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xc0,0xc0,0xe0,0x00,0xc0,0xc0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x02,0x01,0x01,0x03,0x03,0x03,0x07,0x07,0x17,0x0f,0x0f,0x1f,0x3f,0x3f,0x1f,0xff,0x7f,0x3f,0x7f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x0f,0x1f,0xff,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xee,0xff,0x1f,0xee,0xee,0xfe,0x1f,0xee,0xee,0xff,0x1e,0xee,0xef,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xef,0xfe,0x1e,0xee,0xee,0xff,0x1e,0xee,0xee,0xfe,0x1f,0xef,0xee,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xee,0xee,0xfe,0x1f,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xee,0xee,0xfe,0x1f,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xef,0xef,0xff,0x1f,0xee,0xef,0xfe,0x1f,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xee,0xee,0xfe,0x1e,0xfe,0x0e,0x1e,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xe0,0xff,0xff,0xe7,0xe7,0xf7,0xf8,0xf7,0xfb,0xfb,0xfc,0xff,0xff,0xfd,0xfe,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0x7f,0x1f,0x5f,0x3f,0x3f,0x0f,0x0f,0x0f,0x1f,0x03,0x07,0x0f,0x07,0x07,0x03,0x01,0x03,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x80,0x80,0xc0,0xc0,0xf0,0xf0,0xe0,0xf4,0xf4,0xf8,0xf8,0xfc,0xff,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0xfe,0xff,0xf8,0xfe,0xf8,0xfc,0xe8,0xe8,0xf0,0xf0,0xa0,0xc0,0xe0,0xc0,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x03,0x01,0x01,0x03,0x0f,0x0b,0x07,0x07,0x1f,0x1f,0x1f,0x0f,0x5f,0x1f,0x3f,0x3f,0xff,0x7f,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, -0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, diff --git a/radio/src/bitmaps/sticks.lbm b/radio/src/bitmaps/sticks.lbm deleted file mode 100644 index 55cbe58ef..000000000 --- a/radio/src/bitmaps/sticks.lbm +++ /dev/null @@ -1,5 +0,0 @@ -18,8, -0x00,0x10,0x38,0x10,0x10,0x10,0x38,0x10,0x00,0x00,0x10,0x44,0x00,0x92,0x00,0x44,0x10,0x00, -0x00,0x00,0x00,0x00,0x44,0xfe,0x44,0x00,0x00,0x00,0x10,0x44,0x00,0x92,0x00,0x44,0x10,0x00, -0x00,0x10,0x44,0x00,0x92,0x00,0x44,0x10,0x00,0x00,0x00,0x44,0xfe,0x44,0x00,0x00,0x00,0x00, -0x00,0x10,0x44,0x00,0x92,0x00,0x44,0x10,0x00,0x00,0x10,0x38,0x10,0x10,0x10,0x38,0x10,0x00, diff --git a/radio/src/eeprom_conversions.cpp b/radio/src/eeprom_conversions.cpp index 9bff69abf..b78db9acb 100644 --- a/radio/src/eeprom_conversions.cpp +++ b/radio/src/eeprom_conversions.cpp @@ -131,6 +131,22 @@ PACK(typedef struct { gvar_t gvars[5]; }) PhaseData_v215; +PACK(typedef struct { + FrSkyChannelData channels[2]; + uint8_t usrProto; // Protocol in FrSky user data, 0=None, 1=FrSky hub, 2=WS HowHigh, 3=Halcyon + uint8_t voltsSource; + uint8_t blades; // How many blades for RPMs, 0=2 blades, 1=3 blades + uint8_t currentSource; + uint8_t screensType; + FrSkyScreenData screens[MAX_FRSKY_SCREENS]; + uint8_t varioSource; + int8_t varioCenterMax; + int8_t varioCenterMin; + int8_t varioMin; + int8_t varioMax; + FrSkyRSSIAlarm rssiAlarms[2]; +}) FrSkyData_v215; + PACK(typedef struct { ModelHeader header; TimerData_v215 timers[MAX_TIMERS]; @@ -162,9 +178,9 @@ PACK(typedef struct { swstate_t switchWarningStates; - char gvar_names[5][LEN_GVAR_NAME]; + char gvar_names[5][LEN_GVAR_NAME]; - TELEMETRY_DATA + FrSkyData_v215 frsky; ROTARY_ENCODER_ARRAY_EXTRA @@ -224,7 +240,7 @@ void ConvertModel_215_to_216(ModelData &model) } g_model.protocol = oldModel.protocol; g_model.thrTrim = oldModel.thrTrim; - g_model.trimInc = oldModel.trimInc; + g_model.trimInc = oldModel.trimInc - 2; g_model.disableThrottleWarning = oldModel.disableThrottleWarning; g_model.extendedLimits = oldModel.extendedLimits; g_model.extendedTrims = oldModel.extendedTrims; @@ -443,7 +459,8 @@ void ConvertModel_215_to_216(ModelData &model) for (uint8_t i=0; i<5; i++) { memcpy(g_model.gvars[i].name, oldModel.gvar_names[i], LEN_GVAR_NAME); } - g_model.frsky = oldModel.frsky; + + memcpy(&g_model.frsky, &oldModel.frsky, sizeof(oldModel.frsky)); #if defined(PCBTARANIS) g_model.externalModule = oldModel.externalModule; diff --git a/radio/src/fonts/.gitignore b/radio/src/fonts/.gitignore new file mode 100644 index 000000000..6deff3475 --- /dev/null +++ b/radio/src/fonts/.gitignore @@ -0,0 +1 @@ +/*/*.lbm diff --git a/radio/src/fonts/sqt5/font_04x06.lbm b/radio/src/fonts/sqt5/font_04x06.lbm deleted file mode 100644 index 14e2a2c69..000000000 --- a/radio/src/fonts/sqt5/font_04x06.lbm +++ /dev/null @@ -1,6 +0,0 @@ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x14,0x3e,0x14,0x3e,0x14,0x04,0x2a,0x3e,0x2a,0x10,0x13,0x08,0x04,0x32,0x00,0x14,0x2a,0x14,0x20,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x1e,0x21,0x00,0x00,0x00,0x21,0x1e,0x00,0x00,0x00,0x2a,0x1c,0x2a,0x00,0x08,0x08,0x3e,0x08,0x08,0x00,0x40,0x30,0x10,0x00,0x08,0x08,0x08,0x08,0x00,0x00,0x30,0x30,0x00,0x00,0x10,0x08,0x04,0x02,0x00, -0x00,0x1e,0x21,0x1e,0x00,0x00,0x22,0x3f,0x20,0x00,0x22,0x31,0x29,0x26,0x00,0x21,0x25,0x25,0x1a,0x00,0x0c,0x0a,0x3f,0x08,0x00,0x17,0x25,0x25,0x19,0x00,0x1e,0x25,0x25,0x18,0x00,0x01,0x31,0x0d,0x03,0x00,0x1a,0x25,0x25,0x1a,0x00,0x06,0x29,0x29,0x1e,0x00,0x00,0x36,0x36,0x00,0x00,0x00,0x36,0x16,0x00,0x00,0x00,0x08,0x14,0x22,0x00,0x14,0x14,0x14,0x14,0x00,0x00,0x22,0x14,0x08,0x00,0x00,0x02,0x29,0x06,0x00, -0x00,0x02,0x05,0x02,0x00,0x3e,0x09,0x09,0x3e,0x00,0x3f,0x25,0x27,0x3c,0x00,0x1e,0x21,0x21,0x21,0x00,0x3f,0x21,0x21,0x1e,0x00,0x3f,0x25,0x25,0x21,0x00,0x3f,0x05,0x05,0x01,0x00,0x1e,0x21,0x29,0x39,0x00,0x3f,0x04,0x04,0x3f,0x00,0x00,0x21,0x3f,0x21,0x00,0x10,0x20,0x21,0x1f,0x00,0x3f,0x0c,0x12,0x21,0x00,0x3f,0x20,0x20,0x20,0x00,0x3f,0x01,0x07,0x01,0x3f,0x3f,0x01,0x01,0x3e,0x00,0x1e,0x21,0x21,0x1e,0x00, -0x3f,0x09,0x09,0x0f,0x00,0x3f,0x21,0x31,0x3f,0x00,0x3f,0x09,0x0f,0x38,0x00,0x22,0x25,0x25,0x19,0x00,0x00,0x01,0x3f,0x01,0x00,0x1f,0x20,0x20,0x1f,0x00,0x3f,0x20,0x10,0x0f,0x00,0x3f,0x20,0x18,0x20,0x3f,0x37,0x08,0x08,0x37,0x00,0x00,0x07,0x38,0x07,0x00,0x31,0x29,0x25,0x23,0x00,0x00,0x3f,0x21,0x21,0x00,0x02,0x04,0x08,0x10,0x00,0x00,0x21,0x21,0x3f,0x00,0x00,0x02,0x01,0x02,0x00,0x20,0x20,0x20,0x20,0x00, -0x00,0x01,0x02,0x00,0x00,0x3a,0x2a,0x2a,0x3e,0x00,0x3f,0x22,0x22,0x3e,0x00,0x3e,0x22,0x22,0x22,0x00,0x3e,0x22,0x22,0x3f,0x00,0x3e,0x2a,0x2a,0x2e,0x00,0x28,0x3f,0x29,0x01,0x00,0x2e,0x2a,0x2a,0x3e,0x00,0x3f,0x02,0x02,0x3e,0x00,0x00,0x24,0x3d,0x20,0x00,0x00,0x40,0x44,0x3d,0x00,0x3f,0x08,0x14,0x22,0x00,0x00,0x21,0x3f,0x20,0x00,0x3e,0x02,0x3e,0x02,0x3c,0x3e,0x02,0x02,0x3c,0x00,0x1c,0x22,0x22,0x1c,0x00, -0x3e,0x12,0x12,0x1e,0x00,0x1e,0x12,0x12,0x3e,0x00,0x3e,0x02,0x02,0x04,0x00,0x2e,0x2a,0x2a,0x3a,0x00,0x00,0x1f,0x24,0x20,0x00,0x3e,0x20,0x20,0x3e,0x00,0x3e,0x20,0x10,0x0e,0x00,0x3e,0x20,0x10,0x20,0x3e,0x36,0x08,0x08,0x36,0x00,0x2e,0x28,0x28,0x3e,0x00,0x22,0x32,0x2a,0x26,0x00,0x00,0x04,0x1e,0x21,0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x21,0x1e,0x04,0x00,0x08,0x2a,0x1c,0x08,0x00,0x00,0x08,0x1c,0x2a,0x08, diff --git a/radio/src/fonts/sqt5/font_04x06.png b/radio/src/fonts/sqt5/font_04x06.png index f60c60c5a..07cdcbddd 100644 Binary files a/radio/src/fonts/sqt5/font_04x06.png and b/radio/src/fonts/sqt5/font_04x06.png differ diff --git a/radio/src/fonts/sqt5/font_05x07.lbm b/radio/src/fonts/sqt5/font_05x07.lbm deleted file mode 100644 index 8cca7ef14..000000000 --- a/radio/src/fonts/sqt5/font_05x07.lbm +++ /dev/null @@ -1,6 +0,0 @@ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6f,0x00,0x00,0x07,0x00,0x07,0x00,0x18,0x30,0x18,0x0c,0x06,0x3e,0x7f,0x7b,0x7f,0x3e,0x23,0x13,0x08,0x64,0x62,0x36,0x49,0x55,0x22,0x50,0x00,0x05,0x03,0x00,0x00,0x00,0x1c,0x22,0x41,0x00,0x00,0x41,0x22,0x1c,0x00,0x14,0x08,0x3e,0x08,0x14,0x08,0x08,0x3e,0x08,0x08,0x00,0x50,0x30,0x00,0x00,0x00,0x08,0x08,0x08,0x08,0x00,0x60,0x60,0x00,0x00,0x20,0x10,0x08,0x04,0x02, -0x00,0x3e,0x41,0x41,0x3e,0x00,0x00,0x42,0x7f,0x40,0x00,0x62,0x51,0x49,0x46,0x00,0x41,0x49,0x49,0x36,0x00,0x18,0x14,0x12,0x7f,0x00,0x27,0x45,0x45,0x39,0x00,0x3e,0x49,0x49,0x32,0x00,0x01,0x79,0x05,0x03,0x00,0x36,0x49,0x49,0x36,0x00,0x06,0x49,0x29,0x1e,0x00,0x00,0x36,0x36,0x00,0x00,0x00,0x56,0x36,0x00,0x00,0x08,0x14,0x22,0x41,0x14,0x14,0x14,0x14,0x14,0x41,0x22,0x14,0x08,0x00,0x03,0x01,0x51,0x09,0x07, -0x06,0x09,0x09,0x06,0x00,0x7e,0x09,0x09,0x09,0x7e,0x7f,0x49,0x49,0x4f,0x78,0x3e,0x41,0x41,0x41,0x41,0x7f,0x41,0x41,0x41,0x3e,0x7f,0x49,0x49,0x49,0x41,0x7f,0x09,0x09,0x09,0x01,0x3e,0x41,0x49,0x49,0x79,0x7f,0x08,0x08,0x08,0x7f,0x00,0x41,0x7f,0x41,0x00,0x00,0x40,0x41,0x3f,0x01,0x7f,0x08,0x14,0x22,0x41,0x7f,0x40,0x40,0x40,0x40,0x7f,0x01,0x0f,0x01,0x7f,0x7f,0x01,0x01,0x01,0x7e,0x3e,0x41,0x41,0x41,0x3e, -0x7f,0x09,0x09,0x09,0x06,0x3e,0x41,0x51,0x21,0x5e,0x7f,0x09,0x09,0x0f,0x78,0x46,0x49,0x49,0x49,0x31,0x01,0x01,0x7f,0x01,0x01,0x3f,0x40,0x40,0x40,0x3f,0x7f,0x40,0x20,0x10,0x0f,0x7f,0x40,0x30,0x40,0x7f,0x63,0x14,0x08,0x14,0x63,0x0f,0x08,0x78,0x08,0x0f,0x61,0x51,0x49,0x45,0x43,0x00,0x7f,0x41,0x41,0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x41,0x41,0x7f,0x00,0x04,0x02,0x01,0x02,0x04,0x40,0x40,0x40,0x40,0x40, -0x00,0x01,0x02,0x04,0x00,0x74,0x54,0x54,0x54,0x7c,0x7f,0x44,0x44,0x44,0x7c,0x7c,0x44,0x44,0x44,0x44,0x7c,0x44,0x44,0x44,0x7f,0x7c,0x54,0x54,0x54,0x5c,0x00,0x44,0x7f,0x45,0x01,0x5c,0x54,0x54,0x54,0x7c,0x7f,0x04,0x04,0x04,0x7c,0x00,0x44,0x7d,0x40,0x00,0x00,0x40,0x44,0x3d,0x00,0x7f,0x10,0x28,0x44,0x00,0x00,0x41,0x7f,0x40,0x00,0x7c,0x04,0x1c,0x04,0x7c,0x7c,0x04,0x04,0x04,0x78,0x38,0x44,0x44,0x44,0x38, -0x7c,0x14,0x14,0x14,0x1c,0x1c,0x14,0x14,0x14,0x7c,0x7c,0x04,0x04,0x04,0x0c,0x5c,0x54,0x54,0x54,0x74,0x00,0x3f,0x44,0x40,0x00,0x7c,0x40,0x40,0x40,0x7c,0x7c,0x40,0x20,0x10,0x0c,0x7c,0x40,0x20,0x40,0x7c,0x44,0x28,0x10,0x28,0x44,0x5c,0x50,0x50,0x50,0x7c,0x44,0x64,0x54,0x4c,0x44,0x10,0x08,0x10,0x08,0x00,0x7f,0x00,0x00,0x00,0x00,0x41,0x22,0x54,0x28,0x00,0x08,0x08,0x22,0x1c,0x08,0x08,0x1c,0x22,0x08,0x08, diff --git a/radio/src/fonts/sqt5/font_05x07.png b/radio/src/fonts/sqt5/font_05x07.png index c1ff4651b..01f19e8ea 100644 Binary files a/radio/src/fonts/sqt5/font_05x07.png and b/radio/src/fonts/sqt5/font_05x07.png differ diff --git a/radio/src/fonts/sqt5/font_05x07_B_compressed.png b/radio/src/fonts/sqt5/font_05x07_B_compressed.png new file mode 100644 index 000000000..8e4ac6632 Binary files /dev/null and b/radio/src/fonts/sqt5/font_05x07_B_compressed.png differ diff --git a/radio/src/fonts/sqt5/font_08x10.lbm b/radio/src/fonts/sqt5/font_08x10.lbm deleted file mode 100644 index 030669b28..000000000 --- a/radio/src/fonts/sqt5/font_08x10.lbm +++ /dev/null @@ -1,6 +0,0 @@ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x05,0xfe,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x0e,0x00,0x00,0x00,0x0e,0x00,0x0e,0x00,0x00,0x00,0x00,0x00,0x90,0x00,0xfc,0x03,0xfc,0x03,0x90,0x00,0xfc,0x03,0xfc,0x03,0x90,0x00,0x00,0x00,0x38,0x02,0x7c,0x06,0x64,0x04,0xfe,0x0f,0xc4,0x04,0xcc,0x07,0x88,0x03,0x1c,0x02,0x14,0x03,0x9c,0x01,0xc0,0x00,0x60,0x00,0xb0,0x03,0x98,0x02,0x88,0x03,0x80,0x03,0xdc,0x07,0x7e,0x04,0x72,0x04,0xde,0x06,0x8c,0x03,0x80,0x07,0xc0,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0xfc,0x03,0x0e,0x07,0x03,0x0c,0x01,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x08,0x03,0x0c,0x0e,0x07,0xfc,0x03,0xf0,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x50,0x01,0xf0,0x01,0xe0,0x00,0xf0,0x01,0x50,0x01,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0xf8,0x03,0xf8,0x03,0x40,0x00,0x40,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x09,0x80,0x0f,0x80,0x07,0x00,0x00,0x00,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x0e,0x00,0x0e,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x03,0x80,0x01,0xc0,0x00,0x60,0x00,0x30,0x00,0x18,0x00,0x08,0x00, -0xfc,0x03,0xfe,0x07,0x02,0x04,0x02,0x04,0xfe,0x07,0xfc,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x07,0xfe,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8c,0x07,0xce,0x07,0x62,0x04,0x22,0x04,0x3e,0x04,0x1c,0x04,0x00,0x00,0x00,0x00,0x02,0x04,0x02,0x04,0x22,0x04,0x22,0x04,0xfe,0x07,0xdc,0x03,0x00,0x00,0x00,0x00,0x1e,0x00,0x3e,0x00,0x20,0x00,0x20,0x00,0xfe,0x07,0xfe,0x07,0x00,0x00,0x00,0x00,0x1e,0x03,0x3e,0x07,0x22,0x04,0x22,0x04,0xe2,0x07,0xc2,0x03,0x00,0x00,0x00,0x00,0xfc,0x03,0xfe,0x07,0x22,0x04,0x22,0x04,0xee,0x07,0xcc,0x03,0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0xc2,0x07,0xe2,0x07,0x3e,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0xdc,0x03,0xfe,0x07,0x22,0x04,0x22,0x04,0xfe,0x07,0xdc,0x03,0x00,0x00,0x00,0x00,0x3c,0x03,0x7e,0x07,0x42,0x04,0x42,0x04,0xfe,0x07,0xfc,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x03,0x9c,0x03,0x9c,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x9c,0x09,0x9c,0x0f,0x88,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0xf0,0x00,0x98,0x01,0x0c,0x03,0x06,0x06,0x02,0x04,0x00,0x00,0x20,0x01,0x20,0x01,0x20,0x01,0x20,0x01,0x20,0x01,0x20,0x01,0x20,0x01,0x20,0x01,0x00,0x00,0x02,0x04,0x06,0x06,0x0c,0x03,0x98,0x01,0xf0,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x0e,0x00,0x82,0x06,0xc2,0x06,0x62,0x00,0x3e,0x00,0x1c,0x00, -0x00,0x00,0x00,0x00,0x0c,0x00,0x1e,0x00,0x12,0x00,0x12,0x00,0x1e,0x00,0x0c,0x00,0xfc,0x07,0xfe,0x07,0x86,0x00,0x86,0x00,0x86,0x00,0x86,0x00,0xfe,0x07,0xfc,0x07,0xfe,0x07,0xfe,0x07,0x22,0x04,0x22,0x04,0x22,0x04,0x3e,0x04,0xfc,0x07,0xc0,0x03,0xfc,0x03,0xfe,0x07,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0xfe,0x07,0xfe,0x07,0x02,0x04,0x02,0x04,0x02,0x04,0x06,0x06,0xfe,0x07,0xfc,0x03,0xfe,0x07,0xfe,0x07,0x22,0x04,0x22,0x04,0x22,0x04,0x22,0x04,0x02,0x04,0x02,0x04,0xfe,0x07,0xfe,0x07,0x22,0x00,0x22,0x00,0x22,0x00,0x22,0x00,0x02,0x00,0x02,0x00,0xfc,0x03,0xfe,0x07,0x02,0x04,0x02,0x04,0x42,0x04,0x42,0x04,0xc2,0x07,0xc2,0x03,0xfe,0x07,0xfe,0x07,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0xfe,0x07,0xfe,0x07,0x00,0x00,0x02,0x04,0x02,0x04,0xfe,0x07,0xfe,0x07,0x02,0x04,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x07,0x02,0x04,0x02,0x04,0xfe,0x07,0xfe,0x03,0x02,0x00,0xfe,0x07,0xfe,0x07,0x60,0x00,0xf0,0x00,0x98,0x01,0x0c,0x03,0x06,0x06,0x02,0x04,0xfe,0x07,0xfe,0x07,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0xfc,0x07,0xfe,0x07,0x02,0x00,0x7e,0x00,0x7e,0x00,0x02,0x00,0xfe,0x07,0xfc,0x07,0xfe,0x07,0xfe,0x07,0x02,0x00,0x02,0x00,0x02,0x00,0x06,0x00,0xfc,0x07,0xf8,0x07,0xfc,0x03,0xfe,0x07,0x02,0x04,0x02,0x04,0x02,0x04,0x02,0x04,0xfe,0x07,0xfc,0x03, -0xfe,0x07,0xfe,0x07,0x22,0x00,0x22,0x00,0x22,0x00,0x22,0x00,0x3e,0x00,0x1c,0x00,0xfc,0x03,0xfe,0x07,0x02,0x04,0x82,0x04,0x82,0x05,0x02,0x03,0xfe,0x06,0xfc,0x05,0xfe,0x07,0xfe,0x07,0x22,0x00,0x22,0x00,0x22,0x00,0x3e,0x00,0xfc,0x07,0xc0,0x07,0x1c,0x02,0x3e,0x06,0x22,0x04,0x22,0x04,0x22,0x04,0x22,0x04,0xe6,0x07,0xc4,0x03,0x02,0x00,0x02,0x00,0x02,0x00,0xfe,0x07,0xfe,0x07,0x02,0x00,0x02,0x00,0x02,0x00,0xfe,0x03,0xfe,0x07,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0xfe,0x07,0xfe,0x03,0xfe,0x07,0xfe,0x07,0x00,0x06,0x00,0x03,0x80,0x01,0xc0,0x00,0x7e,0x00,0x3e,0x00,0xfe,0x07,0xfe,0x07,0x00,0x06,0xe0,0x03,0xe0,0x03,0x00,0x06,0xfe,0x07,0xfe,0x07,0x06,0x06,0x0e,0x07,0x98,0x01,0xf0,0x00,0xf0,0x00,0x98,0x01,0x0e,0x07,0x06,0x06,0x3e,0x00,0x3e,0x00,0x20,0x00,0xe0,0x07,0xe0,0x07,0x20,0x00,0x3e,0x00,0x3e,0x00,0x02,0x07,0x82,0x07,0xc2,0x04,0x62,0x04,0x32,0x04,0x1a,0x04,0x0e,0x04,0x06,0x04,0x00,0x00,0x00,0x00,0xff,0x0f,0xff,0x0f,0x01,0x08,0x01,0x08,0x01,0x08,0x00,0x00,0x0c,0x00,0x1c,0x00,0x38,0x00,0x70,0x00,0xe0,0x00,0xc0,0x01,0x80,0x03,0x00,0x03,0x00,0x00,0x00,0x00,0x01,0x08,0x01,0x08,0x01,0x08,0xff,0x0f,0xff,0x0f,0x00,0x00,0x00,0x00,0x18,0x00,0x0c,0x00,0x06,0x00,0x06,0x00,0x0c,0x00,0x18,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08, -0x00,0x00,0x00,0x00,0x01,0x00,0x03,0x00,0x06,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x90,0x07,0x90,0x07,0x90,0x04,0x90,0x04,0x90,0x04,0xf0,0x07,0xf0,0x07,0x00,0x00,0xfe,0x07,0xfe,0x07,0x10,0x04,0x10,0x04,0x10,0x04,0xf0,0x07,0xf0,0x07,0x00,0x00,0xf0,0x07,0xf0,0x07,0x10,0x04,0x10,0x04,0x10,0x04,0x10,0x04,0x10,0x04,0x00,0x00,0xf0,0x07,0xf0,0x07,0x10,0x04,0x10,0x04,0x10,0x04,0xfe,0x07,0xfe,0x07,0x00,0x00,0xf0,0x07,0xf0,0x07,0x90,0x04,0x90,0x04,0x90,0x04,0xf0,0x04,0xf0,0x04,0x00,0x00,0x40,0x00,0x40,0x04,0xfe,0x07,0xfe,0x07,0x42,0x04,0x06,0x04,0x06,0x00,0x00,0x00,0xf0,0x09,0xf0,0x09,0x10,0x09,0x10,0x09,0x10,0x09,0xf0,0x0f,0xf0,0x0f,0x00,0x00,0xfe,0x07,0xfe,0x07,0x10,0x00,0x10,0x00,0x10,0x00,0xf0,0x07,0xf0,0x07,0x00,0x00,0x10,0x04,0x10,0x04,0xf6,0x07,0xf6,0x07,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x0c,0x00,0x08,0x10,0x08,0xf6,0x0f,0xf6,0x0f,0x00,0x00,0x00,0x00,0xfe,0x07,0xfe,0x07,0xc0,0x00,0xe0,0x01,0x30,0x03,0x18,0x06,0x08,0x04,0x00,0x00,0x00,0x04,0x02,0x04,0xfe,0x07,0xfe,0x07,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00,0xf0,0x07,0xf0,0x07,0x10,0x00,0xf0,0x07,0x10,0x00,0xf0,0x07,0xf0,0x07,0x00,0x00,0xf0,0x07,0xf0,0x07,0x10,0x00,0x10,0x00,0x10,0x00,0xf0,0x07,0xe0,0x07,0x00,0x00,0xe0,0x03,0xf0,0x07,0x10,0x04,0x10,0x04,0x10,0x04,0xf0,0x07,0xe0,0x03,0x00,0x00, -0xf0,0x0f,0xf0,0x0f,0x10,0x01,0x10,0x01,0x10,0x01,0xf0,0x01,0xf0,0x01,0x00,0x00,0xf0,0x01,0xf0,0x01,0x10,0x01,0x10,0x01,0x10,0x01,0xf0,0x0f,0xf0,0x0f,0x00,0x00,0xf0,0x07,0xf0,0x07,0x10,0x00,0x10,0x00,0x10,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0xf0,0x04,0xf0,0x04,0x90,0x04,0x90,0x04,0x90,0x04,0x90,0x07,0x90,0x07,0x00,0x00,0x10,0x00,0xfc,0x07,0xfc,0x07,0x10,0x04,0x00,0x04,0x00,0x06,0x00,0x06,0x00,0x00,0xf0,0x07,0xf0,0x07,0x00,0x04,0x00,0x04,0x00,0x04,0xf0,0x07,0xf0,0x07,0x00,0x00,0xf0,0x07,0xf0,0x07,0x00,0x06,0x00,0x03,0x80,0x01,0xf0,0x00,0x70,0x00,0x00,0x00,0xf0,0x07,0xf0,0x07,0x00,0x06,0x80,0x03,0x00,0x06,0xf0,0x07,0xf0,0x07,0x00,0x00,0x10,0x04,0x30,0x06,0xe0,0x03,0xc0,0x01,0xe0,0x03,0x30,0x06,0x10,0x04,0x00,0x00,0xf0,0x09,0xf0,0x09,0x00,0x09,0x00,0x09,0x00,0x09,0xf0,0x0f,0xf0,0x0f,0x00,0x00,0x10,0x04,0x10,0x06,0x10,0x07,0x90,0x05,0xd0,0x04,0x70,0x04,0x30,0x04,0x00,0x00,0x00,0x00,0x60,0x00,0xfe,0x07,0x9f,0x0f,0x01,0x08,0x01,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x07,0xfe,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x08,0x01,0x08,0x9f,0x0f,0xfe,0x07,0x60,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x64,0x02,0x08,0x01,0xf0,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0xf0,0x00,0x08,0x01,0x64,0x02,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00, diff --git a/radio/src/fonts/sqt5/font_08x10.png b/radio/src/fonts/sqt5/font_08x10.png index b6af45c27..377882c2a 100644 Binary files a/radio/src/fonts/sqt5/font_08x10.png and b/radio/src/fonts/sqt5/font_08x10.png differ diff --git a/radio/src/fonts/sqt5/font_10x14.lbm b/radio/src/fonts/sqt5/font_10x14.lbm deleted file mode 100644 index a53a3e8f0..000000000 --- a/radio/src/fonts/sqt5/font_10x14.lbm +++ /dev/null @@ -1,6 +0,0 @@ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x71,0xfe,0x71,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0x60,0x06,0x60,0x06,0xfe,0x7f,0xfe,0x7f,0x60,0x06,0x60,0x06,0xfe,0x7f,0xfe,0x7f,0x60,0x06,0x60,0x06,0x60,0x18,0xf0,0x18,0x98,0x19,0x98,0x19,0xfe,0x7f,0xfe,0x7f,0x98,0x19,0x98,0x19,0x18,0x0f,0x18,0x06,0x0c,0x18,0x1e,0x1c,0x1e,0x0e,0x0c,0x07,0x80,0x03,0xc0,0x01,0xe0,0x30,0x70,0x78,0x38,0x78,0x18,0x30,0x78,0x1e,0xfc,0x3f,0x8e,0x71,0xc6,0x63,0xe6,0x67,0x76,0x66,0x3c,0x3c,0x18,0x3c,0x00,0x66,0x00,0x66,0x00,0x00,0x00,0x00,0x66,0x00,0x76,0x00,0x3e,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x07,0xf0,0x0f,0x38,0x1c,0x1c,0x38,0x0e,0x70,0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x60,0x0e,0x70,0x1c,0x38,0x38,0x1c,0xf0,0x0f,0xe0,0x07,0x00,0x00,0x00,0x00,0x60,0x06,0x60,0x06,0xc0,0x03,0x80,0x01,0xf8,0x1f,0xf8,0x1f,0x80,0x01,0xc0,0x03,0x60,0x06,0x60,0x06,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xf8,0x1f,0xf8,0x1f,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x66,0x00,0x76,0x00,0x3e,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x78,0x00,0x78,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x1c,0x00,0x0e,0x00,0x07,0x80,0x03,0xc0,0x01,0xe0,0x00,0x70,0x00,0x38,0x00,0x18,0x00, -0x00,0x00,0x00,0x00,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0xfc,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x7e,0x0e,0x7f,0x8e,0x7f,0x86,0x63,0x86,0x61,0xfe,0x61,0xfe,0x61,0xfc,0x60,0x00,0x00,0x00,0x00,0x06,0x60,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0xfe,0x7f,0xfe,0x7f,0xfc,0x3f,0x00,0x00,0x00,0x00,0xfe,0x00,0xfe,0x01,0xfe,0x01,0x80,0x01,0x80,0x01,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x00,0x00,0x00,0x00,0xfe,0x30,0xfe,0x71,0xfe,0x71,0x86,0x61,0x86,0x61,0x86,0x7f,0x86,0x7f,0x06,0x3f,0x00,0x00,0x00,0x00,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0x86,0x61,0x86,0x61,0x8e,0x7f,0x8e,0x7f,0x0c,0x3f,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x86,0x7f,0xc6,0x7f,0xfe,0x7f,0x7e,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0x86,0x61,0x86,0x61,0xfe,0x7f,0xfe,0x7f,0xfc,0x3f,0x00,0x00,0x00,0x00,0x7c,0x30,0xfe,0x71,0xfe,0x71,0x86,0x61,0x86,0x61,0xfe,0x7f,0xfe,0x7f,0xfc,0x3f,0x00,0x00,0x00,0x00,0x78,0x1e,0x78,0x1e,0x78,0x1e,0x78,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x66,0x78,0x76,0x78,0x3e,0x30,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0xc0,0x03,0xe0,0x07,0x70,0x0e,0x38,0x1c,0x1c,0x38,0x0e,0x70,0x06,0x60,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x06,0x60,0x0e,0x70,0x1c,0x38,0x38,0x1c,0x70,0x0e,0xe0,0x07,0xc0,0x03,0x80,0x01,0x00,0x00,0x00,0x00,0x18,0x00,0x1c,0x00,0x0e,0x00,0x06,0x00,0x06,0x66,0x06,0x67,0x86,0x03,0xce,0x01,0xfc,0x00,0x78,0x00, -0x78,0x00,0xfc,0x00,0xce,0x01,0x86,0x01,0x86,0x01,0xce,0x01,0xfc,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0xfc,0x7f,0xfe,0x7f,0xfe,0x7f,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0xfe,0x7f,0xfe,0x7f,0xfc,0x7f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x86,0x61,0x86,0x61,0x86,0x61,0xfe,0x61,0xfe,0x7f,0xfc,0x7f,0x00,0x3f,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x60,0x06,0x60,0x0e,0x70,0xfe,0x7f,0xfe,0x7f,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x06,0x00,0x06,0x00,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x7f,0x86,0x7f,0x80,0x3f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x00,0x00,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x78,0x00,0x78,0x00,0x60,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0xfe,0x3f,0x06,0x00,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0xc0,0x03,0xe0,0x07,0xf0,0x0f,0x78,0x1e,0x3c,0x3c,0x1e,0x78,0x0e,0x70,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0xfc,0x7f,0xfe,0x7f,0xfe,0x7f,0x06,0x00,0xfe,0x01,0xfe,0x01,0x06,0x00,0xfe,0x7f,0xfe,0x7f,0xfc,0x7f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x06,0x00,0x06,0x00,0x06,0x00,0x0e,0x00,0xfc,0x7f,0xf8,0x7f,0xf0,0x7f,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0xfc,0x3f, -0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0xfe,0x01,0xfe,0x01,0xfc,0x00,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x66,0x06,0x6e,0x06,0x1c,0xfe,0x39,0xfe,0x73,0xfc,0x67,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x86,0x01,0x86,0x01,0x86,0x01,0xfe,0x01,0xfe,0x7f,0xfc,0x7f,0x00,0x7f,0xfc,0x38,0xfe,0x79,0xfe,0x79,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x9e,0x7f,0x9e,0x7f,0x1c,0x3f,0x06,0x00,0x06,0x00,0x06,0x00,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xfe,0x3f,0xfe,0x7f,0xfe,0x7f,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0xfe,0x7f,0xfe,0x7f,0xfe,0x3f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x00,0x70,0x00,0x38,0x00,0x1c,0x00,0x0e,0x00,0x07,0xfe,0x03,0xfe,0x01,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x00,0x70,0x00,0x3e,0x00,0x3e,0x00,0x70,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x1e,0x78,0x3e,0x7c,0x7e,0x7e,0xe0,0x07,0xc0,0x03,0xc0,0x03,0xe0,0x07,0x7e,0x7e,0x3e,0x7c,0x1e,0x78,0xfe,0x00,0xfe,0x01,0xfe,0x03,0x00,0x7f,0x00,0x7e,0x00,0x7e,0x00,0x7f,0xfe,0x03,0xfe,0x01,0xfe,0x00,0x06,0x78,0x06,0x7c,0x06,0x7e,0x06,0x67,0x86,0x63,0xc6,0x61,0xe6,0x60,0x7e,0x60,0x3e,0x60,0x1e,0x60,0x00,0x00,0x00,0x00,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x00,0x00,0x00,0x00,0x18,0x00,0x38,0x00,0x70,0x00,0xe0,0x00,0xc0,0x01,0x80,0x03,0x00,0x07,0x00,0x0e,0x00,0x1c,0x00,0x18,0x00,0x00,0x00,0x00,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0x00,0x00,0x00,0x00,0x60,0x00,0x70,0x00,0x38,0x00,0x1c,0x00,0x0e,0x00,0x0e,0x00,0x1c,0x00,0x38,0x00,0x70,0x00,0x60,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60, -0x00,0x00,0x00,0x00,0x06,0x00,0x0e,0x00,0x1c,0x00,0x38,0x00,0x70,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x60,0x7e,0x60,0x7e,0x60,0x7e,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0xe0,0x67,0xe0,0x67,0xe0,0x67,0x80,0x01,0x80,0x61,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x86,0x61,0x06,0x60,0x06,0x00,0x1e,0x00,0x1e,0x00,0xe0,0xcf,0xe0,0xcf,0xe0,0xcf,0x60,0xcc,0x60,0xcc,0x60,0xcc,0x60,0xcc,0xe0,0xff,0xe0,0xff,0xe0,0x7f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x60,0xe6,0x7f,0xe6,0x7f,0xe0,0x7f,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0xf0,0x00,0xf0,0x00,0xf0,0x00,0xc0,0x60,0xc0,0x60,0xc0,0xe6,0xff,0xe6,0xff,0xe0,0x7f,0x00,0x00,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x00,0x0f,0x80,0x1f,0xc0,0x39,0xe0,0x70,0x70,0x60,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x00,0xe0,0x07,0xe0,0x07,0xe0,0x00,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xe0,0x7f,0xe0,0x7f,0xc0,0x7f,0xc0,0x3f,0xe0,0x7f,0xe0,0x7f,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x7f,0xe0,0x7f,0xc0,0x3f, -0xe0,0xff,0xe0,0xff,0xe0,0xff,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0xe0,0x07,0xe0,0x07,0xe0,0x07,0xe0,0x07,0xe0,0x07,0xe0,0x07,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xc0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xe0,0x01,0xe0,0x01,0xe0,0x01,0xe0,0x67,0xe0,0x67,0xe0,0x67,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x7e,0x60,0x7e,0x60,0x7e,0x60,0x00,0x60,0x00,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x60,0x60,0x00,0x60,0x00,0x78,0x00,0x78,0x00,0x78,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x00,0x70,0x00,0x38,0x00,0x1c,0x00,0x0e,0x00,0x07,0xe0,0x03,0xe0,0x01,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x00,0x70,0x00,0x3c,0x00,0x3c,0x00,0x70,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x60,0x60,0xe0,0x70,0xe0,0x79,0xc0,0x3f,0x80,0x1f,0x80,0x1f,0xc0,0x3f,0xe0,0x79,0xe0,0x70,0x60,0x60,0xe0,0xcf,0xe0,0xcf,0xe0,0xcf,0x00,0xcc,0x00,0xcc,0x00,0xcc,0x00,0xcc,0xe0,0xff,0xe0,0xff,0xe0,0x7f,0x60,0x60,0x60,0x70,0x60,0x78,0x60,0x7c,0x60,0x7e,0x60,0x6f,0xe0,0x67,0xe0,0x63,0xe0,0x61,0xe0,0x60,0x00,0x00,0x00,0x00,0x80,0x01,0xc0,0x03,0x78,0x1e,0x7c,0x3e,0x0e,0x70,0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x7f,0xfe,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x60,0x0e,0x70,0x7c,0x3e,0x78,0x1e,0xc0,0x03,0x80,0x01,0x00,0x00,0x00,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x18,0x18,0x38,0x1c,0xf0,0x0f,0xe0,0x07,0xc0,0x03,0x80,0x01,0x80,0x01,0xc0,0x03,0xe0,0x07,0xf0,0x0f,0x38,0x1c,0x18,0x18,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01, diff --git a/radio/src/fonts/sqt5/font_10x14_compressed.lbm b/radio/src/fonts/sqt5/font_10x14_compressed.lbm deleted file mode 100644 index 4cb8fa302..000000000 --- a/radio/src/fonts/sqt5/font_10x14_compressed.lbm +++ /dev/null @@ -1 +0,0 @@ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x00,0x76,0x00,0x3e,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x78,0x00,0x78,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0xfc,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x7e,0x0e,0x7f,0x8e,0x7f,0x86,0x63,0x86,0x61,0xfe,0x61,0xfe,0x61,0xfc,0x60,0x00,0x00,0x00,0x00,0x06,0x60,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0xfe,0x7f,0xfe,0x7f,0xfc,0x3f,0x00,0x00,0x00,0x00,0xfe,0x00,0xfe,0x01,0xfe,0x01,0x80,0x01,0x80,0x01,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x00,0x00,0x00,0x00,0xfe,0x30,0xfe,0x71,0xfe,0x71,0x86,0x61,0x86,0x61,0x86,0x7f,0x86,0x7f,0x06,0x3f,0x00,0x00,0x00,0x00,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0x86,0x61,0x86,0x61,0x8e,0x7f,0x8e,0x7f,0x0c,0x3f,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x86,0x7f,0xc6,0x7f,0xfe,0x7f,0x7e,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0x86,0x61,0x86,0x61,0xfe,0x7f,0xfe,0x7f,0xfc,0x3f,0x00,0x00,0x00,0x00,0x7c,0x30,0xfe,0x71,0xfe,0x71,0x86,0x61,0x86,0x61,0xfe,0x7f,0xfe,0x7f,0xfc,0x3f,0x00,0x00,0x00,0x00,0x78,0x1e,0x78,0x1e,0x78,0x1e,0x78,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x7f,0xfe,0x7f,0xfe,0x7f,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0xfe,0x7f,0xfe,0x7f,0xfc,0x7f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x86,0x61,0x86,0x61,0x86,0x61,0xfe,0x61,0xfe,0x7f,0xfc,0x7f,0x00,0x3f,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x60,0x06,0x60,0x0e,0x70,0xfe,0x7f,0xfe,0x7f,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x06,0x00,0x06,0x00,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x7f,0x86,0x7f,0x80,0x3f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x00,0x00,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x78,0x00,0x78,0x00,0x60,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0xfe,0x3f,0x06,0x00,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0xc0,0x03,0xe0,0x07,0xf0,0x0f,0x78,0x1e,0x3c,0x3c,0x1e,0x78,0x0e,0x70,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0xfc,0x7f,0xfe,0x7f,0xfe,0x7f,0x06,0x00,0xfe,0x01,0xfe,0x01,0x06,0x00,0xfe,0x7f,0xfe,0x7f,0xfc,0x7f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x06,0x00,0x06,0x00,0x06,0x00,0x0e,0x00,0xfc,0x7f,0xf8,0x7f,0xf0,0x7f,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0xfe,0x01,0xfe,0x01,0xfc,0x00,0xfc,0x3f,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x66,0x06,0x6e,0x06,0x1c,0xfe,0x39,0xfe,0x73,0xfc,0x67,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x86,0x01,0x86,0x01,0x86,0x01,0xfe,0x01,0xfe,0x7f,0xfc,0x7f,0x00,0x7f,0xfc,0x38,0xfe,0x79,0xfe,0x79,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x9e,0x7f,0x9e,0x7f,0x1c,0x3f,0x06,0x00,0x06,0x00,0x06,0x00,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xfe,0x3f,0xfe,0x7f,0xfe,0x7f,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0xfe,0x7f,0xfe,0x7f,0xfe,0x3f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x00,0x70,0x00,0x38,0x00,0x1c,0x00,0x0e,0x00,0x07,0xfe,0x03,0xfe,0x01,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x00,0x70,0x00,0x3e,0x00,0x3e,0x00,0x70,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x1e,0x78,0x3e,0x7c,0x7e,0x7e,0xe0,0x07,0xc0,0x03,0xc0,0x03,0xe0,0x07,0x7e,0x7e,0x3e,0x7c,0x1e,0x78,0xfe,0x00,0xfe,0x01,0xfe,0x03,0x00,0x7f,0x00,0x7e,0x00,0x7e,0x00,0x7f,0xfe,0x03,0xfe,0x01,0xfe,0x00,0x06,0x78,0x06,0x7c,0x06,0x7e,0x06,0x67,0x86,0x63,0xc6,0x61,0xe6,0x60,0x7e,0x60,0x3e,0x60,0x1e,0x60,0x60,0x7e,0x60,0x7e,0x60,0x7e,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0xe0,0x67,0xe0,0x67,0xe0,0x67,0x80,0x01,0x80,0x61,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x86,0x61,0x06,0x60,0x06,0x00,0x1e,0x00,0x1e,0x00,0xe0,0xcf,0xe0,0xcf,0xe0,0xcf,0x60,0xcc,0x60,0xcc,0x60,0xcc,0x60,0xcc,0xe0,0xff,0xe0,0xff,0xe0,0x7f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x60,0xe6,0x7f,0xe6,0x7f,0xe0,0x7f,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0xf0,0x00,0xf0,0x00,0xf0,0x00,0xc0,0x60,0xc0,0x60,0xc0,0xe6,0xff,0xe6,0xff,0xe0,0x7f,0x00,0x00,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x00,0x0f,0x80,0x1f,0xc0,0x39,0xe0,0x70,0x70,0x60,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x00,0xe0,0x07,0xe0,0x07,0xe0,0x00,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xe0,0x7f,0xe0,0x7f,0xc0,0x7f,0xc0,0x3f,0xe0,0x7f,0xe0,0x7f,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x7f,0xe0,0x7f,0xc0,0x3f,0xe0,0xff,0xe0,0xff,0xe0,0xff,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0xe0,0x07,0xe0,0x07,0xe0,0x07,0xe0,0x07,0xe0,0x07,0xe0,0x07,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0xe0,0xff,0xe0,0xff,0xe0,0xff,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xc0,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xe0,0x01,0xe0,0x01,0xe0,0x01,0xe0,0x67,0xe0,0x67,0xe0,0x67,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x7e,0x60,0x7e,0x60,0x7e,0x60,0x00,0x60,0x00,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x60,0x60,0x00,0x60,0x00,0x78,0x00,0x78,0x00,0x78,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x00,0x70,0x00,0x38,0x00,0x1c,0x00,0x0e,0x00,0x07,0xe0,0x03,0xe0,0x01,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x00,0x70,0x00,0x3c,0x00,0x3c,0x00,0x70,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x60,0x60,0xe0,0x70,0xe0,0x79,0xc0,0x3f,0x80,0x1f,0x80,0x1f,0xc0,0x3f,0xe0,0x79,0xe0,0x70,0x60,0x60,0xe0,0xcf,0xe0,0xcf,0xe0,0xcf,0x00,0xcc,0x00,0xcc,0x00,0xcc,0x00,0xcc,0xe0,0xff,0xe0,0xff,0xe0,0x7f,0x60,0x60,0x60,0x70,0x60,0x78,0x60,0x7c,0x60,0x7e,0x60,0x6f,0xe0,0x67,0xe0,0x63,0xe0,0x61,0xe0,0x60, diff --git a/radio/src/fonts/sqt5/font_10x14_compressed.png b/radio/src/fonts/sqt5/font_10x14_compressed.png index a8ff6a6f3..89db1e233 100644 Binary files a/radio/src/fonts/sqt5/font_10x14_compressed.png and b/radio/src/fonts/sqt5/font_10x14_compressed.png differ diff --git a/radio/src/fonts/sqt5/font_cz_04x06.lbm b/radio/src/fonts/sqt5/font_cz_04x06.lbm deleted file mode 100644 index 15c586b31..000000000 --- a/radio/src/fonts/sqt5/font_cz_04x06.lbm +++ /dev/null @@ -1 +0,0 @@ -0x3a,0x2a,0x2a,0x3e,0x01,0x3e,0x23,0x22,0x23,0x00,0x3e,0x2a,0x2a,0x2e,0x01,0x3e,0x2b,0x2a,0x2f,0x00,0x00,0x24,0x3c,0x22,0x01,0x1c,0x22,0x22,0x1d,0x00,0x3e,0x03,0x02,0x05,0x00,0x2e,0x2b,0x2a,0x3b,0x00,0x3e,0x20,0x20,0x3e,0x01,0x3c,0x23,0x23,0x3c,0x00,0x2e,0x28,0x28,0x3e,0x01,0x3c,0x12,0x12,0x3d,0x00,0x00,0x22,0x3e,0x22,0x01,0x3e,0x13,0x1e,0x31,0x00,0x00,0x0e,0x30,0x0e,0x01,0x22,0x33,0x2a,0x27,0x00,0x3e,0x2a,0x2a,0x22,0x01, diff --git a/radio/src/fonts/sqt5/font_cz_04x06.png b/radio/src/fonts/sqt5/font_cz_04x06.png index 1f1bc6106..6e72a100e 100644 Binary files a/radio/src/fonts/sqt5/font_cz_04x06.png and b/radio/src/fonts/sqt5/font_cz_04x06.png differ diff --git a/radio/src/fonts/sqt5/font_cz_05x07.lbm b/radio/src/fonts/sqt5/font_cz_05x07.lbm deleted file mode 100644 index 0b4cd2838..000000000 --- a/radio/src/fonts/sqt5/font_cz_05x07.lbm +++ /dev/null @@ -1 +0,0 @@ -0x74,0x54,0x56,0x55,0x7c,0x7c,0x45,0x46,0x46,0x45,0x7c,0x54,0x56,0x55,0x5c,0x7c,0x55,0x56,0x56,0x5d,0x00,0x44,0x7e,0x41,0x00,0x38,0x44,0x46,0x45,0x38,0x7c,0x05,0x06,0x06,0x0d,0x5c,0x55,0x56,0x56,0x75,0x7c,0x40,0x42,0x41,0x7c,0x7c,0x40,0x43,0x43,0x7c,0x5c,0x50,0x52,0x51,0x7c,0x78,0x14,0x16,0x15,0x78,0x00,0x44,0x7e,0x45,0x00,0x7c,0x15,0x16,0x1e,0x71,0x1c,0x10,0x72,0x11,0x1c,0x44,0x65,0x56,0x4e,0x45,0x7c,0x54,0x56,0x55,0x44,0x3c,0x3c,0x24,0x42,0xff,0x24,0x18,0x81,0x42,0x3c, diff --git a/radio/src/fonts/sqt5/font_cz_05x07.png b/radio/src/fonts/sqt5/font_cz_05x07.png index c9c7443e8..f7018789e 100644 Binary files a/radio/src/fonts/sqt5/font_cz_05x07.png and b/radio/src/fonts/sqt5/font_cz_05x07.png differ diff --git a/radio/src/fonts/sqt5/font_cz_08x10.lbm b/radio/src/fonts/sqt5/font_cz_08x10.lbm deleted file mode 100644 index 4b28f3ded..000000000 --- a/radio/src/fonts/sqt5/font_cz_08x10.lbm +++ /dev/null @@ -1 +0,0 @@ -0x90,0x07,0x90,0x07,0x90,0x04,0x94,0x04,0x93,0x04,0xf1,0x07,0xf0,0x07,0x00,0x00,0xf0,0x07,0xf1,0x07,0x13,0x04,0x16,0x04,0x13,0x04,0x11,0x04,0x10,0x04,0x00,0x00,0xf0,0x07,0xf0,0x07,0x90,0x04,0x94,0x04,0x93,0x04,0xf1,0x04,0xf0,0x04,0x00,0x00,0xf0,0x07,0xf1,0x07,0x93,0x04,0x96,0x04,0x93,0x04,0xf1,0x04,0xf0,0x04,0x00,0x00,0x10,0x04,0x10,0x04,0xf4,0x07,0xf3,0x07,0x01,0x04,0x00,0x04,0x00,0x00,0x00,0x00,0xe0,0x03,0xf0,0x07,0x10,0x04,0x14,0x04,0x13,0x04,0xf1,0x07,0xe0,0x03,0x00,0x00,0xf1,0x07,0xf3,0x07,0x16,0x00,0x13,0x00,0x11,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0xf0,0x04,0xf1,0x04,0x93,0x04,0x96,0x04,0x93,0x04,0x91,0x07,0x90,0x07,0x00,0x00,0xf0,0x07,0xf0,0x07,0x00,0x04,0x04,0x04,0x03,0x04,0xf1,0x07,0xf0,0x07,0x00,0x00,0xf0,0x07,0xf0,0x07,0x02,0x04,0x05,0x04,0x05,0x04,0xf2,0x07,0xf0,0x07,0x00,0x00,0xf0,0x09,0xf0,0x09,0x00,0x09,0x04,0x09,0x03,0x09,0xf1,0x0f,0xf0,0x0f,0x00,0x00,0xf0,0x07,0xf8,0x07,0x98,0x00,0x9c,0x00,0x9b,0x00,0x99,0x00,0xf8,0x07,0xf0,0x07,0x00,0x00,0x08,0x04,0x08,0x04,0xfc,0x07,0xfb,0x07,0x09,0x04,0x08,0x04,0x00,0x00,0xf8,0x07,0xf9,0x07,0x8b,0x00,0x8e,0x00,0x8b,0x00,0xf9,0x00,0xf0,0x07,0x00,0x07,0xf8,0x00,0xf8,0x00,0x80,0x00,0x84,0x07,0x83,0x07,0x81,0x00,0xf8,0x00,0xf8,0x00,0x08,0x06,0x09,0x07,0x8b,0x05,0xce,0x04,0x6b,0x04,0x39,0x04,0x18,0x04,0x00,0x00,0xf8,0x07,0xf8,0x07,0x48,0x04,0x4c,0x04,0x4b,0x04,0x49,0x04,0x08,0x04,0x08,0x04, diff --git a/radio/src/fonts/sqt5/font_cz_08x10.png b/radio/src/fonts/sqt5/font_cz_08x10.png index 056e38735..25570dedb 100644 Binary files a/radio/src/fonts/sqt5/font_cz_08x10.png and b/radio/src/fonts/sqt5/font_cz_08x10.png differ diff --git a/radio/src/fonts/sqt5/font_cz_10x14.lbm b/radio/src/fonts/sqt5/font_cz_10x14.lbm deleted file mode 100644 index 89321208d..000000000 --- a/radio/src/fonts/sqt5/font_cz_10x14.lbm +++ /dev/null @@ -1 +0,0 @@ -0x60,0x7e,0x60,0x7e,0x60,0x7e,0x60,0x66,0x68,0x66,0x6c,0x66,0x67,0x66,0xe3,0x7f,0xe1,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x67,0x60,0x6f,0x60,0x6c,0x60,0x66,0x60,0x63,0x60,0x61,0x60,0x60,0x60,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x60,0x66,0x68,0x66,0x6c,0x66,0x67,0x66,0xe3,0x67,0xe1,0x67,0xe0,0x67,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x67,0x66,0x6f,0x66,0x6c,0x66,0x66,0x66,0xe3,0x67,0xe1,0x67,0xe0,0x67,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x60,0xe8,0x7f,0xec,0x7f,0xe7,0x7f,0x03,0x60,0x01,0x60,0x00,0x00,0xc0,0x3f,0xe0,0x7f,0xe0,0x7f,0x60,0x60,0x68,0x60,0x6c,0x60,0x67,0x60,0xe3,0x7f,0xe1,0x7f,0xc0,0x3f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xc7,0x00,0x6f,0x00,0x6c,0x00,0x66,0x00,0xe3,0x01,0xe1,0x01,0xe0,0x01,0xe0,0x67,0xe0,0x67,0xe0,0x67,0x67,0x66,0x6f,0x66,0x6c,0x66,0x66,0x66,0x63,0x7e,0x61,0x7e,0x60,0x7e,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x00,0x60,0x08,0x60,0x0c,0x60,0x07,0x60,0xe3,0x7f,0xe1,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x06,0x60,0x09,0x60,0x09,0x60,0x0f,0x60,0xe6,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0xcf,0xe0,0xcf,0xe0,0xcf,0x00,0xcc,0x08,0xcc,0x0c,0xcc,0x07,0xcc,0xe3,0xff,0xe1,0xff,0xe0,0x7f,0xf0,0x7f,0xf8,0x7f,0xf8,0x7f,0x18,0x06,0x18,0x06,0x18,0x06,0x1c,0x06,0xff,0x7f,0xfb,0x7f,0xf1,0x7f,0x00,0x00,0x18,0x60,0x18,0x60,0xf8,0x7f,0xfc,0x7f,0xff,0x7f,0x1b,0x60,0x19,0x60,0x00,0x00,0x00,0x00,0xf8,0x7f,0xf8,0x7f,0xf8,0x7f,0x1f,0x06,0x1f,0x06,0x1c,0x06,0xfe,0x07,0xfb,0x7f,0xf1,0x7f,0x00,0x7c,0xf8,0x01,0xf8,0x03,0xf8,0x07,0x00,0x7e,0x00,0x7c,0x04,0x7c,0x07,0x7e,0xfb,0x07,0xf9,0x03,0xf8,0x01,0x18,0x70,0x18,0x78,0x18,0x7c,0x17,0x6e,0x0f,0x67,0x8c,0x63,0xd6,0x61,0xfb,0x60,0x79,0x60,0x38,0x60,0xf8,0x7f,0xf8,0x7f,0xf8,0x7f,0x18,0x63,0x1c,0x63,0x1f,0x63,0x1b,0x63,0x19,0x63,0x18,0x60,0x18,0x60, diff --git a/radio/src/fonts/sqt5/font_cz_10x14.png b/radio/src/fonts/sqt5/font_cz_10x14.png index e71755dbc..505a8b194 100644 Binary files a/radio/src/fonts/sqt5/font_cz_10x14.png and b/radio/src/fonts/sqt5/font_cz_10x14.png differ diff --git a/radio/src/fonts/sqt5/font_de_04x06.lbm b/radio/src/fonts/sqt5/font_de_04x06.lbm deleted file mode 100644 index 962a76588..000000000 --- a/radio/src/fonts/sqt5/font_de_04x06.lbm +++ /dev/null @@ -1 +0,0 @@ -0x3d,0x0a,0x0a,0x3d,0x00,0x3a,0x2b,0x2a,0x3f,0x00,0x1d,0x22,0x22,0x1d,0x00,0x18,0x25,0x24,0x19,0x00,0x3d,0x20,0x20,0x3d,0x00,0x3d,0x20,0x20,0x3d,0x00,0x7e,0x05,0x25,0x1a,0x00, diff --git a/radio/src/fonts/sqt5/font_de_04x06.png b/radio/src/fonts/sqt5/font_de_04x06.png index 644bed0b6..920d81533 100644 Binary files a/radio/src/fonts/sqt5/font_de_04x06.png and b/radio/src/fonts/sqt5/font_de_04x06.png differ diff --git a/radio/src/fonts/sqt5/font_de_05x07.lbm b/radio/src/fonts/sqt5/font_de_05x07.lbm deleted file mode 100644 index 363e4f48e..000000000 --- a/radio/src/fonts/sqt5/font_de_05x07.lbm +++ /dev/null @@ -1 +0,0 @@ -0x7c,0x13,0x12,0x13,0x7c,0x74,0x55,0x54,0x55,0x7c,0x3c,0x43,0x42,0x43,0x3c,0x38,0x45,0x44,0x45,0x38,0x3e,0x41,0x40,0x41,0x3e,0x7c,0x41,0x40,0x41,0x7c,0x7e,0x01,0x49,0x56,0x20, diff --git a/radio/src/fonts/sqt5/font_de_08x10.lbm b/radio/src/fonts/sqt5/font_de_08x10.lbm deleted file mode 100644 index 8f8f45e39..000000000 --- a/radio/src/fonts/sqt5/font_de_08x10.lbm +++ /dev/null @@ -1 +0,0 @@ -0xf0,0x07,0xfb,0x07,0x9b,0x00,0x98,0x00,0x98,0x00,0x9b,0x00,0xfb,0x07,0xf0,0x07,0x90,0x07,0x96,0x07,0x96,0x04,0x90,0x04,0x96,0x04,0xf6,0x07,0xf0,0x07,0x00,0x00,0xf0,0x03,0xfb,0x07,0x0b,0x04,0x08,0x04,0x08,0x04,0x0b,0x04,0xfb,0x07,0xf0,0x03,0xe0,0x03,0xf6,0x07,0x16,0x04,0x10,0x04,0x16,0x04,0xf6,0x07,0xe0,0x03,0x00,0x00,0xf8,0x03,0xfb,0x07,0x03,0x04,0x00,0x04,0x03,0x04,0x03,0x04,0xf8,0x07,0xf8,0x03,0xf0,0x07,0xf6,0x07,0x06,0x04,0x00,0x04,0x06,0x04,0xf6,0x07,0xf0,0x07,0x00,0x00,0xfc,0x07,0xfe,0x07,0x86,0x00,0x86,0x00,0x86,0x00,0x86,0x00,0xfe,0x07,0xfc,0x07, diff --git a/radio/src/fonts/sqt5/font_de_08x10.png b/radio/src/fonts/sqt5/font_de_08x10.png index 4a781904c..292093e24 100644 Binary files a/radio/src/fonts/sqt5/font_de_08x10.png and b/radio/src/fonts/sqt5/font_de_08x10.png differ diff --git a/radio/src/fonts/sqt5/font_de_10x14.lbm b/radio/src/fonts/sqt5/font_de_10x14.lbm deleted file mode 100644 index cba41d1c0..000000000 --- a/radio/src/fonts/sqt5/font_de_10x14.lbm +++ /dev/null @@ -1 +0,0 @@ -0xf0,0x7f,0xfa,0x7f,0xfa,0x7f,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0xfa,0x7f,0xfa,0x7f,0xf0,0x7f,0x60,0x7e,0x66,0x7e,0x66,0x7e,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0xe6,0x7f,0xe6,0x7f,0xe0,0x7f,0xf0,0x3f,0xfa,0x7f,0xfa,0x7f,0x18,0x60,0x18,0x60,0x18,0x60,0x18,0x60,0xfa,0x7f,0xfa,0x7f,0xf0,0x3f,0xc0,0x3f,0xe6,0x7f,0xe6,0x7f,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe6,0x7f,0xe6,0x7f,0xc0,0x3f,0xf8,0x3f,0xfa,0x7f,0xfa,0x7f,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0xfa,0x7f,0xfa,0x7f,0xf8,0x3f,0xe0,0x7f,0xe6,0x7f,0xe6,0x7f,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0xe6,0x7f,0xe6,0x7f,0xe0,0x7f,0xf8,0x7f,0xfc,0x7f,0x0e,0x00,0x06,0x00,0x66,0x30,0x6e,0x30,0xfc,0x38,0xd8,0x1f,0x00,0x0f,0x00,0x00, diff --git a/radio/src/fonts/sqt5/font_de_10x14.png b/radio/src/fonts/sqt5/font_de_10x14.png index 607e97b4b..3085d22d3 100644 Binary files a/radio/src/fonts/sqt5/font_de_10x14.png and b/radio/src/fonts/sqt5/font_de_10x14.png differ diff --git a/radio/src/fonts/sqt5/font_es_04x06.lbm b/radio/src/fonts/sqt5/font_es_04x06.lbm deleted file mode 100644 index 7e5b76783..000000000 --- a/radio/src/fonts/sqt5/font_es_04x06.lbm +++ /dev/null @@ -1 +0,0 @@ -0x3c,0x05,0x06,0x39,0x00,0x3a,0x09,0x0a,0x31,0x00, diff --git a/radio/src/fonts/sqt5/font_es_04x06.png b/radio/src/fonts/sqt5/font_es_04x06.png index 849fc790c..23425282a 100644 Binary files a/radio/src/fonts/sqt5/font_es_04x06.png and b/radio/src/fonts/sqt5/font_es_04x06.png differ diff --git a/radio/src/fonts/sqt5/font_es_05x07.lbm b/radio/src/fonts/sqt5/font_es_05x07.lbm deleted file mode 100644 index ade3235f7..000000000 --- a/radio/src/fonts/sqt5/font_es_05x07.lbm +++ /dev/null @@ -1 +0,0 @@ -0x7c,0x06,0x05,0x06,0x79,0x78,0x0a,0x09,0x0a,0x71, diff --git a/radio/src/fonts/sqt5/font_es_08x10.lbm b/radio/src/fonts/sqt5/font_es_08x10.lbm deleted file mode 100644 index 80e23388e..000000000 --- a/radio/src/fonts/sqt5/font_es_08x10.lbm +++ /dev/null @@ -1 +0,0 @@ -0xf8,0x07,0xfa,0x07,0x0b,0x00,0x09,0x00,0x0b,0x00,0x1a,0x00,0xf3,0x07,0xe1,0x07,0xf0,0x07,0xf4,0x07,0x16,0x00,0x12,0x00,0x16,0x00,0x34,0x00,0xe6,0x07,0xc2,0x07, diff --git a/radio/src/fonts/sqt5/font_es_10x14.lbm b/radio/src/fonts/sqt5/font_es_10x14.lbm deleted file mode 100644 index 19065f688..000000000 --- a/radio/src/fonts/sqt5/font_es_10x14.lbm +++ /dev/null @@ -1 +0,0 @@ -0xf4,0x7f,0xf6,0x7f,0xf3,0x7f,0x31,0x00,0x32,0x00,0x34,0x00,0x76,0x00,0xe3,0x7f,0xc1,0x7f,0x80,0x7f,0xe0,0x7f,0xe8,0x7f,0xec,0x7f,0x66,0x00,0x62,0x00,0x64,0x00,0x68,0x00,0xec,0x7f,0xe6,0x7f,0xc2,0x7f, diff --git a/radio/src/fonts/sqt5/font_fr_04x06.lbm b/radio/src/fonts/sqt5/font_fr_04x06.lbm deleted file mode 100644 index 0009fbcec..000000000 --- a/radio/src/fonts/sqt5/font_fr_04x06.lbm +++ /dev/null @@ -1 +0,0 @@ -0x3e,0x2a,0x2b,0x2e,0x00,0x3e,0x2b,0x2a,0x2e,0x00,0x3a,0x2b,0x2a,0x3e,0x00,0x00,0x26,0x3d,0x22,0x00,0x1e,0x52,0x32,0x12,0x00, diff --git a/radio/src/fonts/sqt5/font_fr_04x06.png b/radio/src/fonts/sqt5/font_fr_04x06.png index 3b5db5110..0b15e63a3 100644 Binary files a/radio/src/fonts/sqt5/font_fr_04x06.png and b/radio/src/fonts/sqt5/font_fr_04x06.png differ diff --git a/radio/src/fonts/sqt5/font_fr_05x07.lbm b/radio/src/fonts/sqt5/font_fr_05x07.lbm deleted file mode 100644 index 689859b1c..000000000 --- a/radio/src/fonts/sqt5/font_fr_05x07.lbm +++ /dev/null @@ -1 +0,0 @@ -0x7c,0x54,0x56,0x55,0x5c,0x7c,0x55,0x56,0x54,0x5c,0x74,0x55,0x56,0x54,0x7c,0x00,0x4a,0x79,0x42,0x00,0x3c,0xa4,0x64,0x24,0x24, diff --git a/radio/src/fonts/sqt5/font_fr_05x07.png b/radio/src/fonts/sqt5/font_fr_05x07.png index eb6451648..0ad3bcf67 100644 Binary files a/radio/src/fonts/sqt5/font_fr_05x07.png and b/radio/src/fonts/sqt5/font_fr_05x07.png differ diff --git a/radio/src/fonts/sqt5/font_fr_08x10.lbm b/radio/src/fonts/sqt5/font_fr_08x10.lbm deleted file mode 100644 index 62285c702..000000000 --- a/radio/src/fonts/sqt5/font_fr_08x10.lbm +++ /dev/null @@ -1 +0,0 @@ -0xf0,0x07,0xf0,0x07,0x94,0x04,0x96,0x04,0x93,0x04,0xf1,0x04,0xf0,0x04,0x00,0x00,0xf0,0x07,0xf0,0x07,0x91,0x04,0x93,0x04,0x96,0x04,0xf4,0x04,0xf0,0x04,0x00,0x00,0x90,0x07,0x90,0x07,0x91,0x04,0x93,0x04,0x96,0x04,0xf4,0x07,0xf0,0x07,0x00,0x00,0x14,0x04,0x16,0x04,0xf3,0x07,0xf6,0x07,0x04,0x04,0x00,0x04,0x00,0x00,0xf0,0x03,0xf0,0x03,0x10,0x0a,0x10,0x0e,0x10,0x06,0x10,0x02,0x10,0x02,0x00,0x00,0x00,0x00, diff --git a/radio/src/fonts/sqt5/font_fr_08x10.png b/radio/src/fonts/sqt5/font_fr_08x10.png index 59ed95c85..56fc32b08 100644 Binary files a/radio/src/fonts/sqt5/font_fr_08x10.png and b/radio/src/fonts/sqt5/font_fr_08x10.png differ diff --git a/radio/src/fonts/sqt5/font_fr_10x14.lbm b/radio/src/fonts/sqt5/font_fr_10x14.lbm deleted file mode 100644 index 94843b6e9..000000000 --- a/radio/src/fonts/sqt5/font_fr_10x14.lbm +++ /dev/null @@ -1 +0,0 @@ -0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x68,0x66,0x6c,0x66,0x66,0x66,0x62,0x66,0xe0,0x67,0xe0,0x67,0xe0,0x67,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x62,0x66,0x66,0x66,0x6c,0x66,0x68,0x66,0xe0,0x67,0xe0,0x67,0xe0,0x67,0x60,0x7e,0x60,0x7e,0x60,0x7e,0x62,0x66,0x66,0x66,0x6c,0x66,0x68,0x66,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x00,0x00,0x00,0x00,0x6c,0x60,0x6c,0x60,0xe3,0x7f,0xe3,0x7f,0xec,0x7f,0x0c,0x60,0x00,0x60,0x00,0x00,0xf0,0x3f,0xf0,0x3f,0xf0,0xbf,0x30,0xf0,0x30,0x70,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, diff --git a/radio/src/fonts/sqt5/font_fr_10x14.png b/radio/src/fonts/sqt5/font_fr_10x14.png index 16fd4788b..cdea50b52 100644 Binary files a/radio/src/fonts/sqt5/font_fr_10x14.png and b/radio/src/fonts/sqt5/font_fr_10x14.png differ diff --git a/radio/src/fonts/sqt5/font_it_04x06.lbm b/radio/src/fonts/sqt5/font_it_04x06.lbm deleted file mode 100644 index 5557a1b10..000000000 --- a/radio/src/fonts/sqt5/font_it_04x06.lbm +++ /dev/null @@ -1 +0,0 @@ -0x3a,0x2b,0x2a,0x3e,0x00,0x3c,0x21,0x22,0x3c,0x00, diff --git a/radio/src/fonts/sqt5/font_it_04x06.png b/radio/src/fonts/sqt5/font_it_04x06.png index f1fd48265..34f75a77b 100644 Binary files a/radio/src/fonts/sqt5/font_it_04x06.png and b/radio/src/fonts/sqt5/font_it_04x06.png differ diff --git a/radio/src/fonts/sqt5/font_it_05x07.lbm b/radio/src/fonts/sqt5/font_it_05x07.lbm deleted file mode 100644 index 7e4ed004e..000000000 --- a/radio/src/fonts/sqt5/font_it_05x07.lbm +++ /dev/null @@ -1 +0,0 @@ -0x74,0x55,0x56,0x54,0x7c,0x7c,0x41,0x42,0x40,0x7c, diff --git a/radio/src/fonts/sqt5/font_it_08x10.lbm b/radio/src/fonts/sqt5/font_it_08x10.lbm deleted file mode 100644 index e219884ac..000000000 --- a/radio/src/fonts/sqt5/font_it_08x10.lbm +++ /dev/null @@ -1 +0,0 @@ -0x90,0x07,0x90,0x07,0x92,0x04,0x96,0x04,0x94,0x04,0xf0,0x07,0xf0,0x07,0x00,0x00,0xf0,0x07,0xf0,0x07,0x02,0x04,0x06,0x04,0x04,0x04,0xf0,0x07,0xf0,0x07,0x00,0x00, diff --git a/radio/src/fonts/sqt5/font_it_08x10.png b/radio/src/fonts/sqt5/font_it_08x10.png index 0f402499f..3329886b7 100644 Binary files a/radio/src/fonts/sqt5/font_it_08x10.png and b/radio/src/fonts/sqt5/font_it_08x10.png differ diff --git a/radio/src/fonts/sqt5/font_it_10x14.lbm b/radio/src/fonts/sqt5/font_it_10x14.lbm deleted file mode 100644 index 6f8fbcc11..000000000 --- a/radio/src/fonts/sqt5/font_it_10x14.lbm +++ /dev/null @@ -1 +0,0 @@ -0x60,0x7e,0x60,0x7e,0x60,0x7e,0x62,0x66,0x66,0x66,0x6c,0x66,0x68,0x66,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x02,0x60,0x06,0x60,0x0c,0x60,0x08,0x60,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f, diff --git a/radio/src/fonts/sqt5/font_pl_04x06.png b/radio/src/fonts/sqt5/font_pl_04x06.png new file mode 100644 index 000000000..9eb7251fe Binary files /dev/null and b/radio/src/fonts/sqt5/font_pl_04x06.png differ diff --git a/radio/src/fonts/sqt5/font_pl_05x07.png b/radio/src/fonts/sqt5/font_pl_05x07.png new file mode 100644 index 000000000..6c088c03f Binary files /dev/null and b/radio/src/fonts/sqt5/font_pl_05x07.png differ diff --git a/radio/src/fonts/sqt5/font_pl_08x10.png b/radio/src/fonts/sqt5/font_pl_08x10.png new file mode 100644 index 000000000..760d2f850 Binary files /dev/null and b/radio/src/fonts/sqt5/font_pl_08x10.png differ diff --git a/radio/src/fonts/sqt5/font_pl_10x14.png b/radio/src/fonts/sqt5/font_pl_10x14.png new file mode 100644 index 000000000..33888bfd1 Binary files /dev/null and b/radio/src/fonts/sqt5/font_pl_10x14.png differ diff --git a/radio/src/fonts/sqt5/font_pt_04x06.png b/radio/src/fonts/sqt5/font_pt_04x06.png new file mode 100644 index 000000000..b3bc84800 Binary files /dev/null and b/radio/src/fonts/sqt5/font_pt_04x06.png differ diff --git a/radio/src/fonts/sqt5/font_pt_05x07.lbm b/radio/src/fonts/sqt5/font_pt_05x07.lbm deleted file mode 100644 index 19aac799d..000000000 --- a/radio/src/fonts/sqt5/font_pt_05x07.lbm +++ /dev/null @@ -1 +0,0 @@ -0x78,0x14,0x16,0x15,0x78,0x74,0x54,0x56,0x55,0x7c,0x78,0x16,0x15,0x16,0x78,0x74,0x56,0x55,0x56,0x7c,0x7a,0x15,0x16,0x15,0x78,0x74,0x56,0x55,0x56,0x7d,0x78,0x15,0x16,0x14,0x78,0x74,0x55,0x56,0x54,0x7c,0x1c,0xa2,0x62,0x22,0x22,0x3c,0xa4,0x64,0x24,0x24,0x7c,0x54,0x56,0x55,0x44,0x7c,0x54,0x56,0x55,0x5c,0x7c,0x56,0x55,0x56,0x44,0x7c,0x56,0x55,0x56,0x5c,0x00,0x44,0x7e,0x45,0x00,0x00,0x48,0x7a,0x41,0x00,0x3c,0x42,0x42,0x43,0x3c,0x38,0x44,0x46,0x45,0x38,0x3c,0x42,0x43,0x42,0x3c,0x38,0x44,0x46,0x44,0x38,0x3c,0x43,0x42,0x43,0x3c,0x38,0x46,0x44,0x46,0x38,0x3c,0x40,0x42,0x41,0x3c,0x78,0x40,0x44,0x42,0x78, diff --git a/radio/src/fonts/sqt5/font_pt_05x07.png b/radio/src/fonts/sqt5/font_pt_05x07.png index d973c436b..cd92fc7ab 100644 Binary files a/radio/src/fonts/sqt5/font_pt_05x07.png and b/radio/src/fonts/sqt5/font_pt_05x07.png differ diff --git a/radio/src/fonts/sqt5/font_pt_08x10.lbm b/radio/src/fonts/sqt5/font_pt_08x10.lbm deleted file mode 100644 index 7971cf6a9..000000000 --- a/radio/src/fonts/sqt5/font_pt_08x10.lbm +++ /dev/null @@ -1 +0,0 @@ -0xf0,0x07,0xf8,0x07,0x88,0x00,0x8c,0x00,0x8b,0x00,0x89,0x00,0xf8,0x07,0xf0,0x07,0x90,0x07,0x90,0x07,0x90,0x04,0x90,0x04,0x98,0x04,0xf6,0x07,0xf2,0x07,0x00,0x00,0xf0,0x07,0xfa,0x07,0x8b,0x00,0x89,0x00,0x89,0x00,0x8b,0x00,0xfa,0x07,0xf0,0x07,0x90,0x07,0x94,0x07,0x96,0x04,0x93,0x04,0x96,0x04,0xf4,0x07,0xf0,0x07,0x00,0x00,0xf0,0x07,0xfa,0x07,0x89,0x00,0x89,0x00,0x8b,0x00,0x8a,0x00,0xfa,0x07,0xf1,0x07,0x90,0x07,0x90,0x07,0x94,0x04,0x92,0x04,0x96,0x04,0xf4,0x07,0xf2,0x07,0x00,0x00,0xf0,0x07,0xf8,0x07,0x89,0x00,0x8b,0x00,0x8c,0x00,0x88,0x00,0xf8,0x07,0xf0,0x07,0x90,0x07,0x90,0x07,0x92,0x04,0x96,0x04,0x98,0x04,0xf0,0x07,0xf0,0x07,0x00,0x00,0xf8,0x01,0xfc,0x03,0x04,0x0a,0x04,0x0e,0x04,0x06,0x04,0x02,0x04,0x02,0x04,0x02,0xf8,0x03,0xf8,0x03,0x08,0x0a,0x08,0x0e,0x08,0x06,0x08,0x02,0x08,0x02,0x00,0x00,0xf8,0x07,0xf8,0x07,0x48,0x04,0x4c,0x04,0x4b,0x04,0x49,0x04,0x08,0x04,0x00,0x00,0xf0,0x07,0xf0,0x07,0x90,0x04,0x9c,0x04,0x96,0x04,0xf2,0x04,0xf0,0x04,0x00,0x00,0xf8,0x07,0xfa,0x07,0x4b,0x04,0x49,0x04,0x49,0x04,0x4b,0x04,0x0a,0x04,0x00,0x00,0xf0,0x07,0xf4,0x07,0x96,0x04,0x93,0x04,0x96,0x04,0xf4,0x04,0xf0,0x04,0x00,0x00,0x00,0x00,0x08,0x04,0x08,0x04,0xfc,0x07,0xfb,0x07,0x09,0x04,0x08,0x04,0x00,0x00,0x00,0x00,0x10,0x04,0x10,0x04,0xf4,0x07,0xf3,0x07,0x01,0x04,0x00,0x04,0x00,0x00,0xf0,0x03,0xf8,0x07,0x08,0x04,0x08,0x04,0x0c,0x04,0x0b,0x04,0xf9,0x07,0xf0,0x03,0xe0,0x03,0xf0,0x07,0x10,0x04,0x18,0x04,0x16,0x04,0xf2,0x07,0xe0,0x03,0x00,0x00,0xf0,0x03,0xfa,0x07,0x0b,0x04,0x09,0x04,0x09,0x04,0x0b,0x04,0xfa,0x07,0xf0,0x03,0xe0,0x03,0xf4,0x07,0x16,0x04,0x13,0x04,0x16,0x04,0xf4,0x07,0xe0,0x03,0x00,0x00,0xf2,0x03,0xf9,0x07,0x09,0x04,0x0b,0x04,0x0a,0x04,0x0a,0x04,0xf9,0x07,0xf0,0x03,0xe0,0x03,0xf4,0x07,0x12,0x04,0x16,0x04,0x14,0x04,0xf2,0x07,0xe0,0x03,0x00,0x00,0xf8,0x03,0xf8,0x07,0x00,0x04,0x04,0x04,0x03,0x04,0x01,0x04,0xf8,0x07,0xf8,0x03,0xf0,0x07,0xf0,0x07,0x00,0x04,0x04,0x04,0x03,0x04,0xf1,0x07,0xf0,0x07,0x00,0x00, diff --git a/radio/src/fonts/sqt5/font_pt_08x10.png b/radio/src/fonts/sqt5/font_pt_08x10.png index 5b833f108..309890901 100644 Binary files a/radio/src/fonts/sqt5/font_pt_08x10.png and b/radio/src/fonts/sqt5/font_pt_08x10.png differ diff --git a/radio/src/fonts/sqt5/font_pt_10x14.lbm b/radio/src/fonts/sqt5/font_pt_10x14.lbm deleted file mode 100644 index edbb018a6..000000000 --- a/radio/src/fonts/sqt5/font_pt_10x14.lbm +++ /dev/null @@ -1 +0,0 @@ -0xf0,0x7f,0xf8,0x7f,0xf8,0x7f,0x18,0x06,0x18,0x06,0x18,0x06,0x1c,0x06,0xfe,0x7f,0xfb,0x7f,0xf1,0x7f,0x60,0x7e,0x60,0x7e,0x60,0x7e,0x60,0x66,0x60,0x66,0x68,0x66,0x6c,0x66,0xe6,0x7f,0xe2,0x7f,0xe0,0x7f,0xf0,0x7f,0xf8,0x7f,0xf8,0x7f,0x1a,0x06,0x19,0x06,0x19,0x06,0x1a,0x06,0xf8,0x7f,0xf8,0x7f,0xf0,0x7f,0x60,0x7e,0x60,0x7e,0x60,0x7e,0x68,0x66,0x6c,0x66,0x66,0x66,0x6c,0x66,0xe8,0x7f,0xe0,0x7f,0xe0,0x7f,0xf0,0x7f,0xfa,0x7f,0xf9,0x7f,0x19,0x06,0x1b,0x06,0x1a,0x06,0x1a,0x06,0xf9,0x7f,0xf8,0x7f,0xf0,0x7f,0x60,0x7e,0x60,0x7e,0x68,0x7e,0x64,0x66,0x64,0x66,0x6c,0x66,0x68,0x66,0xe8,0x7f,0xe4,0x7f,0xe0,0x7f,0xf1,0x7f,0xfb,0x7f,0xfe,0x7f,0x1c,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0xf8,0x7f,0xf8,0x7f,0xf0,0x7f,0x60,0x7e,0x60,0x7e,0x60,0x7e,0x62,0x66,0x66,0x66,0x6c,0x66,0x68,0x66,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xf8,0x0f,0xfc,0x1f,0xfc,0x5f,0x0c,0x78,0x0c,0x38,0x0c,0x18,0x0c,0x18,0x0c,0x18,0x0c,0x18,0x0c,0x18,0xf8,0x1f,0xf8,0x1f,0xf8,0x5f,0x18,0x78,0x18,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0x7f,0xf8,0x7f,0xf8,0x7f,0x18,0x63,0x1c,0x63,0x1e,0x63,0x1b,0x63,0x19,0x63,0x18,0x60,0x18,0x60,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x60,0x66,0x68,0x66,0x6c,0x66,0x66,0x66,0xe2,0x67,0xe0,0x67,0xe0,0x67,0xf0,0x7f,0xf4,0x7f,0xf6,0x7f,0x33,0x66,0x31,0x66,0x33,0x66,0x36,0x66,0x34,0x66,0x30,0x60,0x30,0x60,0xe0,0x7f,0xe0,0x7f,0xe8,0x7f,0x6c,0x66,0x66,0x66,0x6c,0x66,0x68,0x66,0xe0,0x67,0xe0,0x67,0xe0,0x67,0x00,0x00,0x00,0x00,0x30,0x60,0x30,0x60,0xf4,0x7f,0xf6,0x7f,0xf3,0x7f,0x31,0x60,0x30,0x60,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x60,0xe0,0x7f,0xe8,0x7f,0xec,0x7f,0x06,0x60,0x02,0x60,0x00,0x00,0x00,0x00,0xf0,0x3f,0xf8,0x7f,0xf8,0x7f,0x18,0x60,0x1c,0x60,0x1e,0x60,0x1b,0x60,0xf9,0x7f,0xf8,0x7f,0xf0,0x3f,0xc0,0x3f,0xe0,0x7f,0xe0,0x7f,0x60,0x60,0x68,0x60,0x6c,0x60,0x66,0x60,0xe2,0x7f,0xe0,0x7f,0xc0,0x3f,0xf0,0x3f,0xf8,0x7f,0xf8,0x7f,0x1a,0x60,0x19,0x60,0x19,0x60,0x1a,0x60,0xf8,0x7f,0xf8,0x7f,0xf0,0x3f,0xc0,0x3f,0xe0,0x7f,0xe8,0x7f,0x6c,0x60,0x66,0x60,0x6c,0x60,0x68,0x60,0xe0,0x7f,0xe0,0x7f,0xc0,0x3f,0xf0,0x3f,0xfa,0x7f,0xf9,0x7f,0x19,0x60,0x1b,0x60,0x1a,0x60,0x1a,0x60,0xf9,0x7f,0xf8,0x7f,0xf0,0x3f,0xc0,0x3f,0xe8,0x7f,0xe4,0x7f,0x64,0x60,0x6c,0x60,0x68,0x60,0x68,0x60,0xe4,0x7f,0xe0,0x7f,0xc0,0x3f,0xf8,0x3f,0xf8,0x7f,0xf8,0x7f,0x00,0x60,0x04,0x60,0x06,0x60,0x03,0x60,0xf9,0x7f,0xf8,0x7f,0xf8,0x3f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x00,0x60,0x10,0x60,0x18,0x60,0x0c,0x60,0xe4,0x7f,0xe0,0x7f,0xe0,0x7f, diff --git a/radio/src/fonts/sqt5/font_pt_10x14.png b/radio/src/fonts/sqt5/font_pt_10x14.png index 97f12d998..d9d29f071 100644 Binary files a/radio/src/fonts/sqt5/font_pt_10x14.png and b/radio/src/fonts/sqt5/font_pt_10x14.png differ diff --git a/radio/src/fonts/sqt5/font_se_04x06.lbm b/radio/src/fonts/sqt5/font_se_04x06.lbm deleted file mode 100644 index 147fba42d..000000000 --- a/radio/src/fonts/sqt5/font_se_04x06.lbm +++ /dev/null @@ -1 +0,0 @@ -0x3a,0x2b,0x2b,0x3e,0x00,0x3a,0x2b,0x2a,0x3f,0x00,0x18,0x25,0x24,0x19,0x00,0x3c,0x0b,0x0b,0x3c,0x00,0x3d,0x0a,0x0a,0x3d,0x00,0x1d,0x22,0x22,0x1d,0x00, diff --git a/radio/src/fonts/sqt5/font_se_04x06.png b/radio/src/fonts/sqt5/font_se_04x06.png index 00e8fb47d..39346ec75 100644 Binary files a/radio/src/fonts/sqt5/font_se_04x06.png and b/radio/src/fonts/sqt5/font_se_04x06.png differ diff --git a/radio/src/fonts/sqt5/font_se_05x07.lbm b/radio/src/fonts/sqt5/font_se_05x07.lbm deleted file mode 100644 index ef8fc9c71..000000000 --- a/radio/src/fonts/sqt5/font_se_05x07.lbm +++ /dev/null @@ -1 +0,0 @@ -0x74,0x57,0x55,0x57,0x7c,0x74,0x55,0x54,0x55,0x7c,0x38,0x45,0x44,0x45,0x38,0x78,0x17,0x15,0x17,0x78,0x78,0x15,0x14,0x15,0x78,0x38,0x45,0x44,0x45,0x38, diff --git a/radio/src/fonts/sqt5/font_se_08x10.lbm b/radio/src/fonts/sqt5/font_se_08x10.lbm deleted file mode 100644 index bd9f19b29..000000000 --- a/radio/src/fonts/sqt5/font_se_08x10.lbm +++ /dev/null @@ -1 +0,0 @@ -0x90,0x07,0x90,0x07,0x92,0x04,0x95,0x04,0x95,0x04,0xf2,0x07,0xf0,0x07,0x00,0x00,0x90,0x07,0x96,0x07,0x96,0x04,0x90,0x04,0x96,0x04,0xf6,0x07,0xf0,0x07,0x00,0x00,0xe0,0x03,0xf6,0x07,0x16,0x04,0x10,0x04,0x16,0x04,0xf6,0x07,0xe0,0x03,0x00,0x00,0xf0,0x07,0xf8,0x07,0x9a,0x00,0x9d,0x00,0x9d,0x00,0x9a,0x00,0xf8,0x07,0xf0,0x07,0xf0,0x07,0xfb,0x07,0x9b,0x00,0x98,0x00,0x98,0x00,0x9b,0x00,0xfb,0x07,0xf0,0x07,0xf0,0x03,0xfb,0x07,0x0b,0x04,0x08,0x04,0x08,0x04,0x0b,0x04,0xfb,0x07,0xf0,0x03, diff --git a/radio/src/fonts/sqt5/font_se_08x10.png b/radio/src/fonts/sqt5/font_se_08x10.png index c82cb8320..3602d7811 100644 Binary files a/radio/src/fonts/sqt5/font_se_08x10.png and b/radio/src/fonts/sqt5/font_se_08x10.png differ diff --git a/radio/src/fonts/sqt5/font_se_10x14.lbm b/radio/src/fonts/sqt5/font_se_10x14.lbm deleted file mode 100644 index e1fa337cc..000000000 --- a/radio/src/fonts/sqt5/font_se_10x14.lbm +++ /dev/null @@ -1 +0,0 @@ -0x60,0x7e,0x60,0x7e,0x60,0x7e,0x64,0x66,0x6a,0x66,0x6a,0x66,0x64,0x66,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x60,0x7e,0x60,0x7e,0x6c,0x7e,0x6c,0x66,0x60,0x66,0x60,0x66,0x6c,0x66,0xec,0x7f,0xe0,0x7f,0xe0,0x7f,0xc0,0x3f,0xe0,0x7f,0xec,0x7f,0x6c,0x60,0x60,0x60,0x60,0x60,0x6c,0x60,0xec,0x7f,0xe0,0x7f,0xc0,0x3f,0xf0,0x7f,0xf8,0x7f,0xf8,0x7f,0x1a,0x06,0x1d,0x06,0x1d,0x06,0x1a,0x06,0xf8,0x7f,0xf8,0x7f,0xf0,0x7f,0xf0,0x7f,0xfb,0x7f,0xfb,0x7f,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0xfb,0x7f,0xfb,0x7f,0xf0,0x7f,0xf0,0x3f,0xfb,0x7f,0xfb,0x7f,0x18,0x60,0x18,0x60,0x18,0x60,0x18,0x60,0xfb,0x7f,0xfb,0x7f,0xf0,0x3f, diff --git a/radio/src/fonts/std/font_03x05.lbm b/radio/src/fonts/std/font_03x05.lbm deleted file mode 100644 index 1e163ee0d..000000000 --- a/radio/src/fonts/std/font_03x05.lbm +++ /dev/null @@ -1 +0,0 @@ -0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x11,0x0e,0x12,0x1f,0x10,0x19,0x15,0x13,0x11,0x15,0x1f,0x07,0x04,0x1f,0x17,0x15,0x1d,0x1f,0x15,0x1d,0x01,0x1d,0x03,0x1f,0x15,0x1f,0x17,0x15,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x1f,0x11, diff --git a/radio/src/fonts/std/font_03x05.png b/radio/src/fonts/std/font_03x05.png index c378d30f0..59357bafd 100644 Binary files a/radio/src/fonts/std/font_03x05.png and b/radio/src/fonts/std/font_03x05.png differ diff --git a/radio/src/fonts/std/font_04x06.lbm b/radio/src/fonts/std/font_04x06.lbm deleted file mode 100644 index d4c2686e5..000000000 --- a/radio/src/fonts/std/font_04x06.lbm +++ /dev/null @@ -1,6 +0,0 @@ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x14,0x3e,0x14,0x3e,0x14,0x04,0x2a,0x3e,0x2a,0x10,0x13,0x08,0x04,0x32,0x00,0x14,0x2a,0x14,0x20,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x1e,0x21,0x00,0x00,0x00,0x21,0x1e,0x00,0x00,0x00,0x2a,0x1c,0x2a,0x00,0x08,0x08,0x3e,0x08,0x08,0x00,0x40,0x30,0x10,0x00,0x08,0x08,0x08,0x08,0x00,0x00,0x30,0x30,0x00,0x00,0x10,0x08,0x04,0x02,0x00, -0x00,0x1e,0x21,0x1e,0x00,0x00,0x22,0x3f,0x20,0x00,0x22,0x31,0x29,0x26,0x00,0x11,0x25,0x25,0x1b,0x00,0x0c,0x0a,0x3f,0x08,0x00,0x17,0x25,0x25,0x19,0x00,0x1e,0x25,0x25,0x18,0x00,0x01,0x31,0x0d,0x03,0x00,0x1a,0x25,0x25,0x1a,0x00,0x06,0x29,0x29,0x1e,0x00,0x00,0x36,0x36,0x00,0x00,0x40,0x36,0x16,0x00,0x00,0x00,0x08,0x14,0x22,0x00,0x14,0x14,0x14,0x14,0x00,0x00,0x22,0x14,0x08,0x00,0x00,0x02,0x29,0x06,0x00, -0x00,0x02,0x05,0x02,0x00,0x3e,0x09,0x09,0x3e,0x00,0x3f,0x25,0x25,0x1a,0x00,0x1e,0x21,0x21,0x12,0x00,0x3f,0x21,0x21,0x1e,0x00,0x3f,0x25,0x25,0x21,0x00,0x3f,0x05,0x05,0x01,0x00,0x1e,0x21,0x29,0x3a,0x00,0x3f,0x04,0x04,0x3f,0x00,0x00,0x21,0x3f,0x21,0x00,0x10,0x20,0x20,0x1f,0x00,0x3f,0x0c,0x12,0x21,0x00,0x3f,0x20,0x20,0x20,0x00,0x3f,0x02,0x04,0x02,0x3f,0x3f,0x06,0x18,0x3f,0x00,0x1e,0x21,0x21,0x1e,0x00, -0x3f,0x09,0x09,0x06,0x00,0x1e,0x31,0x21,0x5e,0x00,0x3f,0x09,0x19,0x26,0x00,0x12,0x25,0x29,0x12,0x00,0x00,0x01,0x3f,0x01,0x00,0x1f,0x20,0x20,0x1f,0x00,0x0f,0x30,0x30,0x0f,0x00,0x3f,0x18,0x0c,0x18,0x3f,0x33,0x0c,0x0c,0x33,0x00,0x00,0x07,0x38,0x07,0x00,0x31,0x29,0x25,0x23,0x00,0x00,0x3f,0x21,0x21,0x00,0x02,0x04,0x08,0x10,0x00,0x00,0x21,0x21,0x3f,0x00,0x00,0x02,0x01,0x02,0x00,0x20,0x20,0x20,0x20,0x00, -0x00,0x01,0x02,0x00,0x00,0x18,0x24,0x14,0x3c,0x00,0x3f,0x24,0x24,0x18,0x00,0x18,0x24,0x24,0x00,0x00,0x18,0x24,0x24,0x3f,0x00,0x18,0x34,0x2c,0x08,0x00,0x08,0x3e,0x09,0x02,0x00,0x28,0x54,0x54,0x4c,0x00,0x3f,0x04,0x04,0x38,0x00,0x00,0x24,0x3d,0x20,0x00,0x00,0x20,0x40,0x3d,0x00,0x3f,0x08,0x14,0x20,0x00,0x00,0x21,0x3f,0x20,0x00,0x3c,0x08,0x38,0x0c,0x38,0x3c,0x04,0x04,0x38,0x00,0x18,0x24,0x24,0x18,0x00, -0x7c,0x24,0x24,0x18,0x00,0x18,0x24,0x24,0x7c,0x00,0x3c,0x04,0x04,0x08,0x00,0x28,0x2c,0x34,0x14,0x00,0x04,0x1f,0x24,0x20,0x00,0x1c,0x20,0x20,0x3c,0x00,0x00,0x1c,0x20,0x1c,0x00,0x3c,0x30,0x18,0x30,0x3c,0x24,0x18,0x18,0x24,0x00,0x0c,0x50,0x20,0x1c,0x00,0x24,0x34,0x2c,0x24,0x00,0x00,0x04,0x1e,0x21,0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x21,0x1e,0x04,0x00,0x08,0x2a,0x1c,0x08,0x00,0x00,0x08,0x1c,0x2a,0x08, diff --git a/radio/src/fonts/std/font_04x06.png b/radio/src/fonts/std/font_04x06.png index 40e4ae995..ebbfa7a10 100644 Binary files a/radio/src/fonts/std/font_04x06.png and b/radio/src/fonts/std/font_04x06.png differ diff --git a/radio/src/fonts/std/font_04x06_extra.lbm b/radio/src/fonts/std/font_04x06_extra.lbm deleted file mode 100644 index cce1e9d68..000000000 --- a/radio/src/fonts/std/font_04x06_extra.lbm +++ /dev/null @@ -1 +0,0 @@ -0x04,0x02,0x3b,0x02,0x04,0x08,0x10,0x37,0x10,0x08,0x20,0x12,0x0a,0x02,0x1e,0x02,0x24,0x28,0x20,0x3c,0x3c,0x20,0x28,0x24,0x02,0x1e,0x02,0x0a,0x12,0x20, diff --git a/radio/src/fonts/std/font_05x07.lbm b/radio/src/fonts/std/font_05x07.lbm deleted file mode 100644 index f6df4bd17..000000000 --- a/radio/src/fonts/std/font_05x07.lbm +++ /dev/null @@ -1,6 +0,0 @@ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6f,0x00,0x00,0x07,0x00,0x07,0x00,0x18,0x30,0x18,0x0c,0x06,0x08,0x7f,0x7f,0x7f,0x08,0x23,0x13,0x08,0x64,0x62,0x36,0x49,0x55,0x22,0x50,0x00,0x05,0x03,0x00,0x00,0x00,0x1c,0x22,0x41,0x00,0x00,0x41,0x22,0x1c,0x00,0x14,0x08,0x3e,0x08,0x14,0x08,0x08,0x3e,0x08,0x08,0x00,0x50,0x30,0x00,0x00,0x00,0x08,0x08,0x08,0x08,0x00,0x60,0x60,0x00,0x00,0x20,0x10,0x08,0x04,0x02, -0x00,0x3e,0x41,0x41,0x3e,0x00,0x00,0x42,0x7f,0x40,0x00,0x62,0x51,0x49,0x46,0x00,0x41,0x49,0x49,0x36,0x00,0x18,0x14,0x12,0x7f,0x00,0x27,0x45,0x45,0x39,0x00,0x3e,0x49,0x49,0x32,0x00,0x01,0x79,0x05,0x03,0x00,0x36,0x49,0x49,0x36,0x00,0x06,0x49,0x29,0x1e,0x00,0x00,0x36,0x36,0x00,0x00,0x00,0x56,0x36,0x00,0x00,0x08,0x14,0x22,0x41,0x14,0x14,0x14,0x14,0x14,0x41,0x22,0x14,0x08,0x00,0x02,0x01,0x51,0x09,0x06, -0x06,0x09,0x09,0x06,0x00,0x7e,0x09,0x09,0x09,0x7e,0x7f,0x49,0x49,0x49,0x36,0x3e,0x41,0x41,0x41,0x22,0x7f,0x41,0x41,0x22,0x1c,0x7f,0x49,0x49,0x49,0x41,0x7f,0x09,0x09,0x09,0x01,0x3e,0x41,0x49,0x49,0x7a,0x7f,0x08,0x08,0x08,0x7f,0x00,0x41,0x7f,0x41,0x00,0x20,0x40,0x41,0x3f,0x01,0x7f,0x08,0x14,0x22,0x41,0x7f,0x40,0x40,0x40,0x40,0x7f,0x02,0x0c,0x02,0x7f,0x7f,0x04,0x08,0x10,0x7f,0x3e,0x41,0x41,0x41,0x3e, -0x7f,0x09,0x09,0x09,0x06,0x3e,0x41,0x51,0x21,0x5e,0x7f,0x09,0x19,0x29,0x46,0x26,0x49,0x49,0x49,0x32,0x01,0x01,0x7f,0x01,0x01,0x3f,0x40,0x40,0x40,0x3f,0x1f,0x20,0x40,0x20,0x1f,0x3f,0x40,0x30,0x40,0x3f,0x63,0x14,0x08,0x14,0x63,0x07,0x08,0x70,0x08,0x07,0x61,0x51,0x49,0x45,0x43,0x00,0x7f,0x41,0x41,0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x41,0x41,0x7f,0x00,0x04,0x02,0x01,0x02,0x04,0x40,0x40,0x40,0x40,0x40, -0x00,0x01,0x02,0x04,0x00,0x20,0x54,0x54,0x54,0x78,0x7f,0x48,0x44,0x44,0x38,0x38,0x44,0x44,0x44,0x20,0x38,0x44,0x44,0x48,0x7f,0x38,0x54,0x54,0x54,0x18,0x08,0x7e,0x09,0x01,0x02,0x0c,0x52,0x52,0x52,0x3e,0x7f,0x08,0x04,0x04,0x78,0x00,0x44,0x7d,0x40,0x00,0x20,0x40,0x44,0x3d,0x00,0x7f,0x10,0x28,0x44,0x00,0x00,0x41,0x7f,0x40,0x00,0x7c,0x04,0x18,0x04,0x78,0x7c,0x08,0x04,0x04,0x78,0x38,0x44,0x44,0x44,0x38, -0x7c,0x14,0x14,0x14,0x08,0x08,0x14,0x14,0x18,0x7c,0x7c,0x08,0x04,0x04,0x08,0x48,0x54,0x54,0x54,0x20,0x04,0x3f,0x44,0x40,0x20,0x3c,0x40,0x40,0x20,0x7c,0x1c,0x20,0x40,0x20,0x1c,0x3c,0x40,0x20,0x40,0x3c,0x44,0x28,0x10,0x28,0x44,0x0c,0x50,0x50,0x50,0x3c,0x44,0x64,0x54,0x4c,0x44,0x10,0x08,0x10,0x08,0x00,0x7f,0x00,0x00,0x00,0x00,0x41,0x22,0x54,0x28,0x00,0x08,0x08,0x22,0x1c,0x08,0x08,0x1c,0x22,0x08,0x08, diff --git a/radio/src/fonts/std/font_05x07.png b/radio/src/fonts/std/font_05x07.png index 33e9e7825..71a4d36eb 100644 Binary files a/radio/src/fonts/std/font_05x07.png and b/radio/src/fonts/std/font_05x07.png differ diff --git a/radio/src/fonts/std/font_05x07_B_compressed.png b/radio/src/fonts/std/font_05x07_B_compressed.png new file mode 100644 index 000000000..985ded8a1 Binary files /dev/null and b/radio/src/fonts/std/font_05x07_B_compressed.png differ diff --git a/radio/src/fonts/std/font_05x07_extra.lbm b/radio/src/fonts/std/font_05x07_extra.lbm deleted file mode 100644 index ea644215a..000000000 --- a/radio/src/fonts/std/font_05x07_extra.lbm +++ /dev/null @@ -1 +0,0 @@ -0x04,0x02,0x7b,0x02,0x04,0x10,0x20,0x6f,0x20,0x10,0x20,0x12,0x0a,0x02,0x1e,0x02,0x24,0x28,0x20,0x3c,0x3c,0x20,0x28,0x24,0x02,0x1e,0x02,0x0a,0x12,0x20, diff --git a/radio/src/fonts/std/font_08x10.lbm b/radio/src/fonts/std/font_08x10.lbm deleted file mode 100644 index 786c5f3d6..000000000 --- a/radio/src/fonts/std/font_08x10.lbm +++ /dev/null @@ -1,6 +0,0 @@ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x05,0xfe,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x0e,0x00,0x00,0x00,0x0e,0x00,0x0e,0x00,0x00,0x00,0x00,0x00,0x90,0x00,0xfc,0x03,0xfc,0x03,0x90,0x00,0xfc,0x03,0xfc,0x03,0x90,0x00,0x00,0x00,0x38,0x02,0x7c,0x06,0x64,0x04,0xfe,0x0f,0xc4,0x04,0xcc,0x07,0x88,0x03,0x0c,0x04,0x1e,0x07,0x8c,0x03,0xe0,0x00,0x70,0x00,0x1c,0x03,0x8e,0x07,0x02,0x03,0x80,0x03,0xdc,0x07,0x7e,0x04,0x72,0x04,0xde,0x06,0x8c,0x03,0x80,0x07,0xc0,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x00,0xfc,0x03,0x0e,0x07,0x03,0x0c,0x01,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x08,0x03,0x0c,0x0e,0x07,0xfc,0x03,0xf0,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x50,0x01,0xf0,0x01,0xe0,0x00,0xf0,0x01,0x50,0x01,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0xf8,0x03,0xf8,0x03,0x40,0x00,0x40,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x09,0x80,0x0f,0x80,0x07,0x00,0x00,0x00,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x0e,0x00,0x0e,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x07,0x80,0x03,0xe0,0x00,0x70,0x00,0x1c,0x00,0x0e,0x00,0x02,0x00, -0xfc,0x03,0xfe,0x07,0x02,0x04,0x02,0x04,0xfe,0x07,0xfc,0x03,0x00,0x00,0x00,0x00,0x08,0x04,0x0c,0x04,0xfe,0x07,0xfe,0x07,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00,0x0c,0x06,0x0e,0x07,0x82,0x05,0xe2,0x04,0x7e,0x04,0x1c,0x04,0x00,0x00,0x00,0x00,0x0c,0x03,0x0e,0x07,0x22,0x04,0x22,0x04,0xfe,0x07,0xdc,0x03,0x00,0x00,0x00,0x00,0xc0,0x01,0xe0,0x01,0x30,0x01,0xfc,0x07,0xfe,0x07,0x00,0x01,0x00,0x00,0x00,0x00,0x3e,0x03,0x3e,0x07,0x12,0x04,0x12,0x04,0xf2,0x07,0xe2,0x03,0x00,0x00,0x00,0x00,0xf8,0x03,0xfc,0x07,0x26,0x04,0x22,0x04,0xee,0x07,0xcc,0x03,0x00,0x00,0x00,0x00,0x0e,0x00,0x0e,0x00,0xe2,0x07,0xfa,0x07,0x1e,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x9c,0x03,0xfe,0x07,0x62,0x04,0x62,0x04,0xfe,0x07,0x9c,0x03,0x00,0x00,0x00,0x00,0x3c,0x03,0x7e,0x07,0x42,0x04,0x42,0x06,0xfe,0x03,0xfc,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x01,0x9c,0x03,0x9c,0x03,0x08,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x9c,0x09,0x9c,0x0f,0x88,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0xf0,0x00,0x98,0x01,0x0c,0x03,0x06,0x06,0x02,0x04,0x00,0x00,0x20,0x01,0x20,0x01,0x20,0x01,0x20,0x01,0x20,0x01,0x20,0x01,0x20,0x01,0x20,0x01,0x00,0x00,0x02,0x04,0x06,0x06,0x0c,0x03,0x98,0x01,0xf0,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x0e,0x00,0x82,0x06,0xc2,0x06,0x62,0x00,0x3e,0x00,0x1c,0x00, -0x00,0x00,0x00,0x00,0x0c,0x00,0x1e,0x00,0x12,0x00,0x12,0x00,0x1e,0x00,0x0c,0x00,0xf0,0x07,0xf8,0x07,0x8c,0x00,0x86,0x00,0x86,0x00,0x8c,0x00,0xf8,0x07,0xf0,0x07,0xfe,0x07,0xfe,0x07,0x22,0x04,0x22,0x04,0x22,0x04,0x76,0x06,0xdc,0x03,0x88,0x01,0xf8,0x01,0xfc,0x03,0x06,0x06,0x02,0x04,0x02,0x04,0x02,0x04,0x06,0x06,0x0c,0x03,0xfe,0x07,0xfe,0x07,0x02,0x04,0x02,0x04,0x02,0x04,0x06,0x06,0xfc,0x03,0xf8,0x01,0x00,0x00,0xfe,0x07,0xfe,0x07,0x22,0x04,0x22,0x04,0x22,0x04,0x22,0x04,0x02,0x04,0xfe,0x07,0xfe,0x07,0x22,0x00,0x22,0x00,0x22,0x00,0x22,0x00,0x02,0x00,0x02,0x00,0xf8,0x01,0xfc,0x03,0x06,0x06,0x02,0x04,0x02,0x04,0x42,0x04,0xc6,0x07,0xc4,0x03,0xfe,0x07,0xfe,0x07,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0xfe,0x07,0xfe,0x07,0x00,0x00,0x02,0x04,0x02,0x04,0xfe,0x07,0xfe,0x07,0x02,0x04,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x06,0x02,0x04,0x02,0x06,0xfe,0x03,0xfe,0x01,0x00,0x00,0xfe,0x07,0xfe,0x07,0x60,0x00,0xf0,0x00,0x98,0x01,0x0c,0x03,0x06,0x06,0x02,0x04,0x00,0x00,0xfe,0x07,0xfe,0x07,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0xfe,0x07,0xfe,0x07,0x0c,0x00,0x78,0x00,0x78,0x00,0x0c,0x00,0xfe,0x07,0xfe,0x07,0xfe,0x07,0xfe,0x07,0x1c,0x00,0x78,0x00,0xe0,0x00,0x80,0x03,0xfe,0x07,0xfe,0x07,0xf8,0x01,0xfc,0x03,0x06,0x06,0x02,0x04,0x02,0x04,0x06,0x06,0xfc,0x03,0xf8,0x01, -0xfe,0x07,0xfe,0x07,0x22,0x00,0x22,0x00,0x22,0x00,0x22,0x00,0x3e,0x00,0x1c,0x00,0xf8,0x01,0xfc,0x03,0x06,0x06,0x82,0x04,0x82,0x05,0x06,0x07,0xfc,0x03,0xf8,0x05,0xfe,0x07,0xfe,0x07,0x62,0x00,0x62,0x00,0xe2,0x00,0xa2,0x01,0x3e,0x07,0x1c,0x06,0x1c,0x02,0x3e,0x06,0x22,0x04,0x22,0x04,0x22,0x04,0x22,0x04,0xe6,0x07,0xc4,0x03,0x02,0x00,0x02,0x00,0x02,0x00,0xfe,0x07,0xfe,0x07,0x02,0x00,0x02,0x00,0x02,0x00,0xfe,0x01,0xfe,0x03,0x00,0x06,0x00,0x04,0x00,0x04,0x00,0x06,0xfe,0x03,0xfe,0x01,0x0e,0x00,0x7e,0x00,0xf0,0x01,0x80,0x07,0x80,0x07,0xf0,0x01,0x7e,0x00,0x0e,0x00,0xfe,0x07,0xfe,0x07,0x00,0x03,0xe0,0x01,0xe0,0x01,0x00,0x03,0xfe,0x07,0xfe,0x07,0x06,0x06,0x0e,0x07,0x98,0x01,0xf0,0x00,0xf0,0x00,0x98,0x01,0x0e,0x07,0x06,0x06,0x06,0x00,0x0e,0x00,0x18,0x00,0xf0,0x07,0xf0,0x07,0x18,0x00,0x0e,0x00,0x06,0x00,0x00,0x00,0x02,0x07,0x82,0x07,0xc2,0x04,0x62,0x04,0x32,0x04,0x1e,0x04,0x0e,0x04,0x00,0x00,0x00,0x00,0xff,0x0f,0xff,0x0f,0x01,0x08,0x01,0x08,0x01,0x08,0x00,0x00,0x02,0x00,0x0e,0x00,0x1c,0x00,0x70,0x00,0xe0,0x00,0x80,0x03,0x00,0x07,0x00,0x04,0x00,0x00,0x00,0x00,0x01,0x08,0x01,0x08,0x01,0x08,0xff,0x0f,0xff,0x0f,0x00,0x00,0x00,0x00,0x18,0x00,0x0c,0x00,0x06,0x00,0x06,0x00,0x0c,0x00,0x18,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08, -0x00,0x00,0x01,0x00,0x03,0x00,0x06,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xa0,0x07,0xb0,0x04,0x90,0x04,0x90,0x02,0xf0,0x07,0xe0,0x07,0x00,0x00,0xfe,0x07,0xfe,0x07,0x20,0x02,0x10,0x04,0x30,0x06,0xe0,0x03,0xc0,0x01,0x00,0x00,0xc0,0x01,0xe0,0x03,0x30,0x06,0x10,0x04,0x10,0x04,0x30,0x06,0x20,0x02,0x00,0x00,0xc0,0x01,0xe0,0x03,0x30,0x06,0x10,0x04,0x20,0x02,0xfe,0x07,0xfe,0x07,0x00,0x00,0xc0,0x01,0xe0,0x03,0xb0,0x06,0x90,0x04,0xb0,0x04,0xe0,0x06,0xc0,0x02,0x00,0x00,0x40,0x00,0x40,0x00,0xfc,0x07,0xfe,0x07,0x42,0x00,0x0e,0x00,0x0c,0x00,0x00,0x00,0x60,0x05,0xf0,0x0f,0x90,0x0a,0x90,0x0a,0xf0,0x0a,0x60,0x0e,0x30,0x04,0x00,0x00,0xfe,0x07,0xfe,0x07,0x20,0x00,0x10,0x00,0x30,0x00,0xe0,0x07,0xc0,0x07,0x00,0x00,0x00,0x04,0x10,0x04,0xf6,0x07,0xf6,0x07,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x0f,0x00,0x08,0x10,0x08,0x10,0x08,0xf6,0x0f,0xf6,0x07,0x00,0x00,0x00,0x00,0xfe,0x07,0xfe,0x07,0xc0,0x01,0x60,0x03,0x30,0x06,0x00,0x04,0x00,0x00,0x00,0x04,0x02,0x04,0xfe,0x07,0xfe,0x07,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00,0xf0,0x07,0xe0,0x07,0x10,0x00,0xe0,0x07,0x10,0x00,0xf0,0x07,0xe0,0x07,0x00,0x00,0xf0,0x07,0xf0,0x07,0x20,0x00,0x10,0x00,0x30,0x00,0xe0,0x07,0xc0,0x07,0x00,0x00,0xc0,0x01,0xe0,0x03,0x30,0x06,0x10,0x04,0x30,0x06,0xe0,0x03,0xc0,0x01,0x00,0x00, -0xf0,0x0f,0xf0,0x0f,0x10,0x01,0x10,0x01,0xb0,0x01,0xe0,0x00,0xc0,0x00,0x00,0x00,0xc0,0x00,0xe0,0x00,0xb0,0x01,0x10,0x01,0x10,0x01,0xf0,0x0f,0xf0,0x0f,0x00,0x00,0x10,0x00,0xf0,0x07,0xe0,0x07,0x30,0x00,0x10,0x00,0x30,0x00,0x20,0x00,0x00,0x00,0x60,0x02,0xf0,0x06,0x90,0x04,0x90,0x04,0x90,0x04,0xb0,0x07,0x20,0x03,0x00,0x00,0x10,0x00,0x10,0x00,0xfc,0x03,0xfc,0x07,0x10,0x04,0x10,0x06,0x00,0x02,0x00,0x00,0xf0,0x01,0xf0,0x03,0x00,0x06,0x00,0x04,0x00,0x02,0xf0,0x07,0xf0,0x07,0x00,0x00,0x30,0x00,0xf0,0x00,0xc0,0x03,0x00,0x07,0xc0,0x03,0xf0,0x00,0x30,0x00,0x00,0x00,0xf0,0x03,0xf0,0x07,0x00,0x06,0xc0,0x03,0x00,0x06,0xf0,0x07,0xf0,0x03,0x00,0x00,0x10,0x04,0x30,0x06,0x60,0x03,0xc0,0x01,0x60,0x03,0x30,0x06,0x10,0x04,0x00,0x00,0xf0,0x04,0xf0,0x0c,0x00,0x09,0x00,0x09,0x80,0x0c,0xf0,0x07,0xf0,0x03,0x00,0x00,0x10,0x06,0x10,0x07,0x90,0x05,0xd0,0x04,0x70,0x04,0x30,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0xfe,0x07,0x9f,0x0f,0x01,0x08,0x01,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x07,0xfe,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x08,0x01,0x08,0x9f,0x0f,0xfe,0x07,0x60,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x64,0x02,0x68,0x01,0xf0,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0xf0,0x00,0x68,0x01,0x64,0x02,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00, diff --git a/radio/src/fonts/std/font_08x10.png b/radio/src/fonts/std/font_08x10.png index 7f01e370c..1d7080a48 100644 Binary files a/radio/src/fonts/std/font_08x10.png and b/radio/src/fonts/std/font_08x10.png differ diff --git a/radio/src/fonts/std/font_10x14.lbm b/radio/src/fonts/std/font_10x14.lbm deleted file mode 100644 index cd6e036ed..000000000 --- a/radio/src/fonts/std/font_10x14.lbm +++ /dev/null @@ -1,6 +0,0 @@ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x71,0xfe,0x71,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0x60,0x06,0x60,0x06,0xfe,0x7f,0xfe,0x7f,0x60,0x06,0x60,0x06,0xfe,0x7f,0xfe,0x7f,0x60,0x06,0x60,0x06,0x60,0x18,0xf0,0x18,0x98,0x19,0x98,0x19,0xfe,0x7f,0xfe,0x7f,0x98,0x19,0x98,0x19,0x18,0x0f,0x18,0x06,0x0c,0x18,0x1e,0x1c,0x1e,0x0e,0x0c,0x07,0x80,0x03,0xc0,0x01,0xe0,0x30,0x70,0x78,0x38,0x78,0x18,0x30,0x78,0x1e,0xfc,0x3f,0x8e,0x71,0xc6,0x63,0xe6,0x67,0x76,0x66,0x3c,0x3c,0x18,0x3c,0x00,0x66,0x00,0x66,0x00,0x00,0x00,0x00,0x66,0x00,0x76,0x00,0x3e,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x07,0xf0,0x0f,0x38,0x1c,0x1c,0x38,0x0e,0x70,0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x60,0x0e,0x70,0x1c,0x38,0x38,0x1c,0xf0,0x0f,0xe0,0x07,0x00,0x00,0x00,0x00,0x60,0x06,0x60,0x06,0xc0,0x03,0x80,0x01,0xf8,0x1f,0xf8,0x1f,0x80,0x01,0xc0,0x03,0x60,0x06,0x60,0x06,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xf8,0x1f,0xf8,0x1f,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x66,0x00,0x76,0x00,0x3e,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x78,0x00,0x78,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x1c,0x00,0x0e,0x00,0x07,0x80,0x03,0xc0,0x01,0xe0,0x00,0x70,0x00,0x38,0x00,0x18,0x00, -0x00,0x00,0x00,0x00,0xf8,0x1f,0xfc,0x3f,0x0e,0x70,0x06,0x60,0x06,0x60,0x0e,0x70,0xfc,0x3f,0xf8,0x1f,0x00,0x00,0x00,0x00,0x18,0x60,0x1c,0x60,0xfe,0x7f,0xfe,0x7f,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x78,0x1c,0x7c,0x0e,0x6e,0x06,0x67,0x86,0x63,0xce,0x61,0xfc,0x60,0x78,0x60,0x00,0x00,0x00,0x00,0x06,0x60,0x06,0x60,0x86,0x61,0x86,0x61,0x86,0x61,0xce,0x73,0xfc,0x3f,0x78,0x1e,0x00,0x00,0x00,0x00,0x80,0x07,0xc0,0x07,0xe0,0x06,0x70,0x06,0x38,0x06,0x1c,0x06,0xfe,0x7f,0xfe,0x7f,0x00,0x00,0x00,0x00,0x7e,0x18,0x7e,0x38,0x66,0x70,0x66,0x60,0x66,0x60,0xe6,0x70,0xc6,0x3f,0x86,0x1f,0x00,0x00,0x00,0x00,0xf8,0x1f,0xfc,0x3f,0x8e,0x71,0x86,0x61,0x86,0x61,0x8e,0x73,0x1c,0x3f,0x18,0x1e,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x86,0x7f,0xc6,0x7f,0xe6,0x00,0x76,0x00,0x3e,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x78,0x1e,0xfc,0x3f,0xce,0x73,0x86,0x61,0x86,0x61,0xce,0x73,0xfc,0x3f,0x78,0x1e,0x00,0x00,0x00,0x00,0x78,0x00,0xfc,0x00,0xce,0x61,0x86,0x71,0x86,0x39,0xce,0x1d,0xfc,0x0f,0xf8,0x07,0x00,0x00,0x00,0x00,0x30,0x0c,0x78,0x1e,0x78,0x1e,0x30,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x66,0x78,0x76,0x78,0x3e,0x30,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0xc0,0x03,0xe0,0x07,0x70,0x0e,0x38,0x1c,0x1c,0x38,0x0e,0x70,0x06,0x60,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x06,0x60,0x0e,0x70,0x1c,0x38,0x38,0x1c,0x70,0x0e,0xe0,0x07,0xc0,0x03,0x80,0x01,0x00,0x00,0x00,0x00,0x18,0x00,0x1c,0x00,0x0e,0x00,0x06,0x00,0x06,0x66,0x06,0x67,0x86,0x03,0xce,0x01,0xfc,0x00,0x78,0x00, -0x78,0x00,0xfc,0x00,0xce,0x01,0x86,0x01,0x86,0x01,0xce,0x01,0xfc,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0xe0,0x7f,0xf0,0x7f,0xb8,0x01,0x9c,0x01,0x8e,0x01,0x8e,0x01,0x9c,0x01,0xb8,0x01,0xf0,0x7f,0xe0,0x7f,0xfe,0x7f,0xfe,0x7f,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0xce,0x73,0xfc,0x3f,0x78,0x1e,0xf8,0x1f,0xfc,0x3f,0x0e,0x70,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x0e,0x70,0x1c,0x38,0x18,0x18,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x60,0x06,0x60,0x0e,0x70,0x1c,0x38,0x38,0x1c,0xf0,0x0f,0xe0,0x07,0xfe,0x7f,0xfe,0x7f,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x06,0x00,0x06,0x00,0xf8,0x1f,0xfc,0x3f,0x0e,0x70,0x06,0x60,0x86,0x61,0x86,0x61,0x86,0x61,0x8e,0x71,0x9c,0x7f,0x98,0x3f,0xfe,0x7f,0xfe,0x7f,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xfe,0x7f,0xfe,0x7f,0x00,0x00,0x00,0x00,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x38,0x00,0x70,0x00,0x60,0x06,0x60,0x06,0x70,0xfe,0x3f,0xfe,0x1f,0x06,0x00,0x06,0x00,0xfe,0x7f,0xfe,0x7f,0x80,0x01,0xc0,0x03,0xe0,0x07,0x70,0x0e,0x38,0x1c,0x1c,0x38,0x0e,0x70,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0xfe,0x7f,0xfe,0x7f,0x1c,0x00,0x38,0x00,0xf0,0x01,0xf0,0x01,0x38,0x00,0x1c,0x00,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x70,0x00,0xe0,0x00,0xc0,0x01,0x80,0x03,0x00,0x07,0x00,0x0e,0xfe,0x7f,0xfe,0x7f,0xf8,0x1f,0xfc,0x3f,0x0e,0x70,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x0e,0x70,0xfc,0x3f,0xf8,0x1f, -0xfe,0x7f,0xfe,0x7f,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0xce,0x01,0xfc,0x00,0x78,0x00,0xf8,0x1f,0xfc,0x3f,0x0e,0x70,0x06,0x60,0x06,0x66,0x06,0x6e,0x06,0x3c,0x0e,0x38,0xfc,0x7f,0xf8,0x67,0xfe,0x7f,0xfe,0x7f,0x86,0x01,0x86,0x01,0x86,0x07,0x86,0x0f,0x86,0x1d,0xce,0x39,0xfc,0x70,0x78,0x60,0x78,0x18,0xfc,0x38,0xce,0x71,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x8e,0x73,0x1c,0x3f,0x18,0x1e,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xfe,0x7f,0xfe,0x7f,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xfe,0x1f,0xfe,0x3f,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x70,0xfe,0x3f,0xfe,0x1f,0xfe,0x07,0xfe,0x0f,0x00,0x1c,0x00,0x38,0x00,0x70,0x00,0x70,0x00,0x38,0x00,0x1c,0xfe,0x0f,0xfe,0x07,0xfe,0x1f,0xfe,0x3f,0x00,0x70,0x00,0x70,0x00,0x3e,0x00,0x3e,0x00,0x70,0x00,0x70,0xfe,0x3f,0xfe,0x1f,0x1e,0x78,0x3e,0x7c,0x70,0x0e,0xe0,0x07,0xc0,0x03,0xc0,0x03,0xe0,0x07,0x70,0x0e,0x3e,0x7c,0x1e,0x78,0x7e,0x00,0xfe,0x00,0xc0,0x01,0x80,0x03,0x00,0x7f,0x00,0x7f,0x80,0x03,0xc0,0x01,0xfe,0x00,0x7e,0x00,0x06,0x78,0x06,0x7c,0x06,0x6e,0x06,0x67,0x86,0x63,0xc6,0x61,0xe6,0x60,0x76,0x60,0x3e,0x60,0x1e,0x60,0x00,0x00,0x00,0x00,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x00,0x00,0x00,0x00,0x18,0x00,0x38,0x00,0x70,0x00,0xe0,0x00,0xc0,0x01,0x80,0x03,0x00,0x07,0x00,0x0e,0x00,0x1c,0x00,0x18,0x00,0x00,0x00,0x00,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0x00,0x00,0x00,0x00,0x60,0x00,0x70,0x00,0x38,0x00,0x1c,0x00,0x0e,0x00,0x0e,0x00,0x1c,0x00,0x38,0x00,0x70,0x00,0x60,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60, -0x00,0x00,0x00,0x00,0x06,0x00,0x0e,0x00,0x1c,0x00,0x38,0x00,0x70,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x3c,0x60,0x7e,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0xe0,0x66,0xc0,0x7f,0x80,0x7f,0xfe,0x7f,0xfe,0x7f,0x80,0x61,0xc0,0x61,0xe0,0x60,0x60,0x60,0x60,0x60,0xe0,0x70,0xc0,0x3f,0x80,0x1f,0x80,0x1f,0xc0,0x3f,0xe0,0x70,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x70,0x00,0x38,0x00,0x18,0x80,0x1f,0xc0,0x3f,0xe0,0x70,0x60,0x60,0x60,0x60,0xe0,0x60,0xc0,0x61,0x80,0x61,0xfe,0x7f,0xfe,0x7f,0x80,0x1f,0xc0,0x3f,0xe0,0x76,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0xe0,0x66,0xc0,0x07,0x80,0x07,0x80,0x01,0x80,0x01,0xf8,0x7f,0xfc,0x7f,0x8e,0x01,0x86,0x01,0x06,0x00,0x0e,0x00,0x1c,0x00,0x18,0x00,0xe0,0x01,0xf0,0x03,0x38,0x67,0x18,0x66,0x18,0x66,0x18,0x66,0x18,0x66,0x18,0x76,0xf8,0x3f,0xf8,0x1f,0xfe,0x7f,0xfe,0x7f,0x80,0x01,0xc0,0x01,0xe0,0x00,0x60,0x00,0x60,0x00,0xe0,0x00,0xc0,0x7f,0x80,0x7f,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x60,0xe6,0x7f,0xe6,0x7f,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x38,0x00,0x70,0x00,0x60,0x60,0x60,0x60,0x70,0xe6,0x3f,0xe6,0x1f,0x00,0x00,0x00,0x00,0xfe,0x7f,0xfe,0x7f,0x00,0x06,0x00,0x0f,0x80,0x1f,0xc0,0x39,0xe0,0x70,0x60,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0xe0,0x7f,0xe0,0x7f,0x60,0x00,0xe0,0x00,0xc0,0x07,0xc0,0x07,0xe0,0x00,0xe0,0x00,0xc0,0x7f,0x80,0x7f,0xe0,0x7f,0xe0,0x7f,0x80,0x01,0xc0,0x01,0xe0,0x00,0x60,0x00,0x60,0x00,0xe0,0x00,0xc0,0x7f,0x80,0x7f,0x80,0x1f,0xc0,0x3f,0xe0,0x70,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x70,0xc0,0x3f,0x80,0x1f, -0xe0,0x7f,0xe0,0x7f,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0xe0,0x07,0xc0,0x03,0x80,0x01,0x80,0x01,0xc0,0x03,0xe0,0x07,0x60,0x06,0x60,0x06,0x60,0x06,0xc0,0x07,0x80,0x07,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x80,0x01,0xc0,0x01,0xe0,0x00,0x60,0x00,0x60,0x00,0xe0,0x00,0xc0,0x01,0x80,0x01,0x80,0x61,0xc0,0x63,0xe0,0x67,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x7e,0x00,0x3c,0x00,0x18,0x60,0x00,0x60,0x00,0xfe,0x1f,0xfe,0x3f,0x60,0x70,0x60,0x60,0x00,0x60,0x00,0x70,0x00,0x38,0x00,0x18,0xe0,0x1f,0xe0,0x3f,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x70,0x00,0x38,0x00,0x18,0xe0,0x7f,0xe0,0x7f,0xe0,0x07,0xe0,0x0f,0x00,0x1c,0x00,0x38,0x00,0x70,0x00,0x70,0x00,0x38,0x00,0x1c,0xe0,0x0f,0xe0,0x07,0xe0,0x1f,0xe0,0x3f,0x00,0x70,0x00,0x70,0x00,0x38,0x00,0x38,0x00,0x70,0x00,0x70,0xe0,0x3f,0xe0,0x1f,0x60,0x60,0xe0,0x70,0xc0,0x39,0x80,0x1f,0x00,0x0f,0x00,0x0f,0x80,0x1f,0xc0,0x39,0xe0,0x70,0x60,0x60,0xe0,0x01,0xe0,0x03,0x00,0x67,0x00,0x66,0x00,0x66,0x00,0x66,0x00,0x66,0x00,0x76,0xe0,0x3f,0xe0,0x1f,0x60,0x60,0x60,0x70,0x60,0x78,0x60,0x7c,0x60,0x6e,0x60,0x67,0xe0,0x63,0xe0,0x61,0xe0,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x80,0x01,0xc0,0x03,0x78,0x1e,0x7c,0x3e,0x0e,0x70,0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x7f,0xfe,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x60,0x0e,0x70,0x7c,0x3e,0x78,0x1e,0xc0,0x03,0x80,0x01,0x00,0x00,0x00,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x18,0x18,0x38,0x1c,0xf0,0x0f,0xe0,0x07,0xc0,0x03,0x80,0x01,0x80,0x01,0xc0,0x03,0xe0,0x07,0xf0,0x0f,0x38,0x1c,0x18,0x18,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01, diff --git a/radio/src/fonts/std/font_10x14.png b/radio/src/fonts/std/font_10x14.png index 1849cc0eb..35ad65ed4 100644 Binary files a/radio/src/fonts/std/font_10x14.png and b/radio/src/fonts/std/font_10x14.png differ diff --git a/radio/src/fonts/std/font_10x14_compressed.lbm b/radio/src/fonts/std/font_10x14_compressed.lbm deleted file mode 100644 index 48525daac..000000000 --- a/radio/src/fonts/std/font_10x14_compressed.lbm +++ /dev/null @@ -1 +0,0 @@ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x00,0x76,0x00,0x3e,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x78,0x00,0x78,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0xf8,0x1f,0xfc,0x3f,0x0e,0x70,0x06,0x60,0x06,0x60,0x0e,0x70,0xfc,0x3f,0xf8,0x1f,0x00,0x00,0x00,0x00,0x18,0x60,0x1c,0x60,0xfe,0x7f,0xfe,0x7f,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x78,0x1c,0x7c,0x0e,0x6e,0x06,0x67,0x86,0x63,0xce,0x61,0xfc,0x60,0x78,0x60,0x00,0x00,0x00,0x00,0x06,0x60,0x06,0x60,0x86,0x61,0x86,0x61,0x86,0x61,0xce,0x73,0xfc,0x3f,0x78,0x1e,0x00,0x00,0x00,0x00,0x80,0x07,0xc0,0x07,0xe0,0x06,0x70,0x06,0x38,0x06,0x1c,0x06,0xfe,0x7f,0xfe,0x7f,0x00,0x00,0x00,0x00,0x7e,0x18,0x7e,0x38,0x66,0x70,0x66,0x60,0x66,0x60,0xe6,0x70,0xc6,0x3f,0x86,0x1f,0x00,0x00,0x00,0x00,0xf8,0x1f,0xfc,0x3f,0x8e,0x71,0x86,0x61,0x86,0x61,0x8e,0x73,0x1c,0x3f,0x18,0x1e,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x86,0x7f,0xc6,0x7f,0xe6,0x00,0x76,0x00,0x3e,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x78,0x1e,0xfc,0x3f,0xce,0x73,0x86,0x61,0x86,0x61,0xce,0x73,0xfc,0x3f,0x78,0x1e,0x00,0x00,0x00,0x00,0x78,0x00,0xfc,0x00,0xce,0x61,0x86,0x71,0x86,0x39,0xce,0x1d,0xfc,0x0f,0xf8,0x07,0x00,0x00,0x00,0x00,0x30,0x0c,0x78,0x1e,0x78,0x1e,0x30,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x7f,0xf0,0x7f,0xb8,0x01,0x9c,0x01,0x8e,0x01,0x8e,0x01,0x9c,0x01,0xb8,0x01,0xf0,0x7f,0xe0,0x7f,0xfe,0x7f,0xfe,0x7f,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0xce,0x73,0xfc,0x3f,0x78,0x1e,0xf8,0x1f,0xfc,0x3f,0x0e,0x70,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x0e,0x70,0x1c,0x38,0x18,0x18,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x60,0x06,0x60,0x0e,0x70,0x1c,0x38,0x38,0x1c,0xf0,0x0f,0xe0,0x07,0xfe,0x7f,0xfe,0x7f,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x06,0x00,0x06,0x00,0xf8,0x1f,0xfc,0x3f,0x0e,0x70,0x06,0x60,0x86,0x61,0x86,0x61,0x86,0x61,0x8e,0x71,0x9c,0x7f,0x98,0x3f,0xfe,0x7f,0xfe,0x7f,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xfe,0x7f,0xfe,0x7f,0x00,0x00,0x00,0x00,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0x06,0x60,0x06,0x60,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x38,0x00,0x70,0x00,0x60,0x06,0x60,0x06,0x70,0xfe,0x3f,0xfe,0x1f,0x06,0x00,0x06,0x00,0xfe,0x7f,0xfe,0x7f,0x80,0x01,0xc0,0x03,0xe0,0x07,0x70,0x0e,0x38,0x1c,0x1c,0x38,0x0e,0x70,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0xfe,0x7f,0xfe,0x7f,0x1c,0x00,0x38,0x00,0xf0,0x01,0xf0,0x01,0x38,0x00,0x1c,0x00,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0xfe,0x7f,0x70,0x00,0xe0,0x00,0xc0,0x01,0x80,0x03,0x00,0x07,0x00,0x0e,0xfe,0x7f,0xfe,0x7f,0xf8,0x1f,0xfc,0x3f,0x0e,0x70,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x0e,0x70,0xfc,0x3f,0xf8,0x1f,0xfe,0x7f,0xfe,0x7f,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0x86,0x01,0xce,0x01,0xfc,0x00,0x78,0x00,0xf8,0x1f,0xfc,0x3f,0x0e,0x70,0x06,0x60,0x06,0x66,0x06,0x6e,0x06,0x3c,0x0e,0x38,0xfc,0x7f,0xf8,0x67,0xfe,0x7f,0xfe,0x7f,0x86,0x01,0x86,0x01,0x86,0x07,0x86,0x0f,0x86,0x1d,0xce,0x39,0xfc,0x70,0x78,0x60,0x78,0x18,0xfc,0x38,0xce,0x71,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x8e,0x73,0x1c,0x3f,0x18,0x1e,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xfe,0x7f,0xfe,0x7f,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0xfe,0x1f,0xfe,0x3f,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x70,0xfe,0x3f,0xfe,0x1f,0xfe,0x07,0xfe,0x0f,0x00,0x1c,0x00,0x38,0x00,0x70,0x00,0x70,0x00,0x38,0x00,0x1c,0xfe,0x0f,0xfe,0x07,0xfe,0x1f,0xfe,0x3f,0x00,0x70,0x00,0x70,0x00,0x3e,0x00,0x3e,0x00,0x70,0x00,0x70,0xfe,0x3f,0xfe,0x1f,0x1e,0x78,0x3e,0x7c,0x70,0x0e,0xe0,0x07,0xc0,0x03,0xc0,0x03,0xe0,0x07,0x70,0x0e,0x3e,0x7c,0x1e,0x78,0x7e,0x00,0xfe,0x00,0xc0,0x01,0x80,0x03,0x00,0x7f,0x00,0x7f,0x80,0x03,0xc0,0x01,0xfe,0x00,0x7e,0x00,0x06,0x78,0x06,0x7c,0x06,0x6e,0x06,0x67,0x86,0x63,0xc6,0x61,0xe6,0x60,0x76,0x60,0x3e,0x60,0x1e,0x60,0x00,0x18,0x00,0x3c,0x60,0x7e,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0xe0,0x66,0xc0,0x7f,0x80,0x7f,0xfe,0x7f,0xfe,0x7f,0x80,0x61,0xc0,0x61,0xe0,0x60,0x60,0x60,0x60,0x60,0xe0,0x70,0xc0,0x3f,0x80,0x1f,0x80,0x1f,0xc0,0x3f,0xe0,0x70,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x70,0x00,0x38,0x00,0x18,0x80,0x1f,0xc0,0x3f,0xe0,0x70,0x60,0x60,0x60,0x60,0xe0,0x60,0xc0,0x61,0x80,0x61,0xfe,0x7f,0xfe,0x7f,0x80,0x1f,0xc0,0x3f,0xe0,0x76,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0xe0,0x66,0xc0,0x07,0x80,0x07,0x80,0x01,0x80,0x01,0xf8,0x7f,0xfc,0x7f,0x8e,0x01,0x86,0x01,0x06,0x00,0x0e,0x00,0x1c,0x00,0x18,0x00,0xe0,0x01,0xf0,0x03,0x38,0x67,0x18,0x66,0x18,0x66,0x18,0x66,0x18,0x66,0x18,0x76,0xf8,0x3f,0xf8,0x1f,0xfe,0x7f,0xfe,0x7f,0x80,0x01,0xc0,0x01,0xe0,0x00,0x60,0x00,0x60,0x00,0xe0,0x00,0xc0,0x7f,0x80,0x7f,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x60,0xe6,0x7f,0xe6,0x7f,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x38,0x00,0x70,0x00,0x60,0x60,0x60,0x60,0x70,0xe6,0x3f,0xe6,0x1f,0x00,0x00,0x00,0x00,0xfe,0x7f,0xfe,0x7f,0x00,0x06,0x00,0x0f,0x80,0x1f,0xc0,0x39,0xe0,0x70,0x60,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x60,0x06,0x60,0xfe,0x7f,0xfe,0x7f,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0xe0,0x7f,0xe0,0x7f,0x60,0x00,0xe0,0x00,0xc0,0x07,0xc0,0x07,0xe0,0x00,0xe0,0x00,0xc0,0x7f,0x80,0x7f,0xe0,0x7f,0xe0,0x7f,0x80,0x01,0xc0,0x01,0xe0,0x00,0x60,0x00,0x60,0x00,0xe0,0x00,0xc0,0x7f,0x80,0x7f,0x80,0x1f,0xc0,0x3f,0xe0,0x70,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe0,0x70,0xc0,0x3f,0x80,0x1f,0xe0,0x7f,0xe0,0x7f,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0xe0,0x07,0xc0,0x03,0x80,0x01,0x80,0x01,0xc0,0x03,0xe0,0x07,0x60,0x06,0x60,0x06,0x60,0x06,0xc0,0x07,0x80,0x07,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0xe0,0x7f,0x80,0x01,0xc0,0x01,0xe0,0x00,0x60,0x00,0x60,0x00,0xe0,0x00,0xc0,0x01,0x80,0x01,0x80,0x61,0xc0,0x63,0xe0,0x67,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x7e,0x00,0x3c,0x00,0x18,0x60,0x00,0x60,0x00,0xf8,0x1f,0xf8,0x3f,0x60,0x70,0x60,0x60,0x00,0x60,0x00,0x70,0x00,0x38,0x00,0x18,0xe0,0x1f,0xe0,0x3f,0x00,0x70,0x00,0x60,0x00,0x60,0x00,0x70,0x00,0x38,0x00,0x18,0xe0,0x7f,0xe0,0x7f,0xe0,0x07,0xe0,0x0f,0x00,0x1c,0x00,0x38,0x00,0x70,0x00,0x70,0x00,0x38,0x00,0x1c,0xe0,0x0f,0xe0,0x07,0xe0,0x1f,0xe0,0x3f,0x00,0x70,0x00,0x70,0x00,0x38,0x00,0x38,0x00,0x70,0x00,0x70,0xe0,0x3f,0xe0,0x1f,0x60,0x60,0xe0,0x70,0xc0,0x39,0x80,0x1f,0x00,0x0f,0x00,0x0f,0x80,0x1f,0xc0,0x39,0xe0,0x70,0x60,0x60,0xe0,0x01,0xe0,0x03,0x00,0x67,0x00,0x66,0x00,0x66,0x00,0x66,0x00,0x66,0x00,0x76,0xe0,0x3f,0xe0,0x1f,0x60,0x60,0x60,0x70,0x60,0x78,0x60,0x7c,0x60,0x6e,0x60,0x67,0xe0,0x63,0xe0,0x61,0xe0,0x60,0x60,0x60, diff --git a/radio/src/fonts/std/font_10x14_compressed.png b/radio/src/fonts/std/font_10x14_compressed.png index 07e890ee2..0549696db 100644 Binary files a/radio/src/fonts/std/font_10x14_compressed.png and b/radio/src/fonts/std/font_10x14_compressed.png differ diff --git a/radio/src/fonts/std/font_10x14_extra.lbm b/radio/src/fonts/std/font_10x14_extra.lbm deleted file mode 100644 index c71947df1..000000000 --- a/radio/src/fonts/std/font_10x14_extra.lbm +++ /dev/null @@ -1 +0,0 @@ -0x60,0x00,0x70,0x00,0x38,0x00,0x1c,0x00,0xce,0x7f,0xce,0x7f,0x1c,0x00,0x38,0x00,0x70,0x00,0x60,0x00,0x00,0x06,0x00,0x0e,0x00,0x1c,0x00,0x38,0xfe,0x73,0xfe,0x73,0x00,0x38,0x00,0x1c,0x00,0x0e,0x00,0x06,0x00,0x18,0x00,0x1c,0x00,0x0e,0x18,0x07,0x98,0x03,0xd8,0x01,0xd8,0x00,0x18,0x00,0xf8,0x03,0xf8,0x03,0x18,0x00,0x38,0x00,0x70,0x00,0xe0,0x18,0xc0,0x19,0x80,0x1b,0x00,0x1b,0x00,0x18,0xc0,0x1f,0xc0,0x1f,0xc0,0x1f,0xc0,0x1f,0x00,0x18,0x00,0x1b,0x80,0x1b,0xc0,0x19,0xe0,0x18,0x70,0x00,0x38,0x00,0x18,0x00,0xf8,0x03,0xf8,0x03,0x18,0x00,0xd8,0x00,0xd8,0x01,0x98,0x03,0x18,0x07,0x00,0x0e,0x00,0x1c,0x00,0x18, diff --git a/radio/src/fonts/std/font_cz_04x06.lbm b/radio/src/fonts/std/font_cz_04x06.lbm deleted file mode 100644 index 450f6b219..000000000 --- a/radio/src/fonts/std/font_cz_04x06.lbm +++ /dev/null @@ -1 +0,0 @@ -0x18,0x24,0x16,0x3d,0x00,0x18,0x24,0x25,0x02,0x01,0x18,0x34,0x2c,0x0a,0x01,0x18,0x34,0x2d,0x0a,0x01,0x00,0x24,0x3c,0x22,0x01,0x18,0x24,0x24,0x1a,0x01,0x3c,0x04,0x05,0x0a,0x01,0x28,0x2d,0x36,0x15,0x00,0x1c,0x20,0x22,0x3d,0x00,0x1c,0x21,0x21,0x3c,0x00,0x0c,0x50,0x22,0x1d,0x00,0x38,0x14,0x14,0x3a,0x01,0x00,0x24,0x3e,0x25,0x00,0x3c,0x15,0x16,0x2d,0x00,0x00,0x0c,0x32,0x0d,0x00,0x24,0x35,0x2e,0x25,0x00,0x3e,0x2a,0x2a,0x22,0x01, diff --git a/radio/src/fonts/std/font_cz_04x06.png b/radio/src/fonts/std/font_cz_04x06.png index d43f5b05c..176c827b8 100644 Binary files a/radio/src/fonts/std/font_cz_04x06.png and b/radio/src/fonts/std/font_cz_04x06.png differ diff --git a/radio/src/fonts/std/font_cz_05x07.lbm b/radio/src/fonts/std/font_cz_05x07.lbm deleted file mode 100644 index 1cb949cdc..000000000 --- a/radio/src/fonts/std/font_cz_05x07.lbm +++ /dev/null @@ -1 +0,0 @@ -0x20,0x54,0x56,0x55,0x78,0x38,0x45,0x46,0x45,0x20,0x38,0x54,0x56,0x55,0x18,0x38,0x55,0x56,0x55,0x18,0x00,0x44,0x7e,0x41,0x00,0x38,0x44,0x46,0x45,0x38,0x7c,0x09,0x06,0x05,0x08,0x48,0x55,0x56,0x55,0x20,0x3c,0x40,0x42,0x21,0x7c,0x3c,0x40,0x43,0x23,0x7c,0x0c,0x50,0x52,0x51,0x3c,0x78,0x14,0x16,0x15,0x78,0x00,0x44,0x7e,0x45,0x00,0x7c,0x15,0x16,0x35,0x48,0x0c,0x10,0x62,0x11,0x0c,0x44,0x65,0x56,0x4d,0x44,0x7c,0x54,0x56,0x55,0x44,0x3c,0x3c,0x24,0x42,0xff,0x24,0x18,0x81,0x42,0x3c, diff --git a/radio/src/fonts/std/font_cz_05x07.png b/radio/src/fonts/std/font_cz_05x07.png index 19ab8e4d1..a0ef49a4b 100644 Binary files a/radio/src/fonts/std/font_cz_05x07.png and b/radio/src/fonts/std/font_cz_05x07.png differ diff --git a/radio/src/fonts/std/font_cz_08x10.lbm b/radio/src/fonts/std/font_cz_08x10.lbm deleted file mode 100644 index 63fbb75db..000000000 --- a/radio/src/fonts/std/font_cz_08x10.lbm +++ /dev/null @@ -1 +0,0 @@ -0x00,0x03,0xa0,0x07,0xb0,0x04,0x94,0x04,0x93,0x02,0xf1,0x07,0xe0,0x07,0x00,0x00,0xc0,0x01,0xe1,0x03,0x33,0x06,0x16,0x04,0x13,0x04,0x31,0x06,0x20,0x02,0x00,0x00,0xc0,0x01,0xe0,0x03,0xb0,0x06,0x94,0x04,0xb3,0x04,0xe1,0x06,0xc0,0x02,0x00,0x00,0xc0,0x01,0xe1,0x03,0xb3,0x06,0x96,0x04,0xb3,0x04,0xe1,0x06,0xc0,0x02,0x00,0x00,0x00,0x04,0x10,0x04,0xf4,0x07,0xf3,0x07,0x01,0x04,0x00,0x04,0x00,0x00,0x00,0x00,0xc0,0x01,0xe0,0x03,0x30,0x06,0x14,0x04,0x33,0x06,0xe1,0x03,0xc0,0x01,0x00,0x00,0x11,0x00,0xf3,0x07,0xe6,0x07,0x33,0x00,0x11,0x00,0x30,0x00,0x20,0x00,0x00,0x00,0x60,0x02,0xf1,0x06,0x93,0x04,0x96,0x04,0x93,0x04,0xb1,0x07,0x20,0x03,0x00,0x00,0xf0,0x01,0xf0,0x03,0x00,0x06,0x04,0x04,0x03,0x02,0xf1,0x07,0xf0,0x07,0x00,0x00,0xf0,0x01,0xf0,0x03,0x02,0x06,0x05,0x04,0x05,0x02,0xf2,0x07,0xf0,0x07,0x00,0x00,0xf0,0x04,0xf0,0x0c,0x00,0x09,0x04,0x09,0x83,0x0c,0xf1,0x07,0xf0,0x03,0x00,0x00,0xf0,0x07,0xf8,0x07,0x88,0x00,0x8c,0x00,0x8b,0x00,0x89,0x00,0xf8,0x07,0xf0,0x07,0x00,0x00,0x08,0x04,0x08,0x04,0xfc,0x07,0xfb,0x07,0x09,0x04,0x08,0x04,0x00,0x00,0xf8,0x07,0xf9,0x07,0xcb,0x00,0xce,0x00,0xcb,0x01,0x49,0x03,0x78,0x06,0x30,0x04,0x18,0x00,0x18,0x00,0x30,0x00,0xe4,0x07,0xe3,0x07,0x31,0x00,0x18,0x00,0x18,0x00,0x08,0x06,0x09,0x07,0x8b,0x05,0xce,0x04,0x6b,0x04,0x39,0x04,0x18,0x04,0x00,0x00,0xf8,0x07,0xf8,0x07,0x48,0x04,0x4c,0x04,0x4b,0x04,0x49,0x04,0x08,0x04,0x00,0x00, diff --git a/radio/src/fonts/std/font_cz_08x10.png b/radio/src/fonts/std/font_cz_08x10.png index 912588acb..34c985f8e 100644 Binary files a/radio/src/fonts/std/font_cz_08x10.png and b/radio/src/fonts/std/font_cz_08x10.png differ diff --git a/radio/src/fonts/std/font_cz_10x14.lbm b/radio/src/fonts/std/font_cz_10x14.lbm deleted file mode 100644 index 2e96bc3f2..000000000 --- a/radio/src/fonts/std/font_cz_10x14.lbm +++ /dev/null @@ -1 +0,0 @@ -0x00,0x18,0x00,0x3c,0x60,0x7e,0x60,0x66,0x68,0x66,0x6c,0x66,0x67,0x66,0xe3,0x66,0xc1,0x7f,0x80,0x7f,0x80,0x1f,0xc0,0x3f,0xe0,0x70,0x67,0x60,0x6f,0x60,0x6c,0x60,0x66,0x60,0x63,0x70,0x01,0x38,0x00,0x18,0x80,0x1f,0xc0,0x3f,0xe0,0x76,0x60,0x66,0x68,0x66,0x6c,0x66,0x67,0x66,0xe3,0x66,0xc1,0x07,0x80,0x07,0x80,0x1f,0xc0,0x3f,0xe0,0x76,0x67,0x66,0x6f,0x66,0x6c,0x66,0x66,0x66,0xe3,0x66,0xc1,0x07,0x80,0x07,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x60,0xe8,0x7f,0xec,0x7f,0x07,0x60,0x03,0x60,0x01,0x00,0x00,0x00,0x80,0x1f,0xc0,0x3f,0xe0,0x70,0x60,0x60,0x68,0x60,0x6c,0x60,0x67,0x60,0xe3,0x70,0xc1,0x3f,0x80,0x1f,0xe0,0x7f,0xe0,0x7f,0x80,0x01,0xc7,0x01,0xef,0x00,0x6c,0x00,0x66,0x00,0xe3,0x00,0xc1,0x01,0x80,0x01,0x80,0x61,0xc0,0x63,0xe0,0x67,0x67,0x66,0x6f,0x66,0x6c,0x66,0x66,0x66,0x63,0x7e,0x01,0x3c,0x00,0x18,0xe0,0x1f,0xe0,0x3f,0x00,0x70,0x00,0x60,0x08,0x60,0x0c,0x70,0x07,0x38,0x03,0x18,0xe1,0x7f,0xe0,0x7f,0xe0,0x1f,0xe0,0x3f,0x00,0x70,0x06,0x60,0x09,0x60,0x09,0x70,0x0f,0x38,0x06,0x18,0xe0,0x7f,0xe0,0x7f,0xe0,0x01,0xe0,0x03,0x00,0x67,0x00,0x66,0x08,0x66,0x0c,0x66,0x07,0x66,0x03,0x76,0xe1,0x3f,0xe0,0x1f,0x80,0x7f,0xc0,0x7f,0xe0,0x06,0x70,0x06,0x38,0x06,0x38,0x06,0x74,0x06,0xe7,0x06,0xc3,0x7f,0x81,0x7f,0x00,0x00,0x00,0x00,0x18,0x60,0x18,0x60,0xfc,0x7f,0xff,0x7f,0x1b,0x60,0x19,0x60,0x00,0x00,0x00,0x00,0xf8,0x7f,0xf8,0x7f,0x18,0x03,0x17,0x03,0x0f,0x07,0x0c,0x0f,0x16,0x1f,0xbb,0x3b,0xf1,0x71,0xe0,0x60,0xf8,0x00,0xf8,0x01,0x80,0x03,0x00,0x07,0x00,0x7e,0x04,0x7e,0x07,0x07,0x83,0x03,0xf9,0x01,0xf8,0x00,0x18,0x70,0x18,0x70,0x18,0x78,0x17,0x7c,0x0f,0x6e,0x0c,0x67,0x96,0x63,0xdb,0x61,0xf9,0x60,0x78,0x60,0xf8,0x7f,0xf8,0x7f,0x18,0x63,0x18,0x63,0x1c,0x63,0x1f,0x63,0x1b,0x63,0x19,0x63,0x18,0x60,0x18,0x60, diff --git a/radio/src/fonts/std/font_cz_10x14.png b/radio/src/fonts/std/font_cz_10x14.png index bc97e13be..4ffed2ed4 100644 Binary files a/radio/src/fonts/std/font_cz_10x14.png and b/radio/src/fonts/std/font_cz_10x14.png differ diff --git a/radio/src/fonts/std/font_de_04x06.lbm b/radio/src/fonts/std/font_de_04x06.lbm deleted file mode 100644 index fcdfd7962..000000000 --- a/radio/src/fonts/std/font_de_04x06.lbm +++ /dev/null @@ -1 +0,0 @@ -0x3d,0x0a,0x0a,0x3d,0x00,0x18,0x25,0x14,0x3d,0x00,0x1d,0x22,0x22,0x1d,0x00,0x18,0x25,0x24,0x19,0x00,0x1d,0x20,0x20,0x1d,0x00,0x1a,0x20,0x10,0x3a,0x00,0x7e,0x05,0x25,0x1a,0x00, diff --git a/radio/src/fonts/std/font_de_04x06.png b/radio/src/fonts/std/font_de_04x06.png index d9c1fa058..b24705fa9 100644 Binary files a/radio/src/fonts/std/font_de_04x06.png and b/radio/src/fonts/std/font_de_04x06.png differ diff --git a/radio/src/fonts/std/font_de_05x07.lbm b/radio/src/fonts/std/font_de_05x07.lbm deleted file mode 100644 index d6b5a02e6..000000000 --- a/radio/src/fonts/std/font_de_05x07.lbm +++ /dev/null @@ -1 +0,0 @@ -0x7c,0x13,0x12,0x13,0x7c,0x20,0x55,0x54,0x55,0x78,0x3c,0x43,0x42,0x43,0x3c,0x38,0x45,0x44,0x45,0x38,0x3e,0x41,0x40,0x41,0x3e,0x3c,0x41,0x40,0x21,0x7c,0x7e,0x01,0x49,0x56,0x20, diff --git a/radio/src/fonts/std/font_de_08x10.lbm b/radio/src/fonts/std/font_de_08x10.lbm deleted file mode 100644 index 91e1ae1e4..000000000 --- a/radio/src/fonts/std/font_de_08x10.lbm +++ /dev/null @@ -1 +0,0 @@ -0xe0,0x07,0xf6,0x07,0x96,0x00,0x88,0x00,0x88,0x00,0x96,0x00,0xf6,0x07,0xe0,0x07,0x00,0x03,0xa0,0x07,0xb6,0x04,0x96,0x04,0x90,0x02,0xf6,0x07,0xe6,0x07,0x00,0x00,0xe0,0x01,0xf6,0x03,0x16,0x06,0x08,0x04,0x08,0x04,0x16,0x06,0xf6,0x03,0xe0,0x01,0xc0,0x01,0xe6,0x03,0x36,0x06,0x10,0x04,0x36,0x06,0xe6,0x03,0xc0,0x01,0x00,0x00,0xf8,0x01,0xfb,0x03,0x03,0x06,0x00,0x04,0x03,0x04,0x03,0x06,0xf8,0x03,0xf8,0x01,0xf0,0x01,0xf6,0x03,0x06,0x06,0x00,0x04,0x06,0x02,0xf6,0x07,0xf0,0x07,0x00,0x00,0xf0,0x07,0xf8,0x07,0x8c,0x00,0x86,0x00,0x86,0x00,0x8c,0x00,0xf8,0x07,0xf0,0x07, diff --git a/radio/src/fonts/std/font_de_08x10.png b/radio/src/fonts/std/font_de_08x10.png index 6cc400f77..35962a5ae 100644 Binary files a/radio/src/fonts/std/font_de_08x10.png and b/radio/src/fonts/std/font_de_08x10.png differ diff --git a/radio/src/fonts/std/font_de_10x14.lbm b/radio/src/fonts/std/font_de_10x14.lbm deleted file mode 100644 index ed3d1da5f..000000000 --- a/radio/src/fonts/std/font_de_10x14.lbm +++ /dev/null @@ -1 +0,0 @@ -0x80,0x7f,0xc2,0x7f,0xe2,0x06,0x70,0x06,0x38,0x06,0x38,0x06,0x70,0x06,0xe2,0x06,0xc2,0x7f,0x80,0x7f,0x00,0x18,0x06,0x3c,0x66,0x7e,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0xe6,0x66,0xc6,0x7f,0x80,0x7f,0xe0,0x1f,0xf2,0x3f,0x3a,0x70,0x18,0x60,0x18,0x60,0x18,0x60,0x18,0x60,0x3a,0x70,0xf2,0x3f,0xe0,0x1f,0x80,0x1f,0xc6,0x3f,0xe6,0x70,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xe6,0x70,0xc6,0x3f,0x80,0x1f,0xf8,0x1f,0xfa,0x3f,0x02,0x70,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x02,0x70,0xfa,0x3f,0xf8,0x1f,0xe0,0x1f,0xe6,0x3f,0x06,0x70,0x00,0x60,0x00,0x60,0x00,0x70,0x00,0x38,0x06,0x18,0xe6,0x7f,0xe0,0x7f,0xf8,0x7f,0xfc,0x7f,0x0e,0x00,0x06,0x00,0x66,0x30,0x6e,0x30,0xfc,0x38,0xd8,0x1f,0x00,0x0f,0x00,0x00, diff --git a/radio/src/fonts/std/font_de_10x14.png b/radio/src/fonts/std/font_de_10x14.png index 22ae54efc..f32214fed 100644 Binary files a/radio/src/fonts/std/font_de_10x14.png and b/radio/src/fonts/std/font_de_10x14.png differ diff --git a/radio/src/fonts/std/font_es_04x06.lbm b/radio/src/fonts/std/font_es_04x06.lbm deleted file mode 100644 index 9c8fdb698..000000000 --- a/radio/src/fonts/std/font_es_04x06.lbm +++ /dev/null @@ -1 +0,0 @@ -0x3e,0x09,0x12,0x3d,0x00,0x3a,0x11,0x0a,0x39,0x00, diff --git a/radio/src/fonts/std/font_es_04x06.png b/radio/src/fonts/std/font_es_04x06.png index ee36412ee..2c5db9a63 100644 Binary files a/radio/src/fonts/std/font_es_04x06.png and b/radio/src/fonts/std/font_es_04x06.png differ diff --git a/radio/src/fonts/std/font_es_05x07.lbm b/radio/src/fonts/std/font_es_05x07.lbm deleted file mode 100644 index 99f4cd1a2..000000000 --- a/radio/src/fonts/std/font_es_05x07.lbm +++ /dev/null @@ -1 +0,0 @@ -0x7c,0x0a,0x11,0x22,0x7d,0x78,0x12,0x09,0x0a,0x71, diff --git a/radio/src/fonts/std/font_es_08x10.lbm b/radio/src/fonts/std/font_es_08x10.lbm deleted file mode 100644 index f3bb8184c..000000000 --- a/radio/src/fonts/std/font_es_08x10.lbm +++ /dev/null @@ -1 +0,0 @@ -0xf0,0x07,0xf4,0x07,0x66,0x00,0xc2,0x00,0x86,0x01,0x04,0x07,0xf6,0x07,0xf2,0x07,0xf4,0x07,0xf6,0x07,0x22,0x00,0x16,0x00,0x34,0x00,0xe6,0x07,0xc2,0x07,0x00,0x00, diff --git a/radio/src/fonts/std/font_es_08x10.png b/radio/src/fonts/std/font_es_08x10.png index c05c1f406..783dc7c84 100644 Binary files a/radio/src/fonts/std/font_es_08x10.png and b/radio/src/fonts/std/font_es_08x10.png differ diff --git a/radio/src/fonts/std/font_es_10x14.lbm b/radio/src/fonts/std/font_es_10x14.lbm deleted file mode 100644 index 92d200c51..000000000 --- a/radio/src/fonts/std/font_es_10x14.lbm +++ /dev/null @@ -1 +0,0 @@ -0xe8,0x7f,0xec,0x7f,0xc6,0x01,0x82,0x03,0x04,0x07,0x08,0x0e,0x0c,0x1c,0x06,0x38,0xe2,0x7f,0xe0,0x7f,0xe0,0x7f,0xe8,0x7f,0x8c,0x01,0xc6,0x01,0xe2,0x00,0x64,0x00,0x68,0x00,0xec,0x00,0xc6,0x7f,0x82,0x7f, diff --git a/radio/src/fonts/std/font_fr_04x06.lbm b/radio/src/fonts/std/font_fr_04x06.lbm deleted file mode 100644 index afd789ef6..000000000 --- a/radio/src/fonts/std/font_fr_04x06.lbm +++ /dev/null @@ -1 +0,0 @@ -0x18,0x36,0x2d,0x08,0x00,0x18,0x35,0x2e,0x08,0x00,0x18,0x25,0x16,0x3c,0x00,0x00,0x26,0x3d,0x22,0x00,0x00,0x4c,0x32,0x12,0x00, diff --git a/radio/src/fonts/std/font_fr_04x06.png b/radio/src/fonts/std/font_fr_04x06.png index da9f758ff..44f058292 100644 Binary files a/radio/src/fonts/std/font_fr_04x06.png and b/radio/src/fonts/std/font_fr_04x06.png differ diff --git a/radio/src/fonts/std/font_fr_05x07.lbm b/radio/src/fonts/std/font_fr_05x07.lbm deleted file mode 100644 index 52e6a2605..000000000 --- a/radio/src/fonts/std/font_fr_05x07.lbm +++ /dev/null @@ -1 +0,0 @@ -0x38,0x54,0x56,0x55,0x18,0x38,0x55,0x56,0x54,0x18,0x20,0x55,0x56,0x54,0x78,0x00,0x4a,0x79,0x42,0x00,0x1c,0xa2,0x62,0x22,0x10, diff --git a/radio/src/fonts/std/font_fr_05x07.png b/radio/src/fonts/std/font_fr_05x07.png index dbc042f66..547418b16 100644 Binary files a/radio/src/fonts/std/font_fr_05x07.png and b/radio/src/fonts/std/font_fr_05x07.png differ diff --git a/radio/src/fonts/std/font_fr_08x10.lbm b/radio/src/fonts/std/font_fr_08x10.lbm deleted file mode 100644 index 5be2553c5..000000000 --- a/radio/src/fonts/std/font_fr_08x10.lbm +++ /dev/null @@ -1 +0,0 @@ -0xc0,0x01,0xe0,0x03,0xb4,0x06,0x96,0x04,0xb3,0x04,0xe1,0x06,0xc0,0x02,0x00,0x00,0xc0,0x01,0xe0,0x03,0xb1,0x06,0x93,0x04,0xb6,0x04,0xe4,0x06,0xc0,0x02,0x00,0x00,0x00,0x03,0xa0,0x07,0xb1,0x04,0x93,0x04,0x96,0x02,0xf4,0x07,0xe0,0x07,0x00,0x00,0x04,0x04,0x16,0x04,0xf3,0x07,0xf6,0x07,0x04,0x04,0x00,0x04,0x00,0x00,0xe0,0x00,0xf0,0x01,0x18,0x0b,0x08,0x0e,0x08,0x06,0x18,0x03,0x10,0x01,0x00,0x00,0x00,0x00, diff --git a/radio/src/fonts/std/font_fr_08x10.png b/radio/src/fonts/std/font_fr_08x10.png index f9ad08c8b..327b8c27e 100644 Binary files a/radio/src/fonts/std/font_fr_08x10.png and b/radio/src/fonts/std/font_fr_08x10.png differ diff --git a/radio/src/fonts/std/font_fr_10x14.lbm b/radio/src/fonts/std/font_fr_10x14.lbm deleted file mode 100644 index 081e4fe70..000000000 --- a/radio/src/fonts/std/font_fr_10x14.lbm +++ /dev/null @@ -1 +0,0 @@ -0x80,0x1f,0xc0,0x3f,0xe0,0x76,0x68,0x66,0x6c,0x66,0x66,0x66,0x62,0x66,0xe0,0x66,0xc0,0x07,0x80,0x07,0x80,0x1f,0xc0,0x3f,0xe0,0x76,0x62,0x66,0x66,0x66,0x6c,0x66,0x68,0x66,0xe0,0x66,0xc0,0x07,0x80,0x07,0x00,0x18,0x00,0x3c,0x60,0x7e,0x62,0x66,0x66,0x66,0x6c,0x66,0x68,0x66,0xe0,0x66,0xc0,0x7f,0x80,0x7f,0x00,0x00,0x00,0x00,0x98,0x61,0x98,0x61,0x86,0x7f,0x86,0x7f,0x18,0x60,0x18,0x60,0x00,0x00,0x00,0x00,0xe0,0x07,0xf0,0x0f,0x38,0x9c,0x18,0xd8,0x18,0x78,0x18,0x38,0x18,0x18,0x18,0x1c,0x00,0x0e,0x00,0x06, diff --git a/radio/src/fonts/std/font_fr_10x14.png b/radio/src/fonts/std/font_fr_10x14.png index 39ca61147..c1c2dede7 100644 Binary files a/radio/src/fonts/std/font_fr_10x14.png and b/radio/src/fonts/std/font_fr_10x14.png differ diff --git a/radio/src/fonts/std/font_it_04x06.lbm b/radio/src/fonts/std/font_it_04x06.lbm deleted file mode 100644 index c6a470f29..000000000 --- a/radio/src/fonts/std/font_it_04x06.lbm +++ /dev/null @@ -1 +0,0 @@ -0x18,0x25,0x16,0x3c,0x00,0x1c,0x21,0x22,0x3c,0x00, diff --git a/radio/src/fonts/std/font_it_04x06.png b/radio/src/fonts/std/font_it_04x06.png index 365940249..44b4ca560 100644 Binary files a/radio/src/fonts/std/font_it_04x06.png and b/radio/src/fonts/std/font_it_04x06.png differ diff --git a/radio/src/fonts/std/font_it_05x07.lbm b/radio/src/fonts/std/font_it_05x07.lbm deleted file mode 100644 index 17d52fd9b..000000000 --- a/radio/src/fonts/std/font_it_05x07.lbm +++ /dev/null @@ -1 +0,0 @@ -0x20,0x55,0x56,0x54,0x78,0x3c,0x41,0x42,0x20,0x7c, diff --git a/radio/src/fonts/std/font_it_08x10.lbm b/radio/src/fonts/std/font_it_08x10.lbm deleted file mode 100644 index 8d92e52ad..000000000 --- a/radio/src/fonts/std/font_it_08x10.lbm +++ /dev/null @@ -1 +0,0 @@ -0x00,0x03,0xa0,0x07,0xb2,0x04,0x96,0x04,0x94,0x02,0xf0,0x07,0xe0,0x07,0x00,0x00,0xf0,0x01,0xf0,0x03,0x02,0x06,0x06,0x04,0x04,0x02,0xf0,0x07,0xf0,0x07,0x00,0x00, diff --git a/radio/src/fonts/std/font_it_08x10.png b/radio/src/fonts/std/font_it_08x10.png index a1753b5b7..ebd2cfc5f 100644 Binary files a/radio/src/fonts/std/font_it_08x10.png and b/radio/src/fonts/std/font_it_08x10.png differ diff --git a/radio/src/fonts/std/font_it_10x14.lbm b/radio/src/fonts/std/font_it_10x14.lbm deleted file mode 100644 index b25268b4e..000000000 --- a/radio/src/fonts/std/font_it_10x14.lbm +++ /dev/null @@ -1 +0,0 @@ -0x00,0x18,0x00,0x3c,0x60,0x7e,0x62,0x66,0x66,0x66,0x6c,0x66,0x68,0x66,0xe0,0x66,0xc0,0x7f,0x80,0x7f,0xe0,0x1f,0xe0,0x3f,0x00,0x70,0x02,0x60,0x06,0x60,0x0c,0x60,0x08,0x60,0x00,0x30,0xe0,0x7f,0xe0,0x7f, diff --git a/radio/src/fonts/std/font_pl_04x06.png b/radio/src/fonts/std/font_pl_04x06.png new file mode 100644 index 000000000..5f0355deb Binary files /dev/null and b/radio/src/fonts/std/font_pl_04x06.png differ diff --git a/radio/src/fonts/std/font_pl_05x07.png b/radio/src/fonts/std/font_pl_05x07.png new file mode 100644 index 000000000..b545570fc Binary files /dev/null and b/radio/src/fonts/std/font_pl_05x07.png differ diff --git a/radio/src/fonts/std/font_pl_08x10.png b/radio/src/fonts/std/font_pl_08x10.png new file mode 100644 index 000000000..5e447506c Binary files /dev/null and b/radio/src/fonts/std/font_pl_08x10.png differ diff --git a/radio/src/fonts/std/font_pl_10x14.png b/radio/src/fonts/std/font_pl_10x14.png new file mode 100644 index 000000000..b37d221ee Binary files /dev/null and b/radio/src/fonts/std/font_pl_10x14.png differ diff --git a/radio/src/fonts/std/font_pt_04x06.lbm b/radio/src/fonts/std/font_pt_04x06.lbm deleted file mode 100644 index bb2db6d13..000000000 --- a/radio/src/fonts/std/font_pt_04x06.lbm +++ /dev/null @@ -1 +0,0 @@ -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, diff --git a/radio/src/fonts/std/font_pt_05x07.lbm b/radio/src/fonts/std/font_pt_05x07.lbm deleted file mode 100644 index 8f2c832a2..000000000 --- a/radio/src/fonts/std/font_pt_05x07.lbm +++ /dev/null @@ -1 +0,0 @@ -0x78,0x14,0x16,0x15,0x78,0x20,0x54,0x56,0x55,0x78,0x78,0x16,0x15,0x16,0x78,0x20,0x56,0x55,0x56,0x78,0x7a,0x15,0x16,0x15,0x78,0x20,0x56,0x55,0x56,0x79,0x78,0x15,0x16,0x14,0x78,0x20,0x55,0x56,0x54,0x78,0x1e,0xa1,0x61,0x21,0x12,0x1c,0xa2,0x62,0x22,0x10,0x7c,0x54,0x56,0x55,0x44,0x38,0x54,0x56,0x55,0x18,0x7c,0x56,0x55,0x56,0x44,0x38,0x56,0x55,0x56,0x18,0x00,0x44,0x7e,0x45,0x00,0x00,0x4c,0x7a,0x40,0x00,0x3c,0x42,0x42,0x43,0x3c,0x38,0x44,0x46,0x45,0x38,0x3c,0x42,0x43,0x42,0x3c,0x38,0x44,0x46,0x44,0x38,0x3c,0x43,0x42,0x43,0x3c,0x38,0x46,0x44,0x46,0x38,0x3c,0x40,0x42,0x41,0x3c,0x38,0x40,0x44,0x22,0x78, diff --git a/radio/src/fonts/std/font_pt_05x07.png b/radio/src/fonts/std/font_pt_05x07.png index 768ff309f..b6d68899b 100644 Binary files a/radio/src/fonts/std/font_pt_05x07.png and b/radio/src/fonts/std/font_pt_05x07.png differ diff --git a/radio/src/fonts/std/font_pt_08x10.lbm b/radio/src/fonts/std/font_pt_08x10.lbm deleted file mode 100644 index ac3c9fafb..000000000 --- a/radio/src/fonts/std/font_pt_08x10.lbm +++ /dev/null @@ -1 +0,0 @@ -0xf0,0x07,0xf8,0x07,0x88,0x00,0x8c,0x00,0x8b,0x00,0x89,0x00,0xf8,0x07,0xf0,0x07,0x00,0x03,0xa0,0x07,0xb0,0x04,0x90,0x04,0x98,0x02,0xf6,0x07,0xe2,0x07,0x00,0x00,0xf0,0x07,0xfa,0x07,0x8b,0x00,0x89,0x00,0x89,0x00,0x8b,0x00,0xfa,0x07,0xf0,0x07,0x00,0x03,0xa4,0x07,0xb6,0x04,0x93,0x04,0x96,0x02,0xf4,0x07,0xe0,0x07,0x00,0x00,0xf0,0x07,0xfa,0x07,0x89,0x00,0x89,0x00,0x8b,0x00,0x8a,0x00,0xfa,0x07,0xf1,0x07,0x00,0x03,0xa0,0x07,0xb4,0x04,0x92,0x04,0x96,0x02,0xf4,0x07,0xe2,0x07,0x00,0x00,0xf0,0x07,0xf8,0x07,0x89,0x00,0x8b,0x00,0x8c,0x00,0x88,0x00,0xf8,0x07,0xf0,0x07,0x00,0x03,0xa0,0x07,0xb2,0x04,0x96,0x04,0x98,0x02,0xf0,0x07,0xe0,0x07,0x00,0x00,0xf8,0x00,0xfc,0x01,0x8e,0x0b,0x06,0x0f,0x02,0x06,0x02,0x02,0x06,0x03,0x04,0x01,0xe0,0x00,0xf0,0x01,0x18,0x0b,0x08,0x0e,0x08,0x06,0x18,0x03,0x10,0x01,0x00,0x00,0xf8,0x07,0xf8,0x07,0x48,0x04,0x4c,0x04,0x4b,0x04,0x49,0x04,0x08,0x04,0x00,0x00,0xc0,0x01,0xe0,0x03,0xb0,0x06,0x9c,0x04,0xb6,0x04,0xe2,0x06,0xc0,0x02,0x00,0x00,0xf8,0x07,0xfa,0x07,0x4b,0x04,0x49,0x04,0x49,0x04,0x4b,0x04,0x0a,0x04,0x00,0x00,0xc0,0x01,0xe4,0x03,0xb6,0x06,0x93,0x04,0xb6,0x04,0xe4,0x06,0xc0,0x02,0x00,0x00,0x00,0x00,0x08,0x04,0x08,0x04,0xfc,0x07,0xfb,0x07,0x09,0x04,0x08,0x04,0x00,0x00,0x00,0x00,0x00,0x04,0x10,0x04,0xf4,0x07,0xf3,0x07,0x01,0x04,0x00,0x04,0x00,0x00,0xe0,0x01,0xf0,0x03,0x18,0x06,0x08,0x04,0x0c,0x04,0x1b,0x06,0xf1,0x03,0xe0,0x01,0xc0,0x01,0xe0,0x03,0x30,0x06,0x18,0x04,0x36,0x06,0xe2,0x03,0xc0,0x01,0x00,0x00,0xe0,0x01,0xf2,0x03,0x1b,0x06,0x09,0x04,0x09,0x04,0x1b,0x06,0xf2,0x03,0xe0,0x01,0xc0,0x01,0xe4,0x03,0x36,0x06,0x13,0x04,0x36,0x06,0xe4,0x03,0xc0,0x01,0x00,0x00,0xe2,0x01,0xf1,0x03,0x19,0x06,0x0b,0x04,0x0a,0x04,0x1a,0x06,0xf1,0x03,0xe0,0x01,0xc0,0x01,0xe4,0x03,0x32,0x06,0x16,0x04,0x34,0x06,0xe2,0x03,0xc0,0x01,0x00,0x00,0xfc,0x01,0xfc,0x03,0x00,0x06,0x04,0x04,0x03,0x04,0x01,0x06,0xfc,0x03,0xfc,0x01,0xf0,0x01,0xf0,0x03,0x00,0x06,0x04,0x04,0x03,0x02,0xf1,0x07,0xf0,0x07,0x00,0x00, diff --git a/radio/src/fonts/std/font_pt_08x10.png b/radio/src/fonts/std/font_pt_08x10.png index fe2f3adda..da686a28b 100644 Binary files a/radio/src/fonts/std/font_pt_08x10.png and b/radio/src/fonts/std/font_pt_08x10.png differ diff --git a/radio/src/fonts/std/font_pt_10x14.lbm b/radio/src/fonts/std/font_pt_10x14.lbm deleted file mode 100644 index 3c2ee4a30..000000000 --- a/radio/src/fonts/std/font_pt_10x14.lbm +++ /dev/null @@ -1 +0,0 @@ -0x80,0x7f,0xc0,0x7f,0xe0,0x06,0x70,0x06,0x38,0x06,0x38,0x06,0x74,0x06,0xe6,0x06,0xc3,0x7f,0x81,0x7f,0x00,0x18,0x00,0x3c,0x60,0x7e,0x60,0x66,0x60,0x66,0x68,0x66,0x6c,0x66,0xe6,0x66,0xc2,0x7f,0x80,0x7f,0x80,0x7f,0xc0,0x7f,0xe4,0x06,0x76,0x06,0x3b,0x06,0x3b,0x06,0x76,0x06,0xe4,0x06,0xc0,0x7f,0x80,0x7f,0x00,0x18,0x00,0x3c,0x60,0x7e,0x68,0x66,0x6c,0x66,0x66,0x66,0x6c,0x66,0xe8,0x66,0xc0,0x7f,0x80,0x7f,0x80,0x7f,0xc2,0x7f,0xe1,0x06,0x71,0x06,0x3b,0x06,0x3a,0x06,0x72,0x06,0xe1,0x06,0xc0,0x7f,0x80,0x7f,0x00,0x18,0x00,0x3c,0x68,0x7e,0x64,0x66,0x64,0x66,0x6c,0x66,0x68,0x66,0xe8,0x66,0xc4,0x7f,0x80,0x7f,0x81,0x7f,0xc3,0x7f,0xe6,0x06,0x74,0x06,0x38,0x06,0x38,0x06,0x70,0x06,0xe0,0x06,0xc0,0x7f,0x80,0x7f,0x00,0x18,0x00,0x3c,0x60,0x7e,0x62,0x66,0x66,0x66,0x6c,0x66,0x68,0x66,0xe0,0x66,0xc0,0x7f,0x80,0x7f,0xf8,0x03,0xfc,0x07,0x0e,0x4e,0x06,0x6c,0x06,0x3c,0x06,0x1c,0x06,0x0c,0x0e,0x0e,0x1c,0x07,0x18,0x03,0xf0,0x03,0xf8,0x07,0x1c,0x4e,0x0c,0x6c,0x0c,0x3c,0x0c,0x1c,0x0c,0x0c,0x0c,0x0e,0x00,0x07,0x00,0x03,0xf8,0x7f,0xf8,0x7f,0x18,0x63,0x18,0x63,0x1c,0x63,0x1e,0x63,0x1b,0x63,0x19,0x63,0x18,0x60,0x18,0x60,0x80,0x1f,0xc0,0x3f,0xe0,0x76,0x60,0x66,0x68,0x66,0x6c,0x66,0x66,0x66,0xe2,0x66,0xc0,0x07,0x80,0x07,0xf0,0x7f,0xf4,0x7f,0x36,0x66,0x33,0x66,0x31,0x66,0x33,0x66,0x36,0x66,0x34,0x66,0x30,0x60,0x30,0x60,0x80,0x1f,0xc0,0x3f,0xe8,0x76,0x6c,0x66,0x66,0x66,0x6c,0x66,0x68,0x66,0xe0,0x66,0xc0,0x07,0x80,0x07,0x00,0x00,0x00,0x00,0x30,0x60,0x30,0x60,0xf4,0x7f,0xf6,0x7f,0x33,0x60,0x31,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x60,0xe8,0x7f,0xec,0x7f,0x06,0x60,0x02,0x60,0x00,0x00,0x00,0x00,0xe0,0x1f,0xf0,0x3f,0x38,0x70,0x18,0x60,0x1c,0x60,0x1e,0x60,0x1b,0x60,0x39,0x70,0xf0,0x3f,0xe0,0x1f,0x80,0x1f,0xc0,0x3f,0xe0,0x70,0x60,0x60,0x68,0x60,0x6c,0x60,0x66,0x60,0xe2,0x70,0xc0,0x3f,0x80,0x1f,0xc0,0x1f,0xe0,0x3f,0x74,0x70,0x36,0x60,0x33,0x60,0x33,0x60,0x36,0x60,0x74,0x70,0xe0,0x3f,0xc0,0x1f,0x80,0x1f,0xc0,0x3f,0xe8,0x70,0x6c,0x60,0x66,0x60,0x6c,0x60,0x68,0x60,0xe0,0x70,0xc0,0x3f,0x80,0x1f,0xe0,0x1f,0xf2,0x3f,0x39,0x70,0x19,0x60,0x1b,0x60,0x1a,0x60,0x1a,0x60,0x39,0x70,0xf0,0x3f,0xe0,0x1f,0x80,0x1f,0xc8,0x3f,0xe4,0x70,0x64,0x60,0x6c,0x60,0x68,0x60,0x68,0x60,0xe4,0x70,0xc0,0x3f,0x80,0x1f,0xf8,0x1f,0xf8,0x3f,0x00,0x70,0x00,0x60,0x04,0x60,0x06,0x60,0x03,0x60,0x01,0x70,0xf8,0x3f,0xf8,0x1f,0xe0,0x1f,0xe0,0x3f,0x00,0x70,0x00,0x60,0x10,0x60,0x18,0x70,0x0c,0x38,0x04,0x18,0xe0,0x7f,0xe0,0x7f, diff --git a/radio/src/fonts/std/font_pt_10x14.png b/radio/src/fonts/std/font_pt_10x14.png index 9a18913ec..fb9fd010c 100644 Binary files a/radio/src/fonts/std/font_pt_10x14.png and b/radio/src/fonts/std/font_pt_10x14.png differ diff --git a/radio/src/fonts/std/font_se_04x06.lbm b/radio/src/fonts/std/font_se_04x06.lbm deleted file mode 100644 index 8888b2f6b..000000000 --- a/radio/src/fonts/std/font_se_04x06.lbm +++ /dev/null @@ -1 +0,0 @@ -0x18,0x25,0x15,0x3c,0x00,0x18,0x25,0x14,0x3d,0x00,0x18,0x25,0x24,0x19,0x00,0x3c,0x0b,0x0b,0x3c,0x00,0x3d,0x0a,0x0a,0x3d,0x00,0x1d,0x22,0x22,0x1d,0x00, diff --git a/radio/src/fonts/std/font_se_04x06.png b/radio/src/fonts/std/font_se_04x06.png index aeba5aded..83a45306a 100644 Binary files a/radio/src/fonts/std/font_se_04x06.png and b/radio/src/fonts/std/font_se_04x06.png differ diff --git a/radio/src/fonts/std/font_se_05x07.lbm b/radio/src/fonts/std/font_se_05x07.lbm deleted file mode 100644 index 8d767a82b..000000000 --- a/radio/src/fonts/std/font_se_05x07.lbm +++ /dev/null @@ -1 +0,0 @@ -0x20,0x54,0x56,0x54,0x78,0x20,0x56,0x54,0x56,0x78,0x38,0x46,0x44,0x46,0x38,0x7c,0x13,0x13,0x12,0x7c,0x7c,0x13,0x12,0x13,0x7c,0x3c,0x43,0x42,0x43,0x3c, diff --git a/radio/src/fonts/std/font_se_08x10.lbm b/radio/src/fonts/std/font_se_08x10.lbm deleted file mode 100644 index f31490f1a..000000000 --- a/radio/src/fonts/std/font_se_08x10.lbm +++ /dev/null @@ -1 +0,0 @@ -0x00,0x03,0xa0,0x07,0xb4,0x04,0x9a,0x04,0x9a,0x02,0xf4,0x07,0xe0,0x07,0x00,0x00,0x00,0x03,0xa0,0x07,0xb6,0x04,0x96,0x04,0x90,0x02,0xf6,0x07,0xe6,0x07,0x00,0x00,0xc0,0x01,0xe6,0x03,0x36,0x06,0x10,0x04,0x36,0x06,0xe6,0x03,0xc0,0x01,0x00,0x00,0xe0,0x07,0xf0,0x07,0x9c,0x00,0x9a,0x00,0x9a,0x00,0x9c,0x00,0xf0,0x07,0xe0,0x07,0xe0,0x07,0xf6,0x07,0x96,0x00,0x88,0x00,0x88,0x00,0x96,0x00,0xf6,0x07,0xe0,0x07,0xe0,0x01,0xf6,0x03,0x16,0x06,0x08,0x04,0x08,0x04,0x16,0x06,0xf6,0x03,0xe0,0x01, diff --git a/radio/src/fonts/std/font_se_08x10.png b/radio/src/fonts/std/font_se_08x10.png index 330fa77a2..70fbdbcfd 100644 Binary files a/radio/src/fonts/std/font_se_08x10.png and b/radio/src/fonts/std/font_se_08x10.png differ diff --git a/radio/src/fonts/std/font_se_10x14.lbm b/radio/src/fonts/std/font_se_10x14.lbm deleted file mode 100644 index 20ce6d8df..000000000 --- a/radio/src/fonts/std/font_se_10x14.lbm +++ /dev/null @@ -1 +0,0 @@ -0x00,0x18,0x00,0x3c,0x60,0x7e,0x60,0x66,0x6e,0x66,0x6a,0x66,0x6e,0x66,0xe0,0x66,0xc0,0x7f,0x80,0x7f,0x00,0x18,0x00,0x3c,0x6c,0x7e,0x6c,0x66,0x60,0x66,0x60,0x66,0x6c,0x66,0xec,0x66,0xc0,0x7f,0x80,0x7f,0x80,0x1f,0xc0,0x3f,0xec,0x70,0x6c,0x60,0x60,0x60,0x60,0x60,0x6c,0x60,0xec,0x70,0xc0,0x3f,0x80,0x1f,0xe0,0x7f,0xf0,0x7f,0xb8,0x01,0x9e,0x01,0x9a,0x01,0x9a,0x01,0x9e,0x01,0xb8,0x01,0xf0,0x7f,0xe0,0x7f,0xe0,0x7f,0xf6,0x7f,0xba,0x01,0x9c,0x01,0x8e,0x01,0x8e,0x01,0x9c,0x01,0xba,0x01,0xf6,0x7f,0xe0,0x7f,0xe0,0x1f,0xf6,0x3f,0x36,0x70,0x18,0x60,0x18,0x60,0x18,0x60,0x18,0x60,0x36,0x70,0xf6,0x3f,0xe0,0x1f, diff --git a/radio/src/gui/menu_general.cpp b/radio/src/gui/menu_general.cpp index 242b7f0fa..ebf5b24b3 100644 --- a/radio/src/gui/menu_general.cpp +++ b/radio/src/gui/menu_general.cpp @@ -62,7 +62,7 @@ LanguagePack * languagePacks[] = { &itLanguagePack, &plLanguagePack, &ptLanguagePack, - &skLanguagePack, + &skLanguagePack, &seLanguagePack, NULL }; @@ -75,7 +75,7 @@ enum EnumTabDiag { e_Vers, e_Keys, e_Ana, - IF_PCBSKY9X(e_Hardware) + IF_CPUARM(e_Hardware) e_Calib }; @@ -95,7 +95,7 @@ const MenuFuncP_PROGMEM menuTabDiag[] PROGMEM = { menuGeneralVersion, menuGeneralDiagKeys, menuGeneralDiagAna, - IF_PCBSKY9X(menuGeneralHardware) + IF_CPUARM(menuGeneralHardware) menuGeneralCalib }; @@ -258,7 +258,7 @@ void menuGeneralSetup(uint8_t event) case ITEM_SETUP_TIME: lcd_putsLeft(y, STR_TIME); - lcd_putc(RADIO_SETUP_TIME_COLUMN-1, y, ':'); lcd_putc(RADIO_SETUP_TIME_COLUMN+3*FW-4, y, ':'); + lcd_putc(RADIO_SETUP_TIME_COLUMN+1, y, ':'); lcd_putc(RADIO_SETUP_TIME_COLUMN+3*FW-2, y, ':'); for (uint8_t j=0; j<3; j++) { uint8_t rowattr = (m_posHorz==j ? attr : 0); switch (j) { @@ -1065,13 +1065,14 @@ void menuGeneralDiagKeys(uint8_t event) lcd_puts(14*FW, 3*FH, STR_VTRIM); for(uint8_t i=0; i<9; i++) { - uint8_t y = i*FH; //+FH; #if !defined(PCBTARANIS) - if(i>(SW_ID0-SW_BASE)) y-=FH; //overwrite ID0 + uint8_t y = i*FH-FH; + if(i==(SW_ID0-SW_BASE)) continue; //ignore ID0 putsSwitches(8*FW, y, i+1, 0); //ohne off,on displayKeyState(11*FW+2, y, (EnumKeys)(SW_BASE+i)); -#endif - +#else + uint8_t y = i*FH; +#endif if (i<8) { y = i/2*FH+FH*4; lcd_img(14*FW, y, sticks, i/2, 0); @@ -1113,7 +1114,7 @@ void menuGeneralDiagAna(uint8_t event) uint8_t y = 1+FH+(i/2)*FH; uint8_t x = i&1 ? 64+5 : 0; putsStrIdx(x, y, PSTR("A"), i+1); - lcd_putc(x+2*FWNUM, y, ':'); + lcd_putc(lcdNextPos, y, ':'); lcd_outhex4(x+3*FW-1, y, anaIn(i)); lcd_outdez8(x+10*FW-1, y, (int16_t)calibratedStick[CONVERT_MODE(i)]*25/256); } @@ -1165,7 +1166,33 @@ void menuGeneralDiagAna(uint8_t event) #endif } -#if defined(PCBSKY9X) +#if defined(PCBTARANIS) +enum menuGeneralHwItems { + ITEM_SETUP_HW_UART3_MODE, + ITEM_SETUP_HW_MAX +}; + +#define HW_SETTINGS_COLUMN 15*FW + +void menuGeneralHardware(uint8_t event) +{ + MENU(STR_HARDWARE, menuTabDiag, e_Hardware, ITEM_SETUP_HW_MAX+1, {0}); + + uint8_t sub = m_posVert - 1; + + for (uint8_t i=0; i0) ? BLINK|INVERS : INVERS) : 0); + switch(i) { + case ITEM_SETUP_HW_UART3_MODE: + g_eeGeneral.hw_uartMode = selectMenuItem(HW_SETTINGS_COLUMN, y, STR_UART3MODE, STR_UART3MODES, g_eeGeneral.hw_uartMode, 0, 2, attr, event); + break; + } + } + +} + +#elif defined(PCBSKY9X) enum menuGeneralHwItems { ITEM_SETUP_HW_OPTREX_DISPLAY, ITEM_SETUP_HW_STICKS_GAINS_LABELS, diff --git a/radio/src/gui/menu_model.cpp b/radio/src/gui/menu_model.cpp index c2f472a47..55f61707f 100644 --- a/radio/src/gui/menu_model.cpp +++ b/radio/src/gui/menu_model.cpp @@ -768,7 +768,12 @@ void editName(uint8_t x, uint8_t y, char *name, uint8_t size, uint8_t event, uin lcd_putsLeft(y, STR_NAME); #endif - lcd_putsnAtt(x, y, name, size, ZCHAR | ((active && s_editMode <= 0) ? INVERS : 0)); + uint8_t mode = 0; + if (active) { + if (s_editMode <= 0) mode = INVERS+FIXEDWIDTH; + else mode = FIXEDWIDTH; + } + lcd_putsnAtt(x, y, name, size, ZCHAR | mode); if (active) { uint8_t cur = editNameCursorPos; @@ -831,7 +836,7 @@ void editName(uint8_t x, uint8_t y, char *name, uint8_t size, uint8_t event, uin name[cur] = v; eeDirty(EE_MODEL); } - lcd_putcAtt(x+editNameCursorPos*FW, y, idx2char(v), INVERS); + lcd_putcAtt(x+editNameCursorPos*FW, y, idx2char(v), INVERS+FIXEDWIDTH); } else { cur = 0; @@ -1106,7 +1111,7 @@ void menuModelSetup(uint8_t event) break; case ITEM_MODEL_TRIM_INC: - g_model.trimInc = selectMenuItem(MODEL_SETUP_2ND_COLUMN, y, STR_TRIMINC, STR_VTRIMINC, g_model.trimInc, 0, 4, attr, event); + g_model.trimInc = selectMenuItem(MODEL_SETUP_2ND_COLUMN, y, STR_TRIMINC, STR_VTRIMINC, g_model.trimInc, -2, 2, attr, event); break; case ITEM_MODEL_THROTTLE_REVERSED: @@ -2883,7 +2888,7 @@ void menuModelExpoOne(uint8_t event) { #if defined(PCBTARANIS) case EXPO_FIELD_INPUT_NAME: - editSingleName(EXPO_ONE_2ND_COLUMN, y, "Input Name", g_model.inputNames[ed->chn], sizeof(g_model.inputNames[ed->chn]), event, attr); + editSingleName(EXPO_ONE_2ND_COLUMN, y, STR_INPUTNAME, g_model.inputNames[ed->chn], sizeof(g_model.inputNames[ed->chn]), event, attr); break; #endif @@ -3309,8 +3314,8 @@ void displayHeaderChannelName(uint8_t ch) uint8_t len = zlen(g_model.limitData[ch-1].name, sizeof(g_model.limitData[ch-1].name)); if (len) { lcd_putc(17*FW, 0, ' '); - lcd_putsnAtt(18*FW, 0, g_model.limitData[ch-1].name, len, ZCHAR); - lcd_putc(18*FW+len*FW, 0, ' '); + lcd_putsnAtt(lcdNextPos, 0, g_model.limitData[ch-1].name, len, ZCHAR); + lcd_putc(lcdNextPos, 0, ' '); } } #endif @@ -3552,9 +3557,9 @@ void menuModelExpoMix(uint8_t expo, uint8_t event) if (mixCnt > 0) lcd_putsiAtt(FW, y, STR_VMLTPX2, md->mltpx, 0); - putsMixerSource(MIX_LINE_SRC_POS, y, md->srcRaw, isMixActive(i) ? BOLD : 0); + putsMixerSource(MIX_LINE_SRC_POS, y, md->srcRaw, 0); - gvarWeightItem(MIX_LINE_WEIGHT_POS, y, md, attr, event); + gvarWeightItem(MIX_LINE_WEIGHT_POS, y, md, attr | (isMixActive(i) ? BOLD : 0), event); #if LCD_W >= 212 displayFlightModes(EXPO_LINE_FM_POS, y, md->phases); @@ -3745,8 +3750,10 @@ enum LimitsItems { #define MIN_MAX_DISPLAY(x) CONVERT_US_MIN_MAX(x) #undef MIN_MAX_ATTR #define MIN_MAX_ATTR attr -#else +#elif defined(CPUARM) #define MIN_MAX_DISPLAY(x) (x) +#else + #define MIN_MAX_DISPLAY(x) ((int8_t)(x)) #endif #if defined(PCBTARANIS) @@ -4933,11 +4940,13 @@ void menuModelCustomFunctions(uint8_t event) break; case 3: - if (sd->swtch && (CFN_FUNC(sd) <= FUNC_INSTANT_TRIM + if (sd->swtch && (CFN_FUNC(sd) <= FUNC_INSTANT_TRIM || CFN_FUNC(sd) == FUNC_RESET #if defined(GVARS) + // TODO #define || CFN_FUNC(sd) >= FUNC_ADJUST_GV1 #endif #if defined(CPUARM) + // TODO #define || CFN_FUNC(sd) == FUNC_VOLUME #endif )) { @@ -5167,6 +5176,9 @@ enum menuModelTelemetryItems { #endif ITEM_TELEMETRY_USR_VOLTAGE_SOURCE, ITEM_TELEMETRY_USR_CURRENT_SOURCE, +#if defined(FAS_OFFSET) || !defined(CPUM64) + ITEM_TELEMETRY_FAS_OFFSET, +#endif #if defined(CPUARM) ITEM_TELEMTETRY_PERSISTENT_MAH, #endif @@ -5247,9 +5259,15 @@ enum menuModelTelemetryItems { #define VARIO_RANGE_ROWS 3 #endif +#if defined(FAS_OFFSET) || !defined(CPUM64) + #define IF_FAS_OFFSET(x) x, +#else + #define IF_FAS_OFFSET(x) +#endif + void menuModelTelemetry(uint8_t event) { - MENU(STR_MENUTELEMETRY, menuTabModel, e_Telemetry, ITEM_TELEMETRY_MAX+1, {0, CHANNEL_ROWS CHANNEL_ROWS RSSI_ROWS USRDATA_LINES 0, 0, IF_CPUARM(0) IF_VARIO(LABEL(Vario)) IF_VARIO(0) IF_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, IF_CPUARM(SCREEN_TYPE_ROWS) IF_CPUARM(2) IF_CPUARM(2) IF_CPUARM(2) IF_CPUARM(2) }); + MENU(STR_MENUTELEMETRY, menuTabModel, e_Telemetry, ITEM_TELEMETRY_MAX+1, {0, CHANNEL_ROWS CHANNEL_ROWS RSSI_ROWS USRDATA_LINES 0, 0, IF_FAS_OFFSET(0) IF_CPUARM(0) IF_VARIO(LABEL(Vario)) IF_VARIO(0) IF_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, IF_CPUARM(SCREEN_TYPE_ROWS) IF_CPUARM(2) IF_CPUARM(2) IF_CPUARM(2) IF_CPUARM(2) }); uint8_t sub = m_posVert - 1; @@ -5403,8 +5421,12 @@ void menuModelTelemetry(uint8_t event) case ITEM_TELEMETRY_USR_BLADES: lcd_putsLeft(y, STR_BLADES); - lcd_outdezAtt(TELEM_COL2+FWNUM, y, 2+g_model.frsky.blades, attr); - if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, g_model.frsky.blades, 3); + lcd_outdezAtt(TELEM_COL2+FWNUM, y, 1+g_model.frsky.blades, attr); +#if defined(CPUARM) + if (attr) CHECK_INCDEC_MODELVAR(event, g_model.frsky.blades, MIN_BLADES, MAX_BLADES); +#else + if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, g_model.frsky.blades, MAX_BLADES); +#endif break; #endif @@ -5419,6 +5441,16 @@ void menuModelTelemetry(uint8_t event) lcd_putsiAtt(TELEM_COL2, y, STR_VOLTSRC, g_model.frsky.currentSource, attr); if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, g_model.frsky.currentSource, 3); break; + +#if defined(FAS_OFFSET) || !defined(CPUM64) + case ITEM_TELEMETRY_FAS_OFFSET: + lcd_putsLeft(y, STR_FAS_OFFSET); + lcd_outdezAtt(TELEM_COL2, y, g_model.frsky.fasOffset, attr|LEFT|PREC1); + lcd_outdezAtt(TELEM_COL2+6*FW, y, frskyData.hub.current, LEFT|PREC1); + lcd_putc(TELEM_COL2+8*FW, y, 'A'); + if (attr) g_model.frsky.fasOffset = checkIncDec(event, g_model.frsky.fasOffset, -15, 15, EE_MODEL); + break; +#endif #if defined(CPUARM) case ITEM_TELEMTETRY_PERSISTENT_MAH: @@ -5550,18 +5582,14 @@ void menuModelTelemetry(uint8_t event) lineIndex = k-ITEM_TELEMETRY_SCREEN_LINE5; } -#if 0 - putsStrIdx(0, y, PSTR(INDENT"Line"), lineIndex+1, m_posHorz<0 ? attr : 0); -#endif - #if defined(GAUGES) if (IS_BARS_SCREEN(screenIndex)) { FrSkyBarData & bar = g_model.frsky.screens[screenIndex].bars[lineIndex]; uint8_t barSource = bar.source; lcd_putsiAtt(TELEM_COL1, y, STR_VTELEMCHNS, barSource, m_posHorz==0 ? attr : 0); if (barSource) { - putsTelemetryChannel(TELEM_BARS_COLMIN, y, barSource-1, convertTelemValue(barSource, bar.barMin), (m_posHorz==1 ? attr : 0) | LEFT); - putsTelemetryChannel(TELEM_BARS_COLMAX, y, barSource-1, convertTelemValue(barSource, 255-bar.barMax), (m_posHorz==2 ? attr : 0) | LEFT); + putsTelemetryChannel(TELEM_BARS_COLMIN, y, barSource-1, convertBarTelemValue(barSource, bar.barMin), (m_posHorz==1 ? attr : 0) | LEFT); + putsTelemetryChannel(TELEM_BARS_COLMAX, y, barSource-1, convertBarTelemValue(barSource, 255-bar.barMax), (m_posHorz==2 ? attr : 0) | LEFT); } else if (attr) { MOVE_CURSOR_FROM_HERE(); @@ -5572,14 +5600,14 @@ void menuModelTelemetry(uint8_t event) bar.source = checkIncDecModel(event, barSource, 0, TELEM_DISPLAY_MAX); if (checkIncDec_Ret) { bar.barMin = 0; - bar.barMax = 255-maxTelemValue(bar.source); + bar.barMax = 255 - maxBarTelemValue(bar.source); } break; case 1: bar.barMin = checkIncDec(event, bar.barMin, 0, 254-bar.barMax, EE_MODEL|NO_INCDEC_MARKS); break; case 2: - bar.barMax = 255 - checkIncDec(event, 255-bar.barMax, bar.barMin+1, maxTelemValue(barSource), EE_MODEL|NO_INCDEC_MARKS); + bar.barMax = 255 - checkIncDec(event, 255-bar.barMax, bar.barMin+1, maxBarTelemValue(barSource), EE_MODEL|NO_INCDEC_MARKS); break; } } diff --git a/radio/src/gui/view_main.cpp b/radio/src/gui/view_main.cpp index 930119fbd..93c6e0dfa 100644 --- a/radio/src/gui/view_main.cpp +++ b/radio/src/gui/view_main.cpp @@ -318,7 +318,7 @@ void displayTopBar() /* RTC time */ struct gtm t; gettime(&t); - lcd_putcAtt(BAR_TIME_X-1, BAR_Y+1, ':', BLINK); + lcd_putcAtt(BAR_TIME_X+1, BAR_Y+1, ':', BLINK); lcd_outdezNAtt(BAR_TIME_X+1, BAR_Y+1, t.tm_hour, LEADING0, 2); lcd_outdezNAtt(BAR_TIME_X+3*FWNUM-1, BAR_Y+1, t.tm_min, LEADING0, 2); diff --git a/radio/src/gui/view_telemetry.cpp b/radio/src/gui/view_telemetry.cpp index ff06cd142..9e9c100c6 100644 --- a/radio/src/gui/view_telemetry.cpp +++ b/radio/src/gui/view_telemetry.cpp @@ -64,7 +64,7 @@ void displayRssiLine() if (TELEMETRY_STREAMING()) { lcd_hline(0, 55, 212, 0); // separator uint8_t rssi = min((uint8_t)99, frskyData.rssi[0].value); - lcd_putsLeft(STATUS_BAR_Y, STR_RX); lcd_outdezNAtt(4*FW, STATUS_BAR_Y, rssi, LEADING0, 2); + lcd_putsn(0, STATUS_BAR_Y, STR_RX, 2); lcd_outdezNAtt(4*FW, STATUS_BAR_Y, rssi, LEADING0, 2); lcd_rect(25, 57, 78, 7); lcd_filled_rect(26, 58, 19*rssi/25, 5, (rssi < getRssiAlarmValue(0)) ? DOTTED : SOLID); } @@ -100,9 +100,9 @@ void displayGpsTime() { uint8_t att = (TELEMETRY_STREAMING() ? LEFT|LEADING0 : LEFT|LEADING0|BLINK); lcd_outdezNAtt(CENTER_OFS+6*FW+5, STATUS_BAR_Y, frskyData.hub.hour, att, 2); - lcd_putcAtt(CENTER_OFS+8*FW+2, STATUS_BAR_Y, ':', att); + lcd_putcAtt(CENTER_OFS+8*FW+4, STATUS_BAR_Y, ':', att); lcd_outdezNAtt(CENTER_OFS+9*FW+2, STATUS_BAR_Y, frskyData.hub.min, att, 2); - lcd_putcAtt(CENTER_OFS+11*FW-1, STATUS_BAR_Y, ':', att); + lcd_putcAtt(CENTER_OFS+11*FW+1, STATUS_BAR_Y, ':', att); lcd_outdezNAtt(CENTER_OFS+12*FW-1, STATUS_BAR_Y, frskyData.hub.sec, att, 2); lcd_status_line(); } @@ -214,8 +214,8 @@ void menuTelemetryFrsky(uint8_t event) for (int8_t i=3; i>=0; i--) { FrSkyBarData & bar = screen.bars[i]; uint8_t source = bar.source; - getvalue_t barMin = convertTelemValue(source, bar.barMin); - getvalue_t barMax = convertTelemValue(source, 255-bar.barMax); + getvalue_t barMin = convertBarTelemValue(source, bar.barMin); + getvalue_t barMax = convertBarTelemValue(source, 255-bar.barMax); if (source && barMax > barMin) { uint8_t y = barHeight+6+i*(barHeight+6); lcd_putsiAtt(0, y+barHeight-5, STR_VTELEMCHNS, source, 0); @@ -234,7 +234,7 @@ void menuTelemetryFrsky(uint8_t event) threshold = g_model.frsky.channels[source-TELEM_A1].alarms_value[0]; #if defined(FRSKY_HUB) else - threshold = convertTelemValue(source, barsThresholds[source-TELEM_ALT]); + threshold = convertBarTelemValue(source, barsThresholds[source-TELEM_ALT]); #endif if (threshold) { diff --git a/radio/src/lcd.cpp b/radio/src/lcd.cpp index c02ffd5a0..e1de61641 100644 --- a/radio/src/lcd.cpp +++ b/radio/src/lcd.cpp @@ -85,17 +85,21 @@ void lcd_img(xcoord_t x, uint8_t y, const pm_uchar * img, uint8_t idx, LcdFlags } uint8_t lcdLastPos; +uint8_t lcdNextPos; void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags) { uint8_t *p = &displayBuf[ y / 8 * LCD_W + x ]; #if defined(CPUARM) - const pm_uchar *q = (c < 0xC0) ? &font_5x7[(c-0x20)*5+4] : &font_5x7_extra[(c-0xC0)*5+4]; + const pm_uchar *q = (c < 0xC0) ? &font_5x7[(c-0x20)*5] : &font_5x7_extra[(c-0xC0)*5]; #else - const pm_uchar *q = &font_5x7[(c-0x20)*5+4]; + const pm_uchar *q = &font_5x7[(c-0x20)*5]; #endif + lcdNextPos = x-1; + p--; + bool inv = false; if (flags & BLINK) { if (BLINK_ON_PHASE) { @@ -109,10 +113,14 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags) inv = true; } + unsigned char c_remapped = 0; +#if defined(BOLD_FONT) && !defined(CPUM64) || defined(EXTSTD) + if (flags & (DBLSIZE+BOLD)) { +#else if (flags & DBLSIZE) { - // To save space only some DBLSIZE chars are available +#endif + // To save space only some DBLSIZE and BOLD chars are available // c has to be remapped. All non existing chars mapped to 0 (space) - unsigned char c_remapped; if (c>=',' && c<=':') c_remapped = c - ',' + 1; @@ -122,23 +130,37 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags) c_remapped = c - 'a' + 42; else if (c=='_') c_remapped = 4; -#if defined(CPUARM) - else if (c>= 128 ) +#if defined(BOLD_FONT) && !defined(CPUM64) || defined(EXTSTD) + else if (c!=' ') + flags &= ~BOLD; +#endif +#if defined(CPUARM) + else if ((c>= 128) && (flags & DBLSIZE)) c_remapped = c - 60; -#endif - else - c_remapped = 0; +#endif + +#if defined(BOLD_FONT) && !defined(CPUM64) || defined(EXTSTD) + } + if (flags & DBLSIZE) { +#endif /* each letter consists of ten top bytes followed by * by ten bottom bytes (20 bytes per * char) */ q = &font_10x14[((uint16_t)c_remapped)*20]; - for (int8_t i=11; i>=0; i--) { - if ((flags & CONDENSED) && i<=1) break; + for (int8_t i=0; i<=11; i++) { uint8_t b1=0, b2=0; - if (i>1) { - b1 = pgm_read_byte(q++); /*top byte*/ - b2 = pgm_read_byte(q++); /*top byte*/ + if (!i) { + if (!x || !inv) { + lcdNextPos++; + p++; + continue; + } } + else if (i <= 10) { + b1 = pgm_read_byte(q++); /*top byte*/ + b2 = pgm_read_byte(q++); + } + if ((b1 & b2) == 0xff) continue; if (inv) { b1 = ~b1; b2 = ~b2; @@ -149,21 +171,30 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags) LCD_BYTE_FILTER(p, 0, b1); LCD_BYTE_FILTER(p+LCD_W, 0, b2); p++; + lcdNextPos++; } } } + #if defined(CPUARM) else if (flags & MIDSIZE) { /* each letter consists of ten top bytes followed by * by ten bottom bytes (20 bytes per * char) */ q = &font_8x10[((uint16_t)c-0x20)*16]; - for (int8_t i=9; i>=0; i--) { + for (int8_t i=0; i<=9; i++) { uint8_t b1=0, b2=0; - if ((flags & CONDENSED) && i<=1) break; - if (i!=0 && i!=9) { - b1 = pgm_read_byte(q++); /*top byte*/ - b2 = pgm_read_byte(q++); /*top byte*/ + if (!i) { + if (!x || !inv) { + lcdNextPos++; + p++; + continue; + } } + if (i <= 8) { + b1 = pgm_read_byte(q++); /*top byte*/ + b2 = pgm_read_byte(q++); + } + if ((b1 == 0xff) && (b2 == 0x0f)) continue; if (inv) { b1 = ~b1; b2 = ~b2; @@ -183,15 +214,24 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags) } } p++; + lcdNextPos++; } } } else if (flags & SMLSIZE) { - q = (c < 0xC0) ? &font_4x6[(c-0x20)*5+4] : &font_4x6_extra[(c-0xC0)*5+4]; + q = (c < 0xC0) ? &font_4x6[(c-0x20)*5] : &font_4x6_extra[(c-0xC0)*5]; uint8_t ym8 = (y & 0x07); - p += 4; - for (int8_t i=4; i>=0; i--) { - uint8_t b = pgm_read_byte(q--); + for (int8_t i=0; i<=6; i++) { + uint8_t b = 0; + if (!i) { + if (!x || !inv) { + lcdNextPos++; + p++; + continue; + } + } + else if (i <= 5) b = pgm_read_byte(q++); + if (b == 0x7f) continue; if (inv) b = ~b & 0x7f; if (p> (8-ym8)), b >> (8-ym8)); } } - p--; + p++; + lcdNextPos++; } } else if (flags & TINSIZE) { - q = &font_3x5[((uint16_t)c-0x2D)*3+2]; + q = &font_3x5[((uint16_t)c-0x2D)*3]; uint8_t ym8 = (y & 0x07); - p += 3; - for (int8_t i=3; i>=0; i--) { - uint8_t b = (i!=3 ? pgm_read_byte(q--) : 0); + for (int8_t i=0; i<=4; i++) { + uint8_t b = 0; + if (!i) { + if (!x || !inv) { + lcdNextPos++; + p++; + continue; + } + } + else if (i <= 3) b= pgm_read_byte(q++); if (inv) b = ~b & 0x3f; if (p> (8-ym8)), b >> (8-ym8)); } } - p--; + p++; + lcdNextPos++; } } #endif else { - uint8_t condense=0; - - if (flags & CONDENSED) { - *p = inv ? ~0 : 0; - condense=1; - } - uint8_t ym8 = (y & 0x07); - p += 5; - for (uint8_t i=6, b=0; i>0; i--, b=pgm_read_byte(q--)) { +#if defined(BOLD_FONT) && defined(CPUM64) && !defined(EXTSTD) + uint8_t bb = 0; + if (inv) bb = 0xff; +#else + if (flags & BOLD) { + q = &font_5x7_B[(c_remapped)*5]; + } +#endif + for (int8_t i=0; i<=6; i++) { + uint8_t b = 0; + if (i==0) { + if ( !x || !inv ) { + lcdNextPos++; + p++; + continue; + } + } + else if (i <= 5) { + b = pgm_read_byte(q++); + } + if (b == 0xff) { + if (flags & FIXEDWIDTH) + b = 0; + else + continue; + } if (inv) b = ~b; - - if (condense && i==2) { - /*condense the letter by skipping column 4 */ + if ((flags & CONDENSED) && i==2) { + /*condense the letter by skipping column 3 */ continue; } +#if defined(BOLD_FONT) && defined(CPUM64) && !defined(EXTSTD) + if (flags & BOLD) { + uint8_t a; + if (inv) + a = b & bb; + else + a = b | bb; + bb = b; + b = a; + } +#endif + if (p> (8-ym8)), b >> (8-ym8)); + LCD_BYTE_FILTER(r, ~mask, b >> (8-ym8)); } -#if defined(BOLD_FONT) - if (flags & BOLD) { - ASSERT_IN_DISPLAY(p+1); - if (inv) - LCD_BYTE_FILTER(p+1, b << ym8, 0); - else - LCD_BYTE_FILTER(p+1, 0xff, b << ym8); -#if defined(CPUARM) - if (ym8) { - uint8_t *r = p+1 + LCD_W; - if (r> (8-ym8), 0); - else - LCD_BYTE_FILTER(r, 0xff, b >> (8-ym8)); - } - } -#endif + +#if defined(PCBTARANIS) + if (inv) { + if (ym8) lcd_mask(p, 0x01 << (ym8-1), FORCE); + else if (y) { + ASSERT_IN_DISPLAY(p - LCD_W); + lcd_mask(p - LCD_W, 0x80, FORCE); + } } +#else + if (inv && (ym8 == 1)) *p |= 0x01; #endif } - p--; + p++; + lcdNextPos++; } } } @@ -288,6 +360,10 @@ void lcd_putsiAtt(xcoord_t x, uint8_t y,const pm_char * s,uint8_t idx, LcdFlags void lcd_putsnAtt(xcoord_t x, uint8_t y, const pm_char * s, uint8_t len, LcdFlags mode) { +#if defined(CPUARM) + xcoord_t orig_x = x; +#endif + bool setx = false; while(len!=0) { unsigned char c; switch (mode & (BSS+ZCHAR)) { @@ -301,29 +377,41 @@ void lcd_putsnAtt(xcoord_t x, uint8_t y, const pm_char * s, uint8_t len, LcdFlag c = pgm_read_byte(s); break; } - if (!c || x>LCD_W-6) break; - if (c >= 0x20) { -#if defined(CPUARM) - if ((mode & MIDSIZE) && ((c>='a'&&c<='z')||(c>='0'&&c<='9'))) { - lcd_putcAtt(x, y, c, mode); - x-=1; - } - else -#endif - lcd_putcAtt(x, y, c, mode); - x += FW; - if (c == '|') x -= 4; - if (mode&DBLSIZE) x += FW-1; - else if (mode&MIDSIZE) x += FW-3; - else if (mode&SMLSIZE) x -= 1; + + if (setx) { + x = c; + setx = false; } + else if (!c || x>LCD_W-6) break; + else if (c >= 0x20) { + lcd_putcAtt(x, y, c, mode); + x = lcdNextPos; + } + else if (setx) { + x = c; + setx = false; + } + else if (c == 0x1F) { //X-coord prefix + setx = true; + } +#if defined(CPUARM) + else if (c == 0x1E) { //NEWLINE + x = orig_x; + y += FH; + if (mode & DBLSIZE) y += FH; + else if (mode & MIDSIZE) y += 4; + else if (mode & SMLSIZE) y--; + if (y >= LCD_H) break; + } +#endif else { - x += (c*FW/2); + x += (c*FW/2); //EXTENDED SPACE } s++; len--; } lcdLastPos = x; + lcdNextPos = x; #if defined(CPUARM) if (mode&MIDSIZE) lcdLastPos += 1; @@ -352,7 +440,7 @@ void lcd_putsLeft(uint8_t y, const pm_char * s) void lcd_outhex4(xcoord_t x, uint8_t y, uint16_t val) { - x+=FWNUM*4; + x+=FWNUM*4+1; for(int i=0; i<4; i++) { x-=FWNUM; @@ -377,6 +465,7 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t { uint8_t fw = FWNUM; int8_t mode = MODE(flags); + flags &= ~LEADING0; bool dblsize = flags & DBLSIZE; #if defined(CPUARM) bool midsize = flags & MIDSIZE; @@ -408,22 +497,24 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t len = mode + 1; } + if (dblsize) { fw += FWNUM; } else if (midsize) { - flags |= CONDENSED; fw += FWNUM-3; } else if (tinsize) { fw -= 1; - x += 1; } else { if (flags & LEFT) { if (mode > 0) x += 2; } +#if defined(BOLD_FONT) && !defined(CPUM64) || defined(EXTSTD) + if (flags & BOLD) fw += 1; +#endif } if (flags & LEFT) { @@ -433,7 +524,8 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t } lcdLastPos = x; - x -= fw + 1; + x -= fw; + if (dblsize) x++; for (uint8_t i=1; i<=len; i++) { div_t qr = div((uint16_t)val, 10); @@ -441,7 +533,7 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t LcdFlags f = flags; #if !defined(PCBTARANIS) if (dblsize) { - if (c=='1' && i==len && xn>x+10) { x+=2; f|=CONDENSED; } + if (c=='1' && i==len && xn>x+10) { x+=1; } if ((uint16_t)val >= 1000) { x+=FWNUM; f&=~DBLSIZE; } } #endif @@ -449,7 +541,7 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t if (mode==i) { flags &= ~PREC2; // TODO not needed but removes 20bytes, could be improved for sure, check asm if (dblsize) { - xn = x; + xn = x - 2; if (c>='1' && c<='3') ln++; uint8_t tn = (qr.quot) % 10; if (tn==2 || tn==4) { @@ -471,12 +563,8 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t x--; } else { - x--; - lcd_plot(x, y+6); - if ((flags&INVERS) && ((~flags & BLINK) || BLINK_ON_PHASE)) { - lcd_vline(x, y, 8); - } - x--; + x -= 2; + lcd_putcAtt(x, y, '.', f); } } #if !defined(PCBTARANIS) @@ -484,6 +572,9 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t #endif val = qr.quot; x-=fw; +#if defined(BOLD_FONT) && !defined(CPUM64) || defined(EXTSTD) + if (i==len && (flags & BOLD)) x += 1; +#endif } if (xn) { @@ -501,7 +592,6 @@ void lcd_outdezNAtt(xcoord_t x, uint8_t y, lcdint_t val, LcdFlags flags, uint8_t lcd_hline(xn, y+2*FH-2, ln); } } - if (neg) lcd_putcAtt(x, y, '-', flags); } @@ -772,15 +862,15 @@ void lcdDrawTelemetryTopBar() { putsModelName(0, 0, g_model.header.name, g_eeGeneral.currModel, 0); uint8_t att = (g_vbat100mV < g_eeGeneral.vBatWarn ? BLINK : 0); - putsVBat(16*FW+2,0,att); + putsVBat(16*FW+1,0,att); if (g_model.timers[0].mode) { att = (timersStates[0].val<0 ? BLINK : 0); - putsTime(22*FW+5*FWNUM+1, 0, timersStates[0].val, att, att); + putsTime(22*FW+5*FWNUM+3, 0, timersStates[0].val, att, att); lcd_putsiAtt(18*FW+2, 1, STR_VTELEMCHNS, TELEM_TM1, SMLSIZE); } if (g_model.timers[1].mode) { att = (timersStates[1].val<0 ? BLINK : 0); - putsTime(31*FW+5*FWNUM+1, 0, timersStates[1].val, att, att); + putsTime(31*FW+5*FWNUM+3, 0, timersStates[1].val, att, att); lcd_putsiAtt(27*FW+2, 1, STR_VTELEMCHNS, TELEM_TM2, SMLSIZE); } lcd_invert_line(0); @@ -813,21 +903,21 @@ void putsTime(xcoord_t x, uint8_t y, putstime_t tme, LcdFlags att, LcdFlags att2 } if (tme < 0) { - lcd_putcAtt(x - ((att & DBLSIZE) ? FW+3 : ((att & MIDSIZE) ? FW+1 : FWNUM)), y, '-', att); + lcd_putcAtt(x - ((att & DBLSIZE) ? FW+2 : ((att & MIDSIZE) ? FW+0 : FWNUM)), y, '-', att); tme = -tme; } qr = div(tme, 60); #if defined(PCBTARANIS) +#define separator ':' if (att & MIDSIZE) { div_t qr2 = div(qr.quot, 60); - LCD_2DOTS(x+2*8-6, y, att); lcd_outdezNAtt(x, y, qr2.quot, att|LEADING0|LEFT, 2); + lcd_putcAtt(lcdLastPos, y, separator, att&att2); qr.quot = qr2.rem; x += 2*8+1; } -#define separator ':' #elif defined(CPUARM) char separator = ':'; if (tme >= 3600 && (~att & DBLSIZE)) { @@ -837,30 +927,9 @@ void putsTime(xcoord_t x, uint8_t y, putstime_t tme, LcdFlags att, LcdFlags att2 #else #define separator ':' #endif - - uint8_t x2, x3; - if (att & DBLSIZE) { - x2 = x+2*(FW+FWNUM)-3; - x3 = x+2*(FW+FWNUM)+FW-2; - } - else if (att & MIDSIZE) { - x2 = x+2*8-6; - x3 = x+2*8+1; - } - else { - x2 = x+2*FWNUM-1; - x3 = x+2*FWNUM-1+FW; - } - -#if defined(CPUARM) - if (att & MIDSIZE) { - LCD_2DOTS(x2, y, att); - } - else -#endif - lcd_putcAtt(x2, y, separator, att&att2); lcd_outdezNAtt(x, y, qr.quot, att|LEADING0|LEFT, 2); - lcd_outdezNAtt(x3, y, qr.rem, att2|LEADING0|LEFT, 2); + lcd_putcAtt(lcdLastPos, y, separator, att&att2); + lcd_outdezNAtt(lcdNextPos, y, qr.rem, att2|LEADING0|LEFT, 2); } // TODO to be optimized with putsTelemetryValue @@ -877,22 +946,8 @@ void putsVBat(xcoord_t x, uint8_t y, LcdFlags att) void putsStrIdx(xcoord_t x, uint8_t y, const pm_char *str, uint8_t idx, LcdFlags att) { - lcd_putsAtt(x, y, str, att); - - if (att & SMLSIZE) - lcd_outdezNAtt(lcdLastPos+1, y, idx, att|LEFT, 2); - else - lcd_outdezNAtt(lcdLastPos, y, idx, att|LEFT, 2); - -#if defined(CPUARM) - uint8_t lastPos = lcdLastPos; -#endif - - lcd_putsAtt(x, y, str, att); - -#if defined(CPUARM) - lcdLastPos = lastPos; -#endif + lcd_putsAtt(x, y, str, att & ~LEADING0); + lcd_outdezNAtt(lcdNextPos, y, idx, att|LEFT, 2); } void putsMixerSource(xcoord_t x, uint8_t y, uint8_t idx, LcdFlags att) @@ -902,7 +957,7 @@ void putsMixerSource(xcoord_t x, uint8_t y, uint8_t idx, LcdFlags att) lcd_putsiAtt(x, y, STR_VSRCRAW, 0, att); } else if (idx <= MIXSRC_LAST_INPUT) { - lcd_putcAtt(x+2, y+1, 'I', TINSIZE); + lcd_putcAtt(x+2, y+1, CHR_INPUT, TINSIZE); lcd_filled_rect(x, y, 7, 7); if (ZEXIST(g_model.inputNames[idx-MIXSRC_FIRST_INPUT])) lcd_putsnAtt(x+8, y, g_model.inputNames[idx-MIXSRC_FIRST_INPUT], 4, ZCHAR|att); @@ -993,32 +1048,35 @@ void putsSwitches(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att) else if (idx >= SWSRC_FIRST_ROTENC_SWITCH) { idx -= SWSRC_FIRST_ROTENC_SWITCH; char suffix = (idx & 1) ? CHR_LONG : CHR_SHORT; - lcd_putcAtt(x+3*FW, y, suffix, att); - return lcd_putsiAtt(x, y, STR_VRENCODERS, idx/2, att); + lcd_putsiAtt(x, y, STR_VRENCODERS, idx/2, att); + return lcd_putcAtt(lcdLastPos, y, suffix, att); } #endif #if !defined(PCBSTD) else if (idx >= SWSRC_TRAINER_SHORT) { idx -= SWSRC_TRAINER_SHORT; - lcd_putcAtt(x+3*FW, y, (idx & 1) ? CHR_LONG : CHR_SHORT, att); + char suffix = (idx & 1) ? CHR_LONG : CHR_SHORT; #if ROTARY_ENCODERS > 0 if (idx >= 2) { idx -= 2; - return lcd_putsiAtt(x, y, STR_VRENCODERS, idx/2, att); + lcd_putsiAtt(x, y, STR_VRENCODERS, idx/2, att); } else #endif { - return lcd_putsiAtt(x, y, STR_VSWITCHES, SWSRC_TRAINER-1, att); + lcd_putsiAtt(x, y, STR_VSWITCHES, SWSRC_TRAINER-1, att); } + return lcd_putcAtt(lcdLastPos, y, suffix, att); } #endif if (idx > SWSRC_ON) { idx -= SWSRC_ON; - char suffix = CHR_TOGGLE; - if (idx != SWSRC_ON && (~att & STRCONDENSED)) lcd_putcAtt(x+3*FW, y, suffix, att); + if (idx != SWSRC_ON && (~att & STRCONDENSED)) { + lcd_putsiAtt(x, y, STR_VSWITCHES, idx-1, att); + return lcd_putcAtt(lcdLastPos, y, CHR_TOGGLE, att); + } } lcd_putsiAtt(x, y, STR_VSWITCHES, idx-1, att); } diff --git a/radio/src/lcd.h b/radio/src/lcd.h index 52a9ae8ce..223901be7 100644 --- a/radio/src/lcd.h +++ b/radio/src/lcd.h @@ -78,12 +78,12 @@ /* lcd putc flags */ #define CONDENSED 0x08 - +#define FIXEDWIDTH 0x10 /* lcd puts flags */ /* no 0x80 here because of "GV"1 which is aligned LEFT */ /* no 0x10 here because of "MODEL"01 which uses LEADING0 */ #define BSS 0x20 -#define STRCONDENSED 0x40 /* means that THRm will be displayed as THR */ +#define STRCONDENSED 0x80 /* means that THRm will be displayed as THR */ #define ZCHAR 0x80 /* lcd outdez flags */ @@ -139,6 +139,7 @@ extern uint8_t displayBuf[DISPLAY_BUF_SIZE]; extern uint8_t lcdLastPos; +extern uint8_t lcdNextPos; #if defined(PCBSTD) && defined(VOICE) extern volatile uint8_t LcdLock ; @@ -198,6 +199,7 @@ void putsTime(xcoord_t x, uint8_t y, putstime_t tme, LcdFlags att, LcdFlags att2 #define DOTTED 0x55 void lcd_plot(xcoord_t x, uint8_t y, LcdFlags att=0); +void lcd_mask(uint8_t *p, uint8_t mask, LcdFlags att=0); void lcd_hline(xcoord_t x, uint8_t y, xcoord_t w, LcdFlags att=0); void lcd_hlineStip(xcoord_t x, uint8_t y, xcoord_t w, uint8_t pat, LcdFlags att=0); void lcd_vline(xcoord_t x, int8_t y, int8_t h); @@ -226,14 +228,14 @@ void lcdDrawTelemetryTopBar(); lcd_vline(xx-1,yy-ll,ll); \ lcd_vline(xx ,yy-ll,ll); \ lcd_vline(xx+1,yy-ll,ll); - +/* #define LCD_2DOTS(x, y, att) \ lcd_putcAtt(x, y, ' ', att); \ lcd_vline(x+4, y+3, 2); \ lcd_vline(x+5, y+3, 2); \ lcd_vline(x+4, y+8, 2); \ lcd_vline(x+5, y+8, 2); - +*/ void lcd_img(xcoord_t x, uint8_t y, const pm_uchar * img, uint8_t idx, LcdFlags att=0); void lcd_bmp(xcoord_t x, uint8_t y, const pm_uchar * img, uint8_t offset=0, uint8_t width=0); #define LCD_ICON(x, y, icon) lcd_bmp(x, y, icons, icon) diff --git a/radio/src/myeeprom.h b/radio/src/myeeprom.h index fac71d57f..d0b1147d1 100644 --- a/radio/src/myeeprom.h +++ b/radio/src/myeeprom.h @@ -56,11 +56,11 @@ #elif defined(PCBSKY9X) #define EEPROM_VER 216 #elif defined(CPUM2560) || defined(CPUM2561) - #define EEPROM_VER 215 + #define EEPROM_VER 216 #elif defined(CPUM128) #define EEPROM_VER 216 #else - #define EEPROM_VER 214 + #define EEPROM_VER 216 #endif #ifndef PACK @@ -245,7 +245,8 @@ enum BeeperMode { #if defined(PCBTARANIS) #define EXTRA_GENERAL_FIELDS \ EXTRA_GENERAL_FIELDS_ARM \ - uint8_t potsType; + uint8_t potsType; \ + uint8_t hw_uartMode; #elif defined(CPUARM) #define EXTRA_GENERAL_FIELDS EXTRA_GENERAL_FIELDS_ARM #elif defined(PXX) @@ -282,12 +283,12 @@ PACK(typedef struct t_ScriptData { TRAINER_MODULE }; #define MODELDATA_BITMAP char bitmap[LEN_BITMAP_NAME]; - #define MODELDATA_EXTRA uint8_t externalModule; uint8_t trainerMode; ModuleData moduleData[NUM_MODULES+1]; char curveNames[MAX_CURVES][6]; ScriptData scriptsData[MAX_SCRIPTS]; char inputNames[MAX_INPUTS][4]; uint8_t nPotsToWarn; int8_t potPosition[NUM_POTS]; + #define MODELDATA_EXTRA uint8_t externalModule; uint8_t trainerMode; ModuleData moduleData[NUM_MODULES+1]; char curveNames[MAX_CURVES][6]; ScriptData scriptsData[MAX_SCRIPTS]; char inputNames[MAX_INPUTS][4]; #define LIMITDATA_EXTRA char name[LEN_CHANNEL_NAME]; int8_t curve; #define swstate_t uint16_t #elif defined(PCBSKY9X) #define MODELDATA_BITMAP - #define MODELDATA_EXTRA ModuleData moduleData[NUM_MODULES]; uint8_t nPotsToWarn; int8_t potPosition[NUM_POTS]; + #define MODELDATA_EXTRA ModuleData moduleData[NUM_MODULES]; #define LIMITDATA_EXTRA #define swstate_t uint8_t #else @@ -417,7 +418,7 @@ PACK(typedef struct t_ExpoData { char name[LEN_EXPOMIX_NAME]; int8_t offset; CurveRef curve; - uint8_t spare[2]; + uint8_t spare; }) ExpoData; #define MIN_EXPO_WEIGHT -100 #define EXPO_VALID(ed) ((ed)->srcRaw) @@ -528,7 +529,7 @@ PACK(typedef struct t_MixData { uint8_t srcRaw; int16_t offset; char name[LEN_EXPOMIX_NAME]; - uint8_t spare[2]; + uint8_t spare; }) MixData; #else PACK(typedef struct t_MixData { @@ -996,7 +997,7 @@ PACK(typedef struct t_FrSkyData { uint8_t usrProto; // Protocol in FrSky user data, 0=None, 1=FrSky hub, 2=WS HowHigh, 3=Halcyon uint8_t voltsSource:7; uint8_t altitudeDisplayed:1; - uint8_t blades; // How many blades for RPMs, 0=2 blades, 1=3 blades + int8_t blades; // How many blades for RPMs, 0=2 blades uint8_t currentSource; uint8_t screensType; FrSkyScreenData screens[MAX_FRSKY_SCREENS]; @@ -1008,15 +1009,16 @@ PACK(typedef struct t_FrSkyData { FrSkyRSSIAlarm rssiAlarms[2]; uint16_t mAhPersistent:1; uint16_t storedMah:15; - int8_t fasOffset:5; - uint8_t spare:3; + int8_t fasOffset; }) FrSkyData; +#define MIN_BLADES -1 // 1 blade +#define MAX_BLADES 3 // 5 blades #else #define MAX_FRSKY_SCREENS 2 PACK(typedef struct t_FrSkyData { FrSkyChannelData channels[2]; uint8_t usrProto:2; // Protocol in FrSky user data, 0=None, 1=FrSky hub, 2=WS HowHigh, 3=Halcyon - uint8_t blades:2; // How many blades for RPMs, 0=2 blades, 1=3 blades + uint8_t blades:2; // How many blades for RPMs, 0=2 blades uint8_t screensType:2; uint8_t voltsSource:2; int8_t varioMin:4; @@ -1027,9 +1029,10 @@ PACK(typedef struct t_FrSkyData { int8_t varioCenterMin:5; uint8_t currentSource:3; int8_t varioCenterMax:5; - int8_t fasOffset:5; - uint8_t spare:3; + int8_t fasOffset; }) FrSkyData; +#define MIN_BLADES 0 // 2 blades +#define MAX_BLADES 3 // 5 blades #endif #if defined(MAVLINK) @@ -1441,24 +1444,28 @@ PACK(typedef struct t_ModelHeader { }) ModelHeader; #if defined (CPUARM) - #define ARM_OR_AVR(x, y) x + #define ARM_FIELD(x) x; + #define AVR_FIELD(x) #else - #define ARM_OR_AVR(x, y) y + #define ARM_FIELD(x) + #define AVR_FIELD(x) x; #endif PACK(typedef struct t_ModelData { ModelHeader header; TimerData timers[MAX_TIMERS]; - uint8_t protocol:3; + uint8_t protocol:3; // not used on Taranis uint8_t thrTrim:1; // Enable Throttle Trim - int8_t ppmNCH:4; /* spare on ARM */ - uint8_t trimInc:3; // Trim Increments + AVR_FIELD(int8_t ppmNCH:4) + ARM_FIELD(int8_t spare2:4) + int8_t trimInc:3; // Trim Increments uint8_t disableThrottleWarning:1; - uint8_t ARM_OR_AVR(displayText, pulsePol):1; + ARM_FIELD(uint8_t displayText:1) + AVR_FIELD(uint8_t pulsePol:1) uint8_t extendedLimits:1; uint8_t extendedTrims:1; uint8_t throttleReversed:1; - int8_t ppmDelay; /* spare on ARM */ + AVR_FIELD(int8_t ppmDelay) BeepANACenter beepANACenter; // 1<<0->A1.. 1<<6->A7 MixData mixData[MAX_MIXERS]; LimitData limitData[NUM_CHNOUT]; @@ -1472,11 +1479,10 @@ PACK(typedef struct t_ModelData { SwashRingData swashR; PhaseData phaseData[MAX_PHASES]; - int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5ms increments + AVR_FIELD(int8_t ppmFrameLength) // 0=22.5ms (10ms-30ms) 0.5ms increments uint8_t thrTraceSrc; swstate_t switchWarningStates; - uint8_t nSwToWarn; MODEL_GVARS_DATA diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 6923ecdce..b1d0ef3b0 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -73,7 +73,7 @@ OS_TID btTaskId; OS_STK btStack[BT_STACK_SIZE]; #endif -#if defined(CPUARM) && defined(DEBUG) +#if defined(DEBUG) OS_TID debugTaskId; OS_STK debugStack[DEBUG_STACK_SIZE]; #endif @@ -509,6 +509,12 @@ uint16_t evalChkSum() return sum; } +#if defined(TEMPLATES) +inline void applyDefaultTemplate() +{ + applyTemplate(TMPL_SIMPLE_4CH); +} +#else void applyDefaultTemplate() { for (int i=0; iv1 >= MIXSRC_FIRST_TELEM) { if ((!TELEMETRY_STREAMING() && cs->v1 >= MIXSRC_FIRST_TELEM+TELEM_FIRST_STREAMED_VALUE-1) || IS_FAI_FORBIDDEN(cs->v1-1)) return swtch > 0 ? false : true; - -#if defined (PCBTARANIS) - if (cs->v1 == MIXSRC_FIRST_TELEM+TELEM_A2-1 && g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_X16) - return swtch > 0 ? false : true; -#endif y = convertCswTelemValue(cs); @@ -1877,7 +1879,7 @@ csw_telemetry_value_t maxTelemValue(uint8_t channel) #endif #if defined(CPUARM) -getvalue_t convertTelemValue(uint8_t channel, csw_telemetry_value_t value) +getvalue_t convert16bitsTelemValue(uint8_t channel, csw_telemetry_value_t value) { getvalue_t result; switch (channel) { @@ -1890,8 +1892,14 @@ getvalue_t convertTelemValue(uint8_t channel, csw_telemetry_value_t value) } return result; } -#else -getvalue_t convertTelemValue(uint8_t channel, csw_telemetry_value_t value) + +csw_telemetry_value_t max8bitsTelemValue(uint8_t channel) +{ + return min(255, maxTelemValue(channel)); +} +#endif + +getvalue_t convert8bitsTelemValue(uint8_t channel, csw_telemetry_value_t value) { getvalue_t result; switch (channel) { @@ -1901,6 +1909,10 @@ getvalue_t convertTelemValue(uint8_t channel, csw_telemetry_value_t value) break; #if defined(FRSKY) case TELEM_ALT: +#if defined(CPUARM) + result = 100 * (value * 8 - 500); + break; +#endif case TELEM_GPSALT: case TELEM_MAX_ALT: case TELEM_MIN_ALT: @@ -1938,18 +1950,17 @@ getvalue_t convertTelemValue(uint8_t channel, csw_telemetry_value_t value) } return result; } -#endif getvalue_t convertCswTelemValue(CustomSwData * cs) { getvalue_t val; #if defined(CPUARM) - val = convertTelemValue(cs->v1 - MIXSRC_FIRST_TELEM + 1, cs->v2); + val = convert16bitsTelemValue(cs->v1 - MIXSRC_FIRST_TELEM + 1, cs->v2); #else if (cswFamily(cs->func)==CS_VOFS) - val = convertTelemValue(cs->v1 - MIXSRC_FIRST_TELEM + 1, 128+cs->v2); + val = convert8bitsTelemValue(cs->v1 - MIXSRC_FIRST_TELEM + 1, 128+cs->v2); else - val = convertTelemValue(cs->v1 - MIXSRC_FIRST_TELEM + 1, 128+cs->v2) - convertTelemValue(cs->v1 - MIXSRC_FIRST_TELEM + 1, 128); + val = convert8bitsTelemValue(cs->v1 - MIXSRC_FIRST_TELEM + 1, 128+cs->v2) - convert8bitsTelemValue(cs->v1 - MIXSRC_FIRST_TELEM + 1, 128); #endif return val; } @@ -2324,12 +2335,10 @@ void checkTrims() uint8_t event = getEvent(true); if (event && !IS_KEY_BREAK(event)) { int8_t k = EVT_KEY_MASK(event) - TRM_BASE; - int8_t s = g_model.trimInc; #else uint8_t checkTrim(uint8_t event) { int8_t k = EVT_KEY_MASK(event) - TRM_BASE; - int8_t s = g_model.trimInc; if (k>=0 && k<8 && !IS_KEY_BREAK(event)) { #endif // LH_DWN LH_UP LV_DWN LV_UP RV_DWN RV_UP RH_DWN RH_UP @@ -2360,7 +2369,8 @@ uint8_t checkTrim(uint8_t event) before = getRawTrimValue(phase, idx); thro = (idx==THR_STICK && g_model.thrTrim); #endif - int8_t v = (s==0) ? min(32, abs(before)/4+1) : 1 << (s-1); // 1=>1 2=>2 3=>4 4=>8 + int8_t trimInc = g_model.trimInc + 1; + int8_t v = (trimInc==-1) ? min(32, abs(before)/4+1) : (1 << trimInc); if (thro) v = 4; // if throttle trim and trim trottle then step=4 int16_t after = (k&1) ? before + v : before - v; // positive = k&1 #if defined(CPUARM) @@ -3183,7 +3193,7 @@ void evalFunctions() } } } - else if (CFN_FUNC(sd) <= FUNC_INSTANT_TRIM) { + else if (CFN_FUNC(sd) <= FUNC_INSTANT_TRIM || CFN_FUNC(sd) == FUNC_RESET) { active = false; } @@ -3457,6 +3467,8 @@ void perOut(uint8_t mode, uint8_t tick10ms) if (md->srcRaw == 0) break; + uint8_t stickIndex = md->srcRaw - MIXSRC_Rud; + if (!(dirtyChannels & ((bitfield_channels_t)1 << md->destCh))) continue; // if this is the first calculation for the destination channel, initialize it with 0 (otherwise would be random) @@ -3469,7 +3481,6 @@ void perOut(uint8_t mode, uint8_t tick10ms) delayval_t mixEnabled = !(md->phases & (1 << s_perout_flight_phase)) && getSwitch(md->swtch); //========== VALUE =============== - uint8_t stickIndex = md->srcRaw - MIXSRC_Rud; getvalue_t v = 0; if (mode > e_perout_mode_inactive_phase) { if (!mixEnabled || stickIndex >= NUM_STICKS || (stickIndex == THR_STICK && g_model.thrTrim)) { @@ -3487,12 +3498,14 @@ void perOut(uint8_t mode, uint8_t tick10ms) else #endif { - v = getValue(md->srcRaw); - if (md->srcRaw>=MIXSRC_CH1 && md->srcRaw<=MIXSRC_LAST_CH && md->destCh != md->srcRaw-MIXSRC_CH1) { - if (dirtyChannels & ((bitfield_channels_t)1 << (md->srcRaw-MIXSRC_CH1)) & (passDirtyChannels|~(((bitfield_channels_t) 1 << md->destCh)-1))) + int8_t srcRaw = MIXSRC_Rud + stickIndex; + v = getValue(srcRaw); + srcRaw -= MIXSRC_CH1; + if (srcRaw>=0 && srcRaw<=MIXSRC_LAST_CH-MIXSRC_CH1 && md->destCh != srcRaw) { + if (dirtyChannels & ((bitfield_channels_t)1 << srcRaw) & (passDirtyChannels|~(((bitfield_channels_t) 1 << md->destCh)-1))) passDirtyChannels |= (bitfield_channels_t) 1 << md->destCh; - if (md->srcRaw-MIXSRC_CH1 < md->destCh || pass > 0) - v = chans[md->srcRaw-MIXSRC_CH1] >> 8; + if (srcRaw < md->destCh || pass > 0) + v = chans[srcRaw] >> 8; } } if (!mixCondition) { diff --git a/radio/src/opentx.h b/radio/src/opentx.h index 4c65bfb8e..fa4152aba 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -1651,9 +1651,24 @@ extern uint8_t barsThresholds[THLD_MAX]; #define maxTelemValue(channel) 255 #endif -getvalue_t convertTelemValue(uint8_t channel, csw_telemetry_value_t value); +#if defined(CPUARM) +getvalue_t convert16bitsTelemValue(uint8_t channel, csw_telemetry_value_t value); +csw_telemetry_value_t max8bitsTelemValue(uint8_t channel); +#endif + +getvalue_t convert8bitsTelemValue(uint8_t channel, csw_telemetry_value_t value); getvalue_t convertCswTelemValue(CustomSwData * cs); +#if defined(CPUARM) + #define convertTelemValue(channel, value) convert16bitsTelemValue(channel, value) + #define convertBarTelemValue(channel, value) convert8bitsTelemValue(channel, value) + #define maxBarTelemValue(channel) max8bitsTelemValue(channel) +#else + #define convertTelemValue(channel, value) convert8bitsTelemValue(channel, value) + #define convertBarTelemValue(channel, value) convert8bitsTelemValue(channel, value) + #define maxBarTelemValue(channel) maxTelemValue(channel) +#endif + #if defined(FRSKY) || defined(CPUARM) lcdint_t applyChannelRatio(uint8_t channel, lcdint_t val); #endif diff --git a/radio/src/protocols/pulses_avr.cpp b/radio/src/protocols/pulses_avr.cpp index 1ed8d05fb..707eac8c9 100644 --- a/radio/src/protocols/pulses_avr.cpp +++ b/radio/src/protocols/pulses_avr.cpp @@ -108,7 +108,9 @@ ISR(TIMER1_COMPA_vect) //2MHz pulse generation (BLOCKING ISR) // Call setupPulses only after REST pulse had been sent. // Must do this before toggle PORTB to keep timing accurate if (IS_DSM2_SERIAL_PROTOCOL(s_current_protocol[0]) || *((uint16_t*)pulses2MHzRPtr) == 0) { - OCR1A = SETUP_PULSES_DURATION; + if (!IS_DSM2_SERIAL_PROTOCOL(s_current_protocol[0])) { + OCR1A = SETUP_PULSES_DURATION; + } setupPulses(); // does not sei() for setupPulsesPPM heartbeat |= HEART_TIMER_PULSES; return; diff --git a/radio/src/simpgmspace.cpp b/radio/src/simpgmspace.cpp index 48aecb6c7..10c7abd4a 100644 --- a/radio/src/simpgmspace.cpp +++ b/radio/src/simpgmspace.cpp @@ -345,6 +345,11 @@ void StartMainThread(bool tests) getcwd(simuSdDirectory, 1024); #endif +#if defined(CPUARM) + pthread_mutex_init(&mixerMutex, NULL); + pthread_mutex_init(&audioMutex, NULL); +#endif + main_thread_running = (tests ? 1 : 2); pthread_create(&main_thread_pid, NULL, &main_thread, NULL); } diff --git a/radio/src/simpgmspace.h b/radio/src/simpgmspace.h index 1b2e8b0c2..b177d82a0 100644 --- a/radio/src/simpgmspace.h +++ b/radio/src/simpgmspace.h @@ -326,6 +326,7 @@ extern volatile uint32_t Tenms; extern uint32_t Master_frequency; #define NVIC_EnableIRQ(x) #define NVIC_DisableIRQ(x) +#define NVIC_SetPriority(...) #define __disable_irq() #define __enable_irq() #endif @@ -358,6 +359,8 @@ void eeprom_read_block (void *pointer_ram, const void *pointer_eeprom, size_t si #define boardInit() #define OS_MutexID pthread_mutex_t +extern OS_MutexID audioMutex; + #define OS_FlagID int #define OS_TID int #define OS_TCID int diff --git a/radio/src/stamp.cpp b/radio/src/stamp.cpp index 7200b60b9..72e1208bd 100644 --- a/radio/src/stamp.cpp +++ b/radio/src/stamp.cpp @@ -40,7 +40,7 @@ #define STR2(s) #s #define DEFNUMSTR(s) STR2(s) -const pm_char stamp1[] PROGMEM = " SVN: " SVN_STR; +const pm_char stamp1[] PROGMEM = "VERS: " VERS_STR; const pm_char stamp2[] PROGMEM = "DATE: " DATE_STR; const pm_char stamp3[] PROGMEM = "TIME: " TIME_STR; #if defined(PCBSTD) diff --git a/radio/src/targets/sky9x/adc_driver.cpp b/radio/src/targets/sky9x/adc_driver.cpp index 1d09ef988..e3adf33a3 100644 --- a/radio/src/targets/sky9x/adc_driver.cpp +++ b/radio/src/targets/sky9x/adc_driver.cpp @@ -45,12 +45,12 @@ const char ana_direction[NUMBER_ANALOG] = {1, 1, 0, 1 ,0 ,1 ,0, 0, 0}; // Settings for mode register ADC_MR // USEQ off - silicon problem, doesn't work -// TRANSFER = 1 -// TRACKTIM = 4 (5 clock periods) -// ANACH = 0 -// SETTLING = 1 (not used if ANACH = 0) -// STARTUP = 1 (8 clock periods) -// PRESCAL = 3.6 MHz clock (between 1 and 20MHz) +// TRANSFER = 3 +// TRACKTIM = 15 (16 clock periods) +// ANACH = 1 +// SETTLING = 6 (not used if ANACH = 0) +// STARTUP = 6 (96 clock periods) +// PRESCAL = 9.0 MHz clock (between 1 and 20MHz) // FREERUN = 0 // FWUP = 0 // SLEEP = 0 @@ -66,7 +66,7 @@ void adcInit() // Enable peripheral clock ADC = bit 29 PMC->PMC_PCER0 |= 0x20000000L ; // Enable peripheral clock to ADC padc = ADC ; - padc->ADC_MR = 0x14110000 | timer ; // 0001 0100 0001 0001 xxxx xxxx 0000 0000 + padc->ADC_MR = 0x3FB60000 | timer ; // 0011 1111 1011 0110 xxxx xxxx 0000 0000 padc->ADC_ACR = ADC_ACR_TSON ; // Turn on temp sensor #if defined(REVA) padc->ADC_CHER = 0x0000E23E ; // channels 1,2,3,4,5,9,13,14,15 diff --git a/radio/src/targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c b/radio/src/targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c index e1d39a223..654bb5fcf 100644 --- a/radio/src/targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c +++ b/radio/src/targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c @@ -3,7 +3,7 @@ * @file system_stm32f2xx.c * @author MCD Application Team * @version V1.1.0 - * @date 09-January-2013 + * @date 05-January-2014 * @brief CMSIS Cortex-M3 Device Peripheral Access Layer System Source File. * This file contains the system clock configuration for STM32F2xx devices, * and is generated by the clock configuration tool @@ -46,15 +46,15 @@ *----------------------------------------------------------------------------- * System Clock source | PLL (HSE) *----------------------------------------------------------------------------- - * SYSCLK(Hz) | 60000000 + * SYSCLK(Hz) | 120000000 *----------------------------------------------------------------------------- - * HCLK(Hz) | 60000000 + * HCLK(Hz) | 120000000 *----------------------------------------------------------------------------- * AHB Prescaler | 1 *----------------------------------------------------------------------------- - * APB1 Prescaler | 2 + * APB1 Prescaler | 4 *----------------------------------------------------------------------------- - * APB2 Prescaler | 1 + * APB2 Prescaler | 2 *----------------------------------------------------------------------------- * HSE Frequency(Hz) | 12000000 *----------------------------------------------------------------------------- @@ -62,7 +62,7 @@ *----------------------------------------------------------------------------- * PLL_N | 240 *----------------------------------------------------------------------------- - * PLL_P | 4 + * PLL_P | 2 *----------------------------------------------------------------------------- * PLL_Q | 5 *----------------------------------------------------------------------------- @@ -74,7 +74,7 @@ *----------------------------------------------------------------------------- * VDD(V) | 3.3 *----------------------------------------------------------------------------- - * Flash Latency(WS) | 2 + * Flash Latency(WS) | 3 *----------------------------------------------------------------------------- * Prefetch Buffer | ON *----------------------------------------------------------------------------- @@ -146,7 +146,7 @@ #define PLL_N 240 /* SYSCLK = PLL_VCO / PLL_P */ -#define PLL_P 4 +#define PLL_P 2 /* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */ #define PLL_Q 5 @@ -167,7 +167,7 @@ * @{ */ - uint32_t SystemCoreClock = 60000000; + uint32_t SystemCoreClock = 120000000; __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9}; @@ -359,11 +359,11 @@ static void SetSysClock(void) /* HCLK = SYSCLK / 1*/ RCC->CFGR |= RCC_CFGR_HPRE_DIV1; - /* PCLK2 = HCLK / 1*/ - RCC->CFGR |= RCC_CFGR_PPRE2_DIV1; + /* PCLK2 = HCLK / 2*/ + RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; - /* PCLK1 = HCLK / 2*/ - RCC->CFGR |= RCC_CFGR_PPRE1_DIV2; + /* PCLK1 = HCLK / 4*/ + RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; /* Configure the main PLL */ RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | @@ -378,7 +378,7 @@ static void SetSysClock(void) } /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ - FLASH->ACR = FLASH_ACR_PRFTEN |FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_2WS; + FLASH->ACR = FLASH_ACR_PRFTEN |FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_3WS; /* Select the main PLL as system clock source */ RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); diff --git a/radio/src/targets/taranis/audio_driver.cpp b/radio/src/targets/taranis/audio_driver.cpp index f5cfd5eb5..d0b0508aa 100644 --- a/radio/src/targets/taranis/audio_driver.cpp +++ b/radio/src/targets/taranis/audio_driver.cpp @@ -88,7 +88,9 @@ void dacInit() DAC->CR = DAC_CR_TEN1 | DAC_CR_EN1 ; // Enable DAC NVIC_SetPriority(DMA1_Stream5_IRQn, 2) ; // High priority interrupt NVIC_EnableIRQ(TIM6_DAC_IRQn) ; // TODO needed? + NVIC_SetPriority(TIM6_DAC_IRQn, 7); NVIC_EnableIRQ(DMA1_Stream5_IRQn) ; + NVIC_SetPriority(DMA1_Stream5_IRQn, 7); } bool dacQueue(AudioBuffer *buffer) diff --git a/radio/src/targets/taranis/board_taranis.cpp b/radio/src/targets/taranis/board_taranis.cpp index 0777d8502..36987fab9 100644 --- a/radio/src/targets/taranis/board_taranis.cpp +++ b/radio/src/targets/taranis/board_taranis.cpp @@ -155,6 +155,7 @@ void init5msTimer() TIM14->CR1 = 5 ; TIM14->DIER |= 1 ; NVIC_EnableIRQ(TIM8_TRG_COM_TIM14_IRQn) ; + NVIC_SetPriority(TIM8_TRG_COM_TIM14_IRQn, 7); } void stop5msTimer( void ) diff --git a/radio/src/targets/taranis/board_taranis.h b/radio/src/targets/taranis/board_taranis.h index 9c492c32d..1de2f354d 100644 --- a/radio/src/targets/taranis/board_taranis.h +++ b/radio/src/targets/taranis/board_taranis.h @@ -60,7 +60,7 @@ extern "C" { #define PERI1_FREQUENCY 30000000 #define PERI2_FREQUENCY 60000000 #define TIMER_MULT_APB1 2 -#define TIMER_MULT_APB2 1 +#define TIMER_MULT_APB2 2 #define JACK_PPM_OUT() #define JACK_PPM_IN() diff --git a/radio/src/targets/taranis/pulses_driver.cpp b/radio/src/targets/taranis/pulses_driver.cpp index 50f5c2fcb..03dba6085 100644 --- a/radio/src/targets/taranis/pulses_driver.cpp +++ b/radio/src/targets/taranis/pulses_driver.cpp @@ -160,6 +160,7 @@ static void init_pa10_none() TIM1->DIER |= TIM_DIER_CC2IE ; // Enable this interrupt TIM1->CR1 |= TIM_CR1_CEN ; NVIC_EnableIRQ(TIM1_CC_IRQn) ; + NVIC_SetPriority(TIM1_CC_IRQn, 7); } static void disable_pa10_none() @@ -202,6 +203,7 @@ static void init_pa7_none() TIM8->DIER |= TIM_DIER_CC2IE ; // Enable this interrupt TIM8->CR1 |= TIM_CR1_CEN ; NVIC_EnableIRQ(TIM8_CC_IRQn) ; + NVIC_SetPriority(TIM8_CC_IRQn, 7); } static void disable_pa7_none() @@ -267,7 +269,8 @@ static void init_pa10_pxx() TIM1->SR &= ~TIM_SR_CC2IF ; // Clear flag TIM1->DIER |= TIM_DIER_CC2IE ; // Enable this interrupt TIM1->CR1 |= TIM_CR1_CEN ; - NVIC_EnableIRQ(TIM1_CC_IRQn) ; + NVIC_EnableIRQ(TIM1_CC_IRQn); + NVIC_SetPriority(TIM1_CC_IRQn, 7); } static void disable_pa10_pxx() @@ -316,7 +319,9 @@ static void init_pa10_ppm() TIM1->CR1 = TIM_CR1_CEN ; NVIC_EnableIRQ(TIM1_CC_IRQn) ; + NVIC_SetPriority(TIM1_CC_IRQn, 7); NVIC_EnableIRQ(TIM1_UP_TIM10_IRQn) ; + NVIC_SetPriority(TIM1_UP_TIM10_IRQn, 7); } static void disable_pa10_ppm() @@ -428,6 +433,7 @@ static void init_pa7_pxx() TIM8->DIER |= TIM_DIER_CC2IE ; // Enable this interrupt TIM8->CR1 |= TIM_CR1_CEN ; NVIC_EnableIRQ(TIM8_CC_IRQn) ; + NVIC_SetPriority(TIM8_CC_IRQn, 7); } static void disable_pa7_pxx() @@ -501,6 +507,7 @@ static void init_pa7_dsm2() TIM8->DIER |= TIM_DIER_CC2IE ; // Enable this interrupt TIM8->CR1 |= TIM_CR1_CEN ; NVIC_EnableIRQ(TIM8_CC_IRQn) ; + NVIC_SetPriority(TIM8_CC_IRQn, 7); } static void disable_pa7_dsm2() @@ -555,7 +562,9 @@ static void init_pa7_ppm() TIM8->CR1 = TIM_CR1_CEN ; NVIC_EnableIRQ(TIM8_CC_IRQn) ; + NVIC_SetPriority(TIM8_CC_IRQn, 7); NVIC_EnableIRQ(TIM8_UP_TIM13_IRQn) ; + NVIC_SetPriority(TIM8_UP_TIM13_IRQn, 7); } static void disable_pa7_ppm() diff --git a/radio/src/targets/taranis/sport_driver.cpp b/radio/src/targets/taranis/sport_driver.cpp index ed16f5641..414a01ed8 100644 --- a/radio/src/targets/taranis/sport_driver.cpp +++ b/radio/src/targets/taranis/sport_driver.cpp @@ -78,6 +78,7 @@ void sportInit(void) USART_ITConfig(SPORT, USART_IT_RXNE, ENABLE); NVIC_EnableIRQ(USART2_IRQn); + NVIC_SetPriority(USART2_IRQn, 6); } void sportPutc(const char c) diff --git a/radio/src/targets/taranis/trainer_driver.cpp b/radio/src/targets/taranis/trainer_driver.cpp index 1b8787540..9319cc18b 100644 --- a/radio/src/targets/taranis/trainer_driver.cpp +++ b/radio/src/targets/taranis/trainer_driver.cpp @@ -71,6 +71,7 @@ void init_trainer_ppm() TIM3->CR1 = TIM_CR1_CEN ; NVIC_EnableIRQ(TIM3_IRQn) ; + NVIC_SetPriority(TIM3_IRQn, 7); } // TODO - testing @@ -99,6 +100,7 @@ void init_trainer_capture() TIM3->DIER |= TIM_DIER_CC3IE ; TIM3->CR1 = TIM_CR1_CEN ; NVIC_EnableIRQ(TIM3_IRQn) ; + NVIC_SetPriority(TIM3_IRQn, 7); } void stop_trainer_capture() diff --git a/radio/src/targets/taranis/uart_driver.cpp b/radio/src/targets/taranis/uart_driver.cpp index b68042bb7..f084ae8fb 100644 --- a/radio/src/targets/taranis/uart_driver.cpp +++ b/radio/src/targets/taranis/uart_driver.cpp @@ -69,6 +69,7 @@ void uartInit(uint32_t baudrate) USART_ITConfig(UART3, USART_IT_TXE, DISABLE); NVIC_EnableIRQ(USART3_IRQn); + NVIC_SetPriority(USART3_IRQn, 8); } #if defined(DEBUG) diff --git a/radio/src/telemetry/frsky.cpp b/radio/src/telemetry/frsky.cpp index f2e7f7905..8e2a4bda2 100644 --- a/radio/src/telemetry/frsky.cpp +++ b/radio/src/telemetry/frsky.cpp @@ -191,6 +191,12 @@ void parseTelemHubByte(uint8_t byte) break; case offsetof(FrskySerialData, current): +#if defined(FAS_OFFSET) || !defined(CPUM64) + if(((int16_t)frskyData.hub.current + g_model.frsky.fasOffset)>0) + frskyData.hub.current += g_model.frsky.fasOffset; + else + frskyData.hub.current = 0; +#endif if (frskyData.hub.current > frskyData.hub.maxCurrent) frskyData.hub.maxCurrent = frskyData.hub.current; break; diff --git a/radio/src/telemetry/frsky_sport.cpp b/radio/src/telemetry/frsky_sport.cpp index a9552e150..dcb6d3693 100644 --- a/radio/src/telemetry/frsky_sport.cpp +++ b/radio/src/telemetry/frsky_sport.cpp @@ -200,6 +200,10 @@ void processHubPacket(uint8_t id, uint16_t value) break; case CURRENT_ID: + if(((int16_t)frskyData.hub.current + g_model.frsky.fasOffset)>0) + frskyData.hub.current += g_model.frsky.fasOffset; + else + frskyData.hub.current = 0; if (frskyData.hub.current > frskyData.hub.maxCurrent) frskyData.hub.maxCurrent = frskyData.hub.current; break; @@ -382,6 +386,10 @@ void processSportPacket(uint8_t *packet) } else if (appId >= CURR_FIRST_ID && appId <= CURR_LAST_ID) { frskyData.hub.current = SPORT_DATA_U32(packet); + if(((int16_t)frskyData.hub.current + g_model.frsky.fasOffset)>0) + frskyData.hub.current += g_model.frsky.fasOffset; + else + frskyData.hub.current = 0; if (frskyData.hub.current > frskyData.hub.maxCurrent) frskyData.hub.maxCurrent = frskyData.hub.current; } @@ -653,7 +661,7 @@ void telemetryWakeup() alarmsCheckTime = get_tmr10ms() + 100; /* next check in 1second */ if (alarmsCheckStep == 0) { - if (frskyData.rssi[1].value > 0x33) { + if ((IS_MODULE_XJT(0) || IS_MODULE_XJT(1)) && frskyData.rssi[1].value > 0x33) { AUDIO_SWR_RED(); s_global_warning = STR_ANTENNAPROBLEM; alarmsCheckTime = get_tmr10ms() + 300; /* next check in 3seconds */ @@ -671,11 +679,11 @@ void telemetryWakeup() } } else if (alarmsCheckStep == 2) { - if (alarmRaised(1, 1) && g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_D8) { + if (alarmRaised(1, 1)) { AUDIO_A2_RED(); alarmsCheckTime = get_tmr10ms() + 300; /* next check in 3seconds */ } - else if (alarmRaised(1, 0) && g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_D8) { + else if (alarmRaised(1, 0)) { AUDIO_A2_ORANGE(); alarmsCheckTime = get_tmr10ms() + 300; /* next check in 3seconds */ } @@ -734,6 +742,7 @@ void FrskyValueWithMinMax::set(uint8_t value) void resetTelemetry() { memclear(&frskyData, sizeof(frskyData)); + telemetryState = TELEMETRY_INIT; #if defined(FRSKY_HUB) frskyData.hub.gpsLatitude_bp = 2; diff --git a/radio/src/telemetry/mavlink.cpp b/radio/src/telemetry/mavlink.cpp index eb7166dbc..094c94ec3 100644 --- a/radio/src/telemetry/mavlink.cpp +++ b/radio/src/telemetry/mavlink.cpp @@ -113,7 +113,7 @@ void MAVLINK_reset(uint8_t warm_reset) { memset(&telemetry_data, 0, sizeof(telemetry_data)); telemetry_data.rcv_control_mode = ERROR_NUM_MODES; telemetry_data.req_mode = ERROR_NUM_MODES; - + telemetry_data.type = MAV_TYPE_ENUM_END; telemetry_data.autopilot = MAV_AUTOPILOT_ENUM_END; telemetry_data.type_autopilot = MAVLINK_INVALID_TYPE; @@ -139,7 +139,7 @@ void MAVLINK_Init(void) { * characters are used. To get the full message you can use the commented * funtion below. */ - + static inline void REC_MAVLINK_MSG_ID_STATUSTEXT(const mavlink_message_t* msg) { _MAV_RETURN_char_array(msg, mav_statustext, LEN_STATUSTEXT, 1); } @@ -152,7 +152,7 @@ static inline void REC_MAVLINK_MSG_ID_STATUSTEXT(const mavlink_message_t* msg) { * \todo Add battery remaining variable in telemetry_data struct for estimated * remaining battery. Decoding funtion allready in place. */ - + static inline void REC_MAVLINK_MSG_ID_SYS_STATUS(const mavlink_message_t* msg) { telemetry_data.vbat = mavlink_msg_sys_status_get_voltage_battery(msg) / 100; // Voltage * 10 telemetry_data.ibat = mavlink_msg_sys_status_get_current_battery(msg) / 10; @@ -204,48 +204,48 @@ static inline void REC_MAVLINK_MSG_ID_VFR_HUD(const mavlink_message_t* msg) { /*! \brief Heartbeat message * \details Heartbeat message is used for the following information: - * type and autopilot is used to determain if the UAV is a ArduPlane or Arducopter + * type and autopilot is used to determine if the UAV is an ArduPlane or Arducopter */ -static inline void REC_MAVLINK_MSG_ID_HEARTBEAT(const mavlink_message_t* msg) { +static inline void REC_MAVLINK_MSG_ID_HEARTBEAT(const mavlink_message_t* msg) { telemetry_data.mode = mavlink_msg_heartbeat_get_base_mode(msg); - telemetry_data.custom_mode = mavlink_msg_heartbeat_get_custom_mode(msg); + telemetry_data.custom_mode = mavlink_msg_heartbeat_get_custom_mode(msg); telemetry_data.status = mavlink_msg_heartbeat_get_system_status(msg); telemetry_data.mav_sysid = msg->sysid; telemetry_data.mav_compid = msg->compid; uint8_t type = mavlink_msg_heartbeat_get_type(msg); uint8_t autopilot = mavlink_msg_heartbeat_get_autopilot(msg); - if ((type != telemetry_data.type) || (autopilot != telemetry_data.autopilot)) - { + if (type != telemetry_data.type || autopilot != telemetry_data.autopilot) { telemetry_data.type = mavlink_msg_heartbeat_get_type(msg); telemetry_data.autopilot = mavlink_msg_heartbeat_get_autopilot(msg); - if (autopilot == MAV_AUTOPILOT_ARDUPILOTMEGA) - { - if ((type == MAV_TYPE_QUADROTOR) || - (type == MAV_TYPE_COAXIAL) || - (type == MAV_TYPE_HELICOPTER) || - (type == MAV_TYPE_HEXAROTOR) || - (type == MAV_TYPE_OCTOROTOR) || - (type == MAV_TYPE_TRICOPTER)) - { - telemetry_data.type_autopilot = MAVLINK_ARDUCOPTER; - } - else if (type == MAV_TYPE_FIXED_WING) - { - telemetry_data.type_autopilot = MAVLINK_ARDUPLANE; - } - else + if (autopilot == MAV_AUTOPILOT_ARDUPILOTMEGA) { + if (type == MAV_TYPE_QUADROTOR || + type == MAV_TYPE_COAXIAL || + type == MAV_TYPE_HELICOPTER || + type == MAV_TYPE_HEXAROTOR || + type == MAV_TYPE_OCTOROTOR || + type == MAV_TYPE_TRICOPTER) { + telemetry_data.type_autopilot = MAVLINK_ARDUCOPTER; + } + else if (type == MAV_TYPE_FIXED_WING) { + telemetry_data.type_autopilot = MAVLINK_ARDUPLANE; + } + else { telemetry_data.type_autopilot = MAVLINK_INVALID_TYPE; + } } - else + else { telemetry_data.type_autopilot = MAVLINK_INVALID_TYPE; + } } - telemetry_data.active = (telemetry_data.mode & MAV_MODE_FLAG_SAFETY_ARMED) ? true : false; + telemetry_data.active = (telemetry_data.mode & MAV_MODE_FLAG_SAFETY_ARMED) ? true : false; mav_heartbeat = 3; // 450ms display '*' mav_heartbeat_recv = 1; } + static inline void REC_MAVLINK_MSG_ID_HIL_CONTROLS(const mavlink_message_t* msg) { telemetry_data.nav_mode = mavlink_msg_hil_controls_get_mode(msg); } + /*! \brief Process GPS raw intger message * \details This message contains the following data: * - fix type: 0-1: no fix, 2: 2D fix, 3: 3D fix. @@ -257,7 +257,7 @@ static inline void REC_MAVLINK_MSG_ID_HIL_CONTROLS(const mavlink_message_t* msg) */ static inline void REC_MAVLINK_MSG_ID_GPS_RAW_INT(const mavlink_message_t* msg) { telemetry_data.fix_type = mavlink_msg_gps_raw_int_get_fix_type(msg); - telemetry_data.loc_current.lat = mavlink_msg_gps_raw_int_get_lat(msg) / 1E7; + telemetry_data.loc_current.lat = mavlink_msg_gps_raw_int_get_lat(msg) / 1E7; telemetry_data.loc_current.lon = mavlink_msg_gps_raw_int_get_lon(msg) / 1E7; telemetry_data.loc_current.gps_alt = mavlink_msg_gps_raw_int_get_alt(msg) / 1E3; telemetry_data.eph = mavlink_msg_gps_raw_int_get_eph(msg) / 100.0; @@ -266,26 +266,25 @@ static inline void REC_MAVLINK_MSG_ID_GPS_RAW_INT(const mavlink_message_t* msg) telemetry_data.satellites_visible = mavlink_msg_gps_raw_int_get_satellites_visible(msg); } - #ifdef MAVLINK_PARAMS -const pm_char * getParamId(uint8_t idx) { - const pm_char *mav_params_id [((NB_PID_PARAMS / 2) + 4)] = { // - // - PSTR("RATE_YAW"), // Rate Yaw - PSTR("STB_YAW"), // Stabilize Yaw - PSTR("RATE_PIT"), // Rate Pitch - PSTR("STB_PIT"), // Stabilize Pitch - PSTR("RATE_RLL"), // Rate Roll - PSTR("STB_RLL"), // Stabilize Roll - PSTR("THR_ALT"), // PSTR("THR_BAR"), // Altitude Hold - PSTR("HLD_LON"), // Loiter - PSTR("HLD_LAT"), // Loiter - PSTR("NAV_LON"), // Nav WP - PSTR("NAV_LAT"), // Nav WP - PSTR("LOW_VOLT"), // Battery low voltage - PSTR("VOLT_DIVIDER"), // - PSTR("BATT_MONITOR"), // - PSTR("BATT_CAPACITY") }; +const pm_char *getParamId(uint8_t idx) { + const pm_char *mav_params_id [((NB_PID_PARAMS / 2) + 4)] = { + PSTR("RATE_YAW"), // Rate Yaw + PSTR("STB_YAW"), // Stabilize Yaw + PSTR("RATE_PIT"), // Rate Pitch + PSTR("STB_PIT"), // Stabilize Pitch + PSTR("RATE_RLL"), // Rate Roll + PSTR("STB_RLL"), // Stabilize Roll + PSTR("THR_ALT"), // PSTR("THR_BAR"), // Altitude Hold + PSTR("HLD_LON"), // Loiter + PSTR("HLD_LAT"), // Loiter + PSTR("NAV_LON"), // Nav WP + PSTR("NAV_LAT"), // Nav WP + PSTR("LOW_VOLT"), // Battery low voltage + PSTR("VOLT_DIVIDER"), // + PSTR("BATT_MONITOR"), // + PSTR("BATT_CAPACITY") + }; uint8_t i; if (idx < NB_PID_PARAMS) { i = idx / 2; @@ -433,7 +432,7 @@ static inline void handleMessage(mavlink_message_t* p_rxmsg) { break; case MAVLINK_MSG_ID_VFR_HUD: REC_MAVLINK_MSG_ID_VFR_HUD(p_rxmsg); - break; + break; case MAVLINK_MSG_ID_HIL_CONTROLS: REC_MAVLINK_MSG_ID_HIL_CONTROLS(p_rxmsg); break; @@ -453,8 +452,8 @@ static inline void handleMessage(mavlink_message_t* p_rxmsg) { /*! \brief Mavlink message parser * \details Parses the characters in to a mavlink message. - * Case statement parses each character as it is recieved. - * \attention One big change form the 0.9 to 1.0 version is the + * Case statement parses each character as it is recieved. + * \attention One big change form the 0.9 to 1.0 version is the * MAVLINK_CRC_EXTRA. This requires the mavlink_message_crcs array of 256 bytes. * \todo create dot for the statemachine */ @@ -464,9 +463,9 @@ static void MAVLINK_parse_char(uint8_t c) { //! The currently decoded message static mavlink_message_t* p_rxmsg = &m_mavlink_message; //! The current decode status - mavlink_status_t* p_status = mavlink_get_channel_status(MAVLINK_COMM_0); - - + mavlink_status_t* p_status = mavlink_get_channel_status(MAVLINK_COMM_0); + + #if MAVLINK_CRC_EXTRA static const uint8_t mavlink_message_crcs[256] PROGMEM = MAVLINK_MESSAGE_CRCS; #define MAVLINK_MESSAGE_CRC(msgid) mavlink_message_crcs[msgid] @@ -715,7 +714,7 @@ static inline void MAVLINK_msg_set_mode_send(uint8_t mode) { #endif /*! \brief Telemetry monitoring, calls \link MAVLINK10mspoll. * \todo Reimplemnt \link MAVLINK10mspoll - * + * */ void telemetryWakeup() { uint16_t tmr10ms = get_tmr10ms(); diff --git a/radio/src/templates.cpp b/radio/src/templates.cpp index e5b10dad1..aad22a8c1 100644 --- a/radio/src/templates.cpp +++ b/radio/src/templates.cpp @@ -64,8 +64,9 @@ MixData* setDest(uint8_t dch, uint8_t src, bool clear=false) while (1) { mix = mixAddress(i); if (mix->srcRaw && mix->destCh <= dch) { - if (clear && mix->destCh == dch) + if (clear && mix->destCh == dch) { deleteExpoMix(0, i); + } else { if (++i==MAX_MIXERS) { // TODO should return null pointer but needs to be tested then @@ -106,10 +107,14 @@ void defaultInputs() clearInputs(); for (int i=0; isrcRaw = MIXSRC_Rud - 1 + stick_index; + expo->curve.type = CURVE_REF_EXPO; + expo->chn = i; + expo->weight = 100; for (int c=0; c<4; c++) { - g_model.inputNames[i][c] = char2idx(STR_VSRCRAW[1+STR_VSRCRAW[0]*(expoAddress(i)->srcRaw-MIXSRC_Rud+1)+c]); + g_model.inputNames[i][c] = char2idx(STR_VSRCRAW[1+STR_VSRCRAW[0]*stick_index+c]); } } eeDirty(EE_MODEL); @@ -163,7 +168,7 @@ void applyTemplate(uint8_t idx) uint8_t icc[4] = {0}; for (uint8_t i=0; i<4; i++) { //generate inverse array for(uint8_t j=0; j<4; j++) - if(CC(i+1)==j+1) icc[j]=i; + if(CC(i+1)==j+MIXSRC_Rud) icc[j]=i; } switch (idx) { @@ -177,8 +182,14 @@ void applyTemplate(uint8_t idx) switch (idx) { // Simple 4-Ch case TMPL_SIMPLE_4CH: - clearInputs(); - applyDefaultTemplate(); + defaultInputs(); +#if defined(PCBTARANIS) + #pragma message("Templates with virtual inputs (FrSky Taranis) are not implemented!") +#endif + setDest(ICC(STK_RUD), MIXSRC_Rud); + setDest(ICC(STK_ELE), MIXSRC_Ele); + setDest(ICC(STK_THR), MIXSRC_Thr); + setDest(ICC(STK_AIL), MIXSRC_Ail); break; // Sticky-T-Cut @@ -203,9 +214,6 @@ void applyTemplate(uint8_t idx) // Elevon\\Delta case TMPL_ELEVON_DELTA: defaultInputs(); -#if defined(PCBTARANIS) - #pragma message("Templates below are not implemented (only V-TAIL has been done). Feel free to help!") -#endif setDest(ICC(STK_ELE), MIXSRC_Ele, true); setDest(ICC(STK_ELE), MIXSRC_Ail); setDest(ICC(STK_AIL), MIXSRC_Ele, true); diff --git a/radio/src/translations.cpp b/radio/src/translations.cpp index 98d62ab7b..f031ba40b 100644 --- a/radio/src/translations.cpp +++ b/radio/src/translations.cpp @@ -55,6 +55,9 @@ const pm_char STR_OPEN9X[] PROGMEM = #endif ISTR(TRNMODE) ISTR(TRNCHN) +#if defined(PCBTARANIS) + ISTR(UART3MODES) +#endif ISTR(VTRIMINC) ISTR(RETA123) ISTR(VPROTOS) @@ -267,6 +270,10 @@ const pm_char STR_EEPROMOVERFLOW[] PROGMEM = TR_EEPROMOVERFLOW; const pm_char STR_TRIMS2OFFSETS[] PROGMEM = TR_TRIMS2OFFSETS; const pm_char STR_MENURADIOSETUP[] PROGMEM = TR_MENURADIOSETUP; +#if defined(FAS_OFFSET) || !defined(CPUM64) +const pm_char STR_FAS_OFFSET[] PROGMEM = TR_FAS_OFFSET; +#endif + #if defined(CPUM2560) || defined(CPUARM) const pm_char STR_MENUDATEANDTIME[] PROGMEM = TR_MENUDATEANDTIME; #endif @@ -455,6 +462,7 @@ const pm_char STR_VIEW_TEXT[] PROGMEM = "View text"; const pm_char STR_MODELNAME[] PROGMEM = TR_MODELNAME; const pm_char STR_PHASENAME[] PROGMEM = TR_PHASENAME; const pm_char STR_MIXNAME[] PROGMEM = TR_MIXNAME; + const pm_char STR_INPUTNAME[] PROGMEM = TR_INPUTNAME; const pm_char STR_EXPONAME[] PROGMEM = TR_EXPONAME; #endif @@ -482,11 +490,12 @@ const pm_char STR_VIEW_TEXT[] PROGMEM = "View text"; const pm_char STR_CLEAR[] PROGMEM = "Clear"; const pm_char STR_RESET[] PROGMEM = "Reset"; const pm_char STR_COPY_TRIMS_TO_OFFSET[] = "Copy Trims To Offset"; - const pm_char STR_TOP_BAR[] PROGMEM = "Top Bar"; - const pm_char STR_ALTITUDE[] PROGMEM = INDENT "Altitude"; + const pm_char STR_TOP_BAR[] PROGMEM = TR_TOP_BAR; + const pm_char STR_ALTITUDE[] PROGMEM = TR_ALTITUDE; const pm_char STR_SCALE[] PROGMEM = "Scale"; const pm_char STR_VIEW_CHANNELS[] PROGMEM = "View Channels"; const pm_char STR_VIEW_NOTES[] PROGMEM = "View Notes"; + const pm_char STR_UART3MODE[] PROGMEM = TR_UART3MODE; #endif #if MENUS_LOCK == 1 @@ -586,6 +595,12 @@ const pm_uchar font_5x7[] PROGMEM = { #endif }; +#if !defined(CPUM64) || defined(EXTSTD) +const pm_uchar font_5x7_B[] PROGMEM = { +#include "font_05x07_B_compressed.lbm" +}; +#endif + const pm_uchar font_10x14[] PROGMEM = { #include "font_10x14_compressed.lbm" #if defined(CPUARM) diff --git a/radio/src/translations.h b/radio/src/translations.h index 4a3e0600a..0c7f7af19 100644 --- a/radio/src/translations.h +++ b/radio/src/translations.h @@ -99,7 +99,12 @@ extern const pm_char STR_OPEN9X[]; #define OFS_TRNMODE (OFS_VBEEPMODE + sizeof(TR_VBEEPMODE)) #endif #define OFS_TRNCHN (OFS_TRNMODE + sizeof(TR_TRNMODE)) +#if defined(PCBTARANIS) +#define OFS_UART3MODES (OFS_TRNCHN + sizeof(TR_TRNCHN)) +#define OFS_VTRIMINC (OFS_UART3MODES + sizeof(TR_UART3MODES)) +#else #define OFS_VTRIMINC (OFS_TRNCHN + sizeof(TR_TRNCHN)) +#endif #define OFS_RETA123 (OFS_VTRIMINC + sizeof(TR_VTRIMINC)) #define OFS_VPROTOS (OFS_RETA123 + sizeof(TR_RETA123)) #define OFS_POSNEG (OFS_VPROTOS + sizeof(TR_VPROTOS)) @@ -190,6 +195,7 @@ extern const pm_char STR_OPEN9X[]; #define STR_VBEEPMODE (STR_OPEN9X + OFS_VBEEPMODE) #define STR_TRNMODE (STR_OPEN9X + OFS_TRNMODE) #define STR_TRNCHN (STR_OPEN9X + OFS_TRNCHN) +#define STR_UART3MODES (STR_OPEN9X + OFS_UART3MODES) #define STR_VTRIMINC (STR_OPEN9X + OFS_VTRIMINC) #define STR_RETA123 (STR_OPEN9X + OFS_RETA123) #define STR_VPROTOS (STR_OPEN9X + OFS_VPROTOS) @@ -448,6 +454,10 @@ extern const pm_char STR_INVERT_THR[]; extern const pm_char STR_AND_SWITCH[]; extern const pm_char STR_CF[]; +#if defined(FAS_OFFSET) || !defined(CPUM64) +extern const pm_char STR_FAS_OFFSET[]; +#endif + #if defined(DSM2) || defined(PXX) extern const pm_char STR_RXNUM[]; #endif @@ -536,6 +546,9 @@ extern const pm_char STR_RESET_BTN[]; extern const pm_uchar font_5x7[]; extern const pm_uchar font_10x14[]; +#if !defined(CPUM64) || defined(EXTSTD) +extern const pm_uchar font_5x7_B[]; +#endif #if defined(CPUARM) extern const pm_uchar font_3x5[]; @@ -631,6 +644,7 @@ extern const pm_char STR_VIEW_TEXT[]; extern const pm_char STR_MODELNAME[]; extern const pm_char STR_PHASENAME[]; extern const pm_char STR_MIXNAME[]; + extern const pm_char STR_INPUTNAME[]; extern const pm_char STR_EXPONAME[]; #else #define STR_MODELNAME STR_NAME @@ -668,6 +682,7 @@ extern const pm_char STR_VIEW_TEXT[]; extern const pm_char STR_SCALE[]; extern const pm_char STR_VIEW_CHANNELS[]; extern const pm_char STR_VIEW_NOTES[]; + extern const pm_char STR_UART3MODE[]; #endif #if MENUS_LOCK == 1 @@ -750,5 +765,6 @@ extern const pm_char STR_VIEW_TEXT[]; #define CHR_LONG TR_CHR_LONG #define CHR_TOGGLE TR_CHR_TOGGLE #define CHR_HOUR TR_CHR_HOUR +#define CHR_INPUT TR_CHR_INPUT #endif diff --git a/radio/src/translations/cz.h.txt b/radio/src/translations/cz.h.txt index 379444d0e..1fabbcc80 100644 --- a/radio/src/translations/cz.h.txt +++ b/radio/src/translations/cz.h.txt @@ -24,6 +24,7 @@ * * * + * * !!!!! DO NOT EDIT cz.h - EDIT cz.h.txt INSTEAD !!!!!!! * * In order to make translations easier cz.h.txt is parsed and national @@ -31,7 +32,12 @@ * See translate.py in the util catalog for the list of character codes * * !!!!! DO NOT EDIT cz.h - EDIT cz.h.txt INSTEAD !!!!!!! - * + */ + /* Formatting octal codes available in TR_ strings: + * \037\x -sets LCD x-coord (x value in octal) + * \036 -newline (ARM boards only) + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string */ // NON ZERO TERMINATED STRINGS @@ -62,6 +68,9 @@ #define LEN_TRNCHN "\003" #define TR_TRNCHN "CH1CH2CH3CH4" +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART" + #define LEN_DATETIME "\006" #define TR_DATETIME "DATUM:""ČAS: " @@ -206,23 +215,23 @@ #define TR_VFSWFUNC "Zámek \0 ""Trenér \0 ""Insta-Trim\0" TR_SOUND TR_HAPTIC "Reset\0 " TR_VVARIO TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE "Podsvětlení" TR_CFN_ADJUST_GVAR TR_CFN_TEST #endif -#define LEN_VFSWRESET "\005" +#define LEN_VFSWRESET TR("\004", "\011") #if defined(FRSKY) - #define TR_FSW_RESET_TELEM "Telem" -#else + #define TR_FSW_RESET_TELEM TR("Telm", "Telemetry") +#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", "RotEnc A\0""RotEnc B\0") #elif ROTARY_ENCODERS == 1 - #define TR_FSW_RESET_ROTENC TR("R.Enc", "RotEnc\0 ") + #define TR_FSW_RESET_ROTENC TR("R.E.", "RotEnc\0 ") #else -#define TR_FSW_RESET_ROTENC + #define TR_FSW_RESET_ROTENC #endif -#define TR_VFSWRESET "Tmr1\0""Tmr2\0""Vše\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 ""All\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") @@ -356,12 +365,12 @@ #define TR_VFAILSAFE "Držet\0 ""Vlastní\0 ""Bez pulzů" #if defined(MAVLINK) - #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" - #define LEN_MAVLINK_AC_MODES "\011" - #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " - #define LEN_MAVLINK_AP_MODES "\015" - #define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID " + #define LEN_MAVLINK_BAUDS "\006" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define LEN_MAVLINK_AC_MODES "\011" + #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " + #define LEN_MAVLINK_AP_MODES "\015" + #define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID " #endif // ZERO TERMINATED STRINGS @@ -385,11 +394,16 @@ #define TR_MOVINGMODEL "Přesouvám model." #define TR_LOADINGMODEL "Aktivuji model.." #define TR_NAME "Jméno" -#define TR_MODELNAME "Název modelu" -#define TR_PHASENAME "Jméno" -#define TR_MIXNAME "Jméno" -#define TR_EXPONAME "Jméno" -#define TR_BITMAP "Obrázek" +#define TR_MODELNAME "Název modelu" +#define TR_PHASENAME "Jméno" +#define TR_MIXNAME "Jméno" +#define TR_INPUTNAME "Input Name" +#if defined(PCBTARANIS) + #define TR_EXPONAME "Line Name" +#else + #define TR_EXPONAME "Jméno" +#endif +#define TR_BITMAP "Obrázek" #define TR_TIMER "Stopky " #define TR_ELIMITS TR("Limit+25%", "Kanál +/- 125%") #define TR_ETRIMS TR("širšíTrim", "Široký trim") @@ -485,22 +499,22 @@ #define OFS_RX 4 #define TR_ACCEL "Acc:" #define TR_NODATA CENTER "NO DATA" -#define TR_TM1TM2 "TM1\032TM2" -#define TR_THRTHP "THR\032TH%" +#define TR_TM1TM2 "TM1\037\146TM2" +#define TR_THRTHP "THR\037\146TH%" #define TR_TOT "TOT" -#define TR_TMR1LATMAXUS "Tmr1Lat max\006us" -#define STR_US (STR_TMR1LATMAXUS+12) -#define TR_TMR1LATMINUS "Tmr1Lat min\006us" -#define TR_TMR1JITTERUS "Tmr1 Jitter\006us" +#define TR_TMR1LATMAXUS "Tmr1Lat max\037\124us" +#define STR_US (STR_TMR1LATMAXUS+13) +#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us" +#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us" #if defined(CPUARM) - #define TR_TMIXMAXMS "Tmix max\012ms" + #define TR_TMIXMAXMS "Tmix max" + #define TR_FREESTACKMINB "Free Stack" #else - #define TR_TMIXMAXMS "Tmix max\014ms" + #define TR_TMIXMAXMS "Tmix max\037\124ms" + #define TR_FREESTACKMINB "Free Stack\037\124b" #endif -#define TR_T10MSUS "T10ms\016us" -#define TR_FREESTACKMINB "Free Stack\010b" #define TR_MENUTORESET CENTER TR_ENTER" >> Reset" #define TR_PPM "PPM" #define TR_CH "CH" @@ -534,6 +548,9 @@ // Alignment + + + #define TR_MENUINPUTS "DR/EXPO" #define TR_MENULIMITS "LIMITY" @@ -661,6 +678,8 @@ #define TR_LOWALARM INDENT "Nízký Alarm" #define TR_CRITICALALARM INDENT "Kritický Alarm" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset") +#define TR_UART3MODE "Serial port" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" @@ -744,8 +763,14 @@ #define TR_CHR_LONG 'l' #define TR_CHR_TOGGLE 't' #define TR_CHR_HOUR 'h' +#define TR_CHR_INPUT 'I' // Values between A-I will work #define TR_BEEP_VOLUME "Pípání" #define TR_WAV_VOLUME "Zvuky WAV" #define TR_VARIO_VOLUME "Vario" #define TR_BG_VOLUME "WAV na pozadí" + +#define TR_TOP_BAR "Top Bar" +#define TR_ALTITUDE INDENT "Altitude" +#define TR_MODS_FORBIDDEN "Modifications forbidden!" +#define TR_UNLOCKED "Unlocked" diff --git a/radio/src/translations/de.h.txt b/radio/src/translations/de.h.txt index 88490ce12..4c719b79a 100644 --- a/radio/src/translations/de.h.txt +++ b/radio/src/translations/de.h.txt @@ -23,6 +23,7 @@ * GNU General Public License for more details. * * + * * !!!!! DO NOT EDIT de.h - EDIT de.h.txt INSTEAD !!!!!!! * * In order to make translations easier de.h.txt is parsed and national @@ -32,7 +33,12 @@ * * !!!!! DO NOT EDIT de.h - EDIT de.h.txt INSTEAD !!!!!!! */ - + /* Formatting octal codes available in TR_ strings: + * \037\x -sets LCD x-coord (x value in octal) + * \036 -newline (ARM boards only) + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ // NON ZERO TERMINATED STRINGS #define LEN_OFFON "\003" @@ -62,6 +68,9 @@ #define LEN_TRNCHN "\003" #define TR_TRNCHN "CH1CH2CH3CH4" +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART" + #define LEN_DATETIME "\005" #define TR_DATETIME "DATE:""ZEIT:" @@ -206,23 +215,23 @@ #define TR_VFSWFUNC "Sicher\0 ""Lehrer \0 ""Inst. Trim" TR_SOUND TR_HAPTIC "R\205cksetz.\0" TR_VVARIO TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE "LCD Licht\0" TR_CFN_ADJUST_GVAR TR_CFN_TEST #endif -#define LEN_VFSWRESET TR("\005", "\011") +#define LEN_VFSWRESET TR("\004", "\011") #if defined(FRSKY) - #define TR_FSW_RESET_TELEM TR("Telem", "Telemetrie ") //\200nderung + #define TR_FSW_RESET_TELEM TR("Telm", "Telemetry") #else - #define TR_FSW_RESET_TELEM + #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", "RotEnc A\0""RotEnc B\0") #elif ROTARY_ENCODERS == 1 - #define TR_FSW_RESET_ROTENC TR("R.Enc", "RotEnc\0 ") + #define TR_FSW_RESET_ROTENC TR("R.E.", "RotEnc\0 ") #else #define TR_FSW_RESET_ROTENC #endif -#define TR_VFSWRESET TR("Tmr1\0""Tmr2\0""Alle\0" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, "Timer 1 ""Timer 2 ""Alle Tmr." 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 ""All\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", "Piep1\0""Piep2\0""Piep3\0""Warn1 ""Warn2 ""Cheep ""Ratata""Tick ""Siren ""Ring ""SciFi ""Robot ""Chirp ""Tada ""Crickt""AlmClk") @@ -356,12 +365,12 @@ #define TR_VFAILSAFE "Hold\0 ""Custom\0 ""No pulses" #if defined(MAVLINK) - #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" - #define LEN_MAVLINK_AC_MODES "\011" - #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " - #define LEN_MAVLINK_AP_MODES "\015" - #define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID " + #define LEN_MAVLINK_BAUDS "\006" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define LEN_MAVLINK_AC_MODES "\011" + #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " + #define LEN_MAVLINK_AP_MODES "\015" + #define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID " #endif // ZERO TERMINATED STRINGS @@ -388,7 +397,12 @@ #define TR_MODELNAME "Modell Name" #define TR_PHASENAME "Phase Name" #define TR_MIXNAME "Mix Name" -#define TR_EXPONAME "Expo Name" +#define TR_INPUTNAME "Input Name" +#if defined(PCBTARANIS) + #define TR_EXPONAME "Linie Name" +#else + #define TR_EXPONAME "Expo Name" +#endif #define TR_BITMAP "Modell Bild" #define TR_TIMER TR("Stoppuhr","Stoppuhr ") #define TR_ELIMITS TR("Erw.Limit","Erweit. Limits") @@ -485,22 +499,22 @@ #define OFS_RX 4 #define TR_ACCEL "Acc:" #define TR_NODATA CENTER"NO DATA" -#define TR_TM1TM2 "TM1\032TM2" -#define TR_THRTHP "THR\032TH%" +#define TR_TM1TM2 "TM1\037\146TM2" +#define TR_THRTHP "THR\037\146TH%" #define TR_TOT "TOT" -#define TR_TMR1LATMAXUS "Tmr1Lat max\006us" -#define STR_US (STR_TMR1LATMAXUS+12) -#define TR_TMR1LATMINUS "Tmr1Lat min\006us" -#define TR_TMR1JITTERUS "Tmr1 Jitter\006us" +#define TR_TMR1LATMAXUS "Tmr1Lat max\037\124us" +#define STR_US (STR_TMR1LATMAXUS+13) +#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us" +#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us" #if defined(CPUARM) - #define TR_TMIXMAXMS "Tmix max\012ms" + #define TR_TMIXMAXMS "Tmix max" + #define TR_FREESTACKMINB "Free Stack" #else - #define TR_TMIXMAXMS "Tmix max\014ms" + #define TR_TMIXMAXMS "Tmix max\037\124ms" + #define TR_FREESTACKMINB "Free Stack\037\124b" #endif -#define TR_T10MSUS "T10ms\016us" -#define TR_FREESTACKMINB "Free Stack\010b" #define TR_MENUTORESET CENTER TR_ENTER" f\205r Reset" #define TR_PPM "PPM" #define TR_CH "CH" @@ -664,6 +678,8 @@ #define TR_LOWALARM INDENT "Low Alarm" #define TR_CRITICALALARM INDENT "Kritisch Alarm" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset") +#define TR_UART3MODE "Serial port" #if defined(MAVLINK) #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" @@ -747,8 +763,14 @@ #define TR_CHR_LONG 'l' //Taste long #define TR_CHR_TOGGLE 't' //Taste als togglefunktion = Ein Aus Ein #define TR_CHR_HOUR 'h' //Stunden +#define TR_CHR_INPUT 'I' // Values between A-I will work #define TR_BEEP_VOLUME "Beep Lautst" #define TR_WAV_VOLUME "Wav Lautst" #define TR_VARIO_VOLUME "Vario Lautst" #define TR_BG_VOLUME "Bg Lautst" + +#define TR_TOP_BAR "Top Bar" +#define TR_ALTITUDE INDENT "Altitude" +#define TR_MODS_FORBIDDEN "Modifications forbidden!" +#define TR_UNLOCKED "Unlocked" diff --git a/radio/src/translations/en.h b/radio/src/translations/en.h index 80f25935a..4f0397900 100644 --- a/radio/src/translations/en.h +++ b/radio/src/translations/en.h @@ -33,6 +33,12 @@ * GNU General Public License for more details. * */ + /* Formatting octal codes available in TR_ strings: + * \037\x -sets LCD x-coord (x value in octal) + * \036 -newline (ARM boards only) + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ // NON ZERO TERMINATED STRINGS #define LEN_OFFON "\003" @@ -62,6 +68,9 @@ #define LEN_TRNCHN "\003" #define TR_TRNCHN "CH1CH2CH3CH4" +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART" + #define LEN_DATETIME "\005" #define TR_DATETIME "DATE:""TIME:" @@ -71,8 +80,8 @@ #define LEN_COUNTRYCODES TR("\002", "\007") #define TR_COUNTRYCODES TR("US""JP""EU", "America""Japan\0 ""Europe\0") -#define LEN_VTRIMINC TR("\006","\013") -#define TR_VTRIMINC TR("Expo ""ExFine""Fine ""Medium""Coarse","Exponential""Extra Fine ""Fine ""Medium ""Coarse ") +#define LEN_VTRIMINC TR("\006", "\013") +#define TR_VTRIMINC TR("Expo\0 ""ExFine""Fine\0 ""Medium""Coarse", "Exponential""Extra Fine\0""Fine\0 ""Medium\0 ""Coarse\0 ") #define LEN_VBEEPCOUNTDOWN "\006" #define TR_VBEEPCOUNTDOWN "SilentBeeps\0Voice\0" @@ -206,23 +215,23 @@ #define TR_VFSWFUNC "Safety\0 ""Trainer\0 ""Inst. Trim" TR_SOUND TR_HAPTIC "Reset\0 " TR_VVARIO TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE "Backlight\0" TR_CFN_ADJUST_GVAR TR_CFN_TEST #endif -#define LEN_VFSWRESET TR("\005", "\011") +#define LEN_VFSWRESET TR("\004", "\011") #if defined(FRSKY) - #define TR_FSW_RESET_TELEM TR("Telem", "Telemetry") + #define TR_FSW_RESET_TELEM TR("Telm", "Telemetry") #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", "RotEnc A\0""RotEnc B\0") #elif ROTARY_ENCODERS == 1 - #define TR_FSW_RESET_ROTENC TR("R.Enc", "RotEnc\0 ") + #define TR_FSW_RESET_ROTENC TR("R.E.", "RotEnc\0 ") #else #define TR_FSW_RESET_ROTENC #endif -#define TR_VFSWRESET TR("Tmr1\0""Tmr2\0""All\0 " TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, "Timer 1 ""Timer 2 ""All " 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 ""All\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") @@ -356,12 +365,12 @@ #define TR_VFAILSAFE "Hold\0 ""Custom\0 ""No pulses" #if defined(MAVLINK) - #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" - #define LEN_MAVLINK_AC_MODES "\011" - #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " - #define LEN_MAVLINK_AP_MODES "\015" - #define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID " + #define LEN_MAVLINK_BAUDS "\006" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define LEN_MAVLINK_AC_MODES "\011" + #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " + #define LEN_MAVLINK_AP_MODES "\015" + #define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID " #endif // ZERO TERMINATED STRINGS @@ -388,6 +397,7 @@ #define TR_MODELNAME "Model Name" #define TR_PHASENAME "Mode Name" #define TR_MIXNAME "Mix Name" +#define TR_INPUTNAME "Input Name" #if defined(PCBTARANIS) #define TR_EXPONAME "Line Name" #else @@ -489,20 +499,20 @@ #define OFS_RX 4 #define TR_ACCEL "Acc:" #define TR_NODATA CENTER "NO DATA" -#define TR_TM1TM2 "TM1\032TM2" -#define TR_THRTHP "THR\032TH%" +#define TR_TM1TM2 "TM1\037\146TM2" +#define TR_THRTHP "THR\037\146TH%" #define TR_TOT "TOT" -#define TR_TMR1LATMAXUS "Tmr1Lat max\006us" -#define STR_US (STR_TMR1LATMAXUS+12) -#define TR_TMR1LATMINUS "Tmr1Lat min\006us" -#define TR_TMR1JITTERUS "Tmr1 Jitter\006us" +#define TR_TMR1LATMAXUS "Tmr1Lat max\037\124us" +#define STR_US (STR_TMR1LATMAXUS+13) +#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us" +#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us" #if defined(CPUARM) #define TR_TMIXMAXMS "Tmix max" #define TR_FREESTACKMINB "Free Stack" #else - #define TR_TMIXMAXMS "Tmix max\014ms" - #define TR_FREESTACKMINB "Free Stack\010b" + #define TR_TMIXMAXMS "Tmix max\037\124ms" + #define TR_FREESTACKMINB "Free Stack\037\124b" #endif #define TR_MENUTORESET CENTER TR_ENTER " to reset" @@ -668,35 +678,35 @@ #define TR_LOWALARM INDENT "Low Alarm" #define TR_CRITICALALARM INDENT "Critical Alarm" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset") +#define TR_UART3MODE "Serial port" #if defined(MAVLINK) - #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" - #define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN" - #define TR_MAVMENUSETUP_TITLE "Mavlink Setup" - #define TR_MAVLINK_BAUD_LABEL "Baudrate" - #define TR_MAVLINK_INFOS "INFOS" - #define TR_MAVLINK_MODE "MODE" - #define TR_MAVLINK_CUR_MODE "Current Mode" - #define TR_MAVLINK_ARMED "Armed" - #define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI" - #define TR_MAVLINK_BATTERY_LABEL "Flight Battery status" - #define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI" - #define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI" - #define TR_MAVLINK_NAV_MENU_TITLE "NAV" - #define TR_MAVLINK_COURSE "Course" - #define TR_MAVLINK_HEADING "Heading" - #define TR_MAVLINK_BEARING "Bearing" - #define TR_MAVLINK_ALTITUDE "Altitude" - #define TR_MAVLINK_GPS "GPS" - #define TR_MAVLINK_NO_FIX "NO Fix" - #define TR_MAVLINK_SAT "SAT" - #define TR_MAVLINK_HDOP "HDOP" - #define TR_MAVLINK_LAT "LAT" - #define TR_MAVLINK_LON "LON" + #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" + #define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN" + #define TR_MAVMENUSETUP_TITLE "Mavlink Setup" + #define TR_MAVLINK_BAUD_LABEL "Baudrate" + #define TR_MAVLINK_INFOS "INFOS" + #define TR_MAVLINK_MODE "MODE" + #define TR_MAVLINK_CUR_MODE "Current Mode" + #define TR_MAVLINK_ARMED "Armed" + #define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI" + #define TR_MAVLINK_BATTERY_LABEL "Flight Battery status" + #define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI" + #define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI" + #define TR_MAVLINK_NAV_MENU_TITLE "NAV" + #define TR_MAVLINK_COURSE "Course" + #define TR_MAVLINK_HEADING "Heading" + #define TR_MAVLINK_BEARING "Bearing" + #define TR_MAVLINK_ALTITUDE "Altitude" + #define TR_MAVLINK_GPS "GPS" + #define TR_MAVLINK_NO_FIX "NO Fix" + #define TR_MAVLINK_SAT "SAT" + #define TR_MAVLINK_HDOP "HDOP" + #define TR_MAVLINK_LAT "LAT" + #define TR_MAVLINK_LON "LON" #endif - - // Taranis column headers #define TR_PHASES_HEADERS { " Name ", " Switch ", " Trims ", " Fade In ", " Fade Out " } #define TR_LIMITS_HEADERS { " Name ", " Subtrim ", " Min ", " Max ", " Direction ", " Curve ", " PPM Center ", " Subtrim mode " } @@ -753,6 +763,7 @@ #define TR_CHR_LONG 'l' #define TR_CHR_TOGGLE 't' #define TR_CHR_HOUR 'h' +#define TR_CHR_INPUT 'I' // Values between A-I will work #define TR_BEEP_VOLUME "Beep Volume" #define TR_WAV_VOLUME "Wav Volume" @@ -763,4 +774,3 @@ #define TR_ALTITUDE INDENT "Altitude" #define TR_MODS_FORBIDDEN "Modifications forbidden!" #define TR_UNLOCKED "Unlocked" - diff --git a/radio/src/translations/es.h.txt b/radio/src/translations/es.h.txt index b689918f6..f1f81d0f5 100644 --- a/radio/src/translations/es.h.txt +++ b/radio/src/translations/es.h.txt @@ -23,6 +23,7 @@ * GNU General Public License for more details. * * + * * !!!!! DO NOT EDIT es.h - EDIT es.h.txt INSTEAD !!!!!!! * * In order to make translations easier es.h.txt is parsed and national @@ -32,7 +33,12 @@ * * !!!!! DO NOT EDIT es.h - EDIT es.h.txt INSTEAD !!!!!!! */ - + /* Formatting octal codes available in TR_ strings: + * \037\x -sets LCD x-coord (x value in octal) + * \036 -newline (ARM boards only) + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ // NON ZERO TERMINATED STRINGS #define LEN_OFFON "\003" @@ -62,6 +68,9 @@ #define LEN_TRNCHN "\003" #define TR_TRNCHN "CH1CH2CH3CH4" +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART" + #define LEN_DATETIME "\005" #define TR_DATETIME "DATA:""HORA:" @@ -206,23 +215,23 @@ #define TR_VFSWFUNC "Seguro\0 ""Aprendiz\0 ""Inst. Trim" TR_SOUND TR_HAPTIC "Reset\0 " TR_VVARIO TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE "Luz fondo\0" TR_CFN_ADJUST_GVAR TR_CFN_TEST #endif -#define LEN_VFSWRESET TR("\005", "\011") +#define LEN_VFSWRESET TR("\004", "\011") #if defined(FRSKY) - #define TR_FSW_RESET_TELEM TR("Telem", "Telemetria") + #define TR_FSW_RESET_TELEM TR("Telm", "Telemetry") #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", "RotEnc A\0""RotEnc B\0") #elif ROTARY_ENCODERS == 1 - #define TR_FSW_RESET_ROTENC TR("R.Enc", "RotEnc\0 ") + #define TR_FSW_RESET_ROTENC TR("R.E.", "RotEnc\0 ") #else #define TR_FSW_RESET_ROTENC #endif -#define TR_VFSWRESET TR("Tmr1\0""Tmr2\0""All\0 " TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, "Reloj 1 ""Reloj 2 ""Todo " 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 ""All\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""Avs1""Avs2""Chee""Rata""Tick""Sirn""Ring""SciF""Robt""Chrp""Tada""Crck""Alrm", "Beep1 ""Beep2 ""Beep3 ""Aviso1""Aviso2""Cheep ""Ratata""Tick ""Sirena""Ring ""SciFi ""Robot ""Chirp ""Tada ""Crickt""AlmClk") @@ -356,12 +365,12 @@ #define TR_VFAILSAFE "Guardar\0 ""Adaptar\0 ""Sin pulsos" #if defined(MAVLINK) - #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" - #define LEN_MAVLINK_AC_MODES "\011" - #define TR_MAVLINK_AC_MODES "Estabilizar""Acrobat. ""Alt Hold ""Auto ""Guiado ""Loiter ""RTL ""Circulo ""Pos Hold ""Tierra ""OF Loiter""Toy A ""Toy M ""INVALIDO " - #define LEN_MAVLINK_AP_MODES "\015" - #define TR_MAVLINK_AP_MODES "Manual ""Circulo ""Estabilizar ""Entrenamiento""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guiado ""Inicialisando""INVALID " + #define LEN_MAVLINK_BAUDS "\006" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define LEN_MAVLINK_AC_MODES "\011" + #define TR_MAVLINK_AC_MODES "Estabilizar""Acrobat. ""Alt Hold ""Auto ""Guiado ""Loiter ""RTL ""Circulo ""Pos Hold ""Tierra ""OF Loiter""Toy A ""Toy M ""INVALIDO " + #define LEN_MAVLINK_AP_MODES "\015" + #define TR_MAVLINK_AP_MODES "Manual ""Circulo ""Estabilizar ""Entrenamiento""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guiado ""Inicialisando""INVALID " #endif // ZERO TERMINATED STRINGS @@ -388,7 +397,12 @@ #define TR_MODELNAME "Nom.Modelo" #define TR_PHASENAME "Nom.Fase " #define TR_MIXNAME "Nom.Mezcla" -#define TR_EXPONAME "Nom. Expo" +#define TR_INPUTNAME "Input Name" +#if defined(PCBTARANIS) + #define TR_EXPONAME "Line Name" +#else + #define TR_EXPONAME "Nom. Expo" +#endif #define TR_BITMAP "Imagen Modelo" #define TR_TIMER TR("Reloj","Reloj ") #define TR_ELIMITS TR("E.Limite","Ampliar Limites") @@ -485,22 +499,22 @@ #define OFS_RX 4 #define TR_ACCEL "Acc:" #define TR_NODATA CENTER "SIN DATOS" -#define TR_TM1TM2 "TM1\032TM2" -#define TR_THRTHP "THR\032TH%" +#define TR_TM1TM2 "TM1\037\146TM2" +#define TR_THRTHP "THR\037\146TH%" #define TR_TOT "TOT" -#define TR_TMR1LATMAXUS "Tmr1Lat max\006us" -#define STR_US (STR_TMR1LATMAXUS+12) -#define TR_TMR1LATMINUS "Tmr1Lat min\006us" -#define TR_TMR1JITTERUS "Tmr1 Jitter\006us" +#define TR_TMR1LATMAXUS "Tmr1Lat max\037\124us" +#define STR_US (STR_TMR1LATMAXUS+13) +#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us" +#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us" #if defined(CPUARM) - #define TR_TMIXMAXMS "Tmix max\012ms" + #define TR_TMIXMAXMS "Tmix max" + #define TR_FREESTACKMINB "Free Stack" #else - #define TR_TMIXMAXMS "Tmix max\014ms" + #define TR_TMIXMAXMS "Tmix max\037\124ms" + #define TR_FREESTACKMINB "Pila LIbre\037\124b" #endif -#define TR_T10MSUS "T10ms\016us" -#define TR_FREESTACKMINB "Pila LIbre\010b" #define TR_MENUTORESET CENTER TR_ENTER "Resetear" #define TR_PPM "PPM" #define TR_CH "CH" @@ -530,6 +544,9 @@ #define TR_MENUFLIGHTPHASES "MODOS VUELO" #define TR_MENUHELISETUP "CONF. HELI" + +// Alignment + #if defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_LIMITS_SYMETRICAL) // The right menu titles for the gurus ... #define TR_MENUINPUTS "STICKS" #define TR_MENULIMITS "SERVOS" @@ -662,31 +679,32 @@ #define TR_CRITICALALARM INDENT "Alarma Critica" #define TR_PERSISTENT_MAH INDENT "Valor mAh" #define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset") +#define TR_UART3MODE "Serial port" #if defined(MAVLINK) - #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" - #define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN" - #define TR_MAVMENUSETUP_TITLE "Mavlink Setup" - #define TR_MAVLINK_BAUD_LABEL "Baudrate" - #define TR_MAVLINK_INFOS "INFOS" - #define TR_MAVLINK_MODE "MODO" - #define TR_MAVLINK_CUR_MODE "Modo actual" - #define TR_MAVLINK_ARMED "Armad0" - #define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI" - #define TR_MAVLINK_BATTERY_LABEL "Estado Bateria de vuelo" - #define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI" - #define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI" - #define TR_MAVLINK_NAV_MENU_TITLE "NAV" - #define TR_MAVLINK_COURSE "Carrera" - #define TR_MAVLINK_HEADING "Titulo" - #define TR_MAVLINK_BEARING "Soporte" - #define TR_MAVLINK_ALTITUDE "Altitud" - #define TR_MAVLINK_GPS "GPS" - #define TR_MAVLINK_NO_FIX "NO Fix" - #define TR_MAVLINK_SAT "SAT" - #define TR_MAVLINK_HDOP "HDOP" - #define TR_MAVLINK_LAT "LAT" - #define TR_MAVLINK_LON "LON" + #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" + #define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN" + #define TR_MAVMENUSETUP_TITLE "Mavlink Setup" + #define TR_MAVLINK_BAUD_LABEL "Baudrate" + #define TR_MAVLINK_INFOS "INFOS" + #define TR_MAVLINK_MODE "MODO" + #define TR_MAVLINK_CUR_MODE "Modo actual" + #define TR_MAVLINK_ARMED "Armad0" + #define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI" + #define TR_MAVLINK_BATTERY_LABEL "Estado Bateria de vuelo" + #define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI" + #define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI" + #define TR_MAVLINK_NAV_MENU_TITLE "NAV" + #define TR_MAVLINK_COURSE "Carrera" + #define TR_MAVLINK_HEADING "Titulo" + #define TR_MAVLINK_BEARING "Soporte" + #define TR_MAVLINK_ALTITUDE "Altitud" + #define TR_MAVLINK_GPS "GPS" + #define TR_MAVLINK_NO_FIX "NO Fix" + #define TR_MAVLINK_SAT "SAT" + #define TR_MAVLINK_HDOP "HDOP" + #define TR_MAVLINK_LAT "LAT" + #define TR_MAVLINK_LON "LON" #endif // Taranis column headers @@ -745,8 +763,14 @@ #define TR_CHR_LONG 'l' #define TR_CHR_TOGGLE 't' #define TR_CHR_HOUR 'h' +#define TR_CHR_INPUT 'I' // Values between A-I will work #define TR_BEEP_VOLUME "Volumen Beep" #define TR_WAV_VOLUME "Volumen Wav" #define TR_VARIO_VOLUME "Volumen Vario" #define TR_BG_VOLUME "Volumen Bg" + +#define TR_TOP_BAR "Top Bar" +#define TR_ALTITUDE INDENT "Altitude" +#define TR_MODS_FORBIDDEN "Modifications forbidden!" +#define TR_UNLOCKED "Unlocked" diff --git a/radio/src/translations/fr.h.txt b/radio/src/translations/fr.h.txt index 470b08b91..540aa08bd 100644 --- a/radio/src/translations/fr.h.txt +++ b/radio/src/translations/fr.h.txt @@ -23,6 +23,7 @@ * * * + * * !!!!! DO NOT EDIT fr.h - EDIT fr.h.txt INSTEAD !!!!!!! * * In order to make translations easier fr.h.txt is parsed and national @@ -32,7 +33,12 @@ * * !!!!! DO NOT EDIT fr.h - EDIT fr.h.txt INSTEAD !!!!!!! */ - + /* Formatting octal codes available in TR_ strings: + * \037\x -sets LCD x-coord (x value in octal) + * \036 -newline (ARM boards only) + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ // NON ZERO TERMINATED STRINGS #define LEN_OFFON "\003" @@ -62,6 +68,9 @@ #define LEN_TRNCHN "\003" #define TR_TRNCHN "CH1CH2CH3CH4" +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART" + #define LEN_DATETIME "\005" #define TR_DATETIME "DATE:""HEURE" @@ -206,23 +215,23 @@ #define TR_VFSWFUNC "Sécur.\0 ""Ecolage\0 ""Trim instant." TR_SOUND TR_HAPTIC "Remise à 0\0 " TR_VVARIO TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE "Rétroécl.\0 " TR_CFN_ADJUST_GVAR TR_CFN_TEST #endif -#define LEN_VFSWRESET "\006" +#define LEN_VFSWRESET TR("\004","\012") #if defined(FRSKY) - #define TR_FSW_RESET_TELEM "Télém." + #define TR_FSW_RESET_TELEM TR("Télm","Télémesure") #else #define TR_FSW_RESET_TELEM #endif #if ROTARY_ENCODERS == 2 - #define TR_FSW_RESET_ROTENC TR("ERa\0 ""ERb\0 ", "EncRot A\0""EncRot B\0") + #define TR_FSW_RESET_ROTENC TR("ERa\0""ERb\0","Enc.Rot.A\0""Enc.Rot.B\0") #elif ROTARY_ENCODERS == 1 - #define TR_FSW_RESET_ROTENC TR("Enc.r", "EncRot\0 ") + #define TR_FSW_RESET_ROTENC TR("EncR", "Enc.Rot\0 ") #else #define TR_FSW_RESET_ROTENC #endif -#define TR_VFSWRESET "Timer1""Timer2""Timers" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC +#define TR_VFSWRESET TR("Chr1""Chr2""Tout" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC,"Chrono 1\0 ""Chrono 2\0 ""Tout\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") @@ -356,12 +365,12 @@ #define TR_VFAILSAFE "Maintien\0""Prédéfini""Pas d'imp" #if defined(MAVLINK) - #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" - #define LEN_MAVLINK_AC_MODES "\011" - #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " - #define LEN_MAVLINK_AP_MODES "\015" - #define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID " + #define LEN_MAVLINK_BAUDS "\006" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define LEN_MAVLINK_AC_MODES "\011" + #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " + #define LEN_MAVLINK_AP_MODES "\015" + #define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID " #endif // ZERO TERMINATED STRINGS @@ -388,7 +397,12 @@ #define TR_MODELNAME TR("Nom modèle","Nom du modèle") #define TR_PHASENAME "Nom phase" #define TR_MIXNAME TR("Nom mix.","Nom du mixeur") -#define TR_EXPONAME "Nom expo" +#define TR_INPUTNAME "Input Name" +#if defined(PCBTARANIS) + #define TR_EXPONAME "Nom ligne" +#else + #define TR_EXPONAME "Nom expo" +#endif #define TR_BITMAP "Image du modèle" #define TR_TIMER "Chrono " #define TR_ELIMITS TR("Limites ét","Limites étendues") @@ -485,22 +499,22 @@ #define OFS_RX 4 #define TR_ACCEL "Acc:" #define TR_NODATA "NO DATA" -#define TR_TM1TM2 "TM1\032TM2" -#define TR_THRTHP "THR\032TH%" +#define TR_TM1TM2 "TM1\037\146TM2" +#define TR_THRTHP "THR\037\146TH%" #define TR_TOT "TOT" -#define TR_TMR1LATMAXUS "Tmr1Lat max\006us" -#define STR_US (STR_TMR1LATMAXUS+12) -#define TR_TMR1LATMINUS "Tmr1Lat min\006us" -#define TR_TMR1JITTERUS "Tmr1 Jitter\006us" +#define TR_TMR1LATMAXUS "Tmr1Lat max\037\124us" +#define STR_US (STR_TMR1LATMAXUS+13) +#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us" +#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us" #if defined(CPUARM) - #define TR_TMIXMAXMS "Tmix max\012ms" + #define TR_TMIXMAXMS "Tmix max" + #define TR_FREESTACKMINB "Free Stack" #else - #define TR_TMIXMAXMS "Tmix max\014ms" + #define TR_TMIXMAXMS "Tmix max\037\124ms" + #define TR_FREESTACKMINB "Free Stack\037\124b" #endif -#define TR_T10MSUS "T10ms\016us" -#define TR_FREESTACKMINB "Free Stack\010b" #define TR_MENUTORESET CENTER TR_ENTER" pour reset" #define TR_PPM "PPM" #define TR_CH "CH" @@ -530,7 +544,10 @@ #define TR_MENUFLIGHTPHASES "PHASES DE VOL" #define TR_MENUHELISETUP TR("CONF.HELI","CONFIGURATION HELICO") -#if defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_LIMITS_SYMETRICAL) // The right menu titles for the gurus ... +#if defined(PCBTARANIS) + #define TR_MENUINPUTS "ENTREES" + #define TR_MENULIMITS "SORTIES" +#elif defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_LIMITS_SYMETRICAL) // The right menu titles for the gurus ... #define TR_MENUINPUTS "MANCHES" #define TR_MENULIMITS "SORTIES" #else @@ -661,31 +678,33 @@ #define TR_LOWALARM INDENT "Alarme basse" #define TR_CRITICALALARM INDENT "Alarme critique" #define TR_PERSISTENT_MAH TR(INDENT "Enr. mAh",INDENT "Enregistrer mAh") +#define TR_FAS_OFFSET TR(INDENT "Corr FAS", INDENT "Correction FAS") +#define TR_UART3MODE "Port série" #if defined(MAVLINK) - #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" - #define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN" - #define TR_MAVMENUSETUP_TITLE "Mavlink Setup" - #define TR_MAVLINK_BAUD_LABEL "Baudrate" - #define TR_MAVLINK_INFOS "INFOS" - #define TR_MAVLINK_MODE "MODE" - #define TR_MAVLINK_CUR_MODE "Current Mode" - #define TR_MAVLINK_ARMED "Armed" - #define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI" - #define TR_MAVLINK_BATTERY_LABEL "Flight Battery status" - #define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI" - #define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI" - #define TR_MAVLINK_NAV_MENU_TITLE "NAV" - #define TR_MAVLINK_COURSE "Course" - #define TR_MAVLINK_HEADING "Heading" - #define TR_MAVLINK_BEARING "Bearing" - #define TR_MAVLINK_ALTITUDE "Altitude" - #define TR_MAVLINK_GPS "GPS" - #define TR_MAVLINK_NO_FIX "NO Fix" - #define TR_MAVLINK_SAT "SAT" - #define TR_MAVLINK_HDOP "HDOP" - #define TR_MAVLINK_LAT "LAT" - #define TR_MAVLINK_LON "LON" + #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "RSSI Max" + #define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN" + #define TR_MAVMENUSETUP_TITLE "Config Mavlink" + #define TR_MAVLINK_BAUD_LABEL "Baudrate" + #define TR_MAVLINK_INFOS "INFOS" + #define TR_MAVLINK_MODE "MODE" + #define TR_MAVLINK_CUR_MODE "Mode courant" + #define TR_MAVLINK_ARMED "Armé" + #define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI" + #define TR_MAVLINK_BATTERY_LABEL "Accu propulsion" + #define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI" + #define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI" + #define TR_MAVLINK_NAV_MENU_TITLE "NAV" + #define TR_MAVLINK_COURSE "Course" + #define TR_MAVLINK_HEADING "Cap" + #define TR_MAVLINK_BEARING "Relèv." + #define TR_MAVLINK_ALTITUDE "Altitude" + #define TR_MAVLINK_GPS "GPS" + #define TR_MAVLINK_NO_FIX "NO Fix" + #define TR_MAVLINK_SAT "SAT" + #define TR_MAVLINK_HDOP "HDOP" + #define TR_MAVLINK_LAT "LAT" + #define TR_MAVLINK_LON "LON" #endif // Taranis column headers @@ -744,8 +763,14 @@ #define TR_CHR_LONG 'l' #define TR_CHR_TOGGLE 't' #define TR_CHR_HOUR 'h' +#define TR_CHR_INPUT 'I' // Values between A-I will work #define TR_BEEP_VOLUME "Beep Volume" #define TR_WAV_VOLUME "Wav Volume" #define TR_VARIO_VOLUME "Vario Volume" #define TR_BG_VOLUME "Bg Volume" + +#define TR_TOP_BAR "Barre titre" +#define TR_ALTITUDE INDENT "Altitude" +#define TR_MODS_FORBIDDEN "Modifications désactivées!" +#define TR_UNLOCKED "Déverrouillé" diff --git a/radio/src/translations/it.h.txt b/radio/src/translations/it.h.txt index 20033e41c..3f18eecf5 100644 --- a/radio/src/translations/it.h.txt +++ b/radio/src/translations/it.h.txt @@ -6,6 +6,7 @@ * - Martin Hotar * - Romolo Manfredini * + * * 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/, @@ -32,7 +33,12 @@ * * !!!!! DO NOT EDIT it.h - EDIT it.h.txt INSTEAD !!!!!!! */ - + /* Formatting octal codes available in TR_ strings: + * \037\x -sets LCD x-coord (x value in octal) + * \036 -newline (ARM boards only) + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ // NON ZERO TERMINATED STRINGS #define LEN_OFFON "\003" @@ -62,6 +68,9 @@ #define LEN_TRNCHN "\003" #define TR_TRNCHN "ch1ch2ch3ch4" +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART" + #define LEN_DATETIME "\005" #define TR_DATETIME "DATA:""ORA :" @@ -206,23 +215,23 @@ #define TR_VFSWFUNC "Blocco\0 ""Maestro \0 ""Trim Instant " TR_SOUND TR_HAPTIC "Azzera\0 " TR_VVARIO TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE "Retroillum.\0 " TR_CFN_ADJUST_GVAR TR_CFN_TEST #endif -#define LEN_VFSWRESET "\006" +#define LEN_VFSWRESET TR("\004", "\011") #if defined(FRSKY) - #define TR_FSW_RESET_TELEM "Telem." + #define TR_FSW_RESET_TELEM TR("Telm", "Telemetry") #else - #define TR_FSW_RESET_TELEM + #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", "RotEnc A\0""RotEnc B\0") #elif ROTARY_ENCODERS == 1 - #define TR_FSW_RESET_ROTENC TR("R.Enc", "RotEnc\0 ") + #define TR_FSW_RESET_ROTENC TR("R.E.", "RotEnc\0 ") #else #define TR_FSW_RESET_ROTENC #endif -#define TR_VFSWRESET "Timer1""Timer2""Tutto " 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 ""All\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") @@ -356,12 +365,12 @@ #define TR_VFAILSAFE "Mantieni\0 ""Personali\0""No impulsi" #if defined(MAVLINK) - #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" - #define LEN_MAVLINK_AC_MODES "\011" - #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " - #define LEN_MAVLINK_AP_MODES "\015" - #define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID " + #define LEN_MAVLINK_BAUDS "\006" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define LEN_MAVLINK_AC_MODES "\011" + #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " + #define LEN_MAVLINK_AP_MODES "\015" + #define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID " #endif // ZERO TERMINATED STRINGS @@ -388,7 +397,12 @@ #define TR_MODELNAME "Nome modello" #define TR_PHASENAME "Nome fase" #define TR_MIXNAME "Nome mix" -#define TR_EXPONAME "Nome expo" +#define TR_INPUTNAME "Input Name" +#if defined(PCBTARANIS) + #define TR_EXPONAME "Nome expo" +#else + #define TR_EXPONAME "Expo Name" +#endif #define TR_BITMAP "Immagine" #define TR_TIMER TR("Timer","Timer ") #define TR_ELIMITS TR("Limiti.E","Limiti Estesi") @@ -485,22 +499,22 @@ #define OFS_RX 4 #define TR_ACCEL "Acc:" #define TR_NODATA CENTER"DATI ASSENTI" -#define TR_TM1TM2 "TM1\032TM2" -#define TR_THRTHP "THR\032TH%" +#define TR_TM1TM2 "TM1\037\146TM2" +#define TR_THRTHP "THR\037\146TH%" #define TR_TOT "TOT" -#define TR_TMR1LATMAXUS "Tmr1Lat max\006us" -#define STR_US (STR_TMR1LATMAXUS+12) -#define TR_TMR1LATMINUS "Tmr1Lat min\006us" -#define TR_TMR1JITTERUS "Tmr1 Jitter\006us" +#define TR_TMR1LATMAXUS "Tmr1Lat max\037\124us" +#define STR_US (STR_TMR1LATMAXUS+13) +#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us" +#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us" #if defined(CPUARM) - #define TR_TMIXMAXMS "Tmix max\012ms" + #define TR_TMIXMAXMS "Tmix max" + #define TR_FREESTACKMINB "Free Stack" #else - #define TR_TMIXMAXMS "Tmix max\014ms" + #define TR_TMIXMAXMS "Tmix max\037\124ms" + #define TR_FREESTACKMINB "Free Stack\037\124b" #endif -#define TR_T10MSUS "T10ms\007us" -#define TR_FREESTACKMINB "Free Stack\004b" #define TR_MENUTORESET CENTER TR_ENTER" x Azzerare" #define TR_PPM "PPM" #define TR_CH "CH" @@ -530,6 +544,9 @@ #define TR_MENUFLIGHTPHASES "FASI DI VOLO" #define TR_MENUHELISETUP "SETUP ELI" +// Alignment + + #if defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_LIMITS_SYMETRICAL) // The right menu titles for the gurus ... #define TR_MENUINPUTS "STICK" #define TR_MENULIMITS "USCITE" @@ -661,31 +678,33 @@ #define TR_LOWALARM INDENT "Allarme Basso" #define TR_CRITICALALARM INDENT "Allarme Critico" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset") +#define TR_UART3MODE "Serial port" #if defined(MAVLINK) - #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" - #define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN" - #define TR_MAVMENUSETUP_TITLE "Mavlink Setup" - #define TR_MAVLINK_BAUD_LABEL "Baudrate" - #define TR_MAVLINK_INFOS "INFOS" - #define TR_MAVLINK_MODE "MODE" - #define TR_MAVLINK_CUR_MODE "Current Mode" - #define TR_MAVLINK_ARMED "Armed" - #define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI" - #define TR_MAVLINK_BATTERY_LABEL "Flight Battery status" - #define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI" - #define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI" - #define TR_MAVLINK_NAV_MENU_TITLE "NAV" - #define TR_MAVLINK_COURSE "Course" - #define TR_MAVLINK_HEADING "Heading" - #define TR_MAVLINK_BEARING "Bearing" - #define TR_MAVLINK_ALTITUDE "Altitude" - #define TR_MAVLINK_GPS "GPS" - #define TR_MAVLINK_NO_FIX "NO Fix" - #define TR_MAVLINK_SAT "SAT" - #define TR_MAVLINK_HDOP "HDOP" - #define TR_MAVLINK_LAT "LAT" - #define TR_MAVLINK_LON "LON" + #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" + #define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN" + #define TR_MAVMENUSETUP_TITLE "Mavlink Setup" + #define TR_MAVLINK_BAUD_LABEL "Baudrate" + #define TR_MAVLINK_INFOS "INFOS" + #define TR_MAVLINK_MODE "MODE" + #define TR_MAVLINK_CUR_MODE "Current Mode" + #define TR_MAVLINK_ARMED "Armed" + #define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI" + #define TR_MAVLINK_BATTERY_LABEL "Flight Battery status" + #define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI" + #define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI" + #define TR_MAVLINK_NAV_MENU_TITLE "NAV" + #define TR_MAVLINK_COURSE "Course" + #define TR_MAVLINK_HEADING "Heading" + #define TR_MAVLINK_BEARING "Bearing" + #define TR_MAVLINK_ALTITUDE "Altitude" + #define TR_MAVLINK_GPS "GPS" + #define TR_MAVLINK_NO_FIX "NO Fix" + #define TR_MAVLINK_SAT "SAT" + #define TR_MAVLINK_HDOP "HDOP" + #define TR_MAVLINK_LAT "LAT" + #define TR_MAVLINK_LON "LON" #endif // Taranis column headers @@ -744,8 +763,14 @@ #define TR_CHR_LONG 'l' #define TR_CHR_TOGGLE 't' #define TR_CHR_HOUR 'h' +#define TR_CHR_INPUT 'I' // Values between A-I will work #define TR_BEEP_VOLUME "Beep Volume" #define TR_WAV_VOLUME "Wav Volume" #define TR_VARIO_VOLUME "Vario Volume" #define TR_BG_VOLUME "Bg Volume" + +#define TR_TOP_BAR "Top Bar" +#define TR_ALTITUDE INDENT "Altitude" +#define TR_MODS_FORBIDDEN "Modifications forbidden!" +#define TR_UNLOCKED "Unlocked" diff --git a/radio/src/translations/pl.h.txt b/radio/src/translations/pl.h.txt index 9cb38c672..f04d171cf 100644 --- a/radio/src/translations/pl.h.txt +++ b/radio/src/translations/pl.h.txt @@ -1,11 +1,11 @@ /* - * Authors (alphabetical order) * - Bertrand Songis * - Bernet Andre * - Kjell Kernen * - Martin Hotar * - Romolo Manfredini + * - Jacek Drewniak * * opentx is based on code named * gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/, @@ -24,7 +24,6 @@ * * * - * * !!!!! DO NOT EDIT pl.h - EDIT pl.h.txt INSTEAD !!!!!!! * * In order to make translations easier pl.h.txt is parsed and national @@ -34,6 +33,12 @@ * !!!!! DO NOT EDIT pl.h - EDIT pl.h.txt INSTEAD !!!!!!! * */ + /* Formatting octal codes available in TR_ strings: + * \037\x -sets LCD x-coord (x value in octal) + * \036 -newline (ARM boards only) + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ // NON ZERO TERMINATED STRINGS #define LEN_OFFON "\003" @@ -43,7 +48,7 @@ #define TR_MMMINV "---""INV" #define LEN_NCHANNELS "\004" -#define TR_NCHANNELS "\0014CH\0016CH\0018CH10CH12CH14CH16CH" +#define TR_NCHANNELS "\0014KN\0016KN\0018KN10KN12KN14KN16KN" #define LEN_VBEEPMODE TR("\007","\016") #define TR_VBEEPMODE TR("Cichy\0 ""Alarm\0 ""BezPrz\0""Wszytko", "Cichy\0 ""Tylko alarm\0 ""Bez Przycisków""Wszystko\0 ") @@ -63,6 +68,9 @@ #define LEN_TRNCHN "\003" #define TR_TRNCHN "CH1CH2CH3CH4" +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART" + #define LEN_DATETIME "\006" #define TR_DATETIME "DANA:""Czas:\0 " @@ -207,26 +215,26 @@ #define TR_VFSWFUNC "Bezp.\0 ""Trener \0 ""Inst-Trim " TR_SOUND TR_HAPTIC "Reset " TR_VVARIO TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE "Podświetl. " TR_CFN_ADJUST_GVAR TR_CFN_TEST #endif -#define LEN_VFSWRESET "\005" +#define LEN_VFSWRESET TR("\004", "\012") #if defined(FRSKY) - #define TR_FSW_RESET_TELEM "Telem" -#else + #define TR_FSW_RESET_TELEM TR("Telm", "Telemetria") +#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", "RotEnc A\0 ""RotEnc B\0 ") #elif ROTARY_ENCODERS == 1 - #define TR_FSW_RESET_ROTENC TR("R.Enc", "RotEnc\0 ") + #define TR_FSW_RESET_ROTENC TR("R.E.", "RotEnc\0 ") #else -#define TR_FSW_RESET_ROTENC + #define TR_FSW_RESET_ROTENC #endif -#define TR_VFSWRESET "Tmr1\0""Tmr2\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 ""All\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") +#define TR_FUNCSOUNDS TR("Bp1\0""Bp2\0""Bp3\0""Ost1""Ost2""Chee""Rata""Tik\0""Syre""Dzwo""SciF""Robt""Chrp""Tada""Crck""Alrm", "Beep1\0""Beep2\0""Beep3\0""Ostrz1""Ostrz1""Cheep\0""Ratata""Tick\0 ""Syrena""Dzwone""SciFi\0""Robot\0""Chirp\0""Tada\0 ""Krytcz""AlmZeg") #define LEN_VTELEMCHNS "\004" #if defined(PCBTARANIS) @@ -236,7 +244,7 @@ #define TR_RSSI_0 "Tx\0 " #define TR_RSSI_1 "Rx\0 " #endif -#define TR_VTELEMCHNS "---\0""Bat\0""Tmr1""Tmr2" TR_RSSI_0 TR_RSSI_1 "A1\0 ""A2\0 ""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""A1-\0""A2-\0""Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""Cur+""Pwr+""Acc\0""Time" +#define TR_VTELEMCHNS "---\0""Bat\0""Tmr1""Tmr2" TR_RSSI_0 TR_RSSI_1 "A1\0 ""A2\0 ""Wys\0""Rpm\0""Pali""T1\0 ""T2\0 ""Spd\0""Dyst""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Moc\0""AccX""AccY""AccZ""Hdg\0""VSpd""A1-\0""A2-\0""Wys-""Wys+""Rpm+""T1+\0""T2+\0""Spd+""Dst+""Cur+""Moc+""Acc\0""Time" #if defined(CPUARM) #define LEN_VUNITSSYSTEM TR("\006", "\012") @@ -276,7 +284,7 @@ #if defined(FRSKY_SPORT) #define TR_VARIOSRC "Vario""A1\0 ""A2\0" #else - #define TR_VARIOSRC "Alti\0""Alti+""Vario""A1\0 ""A2\0" + #define TR_VARIOSRC "Wys.\0""Wys.+""Vario""A1\0 ""A2\0" #endif #define LEN_VSCREEN "\006" @@ -287,13 +295,13 @@ #define LEN2_VTEMPLATES 17 #define LEN_VTEMPLATES "\021" -#define TR_VTEMPLATES "Wyczyść miksery\0 ""Prosty. 4kanal\0 ""Przełącznik-T-Cut""V-Tail \0 ""Elevon-Delta\0 ""eCCPM \0 ""Heli Setup \0 ""Test serwa \0 " +#define TR_VTEMPLATES "Wyczyść miksery\0 ""Prosty. 4kanal\0 ""Przełącznik-T-Cut""V-Tail \0 ""Elevon-Delta\0 ""eCCPM \0 ""Ustaw. Heli \0 ""Test serwa \0 " #define LEN_VSWASHTYPE "\004" #define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90\0" #define LEN_VKEYS "\005" -#define TR_VKEYS TR(" Menu"" Exit""W dół""Wgórę""Wpraw""Wlewo", " Menu"" Exit""W dół""Wgórę""Wpraw""Wlewo") +#define TR_VKEYS TR(" Menu""Wyjdź""W dół""Wgórę""Wpraw""Wlewo", " Menu""Wyjdź""W dół""Wgórę""Wpraw""Wlewo") #define LEN_VRENCODERS "\003" #define TR_VRENCODERS "REa""REb" @@ -357,12 +365,12 @@ #define TR_VFAILSAFE "Utrzymuj\0""Własne\0 ""0 sygnału" #if defined(MAVLINK) - #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" - #define LEN_MAVLINK_AC_MODES "\011" - #define TR_MAVLINK_AC_MODES "Stabilizacja""Akro ""Alt Hold ""Auto ""Sterowany ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " - #define LEN_MAVLINK_AP_MODES "\015" - #define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID " + #define LEN_MAVLINK_BAUDS "\006" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define LEN_MAVLINK_AC_MODES "\011" + #define TR_MAVLINK_AC_MODES "Stabiliz.""Akro ""Alt Hold ""Auto ""Sterowany""Loiter ""RTL ""Koło ""Utrzymuj ""Ląduj ""OF Loiter""Toy A ""Toy M ""BŁĘDNY " + #define LEN_MAVLINK_AP_MODES "\015" + #define TR_MAVLINK_AP_MODES "Ręczny ""Koło ""Stabilizacja ""Trening ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Sterowany ""Inicjalizacja""BŁĘDNY " #endif // ZERO TERMINATED STRINGS @@ -376,7 +384,7 @@ #define TR_ENTER "[MENU]" #endif -#define TR_POPUPS TR_ENTER"\010[EXIT]" +#define TR_POPUPS TR_ENTER"\010[WYJŚCIE]" #define OFS_EXIT sizeof(TR_ENTER) #define TR_MENUWHENDONE CENTER "\007"TR_ENTER" > DALEJ" @@ -389,7 +397,12 @@ #define TR_MODELNAME "Nazwa modelu" #define TR_PHASENAME "Nazwa" #define TR_MIXNAME "Nazwa" -#define TR_EXPONAME "Nazwa" +#define TR_INPUTNAME "Wpisz Nazw" +#if defined(PCBTARANIS) + #define TR_EXPONAME "Linia Nazw" +#else + #define TR_EXPONAME "Nazwa" +#endif #define TR_BITMAP "Obrazek" #define TR_TIMER "Timer " #define TR_ELIMITS TR("Limit+25%", "Kanał +/- 125%") @@ -399,21 +412,21 @@ #define TR_TTRIM TR("Trymer gazu", "Trymer gazu") #define TR_BEEPCTR "(\043)Pikanie środka" #define TR_PROTO INDENT"Protokól" -#define TR_PPMFRAME "PPM frame" +#define TR_PPMFRAME "Ramka PPM" #define TR_MS "ms" #define TR_SWITCH "Przełącznik" #define TR_TRIMS "Trymery" #define TR_FADEIN "Pojawianie" #define TR_FADEOUT "Zanikanie" #define TR_DEFAULT "(Bazowa)" -#define TR_CHECKTRIMS "\006Sprawdź \012 Trymery" +#define TR_CHECKTRIMS "\006Spr \012 Trymery" #define OFS_CHECKTRIMS (9*FW) #define TR_SWASHTYPE "Typ tarczy" #define TR_COLLECTIVE "Kolektyw" #define TR_SWASHRING "Tarcza" #define TR_ELEDIRECTION "Ster Wysokości" #define TR_AILDIRECTION "\012Lotki" -#define TR_COLDIRECTION "\012Kolektwy" +#define TR_COLDIRECTION "\012Kolektyw" #define TR_MODE INDENT"Tryb" #define TR_NOFREEEXPO "Brak wolnych expo!" #define TR_NOFREEMIXER "Brak wolnych mix!" @@ -425,7 +438,7 @@ #define TR_SIDE "Strona" #define TR_DIFFERENTIAL "Różn.wychyleń" #define TR_OFFSET INDENT"Ofset" -#define TR_TRIM "Trim" +#define TR_TRIM "Trymer" #define TR_DREX "DRex" #define TR_CURVE "Krzywa" #define TR_FLMODE "Tryb" @@ -472,11 +485,11 @@ #define TR_SWITCHWARNING "(\043)Przełącznik" #define TR_TIMEZONE "Strefa czasowa" #define TR_RXCHANNELORD TR("Kolejność kanałów", "Bazowa kolejność kanałów") -#define TR_SLAVE "Podrzędny" +#define TR_SLAVE "Uczeń" #define TR_MODESRC " Tryb\006% Źródło" #define TR_MULTIPLIER "Połącznie" #define TR_CAL "Kal." -#define TR_VTRIM "Trim- +" +#define TR_VTRIM "Trymer- +" #define TR_BG "BG:" #define TR_MENUTOSTART CENTER "\007" TR_ENTER " = START" #define TR_SETMIDPOINT TR(CENTER "\001Ustaw drążki/potencj na środku","\005Ustaw drązki/potencj na środku") @@ -486,25 +499,25 @@ #define OFS_RX 4 #define TR_ACCEL "Acc:" #define TR_NODATA CENTER "NO DATA" -#define TR_TM1TM2 "TM1\032TM2" -#define TR_THRTHP "THR\032TH%" +#define TR_TM1TM2 "TM1\037\146TM2" +#define TR_THRTHP "THR\037\146TH%" #define TR_TOT "TOT" -#define TR_TMR1LATMAXUS "Tmr1Lat max\006us" +#define TR_TMR1LATMAXUS "Tmr1Lat max\037\124us" #define STR_US (STR_TMR1LATMAXUS+12) -#define TR_TMR1LATMINUS "Tmr1Lat min\006us" -#define TR_TMR1JITTERUS "Tmr1 Jitter\006us" +#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us" +#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us" #if defined(CPUARM) - #define TR_TMIXMAXMS "Tmix max\012ms" + #define TR_TMIXMAXMS "Tmix max" + #define TR_FREESTACKMINB "Wolny stos" #else - #define TR_TMIXMAXMS "Tmix max\014ms" + #define TR_TMIXMAXMS "Tmix max\037\124ms" + #define TR_FREESTACKMINB "Wolny stos\037\124b" #endif -#define TR_T10MSUS "T10ms\016us" -#define TR_FREESTACKMINB "Free Stack\010b" #define TR_MENUTORESET CENTER TR_ENTER" >> Reset" #define TR_PPM "PPM" -#define TR_CH "Kan" +#define TR_CH "KN" #define TR_MODEL "MODEL" #define TR_FP "FL" #define TR_MIX "MIX" @@ -531,18 +544,21 @@ #define TR_MENUFLIGHTPHASES "FAZY LOTU" #define TR_MENUHELISETUP "HELI" - -// Alignment - - -#define TR_MENUINPUTS "DR/EXPO" -#define TR_MENULIMITS "LIMITY" - +#if defined(PCBTARANIS) + #define TR_MENUINPUTS "WEJŚCIA" + #define TR_MENULIMITS "SERWA" +#elif defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_LIMITS_SYMETRICAL) // The right menu titles for the gurus ... + #define TR_MENUINPUTS "DRĄŻKI" + #define TR_MENULIMITS "SERWA" +#else + #define TR_MENUINPUTS "DR/EXPO" + #define TR_MENULIMITS "LIMITY" +#endif #define TR_MENUCURVES "KRZYWE" -#define TR_MENUCURVE "\002k" -#define TR_MENUCUSTOMSWITCH "PRZEŁĄCZNIK LOGICZNY" -#define TR_MENUCUSTOMSWITCHES "Przełączniki logiczne" +#define TR_MENUCURVE "KRZYWA" +#define TR_MENUCUSTOMSWITCH "PRZEŁ. LOGICZNY" +#define TR_MENUCUSTOMSWITCHES TR("PRZEŁ. LOG.", "PRZEŁ. LOGICZNE") #define TR_MENUCUSTOMFUNC "FUNKCJE SPECJALNE" #define TR_MENUTELEMETRY "TELEMETRIA" #define TR_MENUTEMPLATES "SZABLONY" @@ -620,7 +636,7 @@ #define TR_GLOBAL_VARS "Zmienne globalne" #define TR_GLOBAL_VAR "Zmienna globalna" #define TR_MENUGLOBALVARS "ZMIENNE GLOBALNE" -#define TR_OWN " Własność " +#define TR_OWN "Własność" #define TR_DATE "Data" #define TR_ROTARY_ENCODER "R.Encs" #define TR_CHANNELS_MONITOR "MONITOR KANAŁÓW" @@ -651,42 +667,44 @@ #define TR_BUZZER INDENT"Brzęczyk" #define TR_BYTES "[B]" #define TR_MODULE_BIND "[Bind]" -#define TR_MODULE_RANGE "[Zasieg]" +#define TR_MODULE_RANGE "Zasięg" #define TR_RESET_BTN "[Reset]" #define TR_SET "[Ustaw]" #define TR_TRAINER "Trener" #define TR_ANTENNAPROBLEM CENTER "Problem z anteną TX" -#define TR_MODELIDUSED TR("ID już użyte","ID modelu już użyte") +#define TR_MODELIDUSED TR("ID zajęte","ID modelu zajęte") #define TR_MODULE INDENT "Moduł" #define TR_CHANNELRANGE INDENT "Zakres kanału" #define TR_LOWALARM INDENT "Alarm niski" #define TR_CRITICALALARM INDENT "Alarm krytyczny" -#define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_PERSISTENT_MAH INDENT "Zapisz mAh" +#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset") +#define TR_UART3MODE "Port szreg." #if defined(MAVLINK) - #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" - #define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN" - #define TR_MAVMENUSETUP_TITLE "Mavlink Setup" - #define TR_MAVLINK_BAUD_LABEL "Baudrate" - #define TR_MAVLINK_INFOS "INFOS" - #define TR_MAVLINK_MODE "MODE" - #define TR_MAVLINK_CUR_MODE "Current Mode" - #define TR_MAVLINK_ARMED "Armed" - #define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI" - #define TR_MAVLINK_BATTERY_LABEL "Status baterii " - #define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI" - #define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI" - #define TR_MAVLINK_NAV_MENU_TITLE "NAV" - #define TR_MAVLINK_COURSE "Kurs" - #define TR_MAVLINK_HEADING "Kierunek" - #define TR_MAVLINK_BEARING "Orientacja" - #define TR_MAVLINK_ALTITUDE "Wysokość" - #define TR_MAVLINK_GPS "GPS" - #define TR_MAVLINK_NO_FIX "NO Fix" - #define TR_MAVLINK_SAT "SAT" - #define TR_MAVLINK_HDOP "HDOP" - #define TR_MAVLINK_LAT "LAT" - #define TR_MAVLINK_LON "LON" + #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" + #define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN" + #define TR_MAVMENUSETUP_TITLE "Mavlink Setup" + #define TR_MAVLINK_BAUD_LABEL "Baudrate" + #define TR_MAVLINK_INFOS "INFO" + #define TR_MAVLINK_MODE "TRYB" + #define TR_MAVLINK_CUR_MODE "Aktualy Tryb" + #define TR_MAVLINK_ARMED "Armed" + #define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI" + #define TR_MAVLINK_BATTERY_LABEL "Status baterii " + #define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI" + #define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI" + #define TR_MAVLINK_NAV_MENU_TITLE "NAV" + #define TR_MAVLINK_COURSE "Kurs" + #define TR_MAVLINK_HEADING "Kierunek" + #define TR_MAVLINK_BEARING "Orientacja" + #define TR_MAVLINK_ALTITUDE "Wysokość" + #define TR_MAVLINK_GPS "GPS" + #define TR_MAVLINK_NO_FIX "NO Fix" + #define TR_MAVLINK_SAT "SAT" + #define TR_MAVLINK_HDOP "HDOP" + #define TR_MAVLINK_LAT "SZER" + #define TR_MAVLINK_LON "DLUG" #endif // Taranis column headers @@ -695,7 +713,7 @@ #define TR_CSW_HEADERS { " Funkcja ", " Param. 1 ", " Param 2 ", " AND Przełącznik ", " Czas trwania ", " Opóźnienie " } //Taranis About screen -#define TR_ABOUTUS TR(" ABOUT ", "ABOUT") +#define TR_ABOUTUS TR(" O ", " O") #define TR_ABOUT_OPENTX_1 TR("OpenTX\001is\001open\001source,\001non", "OpenTX is open source, non-") #define TR_ABOUT_OPENTX_2 TR("commercial,\001wo\001warranties.", "commercial and comes with no") @@ -704,21 +722,21 @@ #define TR_ABOUT_OPENTX_5 TR("is welcome!", "donations is welcome!") #define TR_ABOUT_BERTRAND_1 "Bertrand Songis" -#define TR_ABOUT_BERTRAND_2 "OpenTX main author" -#define TR_ABOUT_BERTRAND_3 "Companion9x co-author" +#define TR_ABOUT_BERTRAND_2 "OpenTX główny autor" +#define TR_ABOUT_BERTRAND_3 "Companion9x współ-autor" #define TR_ABOUT_MIKE_1 "Mike Blandford" -#define TR_ABOUT_MIKE_2 "Code and drivers guru" +#define TR_ABOUT_MIKE_2 "Guru kodu i driwerów" #define TR_ABOUT_MIKE_3 TR("Arguably,\001one\001of\001the\001best", "Arguably, one of the best") #define TR_ABOUT_MIKE_4 "Inspirational" #define TR_ABOUT_ROMOLO_1 "Romolo Manfredini" -#define TR_ABOUT_ROMOLO_2 "Companion9x co-author" +#define TR_ABOUT_ROMOLO_2 "Companion9x współ-autor" #define TR_ABOUT_ROMOLO_3 "" #define TR_ABOUT_ANDRE_1 "Andre Bernet" -#define TR_ABOUT_ANDRE_2 "Functionality, usability," -#define TR_ABOUT_ANDRE_3 "debugging, documentation" +#define TR_ABOUT_ANDRE_2 "Funkcjonalność, użytkowość," +#define TR_ABOUT_ANDRE_3 "debugging, documentacja" #define TR_ABOUT_ROB_1 "Rob Thomson" #define TR_ABOUT_ROB_2 "openrcforums webmaster" @@ -732,7 +750,7 @@ #define TR_ABOUT_HARDWARE_3 "Współautor firmware" #else #define TR_ABOUT_HARDWARE_1 "Brent Nelson" - #define TR_ABOUT_HARDWARE_2 "Sky9x designer/producent" + #define TR_ABOUT_HARDWARE_2 "Sky9x twórca/producent" #define TR_ABOUT_HARDWARE_3 "" #endif @@ -745,8 +763,14 @@ #define TR_CHR_LONG 'l' #define TR_CHR_TOGGLE 't' #define TR_CHR_HOUR 'h' +#define TR_CHR_INPUT 'I' // Values between A-I will work #define TR_BEEP_VOLUME "Głośność pikania" #define TR_WAV_VOLUME "Głośność wav" #define TR_VARIO_VOLUME "Głośność wario" #define TR_BG_VOLUME "Głośnośc tła " + +#define TR_TOP_BAR "Górny Pasek" +#define TR_ALTITUDE INDENT "Wysokość" +#define TR_MODS_FORBIDDEN "Modyfikacje zabronione!" +#define TR_UNLOCKED "Odblokowane" diff --git a/radio/src/translations/pt.h.txt b/radio/src/translations/pt.h.txt index 7361bb86f..a17f9af2f 100644 --- a/radio/src/translations/pt.h.txt +++ b/radio/src/translations/pt.h.txt @@ -23,6 +23,7 @@ * * * + * * !!!!! DO NOT EDIT pt.h - EDIT pt.h.txt INSTEAD !!!!!!! * * In order to make translations easier pt.h.txt is parsed and national @@ -32,7 +33,12 @@ * * !!!!! DO NOT EDIT pt.h - EDIT pt.h.txt INSTEAD !!!!!!! */ - + /* Formatting octal codes available in TR_ strings: + * \037\x -sets LCD x-coord (x value in octal) + * \036 -newline (ARM boards only) + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ // NON ZERO TERMINATED STRINGS #define LEN_OFFON "\003" @@ -62,6 +68,9 @@ #define LEN_TRNCHN "\003" #define TR_TRNCHN "CH1CH2CH3CH4" +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART" + #define LEN_DATETIME "\005" #define TR_DATETIME "DATA:""HORA:" @@ -206,23 +215,23 @@ #define TR_VFSWFUNC "Seguro\0 ""Aprendiz\0 ""Ajuste Rapido" TR_SOUND TR_HAPTIC "Reset\0 " TR_VVARIO TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE "Backlight\0 " TR_CFN_ADJUST_GVAR TR_CFN_TEST #endif -#define LEN_VFSWRESET "\006" +#define LEN_VFSWRESET TR("\004", "\011") #if defined(FRSKY) - #define TR_FSW_RESET_TELEM "Telem." + #define TR_FSW_RESET_TELEM TR("Telm", "Telemetry") #else - #define TR_FSW_RESET_TELEM + #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", "RotEnc A\0""RotEnc B\0") #elif ROTARY_ENCODERS == 1 - #define TR_FSW_RESET_ROTENC TR("R.Enc", "RotEnc\0 ") + #define TR_FSW_RESET_ROTENC TR("R.E.", "RotEnc\0 ") #else #define TR_FSW_RESET_ROTENC #endif -#define TR_VFSWRESET "Tempo1""Tempo2""Todo " 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 ""All\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 ""Avis1 ""Avis2 ""Cheep ""Ratata""Tick ""Siren ""Ring ""SciFi ""Robot ""Chirp ""Tada ""Crickt""AlmClk") @@ -356,12 +365,12 @@ #define TR_VFAILSAFE "Hold\0 ""Custom\0 ""No pulses" #if defined(MAVLINK) - #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" - #define LEN_MAVLINK_AC_MODES "\011" - #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " - #define LEN_MAVLINK_AP_MODES "\015" - #define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID " + #define LEN_MAVLINK_BAUDS "\006" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define LEN_MAVLINK_AC_MODES "\011" + #define TR_MAVLINK_AC_MODES "Stabilize""Acro ""Alt Hold ""Auto ""Guided ""Loiter ""RTL ""Circle ""Pos Hold ""Land ""OF Loiter""Toy A ""Toy M ""INVALID " + #define LEN_MAVLINK_AP_MODES "\015" + #define TR_MAVLINK_AP_MODES "Manual ""Circle ""Stabilize ""Training ""Fly by Wire A""Fly by Wire A""Auto ""RTL ""Loiter ""Guided ""Initialising ""INVALID " #endif // ZERO TERMINATED STRINGS @@ -388,7 +397,12 @@ #define TR_MODELNAME "Model Name" #define TR_PHASENAME "Phase Name" #define TR_MIXNAME "Mix Name" -#define TR_EXPONAME "Expo Name" +#define TR_INPUTNAME "Input Name" +#if defined(PCBTARANIS) + #define TR_EXPONAME "Line Name" +#else + #define TR_EXPONAME "Expo Name" +#endif #define TR_BITMAP "Model Image" #define TR_TIMER "Cronom" #define TR_ELIMITS "E.Limits" @@ -485,22 +499,22 @@ #define OFS_RX 4 #define TR_ACCEL "Acc:" #define TR_NODATA CENTER"SEM DADOS" -#define TR_TM1TM2 "TM1\032TM2" -#define TR_THRTHP "MTR\032MT%" +#define TR_TM1TM2 "TM1\037\146TM2" +#define TR_THRTHP "THR\037\146TH%" #define TR_TOT "TOT" -#define TR_TMR1LATMAXUS "Tmr1Lat max\006us" -#define STR_US (STR_TMR1LATMAXUS+12) -#define TR_TMR1LATMINUS "Tmr1Lat min\006us" -#define TR_TMR1JITTERUS "Tmr1 Jitter\006us" +#define TR_TMR1LATMAXUS "Tmr1Lat max\037\124us" +#define STR_US (STR_TMR1LATMAXUS+13) +#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us" +#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us" #if defined(CPUARM) - #define TR_TMIXMAXMS "Tmix max\012ms" + #define TR_TMIXMAXMS "Tmix max" + #define TR_FREESTACKMINB "Free Stack" #else - #define TR_TMIXMAXMS "Tmix max\014ms" + #define TR_TMIXMAXMS "Tmix max\037\124ms" + #define TR_FREESTACKMINB "Pilha Livre\037\124b" #endif -#define TR_T10MSUS "T10ms\016us" -#define TR_FREESTACKMINB "Pilha Livre\010b" #define TR_MENUTORESET CENTER TR_ENTER" Reinicia" #define TR_PPM "PPM" #define TR_CH "CH" @@ -530,6 +544,9 @@ #define TR_MENUFLIGHTPHASES "MODOS DE VOO" #define TR_MENUHELISETUP "HELI SETUP" + +// Alignment + #if defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_LIMITS_SYMETRICAL) // The right menu titles for the gurus ... #define TR_MENUINPUTS "STICKS" #define TR_MENULIMITS "SAIDAS" @@ -661,31 +678,33 @@ #define TR_LOWALARM INDENT "Low Alarm" #define TR_CRITICALALARM INDENT "Critical Alarm" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset") +#define TR_UART3MODE "Serial port" #if defined(MAVLINK) - #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" - #define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN" - #define TR_MAVMENUSETUP_TITLE "Mavlink Setup" - #define TR_MAVLINK_BAUD_LABEL "Baudrate" - #define TR_MAVLINK_INFOS "INFOS" - #define TR_MAVLINK_MODE "MODE" - #define TR_MAVLINK_CUR_MODE "Current Mode" - #define TR_MAVLINK_ARMED "Armed" - #define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI" - #define TR_MAVLINK_BATTERY_LABEL "Flight Battery status" - #define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI" - #define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI" - #define TR_MAVLINK_NAV_MENU_TITLE "NAV" - #define TR_MAVLINK_COURSE "Course" - #define TR_MAVLINK_HEADING "Heading" - #define TR_MAVLINK_BEARING "Bearing" - #define TR_MAVLINK_ALTITUDE "Altitude" - #define TR_MAVLINK_GPS "GPS" - #define TR_MAVLINK_NO_FIX "NO Fix" - #define TR_MAVLINK_SAT "SAT" - #define TR_MAVLINK_HDOP "HDOP" - #define TR_MAVLINK_LAT "LAT" - #define TR_MAVLINK_LON "LON" + #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" + #define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN" + #define TR_MAVMENUSETUP_TITLE "Mavlink Setup" + #define TR_MAVLINK_BAUD_LABEL "Baudrate" + #define TR_MAVLINK_INFOS "INFOS" + #define TR_MAVLINK_MODE "MODE" + #define TR_MAVLINK_CUR_MODE "Current Mode" + #define TR_MAVLINK_ARMED "Armed" + #define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI" + #define TR_MAVLINK_BATTERY_LABEL "Flight Battery status" + #define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI" + #define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI" + #define TR_MAVLINK_NAV_MENU_TITLE "NAV" + #define TR_MAVLINK_COURSE "Course" + #define TR_MAVLINK_HEADING "Heading" + #define TR_MAVLINK_BEARING "Bearing" + #define TR_MAVLINK_ALTITUDE "Altitude" + #define TR_MAVLINK_GPS "GPS" + #define TR_MAVLINK_NO_FIX "NO Fix" + #define TR_MAVLINK_SAT "SAT" + #define TR_MAVLINK_HDOP "HDOP" + #define TR_MAVLINK_LAT "LAT" + #define TR_MAVLINK_LON "LON" #endif // Taranis column headers @@ -744,8 +763,14 @@ #define TR_CHR_LONG 'l' #define TR_CHR_TOGGLE 't' #define TR_CHR_HOUR 'h' +#define TR_CHR_INPUT 'I' // Values between A-I will work #define TR_BEEP_VOLUME "Beep Volume" #define TR_WAV_VOLUME "Wav Volume" #define TR_VARIO_VOLUME "Vario Volume" #define TR_BG_VOLUME "Bg Volume" + +#define TR_TOP_BAR "Top Bar" +#define TR_ALTITUDE INDENT "Altitude" +#define TR_MODS_FORBIDDEN "Modifications forbidden!" +#define TR_UNLOCKED "Unlocked" diff --git a/radio/src/translations/se.h.txt b/radio/src/translations/se.h.txt index 71e5ede3f..60bc0c6b2 100644 --- a/radio/src/translations/se.h.txt +++ b/radio/src/translations/se.h.txt @@ -23,6 +23,7 @@ * * * + * * !!!!! DO NOT EDIT se.h - EDIT se.h.txt INSTEAD !!!!!!! * * In order to make translations easier se.h.txt is parsed and national @@ -32,7 +33,12 @@ * * !!!!! DO NOT EDIT se.h - EDIT se.h.txt INSTEAD !!!!!!! */ - + /* Formatting octal codes available in TR_ strings: + * \037\x -sets LCD x-coord (x value in octal) + * \036 -newline (ARM boards only) + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ // NON ZERO TERMINATED STRINGS #define LEN_OFFON "\003" @@ -62,6 +68,9 @@ #define LEN_TRNCHN "\003" #define TR_TRNCHN "KN1KN2KN3KN4" +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "Av\0 ""SPORT-spegel\0 ""VirtuellSP2UART" + #define LEN_DATETIME "\005" #define TR_DATETIME "DAG: ""TID: " @@ -206,23 +215,23 @@ #define TR_VFSWFUNC "Säkra\0 ""Trainer\0 ""Sätt Trim\0" TR_SOUND TR_HAPTIC "Nollställ\0" TR_VVARIO TR_PLAY_TRACK TR_PLAY_BOTH TR_PLAY_VALUE "Belysning\0" TR_CFN_ADJUST_GVAR TR_CFN_TEST #endif -#define LEN_VFSWRESET TR("\005", "\011") +#define LEN_VFSWRESET TR("\004", "\011") #if defined(FRSKY) - #define TR_FSW_RESET_TELEM TR("Telem", "Telemetri") + #define TR_FSW_RESET_TELEM TR("Telm", "Telemetry") #else - #define TR_FSW_RESET_TELEM + #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", "RotEnc A\0""RotEnc B\0") #elif ROTARY_ENCODERS == 1 - #define TR_FSW_RESET_ROTENC TR("R.Enc", "RotEnc\0 ") + #define TR_FSW_RESET_ROTENC TR("R.E.", "RotEnc\0 ") #else #define TR_FSW_RESET_ROTENC #endif -#define TR_VFSWRESET TR("Tmr1\0""Tmr2\0""Allt\0" TR_FSW_RESET_TELEM TR_FSW_RESET_ROTENC, "Timer 1 ""Timer 2 ""Allt " 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 ""All\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") @@ -314,11 +323,11 @@ #endif #if defined(CPUARM) - #define TR_CUSTOMSW "CS1""CS2""CS3""CS4""CS5""CS6""CS7""CS8""CS9""CSA""CSB""CSC""CSD""CSE""CSF""CSG""CSH""CSI""CSJ""CSK""CSL""CSM""CSN""CSO""CSP""CSQ""CSR""CSS""CST""CSU""CSV""CSW" + #define TR_CUSTOMSW "LB1""LB2""LB3""LB4""LB5""LB6""LB7""LB8""LB9""LBA""LBB""LBC""LBD""LBE""LBF""LBG""LBH""LBI""LBJ""LBK""LBL""LBM""LBN""LBO""LBP""LBQ""LBR""LBS""LBT""LBU""LBV""LBW" #elif defined(PCBGRUVIN9X) || defined(CPUM2561) || defined(CPUM128) - #define TR_CUSTOMSW "CS1""CS2""CS3""CS4""CS5""CS6""CS7""CS8""CS9""CSA""CSB""CSC""CSD""CSE""CSF" + #define TR_CUSTOMSW "LB1""LB2""LB3""LB4""LB5""LB6""LB7""LB8""LB9""LBA""LBB""LBC""LBD""LBE""LBF" #else - #define TR_CUSTOMSW "CS1""CS2""CS3""CS4""CS5""CS6""CS7""CS8""CS9""CSA""CSB""CSC" + #define TR_CUSTOMSW "LB1""LB2""LB3""LB4""LB5""LB6""LB7""LB8""LB9""LBA""LBB""LBC" #endif #if defined(PCBTARANIS) @@ -339,9 +348,9 @@ #endif #if defined(HELI) - #define TR_CYC_VSRCRAW "CYK1""CYK2""CYK3" + #define TR_CYC_VSRCRAW "CYK1""CYK2""CYK3" #else - #define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]" + #define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]" #endif #define TR_VSRCRAW "---\0""Rod\0""Höj\0""Gas\0""Ske\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS_VSRCRAW "MAX " TR_CYC_VSRCRAW "TrmR" "TrmH" "TrmG" "TrmS" TR_SW_VSRCRAW @@ -356,12 +365,12 @@ #define TR_VFAILSAFE "Håll\0 ""Special\0 ""Pulsfritt" #if defined(MAVLINK) - #define LEN_MAVLINK_BAUDS "\006" - #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" - #define LEN_MAVLINK_AC_MODES "\011" - #define TR_MAVLINK_AC_MODES "Stabil ""Akrobat ""Lås Höjd ""Automat ""Guidad ""Hovra ""Flyg Hem ""Cirkla ""Håll Pos.""Landa ""OF Hovra ""Leksak A ""Leksak M ""OGILTIG " - #define LEN_MAVLINK_AP_MODES "\015" - #define TR_MAVLINK_AP_MODES "Manuell ""Cirkla ""Stabilisera ""Övning ""Fly by Wire A""Fly by Wire A""Automatisk ""Flyg Hem ""Hovra ""Guidad ""Initialiserar""OGILTIG " + #define LEN_MAVLINK_BAUDS "\006" + #define TR_MAVLINK_BAUDS "4800 ""9600 ""14400 ""19200 ""38400 ""57600 ""76800 ""115200" + #define LEN_MAVLINK_AC_MODES "\011" + #define TR_MAVLINK_AC_MODES "Stabil ""Akrobat ""Lås Höjd ""Automat ""Guidad ""Hovra ""Flyg Hem ""Cirkla ""Håll Pos.""Landa ""OF Hovra ""Leksak A ""Leksak M ""OGILTIG " + #define LEN_MAVLINK_AP_MODES "\015" + #define TR_MAVLINK_AP_MODES "Manuell ""Cirkla ""Stabilisera ""Övning ""Fly by Wire A""Fly by Wire A""Automatisk ""Flyg Hem ""Hovra ""Guidad ""Initialiserar""OGILTIG " #endif // ZERO TERMINATED STRINGS @@ -386,9 +395,14 @@ #define TR_LOADINGMODEL "Laddar Modell " #define TR_NAME "Namn" #define TR_MODELNAME "Modellnamn" -#define TR_PHASENAME "Modnamn " +#define TR_PHASENAME "Lägesnamn " #define TR_MIXNAME "Mixnamn " -#define TR_EXPONAME "Exponamn " +#define TR_INPUTNAME "Filternamn" +#if defined(PCBTARANIS) + #define TR_EXPONAME "Linjenamn" +#else + #define TR_EXPONAME "Exponamn" +#endif #define TR_BITMAP "Modellikon" #define TR_TIMER TR("Timer","Timer ") #define TR_ELIMITS TR("Gränser++","Utökade Gränser") @@ -485,22 +499,22 @@ #define OFS_RX 4 #define TR_ACCEL "Acc:" #define TR_NODATA CENTER "NO DATA" -#define TR_TM1TM2 "TM1\032TM2" -#define TR_THRTHP "THR\032TH%" +#define TR_TM1TM2 "TM1\037\146TM2" +#define TR_THRTHP "THR\037\146TH%" #define TR_TOT "TOT" -#define TR_TMR1LATMAXUS "Tmr1Lat max\006us" -#define STR_US (STR_TMR1LATMAXUS+12) -#define TR_TMR1LATMINUS "Tmr1Lat min\006us" -#define TR_TMR1JITTERUS "Tmr1 Jitter\006us" +#define TR_TMR1LATMAXUS "Tmr1Lat max\037\124us" +#define STR_US (STR_TMR1LATMAXUS+13) +#define TR_TMR1LATMINUS "Tmr1Lat min\037\124us" +#define TR_TMR1JITTERUS "Tmr1 Jitter\037\124us" #if defined(CPUARM) - #define TR_TMIXMAXMS "Tmix max\012ms" + #define TR_TMIXMAXMS "Tmix max" + #define TR_FREESTACKMINB "Free Stack" #else - #define TR_TMIXMAXMS "Tmix max\014ms" + #define TR_TMIXMAXMS "Tmix max\037\124ms" + #define TR_FREESTACKMINB "Free Stack\037\124b" #endif -#define TR_T10MSUS "T10ms\016us" -#define TR_FREESTACKMINB "Free Stack\010b" #define TR_MENUTORESET CENTER TR_ENTER " Nollar" #define TR_PPM "PPM" #define TR_CH "KN" @@ -531,7 +545,7 @@ #define TR_MENUHELISETUP "Helikopter" #if defined(PCBTARANIS) - #define TR_MENUINPUTS "INPUTS" + #define TR_MENUINPUTS "Filter" #define TR_MENULIMITS "Gränser" #elif defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_LIMITS_SYMETRICAL) // The right menu titles for the gurus ... #define TR_MENUINPUTS "Spakar" @@ -664,35 +678,35 @@ #define TR_LOWALARM INDENT "Låg-alarm" #define TR_CRITICALALARM INDENT "Kritiskt alarm" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset") +#define TR_UART3MODE "Serieport" #if defined(MAVLINK) - #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" - #define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN" - #define TR_MAVMENUSETUP_TITLE "MavlinkInställningar" - #define TR_MAVLINK_BAUD_LABEL "Baudrate" - #define TR_MAVLINK_INFOS "INFOS" - #define TR_MAVLINK_MODE "LÄGE" - #define TR_MAVLINK_CUR_MODE "Nuvarande Läge" - #define TR_MAVLINK_ARMED "Osäkrad" - #define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI" - #define TR_MAVLINK_BATTERY_LABEL "Status för flygbatteri" - #define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI" - #define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI" - #define TR_MAVLINK_NAV_MENU_TITLE "NAV" - #define TR_MAVLINK_COURSE "Kurs" - #define TR_MAVLINK_HEADING "Riktning" - #define TR_MAVLINK_BEARING "Bäring" - #define TR_MAVLINK_ALTITUDE "Höjd" - #define TR_MAVLINK_GPS "GPS" - #define TR_MAVLINK_NO_FIX "NO Fix" - #define TR_MAVLINK_SAT "SAT" - #define TR_MAVLINK_HDOP "HDOP" - #define TR_MAVLINK_LAT "LAT" - #define TR_MAVLINK_LON "LON" + #define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI" + #define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN" + #define TR_MAVMENUSETUP_TITLE "MavlinkInställningar" + #define TR_MAVLINK_BAUD_LABEL "Baudrate" + #define TR_MAVLINK_INFOS "INFOS" + #define TR_MAVLINK_MODE "LÄGE" + #define TR_MAVLINK_CUR_MODE "Nuvarande Läge" + #define TR_MAVLINK_ARMED "Osäkrad" + #define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI" + #define TR_MAVLINK_BATTERY_LABEL "Status för flygbatteri" + #define TR_MAVLINK_RC_RSSI_LABEL "RC RSSI" + #define TR_MAVLINK_PC_RSSI_LABEL "PC RSSI" + #define TR_MAVLINK_NAV_MENU_TITLE "NAV" + #define TR_MAVLINK_COURSE "Kurs" + #define TR_MAVLINK_HEADING "Riktning" + #define TR_MAVLINK_BEARING "Bäring" + #define TR_MAVLINK_ALTITUDE "Höjd" + #define TR_MAVLINK_GPS "GPS" + #define TR_MAVLINK_NO_FIX "NO Fix" + #define TR_MAVLINK_SAT "SAT" + #define TR_MAVLINK_HDOP "HDOP" + #define TR_MAVLINK_LAT "LAT" + #define TR_MAVLINK_LON "LON" #endif - - // Taranis column headers #define TR_PHASES_HEADERS { " Namn ", " Brytare ", " Trimmar ", " Tona Upp ", " Tona Ned " } #define TR_LIMITS_HEADERS { " Namn ", " Offset ", " Min ", " Max ", " Riktning ", " PPM-centrum ", " Symmetriskt " } @@ -745,12 +759,18 @@ #define TR_ABOUT_PARENTS_3 "ER9X (Erez Raviv)" #define TR_ABOUT_PARENTS_4 "TH9X (Thomas Husterer)" -#define TR_CHR_SHORT 's' -#define TR_CHR_LONG 'l' -#define TR_CHR_TOGGLE 't' -#define TR_CHR_HOUR 'h' +#define TR_CHR_SHORT 's' +#define TR_CHR_LONG 'l' +#define TR_CHR_TOGGLE 't' +#define TR_CHR_HOUR 'h' +#define TR_CHR_INPUT 'F' // Values between A-I will work #define TR_BEEP_VOLUME "Volym Pip" #define TR_WAV_VOLUME "Volym Wav" #define TR_VARIO_VOLUME "Volym Vario" #define TR_BG_VOLUME "Volym Bg" + +#define TR_TOP_BAR "Top Bar" +#define TR_ALTITUDE INDENT "Höjd" +#define TR_MODS_FORBIDDEN "Modifikationer förbjudna!" +#define TR_UNLOCKED "Olåst"