diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..3e0c0844a --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/.*project +/.settings +/.autotools diff --git a/CREDITS.txt b/CREDITS.txt index c9f3d46c8..4d36d8d36 100644 --- a/CREDITS.txt +++ b/CREDITS.txt @@ -19,3 +19,4 @@ Grootwitbaas - 9xforums.com (mac) Adrian Amberg (splash screens) Wallaguest1 - 9xforums.com (splash screens) HC1969 - 9xforums.com (splash screens) + diff --git a/DONATIONS.txt b/DONATIONS.txt index fef01b05d..2c53a5b43 100644 --- a/DONATIONS.txt +++ b/DONATIONS.txt @@ -95,8 +95,7 @@ Heinrich Illig Michael Collins Michael Manning Craig Lorentz -Jonathan Modellismo - http://jonathan.it -Aviomotive - http://www.aviomotive.com +Jonathan Modellismo - jonathan.it André Lasseret Felipe Alexandre de Oliveira Brian Harris @@ -126,7 +125,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 @@ -288,3 +287,47 @@ 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 +Paul Oldenkamp +Dietmar Drees +Bradley Murchie +Richard Fahie +James Kaufman +Henry Deucker +Christian Fuchs +Arold Reinders +Robert Miller +Aviomotive - www.aviomotive.com +Mark Gaskievicz +Roland Müller +Frank Gewalt +Remi Viard +Leonard MacKey +Reginald H Millsom +Emanuel Stassar +Pierluigi Sommaruga +Rafael Eric Suarez Nordlow +A Harris +Stefan Grunenberg +Francisco Gutierrez Muñoz +Steve Coley +Sean Cull +Roberto Orsello 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 85e3db295..73d21daff 100644 --- a/companion/src/CMakeLists.txt +++ b/companion/src/CMakeLists.txt @@ -1,7 +1,7 @@ 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 ) @@ -72,170 +72,135 @@ ELSE( ) LINK_DIRECTORIES( /usr/local/lib ) ENDIF( ) -INCLUDE_DIRECTORIES( ${XSD_INCLUDE_DIR} ) +set(RADIO_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/../../radio/src) +set(SIMU_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/simulation) +set(COMPANION_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}) -FIND_PACKAGE( Subversion ) -SET( C9X_WC_REVISION 0 ) -IF( Subversion_FOUND ) - # Subversion_WC_INFO( ${PROJECT_SOURCE_DIR} C9X ) -ENDIF( ) - -INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/../.. ${PROJECT_SOURCE_DIR}/../../radio/src/fonts/std ) - -set(TH9X_CHECKOUT_DIRECTORY ${PROJECT_BINARY_DIR}/firmwares/th9x) add_custom_command( - OUTPUT ${TH9X_CHECKOUT_DIRECTORY}/th9xsimulator.cpp - COMMAND ${CMAKE_COMMAND} -E make_directory ${TH9X_CHECKOUT_DIRECTORY} - COMMAND cd ${TH9X_CHECKOUT_DIRECTORY} && svn checkout http://th9x.googlecode.com/svn/trunk/src@285 . - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/th9x/th9xsimulator.cpp ${TH9X_CHECKOUT_DIRECTORY} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/th9x/th9xsimulator.cpp + OUTPUT ${RADIO_SRC_DIRECTORY}/bitmaps/sticks.lbm + COMMAND make lbm + DEPENDS ${RADIO_SRC_DIRECTORY}/bitmaps/sticks_4x1.xbm + WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY} ) -set(ER9X_CHECKOUT_DIRECTORY ${PROJECT_BINARY_DIR}/firmwares/er9x) add_custom_command( - OUTPUT ${ER9X_CHECKOUT_DIRECTORY}/er9xsimulator.cpp - COMMAND ${CMAKE_COMMAND} -E make_directory ${ER9X_CHECKOUT_DIRECTORY} - COMMAND cd ${ER9X_CHECKOUT_DIRECTORY} && svn checkout http://er9x.googlecode.com/svn/trunk/src@790 . - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/er9x/er9xsimulator.cpp ${ER9X_CHECKOUT_DIRECTORY} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/er9x/er9xsimulator.cpp + OUTPUT ${RADIO_SRC_DIRECTORY}/translations/en.h + COMMAND make tra + DEPENDS ${RADIO_SRC_DIRECTORY}/translations/en.h.txt + WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY} ) -set(ERSKY9X_CHECKOUT_DIRECTORY ${PROJECT_BINARY_DIR}/firmwares/ersky9x) -add_custom_command( - OUTPUT ${ERSKY9X_CHECKOUT_DIRECTORY}/ersky9xsimulator.cpp - COMMAND ${CMAKE_COMMAND} -E make_directory ${ERSKY9X_CHECKOUT_DIRECTORY} - COMMAND cd ${ERSKY9X_CHECKOUT_DIRECTORY} && svn checkout http://ersky9x.googlecode.com/svn/trunk/src@170 . - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/ersky9x/ersky9xsimulator.cpp ${ERSKY9X_CHECKOUT_DIRECTORY} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/ersky9x/ersky9xsimulator.cpp +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${PROJECT_SOURCE_DIR}/../.. + ${SIMU_SRC_DIRECTORY} + ${RADIO_SRC_DIRECTORY} + ${RADIO_SRC_DIRECTORY}/fonts/std + ${RADIO_SRC_DIRECTORY}/lua/src + ${XSD_INCLUDE_DIR} ) add_subdirectory(modeledit) +add_subdirectory(simulation) -SET( companion_SRCS - eeprominterface.cpp - hexinterface.cpp - flashinterface.cpp - file.cpp - xmlinterface.cpp - ${PROJECT_BINARY_DIR}/radio.cxx - firmwares/th9x/th9xeeprom.cpp - firmwares/th9x/th9xinterface.cpp - ${TH9X_CHECKOUT_DIRECTORY}/th9xsimulator.cpp - firmwares/er9x/er9xeeprom.cpp - firmwares/er9x/er9xinterface.cpp - ${ER9X_CHECKOUT_DIRECTORY}/er9xsimulator.cpp - firmwares/gruvin9x/gruvin9xeeprom.cpp - firmwares/gruvin9x/gruvin9xinterface.cpp - firmwares/opentx/opentxeeprom.cpp - firmwares/opentx/open9xStockeeprom.cpp - firmwares/opentx/open9xGruvin9xeeprom.cpp - firmwares/opentx/open9xSky9xeeprom.cpp - firmwares/opentx/opentxinterface.cpp - firmwares/opentx/opentxTaranisSimulator.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 - helpers.cpp - mdichild.cpp - generaledit.cpp - modelslist.cpp - mountlist.cpp - avroutputdialog.cpp - preferencesdialog.cpp - burnconfigdialog.cpp - comparedialog.cpp - contributorsdialog.cpp - customizesplashdialog.cpp - burndialog.cpp - printdialog.cpp - fusesdialog.cpp - logsdialog.cpp - downloaddialog.cpp - simulatordialog.cpp - xsimulatordialog.cpp - splashlibrary.cpp - mainwindow.cpp - main.cpp - modelconfigdialog.cpp - qcustomplot.cpp +set(companion_SRCS + eeprominterface.cpp + hexinterface.cpp + flashinterface.cpp + file.cpp + xmlinterface.cpp + ${PROJECT_BINARY_DIR}/radio.cxx + firmwares/th9x/th9xeeprom.cpp + firmwares/th9x/th9xinterface.cpp + firmwares/er9x/er9xeeprom.cpp + firmwares/er9x/er9xinterface.cpp + firmwares/gruvin9x/gruvin9xeeprom.cpp + firmwares/gruvin9x/gruvin9xinterface.cpp + firmwares/opentx/opentxeeprom.cpp + firmwares/opentx/open9xStockeeprom.cpp + firmwares/opentx/open9xGruvin9xeeprom.cpp + firmwares/opentx/open9xSky9xeeprom.cpp + firmwares/opentx/opentxinterface.cpp + firmwares/opentx/opentxTaranisSimulator.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 + ${RADIO_SRC_DIRECTORY}/bitmaps/sticks.lbm + ${RADIO_SRC_DIRECTORY}/translations/en.h + appdata.cpp + helpers.cpp + mdichild.cpp + generaledit.cpp + modelslist.cpp + mountlist.cpp + avroutputdialog.cpp + apppreferencesdialog.cpp + fwpreferencesdialog.cpp + burnconfigdialog.cpp + comparedialog.cpp + contributorsdialog.cpp + customizesplashdialog.cpp + burndialog.cpp + printdialog.cpp + fusesdialog.cpp + logsdialog.cpp + downloaddialog.cpp + splashlibrary.cpp + mainwindow.cpp + companion.cpp + modelconfigdialog.cpp + qcustomplot.cpp ) -SET( companion_MOC_HDRS - avroutputdialog.h - preferencesdialog.h - burnconfigdialog.h - comparedialog.h - printdialog.h - fusesdialog.h - logsdialog.h - contributorsdialog.h - customizesplashdialog.h - splashlibrary.h - splashlabel.h - burndialog.h - downloaddialog.h - cursorwidget.h - menuwidget.h - simulatordialog.h - xcursorwidget.h - xmenuwidget.h - xsimulatordialog.h - generaledit.h - modelslist.h - mdichild.h - mainwindow.h - myslider.h - modelconfigdialog.h - qcustomplot.h - helpers.h +set(companion_MOC_HDRS + avroutputdialog.h + apppreferencesdialog.h + fwpreferencesdialog.h + burnconfigdialog.h + comparedialog.h + printdialog.h + fusesdialog.h + logsdialog.h + contributorsdialog.h + customizesplashdialog.h + splashlibrary.h + splashlabel.h + burndialog.h + downloaddialog.h + generaledit.h + modelslist.h + mdichild.h + mainwindow.h + modelconfigdialog.h + qcustomplot.h + helpers.h ) -SET( companion_UIS - mdichild.ui - avroutputdialog.ui - comparedialog.ui - fusesdialog.ui - logsdialog.ui - preferencesdialog.ui - simulatordialog.ui - xsimulatordialog.ui - burnconfigdialog.ui - downloaddialog.ui - generaledit.ui - printdialog.ui - contributorsdialog.ui - customizesplashdialog.ui - splashlibrary.ui - burndialog.ui - modelconfigdialog.ui +set(companion_UIS + mdichild.ui + avroutputdialog.ui + comparedialog.ui + fusesdialog.ui + logsdialog.ui + apppreferencesdialog.ui + fwpreferencesdialog.ui + burnconfigdialog.ui + downloaddialog.ui + generaledit.ui + printdialog.ui + contributorsdialog.ui + customizesplashdialog.ui + splashlibrary.ui + burndialog.ui + modelconfigdialog.ui ) -IF ( SDL_FOUND ) - SET( companion_SRCS - ${companion_SRCS} - joystick.cpp - joystickdialog.cpp - ) - - SET( companion_MOC_HDRS - ${companion_MOC_HDRS} - joystick.h - joystickdialog.h - ) - - SET( companion_UIS - ${companion_UIS} - joystickdialog.ui - ) -ENDIF( ) - -SET( companion_RCS - companion.qrc - ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc +set(companion_RCS + companion.qrc + ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc ) MACRO (TODAY RESULT) @@ -273,8 +238,6 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/translations.qrc.in ${CMAKE_CURRENT_B # Subversion_WC_INFO( ${PROJECT_SOURCE_DIR}/../${FIRMWARE} G9X ) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/firmwares/opentx/stamp-opentx.h.in ${CMAKE_CURRENT_BINARY_DIR}/stamp-opentx.h @ONLY) -SET( PATCH_FLAGS "--binary" ) - IF( WIN32 ) SET( companion_SRCS ${companion_SRCS} icon.rc ) IF ( NOT MSVC ) @@ -285,8 +248,7 @@ ENDIF( ) INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} ) INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ) - -SET( LANGUAGES he pt ru de fr it sv cs ) +SET( LANGUAGES he pl pt ru de fr it sv cs fi) FOREACH( language ${LANGUAGES} ) SET( companion_TS ${companion_TS} translations/companion_${language}.ts ) ENDFOREACH( language ) @@ -304,11 +266,96 @@ ELSE( ) ADD_EXECUTABLE( ${PROJECT_NAME} WIN32 ${companion_SRCS} ${companion_QM} ) ENDIF( ) -TARGET_LINK_LIBRARIES( ${PROJECT_NAME} modeledit ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${XERCESC_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS} ) +TARGET_LINK_LIBRARIES( ${PROJECT_NAME} modeledit simulation ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${XERCESC_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS} ) + +############# Standalone simu ############### + +set(TH9X_CHECKOUT_DIRECTORY ${PROJECT_BINARY_DIR}/firmwares/th9x) +add_custom_command( + OUTPUT ${TH9X_CHECKOUT_DIRECTORY}/th9xsimulator.cpp + COMMAND ${CMAKE_COMMAND} -E make_directory ${TH9X_CHECKOUT_DIRECTORY} + COMMAND cd ${TH9X_CHECKOUT_DIRECTORY} && svn checkout http://th9x.googlecode.com/svn/trunk/src@285 . + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/th9x/th9xsimulator.cpp ${TH9X_CHECKOUT_DIRECTORY} + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/th9x/th9xsimulator.cpp +) + +set(ER9X_CHECKOUT_DIRECTORY ${PROJECT_BINARY_DIR}/firmwares/er9x) +add_custom_command( + OUTPUT ${ER9X_CHECKOUT_DIRECTORY}/er9xsimulator.cpp + COMMAND ${CMAKE_COMMAND} -E make_directory ${ER9X_CHECKOUT_DIRECTORY} + COMMAND cd ${ER9X_CHECKOUT_DIRECTORY} && svn checkout http://er9x.googlecode.com/svn/trunk/src@790 . + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/er9x/er9xsimulator.cpp ${ER9X_CHECKOUT_DIRECTORY} + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/er9x/er9xsimulator.cpp +) + +set(ERSKY9X_CHECKOUT_DIRECTORY ${PROJECT_BINARY_DIR}/firmwares/ersky9x) +add_custom_command( + OUTPUT ${ERSKY9X_CHECKOUT_DIRECTORY}/ersky9xsimulator.cpp + COMMAND ${CMAKE_COMMAND} -E make_directory ${ERSKY9X_CHECKOUT_DIRECTORY} + COMMAND cd ${ERSKY9X_CHECKOUT_DIRECTORY} && svn checkout http://ersky9x.googlecode.com/svn/trunk/src@170 . + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/ersky9x/ersky9xsimulator.cpp ${ERSKY9X_CHECKOUT_DIRECTORY} + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/firmwares/ersky9x/ersky9xsimulator.cpp +) + +set(simu_SRCS + eeprominterface.cpp + firmwares/th9x/th9xeeprom.cpp # TODO not needed + firmwares/th9x/th9xinterface.cpp + ${TH9X_CHECKOUT_DIRECTORY}/th9xsimulator.cpp + firmwares/er9x/er9xeeprom.cpp # TODO not needed + firmwares/er9x/er9xinterface.cpp + ${ER9X_CHECKOUT_DIRECTORY}/er9xsimulator.cpp + firmwares/gruvin9x/gruvin9xeeprom.cpp # TODO not needed + firmwares/gruvin9x/gruvin9xinterface.cpp + firmwares/opentx/opentxeeprom.cpp # TODO not needed + firmwares/opentx/open9xStockeeprom.cpp # TODO not needed + firmwares/opentx/open9xGruvin9xeeprom.cpp # TODO not needed + firmwares/opentx/open9xSky9xeeprom.cpp # TODO not needed + firmwares/opentx/opentxinterface.cpp + firmwares/opentx/opentxTaranisSimulator.cpp + firmwares/opentx/opentxSky9xsimulator.cpp + firmwares/opentx/opentxGruvin9xsimulator.cpp + firmwares/opentx/opentxM128simulator.cpp + firmwares/opentx/opentxsimulator.cpp + firmwares/ersky9x/ersky9xeeprom.cpp # TODO not needed + firmwares/ersky9x/ersky9xinterface.cpp + ${ERSKY9X_CHECKOUT_DIRECTORY}/ersky9xsimulator.cpp + ${RADIO_SRC_DIRECTORY}/bitmaps/sticks.lbm + ${RADIO_SRC_DIRECTORY}/translations/en.h + file.cpp # TODO not needed + modeledit/node.cpp + modeledit/edge.cpp # TODO not needed + appdata.cpp + simulator.cpp +) + +set(simu_HDRS + modeledit/node.h +) + +qt4_wrap_cpp(simu_SRCS ${simu_HDRS} ) +qt4_add_resources(simu_SRCS companion.qrc) # TODO not needed + +if(WIN32) + set(simu_SRCS ${simu_SRCS} icon.rc) +endif() + +add_executable(simulator WIN32 ${simu_SRCS}) + +if(SDL_FOUND) + target_link_libraries(simulator simulation ${QT_LIBRARIES} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS}) +else() + target_link_libraries(simulator simulation ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY} ${PTHREAD_LIBRARY} ${SDL_LIBRARY} ${PHONON_LIBS}) +endif() + +############# Packaging #################### IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") INSTALL( TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) 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 ) @@ -345,7 +392,8 @@ IF( WIN32 ) ADD_CUSTOM_TARGET( installer DEPENDS ${PROJECT_BINARY_DIR}/companionInstall.exe - SOURCES ${PROJECT_BINARY_DIR}/companion.nsi) + SOURCES ${PROJECT_BINARY_DIR}/companion.nsi + ) ENDIF( ) IF( APPLE ) @@ -359,13 +407,13 @@ IF( APPLE ) ADD_CUSTOM_TARGET( addframeworks ALL 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 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 + COMMAND ${QT_BINARY_DIR}/macdeployqt companion.app WORKING_DIRECTORY ${WORK_DIR} DEPENDS ${PROJECT_NAME} ) diff --git a/companion/src/appdata.cpp b/companion/src/appdata.cpp new file mode 100644 index 000000000..ec634da4d --- /dev/null +++ b/companion/src/appdata.cpp @@ -0,0 +1,678 @@ +// Companion Application Data Class Definition. +// Author Kjell Kernen + +#include "appdata.h" + +// Global data and storage object +AppData g; + +// ** CompStoreObj class******************** +void CompStoreObj::clear (const QString tag1, const QString tag2, const QString tag3) +{ + QSettings settings(PRODUCT, COMPANY); + if (tag2.isEmpty()) + { + settings.remove(tag1); + } + else if (tag3.isEmpty()) + { + settings.beginGroup(tag1); + settings.remove(tag2); + settings.endGroup(); + } + else + { + settings.beginGroup(tag1); + settings.beginGroup(tag2); + settings.remove(tag3); + settings.endGroup(); + settings.endGroup(); + } +} + +void CompStoreObj::store(const QByteArray newArray, QByteArray &array, const QString tag, const QString group1, const QString group2 ) +{ + QSettings settings(PRODUCT, COMPANY); + if (!group1.isEmpty()) settings.beginGroup(group1); + if (!group2.isEmpty()) settings.beginGroup(group2); + + settings.setValue(tag, newArray); + array = newArray; + + if (!group1.isEmpty()) settings.endGroup(); + if (!group2.isEmpty()) settings.endGroup(); +} + +void CompStoreObj::store(const QStringList newSList, QStringList &stringList, const QString tag, const QString group1, const QString group2 ) +{ + QSettings settings(PRODUCT, COMPANY); + if (!group1.isEmpty()) settings.beginGroup(group1); + if (!group2.isEmpty()) settings.beginGroup(group2); + + settings.setValue(tag, newSList); + stringList = newSList; + + if (!group1.isEmpty()) settings.endGroup(); + if (!group2.isEmpty()) settings.endGroup(); +} + +void CompStoreObj::store(const QString newString, QString &string, const QString tag, const QString group1, const QString group2 ) +{ + QSettings settings(PRODUCT, COMPANY); + if (!group1.isEmpty()) settings.beginGroup(group1); + if (!group2.isEmpty()) settings.beginGroup(group2); + + settings.setValue(tag, newString); + string = newString; + + if (!group1.isEmpty()) settings.endGroup(); + if (!group2.isEmpty()) settings.endGroup(); +} + +void CompStoreObj::store(const bool newTruth, bool &truth, const QString tag, const QString group1, const QString group2 ) +{ + QSettings settings(PRODUCT, COMPANY); + if (!group1.isEmpty()) settings.beginGroup(group1); + if (!group2.isEmpty()) settings.beginGroup(group2); + + settings.setValue(tag, newTruth); + truth = newTruth; + + if (!group1.isEmpty()) settings.endGroup(); + if (!group2.isEmpty()) settings.endGroup(); +} + +void CompStoreObj::store(const int newNumber, int &number, const QString tag, const QString group1, const QString group2 ) +{ + QSettings settings(PRODUCT, COMPANY); + if (!group1.isEmpty()) settings.beginGroup(group1); + if (!group2.isEmpty()) settings.beginGroup(group2); + + settings.setValue(tag, newNumber); + number = newNumber; + + if (!group1.isEmpty()) settings.endGroup(); + if (!group2.isEmpty()) settings.endGroup(); +} + +// Retrieval functions +void CompStoreObj::retrieve( QByteArray &array, const QString tag, const QString def, const QString group1, const QString group2 ) +{ + QSettings settings(PRODUCT, COMPANY); + if (!group1.isEmpty()) settings.beginGroup(group1); + if (!group2.isEmpty()) settings.beginGroup(group2); + + array = settings.value(tag, def).toByteArray(); + + if (!group1.isEmpty()) settings.endGroup(); + if (!group2.isEmpty()) settings.endGroup(); +} + +void CompStoreObj::retrieve( QStringList &stringList, const QString tag, const QString def, const QString group1, const QString group2 ) +{ + QSettings settings(PRODUCT, COMPANY); + if (!group1.isEmpty()) settings.beginGroup(group1); + if (!group2.isEmpty()) settings.beginGroup(group2); + + stringList = settings.value(tag, def).toStringList(); + + if (!group1.isEmpty()) settings.endGroup(); + if (!group2.isEmpty()) settings.endGroup(); +} + +void CompStoreObj::retrieve( QString &string, const QString tag, const QString def, const QString group1, const QString group2 ) +{ + QSettings settings(PRODUCT, COMPANY); + if (!group1.isEmpty()) settings.beginGroup(group1); + if (!group2.isEmpty()) settings.beginGroup(group2); + + string = settings.value(tag, def).toString(); + + if (!group1.isEmpty()) settings.endGroup(); + if (!group2.isEmpty()) settings.endGroup(); +} + +void CompStoreObj::retrieve( bool &truth, const QString tag, const bool def, const QString group1, const QString group2 ) +{ + QSettings settings(PRODUCT, COMPANY); + if (!group1.isEmpty()) settings.beginGroup(group1); + if (!group2.isEmpty()) settings.beginGroup(group2); + + truth = settings.value(tag, def).toBool(); + + if (!group1.isEmpty()) settings.endGroup(); + if (!group2.isEmpty()) settings.endGroup(); +} + +void CompStoreObj::retrieve( int &number, const QString tag, const int def, const QString group1, const QString group2 ) +{ + QSettings settings(PRODUCT, COMPANY); + if (!group1.isEmpty()) settings.beginGroup(group1); + if (!group2.isEmpty()) settings.beginGroup(group2); + + number = settings.value(tag, def).toInt(); + + if (!group1.isEmpty()) settings.endGroup(); + if (!group2.isEmpty()) settings.endGroup(); +} + +// Retrieve and Store functions +void CompStoreObj::getset( QByteArray &array, const QString tag, const QString def, const QString group1, const QString group2 ) +{ + retrieve( array, tag, def, group1, group2); + store(array, array, tag, group1, group2); +} + +void CompStoreObj::getset( QStringList &stringList, const QString tag, const QString def, const QString group1, const QString group2 ) +{ + retrieve( stringList, tag, def, group1, group2); + store(stringList, stringList, tag, group1, group2); +} + +void CompStoreObj::getset( QString &string, const QString tag, const QString def, const QString group1, const QString group2 ) +{ + retrieve( string, tag, def, group1, group2); + store(string, string, tag, group1, group2); +} + +void CompStoreObj::getset( bool &truth, const QString tag, const bool def, const QString group1, const QString group2 ) +{ + retrieve( truth, tag, def, group1, group2); + store(truth, truth, tag, group1, group2); +} + +void CompStoreObj::getset( int &number, const QString tag, const int def, const QString group1, const QString group2 ) +{ + retrieve( number, tag, def, group1, group2); + store(number, number, tag, group1, group2); +} + +// ** FwRevision class******************** +int FwRevision::get( const QString fwType ) +{ + QString result; + retrieve( result, fwType, "", "FwRevisions" ); + return result.toInt(); +} + +void FwRevision::set( const QString fwType, const int fwRevision ) +{ + QString tempString= QString("%1").arg(fwRevision); + store( tempString, tempString, fwType, "FwRevisions" ); +} + +void FwRevision::remove( const QString tag ) +{ + clear( "FwRevisions", tag ); +} + +// ** JStickData class******************** +// Get declarations +int JStickData::stick_axe() { return _stickAxe; } +int JStickData::stick_min() { return _stickMin; } +int JStickData::stick_med() { return _stickMed; } +int JStickData::stick_max() { return _stickMax; } +int JStickData::stick_inv() { return _stickInv; } + +// Set declarations +void JStickData::stick_axe(const int it) { store( it, _stickAxe, QString("stick%1_axe").arg(index), "JsCalibration" );} +void JStickData::stick_min(const int it) { store( it, _stickMin, QString("stick%1_min").arg(index), "JsCalibration" );} +void JStickData::stick_med(const int it) { store( it, _stickMed, QString("stick%1_med").arg(index), "JsCalibration" );} +void JStickData::stick_max(const int it) { store( it, _stickMax, QString("stick%1_max").arg(index), "JsCalibration" );} +void JStickData::stick_inv(const int it) { store( it, _stickInv, QString("stick%1_inv").arg(index), "JsCalibration" );} + +// Constructor +JStickData::JStickData() +{ + index = -1; +} + +void JStickData::remove() +{ + // Remove all JStickData values from settings file + QSettings settings(PRODUCT, COMPANY); + settings.beginGroup( "JsCalibration" ); + settings.remove( QString( "stick%1_axe").arg(index) ); + settings.remove( QString( "stick%1_min").arg(index) ); + settings.remove( QString( "stick%1_med").arg(index) ); + settings.remove( QString( "stick%1_max").arg(index) ); + settings.remove( QString( "stick%1_inv").arg(index) ); + settings.endGroup(); + + // Reset all JStickData variables to initial values + init(index); +} + +bool JStickData::existsOnDisk() +{ + QSettings settings(PRODUCT, COMPANY); + settings.beginGroup("JsCalibration"); + int axe = settings.value( QString("stick%1_axe").arg(index), -1 ).toInt(); + settings.endGroup(); + + return (axe > -1); +} + +void JStickData::init(int newIndex) +{ + index = newIndex; + _stickAxe = -1; + _stickMin = -32767; + _stickMed = 0; + _stickMax = 0; + _stickInv = 0; + + // Do not write empty joystick calibrations to disk. + if ( !existsOnDisk() ) + return; + + flush(); +} + +void JStickData::flush() +{ + getset( _stickAxe, QString("stick%1_axe").arg(index), -1, "JsCalibration" ); + getset( _stickMin, QString("stick%1_min").arg(index), -32767, "JsCalibration" ); + getset( _stickMed, QString("stick%1_med").arg(index), 0, "JsCalibration" ); + getset( _stickMax, QString("stick%1_max").arg(index), 0, "JsCalibration" ); + getset( _stickInv, QString("stick%1_inv").arg(index), 0, "JsCalibration" ); +} + +// ** Profile class******************** +// Get declarations +QString Profile::fwName() const { return _fwName; } +QString Profile::fwType() const { return _fwType; } +QString Profile::name() const { return _name; } +QString Profile::sdPath() const { return _sdPath; } +QString Profile::splashFile() const { return _splashFile; } +bool Profile::burnFirmware() const { return _burnFirmware; } +bool Profile::renameFwFiles() const { return _renameFwFiles; } +int Profile::channelOrder() const { return _channelOrder; } +int Profile::defaultMode() const { return _defaultMode; } + +QString Profile::beeper() const { return _beeper; } +QString Profile::countryCode() const { return _countryCode; } +QString Profile::display() const { return _display; } +QString Profile::haptic() const { return _haptic; } +QString Profile::speaker() const { return _speaker; } +QString Profile::stickPotCalib() const { return _stickPotCalib; } +QString Profile::trainerCalib() const { return _trainerCalib; } +int Profile::currentCalib() const { return _currentCalib; } +int Profile::gsStickMode() const { return _gsStickMode; } +int Profile::ppmMultiplier() const { return _ppmMultiplier; } +int Profile::vBatCalib() const { return _vBatCalib; } +int Profile::vBatWarn() const { return _vBatWarn; } + +// Set declarations +void Profile::name (const QString x) { store(x, _name, "Name" ,"Profiles", QString("profile%1").arg(index));} +void Profile::fwName (const QString x) { store(x, _fwName, "fwName" ,"Profiles", QString("profile%1").arg(index));} +void Profile::fwType (const QString x) { store(x, _fwType, "fwType" ,"Profiles", QString("profile%1").arg(index));} +void Profile::sdPath (const QString x) { store(x, _sdPath, "sdPath" ,"Profiles", QString("profile%1").arg(index));} +void Profile::splashFile (const QString x) { store(x, _splashFile, "SplashFileName" ,"Profiles", QString("profile%1").arg(index));} +void Profile::burnFirmware (const bool x) { store(x, _burnFirmware, "burnFirmware" ,"Profiles", QString("profile%1").arg(index));} +void Profile::renameFwFiles (const bool x) { store(x, _renameFwFiles, "rename_firmware_files" ,"Profiles", QString("profile%1").arg(index));} +void Profile::channelOrder (const int x) { store(x, _channelOrder, "default_channel_order" ,"Profiles", QString("profile%1").arg(index));} +void Profile::defaultMode (const int x) { store(x, _defaultMode, "default_mode" ,"Profiles", QString("profile%1").arg(index));} + +void Profile::beeper (const QString x) { store(x, _beeper, "Beeper" ,"Profiles", QString("profile%1").arg(index));} +void Profile::countryCode (const QString x) { store(x, _countryCode, "countryCode" ,"Profiles", QString("profile%1").arg(index));} +void Profile::display (const QString x) { store(x, _display, "Display" ,"Profiles", QString("profile%1").arg(index));} +void Profile::haptic (const QString x) { store(x, _haptic, "Haptic" ,"Profiles", QString("profile%1").arg(index));} +void Profile::speaker (const QString x) { store(x, _speaker, "Speaker" ,"Profiles", QString("profile%1").arg(index));} +void Profile::stickPotCalib (const QString x) { store(x, _stickPotCalib, "StickPotCalib" ,"Profiles", QString("profile%1").arg(index));} +void Profile::trainerCalib (const QString x) { store(x, _trainerCalib, "TrainerCalib" ,"Profiles", QString("profile%1").arg(index));} +void Profile::currentCalib (const int x) { store(x, _currentCalib, "currentCalib" ,"Profiles", QString("profile%1").arg(index));} +void Profile::gsStickMode (const int x) { store(x, _gsStickMode, "GSStickMode" ,"Profiles", QString("profile%1").arg(index));} +void Profile::ppmMultiplier (const int x) { store(x, _ppmMultiplier, "PPM_Multiplier" ,"Profiles", QString("profile%1").arg(index));} +void Profile::vBatCalib (const int x) { store(x, _vBatCalib, "VbatCalib" ,"Profiles", QString("profile%1").arg(index));} +void Profile::vBatWarn (const int x) { store(x, _vBatWarn, "vBatWarn" ,"Profiles", QString("profile%1").arg(index));} + +// Constructor +Profile::Profile() +{ + index = -1; +} + +// The default copy operator can not be used since the index variable would be destroyed +Profile& Profile::operator=(const Profile& rhs) +{ + name ( rhs.name() ); + fwName ( rhs.fwName() ); + fwType ( rhs.fwType() ); + sdPath ( rhs.sdPath() ); + splashFile ( rhs.splashFile() ); + burnFirmware ( rhs.burnFirmware() ); + renameFwFiles( rhs.renameFwFiles() ); + channelOrder ( rhs.channelOrder() ); + defaultMode ( rhs.defaultMode() ); + beeper ( rhs.beeper() ); + countryCode ( rhs.countryCode() ); + display ( rhs.display() ); + haptic ( rhs.haptic() ); + speaker ( rhs.speaker() ); + stickPotCalib( rhs.stickPotCalib() ); + trainerCalib ( rhs.trainerCalib() ); + currentCalib ( rhs.currentCalib() ); + gsStickMode ( rhs.gsStickMode() ); + ppmMultiplier( rhs.ppmMultiplier() ); + vBatCalib ( rhs.vBatCalib() ); + vBatWarn ( rhs.vBatWarn() ); + + return *this; +} + +void Profile::remove() +{ + // Remove all profile values from settings file + QSettings settings(PRODUCT, COMPANY); + settings.beginGroup("Profiles"); + settings.remove(QString("profile%1").arg(index)); + settings.endGroup(); + + // Reset all profile variables to initial values + init(index); +} + +bool Profile::existsOnDisk() +{ + QSettings settings(PRODUCT, COMPANY); + settings.beginGroup("Profiles"); + settings.beginGroup(QString("profile%1").arg(index)); + QStringList keyList = settings.allKeys(); + settings.endGroup(); + settings.endGroup(); + + return (keyList.length() > 0); +} + +void Profile::init(int newIndex) +{ + index = newIndex; + + _fwName = ""; + _fwType = ""; + _name = ""; + _sdPath = ""; + _splashFile = ""; + _burnFirmware = false; + _renameFwFiles = false; + _channelOrder = 0; + _defaultMode = 1; + + _beeper = ""; + _countryCode = ""; + _display = ""; + _haptic = ""; + _speaker = ""; + _stickPotCalib = ""; + _trainerCalib = ""; + + _currentCalib = 0; + _gsStickMode = 0; + _ppmMultiplier = 0; + _vBatCalib = 0; + _vBatWarn = 0; + + // Do not write empty profiles to disk except the default (0) profile. + if ( index > 0 && !existsOnDisk()) + return; + + flush(); +} + +void Profile::flush() +{ + // Load and store all variables. Use default values if setting values are missing + getset( _fwName, "fwName" ,"" ,"Profiles", QString("profile%1").arg(index)); + getset( _fwType, "fwType" ,"" ,"Profiles", QString("profile%1").arg(index)); + getset( _name, "Name" ,"" ,"Profiles", QString("profile%1").arg(index)); + getset( _sdPath, "sdPath" ,"" ,"Profiles", QString("profile%1").arg(index)); + getset( _splashFile, "SplashFileName" ,"" ,"Profiles", QString("profile%1").arg(index)); + getset( _burnFirmware, "burnFirmware" ,false ,"Profiles", QString("profile%1").arg(index)); + getset( _renameFwFiles, "rename_firmware_files" ,false ,"Profiles", QString("profile%1").arg(index)); + getset( _channelOrder, "default_channel_order" ,0 ,"Profiles", QString("profile%1").arg(index)); + getset( _defaultMode, "default_mode" ,1 ,"Profiles", QString("profile%1").arg(index)); + + getset( _beeper, "Beeper" ,"" ,"Profiles", QString("profile%1").arg(index)); + getset( _countryCode, "countryCode" ,"" ,"Profiles", QString("profile%1").arg(index)); + getset( _display, "Display" ,"" ,"Profiles", QString("profile%1").arg(index)); + getset( _haptic, "Haptic" ,"" ,"Profiles", QString("profile%1").arg(index)); + getset( _speaker, "Speaker" ,"" ,"Profiles", QString("profile%1").arg(index)); + getset( _stickPotCalib, "StickPotCalib" ,"" ,"Profiles", QString("profile%1").arg(index)); + getset( _trainerCalib, "TrainerCalib" ,"" ,"Profiles", QString("profile%1").arg(index)); + getset( _currentCalib, "currentCalib" ,0 ,"Profiles", QString("profile%1").arg(index)); + getset( _gsStickMode, "GSStickMode" ,0 ,"Profiles", QString("profile%1").arg(index)); + getset( _ppmMultiplier, "PPM_Multiplier" ,0 ,"Profiles", QString("profile%1").arg(index)); + getset( _vBatCalib, "VbatCalib" ,0 ,"Profiles", QString("profile%1").arg(index)); + getset( _vBatWarn, "vBatWarn" ,0 ,"Profiles", QString("profile%1").arg(index)); +} + + +// ** AppData class******************** + +// Get declarations +QStringList AppData::recentFiles() { return _recentFiles; } +QByteArray AppData::mainWinGeo() { return _mainWinGeo; } +QByteArray AppData::mainWinState() { return _mainWinState; } +QByteArray AppData::modelEditGeo() { return _modelEditGeo; } + +QString AppData::armMcu() { return _armMcu; } +QString AppData::avrArguments() { return _avrArguments; } +QString AppData::avrPort() { return _avrPort; } +QString AppData::avrdudeLocation() { return _avrdudeLocation; } +QString AppData::compileServer() { return _compileServer; } +QString AppData::cpuId() { return _cpuId; } +QString AppData::dfuArguments() { return _dfuArguments; } +QString AppData::dfuLocation() { return _dfuLocation; } +QString AppData::locale() { return _locale; } +QString AppData::mcu() { return _mcu; } +QString AppData::programmer() { return _programmer; } +QString AppData::sambaLocation() { return _sambaLocation; } +QString AppData::sambaPort() { return _sambaPort; } + +QString AppData::backupDir() { return _backupDir; } +QString AppData::gePath() { return _gePath; } +QString AppData::eepromDir() { return _eepromDir; } +QString AppData::flashDir() { return _flashDir; } +QString AppData::imagesDir() { return _imagesDir; } +QString AppData::logDir() { return _logDir; } +QString AppData::libDir() { return _libDir; } +QString AppData::snapshotDir() { return _snapshotDir; } +QString AppData::updatesDir() { return _updatesDir; } + +bool AppData::enableBackup() { return _enableBackup; } +bool AppData::backupOnFlash() { return _backupOnFlash; } +bool AppData::jsSupport() { return _jsSupport; } +bool AppData::rev4aSupport() { return _rev4aSupport; } +bool AppData::maximized() { return _maximized; } +bool AppData::showSplash() { return _showSplash; } +bool AppData::snapToClpbrd() { return _snapToClpbrd; } +bool AppData::autoCheckApp() { return _autoCheckApp; } +bool AppData::autoCheckFw() { return _autoCheckFw; } +bool AppData::simuSW() { return _simuSW; } +bool AppData::enableWizard() { return _enableWizard; } + +int AppData::backLight() { return _backLight; } +int AppData::embedSplashes() { return _embedSplashes; } +int AppData::fwServerFails() { return _fwServerFails; } +int AppData::generalEditTab() { return _generalEditTab; } +int AppData::iconSize() { return _iconSize; } +int AppData::historySize() { return _historySize; } +int AppData::jsCtrl() { return _jsCtrl; } +int AppData::modelEditTab() { return _modelEditTab; } +int AppData::id() { return _id; } +int AppData::theme() { return _theme; } +int AppData::warningId() { return _warningId; } + +// Set declarations +void AppData::recentFiles (const QStringList x) { store(x, _recentFiles, "recentFileList" );} +void AppData::mainWinGeo (const QByteArray x) { store(x, _mainWinGeo, "mainWindowGeometry" );} +void AppData::mainWinState (const QByteArray x) { store(x, _mainWinState, "mainWindowState" );} +void AppData::modelEditGeo (const QByteArray x) { store(x, _modelEditGeo, "modelEditGeometry" );} + +void AppData::armMcu (const QString x) { store(x, _armMcu, "arm_mcu" );} +void AppData::avrArguments (const QString x) { store(x, _avrArguments, "avr_arguments" );} +void AppData::avrPort (const QString x) { store(x, _avrPort, "avr_port" );} +void AppData::avrdudeLocation (const QString x) { store(x, _avrdudeLocation, "avrdudeLocation" );} +void AppData::compileServer (const QString x) { store(x, _compileServer, "compilation-server" );} +void AppData::cpuId (const QString x) { store(x, _cpuId, "cpu_id" );} +void AppData::dfuArguments (const QString x) { store(x, _dfuArguments, "dfu_arguments" );} +void AppData::dfuLocation (const QString x) { store(x, _dfuLocation, "dfu_location" );} +void AppData::locale (const QString x) { store(x, _locale, "locale" );} +void AppData::mcu (const QString x) { store(x, _mcu, "mcu" );} +void AppData::programmer (const QString x) { store(x, _programmer, "programmer" );} +void AppData::sambaLocation (const QString x) { store(x, _sambaLocation, "samba_location" );} +void AppData::sambaPort (const QString x) { store(x, _sambaPort, "samba_port" );} + +void AppData::backupDir (const QString x) { store(x, _backupDir, "backupPath" );} +void AppData::gePath (const QString x) { store(x, _gePath, "gePath" );} +void AppData::eepromDir (const QString x) { store(x, _eepromDir, "lastDir" );} +void AppData::flashDir (const QString x) { store(x, _flashDir, "lastFlashDir" );} +void AppData::imagesDir (const QString x) { store(x, _imagesDir, "lastImagesDir" );} +void AppData::logDir (const QString x) { store(x, _logDir, "lastLogDir" );} +void AppData::libDir (const QString x) { store(x, _libDir, "libraryPath" );} +void AppData::snapshotDir (const QString x) { store(x, _snapshotDir, "snapshotpath" );} +void AppData::updatesDir (const QString x) { store(x, _updatesDir, "lastUpdatesDir" );} + +void AppData::enableBackup (const bool x) { store(x, _enableBackup, "backupEnable" );} +void AppData::backupOnFlash (const bool x) { store(x, _backupOnFlash, "backupOnFlash" );} +void AppData::maximized (const bool x) { store(x, _maximized, "maximized" );} +void AppData::jsSupport (const bool x) { store(x, _jsSupport, "js_support" );} +void AppData::rev4aSupport (const bool x) { store(x, _rev4aSupport, "rev4asupport" );} +void AppData::showSplash (const bool x) { store(x, _showSplash, "show_splash" );} +void AppData::snapToClpbrd (const bool x) { store(x, _snapToClpbrd, "snapshot_to_clipboard" );} +void AppData::autoCheckApp (const bool x) { store(x, _autoCheckApp, "startup_check_companion" );} +void AppData::autoCheckFw (const bool x) { store(x, _autoCheckFw, "startup_check_fw" );} +void AppData::simuSW (const bool x) { store(x, _simuSW, "simuSW" );} +void AppData::enableWizard (const bool x) { store(x, _enableWizard, "wizardEnable" );} + +void AppData::backLight (const int x) { store(x, _backLight, "backLight" );} +void AppData::embedSplashes (const int x) { store(x, _embedSplashes, "embedded_splashes" );} +void AppData::fwServerFails (const int x) { store(x, _fwServerFails, "fwserver" );} +void AppData::generalEditTab (const int x) { store(x, _generalEditTab, "generalEditTab" );} +void AppData::iconSize (const int x) { store(x, _iconSize, "icon_size" );} +void AppData::historySize (const int x) { store(x, _historySize, "history_size" );} +void AppData::jsCtrl (const int x) { store(x, _jsCtrl, "js_ctrl" );} +void AppData::modelEditTab (const int x) { store(x, _modelEditTab, "modelEditTab" );} +void AppData::id (const int x) { store(x, _id, "profileId" );} +void AppData::theme (const int x) { store(x, _theme, "theme" );} +void AppData::warningId (const int x) { store(x, _warningId, "warningId" );} + +// Constructor +AppData::AppData() +{ + //Initialize the profiles + for (int i=0; i +#include +#include +#include + +#define COMPANY "OpenTX Companion" +#define PRODUCT "OpenTX" + +#define MAX_PROFILES 15 +#define MAX_JOYSTICKS 8 + +class CompStoreObj +{ + public: + void clear (const QString tag1="", const QString tag2="", const QString tag3=""); + void store(const QByteArray newArray, QByteArray &array, const QString tag, const QString group1="", const QString group2="" ); + void store(const QStringList newSList, QStringList &stringList, const QString tag, const QString group1="", const QString group2="" ); + void store(const QString newString, QString &string, const QString tag, const QString group1="", const QString group2="" ); + void store(const bool newTruth, bool &truth, const QString tag, const QString group1="", const QString group2="" ); + void store(const int newNumber, int &number, const QString tag, const QString group1="", const QString group2="" ); + + // Retrieval functions + void retrieve( QByteArray &array, const QString tag, const QString def, const QString group1="", const QString group2="" ); + void retrieve( QStringList &stringList, const QString tag, const QString def, const QString group1="", const QString group2="" ); + void retrieve( QString &string, const QString tag, const QString def, const QString group1="", const QString group2="" ); + void retrieve( bool &truth, const QString tag, const bool def, const QString group1="", const QString group2="" ); + void retrieve( int &number, const QString tag, const int def, const QString group1="", const QString group2="" ); + + // Retrieve and Store functions + void getset( QByteArray &array, const QString tag, const QString def, const QString group1="", const QString group2="" ); + void getset( QStringList &stringList, const QString tag, const QString def, const QString group1="", const QString group2="" ); + void getset( QString &string, const QString tag, const QString def, const QString group1="", const QString group2="" ); + void getset( bool &truth, const QString tag, const bool def, const QString group1="", const QString group2="" ); + void getset( int &number, const QString tag, const int def, const QString group1="", const QString group2="" ); +}; + +class FwRevision: protected CompStoreObj +{ + public: + int get( const QString); + void set( const QString, const int ); + void remove( const QString ); +}; + +class JStickData: protected CompStoreObj +{ + private: + int index; + + int _stickAxe; + int _stickMin; + int _stickMed; + int _stickMax; + int _stickInv; + + public: + // All the get definitions + int stick_axe(); + int stick_min(); + int stick_med(); + int stick_max(); + int stick_inv(); + + // All the set definitions + void stick_axe(const int); + void stick_min(const int); + void stick_med(const int); + void stick_max(const int); + void stick_inv(const int); + + JStickData(); + void remove(); + bool existsOnDisk(); + void init(int index); + void flush(); +}; + +class Profile: protected CompStoreObj +{ + private: + // Class Internal Variable + int index; + + // Application Variables + QString _fwName; + QString _fwType; + QString _name; + QString _sdPath; + QString _splashFile; + bool _burnFirmware; + bool _renameFwFiles; + int _channelOrder; + int _defaultMode; + + // Firmware Variables + QString _beeper; + QString _countryCode; + QString _display; + QString _haptic; + QString _speaker; + QString _stickPotCalib; + QString _trainerCalib; + int _currentCalib; + int _gsStickMode; + int _ppmMultiplier; + int _vBatCalib; + int _vBatWarn; + + public: + // All the get definitions + QString fwName() const; + QString fwType() const; + QString name() const; + QString sdPath() const; + QString splashFile() const; + bool burnFirmware() const; + bool renameFwFiles() const; + int channelOrder() const; + int defaultMode() const; + + QString beeper() const; + QString countryCode() const; + QString display() const; + QString haptic() const; + QString speaker() const; + QString stickPotCalib() const; + QString trainerCalib() const; + int currentCalib() const; + int gsStickMode() const; + int ppmMultiplier() const; + int vBatCalib() const; + int vBatWarn() const; + + // All the set definitions + void name (const QString); + void fwName (const QString); + void fwType (const QString); + void sdPath (const QString); + void splashFile (const QString); + void burnFirmware (const bool); + void renameFwFiles (const bool); + void channelOrder (const int); + void defaultMode (const int); + + void beeper (const QString); + void countryCode (const QString); + void display (const QString); + void haptic (const QString); + void speaker (const QString); + void stickPotCalib (const QString); + void trainerCalib (const QString); + void currentCalib (const int); + void gsStickMode (const int); + void ppmMultiplier (const int); + void vBatCalib (const int); + void vBatWarn (const int); + + Profile(); + Profile& operator=(const Profile&); + void remove(); + bool existsOnDisk(); + void init(int newIndex); + void flush(); +}; + +class AppData: protected CompStoreObj +{ + // All the global variables + public: + Profile profile[MAX_PROFILES]; + JStickData joystick[MAX_JOYSTICKS]; + FwRevision fwRev; + + private: + QStringList _recentFiles; + QByteArray _mainWinGeo; + QByteArray _mainWinState; + QByteArray _modelEditGeo; + + QString _armMcu; + QString _avrArguments; + QString _avrPort; + QString _avrdudeLocation; + QString _compileServer; + QString _cpuId; + QString _dfuArguments; + QString _dfuLocation; + QString _locale; + QString _mcu; + QString _programmer; + QString _sambaLocation; + QString _sambaPort; + + QString _backupDir; + QString _gePath; + QString _eepromDir; + QString _flashDir; + QString _imagesDir; + QString _logDir; + QString _libDir; + QString _snapshotDir; + QString _updatesDir; + + bool _enableBackup; + bool _backupOnFlash; + bool _maximized; + bool _jsSupport; + bool _rev4aSupport; + bool _showSplash; + bool _snapToClpbrd; + bool _autoCheckApp; + bool _autoCheckFw; + bool _simuSW; + bool _enableWizard; + + int _backLight; + int _embedSplashes; + int _fwServerFails; + int _generalEditTab; + int _iconSize; + int _jsCtrl; + int _historySize; + int _modelEditTab; + int _id; + int _theme; + int _warningId; + + public: + // All the get definitions + QStringList recentFiles(); + QByteArray mainWinGeo(); + QByteArray mainWinState(); + QByteArray modelEditGeo(); + + QString armMcu(); + QString avrArguments(); + QString avrPort(); + QString avrdudeLocation(); + QString compileServer(); + QString cpuId(); + QString dfuArguments(); + QString dfuLocation(); + QString lastFw(); + QString locale(); + QString mcu(); + QString programmer(); + QString sambaLocation(); + QString sambaPort(); + + QString backupDir(); + QString gePath(); + QString eepromDir(); + QString flashDir(); + QString imagesDir(); + QString logDir(); + QString libDir(); + QString snapshotDir(); + QString updatesDir(); + + bool enableBackup(); + bool backupOnFlash(); + bool jsSupport(); + bool rev4aSupport(); + bool maximized(); + bool showSplash(); + bool snapToClpbrd(); + bool autoCheckApp(); + bool autoCheckFw(); + bool simuSW(); + bool enableWizard(); + + int backLight(); + int embedSplashes(); + int fwServerFails(); + int generalEditTab(); + int iconSize(); + int historySize(); + int jsCtrl(); + int modelEditTab(); // This variable is unused an can be removed + int id(); + int theme(); + int warningId(); + + // All the set definitions + void recentFiles (const QStringList x); + void mainWinGeo (const QByteArray); + void mainWinState (const QByteArray); + void modelEditGeo (const QByteArray); + + void armMcu (const QString); + void avrArguments (const QString); + void avrPort (const QString); + void avrdudeLocation (const QString); + void compileServer (const QString); + void cpuId (const QString); + void dfuArguments (const QString); + void dfuLocation (const QString); + void lastFw (const QString); + void locale (const QString); + void mcu (const QString); + void programmer (const QString); + void sambaLocation (const QString); + void sambaPort (const QString); + + void backupDir (const QString); + void gePath (const QString); + void eepromDir (const QString); + void flashDir (const QString); + void imagesDir (const QString); + void logDir (const QString); + void libDir (const QString); + void snapshotDir (const QString); + void updatesDir (const QString); + + void enableBackup (const bool); + void backupOnFlash (const bool); + void maximized (const bool); + void jsSupport (const bool); + void rev4aSupport (const bool); + void showSplash (const bool); + void snapToClpbrd (const bool); + void autoCheckApp (const bool); + void autoCheckFw (const bool); + void simuSW (const bool); + void enableWizard (const bool); + + void backLight (const int); + void embedSplashes (const int); + void fwServerFails (const int); + void generalEditTab (const int); + void iconSize (const int); + void historySize (const int); + void jsCtrl (const int); + void modelEditTab (const int); + void id (const int); + void theme (const int); + void warningId (const int); + + // Constructor + AppData(); +}; + +extern AppData g; + +#endif // COMPANION_APPDATA_H diff --git a/companion/src/apppreferencesdialog.cpp b/companion/src/apppreferencesdialog.cpp new file mode 100644 index 000000000..17787f9c0 --- /dev/null +++ b/companion/src/apppreferencesdialog.cpp @@ -0,0 +1,307 @@ +#include "apppreferencesdialog.h" +#include "ui_apppreferencesdialog.h" +#include "mainwindow.h" +#include "appdata.h" +#include "helpers.h" +#include "flashinterface.h" +#ifdef JOYSTICKS +#include "joystick.h" +#include "joystickdialog.h" +#endif +#include +#include + +appPreferencesDialog::appPreferencesDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::appPreferencesDialog) +{ + ui->setupUi(this); + setWindowIcon(CompanionIcon("apppreferences.png")); + initSettings(); + connect(this, SIGNAL(accepted()), this, SLOT(writeValues())); +#ifndef JOYSTICKS + ui->joystickCB->hide(); + ui->joystickCB->setDisabled(true); + ui->joystickcalButton->hide(); + ui->joystickChkB->hide(); + ui->label_11->hide(); +#endif + resize(0,0); +} + +appPreferencesDialog::~appPreferencesDialog() +{ + delete ui; +} + +void appPreferencesDialog::writeValues() +{ + g.autoCheckApp(ui->startupCheck_companion9x->isChecked()); + g.autoCheckFw(ui->startupCheck_fw->isChecked()); + g.enableWizard(ui->wizardEnable_ChkB->isChecked()); + g.showSplash(ui->showSplash->isChecked()); + g.simuSW(ui->simuSW->isChecked()); + g.historySize(ui->historySize->value()); + g.backLight(ui->backLightColor->currentIndex()); + g.libDir(ui->libraryPath->text()); + g.gePath(ui->ge_lineedit->text()); + g.embedSplashes(ui->splashincludeCB->currentIndex()); + g.enableBackup(ui->backupEnable->isChecked()); + + if (ui->joystickChkB ->isChecked() && ui->joystickCB->isEnabled()) { + g.jsSupport(ui->joystickChkB ->isChecked()); + g.jsCtrl(ui->joystickCB ->currentIndex()); + } + else { + g.jsSupport(false); + g.jsCtrl(0); + } + g.profile[g.id()].channelOrder(ui->channelorderCB->currentIndex()); + g.profile[g.id()].defaultMode(ui->stickmodeCB->currentIndex()); + g.profile[g.id()].renameFwFiles(ui->renameFirmware->isChecked()); + g.profile[g.id()].burnFirmware(ui->burnFirmware->isChecked()); + g.profile[g.id()].sdPath(ui->sdPath->text()); + g.profile[g.id()].splashFile(ui->SplashFileName->text()); + + // The profile name may NEVER be empty + if (ui->profileNameLE->text().isEmpty()) + g.profile[g.id()].name(tr("My Radio")); + else + g.profile[g.id()].name(ui->profileNameLE->text()); + + // If a new radio type has been choosen, several things need to change + if ( initialRadioType != ui->radioCB->currentIndex()) + { + g.profile[g.id()].fwName(""); + g.profile[g.id()].fwType(getDefaultFwType(ui->radioCB->currentIndex())); + current_firmware_variant = GetFirmwareVariant(g.profile[g.id()].fwType()); + } +} + +void appPreferencesDialog::on_snapshotPathButton_clicked() +{ + QString fileName = QFileDialog::getExistingDirectory(this,tr("Select your snapshot folder"), g.snapshotDir()); + if (!fileName.isEmpty()) { + g.snapshotDir(fileName); + g.snapToClpbrd(false); + ui->snapshotPath->setText(fileName); + } +} + +void appPreferencesDialog::initSettings() +{ + ui->snapshotClipboardCKB->setChecked(g.snapToClpbrd()); + ui->burnFirmware->setChecked(g.profile[g.id()].burnFirmware()); + ui->snapshotPath->setText(g.snapshotDir()); + ui->snapshotPath->setReadOnly(true); + if (ui->snapshotClipboardCKB->isChecked()) + { + ui->snapshotPath->setDisabled(true); + ui->snapshotPathButton->setDisabled(true); + } + ui->startupCheck_companion9x->setChecked(g.autoCheckApp()); + ui->startupCheck_fw->setChecked(g.autoCheckFw()); + ui->wizardEnable_ChkB->setChecked(g.enableWizard()); + ui->showSplash->setChecked(g.showSplash()); + ui->historySize->setValue(g.historySize()); + ui->backLightColor->setCurrentIndex(g.backLight()); + ui->simuSW->setChecked(g.simuSW()); + ui->libraryPath->setText(g.libDir()); + ui->ge_lineedit->setText(g.gePath()); + + if (!g.backupDir().isEmpty()) { + if (QDir(g.backupDir()).exists()) { + ui->backupPath->setText(g.backupDir()); + ui->backupEnable->setEnabled(true); + ui->backupEnable->setChecked(g.enableBackup()); + } else { + ui->backupEnable->setDisabled(true); + } + } else { + ui->backupEnable->setDisabled(true); + } + ui->splashincludeCB->setCurrentIndex(g.embedSplashes()); + +#ifdef JOYSTICKS + ui->joystickChkB->setChecked(g.jsSupport()); + if (ui->joystickChkB->isChecked()) { + QStringList joystickNames; + joystickNames << tr("No joysticks found"); + joystick = new Joystick(0,false,0,0); + ui->joystickcalButton->setDisabled(true); + ui->joystickCB->setDisabled(true); + + if ( joystick ) { + if ( joystick->joystickNames.count() > 0 ) { + joystickNames = joystick->joystickNames; + ui->joystickCB->setEnabled(true); + ui->joystickcalButton->setEnabled(true); + } + joystick->close(); + } + ui->joystickCB->clear(); + ui->joystickCB->insertItems(0, joystickNames); + ui->joystickCB->setCurrentIndex(g.jsCtrl()); + } + else { + ui->joystickCB->clear(); + ui->joystickCB->setDisabled(true); + ui->joystickcalButton->setDisabled(true); + } +#endif +// Profile Tab Inits + ui->channelorderCB->setCurrentIndex(g.profile[g.id()].channelOrder()); + ui->stickmodeCB->setCurrentIndex(g.profile[g.id()].defaultMode()); + ui->renameFirmware->setChecked(g.profile[g.id()].renameFwFiles()); + ui->sdPath->setText(g.profile[g.id()].sdPath()); + ui->profileNameLE->setText(g.profile[g.id()].name()); + ui->SplashFileName->setText(g.profile[g.id()].splashFile()); + + initialRadioType = getRadioType(g.profile[g.id()].fwType()); + ui->radioCB->setCurrentIndex(initialRadioType); + + displayImage( g.profile[g.id()].splashFile() ); +} + +void appPreferencesDialog::on_libraryPathButton_clicked() +{ + QString fileName = QFileDialog::getExistingDirectory(this,tr("Select your library folder"), g.libDir()); + if (!fileName.isEmpty()) { + g.libDir(fileName); + ui->libraryPath->setText(fileName); + } +} + +void appPreferencesDialog::on_snapshotClipboardCKB_clicked() +{ + if (ui->snapshotClipboardCKB->isChecked()) { + ui->snapshotPath->setDisabled(true); + ui->snapshotPathButton->setDisabled(true); + g.snapToClpbrd(true); + } else { + ui->snapshotPath->setEnabled(true); + ui->snapshotPath->setReadOnly(true); + ui->snapshotPathButton->setEnabled(true); + g.snapToClpbrd(false); + } +} + +void appPreferencesDialog::on_backupPathButton_clicked() +{ + QString fileName = QFileDialog::getExistingDirectory(this,tr("Select your Models and Settings backup folder"), g.backupDir()); + if (!fileName.isEmpty()) { + g.backupDir(fileName); + ui->backupPath->setText(fileName); + } + ui->backupEnable->setEnabled(true); +} + +void appPreferencesDialog::on_ge_pathButton_clicked() +{ + QString fileName = QFileDialog::getOpenFileName(this, tr("Select Google Earth executable"),ui->ge_lineedit->text()); + if (!fileName.isEmpty()) { + ui->ge_lineedit->setText(fileName); + } +} + +#ifdef JOYSTICKS +void appPreferencesDialog::on_joystickChkB_clicked() { + if (ui->joystickChkB->isChecked()) { + QStringList joystickNames; + joystickNames << tr("No joysticks found"); + joystick = new Joystick(0,false,0,0); + ui->joystickcalButton->setDisabled(true); + ui->joystickCB->setDisabled(true); + + if ( joystick ) { + if ( joystick->joystickNames.count() > 0 ) { + joystickNames = joystick->joystickNames; + ui->joystickCB->setEnabled(true); + ui->joystickcalButton->setEnabled(true); + } + joystick->close(); + } + ui->joystickCB->clear(); + ui->joystickCB->insertItems(0, joystickNames); + } + else { + ui->joystickCB->clear(); + ui->joystickCB->setDisabled(true); + ui->joystickcalButton->setDisabled(true); + } +} + +void appPreferencesDialog::on_joystickcalButton_clicked() { + joystickDialog * jd=new joystickDialog(this, ui->joystickCB->currentIndex()); + jd->exec(); +} +#endif + +// ******** Profile tab functions + +void appPreferencesDialog::on_sdPathButton_clicked() +{ + QString fileName = QFileDialog::getExistingDirectory(this,tr("Select the folder replicating your SD structure"), g.profile[g.id()].sdPath()); + if (!fileName.isEmpty()) { + ui->sdPath->setText(fileName); + } +} + +void appPreferencesDialog::on_removeProfileButton_clicked() +{ + if ( g.id() == 0 ) + QMessageBox::information(this, tr("Not possible to remove profile"), tr("The default profile can not be removed.")); + else + { + g.profile[g.id()].remove(); + g.id( 0 ); + initSettings(); + } +} + + +bool appPreferencesDialog::displayImage( QString fileName ) +{ + // Start by clearing the pixmap + ui->imageLabel->setPixmap(QPixmap()); + + QImage image(fileName); + if (image.isNull()) + return false; + + // Use the firmware name to determine splash width + int width = SPLASH_WIDTH; + if (g.profile[g.id()].fwType().contains("taranis")) + width = SPLASHX9D_WIDTH; + + ui->imageLabel->setPixmap( makePixMap( image, g.profile[g.id()].fwType())); + ui->imageLabel->setFixedSize(width, SPLASH_HEIGHT); + return true; +} + +void appPreferencesDialog::on_SplashSelect_clicked() +{ + QString supportedImageFormats; + for (int formatIndex = 0; formatIndex < QImageReader::supportedImageFormats().count(); formatIndex++) { + supportedImageFormats += QLatin1String(" *.") + QImageReader::supportedImageFormats()[formatIndex]; + } + + QString fileName = QFileDialog::getOpenFileName(this, + tr("Open Image to load"), g.imagesDir(), tr("Images (%1)").arg(supportedImageFormats)); + + if (!fileName.isEmpty()){ + g.imagesDir(QFileInfo(fileName).dir().absolutePath()); + + displayImage(fileName); + ui->SplashFileName->setText(fileName); + } +} + +void appPreferencesDialog::on_clearImageButton_clicked() { + ui->imageLabel->clear(); + ui->SplashFileName->clear(); +} + + + + diff --git a/companion/src/apppreferencesdialog.h b/companion/src/apppreferencesdialog.h new file mode 100644 index 000000000..46bdf3156 --- /dev/null +++ b/companion/src/apppreferencesdialog.h @@ -0,0 +1,50 @@ +#ifndef APPPREFERENCESDIALOG_H +#define APPPREFERENCESDIALOG_H + +#include +#include +#include "eeprominterface.h" + +namespace Ui { + class appPreferencesDialog; +} + +class Joystick; + +class appPreferencesDialog : public QDialog +{ + Q_OBJECT + +public: + explicit appPreferencesDialog(QWidget *parent = 0); + ~appPreferencesDialog(); + Joystick *joystick; + +private: + int initialRadioType; + Ui::appPreferencesDialog *ui; + void initSettings(); + bool displayImage( QString fileName ); + void loadProfileString(QString profile, QString label); + void loadFromProfile(); + +private slots: + void writeValues(); + void on_libraryPathButton_clicked(); + void on_snapshotPathButton_clicked(); + void on_snapshotClipboardCKB_clicked(); + void on_backupPathButton_clicked(); + void on_ge_pathButton_clicked(); + + void on_sdPathButton_clicked(); + void on_removeProfileButton_clicked(); + void on_SplashSelect_clicked(); + void on_clearImageButton_clicked(); + +#ifdef JOYSTICKS + void on_joystickChkB_clicked(); + void on_joystickcalButton_clicked(); +#endif +}; + +#endif // APPPREFERENCESDIALOG_H diff --git a/companion/src/apppreferencesdialog.ui b/companion/src/apppreferencesdialog.ui new file mode 100644 index 000000000..f5d4b9deb --- /dev/null +++ b/companion/src/apppreferencesdialog.ui @@ -0,0 +1,1064 @@ + + + appPreferencesDialog + + + + 0 + 0 + 685 + 462 + + + + + 0 + 0 + + + + + 685 + 0 + + + + Edit Settings + + + + 2 + + + 6 + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + 0 + + + + Application Settings + + + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Automatic Backup Folder + + + + + + + + 40 + 0 + + + + + 50 + 16777215 + + + + 15 + + + 10 + + + + + + + + 0 + 0 + + + + User Splash Screens + + + + + + + + 0 + 0 + + + + + Only show user splash images + + + + + Show user and companion splash images + + + + + + + + Google Earth Executable + + + + + + + Automatic check for OpenTX firmware updates + + + true + + + + + + + + 350 + 0 + + + + true + + + + + + + Open Folder + + + + + + + Qt::Horizontal + + + + + + + + 350 + 0 + + + + true + + + + + + + Find Executable + + + + + + + + 0 + 0 + + + + Files to keep + + + + + + + + 0 + 0 + + + + Splash Screen Library + + + + + + + Enable automatic backup before writing firmware + + + + + + + Open Folder + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + + + + + Automatic check for Companion updates + + + true + + + + + + + Qt::Horizontal + + + + + + + Offer to use wizard for new models + + + true + + + + + + + Show splash screen when Companion starts + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + true + + + true + + + + + + + + Simulator Settings + + + + + + + 0 + 0 + + + + Simulator BackLight + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Enable + + + + + + + Open Folder + + + false + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 100 + 16777215 + + + + + Blue + + + + + Green + + + + + Red + + + + + Orange + + + + + Yellow + + + + + + + + + 0 + 0 + + + + Joystick + + + + + + + Only capture to clipboard + + + + + + + + 0 + 0 + + + + + + + + Calibrate + + + + + + + Remember simulator switch values + + + + + + + Simulator capture folder + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + true + + + + 350 + 0 + + + + true + + + + + + + + Radio Settings Profile + + + + + + + 16777215 + 16777215 + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + + + 1 + + + + Mode 1 (RUD ELE THR AIL) + + + + + Mode 2 (RUD THR ELE AIL) + + + + + Mode 3 (AIL ELE THR RUD) + + + + + Mode 4 (AIL THR ELE RUD) + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + Channel order + +This is used by the templated to determine which channel goes to what number output. + + + 0 + + + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + + + + + + 0 + 0 + + + + Default Stick Mode + + + + + + + Profile Name + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + Splash Screen + + + + + + + + 0 + 0 + + + + Channel Order + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Append version number to FW file name + + + + + + + + 0 + 0 + + + + SD Structure path + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + true + + + + 350 + 0 + + + + + 350 + 16777215 + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Offer to write FW to Tx after download + + + + + + + Remove Profile + + + + + + + Open Folder + + + + + + + Qt::Horizontal + + + + + + + true + + + + 350 + 0 + + + + + 350 + 16777215 + + + + true + + + + + + + Select Image + + + + + + + Radio Type + + + + + + + Clear Image + + + + + + + Qt::Horizontal + + + + + + + + 350 + 0 + + + + + 350 + 16777215 + + + + + + + + + 0 + 0 + + + + + 128 + 64 + + + + + 212 + 64 + + + + QFrame::Panel + + + QFrame::Plain + + + 1 + + + + + + true + + + + + + + + 9X + + + + + 9X with m128 + + + + + 9XR + + + + + 9XR with m128 + + + + + Gruvin9x Board + + + + + Sky9x Board + + + + + Taranis + + + + + + + + + + + + tabWidget + ge_lineedit + ge_pathButton + historySize + showSplash + startupCheck_fw + startupCheck_companion9x + wizardEnable_ChkB + backupPath + backupPathButton + backupEnable + splashincludeCB + libraryPath + libraryPathButton + buttonBox + snapshotPath + snapshotPathButton + snapshotClipboardCKB + simuSW + backLightColor + joystickCB + joystickChkB + joystickcalButton + sdPath + SplashFileName + stickmodeCB + channelorderCB + renameFirmware + burnFirmware + + + + + + + buttonBox + accepted() + appPreferencesDialog + accept() + + + 382 + 455 + + + 157 + 274 + + + + + buttonBox + rejected() + appPreferencesDialog + reject() + + + 402 + 455 + + + 286 + 274 + + + + + diff --git a/companion/src/avroutputdialog.cpp b/companion/src/avroutputdialog.cpp index 8680d39a7..1c8140709 100644 --- a/companion/src/avroutputdialog.cpp +++ b/companion/src/avroutputdialog.cpp @@ -38,7 +38,8 @@ avrOutputDialog::avrOutputDialog(QWidget *parent, QString prog, QStringList arg, if (arg.count()<2) { closeOpt = AVR_DIALOG_FORCE_CLOSE; QTimer::singleShot(0, this, SLOT(forceClose())); - } else { + } + else { sourceFile=arg.at(0); destFile=arg.at(1); if (!displayDetails) { @@ -68,7 +69,6 @@ avrOutputDialog::avrOutputDialog(QWidget *parent, QString prog, QStringList arg, efuse = 0; phase=0; currLine.clear(); - prevLine.clear(); if (!displayDetails) { ui->plainTextEdit->hide(); QTimer::singleShot(0, this, SLOT(shrink())); @@ -132,11 +132,12 @@ void avrOutputDialog::doCopy() char * pointer=buf; QFile source(sourceFile); int blocks=(source.size()/BLKSIZE); - ui->progressBar->setMaximum(blocks-1); + ui->progressBar->setMaximum(blocks-1); if (!source.open(QIODevice::ReadOnly)) { QMessageBox::warning(this, tr("Error"),tr("Cannot open source file")); hasErrors=true; - } else { + } + else { source.read(buf,READBUF); source.close(); QFile dest(destFile); @@ -183,7 +184,6 @@ void avrOutputDialog::runAgain(QString prog, QStringList arg, int closeBehaviour foreach(QString str, arg) cmdLine.append(" " + str); closeOpt = closeBehaviour; currLine.clear(); - prevLine.clear(); process->start(prog,arg); } @@ -194,12 +194,18 @@ void avrOutputDialog::waitForFinish() void avrOutputDialog::addText(const QString &text) { - int val = ui->plainTextEdit->verticalScrollBar()->maximum(); - ui->plainTextEdit->insertPlainText(text); - if(val!=ui->plainTextEdit->verticalScrollBar()->maximum()) - ui->plainTextEdit->verticalScrollBar()->setValue(ui->plainTextEdit->verticalScrollBar()->maximum()); -} + QTextCursor cursor(ui->plainTextEdit->textCursor()); + // is the scrollbar at the end? + bool atEnd = (ui->plainTextEdit->verticalScrollBar()->value() == ui->plainTextEdit->verticalScrollBar()->maximum()); + + cursor.movePosition(QTextCursor::End, QTextCursor::MoveAnchor, 1); + cursor.insertText(text); + + if (atEnd) { + ui->plainTextEdit->verticalScrollBar()->triggerAction(QAbstractSlider::SliderToMaximum); + } +} void avrOutputDialog::doAddTextStdOut() { @@ -209,31 +215,30 @@ void avrOutputDialog::doAddTextStdOut() int nlPos, pos, size; addText(text); + currStdLine.append(text); if (currStdLine.contains("size = ")) { - pos=currStdLine.lastIndexOf("size = "); - temp=currStdLine.mid(pos+7); - pos=temp.lastIndexOf("\n"); - size=temp.left(pos).toInt(); + pos = currStdLine.lastIndexOf("size = "); + temp = currStdLine.mid(pos+7); + pos = temp.lastIndexOf("\n"); + size = temp.left(pos).toInt(); ui->progressBar->setMaximum(size/2048); } if (currStdLine.contains("\n")) { - nlPos=currStdLine.lastIndexOf("\n"); - prevStdLine=currStdLine.left(nlPos).trimmed(); - currStdLine=currStdLine.mid(nlPos+1); + nlPos = currStdLine.lastIndexOf("\n"); + currStdLine = currStdLine.mid(nlPos+1); } if (!currStdLine.isEmpty()) { - if (currStdLine.at(0)==QChar('.')) { - pos=currStdLine.lastIndexOf("."); + if (currStdLine.at(0) == QChar('.')) { + pos = currStdLine.lastIndexOf("."); ui->progressBar->setValue(pos); } - } - if (!currStdLine.isEmpty()) { - if (currStdLine.startsWith("Starting upload: [")) { - pos=(currStdLine.lastIndexOf("#")-19)/(MAX_FSIZE/204800.0); + else if (currStdLine.startsWith("Starting upload: [")) { + pos = (currStdLine.lastIndexOf("#")-19)/(MAX_FSIZE/204800.0); ui->progressBar->setValue(pos); } } + if (text.contains("Complete ")) { #if !__GNUC__ if (kill_timer) { @@ -250,19 +255,15 @@ void avrOutputDialog::doAddTextStdOut() } } - //addText("\n=====\n" + text + "\n=====\n"); - - if(text.contains(":010000")) //contains fuse info - { - QStringList stl = text.split(":01000000"); - - foreach (QString t, stl) - { - bool ok = false; - if(!lfuse) lfuse = t.left(2).toInt(&ok,16); - if(!hfuse && !ok) hfuse = t.left(2).toInt(&ok,16); - if(!efuse && !ok) efuse = t.left(2).toInt(&ok,16); - } + if (text.contains(":010000")) { + //contains fuse info + QStringList stl = text.split(":01000000"); + foreach (QString t, stl) { + bool ok = false; + if (!lfuse) lfuse = t.left(2).toInt(&ok,16); + if (!hfuse && !ok) hfuse = t.left(2).toInt(&ok,16); + if (!efuse && !ok) efuse = t.left(2).toInt(&ok,16); + } } if (text.contains("-E-")) { @@ -276,9 +277,11 @@ QString avrOutputDialog::getProgrammer() EEPROMInterface *eepromInterface = GetEepromInterface(); if (IS_TARANIS(eepromInterface->getBoard())) { return "DFU Util"; - } else if (eepromInterface->getBoard()==BOARD_SKY9X) { + } + else if (eepromInterface->getBoard()==BOARD_SKY9X) { return "SAM-BA"; - } else { + } + else { return "AVRDUDE"; } } @@ -298,25 +301,31 @@ void avrOutputDialog::errorWizard() DeviceStr="Atmega 64"; FwStr="\n"+tr("ie: OpenTX for 9X board or OpenTX for 9XR board"); fwexist=true; - } else if (DeviceId=="0x1e9702") { + } + else if (DeviceId=="0x1e9702") { DeviceStr="Atmega 128"; FwStr="\n"+tr("ie: OpenTX for M128 / 9X board or OpenTX for 9XR board with M128 chip"); fwexist=true; - } else if (DeviceId=="0x1e9703") { + } + else if (DeviceId=="0x1e9703") { DeviceStr="Atmega 1280"; - } else if (DeviceId=="0x1e9704") { + } + else if (DeviceId=="0x1e9704") { DeviceStr="Atmega 1281"; - } else if (DeviceId=="0x1e9801") { + } + else if (DeviceId=="0x1e9801") { DeviceStr="Atmega 2560"; FwStr="\n"+tr("ie: OpenTX for Gruvin9X board"); fwexist=true; - } else if (DeviceId=="0x1e9802") { + } + else if (DeviceId=="0x1e9802") { DeviceStr="Atmega 2561"; } } if (fwexist==false) { 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 { + } + else { FirmwareInfo *firmware = GetCurrentFirmware(); 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)); } @@ -333,7 +342,7 @@ void avrOutputDialog::doAddTextStdErr() currLine.append(text); if (currLine.contains("#")) { - avrphase=currLine.left(1).toLower(); + avrphase = currLine.left(1).toLower(); if (avrphase=="w") { ui->progressBar->setStyleSheet("QProgressBar {text-align: center;} QProgressBar::chunk { background-color: #ff0000; text-align:center;}:"); phase=1; @@ -344,14 +353,15 @@ void avrOutputDialog::doAddTextStdErr() pbvalue=currLine.count("#")*2; ui->progressBar->setValue(pbvalue); } - if (avrphase=="r") { + else if (avrphase=="r") { if (phase==0) { ui->progressBar->setStyleSheet("QProgressBar {text-align: center;} QProgressBar::chunk { background-color: #00ff00; text-align:center;}:"); if(winTitle.isEmpty()) setWindowTitle(getProgrammer() + " - " + tr("Reading")); else setWindowTitle(getProgrammer() + " - " + winTitle + " - " + tr("Reading")); - } else { + } + else { ui->progressBar->setStyleSheet("QProgressBar {text-align: center;} QProgressBar::chunk { background-color: #0000ff; text-align:center;}:"); phase=2; if(winTitle.isEmpty()) @@ -363,11 +373,12 @@ void avrOutputDialog::doAddTextStdErr() ui->progressBar->setValue(pbvalue); } } + if (currLine.contains("\n")) { - nlPos=currLine.lastIndexOf("\n"); - prevLine=currLine.left(nlPos).trimmed(); - currLine=currLine.mid(nlPos+1); + nlPos = currLine.lastIndexOf("\n"); + currLine = currLine.mid(nlPos+1); } + if (text.contains("-E-") && !text.contains("-E- No receive file name")) { hasErrors = true; } @@ -376,6 +387,7 @@ void avrOutputDialog::doAddTextStdErr() } #define HLINE_SEPARATOR "=================================================================================" + void avrOutputDialog::doFinished(int code=0) { addText("\n" HLINE_SEPARATOR); @@ -385,17 +397,22 @@ void avrOutputDialog::doFinished(int code=0) if (code) { ui->checkBox->setChecked(true); addText("\n" + getProgrammer() + " " + tr("done - exit code %1").arg(code)); - } else if (hasErrors) { + } + else if (hasErrors) { ui->checkBox->setChecked(true); addText("\n" + getProgrammer() + " " + tr("done with errors")); - } else if (!cmdLine.isEmpty()) { + } + else if (!cmdLine.isEmpty()) { addText("\n" + getProgrammer() + " " + tr("done - SUCCESSFUL")); - } else { + } + else { addText(tr("done - SUCCESSFUL")); } addText("\n" HLINE_SEPARATOR "\n"); - if(lfuse || hfuse || efuse) addReadFuses(); + if(lfuse || hfuse || efuse) { + addReadFuses(); + } switch(closeOpt) { @@ -417,7 +434,8 @@ void avrOutputDialog::doFinished(int code=0) if (!cmdLine.isEmpty()) { if (getProgrammer()!="AVRDUDE") { QMessageBox::critical(this, "Companion", getProgrammer() + " " + tr("did not finish correctly")); - } else { + } + else { 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(); @@ -427,12 +445,14 @@ void avrOutputDialog::doFinished(int code=0) QMessageBox::critical(this, "Companion", tr("Copy did not finish correctly")); } // reject(); - } else { + } + else { if (!cmdLine.isEmpty()) { - ui->progressBar->setValue(100); + ui->progressBar->setValue(ui->progressBar->maximum()); QMessageBox::information(this, "Companion", getProgrammer() + " " + tr("finished correctly")); accept(); - } else { + } + else { QMessageBox::information(this, "Companion", tr("Copy finished correctly")); accept(); } @@ -454,8 +474,6 @@ void avrOutputDialog::doProcessStarted() addText("\n" HLINE_SEPARATOR "\n"); } - - void avrOutputDialog::addReadFuses() { addText(HLINE_SEPARATOR "\n"); @@ -463,19 +481,23 @@ void avrOutputDialog::addReadFuses() addText("\n" HLINE_SEPARATOR "\n"); } -void avrOutputDialog::on_checkBox_toggled(bool checked) { +void avrOutputDialog::on_checkBox_toggled(bool checked) +{ if (checked) { - ui->plainTextEdit->show(); - } else { - ui->plainTextEdit->hide(); - QTimer::singleShot(0, this, SLOT(shrink())); + ui->plainTextEdit->show(); + } + else { + ui->plainTextEdit->hide(); + QTimer::singleShot(0, this, SLOT(shrink())); } } -void avrOutputDialog::shrink() { +void avrOutputDialog::shrink() +{ resize(0,0); } -void avrOutputDialog::forceClose() { - accept();; +void avrOutputDialog::forceClose() +{ + accept(); } diff --git a/companion/src/avroutputdialog.h b/companion/src/avroutputdialog.h index 0eedabcc2..b62a69cef 100644 --- a/companion/src/avroutputdialog.h +++ b/companion/src/avroutputdialog.h @@ -52,9 +52,7 @@ private: quint8 lfuse; quint8 hfuse; quint8 efuse; - QString prevLine; QString currLine; - QString prevStdLine; QString currStdLine; int phase; QString winTitle; diff --git a/companion/src/burnconfigdialog.cpp b/companion/src/burnconfigdialog.cpp index 9e08d860f..a2d08fd21 100644 --- a/companion/src/burnconfigdialog.cpp +++ b/companion/src/burnconfigdialog.cpp @@ -2,6 +2,8 @@ #include "ui_burnconfigdialog.h" #include "avroutputdialog.h" #include "eeprominterface.h" +#include "helpers.h" +#include "appdata.h" #include #if !defined WIN32 && defined __GNUC__ @@ -82,33 +84,42 @@ burnConfigDialog::~burnConfigDialog() void burnConfigDialog::getSettings() { - QSettings settings("companion", "companion"); + avrLoc = g.avrdudeLocation(); + sambaLoc = g.sambaLocation(); + dfuLoc = g.dfuLocation(); + #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(); - dfuLoc = settings.value("dfu_location", QFileInfo("dfu-util.exe").absoluteFilePath()).toString(); + if ( avrLoc.isEmpty()) + avrLoc = QFileInfo("avrdude.exe").absoluteFilePath(); + if ( sambaLoc.isEmpty()) + sambaLoc = QFileInfo("sam-ba.exe").absoluteFilePath(); + if ( dfuLoc.isEmpty()) + dfuLoc = QFileInfo("dfu-util.exe").absoluteFilePath(); #elif defined __APPLE__ - avrLoc = settings.value("avrdude_location", "/usr/local/bin/avrdude").toString(); - sambaLoc = settings.value("samba_location", "/usr/local/bin/sam-ba").toString(); - dfuLoc = settings.value("dfu_location", QFileInfo("/opt/local/bin/dfu-util").absoluteFilePath()).toString(); + if ( avrLoc.isEmpty()) + avrLoc = "/usr/local/bin/avrdude"; + if ( sambaLoc.isEmpty()) + sambaLoc = "/usr/local/bin/sam-ba"; + if ( dfuLoc.isEmpty()) + dfuLoc = QFileInfo("/opt/local/bin/dfu-util").absoluteFilePath(); #else - avrLoc = settings.value("avrdude_location", "/usr/bin/avrdude").toString(); - sambaLoc = settings.value("samba_location", "/usr/bin/sam-ba").toString(); - dfuLoc = settings.value("dfu_location", QFileInfo("/usr/bin/dfu-util").absoluteFilePath()).toString(); + if ( avrLoc.isEmpty()) + avrLoc = "/usr/bin/avrdude"; + if ( sambaLoc.isEmpty()) + sambaLoc = "/usr/bin/sam-ba"; + if ( dfuLoc.isEmpty()) + dfuLoc = QFileInfo("/usr/bin/dfu-util").absoluteFilePath(); #endif - QString str = settings.value("avr_arguments").toString(); - avrArgs = str.split(" ", QString::SkipEmptyParts); - avrProgrammer = settings.value("programmer", QString("usbasp")).toString(); - avrMCU = settings.value("mcu", QString("m64")).toString(); - armMCU = settings.value("arm_mcu", QString("at91sam3s4-9x")).toString(); + dfuArgs = g.dfuArguments().split(" ", QString::SkipEmptyParts); + avrArgs = g.avrArguments().split(" ", QString::SkipEmptyParts); + avrProgrammer = g.programmer(); + avrPort = g.avrPort(); + avrMCU = g.mcu(); + armMCU = g.armMcu(); + sambaPort = g.sambaPort(); - avrPort = settings.value("avr_port", "").toString(); - sambaPort = settings.value("samba_port", "\\USBserial\\COM23").toString(); - - str = settings.value("dfu_arguments", "-a 0").toString(); - dfuArgs = str.split(" ", QString::SkipEmptyParts); ui->avrdude_location->setText(getAVRDUDE()); ui->avrArgs->setText(getAVRArgs().join(" ")); @@ -136,17 +147,16 @@ void burnConfigDialog::getSettings() void burnConfigDialog::putSettings() { - QSettings settings("companion", "companion"); - settings.setValue("avrdude_location", avrLoc); - settings.setValue("programmer", avrProgrammer); - settings.setValue("mcu", avrMCU); - settings.setValue("avr_port", avrPort); - settings.setValue("avr_arguments", avrArgs.join(" ")); - settings.setValue("samba_location", sambaLoc); - settings.setValue("samba_port", sambaPort); - settings.setValue("arm_mcu", armMCU); - settings.setValue("dfu_location", dfuLoc); - settings.setValue("dfu_arguments", dfuArgs.join(" ")); + g.avrdudeLocation( avrLoc ); + g.programmer( avrProgrammer); + g.mcu( avrMCU ); + g.avrPort( avrPort ); + g.avrArguments( avrArgs.join(" ") ); + g.sambaLocation( sambaLoc ); + g.sambaPort( sambaPort ); + g.armMcu( armMCU ); + g.dfuLocation( dfuLoc ); + g.dfuArguments( dfuArgs.join(" ") ); } void burnConfigDialog::populateProgrammers() @@ -278,8 +288,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 +306,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 +324,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,7 +337,6 @@ 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("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); @@ -338,7 +350,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 +359,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 +369,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 +387,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 +406,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("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 bb85de6f5..b5419d37f 100644 --- a/companion/src/burnconfigdialog.ui +++ b/companion/src/burnconfigdialog.ui @@ -27,7 +27,7 @@ - :/images/configure.png:/images/configure.png + :/icon.png:/icon.png diff --git a/companion/src/burndialog.cpp b/companion/src/burndialog.cpp index 1851310d6..617c7ea9e 100644 --- a/companion/src/burndialog.cpp +++ b/companion/src/burndialog.cpp @@ -7,7 +7,9 @@ #include "splashlibrary.h" #include "flashinterface.h" #include "hexinterface.h" +#include "appdata.h" +// Type 1 = Burn EEPROM, Type 2= Burn Flash burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * backupEE, QString DocName): QDialog(parent), ui(new Ui::burnDialog), @@ -16,32 +18,37 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac hexType(Type) { ui->setupUi(this); + + if(!g.profile[g.id()].splashFile().isEmpty()){ + imageSource=PROFILE; + imageFile=g.profile[g.id()].splashFile(); + } + else{ + ui->useProfileImageCB->setDisabled(true); + imageSource=FIRMWARE; + imageFile=""; + } ui->SplashFrame->hide(); ui->FramFWInfo->hide(); ui->EEbackupCB->hide(); ui->EEbackupCB->setCheckState(*backup ? Qt::Checked : Qt::Unchecked); - if (Type == 2) { + if (Type == FLASH_FILE_TYPE ) { ui->EEpromCB->hide(); ui->profile_label->hide(); 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(); ui->patchhw_CB->hide(); ui->EEpromCB->hide(); - ui->ImageLoadButton->setDisabled(true); - ui->libraryButton->setDisabled(true); - ui->InvertColorButton->setDisabled(true); ui->BurnFlashButton->setDisabled(true); - ui->ImageFileName->clear(); - ui->FwImage->clear(); ui->FWFileName->clear(); ui->DateField->clear(); ui->SVNField->clear(); @@ -51,41 +58,28 @@ 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("companion", "companion"); - int profileid=settings.value("profileId", 1).toInt(); - settings.beginGroup("Profiles"); - QString profile=QString("profile%1").arg(profileid); - settings.beginGroup(profile); - QString Name=settings.value("Name","").toString(); - settings.endGroup(); - settings.endGroup(); - ui->profile_label->setText(tr("Current profile")+QString(": ")+Name); + else { + setWindowTitle(tr("Write Models and Settings in %1 to TX").arg(DocName)); + } + ui->profile_label->setText(tr("Current profile")+QString(": ")+g.profile[g.id()].name()); } if (!hexfileName->isEmpty()) { ui->FWFileName->setText(*hexfileName); - if (Type==2) { + if (Type==FLASH_FILE_TYPE) { checkFw(*hexfileName); - } else { + } + else { burnraw=false; if (checkeEprom(*hexfileName)) { - QSettings settings("companion", "companion"); - int profileid=settings.value("profileId", 1).toInt(); - settings.beginGroup("Profiles"); - QString profile=QString("profile%1").arg(profileid); - settings.beginGroup(profile); - QString Name=settings.value("Name","").toString(); - QString calib=settings.value("StickPotCalib","").toString(); - QString trainercalib=settings.value("TrainerCalib","").toString(); - QString DisplaySet=settings.value("Display","").toString(); - QString BeeperSet=settings.value("Beeper","").toString(); - QString HapticSet=settings.value("Haptic","").toString(); - QString SpeakerSet=settings.value("Speaker","").toString(); - settings.endGroup(); - settings.endGroup(); + QString Name = g.profile[g.id()].name(); + QString calib = g.profile[g.id()].stickPotCalib(); + QString trainercalib = g.profile[g.id()].trainerCalib(); + QString DisplaySet = g.profile[g.id()].display(); + QString BeeperSet = g.profile[g.id()].beeper(); + QString HapticSet = g.profile[g.id()].haptic(); + QString SpeakerSet = g.profile[g.id()].speaker(); if (!Name.isEmpty()) { ui->profile_label->show(); ui->patchcalib_CB->show(); @@ -97,12 +91,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); @@ -112,32 +108,27 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac ui->FlashLoadButton->hide(); hexfileName->clear(); } - else if (Type==2) { - QSettings settings("companion", "companion"); - QString FileName; - FileName = settings.value("lastFw").toString(); + else if (Type==FLASH_FILE_TYPE) { + QString FileName = g.profile[g.id()].fwName(); QFile file(FileName); if (file.exists()) { checkFw(FileName); } } + updateUI(); resize(0, 0); } -burnDialog::~burnDialog() { +burnDialog::~burnDialog() +{ delete ui; } void burnDialog::on_FlashLoadButton_clicked() { QString fileName; - QSettings settings("companion", "companion"); - ui->ImageLoadButton->setDisabled(true); - ui->libraryButton->setDisabled(true); - ui->InvertColorButton->setDisabled(true); + ui->BurnFlashButton->setDisabled(true); - ui->ImageFileName->clear(); - ui->FwImage->clear(); ui->FWFileName->clear(); ui->DateField->clear(); ui->SVNField->clear(); @@ -147,11 +138,14 @@ void burnDialog::on_FlashLoadButton_clicked() ui->BurnFlashButton->setDisabled(true); ui->EEbackupCB->hide(); QTimer::singleShot(0, this, SLOT(shrink())); - if (hexType==2) { - fileName = QFileDialog::getOpenFileName(this, tr("Open"), settings.value("lastFlashDir").toString(), FLASH_FILES_FILTER); + if (hexType==FLASH_FILE_TYPE) { + fileName = QFileDialog::getOpenFileName(this, tr("Open Firmware File"), g.flashDir(), FLASH_FILES_FILTER); + if(fileName.isEmpty()) + return; checkFw(fileName); - } else { - QString fileName = QFileDialog::getOpenFileName(this,tr("Choose file to load Models and Settings from"), settings.value("lastDir").toString(), tr(EXTERNAL_EEPROM_FILES_FILTER)); + } + else { + QString fileName = QFileDialog::getOpenFileName(this,tr("Choose file to load Models and Settings from"), g.eepromDir(), tr(EXTERNAL_EEPROM_FILES_FILTER)); if (checkeEprom(fileName)) { if (burnraw==false) { ui->BurnFlashButton->setEnabled(true); @@ -160,10 +154,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); @@ -174,6 +170,7 @@ void burnDialog::on_FlashLoadButton_clicked() QTimer::singleShot(0, this, SLOT(shrink())); } } + updateUI(); } void burnDialog::checkFw(QString fileName) @@ -181,10 +178,11 @@ void burnDialog::checkFw(QString fileName) if (fileName.isEmpty()) { return; } - QSettings settings("companion", "companion"); + if (!IS_TARANIS(GetEepromInterface()->getBoard())) { ui->EEbackupCB->show(); - } else { + } + else { ui->EEbackupCB->setChecked(false); *backup=false; } @@ -195,57 +193,19 @@ void burnDialog::checkFw(QString fileName) ui->DateField->setText(flash.getDate() + " " + flash.getTime()); ui->SVNField->setText(flash.getSvn()); ui->ModField->setText(flash.getBuild()); - ui->BurnFlashButton->setEnabled(true); - ui->BurnFlashButton->setText(tr("Write to TX")); + + ui->SplashFrame->hide(); if (flash.hasSplash()) { ui->SplashFrame->show(); - ui->ImageLoadButton->setEnabled(true); - ui->libraryButton->setEnabled(true); - ui->FwImage->setFixedSize(flash.getSplashWidth(),flash.getSplashHeight()); - ui->imageLabel->setFixedSize(flash.getSplashWidth(),flash.getSplashHeight()); - ui->FwImage->show(); - ui->FwImage->setPixmap(QPixmap::fromImage(flash.getSplash())); - QString ImageStr = settings.value("SplashImage", "").toString(); - bool PatchFwCB = settings.value("patchImage", false).toBool(); - if (!ImageStr.isEmpty()) { - QImage Image = qstring2image(ImageStr); - ui->imageLabel->setPixmap(QPixmap::fromImage(Image.convertToFormat(flash.getSplashFormat()))); - ui->InvertColorButton->setEnabled(true); - ui->PreferredImageCB->setChecked(true); - ui->PatchFWCB->setChecked(PatchFwCB); - } - else { - QString fileName=ui->ImageFileName->text(); - if (!fileName.isEmpty()) { - QImage image(fileName); - if (!image.isNull()) { - ui->InvertColorButton->setEnabled(true); - 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 { - ui->PatchFWCB->setDisabled(true); - ui->PatchFWCB->setChecked(false); - ui->PreferredImageCB->setDisabled(true); - } - } else { - ui->PatchFWCB->setDisabled(true); - ui->PatchFWCB->setChecked(false); - ui->PreferredImageCB->setDisabled(true); - } - } - } else { - ui->FwImage->hide(); - ui->ImageFileName->setText(""); - ui->SplashFrame->hide(); + ui->imageLabel->setFixedSize(flash.getSplashWidth(), flash.getSplashHeight()); } - } 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); + } + else { + QMessageBox::warning(this, tr("Warning"), tr("%1 may not be a valid firmware file").arg(fileName)); } + ui->BurnFlashButton->setEnabled(true); QTimer::singleShot(0, this, SLOT(shrink())); - settings.setValue("lastFlashDir", QFileInfo(fileName).dir().absolutePath()); + g.flashDir( QFileInfo(fileName).dir().absolutePath() ); } bool burnDialog::checkeEprom(QString fileName) @@ -267,7 +227,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; @@ -310,7 +271,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())); @@ -336,53 +298,92 @@ bool burnDialog::checkeEprom(QString fileName) return true; } -void burnDialog::on_ImageLoadButton_clicked() +void burnDialog::displaySplash() +{ + QImage image; + if (imageSource == FIRMWARE){ + FlashInterface flash(ui->FWFileName->text()); + image = flash.getSplash(); + } + else{ + image.load(imageFile); + } + if (image.isNull()) { + return; + } + ui->imageLabel->setPixmap( makePixMap( image, g.profile[g.id()].fwType())); +} + +void burnDialog::updateUI() +{ + if (hexType==EEPROM_FILE_TYPE) + return; + + ui->useProfileImageCB->setChecked( imageSource == PROFILE ); + ui->useFwImageCB->setChecked( imageSource == FIRMWARE ); + ui->useLibraryImageCB->setChecked( imageSource == LIBRARY ); + ui->useAnotherImageCB->setChecked( imageSource == ANOTHER ); + + displaySplash(); +} + +void burnDialog::on_useFwImageCB_clicked() +{ + QString fileName = ui->FWFileName->text(); + FlashInterface flash(fileName); + if (!flash.isValid()) { + QMessageBox::critical(this, tr("Error"), tr( "The firmware file is not valid." )); + } + else { + if (!flash.hasSplash()) { + QMessageBox::critical(this, tr("Error"), tr( "There is no start screen image in the firmware file." )); + } + else{ + imageSource = FIRMWARE; + imageFile = fileName; + } + } + updateUI(); +} + +void burnDialog::on_useProfileImageCB_clicked() +{ + QString fileName = g.profile[g.id()].splashFile(); + if (!fileName.isEmpty()){ + QImage image(fileName); + if (image.isNull()) { + QMessageBox::critical(this, tr("Error"), tr("The profile image %1 does not contain an image.").arg(fileName)); + } + else { + imageSource = PROFILE; + imageFile = fileName; + } + } + updateUI(); +} + +void burnDialog::on_useAnotherImageCB_clicked() { QString supportedImageFormats; for (int formatIndex = 0; formatIndex < QImageReader::supportedImageFormats().count(); formatIndex++) { supportedImageFormats += QLatin1String(" *.") + QImageReader::supportedImageFormats()[formatIndex]; } - - QSettings settings("companion", "companion"); - QString fileName = QFileDialog::getOpenFileName(this, - tr("Open Image to load"), settings.value("lastImagesDir").toString(), tr("Images (%1)").arg(supportedImageFormats)); - - if (!fileName.isEmpty()) { - settings.setValue("lastImagesDir", QFileInfo(fileName).dir().absolutePath()); + QString fileName = QFileDialog::getOpenFileName(this, tr("Open image file to use as Tx start screen"), g.imagesDir(), tr("Images (%1)").arg(supportedImageFormats)); + if (!fileName.isEmpty()){ + g.imagesDir( QFileInfo(fileName).dir().absolutePath() ); QImage image(fileName); if (image.isNull()) { - QMessageBox::critical(this, tr("Error"), tr("Cannot load %1.").arg(fileName)); - ui->PatchFWCB->setDisabled(true); - ui->PatchFWCB->setChecked(false); - ui->InvertColorButton->setDisabled(true); - return; + QMessageBox::critical(this, tr("Error"), tr("Image could not be loaded from %1").arg(fileName)); } - ui->ImageFileName->setText(fileName); - ui->InvertColorButton->setEnabled(true); - if (ui->imageLabel->width()!=128) { - image=image.convertToFormat(QImage::Format_RGB32); - QRgb col; - 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)); - } - } - ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width(), ui->imageLabel->height()))); - } else { - ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width(), ui->imageLabel->height()).convertToFormat(QImage::Format_Mono))); - } - ui->PatchFWCB->setEnabled(true); + else{ + imageSource = ANOTHER; + imageFile = fileName; + } } + updateUI(); } -void burnDialog::on_libraryButton_clicked() +void burnDialog::on_useLibraryImageCB_clicked() { QString fileName; splashLibrary *ld = new splashLibrary(this,&fileName); @@ -390,50 +391,26 @@ void burnDialog::on_libraryButton_clicked() if (!fileName.isEmpty()) { QImage image(fileName); if (image.isNull()) { - QMessageBox::critical(this, tr("Error"), tr("Cannot load %1.").arg(fileName)); - ui->PatchFWCB->setDisabled(true); - ui->PatchFWCB->setChecked(false); - ui->InvertColorButton->setDisabled(true); - return; + QMessageBox::critical(this, tr("Error"), tr("The library image could not be loaded")); } - ui->ImageFileName->setText(fileName); - ui->InvertColorButton->setEnabled(true); - if (ui->imageLabel->width()!=128) { - image=image.convertToFormat(QImage::Format_RGB32); - QRgb col; - 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)); - } - } - ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width(), ui->imageLabel->height()))); - } else { - ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width(), ui->imageLabel->height()).convertToFormat(QImage::Format_Mono))); + else{ + imageSource = LIBRARY; + imageFile = fileName; } - ui->PatchFWCB->setEnabled(true); } + updateUI(); } void burnDialog::on_BurnFlashButton_clicked() { - if (hexType==2) { + if (hexType==FLASH_FILE_TYPE) { QString fileName=ui->FWFileName->text(); if (!fileName.isEmpty()) { - QSettings settings("companion", "companion"); - settings.setValue("lastFlashDir", QFileInfo(fileName).dir().absolutePath()); - settings.setValue("lastFw", fileName); - if (ui->PatchFWCB->isChecked()) { - settings.setValue("patchImage", true); + g.flashDir( QFileInfo(fileName).dir().absolutePath() ); + if (!ui->useFwImageCB->isChecked()) { QImage image = ui->imageLabel->pixmap()->toImage().scaled(ui->imageLabel->width(), ui->imageLabel->height()); if (!image.isNull()) { - QString tempDir = QDir::tempPath(); + QString tempDir = QDir::tempPath(); QString tempFile; if (getFileType(fileName) == FILE_TYPE_HEX) tempFile = tempDir + "/flash.hex"; @@ -453,7 +430,6 @@ void burnDialog::on_BurnFlashButton_clicked() QMessageBox::critical(this, tr("Warning"), tr("Custom image not found")); } } else { - settings.setValue("patchImage", false); hexfileName->clear(); hexfileName->append(fileName); } @@ -462,27 +438,20 @@ void burnDialog::on_BurnFlashButton_clicked() hexfileName->clear(); } } - if (hexType==1) { - QSettings settings("companion", "companion"); - int profileid=settings.value("profileId", 1).toInt(); - settings.beginGroup("Profiles"); - QString profile=QString("profile%1").arg(profileid); - settings.beginGroup(profile); - QString calib=settings.value("StickPotCalib","").toString(); - QString trainercalib=settings.value("TrainerCalib","").toString(); + if (hexType==EEPROM_FILE_TYPE) { + QString calib = g.profile[g.id()].stickPotCalib(); + QString trainercalib = g.profile[g.id()].trainerCalib(); int potsnum=GetEepromInterface()->getCapability(Pots); - int8_t vBatCalib=(int8_t)settings.value("VbatCalib", radioData.generalSettings.vBatCalib).toInt(); - int8_t currentCalib=(int8_t)settings.value("currentCalib", radioData.generalSettings.currentCalib).toInt(); - int8_t PPM_Multiplier=(int8_t)settings.value("PPM_Multiplier", radioData.generalSettings.PPM_Multiplier).toInt(); - uint8_t GSStickMode=(uint8_t)settings.value("GSStickMode", radioData.generalSettings.stickMode).toUInt(); - uint8_t vBatWarn=(uint8_t)settings.value("vBatWarn",radioData.generalSettings.vBatWarn).toUInt(); + int8_t vBatCalib=(int8_t) g.profile[g.id()].vBatCalib(); + int8_t currentCalib=(int8_t) g.profile[g.id()].currentCalib(); + int8_t PPM_Multiplier=(int8_t) g.profile[g.id()].ppmMultiplier(); + uint8_t GSStickMode=(uint8_t) g.profile[g.id()].gsStickMode(); + uint8_t vBatWarn=(uint8_t) g.profile[g.id()].vBatWarn(); - QString DisplaySet=settings.value("Display","").toString(); - QString BeeperSet=settings.value("Beeper","").toString(); - QString HapticSet=settings.value("Haptic","").toString(); - QString SpeakerSet=settings.value("Speaker","").toString(); - settings.endGroup(); - settings.endGroup(); + QString DisplaySet= g.profile[g.id()].display(); + QString BeeperSet= g.profile[g.id()].beeper(); + QString HapticSet= g.profile[g.id()].haptic(); + QString SpeakerSet= g.profile[g.id()].speaker(); bool patch=false; if (ui->patchcalib_CB->isChecked()) { if ((calib.length()==(NUM_STICKS+potsnum)*12) && (trainercalib.length()==16)) { @@ -618,99 +587,9 @@ void burnDialog::on_cancelButton_clicked() this->close(); } -void burnDialog::on_InvertColorButton_clicked() -{ - if (ui->imageLabel->pixmap()) { - QImage image = ui->imageLabel->pixmap()->toImage(); - image.invertPixels(); - ui->imageLabel->setPixmap(QPixmap::fromImage(image)); - } -} - void burnDialog::on_EEpromCB_toggled(bool checked) { - if (ui->EEpromCB->isChecked()) { - *backup=true; - } else { - *backup=false; - } -} - -void burnDialog::on_PreferredImageCB_toggled(bool checked) -{ - QString tmpFileName; - if (checked) { - QSettings settings("companion", "companion"); - QString ImageStr = settings.value("SplashImage", "").toString(); - if (!ImageStr.isEmpty()) { - QImage Image = qstring2image(ImageStr); - if (ui->imageLabel->width()!=128) { - Image=Image.convertToFormat(QImage::Format_RGB32); - QRgb col; - 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)); - } - } - } else { - Image=Image.convertToFormat(QImage::Format_Mono); - } - ui->imageLabel->setPixmap(QPixmap::fromImage(Image)); - ui->InvertColorButton->setEnabled(true); - ui->PreferredImageCB->setChecked(true); - ui->ImageFileName->setDisabled(true); - ui->ImageLoadButton->setDisabled(true); - ui->libraryButton->setDisabled(true); - ui->PatchFWCB->setEnabled(true); - } - } else { - ui->imageLabel->clear(); - ui->ImageLoadButton->setEnabled(true); - ui->libraryButton->setEnabled(true); - tmpFileName = ui->ImageFileName->text(); - if (!tmpFileName.isEmpty()) { - QImage image(tmpFileName); - if (!image.isNull()) { - if (ui->imageLabel->width()!=128) { - image=image.convertToFormat(QImage::Format_RGB32); - QRgb col; - 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)); - } - } - } else { - image=image.convertToFormat(QImage::Format_Mono); - } - ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width(), ui->imageLabel->height()))); - ui->InvertColorButton->setEnabled(true); - ui->ImageFileName->setEnabled(true); - ui->PatchFWCB->setDisabled(false); - } else { - ui->InvertColorButton->setDisabled(true); - ui->PatchFWCB->setDisabled(true); - ui->PatchFWCB->setChecked(false); - } - } else { - ui->InvertColorButton->setDisabled(true); - ui->PatchFWCB->setDisabled(true); - ui->PatchFWCB->setChecked(false); - } - } + *backup = ui->EEpromCB->isChecked(); } void burnDialog::shrink() @@ -720,9 +599,5 @@ void burnDialog::shrink() void burnDialog::on_EEbackupCB_clicked() { - if (ui->EEbackupCB->isChecked()) { - *backup=true; - } else { - *backup=false; - } + *backup = ui->EEbackupCB->isChecked(); } diff --git a/companion/src/burndialog.h b/companion/src/burndialog.h index 40068f3ac..1ffac2b92 100644 --- a/companion/src/burndialog.h +++ b/companion/src/burndialog.h @@ -19,6 +19,8 @@ #define ER9X_EEPROM_FILE_TYPE "ER9X_EEPROM_FILE" #define EEPE_EEPROM_FILE_HEADER "EEPE EEPROM FILE" #define EEPE_MODEL_FILE_HEADER "EEPE MODEL FILE" +#define EEPROM_FILE_TYPE 1 +#define FLASH_FILE_TYPE 2 namespace Ui @@ -36,18 +38,22 @@ public: private slots: void on_FlashLoadButton_clicked(); - void on_ImageLoadButton_clicked(); - void on_libraryButton_clicked(); void on_BurnFlashButton_clicked(); void on_cancelButton_clicked(); - void on_InvertColorButton_clicked(); void on_EEbackupCB_clicked(); - void on_PreferredImageCB_toggled(bool checked); - void on_EEpromCB_toggled(bool checked); - void checkFw(QString fileName); + void on_EEpromCB_toggled(bool checked); bool checkeEprom(QString fileName); + void on_useProfileImageCB_clicked(); + void on_useFwImageCB_clicked(); + void on_useLibraryImageCB_clicked(); + void on_useAnotherImageCB_clicked(); + + void checkFw(QString fileName); + void displaySplash(); + void updateUI(); void shrink(); + private: Ui::burnDialog *ui; QString * hexfileName; @@ -55,6 +61,9 @@ private: int hexType; RadioData radioData; bool burnraw; + enum ImageSource {FIRMWARE, PROFILE, LIBRARY, ANOTHER}; + ImageSource imageSource; + QString imageFile; }; #endif // BURNDIALOG_H diff --git a/companion/src/burndialog.ui b/companion/src/burndialog.ui index a15ae25a1..772304390 100644 --- a/companion/src/burndialog.ui +++ b/companion/src/burndialog.ui @@ -7,7 +7,7 @@ 0 0 440 - 418 + 423 @@ -26,25 +26,12 @@ Customize Splash - - :/images/c_home.png:/images/c_home.png + + :/icon.png:/icon.png - + - - - - Qt::Vertical - - - - 20 - 0 - - - - @@ -71,19 +58,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -100,19 +74,6 @@ - - - - Qt::Horizontal - - - - 48 - 20 - - - - @@ -152,56 +113,22 @@ QFrame::Raised - - - - - 0 - 0 - - - - - 128 - 64 - - - - - 212 - 64 - - - - QFrame::Panel - - - QFrame::Raised - - - - - - true - - - - - + + true - - + + - Date & Time + Variant - - + + true @@ -214,17 +141,17 @@ - - - - true + + + + Date & Time - - - - Variant + + + + true @@ -325,17 +252,10 @@ - - - - - - - Invert Color - - - - + + + + @@ -359,7 +279,7 @@ QFrame::Panel - QFrame::Raised + QFrame::Plain @@ -369,10 +289,50 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + - + + + Use firmware start screen + + + + + + + Use another start screen + + + + + 0 @@ -380,90 +340,14 @@ - Use image in settings - - - - - - - Substitute image in firmware + Use profile start screen - - - Qt::Vertical - - - - 20 - 13 - - - - - - - - Qt::Vertical - - - - 20 - 13 - - - - - - - - - - - - true - - - - 0 - 0 - - - - true - - - - - - - false - + - Load Image - - - - - - - Open Splash Library - - - ... - - - - :/images/library.png:/images/library.png - - - - 16 - 16 - + Use library start screen @@ -474,18 +358,37 @@ + + + + Qt::Vertical + + + + 20 + 0 + + + + + BurnFlashButton FWFileName FlashLoadButton - ImageFileName - ImageLoadButton - libraryButton + DateField + SVNField + ModField + useProfileImageCB + useFwImageCB + useLibraryImageCB + useAnotherImageCB EEbackupCB + patchcalib_CB + patchhw_CB EEpromCB cancelButton - BurnFlashButton diff --git a/companion/src/main.cpp b/companion/src/companion.cpp similarity index 53% rename from companion/src/main.cpp rename to companion/src/companion.cpp index 08d738c80..37a988273 100644 --- a/companion/src/main.cpp +++ b/companion/src/companion.cpp @@ -45,12 +45,12 @@ #include #include #include -#include #include #include #include #include "mainwindow.h" #include "eeprominterface.h" +#include "appdata.h" #if defined WIN32 || !defined __GNUC__ #include @@ -76,66 +76,52 @@ class MyProxyStyle : public QProxyStyle int main(int argc, char *argv[]) { - // Start by borrowing any left over settings from companion9x - QSettings c9x_settings("companion9x", "companion9x"); - QSettings com_settings("companion", "companion"); - if (!com_settings.contains("pos")) { - QStringList keys = c9x_settings.allKeys(); - for( QStringList::iterator i = keys.begin(); i != keys.end(); i++ ) - { - com_settings.setValue( *i, c9x_settings.value( *i ) ); - } - } + Q_INIT_RESOURCE(companion); + QApplication app(argc, argv); + app.setApplicationName("OpenTX Companion"); + app.setOrganizationName("OpenTX"); + app.setOrganizationDomain("open-tx.org"); - Q_INIT_RESOURCE(companion); - QApplication app(argc, argv); - app.setApplicationName("OpenTX Companion"); #ifdef __APPLE__ - app.setStyle(new MyProxyStyle); + app.setStyle(new MyProxyStyle); #endif - QString dir; - if(argc) dir = QFileInfo(argv[0]).canonicalPath() + "/lang"; - QSettings settings("companion", "companion"); - QString locale = settings.value("locale",QLocale::system().name()).toString(); - bool showSplash = settings.value("show_splash", true).toBool(); + QTranslator companionTranslator; + companionTranslator.load(":/companion_" + g.locale()); + QTranslator qtTranslator; + qtTranslator.load((QString)"qt_" + g.locale().left(2), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); + app.installTranslator(&companionTranslator); + app.installTranslator(&qtTranslator); - QTranslator companionTranslator; - companionTranslator.load(":/companion_" + 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(&companionTranslator); - app.installTranslator(&qtTranslator); + QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); - QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); + if (g.profile[g.id()].fwType().isEmpty()){ + g.profile[g.id()].fwType(default_firmware_variant.id); + g.profile[g.id()].fwName(""); + } + - 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); + QPixmap pixmap = QPixmap(g.profile[g.id()].fwType().contains("taranis") ? ":/images/splasht.png" : ":/images/splash.png"); + QSplashScreen *splash = new QSplashScreen(pixmap); - RegisterFirmwares(); + RegisterFirmwares(); - settings.setValue("firmware", firmware_id); - current_firmware_variant = GetFirmwareVariant(firmware_id); - // qDebug() << current_firmware_variant; + current_firmware_variant = GetFirmwareVariant(g.profile[g.id()].fwType()); - MainWindow mainWin; - - if (showSplash) { - splash->show(); - QTimer::singleShot(1000*SPLASH_TIME, splash, SLOT(close())); - QTimer::singleShot(1000*SPLASH_TIME, &mainWin, SLOT(show())); - } - else { - mainWin.show(); - } - return app.exec(); + MainWindow *mainWin = new MainWindow(); + if (g.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/companion.qrc b/companion/src/companion.qrc index 6cd5e7faa..dcb97f0b3 100644 --- a/companion/src/companion.qrc +++ b/companion/src/companion.qrc @@ -1,5 +1,6 @@ + images/customize.png icon.png ../../CREDITS.txt ../../DONATIONS.txt @@ -37,55 +38,13 @@ 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/companion-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 @@ -214,125 +173,924 @@ 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/00017.png + images/library/00018.png + images/library/00019.png + images/library/00020.png + images/library/00050.png + images/library/00051.png + images/library/00052.png + images/library/00053.png + images/library/00054.png + images/library/00055.png + images/library/00056.png + images/library/00057.png + images/library/00058.png + images/library/00059.png + images/library/00060.png + images/library/00061.png + images/library/00062.png + images/library/00063.png + images/library/00064.png + images/library/00065.png + images/library/00066.png + images/library/00100.png + images/library/00101.png + images/library/00102.png + images/library/00103.png + images/library/00104.png + images/library/00105.png + images/library/00106.png + images/library/00201.png + images/library/00202.png + images/library/00203.png + images/library/00204.png + images/library/00301.png + images/library/00302.png + images/library/00303.png + images/library/00304.png + images/library/00401.png + images/library/00402.png + images/library/00403.png + images/library/00404.png + images/library/00501.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 + images/library/10501.png + images/library/10502.png + images/library/10503.png + images/library/10504.png + images/library/10505.png + images/library/10506.png + images/library/10508.png + images/library/10601.png + images/library/10701.png + images/library/10702.png + images/library/10801.png + images/library/10802.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/apppreferences.png + themes/monochrome/16/fwpreferences.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/apppreferences.png + themes/monochrome/24/fwpreferences.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/apppreferences.png + themes/monochrome/32/fwpreferences.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/apppreferences.png + themes/monochrome/48/fwpreferences.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/apppreferences.png + themes/classic/16/fwpreferences.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/apppreferences.png + themes/classic/24/fwpreferences.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/apppreferences.png + themes/classic/32/fwpreferences.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/apppreferences.png + themes/classic/48/fwpreferences.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/apppreferences.png + themes/monoblue/16/fwpreferences.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/apppreferences.png + themes/monoblue/24/fwpreferences.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/apppreferences.png + themes/monoblue/32/fwpreferences.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/apppreferences.png + themes/monoblue/48/fwpreferences.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/apppreferences.png + themes/monowhite/16/fwpreferences.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/apppreferences.png + themes/monowhite/24/fwpreferences.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/apppreferences.png + themes/monowhite/32/fwpreferences.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/apppreferences.png + themes/monowhite/48/fwpreferences.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 + themes/yerico/16/paintbrush.png + themes/yerico/16/open.png + themes/yerico/16/edit.png + themes/yerico/16/information.png + themes/yerico/16/configure.png + themes/yerico/16/list.png + themes/yerico/16/wizard.png + themes/yerico/16/logs.png + themes/yerico/16/new.png + themes/yerico/16/save.png + themes/yerico/16/recentdocument.png + themes/yerico/16/simulate.png + themes/yerico/16/changelog.png + themes/yerico/16/copy.png + themes/yerico/16/write_flash.png + themes/yerico/16/read_eeprom_file.png + themes/yerico/16/clear.png + themes/yerico/16/play.png + themes/yerico/16/fuses.png + themes/yerico/16/arrow-right.png + themes/yerico/16/exit.png + themes/yerico/16/moveup.png + themes/yerico/16/read_eeprom.png + themes/yerico/16/cut.png + themes/yerico/16/arrow-left.png + themes/yerico/16/write_eeprom_file.png + themes/yerico/16/library.png + themes/yerico/16/profiles.png + themes/yerico/16/paste.png + themes/yerico/16/print.png + themes/yerico/16/compare.png + themes/yerico/16/saveas.png + themes/yerico/16/apppreferences.png + themes/yerico/16/fwpreferences.png + themes/yerico/16/movedown.png + themes/yerico/16/currentmodel.png + themes/yerico/16/read_flash.png + themes/yerico/16/duplicate.png + themes/yerico/16/add.png + themes/yerico/16/update.png + themes/yerico/16/contributors.png + themes/yerico/16/stop.png + themes/yerico/16/write_eeprom.png + themes/yerico/24/paintbrush.png + themes/yerico/24/open.png + themes/yerico/24/edit.png + themes/yerico/24/information.png + themes/yerico/24/configure.png + themes/yerico/24/list.png + themes/yerico/24/wizard.png + themes/yerico/24/logs.png + themes/yerico/24/new.png + themes/yerico/24/save.png + themes/yerico/24/recentdocument.png + themes/yerico/24/simulate.png + themes/yerico/24/changelog.png + themes/yerico/24/copy.png + themes/yerico/24/write_flash.png + themes/yerico/24/read_eeprom_file.png + themes/yerico/24/clear.png + themes/yerico/24/play.png + themes/yerico/24/fuses.png + themes/yerico/24/arrow-right.png + themes/yerico/24/exit.png + themes/yerico/24/moveup.png + themes/yerico/24/read_eeprom.png + themes/yerico/24/cut.png + themes/yerico/24/arrow-left.png + themes/yerico/24/write_eeprom_file.png + themes/yerico/24/library.png + themes/yerico/24/profiles.png + themes/yerico/24/paste.png + themes/yerico/24/print.png + themes/yerico/24/compare.png + themes/yerico/24/saveas.png + themes/yerico/24/apppreferences.png + themes/yerico/24/fwpreferences.png + themes/yerico/24/movedown.png + themes/yerico/24/currentmodel.png + themes/yerico/24/read_flash.png + themes/yerico/24/duplicate.png + themes/yerico/24/add.png + themes/yerico/24/update.png + themes/yerico/24/contributors.png + themes/yerico/24/stop.png + themes/yerico/24/write_eeprom.png + themes/yerico/32/paintbrush.png + themes/yerico/32/open.png + themes/yerico/32/edit.png + themes/yerico/32/information.png + themes/yerico/32/configure.png + themes/yerico/32/list.png + themes/yerico/32/wizard.png + themes/yerico/32/logs.png + themes/yerico/32/new.png + themes/yerico/32/save.png + themes/yerico/32/recentdocument.png + themes/yerico/32/simulate.png + themes/yerico/32/changelog.png + themes/yerico/32/copy.png + themes/yerico/32/write_flash.png + themes/yerico/32/read_eeprom_file.png + themes/yerico/32/clear.png + themes/yerico/32/play.png + themes/yerico/32/fuses.png + themes/yerico/32/arrow-right.png + themes/yerico/32/exit.png + themes/yerico/32/moveup.png + themes/yerico/32/read_eeprom.png + themes/yerico/32/cut.png + themes/yerico/32/arrow-left.png + themes/yerico/32/write_eeprom_file.png + themes/yerico/32/library.png + themes/yerico/32/profiles.png + themes/yerico/32/paste.png + themes/yerico/32/print.png + themes/yerico/32/compare.png + themes/yerico/32/saveas.png + themes/yerico/32/apppreferences.png + themes/yerico/32/fwpreferences.png + themes/yerico/32/movedown.png + themes/yerico/32/currentmodel.png + themes/yerico/32/read_flash.png + themes/yerico/32/duplicate.png + themes/yerico/32/add.png + themes/yerico/32/update.png + themes/yerico/32/contributors.png + themes/yerico/32/stop.png + themes/yerico/32/write_eeprom.png + themes/yerico/48/paintbrush.png + themes/yerico/48/open.png + themes/yerico/48/edit.png + themes/yerico/48/information.png + themes/yerico/48/configure.png + themes/yerico/48/list.png + themes/yerico/48/wizard.png + themes/yerico/48/logs.png + themes/yerico/48/new.png + themes/yerico/48/save.png + themes/yerico/48/recentdocument.png + themes/yerico/48/simulate.png + themes/yerico/48/changelog.png + themes/yerico/48/copy.png + themes/yerico/48/write_flash.png + themes/yerico/48/read_eeprom_file.png + themes/yerico/48/clear.png + themes/yerico/48/play.png + themes/yerico/48/fuses.png + themes/yerico/48/arrow-right.png + themes/yerico/48/exit.png + themes/yerico/48/moveup.png + themes/yerico/48/read_eeprom.png + themes/yerico/48/cut.png + themes/yerico/48/arrow-left.png + themes/yerico/48/write_eeprom_file.png + themes/yerico/48/library.png + themes/yerico/48/profiles.png + themes/yerico/48/paste.png + themes/yerico/48/print.png + themes/yerico/48/compare.png + themes/yerico/48/saveas.png + themes/yerico/48/apppreferences.png + themes/yerico/48/fwpreferences.png + themes/yerico/48/movedown.png + themes/yerico/48/currentmodel.png + themes/yerico/48/read_flash.png + themes/yerico/48/duplicate.png + themes/yerico/48/add.png + themes/yerico/48/update.png + themes/yerico/48/contributors.png + themes/yerico/48/stop.png + themes/yerico/48/write_eeprom.png diff --git a/companion/src/comparedialog.cpp b/companion/src/comparedialog.cpp index 48ed3f9f5..3465037e8 100644 --- a/companion/src/comparedialog.cpp +++ b/companion/src/comparedialog.cpp @@ -29,6 +29,7 @@ compareDialog::compareDialog(QWidget *parent, GeneralSettings *gg) : ui(new Ui::compareDialog) { ui->setupUi(this); + this->setWindowIcon(CompanionIcon("compare.png")); g_eeGeneral = gg; eepromInterface = GetEepromInterface(); te = ui->textEdit; @@ -48,7 +49,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 +59,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(); @@ -83,7 +84,6 @@ void compareDialog::printDiff() printCurves(); printGvars(); printSwitches(); - printSafetySwitches(); printFSwitches(); printFrSky(); te->scrollToAnchor("1"); @@ -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++) { @@ -406,7 +406,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++) { @@ -694,7 +694,7 @@ void compareDialog::printExpos() } } str.append(""); - str.append(""+getStickStr(i)+""); + str.append(""+getInputStr(*g_model2, i)+""); str.append(""); str.append(""); for (int j=0; j"; - 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(""); @@ -1315,6 +1267,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(""); @@ -1433,6 +1386,7 @@ void compareDialog::printFrSky() } } } +#endif str.append("

"+tr("Custom Switches")+"

"+tr("Logical Switches")+"

"); - for (int i=0; igetCapability(CustomSwitches); i++) { - QString sw1 = getCustomSwitchStr(&g_model1->customSw[i], *g_model1); - QString sw2 = getCustomSwitchStr(&g_model2->customSw[i], *g_model2); + for (int i=0; igetCapability(LogicalSwitches); i++) { + QString sw1 = g_model1->customSw[i].toString(*g_model1); + QString sw2 = g_model2->customSw[i].toString(*g_model2); if (!(sw1.isEmpty() && sw2.isEmpty())) { str.append(""); 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(""); @@ -1069,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(""); str.append("

"+tr("Custom Functions")+"

"+tr("Switch Assignment")+"

"); str.append(""); str.append(""); @@ -1096,8 +1096,8 @@ void compareDialog::printFSwitches() str.append(""); if (g_model1->funcSw[i].swtch.type) { str.append(doTC(g_model1->funcSw[i].swtch.toString(),color1)); - str.append(doTC(getFuncName(g_model1->funcSw[i].func),color1)); - str.append(doTC(FuncParam(g_model1->funcSw[i].func,g_model1->funcSw[i].param,g_model1->funcSw[i].paramarm, g_model1->funcSw[i].adjustMode),color1)); + str.append(doTC(g_model1->funcSw[i].funcToString(),color1)); + str.append(doTC(g_model1->funcSw[i].paramToString(),color1)); int index=g_model1->funcSw[i].func; if (index==FuncPlaySound || index==FuncPlayHaptic || index==FuncPlayValue || index==FuncPlayPrompt || index==FuncPlayBoth || index==FuncBackgroundMusic) { str.append(doTC(QString("%1").arg(g_model1->funcSw[i].repeatParam),color1)); @@ -1115,8 +1115,8 @@ void compareDialog::printFSwitches() str.append(doTC(tr("CF")+QString("%1").arg(i+1),"",true)); if (g_model2->funcSw[i].swtch.type) { str.append(doTC(g_model2->funcSw[i].swtch.toString(),color2)); - str.append(doTC(getFuncName(g_model2->funcSw[i].func),color2)); - str.append(doTC(FuncParam(g_model2->funcSw[i].func,g_model2->funcSw[i].param,g_model2->funcSw[i].paramarm, g_model2->funcSw[i].adjustMode),color2)); + str.append(doTC(g_model2->funcSw[i].funcToString(),color2)); + str.append(doTC(g_model2->funcSw[i].paramToString(),color2)); int index=g_model2->funcSw[i].func; if (index==FuncPlaySound || index==FuncPlayHaptic || index==FuncPlayValue || index==FuncPlayPrompt || index==FuncPlayBoth || index==FuncBackgroundMusic) { str.append(doTC(QString("%1").arg(g_model2->funcSw[i].repeatParam),color2)); @@ -1142,55 +1142,6 @@ void compareDialog::printFSwitches() te->append(str); } -void compareDialog::printSafetySwitches() -{ - QString color1; - QString color2; - int sc=0; - QString str = "
"+tr("Switch")+""+tr("Function")+"
"; - str.append(""); - str.append("

"+tr("Safety Switches")+"

"); - str.append(""); - str.append(""); - str.append(""); - str.append(""); - str.append(""); - str.append(""); - for(int i=0; igetCapability(Outputs); i++) - { - if ((g_model1->safetySw[i].swtch.type!=SWITCH_TYPE_NONE)||(g_model2->safetySw[i].swtch.type!=SWITCH_TYPE_NONE)) { - if ((g_model1->safetySw[i].swtch!=g_model2->safetySw[i].swtch)||(g_model1->safetySw[i].val!=g_model2->safetySw[i].val)) { - color1="green"; - color2="red"; - } else { - color1="grey"; - color2="grey"; - } - str.append(""); - if (g_model1->safetySw[i].swtch.type) { - str.append(doTC(g_model1->safetySw[i].swtch.toString(),color1)); - str.append(doTC(QString::number(g_model1->safetySw[i].val),color1)); - } - else { - str.append(""); - } - str.append(doTC(tr("CH")+QString("%1").arg(i+1),"",true)); - if (g_model2->safetySw[i].swtch.type) { - str.append(doTC(g_model2->safetySw[i].swtch.toString(),color2)); - str.append(doTC(QString::number(g_model2->safetySw[i].val),color2)); - } else { - str.append(""); - } - str.append(""); - sc++; - } -} - str.append("
"+tr("Switch")+""+tr("Value")+" "+tr("Switch")+""+tr("Value")+"
    
"); - str.append("
"); - if (sc!=0) - te->append(str); -} - void compareDialog::printFrSky() { QString color; @@ -1260,6 +1211,7 @@ void compareDialog::printFrSky() color=getColor1(fd1->rssiAlarms[1].value,fd2->rssiAlarms[1].value); str.append("
"+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; @@ -1300,13 +1252,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(""); @@ -1377,7 +1330,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; @@ -1418,13 +1371,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 7667ad3ce..4a26482b0 100644 --- a/companion/src/comparedialog.ui +++ b/companion/src/comparedialog.ui @@ -26,11 +26,7 @@ false
- Dialog - - - - :/images/print.png:/images/print.png + Compare Models diff --git a/companion/src/contributorsdialog.cpp b/companion/src/contributorsdialog.cpp index 02eb30041..8aefa222b 100644 --- a/companion/src/contributorsdialog.cpp +++ b/companion/src/contributorsdialog.cpp @@ -1,7 +1,7 @@ #include "contributorsdialog.h" #include "ui_contributorsdialog.h" #include -#define CLINESEP "=====================================================\n" +#include "helpers.h" contributorsDialog::contributorsDialog(QWidget *parent, int contest, QString rnurl) : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint), @@ -9,45 +9,92 @@ 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: + { + this->setWindowIcon(CompanionIcon("contributors.png")); + 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 the fantastic eePe program \nwhich was the staring point for OpenTX Companion.")); - 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: + { + this->setWindowIcon(CompanionIcon("changelog.png")); + 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("Companion 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->setWindowIcon(CompanionIcon("changelog.png")); this->setWindowTitle(tr("OpenTX Release Notes")); manager = new QNetworkAccessManager(this); connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*))); @@ -55,7 +102,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; @@ -65,7 +113,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() @@ -75,9 +123,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 4c0fff21b..5d7d670c1 100644 --- a/companion/src/contributorsdialog.ui +++ b/companion/src/contributorsdialog.ui @@ -6,20 +6,16 @@ 0 0 - 926 - 333 + 788 + 528 Dialog - - - :/icon.png:/icon.png - - +
diff --git a/companion/src/customizesplashdialog.cpp b/companion/src/customizesplashdialog.cpp index 01ef16b8f..42bf463da 100644 --- a/companion/src/customizesplashdialog.cpp +++ b/companion/src/customizesplashdialog.cpp @@ -2,186 +2,268 @@ #include "ui_customizesplashdialog.h" #include +#include "appdata.h" #include "helpers.h" #include "burndialog.h" #include "splashlibrary.h" #include "flashinterface.h" -customizeSplashDialog::customizeSplashDialog(QWidget *parent) : -QDialog(parent), -ui(new Ui::customizeSplashDialog) { - ui->setupUi(this); - ui->HowToLabel->clear(); - ui->HowToLabel->append("
" + tr("Select an original firmware file") + "
"); +//*** Side Class *** + +Side::Side(){ + imageLabel = 0; + fileNameEdit = 0; + saveButton = 0; + loadFwButton=0; + loadPictButton = 0; + loadProfileButton = 0; + saveToFileName = new QString(""); + source = new Source(UNDEFINED); + format = new LCDFormat(LCDTARANIS); } -customizeSplashDialog::~customizeSplashDialog() { +void Side::markSourceButton() +{ + loadFwButton->setChecked(*source == FW ? true : false ); + loadPictButton->setChecked(*source == PICT ? true : false ); + loadProfileButton->setChecked(*source == PROFILE ? true : false ); +} + +void Side::copyImage( Side side ) +{ + if ((*source!=UNDEFINED) && (*side.source!=UNDEFINED)) + imageLabel->setPixmap(*side.imageLabel->pixmap()); +} + +bool Side::displayImage( QString fileName, Source pictSource ) +{ + QImage image; + + if (fileName.isEmpty()) + return false; + + // Determine which picture format to use + if (pictSource == FW ){ + FlashInterface flash(fileName); + if (!flash.hasSplash()) + return false; + else + image = flash.getSplash(); + *format = (flash.getSplashWidth()==WIDTH_TARANIS ? LCDTARANIS : LCD9X); + } + else { + image.load(fileName); + if (pictSource== PICT) + *format = image.width()>WIDTH_9X ? LCDTARANIS : LCD9X; + else if (pictSource == PROFILE) + *format = (g.profile[g.id()].fwType().contains("taranis")) ? LCDTARANIS : LCD9X; + } + if (image.isNull()) { + return false; + } + // Load image + if (*format==LCDTARANIS) { + imageLabel->setPixmap( makePixMap( image, "taranis" )); + imageLabel->setFixedSize(WIDTH_TARANIS*2, HEIGHT_TARANIS*2); + } + else { + imageLabel->setPixmap( makePixMap( image, "9x" )); + imageLabel->setFixedSize(WIDTH_9X*2, HEIGHT_9X*2); + } + + switch (pictSource){ + case FW: + fileNameEdit->setText(QObject::tr("FW: %1").arg(fileName)); + *saveToFileName = fileName; + *source=FW; + break; + case PICT: + fileNameEdit->setText(QObject::tr("Pict: %1").arg(fileName)); + *saveToFileName = fileName; + *source=PICT; + break; + case PROFILE: + fileNameEdit->setText(QObject::tr("Profile image")); + *saveToFileName = fileName; + *source=PROFILE; + break; + default: + break; + } + saveButton->setEnabled(true); + libraryButton->setEnabled(true); + invertButton->setEnabled(true); + return true; +} + +bool Side::refreshImage() +{ + return displayImage( *saveToFileName, *source ); +} + +bool Side::saveImage() +{ + if (*source == FW ) + { + FlashInterface flash(*saveToFileName); + if (!flash.hasSplash()) { + return false; + } + QImage image = imageLabel->pixmap()->toImage().scaled(flash.getSplashWidth(), flash.getSplashHeight()); + if (flash.setSplash(image) && (flash.saveFlash(*saveToFileName) > 0)) { + g.flashDir( QFileInfo(*saveToFileName).dir().absolutePath() ); + } + else { + return false; + } + } + else if (*source == PICT) { + QImage image = imageLabel->pixmap()->toImage().scaled(imageLabel->width()/2, imageLabel->height()/2).convertToFormat(QImage::Format_Indexed8); + if (image.save(*saveToFileName)) { + g.imagesDir( QFileInfo(*saveToFileName).dir().absolutePath() ); + } + else { + return false; + } + } + else if (*source == PROFILE) { + QImage image = imageLabel->pixmap()->toImage().scaled(imageLabel->width()/2, imageLabel->height()/2).convertToFormat(QImage::Format_Indexed8); + if (!image.save(*saveToFileName)) { + return false; + } + } + return true; +} + +//*** customizeSplashDialog Class *** + +customizeSplashDialog::customizeSplashDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::customizeSplashDialog) +{ + ui->setupUi(this); + this->setWindowIcon(CompanionIcon("paint.png")); + ui->leftLibraryButton->setIcon(CompanionIcon("library.png")); + ui->rightLibraryButton->setIcon(CompanionIcon("library.png")); + + left.imageLabel = ui->leftImageLabel; + right.imageLabel = ui->rightImageLabel; + left.fileNameEdit = ui->leftFileNameEdit; + right.fileNameEdit = ui->rightFileNameEdit; + left.saveButton = ui->leftSaveButton; + right.saveButton = ui->rightSaveButton; + left.libraryButton = ui->leftLibraryButton; + right.libraryButton = ui->rightLibraryButton; + left.invertButton = ui->leftInvertButton; + right.invertButton = ui->rightInvertButton; + + left.loadFwButton = ui->leftLoadFwButton; + right.loadFwButton = ui->rightLoadFwButton; + left.loadPictButton = ui->leftLoadPictButton; + right.loadPictButton = ui->rightLoadPictButton; + left.loadProfileButton = ui->leftLoadProfileButton; + right.loadProfileButton = ui->rightLoadProfileButton; + + loadProfile(left); + left.markSourceButton(); + + resize(0,0); +} + +customizeSplashDialog::~customizeSplashDialog() +{ delete ui; } -void customizeSplashDialog::on_FlashLoadButton_clicked() -{ - QString fileName; - QSettings settings("companion", "companion"); - 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; - } - - 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()); +void customizeSplashDialog::on_copyRightToLeftButton_clicked() { + left.copyImage(right); +} +void customizeSplashDialog::on_copyLeftToRightButton_clicked() { +right.copyImage(left); } -void customizeSplashDialog::on_ImageLoadButton_clicked() { + +void customizeSplashDialog::on_leftLoadFwButton_clicked() {loadFirmware(left);} +void customizeSplashDialog::on_rightLoadFwButton_clicked() {loadFirmware(right);} +void customizeSplashDialog::loadFirmware(Side side) +{ + QString fileName = QFileDialog::getOpenFileName(this, tr("Open Firmware File"), g.flashDir(), FLASH_FILES_FILTER); + if (!fileName.isEmpty()) { + if (!side.displayImage( fileName, FW )) + QMessageBox::critical(this, tr("Error"), tr("Can not load embedded image from firmware file %1.").arg(fileName)); + else + g.flashDir( QFileInfo(fileName).dir().absolutePath() ); + } + side.markSourceButton(); +} + +void customizeSplashDialog::on_leftLoadPictButton_clicked() {loadPicture(left);} +void customizeSplashDialog::on_rightLoadPictButton_clicked() {loadPicture(right);} +void customizeSplashDialog::loadPicture(Side side) +{ QString supportedImageFormats; for (int formatIndex = 0; formatIndex < QImageReader::supportedImageFormats().count(); formatIndex++) { supportedImageFormats += QLatin1String(" *.") + QImageReader::supportedImageFormats()[formatIndex]; } - - QSettings settings("companion", "companion"); QString fileName = QFileDialog::getOpenFileName(this, - tr("Open Image to load"), settings.value("lastImagesDir").toString(), tr("Images (%1)").arg(supportedImageFormats)); + tr("Open Image to load"), g.imagesDir(), tr("Images (%1)").arg(supportedImageFormats)); if (!fileName.isEmpty()) { - settings.setValue("lastImagesDir", QFileInfo(fileName).dir().absolutePath()); - QImage image(fileName); - if (image.isNull()) { - QMessageBox::critical(this, tr("Error"), tr("Cannot load %1.").arg(fileName)); - return; - } - ui->HowToLabel->clear(); - ui->ImageFileName->setText(fileName); - if (ui->imageLabel->width()==424) { - image=image.convertToFormat(QImage::Format_RGB32); - QRgb col; - 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)); - } - } - ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width()/2, ui->imageLabel->height()/2))); - } else { - ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width()/2, ui->imageLabel->height()/2).convertToFormat(QImage::Format_Mono))); - } - ui->SaveFlashButton->setEnabled(true); - ui->HowToLabel->append("
" + tr("Save your custimized firmware") + "
"); + if (!side.displayImage( fileName, PICT )) + QMessageBox::critical(this, tr("Error"), tr("Cannot load the image file %1.").arg(fileName)); + else + g.imagesDir( QFileInfo(fileName).dir().absolutePath() ); } + side.markSourceButton(); } -void customizeSplashDialog::on_libraryButton_clicked() { +void customizeSplashDialog::on_leftLoadProfileButton_clicked() {loadProfile(left);} +void customizeSplashDialog::on_rightLoadProfileButton_clicked() {loadProfile(right);} +void customizeSplashDialog::loadProfile(Side side) +{ + QString fileName=g.profile[g.id()].splashFile(); + + if (!fileName.isEmpty()) { + if (!side.displayImage( fileName, PROFILE )) + QMessageBox::critical(this, tr("Error"), tr("Cannot load the profile image %1.").arg(fileName)); + } + side.markSourceButton(); +} + +void customizeSplashDialog::on_leftLibraryButton_clicked(){libraryButton_clicked(left);} +void customizeSplashDialog::on_rightLibraryButton_clicked(){libraryButton_clicked(right);} +void customizeSplashDialog::libraryButton_clicked( Side side ) +{ QString fileName; - splashLibrary *ld = new splashLibrary(this,&fileName); ld->exec(); if (!fileName.isEmpty()) { - QImage image(fileName); - if (image.isNull()) { - QMessageBox::critical(this, tr("Error"), tr("Cannot load %1.").arg(fileName)); - return; - } - ui->HowToLabel->clear(); - ui->ImageFileName->setText(fileName); - if (ui->imageLabel->width()==424) { - image=image.convertToFormat(QImage::Format_RGB32); - QRgb col; - 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)); - } - } - ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width()/2, ui->imageLabel->height()/2))); - } else { - ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(ui->imageLabel->width()/2, ui->imageLabel->height()/2).convertToFormat(QImage::Format_Mono))); - } - ui->SaveFlashButton->setEnabled(true); - ui->HowToLabel->append("
" + tr("Save your custimized firmware") + "
"); + if (!side.displayImage( fileName, UNDEFINED )) + QMessageBox::critical(this, tr("Error"), tr("Cannot load the library image %1.").arg(fileName)); } } -void customizeSplashDialog::on_SaveFlashButton_clicked() +void customizeSplashDialog::on_leftSaveButton_clicked(){saveButton_clicked(left);} +void customizeSplashDialog::on_rightSaveButton_clicked(){saveButton_clicked(right);} +void customizeSplashDialog::saveButton_clicked( Side side ) { - QString fileName; - QSettings settings("companion", "companion"); - ui->HowToLabel->clear(); - fileName = QFileDialog::getSaveFileName(this, tr("Write to file"), settings.value("lastFlashDir").toString(), FLASH_FILES_FILTER, 0, QFileDialog::DontConfirmOverwrite); - if (fileName.isEmpty()) { - return; - } - FlashInterface flash(ui->FWFileName->text()); - if (!flash.hasSplash()) { - QMessageBox::critical(this, tr("Error"), tr("Error reading file %1").arg(fileName)); - return; - } - settings.setValue("lastFlashDir", QFileInfo(fileName).dir().absolutePath()); - QImage image = ui->imageLabel->pixmap()->toImage().scaled(flash.getSplashWidth(), flash.getSplashHeight()); - flash.setSplash(image); - if (flash.saveFlash(fileName) > 0) { - ui->HowToLabel->setStyleSheet("background:rgb(0,255.0);"); - ui->HowToLabel->append("
" + tr("Firmware correctly saved.") + "
"); - } else { - ui->HowToLabel->setStyleSheet("background:rgb(255.0.0);"); - ui->HowToLabel->append("
" + tr("Firmware not saved.") + "
"); + if (side.saveImage()){ + QMessageBox::information(this, tr("File Saved"), tr("The image was saved to the file %1").arg(*side.saveToFileName)); + if ( !side.refreshImage()){ + QMessageBox::critical(this, tr("Image Refresh Error"), tr("Failed to refresh image from file %1").arg(*side.saveToFileName)); + } } + else + QMessageBox::critical(this, tr("File Save Error"), tr("Failed to write image to %1").arg(*side.saveToFileName)); } -void customizeSplashDialog::on_InvertColorButton_clicked() +void customizeSplashDialog::on_leftInvertButton_clicked(){invertButton_clicked(left);} +void customizeSplashDialog::on_rightInvertButton_clicked(){invertButton_clicked(right);} +void customizeSplashDialog::invertButton_clicked(Side side) { - QImage image = ui->imageLabel->pixmap()->toImage(); + QImage image = side.imageLabel->pixmap()->toImage(); image.invertPixels(); - ui->imageLabel->setPixmap(QPixmap::fromImage(image)); + side.imageLabel->setPixmap(QPixmap::fromImage(image)); } -void customizeSplashDialog::on_SaveImageButton_clicked() -{ - QString fileName; - QSettings settings("companion", "companion"); - fileName = QFileDialog::getSaveFileName(this, tr("Write to file"), settings.value("lastImagesDir").toString(), tr("PNG images (*.png);;"), 0, QFileDialog::DontConfirmOverwrite); - if (!fileName.isEmpty()) { - settings.setValue("lastImagesDir", QFileInfo(fileName).dir().absolutePath()); - QImage image = ui->imageLabel->pixmap()->toImage().scaled(ui->imageLabel->width()/2, ui->imageLabel->height()/2).convertToFormat(QImage::Format_Indexed8); - image.save(fileName, "PNG"); - } -} diff --git a/companion/src/customizesplashdialog.h b/companion/src/customizesplashdialog.h index f5a7acd6d..c931005b2 100644 --- a/companion/src/customizesplashdialog.h +++ b/companion/src/customizesplashdialog.h @@ -10,24 +10,78 @@ namespace Ui class customizeSplashDialog; } +const int WIDTH_TARANIS = 212; +const int HEIGHT_TARANIS = 64; +const int WIDTH_9X = 128; +const int HEIGHT_9X = 64; + +enum Source {FW, PICT, PROFILE, UNDEFINED}; +enum LCDFormat {LCD9X, LCDTARANIS}; + +class Side +{ +public: + Side(); + void markSourceButton(); + void copyImage( Side ); + bool displayImage( QString fileName, Source source ); + bool saveImage(); + bool refreshImage(); + + QLabel *imageLabel; + QLineEdit *fileNameEdit; + QPushButton *saveButton; + QPushButton *invertButton; + QToolButton *libraryButton; + QPushButton *loadFwButton; + QPushButton *loadPictButton; + QPushButton *loadProfileButton; + + QString *saveToFileName; + +private: + Source *source; + LCDFormat *format; +}; + class customizeSplashDialog : public QDialog { Q_OBJECT + Side left; + Side right; public: explicit customizeSplashDialog(QWidget *parent = 0); ~customizeSplashDialog(); private slots: - void on_FlashLoadButton_clicked(); - void on_ImageLoadButton_clicked(); - void on_libraryButton_clicked(); - void on_SaveFlashButton_clicked(); - void on_InvertColorButton_clicked(); - void on_SaveImageButton_clicked(); + void on_leftLoadFwButton_clicked(); + void on_leftLoadPictButton_clicked(); + void on_leftLoadProfileButton_clicked(); + void on_leftLibraryButton_clicked(); + void on_leftSaveButton_clicked(); + void on_leftInvertButton_clicked(); + + void on_rightLoadFwButton_clicked(); + void on_rightLoadPictButton_clicked(); + void on_rightLoadProfileButton_clicked(); + void on_rightLibraryButton_clicked(); + void on_rightSaveButton_clicked(); + void on_rightInvertButton_clicked(); + + void on_copyRightToLeftButton_clicked(); + void on_copyLeftToRightButton_clicked(); private: + void loadFirmware( Side ); + void loadPicture( Side ); + void loadProfile( Side ); + void libraryButton_clicked( Side ); + void saveButton_clicked( Side ); + void invertButton_clicked( Side ); + Ui::customizeSplashDialog *ui; + enum sideEnum { LEFT, RIGHT }; }; #endif // CUSTOMIZESPLASHDIALOG_H diff --git a/companion/src/customizesplashdialog.ui b/companion/src/customizesplashdialog.ui index b7d0285aa..72b241276 100644 --- a/companion/src/customizesplashdialog.ui +++ b/companion/src/customizesplashdialog.ui @@ -2,88 +2,513 @@ customizeSplashDialog + + true + 0 0 - 366 - 303 + 1087 + 285 - + 0 0 - Customize Splash + Transmitter Splash Screen Editor - - - :/images/c_home.png:/images/c_home.png - - - - + + + 6 + + + 3 + + + 0 + + + 3 + + + 3 + + + + + 0 + - + - Qt::Horizontal + Qt::Vertical - - - 40 - 20 - - - +
- + - - - - 0 - 0 - - - - - 256 - 128 - - - - - 424 - 128 - - - - QFrame::Panel - - - QFrame::Raised - - - - - - :/images/customize.png - - - true + + + Qt::Horizontal - + + + 6 + - + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + true + + + + 424 + 0 + + + + + 426 + 16777215 + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Horizontal + + + + + + + 6 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 424 + 128 + + + + + 424 + 128 + + + + QFrame::Panel + + + QFrame::Plain + - Save Image + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Horizontal + + + + + + + + + false + + + Invert + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + false + + + Open Splash Library + + + ... + + + + 24 + 24 + + + + + + + + + + Qt::Horizontal + + + + + + + + + true + + + Load Profile + + + true + + + + + + + Load FW + + + true + + + + + + + Load Pict + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + false + + + Save + + + + + + + + + Qt::Horizontal + + + + + + + + + Qt::Vertical + + + + + + + + + ... + + + Qt::LeftArrow + + + + + + + ... + + + Qt::RightArrow + + + + + + + + + Qt::Vertical + + + + + + + + + Qt::Horizontal + + + + + + + 6 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + true + + + + 426 + 0 + + + + + 424 + 16777215 + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Horizontal + + + + + + + 6 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 424 + 128 + + + + + 424 + 128 + + + + QFrame::Panel + + + QFrame::Plain + + + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Horizontal + + + + + + + + + false + + + Invert @@ -101,168 +526,134 @@ - + + + false + + + Open Splash Library + - Invert Color + ... + + + + 24 + 24 + + + + + Qt::Horizontal + + + + + + + + + true + + + Load Profile + + + true + + + + + + + true + + + Load FW + + + true + + + + + + + Load Pict + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + false + + + Save + + + + + + + + + Qt::Horizontal + + +
- + - Qt::Horizontal - - - - 50 - 20 - - - - -
-
- - - - - 0 - 0 - - - - - 16777215 - 40 - - - - background:rgb(255, 255, 0); - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - <!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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<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> - - - true - - - - - - - - - true - - - true - - - - - - - Load Firmware - - - - - - - true - - - true - - - - - - - false - - - Load Image - - - - - - - Open Splash Library - - - ... - - - - :/images/library.png:/images/library.png - - - - 16 - 16 - - - - - - - - Qt::Horizontal - - - - 208 - 20 - - - - - - - - false - - - Save Firmware + Qt::Vertical - - - - Qt::Vertical - - - - 20 - 1 - - - -
+ + leftFileNameEdit + leftInvertButton + leftLibraryButton + leftLoadProfileButton + leftLoadFwButton + leftLoadPictButton + leftSaveButton + copyLeftToRightButton + copyRightToLeftButton + rightFileNameEdit + rightInvertButton + rightLibraryButton + rightLoadProfileButton + rightLoadFwButton + rightLoadPictButton + rightSaveButton + diff --git a/companion/src/downloaddialog.cpp b/companion/src/downloaddialog.cpp index bfd425619..794dbbcd1 100644 --- a/companion/src/downloaddialog.cpp +++ b/companion/src/downloaddialog.cpp @@ -2,13 +2,14 @@ #include "ui_downloaddialog.h" #include #include +#include "helpers.h" downloadDialog::downloadDialog(QWidget *parent, QString src, QString tgt) : QDialog(parent), ui(new Ui::downloadDialog) { ui->setupUi(this); - + this->setWindowIcon(CompanionIcon("fwpreferences.png")); ui->progressBar->setValue(1); ui->progressBar->setMinimum(0); ui->progressBar->setMaximum(0); diff --git a/companion/src/downloaddialog.ui b/companion/src/downloaddialog.ui index dcd05c405..f51dfd085 100644 --- a/companion/src/downloaddialog.ui +++ b/companion/src/downloaddialog.ui @@ -13,10 +13,6 @@ Downloading: - - - :/icon.png:/icon.png - diff --git a/companion/src/eepromimportexport.h b/companion/src/eepromimportexport.h index ed5ab9ff5..242c1f7f7 100644 --- a/companion/src/eepromimportexport.h +++ b/companion/src/eepromimportexport.h @@ -93,6 +93,17 @@ class DataField { const char *name; }; +class ProxyField: public DataField { + public: + ProxyField(): + DataField("Proxy") + { + } + + virtual DataField * getField() = 0; + +}; + template class UnsignedField: public DataField { public: @@ -273,9 +284,10 @@ class SpareBitsField: public UnsignedField { template class CharField: public DataField { public: - CharField(char *field): + CharField(char *field, bool truncate=true): DataField("Char"), - field(field) + field(field), + truncate(truncate) { } @@ -283,7 +295,7 @@ class CharField: public DataField { { output.resize(N*8); int b = 0; - int len = strlen(field); + int len = truncate ? strlen(field) : N; for (int i=0; i=len ? 0 : field[i]); for (int j=0; j<8; j++, b++) { @@ -313,6 +325,7 @@ class CharField: public DataField { protected: char * field; + bool truncate; }; int8_t char2idx(char c); @@ -637,12 +650,14 @@ class ConversionField: public TransformedField { if (!error.isEmpty()) EEPROMWarnings += error + "\n"; } - else if (shift) { + + if (shift) { if (val < min) _field = min + shift; else if (val > max) _field = max + shift; else _field = val + shift; } - else { + + if (exportFunc) { _field = exportFunc(val); } } @@ -653,10 +668,10 @@ class ConversionField: public TransformedField { if (table->importValue(_field, field)) return; } - else if (shift) { - field = _field - shift; - } - else { + + field = _field - shift; + + if (importFunc) { field = importFunc(_field); } diff --git a/companion/src/eeprominterface.cpp b/companion/src/eeprominterface.cpp index 5aeee8220..711b68764 100644 --- a/companion/src/eeprominterface.cpp +++ b/companion/src/eeprominterface.cpp @@ -6,7 +6,7 @@ #include "firmwares/gruvin9x/gruvin9xinterface.h" #include "firmwares/opentx/opentxinterface.h" #include "firmwares/ersky9x/ersky9xinterface.h" -#include "qsettings.h" +#include "appdata.h" #include "helpers.h" QString EEPROMWarnings; @@ -37,227 +37,170 @@ void getEEPROMString(char *dst, const char *src, int size) } } -int RawSource::getDecimals(const ModelData & Model) +float ValToTim(int value) { - 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; - } - } - return 0; + return ((value < -109 ? 129+value : (value < 7 ? (113+value)*5 : (53+value)*10))/10.0); } -double RawSource::getMin(const ModelData & Model) +int TimToVal(float value) { + int temp; + if (value>60) { + temp=136+round((value-60)); + } + else if (value>2) { + temp=20+round((value-2.0)*2.0); + } + else { + temp=round(value*10.0); + } + return (temp-129); +} + +QString getSignedStr(int value) +{ + return value > 0 ? QString("+%1").arg(value) : QString("%1").arg(value); +} + +QString getGVarString(int16_t val, bool sign) +{ + if (val >= -10000 && val <= 10000) { + if (sign) + 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); + } +} + +RawSourceRange RawSource::getRange(bool singleprec) +{ + RawSourceRange result; + + int board = GetEepromInterface()->getBoard(); + + if (!singleprec && !IS_TARANIS(board)) { + singleprec = true; + } + 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 ? 5 : 1; + result.max = singleprec ? 255*5 : 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) { + const FrSkyChannelData & channel = model->frsky.channels[index-TELEMETRY_SOURCE_A1]; + 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") }; + static const QString potsTaranis[] = { QObject::tr("S1"), QObject::tr("S2"), QObject::tr("S3"), 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)); + return (IS_TARANIS(GetEepromInterface()->getBoard()) ? CHECK_IN_ARRAY(potsTaranis, index-4) : CHECK_IN_ARRAY(pots9X, index-4)); } QString RotaryEncoderString(int index) @@ -268,26 +211,44 @@ QString RotaryEncoderString(int index) QString RawSource::toString() { - static const QString trims[] = { QObject::tr("TrmR"), QObject::tr("TrmE"), QObject::tr("TrmT"), QObject::tr("TrmA")}; + static const QString trims[] = { + QObject::tr("TrmR"), QObject::tr("TrmE"), QObject::tr("TrmT"), QObject::tr("TrmA") + }; - 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"), - QObject::tr("Cnsp"), QObject::tr("Powr"), QObject::tr("AccX"), QObject::tr("AccY"), QObject::tr("AccZ"), QObject::tr("HDG "), QObject::tr("VSpd"), QObject::tr("A1-"), - QObject::tr("A2-"), QObject::tr("Alt-"), QObject::tr("Alt+"), QObject::tr("Rpm+"), QObject::tr("T1+"), QObject::tr("T2+"), QObject::tr("Spd+"), QObject::tr("Dst+"), - QObject::tr("Cur+"), QObject::tr("Pwr+"), QObject::tr("ACC "), QObject::tr("Time"), - }; + static const QString telemetry[] = { + QObject::tr("Batt"), QObject::tr("Timer1"), QObject::tr("Timer2"), + QObject::tr("SWR"), QObject::tr("RSSI Tx"), QObject::tr("RSSI Rx"), QObject::tr("Rx Batt"), + QObject::tr("A1"), QObject::tr("A2"), QObject::tr("A3"), QObject::tr("A4"), + 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"), QObject::tr("Cnsp"), QObject::tr("Powr"), + QObject::tr("AccX"), QObject::tr("AccY"), QObject::tr("AccZ"), + QObject::tr("HDG "), QObject::tr("VSpd"), QObject::tr("ASpd"), QObject::tr("dTE"), + QObject::tr("A1-"), QObject::tr("A2-"), QObject::tr("A3-"), QObject::tr("A4-"), + QObject::tr("Alt-"), QObject::tr("Alt+"), QObject::tr("Rpm+"), QObject::tr("T1+"), QObject::tr("T2+"), QObject::tr("Spd+"), QObject::tr("Dst+"), + QObject::tr("Cel-"), QObject::tr("Cels-"), QObject::tr("Vfs-"), 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) { + switch (type) { + case SOURCE_TYPE_VIRTUAL_INPUT: + { + QString result = QObject::tr("[I%1]").arg(index+1); + if (model && strlen(model->inputNames[index]) > 0) { + result += QString(model->inputNames[index]); + } + return result; + } case SOURCE_TYPE_STICK: return AnalogString(index); case SOURCE_TYPE_TRIM: @@ -332,81 +293,82 @@ QString SwitchDn(const char sw) QString RawSwitch::toString() { - static const QString switches9X[] = { QObject::tr("THR"), QObject::tr("RUD"), QObject::tr("ELE"), - QObject::tr("ID0"), QObject::tr("ID1"), QObject::tr("ID2"), - QObject::tr("AIL"), QObject::tr("GEA"), QObject::tr("TRN") - }; + static const QString switches9X[] = { + QString("THR"), QString("RUD"), QString("ELE"), + QString("ID0"), QString("ID1"), QString("ID2"), + QString("AIL"), QString("GEA"), QString("TRN") + }; - static const QString switchesX9D[] = { SwitchUp('A'), QString::fromUtf8("SA-"), SwitchDn('A'), - SwitchUp('B'), QString::fromUtf8("SB-"), SwitchDn('B'), - SwitchUp('C'), QString::fromUtf8("SC-"), SwitchDn('C'), - SwitchUp('D'), QString::fromUtf8("SD-"), SwitchDn('D'), - SwitchUp('E'), QString::fromUtf8("SE-"), SwitchDn('E'), - SwitchUp('F'), SwitchDn('F'), - SwitchUp('G'), QString::fromUtf8("SG-"), SwitchDn('G'), - SwitchUp('H'), SwitchDn('H'), - }; + static const QString switchesX9D[] = { + SwitchUp('A'), QString::fromUtf8("SA-"), SwitchDn('A'), + SwitchUp('B'), QString::fromUtf8("SB-"), SwitchDn('B'), + SwitchUp('C'), QString::fromUtf8("SC-"), SwitchDn('C'), + SwitchUp('D'), QString::fromUtf8("SD-"), SwitchDn('D'), + SwitchUp('E'), QString::fromUtf8("SE-"), SwitchDn('E'), + SwitchUp('F'), SwitchDn('F'), + SwitchUp('G'), QString::fromUtf8("SG-"), SwitchDn('G'), + 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) { - case SWITCH_TYPE_SWITCH: - if (IS_TARANIS(GetEepromInterface()->getBoard())) - return index > 0 ? CHECK_IN_ARRAY(switchesX9D, index-1) : QString("!") + CHECK_IN_ARRAY(switchesX9D, -index-1); - else - return index > 0 ? CHECK_IN_ARRAY(switches9X, index-1) : QString("!") + CHECK_IN_ARRAY(switches9X, -index-1); - case SWITCH_TYPE_VIRTUAL: - return index > 0 ? CHECK_IN_ARRAY(virtualSwitches, index-1) : QString("!") + CHECK_IN_ARRAY(virtualSwitches, -index-1); - case SWITCH_TYPE_ON: - return QObject::tr("ON"); - case SWITCH_TYPE_ONM: - if (index==0) { - return QObject::tr("ONE"); - } - else if (index==1) { - return QObject::tr("!ONE"); - } - break; - case SWITCH_TYPE_TRN: - if (index==0) { - if (IS_TARANIS(GetEepromInterface()->getBoard())) - return SwitchDn('H')+"s"; + static const QString multiposPots[] = { + QObject::tr("S11"), QObject::tr("S12"), QObject::tr("S13"), QObject::tr("S14"), QObject::tr("S15"), QObject::tr("S16"), + QObject::tr("S21"), QObject::tr("S22"), QObject::tr("S23"), QObject::tr("S24"), QObject::tr("S25"), QObject::tr("S26"), + QObject::tr("S31"), QObject::tr("S32"), QObject::tr("S33"), QObject::tr("S34"), QObject::tr("S35"), QObject::tr("S36") + }; + + static const QString trimsSwitches[] = { + QObject::tr("RudTrim Left"), QObject::tr("RudTrim Right"), + QObject::tr("EleTrim Down"), QObject::tr("EleTrim Up"), + QObject::tr("ThrTrim Down"), QObject::tr("ThrTrim Up"), + QObject::tr("AilTrim Left"), QObject::tr("AilTrim Right") + }; + + static const QString rotaryEncoders[] = { + QObject::tr("REa"), QObject::tr("REb") + }; + + static const QString timerModes[] = { + QObject::tr("OFF"), QObject::tr("ABS"), + QObject::tr("THs"), QObject::tr("TH%"), QObject::tr("THt") + }; + + if (index < 0) { + return QString("!") + RawSwitch(type, -index).toString(); + } + else { + switch(type) { + case SWITCH_TYPE_SWITCH: + if (IS_TARANIS(GetEepromInterface()->getBoard())) + return CHECK_IN_ARRAY(switchesX9D, index-1); else - return QObject::tr("TRNs"); - } else if (index==1) { - if (IS_TARANIS(GetEepromInterface()->getBoard())) - return SwitchDn('H')+"l"; - else - return QObject::tr("TRNl"); - } - break; - case SWITCH_TYPE_REA: - if (index==0) { - if (GetEepromInterface()->getBoard() == BOARD_SKY9X) - return QObject::tr("REAs"); - } else if (index==1) { - if (GetEepromInterface()->getBoard() == BOARD_SKY9X) - return QObject::tr("REAl"); - } - break; - case SWITCH_TYPE_OFF: - return QObject::tr("OFF"); - case SWITCH_TYPE_MOMENT_SWITCH: - if (IS_TARANIS(GetEepromInterface()->getBoard())) - return index > 0 ? CHECK_IN_ARRAY(switchesX9D, index-1)+QString("t") : QString("!")+CHECK_IN_ARRAY(switchesX9D, -index-1)+QString("t"); - else - return index > 0 ? CHECK_IN_ARRAY(switches9X, index-1)+QString("t") : QString("!")+CHECK_IN_ARRAY(switches9X, -index-1)+QString("t"); - case SWITCH_TYPE_MOMENT_VIRTUAL: - return index > 0 ? CHECK_IN_ARRAY(virtualSwitches, index-1)+QString("t") : QString("!")+CHECK_IN_ARRAY(virtualSwitches, -index-1)+QString("t"); - default: - break; + return CHECK_IN_ARRAY(switches9X, index-1); + case SWITCH_TYPE_VIRTUAL: + return CHECK_IN_ARRAY(virtualSwitches, index-1); + case SWITCH_TYPE_MULTIPOS_POT: + return CHECK_IN_ARRAY(multiposPots, index-1); + case SWITCH_TYPE_TRIM: + return CHECK_IN_ARRAY(trimsSwitches, index-1); + case SWITCH_TYPE_ROTARY_ENCODER: + return CHECK_IN_ARRAY(rotaryEncoders, index-1); + case SWITCH_TYPE_ON: + return QObject::tr("ON"); + case SWITCH_TYPE_OFF: + return QObject::tr("OFF"); + case SWITCH_TYPE_NONE: + return QObject::tr("----"); + case SWITCH_TYPE_TIMER_MODE: + return CHECK_IN_ARRAY(timerModes, index); + default: + return QObject::tr("???"); + } } - - return QObject::tr("----"); } QString CurveReference::toString() @@ -428,6 +390,394 @@ QString CurveReference::toString() } } +CSFunctionFamily LogicalSwitchData::getFunctionFamily() +{ + if (func == LS_FN_STAY) + return LS_FAMILY_STAY; + else if (func == LS_FN_TIMER) + return LS_FAMILY_TIMER; + else if (func == LS_FN_STICKY) + return LS_FAMILY_STICKY; + else if (func < LS_FN_AND || func > LS_FN_ELESS) + return LS_FAMILY_VOFS; + else if (func < LS_FN_EQUAL) + return LS_FAMILY_VBOOL; + else + return LS_FAMILY_VCOMP; +} + +QString LogicalSwitchData::funcToString() +{ + switch (func) { + case LS_FN_OFF: + return QObject::tr("---"); + case LS_FN_VPOS: + return QObject::tr("a>x"); + case LS_FN_VNEG: + return QObject::tr("ax"); + case LS_FN_ANEG: + return QObject::tr("|a|b"); + case LS_FN_LESS: + return QObject::tr("a=b"); + case LS_FN_ELESS: + return QObject::tr("a<=b"); + case LS_FN_DPOS: + return QObject::tr("d>=x"); + case LS_FN_DAPOS: + return QObject::tr("|d|>=x"); + case LS_FN_VEQUAL: + return QObject::tr("a=x"); + case LS_FN_VALMOSTEQUAL: + return QObject::tr("a~x"); + case LS_FN_TIMER: + return QObject::tr("Timer"); + case LS_FN_STICKY: + return QObject::tr("Sticky"); + case LS_FN_STAY: + return QObject::tr("Stay"); + default: + return QObject::tr("Unknown"); + } +} + +QString LogicalSwitchData::toString(const ModelData & model) +{ + QString result = ""; + + if (!func) + return result; + + if (andsw!=0) { + result +="( "; + } + switch (getFunctionFamily()) { + case LS_FAMILY_STAY: + result = QObject::tr("STAY(%1, [%2:%3])").arg(RawSwitch(val1).toString()).arg(ValToTim(val2)).arg(ValToTim(val2+val3)); + break; + case LS_FAMILY_STICKY: + result = QObject::tr("STICKY(%1, %2)").arg(RawSwitch(val1).toString()).arg(RawSwitch(val2).toString()); + break; + case LS_FAMILY_TIMER: + result = QObject::tr("TIMER(%1, %2)").arg(ValToTim(val1)).arg(ValToTim(val2)); + break; + case LS_FAMILY_VOFS: { + RawSource source = RawSource(val1, &model); + RawSourceRange range = source.getRange(); + if (val1) + result += source.toString(); + else + result += "0"; + result.remove(" "); + if (func == LS_FN_APOS || func == LS_FN_ANEG) + result = "|" + result + "|"; + else if (func == LS_FN_DAPOS) + result = "|d(" + result + ")|"; + else if (func == LS_FN_DPOS) result = "d(" + result + ")"; + if (func == LS_FN_APOS || func == LS_FN_VPOS || func == LS_FN_DAPOS || func == LS_FN_DPOS) + result += " > "; + else if (func == LS_FN_ANEG || func == LS_FN_VNEG) + result += " < "; + result += QString::number(range.step * (val2 /*TODO+ source.getRawOffset(model)*/) + range.offset); + break; + } + case LS_FAMILY_VBOOL: + result = RawSwitch(val1).toString(); + switch (func) { + case LS_FN_AND: + result += " AND "; + break; + case LS_FN_OR: + result += " OR "; + break; + case LS_FN_XOR: + result += " XOR "; + break; + default: + break; + } + result += RawSwitch(val2).toString(); + break; + + case LS_FAMILY_VCOMP: + if (val1) + result += RawSource(val1).toString(); + else + result += "0"; + switch (func) { + case LS_FN_EQUAL: + result += " = "; + break; + case LS_FN_NEQUAL: + result += " != "; + break; + case LS_FN_GREATER: + result += " > "; + break; + case LS_FN_LESS: + result += " < "; + break; + case LS_FN_EGREATER: + result += " >= "; + break; + case LS_FN_ELESS: + result += " <= "; + break; + default: + break; + } + if (val2) + result += RawSource(val2).toString(); + else + result += "0"; + break; + } + + if (andsw!=0) { + result +=" ) AND "; + result += RawSwitch(andsw).toString(); + } + + if (GetEepromInterface()->getCapability(LogicalSwitchesExt)) { + if (delay) + result += QObject::tr(" Delay %1 sec").arg(delay/10.0); + if (duration) + result += QObject::tr(" Duration %1 sec").arg(duration/10.0); + } + + return result; +} + +#if 0 +QStringList FuncSwData::toStringList() +{ + QStringList result; + QStringList qs; + + result << swtch.toString(); + result << funcToString(); + + if (func < FuncInstantTrim) { + result << QString("%1").arg(param); + } + else if (func==FuncPlaySound) { + qs <<"Beep 1" << "Beep 2" << "Beep 3" << "Warn1" << "Warn2" << "Cheep" << "Ratata" << "Tick" << "Siren" << "Ring" ; + qs << "SciFi" << "Robot" << "Chirp" << "Tada" << "Crickt" << "AlmClk" ; + if (param>=0 && param<(int)qs.count()) + result << qs.at(param); + else + result << QObject::tr("Inconsistent parameter"); + } + else if (func==FuncPlayHaptic) { + qs << "0" << "1" << "2" << "3"; + if (param>=0 && param<(int)qs.count()) + result << qs.at(param); + else + result << QObject::tr("Inconsistent parameter"); + } + else if (func==FuncReset) { + qs.append( QObject::tr("Timer1")); + qs.append( QObject::tr("Timer2")); + qs.append( QObject::tr("All")); + qs.append( QObject::tr("Telemetry")); + if (param>=0 && param<(int)qs.count()) + result << qs.at(param); + else + result << QObject::tr("Inconsistent parameter"); + } + else if ((func==FuncVolume)|| (func==FuncPlayValue)) { + RawSource item(param); + result << item.toString(); + } + else if ((func==FuncPlayPrompt) || (func==FuncPlayBoth)) { + if ( GetEepromInterface()->getCapability(VoicesAsNumbers)) { + result << QString("%1").arg(param); + } else { + result << paramarm; + } + } + else if ((func>FuncBackgroundMusicPause) && (funcfuncSw[i].repeatParam),"green")); + } else { + str.append(doTC( " ","green")); + } + if ((index<=FuncInstantTrim) || (index>FuncBackgroundMusicPause)) { + str.append(doTC((g_model->funcSw[i].enabled ? "ON" : "OFF"),"green")); + } else { + str.append(doTC( "---","green")); + } + + return result; +} +#endif + +QString FuncSwData::funcToString() +{ + if (func >= FuncSafetyCh1 && func <= FuncSafetyCh32) + return QObject::tr("Safety %1").arg(RawSource(SOURCE_TYPE_CH, func).toString()); + else if (func == FuncTrainer) + return QObject::tr("Trainer"); + else if (func == FuncTrainerRUD) + return QObject::tr("Trainer RUD"); + else if (func == FuncTrainerELE) + return QObject::tr("Trainer ELE"); + else if (func == FuncTrainerTHR) + return QObject::tr("Trainer THR"); + else if (func == FuncTrainerAIL) + return QObject::tr("Trainer AIL"); + else if (func == FuncInstantTrim) + return QObject::tr("Instant Trim"); + else if (func == FuncPlaySound) + return QObject::tr("Play Sound"); + else if (func == FuncPlayHaptic) + return QObject::tr("Play Haptic"); + else if (func == FuncReset) + return QObject::tr("Reset"); + else if (func >= FuncSetTimer1 && func <= FuncSetTimer2) + return QObject::tr("Set Timer %1").arg(func-FuncSetTimer1+1); + else if (func == FuncVario) + return QObject::tr("Vario"); + else if (func == FuncPlayPrompt) + return QObject::tr("Play Track"); + else if (func == FuncPlayBoth) + return QObject::tr("Play Both"); + else if (func == FuncPlayValue) + return QObject::tr("Play Value"); + else if (func == FuncLogs) + return QObject::tr("Start Logs"); + else if (func == FuncVolume) + return QObject::tr("Volume"); + else if (func == FuncBacklight) + return QObject::tr("Backlight"); + else if (func == FuncBackgroundMusic) + return QObject::tr("Background Music"); + else if (func == FuncBackgroundMusicPause) + return QObject::tr("Background Music Pause"); + else if (func >= FuncAdjustGV1 && func <= FuncAdjustGVLast) + return QObject::tr("Adjust GV%1").arg(func-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) + } +} + +QString FuncSwData::paramToString() +{ + QStringList qs; + if (func <= FuncInstantTrim) { + return QString("%1").arg(param); + } + else if (func==FuncPlaySound) { + qs <<"Beep 1" << "Beep 2" << "Beep 3" << "Warn1" << "Warn2" << "Cheep" << "Ratata" << "Tick" << "Siren" << "Ring" ; + qs << "SciFi" << "Robot" << "Chirp" << "Tada" << "Crickt" << "AlmClk" ; + if (param>=0 && param<(int)qs.count()) + return qs.at(param); + else + return QObject::tr("Inconsistent parameter"); + } + else if (func==FuncPlayHaptic) { + qs << "0" << "1" << "2" << "3"; + if (param>=0 && param<(int)qs.count()) + return qs.at(param); + else + return QObject::tr("Inconsistent parameter"); + } + else if (func==FuncReset) { + qs.append( QObject::tr("Timer1")); + qs.append( QObject::tr("Timer2")); + qs.append( QObject::tr("All")); + qs.append( QObject::tr("Telemetry")); + if (param>=0 && param<(int)qs.count()) + return qs.at(param); + else + return QObject::tr("Inconsistent parameter"); + } + else if ((func==FuncVolume)|| (func==FuncPlayValue)) { + RawSource item(param); + return item.toString(); + } + else if ((func==FuncPlayPrompt) || (func==FuncPlayBoth)) { + if ( GetEepromInterface()->getCapability(VoicesAsNumbers)) { + return QString("%1").arg(param); + } else { + return paramarm; + } + } + else if ((func>FuncBackgroundMusicPause) && (funcgetBoard()) ? 5 : 10; + return QObject::tr("%1 sec").arg(step*repeatParam); + } +} + GeneralSettings::GeneralSettings() { memset(this, 0, sizeof(GeneralSettings)); @@ -438,34 +788,26 @@ GeneralSettings::GeneralSettings() calibSpanNeg[i] = 0x180; calibSpanPos[i] = 0x180; } - QSettings settings("companion", "companion"); - templateSetup = settings.value("default_channel_order", 0).toInt(); - stickMode = settings.value("default_mode", 1).toInt(); - int profile_id = settings.value("ActiveProfile", 0).toInt(); - if (profile_id>0) { - settings.beginGroup("Profiles"); - QString profile=QString("profile%1").arg(profile_id); - settings.beginGroup(profile); - QString t_calib=settings.value("StickPotCalib","").toString(); + templateSetup = g.profile[g.id()].channelOrder(); + stickMode = g.profile[g.id()].defaultMode(); + + QString t_calib=g.profile[g.id()].stickPotCalib(); int potsnum=GetEepromInterface()->getCapability(Pots); if (t_calib.isEmpty()) { - settings.endGroup(); - settings.endGroup(); return; - } else { - QString t_trainercalib=settings.value("TrainerCalib","").toString(); - int8_t t_vBatCalib=(int8_t)settings.value("VbatCalib", vBatCalib).toInt(); - int8_t t_currentCalib=(int8_t)settings.value("currentCalib", currentCalib).toInt(); - int8_t t_PPM_Multiplier=(int8_t)settings.value("PPM_Multiplier", PPM_Multiplier).toInt(); - uint8_t t_stickMode=(uint8_t)settings.value("GSStickMode", stickMode).toUInt(); - uint8_t t_vBatWarn=(uint8_t)settings.value("vBatWarn",vBatWarn).toUInt(); - QString t_DisplaySet=settings.value("Display","").toString(); - QString t_BeeperSet=settings.value("Beeper","").toString(); - QString t_HapticSet=settings.value("Haptic","").toString(); - QString t_SpeakerSet=settings.value("Speaker","").toString(); - QString t_CountrySet=settings.value("countryCode","").toString(); - settings.endGroup(); - settings.endGroup(); + } + else { + QString t_trainercalib=g.profile[g.id()].trainerCalib(); + int8_t t_vBatCalib=(int8_t)g.profile[g.id()].vBatCalib(); + int8_t t_currentCalib=(int8_t)g.profile[g.id()].currentCalib(); + int8_t t_PPM_Multiplier=(int8_t)g.profile[g.id()].ppmMultiplier(); + uint8_t t_stickMode=(uint8_t)g.profile[g.id()].gsStickMode(); + uint8_t t_vBatWarn=(uint8_t)g.profile[g.id()].vBatWarn(); + QString t_DisplaySet=g.profile[g.id()].display(); + QString t_BeeperSet=g.profile[g.id()].beeper(); + QString t_HapticSet=g.profile[g.id()].haptic(); + QString t_SpeakerSet=g.profile[g.id()].speaker(); + QString t_CountrySet=g.profile[g.id()].countryCode(); if ((t_calib.length()==(NUM_STICKS+potsnum)*12) && (t_trainercalib.length()==16)) { QString Byte; @@ -547,7 +889,13 @@ GeneralSettings::GeneralSettings() } } } - } + +} + +RawSource GeneralSettings::getDefaultSource(unsigned int channel) +{ + unsigned int stick_index = chout_ar[4*templateSetup + channel] - 1; + return RawSource(SOURCE_TYPE_STICK, stick_index); } ModelData::ModelData() @@ -555,6 +903,19 @@ ModelData::ModelData() clear(); } +ExpoData * ModelData::insertInput(const int idx) +{ + memmove(&expoData[idx+1], &expoData[idx], (C9X_MAX_EXPOS-(idx+1))*sizeof(ExpoData)); + expoData[idx].clear(); + return &expoData[idx]; +} + +void ModelData::removeInput(const int idx) +{ + memmove(&expoData[idx], &expoData[idx+1], (C9X_MAX_EXPOS-(idx+1))*sizeof(ExpoData)); + expoData[C9X_MAX_EXPOS-1].clear(); +} + void ModelData::clearInputs() { for (int i=0; igetBoard(); + int board = GetEepromInterface()->getBoard(); if (IS_TARANIS(board)) { moduleData[0].protocol=PXX_XJT_X16; moduleData[1].protocol=OFF; - } else { + } + else { moduleData[0].protocol=PPM; moduleData[1].protocol=OFF; } @@ -588,20 +950,17 @@ void ModelData::clear() phaseData[i].clear(); clearInputs(); clearMixes(); - for(int i=0; i<4; i++){ - mixData[i].destCh = i+1; - mixData[i].srcRaw = RawSource(SOURCE_TYPE_STICK, i); - mixData[i].weight = 100; - } + for (int i=0; igetBoard())) { + for (int i=0; ichn = i; + expo->mode = INPUT_MODE_BOTH; + expo->srcRaw = settings.getDefaultSource(i); + expo->weight = 100; + strncpy(inputNames[i], expo->srcRaw.toString().toLatin1().constData(), sizeof(inputNames[i])-1); + MixData * mix = &mixData[i]; + mix->destCh = i+1; + mix->weight = 100; + mix->srcRaw = RawSource(SOURCE_TYPE_VIRTUAL_INPUT, i, this); + } + } + else { + for (int i=0; i 500) + trim = 500; + break; + } + } +} + void ModelData::removeGlobalVar(int & var) { if (var >= 126 && var <= 130) @@ -659,15 +1085,13 @@ ModelData ModelData::removeGlobalVars() QList eepromInterfaces; void RegisterEepromInterfaces() { - QSettings settings("companion", "companion"); - int rev4a = settings.value("rev4asupport",0).toInt(); - eepromInterfaces.push_back(new Open9xInterface(BOARD_STOCK)); - eepromInterfaces.push_back(new Open9xInterface(BOARD_M128)); - eepromInterfaces.push_back(new Open9xInterface(BOARD_GRUVIN9X)); - eepromInterfaces.push_back(new Open9xInterface(BOARD_SKY9X)); - eepromInterfaces.push_back(new Open9xInterface(BOARD_TARANIS)); - if (rev4a) - eepromInterfaces.push_back(new Open9xInterface(BOARD_TARANIS_REV4a)); + eepromInterfaces.push_back(new OpenTxInterface(BOARD_STOCK)); + eepromInterfaces.push_back(new OpenTxInterface(BOARD_M128)); + eepromInterfaces.push_back(new OpenTxInterface(BOARD_GRUVIN9X)); + eepromInterfaces.push_back(new OpenTxInterface(BOARD_SKY9X)); + eepromInterfaces.push_back(new OpenTxInterface(BOARD_TARANIS)); + if (g.rev4aSupport()) + eepromInterfaces.push_back(new OpenTxInterface(BOARD_TARANIS_REV4a)); eepromInterfaces.push_back(new Gruvin9xInterface(BOARD_STOCK)); eepromInterfaces.push_back(new Gruvin9xInterface(BOARD_GRUVIN9X)); eepromInterfaces.push_back(new Ersky9xInterface()); @@ -679,30 +1103,15 @@ QList firmwares; FirmwareVariant default_firmware_variant; FirmwareVariant current_firmware_variant; -const char * ER9X_STAMP = "http://er9x.googlecode.com/svn/trunk/src/stamp-er9x.h"; -const char * ERSKY9X_STAMP = "http://ersky9x.googlecode.com/svn/trunk/src/stamp-ersky9x.h"; - void RegisterFirmwares() { - firmwares.push_back(new FirmwareInfo("th9x", QObject::tr("th9x"), new Th9xInterface(), "http://th9x.googlecode.com/svn/trunk/%1.bin", "http://th9x.googlecode.com/svn/trunk/src/stamp-th9x.h")); - - firmwares.push_back(new FirmwareInfo("er9x", QObject::tr("er9x"), new Er9xInterface(), "http://er9x.googlecode.com/svn/trunk/%1.hex", ER9X_STAMP)); - FirmwareInfo * er9x = firmwares.last(); - - Option er9x_options[] = { { "noht", "", 0 }, { "frsky", "", 0 }, { "frsky-noht", "", 0 }, { "jeti", "", 0 }, { "ardupilot", "", 0 }, { "nmea", "", 0 }, { NULL } }; - er9x->addOptions(er9x_options); - er9x->addOption("noht"); - RegisterOpen9xFirmwares(); -#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"); + current_firmware_variant = default_firmware_variant; RegisterEepromInterfaces(); } -bool LoadEeprom(RadioData &radioData, uint8_t *eeprom, int size) +bool LoadEeprom(RadioData &radioData, const uint8_t *eeprom, const int size) { foreach(EEPROMInterface *eepromInterface, eepromInterfaces) { if (eepromInterface->load(radioData, eeprom, size)) @@ -739,7 +1148,6 @@ FirmwareVariant GetFirmwareVariant(QString id) FirmwareVariant result; foreach(FirmwareInfo * firmware, firmwares) { - if (id.contains(firmware->id+"-") || (!id.contains("-") && id.contains(firmware->id))) { result.id = id; result.firmware = firmware; diff --git a/companion/src/eeprominterface.h b/companion/src/eeprominterface.h index 02cc9650d..f4a2bc7dc 100644 --- a/companion/src/eeprominterface.h +++ b/companion/src/eeprominterface.h @@ -51,7 +51,8 @@ enum BoardEnum { BOARD_TARANIS_REV4a }; -#define IS_STOCK(board) (board==BOARD_STOCK || board==BOARD_M128) +#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) @@ -65,15 +66,15 @@ const uint8_t modn12x3[4][4]= { #define C9X_MAX_MODELS 60 #define C9X_MAX_PHASES 9 #define C9X_MAX_MIXERS 64 +#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 -#define C9X_MAX_CUSTOM_FUNCTIONS 32 // number of functions assigned to switches +#define C9X_MAX_CUSTOM_FUNCTIONS 64 // number of functions assigned to switches #define C9X_NUM_MODULES 2 #define STK_RUD 1 @@ -106,10 +107,11 @@ const uint8_t modn12x3[4][4]= { #define DSW_SG2 20 const uint8_t chout_ar[] = { //First number is 0..23 -> template setup, Second is relevant channel out -1,2,3,4 , 1,2,4,3 , 1,3,2,4 , 1,3,4,2 , 1,4,2,3 , 1,4,3,2, -2,1,3,4 , 2,1,4,3 , 2,3,1,4 , 2,3,4,1 , 2,4,1,3 , 2,4,3,1, -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? + 1,2,3,4 , 1,2,4,3 , 1,3,2,4 , 1,3,4,2 , 1,4,2,3 , 1,4,3,2, + 2,1,3,4 , 2,1,4,3 , 2,3,1,4 , 2,3,4,1 , 2,4,1,3 , 2,4,3,1, + 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) @@ -145,44 +147,6 @@ enum EnumKeys { #endif }; -enum CSFunction { - CS_FN_OFF, - CS_FN_VPOS, - CS_FN_VNEG, - CS_FN_APOS, - CS_FN_ANEG, - CS_FN_AND, - CS_FN_OR, - CS_FN_XOR, - CS_FN_EQUAL, - CS_FN_NEQUAL, - CS_FN_GREATER, - CS_FN_LESS, - CS_FN_EGREATER, - CS_FN_ELESS, - CS_FN_DPOS, - CS_FN_DAPOS, - CS_FN_VEQUAL, // added at the end to avoid everything renumbered - CS_FN_TIM, - CS_FN_MAXF -}; - -enum CSFunctionFamily { - CS_FAMILY_VOFS, - CS_FAMILY_VBOOL, - CS_FAMILY_VCOMP, - CS_FAMILY_TIMERS -}; - -inline CSFunctionFamily getCSFunctionFamily(int fn) -{ - if (fn==CS_FN_TIM) { - return (CS_FAMILY_TIMERS); - } else { - return ((fnCS_FN_ELESS) ? CS_FAMILY_VOFS : (fn= 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) { } @@ -308,32 +307,31 @@ 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 { SWITCH_TYPE_NONE, SWITCH_TYPE_SWITCH, SWITCH_TYPE_VIRTUAL, - SWITCH_TYPE_MOMENT_SWITCH, - SWITCH_TYPE_MOMENT_VIRTUAL, + SWITCH_TYPE_MULTIPOS_POT, + SWITCH_TYPE_TRIM, + SWITCH_TYPE_ROTARY_ENCODER, SWITCH_TYPE_ON, SWITCH_TYPE_OFF, - SWITCH_TYPE_ONM, - SWITCH_TYPE_TRN, - SWITCH_TYPE_REA, + SWITCH_TYPE_TIMER_MODE }; class RawSwitch { @@ -403,6 +401,9 @@ enum BeeperMode { class GeneralSettings { public: GeneralSettings(); + + RawSource getDefaultSource(unsigned int channel); + unsigned int version; unsigned int variant; int calibMid[NUM_STICKS+C9X_NUM_POTS]; @@ -440,7 +441,7 @@ class GeneralSettings { unsigned int backlightDelay; bool blightinv; bool stickScroll; - unsigned int templateSetup; //RETA order according to chout_ar array // TODO enum + unsigned int templateSetup; //RETA order according to chout_ar array int PPM_Multiplier; int hapticLength; unsigned int reNavigation; @@ -470,9 +471,14 @@ class GeneralSettings { int beepVolume; int wavVolume; int varioVolume; + int varioPitch; + int varioRange; + int varioRepeat; int backgroundVolume; unsigned int mavbaud; unsigned int switchUnlockStates; + unsigned int hw_uartMode; + unsigned int potsType[8]; }; class CurveReference { @@ -500,12 +506,19 @@ class CurveReference { QString toString(); }; +enum InputMode { + INPUT_MODE_NONE, + INPUT_MODE_POS, + INPUT_MODE_NEG, + INPUT_MODE_BOTH +}; + class ExpoData { public: ExpoData() { clear(); } RawSource srcRaw; unsigned int scale; - unsigned int mode; // 0=end, 1=pos, 2=neg, 3=both + unsigned int mode; unsigned int chn; RawSwitch swtch; unsigned int phases; // -5=!FP4, 0=normal, 5=FP4 @@ -552,7 +565,7 @@ class LimitData { bool symetrical; char name[6+1]; CurveReference curve; - void clear() { memset(this, 0, sizeof(LimitData)); min = -100; max = +100; } + void clear() { memset(this, 0, sizeof(LimitData)); min = -1000; max = +1000; } }; enum MltpxValue { @@ -585,30 +598,64 @@ class MixData { void clear() { memset(this, 0, sizeof(MixData)); } }; -class CustomSwData { // Custom Switches data - public: - CustomSwData() { clear(); } - int val1; //input - int val2; //offset - unsigned int func; - unsigned int delay; - unsigned int duration; - unsigned int andsw; - void clear() { memset(this, 0, sizeof(CustomSwData)); } +enum CSFunction { + LS_FN_OFF, + LS_FN_VPOS, + LS_FN_VNEG, + LS_FN_APOS, + LS_FN_ANEG, + LS_FN_AND, + LS_FN_OR, + LS_FN_XOR, + LS_FN_EQUAL, + LS_FN_NEQUAL, + LS_FN_GREATER, + LS_FN_LESS, + LS_FN_EGREATER, + LS_FN_ELESS, + LS_FN_DPOS, + LS_FN_DAPOS, + LS_FN_VEQUAL, // added at the end to avoid everything renumbered + LS_FN_VALMOSTEQUAL, + LS_FN_TIMER, + LS_FN_STICKY, + LS_FN_STAY, + // later ... LS_FN_RANGE, + LS_FN_MAX }; -class SafetySwData { // Custom Switches data - public: - SafetySwData() { clear(); } - RawSwitch swtch; - int val; +enum CSFunctionFamily { + LS_FAMILY_VOFS, + LS_FAMILY_VBOOL, + LS_FAMILY_VCOMP, + LS_FAMILY_TIMER, + LS_FAMILY_STICKY, + LS_FAMILY_STAY, +}; - void clear() { memset(this, 0, sizeof(SafetySwData)); } +class LogicalSwitchData { // Custom Switches data + public: + LogicalSwitchData(unsigned int func=0) + { + clear(); + this->func = func; + } + unsigned int func; + int val1; + int val2; + int val3; + unsigned int delay; + unsigned int duration; + int andsw; + void clear() { memset(this, 0, sizeof(LogicalSwitchData)); } + CSFunctionFamily getFunctionFamily(); + QString funcToString(); + QString toString(const ModelData & model); }; enum AssignFunc { FuncSafetyCh1 = 0, - FuncSafetyCh16 = FuncSafetyCh1+15, + FuncSafetyCh32 = FuncSafetyCh1+C9X_NUM_CHNOUT-1, FuncTrainer, FuncTrainerRUD, FuncTrainerELE, @@ -618,6 +665,8 @@ enum AssignFunc { FuncPlaySound, FuncPlayHaptic, FuncReset, + FuncSetTimer1, + FuncSetTimer2, FuncVario, FuncPlayPrompt, FuncPlayBoth, @@ -629,26 +678,32 @@ enum AssignFunc { FuncBackgroundMusicPause, FuncAdjustGV1, FuncAdjustGVLast = FuncAdjustGV1+C9X_MAX_GVARS-1, - FuncCount + FuncCount, + FuncReserve = -1 }; class FuncSwData { // Function Switches data public: - FuncSwData() { clear(); } + FuncSwData(AssignFunc func=FuncSafetyCh1) { clear(); this->func = func; } RawSwitch swtch; AssignFunc func; int param; 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)); } + QString funcToString(); + QString paramToString(); + QString repeatToString(); + QStringList toStringList(); }; class PhaseData { public: PhaseData() { clear(); } - int trimRef[NUM_STICKS]; // + int trimMode[NUM_STICKS]; + int trimRef[NUM_STICKS]; int trim[NUM_STICKS]; RawSwitch swtch; char name[10+1]; @@ -656,7 +711,7 @@ class PhaseData { unsigned int fadeOut; int rotaryEncoders[2]; 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 + RawSwitch mode; + bool minuteBeep; + unsigned int countdownBeep; + bool dir; // 0=>Count Down, 1=>Count Up unsigned int val; - bool persistent; - int pvalue; - void clear() { memset(this, 0, sizeof(TimerData)); } + bool persistent; + int pvalue; + void clear() { memset(this, 0, sizeof(TimerData)); mode = RawSwitch(SWITCH_TYPE_TIMER_MODE, 0); } }; enum Protocol { @@ -827,16 +877,31 @@ class ModuleData { void clear() { memset(this, 0, sizeof(ModuleData)); } }; +#define C9X_MAX_SCRIPTS 7 +#define C9X_MAX_SCRIPT_INPUTS 10 +class ScriptData { + public: + ScriptData() { clear(); } + char filename[10+1]; + char name[10+1]; + int inputs[C9X_MAX_SCRIPT_INPUTS]; + void clear() { memset(this, 0, sizeof(ScriptData)); } +}; + class ModelData { public: ModelData(); + + ExpoData * insertInput(const int idx); + void removeInput(const int idx); + bool used; char name[12+1]; uint8_t modelVoice; 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 @@ -847,17 +912,22 @@ 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]; + LogicalSwitchData customSw[C9X_NUM_CSW]; FuncSwData funcSw[C9X_MAX_CUSTOM_FUNCTIONS]; - SafetySwData safetySw[C9X_NUM_CHNOUT]; SwashRingData swashRingData; unsigned int thrTraceSrc; int8_t traineron; // 0 disable trainer, 1 allow trainer - int8_t t2throttle; // Start timer2 using throttle - unsigned int modelId; + unsigned int modelId; unsigned int switchWarningStates; + unsigned int nSwToWarn; + unsigned int nPotsToWarn; + int potPosition[C9X_NUM_POTS]; + bool displayText; // TODO structure char gvars_names[C9X_MAX_GVARS][6+1]; bool gvars_popups[C9X_MAX_GVARS]; @@ -876,11 +946,15 @@ class ModelData { ModuleData moduleData[C9X_NUM_MODULES+1/*trainer*/]; + ScriptData scriptData[C9X_MAX_SCRIPTS]; + void clear(); bool isempty(); - void setDefault(uint8_t id); - unsigned int getTrimFlightPhase(uint8_t idx, int8_t phase); + void setDefaultMixes(GeneralSettings & settings); + void setDefaultValues(unsigned int id, GeneralSettings & settings); + int getTrimValue(int phaseIdx, int trimIdx); + void setTrimValue(int phaseIdx, int trimIdx, int value); ModelData removeGlobalVars(); void clearMixes(); @@ -902,13 +976,10 @@ enum Capability { FlightPhases, FlightModesName, FlightPhasesHaveFades, - SimulatorType, Mixes, MixesWithoutExpo, Timers, TimeDivisions, - minuteBeep, - countdownBeep, CustomFunctions, VoicesAsNumbers, VoicesMaxLength, @@ -918,16 +989,15 @@ enum Capability { Pots, Switches, SwitchesPositions, - CustomSwitches, + LogicalSwitches, CustomAndSwitches, HasNegAndSwitches, - CustomSwitchesExt, + LogicalSwitchesExt, RotaryEncoders, Outputs, ChannelsName, ExtraChannels, ExtraInputs, - ExtraTrims, ExtendedTrims, HasInputFilter, NumCurves, @@ -972,12 +1042,10 @@ enum Capability { GvarsInCS, GvarsAreNamed, GvarsFlightPhases, - GvarsHaveSources, - GvarsAsSources, GvarsName, NoTelemetryProtocol, - TelemetryCSFields, - TelemetryColsCSFields, + TelemetryCustomScreens, + TelemetryCustomScreensFieldsPerLine, TelemetryRSSIModel, TelemetryAlarm, TelemetryInternalAlarm, @@ -993,7 +1061,6 @@ enum Capability { HasStickScroll, HasSoundMixer, NumModules, - FSSwitch, PPMCenter, SYMLimits, HasCurrentCalibration, @@ -1008,19 +1075,18 @@ enum Capability { CSFunc, LCDWidth, GetThrSwitch, + HasDisplayText, VirtualInputs, + TrainerInputs, LuaInputs, LimitsPer1000, EnhancedCurves, - TelemetryInternalAlarms -}; - -enum UseContext { - DefaultContext, - TimerContext, - FlightPhaseContext, - MixerContext, - ExpoContext, + TelemetryInternalAlarms, + HasFasOffset, + HasMahPersistent, + MultiposPots, + MultiposPotsPositions, + SimulatorVariant, }; class SimulatorInterface; @@ -1039,7 +1105,7 @@ class EEPROMInterface inline BoardEnum getBoard() { return board; } - virtual bool load(RadioData &radioData, uint8_t *eeprom, int size) = 0; + virtual bool load(RadioData &radioData, const uint8_t *eeprom, int size) = 0; virtual bool loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index) = 0; @@ -1055,11 +1121,7 @@ class EEPROMInterface virtual int isAvailable(Protocol proto, int port=0) = 0; - virtual bool isAvailable(const RawSwitch & swtch, UseContext context) { return true; } - - virtual bool isAvailable(const RawSource & source, UseContext context) { return true; } - - virtual SimulatorInterface * getSimulator() = 0; + virtual SimulatorInterface * getSimulator() { return NULL; } virtual const int getEEpromSize() = 0; @@ -1081,6 +1143,12 @@ extern QString EEPROMWarnings; void setEEPROMString(char *dst, const char *src, int size); void getEEPROMString(char *dst, const char *src, int size); +float ValToTim(int value); +int TimToVal(float value); + +QString getSignedStr(int value); +QString getGVarString(int16_t val, bool sign=false); + inline int applyStickMode(int stick, unsigned int mode) { if (mode == 0 || mode > 4) { @@ -1140,14 +1208,14 @@ inline void applyStickModeToModel(ModelData &model, unsigned int mode) // virtual switches for (int i=0; i 0 ? sw-22 : sw+22); + return RawSwitch(SWITCH_TYPE_SWITCH, sw > 0 ? sw-22 : sw+22); else - return RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, sw > 0 ? sw-22-9 : sw+22+9); + return RawSwitch(SWITCH_TYPE_VIRTUAL, sw > 0 ? sw-22-9 : sw+22+9); } t_Er9xTrainerMix::t_Er9xTrainerMix() @@ -269,22 +269,22 @@ RawSource er9xToSource(int8_t value) } } -Er9xCustomSwData::operator CustomSwData () +Er9xLogicalSwitchData::operator LogicalSwitchData () { - CustomSwData c9x; + LogicalSwitchData c9x; c9x.func = func; c9x.val1 = v1; c9x.val2 = v2; - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { + if ((c9x.func >= LS_FN_VPOS && c9x.func <= LS_FN_ANEG) || c9x.func >= LS_FN_EQUAL) { c9x.val1 = er9xToSource(v1).toValue(); } - if (c9x.func >= CS_FN_EQUAL) { + if (c9x.func >= LS_FN_EQUAL) { c9x.val2 = er9xToSource(v2).toValue(); } - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { + if (c9x.func >= LS_FN_AND && c9x.func <= LS_FN_XOR) { c9x.val1 = er9xToSwitch(v1).toValue(); c9x.val2 = er9xToSwitch(v2).toValue(); } @@ -298,14 +298,6 @@ t_Er9xSafetySwData::t_Er9xSafetySwData() memset(this, 0, sizeof(t_Er9xSafetySwData)); } -t_Er9xSafetySwData::operator SafetySwData () -{ - SafetySwData c9x; - c9x.swtch = er9xToSwitch(swtch); - c9x.val = val; - return c9x; -} - t_Er9xFrSkyChannelData::t_Er9xFrSkyChannelData() { memset(this, 0, sizeof(t_Er9xFrSkyChannelData)); @@ -343,10 +335,11 @@ t_Er9xFrSkyData::operator FrSkyData () return c9x; } -TimerMode getEr9xTimerMode(int mode) +RawSwitch getEr9xTimerMode(int mode) { + /* if (mode <= -33) - return TimerMode(TMRMODE_FIRST_NEG_MOMENT_SWITCH+(mode+33)); + return TimerMode(TMRMODE_FIRST_NEG_SWITCH+(mode+33)); else if (mode <= -1) return TimerMode(TMRMODE_FIRST_NEG_SWITCH+(mode+1)); else if (mode < 16) @@ -354,7 +347,9 @@ TimerMode getEr9xTimerMode(int mode) else if (mode < 16+21) return TimerMode(TMRMODE_FIRST_SWITCH+(mode-16)); else - return TimerMode(TMRMODE_FIRST_MOMENT_SWITCH+(mode-16-21)); + return TimerMode(TMRMODE_FIRST_SWITCH+(mode-16-21)); + */ + return RawSwitch(); } t_Er9xModelData::operator ModelData () @@ -366,9 +361,7 @@ t_Er9xModelData::operator ModelData () c9x.timers[0].mode = getEr9xTimerMode(tmrMode); c9x.timers[0].dir = tmrDir; c9x.timers[0].val = tmrVal; - c9x.timers[0].modeB = tmrModeB; - - switch(protocol) { + switch(protocol) { case 1: c9x.moduleData[0].protocol = PXX_DJT; break; @@ -383,12 +376,12 @@ t_Er9xModelData::operator ModelData () break; } c9x.traineron= traineron; - c9x.t2throttle = t2throttle; + // c9x.t2throttle = t2throttle; c9x.moduleData[0].ppmFrameLength=ppmFrameLength; 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.funcSw[0].func = FuncInstantTrim; if (trimSw) { @@ -473,8 +466,8 @@ t_Er9xModelData::operator ModelData () for (int i=0; iEeFsOpen(eeprom, size, BOARD_STOCK)) { + if (!efile->EeFsOpen((uint8_t *)eeprom, size, BOARD_STOCK)) { std::cout << "wrong file system\n"; return false; } @@ -239,7 +239,7 @@ int Er9xInterface::getCapability(const Capability capability) return 9; case CustomFunctions: return 0; - case CustomSwitches: + case LogicalSwitches: return 12; case CustomAndSwitches: return 5; @@ -281,9 +281,6 @@ int Er9xInterface::getCapability(const Capability capability) case ModelVoice: case Gvars: return 7; - case GvarsHaveSources: - case GvarsAsSources: - return 1; case GetThrSwitch: return DSW_THR; default: @@ -306,7 +303,7 @@ int Er9xInterface::isAvailable(Protocol prot, int port) SimulatorInterface * Er9xInterface::getSimulator() { - return new Er9xSimulator(this); + return NULL; // new Er9xSimulator(this); } diff --git a/companion/src/firmwares/er9x/er9xinterface.h b/companion/src/firmwares/er9x/er9xinterface.h index e6d60b6ee..9ea4854be 100644 --- a/companion/src/firmwares/er9x/er9xinterface.h +++ b/companion/src/firmwares/er9x/er9xinterface.h @@ -34,7 +34,7 @@ class Er9xInterface : public EEPROMInterface virtual const int getMaxModels(); - virtual bool load(RadioData &, uint8_t * eeprom, int size); + virtual bool load(RadioData &, const uint8_t * eeprom, int size); virtual bool loadBackup(RadioData &, uint8_t * eeprom, int esize, int index); diff --git a/companion/src/firmwares/ersky9x/ersky9xeeprom.cpp b/companion/src/firmwares/ersky9x/ersky9xeeprom.cpp index 1247c795a..2d506243d 100644 --- a/companion/src/firmwares/ersky9x/ersky9xeeprom.cpp +++ b/companion/src/firmwares/ersky9x/ersky9xeeprom.cpp @@ -5,14 +5,12 @@ extern RawSwitch er9xToSwitch(int8_t sw); -TimerMode getErSky9xTimerMode(int mode) +RawSwitch getErSky9xTimerMode(int mode) { if (mode<4) - return TimerMode(mode); - else if (mode < 20) - return TimerMode(TMRMODE_FIRST_CHPERC+(mode-4)); + return RawSwitch(SWITCH_TYPE_TIMER_MODE, mode); else - return TimerMode(0); + return RawSwitch(); } RawSwitch ersky9xToSwitch(int8_t sw) @@ -29,9 +27,9 @@ RawSwitch ersky9xToSwitch(int8_t sw) else if (sw == -34) return RawSwitch(SWITCH_TYPE_OFF); else if (swa <= 34+9) - return RawSwitch(SWITCH_TYPE_MOMENT_SWITCH, sw > 0 ? sw-34 : sw+34); + return RawSwitch(SWITCH_TYPE_SWITCH, sw > 0 ? sw-34 : sw+34); else - return RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, sw > 0 ? sw-34-9 : sw+34+9); + return RawSwitch(SWITCH_TYPE_VIRTUAL, sw > 0 ? sw-34-9 : sw+34+9); } t_Ersky9xTrainerMix::t_Ersky9xTrainerMix() @@ -355,22 +353,22 @@ RawSource ersky9xToSource_v11(int8_t value) } } -Ersky9xCustomSwData_v10::operator CustomSwData () +Ersky9xLogicalSwitchData_v10::operator LogicalSwitchData () { - CustomSwData c9x; + LogicalSwitchData c9x; c9x.func = func; c9x.val1 = v1; c9x.val2 = v2; - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { + if ((c9x.func >= LS_FN_VPOS && c9x.func <= LS_FN_ANEG) || c9x.func >= LS_FN_EQUAL) { c9x.val1 = ersky9xToSource_v10(v1).toValue(); } - if (c9x.func >= CS_FN_EQUAL) { + if (c9x.func >= LS_FN_EQUAL) { c9x.val2 = ersky9xToSource_v10(v2).toValue(); } - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { + if (c9x.func >= LS_FN_AND && c9x.func <= LS_FN_XOR) { c9x.val1 = er9xToSwitch(v1).toValue(); c9x.val2 = er9xToSwitch(v2).toValue(); } @@ -378,22 +376,22 @@ Ersky9xCustomSwData_v10::operator CustomSwData () return c9x; } -Ersky9xCustomSwData_v11::operator CustomSwData () +Ersky9xLogicalSwitchData_v11::operator LogicalSwitchData () { - CustomSwData c9x; + LogicalSwitchData c9x; c9x.func = func; c9x.val1 = v1; c9x.val2 = v2; - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { + if ((c9x.func >= LS_FN_VPOS && c9x.func <= LS_FN_ANEG) || c9x.func >= LS_FN_EQUAL) { c9x.val1 = ersky9xToSource_v11(v1).toValue(); } - if (c9x.func >= CS_FN_EQUAL) { + if (c9x.func >= LS_FN_EQUAL) { c9x.val2 = ersky9xToSource_v11(v2).toValue(); } - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { + if (c9x.func >= LS_FN_AND && c9x.func <= LS_FN_XOR) { c9x.val1 = er9xToSwitch(v1).toValue(); c9x.val2 = er9xToSwitch(v2).toValue(); } @@ -406,27 +404,11 @@ t_Ersky9xSafetySwData_v10::t_Ersky9xSafetySwData_v10() memset(this, 0, sizeof(t_Ersky9xSafetySwData_v10)); } -t_Ersky9xSafetySwData_v10::operator SafetySwData () -{ - SafetySwData c9x; - c9x.swtch = er9xToSwitch(swtch); - c9x.val = val; - return c9x; -} - t_Ersky9xSafetySwData_v11::t_Ersky9xSafetySwData_v11() { memset(this, 0, sizeof(t_Ersky9xSafetySwData_v11)); } -t_Ersky9xSafetySwData_v11::operator SafetySwData () -{ - SafetySwData c9x; - c9x.swtch = ersky9xToSwitch(opt.ss.swtch); - c9x.val = opt.ss.val; - return c9x; -} - t_Ersky9xFrSkyChannelData_v10::t_Ersky9xFrSkyChannelData_v10() { memset(this, 0, sizeof(t_Ersky9xFrSkyChannelData_v10)); @@ -508,7 +490,6 @@ t_Ersky9xModelData_v10::operator ModelData () getEEPROMString(c9x.name, name, sizeof(name)); for (int i=0; i<2; i++) { c9x.timers[i].mode = getErSky9xTimerMode(timer[i].tmrModeA); - c9x.timers[i].modeB = timer[i].tmrModeB; c9x.timers[i].dir = timer[i].tmrDir; c9x.timers[i].val = timer[i].tmrVal; } @@ -532,7 +513,7 @@ t_Ersky9xModelData_v10::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.funcSw[0].func = FuncInstantTrim; if (trimSw) { @@ -613,8 +594,8 @@ t_Ersky9xModelData_v10::operator ModelData () for (int i=0; i #include "eeprominterface.h" -extern TimerMode getEr9xTimerMode(int mode); -extern int setEr9xTimerMode(TimerMode mode); +extern RawSwitch getEr9xTimerMode(int mode); //eeprom data #define ERSKY9X_MAX_MIXERS_V10 32 @@ -186,31 +185,30 @@ PACK(typedef struct t_Ersky9xMixData_v11 { t_Ersky9xMixData_v11(); }) Ersky9xMixData_v11; -PACK(typedef struct t_Ersky9xCustomSwData_v10 { // Custom Switches data +PACK(typedef struct t_Ersky9xLogicalSwitchData_v10 { // Custom Switches data int8_t v1; //input int8_t v2; //offset uint8_t func; - operator CustomSwData(); - t_Ersky9xCustomSwData_v10() { memset(this, 0, sizeof(t_Ersky9xCustomSwData_v10)); } -}) Ersky9xCustomSwData_v10; + operator LogicalSwitchData(); + t_Ersky9xLogicalSwitchData_v10() { memset(this, 0, sizeof(t_Ersky9xLogicalSwitchData_v10)); } +}) Ersky9xLogicalSwitchData_v10; -PACK(typedef struct t_Ersky9xCustomSwData_v11 { // Custom Switches data +PACK(typedef struct t_Ersky9xLogicalSwitchData_v11 { // Custom Switches data int8_t v1; //input int8_t v2; //offset uint8_t func; uint8_t andsw; uint8_t res ; - operator CustomSwData(); - t_Ersky9xCustomSwData_v11() { memset(this, 0, sizeof(t_Ersky9xCustomSwData_v11)); } -}) Ersky9xCustomSwData_v11; + operator LogicalSwitchData(); + t_Ersky9xLogicalSwitchData_v11() { memset(this, 0, sizeof(t_Ersky9xLogicalSwitchData_v11)); } +}) Ersky9xLogicalSwitchData_v11; PACK(typedef struct t_Ersky9xSafetySwData_v10 { // Custom Switches data int8_t swtch; int8_t val; - operator SafetySwData(); t_Ersky9xSafetySwData_v10(); }) Ersky9xSafetySwData_v10; @@ -230,7 +228,6 @@ PACK(typedef struct t_Ersky9xSafetySwData_v11 { // Custom Switches data } vs ; } opt ; - operator SafetySwData(); t_Ersky9xSafetySwData_v11(); }) Ersky9xSafetySwData_v11; @@ -363,7 +360,7 @@ PACK(typedef struct t_Ersky9xModelData_v10 { int8_t trim[4]; int8_t curves5[ERSKY9X_MAX_CURVE5][5]; int8_t curves9[ERSKY9X_MAX_CURVE9][9]; - Ersky9xCustomSwData_v10 customSw[ERSKY9X_NUM_CSW_V10]; + Ersky9xLogicalSwitchData_v10 customSw[ERSKY9X_NUM_CSW_V10]; uint8_t frSkyVoltThreshold ; uint8_t res3[2]; Ersky9xSafetySwData_v10 safetySw[ERSKY9X_NUM_CHNOUT_V10]; @@ -412,7 +409,7 @@ PACK(typedef struct t_Ersky9xModelData_v11 { int8_t curves5[ERSKY9X_MAX_CURVE5][5]; int8_t curves9[ERSKY9X_MAX_CURVE9][9]; int8_t curvexy[18]; - Ersky9xCustomSwData_v11 customSw[ERSKY9X_NUM_CSW_V11]; + Ersky9xLogicalSwitchData_v11 customSw[ERSKY9X_NUM_CSW_V11]; uint8_t frSkyVoltThreshold ; uint8_t bt_telemetry; uint8_t numVoice; // 0-16, rest are Safety switches diff --git a/companion/src/firmwares/ersky9x/ersky9xinterface.cpp b/companion/src/firmwares/ersky9x/ersky9xinterface.cpp index 88129b997..7ff98b5a1 100644 --- a/companion/src/firmwares/ersky9x/ersky9xinterface.cpp +++ b/companion/src/firmwares/ersky9x/ersky9xinterface.cpp @@ -74,11 +74,11 @@ inline void applyStickModeToModel(Ersky9xModelData_v10 & model, unsigned int mod for (int i=0; iEeFsOpen(eeprom, size, BOARD_SKY9X)) { + if (!efile->EeFsOpen((uint8_t *)eeprom, size, BOARD_SKY9X)) { std::cout << "wrong file system\n"; return false; } @@ -285,7 +285,7 @@ int Ersky9xInterface::getCapability(const Capability capability) return 9; case CustomFunctions: return 0; - case CustomSwitches: + case LogicalSwitches: return ERSKY9X_NUM_CSW_V11; case CustomAndSwitches: return 1; @@ -317,9 +317,6 @@ int Ersky9xInterface::getCapability(const Capability capability) return 125; case MaxVolume: return 23; - case GvarsHaveSources: - case GvarsAsSources: - return 1; case TelemetryMaxMultiplier: return 2; case LCDWidth: @@ -346,7 +343,7 @@ int Ersky9xInterface::isAvailable(Protocol prot, int port) SimulatorInterface * Ersky9xInterface::getSimulator() { - return new Ersky9xSimulator(this); + return NULL; // new Ersky9xSimulator(this); } diff --git a/companion/src/firmwares/ersky9x/ersky9xinterface.h b/companion/src/firmwares/ersky9x/ersky9xinterface.h index 23473eae4..d37151c05 100644 --- a/companion/src/firmwares/ersky9x/ersky9xinterface.h +++ b/companion/src/firmwares/ersky9x/ersky9xinterface.h @@ -34,7 +34,7 @@ class Ersky9xInterface : public EEPROMInterface virtual const int getMaxModels(); - virtual bool load(RadioData &, uint8_t * eeprom, int size); + virtual bool load(RadioData &, const uint8_t * eeprom, int size); virtual bool loadBackup(RadioData &, uint8_t * eeprom, int esize, int index); diff --git a/companion/src/firmwares/gruvin9x/gruvin9xeeprom.cpp b/companion/src/firmwares/gruvin9x/gruvin9xeeprom.cpp index 429899ab5..cc42de8f8 100644 --- a/companion/src/firmwares/gruvin9x/gruvin9xeeprom.cpp +++ b/companion/src/firmwares/gruvin9x/gruvin9xeeprom.cpp @@ -301,22 +301,22 @@ RawSource gruvin9xToSource(int8_t value) } } -Gruvin9xCustomSwData::operator CustomSwData () +Gruvin9xLogicalSwitchData::operator LogicalSwitchData () { - CustomSwData c9x; + LogicalSwitchData c9x; c9x.func = func; c9x.val1 = v1; c9x.val2 = v2; - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { + if ((c9x.func >= LS_FN_VPOS && c9x.func <= LS_FN_ANEG) || c9x.func >= LS_FN_EQUAL) { c9x.val1 = gruvin9xToSource(v1).toValue(); } - if (c9x.func >= CS_FN_EQUAL) { + if (c9x.func >= LS_FN_EQUAL) { c9x.val2 = gruvin9xToSource(v2).toValue(); } - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { + if (c9x.func >= LS_FN_AND && c9x.func <= LS_FN_XOR) { c9x.val1 = gruvin9xToSwitch(v1).toValue(); c9x.val2 = gruvin9xToSwitch(v2).toValue(); } @@ -332,14 +332,6 @@ Gruvin9xFuncSwData::operator FuncSwData () return c9x; } -t_Gruvin9xSafetySwData::operator SafetySwData () -{ - SafetySwData c9x; - c9x.swtch = gruvin9xToSwitch(swtch); - c9x.val = val; - return c9x; -} - t_Gruvin9xSwashRingData::t_Gruvin9xSwashRingData() { memset(this, 0, sizeof(t_Gruvin9xSwashRingData)); @@ -381,7 +373,7 @@ t_Gruvin9xPhaseData_v106::operator PhaseData () return c9x; } -extern TimerMode getEr9xTimerMode(int mode); +extern RawSwitch getEr9xTimerMode(int mode); t_Gruvin9xTimerData::operator TimerData () { @@ -458,7 +450,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; @@ -489,8 +481,8 @@ t_Gruvin9xModelData_v102::operator ModelData () for (int i=0; iEeFsOpen(eeprom, size, BOARD_STOCK)) { + if (!efile->EeFsOpen((uint8_t *)eeprom, size, BOARD_STOCK)) { std::cout << "wrong file system\n"; return false; } @@ -237,7 +237,7 @@ int Gruvin9xInterface::getCapability(const Capability capability) return 9; case CustomFunctions: return 12; - case CustomSwitches: + case LogicalSwitches: return 12; case CSFunc: return 13; diff --git a/companion/src/firmwares/gruvin9x/gruvin9xinterface.h b/companion/src/firmwares/gruvin9x/gruvin9xinterface.h index 7da0975e1..2c8a28dc2 100644 --- a/companion/src/firmwares/gruvin9x/gruvin9xinterface.h +++ b/companion/src/firmwares/gruvin9x/gruvin9xinterface.h @@ -35,7 +35,7 @@ class Gruvin9xInterface : public EEPROMInterface virtual const int getMaxModels(); - virtual bool load(RadioData &, uint8_t *eeprom, int size); + virtual bool load(RadioData &, const uint8_t *eeprom, int size); virtual bool loadBackup(RadioData &, uint8_t *eeprom,int esize, int index); diff --git a/companion/src/firmwares/opentx/open9xGruvin9xeeprom.cpp b/companion/src/firmwares/opentx/open9xGruvin9xeeprom.cpp index d18939827..6ec5f402d 100644 --- a/companion/src/firmwares/opentx/open9xGruvin9xeeprom.cpp +++ b/companion/src/firmwares/opentx/open9xGruvin9xeeprom.cpp @@ -293,22 +293,22 @@ RawSource open9xV4209ToSource(int8_t value) } } -Open9xGruvin9xCustomSwData_v207::operator CustomSwData () +Open9xGruvin9xLogicalSwitchData_v207::operator LogicalSwitchData () { - CustomSwData c9x; + LogicalSwitchData c9x; c9x.func = func; c9x.val1 = v1; c9x.val2 = v2; - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { + if ((c9x.func >= LS_FN_VPOS && c9x.func <= LS_FN_ANEG) || c9x.func >= LS_FN_EQUAL) { c9x.val1 = open9xV4207ToSource(v1).toValue(); } - if (c9x.func >= CS_FN_EQUAL) { + if (c9x.func >= LS_FN_EQUAL) { c9x.val2 = open9xV4207ToSource(v2).toValue(); } - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { + if (c9x.func >= LS_FN_AND && c9x.func <= LS_FN_XOR) { c9x.val1 = open9xStockToSwitch(v1).toValue(); c9x.val2 = open9xStockToSwitch(v2).toValue(); } @@ -316,22 +316,22 @@ Open9xGruvin9xCustomSwData_v207::operator CustomSwData () return c9x; } -Open9xGruvin9xCustomSwData_v209::operator CustomSwData () +Open9xGruvin9xLogicalSwitchData_v209::operator LogicalSwitchData () { - CustomSwData c9x; + LogicalSwitchData c9x; c9x.func = func; c9x.val1 = v1; c9x.val2 = v2; - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { + if ((c9x.func >= LS_FN_VPOS && c9x.func <= LS_FN_ANEG) || c9x.func >= LS_FN_EQUAL) { c9x.val1 = open9xV4209ToSource(v1).toValue(); } - if (c9x.func >= CS_FN_EQUAL && c9x.func <= CS_FN_ELESS) { + if (c9x.func >= LS_FN_EQUAL && c9x.func <= LS_FN_ELESS) { c9x.val2 = open9xV4209ToSource(v2).toValue(); } - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { + if (c9x.func >= LS_FN_AND && c9x.func <= LS_FN_XOR) { c9x.val1 = open9xStockToSwitch(v1).toValue(); c9x.val2 = open9xStockToSwitch(v2).toValue(); } @@ -454,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; @@ -538,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; @@ -627,7 +627,7 @@ t_Open9xGruvin9xModelData_v209::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; @@ -717,7 +717,7 @@ t_Open9xGruvin9xModelData_v210::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; @@ -804,7 +804,7 @@ t_Open9xGruvin9xModelData_v211::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; diff --git a/companion/src/firmwares/opentx/open9xGruvin9xeeprom.h b/companion/src/firmwares/opentx/open9xGruvin9xeeprom.h index c95dc6742..214e2ef6d 100644 --- a/companion/src/firmwares/opentx/open9xGruvin9xeeprom.h +++ b/companion/src/firmwares/opentx/open9xGruvin9xeeprom.h @@ -110,27 +110,27 @@ PACK(typedef struct t_Open9xGruvin9xMixData_v211 { t_Open9xGruvin9xMixData_v211() { memset(this, 0, sizeof(t_Open9xGruvin9xMixData_v211)); } }) Open9xGruvin9xMixData_v211; -PACK(typedef struct t_Open9xGruvin9xCustomSwData_v207 { // Custom Switches data +PACK(typedef struct t_Open9xGruvin9xLogicalSwitchData_v207 { // Custom Switches data int8_t v1; //input int8_t v2; //offset uint8_t func; - operator CustomSwData(); - t_Open9xGruvin9xCustomSwData_v207() { memset(this, 0, sizeof(t_Open9xGruvin9xCustomSwData_v207)); } + operator LogicalSwitchData(); + t_Open9xGruvin9xLogicalSwitchData_v207() { memset(this, 0, sizeof(t_Open9xGruvin9xLogicalSwitchData_v207)); } int8_t fromSource(RawSource source); RawSource toSource(int8_t value); -}) Open9xGruvin9xCustomSwData_v207; +}) Open9xGruvin9xLogicalSwitchData_v207; -PACK(typedef struct t_Open9xGruvin9xCustomSwData_v209 { // Custom Switches data +PACK(typedef struct t_Open9xGruvin9xLogicalSwitchData_v209 { // Custom Switches data int8_t v1; //input int8_t v2; //offset uint8_t func; - operator CustomSwData(); - t_Open9xGruvin9xCustomSwData_v209() { memset(this, 0, sizeof(t_Open9xGruvin9xCustomSwData_v209)); } + operator LogicalSwitchData(); + t_Open9xGruvin9xLogicalSwitchData_v209() { memset(this, 0, sizeof(t_Open9xGruvin9xLogicalSwitchData_v209)); } int8_t fromSource(RawSource source); RawSource toSource(int8_t value); -}) Open9xGruvin9xCustomSwData_v209; +}) Open9xGruvin9xLogicalSwitchData_v209; PACK(typedef struct t_Open9xGruvin9xFuncSwData_v203 { // Function Switches data int8_t swtch; // input @@ -194,7 +194,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v207 { Open9xExpoData_v201 expoData[O9X_MAX_EXPOS]; int8_t curves5[O9X_209_MAX_CURVE5][5]; int8_t curves9[O9X_209_MAX_CURVE9][9]; - Open9xGruvin9xCustomSwData_v207 customSw[O9X_NUM_CSW]; + Open9xGruvin9xLogicalSwitchData_v207 customSw[O9X_NUM_CSW]; Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW]; Open9xGruvin9xSwashRingData_v208 swashR; Open9xGruvin9xPhaseData_v207 phaseData[O9X_MAX_PHASES]; @@ -228,7 +228,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v208 { Open9xExpoData_v201 expoData[O9X_MAX_EXPOS]; int8_t curves5[O9X_209_MAX_CURVE5][5]; int8_t curves9[O9X_209_MAX_CURVE9][9]; - Open9xGruvin9xCustomSwData_v207 customSw[O9X_NUM_CSW]; + Open9xGruvin9xLogicalSwitchData_v207 customSw[O9X_NUM_CSW]; Open9xGruvin9xFuncSwData_v203 funcSw[O9X_NUM_FSW]; Open9xGruvin9xSwashRingData_v208 swashR; Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_PHASES]; @@ -267,7 +267,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v209 { Open9xExpoData_v201 expoData[O9X_MAX_EXPOS]; int8_t curves5[O9X_209_MAX_CURVE5][5]; int8_t curves9[O9X_209_MAX_CURVE9][9]; - Open9xGruvin9xCustomSwData_v209 customSw[O9X_NUM_CSW]; + Open9xGruvin9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW]; Open9xGruvin9xFuncSwData_v203 funcSw[O9X_NUM_FSW]; Open9xGruvin9xSwashRingData_v209 swashR; Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_PHASES]; @@ -307,7 +307,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v210 { Open9xExpoData_v201 expoData[O9X_MAX_EXPOS]; int8_t curves[O9X_MAX_CURVES]; int8_t points[O9X_NUM_POINTS]; - Open9xGruvin9xCustomSwData_v209 customSw[O9X_NUM_CSW]; + Open9xGruvin9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW]; Open9xGruvin9xFuncSwData_v210 funcSw[O9X_NUM_FSW]; Open9xGruvin9xSwashRingData_v209 swashR; Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_PHASES]; @@ -345,7 +345,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v211 { Open9xExpoData_v211 expoData[O9X_MAX_EXPOS]; int8_t curves[O9X_MAX_CURVES]; int8_t points[O9X_NUM_POINTS]; - Open9xGruvin9xCustomSwData_v209 customSw[O9X_NUM_CSW]; + Open9xGruvin9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW]; Open9xGruvin9xFuncSwData_v210 funcSw[O9X_NUM_FSW]; Open9xGruvin9xSwashRingData_v209 swashR; Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_PHASES]; diff --git a/companion/src/firmwares/opentx/open9xSky9xeeprom.cpp b/companion/src/firmwares/opentx/open9xSky9xeeprom.cpp index 524d55fee..36b6229ac 100644 --- a/companion/src/firmwares/opentx/open9xSky9xeeprom.cpp +++ b/companion/src/firmwares/opentx/open9xSky9xeeprom.cpp @@ -19,13 +19,13 @@ RawSwitch open9xArmToSwitch(int8_t sw) else if (sw == 42) return RawSwitch(SWITCH_TYPE_ON); else if (sw == 84) - return RawSwitch(SWITCH_TYPE_ONM); + return RawSwitch(SWITCH_TYPE_ON); else if (sw == -42) return RawSwitch(SWITCH_TYPE_OFF); else if (swa <= 42+9) - return RawSwitch(SWITCH_TYPE_MOMENT_SWITCH, sw > 0 ? sw-42 : sw+42); + return RawSwitch(SWITCH_TYPE_SWITCH, sw > 0 ? sw-42 : sw+42); else - return RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, sw > 0 ? sw-42-9 : sw+42+9); + return RawSwitch(SWITCH_TYPE_VIRTUAL, sw > 0 ? sw-42-9 : sw+42+9); } RawSource open9xArm208ToSource(int8_t value) @@ -124,9 +124,9 @@ RawSource open9xArm210ToSource(int8_t value) t_Open9xArmTimerData_v202::operator TimerData () { TimerData c9x; - +/* if (mode <= -42) - c9x.mode = TimerMode(TMRMODE_FIRST_NEG_MOMENT_SWITCH+(mode+22)); + c9x.mode = TimerMode(TMRMODE_FIRST_NEG_SWITCH+(mode+22)); else if (mode <= -1) c9x.mode = TimerMode(TMRMODE_FIRST_NEG_SWITCH+(mode+1)); else if (mode < 5) @@ -134,8 +134,8 @@ t_Open9xArmTimerData_v202::operator TimerData () else if (mode < 5+41) c9x.mode = TimerMode(TMRMODE_FIRST_SWITCH+(mode-5)); else - c9x.mode = TimerMode(TMRMODE_FIRST_MOMENT_SWITCH+(mode-5-21)); - + c9x.mode = TimerMode(TMRMODE_FIRST_SWITCH+(mode-5-21)); +*/ c9x.val = val; c9x.persistent = false; c9x.dir = (val == 0); @@ -268,11 +268,11 @@ t_Open9xArmMixData_v208::operator MixData () else if (srcRaw <= 9+9+O9X_ARM_NUM_CSW+NUM_CYC) { c9x.srcRaw = RawSource(SOURCE_TYPE_CYC, srcRaw-10-9-O9X_ARM_NUM_CSW); } - else if (srcRaw <= 9+9+O9X_ARM_NUM_CSW+NUM_CYC+NUM_PPM) { + else if (srcRaw <= 9+9+O9X_ARM_NUM_CSW+NUM_CYC+8) { c9x.srcRaw = RawSource(SOURCE_TYPE_PPM, srcRaw-10-9-O9X_ARM_NUM_CSW-NUM_CYC); } else { - c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-10-9-O9X_ARM_NUM_CSW-NUM_CYC-NUM_PPM); + c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-10-9-O9X_ARM_NUM_CSW-NUM_CYC-8); } c9x.weight = weight; c9x.swtch = open9xArmToSwitch(swtch); @@ -334,11 +334,11 @@ t_Open9xArmMixData_v209::operator MixData () else if (srcRaw <= 13+9+O9X_ARM_NUM_CSW+NUM_CYC) { c9x.srcRaw = RawSource(SOURCE_TYPE_CYC, srcRaw-14-9-O9X_ARM_NUM_CSW); } - else if (srcRaw <= 13+9+O9X_ARM_NUM_CSW+NUM_CYC+NUM_PPM) { + else if (srcRaw <= 13+9+O9X_ARM_NUM_CSW+NUM_CYC+8) { c9x.srcRaw = RawSource(SOURCE_TYPE_PPM, srcRaw-14-9-O9X_ARM_NUM_CSW-NUM_CYC); } else { - c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-14-9-O9X_ARM_NUM_CSW-NUM_CYC-NUM_PPM); + c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-14-9-O9X_ARM_NUM_CSW-NUM_CYC-8); } c9x.weight = weight; @@ -400,11 +400,11 @@ t_Open9xArmMixData_v210::operator MixData () else if (srcRaw <= 13+9+O9X_ARM_NUM_CSW+NUM_CYC) { c9x.srcRaw = RawSource(SOURCE_TYPE_CYC, srcRaw-14-9-O9X_ARM_NUM_CSW); } - else if (srcRaw <= 13+9+O9X_ARM_NUM_CSW+NUM_CYC+NUM_PPM) { + else if (srcRaw <= 13+9+O9X_ARM_NUM_CSW+NUM_CYC+8) { c9x.srcRaw = RawSource(SOURCE_TYPE_PPM, srcRaw-14-9-O9X_ARM_NUM_CSW-NUM_CYC); } else { - c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-14-9-O9X_ARM_NUM_CSW-NUM_CYC-NUM_PPM); + c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-14-9-O9X_ARM_NUM_CSW-NUM_CYC-8); } c9x.weight = weight; @@ -470,11 +470,11 @@ t_Open9xArmMixData_v212::operator MixData () else if (srcRaw <= 14+9+O9X_ARM_NUM_CSW+NUM_CYC) { c9x.srcRaw = RawSource(SOURCE_TYPE_CYC, srcRaw-15-9-O9X_ARM_NUM_CSW); } - else if (srcRaw <= 14+9+O9X_ARM_NUM_CSW+NUM_CYC+NUM_PPM) { + else if (srcRaw <= 14+9+O9X_ARM_NUM_CSW+NUM_CYC+8) { c9x.srcRaw = RawSource(SOURCE_TYPE_PPM, srcRaw-15-9-O9X_ARM_NUM_CSW-NUM_CYC); } else { - c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-15-9-O9X_ARM_NUM_CSW-NUM_CYC-NUM_PPM); + c9x.srcRaw = RawSource(SOURCE_TYPE_CH, srcRaw-15-9-O9X_ARM_NUM_CSW-NUM_CYC-8); } c9x.weight = weight; @@ -501,22 +501,22 @@ t_Open9xArmMixData_v212::operator MixData () return c9x; } -t_Open9xArmCustomSwData_v208::operator CustomSwData () +t_Open9xArmLogicalSwitchData_v208::operator LogicalSwitchData () { - CustomSwData c9x; + LogicalSwitchData c9x; c9x.func = func; c9x.val1 = v1; c9x.val2 = v2; - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { + if ((c9x.func >= LS_FN_VPOS && c9x.func <= LS_FN_ANEG) || c9x.func >= LS_FN_EQUAL) { c9x.val1 = open9xArm208ToSource(v1).toValue(); } - if (c9x.func >= CS_FN_EQUAL) { + if (c9x.func >= LS_FN_EQUAL) { c9x.val2 = open9xArm208ToSource(v2).toValue(); } - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { + if (c9x.func >= LS_FN_AND && c9x.func <= LS_FN_XOR) { c9x.val1 = open9xArmToSwitch(v1).toValue(); c9x.val2 = open9xArmToSwitch(v2).toValue(); } @@ -524,22 +524,22 @@ t_Open9xArmCustomSwData_v208::operator CustomSwData () return c9x; } -t_Open9xArmCustomSwData_v209::operator CustomSwData () +t_Open9xArmLogicalSwitchData_v209::operator LogicalSwitchData () { - CustomSwData c9x; + LogicalSwitchData c9x; c9x.func = func; c9x.val1 = v1; c9x.val2 = v2; - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { + if ((c9x.func >= LS_FN_VPOS && c9x.func <= LS_FN_ANEG) || c9x.func >= LS_FN_EQUAL) { c9x.val1 = open9xArm209ToSource(v1).toValue(); } - if (c9x.func >= CS_FN_EQUAL) { + if (c9x.func >= LS_FN_EQUAL) { c9x.val2 = open9xArm209ToSource(v2).toValue(); } - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { + if (c9x.func >= LS_FN_AND && c9x.func <= LS_FN_XOR) { c9x.val1 = open9xArmToSwitch(v1).toValue(); c9x.val2 = open9xArmToSwitch(v2).toValue(); } @@ -547,24 +547,24 @@ t_Open9xArmCustomSwData_v209::operator CustomSwData () return c9x; } -t_Open9xArmCustomSwData_v210::operator CustomSwData () +t_Open9xArmLogicalSwitchData_v210::operator LogicalSwitchData () { - CustomSwData c9x; + LogicalSwitchData c9x; c9x.func = func; c9x.val1 = v1; c9x.val2 = v2; c9x.delay = delay; c9x.duration = duration; - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { + if ((c9x.func >= LS_FN_VPOS && c9x.func <= LS_FN_ANEG) || c9x.func >= LS_FN_EQUAL) { c9x.val1 = open9xArm210ToSource(v1).toValue(); } - if (c9x.func >= CS_FN_EQUAL && c9x.func <= CS_FN_ELESS) { + if (c9x.func >= LS_FN_EQUAL && c9x.func <= LS_FN_ELESS) { c9x.val2 = open9xArm210ToSource(v2).toValue(); } - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { + if (c9x.func >= LS_FN_AND && c9x.func <= LS_FN_XOR) { c9x.val1 = open9xArmToSwitch(v1).toValue(); c9x.val2 = open9xArmToSwitch(v2).toValue(); } @@ -577,7 +577,7 @@ t_Open9xArmFuncSwData_v208::operator FuncSwData () FuncSwData c9x; c9x.swtch = open9xArmToSwitch(swtch); c9x.func = (AssignFunc)(func); - if (c9x.func <= FuncSafetyCh16) { + if (c9x.func <= FuncSafetyCh32) { c9x.enabled=param & 0x01; c9x.param = (param>>1)<<1; } @@ -760,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; @@ -849,7 +849,7 @@ t_Open9xArmModelData_v209::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; @@ -939,7 +939,7 @@ t_Open9xArmModelData_v210::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; @@ -1023,7 +1023,7 @@ t_Open9xArmModelData_v211::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; @@ -1110,7 +1110,7 @@ t_Open9xArmModelData_v212::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; diff --git a/companion/src/firmwares/opentx/open9xSky9xeeprom.h b/companion/src/firmwares/opentx/open9xSky9xeeprom.h index b313169b8..fdb3974ee 100644 --- a/companion/src/firmwares/opentx/open9xSky9xeeprom.h +++ b/companion/src/firmwares/opentx/open9xSky9xeeprom.h @@ -190,34 +190,34 @@ PACK(typedef struct t_Open9xArmPhaseData_v212 { t_Open9xArmPhaseData_v212() { memset(this, 0, sizeof(t_Open9xArmPhaseData_v212)); } }) Open9xArmPhaseData_v212; -PACK(typedef struct t_Open9xArmCustomSwData_v208 { // Custom Switches data +PACK(typedef struct t_Open9xArmLogicalSwitchData_v208 { // Custom Switches data int8_t v1; //input int8_t v2; //offset uint8_t func; - operator CustomSwData(); - t_Open9xArmCustomSwData_v208() { memset(this, 0, sizeof(t_Open9xArmCustomSwData_v208)); } -}) Open9xArmCustomSwData_v208; + operator LogicalSwitchData(); + t_Open9xArmLogicalSwitchData_v208() { memset(this, 0, sizeof(t_Open9xArmLogicalSwitchData_v208)); } +}) Open9xArmLogicalSwitchData_v208; -PACK(typedef struct t_Open9xArmCustomSwData_v209 { // Custom Switches data +PACK(typedef struct t_Open9xArmLogicalSwitchData_v209 { // Custom Switches data int8_t v1; //input int8_t v2; //offset uint8_t func; - operator CustomSwData(); - t_Open9xArmCustomSwData_v209() { memset(this, 0, sizeof(t_Open9xArmCustomSwData_v209)); } -}) Open9xArmCustomSwData_v209; + operator LogicalSwitchData(); + t_Open9xArmLogicalSwitchData_v209() { memset(this, 0, sizeof(t_Open9xArmLogicalSwitchData_v209)); } +}) Open9xArmLogicalSwitchData_v209; -PACK(typedef struct t_Open9xArmCustomSwData_v210 { // Custom Switches data +PACK(typedef struct t_Open9xArmLogicalSwitchData_v210 { // Custom Switches data int8_t v1; //input int8_t v2; //offset uint8_t func; uint8_t delay; uint8_t duration; - operator CustomSwData(); - t_Open9xArmCustomSwData_v210() { memset(this, 0, sizeof(t_Open9xArmCustomSwData_v210)); } -}) Open9xArmCustomSwData_v210; + operator LogicalSwitchData(); + t_Open9xArmLogicalSwitchData_v210() { memset(this, 0, sizeof(t_Open9xArmLogicalSwitchData_v210)); } +}) Open9xArmLogicalSwitchData_v210; PACK(typedef struct t_Open9xArmFuncSwData_v208 { // Function Switches data int8_t swtch; // input @@ -343,7 +343,7 @@ PACK(typedef struct t_Open9xArmModelData_v208 { Open9xArmExpoData_v208 expoData[O9X_ARM_MAX_EXPOS]; int8_t curves5[O9X_209_MAX_CURVE5][5]; int8_t curves9[O9X_209_MAX_CURVE9][9]; - Open9xArmCustomSwData_v208 customSw[O9X_ARM_NUM_CSW]; + Open9xArmLogicalSwitchData_v208 customSw[O9X_ARM_NUM_CSW]; Open9xArmFuncSwData_v208 funcSw[O9X_ARM_NUM_FSW]; Open9xArmSwashRingData_v208 swashR; Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_PHASES]; @@ -382,7 +382,7 @@ PACK(typedef struct t_Open9xArmModelData_v209 { Open9xArmExpoData_v208 expoData[O9X_ARM_MAX_EXPOS]; int8_t curves5[O9X_209_MAX_CURVE5][5]; int8_t curves9[O9X_209_MAX_CURVE9][9]; - Open9xArmCustomSwData_v209 customSw[O9X_ARM_NUM_CSW]; + Open9xArmLogicalSwitchData_v209 customSw[O9X_ARM_NUM_CSW]; Open9xArmFuncSwData_v208 funcSw[O9X_ARM_NUM_FSW]; Open9xArmSwashRingData_v209 swashR; Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_PHASES]; @@ -422,7 +422,7 @@ PACK(typedef struct t_Open9xArmModelData_v210 { Open9xArmExpoData_v210 expoData[O9X_ARM_MAX_EXPOS]; int8_t curves5[O9X_209_MAX_CURVE5][5]; int8_t curves9[O9X_209_MAX_CURVE9][9]; - Open9xArmCustomSwData_v210 customSw[O9X_ARM_NUM_CSW]; + Open9xArmLogicalSwitchData_v210 customSw[O9X_ARM_NUM_CSW]; Open9xArmFuncSwData_v210 funcSw[O9X_ARM_NUM_FSW]; Open9xArmSwashRingData_v209 swashR; Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_PHASES]; @@ -461,7 +461,7 @@ PACK(typedef struct t_Open9xArmModelData_v211 { Open9xArmExpoData_v210 expoData[O9X_ARM_MAX_EXPOS]; int16_t curves[O9X_ARM_MAX_CURVES]; int8_t points[O9X_ARM_NUM_POINTS]; - Open9xArmCustomSwData_v210 customSw[O9X_ARM_NUM_CSW]; + Open9xArmLogicalSwitchData_v210 customSw[O9X_ARM_NUM_CSW]; Open9xArmFuncSwData_v211 funcSw[O9X_ARM_NUM_FSW]; Open9xArmSwashRingData_v209 swashR; Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_PHASES]; @@ -499,7 +499,7 @@ PACK(typedef struct t_Open9xArmModelData_v212 { Open9xArmExpoData_v212 expoData[O9X_ARM_MAX_EXPOS]; int16_t curves[O9X_ARM_MAX_CURVES]; int8_t points[O9X_ARM_NUM_POINTS]; - Open9xArmCustomSwData_v210 customSw[O9X_ARM_NUM_CSW]; + Open9xArmLogicalSwitchData_v210 customSw[O9X_ARM_NUM_CSW]; Open9xArmFuncSwData_v211 funcSw[O9X_ARM_NUM_FSW]; Open9xArmSwashRingData_v210 swashR; Open9xArmPhaseData_v212 phaseData[O9X_ARM_MAX_PHASES]; diff --git a/companion/src/firmwares/opentx/open9xStockeeprom.cpp b/companion/src/firmwares/opentx/open9xStockeeprom.cpp index 0fc602e04..73cb22164 100644 --- a/companion/src/firmwares/opentx/open9xStockeeprom.cpp +++ b/companion/src/firmwares/opentx/open9xStockeeprom.cpp @@ -74,13 +74,13 @@ RawSwitch open9xStockToSwitch(int8_t sw) else if (sw == 22) return RawSwitch(SWITCH_TYPE_ON); else if (sw == 44) - return RawSwitch(SWITCH_TYPE_ONM); + return RawSwitch(SWITCH_TYPE_ON); else if (sw == -22) return RawSwitch(SWITCH_TYPE_OFF); else if (swa <= 22+9) - return RawSwitch(SWITCH_TYPE_MOMENT_SWITCH, sw > 0 ? sw-22 : sw+22); + return RawSwitch(SWITCH_TYPE_SWITCH, sw > 0 ? sw-22 : sw+22); else - return RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, sw > 0 ? sw-22-9 : sw+22+9); + return RawSwitch(SWITCH_TYPE_VIRTUAL, sw > 0 ? sw-22-9 : sw+22+9); } t_Open9xExpoData_v201::operator ExpoData () @@ -518,22 +518,22 @@ RawSource open9xStock209ToSource(int8_t value) } } -Open9xCustomSwData_v208::operator CustomSwData () +Open9xLogicalSwitchData_v208::operator LogicalSwitchData () { - CustomSwData c9x; + LogicalSwitchData c9x; c9x.func = func; c9x.val1 = v1; c9x.val2 = v2; - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { + if ((c9x.func >= LS_FN_VPOS && c9x.func <= LS_FN_ANEG) || c9x.func >= LS_FN_EQUAL) { c9x.val1 = open9x208ToSource(v1).toValue(); } - if (c9x.func >= CS_FN_EQUAL) { + if (c9x.func >= LS_FN_EQUAL) { c9x.val2 = open9x208ToSource(v2).toValue(); } - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { + if (c9x.func >= LS_FN_AND && c9x.func <= LS_FN_XOR) { c9x.val1 = open9xStockToSwitch(v1).toValue(); c9x.val2 = open9xStockToSwitch(v2).toValue(); } @@ -541,22 +541,22 @@ Open9xCustomSwData_v208::operator CustomSwData () return c9x; } -Open9xCustomSwData_v209::operator CustomSwData () +Open9xLogicalSwitchData_v209::operator LogicalSwitchData () { - CustomSwData c9x; + LogicalSwitchData c9x; c9x.func = func; c9x.val1 = v1; c9x.val2 = v2; - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { + if ((c9x.func >= LS_FN_VPOS && c9x.func <= LS_FN_ANEG) || c9x.func >= LS_FN_EQUAL) { c9x.val1 = open9xStock209ToSource(v1).toValue(); } - if (c9x.func >= CS_FN_EQUAL && c9x.func <= CS_FN_ELESS) { + if (c9x.func >= LS_FN_EQUAL && c9x.func <= LS_FN_ELESS) { c9x.val2 = open9xStock209ToSource(v2).toValue(); } - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { + if (c9x.func >= LS_FN_AND && c9x.func <= LS_FN_XOR) { c9x.val1 = open9xStockToSwitch(v1).toValue(); c9x.val2 = open9xStockToSwitch(v2).toValue(); } @@ -593,7 +593,7 @@ 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 }; @@ -662,14 +662,6 @@ t_Open9xFuncSwData_v210::operator FuncSwData () return c9x; } -t_Open9xSafetySwData::operator SafetySwData () -{ - SafetySwData c9x; - c9x.swtch = open9xStockToSwitch(swtch); - c9x.val = val; - return c9x; -} - t_Open9xSwashRingData_v208::operator SwashRingData () { SwashRingData c9x; @@ -709,7 +701,7 @@ t_Open9xPhaseData_v201::operator PhaseData () t_Open9xTimerData_v201::operator TimerData () { TimerData c9x; - c9x.mode = TMRMODE_OFF; + // c9x.mode = TMRMODE_OFF; c9x.val = val; c9x.persistent = persistent; c9x.dir = dir; @@ -719,9 +711,9 @@ t_Open9xTimerData_v201::operator TimerData () t_Open9xTimerData_v202::operator TimerData () { TimerData c9x; - +/* if (mode <= -22) - c9x.mode = TimerMode(TMRMODE_FIRST_NEG_MOMENT_SWITCH+(mode+22)); + c9x.mode = TimerMode(TMRMODE_FIRST_NEG_SWITCH+(mode+22)); else if (mode <= -1) c9x.mode = TimerMode(TMRMODE_FIRST_NEG_SWITCH+(mode+1)); else if (mode < 5) @@ -729,8 +721,8 @@ t_Open9xTimerData_v202::operator TimerData () else if (mode < 5+21) c9x.mode = TimerMode(TMRMODE_FIRST_SWITCH+(mode-5)); else - c9x.mode = TimerMode(TMRMODE_FIRST_MOMENT_SWITCH+(mode-5-21)); - + c9x.mode = TimerMode(TMRMODE_FIRST_SWITCH+(mode-5-21)); +*/ c9x.val = val; c9x.persistent = false; c9x.dir = (val == 0); @@ -950,7 +942,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; @@ -993,8 +985,8 @@ t_Open9xModelData_v201::operator ModelData () c9x.customSw[i] = customSw[i]; for (int i=0; i<12; i++) c9x.funcSw[i] = funcSw[i]; - for (int i=0; isave(&eeprom[0], radioData, SIMU_GRUVIN9X_VARIANTS); + memcpy(Open9xGruvin9x::eeprom, eeprom.data(), std::min(sizeof(Open9xGruvin9x::eeprom), eeprom.size())); StartEepromThread(NULL); StartMainThread(tests); } +void Open9xGruvin9xSimulator::start(const char * filename, bool tests) +{ + g_rotenc[0] = 0; + g_rotenc[1] = 0; + StartEepromThread(filename); + StartMainThread(tests); +} + void Open9xGruvin9xSimulator::stop() { StopMainThread(); diff --git a/companion/src/firmwares/opentx/opentxGruvin9xsimulator.h b/companion/src/firmwares/opentx/opentxGruvin9xsimulator.h index 8216c7a04..6fb3e320a 100644 --- a/companion/src/firmwares/opentx/opentxGruvin9xsimulator.h +++ b/companion/src/firmwares/opentx/opentxGruvin9xsimulator.h @@ -20,15 +20,17 @@ #include "simulatorinterface.h" class RadioData; -class Open9xInterface; +class OpenTxInterface; class Open9xGruvin9xSimulator : public SimulatorInterface { public: - Open9xGruvin9xSimulator(Open9xInterface *); + Open9xGruvin9xSimulator(OpenTxInterface *); - virtual void start(RadioData & radioData, bool tests); + virtual void start(QByteArray & eeprom, bool tests=true); + + virtual void start(const char * filename, bool tests=true); virtual void stop(); @@ -54,7 +56,7 @@ class Open9xGruvin9xSimulator : public SimulatorInterface { protected: - Open9xInterface * open9xInterface; + OpenTxInterface * open9xInterface; }; #endif diff --git a/companion/src/firmwares/opentx/opentxM128simulator.cpp b/companion/src/firmwares/opentx/opentxM128simulator.cpp index f169a10d3..a03045c2d 100644 --- a/companion/src/firmwares/opentx/opentxM128simulator.cpp +++ b/companion/src/firmwares/opentx/opentxM128simulator.cpp @@ -103,7 +103,7 @@ uint8_t getStickMode() using namespace Open9xM128; -Open9xM128Simulator::Open9xM128Simulator(Open9xInterface * open9xInterface): +Open9xM128Simulator::Open9xM128Simulator(OpenTxInterface * open9xInterface): open9xInterface(open9xInterface) { } @@ -126,13 +126,19 @@ bool Open9xM128Simulator::lcdChanged(bool & lightEnable) #include "simulatorimport.h" } -void Open9xM128Simulator::start(RadioData &radioData, bool tests) +void Open9xM128Simulator::start(QByteArray & eeprom, bool tests) { - open9xInterface->save(&eeprom[0], radioData, SIMU_M128_VARIANTS); + memcpy(Open9xM128::eeprom, eeprom.data(), std::min(sizeof(Open9xM128::eeprom), eeprom.size())); StartEepromThread(NULL); StartMainThread(tests); } +void Open9xM128Simulator::start(const char * filename, bool tests) +{ + StartEepromThread(filename); + StartMainThread(tests); +} + void Open9xM128Simulator::stop() { StopMainThread(); diff --git a/companion/src/firmwares/opentx/opentxM128simulator.h b/companion/src/firmwares/opentx/opentxM128simulator.h index dc43edc5f..862c7ada9 100644 --- a/companion/src/firmwares/opentx/opentxM128simulator.h +++ b/companion/src/firmwares/opentx/opentxM128simulator.h @@ -20,15 +20,17 @@ #include "simulatorinterface.h" class RadioData; -class Open9xInterface; +class OpenTxInterface; class Open9xM128Simulator : public SimulatorInterface { public: - Open9xM128Simulator(Open9xInterface *); + Open9xM128Simulator(OpenTxInterface *); - virtual void start(RadioData & radioData, bool tests); + virtual void start(QByteArray & eeprom, bool tests=true); + + virtual void start(const char * filename, bool tests=true); virtual void stop(); @@ -54,7 +56,7 @@ class Open9xM128Simulator : public SimulatorInterface { protected: - Open9xInterface * open9xInterface; + OpenTxInterface * open9xInterface; }; #endif diff --git a/companion/src/firmwares/opentx/opentxSky9xsimulator.cpp b/companion/src/firmwares/opentx/opentxSky9xsimulator.cpp index 9f444c808..e17a14be3 100644 --- a/companion/src/firmwares/opentx/opentxSky9xsimulator.cpp +++ b/companion/src/firmwares/opentx/opentxSky9xsimulator.cpp @@ -16,6 +16,7 @@ #include "opentxSky9xsimulator.h" #include "opentxinterface.h" +#include "appdata.h" #define SIMU #define SIMU_EXCEPTIONS @@ -132,11 +133,10 @@ uint8_t getStickMode() using namespace Open9xSky9x; -Open9xSky9xSimulator::Open9xSky9xSimulator(Open9xInterface * open9xInterface): +Open9xSky9xSimulator::Open9xSky9xSimulator(OpenTxInterface * open9xInterface): open9xInterface(open9xInterface) { - QSettings settings("companion9x", "companion9x"); - QString path=settings.value("sdPath", ".").toString()+"/"; + QString path=g.profile[g.id()].sdPath()+"/"; int i=0; for (i=0; i< std::min(path.length(),1022); i++) { simuSdDirectory[i]=path.at(i).toAscii(); @@ -162,14 +162,21 @@ bool Open9xSky9xSimulator::lcdChanged(bool & lightEnable) #include "simulatorimport.h" } -void Open9xSky9xSimulator::start(RadioData &radioData, bool tests) +void Open9xSky9xSimulator::start(QByteArray & eeprom, bool tests) { g_rotenc[0] = 0; - open9xInterface->save(&eeprom[0], radioData); + memcpy(Open9xSky9x::eeprom, eeprom.data(), std::min(sizeof(Open9xSky9x::eeprom), eeprom.size())); StartEepromThread(NULL); StartMainThread(tests); } +void Open9xSky9xSimulator::start(const char * filename, bool tests) +{ + g_rotenc[0] = 0; + StartEepromThread(filename); + StartMainThread(tests); +} + void Open9xSky9xSimulator::stop() { StopMainThread(); diff --git a/companion/src/firmwares/opentx/opentxSky9xsimulator.h b/companion/src/firmwares/opentx/opentxSky9xsimulator.h index 95463fbab..0489fea1d 100644 --- a/companion/src/firmwares/opentx/opentxSky9xsimulator.h +++ b/companion/src/firmwares/opentx/opentxSky9xsimulator.h @@ -20,15 +20,17 @@ #include "simulatorinterface.h" class RadioData; -class Open9xInterface; +class OpenTxInterface; class Open9xSky9xSimulator : public SimulatorInterface { public: - Open9xSky9xSimulator(Open9xInterface *); + Open9xSky9xSimulator(OpenTxInterface *); - virtual void start(RadioData & radioData, bool tests); + virtual void start(QByteArray & eeprom, bool tests=true); + + virtual void start(const char * filename, bool tests=true); virtual void stop(); @@ -54,7 +56,7 @@ class Open9xSky9xSimulator : public SimulatorInterface { protected: - Open9xInterface * open9xInterface; + OpenTxInterface * open9xInterface; }; #endif diff --git a/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp b/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp index ae4424797..f147e1fc5 100644 --- a/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp +++ b/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp @@ -16,6 +16,7 @@ #include "opentxTaranisSimulator.h" #include "opentxinterface.h" +#include "appdata.h" #define SIMU #define SIMU_EXCEPTIONS @@ -35,6 +36,8 @@ #define AUDIO #define VOICE #define PXX +#define DSM2 +#define DSM2_PPM #define DBLKEYS #define AUTOSWITCH #define GRAPHICS @@ -47,6 +50,8 @@ #define PPM_CENTER_ADJUSTABLE #define PPM_LIMITS_SYMETRICAL #define FAI_CHOICE +#define LUA +#define LUA_MODEL_SCRIPTS #define EEPROM_VARIANT 3 #undef min @@ -65,6 +70,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" @@ -73,6 +79,7 @@ inline int geteepromsize() { #include "radio/src/targets/taranis/pulses_driver.cpp" #include "radio/src/targets/taranis/rtc_driver.cpp" #include "radio/src/targets/taranis/trainer_driver.cpp" +#include "radio/src/targets/taranis/uart3_driver.cpp" #include "radio/src/protocols/pulses_arm.cpp" #include "radio/src/stamp.cpp" #include "radio/src/maths.cpp" @@ -110,8 +117,38 @@ inline int geteepromsize() { #include "radio/src/translations/tts_pt.cpp" #include "radio/src/translations/tts_sk.cpp" #include "radio/src/translations/tts_pl.cpp" + +#include "radio/src/lua.cpp" +#include "radio/src/lua/src/lapi.c" +#include "radio/src/lua/src/lcode.c" +#include "radio/src/lua/src/lctype.c" +#include "radio/src/lua/src/ldebug.c" +#include "radio/src/lua/src/ldo.c" +#include "radio/src/lua/src/ldump.c" +#include "radio/src/lua/src/lfunc.c" +#include "radio/src/lua/src/lgc.c" +#include "radio/src/lua/src/llex.c" +#include "radio/src/lua/src/lmem.c" +#include "radio/src/lua/src/lobject.c" +#include "radio/src/lua/src/lopcodes.c" +#include "radio/src/lua/src/lparser.c" +#include "radio/src/lua/src/lstate.c" +#include "radio/src/lua/src/lstring.c" +#include "radio/src/lua/src/ltable.c" +#include "radio/src/lua/src/ltm.c" +#include "radio/src/lua/src/lundump.c" +#include "radio/src/lua/src/lvm.c" +#include "radio/src/lua/src/lzio.c" +#include "radio/src/lua/src/lbaselib.c" +#include "radio/src/lua/src/linit.c" +#include "radio/src/lua/src/lmathlib.c" +#include "radio/src/lua/src/loadlib.c" +#include "radio/src/lua/src/lauxlib.c" +#include "radio/src/lua/src/ltablib.c" +#include "radio/src/lua/src/lcorolib.c" + -int16_t g_anas[NUM_STICKS+BOARD_X9D_NUM_POTS]; +int16_t g_anas[NUM_STICKS+5]; uint16_t anaIn(uint8_t chan) { @@ -141,12 +178,11 @@ void resetTrims() using namespace Open9xX9D; -OpentxTaranisSimulator::OpentxTaranisSimulator(Open9xInterface * open9xInterface): +OpentxTaranisSimulator::OpentxTaranisSimulator(OpenTxInterface * open9xInterface): open9xInterface(open9xInterface) { taranisSimulatorBoard = GetEepromInterface()->getBoard(); - QSettings settings("companion9x", "companion9x"); - QString path=settings.value("sdPath", ".").toString()+"/"; + QString path=g.profile[g.id()].sdPath()+"/"; int i=0; for (i=0; i< std::min(path.length(),1022); i++) { simuSdDirectory[i]=path.at(i).toAscii(); @@ -172,13 +208,19 @@ bool OpentxTaranisSimulator::lcdChanged(bool & lightEnable) #include "simulatorimport.h" } -void OpentxTaranisSimulator::start(RadioData &radioData, bool tests) +void OpentxTaranisSimulator::start(QByteArray & eeprom, bool tests) { - open9xInterface->save(Open9xX9D::eeprom, radioData); + memcpy(Open9xX9D::eeprom, eeprom.data(), std::min(sizeof(Open9xX9D::eeprom), eeprom.size())); StartEepromThread(NULL); StartMainThread(tests); } +void OpentxTaranisSimulator::start(const char * filename, bool tests) +{ + StartEepromThread(filename); + StartMainThread(tests); +} + void OpentxTaranisSimulator::stop() { StopMainThread(); diff --git a/companion/src/firmwares/opentx/opentxTaranisSimulator.h b/companion/src/firmwares/opentx/opentxTaranisSimulator.h index c14f9c16c..bd2da1d2a 100644 --- a/companion/src/firmwares/opentx/opentxTaranisSimulator.h +++ b/companion/src/firmwares/opentx/opentxTaranisSimulator.h @@ -20,15 +20,17 @@ #include "simulatorinterface.h" class RadioData; -class Open9xInterface; +class OpenTxInterface; class OpentxTaranisSimulator : public SimulatorInterface { public: - OpentxTaranisSimulator(Open9xInterface *); + OpentxTaranisSimulator(OpenTxInterface *); - virtual void start(RadioData & radioData, bool tests); + virtual void start(QByteArray & eeprom, bool tests=true); + + virtual void start(const char * filename, bool tests=true); virtual void stop(); @@ -54,7 +56,7 @@ class OpentxTaranisSimulator : public SimulatorInterface { protected: - Open9xInterface * open9xInterface; + OpenTxInterface * open9xInterface; }; #endif diff --git a/companion/src/firmwares/opentx/opentxeeprom.cpp b/companion/src/firmwares/opentx/opentxeeprom.cpp index b723ac0a2..8a9744bc0 100644 --- a/companion/src/firmwares/opentx/opentxeeprom.cpp +++ b/companion/src/firmwares/opentx/opentxeeprom.cpp @@ -11,7 +11,7 @@ #define HAS_PERSISTENT_TIMERS(board) (IS_ARM(board) || board == BOARD_GRUVIN9X) #define HAS_LARGE_LCD(board) IS_TARANIS(board) #define MAX_VIEWS(board) (HAS_LARGE_LCD(board) ? 2 : 256) -#define MAX_POTS(board) (IS_TARANIS(board) ? 4 : 3) +#define MAX_POTS(board, version) (IS_TARANIS(board) ? (version>=216 ? 5 : 4) : 3) #define MAX_SWITCHES(board) (IS_TARANIS(board) ? 8 : 7) #define MAX_SWITCHES_POSITION(board) (IS_TARANIS(board) ? 22 : 9) #define MAX_ROTARY_ENCODERS(board) (board==BOARD_GRUVIN9X ? 2 : (board==BOARD_SKY9X ? 1 : 0)) @@ -20,17 +20,18 @@ #define MAX_CHANNELS(board, version) (IS_ARM(board) ? 32 : 16) #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_CUSTOM_FUNCTIONS(board, version) (IS_ARM(board) ? (version >= 216 ? 64 : 32) : (IS_DBLEEPROM(board, version) ? 24 : 16)) #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 NUM_PPM_INPUTS(board, version) ((IS_ARM(board) && version >= 216) ? 16 : 8) -#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)) +#define IS_AFTER_RELEASE_21_MARCH_2013(board, version) (version >= 214 || (!IS_ARM(board) && version >= 213)) +#define IS_AFTER_RELEASE_23_MARCH_2013(board, version) (version >= 214 || (board==BOARD_STOCK && version >= 213)) inline int switchIndex(int i, BoardEnum board, unsigned int version) { - bool release21March2013 = IS_RELEASE_21_MARCH_2013(board, version); - if (!IS_TARANIS(board) && release21March2013) + bool afterrelease21March2013 = IS_AFTER_RELEASE_21_MARCH_2013(board, version); + if (!IS_TARANIS(board) && afterrelease21March2013) return (i<=3 ? i+3 : (i<=6 ? i-3 : i)); else return i; @@ -42,40 +43,66 @@ class SwitchesConversionTable: public ConversionTable { SwitchesConversionTable(BoardEnum board, unsigned int version, unsigned long flags=0) { int val=0; - - addConversion(RawSwitch(SWITCH_TYPE_NONE), val++); + int offset=0; + if (flags & POPULATE_TIMER_MODES) { + offset = 4; + for (int i=0; i<5; i++) { + addConversion(RawSwitch(SWITCH_TYPE_TIMER_MODE, i), val++); + } + } + else { + addConversion(RawSwitch(SWITCH_TYPE_NONE), val++); + } for (int i=1; i<=MAX_SWITCHES_POSITION(board); i++) { int s = switchIndex(i, board, version); - addConversion(RawSwitch(SWITCH_TYPE_SWITCH, -s), -val); + addConversion(RawSwitch(SWITCH_TYPE_SWITCH, -s), -val+offset); addConversion(RawSwitch(SWITCH_TYPE_SWITCH, s), val++); } + if (IS_TARANIS(board) && version >= 216) { + for (int i=1; i<=3*6; i++) { + addConversion(RawSwitch(SWITCH_TYPE_MULTIPOS_POT, -i), -val+offset); + addConversion(RawSwitch(SWITCH_TYPE_MULTIPOS_POT, i), val++); + } + } + + if (version >= 216) { + for (int i=1; i<=8; i++) { + addConversion(RawSwitch(SWITCH_TYPE_TRIM, -i), -val+offset); + addConversion(RawSwitch(SWITCH_TYPE_TRIM, i), val++); + } + } + + if (version >= 216) { + for (int i=1; i<=MAX_ROTARY_ENCODERS(board); i++) { + addConversion(RawSwitch(SWITCH_TYPE_ROTARY_ENCODER, -i), -val+offset); + addConversion(RawSwitch(SWITCH_TYPE_ROTARY_ENCODER, i), val++); + } + } + for (int i=1; i<=MAX_CUSTOM_SWITCHES(board, version); i++) { - addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, -i), -val); + addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, -i), -val+offset); addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, i), val++); } - addConversion(RawSwitch(SWITCH_TYPE_OFF), -val); + addConversion(RawSwitch(SWITCH_TYPE_OFF), -val+offset); addConversion(RawSwitch(SWITCH_TYPE_ON), val++); - for (int i=1; i<=MAX_SWITCHES_POSITION(board); i++) { - int s = switchIndex(i, board, version); - addConversion(RawSwitch(SWITCH_TYPE_MOMENT_SWITCH, -s), -val); - addConversion(RawSwitch(SWITCH_TYPE_MOMENT_SWITCH, s), val++); - } + if (version < 216) { + // previous "moment" switches + for (int i=1; i<=MAX_SWITCHES_POSITION(board); i++) { + int s = switchIndex(i, board, version); + addConversion(RawSwitch(SWITCH_TYPE_SWITCH, s), val++); + } - for (int i=1; i<=MAX_CUSTOM_SWITCHES(board, version); i++) { - addConversion(RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, -i), -val); - addConversion(RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, i), val++); - } + for (int i=1; i<=MAX_CUSTOM_SWITCHES(board, version); i++) { + addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, i), val++); + } - addConversion(RawSwitch(SWITCH_TYPE_ONM, 1 ), -val); - addConversion(RawSwitch(SWITCH_TYPE_ONM, 0 ), val++); - addConversion(RawSwitch(SWITCH_TYPE_TRN, 0), val++); - addConversion(RawSwitch(SWITCH_TYPE_TRN, 1), val++); - addConversion(RawSwitch(SWITCH_TYPE_REA, 0), val++); - addConversion(RawSwitch(SWITCH_TYPE_REA, 1), val++); + // previous "One" switch + addConversion(RawSwitch(SWITCH_TYPE_ON), val++); + } } protected: @@ -127,7 +154,7 @@ class SourcesConversionTable: public ConversionTable { public: SourcesConversionTable(BoardEnum board, unsigned int version, unsigned int variant, unsigned long flags=0) { - bool release21March2013 = IS_RELEASE_21_MARCH_2013(board, version); + bool afterrelease21March2013 = IS_AFTER_RELEASE_21_MARCH_2013(board, version); int val=0; @@ -138,32 +165,32 @@ class SourcesConversionTable: public ConversionTable { 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 i=0; i<7; 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++) + for (int i=0; i<4+MAX_POTS(board, version); i++) addConversion(RawSource(SOURCE_TYPE_STICK, i), val++); for (int i=0; i= 216 && IS_ARM(board)) { + if (i==TELEMETRY_SOURCE_DTE) + val += 5; + if (i==TELEMETRY_SOURCE_POWER_MAX) + val += 5; + } + } } } @@ -256,59 +291,6 @@ class SourcesConversionTable: public ConversionTable { } }; -class TimerModeConversionTable: public ConversionTable { - - public: - TimerModeConversionTable(BoardEnum board, unsigned int version, unsigned long flags=0) - { - int val=0; - - addConversion(TMRMODE_OFF, val++); - addConversion(TMRMODE_ABS, val++); - addConversion(TMRMODE_THs, val++); - addConversion(TMRMODE_THp, val++); - addConversion(TMRMODE_THt, val++); - - int swCount = MAX_SWITCHES_POSITION(board) + MAX_CUSTOM_SWITCHES(board, version); - - for (int i=0; i > { - public: - TimerModeField(TimerMode & mode, BoardEnum board, unsigned int version, unsigned long flags=0): - ConversionField< SignedField<8> >(_mode, &conversionTable, "TimerMode"), - conversionTable(board, version, flags), - mode(mode), - _mode(0) - { - } - - virtual void beforeExport() - { - _mode = mode; - ConversionField< SignedField<8> >::beforeExport(); - } - - virtual void afterImport() - { - ConversionField< SignedField<8> >::afterImport(); - mode = (TimerMode)_mode; - } - - protected: - TimerModeConversionTable conversionTable; - TimerMode & mode; - int _mode; -}; - template class SwitchField: public ConversionField< SignedField > { public: @@ -336,6 +318,103 @@ class SwitchField: public ConversionField< SignedField > { int _switch; }; +class TelemetrySourcesConversionTable: public ConversionTable { + + public: + TelemetrySourcesConversionTable(BoardEnum board, unsigned int version) + { + int val = 0; + + if (IS_AFTER_RELEASE_21_MARCH_2013(board, version)) { + addConversion(0, val++); + } + + addConversion(1+TELEMETRY_SOURCE_TX_BATT, val++); + addConversion(1+TELEMETRY_SOURCE_TIMER1, val++); + addConversion(1+TELEMETRY_SOURCE_TIMER2, val++); + if (IS_ARM(board) && version >= 216) + addConversion(1+TELEMETRY_SOURCE_SWR, val++); + addConversion(1+TELEMETRY_SOURCE_RSSI_TX, val++); + addConversion(1+TELEMETRY_SOURCE_RSSI_RX, val++); + if (IS_ARM(board) && version >= 216) + addConversion(1+TELEMETRY_SOURCE_RX_BATT, val++); + addConversion(1+TELEMETRY_SOURCE_A1, val++); + addConversion(1+TELEMETRY_SOURCE_A2, val++); + if (IS_ARM(board) && version >= 216) { + addConversion(1+TELEMETRY_SOURCE_A3, val++); + addConversion(1+TELEMETRY_SOURCE_A4, val++); + } + addConversion(1+TELEMETRY_SOURCE_ALT, val++); + addConversion(1+TELEMETRY_SOURCE_RPM, val++); + addConversion(1+TELEMETRY_SOURCE_FUEL, val++); + addConversion(1+TELEMETRY_SOURCE_T1, val++); + addConversion(1+TELEMETRY_SOURCE_T2, val++); + addConversion(1+TELEMETRY_SOURCE_SPEED, val++); + addConversion(1+TELEMETRY_SOURCE_DIST, val++); + addConversion(1+TELEMETRY_SOURCE_GPS_ALT, val++); + addConversion(1+TELEMETRY_SOURCE_CELL, val++); + addConversion(1+TELEMETRY_SOURCE_CELLS_SUM, val++); + addConversion(1+TELEMETRY_SOURCE_VFAS, val++); + addConversion(1+TELEMETRY_SOURCE_CURRENT, val++); + addConversion(1+TELEMETRY_SOURCE_CONSUMPTION, val++); + addConversion(1+TELEMETRY_SOURCE_POWER, val++); + addConversion(1+TELEMETRY_SOURCE_ACCX, val++); + addConversion(1+TELEMETRY_SOURCE_ACCY, val++); + addConversion(1+TELEMETRY_SOURCE_ACCZ, val++); + addConversion(1+TELEMETRY_SOURCE_HDG, val++); + addConversion(1+TELEMETRY_SOURCE_VERTICAL_SPEED, val++); + if (version >= 216) { + addConversion(1+TELEMETRY_SOURCE_ASPD, val++); + addConversion(1+TELEMETRY_SOURCE_DTE, val++); + } + if (IS_ARM(board) && version >= 216) { + for (int i=0; i<5; i++) + addConversion(1+TELEMETRY_SOURCE_RESERVE, val++); + } + addConversion(1+TELEMETRY_SOURCE_A1_MIN, val++); + addConversion(1+TELEMETRY_SOURCE_A2_MIN, val++); + if (IS_ARM(board) && version >= 216) { + addConversion(1+TELEMETRY_SOURCE_A3_MIN, val++); + addConversion(1+TELEMETRY_SOURCE_A4_MIN, val++); + } + addConversion(1+TELEMETRY_SOURCE_ALT_MIN, val++); + addConversion(1+TELEMETRY_SOURCE_ALT_MAX, val++); + addConversion(1+TELEMETRY_SOURCE_RPM_MAX, val++); + addConversion(1+TELEMETRY_SOURCE_T1_MAX, val++); + addConversion(1+TELEMETRY_SOURCE_T2_MAX, val++); + addConversion(1+TELEMETRY_SOURCE_SPEED_MAX, val++); + addConversion(1+TELEMETRY_SOURCE_DIST_MAX, val++); + addConversion(1+TELEMETRY_SOURCE_CELL_MIN, val++); + addConversion(1+TELEMETRY_SOURCE_VFAS_MIN, val++); + addConversion(1+TELEMETRY_SOURCE_POWER_MAX, val++); + if (IS_ARM(board) && version >= 216) { + for (int i=0; i<5; i++) + addConversion(1+TELEMETRY_SOURCE_RESERVE, val++); + } + addConversion(1+TELEMETRY_SOURCE_ACC, val++); + addConversion(1+TELEMETRY_SOURCE_GPS_TIME, val++); + } +}; + +template +class TelemetrySourceField: public ConversionField< UnsignedField > { + public: + TelemetrySourceField(unsigned int & source, BoardEnum board, unsigned int version): + ConversionField< UnsignedField >(source, &conversionTable, "Telemetry source"), + conversionTable(board, version), + source(source), + board(board), + version(version) + { + } + + protected: + TelemetrySourcesConversionTable conversionTable; + unsigned int & source; + BoardEnum board; + unsigned int version; +}; + template class SourceField: public ConversionField< UnsignedField > { public: @@ -425,6 +504,12 @@ class PhaseField: public TransformedField { for (int i=0; i(trimExt[i])); } + else if (board == BOARD_TARANIS && version >= 216) { + for (int i=0; i(phase.trim[i])); + internalField.Append(new UnsignedField<5>(trimMode[i])); + } + } else { for (int i=0; i(trimBase[i])); @@ -459,19 +544,27 @@ class PhaseField: public TransformedField { virtual void beforeExport() { for (int i=0; i= 0) { - trim = 501 + phase.trimRef[i] - (phase.trimRef[i] >= index ? 1 : 0); + if (board == BOARD_TARANIS && version >= 216) { + if (phase.trimMode[i] < 0) + trimMode[i] = TRIM_MODE_NONE; + else + trimMode[i] = 2*phase.trimRef[i] + phase.trimMode[i]; } else { - trim = std::max(-500, std::min(500, phase.trim[i])); - } - if (board == BOARD_STOCK || (board == BOARD_M128 && version >= 215)) { - trimBase[i] = trim >> 2; - trimExt[i] = (trim & 0x03); - } - else { - trimBase[i] = trim; + int trim; + if (phase.trimMode[i] < 0) + trim = 0; + else if (phase.trimRef[i] != index) + trim = 501 + phase.trimRef[i] - (phase.trimRef[i] > index ? 1 : 0); + else + trim = std::max(-500, std::min(500, phase.trim[i])); + if (board == BOARD_STOCK || (board == BOARD_M128 && version >= 215)) { + trimBase[i] = trim >> 2; + trimExt[i] = (trim & 0x03); + } + else { + trimBase[i] = trim; + } } } } @@ -479,21 +572,31 @@ class PhaseField: public TransformedField { virtual void afterImport() { for (int i=0; i= 215)) - trim = ((trimBase[i]) << 2) + (trimExt[i] & 0x03); - else - trim = trimBase[i]; - if (trim > 500) { - phase.trimRef[i] = trim - 501; - if (phase.trimRef[i] >= index) - phase.trimRef[i] += 1; - phase.trim[i] = 0; + if (board == BOARD_TARANIS && version >= 216) { + if (trimMode[i] == TRIM_MODE_NONE) { + phase.trimMode[i] = -1; + } + else { + phase.trimMode[i] = trimMode[i] % 2; + phase.trimRef[i] = trimMode[i] / 2; + } } else { - phase.trim[i] = trim; + int trim; + if (board == BOARD_STOCK || (board == BOARD_M128 && version >= 215)) + trim = ((trimBase[i]) << 2) + (trimExt[i] & 0x03); + else + trim = trimBase[i]; + if (trim > 500) { + phase.trimRef[i] = trim - 501; + if (phase.trimRef[i] >= index) + phase.trimRef[i] += 1; + phase.trim[i] = 0; + } + else { + phase.trim[i] = trim; + } } - } } @@ -506,6 +609,7 @@ class PhaseField: public TransformedField { int rotencCount; int trimBase[NUM_STICKS]; int trimExt[NUM_STICKS]; + unsigned int trimMode[NUM_STICKS]; }; @@ -629,12 +733,13 @@ void importGvarParam(int & gvar, const int _gvar) class MixField: public TransformedField { public: - MixField(MixData & mix, BoardEnum board, unsigned int version): + MixField(MixData & mix, BoardEnum board, unsigned int version, ModelData * model): TransformedField(internalField), internalField("Mix"), mix(mix), board(board), - version(version) + version(version), + model(model) { if (IS_TARANIS(board) && version >= 216) { internalField.Append(new UnsignedField<8>(_destCh)); @@ -692,7 +797,7 @@ class MixField: public TransformedField { internalField.Append(new ZCharField<6>(mix.name)); } } - else if (IS_DBLRAM(board, version) && IS_RELEASE_23_MARCH_2013(board, version)) { + else if (IS_DBLRAM(board, version) && IS_AFTER_RELEASE_23_MARCH_2013(board, version)) { internalField.Append(new UnsignedField<4>(_destCh)); internalField.Append(new BoolField<1>(_curveMode)); internalField.Append(new BoolField<1>(mix.noExpo)); @@ -774,6 +879,14 @@ class MixField: public TransformedField { virtual void afterImport() { + if (IS_TARANIS(board) || version < 216) { + if (mix.srcRaw.type == SOURCE_TYPE_STICK && mix.srcRaw.index < NUM_STICKS) { + if (!mix.noExpo) { + mix.srcRaw = RawSource(SOURCE_TYPE_VIRTUAL_INPUT, mix.srcRaw.index, model); + } + } + } + if (mix.srcRaw.type != SOURCE_TYPE_NONE) { mix.destCh = _destCh + 1; if (!IS_ARM(board) || version < 216) { @@ -804,6 +917,7 @@ class MixField: public TransformedField { MixData & mix; BoardEnum board; unsigned int version; + ModelData * model; unsigned int _destCh; bool _curveMode; int _curveParam; @@ -813,11 +927,11 @@ class MixField: public TransformedField { unsigned int _offsetMode; }; -class ExpoField: public TransformedField { +class InputField: public TransformedField { public: - ExpoField(ExpoData & expo, BoardEnum board, unsigned int version): + InputField(ExpoData & expo, BoardEnum board, unsigned int version): TransformedField(internalField), - internalField("Expo"), + internalField("Input"), expo(expo), board(board), version(version) @@ -836,11 +950,11 @@ class ExpoField: public TransformedField { 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 UnsignedField<8>(expo.mode, "Mode")); + 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)); + internalField.Append(new UnsignedField<16>(expo.phases, "Phases")); + internalField.Append(new SignedField<8>(_weight, "Weight")); internalField.Append(new BoolField<8>(_curveMode)); if (HAS_LARGE_LCD(board)) { internalField.Append(new ZCharField<8>(expo.name)); @@ -851,7 +965,7 @@ class ExpoField: public TransformedField { } internalField.Append(new SignedField<8>(_curveParam)); } - else if (IS_DBLRAM(board, version) && IS_RELEASE_23_MARCH_2013(board, version)) { + else if (IS_DBLRAM(board, version) && IS_AFTER_RELEASE_23_MARCH_2013(board, version)) { internalField.Append(new UnsignedField<2>(expo.mode)); internalField.Append(new UnsignedField<2>(expo.chn)); internalField.Append(new BoolField<1>(_curveMode)); @@ -875,6 +989,7 @@ class ExpoField: public TransformedField { virtual void beforeExport() { _weight = smallGvarToEEPROM(expo.weight); + if (!IS_TARANIS(board) || version < 216) { if (expo.curve.type==CurveReference::CURVE_REF_FUNC && expo.curve.value) { _curveMode = true; @@ -893,7 +1008,14 @@ class ExpoField: public TransformedField { virtual void afterImport() { - expo.weight = smallGvarToC9x(_weight); + if (IS_TARANIS(board) && version < 216) { + if (expo.mode) { + expo.srcRaw = RawSource(SOURCE_TYPE_STICK, expo.chn); + } + } + + expo.weight = smallGvarToC9x(_weight); + if (!IS_TARANIS(board) || version < 216) { if (!_curveMode) expo.curve = CurveReference(CurveReference::CURVE_REF_EXPO, smallGvarToC9x(_curveParam)); @@ -982,7 +1104,7 @@ class CurvesField: public TransformedField { CurveData *curve = &curves[i]; 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"; + EEPROMWarnings += ::QObject::tr("OpenTX only accepts %1 points in all curves").arg(maxPoints) + "\n"; break; } if (!IS_TARANIS(board) || version < 216) { @@ -1019,6 +1141,16 @@ class CurvesField: public TransformedField { } } + if (curve->count > 17) { + qDebug() << "Wrong points count" << curve->count; + curve->count = 0; + for (int j=0; jclear(5); + } + return; + } + for (int j=0; jcount; j++) { curve->points[j].y = *cur++; } @@ -1047,42 +1179,48 @@ class CurvesField: public TransformedField { int _points[C9X_MAX_CURVES*C9X_MAX_POINTS*2]; }; -class CustomSwitchesFunctionsTable: public ConversionTable { +class LogicalSwitchesFunctionsTable: public ConversionTable { public: - CustomSwitchesFunctionsTable(BoardEnum board, unsigned int version) + LogicalSwitchesFunctionsTable(BoardEnum board, unsigned int version) { int val=0; - bool release21March2013 = IS_RELEASE_21_MARCH_2013(board, version); - addConversion(CS_FN_OFF, val++); - if (release21March2013) - addConversion(CS_FN_VEQUAL, val++); - addConversion(CS_FN_VPOS, val++); - addConversion(CS_FN_VNEG, val++); - addConversion(CS_FN_APOS, val++); - addConversion(CS_FN_ANEG, val++); - addConversion(CS_FN_AND, val++); - addConversion(CS_FN_OR, val++); - addConversion(CS_FN_XOR, val++); - addConversion(CS_FN_EQUAL, val++); - if (!release21March2013) - addConversion(CS_FN_NEQUAL, val++); - addConversion(CS_FN_GREATER, val++); - addConversion(CS_FN_LESS, val++); - if (!release21March2013) { - addConversion(CS_FN_EGREATER, val++); - addConversion(CS_FN_ELESS, val++); + bool afterrelease21March2013 = IS_AFTER_RELEASE_21_MARCH_2013(board, version); + addConversion(LS_FN_OFF, val++); + if (IS_ARM(board) && version >= 216) + addConversion(LS_FN_VEQUAL, val++); + if (afterrelease21March2013) + addConversion(LS_FN_VALMOSTEQUAL, val++); + addConversion(LS_FN_VPOS, val++); + addConversion(LS_FN_VNEG, val++); + if (IS_ARM(board) && version >= 216) val++; // later RANGE + addConversion(LS_FN_APOS, val++); + addConversion(LS_FN_ANEG, val++); + addConversion(LS_FN_AND, val++); + addConversion(LS_FN_OR, val++); + addConversion(LS_FN_XOR, val++); + if (IS_ARM(board) && version >= 216) addConversion(LS_FN_STAY, val++); + addConversion(LS_FN_EQUAL, val++); + if (!afterrelease21March2013) + addConversion(LS_FN_NEQUAL, val++); + addConversion(LS_FN_GREATER, val++); + addConversion(LS_FN_LESS, val++); + if (!afterrelease21March2013) { + addConversion(LS_FN_EGREATER, val++); + addConversion(LS_FN_ELESS, val++); } - addConversion(CS_FN_DPOS, val++); - addConversion(CS_FN_DAPOS, val++); - addConversion(CS_FN_TIM, val++); + addConversion(LS_FN_DPOS, val++); + addConversion(LS_FN_DAPOS, val++); + addConversion(LS_FN_TIMER, val++); + if (version >= 216) + addConversion(LS_FN_STICKY, val++); } }; -class CustomSwitchesAndSwitchesConversionTable: public ConversionTable { +class AndSwitchesConversionTable: public ConversionTable { public: - CustomSwitchesAndSwitchesConversionTable(BoardEnum board, unsigned int version) + AndSwitchesConversionTable(BoardEnum board, unsigned int version) { int val=0; addConversion(RawSwitch(SWITCH_TYPE_NONE), val++); @@ -1120,6 +1258,29 @@ class CustomSwitchesAndSwitchesConversionTable: public ConversionTable { } } + static ConversionTable * getInstance(BoardEnum board, unsigned int version) + { + if (IS_ARM(board) && version >= 216) + return new SwitchesConversionTable(board, version); + else + return new AndSwitchesConversionTable(board, version); + +#if 0 + static std::list internalCache; + + for (std::list::iterator it=internalCache.begin(); it!=internalCache.end(); it++) { + Cache element = *it; + if (element.board == board && element.version == version && element.flags == flags) + return element.table; + } + + Cache element(board, version, flags, new SwitchesConversionTable(board, version, flags)); + internalCache.push_back(element); + return element.table; +#endif + } + + protected: void addConversion(const RawSwitch & sw, const int b) @@ -1128,21 +1289,30 @@ class CustomSwitchesAndSwitchesConversionTable: public ConversionTable { } }; -class CustomSwitchField: public TransformedField { +class LogicalSwitchField: public TransformedField { public: - CustomSwitchField(CustomSwData & csw, BoardEnum board, unsigned int version, unsigned int variant): + LogicalSwitchField(LogicalSwitchData & csw, BoardEnum board, unsigned int version, unsigned int variant, ModelData * model=NULL): TransformedField(internalField), - internalField("CustomSwitch"), + internalField("LogicalSwitch"), csw(csw), board(board), version(version), variant(variant), + model(model), functionsConversionTable(board, version), sourcesConversionTable(SourcesConversionTable::getInstance(board, version, variant, (version >= 214 || (!IS_ARM(board) && version >= 213)) ? 0 : FLAG_NOSWITCHES)), switchesConversionTable(SwitchesConversionTable::getInstance(board, version)), - andswitchesConversionTable(board, version) + andswitchesConversionTable(AndSwitchesConversionTable::getInstance(board, version)), + v1(0), + v2(0), + v3(0) { - if (IS_ARM(board) && version >= 215) { + if (IS_ARM(board) && version >= 216) { + internalField.Append(new SignedField<8>(v1)); + internalField.Append(new SignedField<16>(v2)); + internalField.Append(new SignedField<16>(v3)); + } + else if (IS_ARM(board) && version >= 215) { internalField.Append(new SignedField<16>(v1)); internalField.Append(new SignedField<16>(v2)); } @@ -1153,16 +1323,17 @@ class CustomSwitchField: public TransformedField { if (IS_ARM(board)) { internalField.Append(new ConversionField< UnsignedField<8> >(csw.func, &functionsConversionTable, "Function")); - internalField.Append(new UnsignedField<8>(csw.delay)); - internalField.Append(new UnsignedField<8>(csw.duration)); + int scale = (version >= 216 ? 0 : 5); + internalField.Append(new ConversionField< UnsignedField<8> >(csw.delay, 0, scale)); + internalField.Append(new ConversionField< UnsignedField<8> >(csw.duration, 0, scale)); if (version >= 214) { - internalField.Append(new ConversionField< SignedField<8> >((int &)csw.andsw, &andswitchesConversionTable, "AND switch")); + internalField.Append(new ConversionField< SignedField<8> >((int &)csw.andsw, andswitchesConversionTable, "AND switch")); } } else { if (version >= 213) { internalField.Append(new ConversionField< UnsignedField<4> >(csw.func, &functionsConversionTable, "Function")); - internalField.Append(new ConversionField< UnsignedField<4> >(csw.andsw, &andswitchesConversionTable, "AND switch")); + internalField.Append(new ConversionField< UnsignedField<4> >((unsigned int &)csw.andsw, andswitchesConversionTable, "AND switch")); } else { internalField.Append(new ConversionField< UnsignedField<8> >(csw.func, &functionsConversionTable, "Function")); @@ -1172,54 +1343,111 @@ class CustomSwitchField: public TransformedField { virtual void beforeExport() { - v1 = csw.val1; - v2 = csw.val2; - - if ((csw.func >= CS_FN_VPOS && csw.func <= CS_FN_ANEG) || (csw.func >= CS_FN_EQUAL && csw.func!=CS_FN_TIM)) { - sourcesConversionTable->exportValue(csw.val1, v1); + if (csw.func == LS_FN_TIMER) { + v1 = csw.val1; + v2 = csw.val2; } - - if (csw.func >= CS_FN_EQUAL && csw.func <= CS_FN_ELESS) { - sourcesConversionTable->exportValue(csw.val2, v2); + else if (csw.func == LS_FN_STAY) { + switchesConversionTable->exportValue(csw.val1, v1); + v2 = csw.val2; + v3 = csw.val3; } - - if (csw.func >= CS_FN_AND && csw.func <= CS_FN_XOR) { + else if ((csw.func >= LS_FN_AND && csw.func <= LS_FN_XOR) || csw.func == LS_FN_STICKY) { switchesConversionTable->exportValue(csw.val1, v1); switchesConversionTable->exportValue(csw.val2, v2); } + else if (csw.func >= LS_FN_EQUAL && csw.func <= LS_FN_ELESS) { + sourcesConversionTable->exportValue(csw.val1, v1); + sourcesConversionTable->exportValue(csw.val2, v2); + } + else if (csw.func != LS_FN_OFF) { + sourcesConversionTable->exportValue(csw.val1, v1); + v2 = csw.val2; + } } virtual void afterImport() { - csw.val1 = v1; - csw.val2 = v2; - - if ((csw.func >= CS_FN_VPOS && csw.func <= CS_FN_ANEG) || (csw.func >= CS_FN_EQUAL && csw.func!=CS_FN_TIM)) { - sourcesConversionTable->importValue(v1, csw.val1); + if (csw.func == LS_FN_TIMER) { + csw.val1 = v1; + csw.val2 = v2; } - - if (csw.func >= CS_FN_EQUAL && csw.func <= CS_FN_ELESS) { - sourcesConversionTable->importValue(v2, csw.val2); + else if (csw.func == LS_FN_STAY) { + switchesConversionTable->importValue(v1, csw.val1); + csw.val2 = v2; + csw.val3 = v3; } - - if (csw.func >= CS_FN_AND && csw.func <= CS_FN_XOR) { + else if ((csw.func >= LS_FN_AND && csw.func <= LS_FN_XOR) || csw.func == LS_FN_STICKY) { switchesConversionTable->importValue(v1, csw.val1); switchesConversionTable->importValue(v2, csw.val2); } + else if (csw.func >= LS_FN_EQUAL && csw.func <= LS_FN_ELESS) { + sourcesConversionTable->importValue((uint8_t)v1, csw.val1); + sourcesConversionTable->importValue((uint8_t)v2, csw.val2); + } + else if (csw.func != LS_FN_OFF) { + sourcesConversionTable->importValue((uint8_t)v1, csw.val1); + csw.val2 = v2; + RawSource val1(csw.val1, model); + if (IS_ARM(board) && version < 216 && val1.type == SOURCE_TYPE_TELEMETRY) { + switch (val1.index) { + case TELEMETRY_SOURCE_TIMER1: + case TELEMETRY_SOURCE_TIMER2: + csw.val2 = (csw.val2 + 128) * 3; + break; + case TELEMETRY_SOURCE_ALT: + case TELEMETRY_SOURCE_GPS_ALT: + case TELEMETRY_SOURCE_ALT_MIN: + case TELEMETRY_SOURCE_ALT_MAX: + csw.val2 = (csw.val2 + 128) * 8 - 500; + break; + case TELEMETRY_SOURCE_RPM: + case TELEMETRY_SOURCE_RPM_MAX: + csw.val2 = (csw.val2 + 128) * 50; + break; + case TELEMETRY_SOURCE_T1: + case TELEMETRY_SOURCE_T2: + case TELEMETRY_SOURCE_T1_MAX: + case TELEMETRY_SOURCE_T2_MAX: + csw.val2 = (csw.val2 + 128) + 30; + break; + case TELEMETRY_SOURCE_CELL: + case TELEMETRY_SOURCE_HDG: + csw.val2 = (csw.val2 + 128) * 2; + break; + case TELEMETRY_SOURCE_DIST: + case TELEMETRY_SOURCE_DIST_MAX: + csw.val2 = (csw.val2 + 128) * 8; + break; + case TELEMETRY_SOURCE_CURRENT: + case TELEMETRY_SOURCE_POWER: + csw.val2 = (csw.val2 + 128) * 5; + break; + case TELEMETRY_SOURCE_CONSUMPTION: + csw.val2 = (csw.val2 + 128) * 20; + break; + default: + csw.val2 += 128; + break; + } + } + } } protected: StructField internalField; - CustomSwData & csw; + LogicalSwitchData & csw; BoardEnum board; unsigned int version; unsigned int variant; - CustomSwitchesFunctionsTable functionsConversionTable; + ModelData * model; + LogicalSwitchesFunctionsTable functionsConversionTable; SourcesConversionTable * sourcesConversionTable; SwitchesConversionTable * switchesConversionTable; - CustomSwitchesAndSwitchesConversionTable andswitchesConversionTable; + ConversionTable * andswitchesConversionTable; int v1; int v2; + int v3; }; class CustomFunctionsConversionTable: public ConversionTable { @@ -1229,7 +1457,13 @@ class CustomFunctionsConversionTable: public ConversionTable { { int val=0; - if (IS_ARM(board) || version < 213) { + if (version >= 216) { + for (int i=0; i<32; i++) { + addConversion(i, val); + } + val++; + } + else if (IS_ARM(board) || version < 213) { for (int i=0; i<16; i++) { addConversion(val, val); val++; @@ -1241,32 +1475,81 @@ class CustomFunctionsConversionTable: public ConversionTable { } val+=4; } - addConversion(FuncTrainer, val++); - addConversion(FuncTrainerRUD, val++); - addConversion(FuncTrainerELE, val++); - addConversion(FuncTrainerTHR, val++); - addConversion(FuncTrainerAIL, val++); + + if (version >= 216) { + addConversion(FuncTrainer, val); + addConversion(FuncTrainerRUD, val); + addConversion(FuncTrainerELE, val); + addConversion(FuncTrainerTHR, val); + addConversion(FuncTrainerAIL, val); + val++; + } + else { + addConversion(FuncTrainer, val++); + addConversion(FuncTrainerRUD, val++); + addConversion(FuncTrainerELE, val++); + addConversion(FuncTrainerTHR, val++); + addConversion(FuncTrainerAIL, val++); + } + addConversion(FuncInstantTrim, val++); - addConversion(FuncPlaySound, val++); - if (!IS_TARANIS(board)) + + if (version >= 216) { + addConversion(FuncReset, val++); + if (IS_ARM(board)) { + addConversion(FuncSetTimer1, val); + addConversion(FuncSetTimer2, val); + val++; + } + for (int i=0; i= 213 && !IS_ARM(board)) + addConversion(FuncPlayBoth, val++); + addConversion(FuncPlayValue, val++); + if (IS_ARM(board)) { + addConversion(FuncReserve, val++); + addConversion(FuncReserve, val++); + addConversion(FuncReserve, val++); + addConversion(FuncBackgroundMusic, val++); + addConversion(FuncBackgroundMusicPause, val++); + } + addConversion(FuncVario, val++); addConversion(FuncPlayHaptic, val++); - addConversion(FuncReset, val++); - addConversion(FuncVario, val++); - addConversion(FuncPlayPrompt, val++); - if (version >= 213 && !IS_ARM(board)) - addConversion(FuncPlayBoth, val++); - addConversion(FuncPlayValue, val++); - if (board == BOARD_GRUVIN9X || IS_ARM(board) ) - addConversion(FuncLogs, val++); - if (IS_ARM(board)) - addConversion(FuncVolume, val++); - addConversion(FuncBacklight, val++); - if (IS_ARM(board)) { - addConversion(FuncBackgroundMusic, val++); - addConversion(FuncBackgroundMusicPause, val++); + if (board == BOARD_GRUVIN9X || IS_ARM(board) ) + addConversion(FuncLogs, val++); + addConversion(FuncBacklight, val++); + } + else { + addConversion(FuncPlaySound, val++); + if (!IS_TARANIS(board)) + addConversion(FuncPlayHaptic, val++); + addConversion(FuncReset, val++); + addConversion(FuncVario, val++); + addConversion(FuncPlayPrompt, val++); + if (version >= 213 && !IS_ARM(board)) + addConversion(FuncPlayBoth, val++); + addConversion(FuncPlayValue, val++); + if (board == BOARD_GRUVIN9X || IS_ARM(board) ) + addConversion(FuncLogs, val++); + if (IS_ARM(board)) + addConversion(FuncVolume, val++); + addConversion(FuncBacklight, val++); + if (IS_ARM(board)) { + addConversion(FuncBackgroundMusic, val++); + addConversion(FuncBackgroundMusicPause, val++); + } + for (int i=0; i<5; i++) + addConversion(FuncAdjustGV1+i, val++); } - for (int i=0; i<5; i++) - addConversion(FuncAdjustGV1+i, val++); } }; @@ -1284,20 +1567,17 @@ class SwitchesWarningField: public TransformedField { virtual void beforeExport() { - bool release21March2013 = IS_RELEASE_21_MARCH_2013(board, version); - if (release21March2013) { - _sw = (sw & 0xC1) + ((sw & 0x30) >> 3) + ((sw & 0x0E) << 2); - } - else { _sw = sw; - } } virtual void afterImport() { - bool release21March2013 = IS_RELEASE_21_MARCH_2013(board, version); - if (release21March2013) { - sw = (_sw & 0xC1) + ((_sw & 0x38) >> 2) + ((_sw & 0x06) << 3); + bool afterrelease21March2013 = IS_AFTER_RELEASE_21_MARCH_2013(board, version); + if (afterrelease21March2013 && version < 216) { + sw = _sw >> 1; + } + else if (!afterrelease21March2013) { + sw = ((_sw & 0x30) >> 4) + ((_sw & 0x0E) << 1) + ((_sw & 0xC0) >> 1); } else { sw = _sw; @@ -1312,9 +1592,9 @@ class SwitchesWarningField: public TransformedField { unsigned int version; }; -class CustomFunctionField: public TransformedField { +class ArmCustomFunctionField: public TransformedField { public: - CustomFunctionField(FuncSwData & fn, BoardEnum board, unsigned int version, unsigned int variant): + ArmCustomFunctionField(FuncSwData & fn, BoardEnum board, unsigned int version, unsigned int variant): TransformedField(internalField), internalField("CustomFunction"), fn(fn), @@ -1322,201 +1602,336 @@ class CustomFunctionField: public TransformedField { version(version), variant(variant), functionsConversionTable(board, version), - sourcesConversionTable(SourcesConversionTable::getInstance(board, version, variant, FLAG_NONONE)), - _param(0), - _delay(0), - _union_param(0) + sourcesConversionTable(SourcesConversionTable::getInstance(board, version, variant, version >= 216 ? 0 : FLAG_NONONE)), + _active(0) { - memset(_arm_param, 0, sizeof(_arm_param)); + memset(_param, 0, sizeof(_param)); internalField.Append(new SwitchField<8>(fn.swtch, board, version)); - if (IS_ARM(board)) { - internalField.Append(new ConversionField< UnsignedField<8> >((unsigned int &)fn.func, &functionsConversionTable, "Function", ::QObject::tr("OpenTX on this board doesn't accept this function"))); - if (IS_TARANIS(board)) - internalField.Append(new CharField<10>(_arm_param)); - else - internalField.Append(new CharField<6>(_arm_param)); - if (version >= 214) { - internalField.Append(new UnsignedField<2>(_mode)); - internalField.Append(new UnsignedField<6>(_delay)); - } - else { - internalField.Append(new UnsignedField<8>(_delay)); - } - if (version < 214) - internalField.Append(new SpareBitsField<8>()); + internalField.Append(new ConversionField< UnsignedField<8> >((unsigned int &)fn.func, &functionsConversionTable, "Function", ::QObject::tr("OpenTX on this board doesn't accept this function"))); + + if (IS_TARANIS(board) && version >= 216) + internalField.Append(new CharField<8>(_param, false)); + else if (IS_TARANIS(board)) + internalField.Append(new CharField<10>(_param, false)); + else + internalField.Append(new CharField<6>(_param, false)); + + if (version >= 216) { + internalField.Append(new UnsignedField<8>(_active)); + } + else if (version >= 214) { + internalField.Append(new UnsignedField<2>(_mode)); + internalField.Append(new UnsignedField<6>(_active)); } else { - if (version >= 213) { - internalField.Append(new UnsignedField<3>(_union_param)); - internalField.Append(new ConversionField< UnsignedField<5> >((unsigned int &)fn.func, &functionsConversionTable, "Function", ::QObject::tr("OpenTX on this board doesn't accept this function"))); - } - else { - internalField.Append(new ConversionField< UnsignedField<7> >((unsigned int &)fn.func, &functionsConversionTable, "Function", ::QObject::tr("OpenTX on this board doesn't accept this function"))); - internalField.Append(new BoolField<1>((bool &)fn.enabled)); - } - internalField.Append(new UnsignedField<8>(_param)); + internalField.Append(new UnsignedField<8>((unsigned int &)_active)); + internalField.Append(new SpareBitsField<8>()); } } virtual void beforeExport() { - if (IS_ARM(board)) { - _mode = 0; - if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue) - _delay = fn.repeatParam / 5; - else - _delay = (fn.enabled ? 1 : 0); - if (fn.func <= FuncInstantTrim) { - *((uint32_t *)_arm_param) = fn.param; - } - else if (fn.func == FuncPlayPrompt || fn.func == FuncBackgroundMusic) { - memcpy(_arm_param, fn.paramarm, sizeof(_arm_param)); - } - else if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast) { - unsigned int value; - if (version >= 214) { - _mode = fn.adjustMode; - if (fn.adjustMode == 1) - sourcesConversionTable->exportValue(fn.param, (int &)value); - else if (fn.adjustMode == 2) - value = RawSource(fn.param).index; - else - value = fn.param; - } - else { - unsigned int value; - sourcesConversionTable->exportValue(fn.param, (int &)value); - } - *((uint32_t *)_arm_param) = value; - } - else if (fn.func == FuncPlayValue || fn.func == FuncVolume) { - unsigned int value; - sourcesConversionTable->exportValue(fn.param, (int &)value); - *((uint32_t *)_arm_param) = value; + _mode = 0; + + if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue) + _active = (version >= 216 ? fn.repeatParam : (fn.repeatParam/5)); + else + _active = (fn.enabled ? 1 : 0); + + if (fn.func >= FuncSafetyCh1 && fn.func <= FuncSafetyCh32) { + if (version >= 216) { + *((uint16_t *)_param) = fn.param; + *((uint8_t *)(_param+3)) = fn.func - FuncSafetyCh1; } else { - *((uint32_t *)_arm_param) = fn.param; + *((uint32_t *)_param) = fn.param; } } + else if (fn.func >= FuncTrainer && fn.func <= FuncTrainerAIL) { + if (version >= 216) + *((uint8_t *)(_param+3)) = fn.func - FuncTrainer; + } + else if (fn.func >= FuncSetTimer1 && fn.func <= FuncSetTimer2) { + if (version >= 216) { + *((uint16_t *)_param) = fn.param; + *((uint8_t *)(_param+3)) = fn.func - FuncSetTimer1; + } + } + else if (fn.func == FuncPlayPrompt || fn.func == FuncBackgroundMusic) { + memcpy(_param, fn.paramarm, sizeof(_param)); + } + else if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast) { + if (version >= 216) { + *((uint8_t *)(_param+2)) = fn.adjustMode; + *((uint8_t *)(_param+3)) = fn.func - FuncAdjustGV1; + unsigned int value; + if (fn.adjustMode == 1) + sourcesConversionTable->exportValue(fn.param, (int &)value); + else if (fn.adjustMode == 2) + value = RawSource(fn.param).index; + else + value = fn.param; + *((uint16_t *)_param) = value; + } + else if (version >= 214) { + unsigned int value; + _mode = fn.adjustMode; + if (fn.adjustMode == 1) + sourcesConversionTable->exportValue(fn.param, (int &)value); + else if (fn.adjustMode == 2) + value = RawSource(fn.param).index; + else + value = fn.param; + *((uint32_t *)_param) = value; + } + else { + unsigned int value; + sourcesConversionTable->exportValue(fn.param, (int &)value); + *((uint32_t *)_param) = value; + } + } + else if (fn.func == FuncPlayValue || fn.func == FuncVolume) { + unsigned int value; + sourcesConversionTable->exportValue(fn.param, (int &)value); + if (version >= 216) + *((uint16_t *)_param) = value; + else + *((uint32_t *)_param) = value; + } else { - /* the default behavior */ - _param = fn.param; - _union_param = (fn.enabled ? 1 : 0); - if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast) { - if (version >= 213) { - _union_param += (fn.adjustMode << 1); - if (fn.adjustMode == 1) - sourcesConversionTable->exportValue(fn.param, (int &)_param); - else if (fn.adjustMode == 2) - _param = RawSource(fn.param).index; - } - else { - sourcesConversionTable->exportValue(fn.param, (int &)_param); - } - } - else if (fn.func == FuncPlayValue) { - if (version >= 213) { - _union_param = fn.repeatParam / 10; - sourcesConversionTable->exportValue(fn.param, (int &)_param); - } - else { - SourcesConversionTable::getInstance(board, version, variant, FLAG_NONONE|FLAG_NOSWITCHES)->exportValue(fn.param, (int &)_param); - } - } - else if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayBoth) { - if (version >= 213) - _union_param = fn.repeatParam / 10; - } - else if (fn.func <= FuncSafetyCh16) { - if (version >= 213) - _union_param += ((fn.func % 4) << 1); - } + *((uint32_t *)_param) = fn.param; } } virtual void afterImport() { - if (IS_ARM(board)) { - if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue) - fn.repeatParam = _delay * 5; - else - fn.enabled = (_delay & 0x01); + if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue) + fn.repeatParam = (version >= 216 ? _active : (_active*5)); + else + fn.enabled = (_active & 0x01); - unsigned int value = *((uint32_t *)_arm_param); - if (fn.func <= FuncTrainer) { - fn.param = (int)value; - } - else if (fn.func <= FuncInstantTrim) { - fn.param = value; - } - else if (fn.func == FuncPlayPrompt || fn.func == FuncBackgroundMusic) { - memcpy(fn.paramarm, _arm_param, sizeof(fn.paramarm)); - } - else if (fn.func == FuncVolume) { - sourcesConversionTable->importValue(value, (int &)fn.param); - } - else if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast) { - if (version >= 214) { - fn.adjustMode = _mode; - if (fn.adjustMode == 1) - sourcesConversionTable->importValue(value, (int &)fn.param); - else if (fn.adjustMode == 2) - fn.param = RawSource(SOURCE_TYPE_GVAR, value).toValue(); - else - fn.param = value; - } - else { - sourcesConversionTable->importValue(value, (int &)fn.param); - } - } - else if (fn.func == FuncPlayValue) { - if (version >= 213) - sourcesConversionTable->importValue(value, (int &)fn.param); - else - SourcesConversionTable::getInstance(board, version, variant, FLAG_NONONE|FLAG_NOSWITCHES)->importValue(value, (int &)fn.param); - } - else { - fn.param = value; - } + unsigned int value=0, mode=0, index=0; + if (version >= 216) { + value = *((uint16_t *)_param); + mode = *((uint8_t *)(_param+2)); + index = *((uint8_t *)(_param+3)); } else { - fn.param = _param; - if (version >= 213) { - fn.enabled = (_union_param & 0x01); + value = *((uint32_t *)_param); + } + + if (fn.func >= FuncSafetyCh1 && fn.func <= FuncSafetyCh32) { + fn.func = AssignFunc(fn.func + index); + fn.param = (int)value; + } + else if (fn.func >= FuncSetTimer1 && fn.func <= FuncSetTimer2) { + fn.func = AssignFunc(fn.func + index); + fn.param = (int)value; + } + else if (fn.func >= FuncTrainer && fn.func <= FuncTrainerAIL) { + fn.func = AssignFunc(fn.func + index); + fn.param = value; + } + else if (fn.func == FuncPlayPrompt || fn.func == FuncBackgroundMusic) { + memcpy(fn.paramarm, _param, sizeof(fn.paramarm)); + } + else if (fn.func == FuncVolume) { + sourcesConversionTable->importValue(value, (int &)fn.param); + } + else if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast) { + if (version >= 216) { + fn.func = AssignFunc(fn.func + index); + fn.adjustMode = mode; + if (fn.adjustMode == 1) + sourcesConversionTable->importValue(value, (int &)fn.param); + else if (fn.adjustMode == 2) + fn.param = RawSource(SOURCE_TYPE_GVAR, value).toValue(); + else + fn.param = value; } - if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast) { - if (version >= 213) { - fn.adjustMode = ((_union_param >> 1) & 0x03); - if (fn.adjustMode == 1) - sourcesConversionTable->importValue(_param, (int &)fn.param); - else if (fn.adjustMode == 2) - fn.param = RawSource(SOURCE_TYPE_GVAR, _param).toValue(); - } - else { - sourcesConversionTable->importValue(_param, (int &)fn.param); - } + else if (version >= 214) { + fn.adjustMode = _mode; + if (fn.adjustMode == 1) + sourcesConversionTable->importValue(value, (int &)fn.param); + else if (fn.adjustMode == 2) + fn.param = RawSource(SOURCE_TYPE_GVAR, value).toValue(); + else + fn.param = value; } - else if (fn.func == FuncPlayValue) { - if (version >= 213) { - fn.repeatParam = _union_param * 10; - sourcesConversionTable->importValue(_param, (int &)fn.param); - } - else { - SourcesConversionTable::getInstance(board, version, variant, FLAG_NONONE|FLAG_NOSWITCHES)->importValue(_param, (int &)fn.param); - } - } - else if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayBoth) { - if (version >= 213) - fn.repeatParam = _union_param * 10; - } - else if (fn.func <= FuncSafetyCh16) { - if (version >= 213) { - fn.func = AssignFunc(((fn.func >> 2) << 2) + ((_union_param >> 1) & 0x03)); - } - fn.param = (int8_t)fn.param; + else { + sourcesConversionTable->importValue(value, (int &)fn.param); } } + else if (fn.func == FuncPlayValue) { + if (version >= 213) + sourcesConversionTable->importValue(value, (int &)fn.param); + else + SourcesConversionTable::getInstance(board, version, variant, FLAG_NONONE|FLAG_NOSWITCHES)->importValue(value, (int &)fn.param); + } + else { + fn.param = value; + } + } + + protected: + StructField internalField; + FuncSwData & fn; + BoardEnum board; + unsigned int version; + unsigned int variant; + CustomFunctionsConversionTable functionsConversionTable; + SourcesConversionTable * sourcesConversionTable; + char _param[10]; + unsigned int _active; + unsigned int _mode; +}; + +class AvrCustomFunctionField: public TransformedField { + public: + AvrCustomFunctionField(FuncSwData & fn, BoardEnum board, unsigned int version, unsigned int variant): + TransformedField(internalField), + internalField("CustomFunction"), + fn(fn), + board(board), + version(version), + variant(variant), + functionsConversionTable(board, version), + sourcesConversionTable(SourcesConversionTable::getInstance(board, version, variant, version >= 216 ? 0 : FLAG_NONONE)), + _param(0), + _union_param(0), + _active(0) + { + if (version >= 216) { + internalField.Append(new SwitchField<6>(fn.swtch, board, version)); + internalField.Append(new ConversionField< UnsignedField<4> >((unsigned int &)fn.func, &functionsConversionTable, "Function", ::QObject::tr("OpenTX on this board doesn't accept this function"))); + internalField.Append(new UnsignedField<5>(_union_param)); + internalField.Append(new UnsignedField<1>(_active)); + } + if (version >= 213) { + internalField.Append(new SwitchField<8>(fn.swtch, board, version)); + internalField.Append(new UnsignedField<3>(_union_param)); + internalField.Append(new ConversionField< UnsignedField<5> >((unsigned int &)fn.func, &functionsConversionTable, "Function", ::QObject::tr("OpenTX on this board doesn't accept this function"))); + } + else { + internalField.Append(new SwitchField<8>(fn.swtch, board, version)); + internalField.Append(new ConversionField< UnsignedField<7> >((unsigned int &)fn.func, &functionsConversionTable, "Function", ::QObject::tr("OpenTX on this board doesn't accept this function"))); + internalField.Append(new BoolField<1>((bool &)fn.enabled)); + } + internalField.Append(new UnsignedField<8>(_param)); + } + + virtual void beforeExport() + { + _param = fn.param; + _active = (fn.enabled ? 1 : 0); + + if (fn.func >= FuncSafetyCh1 && fn.func <= FuncSafetyCh32) { + if (version >= 216) + _union_param = fn.func - FuncSafetyCh1; + else if (version >= 213) + _active += ((fn.func % 4) << 1); + } + else if (fn.func >= FuncTrainer && fn.func <= FuncTrainerAIL) { + if (version >= 216) + _union_param = fn.func - FuncTrainer; + } + else if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast) { + if (version >= 216) { + _union_param = fn.adjustMode; + _union_param += (fn.func - FuncAdjustGV1) << 2; + if (fn.adjustMode == 1) + sourcesConversionTable->exportValue(fn.param, (int &)_param); + else if (fn.adjustMode == 2) + _param = RawSource(fn.param).index; + } + else if (version >= 213) { + _active += (fn.adjustMode << 1); + if (fn.adjustMode == 1) + sourcesConversionTable->exportValue(fn.param, (int &)_param); + else if (fn.adjustMode == 2) + _param = RawSource(fn.param).index; + } + else { + sourcesConversionTable->exportValue(fn.param, (int &)_param); + } + } + else if (fn.func == FuncPlayValue) { + if (version >= 216) { + _union_param = fn.repeatParam / 10; + sourcesConversionTable->exportValue(fn.param, (int &)_param); + } + else if (version >= 213) { + _active = fn.repeatParam / 10; + sourcesConversionTable->exportValue(fn.param, (int &)_param); + } + else { + SourcesConversionTable::getInstance(board, version, variant, FLAG_NONONE|FLAG_NOSWITCHES)->exportValue(fn.param, (int &)_param); + } + } + else if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayBoth) { + if (version >= 216) { + _union_param = fn.repeatParam / 10; + } + else if (version >= 213) { + _active = fn.repeatParam / 10; + } + } + } + + virtual void afterImport() + { + fn.param = _param; + if (version >= 213) { + fn.enabled = (_active & 0x01); + } + + if (fn.func >= FuncSafetyCh1 && fn.func <= FuncSafetyCh32) { + if (version >= 216) + fn.func = AssignFunc(fn.func + _union_param); + else if (version >= 213) + fn.func = AssignFunc(((fn.func >> 2) << 2) + ((_active >> 1) & 0x03)); + fn.param = (int8_t)fn.param; + } + else if (fn.func >= FuncTrainer && fn.func <= FuncTrainerAIL) { + if (version >= 216) + fn.func = AssignFunc(fn.func + _union_param); + } + else if (fn.func >= FuncAdjustGV1 && fn.func <= FuncAdjustGVLast) { + if (version >= 216) { + fn.func = AssignFunc(fn.func + (_union_param >> 2)); + fn.adjustMode = (_union_param & 0x03); + } + else if (version >= 213) { + fn.adjustMode = ((_active >> 1) & 0x03); + if (fn.adjustMode == 1) + sourcesConversionTable->importValue(_param, (int &)fn.param); + else if (fn.adjustMode == 2) + fn.param = RawSource(SOURCE_TYPE_GVAR, _param).toValue(); + } + else { + sourcesConversionTable->importValue(_param, (int &)fn.param); + } + } + else if (fn.func == FuncPlayValue) { + if (version >= 216) { + fn.repeatParam = _union_param * 10; + sourcesConversionTable->importValue(_param, (int &)fn.param); + } + else if (version >= 213) { + fn.repeatParam = _active * 10; + sourcesConversionTable->importValue(_param, (int &)fn.param); + } + else { + SourcesConversionTable::getInstance(board, version, variant, FLAG_NONONE|FLAG_NOSWITCHES)->importValue(_param, (int &)fn.param); + } + } + else if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayBoth) { + if (version >= 216) + fn.repeatParam = _union_param * 10; + else if (version >= 213) + fn.repeatParam = _active * 10; + } } protected: @@ -1527,11 +1942,10 @@ class CustomFunctionField: public TransformedField { unsigned int variant; CustomFunctionsConversionTable functionsConversionTable; SourcesConversionTable * sourcesConversionTable; - char _arm_param[10]; unsigned int _param; - unsigned int _delay; unsigned int _mode; unsigned int _union_param; + unsigned int _active; }; class FrskyScreenField: public DataField { @@ -1543,15 +1957,15 @@ class FrskyScreenField: public DataField { version(version) { for (int i=0; i<4; i++) { - bars.Append(new UnsignedField<8>(_screen.body.bars[i].source)); - bars.Append(new UnsignedField<8>(_screen.body.bars[i].barMin)); - bars.Append(new UnsignedField<8>(_screen.body.bars[i].barMax)); + bars.Append(new TelemetrySourceField<8>(screen.body.bars[i].source, board, version)); + bars.Append(new UnsignedField<8>(screen.body.bars[i].barMin)); + bars.Append(new UnsignedField<8>(screen.body.bars[i].barMax)); } int columns=(IS_TARANIS(board) ? 3:2); for (int i=0; i<4; i++) { for (int j=0; j(_screen.body.lines[i].source[j])); + numbers.Append(new TelemetrySourceField<8>(screen.body.lines[i].source[j], board, version)); } } if (!IS_TARANIS(board)) { @@ -1563,23 +1977,6 @@ class FrskyScreenField: public DataField { virtual void ExportBits(QBitArray & output) { - _screen = screen; - - bool release21March2013 = IS_RELEASE_21_MARCH_2013(board, version); - if (!release21March2013) { - for (int i=0; i<4; i++) { - if (_screen.body.bars[i].source > 0) - _screen.body.bars[i].source--; - } - int columns=(IS_TARANIS(board) ? 3:2); - for (int i=0; i<4; i++) { - for (int j=0; j 0) - _screen.body.lines[i].source[j]--; - } - } - } - if (screen.type == 0) numbers.ExportBits(output); else @@ -1588,34 +1985,14 @@ class FrskyScreenField: public DataField { virtual void ImportBits(QBitArray & input) { - _screen = screen; - - bool release21March2013 = IS_RELEASE_21_MARCH_2013(board, version); - // NOTA: screen.type should have been imported first! if (screen.type == 0) { numbers.ImportBits(input); - if (!release21March2013) { - int columns=(IS_TARANIS(board) ? 3:2); - for (int i=0; i<4; i++) { - for (int j=0; j 0) - _screen.body.lines[i].source[j]++; - } - } - } } else { bars.ImportBits(input); - if (!release21March2013) { - for (int i=0; i<4; i++) { - if (_screen.body.bars[i].source > 0) - _screen.body.bars[i].source++; - } - } } - screen = _screen; } virtual unsigned int size() @@ -1629,7 +2006,6 @@ class FrskyScreenField: public DataField { protected: FrSkyScreenData & screen; - FrSkyScreenData _screen; BoardEnum board; unsigned int version; StructField bars; @@ -1688,8 +2064,7 @@ class FrskyField: public StructField { Append(new UnsignedField<8>(frsky.usrProto)); if (version >= 216) { Append(new UnsignedField<7>(frsky.voltsSource)); - // TODO altitude displayed - Append(new SpareBitsField<1>()); + Append(new BoolField<1>(frsky.altitudeDisplayed)); } else { Append(new UnsignedField<8>(frsky.voltsSource)); @@ -1718,10 +2093,9 @@ class FrskyField: public StructField { Append(new ConversionField< SignedField<6> >(frsky.rssiAlarms[i].value, -45+i*3)); } if (version >= 216) { - // TODO uint16_t mAhPersistent:1; - // uint16_t storedMah:15; - // int8_t fasOffset; - Append(new SpareBitsField<24>()); + Append(new BoolField<1>(frsky.mAhPersistent)); + Append(new UnsignedField<15>(frsky.storedMah)); + Append(new SignedField<8>(frsky.fasOffset)); } } else { @@ -1784,11 +2158,12 @@ class MavlinkField: public StructField { int exportPpmDelay(int delay) { return (delay - 300) / 50; } int importPpmDelay(int delay) { return 300 + 50 * delay; } -Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, unsigned int version, unsigned int variant): +OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigned int version, unsigned int variant): TransformedField(internalField), internalField("ModelData"), modelData(modelData), board(board), + version(version), variant(variant), protocolsConversionTable(board) { @@ -1799,9 +2174,9 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u else internalField.Append(new ZCharField<10>(modelData.name)); - bool release21March2013 = IS_RELEASE_21_MARCH_2013(board, version); + bool afterrelease21March2013 = IS_AFTER_RELEASE_21_MARCH_2013(board, version); - if (release21March2013) + if (afterrelease21March2013) internalField.Append(new UnsignedField<8>(modelData.modelId)); if (IS_TARANIS(board) && version >= 215) { @@ -1809,18 +2184,18 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u } for (int i=0; i(modelData.timers[i].mode, board, version, POPULATE_TIMER_MODES)); if ((IS_ARM(board) || IS_2560(board)) && version >= 216) { internalField.Append(new UnsignedField<16>(modelData.timers[i].val)); - internalField.Append(new BoolField<2>(modelData.timers[i].countdownBeep)); + 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) { + else if (afterrelease21March2013) { 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)); @@ -1852,11 +2227,15 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u 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) || (IS_ARM(board) && version >= 216)) - internalField.Append(new SpareBitsField<1>()); + internalField.Append(new BoolField<1>(modelData.displayText)); else internalField.Append(new BoolField<1>(modelData.moduleData[0].ppmPulsePol)); @@ -1874,16 +2253,20 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u internalField.Append(new UnsignedField<8>(modelData.beepANACenter)); for (int i=0; i(modelData.thrTraceSrc)); - if (!release21March2013) { + if (!afterrelease21March2013) { internalField.Append(new UnsignedField<8>(modelData.modelId)); } if (IS_TARANIS(board)) - internalField.Append(new UnsignedField<16>(modelData.switchWarningStates)); + internalField.Append(new SwitchesWarningField<16>(modelData.switchWarningStates, board, version)); else internalField.Append(new SwitchesWarningField<8>(modelData.switchWarningStates, board, version)); + if (version >= 216) { + internalField.Append(new UnsignedField<8>(modelData.nSwToWarn)); + } + if ((board == BOARD_STOCK || (board == BOARD_M128 && version >= 215)) && (variant & GVARS_VARIANT)) { for (int i=0; i= 216) { + internalField.Append(new UnsignedField<8>(modelData.nPotsToWarn)); + for (int i=0; i < GetEepromInterface()->getCapability(Pots); i++) { + internalField.Append(new SignedField<8>(modelData.potPosition[i])); + } + } + if (IS_TARANIS(board)) { for (int i=0; i(modelData.curves[i].name)); @@ -1960,45 +2354,78 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u } if (IS_TARANIS(board) && version >= 216) { - // TODO ScriptData scriptsData[MAX_SCRIPTS]; - internalField.Append(new SpareBitsField<720>()); - // TODO char inputNames[MAX_INPUTS][4]; - internalField.Append(new SpareBitsField<1024>()); + for (int i=0; i<7; i++) { + ScriptData & script = modelData.scriptData[i]; + internalField.Append(new ZCharField<10>(script.filename)); + internalField.Append(new ZCharField<10>(script.name)); + for (int j=0; j<10; j++) { + internalField.Append(new SignedField<8>(script.inputs[j])); + } + } + for (int i=0; i<32; i++) { + internalField.Append(new ZCharField<4>(modelData.inputNames[i])); + } + internalField.Append(new UnsignedField<8>(modelData.nPotsToWarn)); + for (int i=0; i < GetEepromInterface()->getCapability(Pots); i++) { + internalField.Append(new SignedField<8>(modelData.potPosition[i])); + } } } -void Open9xModelDataNew::beforeExport() +void OpenTxModelData::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() +void OpenTxModelData::afterImport() { // qDebug() << QString("after import model") << modelData.name ; + if (IS_TARANIS(board) && version < 216) { + for (unsigned int i=0; imode == INPUT_MODE_BOTH && expo->chn == i && expo->phases == 0 && expo->swtch.type == SWITCH_TYPE_NONE) + break; + if (expo->mode == 0 || expo->chn > i) { + ExpoData * newExpo = modelData.insertInput(j); + newExpo->mode = INPUT_MODE_BOTH; + newExpo->srcRaw = RawSource(SOURCE_TYPE_STICK, i); + newExpo->chn = i; + newExpo->weight = 100; + break; + } + } + strncpy(modelData.inputNames[i], AnalogString(i).toLatin1().constData(), sizeof(modelData.inputNames[i])-1); + } + } + 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; } } } -Open9xGeneralDataNew::Open9xGeneralDataNew(GeneralSettings & generalData, BoardEnum board, unsigned int version, unsigned int variant): +OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum board, unsigned int version, unsigned int variant): TransformedField(internalField), internalField("General Settings"), generalData(generalData), board(board), - inputsCount(IS_TARANIS(board) ? 8 : 7) + version(version), + inputsCount(4 + MAX_POTS(board, version)) { generalData.version = version; generalData.variant = variant; @@ -2007,12 +2434,21 @@ Open9xGeneralDataNew::Open9xGeneralDataNew(GeneralSettings & generalData, BoardE if (version >= 213 || (!IS_ARM(board) && version >= 212)) internalField.Append(new UnsignedField<16>(generalData.variant)); - for (int i=0; i(generalData.calibMid[i])); - for (int i=0; i(generalData.calibSpanNeg[i])); - for (int i=0; i(generalData.calibSpanPos[i])); + if (version >= 216) { + for (int i=0; i(generalData.calibMid[i])); + internalField.Append(new SignedField<16>(generalData.calibSpanNeg[i])); + internalField.Append(new SignedField<16>(generalData.calibSpanPos[i])); + } + } + else { + for (int i=0; i(generalData.calibMid[i])); + for (int i=0; i(generalData.calibSpanNeg[i])); + for (int i=0; i(generalData.calibSpanPos[i])); + } internalField.Append(new UnsignedField<16>(chkSum)); internalField.Append(new UnsignedField<8>(generalData.currModel)); @@ -2043,7 +2479,7 @@ 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 { @@ -2104,21 +2540,45 @@ Open9xGeneralDataNew::Open9xGeneralDataNew(GeneralSettings & generalData, BoardE internalField.Append(new SignedField<8>(generalData.beepVolume)); internalField.Append(new SignedField<8>(generalData.wavVolume)); internalField.Append(new SignedField<8>(generalData.varioVolume)); + if (version >= 216) { + internalField.Append(new SignedField<8>(generalData.varioPitch)); + internalField.Append(new SignedField<8>(generalData.varioRange)); + internalField.Append(new SignedField<8>(generalData.varioRepeat)); + } internalField.Append(new SignedField<8>(generalData.backgroundVolume)); } + if (IS_TARANIS(board) && version >= 216) { + internalField.Append(new UnsignedField<8>(generalData.hw_uartMode)); + for (int i=0; i<8; i++) { + internalField.Append(new UnsignedField<1>(generalData.potsType[i])); + } + } } } -void Open9xGeneralDataNew::beforeExport() +void OpenTxGeneralData::beforeExport() { uint16_t sum = 0; - for (int i=0; i= 216) { + int count = 0; + for (int i=0; i -bool Open9xInterface::loadModel(ModelData &model, uint8_t *data, int index, unsigned int stickMode) +bool OpenTxInterface::loadModel(ModelData &model, uint8_t *data, int index, unsigned int stickMode) { T _model; @@ -143,7 +140,7 @@ bool Open9xInterface::loadModel(ModelData &model, uint8_t *data, int index, unsi } template -bool Open9xInterface::loadModelVariant(unsigned int index, ModelData &model, uint8_t *data, unsigned int version, unsigned int variant) +bool OpenTxInterface::loadModelVariant(unsigned int index, ModelData &model, uint8_t *data, unsigned int version, unsigned int variant) { T open9xModel(model, board, version, variant); @@ -170,7 +167,7 @@ bool Open9xInterface::loadModelVariant(unsigned int index, ModelData &model, uin return true; } -bool Open9xInterface::loadModel(uint8_t version, ModelData &model, uint8_t *data, int index, unsigned int variant, unsigned int stickMode) +bool OpenTxInterface::loadModel(uint8_t version, ModelData &model, uint8_t *data, int index, unsigned int variant, unsigned int stickMode) { if (version == 201) { return loadModel(model, data, index, stickMode); @@ -239,11 +236,11 @@ bool Open9xInterface::loadModel(uint8_t version, ModelData &model, uint8_t *data return loadModel(model, data, index); } else { - return loadModelVariant(index, model, data, version, variant); + return loadModelVariant(index, model, data, version, variant); } } else if (version >= 213) { - return loadModelVariant(index, model, data, version, variant); + return loadModelVariant(index, model, data, version, variant); } std::cout << " ko\n"; @@ -251,7 +248,7 @@ bool Open9xInterface::loadModel(uint8_t version, ModelData &model, uint8_t *data } template -bool Open9xInterface::loadGeneral(GeneralSettings &settings, unsigned int version) +bool OpenTxInterface::loadGeneral(GeneralSettings &settings, unsigned int version) { QByteArray eepromData(sizeof(settings), 0); // GeneralSettings should be always bigger than the EEPROM struct T open9xSettings(settings, board, version); @@ -267,7 +264,7 @@ bool Open9xInterface::loadGeneral(GeneralSettings &settings, unsigned int versio } template -bool Open9xInterface::saveGeneral(GeneralSettings &settings, BoardEnum board, uint32_t version, uint32_t variant) +bool OpenTxInterface::saveGeneral(GeneralSettings &settings, BoardEnum board, uint32_t version, uint32_t variant) { T open9xSettings(settings, board, version, variant); // open9xSettings.Dump(); @@ -278,7 +275,7 @@ bool Open9xInterface::saveGeneral(GeneralSettings &settings, BoardEnum board, ui } template -bool Open9xInterface::saveModel(unsigned int index, ModelData &model, unsigned int version, unsigned int variant) +bool OpenTxInterface::saveModel(unsigned int index, ModelData &model, unsigned int version, unsigned int variant) { T open9xModel(model, board, version, variant); // open9xModel.Dump(); @@ -288,12 +285,12 @@ bool Open9xInterface::saveModel(unsigned int index, ModelData &model, unsigned i return (sz == eeprom.size()); } -bool Open9xInterface::loadxml(RadioData &radioData, QDomDocument &doc) +bool OpenTxInterface::loadxml(RadioData &radioData, QDomDocument &doc) { return false; } -bool Open9xInterface::load(RadioData &radioData, uint8_t *eeprom, int size) +bool OpenTxInterface::load(RadioData &radioData, const uint8_t *eeprom, int size) { std::cout << "trying " << getName() << " import..."; @@ -308,8 +305,9 @@ bool Open9xInterface::load(RadioData &radioData, uint8_t *eeprom, int size) if (notnull) { 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")); + } + else { + 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 { @@ -318,7 +316,7 @@ bool Open9xInterface::load(RadioData &radioData, uint8_t *eeprom, int size) } } - if (!efile->EeFsOpen(eeprom, size, board)) { + if (!efile->EeFsOpen((uint8_t *)eeprom, size, board)) { std::cout << " wrong file system\n"; return false; } @@ -338,7 +336,7 @@ bool Open9xInterface::load(RadioData &radioData, uint8_t *eeprom, int size) return false; } - if (!loadGeneral(radioData.generalSettings, version)) { + if (!loadGeneral(radioData.generalSettings, version)) { std::cout << " ko\n"; return false; } @@ -354,7 +352,7 @@ bool Open9xInterface::load(RadioData &radioData, uint8_t *eeprom, int size) return true; } -int Open9xInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t variant, uint8_t version) +int OpenTxInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t variant, uint8_t version) { EEPROMWarnings.clear(); @@ -385,14 +383,14 @@ int Open9xInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t varian variant |= M128_VARIANT; } - int result = saveGeneral(radioData.generalSettings, board, version, variant); + int result = saveGeneral(radioData.generalSettings, board, version, variant); if (!result) { return 0; } for (int i=0; i(i, radioData.models[i], version, variant); + result = saveModel(i, radioData.models[i], version, variant); if (!result) { return 0; } @@ -407,7 +405,7 @@ int Open9xInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t varian return size; } -int Open9xInterface::getSize(ModelData &model) +int OpenTxInterface::getSize(ModelData &model) { if (board == BOARD_SKY9X) return 0; @@ -419,7 +417,7 @@ int Open9xInterface::getSize(ModelData &model) uint8_t tmp[EESIZE_RLC_MAX]; efile->EeFsCreate(tmp, EESIZE_RLC_MAX, board); - Open9xModelDataNew open9xModel(model, board, 255, GetCurrentFirmwareVariant()); + OpenTxModelData open9xModel(model, board, 255, GetCurrentFirmwareVariant()); QByteArray eeprom; open9xModel.Export(eeprom); @@ -430,7 +428,7 @@ int Open9xInterface::getSize(ModelData &model) return efile->size(0); } -int Open9xInterface::getSize(GeneralSettings &settings) +int OpenTxInterface::getSize(GeneralSettings &settings) { if (board == BOARD_SKY9X) return 0; @@ -438,7 +436,7 @@ int Open9xInterface::getSize(GeneralSettings &settings) uint8_t tmp[EESIZE_RLC_MAX]; efile->EeFsCreate(tmp, EESIZE_RLC_MAX, board); - Open9xGeneralDataNew open9xGeneral(settings, board, 255, GetCurrentFirmwareVariant()); + OpenTxGeneralData open9xGeneral(settings, board, 255, GetCurrentFirmwareVariant()); // open9xGeneral.Dump(); QByteArray eeprom; @@ -450,7 +448,7 @@ int Open9xInterface::getSize(GeneralSettings &settings) return efile->size(0); } -int Open9xInterface::getCapability(const Capability capability) +int OpenTxInterface::getCapability(const Capability capability) { switch (capability) { case OwnerName: @@ -460,11 +458,6 @@ int Open9xInterface::getCapability(const Capability capability) return 1; else return 0; - case SimulatorType: - if (IS_TARANIS(board)) - return 1; - else - return 0; case HasBeeper: if (IS_ARM(board)) return 0; @@ -517,24 +510,20 @@ 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); + return (IS_TARANIS(board) ? 5 : 3); case Switches: return (IS_TARANIS(board) ? 8 : 7); case SwitchesPositions: return (IS_TARANIS(board) ? 22 : 9); case CustomFunctions: if (IS_ARM(board)) - return 32; + return 64; else if (board==BOARD_GRUVIN9X||board==BOARD_M128) return 24; else return 16; - case CustomSwitches: + case LogicalSwitches: if (IS_ARM(board)) return 32; else if (board==BOARD_GRUVIN9X||board==BOARD_M128) @@ -543,10 +532,10 @@ int Open9xInterface::getCapability(const Capability capability) return 12; case CustomAndSwitches: if (IS_ARM(board)) - return getCapability(CustomSwitches); + return getCapability(LogicalSwitches); else return 15/*4bits*/-9/*sw positions*/; - case CustomSwitchesExt: + case LogicalSwitchesExt: return (IS_ARM(board) ? true : false); case RotaryEncoders: if (board == BOARD_GRUVIN9X) @@ -562,7 +551,7 @@ int Open9xInterface::getCapability(const Capability capability) case VoicesAsNumbers: return (IS_ARM(board) ? 0 : 1); case VoicesMaxLength: - return (IS_ARM(board) ? (IS_TARANIS(board) ? 10 : 6) : 0); + return (IS_ARM(board) ? (IS_TARANIS(board) ? 8 : 6) : 0); case MultiLangVoice: return (IS_ARM(board) ? 1 : 0); case SoundPitch: @@ -598,14 +587,10 @@ int Open9xInterface::getCapability(const Capability capability) return 1; case ExtendedTrims: return 500; - case ExtraTrims: - return 1; case Simulation: return 1; case DSM2Indexes: return 1; - case FSSwitch: - return 1; case MixesWithoutExpo: return 1; case NumCurves: @@ -622,24 +607,12 @@ int Open9xInterface::getCapability(const Capability capability) 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: @@ -695,18 +668,37 @@ int Open9xInterface::getCapability(const Capability capability) return (IS_TARANIS(board) ? 212 : 128) ; case GetThrSwitch: return (IS_TARANIS(board) ? DSW_SF1 : DSW_THR) ; + case HasDisplayText: case VirtualInputs: + return IS_TARANIS(board) ? 32 : 0; + case TrainerInputs: + return IS_ARM(board) ? 16 : 8; 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); + case MultiposPots: + return IS_TARANIS(board) ? 3 : 0; + case MultiposPotsPositions: + return IS_TARANIS(board) ? 6 : 0; + case SimulatorVariant: + if (board == BOARD_STOCK) + return SIMU_STOCK_VARIANTS; + else if (board == BOARD_M128) + return SIMU_M128_VARIANTS; + else + return 0; default: return 0; } } -int Open9xInterface::isAvailable(Protocol proto, int port) +int OpenTxInterface::isAvailable(Protocol proto, int port) { if (IS_TARANIS(board)) { switch (port) { @@ -791,7 +783,7 @@ int Open9xInterface::isAvailable(Protocol proto, int port) } } -SimulatorInterface * Open9xInterface::getSimulator() +SimulatorInterface * OpenTxInterface::getSimulator() { switch (board) { case BOARD_STOCK: @@ -803,7 +795,6 @@ SimulatorInterface * Open9xInterface::getSimulator() case BOARD_SKY9X: return new Open9xSky9xSimulator(this); case BOARD_TARANIS: - return new OpentxTaranisSimulator(this); case BOARD_TARANIS_REV4a: return new OpentxTaranisSimulator(this); default: @@ -816,7 +807,7 @@ size_t getSizeA(T (&)[SIZE]) { return SIZE; } -bool Open9xInterface::checkVersion(unsigned int version) +bool OpenTxInterface::checkVersion(unsigned int version) { switch(version) { case 201: @@ -882,7 +873,7 @@ bool Open9xInterface::checkVersion(unsigned int version) return true; } -bool Open9xInterface::checkVariant(unsigned int version, unsigned int variant) +bool OpenTxInterface::checkVariant(unsigned int version, unsigned int variant) { if (board == BOARD_M128 && !(variant & 0x8000)) { if (version == 212) { @@ -904,7 +895,7 @@ bool Open9xInterface::checkVariant(unsigned int version, unsigned int variant) } } -bool Open9xInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index) +bool OpenTxInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esize, int index) { std::cout << "trying " << getName() << " backup import..."; @@ -947,14 +938,11 @@ 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)); + QString url = g.compileServer(); + if (url.isEmpty()){ + url= OPENTX_FIRMWARE_DOWNLOADS; + g.compileServer(url); + } switch(board) { case BOARD_STOCK: case BOARD_M128: @@ -975,27 +963,24 @@ 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-"); + QString url = g.compileServer(); + if (url.isEmpty()){ + url= OPENTX_FIRMWARE_DOWNLOADS; + g.compileServer(url); + } + 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: @@ -1010,16 +995,13 @@ 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) { + QString url = g.compileServer(); + if (url.isEmpty()){ + url= OPENTX_FIRMWARE_DOWNLOADS; + g.compileServer(url); + } + url.append("/releasenotes-"); + switch(board) { case BOARD_STOCK: case BOARD_M128: case BOARD_GRUVIN9X: @@ -1046,7 +1028,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 OpenTxInterface(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")); @@ -1078,11 +1060,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 OpenTxInterface(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")); @@ -1114,7 +1097,7 @@ void RegisterOpen9xFirmwares() firmwares.push_back(open9x); /* 9XR board */ - open9x = new Open9xFirmware("opentx-9xr", QObject::tr("openTx for 9XR"), new Open9xInterface(BOARD_STOCK), geturl(BOARD_STOCK), getstamp(BOARD_STOCK),getrnurl(BOARD_STOCK), false); + open9x = new Open9xFirmware("opentx-9xr", QObject::tr("OpenTX for 9XR"), new OpenTxInterface(BOARD_STOCK), geturl(BOARD_STOCK), getstamp(BOARD_STOCK),getrnurl(BOARD_STOCK), false); open9x->addOptions(extr_options); open9x->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support")); open9x->addOption("templates", QObject::tr("Enable TEMPLATES menu")); @@ -1148,7 +1131,7 @@ void RegisterOpen9xFirmwares() firmwares.push_back(open9x); /* 9XR board with M128 chip */ - open9x = new Open9xFirmware("opentx-9xr128", QObject::tr("openTx for 9XR with M128 chip"), new Open9xInterface(BOARD_M128), geturl(BOARD_M128), getstamp(BOARD_M128),getrnurl(BOARD_M128), false); + open9x = new Open9xFirmware("opentx-9xr128", QObject::tr("OpenTX for 9XR with M128 chip"), new OpenTxInterface(BOARD_M128), geturl(BOARD_M128), getstamp(BOARD_M128),getrnurl(BOARD_M128), false); open9x->addOptions(extr_options); open9x->addOption("heli", QObject::tr("Enable heli menu and cyclic mix support")); open9x->addOption("templates", QObject::tr("Enable TEMPLATES menu")); @@ -1178,7 +1161,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 OpenTxInterface(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")); @@ -1208,7 +1191,7 @@ void RegisterOpen9xFirmwares() #ifndef __APPLE__ /* SKY9X board */ - open9x = new Open9xFirmware("opentx-sky9x", QObject::tr("openTx for Sky9x board / 9X"), new Open9xInterface(BOARD_SKY9X), geturl(BOARD_SKY9X), getstamp(BOARD_SKY9X),getrnurl(BOARD_SKY9X), true); + open9x = new Open9xFirmware("opentx-sky9x", QObject::tr("OpenTX for Sky9x board / 9X"), new OpenTxInterface(BOARD_SKY9X), geturl(BOARD_SKY9X), getstamp(BOARD_SKY9X),getrnurl(BOARD_SKY9X), true); open9x->setVariantBase(FRSKY_VARIANT); open9x->addOption("heli", QObject::tr("Enable HELI menu and cyclic mix support")); open9x->addOption("templates", QObject::tr("Enable TEMPLATES menu")); @@ -1233,7 +1216,7 @@ void RegisterOpen9xFirmwares() #endif /* Taranis board */ - open9x = new Open9xFirmware("opentx-taranis", QObject::tr("openTx for FrSky Taranis"), new Open9xInterface(BOARD_TARANIS), geturl(BOARD_TARANIS), getstamp(BOARD_TARANIS),getrnurl(BOARD_TARANIS), true); + open9x = new Open9xFirmware("opentx-taranis", QObject::tr("OpenTX for FrSky Taranis"), new OpenTxInterface(BOARD_TARANIS), geturl(BOARD_TARANIS), getstamp(BOARD_TARANIS),getrnurl(BOARD_TARANIS), true); open9x->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support")); open9x->addOption("notemplates", QObject::tr("Disable TEMPLATES menu")); open9x->addOption("nogvars", QObject::tr("Disable Global variables")); @@ -1242,10 +1225,8 @@ void RegisterOpen9xFirmwares() open9x->addOptions(fai_options); firmwares.push_back(open9x); - QSettings settings("companion9x", "companion9x"); - 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); + if (g.rev4aSupport()) { + open9x = new Open9xFirmware("opentx-taranisrev4a", QObject::tr("OpenTX for FrSky Taranis Rev4a"), new OpenTxInterface(BOARD_TARANIS_REV4a), geturl(BOARD_TARANIS_REV4a), getstamp(BOARD_TARANIS_REV4a),getrnurl(BOARD_TARANIS), true); open9x->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support")); open9x->addOption("notemplates", QObject::tr("Disable TEMPLATES menu")); open9x->addOption("nogvars", QObject::tr("Disable Global variables")); diff --git a/companion/src/firmwares/opentx/opentxinterface.h b/companion/src/firmwares/opentx/opentxinterface.h index 82e8c7671..809b9f926 100644 --- a/companion/src/firmwares/opentx/opentxinterface.h +++ b/companion/src/firmwares/opentx/opentxinterface.h @@ -18,15 +18,18 @@ #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 +class OpenTxInterface : public EEPROMInterface { public: - Open9xInterface(BoardEnum board); + OpenTxInterface(BoardEnum board); - virtual ~Open9xInterface(); + virtual ~OpenTxInterface(); virtual const char * getName(); @@ -34,7 +37,7 @@ class Open9xInterface : public EEPROMInterface virtual const int getMaxModels(); - virtual bool load(RadioData &, uint8_t *eeprom, int size); + virtual bool load(RadioData &, const uint8_t *eeprom, int size); virtual bool loadBackup(RadioData &, uint8_t *eeprom, int esize, int index); @@ -91,6 +94,7 @@ class Open9xFirmware: public FirmwareInfo { addLanguage("se"); addLanguage("cz"); addLanguage("es"); + addLanguage("pl"); addLanguage("pt"); addTTSLanguage("en"); @@ -100,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/opentxsimulator.cpp b/companion/src/firmwares/opentx/opentxsimulator.cpp index 9037afa86..dfb7025ea 100644 --- a/companion/src/firmwares/opentx/opentxsimulator.cpp +++ b/companion/src/firmwares/opentx/opentxsimulator.cpp @@ -107,7 +107,7 @@ uint8_t getStickMode() using namespace Open9x; -Open9xSimulator::Open9xSimulator(Open9xInterface * open9xInterface): +Open9xSimulator::Open9xSimulator(OpenTxInterface * open9xInterface): open9xInterface(open9xInterface) { #define INIT_IMPORT @@ -132,13 +132,20 @@ bool Open9xSimulator::lcdChanged(bool & lightEnable) #include "simulatorimport.h" } -void Open9xSimulator::start(RadioData &radioData, bool tests) +void Open9xSimulator::start(QByteArray & eeprom, bool tests) { - open9xInterface->save(&Open9x::eeprom[0], radioData, SIMU_STOCK_VARIANTS); + memcpy(&Open9x::eeprom[0], eeprom.data(), 2048); StartEepromThread(NULL); StartMainThread(tests); } +void Open9xSimulator::start(const char * filename, bool tests) +{ + // open9xInterface->save(&Open9x::eeprom[0], radioData, SIMU_STOCK_VARIANTS); + StartEepromThread(filename); + StartMainThread(tests); +} + void Open9xSimulator::stop() { StopMainThread(); diff --git a/companion/src/firmwares/opentx/opentxsimulator.h b/companion/src/firmwares/opentx/opentxsimulator.h index 84970eb1f..a4e24b3ba 100644 --- a/companion/src/firmwares/opentx/opentxsimulator.h +++ b/companion/src/firmwares/opentx/opentxsimulator.h @@ -19,15 +19,17 @@ #include "simulatorinterface.h" -class Open9xInterface; +class OpenTxInterface; class Open9xSimulator : public SimulatorInterface { public: - Open9xSimulator(Open9xInterface *); + Open9xSimulator(OpenTxInterface *); - virtual void start(RadioData &radioData, bool tests); + virtual void start(QByteArray & eeprom, bool tests=true); + + virtual void start(const char * filename, bool tests=true); virtual void stop(); @@ -53,7 +55,7 @@ class Open9xSimulator : public SimulatorInterface { protected: - Open9xInterface * open9xInterface; + OpenTxInterface * open9xInterface; }; 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 8df98e04b..daafb48b2 100644 --- a/companion/src/firmwares/th9x/th9xeeprom.cpp +++ b/companion/src/firmwares/th9x/th9xeeprom.cpp @@ -2,18 +2,6 @@ #include "helpers.h" #include "th9xeeprom.h" -int8_t th9xFromSwitch(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; - } -} - RawSwitch th9xToSwitch(int8_t sw) { if (sw == 0) @@ -181,22 +169,22 @@ t_Th9xMixData::operator MixData () return c9x; } -t_Th9xCustomSwData::operator CustomSwData () +t_Th9xLogicalSwitchData::operator LogicalSwitchData () { - CustomSwData c9x; + LogicalSwitchData c9x; c9x.func = opCmp; c9x.val1 = val1; c9x.val2 = val2; - if ((c9x.func >= CS_FN_VPOS && c9x.func <= CS_FN_ANEG) || c9x.func >= CS_FN_EQUAL) { + if ((c9x.func >= LS_FN_VPOS && c9x.func <= LS_FN_ANEG) || c9x.func >= LS_FN_EQUAL) { c9x.val1 = toSource(val1).toValue(); } - if (c9x.func >= CS_FN_EQUAL) { + if (c9x.func >= LS_FN_EQUAL) { c9x.val2 = toSource(val2).toValue(); } - if (c9x.func >= CS_FN_AND && c9x.func <= CS_FN_XOR) { + if (c9x.func >= LS_FN_AND && c9x.func <= LS_FN_XOR) { c9x.val1 = th9xToSwitch(val1).toValue(); c9x.val2 = th9xToSwitch(val2).toValue(); } @@ -204,7 +192,7 @@ t_Th9xCustomSwData::operator CustomSwData () return c9x; } -int8_t t_Th9xCustomSwData::fromSource(RawSource source) +int8_t t_Th9xLogicalSwitchData::fromSource(RawSource source) { int v1 = 0; if (source.type == SOURCE_TYPE_STICK) @@ -228,7 +216,7 @@ int8_t t_Th9xCustomSwData::fromSource(RawSource source) return v1; } -RawSource t_Th9xCustomSwData::toSource(int8_t value) +RawSource t_Th9xLogicalSwitchData::toSource(int8_t value) { if (value == 0) { return RawSource(SOURCE_TYPE_NONE); @@ -266,7 +254,7 @@ t_Th9xModelData::operator ModelData () ModelData c9x; c9x.used = true; getEEPROMString(c9x.name, name, sizeof(name)); - switch(tmrMode) { + /*switch(tmrMode) { case 1: c9x.timers[0].mode = TMRMODE_ABS; break; @@ -279,7 +267,7 @@ t_Th9xModelData::operator ModelData () default: c9x.timers[0].mode = TMRMODE_OFF; break; - } + }*/ // c9x.timers[0].dir = tmrDir; c9x.timers[0].val = tmrVal; /*c9x.protocol = (Protocol)protocol; diff --git a/companion/src/firmwares/th9x/th9xeeprom.h b/companion/src/firmwares/th9x/th9xeeprom.h index 294a33a0c..467b09c68 100644 --- a/companion/src/firmwares/th9x/th9xeeprom.h +++ b/companion/src/firmwares/th9x/th9xeeprom.h @@ -138,18 +138,18 @@ PACK(typedef struct t_Th9xMixData { t_Th9xMixData(); }) Th9xMixData; -PACK(typedef struct t_Th9xCustomSwData { +PACK(typedef struct t_Th9xLogicalSwitchData { uint8_t sw:3; // 0..7 uint8_t opCmp:2; // < & | ^ uint8_t opRes:3; // 0 => 1=> 0=> !=> & | ^ int8_t val1; int8_t val2; - operator CustomSwData(); - t_Th9xCustomSwData() { memset(this, 0, sizeof(t_Th9xCustomSwData)); } + operator LogicalSwitchData(); + t_Th9xLogicalSwitchData() { memset(this, 0, sizeof(t_Th9xLogicalSwitchData)); } int8_t fromSource(RawSource source); RawSource toSource(int8_t value); -}) Th9xCustomSwData; +}) Th9xLogicalSwitchData; PACK(typedef struct t_Th9xTrimData { int8_t itrim:6; //trim index @@ -173,7 +173,7 @@ PACK(typedef struct t_Th9xModelData { int8_t curves3[TH9X_MAX_CURVES3][3]; // 9 new143 int8_t curves5[TH9X_MAX_CURVES5][5]; // 10 int8_t curves9[TH9X_MAX_CURVES9][9]; // 18 - Th9xCustomSwData switchTab[TH9X_MAX_SWITCHES];// + Th9xLogicalSwitchData switchTab[TH9X_MAX_SWITCHES];// Th9xTrimData trimData[NUM_STICKS]; // 3*4 -> 1*4 operator ModelData(); t_Th9xModelData(); diff --git a/companion/src/firmwares/th9x/th9xinterface.cpp b/companion/src/firmwares/th9x/th9xinterface.cpp index d86065ddb..8e1b50866 100644 --- a/companion/src/firmwares/th9x/th9xinterface.cpp +++ b/companion/src/firmwares/th9x/th9xinterface.cpp @@ -19,6 +19,7 @@ #include "th9xeeprom.h" #include "th9xsimulator.h" #include "file.h" +#include "appdata.h" #define FILE_TYP_GENERAL 1 #define FILE_TYP_MODEL 2 @@ -44,8 +45,7 @@ const char * Th9xInterface::getName() const int Th9xInterface::getEEpromSize() { - QSettings settings("companion9x", "companion9x"); - QString avrMCU = settings.value("mcu", QString("m64")).toString(); + QString avrMCU = g.mcu(); if (avrMCU==QString("m128")) { return 2*EESIZE_STOCK; } @@ -62,7 +62,7 @@ bool Th9xInterface::loadxml(RadioData &radioData, QDomDocument &doc) return false; } -bool Th9xInterface::load(RadioData &radioData, uint8_t *eeprom, int size) +bool Th9xInterface::load(RadioData &radioData, const uint8_t *eeprom, int size) { std::cout << "trying th9x import... "; @@ -71,7 +71,7 @@ bool Th9xInterface::load(RadioData &radioData, uint8_t *eeprom, int size) return false; } - if (!efile->EeFsOpen(eeprom, size, BOARD_STOCK)) { + if (!efile->EeFsOpen((uint8_t *)eeprom, size, BOARD_STOCK)) { std::cout << "wrong file system\n"; return false; } @@ -157,7 +157,7 @@ int Th9xInterface::getCapability(const Capability capability) return 9; case CustomFunctions: return 0; - case CustomSwitches: + case LogicalSwitches: return TH9X_MAX_SWITCHES; case Outputs: return 8; @@ -202,5 +202,5 @@ int Th9xInterface::isAvailable(Protocol proto, int port) SimulatorInterface * Th9xInterface::getSimulator() { - return new Th9xSimulator(this); + return NULL; // new Th9xSimulator(this); } diff --git a/companion/src/firmwares/th9x/th9xinterface.h b/companion/src/firmwares/th9x/th9xinterface.h index 6e0372107..9b63e7695 100644 --- a/companion/src/firmwares/th9x/th9xinterface.h +++ b/companion/src/firmwares/th9x/th9xinterface.h @@ -34,7 +34,7 @@ class Th9xInterface : public EEPROMInterface virtual const int getMaxModels(); - virtual bool load(RadioData &, uint8_t *eeprom, int size); + virtual bool load(RadioData &, const uint8_t *eeprom, int size); virtual bool loadBackup(RadioData &, uint8_t *eeprom, int esize, int index); diff --git a/companion/src/flashinterface.cpp b/companion/src/flashinterface.cpp index 86c677ef8..0b56cc795 100644 --- a/companion/src/flashinterface.cpp +++ b/companion/src/flashinterface.cpp @@ -52,7 +52,7 @@ FlashInterface::FlashInterface(QString fileName) char * bin_flash = (char *)malloc(MAX_FSIZE); flash_size = file.read(bin_flash, MAX_FSIZE); flash = QByteArray(bin_flash, flash_size); - free(bin_flash); + free(bin_flash); } else { flash = QByteArray(temp, flash_size); @@ -413,7 +413,7 @@ bool FlashInterface::setSplash(const QImage & newsplash) } } -uint FlashInterface::getSplashWidth() +int FlashInterface::getSplashWidth() { return splash_width; } diff --git a/companion/src/flashinterface.h b/companion/src/flashinterface.h index d7e6f0de9..eb1459d85 100644 --- a/companion/src/flashinterface.h +++ b/companion/src/flashinterface.h @@ -59,7 +59,7 @@ public: QImage getSplash(); bool setSplash(const QImage & newsplash); bool hasSplash(); - uint getSplashWidth(); + int getSplashWidth(); uint getSplashHeight(); uint getSplashColors(); QImage::Format getSplashFormat(); @@ -92,5 +92,5 @@ private: protected: bool isValidFlag; }; -#endif /* FLASHINTERFACE_H */ +#endif /* FLASHINTERFACE_H */ diff --git a/companion/src/fusesdialog.cpp b/companion/src/fusesdialog.cpp index 106bc0b85..aad4bdad5 100644 --- a/companion/src/fusesdialog.cpp +++ b/companion/src/fusesdialog.cpp @@ -1,13 +1,14 @@ #include "fusesdialog.h" #include "ui_fusesdialog.h" - #include "burnconfigdialog.h" +#include "helpers.h" fusesDialog::fusesDialog(QWidget *parent) : QDialog(parent), ui(new Ui::fusesDialog) { ui->setupUi(this); + this->setWindowIcon(CompanionIcon("fuses.png")); } fusesDialog::~fusesDialog() diff --git a/companion/src/fusesdialog.ui b/companion/src/fusesdialog.ui index e7e6bbe9d..f4ffe20bb 100644 --- a/companion/src/fusesdialog.ui +++ b/companion/src/fusesdialog.ui @@ -13,10 +13,6 @@ Fuses - - - :/images/fuses.png:/images/fuses.png - diff --git a/companion/src/fwpreferencesdialog.cpp b/companion/src/fwpreferencesdialog.cpp new file mode 100644 index 000000000..ec2585ddc --- /dev/null +++ b/companion/src/fwpreferencesdialog.cpp @@ -0,0 +1,323 @@ +#include "fwpreferencesdialog.h" +#include "ui_fwpreferencesdialog.h" +#include "mainwindow.h" +#include "eeprominterface.h" +#include "helpers.h" +#include "appdata.h" +#include +#include + +fwPreferencesDialog::fwPreferencesDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::fwPreferencesDialog), + updateLock(false) +{ + ui->setupUi(this); + setWindowIcon(CompanionIcon("fwpreferences.png")); + + QCheckBox * OptionCheckBox[]= { + ui->optionCheckBox_1, ui->optionCheckBox_2, ui->optionCheckBox_3, ui->optionCheckBox_4, ui->optionCheckBox_5, ui->optionCheckBox_6, ui->optionCheckBox_7, + ui->optionCheckBox_8, ui->optionCheckBox_9, ui->optionCheckBox_10, ui->optionCheckBox_11, ui->optionCheckBox_12, ui->optionCheckBox_13, ui->optionCheckBox_14, + ui->optionCheckBox_15,ui->optionCheckBox_16, ui->optionCheckBox_17, ui->optionCheckBox_18, ui->optionCheckBox_19, ui->optionCheckBox_20, ui->optionCheckBox_21, + ui->optionCheckBox_22, ui->optionCheckBox_23, ui->optionCheckBox_24, ui->optionCheckBox_25, ui->optionCheckBox_26, ui->optionCheckBox_27, ui->optionCheckBox_28, + ui->optionCheckBox_29, ui->optionCheckBox_30, ui->optionCheckBox_31, ui->optionCheckBox_32, ui->optionCheckBox_33, ui->optionCheckBox_34, ui->optionCheckBox_35, + ui->optionCheckBox_36, ui->optionCheckBox_37, ui->optionCheckBox_38, ui->optionCheckBox_39, ui->optionCheckBox_40, ui->optionCheckBox_41, ui->optionCheckBox_42, + NULL }; + + voice=NULL; + + connect(ui->langCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(firmwareLangChanged())); + connect(ui->voiceCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(firmwareLangChanged())); + + for (int i=0; OptionCheckBox[i]; i++) { + optionsCheckBoxes.push_back(OptionCheckBox[i]); + connect(OptionCheckBox[i], SIGNAL(toggled(bool)), this, SLOT(firmwareOptionChanged(bool))); + } + + initSettings(); + + connect(ui->downloadVerCB, SIGNAL(currentIndexChanged(int)), this, SLOT(baseFirmwareChanged())); + connect(this, SIGNAL(accepted()), this, SLOT(writeValues())); + + shrink(); +} + + +fwPreferencesDialog::~fwPreferencesDialog() +{ + delete ui; +} + +void fwPreferencesDialog::showVoice(bool show) +{ + if (show) + showVoice(); + else + hideVoice(); +} + +void fwPreferencesDialog::showVoice() +{ + ui->voiceLine->show(); + ui->voiceLabel->show(); + ui->voiceCombo->show(); + ui->voice_dnld->show(); +} + +void fwPreferencesDialog::hideVoice() +{ + ui->voiceLine->hide(); + ui->voiceLabel->hide(); + ui->voiceCombo->hide(); + ui->voice_dnld->hide(); + QTimer::singleShot(0, this, SLOT(shrink())); +} + +void fwPreferencesDialog::shrink() +{ + resize(0,0); +} + +void fwPreferencesDialog::baseFirmwareChanged() +{ + QVariant selected_firmware = ui->downloadVerCB->itemData(ui->downloadVerCB->currentIndex()); + voice=NULL; + foreach(FirmwareInfo * firmware, firmwares) { + if (firmware->id == selected_firmware) { + showVoice(firmware->voice); + populateFirmwareOptions(firmware); + break; + } + } + firmwareChanged(); +} + +FirmwareVariant fwPreferencesDialog::getFirmwareVariant() +{ + QVariant selected_firmware = ui->downloadVerCB->itemData(ui->downloadVerCB->currentIndex()); + bool voice=false; + foreach(FirmwareInfo * firmware, firmwares) { + if (firmware->id == selected_firmware) { + QString id = firmware->id; + foreach(QCheckBox *cb, optionsCheckBoxes) { + if (cb->isChecked()) { + if (cb->text()=="voice" && cb->isChecked()) + voice=true; + id += QString("-") + cb->text(); + } + } + if (! firmware->eepromInterface->getCapability(MultiLangVoice)) { + if (ui->voiceCombo->count() && (voice || firmware->voice)) + id += QString("-tts") + ui->voiceCombo->currentText(); + } + if (ui->langCombo->count()) + id += QString("-") + ui->langCombo->currentText(); + + return GetFirmwareVariant(id); + } + } + + // Should never occur... + return default_firmware_variant; +} + +void fwPreferencesDialog::firmwareOptionChanged(bool state) +{ + QCheckBox *cb = qobject_cast(sender()); + FirmwareInfo * firmware=NULL; + if (cb && state) { + QVariant selected_firmware = ui->downloadVerCB->itemData(ui->downloadVerCB->currentIndex()); + foreach(firmware, firmwares) { + if (firmware->id == selected_firmware) { + foreach(QList + + + + + 0 + 10 + + + + Qt::Horizontal + + + + + + + + + + + + + Beeper volume + +0 - Quiet. No beeps at all. +1 - No Keys. Normal beeps but menu keys do not beep. +2 - Normal. +3 - Loud. +4 - Extra loud. + + + + Pot (normal) + + + + + Multipos Switch + + + + + + + + S1 Type + + + + + + + + + + + + + Beeper volume + +0 - Quiet. No beeps at all. +1 - No Keys. Normal beeps but menu keys do not beep. +2 - Normal. +3 - Loud. +4 - Extra loud. + + + + Pot (normal) + + + + + Multipos Switch + + + + + + + + S2 Type + + + diff --git a/companion/src/helpers.cpp b/companion/src/helpers.cpp index 7c5046b31..536921de1 100644 --- a/companion/src/helpers.cpp +++ b/companion/src/helpers.cpp @@ -1,5 +1,8 @@ #include +#include "appdata.h" #include "helpers.h" +#include "simulatordialog.h" +#include "flashinterface.h" QString getPhaseName(int val, char * phasename) { @@ -12,15 +15,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) @@ -35,8 +51,8 @@ void populateGvSourceCB(QComboBox *b, int value) void populateVoiceLangCB(QComboBox *b, QString language) { - QString strings[] = { QObject::tr("English"), QObject::tr("French"), QObject::tr("Italian"), QObject::tr("German"), QObject::tr("Czech"), QObject::tr("Slovak"), QObject::tr("Spanish"), QObject::tr("Portuguese"), QObject::tr("Swedish"), NULL}; - QString langcode[] = { "en", "fr", "it", "de", "cz", "sk", "es", "pt", "se", NULL}; + QString strings[] = { QObject::tr("English"), QObject::tr("Finnish"), QObject::tr("French"), QObject::tr("Italian"), QObject::tr("German"), QObject::tr("Czech"), QObject::tr("Slovak"), QObject::tr("Spanish"), QObject::tr("Polish"), QObject::tr("Portuguese"), QObject::tr("Swedish"), NULL}; + QString langcode[] = { "en", "fi","fr", "it", "de", "cz", "sk", "es", "pl", "pt", "se", NULL}; b->clear(); for (int i=0; strings[i]!=NULL; i++) { @@ -63,7 +79,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); } @@ -86,7 +102,7 @@ void populateCustomScreenFieldCB(QComboBox *b, unsigned int value, bool last=fal b->addItem(RawSource(SOURCE_TYPE_NONE, 0).toString()); - for (unsigned int i = 0; i < (last ? TELEMETRY_SOURCES_DISPLAY_COUNT : TELEMETRY_SOURCES_STATUS_COUNT); i++) { + for (unsigned int i = 0; i <= (last ? TELEMETRY_SOURCES_DISPLAY_COUNT : TELEMETRY_SOURCES_STATUS_COUNT); i++) { b->addItem(RawSource(SOURCE_TYPE_TELEMETRY, i).toString()); if (!(i>=sizeof(telem_hub)/sizeof(int) || telem_hub[i]==0 || ((telem_hub[i]>=hubproto) && hubproto!=0))) { QModelIndex index = b->model()->index(i, 0); @@ -104,163 +120,6 @@ void populateCustomScreenFieldCB(QComboBox *b, unsigned int value, bool last=fal b->setMaxVisibleItems(10); } -QString getRepeatString(unsigned int val) -{ - if (val==0) { - return QObject::tr("No repeat"); - } else { - unsigned int step = IS_ARM(GetEepromInterface()->getBoard()) ? 5 : 10; - return QObject::tr("%1 sec").arg(step*val); - } -} - -QString getFuncName(unsigned int val) -{ - if (val < NUM_SAFETY_CHNOUT) { - return QObject::tr("Safety %1").arg(RawSource(SOURCE_TYPE_CH, val).toString()); - } - else if (val == FuncTrainer) - return QObject::tr("Trainer"); - else if (val == FuncTrainerRUD) - return QObject::tr("Trainer RUD"); - else if (val == FuncTrainerELE) - return QObject::tr("Trainer ELE"); - else if (val == FuncTrainerTHR) - return QObject::tr("Trainer THR"); - else if (val == FuncTrainerAIL) - return QObject::tr("Trainer AIL"); - else if (val == FuncInstantTrim) - return QObject::tr("Instant Trim"); - else if (val == FuncPlaySound) - return QObject::tr("Play Sound"); - else if (val == FuncPlayHaptic) - return QObject::tr("Play Haptic"); - else if (val == FuncReset) - return QObject::tr("Reset"); - else if (val == FuncVario) - return QObject::tr("Vario"); - else if (val == FuncPlayPrompt) - return QObject::tr("Play Track"); - else if (val == FuncPlayBoth) - return QObject::tr("Play Both"); - else if (val == FuncPlayValue) - return QObject::tr("Play Value"); - else if (val == FuncLogs) - return QObject::tr("Start Logs"); - else if (val == FuncVolume) - return QObject::tr("Volume"); - else if (val == FuncBacklight) - return QObject::tr("Backlight"); - else if (val == FuncBackgroundMusic) - return QObject::tr("Background Music"); - else if (val == FuncBackgroundMusicPause) - return QObject::tr("Background Music Pause"); - 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) - } -} - -QString getCustomSwitchStr(CustomSwData * customSw, const ModelData & model) -{ - QString result = ""; - - if (!customSw->func) - return result; - if (customSw->andsw!=0) { - result +="( "; - } - switch (getCSFunctionFamily(customSw->func)) { - case CS_FAMILY_TIMERS: - result = QString("TIM(%1 , %2)").arg(ValToTim(customSw->val1)).arg(ValToTim(customSw->val2)); - break; - case CS_FAMILY_VOFS: { - RawSource source = RawSource(customSw->val1); - if (customSw->val1) - result += source.toString(); - else - result += "0"; - result.remove(" "); - if (customSw->func == CS_FN_APOS || customSw->func == CS_FN_ANEG) - result = "|" + result + "|"; - else if (customSw->func == CS_FN_DAPOS) - result = "|d(" + result + ")|"; - else if (customSw->func == CS_FN_DPOS) result = "d(" + result + ")"; - if (customSw->func == CS_FN_APOS || customSw->func == CS_FN_VPOS || customSw->func == CS_FN_DAPOS || customSw->func == CS_FN_DPOS) - 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)); - break; - } - case CS_FAMILY_VBOOL: - result = RawSwitch(customSw->val1).toString(); - switch (customSw->func) { - case CS_FN_AND: - result += " AND "; - break; - case CS_FN_OR: - result += " OR "; - break; - case CS_FN_XOR: - result += " XOR "; - break; - default: - break; - } - result += RawSwitch(customSw->val2).toString(); - break; - - case CS_FAMILY_VCOMP: - if (customSw->val1) - result += RawSource(customSw->val1).toString(); - else - result += "0"; - switch (customSw->func) { - case CS_FN_EQUAL: - result += " = "; - break; - case CS_FN_NEQUAL: - result += " != "; - break; - case CS_FN_GREATER: - result += " > "; - break; - case CS_FN_LESS: - result += " < "; - break; - case CS_FN_EGREATER: - result += " >= "; - break; - case CS_FN_ELESS: - result += " <= "; - break; - default: - break; - } - if (customSw->val2) - result += RawSource(customSw->val2).toString(); - else - result += "0"; - break; - } - - if (customSw->andsw!=0) { - result +=" ) AND "; - result += RawSwitch(customSw->andsw).toString(); - } - - if (GetEepromInterface()->getCapability(CustomSwitchesExt)) { - if (customSw->delay) - result += QObject::tr(" Delay %1 sec").arg(customSw->delay/2.0); - if (customSw->duration) - result += QObject::tr(" Duration %1 sec").arg(customSw->duration/2.0); - } - - return result; -} - QString getProtocolStr(const int proto) { static const char *strings[] = { "OFF", @@ -275,189 +134,6 @@ QString getProtocolStr(const int proto) return CHECK_IN_ARRAY(strings, proto); } -void populateFuncCB(QComboBox *b, unsigned int value) -{ - b->clear(); - for (unsigned int i = 0; i < FuncCount; i++) { - b->addItem(getFuncName(i)); - if (!GetEepromInterface()->getCapability(HasVolume)) { - if (i==FuncVolume || i==FuncBackgroundMusic || i==FuncBackgroundMusicPause) { - QModelIndex index = b->model()->index(i, 0); - QVariant v(0); - b->model()->setData(index, v, Qt::UserRole - 1); - } - } - if ((i==FuncPlayHaptic) && !GetEepromInterface()->getCapability(Haptic)) { - QModelIndex index = b->model()->index(i, 0); - QVariant v(0); - b->model()->setData(index, v, Qt::UserRole - 1); - } - if ((i==FuncPlayBoth) && !GetEepromInterface()->getCapability(HasBeeper)) { - QModelIndex index = b->model()->index(i, 0); - QVariant v(0); - b->model()->setData(index, v, Qt::UserRole - 1); - } - if ((i==FuncLogs) && !GetEepromInterface()->getCapability(HasSDLogs)) { - QModelIndex index = b->model()->index(i, 0); - QVariant v(0); - b->model()->setData(index, v, Qt::UserRole - 1); - } - } - b->setCurrentIndex(value); - b->setMaxVisibleItems(10); -} - -QString FuncParam(uint function, int value, QString paramT,unsigned int adjustmode) -{ - QStringList qs; - if (function <= FuncInstantTrim) { - return QString("%1").arg(value); - } - else if (function==FuncPlaySound) { - qs <<"Beep 1" << "Beep 2" << "Beep 3" << "Warn1" << "Warn2" << "Cheep" << "Ratata" << "Tick" << "Siren" << "Ring" ; - qs << "SciFi" << "Robot" << "Chirp" << "Tada" << "Crickt" << "AlmClk" ; - if (value>=0 && value<(int)qs.count()) - return qs.at(value); - else - return QObject::tr("Inconsistent parameter"); - } - else if (function==FuncPlayHaptic) { - qs << "0" << "1" << "2" << "3"; - if (value>=0 && value<(int)qs.count()) - return qs.at(value); - else - return QObject::tr("Inconsistent parameter"); - } - else if (function==FuncReset) { - qs.append( QObject::tr("Timer1")); - qs.append( QObject::tr("Timer2")); - qs.append( QObject::tr("All")); - qs.append( QObject::tr("Telemetry")); - if (value>=0 && value<(int)qs.count()) - return qs.at(value); - else - return QObject::tr("Inconsistent parameter"); - } - else if ((function==FuncVolume)|| (function==FuncPlayValue)) { - RawSource item(value); - return item.toString(); - } - else if ((function==FuncPlayPrompt) || (function==FuncPlayBoth)) { - if ( GetEepromInterface()->getCapability(VoicesAsNumbers)) { - return QString("%1").arg(value); - } else { - return paramT; - } - } else if ((function>FuncBackgroundMusicPause) && (functionclear(); - b->addItem("----"); - - QString currentvalue(value); - foreach ( QString entry, paramsList ) { - b->addItem(entry); - if (entry==currentvalue) { - b->setCurrentIndex(b->count()-1); - } - } -} - -void populateFuncParamCB(QComboBox *b, uint function, unsigned int value, unsigned int adjustmode) -{ - QStringList qs; - b->clear(); - if (function==FuncPlaySound) { - qs <<"Beep 1" << "Beep 2" << "Beep 3" << "Warn1" << "Warn2" << "Cheep" << "Ratata" << "Tick" << "Siren" << "Ring" ; - qs << "SciFi" << "Robot" << "Chirp" << "Tada" << "Crickt" << "AlmClk" ; - b->addItems(qs); - b->setCurrentIndex(value); - } - else if (function==FuncPlayHaptic) { - qs << "0" << "1" << "2" << "3"; - b->addItems(qs); - b->setCurrentIndex(value); - } - else if (function==FuncReset) { - qs.append( QObject::tr("Timer1")); - qs.append( QObject::tr("Timer2")); - qs.append( QObject::tr("All")); - qs.append( QObject::tr("Telemetry")); - b->addItems(qs); - b->setCurrentIndex(value); - } - else if (function==FuncVolume) { - populateSourceCB(b, RawSource(value), POPULATE_SOURCES|POPULATE_TRIMS); - } - else if (function==FuncPlayValue) { - populateSourceCB(b, RawSource(value), POPULATE_SOURCES|POPULATE_SWITCHES|POPULATE_GVARS|POPULATE_TRIMS|POPULATE_TELEMETRYEXT); - } - else if (function>=FuncAdjustGV1 && function<=FuncAdjustGVLast) { - switch (adjustmode) { - case 1: - populateSourceCB(b, RawSource(value), POPULATE_SOURCES|POPULATE_TRIMS|POPULATE_SWITCHES); - break; - case 2: - populateSourceCB(b, RawSource(value), POPULATE_GVARS); - break; - case 3: - b->clear(); - b->addItem("-1", 0); - b->addItem("+1", 1); - b->setCurrentIndex(value); - 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(); - b->addItem(QObject::tr("Value")); - b->addItem(QObject::tr("Source")); - b->addItem(QObject::tr("GVAR")); - b->addItem(QObject::tr("Increment")); - b->setCurrentIndex(value); -} - void populatePhasesCB(QComboBox *b, int value) { for (int i=-GetEepromInterface()->getCapability(FlightPhases); i<=GetEepromInterface()->getCapability(FlightPhases); i++) { @@ -471,6 +147,78 @@ void populatePhasesCB(QComboBox *b, int value) b->setCurrentIndex(value + GetEepromInterface()->getCapability(FlightPhases)); } +bool gvarsEnabled() +{ + int gvars=0; + if (GetEepromInterface()->getCapability(HasVariants)) { + if ((GetCurrentFirmwareVariant() & GVARS_VARIANT)) { + gvars=1; + } + } + else { + gvars=1; + } + return gvars; +} + +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) +{ + lock = true; + + 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; + } + } + + weightSB->setMinimum(mini); + weightSB->setMaximum(maxi); + + 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), @@ -600,19 +348,6 @@ void CurveGroup::valuesChanged() } } -void populateTrimUseCB(QComboBox *b, unsigned int phase) -{ - b->addItem(QObject::tr("Own trim")); - 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 trim").arg(i)); - } - } - } -} - void populateGvarUseCB(QComboBox *b, unsigned int phase) { b->addItem(QObject::tr("Own value")); @@ -623,88 +358,6 @@ void populateGvarUseCB(QComboBox *b, unsigned int phase) } } -void populateTimerSwitchCB(QComboBox *b, int value) -{ - b->clear(); - uint8_t count=0; - for (int i=-128; i<128; i++) { - QString timerMode = getTimerMode(i); - if (!timerMode.isEmpty()) { - b->addItem(getTimerMode(i), i); - if (i==value) - b->setCurrentIndex(b->count()-1); - count++; - } - } - b->setMaxVisibleItems(10); -} - -QString getTimerMode(int tm) { - - QString stt = "OFFABSTHsTH%THt"; - - QString s; - - if (tm >= 0 && tm <= TMRMODE_THt) { - return stt.mid(abs(tm)*3, 3); - } - - int tma = abs(tm); - - if (tma >= TMRMODE_FIRST_SWITCH && tma < TMRMODE_FIRST_SWITCH + GetEepromInterface()->getCapability(SwitchesPositions)) { - s = RawSwitch(SWITCH_TYPE_SWITCH, tma - TMRMODE_FIRST_SWITCH + 1).toString(); - if (tm < 0) s.prepend("!"); - return s; - } - - if (tma >= TMRMODE_FIRST_SWITCH + GetEepromInterface()->getCapability(SwitchesPositions) && tma < TMRMODE_FIRST_SWITCH + GetEepromInterface()->getCapability(SwitchesPositions) + GetEepromInterface()->getCapability(CustomSwitches)) { - s = RawSwitch(SWITCH_TYPE_VIRTUAL, tma - TMRMODE_FIRST_SWITCH - GetEepromInterface()->getCapability(SwitchesPositions) + 1).toString(); - if (tm < 0) s.prepend("!"); - return s; - } - - if (tma >= TMRMODE_FIRST_MOMENT_SWITCH && tma < TMRMODE_FIRST_MOMENT_SWITCH + GetEepromInterface()->getCapability(SwitchesPositions)) { - s = RawSwitch(SWITCH_TYPE_SWITCH, tma - TMRMODE_FIRST_MOMENT_SWITCH + 1).toString()+"t"; - if (tm < 0) s.prepend("!"); - return s; - } - - if (tma >= TMRMODE_FIRST_MOMENT_SWITCH + GetEepromInterface()->getCapability(SwitchesPositions) && tma < TMRMODE_FIRST_MOMENT_SWITCH + GetEepromInterface()->getCapability(SwitchesPositions) + GetEepromInterface()->getCapability(CustomSwitches)) { - s = RawSwitch(SWITCH_TYPE_VIRTUAL, tma - TMRMODE_FIRST_MOMENT_SWITCH - GetEepromInterface()->getCapability(SwitchesPositions) + 1).toString()+"t"; - if (tm < 0) s.prepend("!"); - return s; - } - if (tma >=TMRMODE_FIRST_CHPERC && tma 33) { - tma-=32; - } - if (tma < 10) { - s=stt.mid(abs(tma)*3, 3); - } else if (tma <19) { - s=QString("SW%1").arg(tma-9); - } else { - s=QString("SW")+QChar('A'+tma-19); - } - if (tm<0) { - s.prepend("!"); - } else if (tm>33) { - s.append("m"); - } - return s; -} - void populateBacklightCB(QComboBox *b, const uint8_t value) { QString strings[] = { QObject::tr("OFF"), QObject::tr("Keys"), QObject::tr("Sticks"), QObject::tr("Keys + Sticks"), QObject::tr("ON"), NULL }; @@ -717,105 +370,114 @@ void populateBacklightCB(QComboBox *b, const uint8_t value) } } -void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr, UseContext context) +void populateAndSwitchCB(QComboBox *b, const RawSwitch & value) +{ + if (IS_ARM(GetEepromInterface()->getBoard())) { + populateSwitchCB(b, value); + } + else { + RawSwitch item; + + b->clear(); + + item = RawSwitch(SWITCH_TYPE_NONE); + b->addItem(item.toString(), item.toValue()); + if (item == value) b->setCurrentIndex(b->count()-1); + + for (int i=1; i<=GetEepromInterface()->getCapability(SwitchesPositions); i++) { + item = RawSwitch(SWITCH_TYPE_SWITCH, i); + b->addItem(item.toString(), item.toValue()); + if (item == value) b->setCurrentIndex(b->count()-1); + } + + for (int i=1; i<=6; i++) { + item = RawSwitch(SWITCH_TYPE_VIRTUAL, i); + b->addItem(item.toString(), item.toValue()); + if (item == value) b->setCurrentIndex(b->count()-1); + } + } +} + +void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr) { RawSwitch item; b->clear(); - if (attr & POPULATE_AND_SWITCHES) { - if (GetEepromInterface()->getCapability(HasNegAndSwitches)) { - for (int i=-GetEepromInterface()->getCapability(CustomAndSwitches); i<=-1; i++) { - item = RawSwitch(SWITCH_TYPE_VIRTUAL, i); - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } - for (int i=-GetEepromInterface()->getCapability(SwitchesPositions); i<=-1; i++) { - item = RawSwitch(SWITCH_TYPE_SWITCH, i); - if (GetEepromInterface()->isAvailable(item, context)) { - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } - } - } - item = RawSwitch(SWITCH_TYPE_NONE); - if (GetEepromInterface()->isAvailable(item, context)) { - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } - for (int i=1; i<=GetEepromInterface()->getCapability(SwitchesPositions); i++) { - item = RawSwitch(SWITCH_TYPE_SWITCH, i); - if (GetEepromInterface()->isAvailable(item, context)) { - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } - } - for (int i=1; i<=GetEepromInterface()->getCapability(CustomAndSwitches); i++) { - item = RawSwitch(SWITCH_TYPE_VIRTUAL, i); - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } - return; - } - - if (attr & POPULATE_MSWITCHES) { - if (attr & POPULATE_ONOFF) { - item = RawSwitch(SWITCH_TYPE_ONM, 1); - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } - - for (int i=-GetEepromInterface()->getCapability(CustomSwitches); i<0; i++) { - item = RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, i); - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } - for (int i=-GetEepromInterface()->getCapability(SwitchesPositions); i<0; i++) { - item = RawSwitch(SWITCH_TYPE_MOMENT_SWITCH, i); - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } - } - if (attr & POPULATE_ONOFF) { item = RawSwitch(SWITCH_TYPE_OFF); - if (GetEepromInterface()->isAvailable(item, context)) { - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } + b->addItem(item.toString(), item.toValue()); + if (item == value) b->setCurrentIndex(b->count()-1); } - for (int i=-GetEepromInterface()->getCapability(CustomSwitches); i<0; i++) { + for (int i=-GetEepromInterface()->getCapability(LogicalSwitches); i<0; i++) { item = RawSwitch(SWITCH_TYPE_VIRTUAL, i); - if (GetEepromInterface()->isAvailable(item, context)) { - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } + b->addItem(item.toString(), item.toValue()); + if (item == value) b->setCurrentIndex(b->count()-1); + } + + for (int i=-GetEepromInterface()->getCapability(RotaryEncoders); i<0; i++) { + item = RawSwitch(SWITCH_TYPE_ROTARY_ENCODER, i); + b->addItem(item.toString(), item.toValue()); + if (item == value) b->setCurrentIndex(b->count()-1); + } + + for (int i=-8; i<0; i++) { + item = RawSwitch(SWITCH_TYPE_TRIM, i); + b->addItem(item.toString(), item.toValue()); + if (item == value) b->setCurrentIndex(b->count()-1); + } + + for (int i=-GetEepromInterface()->getCapability(MultiposPots) * GetEepromInterface()->getCapability(MultiposPotsPositions); i<0; i++) { + item = RawSwitch(SWITCH_TYPE_MULTIPOS_POT, i); + b->addItem(item.toString(), item.toValue()); + if (item == value) b->setCurrentIndex(b->count()-1); } for (int i=-GetEepromInterface()->getCapability(SwitchesPositions); i<0; i++) { item = RawSwitch(SWITCH_TYPE_SWITCH, i); - if (GetEepromInterface()->isAvailable(item, context)) { + b->addItem(item.toString(), item.toValue()); + if (item == value) b->setCurrentIndex(b->count()-1); + } + + if (attr & POPULATE_TIMER_MODES) { + for (int i=0; i<5; i++) { + item = RawSwitch(SWITCH_TYPE_TIMER_MODE, i); b->addItem(item.toString(), item.toValue()); if (item == value) b->setCurrentIndex(b->count()-1); } } - - item = RawSwitch(SWITCH_TYPE_NONE); - if (GetEepromInterface()->isAvailable(item, context)) { + else { + item = RawSwitch(SWITCH_TYPE_NONE); b->addItem(item.toString(), item.toValue()); if (item == value) b->setCurrentIndex(b->count()-1); } for (int i=1; i<=GetEepromInterface()->getCapability(SwitchesPositions); i++) { item = RawSwitch(SWITCH_TYPE_SWITCH, i); - if (GetEepromInterface()->isAvailable(item, context)) { - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } + b->addItem(item.toString(), item.toValue()); + if (item == value) b->setCurrentIndex(b->count()-1); } - for (int i=1; i<=GetEepromInterface()->getCapability(CustomSwitches); i++) { + for (int i=1; i<=GetEepromInterface()->getCapability(MultiposPots) * GetEepromInterface()->getCapability(MultiposPotsPositions); i++) { + item = RawSwitch(SWITCH_TYPE_MULTIPOS_POT, i); + b->addItem(item.toString(), item.toValue()); + if (item == value) b->setCurrentIndex(b->count()-1); + } + + for (int i=1; i<=8; i++) { + item = RawSwitch(SWITCH_TYPE_TRIM, i); + b->addItem(item.toString(), item.toValue()); + if (item == value) b->setCurrentIndex(b->count()-1); + } + + for (int i=1; i<=GetEepromInterface()->getCapability(RotaryEncoders); i++) { + item = RawSwitch(SWITCH_TYPE_ROTARY_ENCODER, i); + b->addItem(item.toString(), item.toValue()); + if (item == value) b->setCurrentIndex(b->count()-1); + } + + for (int i=1; i<=GetEepromInterface()->getCapability(LogicalSwitches); i++) { item = RawSwitch(SWITCH_TYPE_VIRTUAL, i); b->addItem(item.toString(), item.toValue()); if (item == value) b->setCurrentIndex(b->count()-1); @@ -827,52 +489,6 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr, if (item == value) b->setCurrentIndex(b->count()-1); } - if (attr & POPULATE_MSWITCHES) { - for (int i=1; i<=GetEepromInterface()->getCapability(SwitchesPositions); i++) { - item = RawSwitch(SWITCH_TYPE_MOMENT_SWITCH, i); - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } - - for (int i=1; i<=GetEepromInterface()->getCapability(CustomSwitches); i++) { - item = RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, i); - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } - } - - if (attr & POPULATE_MSWITCHES) { - if (attr & POPULATE_ONOFF) { - item = RawSwitch(SWITCH_TYPE_ONM); - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } - if (IS_ARM(GetEepromInterface()->getBoard())) { - item = RawSwitch(SWITCH_TYPE_TRN,0); - if (GetEepromInterface()->isAvailable(item, context)) { - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } - item = RawSwitch(SWITCH_TYPE_TRN,1); - if (GetEepromInterface()->isAvailable(item, context)) { - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } - } - if (GetEepromInterface()->getBoard()==BOARD_SKY9X) { - item = RawSwitch(SWITCH_TYPE_REA,0); - if (GetEepromInterface()->isAvailable(item, context)) { - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } - item = RawSwitch(SWITCH_TYPE_REA,1); - if (GetEepromInterface()->isAvailable(item, context)) { - b->addItem(item.toString(), item.toValue()); - if (item == value) b->setCurrentIndex(b->count()-1); - } - } - } - b->setMaxVisibleItems(10); } @@ -914,8 +530,7 @@ void populateGVCB(QComboBox *b, int value) 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; @@ -925,7 +540,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()); @@ -959,7 +585,7 @@ void populateSourceCB(QComboBox *b, const RawSource &source, unsigned int flags) if (item == source) b->setCurrentIndex(b->count()-1); } - for (int i=0; igetCapability(CustomSwitches); i++) { + for (int i=0; igetCapability(LogicalSwitches); i++) { item = RawSource(SOURCE_TYPE_CUSTOM_SWITCH, i); b->addItem(item.toString(), item.toValue()); if (item == source) b->setCurrentIndex(b->count()-1); @@ -973,7 +599,7 @@ void populateSourceCB(QComboBox *b, const RawSource &source, unsigned int flags) if (item == source) b->setCurrentIndex(b->count()-1); } - for (int i=0; igetCapability(TrainerInputs); i++) { item = RawSource(SOURCE_TYPE_PPM, i); b->addItem(item.toString(), item.toValue()); if (item == source) b->setCurrentIndex(b->count()-1); @@ -992,7 +618,8 @@ void populateSourceCB(QComboBox *b, const RawSource &source, unsigned int flags) b->addItem(item.toString(), item.toValue()); if (item == source) b->setCurrentIndex(b->count()-1); } - } else if (flags & POPULATE_TELEMETRY) { + } + else if (flags & POPULATE_TELEMETRY) { for (int i=0; iaddItem(item.toString(), item.toValue()); @@ -1011,90 +638,48 @@ void populateSourceCB(QComboBox *b, const RawSource &source, unsigned int flags) b->setMaxVisibleItems(10); } -#define CSWITCH_STR "---- a~x a>x ax |a|b a=b a<=b d>=x |d|>=xTIM " -#define CSW_NUM_FUNC 18 // TODO enum -#define CSW_LEN_FUNC 6 -int csw_values[]={ - CS_FN_OFF, - CS_FN_VEQUAL, // added at the end to avoid everything renumbered - CS_FN_VPOS, - CS_FN_VNEG, - CS_FN_APOS, - CS_FN_ANEG, - CS_FN_AND, - CS_FN_OR, - CS_FN_XOR, - CS_FN_EQUAL, - CS_FN_NEQUAL, - CS_FN_GREATER, - CS_FN_LESS, - CS_FN_EGREATER, - CS_FN_ELESS, - CS_FN_DPOS, - CS_FN_DAPOS, - CS_FN_TIM -}; - -QString getCSWFunc(int val) -{ - return QString(CSWITCH_STR).mid(val*CSW_LEN_FUNC, CSW_LEN_FUNC); -} - -float ValToTim(int value) -{ - return ((value < -109 ? 129+value : (value < 7 ? (113+value)*5 : (53+value)*10))/10.0); -} - -int TimToVal(float value) -{ - int temp; - if (value>60) { - temp=136+round((value-60)); - } else if (value>2) { - temp=20+round((value-2.0)*2.0); - } else { - temp=round(value*10.0); - } - return (temp-129); -} - void populateCSWCB(QComboBox *b, int value) { + int order[] = { + LS_FN_OFF, + LS_FN_VEQUAL, // added at the end to avoid everything renumbered + LS_FN_VALMOSTEQUAL, // added at the end to avoid everything renumbered + LS_FN_VPOS, + LS_FN_VNEG, + // LS_FN_RANGE, + LS_FN_APOS, + LS_FN_ANEG, + LS_FN_AND, + LS_FN_OR, + LS_FN_XOR, + LS_FN_STAY, + LS_FN_EQUAL, + LS_FN_NEQUAL, + LS_FN_GREATER, + LS_FN_LESS, + LS_FN_EGREATER, + LS_FN_ELESS, + LS_FN_DPOS, + LS_FN_DAPOS, + LS_FN_TIMER, + LS_FN_STICKY + }; + b->clear(); - for (int i = 0; i < CSW_NUM_FUNC; i++) { - b->addItem(getCSWFunc(i),csw_values[i]); - if (i>GetEepromInterface()->getCapability(CSFunc)) { - QModelIndex index = b->model()->index(i, 0); - QVariant v(0); - } - if (value == csw_values[i]) { + for (int i=0; iaddItem(LogicalSwitchData(func).funcToString(), func); +// if (i>GetEepromInterface()->getCapability(CSFunc)) { +// QModelIndex index = b->model()->index(i, 0); +// QVariant v(0); +// } + if (value == func) { b->setCurrentIndex(b->count()-1); } } b->setMaxVisibleItems(10); } -QString getSignedStr(int value) -{ - return value > 0 ? QString("+%1").arg(value) : QString("%1").arg(value); -} - -QString getGVarString(int16_t val, bool sign) -{ - if (val >= -10000 && val <= 10000) { - if (sign) - 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); - } -} - QString image2qstring(QImage image) { if (image.isNull()) @@ -1111,6 +696,14 @@ QString image2qstring(QImage image) return ImageStr; } +// TODO KKERNEN 20140222 +// I am sure that this code has had some kind of function, but now it only seems to cause +// problems. I think it is an attempt to open an image file from a double byte string which +// is first converted to a single byte string. Only used in burndialog.cpp +// It doesn't work for me in 2.0. I do not know why. I doubt it has ever worked for files or +// file paths containing non-english characters. +// Code can be removed ,when 2.0 is tested. + QImage qstring2image(QString imagestr) { bool ok; @@ -1221,109 +814,6 @@ QString getFrSkySrc(int index) return RawSource(SOURCE_TYPE_TELEMETRY, index-1).toString(); } - -/* - 1,2) Timer1/Timer2 0:765 - 3,4) TX/RX - 5) A1 range - 6) A2 range - 7) ALT 0-1020 - 8)RPM 0-12750 - 9FUEL 0-100% - 10) T1 -30-225 - 11) T2 -30-225 - 12) spd 0-510 - 13) dist 0-2040 - 14)GAlt 0-1020 - 15) cell 0-5.1 - 16) Cels 0 25.5 - 17) Vfas 0 25.5 - 18) Curr 0 127.5 - 19) Cnsp 0 5100 - 20) Powr 0 1275 - 21) AccX 0 2.55 - 22) AccY 0 2.55 - 23) AccZ 0 2.55 - 24) Hdg 0 255 - 25) VSpd 0 2.55 - 26) A1- A1 range - 27) A2- A2 range - 28) Alt- 0 255 - 29) Alt+ 0 255 - 30) Rpm+ 0 255 - 31) T1+ 0 255 (s????) - 32) T2+ 0 255 (e????) - 33) Spd+ 0 255 (ILG???) - 34) Dst+ 0 255 (v ????) - 35) Cur+ 0 25.5 (A) - 1.852 - */ - -float getBarValue(int barId, int value, FrSkyData *fd) -{ - switch (barId-1) { - case TELEMETRY_SOURCE_TX_BATT: - return value/10.0; - case TELEMETRY_SOURCE_TIMER1: - case TELEMETRY_SOURCE_TIMER2: - return (3*value); - case TELEMETRY_SOURCE_RSSI_TX: - case TELEMETRY_SOURCE_RSSI_RX: - case TELEMETRY_SOURCE_FUEL: - return std::min(100, value); - case TELEMETRY_SOURCE_A1: - case TELEMETRY_SOURCE_A1_MIN: - if (fd->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) { @@ -1338,7 +828,7 @@ QString getTrimInc(ModelData * g_model) QString getTimerStr(TimerData & timer) { QString str = ", " + (timer.dir ? QObject::tr("Count Up") : QObject::tr("Count Down")); - return QObject::tr("%1:%2, ").arg(timer.val/60, 2, 10, QChar('0')).arg(timer.val%60, 2, 10, QChar('0')) + getTimerMode(timer.mode) + str; + return QObject::tr("%1:%2, ").arg(timer.val/60, 2, 10, QChar('0')).arg(timer.val%60, 2, 10, QChar('0')) + timer.mode.toString() + str; } QString getProtocol(ModelData * g_model) @@ -1379,13 +869,6 @@ QString getPhasesStr(unsigned int phases, ModelData & model) } } -float c9xexpou(float point, float coeff) -{ - float x=point*1024.0/100.0; - float k=coeff*256.0/100.0; - return ((k*x*x*x/(1024*1024) + x*(256-k) + 128) / 256)/1024.0*100; -} - QString getCenterBeep(ModelData * g_model) { //RETA123 @@ -1400,3 +883,113 @@ QString getCenterBeep(ModelData * g_model) if(g_model->beepANACenter & 0x80) strl << "LS"; return strl.join(", "); } + +QString getTheme() +{ + int theme_set = g.theme(); + QString Theme; + switch(theme_set) { + case 0: + Theme="classic"; + break; + case 2: + Theme="monowhite"; + break; + case 3: + Theme="monochrome"; + break; + case 4: + Theme="monoblue"; + break; + default: + Theme="yerico"; + 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)); +} + +void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx) +{ + if (GetEepromInterface()->getSimulator()) { + RadioData * simuData = new RadioData(radioData); + unsigned int flags = 0; + if (modelIdx >= 0) { + flags |= SIMULATOR_FLAGS_NOTX; + simuData->generalSettings.currModel = modelIdx; + } + if (radioData.generalSettings.stickMode & 1) { + flags |= SIMULATOR_FLAGS_STICK_MODE_LEFT; + } + BoardEnum board = GetEepromInterface()->getBoard(); + SimulatorDialog * sd; + if (IS_TARANIS(board)) + sd = new SimulatorDialogTaranis(parent, flags); + else + sd = new SimulatorDialog9X(parent, flags); + QByteArray eeprom(GetEepromInterface()->getEEpromSize(), 0); + GetEepromInterface()->save((uint8_t *)eeprom.data(), *simuData, GetEepromInterface()->getCapability(SimulatorVariant)); + delete simuData; + sd->start(eeprom); + sd->exec(); + delete sd; + } + else { + QMessageBox::warning(NULL, + QObject::tr("Warning"), + QObject::tr("Simulator for this firmware is not yet available")); + } +} + +QPixmap makePixMap( QImage image, QString firmwareType ) +{ + if (firmwareType.contains( "taranis" )) { + image = image.convertToFormat(QImage::Format_RGB32); + QRgb col; + int gray; + for (int i = 0; i < image.width(); ++i) { + for (int j = 0; j < image.height(); ++j) { + col = image.pixel(i, j); + gray = qGray(col); + image.setPixel(i, j, qRgb(gray, gray, gray)); + } + } + image = image.scaled(SPLASHX9D_WIDTH, SPLASHX9D_HEIGHT); + } + else { + image = image.scaled(SPLASH_WIDTH, SPLASH_HEIGHT).convertToFormat(QImage::Format_Mono); + } + return(QPixmap::fromImage(image)); +} + +int getRadioType(QString firmwareType) +{ + if (firmwareType.contains( "taranis" )) return 6; + if (firmwareType.contains( "sky9x" )) return 5; + if (firmwareType.contains( "gruvin9x")) return 4; + if (firmwareType.contains( "9xr128" )) return 3; + if (firmwareType.contains( "9xr" )) return 2; + if (firmwareType.contains( "9x128" )) return 1; + return 0; // 9x +} + +QString getDefaultFwType( int radioType ) +{ + switch (radioType){ + case 6: return "opentx-taranis-en"; + case 5: return "opentx-sky9x-en"; + case 4: return "opentx-gruvin9x-en"; + case 3: return "opentx-9xr128-en"; + case 2: return "opentx-9xr-en"; + case 1: return "opentx-9x128-en"; + default: return "opentx-9x-en"; + } +} diff --git a/companion/src/helpers.h b/companion/src/helpers.h index bc61e2894..857d66749 100644 --- a/companion/src/helpers.h +++ b/companion/src/helpers.h @@ -4,7 +4,7 @@ #include #include "eeprominterface.h" -#define TMR_NUM_OPTION (TMR_VAROFS+2*9+2*GetEepromInterface()->getCapability(CustomSwitches)-1) +#define TMR_NUM_OPTION (TMR_VAROFS+2*9+2*GetEepromInterface()->getCapability(LogicalSwitches)-1) //convert from mode 1 to mode generalSettings.stickMode //NOTICE! => 1..4 -> 1..4 @@ -23,12 +23,41 @@ #define TRIM_OFF 1 #define TRIM_OFFSET 2 +#define TRIM_MODE_NONE 0x1F // 0b11111 + void populateGvSourceCB(QComboBox *b, int value); void populateVoiceLangCB(QComboBox *b, QString language); 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 @@ -53,47 +82,33 @@ class CurveGroup : public QObject { }; #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 populateFuncParamArmTCB(QComboBox *b, ModelData * g_model, char * value, QStringList & paramsList); +#define POPULATE_TIMER_MODES 0x02 +void populateAndSwitchCB(QComboBox *b, const RawSwitch & value); +void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr=0); + void populatePhasesCB(QComboBox *b, int value); -void populateTrimUseCB(QComboBox *b, unsigned int phase); void populateGvarUseCB(QComboBox *b, unsigned int phase); void populateCustomScreenFieldCB(QComboBox *b, unsigned int value, bool last, int hubproto); -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 getCSWFunc(int val); -QString getFuncName(unsigned int val); -QString getRepeatString(unsigned int val); -QString getSignedStr(int value); -QString getGVarString(int16_t val, bool sign=false); +QString getInputStr(ModelData & model, int index); QString image2qstring(QImage image); QImage qstring2image(QString imagestr); int findmult(float value, float base); @@ -110,9 +125,16 @@ 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); + +void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx); + +// Format a pixmap to fit on the radio using a specific firmware +QPixmap makePixMap( QImage image, QString firmwareType ); + +// Return a radio type derived from a firmware type string +int getRadioType(QString firmwareType); + +// Return the default firmware string for a specified radio +QString getDefaultFwType( int radioType ); #endif // HELPERS_H diff --git a/companion/src/icon.ico b/companion/src/icon.ico index bb088b1ae..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 6ceee4f23..2936917c7 100644 Binary files a/companion/src/icon.png and b/companion/src/icon.png differ diff --git a/companion/src/images/9xcurs.png b/companion/src/images/9xcurs.png index e311f1712..e526a44a0 100644 Binary files a/companion/src/images/9xcurs.png and b/companion/src/images/9xcurs.png differ diff --git a/companion/src/images/9xcursdown.png b/companion/src/images/9xcursdown.png index 509df9091..d1460c08f 100644 Binary files a/companion/src/images/9xcursdown.png and b/companion/src/images/9xcursdown.png differ diff --git a/companion/src/images/9xcursmin.png b/companion/src/images/9xcursmin.png index a69beea4c..0cc3ee566 100644 Binary files a/companion/src/images/9xcursmin.png and b/companion/src/images/9xcursmin.png differ diff --git a/companion/src/images/9xcursphoto.png b/companion/src/images/9xcursphoto.png index 10f5272d5..96a84b22b 100644 Binary files a/companion/src/images/9xcursphoto.png and b/companion/src/images/9xcursphoto.png differ diff --git a/companion/src/images/9xcursplus.png b/companion/src/images/9xcursplus.png index fd49b8f1c..177975166 100644 Binary files a/companion/src/images/9xcursplus.png and b/companion/src/images/9xcursplus.png differ diff --git a/companion/src/images/9xcursup.png b/companion/src/images/9xcursup.png index 301d83f3c..bb3130d4b 100644 Binary files a/companion/src/images/9xcursup.png and b/companion/src/images/9xcursup.png differ diff --git a/companion/src/images/companion-title.png b/companion/src/images/companion-title.png index cbaa0d13b..05f3b8709 100644 Binary files a/companion/src/images/companion-title.png and b/companion/src/images/companion-title.png differ diff --git a/companion/src/images/customize.png b/companion/src/images/customize.png index 078d0af75..7bec20a70 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 0e20c9fe3..579b285c1 100644 Binary files a/companion/src/images/iconmac.icns and b/companion/src/images/iconmac.icns differ diff --git a/companion/src/images/library/00001.png b/companion/src/images/library/00001.png index 57c8485a9..43cd387dc 100644 Binary files a/companion/src/images/library/00001.png and b/companion/src/images/library/00001.png differ diff --git a/companion/src/images/library/00002.png b/companion/src/images/library/00002.png index d7f9c54b0..37b24b0d7 100644 Binary files a/companion/src/images/library/00002.png and b/companion/src/images/library/00002.png differ diff --git a/companion/src/images/library/00003.png b/companion/src/images/library/00003.png index 9f3c5d78e..a179deadf 100644 Binary files a/companion/src/images/library/00003.png and b/companion/src/images/library/00003.png differ diff --git a/companion/src/images/library/00004.png b/companion/src/images/library/00004.png index 60858b556..e8494d868 100644 Binary files a/companion/src/images/library/00004.png and b/companion/src/images/library/00004.png differ diff --git a/companion/src/images/library/00005.png b/companion/src/images/library/00005.png index 6d5a1d93d..34e83f860 100644 Binary files a/companion/src/images/library/00005.png and b/companion/src/images/library/00005.png differ diff --git a/companion/src/images/library/00006.png b/companion/src/images/library/00006.png index 64eca2f66..ce8bb5ce1 100644 Binary files a/companion/src/images/library/00006.png and b/companion/src/images/library/00006.png differ diff --git a/companion/src/images/library/00007.png b/companion/src/images/library/00007.png index fa384d1e6..358a29faf 100644 Binary files a/companion/src/images/library/00007.png and b/companion/src/images/library/00007.png differ diff --git a/companion/src/images/library/00008.png b/companion/src/images/library/00008.png index ed7a1c01f..6e45e310a 100644 Binary files a/companion/src/images/library/00008.png and b/companion/src/images/library/00008.png differ diff --git a/companion/src/images/library/00009.png b/companion/src/images/library/00009.png index 6d199bb6f..99fbf404d 100644 Binary files a/companion/src/images/library/00009.png and b/companion/src/images/library/00009.png differ diff --git a/companion/src/images/library/00010.png b/companion/src/images/library/00010.png index 2b2081c88..410af7418 100644 Binary files a/companion/src/images/library/00010.png and b/companion/src/images/library/00010.png differ diff --git a/companion/src/images/library/00011.png b/companion/src/images/library/00011.png index ec135da3c..410af7418 100644 Binary files a/companion/src/images/library/00011.png and b/companion/src/images/library/00011.png differ diff --git a/companion/src/images/library/00012.png b/companion/src/images/library/00012.png index f054a15d8..410af7418 100644 Binary files a/companion/src/images/library/00012.png and b/companion/src/images/library/00012.png differ diff --git a/companion/src/images/library/00013.png b/companion/src/images/library/00013.png index c73a99701..161f1fc04 100644 Binary files a/companion/src/images/library/00013.png and b/companion/src/images/library/00013.png differ diff --git a/companion/src/images/library/00014.png b/companion/src/images/library/00014.png index e4d1878c9..7c516b800 100644 Binary files a/companion/src/images/library/00014.png and b/companion/src/images/library/00014.png differ diff --git a/companion/src/images/library/00015.png b/companion/src/images/library/00015.png index 5bf13ecb2..da65dbcb3 100644 Binary files a/companion/src/images/library/00015.png and b/companion/src/images/library/00015.png differ diff --git a/companion/src/images/library/00016.png b/companion/src/images/library/00016.png index c44d1a5e0..1cab16ab2 100644 Binary files a/companion/src/images/library/00016.png and b/companion/src/images/library/00016.png differ diff --git a/companion/src/images/library/00017.png b/companion/src/images/library/00017.png new file mode 100644 index 000000000..131f2e2a4 Binary files /dev/null and b/companion/src/images/library/00017.png differ diff --git a/companion/src/images/library/00018.png b/companion/src/images/library/00018.png new file mode 100644 index 000000000..22ffa2b1f Binary files /dev/null and b/companion/src/images/library/00018.png differ diff --git a/companion/src/images/library/00019.png b/companion/src/images/library/00019.png new file mode 100644 index 000000000..6dc10e2e2 Binary files /dev/null and b/companion/src/images/library/00019.png differ diff --git a/companion/src/images/library/00020.png b/companion/src/images/library/00020.png new file mode 100644 index 000000000..bf74ff7b5 Binary files /dev/null and b/companion/src/images/library/00020.png differ diff --git a/companion/src/images/library/00050.png b/companion/src/images/library/00050.png new file mode 100644 index 000000000..0218d0570 Binary files /dev/null and b/companion/src/images/library/00050.png differ diff --git a/companion/src/images/library/00051.png b/companion/src/images/library/00051.png new file mode 100644 index 000000000..ec135da3c Binary files /dev/null and b/companion/src/images/library/00051.png differ diff --git a/companion/src/images/library/00052.png b/companion/src/images/library/00052.png new file mode 100644 index 000000000..64eca2f66 Binary files /dev/null and b/companion/src/images/library/00052.png differ diff --git a/companion/src/images/library/00053.png b/companion/src/images/library/00053.png new file mode 100644 index 000000000..c73a99701 Binary files /dev/null and b/companion/src/images/library/00053.png differ diff --git a/companion/src/images/library/00054.png b/companion/src/images/library/00054.png new file mode 100644 index 000000000..e4d1878c9 Binary files /dev/null and b/companion/src/images/library/00054.png differ diff --git a/companion/src/images/library/00055.png b/companion/src/images/library/00055.png new file mode 100644 index 000000000..5bf13ecb2 Binary files /dev/null and b/companion/src/images/library/00055.png differ diff --git a/companion/src/images/library/00056.png b/companion/src/images/library/00056.png new file mode 100644 index 000000000..c44d1a5e0 Binary files /dev/null and b/companion/src/images/library/00056.png differ diff --git a/companion/src/images/library/00057.png b/companion/src/images/library/00057.png new file mode 100644 index 000000000..678355ae0 Binary files /dev/null and b/companion/src/images/library/00057.png differ diff --git a/companion/src/images/library/00058.png b/companion/src/images/library/00058.png new file mode 100644 index 000000000..fa384d1e6 Binary files /dev/null and b/companion/src/images/library/00058.png differ diff --git a/companion/src/images/library/00059.png b/companion/src/images/library/00059.png new file mode 100644 index 000000000..6d5a1d93d Binary files /dev/null and b/companion/src/images/library/00059.png differ diff --git a/companion/src/images/library/00060.png b/companion/src/images/library/00060.png new file mode 100644 index 000000000..9f3c5d78e Binary files /dev/null and b/companion/src/images/library/00060.png differ diff --git a/companion/src/images/library/00061.png b/companion/src/images/library/00061.png new file mode 100644 index 000000000..f054a15d8 Binary files /dev/null and b/companion/src/images/library/00061.png differ diff --git a/companion/src/images/library/00062.png b/companion/src/images/library/00062.png new file mode 100644 index 000000000..ed7a1c01f Binary files /dev/null and b/companion/src/images/library/00062.png differ diff --git a/companion/src/images/library/00063.png b/companion/src/images/library/00063.png new file mode 100644 index 000000000..6d199bb6f Binary files /dev/null and b/companion/src/images/library/00063.png differ diff --git a/companion/src/images/library/00064.png b/companion/src/images/library/00064.png new file mode 100644 index 000000000..2b2081c88 Binary files /dev/null and b/companion/src/images/library/00064.png differ diff --git a/companion/src/images/library/00065.png b/companion/src/images/library/00065.png new file mode 100644 index 000000000..4a92323e5 Binary files /dev/null and b/companion/src/images/library/00065.png differ diff --git a/companion/src/images/library/00066.png b/companion/src/images/library/00066.png new file mode 100644 index 000000000..2e7668f7d Binary files /dev/null and b/companion/src/images/library/00066.png differ diff --git a/companion/src/images/library/00100.png b/companion/src/images/library/00100.png new file mode 100644 index 000000000..12fd5b70f Binary files /dev/null and b/companion/src/images/library/00100.png differ diff --git a/companion/src/images/library/00101.png b/companion/src/images/library/00101.png new file mode 100644 index 000000000..277f90714 Binary files /dev/null and b/companion/src/images/library/00101.png differ diff --git a/companion/src/images/library/00102.png b/companion/src/images/library/00102.png new file mode 100644 index 000000000..5319738e6 Binary files /dev/null and b/companion/src/images/library/00102.png differ diff --git a/companion/src/images/library/00103.png b/companion/src/images/library/00103.png new file mode 100644 index 000000000..ededfb8ac Binary files /dev/null and b/companion/src/images/library/00103.png differ diff --git a/companion/src/images/library/00104.png b/companion/src/images/library/00104.png new file mode 100644 index 000000000..c2649499d Binary files /dev/null and b/companion/src/images/library/00104.png differ diff --git a/companion/src/images/library/00105.png b/companion/src/images/library/00105.png new file mode 100644 index 000000000..c109f03f1 Binary files /dev/null and b/companion/src/images/library/00105.png differ diff --git a/companion/src/images/library/00106.png b/companion/src/images/library/00106.png new file mode 100644 index 000000000..01476b196 Binary files /dev/null and b/companion/src/images/library/00106.png differ diff --git a/companion/src/images/library/00201.png b/companion/src/images/library/00201.png new file mode 100644 index 000000000..a5e6349a3 Binary files /dev/null and b/companion/src/images/library/00201.png differ diff --git a/companion/src/images/library/10011.png b/companion/src/images/library/00202.png similarity index 100% rename from companion/src/images/library/10011.png rename to companion/src/images/library/00202.png diff --git a/companion/src/images/library/10007.png b/companion/src/images/library/00203.png similarity index 100% rename from companion/src/images/library/10007.png rename to companion/src/images/library/00203.png diff --git a/companion/src/images/library/10015.png b/companion/src/images/library/00204.png similarity index 100% rename from companion/src/images/library/10015.png rename to companion/src/images/library/00204.png diff --git a/companion/src/images/library/10094.png b/companion/src/images/library/00301.png similarity index 100% rename from companion/src/images/library/10094.png rename to companion/src/images/library/00301.png diff --git a/companion/src/images/library/10096.png b/companion/src/images/library/00302.png similarity index 100% rename from companion/src/images/library/10096.png rename to companion/src/images/library/00302.png diff --git a/companion/src/images/library/10070.png b/companion/src/images/library/00303.png similarity index 100% rename from companion/src/images/library/10070.png rename to companion/src/images/library/00303.png diff --git a/companion/src/images/library/00304.png b/companion/src/images/library/00304.png new file mode 100644 index 000000000..936732b2e Binary files /dev/null and b/companion/src/images/library/00304.png differ diff --git a/companion/src/images/library/00401.png b/companion/src/images/library/00401.png new file mode 100644 index 000000000..553abc70b Binary files /dev/null and b/companion/src/images/library/00401.png differ diff --git a/companion/src/images/library/00402.png b/companion/src/images/library/00402.png new file mode 100644 index 000000000..ec94b1a34 Binary files /dev/null and b/companion/src/images/library/00402.png differ diff --git a/companion/src/images/library/00403.png b/companion/src/images/library/00403.png new file mode 100644 index 000000000..71e3824f6 Binary files /dev/null and b/companion/src/images/library/00403.png differ diff --git a/companion/src/images/library/00404.png b/companion/src/images/library/00404.png new file mode 100644 index 000000000..9715eb04c Binary files /dev/null and b/companion/src/images/library/00404.png differ diff --git a/companion/src/images/library/00501.png b/companion/src/images/library/00501.png new file mode 100644 index 000000000..44bb7ad5a Binary files /dev/null and b/companion/src/images/library/00501.png differ diff --git a/companion/src/images/library/01001.png b/companion/src/images/library/01001.png deleted file mode 100644 index 47fec20ff..000000000 Binary files a/companion/src/images/library/01001.png and /dev/null differ diff --git a/companion/src/images/library/01002.png b/companion/src/images/library/01002.png deleted file mode 100644 index e83381a48..000000000 Binary files a/companion/src/images/library/01002.png and /dev/null differ diff --git a/companion/src/images/library/01003.png b/companion/src/images/library/01003.png deleted file mode 100644 index 88f5676db..000000000 Binary files a/companion/src/images/library/01003.png and /dev/null differ diff --git a/companion/src/images/library/01004.png b/companion/src/images/library/01004.png deleted file mode 100644 index bc2a06103..000000000 Binary files a/companion/src/images/library/01004.png and /dev/null differ diff --git a/companion/src/images/library/01005.png b/companion/src/images/library/01005.png deleted file mode 100644 index b4aea5dfe..000000000 Binary files a/companion/src/images/library/01005.png and /dev/null differ diff --git a/companion/src/images/library/01006.png b/companion/src/images/library/01006.png deleted file mode 100644 index 448f590da..000000000 Binary files a/companion/src/images/library/01006.png and /dev/null differ diff --git a/companion/src/images/library/01007.png b/companion/src/images/library/01007.png deleted file mode 100644 index cb9a53702..000000000 Binary files a/companion/src/images/library/01007.png and /dev/null differ diff --git a/companion/src/images/library/01008.png b/companion/src/images/library/01008.png deleted file mode 100644 index da3346f7d..000000000 Binary files a/companion/src/images/library/01008.png and /dev/null differ diff --git a/companion/src/images/library/10001.png b/companion/src/images/library/10001.png index 51e85006a..8abdaba2a 100644 Binary files a/companion/src/images/library/10001.png and b/companion/src/images/library/10001.png differ diff --git a/companion/src/images/library/10002.png b/companion/src/images/library/10002.png index 47b108be9..ac46509c2 100644 Binary files a/companion/src/images/library/10002.png and b/companion/src/images/library/10002.png differ diff --git a/companion/src/images/library/10003.png b/companion/src/images/library/10003.png index ad62abd01..0fa584dbb 100644 Binary files a/companion/src/images/library/10003.png and b/companion/src/images/library/10003.png differ diff --git a/companion/src/images/library/10004.png b/companion/src/images/library/10004.png deleted file mode 100644 index 1a93226b7..000000000 Binary files a/companion/src/images/library/10004.png and /dev/null differ diff --git a/companion/src/images/library/10005.png b/companion/src/images/library/10005.png deleted file mode 100644 index b25163b8c..000000000 Binary files a/companion/src/images/library/10005.png and /dev/null differ diff --git a/companion/src/images/library/10006.png b/companion/src/images/library/10006.png deleted file mode 100644 index ca77bbd87..000000000 Binary files a/companion/src/images/library/10006.png and /dev/null differ diff --git a/companion/src/images/library/10008.png b/companion/src/images/library/10008.png deleted file mode 100644 index 9616e2c12..000000000 Binary files a/companion/src/images/library/10008.png and /dev/null differ diff --git a/companion/src/images/library/10009.png b/companion/src/images/library/10009.png deleted file mode 100644 index 1919fc94b..000000000 Binary files a/companion/src/images/library/10009.png and /dev/null differ diff --git a/companion/src/images/library/10010.png b/companion/src/images/library/10010.png deleted file mode 100644 index 0ef805645..000000000 Binary files a/companion/src/images/library/10010.png and /dev/null differ diff --git a/companion/src/images/library/10012.png b/companion/src/images/library/10012.png deleted file mode 100644 index 6007e75d4..000000000 Binary files a/companion/src/images/library/10012.png and /dev/null differ diff --git a/companion/src/images/library/10013.png b/companion/src/images/library/10013.png deleted file mode 100644 index dc8a5efc7..000000000 Binary files a/companion/src/images/library/10013.png and /dev/null differ diff --git a/companion/src/images/library/10014.png b/companion/src/images/library/10014.png deleted file mode 100644 index 6a306d3b2..000000000 Binary files a/companion/src/images/library/10014.png and /dev/null differ diff --git a/companion/src/images/library/10016.png b/companion/src/images/library/10016.png deleted file mode 100644 index d02cb5ceb..000000000 Binary files a/companion/src/images/library/10016.png and /dev/null differ diff --git a/companion/src/images/library/10017.png b/companion/src/images/library/10017.png deleted file mode 100644 index 13f6ed481..000000000 Binary files a/companion/src/images/library/10017.png and /dev/null differ diff --git a/companion/src/images/library/10018.png b/companion/src/images/library/10018.png deleted file mode 100644 index 552c96540..000000000 Binary files a/companion/src/images/library/10018.png and /dev/null differ diff --git a/companion/src/images/library/10019.png b/companion/src/images/library/10019.png deleted file mode 100644 index fcdc73964..000000000 Binary files a/companion/src/images/library/10019.png and /dev/null differ diff --git a/companion/src/images/library/10020.png b/companion/src/images/library/10020.png deleted file mode 100644 index c40348ee7..000000000 Binary files a/companion/src/images/library/10020.png and /dev/null differ diff --git a/companion/src/images/library/10021.png b/companion/src/images/library/10021.png deleted file mode 100644 index 69ea3ad14..000000000 Binary files a/companion/src/images/library/10021.png and /dev/null differ diff --git a/companion/src/images/library/10022.png b/companion/src/images/library/10022.png deleted file mode 100644 index cb746eb74..000000000 Binary files a/companion/src/images/library/10022.png and /dev/null differ diff --git a/companion/src/images/library/10023.png b/companion/src/images/library/10023.png deleted file mode 100644 index 784dbf355..000000000 Binary files a/companion/src/images/library/10023.png and /dev/null differ diff --git a/companion/src/images/library/10024.png b/companion/src/images/library/10024.png deleted file mode 100644 index 4066cd8e0..000000000 Binary files a/companion/src/images/library/10024.png and /dev/null differ diff --git a/companion/src/images/library/10025.png b/companion/src/images/library/10025.png deleted file mode 100644 index 8a1562e52..000000000 Binary files a/companion/src/images/library/10025.png and /dev/null differ diff --git a/companion/src/images/library/10026.png b/companion/src/images/library/10026.png deleted file mode 100644 index 704865b0c..000000000 Binary files a/companion/src/images/library/10026.png and /dev/null differ diff --git a/companion/src/images/library/10027.png b/companion/src/images/library/10027.png deleted file mode 100644 index b872dd0b2..000000000 Binary files a/companion/src/images/library/10027.png and /dev/null differ diff --git a/companion/src/images/library/10028.png b/companion/src/images/library/10028.png deleted file mode 100644 index 842a14dd5..000000000 Binary files a/companion/src/images/library/10028.png and /dev/null differ diff --git a/companion/src/images/library/10029.png b/companion/src/images/library/10029.png deleted file mode 100644 index 800465056..000000000 Binary files a/companion/src/images/library/10029.png and /dev/null differ diff --git a/companion/src/images/library/10030.png b/companion/src/images/library/10030.png deleted file mode 100644 index 705741cea..000000000 Binary files a/companion/src/images/library/10030.png and /dev/null differ diff --git a/companion/src/images/library/10031.png b/companion/src/images/library/10031.png deleted file mode 100644 index 41d3a526f..000000000 Binary files a/companion/src/images/library/10031.png and /dev/null differ diff --git a/companion/src/images/library/10032.png b/companion/src/images/library/10032.png deleted file mode 100644 index 1ed9a3801..000000000 Binary files a/companion/src/images/library/10032.png and /dev/null differ diff --git a/companion/src/images/library/10033.png b/companion/src/images/library/10033.png deleted file mode 100644 index 1e39ed5b4..000000000 Binary files a/companion/src/images/library/10033.png and /dev/null differ diff --git a/companion/src/images/library/10034.png b/companion/src/images/library/10034.png deleted file mode 100644 index cc8b37afb..000000000 Binary files a/companion/src/images/library/10034.png and /dev/null differ diff --git a/companion/src/images/library/10035.png b/companion/src/images/library/10035.png deleted file mode 100644 index 2e14bc941..000000000 Binary files a/companion/src/images/library/10035.png and /dev/null differ diff --git a/companion/src/images/library/10036.png b/companion/src/images/library/10036.png deleted file mode 100644 index e4eb4667f..000000000 Binary files a/companion/src/images/library/10036.png and /dev/null differ diff --git a/companion/src/images/library/10037.png b/companion/src/images/library/10037.png deleted file mode 100644 index 7e85d9fb4..000000000 Binary files a/companion/src/images/library/10037.png and /dev/null differ diff --git a/companion/src/images/library/10038.png b/companion/src/images/library/10038.png deleted file mode 100644 index 69425a5d3..000000000 Binary files a/companion/src/images/library/10038.png and /dev/null differ diff --git a/companion/src/images/library/10039.png b/companion/src/images/library/10039.png deleted file mode 100644 index 586fae0a5..000000000 Binary files a/companion/src/images/library/10039.png and /dev/null differ diff --git a/companion/src/images/library/10040.png b/companion/src/images/library/10040.png deleted file mode 100644 index a6f575c6f..000000000 Binary files a/companion/src/images/library/10040.png and /dev/null differ diff --git a/companion/src/images/library/10041.png b/companion/src/images/library/10041.png deleted file mode 100644 index d7c509449..000000000 Binary files a/companion/src/images/library/10041.png and /dev/null differ diff --git a/companion/src/images/library/10042.png b/companion/src/images/library/10042.png deleted file mode 100644 index 6f4aa2b68..000000000 Binary files a/companion/src/images/library/10042.png and /dev/null differ diff --git a/companion/src/images/library/10043.png b/companion/src/images/library/10043.png deleted file mode 100644 index 7ff6f4bc7..000000000 Binary files a/companion/src/images/library/10043.png and /dev/null differ diff --git a/companion/src/images/library/10044.png b/companion/src/images/library/10044.png deleted file mode 100644 index 0f5ec33dc..000000000 Binary files a/companion/src/images/library/10044.png and /dev/null differ diff --git a/companion/src/images/library/10045.png b/companion/src/images/library/10045.png deleted file mode 100644 index 4e195cbb4..000000000 Binary files a/companion/src/images/library/10045.png and /dev/null differ diff --git a/companion/src/images/library/10046.png b/companion/src/images/library/10046.png deleted file mode 100644 index 99cbb9bb7..000000000 Binary files a/companion/src/images/library/10046.png and /dev/null differ diff --git a/companion/src/images/library/10047.png b/companion/src/images/library/10047.png deleted file mode 100644 index 263ef7508..000000000 Binary files a/companion/src/images/library/10047.png and /dev/null differ diff --git a/companion/src/images/library/10048.png b/companion/src/images/library/10048.png deleted file mode 100644 index 4f1ddcb8f..000000000 Binary files a/companion/src/images/library/10048.png and /dev/null differ diff --git a/companion/src/images/library/10049.png b/companion/src/images/library/10049.png deleted file mode 100644 index 1b00b73b3..000000000 Binary files a/companion/src/images/library/10049.png and /dev/null differ diff --git a/companion/src/images/library/10050.png b/companion/src/images/library/10050.png deleted file mode 100644 index 13f2c3748..000000000 Binary files a/companion/src/images/library/10050.png and /dev/null differ diff --git a/companion/src/images/library/10051.png b/companion/src/images/library/10051.png deleted file mode 100644 index 00ef00a9e..000000000 Binary files a/companion/src/images/library/10051.png and /dev/null differ diff --git a/companion/src/images/library/10052.png b/companion/src/images/library/10052.png deleted file mode 100644 index 00adf5621..000000000 Binary files a/companion/src/images/library/10052.png and /dev/null differ diff --git a/companion/src/images/library/10053.png b/companion/src/images/library/10053.png deleted file mode 100644 index 787d6cce4..000000000 Binary files a/companion/src/images/library/10053.png and /dev/null differ diff --git a/companion/src/images/library/10054.png b/companion/src/images/library/10054.png deleted file mode 100644 index 149e35ada..000000000 Binary files a/companion/src/images/library/10054.png and /dev/null differ diff --git a/companion/src/images/library/10055.png b/companion/src/images/library/10055.png deleted file mode 100644 index 52ae8827b..000000000 Binary files a/companion/src/images/library/10055.png and /dev/null differ diff --git a/companion/src/images/library/10056.png b/companion/src/images/library/10056.png deleted file mode 100644 index 7c9be6730..000000000 Binary files a/companion/src/images/library/10056.png and /dev/null differ diff --git a/companion/src/images/library/10057.png b/companion/src/images/library/10057.png deleted file mode 100644 index ffe4fd58b..000000000 Binary files a/companion/src/images/library/10057.png and /dev/null differ diff --git a/companion/src/images/library/10058.png b/companion/src/images/library/10058.png deleted file mode 100644 index b8a0117fb..000000000 Binary files a/companion/src/images/library/10058.png and /dev/null differ diff --git a/companion/src/images/library/10059.png b/companion/src/images/library/10059.png deleted file mode 100644 index 3d5e9bfc0..000000000 Binary files a/companion/src/images/library/10059.png and /dev/null differ diff --git a/companion/src/images/library/10060.png b/companion/src/images/library/10060.png deleted file mode 100644 index 2837c5398..000000000 Binary files a/companion/src/images/library/10060.png and /dev/null differ diff --git a/companion/src/images/library/10061.png b/companion/src/images/library/10061.png deleted file mode 100644 index 2aec8a703..000000000 Binary files a/companion/src/images/library/10061.png and /dev/null differ diff --git a/companion/src/images/library/10062.png b/companion/src/images/library/10062.png deleted file mode 100644 index 810efb9a9..000000000 Binary files a/companion/src/images/library/10062.png and /dev/null differ diff --git a/companion/src/images/library/10063.png b/companion/src/images/library/10063.png deleted file mode 100644 index 2cd293505..000000000 Binary files a/companion/src/images/library/10063.png and /dev/null differ diff --git a/companion/src/images/library/10064.png b/companion/src/images/library/10064.png deleted file mode 100644 index 6354a2a18..000000000 Binary files a/companion/src/images/library/10064.png and /dev/null differ diff --git a/companion/src/images/library/10065.png b/companion/src/images/library/10065.png deleted file mode 100644 index 87010d65e..000000000 Binary files a/companion/src/images/library/10065.png and /dev/null differ diff --git a/companion/src/images/library/10066.png b/companion/src/images/library/10066.png deleted file mode 100644 index db4917113..000000000 Binary files a/companion/src/images/library/10066.png and /dev/null differ diff --git a/companion/src/images/library/10067.png b/companion/src/images/library/10067.png deleted file mode 100644 index f188c03a8..000000000 Binary files a/companion/src/images/library/10067.png and /dev/null differ diff --git a/companion/src/images/library/10068.png b/companion/src/images/library/10068.png deleted file mode 100644 index b70eb70d7..000000000 Binary files a/companion/src/images/library/10068.png and /dev/null differ diff --git a/companion/src/images/library/10069.png b/companion/src/images/library/10069.png deleted file mode 100644 index 3eb68b5b2..000000000 Binary files a/companion/src/images/library/10069.png and /dev/null differ diff --git a/companion/src/images/library/10071.png b/companion/src/images/library/10071.png deleted file mode 100644 index fa9c6cde7..000000000 Binary files a/companion/src/images/library/10071.png and /dev/null differ diff --git a/companion/src/images/library/10072.png b/companion/src/images/library/10072.png deleted file mode 100644 index 82189cd46..000000000 Binary files a/companion/src/images/library/10072.png and /dev/null differ diff --git a/companion/src/images/library/10073.png b/companion/src/images/library/10073.png deleted file mode 100644 index 37f11ea34..000000000 Binary files a/companion/src/images/library/10073.png and /dev/null differ diff --git a/companion/src/images/library/10074.png b/companion/src/images/library/10074.png deleted file mode 100644 index abf8c3ae2..000000000 Binary files a/companion/src/images/library/10074.png and /dev/null differ diff --git a/companion/src/images/library/10075.png b/companion/src/images/library/10075.png deleted file mode 100644 index e17abfdf7..000000000 Binary files a/companion/src/images/library/10075.png and /dev/null differ diff --git a/companion/src/images/library/10076.png b/companion/src/images/library/10076.png deleted file mode 100644 index 30bd5f62f..000000000 Binary files a/companion/src/images/library/10076.png and /dev/null differ diff --git a/companion/src/images/library/10077.png b/companion/src/images/library/10077.png deleted file mode 100644 index 5cdddbb0b..000000000 Binary files a/companion/src/images/library/10077.png and /dev/null differ diff --git a/companion/src/images/library/10078.png b/companion/src/images/library/10078.png deleted file mode 100644 index 3dc842400..000000000 Binary files a/companion/src/images/library/10078.png and /dev/null differ diff --git a/companion/src/images/library/10079.png b/companion/src/images/library/10079.png deleted file mode 100644 index 387dc81be..000000000 Binary files a/companion/src/images/library/10079.png and /dev/null differ diff --git a/companion/src/images/library/10080.png b/companion/src/images/library/10080.png deleted file mode 100644 index 46a46e9a4..000000000 Binary files a/companion/src/images/library/10080.png and /dev/null differ diff --git a/companion/src/images/library/10081.png b/companion/src/images/library/10081.png deleted file mode 100644 index 66019bb70..000000000 Binary files a/companion/src/images/library/10081.png and /dev/null differ diff --git a/companion/src/images/library/10082.png b/companion/src/images/library/10082.png deleted file mode 100644 index 5ba72eb8f..000000000 Binary files a/companion/src/images/library/10082.png and /dev/null differ diff --git a/companion/src/images/library/10083.png b/companion/src/images/library/10083.png deleted file mode 100644 index 4619aba26..000000000 Binary files a/companion/src/images/library/10083.png and /dev/null differ diff --git a/companion/src/images/library/10084.png b/companion/src/images/library/10084.png deleted file mode 100644 index d82770ff4..000000000 Binary files a/companion/src/images/library/10084.png and /dev/null differ diff --git a/companion/src/images/library/10085.png b/companion/src/images/library/10085.png deleted file mode 100644 index 644b1d006..000000000 Binary files a/companion/src/images/library/10085.png and /dev/null differ diff --git a/companion/src/images/library/10086.png b/companion/src/images/library/10086.png deleted file mode 100644 index 2f16b8b80..000000000 Binary files a/companion/src/images/library/10086.png and /dev/null differ diff --git a/companion/src/images/library/10087.png b/companion/src/images/library/10087.png deleted file mode 100644 index dedee12ff..000000000 Binary files a/companion/src/images/library/10087.png and /dev/null differ diff --git a/companion/src/images/library/10088.png b/companion/src/images/library/10088.png deleted file mode 100644 index b24fe1a05..000000000 Binary files a/companion/src/images/library/10088.png and /dev/null differ diff --git a/companion/src/images/library/10089.png b/companion/src/images/library/10089.png deleted file mode 100644 index 133c90972..000000000 Binary files a/companion/src/images/library/10089.png and /dev/null differ diff --git a/companion/src/images/library/10090.png b/companion/src/images/library/10090.png deleted file mode 100644 index d45f27e5b..000000000 Binary files a/companion/src/images/library/10090.png and /dev/null differ diff --git a/companion/src/images/library/10091.png b/companion/src/images/library/10091.png deleted file mode 100644 index 192d3304e..000000000 Binary files a/companion/src/images/library/10091.png and /dev/null differ diff --git a/companion/src/images/library/10093.png b/companion/src/images/library/10093.png deleted file mode 100644 index cff628eb3..000000000 Binary files a/companion/src/images/library/10093.png and /dev/null differ diff --git a/companion/src/images/library/10095.png b/companion/src/images/library/10095.png deleted file mode 100644 index 5c03253c8..000000000 Binary files a/companion/src/images/library/10095.png and /dev/null differ diff --git a/companion/src/images/library/10097.png b/companion/src/images/library/10097.png deleted file mode 100644 index 88aecde84..000000000 Binary files a/companion/src/images/library/10097.png and /dev/null differ diff --git a/companion/src/images/library/10098.png b/companion/src/images/library/10098.png deleted file mode 100644 index 0d4249608..000000000 Binary files a/companion/src/images/library/10098.png and /dev/null differ diff --git a/companion/src/images/library/10099.png b/companion/src/images/library/10099.png deleted file mode 100644 index 2d99e224f..000000000 Binary files a/companion/src/images/library/10099.png and /dev/null differ diff --git a/companion/src/images/library/10100.png b/companion/src/images/library/10100.png deleted file mode 100644 index 14001a79a..000000000 Binary files a/companion/src/images/library/10100.png and /dev/null differ diff --git a/companion/src/images/library/10101.png b/companion/src/images/library/10101.png index 1f21c62ea..073c3197b 100644 Binary files a/companion/src/images/library/10101.png and b/companion/src/images/library/10101.png differ diff --git a/companion/src/images/library/10102.png b/companion/src/images/library/10102.png index 28ef0617b..7bfefdce6 100644 Binary files a/companion/src/images/library/10102.png and b/companion/src/images/library/10102.png differ diff --git a/companion/src/images/library/10103.png b/companion/src/images/library/10103.png index 8fd5c2897..d44f974b5 100644 Binary files a/companion/src/images/library/10103.png and b/companion/src/images/library/10103.png differ diff --git a/companion/src/images/library/10104.png b/companion/src/images/library/10104.png deleted file mode 100644 index 17b0c12a0..000000000 Binary files a/companion/src/images/library/10104.png and /dev/null differ diff --git a/companion/src/images/library/10501.png b/companion/src/images/library/10501.png new file mode 100644 index 000000000..51e85006a Binary files /dev/null and b/companion/src/images/library/10501.png differ diff --git a/companion/src/images/library/10502.png b/companion/src/images/library/10502.png new file mode 100644 index 000000000..47b108be9 Binary files /dev/null and b/companion/src/images/library/10502.png differ diff --git a/companion/src/images/library/10503.png b/companion/src/images/library/10503.png new file mode 100644 index 000000000..1ba8ec880 Binary files /dev/null and b/companion/src/images/library/10503.png differ diff --git a/companion/src/images/library/10504.png b/companion/src/images/library/10504.png new file mode 100644 index 000000000..e64ecb348 Binary files /dev/null and b/companion/src/images/library/10504.png differ diff --git a/companion/src/images/library/10505.png b/companion/src/images/library/10505.png new file mode 100644 index 000000000..a623d3376 Binary files /dev/null and b/companion/src/images/library/10505.png differ diff --git a/companion/src/images/library/10506.png b/companion/src/images/library/10506.png new file mode 100644 index 000000000..2fbda686e Binary files /dev/null and b/companion/src/images/library/10506.png differ diff --git a/companion/src/images/library/10508.png b/companion/src/images/library/10508.png new file mode 100644 index 000000000..ed3ce466d Binary files /dev/null and b/companion/src/images/library/10508.png differ diff --git a/companion/src/images/library/10601.png b/companion/src/images/library/10601.png new file mode 100644 index 000000000..782dd9653 Binary files /dev/null and b/companion/src/images/library/10601.png differ diff --git a/companion/src/images/library/10092.png b/companion/src/images/library/10701.png similarity index 100% rename from companion/src/images/library/10092.png rename to companion/src/images/library/10701.png diff --git a/companion/src/images/library/10702.png b/companion/src/images/library/10702.png new file mode 100644 index 000000000..c1f70cd82 Binary files /dev/null and b/companion/src/images/library/10702.png differ diff --git a/companion/src/images/library/10801.png b/companion/src/images/library/10801.png new file mode 100644 index 000000000..1ad61712b Binary files /dev/null and b/companion/src/images/library/10801.png differ diff --git a/companion/src/images/library/10802.png b/companion/src/images/library/10802.png new file mode 100644 index 000000000..bbf26657e Binary files /dev/null and b/companion/src/images/library/10802.png differ diff --git a/companion/src/images/library/20001.png b/companion/src/images/library/20001.png deleted file mode 100644 index aaed01ccc..000000000 Binary files a/companion/src/images/library/20001.png and /dev/null differ diff --git a/companion/src/images/library/20002.png b/companion/src/images/library/20002.png deleted file mode 100644 index 3f3d21866..000000000 Binary files a/companion/src/images/library/20002.png and /dev/null differ diff --git a/companion/src/images/library/20003.png b/companion/src/images/library/20003.png deleted file mode 100644 index 166fd4c94..000000000 Binary files a/companion/src/images/library/20003.png and /dev/null differ diff --git a/companion/src/images/library/20004.png b/companion/src/images/library/20004.png deleted file mode 100644 index df09efa35..000000000 Binary files a/companion/src/images/library/20004.png and /dev/null differ diff --git a/companion/src/images/library/30001.png b/companion/src/images/library/30001.png deleted file mode 100644 index a699fad95..000000000 Binary files a/companion/src/images/library/30001.png and /dev/null differ diff --git a/companion/src/images/library/30002.png b/companion/src/images/library/30002.png deleted file mode 100644 index b90ee4ca8..000000000 Binary files a/companion/src/images/library/30002.png and /dev/null differ diff --git a/companion/src/images/library/30003.png b/companion/src/images/library/30003.png deleted file mode 100644 index fe4548967..000000000 Binary files a/companion/src/images/library/30003.png and /dev/null differ diff --git a/companion/src/images/library/30004.png b/companion/src/images/library/30004.png deleted file mode 100644 index 4db2f79bb..000000000 Binary files a/companion/src/images/library/30004.png and /dev/null differ diff --git a/companion/src/images/library/30005.png b/companion/src/images/library/30005.png deleted file mode 100644 index ceeb0b358..000000000 Binary files a/companion/src/images/library/30005.png and /dev/null differ diff --git a/companion/src/images/library/30006.png b/companion/src/images/library/30006.png deleted file mode 100644 index de6493b1c..000000000 Binary files a/companion/src/images/library/30006.png and /dev/null differ diff --git a/companion/src/images/linuxicons/128x128/companion.png b/companion/src/images/linuxicons/128x128/companion.png index 6f1616ca2..9b4ad31a2 100644 Binary files a/companion/src/images/linuxicons/128x128/companion.png 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 index 684517666..1ed7a9ae9 100644 Binary files a/companion/src/images/linuxicons/256x256/companion.png 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 index df79707a5..0b7375c0c 100644 Binary files a/companion/src/images/linuxicons/32x32/companion.png 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 index 99357930d..d591f97d2 100644 Binary files a/companion/src/images/linuxicons/48x48/companion.png 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 index 7e9078b2e..6938b2c42 100644 Binary files a/companion/src/images/linuxicons/512x512/companion.png 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 index 40a99a3b0..95f040b15 100644 --- a/companion/src/images/linuxicons/scalable/companion.svg +++ b/companion/src/images/linuxicons/scalable/companion.svg @@ -1,104 +1,340 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - COMPANION - - - - - - O - - - - - P - - - - - E - - - - - N - - - - - - - - - \ No newline at end of file + +image/svg+xml +O +P +E +N + \ No newline at end of file diff --git a/companion/src/images/originals/companion9x-title.xcf b/companion/src/images/originals/companion-title.xcf similarity index 100% rename from companion/src/images/originals/companion9x-title.xcf rename to companion/src/images/originals/companion-title.xcf diff --git a/companion/src/images/add.png b/companion/src/images/originals/icons Classical/add.png similarity index 100% rename from companion/src/images/add.png rename to companion/src/images/originals/icons Classical/add.png diff --git a/companion/src/images/preferences.png b/companion/src/images/originals/icons Classical/apppreferences.png similarity index 100% rename from companion/src/images/preferences.png rename to companion/src/images/originals/icons Classical/apppreferences.png diff --git a/companion/src/images/arrow-left.png b/companion/src/images/originals/icons Classical/arrow-left.png similarity index 100% rename from companion/src/images/arrow-left.png rename to companion/src/images/originals/icons Classical/arrow-left.png diff --git a/companion/src/images/arrow-right.png b/companion/src/images/originals/icons Classical/arrow-right.png similarity index 100% rename from companion/src/images/arrow-right.png rename to companion/src/images/originals/icons Classical/arrow-right.png diff --git a/companion/src/images/changelog.png b/companion/src/images/originals/icons Classical/changelog.png similarity index 100% rename from companion/src/images/changelog.png rename to companion/src/images/originals/icons Classical/changelog.png diff --git a/companion/src/images/clear.png b/companion/src/images/originals/icons Classical/clear.png similarity index 100% rename from companion/src/images/clear.png rename to companion/src/images/originals/icons Classical/clear.png diff --git a/companion/src/images/compare.png b/companion/src/images/originals/icons Classical/compare.png similarity index 100% rename from companion/src/images/compare.png rename to companion/src/images/originals/icons Classical/compare.png diff --git a/companion/src/images/configure.png b/companion/src/images/originals/icons Classical/configure.png similarity index 100% rename from companion/src/images/configure.png rename to companion/src/images/originals/icons Classical/configure.png diff --git a/companion/src/images/contributors.png b/companion/src/images/originals/icons Classical/contributors.png similarity index 100% rename from companion/src/images/contributors.png rename to companion/src/images/originals/icons Classical/contributors.png diff --git a/companion/src/images/copy.png b/companion/src/images/originals/icons Classical/copy.png similarity index 100% rename from companion/src/images/copy.png rename to companion/src/images/originals/icons Classical/copy.png diff --git a/companion/src/images/currentmodel.png b/companion/src/images/originals/icons Classical/currentmodel.png similarity index 100% rename from companion/src/images/currentmodel.png rename to companion/src/images/originals/icons Classical/currentmodel.png diff --git a/companion/src/images/cut.png b/companion/src/images/originals/icons Classical/cut.png similarity index 100% rename from companion/src/images/cut.png rename to companion/src/images/originals/icons Classical/cut.png diff --git a/companion/src/images/duplicate.png b/companion/src/images/originals/icons Classical/duplicate.png similarity index 100% rename from companion/src/images/duplicate.png rename to companion/src/images/originals/icons Classical/duplicate.png diff --git a/companion/src/images/edit.png b/companion/src/images/originals/icons Classical/edit.png similarity index 100% rename from companion/src/images/edit.png rename to companion/src/images/originals/icons Classical/edit.png diff --git a/companion/src/images/exit.png b/companion/src/images/originals/icons Classical/exit.png similarity index 100% rename from companion/src/images/exit.png rename to companion/src/images/originals/icons Classical/exit.png diff --git a/companion/src/images/fuses.png b/companion/src/images/originals/icons Classical/fuses.png similarity index 100% rename from companion/src/images/fuses.png rename to companion/src/images/originals/icons Classical/fuses.png diff --git a/companion/src/images/originals/icons Classical/fwpreferences.png b/companion/src/images/originals/icons Classical/fwpreferences.png new file mode 100644 index 000000000..7574da86a Binary files /dev/null and b/companion/src/images/originals/icons Classical/fwpreferences.png differ diff --git a/companion/src/images/originals/icons Classical/information.png b/companion/src/images/originals/icons Classical/information.png new file mode 100644 index 000000000..76b6d5966 Binary files /dev/null and b/companion/src/images/originals/icons Classical/information.png differ diff --git a/companion/src/images/library.png b/companion/src/images/originals/icons Classical/library.png similarity index 100% rename from companion/src/images/library.png rename to companion/src/images/originals/icons Classical/library.png diff --git a/companion/src/images/list.png b/companion/src/images/originals/icons Classical/list.png similarity index 100% rename from companion/src/images/list.png rename to companion/src/images/originals/icons Classical/list.png diff --git a/companion/src/images/logs.png b/companion/src/images/originals/icons Classical/logs.png similarity index 100% rename from companion/src/images/logs.png rename to companion/src/images/originals/icons Classical/logs.png diff --git a/companion/src/images/movedown.png b/companion/src/images/originals/icons Classical/movedown.png similarity index 100% rename from companion/src/images/movedown.png rename to companion/src/images/originals/icons Classical/movedown.png diff --git a/companion/src/images/moveup.png b/companion/src/images/originals/icons Classical/moveup.png similarity index 100% rename from companion/src/images/moveup.png rename to companion/src/images/originals/icons Classical/moveup.png diff --git a/companion/src/images/new.png b/companion/src/images/originals/icons Classical/new.png similarity index 100% rename from companion/src/images/new.png rename to companion/src/images/originals/icons Classical/new.png diff --git a/companion/src/images/open.png b/companion/src/images/originals/icons Classical/open.png similarity index 100% rename from companion/src/images/open.png rename to companion/src/images/originals/icons Classical/open.png diff --git a/companion/src/images/originals/icons Classical/paintbrush.png b/companion/src/images/originals/icons Classical/paintbrush.png new file mode 100644 index 000000000..814fdb47e Binary files /dev/null and b/companion/src/images/originals/icons Classical/paintbrush.png differ diff --git a/companion/src/images/paste.png b/companion/src/images/originals/icons Classical/paste.png similarity index 100% rename from companion/src/images/paste.png rename to companion/src/images/originals/icons Classical/paste.png diff --git a/companion/src/images/play.png b/companion/src/images/originals/icons Classical/play.png similarity index 100% rename from companion/src/images/play.png rename to companion/src/images/originals/icons Classical/play.png diff --git a/companion/src/images/print.png b/companion/src/images/originals/icons Classical/print.png similarity index 100% rename from companion/src/images/print.png rename to companion/src/images/originals/icons Classical/print.png diff --git a/companion/src/images/profiles.png b/companion/src/images/originals/icons Classical/profiles.png similarity index 100% rename from companion/src/images/profiles.png rename to companion/src/images/originals/icons Classical/profiles.png diff --git a/companion/src/images/read_eeprom.png b/companion/src/images/originals/icons Classical/read_eeprom.png similarity index 100% rename from companion/src/images/read_eeprom.png rename to companion/src/images/originals/icons Classical/read_eeprom.png diff --git a/companion/src/images/read_eeprom_file.png b/companion/src/images/originals/icons Classical/read_eeprom_file.png similarity index 100% rename from companion/src/images/read_eeprom_file.png rename to companion/src/images/originals/icons Classical/read_eeprom_file.png diff --git a/companion/src/images/read_flash.png b/companion/src/images/originals/icons Classical/read_flash.png similarity index 100% rename from companion/src/images/read_flash.png rename to companion/src/images/originals/icons Classical/read_flash.png diff --git a/companion/src/images/recentdocument.png b/companion/src/images/originals/icons Classical/recentdocument.png similarity index 100% rename from companion/src/images/recentdocument.png rename to companion/src/images/originals/icons Classical/recentdocument.png diff --git a/companion/src/images/save.png b/companion/src/images/originals/icons Classical/save.png similarity index 100% rename from companion/src/images/save.png rename to companion/src/images/originals/icons Classical/save.png diff --git a/companion/src/images/saveas.png b/companion/src/images/originals/icons Classical/saveas.png similarity index 100% rename from companion/src/images/saveas.png rename to companion/src/images/originals/icons Classical/saveas.png diff --git a/companion/src/images/simulate.png b/companion/src/images/originals/icons Classical/simulate.png similarity index 100% rename from companion/src/images/simulate.png rename to companion/src/images/originals/icons Classical/simulate.png diff --git a/companion/src/images/stop.png b/companion/src/images/originals/icons Classical/stop.png similarity index 100% rename from companion/src/images/stop.png rename to companion/src/images/originals/icons Classical/stop.png diff --git a/companion/src/images/switch_dir.png b/companion/src/images/originals/icons Classical/switch_dir.png similarity index 100% rename from companion/src/images/switch_dir.png rename to companion/src/images/originals/icons Classical/switch_dir.png diff --git a/companion/src/images/update.png b/companion/src/images/originals/icons Classical/update.png similarity index 100% rename from companion/src/images/update.png rename to companion/src/images/originals/icons Classical/update.png diff --git a/companion/src/images/wizard.png b/companion/src/images/originals/icons Classical/wizard.png similarity index 100% rename from companion/src/images/wizard.png rename to companion/src/images/originals/icons Classical/wizard.png diff --git a/companion/src/images/write_eeprom.png b/companion/src/images/originals/icons Classical/write_eeprom.png similarity index 100% rename from companion/src/images/write_eeprom.png rename to companion/src/images/originals/icons Classical/write_eeprom.png diff --git a/companion/src/images/write_eeprom_file.png b/companion/src/images/originals/icons Classical/write_eeprom_file.png similarity index 100% rename from companion/src/images/write_eeprom_file.png rename to companion/src/images/originals/icons Classical/write_eeprom_file.png diff --git a/companion/src/images/write_flash.png b/companion/src/images/originals/icons Classical/write_flash.png similarity index 100% rename from companion/src/images/write_flash.png rename to companion/src/images/originals/icons Classical/write_flash.png diff --git a/companion/src/images/originals/icons Monochrome/add64.png b/companion/src/images/originals/icons Monochrome/add64.png new file mode 100644 index 000000000..718fad0c8 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/add64.png differ diff --git a/companion/src/images/originals/icons Monochrome/apppreferences.png b/companion/src/images/originals/icons Monochrome/apppreferences.png new file mode 100644 index 000000000..058607ea4 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/apppreferences.png differ diff --git a/companion/src/images/originals/icons Monochrome/arrow-left64.png b/companion/src/images/originals/icons Monochrome/arrow-left64.png new file mode 100644 index 000000000..6fd004a19 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/arrow-left64.png differ diff --git a/companion/src/images/originals/icons Monochrome/arrow-right64.png b/companion/src/images/originals/icons Monochrome/arrow-right64.png new file mode 100644 index 000000000..69a2e6e09 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/arrow-right64.png differ diff --git a/companion/src/images/originals/icons Monochrome/changelog64.png b/companion/src/images/originals/icons Monochrome/changelog64.png new file mode 100644 index 000000000..dec43fe54 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/changelog64.png differ diff --git a/companion/src/images/originals/icons Monochrome/clear64.png b/companion/src/images/originals/icons Monochrome/clear64.png new file mode 100644 index 000000000..3e80f3ff9 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/clear64.png differ diff --git a/companion/src/images/originals/icons Monochrome/compare64.png b/companion/src/images/originals/icons Monochrome/compare64.png new file mode 100644 index 000000000..d8bc1d69b Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/compare64.png differ diff --git a/companion/src/images/originals/icons Monochrome/configure64.png b/companion/src/images/originals/icons Monochrome/configure64.png new file mode 100644 index 000000000..f0fd78cf1 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/configure64.png differ diff --git a/companion/src/images/originals/icons Monochrome/contributors64.png b/companion/src/images/originals/icons Monochrome/contributors64.png new file mode 100644 index 000000000..53dd1a7b1 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/contributors64.png differ diff --git a/companion/src/images/originals/icons Monochrome/copy64.png b/companion/src/images/originals/icons Monochrome/copy64.png new file mode 100644 index 000000000..c68e9211c Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/copy64.png differ diff --git a/companion/src/images/originals/icons Monochrome/currentmodel64.png b/companion/src/images/originals/icons Monochrome/currentmodel64.png new file mode 100644 index 000000000..c3f67e047 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/currentmodel64.png differ diff --git a/companion/src/images/originals/icons Monochrome/cut64.png b/companion/src/images/originals/icons Monochrome/cut64.png new file mode 100644 index 000000000..fa78a545d Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/cut64.png differ diff --git a/companion/src/images/originals/icons Monochrome/duplicate64.png b/companion/src/images/originals/icons Monochrome/duplicate64.png new file mode 100644 index 000000000..004a932a4 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/duplicate64.png differ diff --git a/companion/src/images/originals/icons Monochrome/edit64.png b/companion/src/images/originals/icons Monochrome/edit64.png new file mode 100644 index 000000000..68f2da48a Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/edit64.png differ diff --git a/companion/src/images/originals/icons Monochrome/exit64.png b/companion/src/images/originals/icons Monochrome/exit64.png new file mode 100644 index 000000000..d414a0551 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/exit64.png differ diff --git a/companion/src/images/originals/icons Monochrome/fuses64.png b/companion/src/images/originals/icons Monochrome/fuses64.png new file mode 100644 index 000000000..82b77d669 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/fuses64.png differ diff --git a/companion/src/images/originals/icons Monochrome/fwpreferences.png b/companion/src/images/originals/icons Monochrome/fwpreferences.png new file mode 100644 index 000000000..d6d7e2235 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/fwpreferences.png differ diff --git a/companion/src/images/originals/icons Monochrome/information64.png b/companion/src/images/originals/icons Monochrome/information64.png new file mode 100644 index 000000000..fb4dd298a Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/information64.png differ diff --git a/companion/src/images/originals/icons Monochrome/library64.png b/companion/src/images/originals/icons Monochrome/library64.png new file mode 100644 index 000000000..1b749f913 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/library64.png differ diff --git a/companion/src/images/originals/icons Monochrome/list64.png b/companion/src/images/originals/icons Monochrome/list64.png new file mode 100644 index 000000000..6245f61cc Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/list64.png differ diff --git a/companion/src/images/originals/icons Monochrome/logs64.png b/companion/src/images/originals/icons Monochrome/logs64.png new file mode 100644 index 000000000..6d0ee00ee Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/logs64.png differ diff --git a/companion/src/images/originals/icons Monochrome/movedown64.png b/companion/src/images/originals/icons Monochrome/movedown64.png new file mode 100644 index 000000000..20613585f Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/movedown64.png differ diff --git a/companion/src/images/originals/icons Monochrome/moveup64.png b/companion/src/images/originals/icons Monochrome/moveup64.png new file mode 100644 index 000000000..c6fde0d86 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/moveup64.png differ diff --git a/companion/src/images/originals/icons Monochrome/new64.png b/companion/src/images/originals/icons Monochrome/new64.png new file mode 100644 index 000000000..6f346af10 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/new64.png differ diff --git a/companion/src/images/originals/icons Monochrome/open64.png b/companion/src/images/originals/icons Monochrome/open64.png new file mode 100644 index 000000000..e4e1a7831 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/open64.png differ diff --git a/companion/src/images/originals/icons Monochrome/paintbrush.png b/companion/src/images/originals/icons Monochrome/paintbrush.png new file mode 100644 index 000000000..437655aee Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/paintbrush.png differ diff --git a/companion/src/images/originals/icons Monochrome/paste64.png b/companion/src/images/originals/icons Monochrome/paste64.png new file mode 100644 index 000000000..4f0f2108c Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/paste64.png differ diff --git a/companion/src/images/originals/icons Monochrome/print64.png b/companion/src/images/originals/icons Monochrome/print64.png new file mode 100644 index 000000000..f3b8c3710 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/print64.png differ diff --git a/companion/src/images/originals/icons Monochrome/profiles64.png b/companion/src/images/originals/icons Monochrome/profiles64.png new file mode 100644 index 000000000..27899ade0 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/profiles64.png differ diff --git a/companion/src/images/originals/icons Monochrome/read_eeprom.png b/companion/src/images/originals/icons Monochrome/read_eeprom.png new file mode 100644 index 000000000..cf7285047 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/read_eeprom.png differ diff --git a/companion/src/images/originals/icons Monochrome/read_eeprom_2.png b/companion/src/images/originals/icons Monochrome/read_eeprom_2.png new file mode 100644 index 000000000..965025aba Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/read_eeprom_2.png differ diff --git a/companion/src/images/originals/icons Monochrome/read_eeprom_file.png b/companion/src/images/originals/icons Monochrome/read_eeprom_file.png new file mode 100644 index 000000000..4a9ddb6e0 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/read_eeprom_file.png differ diff --git a/companion/src/images/originals/icons Monochrome/read_eeprom_file_2.png b/companion/src/images/originals/icons Monochrome/read_eeprom_file_2.png new file mode 100644 index 000000000..9c575eb53 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/read_eeprom_file_2.png differ diff --git a/companion/src/images/originals/icons Monochrome/read_flash.png b/companion/src/images/originals/icons Monochrome/read_flash.png new file mode 100644 index 000000000..afaeb0a72 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/read_flash.png differ diff --git a/companion/src/images/originals/icons Monochrome/read_flash_2.png b/companion/src/images/originals/icons Monochrome/read_flash_2.png new file mode 100644 index 000000000..4f3367a08 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/read_flash_2.png differ diff --git a/companion/src/images/originals/icons Monochrome/recentdocument64.png b/companion/src/images/originals/icons Monochrome/recentdocument64.png new file mode 100644 index 000000000..d1356671e Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/recentdocument64.png differ diff --git a/companion/src/images/originals/icons Monochrome/save64.png b/companion/src/images/originals/icons Monochrome/save64.png new file mode 100644 index 000000000..50c934166 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/save64.png differ diff --git a/companion/src/images/originals/icons Monochrome/saveas64.png b/companion/src/images/originals/icons Monochrome/saveas64.png new file mode 100644 index 000000000..df85fb89b Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/saveas64.png differ diff --git a/companion/src/images/originals/icons Monochrome/simulate64.png b/companion/src/images/originals/icons Monochrome/simulate64.png new file mode 100644 index 000000000..be9e47bbc Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/simulate64.png differ diff --git a/companion/src/images/originals/icons Monochrome/txactionico.svg b/companion/src/images/originals/icons Monochrome/txactionico.svg new file mode 100644 index 000000000..2f7ef4085 --- /dev/null +++ b/companion/src/images/originals/icons Monochrome/txactionico.svg @@ -0,0 +1,816 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/companion/src/images/originals/icons Monochrome/update64.png b/companion/src/images/originals/icons Monochrome/update64.png new file mode 100644 index 000000000..acc8d9c43 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/update64.png differ diff --git a/companion/src/images/originals/icons Monochrome/wizard64.png b/companion/src/images/originals/icons Monochrome/wizard64.png new file mode 100644 index 000000000..71f45dd16 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/wizard64.png differ diff --git a/companion/src/images/originals/icons Monochrome/write_eeprom.png b/companion/src/images/originals/icons Monochrome/write_eeprom.png new file mode 100644 index 000000000..aba6c6371 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/write_eeprom.png differ diff --git a/companion/src/images/originals/icons Monochrome/write_eeprom_2.png b/companion/src/images/originals/icons Monochrome/write_eeprom_2.png new file mode 100644 index 000000000..7092df3ab Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/write_eeprom_2.png differ diff --git a/companion/src/images/originals/icons Monochrome/write_eeprom_file.png b/companion/src/images/originals/icons Monochrome/write_eeprom_file.png new file mode 100644 index 000000000..f43584b91 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/write_eeprom_file.png differ diff --git a/companion/src/images/originals/icons Monochrome/write_eeprom_file_2.png b/companion/src/images/originals/icons Monochrome/write_eeprom_file_2.png new file mode 100644 index 000000000..7c924904f Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/write_eeprom_file_2.png differ diff --git a/companion/src/images/originals/icons Monochrome/write_flash.png b/companion/src/images/originals/icons Monochrome/write_flash.png new file mode 100644 index 000000000..b98ea4d19 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/write_flash.png differ diff --git a/companion/src/images/originals/icons Monochrome/write_flash_2.png b/companion/src/images/originals/icons Monochrome/write_flash_2.png new file mode 100644 index 000000000..e63f7cae5 Binary files /dev/null and b/companion/src/images/originals/icons Monochrome/write_flash_2.png differ diff --git a/companion/src/images/originals/icons Yerico/add.png b/companion/src/images/originals/icons Yerico/add.png new file mode 100644 index 000000000..dbb1e9449 Binary files /dev/null and b/companion/src/images/originals/icons Yerico/add.png differ diff --git a/companion/src/images/originals/icons Yerico/arrow-left.png b/companion/src/images/originals/icons Yerico/arrow-left.png new file mode 100644 index 000000000..759e58950 Binary files /dev/null and b/companion/src/images/originals/icons Yerico/arrow-left.png differ diff --git a/companion/src/images/originals/icons Yerico/arrow-right.png b/companion/src/images/originals/icons Yerico/arrow-right.png new file mode 100644 index 000000000..1d056715f Binary files /dev/null and b/companion/src/images/originals/icons Yerico/arrow-right.png differ diff --git a/companion/src/images/originals/icons Yerico/changelog.png b/companion/src/images/originals/icons Yerico/changelog.png new file mode 100644 index 000000000..3c60e6745 Binary files /dev/null and b/companion/src/images/originals/icons Yerico/changelog.png differ diff --git a/companion/src/images/originals/icons Yerico/clear.png b/companion/src/images/originals/icons Yerico/clear.png new file mode 100644 index 000000000..1941bedf7 Binary files /dev/null and b/companion/src/images/originals/icons Yerico/clear.png differ diff --git a/companion/src/images/originals/icons Yerico/contributors.png b/companion/src/images/originals/icons Yerico/contributors.png new file mode 100644 index 000000000..be8840906 Binary files /dev/null and b/companion/src/images/originals/icons Yerico/contributors.png differ diff --git a/companion/src/images/originals/icons Yerico/currentmodel.png b/companion/src/images/originals/icons Yerico/currentmodel.png new file mode 100644 index 000000000..a37b9e341 Binary files /dev/null and b/companion/src/images/originals/icons Yerico/currentmodel.png differ diff --git a/companion/src/images/originals/icons Yerico/duplicate.png b/companion/src/images/originals/icons Yerico/duplicate.png new file mode 100644 index 000000000..811691d98 Binary files /dev/null and b/companion/src/images/originals/icons Yerico/duplicate.png differ diff --git a/companion/src/images/originals/icons Yerico/edit.png b/companion/src/images/originals/icons Yerico/edit.png new file mode 100644 index 000000000..38bb9d672 Binary files /dev/null and b/companion/src/images/originals/icons Yerico/edit.png differ diff --git a/companion/src/images/originals/icons Yerico/exit.png b/companion/src/images/originals/icons Yerico/exit.png new file mode 100644 index 000000000..dcd5cafbe Binary files /dev/null and b/companion/src/images/originals/icons Yerico/exit.png differ diff --git a/companion/src/images/originals/icons Yerico/fuses.png b/companion/src/images/originals/icons Yerico/fuses.png new file mode 100644 index 000000000..f5cf7e680 Binary files /dev/null and b/companion/src/images/originals/icons Yerico/fuses.png differ diff --git a/companion/src/images/originals/icons Yerico/library.png b/companion/src/images/originals/icons Yerico/library.png new file mode 100644 index 000000000..13b537590 Binary files /dev/null and b/companion/src/images/originals/icons Yerico/library.png differ diff --git a/companion/src/images/originals/icons Yerico/list.png b/companion/src/images/originals/icons Yerico/list.png new file mode 100644 index 000000000..fd4db26dc Binary files /dev/null and b/companion/src/images/originals/icons Yerico/list.png differ diff --git a/companion/src/images/originals/icons Yerico/movedown.png b/companion/src/images/originals/icons Yerico/movedown.png new file mode 100644 index 000000000..be856ff29 Binary files /dev/null and b/companion/src/images/originals/icons Yerico/movedown.png differ diff --git a/companion/src/images/originals/icons Yerico/moveup.png b/companion/src/images/originals/icons Yerico/moveup.png new file mode 100644 index 000000000..c2668e845 Binary files /dev/null and b/companion/src/images/originals/icons Yerico/moveup.png differ diff --git a/companion/src/images/originals/icons Yerico/play.png b/companion/src/images/originals/icons Yerico/play.png new file mode 100644 index 000000000..4593525f2 Binary files /dev/null and b/companion/src/images/originals/icons Yerico/play.png differ diff --git a/companion/src/images/originals/icons Yerico/stop.png b/companion/src/images/originals/icons Yerico/stop.png new file mode 100644 index 000000000..3bf2af6e9 Binary files /dev/null and b/companion/src/images/originals/icons Yerico/stop.png differ diff --git a/companion/src/images/originals/icons Yerico/switch_dir.png b/companion/src/images/originals/icons Yerico/switch_dir.png new file mode 100644 index 000000000..a9ba5f47a Binary files /dev/null and b/companion/src/images/originals/icons Yerico/switch_dir.png differ diff --git a/companion/src/images/originals/icons Yerico/wizard.png b/companion/src/images/originals/icons Yerico/wizard.png new file mode 100644 index 000000000..b444693d0 Binary files /dev/null and b/companion/src/images/originals/icons Yerico/wizard.png differ diff --git a/companion/src/images/originals/icons Yerico/yerico_icons_16.svg b/companion/src/images/originals/icons Yerico/yerico_icons_16.svg new file mode 100644 index 000000000..ff1c2b31a --- /dev/null +++ b/companion/src/images/originals/icons Yerico/yerico_icons_16.svg @@ -0,0 +1,5290 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/companion/src/images/originals/icons Yerico/yerico_icons_24.svg b/companion/src/images/originals/icons Yerico/yerico_icons_24.svg new file mode 100644 index 000000000..32221c916 --- /dev/null +++ b/companion/src/images/originals/icons Yerico/yerico_icons_24.svg @@ -0,0 +1,5677 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/companion/src/images/originals/icons Yerico/yerico_icons_32.svg b/companion/src/images/originals/icons Yerico/yerico_icons_32.svg new file mode 100644 index 000000000..7e7ac35ba --- /dev/null +++ b/companion/src/images/originals/icons Yerico/yerico_icons_32.svg @@ -0,0 +1,8892 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/companion/src/images/originals/icons Yerico/yerico_icons_48.svg b/companion/src/images/originals/icons Yerico/yerico_icons_48.svg new file mode 100644 index 000000000..45060b024 --- /dev/null +++ b/companion/src/images/originals/icons Yerico/yerico_icons_48.svg @@ -0,0 +1,8018 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/companion/src/images/originals/icons Yerico/yerico_icons_all.svg b/companion/src/images/originals/icons Yerico/yerico_icons_all.svg new file mode 100644 index 000000000..2ee4a4c27 --- /dev/null +++ b/companion/src/images/originals/icons Yerico/yerico_icons_all.svg @@ -0,0 +1,16562 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/companion/src/images/originals/vector-logo.odg b/companion/src/images/originals/logotypes/old_opentx_companion_logo.odg similarity index 100% rename from companion/src/images/originals/vector-logo.odg rename to companion/src/images/originals/logotypes/old_opentx_companion_logo.odg 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/scripts/addblackoutline.sh b/companion/src/images/originals/scripts/addblackoutline.sh new file mode 100755 index 000000000..41e2876bd --- /dev/null +++ b/companion/src/images/originals/scripts/addblackoutline.sh @@ -0,0 +1,10 @@ +#!/bin/bash +for file in $(ls *png) +do + convert $file \( +clone \ + -channel A -morphology EdgeOut Diamond +channel \ + +level-colors black \ + \) -compose DstOver -composite $file +done + + diff --git a/companion/src/images/originals/scripts/fwpreferences.png b/companion/src/images/originals/scripts/fwpreferences.png new file mode 100644 index 000000000..09505a474 Binary files /dev/null and b/companion/src/images/originals/scripts/fwpreferences.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/vector-logo.svg b/companion/src/images/originals/vector-logo.svg deleted file mode 100644 index 40a99a3b0..000000000 --- a/companion/src/images/originals/vector-logo.svg +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - COMPANION - - - - - - O - - - - - P - - - - - E - - - - - N - - - - - - - - - \ No newline at end of file diff --git a/companion/src/images/splash.png b/companion/src/images/splash.png index 8c55b1551..c1dd30dec 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 25cdc0871..1de729daf 100644 Binary files a/companion/src/images/splasht.png and b/companion/src/images/splasht.png differ diff --git a/companion/src/imgpreferences.ui b/companion/src/imgpreferences.ui new file mode 100644 index 000000000..31209088d --- /dev/null +++ b/companion/src/imgpreferences.ui @@ -0,0 +1,481 @@ + + + preferencesDialog + + + + 0 + 0 + 685 + 418 + + + + + 0 + 0 + + + + + 685 + 0 + + + + Preferences + + + + QLayout::SetMinimumSize + + + 2 + + + 4 + + + + + 8 + + + + + + + true + + + true + + + + + + + + 0 + 0 + + + + Simu BackLight + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Simulator capture folder + + + + + + + + 0 + 0 + + + + Joystick + + + + + + + Remember simulator switches + + + + + + + + + + + + + + + + + 0 + 0 + + + + + + + + Enable + + + + + + + + + Use clipboard only + + + + + + + Calibrate + + + + + + + + + + Blue + + + + + Green + + + + + Red + + + + + Orange + + + + + Yellow + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Open Folder + + + false + + + + + + + + + Qt::Horizontal + + + + + + + + + + 0 + 0 + + + + Personal splash library + + + + + + + + + true + + + true + + + + + + + Open Folder + + + + + + + + + + + + 0 + 0 + + + + + Include companion splashes + + + + + Only user defined splashes + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 0 + 0 + + + + Splash library behaviour + + + + + + + + + Qt::Horizontal + + + + + + + + + + 0 + 0 + + + + Custom TX splash screen + + + + + + + + + true + + + true + + + + + + + + 0 + 0 + + + + Open Image + + + + + + + + + + + + + ... + + + + + + + ... + + + + + + + false + + + Invert Pixels + + + + + + + + + + 0 + 0 + + + + + 128 + 64 + + + + + 128 + 64 + + + + QFrame::Panel + + + QFrame::Raised + + + + + + true + + + + + + + + + + + Qt::Horizontal + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + + + + buttonBox + accepted() + preferencesDialog + accept() + + + 370 + 49 + + + 157 + 274 + + + + + buttonBox + rejected() + preferencesDialog + reject() + + + 390 + 55 + + + 286 + 274 + + + + + diff --git a/companion/src/logsdialog.cpp b/companion/src/logsdialog.cpp index d86b2efb3..7a4b6745b 100644 --- a/companion/src/logsdialog.cpp +++ b/companion/src/logsdialog.cpp @@ -1,6 +1,8 @@ #include "logsdialog.h" +#include "appdata.h" #include "ui_logsdialog.h" #include "qcustomplot.h" +#include "helpers.h" #if defined WIN32 || !defined __GNUC__ #include #else @@ -14,6 +16,7 @@ logsDialog::logsDialog(QWidget *parent) : csvlog.clear(); srand(QDateTime::currentDateTime().toTime_t()); ui->setupUi(this); + this->setWindowIcon(CompanionIcon("logs.png")); palette.clear(); plotLock=false; for (int i=0; i< 60; i++) @@ -38,8 +41,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("companion", "companion"); - QString Path=settings.value("gePath", "").toString(); + QString Path=g.gePath(); if (Path.isEmpty() || !QFile(Path).exists()) { ui->mapsButton->hide(); } @@ -202,8 +204,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("companion", "companion"); - QString gePath=settings.value("gePath", "").toString(); + QString gePath=g.gePath(); if (gePath.isEmpty() || !QFile(gePath).exists()) { ui->FieldsTW->setDisabled(false); ui->logTable->setDisabled(false); @@ -262,8 +263,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 +296,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 +323,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 +345,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,10 +586,9 @@ void logsDialog::moveLegend() void logsDialog::on_fileOpen_BT_clicked() { - QSettings settings("companion", "companion"); - QString fileName = QFileDialog::getOpenFileName(this,tr("Select your log file"), settings.value("lastLogDir").toString()); + QString fileName = QFileDialog::getOpenFileName(this,tr("Select your log file"), g.logDir()); if (!fileName.isEmpty()) { - settings.setValue("lastLogDir", fileName); + g.logDir( fileName ); ui->FileName_LE->setText(fileName); if (cvsFileParse()) { ui->FieldsTW->clear(); @@ -650,7 +657,7 @@ bool logsDialog::cvsFileParse() QString line=buffer.trimmed(); list.clear(); if(line.size()<1){ - list << ""; + list << ""; } else { while (line.size()>pos2 && (pos2 = rx2.indexIn(line, pos2)) != -1) { QString col; diff --git a/companion/src/logsdialog.ui b/companion/src/logsdialog.ui index c645110d0..0ea51523e 100644 --- a/companion/src/logsdialog.ui +++ b/companion/src/logsdialog.ui @@ -13,10 +13,6 @@ Companion Log Viewer - - - :/icon.png:/icon.png - true @@ -70,7 +66,16 @@ 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -188,7 +193,7 @@ 0 - true + false 18 diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index 9c8bc2af3..0f8d36389 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -42,13 +42,15 @@ #include #include #include +#include #include "mainwindow.h" #include "mdichild.h" #include "burnconfigdialog.h" #include "avroutputdialog.h" #include "comparedialog.h" #include "logsdialog.h" -#include "preferencesdialog.h" +#include "apppreferencesdialog.h" +#include "fwpreferencesdialog.h" #include "flashinterface.h" #include "fusesdialog.h" #include "downloaddialog.h" @@ -59,65 +61,59 @@ #include "burndialog.h" #include "hexinterface.h" #include "warnings.h" +#include "helpers.h" +#include "appdata.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); mdiArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); setCentralWidget(mdiArea); - connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)), - this, SLOT(updateMenus())); + connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(updateMenus())); windowMapper = new QSignalMapper(this); - connect(windowMapper, SIGNAL(mapped(QWidget*)), - this, SLOT(setActiveSubWindow(QWidget*))); + connect(windowMapper, SIGNAL(mapped(QWidget*)), this, SLOT(setActiveSubWindow(QWidget*))); - MaxRecentFiles=MAX_RECENT; createActions(); createMenus(); createToolBars(); createStatusBar(); updateMenus(); - readSettings(); - FirmwareInfo *firmware = GetCurrentFirmware(); - if (ActiveProfile) { - 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)); - } + restoreState(g.mainWinState()); + setUnifiedTitleAndToolBarOnMac(true); this->setWindowIcon(QIcon(":/icon.png")); + this->setIconSize(QSize(32, 32)); QNetworkProxyFactory::setUseSystemConfiguration(true); setAcceptDrops(true); // give time to the splash to disappear and main window to open before starting updates int updateDelay = 1000; - QSettings settings("companion", "companion"); - bool showSplash = settings.value("show_splash", true).toBool(); - if (showSplash) - updateDelay += (SPLASH_TIME*1000); + bool showSplash = g.showSplash(); + if (showSplash) { + updateDelay += (SPLASH_TIME*1000); + } QTimer::singleShot(updateDelay, this, SLOT(doAutoUpdates())); QTimer::singleShot(updateDelay, this, SLOT(displayWarnings())); @@ -143,7 +139,7 @@ downloadDialog_forWait(NULL) int fileType = getFileType(str); if(fileType==FILE_TYPE_HEX) { - burnToFlash(str); + writeFlash(str); } if(fileType==FILE_TYPE_EEPE || fileType==FILE_TYPE_EEPM || fileType==FILE_TYPE_BIN) { @@ -167,8 +163,7 @@ downloadDialog_forWait(NULL) void MainWindow::displayWarnings() { - QSettings settings("companion", "companion"); - int warnId=settings.value("warningId", 0 ).toInt(); + int warnId=g.warningId(); if (warnId0) { @@ -179,10 +174,10 @@ void MainWindow::displayWarnings() 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); + g.warningId(WARNING_ID); } } else if (warnId==0) { - settings.setValue("warningId", WARNING_ID); + g.warningId(WARNING_ID); } } @@ -201,12 +196,11 @@ void MainWindow::checkForUpdates(bool ignoreSettings, QString & fwId) showcheckForUpdatesResult = ignoreSettings; check1done = true; check2done = true; - QSettings settings("companion", "companion"); fwToUpdate = fwId; QString stamp = GetFirmware(fwToUpdate)->stamp; if (!stamp.isEmpty()) { - if (checkFW || ignoreSettings) { + if (g.autoCheckFw() || ignoreSettings) { check1done=false; manager1 = new QNetworkAccessManager(this); connect(manager1, SIGNAL(finished(QNetworkReply*)), this, SLOT(reply1Finished(QNetworkReply*))); @@ -217,7 +211,7 @@ void MainWindow::checkForUpdates(bool ignoreSettings, QString & fwId) } } - if (checkCompanion9x || ignoreSettings) { + if (g.autoCheckApp() || ignoreSettings) { check2done = false; manager2 = new QNetworkAccessManager(this); connect(manager2, SIGNAL(finished(QNetworkReply*)),this, SLOT(checkForUpdateFinished(QNetworkReply*))); @@ -267,24 +261,22 @@ void MainWindow::checkForUpdateFinished(QNetworkReply * reply) "Would you like to download it?").arg(version) , QMessageBox::Yes | QMessageBox::No); - QSettings settings("companion", "companion"); - if (ret == QMessageBox::Yes) { #if defined __APPLE__ - QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"), settings.value("lastUpdatesDir").toString() + QString(C9X_INSTALLER).arg(version)); + QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"), g.updatesDir() + QString(C9X_INSTALLER).arg(version)); #else - QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"), settings.value("lastUpdatesDir").toString() + QString(C9X_INSTALLER).arg(version), tr("Executable (*.exe)")); + QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"), g.updatesDir() + QString(C9X_INSTALLER).arg(version), tr("Executable (*.exe)")); #endif if (!fileName.isEmpty()) { - settings.setValue("lastUpdatesDir", QFileInfo(fileName).dir().absolutePath()); - downloadDialog * dd = new downloadDialog(this, QString(C9X_URL).arg(version), fileName); + g.updatesDir(QFileInfo(fileName).dir().absolutePath()); + 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) @@ -309,20 +301,19 @@ void MainWindow::updateDownloaded() void MainWindow::downloadLatestFW(FirmwareInfo * firmware, const QString & firmwareId) { QString url, ext, cpuid; - QSettings settings("companion", "companion"); url = firmware->getUrl(firmwareId); - cpuid=settings.value("cpuid","").toString(); + cpuid=g.cpuId(); ext = url.mid(url.lastIndexOf(".")); - QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"), settings.value("lastFlashDir").toString() + "/" + firmwareId + ext); + QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"), g.flashDir() + "/" + firmwareId + ext); if (!fileName.isEmpty()) { downloadedFW = firmwareId; needRename=true; - downloadedFWFilename = fileName; + g.profile[g.id()].fwName( fileName ); if (!cpuid.isEmpty()) { url.append("&cpuid="); url.append(cpuid); } - settings.setValue("lastFlashDir", QFileInfo(fileName).dir().absolutePath()); + g.flashDir(QFileInfo(fileName).dir().absolutePath()); downloadDialog * dd = new downloadDialog(this, url, fileName); connect(dd, SIGNAL(accepted()), this, SLOT(reply1Accepted())); dd->exec(); @@ -332,11 +323,7 @@ void MainWindow::downloadLatestFW(FirmwareInfo * firmware, const QString & firmw void MainWindow::reply1Accepted() { QString errormsg; - QSettings settings("companion", "companion"); - bool autoflash=settings.value("burnFirmware", true).toBool(); - bool addversion=settings.value("rename_firmware_files", false).toBool(); - settings.beginGroup("FwRevisions"); - if (downloadedFWFilename.isEmpty()) { + if (g.profile[g.id()].fwName().isEmpty()) { if (!(downloadedFW.isEmpty())) { QFile file(downloadedFW); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { //reading HEX TEXT file @@ -370,19 +357,18 @@ void MainWindow::reply1Accepted() } file.close(); QMessageBox::critical(this, tr("Error"), errormsg); - settings.endGroup(); return; } file.close(); currentFWrev = currentFWrev_temp; - settings.setValue(downloadedFW, currentFWrev); + g.fwRev.set(downloadedFW, currentFWrev); } } else { - QFile file(downloadedFWFilename); + QFile file(g.profile[g.id()].fwName()); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { //reading HEX TEXT file QMessageBox::critical(this, tr("Error"), tr("Error opening file %1:\n%2.") - .arg(downloadedFWFilename) + .arg(g.profile[g.id()].fwName()) .arg(file.errorString())); return; } @@ -410,17 +396,16 @@ void MainWindow::reply1Accepted() } file.close(); QMessageBox::critical(this, tr("Error"), errormsg); - settings.endGroup(); return; } file.close(); - FlashInterface flash(downloadedFWFilename); + FlashInterface flash(g.profile[g.id()].fwName()); QString rev=flash.getSvn(); int pos=rev.lastIndexOf("-r"); if (pos>0) { currentFWrev=rev.mid(pos+2).toInt(); - if (addversion && needRename) { - QFileInfo fi(downloadedFWFilename); + if (g.profile[g.id()].renameFwFiles() && needRename) { + QFileInfo fi(g.profile[g.id()].fwName()); QString path=fi.path()+QDir::separator (); path.append(fi.completeBaseName()); path.append(rev.mid(pos)); @@ -428,19 +413,18 @@ void MainWindow::reply1Accepted() path.append(fi.suffix()); QDir qd; qd.remove(path); - qd.rename(downloadedFWFilename,path); - downloadedFWFilename=path; + qd.rename(g.profile[g.id()].fwName(),path); + g.profile[g.id()].fwName(path); } - settings.setValue(downloadedFW, currentFWrev); - if (autoflash) { + g.fwRev.set(downloadedFW, currentFWrev); + if (g.profile[g.id()].burnFirmware()) { 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); + writeFlash(g.profile[g.id()].fwName()); } } } } - settings.endGroup(); } void MainWindow::reply1Finished(QNetworkReply * reply) @@ -456,8 +440,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply) // TODO delete downloadDialog_forWait? } - QSettings settings("companion", "companion"); - cpuid=settings.value("cpuid","").toString(); + cpuid=g.cpuId(); QByteArray qba = reply->readAll(); int i = qba.indexOf("SVN_VERS"); int warning = qba.indexOf("WARNING"); @@ -471,17 +454,13 @@ void MainWindow::reply1Finished(QNetworkReply * reply) if(!cres) { QMessageBox::warning(this, "Companion", tr("Unable to check for updates.")); - int server = settings.value("fwserver",0).toInt(); - server++; - settings.setValue("fwserver",server); + g.fwServerFails(g.fwServerFails()+1); return; } if(rev>0) { NewFwRev=rev; - settings.beginGroup("FwRevisions"); - OldFwRev = settings.value(fwToUpdate, 0).toInt(); - settings.endGroup(); + OldFwRev = g.fwRev.get(fwToUpdate); QMessageBox msgBox; QSpacerItem* horizontalSpacer = new QSpacerItem(500, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); QGridLayout* layout = (QGridLayout*)msgBox.layout(); @@ -489,7 +468,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply) if (OldFwRev == 0) { showcheckForUpdatesResult = false; // update is available - do not show dialog QString rn = GetFirmware(fwToUpdate)->rnurl; - QAbstractButton *rnButton; + QAbstractButton *rnButton = NULL; 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); @@ -552,9 +531,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply) if (ignore) { 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); - settings.endGroup(); + g.fwRev.set(fwToUpdate, NewFwRev); } } else if (download == true) { if (warning>0) { @@ -571,20 +548,20 @@ void MainWindow::reply1Finished(QNetworkReply * reply) QString url = GetFirmware(fwToUpdate)->getUrl(fwToUpdate); QString ext = url.mid(url.lastIndexOf(".")); needRename=false; - bool addversion=settings.value("rename_firmware_files", false).toBool(); + bool addversion=g.profile[g.id()].renameFwFiles(); QString fileName; if (addversion) { - fileName = QFileDialog::getSaveFileName(this, tr("Save As"), settings.value("lastFlashDir").toString() + "/" + fwToUpdate + newrev + ext); + fileName = QFileDialog::getSaveFileName(this, tr("Save As"), g.flashDir() + "/" + fwToUpdate + newrev + ext); } else { - fileName = QFileDialog::getSaveFileName(this, tr("Save As"), settings.value("lastFlashDir").toString() + "/" + fwToUpdate + ext); + fileName = QFileDialog::getSaveFileName(this, tr("Save As"), g.flashDir() + "/" + fwToUpdate + ext); } if (!fileName.isEmpty()) { if (!cpuid.isEmpty()) { url.append("&cpuid="); url.append(cpuid); } - downloadedFWFilename = fileName; - settings.setValue("lastFlashDir", QFileInfo(fileName).dir().absolutePath()); + g.profile[g.id()].fwName( fileName ); + g.flashDir(QFileInfo(fileName).dir().absolutePath()); downloadDialog * dd = new downloadDialog(this, url, fileName); currentFWrev_temp = NewFwRev; connect(dd, SIGNAL(accepted()), this, SLOT(reply1Accepted())); @@ -598,9 +575,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply) } else { if(check1done && check2done) { QMessageBox::warning(this, "Companion", tr("Unable to check for updates.")); - int server = settings.value("fwserver",0).toInt(); - server++; - settings.setValue("fwserver",server); + g.fwServerFails(g.fwServerFails()+1); return; } } @@ -608,15 +583,50 @@ void MainWindow::reply1Finished(QNetworkReply * reply) void MainWindow::closeEvent(QCloseEvent *event) { + g.mainWinGeo(saveGeometry()); + g.mainWinState(saveState()); mdiArea->closeAllSubWindows(); if (mdiArea->currentSubWindow()) { event->ignore(); - } else { - writeSettings(); + } + else { event->accept(); } } +void MainWindow::setLanguage(QString langString) +{ + g.locale( langString ); + + QMessageBox msgBox; + msgBox.setText(tr("The selected language will be used the next time you start Companion.")); + msgBox.setIcon(QMessageBox::Information); + msgBox.addButton(tr("OK"), QMessageBox::AcceptRole); + msgBox.exec(); +} + +void MainWindow::setTheme(int index) +{ + g.theme( index ); + + QMessageBox msgBox; + msgBox.setText(tr("The new theme will be loaded the next time you start Companion.")); + msgBox.setIcon(QMessageBox::Information); + msgBox.addButton(tr("OK"), QMessageBox::AcceptRole); + msgBox.exec(); +} + +void MainWindow::setIconThemeSize(int index) +{ + g.iconSize( index ); + + QMessageBox msgBox; + msgBox.setText(tr("The icon size will be used the next time you start Companion.")); + msgBox.setIcon(QMessageBox::Information); + msgBox.addButton(tr("OK"), QMessageBox::AcceptRole); + msgBox.exec(); +} + void MainWindow::newFile() { MdiChild *child = createMdiChild(); @@ -624,12 +634,17 @@ void MainWindow::newFile() child->show(); } +void MainWindow::openDocURL() +{ + QString link = "http://www.open-tx.org/documents.html"; + QDesktopServices::openUrl(QUrl(link)); +} + void MainWindow::openFile() { - QSettings settings("companion", "companion"); - QString fileName = QFileDialog::getOpenFileName(this, tr("Open"), settings.value("lastDir").toString(),tr(EEPROM_FILES_FILTER)); + QString fileName = QFileDialog::getOpenFileName(this, tr("Open Models and Settings file"), g.eepromDir(), tr(EEPROM_FILES_FILTER)); if (!fileName.isEmpty()) { - settings.setValue("lastDir", QFileInfo(fileName).dir().absolutePath()); + g.eepromDir(QFileInfo(fileName).dir().absolutePath()); QMdiSubWindow *existing = findMdiChild(fileName); if (existing) { @@ -658,98 +673,57 @@ void MainWindow::saveAs() } void MainWindow::openRecentFile() - { - QSettings settings("companion", "companion"); - QAction *action = qobject_cast(sender()); - if (action) { - QString fileName=action->data().toString(); - // settings.setValue("lastDir", QFileInfo(fileName).dir().absolutePath()); - - QMdiSubWindow *existing = findMdiChild(fileName); - if (existing) { - mdiArea->setActiveSubWindow(existing); - return; - } +{ + QAction *action = qobject_cast(sender()); + if (action) { + QString fileName = action->data().toString(); + QMdiSubWindow *existing = findMdiChild(fileName); + if (existing) { + mdiArea->setActiveSubWindow(existing); + } + else { MdiChild *child = createMdiChild(); if (child->loadFile(fileName)) { - statusBar()->showMessage(tr("File loaded"), 2000); - child->show(); + statusBar()->showMessage(tr("File loaded"), 2000); + child->show(); } } + } } -void MainWindow::loadProfile() +void MainWindow::loadProfile() //TODO Load all variables - Also HW! { - QSettings settings("companion", "companion"); QAction *action = qobject_cast(sender()); - int chord,defmod, burnfw; - bool renfw; if (action) { + // Set the new profile number int profnum=action->data().toInt(); - QSettings settings("companion", "companion"); - settings.setValue("ActiveProfile",profnum); - settings.beginGroup("Profiles"); - QString profile=QString("profile%1").arg(profnum); - settings.beginGroup(profile); - ActiveProfile=profnum; - ActiveProfileName=settings.value("Name", "").toString(); - chord=settings.value("default_channel_order", 0).toInt(); - defmod=settings.value("default_mode", 0).toInt(); - burnfw=settings.value("burnFirmware", 0).toInt(); - QString sdPath=settings.value("sdPath", ".").toString(); - renfw=settings.value("rename_firmware_files", false).toBool(); - QString SplashFileName=settings.value("SplashFileName","").toString(); - QString SplashImage=settings.value("SplashImage", "").toString(); - QString firmware_id=settings.value("firmware", default_firmware_variant.id).toString(); - firmware_id.replace("open9x","opentx"); - firmware_id.replace("x9da","taranis"); - settings.setValue("firmware", firmware_id); - settings.endGroup(); - settings.endGroup(); - settings.setValue("default_channel_order", chord); - settings.setValue("default_mode", defmod); - settings.setValue("burnFirmware", burnfw); - settings.setValue("rename_firmware_files", renfw); - settings.setValue("sdPath", sdPath); - settings.setValue("SplashFileName", SplashFileName); - settings.setValue("SplashImage", SplashImage); - settings.setValue("firmware", firmware_id); - settings.setValue("profileId", profnum); - current_firmware_variant = GetFirmwareVariant(firmware_id); - FirmwareInfo *firmware = GetCurrentFirmware(); - setWindowTitle(tr("Companion - Models and Settings Editor - %1").arg(firmware->name)); - // settings.setValue("lastDir", QFileInfo(fileName).dir().absolutePath()); + g.id( profnum ); + + // TODO Get rid of this global variable - The profile.firmware is the real source + current_firmware_variant = GetFirmwareVariant(g.profile[g.id()].fwType()); + foreach (QMdiSubWindow *window, mdiArea->subWindowList()) { MdiChild *mdiChild = qobject_cast(window->widget()); mdiChild->eepromInterfaceChanged(); } - setWindowTitle(tr("Companion - Models and Settings Editor - %1 - profile %2").arg(firmware->name).arg(ActiveProfileName)); + + updateMenus(); } } -void MainWindow::unloadProfile() +void MainWindow::appPrefs() { - ActiveProfile=0; - ActiveProfileName=""; - QSettings settings("companion", "companion"); - settings.setValue("ActiveProfile",0); - FirmwareInfo *firmware = GetCurrentFirmware(); - setWindowTitle(tr("Companion - Models and Settings Editor - %1").arg(firmware->name)); -} - -void MainWindow::preferences() -{ - preferencesDialog *pd = new preferencesDialog(this); + appPreferencesDialog *pd = new appPreferencesDialog(this); pd->exec(); - FirmwareInfo *firmware = GetCurrentFirmware(); - if (ActiveProfile) { - 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)); - } + updateMenus(); +} +void MainWindow::fwPrefs() +{ + fwPreferencesDialog *pd = new fwPreferencesDialog(this); + pd->exec(); foreach (QMdiSubWindow *window, mdiArea->subWindowList()) { MdiChild *mdiChild = qobject_cast(window->widget()); mdiChild->eepromInterfaceChanged(); @@ -809,10 +783,10 @@ void MainWindow::paste() activeMdiChild()->paste(); } -void MainWindow::burnTo() +void MainWindow::writeEeprom() { if (activeMdiChild()) - activeMdiChild()->burnTo(); + activeMdiChild()->writeEeprom(); } void MainWindow::simulate() @@ -1033,7 +1007,7 @@ QString MainWindow::FindTaranisPath() } -void MainWindow::burnFrom() +void MainWindow::readEeprom() { QString tempDir = QDir::tempPath(); QString tempFile; @@ -1056,17 +1030,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); @@ -1074,22 +1048,21 @@ void MainWindow::burnFrom() } } -void MainWindow::burnExtenalToEEPROM() +void MainWindow::writeFileToEeprom() { - QSettings settings("companion", "companion"); 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()); + g.eepromDir(QFileInfo(fileName).dir().absolutePath()); 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, "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(); + bool backupEnable = g.enableBackup(); + QString backupPath = g.backupDir(); if (!backupPath.isEmpty()) { if (!QDir(backupPath).exists()) { if (backupEnable) { @@ -1113,14 +1086,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); } @@ -1130,7 +1103,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"; @@ -1143,7 +1116,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; @@ -1163,15 +1137,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); } } @@ -1181,19 +1158,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; } } } @@ -1217,17 +1198,15 @@ bool MainWindow::isValidEEPROM(QString eepromfile) if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) return false; eeprom_size = file.size(); - uint8_t *eeprom = (uint8_t *)malloc(eeprom_size); + QByteArray eeprom(eeprom_size, 0); QTextStream inputStream(&file); - eeprom_size = HexInterface(inputStream).load(eeprom, eeprom_size); + eeprom_size = HexInterface(inputStream).load((uint8_t *)eeprom.data(), eeprom_size); if (!eeprom_size) { - free(eeprom); return false; } file.close(); RadioData * radioData = new RadioData(); - bool result = LoadEeprom(*radioData, eeprom, eeprom_size); - free(eeprom); + bool result = LoadEeprom(*radioData, (uint8_t *)eeprom.data(), eeprom_size); delete radioData; return result; } @@ -1235,17 +1214,14 @@ bool MainWindow::isValidEEPROM(QString eepromfile) 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 read = file.read((char*)eeprom, eeprom_size); + QByteArray eeprom(eeprom_size, 0); + long read = file.read(eeprom.data(), eeprom_size); file.close(); if (read != eeprom_size) { - free(eeprom); return false; } RadioData * radioData = new RadioData(); - bool result = LoadEeprom(*radioData, eeprom, eeprom_size); - free(eeprom); + bool result = LoadEeprom(*radioData, (uint8_t *)eeprom.data(), eeprom_size); delete radioData; return result; } @@ -1285,7 +1261,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); } } @@ -1298,35 +1275,30 @@ bool MainWindow::convertEEPROM(QString backupFile, QString restoreFile, QString if (!file.open(QIODevice::ReadOnly)) return false; - uint8_t *eeprom = (uint8_t *)malloc(eeprom_size); - long result = file.read((char*)eeprom, eeprom_size); + QByteArray eeprom(eeprom_size, 0); + long result = file.read(eeprom.data(), 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, (uint8_t *)eeprom.data(), eeprom_size) || !firmware->saveEEPROM((uint8_t *)eeprom.data(), *radioData, variant, version)) return false; QFile file2(restoreFile); if (!file2.open(QIODevice::WriteOnly)) return false; - result = file2.write((char*)eeprom, eeprom_size); + result = file2.write(eeprom.constData(), eeprom_size); file2.close(); if (result != eeprom_size) return false; - free(eeprom); return true; } -void MainWindow::burnToFlash(QString fileToFlash) +void MainWindow::writeFlash(QString fileToFlash) { - QSettings settings("companion", "companion"); QString fileName; - bool backup = settings.value("backupOnFlash", false).toBool(); + bool backup = g.backupOnFlash(); if(!fileToFlash.isEmpty()) fileName = fileToFlash; burnDialog *cd = new burnDialog(this, 2, &fileName, &backup); @@ -1334,12 +1306,12 @@ void MainWindow::burnToFlash(QString fileToFlash) if (IS_TARANIS(GetEepromInterface()->getBoard())) backup=false; if (!fileName.isEmpty()) { - settings.setValue("backupOnFlash", backup); + g.backupOnFlash(backup); if (backup) { QString tempDir = QDir::tempPath(); QString backupFile = tempDir + "/backup.bin"; - bool backupEnable=settings.value("backupEnable", true).toBool(); - QString backupPath=settings.value("backupPath", "").toString(); + bool backupEnable=g.enableBackup(); + QString backupPath=g.backupDir(); if (!backupPath.isEmpty() && !IS_TARANIS(GetEepromInterface()->getBoard())) { if (!QDir(backupPath).exists()) { if (backupEnable) { @@ -1357,14 +1329,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)) { @@ -1374,20 +1349,24 @@ 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 { - bool backupEnable=settings.value("backupEnable", true).toBool(); - QString backupPath=settings.value("backupPath", "").toString(); + } + else { + bool backupEnable=g.enableBackup(); + QString backupPath=g.backupDir(); if (!QDir(backupPath).exists()) { if (backupEnable) { QMessageBox::warning(this, tr("Backup is impossible"), tr("The backup dir set in preferences does not exist")); @@ -1399,23 +1378,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() +void MainWindow::readEepromToFile() { - QSettings settings("companion", "companion"); - QString fileName = QFileDialog::getSaveFileName(this, tr("Save transmitter Models and Settings to File"), settings.value("lastDir").toString(), tr(EXTERNAL_EEPROM_FILES_FILTER)); + QString fileName = QFileDialog::getSaveFileName(this, tr("Save transmitter Models and Settings to File"), g.eepromDir(), tr(EXTERNAL_EEPROM_FILES_FILTER)); if (!fileName.isEmpty()) { EEPROMInterface *eepromInterface = GetEepromInterface(); if (IS_TARANIS(eepromInterface->getBoard())) { @@ -1423,39 +1403,42 @@ 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 { - settings.setValue("lastDir", QFileInfo(fileName).dir().absolutePath()); + } + else { + g.eepromDir(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() +void MainWindow::readFlash() { - QSettings settings("companion", "companion"); - QString fileName = QFileDialog::getSaveFileName(this,tr("Read Tx Firmware to File"), settings.value("lastFlashDir").toString(),tr(FLASH_FILES_FILTER)); + QString fileName = QFileDialog::getSaveFileName(this,tr("Read Tx Firmware to File"), g.flashDir(),tr(FLASH_FILES_FILTER)); if (!fileName.isEmpty()) { QFile file(fileName); if (file.exists()) { file.remove(); } - settings.setValue("lastFlashDir",QFileInfo(fileName).dir().absolutePath()); + g.flashDir(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() @@ -1490,16 +1473,21 @@ void MainWindow::logFile() void MainWindow::about() { - QString aboutStr = "

"; - aboutStr.append("OpenTX Home Page: http://open-tx.org

"); - aboutStr.append(tr("The Companion 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") + "

"); - aboutStr.append(tr("Version %1 (revision %2), %3").arg(C9X_VERSION).arg(C9X_REVISION).arg(__DATE__)+QString("

")); - aboutStr.append(tr("Copyright") +" Bertrand Songis & Romolo Manfredini © 2011- 2014
"); - - QMessageBox::about(this, tr("About Companion"),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.setWindowIcon(CompanionIcon("information.png")); + msgBox.setWindowTitle(tr("About Companion")); + msgBox.setText(aboutStr); + msgBox.exec(); } void MainWindow::updateMenus() @@ -1508,17 +1496,10 @@ 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); + writeEepromAct->setEnabled(hasMdiChild); separatorAct->setVisible(hasMdiChild); - bool hasSelection = (activeMdiChild() && - activeMdiChild()->hasSelection()); + bool hasSelection = (activeMdiChild() && activeMdiChild()->hasSelection()); cutAct->setEnabled(hasSelection); copyAct->setEnabled(hasSelection); simulateAct->setEnabled(hasSelection); @@ -1527,52 +1508,11 @@ void MainWindow::updateMenus() compareAct->setEnabled(activeMdiChild()); updateRecentFileActions(); updateProfilesActions(); - bool notfound=true; - QSettings settings("companion", "companion"); - settings.beginGroup("Profiles"); - for (int i=0; isetDisabled(notfound); -} + updateLanguageActions(); + updateIconSizeActions(); + updateIconThemeActions(); -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)); - } + setWindowTitle(tr("OpenTX Companion - FW: %1 - Profile: %2").arg(GetCurrentFirmware()->name).arg( g.profile[g.id()].name() )); } MdiChild *MainWindow::createMdiChild() @@ -1590,266 +1530,210 @@ MdiChild *MainWindow::createMdiChild() return child; } +QAction * MainWindow::addAct(QString icon, QString sName, QString lName, QKeySequence::StandardKey shortcut, const char *slot) +{ + QAction * newAction = new QAction( this ); + if (!icon.isEmpty()) + newAction->setIcon(CompanionIcon(icon)); + if (!sName.isEmpty()) + newAction->setText(sName); + if (!lName.isEmpty()) + newAction->setStatusTip(lName); + if (shortcut != 0) + newAction->setShortcuts(shortcut); + connect(newAction, SIGNAL(triggered()), this, slot); + return newAction; +} + +QAction * MainWindow::addAct(QString icon, QString sName, QString lName, const char *slot) +{ + return addAct(icon, sName, lName, QKeySequence::UnknownKey, slot); +} + +QAction * MainWindow::addAct(QActionGroup *aGroup, QString sName, QString lName, const char *slot) +{ + QAction *action = addAct("", sName, lName, QKeySequence::UnknownKey, slot); + action->setCheckable(true); + aGroup->addAction(action); + return action; +} + void MainWindow::createActions() { - newAct = new QAction(QIcon(":/images/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->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->setStatusTip(tr("Load backup from file")); - connect(loadbackupAct, SIGNAL(triggered()), this, SLOT(loadBackup())); - - saveAct = new QAction(QIcon(":/images/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->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->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->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 Companion")); - connect(checkForUpdatesAct, SIGNAL(triggered()), this, SLOT(doUpdates())); - - contributorsAct = new QAction(QIcon(":/images/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 Companion changelog")); - connect(changelogAct, SIGNAL(triggered()), this, SLOT(changelog())); - - fwchangelogAct = new QAction(QIcon(":/images/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->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->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->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->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->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->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->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->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->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->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->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->setStatusTip(tr("Read firmware from transmitter")); - connect(burnFromFlashAct,SIGNAL(triggered()),this,SLOT(burnFromFlash())); - - burnConfigAct = new QAction(QIcon(":/images/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->setStatusTip(tr("List available programmers")); - connect(burnListAct,SIGNAL(triggered()),this,SLOT(burnList())); - - burnFusesAct = new QAction(QIcon(":/images/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->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->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->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) { + for (int i = 0; i < MAX_RECENT; ++i) { recentFileActs[i] = new QAction(this); recentFileActs[i]->setVisible(false); connect(recentFileActs[i], SIGNAL(triggered()), this, SLOT(openRecentFile())); } updateRecentFileActions(); + QActionGroup *profilesAlignmentGroup = new QActionGroup(this); for (int i=0; isetVisible(false); + profileActs[i]->setCheckable(true); + profilesAlignmentGroup->addAction(profileActs[i]); connect(profileActs[i], SIGNAL(triggered()), this, SLOT(loadProfile())); } updateProfilesActions(); + + newAct = addAct("new.png", tr("New Models+Settings"), tr("Create a new Models and Settings file"), QKeySequence::New, SLOT(newFile())); + openAct = addAct("open.png", tr("Open Models+Settings..."), tr("Open Models and Settings file"), QKeySequence::Open, SLOT(openFile())); + saveAct = addAct("save.png", tr("Save Models+Settings..."), tr("Save Models and Settings file"), QKeySequence::Save, SLOT(save())); + saveAsAct = addAct("saveas.png", tr("Save Models+Settings as..."), tr("Save Models and Settings file"), QKeySequence::SaveAs, SLOT(saveAs())); + exitAct = addAct("exit.png", tr("Exit"), tr("Exit the application"), QKeySequence::Quit, SLOT(newFile())); + cutAct = addAct("cut.png", tr("Cut Model"), tr("Cut current model to the clipboard"), QKeySequence::Cut, SLOT(cut())); + copyAct = addAct("copy.png", tr("Copy Model..."), tr("Copy current model to the clipboard"), QKeySequence::Copy, SLOT(copy())); + pasteAct = addAct("paste.png", tr("Paste Model..."), tr("Paste model from clipboard"), QKeySequence::Paste, SLOT(paste())); + + QActionGroup *themeAlignGroup = new QActionGroup(this); + classicThemeAct = addAct( themeAlignGroup, tr("Classical"), tr("The classic companion9x icon theme"), SLOT(setClassicTheme())); + yericoThemeAct = addAct( themeAlignGroup, tr("Yerico"), tr("Yellow round honey sweet icon theme"), SLOT(setYericoTheme())); + monoThemeAct = addAct( themeAlignGroup, tr("Monochrome"), tr("A monochrome black icon theme"), SLOT(setMonochromeTheme())); + monoWhiteAct = addAct( themeAlignGroup, tr("MonoWhite"), tr("A monochrome white icon theme"), SLOT(setMonoWhiteTheme())); + monoBlueAct = addAct( themeAlignGroup, tr("MonoBlue"), tr("A monochrome blue icon theme"), SLOT(setMonoBlueTheme())); + + QActionGroup *iconAlignGroup = new QActionGroup(this); + smallIconAct = addAct( iconAlignGroup, tr("Small"), tr("Use small toolbar icons"), SLOT(setSmallIconThemeSize())); + normalIconAct = addAct( iconAlignGroup, tr("Normal"), tr("Use normal size toolbar icons"), SLOT(setNormalIconThemeSize())); + bigIconAct = addAct( iconAlignGroup, tr("Big"), tr("Use big toolbar icons"), SLOT(setBigIconThemeSize())); + hugeIconAct = addAct( iconAlignGroup, tr("Huge"), tr("Use huge toolbar icons"), SLOT(setHugeIconThemeSize())); + + QActionGroup *langAlignGroup = new QActionGroup(this); + sysLangAct = addAct( langAlignGroup, tr("System language"), tr("Use system language in menus"), SLOT(setSysLanguage())); + czechLangAct = addAct( langAlignGroup, tr("Czech"), tr("Use Czech in menus"), SLOT(setCZLanguage())); + germanLangAct = addAct( langAlignGroup, tr("German"), tr("Use German in menus"), SLOT(setDELanguage())); + englishLangAct = addAct( langAlignGroup, tr("English"), tr("Use English in menus"), SLOT(setENLanguage())); + finnishLangAct = addAct( langAlignGroup, tr("Finnish"), tr("Use Finnish in menus"), SLOT(setFILanguage())); + frenchLangAct = addAct( langAlignGroup, tr("French"), tr("Use French in menus"), SLOT(setFRLanguage())); + italianLangAct = addAct( langAlignGroup, tr("Italian"), tr("Use Italian in menus"), SLOT(setITLanguage())); + hebrewLangAct = addAct( langAlignGroup, tr("Hebrew"), tr("Use Hebrew in menus"), SLOT(setHELanguage())); + polishLangAct = addAct( langAlignGroup, tr("Polish"), tr("Use Polish in menus"), SLOT(setPLLanguage())); + portugueseLangAct = addAct( langAlignGroup, tr("Portuguese"), tr("Use Portuguese in menus"), SLOT(setPTLanguage())); + swedishLangAct = addAct( langAlignGroup, tr("Swedish"), tr("Use Swedish in menus"), SLOT(setSELanguage())); + russianLangAct = addAct( langAlignGroup, tr("Russian"), tr("Use Russian in menus"), SLOT(setRULanguage())); + + aboutAct = addAct("information.png", tr("About..."), tr("Show the application's About box"), SLOT(about())); + printAct = addAct("print.png", tr("Print..."), tr("Print current model"), SLOT(print())); + simulateAct = addAct("simulate.png", tr("Simulate..."), tr("Simulate current model"), SLOT(simulate())); + loadbackupAct = addAct("open.png", tr("Load Backup..."), tr("Load backup from file"), SLOT(loadBackup())); + logsAct = addAct("logs.png", tr("View Log File..."), tr("Open and view log file"), SLOT(logFile())); + appPrefsAct = addAct("apppreferences.png",tr("Settings..."), tr("Edit Settings"), SLOT(appPrefs())); + fwPrefsAct = addAct("fwpreferences.png", tr("Download..."), tr("Download firmware and voice files"), SLOT(fwPrefs())); + checkForUpdatesAct = addAct("update.png", tr("Check for Updates..."), tr("Check OpenTX and Companion updates"), SLOT(doUpdates())); + changelogAct = addAct("changelog.png", tr("Companion Changes..."), tr("Show Companion change log"), SLOT(changelog())); + fwchangelogAct = addAct("changelog.png", tr("Firmware Changes..."), tr("Show firmware change log"), SLOT(fwchangelog())); + compareAct = addAct("compare.png", tr("Compare Models..."), tr("Compare models"), SLOT(compare())); + editSplashAct = addAct("paintbrush.png", tr("Edit Tx Splash Image..."), tr("Edit the splash image of your TX"), SLOT(customizeSplash())); + burnListAct = addAct("list.png", tr("List programmers..."), tr("List available programmers"), SLOT(burnList())); + burnFusesAct = addAct("fuses.png", tr("Fuses..."), tr("Show fuses dialog"), SLOT(burnFuses())); + readFlashAct = addAct("read_flash.png", tr("Read Firmware"), tr("Read firmware from transmitter"), SLOT(readFlash())); + writeFlashAct = addAct("write_flash.png", tr("Write Firmware"), tr("Write firmware to transmitter"), SLOT(writeFlash())); + createProfileAct = addAct("", tr("Add Radio Profile"), tr("Create a new Radio Setting Profile"), SLOT(createProfile())); + openDocURLAct = addAct("", tr("Manuals and other Documents"), tr("Open the OpenTX document page in a web browser"), SLOT(openDocURL())); + writeEepromAct = addAct("write_eeprom.png", tr("Write Models and Settings To Tx"), tr("Write Models and Settings to transmitter"), SLOT(writeEeprom())); + readEepromAct = addAct("read_eeprom.png", tr("Read Models and Settings From Tx"), tr("Read Models and Settings from transmitter"), SLOT(readEeprom())); + burnConfigAct = addAct("configure.png", tr("Configure Communications..."), tr("Configure software for communicating with the transmitter"), SLOT(burnConfig())); + writeFileToEepromAct = addAct("write_eeprom_file.png", tr("Write Models and Settings from file to Tx"), tr("Write Models and Settings from file to transmitter"), SLOT(writeFileToEeprom())); + readEepromToFileAct = addAct("read_eeprom_file.png", tr("Save Tx Models and Settings to file"), tr("Save the Models and Settings from the transmitter to a file"), SLOT(readEepromToFile())); + contributorsAct = addAct("contributors.png", tr("Contributors..."), tr("A tribute to those who have contributed to OpenTX and Companion"), SLOT(contributors())); + + compareAct->setEnabled(false); + simulateAct->setEnabled(false); + printAct->setEnabled(false); } void MainWindow::createMenus() { - QMenu *recentFileMenu=new QMenu(tr("Recent Files")); - QMenu *profilesMenu=new QMenu(tr("Firmware Profiles")); - - fileMenu = menuBar()->addMenu(tr("&File")); + QMenu *recentFileMenu=new QMenu(tr("Recent Models+Settings")); + QMenu *languageMenu=new QMenu(tr("Set Menu Language")); + QMenu *themeMenu=new QMenu(tr("Set Icon Theme")); + QMenu *iconThemeSizeMenu=new QMenu(tr("Set Icon Size")); + + fileMenu = menuBar()->addMenu(tr("File")); fileMenu->addAction(newAct); fileMenu->addAction(openAct); 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); + fileMenu->addAction(fwPrefsAct); fileMenu->addSeparator(); fileMenu->addAction(simulateAct); fileMenu->addAction(printAct); fileMenu->addAction(compareAct); fileMenu->addSeparator(); - fileMenu->addAction(preferencesAct); - fileMenu->addMenu(profilesMenu); - - profilesMenu->setIcon(QIcon(":/images/profiles.png")); - for ( int i = 0; i < MAX_PROFILES; ++i) - profilesMenu->addAction(profileActs[i]); - fileMenu->addAction(switchLayoutDirectionAct); fileMenu->addAction(exitAct); - editMenu = menuBar()->addMenu(tr("&Edit")); + editMenu = menuBar()->addMenu(tr("Edit")); editMenu->addAction(cutAct); editMenu->addAction(copyAct); editMenu->addAction(pasteAct); - burnMenu = menuBar()->addMenu(tr("&Read/Write")); - burnMenu->addAction(burnToAct); - burnMenu->addAction(burnFromAct); + settingsMenu = menuBar()->addMenu(tr("Settings")); + settingsMenu->addMenu(languageMenu); + languageMenu->addAction(sysLangAct); + languageMenu->addAction(englishLangAct); + languageMenu->addAction(czechLangAct); + languageMenu->addAction(germanLangAct); + languageMenu->addAction(finnishLangAct); + languageMenu->addAction(frenchLangAct); + languageMenu->addAction(hebrewLangAct); + languageMenu->addAction(italianLangAct); + languageMenu->addAction(polishLangAct); + languageMenu->addAction(portugueseLangAct); + languageMenu->addAction(swedishLangAct); + languageMenu->addAction(russianLangAct); + + settingsMenu->addMenu(themeMenu); + themeMenu->addAction(classicThemeAct); + themeMenu->addAction(yericoThemeAct); + themeMenu->addAction(monoThemeAct); + themeMenu->addAction(monoBlueAct); + themeMenu->addAction(monoWhiteAct); + settingsMenu->addMenu(iconThemeSizeMenu); + iconThemeSizeMenu->addAction(smallIconAct); + iconThemeSizeMenu->addAction(normalIconAct); + iconThemeSizeMenu->addAction(bigIconAct); + iconThemeSizeMenu->addAction(hugeIconAct); + settingsMenu->addSeparator(); + settingsMenu->addAction(appPrefsAct); + settingsMenu->addMenu(createProfilesMenu()); + settingsMenu->addAction(editSplashAct); + settingsMenu->addAction(burnConfigAct); + + burnMenu = menuBar()->addMenu(tr("Read/Write")); + burnMenu->addAction(writeEepromAct); + burnMenu->addAction(readEepromAct); burnMenu->addSeparator(); - burnMenu->addAction(burnExtenalToEEPROMAct); - burnMenu->addAction(burnExtenalFromEEPROMAct); + burnMenu->addAction(writeFileToEepromAct); + burnMenu->addAction(readEepromToFileAct); burnMenu->addSeparator(); - burnMenu->addAction(burnToFlashAct); - burnMenu->addAction(burnFromFlashAct); + burnMenu->addAction(writeFlashAct); + burnMenu->addAction(readFlashAct); burnMenu->addSeparator(); - burnMenu->addAction(customizeSplashAct); burnMenu->addSeparator(); - burnMenu->addAction(burnConfigAct); EEPROMInterface *eepromInterface = GetEepromInterface(); if (!IS_ARM(eepromInterface->getBoard())) { 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 = menuBar()->addMenu(tr("Help")); helpMenu->addSeparator(); helpMenu->addAction(checkForUpdatesAct); helpMenu->addSeparator(); + helpMenu->addAction(aboutAct); + helpMenu->addAction(openDocURLAct); + helpMenu->addSeparator(); helpMenu->addAction(changelogAct); helpMenu->addAction(fwchangelogAct); helpMenu->addSeparator(); @@ -1859,78 +1743,109 @@ void MainWindow::createMenus() QMenu *MainWindow::createRecentFileMenu() { QMenu *recentFileMenu = new QMenu(this); - for ( int i = 0; i < MaxRecentFiles; ++i) + for ( int i = 0; i < MAX_RECENT; ++i) recentFileMenu->addAction(recentFileActs[i]); return recentFileMenu; } QMenu *MainWindow::createProfilesMenu() { - QMenu *profilesMenu = new QMenu(this); - for ( int i = 0; i < MAX_PROFILES; ++i) + QMenu *profilesMenu=new QMenu(tr("Radio Settings Profile")); + int i; + for ( i = 0; i < MAX_PROFILES; ++i) { profilesMenu->addAction(profileActs[i]); + } + profilesMenu->addSeparator(); + + profilesMenu->addAction(createProfileAct); + profilesMenu->setIcon(CompanionIcon("profiles.png")); return profilesMenu; } void MainWindow::createToolBars() { + QSize size; + switch(g.iconSize()) { + case 0: + size=QSize(16,16); + break; + case 1: + size=QSize(24,24); + break; + case 2: + size=QSize(32,32); + break; + case 3: + size=QSize(48,48); + break; + default: + size=QSize(24,24); + 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->setFocusPolicy(Qt::NoFocus); recentToolButton->setMenu(createRecentFileMenu()); - recentToolButton->setIcon(QIcon(":/images/recentdocument.png")); - recentToolButton->setToolTip(tr("Recent Files")); + recentToolButton->setIcon(CompanionIcon("recentdocument.png")); + recentToolButton->setToolTip(tr("Recent Models+Settings")); + recentToolButton->setStatusTip(tr("Show recent Models+Settings documents")); + fileToolBar->addWidget(recentToolButton); fileToolBar->addAction(saveAct); - fileToolBar->addAction(logsAct); fileToolBar->addSeparator(); - fileToolBar->addAction(preferencesAct); - profileButton = new QToolButton; + fileToolBar->addAction(logsAct); + fileToolBar->addAction(fwPrefsAct); + fileToolBar->addSeparator(); + fileToolBar->addAction(appPrefsAct); + + QToolButton * profileButton = new QToolButton; profileButton->setPopupMode(QToolButton::InstantPopup); + profileButton->setFocusPolicy(Qt::NoFocus); profileButton->setMenu(createProfilesMenu()); - profileButton->setIcon(QIcon(":/images/profiles.png")); - profileButton->setToolTip(tr("Firmware Profiles")); + profileButton->setIcon(CompanionIcon("profiles.png")); + profileButton->setToolTip(tr("Radio Settings Profile")); + profileButton->setStatusTip(tr("Show a selection list of radio settings profiles")); + fileToolBar->addWidget(profileButton); - bool notfound=true; - QSettings settings("companion", "companion"); - settings.beginGroup("Profiles"); - for (int i=0; isetDisabled(notfound); + fileToolBar->addAction(editSplashAct); fileToolBar->addSeparator(); fileToolBar->addAction(simulateAct); fileToolBar->addAction(printAct); fileToolBar->addAction(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->addAction(burnToAct); - burnToolBar->addAction(burnFromAct); + + burnToolBar = new QToolBar(tr("Write")); + addToolBar( Qt::LeftToolBarArea, burnToolBar ); + burnToolBar->setIconSize(size); + burnToolBar->setObjectName("Write"); + burnToolBar->addAction(writeEepromAct); + burnToolBar->addAction(readEepromAct); burnToolBar->addSeparator(); - burnToolBar->addAction(burnExtenalToEEPROMAct); - burnToolBar->addAction(burnExtenalFromEEPROMAct); + burnToolBar->addAction(writeFileToEepromAct); + burnToolBar->addAction(readEepromToFileAct); burnToolBar->addSeparator(); - burnToolBar->addAction(burnToFlashAct); - burnToolBar->addAction(burnFromFlashAct); + burnToolBar->addAction(writeFlashAct); + burnToolBar->addAction(readFlashAct); burnToolBar->addSeparator(); 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() @@ -1938,44 +1853,6 @@ void MainWindow::createStatusBar() statusBar()->showMessage(tr("Ready")); } -void MainWindow::readSettings() -{ - QSettings settings("companion", "companion"); - 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(); - checkFW = settings.value("startup_check_fw", true).toBool(); - MaxRecentFiles =settings.value("history_size",10).toInt(); - ActiveProfile=settings.value("activeprofile",0).toInt(); - if (ActiveProfile) { - settings.beginGroup("Profiles"); - QString profile=QString("profile%1").arg(ActiveProfile); - settings.beginGroup(profile); - ActiveProfileName=settings.value("Name","").toString(); - settings.endGroup(); - settings.endGroup(); - } - if (maximized) { - setWindowState(Qt::WindowMaximized); - } else { - move(pos); - resize(size); - } -} - -void MainWindow::writeSettings() -{ - QSettings settings("companion", "companion"); - - settings.setValue("maximized", isMaximized()); - if(!isMaximized()) { - settings.setValue("pos", pos()); - settings.setValue("size", size()); - } -} - MdiChild *MainWindow::activeMdiChild() { if (QMdiSubWindow *activeSubWindow = mdiArea->activeSubWindow()) @@ -1995,14 +1872,6 @@ QMdiSubWindow *MainWindow::findMdiChild(const QString &fileName) return 0; } -void MainWindow::switchLayoutDirection() -{ - if (layoutDirection() == Qt::LeftToRight) - qApp->setLayoutDirection(Qt::RightToLeft); - else - qApp->setLayoutDirection(Qt::LeftToRight); -} - void MainWindow::setActiveSubWindow(QWidget *window) { if (!window) @@ -2011,50 +1880,118 @@ void MainWindow::setActiveSubWindow(QWidget *window) } void MainWindow::updateRecentFileActions() - { - int i,j, numRecentFiles; - QSettings settings("companion", "companion"); - QStringList files = settings.value("recentFileList").toStringList(); +{ + int i, numRecentFiles; - numRecentFiles = qMin(files.size(), (int)MaxRecentFiles); + // Hide all document slots + for ( i=0 ; i < g.historySize(); i++) + recentFileActs[i]->setVisible(false); + + // Fill slots with content and unhide them + QStringList files = g.recentFiles(); + numRecentFiles = qMin(files.size(), g.historySize()); - for ( i = 0; i < numRecentFiles; ++i) { - QString text = tr("&%1 %2").arg(i + 1).arg(strippedName(files[i])); - recentFileActs[i]->setText(text); - recentFileActs[i]->setData(files[i]); - recentFileActs[i]->setVisible(true); + for ( i = 0; i < numRecentFiles; i++) { + QString text = strippedName(files[i]); + if (!text.trimmed().isEmpty()) + { + recentFileActs[i]->setText(text); + recentFileActs[i]->setData(files[i]); + recentFileActs[i]->setVisible(true); + } } - for ( j = numRecentFiles; j < MaxRecentFiles; ++j) - recentFileActs[j]->setVisible(false); - - // separatorAct->setVisible(numRecentFiles > 0); +} + +void MainWindow::updateIconSizeActions() +{ + switch (g.iconSize()) + { + case 0: smallIconAct->setChecked(true); break; + case 1: normalIconAct->setChecked(true); break; + case 2: bigIconAct->setChecked(true); break; + case 3: hugeIconAct->setChecked(true); break; + } +} + +void MainWindow::updateLanguageActions() +{ + QString langId = g.locale(); + + if (langId=="") + sysLangAct->setChecked(true); + else if (langId=="cs_CZ") + czechLangAct->setChecked(true); + else if (langId=="de_DE") + germanLangAct->setChecked(true); + else if (langId=="en") + englishLangAct->setChecked(true); + else if (langId=="fi_FI") + finnishLangAct->setChecked(true); + else if (langId=="fr_FR") + frenchLangAct->setChecked(true); + else if (langId=="it_IT") + italianLangAct->setChecked(true); + else if (langId=="he_IL") + hebrewLangAct->setChecked(true); + else if (langId=="pl_PL") + polishLangAct->setChecked(true); + else if (langId=="pt_PT") + portugueseLangAct->setChecked(true); + else if (langId=="ru_RU") + russianLangAct->setChecked(true); + else if (langId=="sv_SE") + swedishLangAct->setChecked(true); +} + +void MainWindow::updateIconThemeActions() +{ + switch (g.theme()) + { + case 0: classicThemeAct->setChecked(true); break; + case 1: yericoThemeAct->setChecked(true); break; + case 2: monoWhiteAct->setChecked(true); break; + case 3: monoThemeAct->setChecked(true); break; + case 4: monoBlueAct->setChecked(true); break; + } } void MainWindow::updateProfilesActions() - { - int i; - QSettings settings("companion", "companion"); - settings.beginGroup("Profiles"); - for (i=0; isetText(text); - profileActs[i]->setData(i+1); - profileActs[i]->setVisible(true); - } else { - profileActs[i]->setVisible(false); - } - settings.endGroup(); +{ + for (int i=0; isetText(text); + profileActs[i]->setData(i); + profileActs[i]->setVisible(true); + if (i == g.id()) + profileActs[i]->setChecked(true); + } + else + { + profileActs[i]->setVisible(false); } - // separatorAct->setVisible(numRecentFiles > 0); + } } +void MainWindow::createProfile() +{ int i; +for (i=0; iclose(); } + + diff --git a/companion/src/mainwindow.h b/companion/src/mainwindow.h index 6d203bf1e..8bfca1fa8 100644 --- a/companion/src/mainwindow.h +++ b/companion/src/mainwindow.h @@ -48,9 +48,9 @@ #include "downloaddialog.h" #include "eeprominterface.h" -#define MAX_RECENT 15 -#define MAX_PROFILES 10 #define SPLASH_TIME 5 +#define MAX_RECENT 10 +#define MAX_PROFILES 15 class MdiChild; QT_BEGIN_NAMESPACE @@ -63,7 +63,7 @@ QT_END_NAMESPACE class MainWindow : public QMainWindow { - friend class preferencesDialog; + friend class fwPreferencesDialog; friend class MdiChild; // TODO GetAvrdudeArgs could be external to this class Q_OBJECT @@ -79,9 +79,37 @@ protected: public slots: void downloadLatestFW(FirmwareInfo *firmware, const QString & firmwareId); - void unloadProfile(); private slots: + void openDocURL(); + + void setLanguage(QString langString); + void setSysLanguage() {setLanguage("");}; + void setCZLanguage() {setLanguage("cs_CZ");}; + void setDELanguage() {setLanguage("de_DE");}; + void setENLanguage() {setLanguage("en");}; + void setFILanguage() {setLanguage("fi_FI");}; + void setFRLanguage() {setLanguage("fr_FR");}; + void setITLanguage() {setLanguage("it_IT");}; + void setHELanguage() {setLanguage("he_IL");}; + void setPLLanguage() {setLanguage("pl_PL");}; + void setPTLanguage() {setLanguage("pt_PT");}; + void setRULanguage() {setLanguage("ru_RU");}; + void setSELanguage() {setLanguage("sv_SE");}; + + void setTheme(int index); + void setClassicTheme() {setTheme(0);}; + void setYericoTheme() {setTheme(1);}; + void setMonoWhiteTheme() {setTheme(2);}; + void setMonochromeTheme(){setTheme(3);}; + void setMonoBlueTheme() {setTheme(4);}; + + void setIconThemeSize(int index); + void setSmallIconThemeSize() {setIconThemeSize(0);}; + void setNormalIconThemeSize() {setIconThemeSize(1);}; + void setBigIconThemeSize() {setIconThemeSize(2);}; + void setHugeIconThemeSize() {setIconThemeSize(3);}; + void checkForUpdates(bool ignoreSettings, QString & fwId); void checkForUpdateFinished(QNetworkReply * reply); void displayWarnings(); @@ -100,12 +128,12 @@ private slots: void logFile(); void copy(); void paste(); - void burnTo(); - void burnFrom(); - void burnToFlash(QString fileToFlash=""); - void burnFromFlash(); - void burnExtenalToEEPROM(); - void burnExtenalFromEEPROM(); + void writeEeprom(); + void readEeprom(); + void writeFlash(QString fileToFlash=""); + void readFlash(); + void writeFileToEeprom(); + void readEepromToFile(); void burnConfig(); void burnList(); void burnFuses(); @@ -118,27 +146,35 @@ private slots: void compare(); void print(); void loadBackup(); - void preferences(); + void appPrefs(); + void fwPrefs(); void updateMenus(); - void updateWindowMenu(); + void createProfile(); MdiChild *createMdiChild(); - void switchLayoutDirection(); void setActiveSubWindow(QWidget *window); QMenu * createRecentFileMenu(); QMenu * createProfilesMenu(); void autoClose(); - + private: void createActions(); + QAction * addAct(QString, QString, QString, QKeySequence::StandardKey, const char *); + QAction * addAct(QActionGroup *, QString, QString, const char *); + QAction * addAct(QString, QString, QString, const char *); + void createMenus(); void createToolBars(); void createStatusBar(); - void readSettings(); - void writeSettings(); void updateRecentFileActions(); void updateProfilesActions(); + void updateIconSizeActions(); + void updateLanguageActions(); + void updateIconThemeActions(); + int getFileType(const QString &fullFileName); QString FindTaranisPath(); + QString Theme; + QString ISize; QString strippedName(const QString &fullFileName); MdiChild *activeMdiChild(); @@ -153,7 +189,6 @@ private: QStringList GetSendFlashCommand(const QString &filename); int getEpromVersion(QString fileName); - bool convertEEPROM(QString backupFile, QString restoreFile, QString flashFile); bool isValidEEPROM(QString eepromfile); @@ -162,16 +197,10 @@ private: QString installer_fileName; QString downloadedFW; - QString downloadedFWFilename; - QString ActiveProfileName; downloadDialog * downloadDialog_forWait; - bool checkCompanion9x; - bool checkFW; bool needRename; bool showcheckForUpdatesResult; - int MaxRecentFiles; - int ActiveProfile; int currentFWrev; int currentFWrev_temp; int NewFwRev; @@ -183,8 +212,8 @@ private: QMenu *fileMenu; QMenu *editMenu; + QMenu *settingsMenu; QMenu *burnMenu; - QMenu *windowMenu; QMenu *helpMenu; QToolBar *fileToolBar; QToolBar *editToolBar; @@ -196,42 +225,58 @@ private: QAction *saveAct; QAction *saveAsAct; QAction *exitAct; - QAction *preferencesAct; + QAction *appPrefsAct; + QAction *fwPrefsAct; QAction *checkForUpdatesAct; QAction *contributorsAct; QAction *changelogAct; QAction *fwchangelogAct; QAction *compareAct; - QAction *customizeSplashAct; + QAction *editSplashAct; QAction *cutAct; QAction *copyAct; QAction *pasteAct; - QAction *burnToAct; - QAction *burnFromAct; + QAction *writeEepromAct; + QAction *readEepromAct; QAction *burnConfigAct; QAction *burnListAct; QAction *burnFusesAct; - QAction *burnToFlashAct; - QAction *burnFromFlashAct; - QAction *burnExtenalToEEPROMAct; - QAction *burnExtenalFromEEPROMAct; + QAction *writeFlashAct; + QAction *readFlashAct; + QAction *writeFileToEepromAct; + QAction *readEepromToFileAct; QAction *simulateAct; - QAction *closeAct; - QAction *closeAllAct; - QAction *tileAct; - QAction *cascadeAct; - QAction *nextAct; - QAction *previousAct; QAction *separatorAct; QAction *aboutAct; QAction *printAct; QAction *loadbackupAct; QAction *logsAct; - QAction *switchLayoutDirectionAct; QAction *recentFileActs[MAX_RECENT]; QAction *profileActs[MAX_PROFILES]; + QAction *createProfileAct; + QAction *classicThemeAct; + QAction *yericoThemeAct; + QAction *monoThemeAct; + QAction *monoBlueAct; + QAction *monoWhiteAct; + QAction *smallIconAct; + QAction *normalIconAct; + QAction *bigIconAct; + QAction *hugeIconAct; + QAction *sysLangAct; + QAction *englishLangAct; + QAction *czechLangAct; + QAction *germanLangAct; + QAction *frenchLangAct; + QAction *finnishLangAct; + QAction *italianLangAct; + QAction *hebrewLangAct; + QAction *polishLangAct; + QAction *portugueseLangAct; + QAction *swedishLangAct; + QAction *russianLangAct; + QAction *openDocURLAct; QString fwToUpdate; - QToolButton * profileButton; }; #endif diff --git a/companion/src/mdichild.cpp b/companion/src/mdichild.cpp index e9049bd1f..3af585369 100644 --- a/companion/src/mdichild.cpp +++ b/companion/src/mdichild.cpp @@ -48,11 +48,10 @@ #include "generaledit.h" #include "avroutputdialog.h" #include "burnconfigdialog.h" -#include "simulatordialog.h" -#include "xsimulatordialog.h" #include "printdialog.h" #include "burndialog.h" #include "helpers.h" +#include "appdata.h" #include #if defined WIN32 || !defined __GNUC__ @@ -69,7 +68,8 @@ MdiChild::MdiChild(): fileChanged(false) { ui->setupUi(this); - + this->setWindowIcon(CompanionIcon("open.png")); + ui->SimulateTxButton->setIcon(CompanionIcon("simulate.png")); setAttribute(Qt::WA_DeleteOnClose); eepromInterfaceChanged(); @@ -142,25 +142,7 @@ void MdiChild::setModified() void MdiChild::on_SimulateTxButton_clicked() { - if (GetEepromInterface()->getSimulator()) { - if (GetEepromInterface()->getCapability(SimulatorType)==1) { - 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 { - QMessageBox::warning(NULL, - QObject::tr("Warning"), - QObject::tr("Simulator for this firmware is not yet available")); - } + startSimulation(this, radioData, -1); } void MdiChild::OpenEditWindow(bool wizard=false) @@ -173,14 +155,13 @@ void MdiChild::OpenEditWindow(bool wizard=false) ModelData &model = radioData.models[row - 1]; if (model.isempty()) { - model.setDefault(row - 1); + model.setDefaultValues(row - 1, radioData.generalSettings); isNew = true; //modeledit - clear mixes, apply first template setModified(); } if (isNew && !wizard) { int ret; - QSettings settings("companion", "companion"); - bool wizardEnable=settings.value("wizardEnable", true).toBool(); + bool wizardEnable=g.enableWizard(); if (wizardEnable) { ret = QMessageBox::question(this, tr("Companion"), tr("Do you want to use model wizard? "), QMessageBox::Yes | QMessageBox::No); if (ret == QMessageBox::Yes) { @@ -189,7 +170,7 @@ void MdiChild::OpenEditWindow(bool wizard=false) qSleep(500); ret = QMessageBox::question(this, tr("Companion"), tr("Ask this question again ? "), QMessageBox::Yes | QMessageBox::No); if (ret == QMessageBox::No) { - settings.setValue("wizardEnable", false); + g.enableWizard( false ); } } } @@ -346,34 +327,33 @@ bool MdiChild::save() bool MdiChild::saveAs(bool isNew) { - QSettings settings("companion", "companion"); QString fileName; if (GetEepromInterface()->getBoard() == BOARD_SKY9X) { curFile.replace(".eepe", ".bin"); QFileInfo fi(curFile); #ifdef __APPLE__ - fileName = QFileDialog::getSaveFileName(this, tr("Save As"), settings.value("lastDir").toString() + "/" +fi.fileName()); + fileName = QFileDialog::getSaveFileName(this, tr("Save As"), g.eepromDir() + "/" +fi.fileName()); #else - fileName = QFileDialog::getSaveFileName(this, tr("Save As"), settings.value("lastDir").toString() + "/" +fi.fileName(), tr(BIN_FILES_FILTER)); + fileName = QFileDialog::getSaveFileName(this, tr("Save As"), g.eepromDir() + "/" +fi.fileName(), tr(BIN_FILES_FILTER)); #endif } else { QFileInfo fi(curFile); #ifdef __APPLE__ - fileName = QFileDialog::getSaveFileName(this, tr("Save As"), settings.value("lastDir").toString() + "/" +fi.fileName()); + fileName = QFileDialog::getSaveFileName(this, tr("Save As"), g.eepromDir() + "/" +fi.fileName()); #else - fileName = QFileDialog::getSaveFileName(this, tr("Save As"), settings.value("lastDir").toString() + "/" +fi.fileName(), tr(EEPROM_FILES_FILTER)); + fileName = QFileDialog::getSaveFileName(this, tr("Save As"), g.eepromDir() + "/" +fi.fileName(), tr(EEPROM_FILES_FILTER)); #endif } if (fileName.isEmpty()) return false; if (fileName.contains("rev4a")) { - settings.setValue("rev4asupport", 1); + g.rev4aSupport( true ); } if (fileName.contains("norev4a")) { - settings.setValue("rev4asupport", 0); + g.rev4aSupport( false ); } - settings.setValue("lastDir", QFileInfo(fileName).dir().absolutePath()); + g.eepromDir( QFileInfo(fileName).dir().absolutePath() ); if (isNew) return saveFile(fileName); else @@ -490,15 +470,14 @@ void MdiChild::setCurrentFile(const QString &fileName) fileChanged = false; setWindowModified(false); updateTitle(); - QSettings settings("companion", "companion"); - int MaxRecentFiles =settings.value("history_size",10).toInt(); - QStringList files = settings.value("recentFileList").toStringList(); + int MaxRecentFiles = g.historySize(); + QStringList files = g.recentFiles(); files.removeAll(fileName); files.prepend(fileName); while (files.size() > MaxRecentFiles) files.removeLast(); - settings.setValue("recentFileList", files); + g.recentFiles( files ); } QString MdiChild::strippedName(const QString &fullFileName) @@ -506,11 +485,10 @@ QString MdiChild::strippedName(const QString &fullFileName) return QFileInfo(fullFileName).fileName(); } -void MdiChild::burnTo() // write to Tx +void MdiChild::writeEeprom() // write to Tx { - QSettings settings("companion", "companion"); - bool backupEnable=settings.value("backupEnable", true).toBool(); - QString backupPath=settings.value("backupPath", "").toString(); + bool backupEnable=g.enableBackup(); + QString backupPath=g.backupDir(); if (!backupPath.isEmpty()) { if (!QDir(backupPath).exists()) { if (backupEnable) { @@ -521,13 +499,7 @@ void MdiChild::burnTo() // write to Tx } else { backupEnable=false; } - int profileid=settings.value("profileId", 1).toInt(); - settings.beginGroup("Profiles"); - QString profile=QString("profile%1").arg(profileid); - settings.beginGroup(profile); - QString stickCal=settings.value("StickPotCalib","").toString(); - settings.endGroup(); - settings.endGroup(); + QString stickCal=g.profile[g.id()].stickPotCalib(); burnConfigDialog bcd; QString tempDir = QDir::tempPath(); QString tempFile = tempDir + "/temp.bin"; @@ -549,19 +521,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 << 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(); + 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 EEPROM From Tx")); - ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); ad->exec(); + delete ad; sleep(1); } } @@ -569,16 +545,17 @@ 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)) { - int ret = QMessageBox::question(this, "Error", tr("Cannot check eeprom compatibility! Continue anyway?") , - QMessageBox::Yes | QMessageBox::No); - if (ret==QMessageBox::No) - return; - } else { + int ret = QMessageBox::question(this, tr("Error"), tr("Cannot check eeprom compatibility! Continue anyway?"), QMessageBox::Yes | QMessageBox::No); + if (ret == QMessageBox::No) + return; + } + 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!")); @@ -591,7 +568,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())) { @@ -599,58 +577,53 @@ 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); } } } + if (IS_TARANIS(eepromInterface->getBoard())) { QString path=((MainWindow *)this->parent())->FindTaranisPath(); 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->show(); + ad->setWindowIcon(CompanionIcon("read_eeprom.png")); + ad->exec(); + 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->show(); + ad->setWindowIcon(CompanionIcon("write_eeprom.png")); + ad->exec(); + delete ad; } } } void MdiChild::simulate() { - if(ui->modelsList->currentRow()<1) return; - if (GetEepromInterface()->getSimulator()) { - if (GetEepromInterface()->getCapability(SimulatorType)) { - xsimulatorDialog sd(this); - sd.loadParams(radioData, ui->modelsList->currentRow()-1); - sd.exec(); - } else { - simulatorDialog sd(this); - sd.loadParams(radioData, ui->modelsList->currentRow()-1); - sd.exec(); - } - } else { - QMessageBox::warning(NULL, - QObject::tr("Warning"), - QObject::tr("Simulator for this firmware is not yet available")); - } + if (ui->modelsList->currentRow() >= 1) { + startSimulation(this, radioData, ui->modelsList->currentRow()-1); + } } void MdiChild::print(int model, QString filename) @@ -678,8 +651,7 @@ void MdiChild::setEEpromAvail(int eavail) bool MdiChild::loadBackup() { - QSettings settings("companion", "companion"); - QString fileName = QFileDialog::getOpenFileName(this, tr("Open"), settings.value("lastDir").toString(),tr(EEPROM_FILES_FILTER)); + QString fileName = QFileDialog::getOpenFileName(this, tr("Open backup Models and Settings file"), g.eepromDir(),tr(EEPROM_FILES_FILTER)); if (fileName.isEmpty()) return false; QFile file(fileName); diff --git a/companion/src/mdichild.h b/companion/src/mdichild.h index ae7bbfbf4..7a18491eb 100644 --- a/companion/src/mdichild.h +++ b/companion/src/mdichild.h @@ -94,7 +94,7 @@ public slots: void cut(); void copy(); void paste(); - void burnTo(); + void writeEeprom(); void simulate(); void print(int model=-1, QString filename=""); void setModified(); diff --git a/companion/src/mdichild.ui b/companion/src/mdichild.ui index d32b3cffb..538e36b74 100644 --- a/companion/src/mdichild.ui +++ b/companion/src/mdichild.ui @@ -22,10 +22,6 @@ Simulate Tx - - - :/images/simulate.png:/images/simulate.png -
diff --git a/companion/src/modelconfigdialog.cpp b/companion/src/modelconfigdialog.cpp index 49c4a8df0..4badaa906 100644 --- a/companion/src/modelconfigdialog.cpp +++ b/companion/src/modelconfigdialog.cpp @@ -3,7 +3,10 @@ #include "helpers.h" #include "eeprominterface.h" #include +#include "helpers.h" + #define NUM_CH 10 + modelConfigDialog::modelConfigDialog(RadioData &radioData, uint64_t * result, QWidget *parent) : QDialog(parent), ui(new Ui::modelConfigDialog), @@ -12,6 +15,7 @@ modelConfigDialog::modelConfigDialog(RadioData &radioData, uint64_t * result, QW generalSettings(radioData.generalSettings) { ui->setupUi(this); + this->setWindowIcon(CompanionIcon("wizard.png")); rxLock=false; ruddercolor << "#ffd100" << "#ffff00"; throttlecolor << "#e40000"; diff --git a/companion/src/modelconfigdialog.ui b/companion/src/modelconfigdialog.ui index ea119cabc..afa4dd0bd 100644 --- a/companion/src/modelconfigdialog.ui +++ b/companion/src/modelconfigdialog.ui @@ -6,8 +6,8 @@ 0 0 - 773 - 591 + 793 + 599 @@ -25,10 +25,6 @@ Model Configuration Wizard - - - :/images/configure.png:/images/configure.png - diff --git a/companion/src/modeledit/CMakeLists.txt b/companion/src/modeledit/CMakeLists.txt index 28c752d64..da739efc7 100644 --- a/companion/src/modeledit/CMakeLists.txt +++ b/companion/src/modeledit/CMakeLists.txt @@ -16,7 +16,7 @@ set(modeledit_SRCS inputs.cpp mixes.cpp channels.cpp - customswitches.cpp + logicalswitches.cpp customfunctions.cpp # templates.cpp mixerslist.cpp @@ -30,7 +30,7 @@ set(modeledit_HDRS inputs.h mixes.h channels.h - customswitches.h + logicalswitches.h customfunctions.h # templates.h mixerslist.h @@ -42,6 +42,7 @@ set(modeledit_UIS setup_module.ui flightmode.ui telemetry_analog.ui + telemetry_customscreen.ui ) foreach(name ${modeledit_NAMES}) diff --git a/companion/src/modeledit/channels.cpp b/companion/src/modeledit/channels.cpp index 09b6a367b..070a0fcdc 100644 --- a/companion/src/modeledit/channels.cpp +++ b/companion/src/modeledit/channels.cpp @@ -57,24 +57,26 @@ Channels::Channels(QWidget * parent, ModelData & model): gridLayout->addWidget(offset, i+1, col++, 1, 1); // Channel min - QSpinBox * minSB = new QSpinBox(this); + 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(model.limitData[i].min); + 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 - QSpinBox * maxSB = new QSpinBox(this); + 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(model.limitData[i].max); + maxSB->setValue(float(model.limitData[i].max) / 10); connect(maxSB, SIGNAL(editingFinished()), this, SLOT(maxEdited())); gridLayout->addWidget(maxSB, i+1, col++, 1, 1); @@ -108,9 +110,6 @@ Channels::Channels(QWidget * parent, ModelData & model): gridLayout->addWidget(symlimits, i+1, col++, 1, 1); } } - - // setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - // setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); } Channels::~Channels() @@ -141,23 +140,23 @@ void Channels::offsetEdited() { QDoubleSpinBox *dsb = qobject_cast(sender()); int index = dsb->property("index").toInt(); - model.limitData[index].offset = round(dsb->value()*10); + model.limitData[index].offset = round(dsb->value() * 10); emit modified(); } void Channels::minEdited() { - QSpinBox *sb = qobject_cast(sender()); + QDoubleSpinBox *sb = qobject_cast(sender()); int index = sb->property("index").toInt(); - model.limitData[index].min = sb->value(); + model.limitData[index].min = round(sb->value() * 10); emit modified(); } void Channels::maxEdited() { - QSpinBox *sb = qobject_cast(sender()); + QDoubleSpinBox *sb = qobject_cast(sender()); int index = sb->property("index").toInt(); - model.limitData[index].max = sb->value(); + model.limitData[index].max = round(sb->value() * 10); emit modified(); } diff --git a/companion/src/modeledit/curves.cpp b/companion/src/modeledit/curves.cpp index 2e52c54ea..1112b1dde 100644 --- a/companion/src/modeledit/curves.cpp +++ b/companion/src/modeledit/curves.cpp @@ -2,13 +2,12 @@ #include "ui_curves.h" #include "node.h" #include "edge.h" +#include "helpers.h" #include #include #include #include -// TODO Capability CustomCurves to be removed - #define GFX_MARGIN 16 static const QColor colors[C9X_MAX_CURVES] = { @@ -75,18 +74,17 @@ Curves::Curves(QWidget * parent, ModelData & model): { ui->setupUi(this); + lock = true; + if (!GetEepromInterface()->getCapability(HasCvNames)) { - ui->cname_LE->hide(); - ui->cname_label->hide(); + ui->curveName->hide(); + ui->curveNameLabel->hide(); } QGraphicsScene *scene = new QGraphicsScene(ui->curvePreview); scene->setItemIndexMethod(QGraphicsScene::NoIndex); ui->curvePreview->setScene(scene); - QIcon clearIcon; - clearIcon.addFile(":/images/clear.png", QSize(), QIcon::Normal, QIcon::Off); - for (int i=0; igetCapability(NumCurves); i++) { visibleCurves[i] = false; @@ -94,7 +92,7 @@ Curves::Curves(QWidget * parent, ModelData & model): QPushButton * reset = new QPushButton(this); reset->setProperty("index", i); reset->setMinimumSize(QSize(0, 0)); - reset->setIcon(clearIcon); + 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); @@ -134,7 +132,20 @@ Curves::Curves(QWidget * parent, ModelData & model): 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() @@ -154,7 +165,7 @@ void Curves::resetCurve() { QPushButton *button = (QPushButton *)sender(); int index = button->property("index").toInt(); - int res = QMessageBox::question(this, "companion9x", tr("Are you sure you want to reset curve %1 ?").arg(index+1), QMessageBox::Yes | QMessageBox::No); + 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(); @@ -175,7 +186,7 @@ void Curves::update() lock = true; if (GetEepromInterface()->getCapability(HasCvNames)) { - ui->cname_LE->setText(model.curves[currentCurve].name); + ui->curveName->setText(model.curves[currentCurve].name); } int count = model.curves[currentCurve].count; @@ -217,14 +228,27 @@ void Curves::setCurrentCurve(int index) void Curves::updateCurveType() { - int index = (model.curves[currentCurve].type == CurveData::CURVE_TYPE_CUSTOM ? 1 : 0); - 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->curvetype_CB->setCurrentIndex(index); + 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() @@ -335,61 +359,83 @@ void Curves::onNodeUnfocus() updateCurve(); } -void Curves::on_curvetype_CB_currentIndexChanged(int index) +bool Curves::allowCurveType(int points, CurveData::CurveType type) { - static const int numpoint[] = {3,3,5,5,9,9,17,17}; - static const CurveData::CurveType types[] = {CurveData::CURVE_TYPE_STANDARD, CurveData::CURVE_TYPE_CUSTOM, CurveData::CURVE_TYPE_STANDARD, CurveData::CURVE_TYPE_CUSTOM, CurveData::CURVE_TYPE_STANDARD, CurveData::CURVE_TYPE_CUSTOM, CurveData::CURVE_TYPE_STANDARD, CurveData::CURVE_TYPE_CUSTOM}; + int numcurves = GetEepromInterface()->getCapability(NumCurves); - if (!lock) { - lock = true; + int totalpoints = 0; + for (int i=0; igetCapability(NumCurves); - // int currpoints = model.curves[currentCurve].count; - // bool currcustom = model.curves[currentCurve].custom; - - int totalpoints=0; - for (int i=0; igetCapability(NumCurvePoints); - if (fwpoints!=0) { - if (fwpoints < totalpoints) { - QMessageBox::warning(this, "companion9x", tr("Not enough free points in EEPROM to store the curve.")); - updateCurveType(); - lock = false; - return; - } - } - - model.curves[currentCurve].count = numpoint[index]; - model.curves[currentCurve].type = types[index]; - - // TODO something better! - for (int i=0; i= model.curves[currentCurve].count-1 ? +100 : -100 + (200*i)/(numpoint[index]-1)); - model.curves[currentCurve].points[i].y = 0; - } - - update(); - emit modified(); - lock = false; + int fwpoints = GetEepromInterface()->getCapability(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_cname_LE_editingFinished() +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->cname_LE->text().toAscii()); + strcpy(model.curves[currentCurve].name, ui->curveName->text().toAscii()); emit modified(); } @@ -449,6 +495,13 @@ void ModelEdit::on_ca_ctype_CB_currentIndexChanged() } } +float c9xexpou(float point, float coeff) +{ + float x=point*1024.0/100.0; + float k=coeff*256.0/100.0; + return ((k*x*x*x/(1024*1024) + x*(256-k) + 128) / 256)/1024.0*100; +} + void ModelEdit::on_ca_apply_PB_clicked() { int index=ui->ca_ctype_CB->currentIndex(); @@ -600,9 +653,9 @@ void ModelEdit::on_ca_apply_PB_clicked() 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; + 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++) { @@ -623,47 +676,11 @@ void ModelEdit::clearCurves(bool ask) currentCurve=0; curvesLock=false; ui->curvetype_CB->setCurrentIndex(2); - ui->cname_LE->clear(); + ui->curveName->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) { - 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]; - } - } - } - } else { - 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+8].count=5; - model.curves[c+8].custom=false; - for (int i=0; i< 5; i++) { - model.curves[c+8].points[i].y=ar[i]; - } - } - } -} - void ModelEdit::ControlCurveSignal(bool flag) { foreach(QSpinBox *sb, findChildren(QRegExp("curvePt[0-9]+"))) { diff --git a/companion/src/modeledit/curves.h b/companion/src/modeledit/curves.h index a1086dde0..e8915cf65 100644 --- a/companion/src/modeledit/curves.h +++ b/companion/src/modeledit/curves.h @@ -22,8 +22,10 @@ class Curves : public ModelPanel void resetCurve(); void editCurve(); void plotCurve(bool checked); - void on_cname_LE_editingFinished(); - void on_curvetype_CB_currentIndexChanged(int index); + 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(); @@ -41,6 +43,7 @@ class Curves : public ModelPanel void setCurrentCurve(int index); void updateCurve(); void updateCurveType(); + bool allowCurveType(int points, CurveData::CurveType type); }; diff --git a/companion/src/modeledit/curves.ui b/companion/src/modeledit/curves.ui index 17ad1d39a..ed9800e89 100644 --- a/companion/src/modeledit/curves.ui +++ b/companion/src/modeledit/curves.ui @@ -20,9 +20,47 @@ - + + + + + 0 + + + + + + + + + Standard + + + + + Custom + + + + + + + + + Lines + + + + + Smooth + + + + + + - + Curve type @@ -31,52 +69,8 @@ - - - - - 3 points - - - - - 3 points custom - - - - - 5 points - - - - - 5 points custom - - - - - 9 points - - - - - 9 points custom - - - - - 17 points - - - - - 17 points custom - - - - - + Curve name @@ -86,7 +80,7 @@ - + 6 @@ -129,7 +123,7 @@ - + Qt::Vertical diff --git a/companion/src/modeledit/customfunctions.cpp b/companion/src/modeledit/customfunctions.cpp index e6c883ee6..b1805df46 100644 --- a/companion/src/modeledit/customfunctions.cpp +++ b/companion/src/modeledit/customfunctions.cpp @@ -6,6 +6,46 @@ #include #include #include "helpers.h" +#include "appdata.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(); +} + +void RepeatComboBox::update() +{ + unsigned int step = IS_ARM(GetEepromInterface()->getBoard()) ? 1 : 10; + int value = repeatParam/step; + if (step == 1) { + value++; + } + setCurrentIndex(value); +} CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model, GeneralSettings & generalSettings): ModelPanel(parent, model), @@ -16,14 +56,13 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model, int col = 1; addLabel(gridLayout, tr("Switch"), col++); - addLabel(gridLayout, tr("Function"), 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; 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); + populateSwitchCB(fswtchSwtch[i], model.funcSw[i].swtch, POPULATE_ONOFF); // The function fswtchFunc[i] = new QComboBox(this); @@ -110,12 +148,12 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model, fswtchParamT[i] = new QComboBox(this); fswtchParamT[i]->setProperty("index", i); paramLayout->addWidget(fswtchParamT[i]); - populateFuncParamCB(fswtchParamT[i], func, model.funcSw[i].param, model.funcSw[i].adjustMode); + 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); + populateFuncParamArmTCB(fswtchParamArmT[i], model.funcSw[i].paramarm, paramarmList); fswtchParamArmT[i]->setEditable(true); paramLayout->addWidget(fswtchParamArmT[i]); @@ -124,20 +162,18 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model, #ifdef PHONON playBT[i] = new QPushButton(this); - playBT[i]->setObjectName(QString("play_%1").arg(i)); - playBT[i]->setIcon(QIcon(":/images/play.png")); + playBT[i]->setProperty("index", i); + playBT[i]->setProperty("state", "play"); + 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 QComboBox(this); - fswtchRepeat[i]->setProperty("index", i); - connect(fswtchRepeat[i], SIGNAL(currentIndexChanged(int)), this, SLOT(customFunctionEdited())); + fswtchRepeat[i] = new RepeatComboBox(this, model.funcSw[i].repeatParam); repeatLayout->addWidget(fswtchRepeat[i], i+1); - populateRepeatCB(fswtchRepeat[i], model.funcSw[i].repeatParam); + connect(fswtchRepeat[i], SIGNAL(modified()), this, SLOT(onChildModified())); fswtchEnable[i] = new QCheckBox(this); fswtchEnable[i]->setProperty("index", i); @@ -160,6 +196,7 @@ void CustomFunctionsPanel::mediaPlayer_state(Phonon::State newState, Phonon::Sta { if (phononLock) return; + phononLock=true; if ((newState==Phonon::StoppedState || newState==Phonon::PausedState) && oldState==Phonon::PlayingState) { clickObject->stop(); @@ -167,7 +204,7 @@ void CustomFunctionsPanel::mediaPlayer_state(Phonon::State newState, Phonon::Sta clickObject->clear(); for (int i=0; igetCapability(CustomFunctions); i++) { playBT[i]->setObjectName(QString("play_%1").arg(i)); - playBT[i]->setIcon(QIcon(":/images/play.png")); + playBT[i]->setIcon(CompanionIcon("play.png")); } } if (newState==Phonon::ErrorState) { @@ -176,7 +213,7 @@ void CustomFunctionsPanel::mediaPlayer_state(Phonon::State newState, Phonon::Sta clickObject->clear(); for (int i=0; igetCapability(CustomFunctions); i++) { playBT[i]->setObjectName(QString("play_%1").arg(i)); - playBT[i]->setIcon(QIcon(":/images/play.png")); + playBT[i]->setIcon(CompanionIcon("play.png")); } } @@ -186,43 +223,44 @@ void CustomFunctionsPanel::mediaPlayer_state(Phonon::State newState, Phonon::Sta void CustomFunctionsPanel::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(); + QPushButton * button = qobject_cast(sender()); + int index = button->property("index").toInt(); + QString function = button->property("state").toString(); + QString path = g.profile[g.id()].sdPath(); 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 { + 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"; + lang = "en"; path.append(lang); - if (fswtchParamArmT[index]->currentText()!="----") { - track=path+"/"+fswtchParamArmT[index]->currentText()+".wav"; + 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(); + return; } #ifdef PHONON - if (function=="play" && !track.isEmpty()) { + if (function=="play") { 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 { + playBT[index]->setProperty("state", "stop"); + playBT[index]->setIcon(CompanionIcon("stop.png")); + } + else { clickObject->stop(); clickObject->clear(); - playBT[index]->setObjectName(QString("play_%1").arg(index)); - playBT[index]->setIcon(QIcon(":/images/play.png")); + playBT[index]->setProperty("state", "play"); + playBT[index]->setIcon(CompanionIcon("play.png")); } #endif } @@ -250,20 +288,24 @@ void CustomFunctionsPanel::customFunctionEdited() } } +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].repeatParam = (AssignFunc)fswtchRepeat[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) { + if (index>=FuncSafetyCh1 && index<=FuncSafetyCh32) { fswtchParam[i]->setDecimals(0); fswtchParam[i]->setSingleStep(1); fswtchParam[i]->setMinimum(-125); @@ -273,14 +315,15 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified) } fswtchParam[i]->setValue(model.funcSw[i].param); widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM + CUSTOM_FUNCTION_ENABLE; - } else if (index==FuncLogs) { + } + 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 + CUSTOM_FUNCTION_ENABLE; + widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM; } else if (index>=FuncAdjustGV1 && index<=FuncAdjustGVLast) { if (modified) model.funcSw[i].adjustMode = fswtchGVmode[i]->currentIndex(); @@ -293,38 +336,51 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified) fswtchParam[i]->setMaximum(125); fswtchParam[i]->setValue(model.funcSw[i].param); widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM; - } else { + } + else { if (modified) model.funcSw[i].param = fswtchParamT[i]->itemData(fswtchParamT[i]->currentIndex()).toInt(); - populateFuncParamCB(fswtchParamT[i], index, model.funcSw[i].param, model.funcSw[i].adjustMode); + populateFuncParamCB(fswtchParamT[i], model, index, model.funcSw[i].param, model.funcSw[i].adjustMode); widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM; } - } else if (index==FuncReset) { + } + else if (index==FuncReset) { if (modified) model.funcSw[i].param = (uint8_t)fswtchParamT[i]->currentIndex(); - populateFuncParamCB(fswtchParamT[i], index, model.funcSw[i].param); - widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM; - } else if (index==FuncVolume) { + populateFuncParamCB(fswtchParamT[i], model, index, model.funcSw[i].param); + widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM | CUSTOM_FUNCTION_ENABLE; + } + else if (index>=FuncSetTimer1 && index<=FuncSetTimer2) { + if (modified) model.funcSw[i].param = fswtchParam[i]->value(); + fswtchParam[i]->setDecimals(0); + fswtchParam[i]->setSingleStep(1); + fswtchParam[i]->setMinimum(0); + fswtchParam[i]->setMaximum(59*60+59); + fswtchParam[i]->setValue(model.funcSw[i].param); + widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM + CUSTOM_FUNCTION_ENABLE; + } + else if (index==FuncVolume) { if (modified) model.funcSw[i].param = fswtchParamT[i]->itemData(fswtchParamT[i]->currentIndex()).toInt(); - populateFuncParamCB(fswtchParamT[i], index, model.funcSw[i].param); + 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 (modified) model.funcSw[i].repeatParam = fswtchRepeat[i]->itemData(fswtchRepeat[i]->currentIndex()).toInt(); - if (index != FuncBackgroundMusic) { - if (GetEepromInterface()->getCapability(HasFuncRepeat)) { - widgetsMask |= CUSTOM_FUNCTION_REPEAT; - } + } + else if (index==FuncPlaySound || index==FuncPlayHaptic || index==FuncPlayValue || index==FuncPlayPrompt || index==FuncPlayBoth || index==FuncBackgroundMusic) { + if (index != FuncBackgroundMusic && GetEepromInterface()->getCapability(HasFuncRepeat)) { + widgetsMask |= CUSTOM_FUNCTION_REPEAT; + fswtchRepeat[i]->update(); } if (index==FuncPlayValue) { if (modified) model.funcSw[i].param = fswtchParamT[i]->itemData(fswtchParamT[i]->currentIndex()).toInt(); - populateFuncParamCB(fswtchParamT[i], index, model.funcSw[i].param); + populateFuncParamCB(fswtchParamT[i], model, index, model.funcSw[i].param); widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM + CUSTOM_FUNCTION_REPEAT; - } else if (index==FuncPlayPrompt || index==FuncPlayBoth) { + } + 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 { + } + else { widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM + CUSTOM_FUNCTION_REPEAT; fswtchParamGV[i]->setChecked(false); } @@ -333,7 +389,8 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool 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 { + } + else { model.funcSw[i].param = fswtchParam[i]->value(); } } @@ -341,26 +398,35 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified) fswtchParamGV[i]->setChecked(true); fswtchParam[i]->setValue(model.funcSw[i].param-250); fswtchParam[i]->setMaximum(5); - } else { + } + else { fswtchParamGV[i]->setChecked(false); fswtchParam[i]->setValue(model.funcSw[i].param); } if (model.funcSw[i].param < 251) widgetsMask |= CUSTOM_FUNCTION_PLAY; - } else { + } + else { widgetsMask |= CUSTOM_FUNCTION_FILE_PARAM; if (modified) { memset(model.funcSw[i].paramarm, 0, sizeof(model.funcSw[i].paramarm)); - int vml=GetEepromInterface()->getCapability(VoicesMaxLength); + int vml = GetEepromInterface()->getCapability(VoicesMaxLength); if (fswtchParamArmT[i]->currentText() != "----") { widgetsMask |= CUSTOM_FUNCTION_PLAY; - for (int j=0; jcurrentText().length(),vml); j++) { + for (int j=0; jcurrentText().length(), vml); j++) { model.funcSw[i].paramarm[j] = fswtchParamArmT[i]->currentText().toAscii().at(j); } } } + else { + populateFuncParamArmTCB(fswtchParamArmT[i], model.funcSw[i].paramarm, paramarmList); + if (fswtchParamArmT[i]->currentText() != "----") { + widgetsMask |= CUSTOM_FUNCTION_PLAY; + } + } } - } else if (index==FuncBackgroundMusic) { + } + else if (index==FuncBackgroundMusic) { widgetsMask |= CUSTOM_FUNCTION_FILE_PARAM; if (modified) { memset(model.funcSw[i].paramarm, 0, sizeof(model.funcSw[i].paramarm)); @@ -372,21 +438,24 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified) } } } - } else if (index==FuncPlaySound) { + } + else if (index==FuncPlaySound) { if (modified) model.funcSw[i].param = (uint8_t)fswtchParamT[i]->currentIndex(); - populateFuncParamCB(fswtchParamT[i], 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], index, model.funcSw[i].param); + populateFuncParamCB(fswtchParamT[i], model, index, model.funcSw[i].param); widgetsMask |= CUSTOM_FUNCTION_SOURCE_PARAM; } - } else if (model.funcSw[i].swtch.type!=SWITCH_TYPE_NONE) { + 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) { + if (index <= FuncInstantTrim) { widgetsMask |= CUSTOM_FUNCTION_ENABLE; } } @@ -406,24 +475,26 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified) 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-companion9x-fsw")) { - QByteArray fswData = mimeData->data("application/x-companion9x-fsw"); - + 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); + lock = true; + populateSwitchCB(fswtchSwtch[selectedFunction], model.funcSw[selectedFunction].swtch, POPULATE_ONOFF); populateFuncCB(fswtchFunc[selectedFunction], model.funcSw[selectedFunction].func); refreshCustomFunction(selectedFunction); + lock = false; emit modified(); } } @@ -432,7 +503,7 @@ void CustomFunctionsPanel::fswDelete() { model.funcSw[selectedFunction].clear(); // TODO update switch and func - populateSwitchCB(fswtchSwtch[selectedFunction], model.funcSw[selectedFunction].swtch, POPULATE_MSWITCHES|POPULATE_ONOFF); + populateSwitchCB(fswtchSwtch[selectedFunction], model.funcSw[selectedFunction].swtch, POPULATE_ONOFF); populateFuncCB(fswtchFunc[selectedFunction], model.funcSw[selectedFunction].func); refreshCustomFunction(selectedFunction); emit modified(); @@ -440,17 +511,17 @@ void CustomFunctionsPanel::fswDelete() void CustomFunctionsPanel::fswCopy() { - QByteArray fswData; - fswData.append((char*)&model.funcSw[selectedFunction],sizeof(FuncSwData)); - QMimeData *mimeData = new QMimeData; - mimeData->setData("application/x-companion9x-fsw", fswData); - QApplication::clipboard()->setMimeData(mimeData,QClipboard::Clipboard); + 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(); + fswCopy(); + fswDelete(); } void CustomFunctionsPanel::fsw_customContextMenuRequested(QPoint pos) @@ -462,13 +533,134 @@ void CustomFunctionsPanel::fsw_customContextMenuRequested(QPoint pos) const QClipboard *clipboard = QApplication::clipboard(); const QMimeData *mimeData = clipboard->mimeData(); - bool hasData = mimeData->hasFormat("application/x-companion9x-fsw"); + bool hasData = mimeData->hasFormat("application/x-companion-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.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); } + +void CustomFunctionsPanel::populateFuncCB(QComboBox *b, unsigned int value) +{ + b->clear(); + for (unsigned int i=0; iaddItem(FuncSwData(AssignFunc(i)).funcToString()); + if (!GetEepromInterface()->getCapability(HasVolume)) { + if (i==FuncVolume || i==FuncBackgroundMusic || i==FuncBackgroundMusicPause) { + QModelIndex index = b->model()->index(i, 0); + QVariant v(0); + b->model()->setData(index, v, Qt::UserRole - 1); + } + } + if ((i==FuncPlayHaptic) && !GetEepromInterface()->getCapability(Haptic)) { + QModelIndex index = b->model()->index(i, 0); + QVariant v(0); + b->model()->setData(index, v, Qt::UserRole - 1); + } + if ((i==FuncPlayBoth) && !GetEepromInterface()->getCapability(HasBeeper)) { + QModelIndex index = b->model()->index(i, 0); + QVariant v(0); + b->model()->setData(index, v, Qt::UserRole - 1); + } + if ((i==FuncLogs) && !GetEepromInterface()->getCapability(HasSDLogs)) { + QModelIndex index = b->model()->index(i, 0); + QVariant v(0); + b->model()->setData(index, v, Qt::UserRole - 1); + } + } + b->setCurrentIndex(value); + b->setMaxVisibleItems(10); +} + +void CustomFunctionsPanel::populateGVmodeCB(QComboBox *b, unsigned int value) +{ + b->clear(); + b->addItem(QObject::tr("Value")); + b->addItem(QObject::tr("Source")); + b->addItem(QObject::tr("GVAR")); + b->addItem(QObject::tr("Increment")); + b->setCurrentIndex(value); +} + +void CustomFunctionsPanel::populateFuncParamArmTCB(QComboBox *b, char * value, QStringList & paramsList) +{ + b->clear(); + b->addItem("----"); + + bool added = false; + QString currentvalue(value); + foreach ( QString entry, paramsList ) { + b->addItem(entry); + if (entry==currentvalue) { + b->setCurrentIndex(b->count()-1); + added = true; + } + } + + if (!added && strlen(value)) { + b->addItem(value); + b->setCurrentIndex(b->count()-1); + } +} + +void CustomFunctionsPanel::populateFuncParamCB(QComboBox *b, const ModelData & model, uint function, unsigned int value, unsigned int adjustmode) +{ + QStringList qs; + b->clear(); + if (function==FuncPlaySound) { + qs <<"Beep 1" << "Beep 2" << "Beep 3" << "Warn1" << "Warn2" << "Cheep" << "Ratata" << "Tick" << "Siren" << "Ring" ; + qs << "SciFi" << "Robot" << "Chirp" << "Tada" << "Crickt" << "AlmClk" ; + b->addItems(qs); + b->setCurrentIndex(value); + } + else if (function==FuncPlayHaptic) { + qs << "0" << "1" << "2" << "3"; + b->addItems(qs); + b->setCurrentIndex(value); + } + else if (function==FuncReset) { + qs.append( QObject::tr("Timer1")); + 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), model, POPULATE_SOURCES|POPULATE_TRIMS); + } + else if (function==FuncPlayValue) { + populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_VIRTUAL_INPUTS|POPULATE_SWITCHES|POPULATE_GVARS|POPULATE_TRIMS|POPULATE_TELEMETRYEXT); + } + else if (function>=FuncAdjustGV1 && function<=FuncAdjustGVLast) { + switch (adjustmode) { + case 1: + populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_TRIMS|POPULATE_SWITCHES); + break; + case 2: + populateSourceCB(b, RawSource(value), model, POPULATE_GVARS); + break; + case 3: + b->clear(); + b->addItem("-1", 0); + b->addItem("+1", 1); + b->setCurrentIndex(value); + break; + } + } + else { + b->hide(); + } +} diff --git a/companion/src/modeledit/customfunctions.h b/companion/src/modeledit/customfunctions.h index e6729da6a..0730e46c6 100644 --- a/companion/src/modeledit/customfunctions.h +++ b/companion/src/modeledit/customfunctions.h @@ -13,6 +13,24 @@ #include #endif +class RepeatComboBox: public QComboBox +{ + Q_OBJECT + + public: + RepeatComboBox(QWidget *parent, int & repeatParam); + void update(); + + signals: + void modified(); + + private slots: + void onIndexChanged(int); + + protected: + int & repeatParam; +}; + class CustomFunctionsPanel : public ModelPanel { Q_OBJECT @@ -28,6 +46,7 @@ class CustomFunctionsPanel : public ModelPanel 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 @@ -37,7 +56,13 @@ class CustomFunctionsPanel : public ModelPanel void fswCut(); private: + void populateFuncCB(QComboBox *b, unsigned int value); + void populateGVmodeCB(QComboBox *b, unsigned int value); + void populateFuncParamCB(QComboBox *b, const ModelData & model, uint function, unsigned int value, unsigned int adjustmode=0); + void populateFuncParamArmTCB(QComboBox *b, char * value, QStringList & paramsList); + GeneralSettings & generalSettings; + QStringList paramarmList; bool phononLock; QComboBox * fswtchSwtch[C9X_MAX_CUSTOM_FUNCTIONS]; QComboBox * fswtchFunc[C9X_MAX_CUSTOM_FUNCTIONS]; @@ -47,7 +72,7 @@ class CustomFunctionsPanel : public ModelPanel QComboBox * fswtchParamT[C9X_MAX_CUSTOM_FUNCTIONS]; QComboBox * fswtchParamArmT[C9X_MAX_CUSTOM_FUNCTIONS]; QCheckBox * fswtchEnable[C9X_MAX_CUSTOM_FUNCTIONS]; - QComboBox * fswtchRepeat[C9X_MAX_CUSTOM_FUNCTIONS]; + RepeatComboBox * fswtchRepeat[C9X_MAX_CUSTOM_FUNCTIONS]; QComboBox * fswtchGVmode[C9X_MAX_CUSTOM_FUNCTIONS]; #ifdef PHONON Phonon::MediaObject *clickObject; diff --git a/companion/src/modeledit/customswitches.cpp b/companion/src/modeledit/customswitches.cpp deleted file mode 100644 index b20cd1f68..000000000 --- a/companion/src/modeledit/customswitches.cpp +++ /dev/null @@ -1,399 +0,0 @@ -#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("Function"), 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("CS%1").arg(i+1)); - else - label->setText(tr("CS%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.customSw[i].val1 = cswitchSource1[i]->itemData(cswitchSource1[i]->currentIndex()).toInt(); - RawSource newSource = RawSource(model.customSw[i].val1); - if (newSource.type == SOURCE_TYPE_TELEMETRY) { - if (model.customSw[i].func>CS_FN_ELESS && model.customSw[i].funcCS_FN_ELESS && model.customSw[i].funcvalue()/source.getStep(model)); - } else { - model.customSw[i].val2 = ((cswitchOffset[i]->value()-source.getOffset(model))/source.getStep(model))-source.getRawOffset(model); - } - } - setSwitchWidgetVisibility(i); - } else { - source=RawSource(model.customSw[i].val1); - if (model.customSw[i].func>CS_FN_ELESS && model.customSw[i].funcvalue()/source.getStep(model)); - cswitchOffset[i]->setValue(model.customSw[i].val2*source.getStep(model)); - } else { - model.customSw[i].val2 = ((cswitchOffset[i]->value()-source.getOffset(model))/source.getStep(model))-source.getRawOffset(model); - cswitchOffset[i]->setValue((model.customSw[i].val2 +source.getRawOffset(model))*source.getStep(model)+source.getOffset(model)); - } - } - 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); - 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, POPULATE_SOURCES | (GetEepromInterface()->getCapability(ExtraTrims) ? POPULATE_TRIMS : 0) | POPULATE_SWITCHES | POPULATE_TELEMETRY | (GetEepromInterface()->getCapability(GvarsInCS) ? POPULATE_GVARS : 0)); - cswitchOffset[i]->setDecimals(source.getDecimals(model)); - cswitchOffset[i]->setSingleStep(source.getStep(model)); - if (model.customSw[i].func>CS_FN_ELESS && model.customSw[i].funcsetMinimum(source.getStep(model)*-127); - cswitchOffset[i]->setMaximum(source.getStep(model)*127); - cswitchOffset[i]->setValue(source.getStep(model)*model.customSw[i].val2); - } else { - cswitchOffset[i]->setMinimum(source.getMin(model)); - cswitchOffset[i]->setMaximum(source.getMax(model)); - cswitchOffset[i]->setValue(source.getStep(model)*(model.customSw[i].val2+source.getRawOffset(model))+source.getOffset(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(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), POPULATE_SOURCES | (GetEepromInterface()->getCapability(ExtraTrims) ? POPULATE_TRIMS : 0) | POPULATE_SWITCHES | POPULATE_TELEMETRY | (GetEepromInterface()->getCapability(GvarsInCS) ? POPULATE_GVARS : 0)); - populateSourceCB(cswitchSource2[i], RawSource(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(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-companion9x-csw")) { - QByteArray cswData = mimeData->data("application/x-companion9x-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-companion9x-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-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); -} diff --git a/companion/src/modeledit/expodialog.cpp b/companion/src/modeledit/expodialog.cpp index bb2df0c65..49e86fc8a 100644 --- a/companion/src/modeledit/expodialog.cpp +++ b/companion/src/modeledit/expodialog.cpp @@ -3,188 +3,142 @@ #include "eeprominterface.h" #include "helpers.h" -ExpoDialog::ExpoDialog(QWidget *parent, ExpoData *expoData, int stickMode) : +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 }; + 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); - - int gvars=0; - if (GetEepromInterface()->getCapability(HasVariants)) { - if ((GetCurrentFirmwareVariant() & GVARS_VARIANT)) { - gvars=1; - } - } else { - gvars=1; - } + setWindowTitle(tr("Edit %1").arg(getInputStr(model, ed->chn))); + QRegExp rx(CHAR_FOR_NAMES_REGEX); - if (gvars==0) { - ui->weightGV->setDisabled(true); - ui->curveGVarCB->hide(); - if ((ed->curve.type == CurveReference::CURVE_REF_EXPO || ed->curve.type == CurveReference::CURVE_REF_DIFF) && ed->curve.value > 100) { - ed->curve.value = 0; - } - if (ed->weight>100 || ed->weight<-100) { - ed->weight = 100; - } - } + 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); - populateGVCB(ui->weightCB, ed->weight); + populateSwitchCB(ui->switchesCB,ed->swtch); - 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->sideCB->setCurrentIndex(ed->mode-1); - populateSwitchCB(ui->switchesCB,ed->swtch); - - // TODO keep this group, same in MixerDialog - CurveGroup * curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB, ed->curve); - - 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(); - } - else { - ui->sourceLabel->hide(); - ui->sourceCB->hide(); - ui->scaleLabel->hide(); - ui->scaleSB->hide(); - ui->trimLabel->hide(); - ui->trimCB->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->curveTypeCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->curveGVarCB,SIGNAL(stateChanged(int)),this,SLOT(valuesChanged())); - connect(ui->curveValueCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->curveValueSB,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->sideCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); - connect(ui->weightGV,SIGNAL(stateChanged(int)),this,SLOT(widgetChanged())); + if (!GetEepromInterface()->getCapability(FlightPhases)) { + ui->label_phases->hide(); for (int i=0; i<9; i++) { - connect(cb_fp[i],SIGNAL(toggled(bool)),this,SLOT(valuesChanged())); + lb_fp[i]->hide(); + cb_fp[i]->hide(); } - QTimer::singleShot(0, this, SLOT(shrink())); + } + 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 ui; + delete gvGroup; + delete curveGroup; + delete ui; } -void ExpoDialog::changeEvent(QEvent *e) +void ExpoDialog::updateScale() { - QDialog::changeEvent(e); - switch (e->type()) { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - default: - break; - } -} - -void ExpoDialog::widgetChanged() -{ - // TODO so many times duplicated :( - int gvars=0; - if (GetEepromInterface()->getCapability(HasVariants)) { - if ((GetCurrentFirmwareVariant() & GVARS_VARIANT)) { - gvars=1; - } - } else { - gvars=1; + 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(); } - - /* TODO if (gvars==1) { - 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->weightGV->isChecked()) { - ed->weight = ui->weightCB->itemData(ui->weightCB->currentIndex()).toInt(); - } else { - ed->weight = ui->weightSB->value(); + 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; - int i=0; - for (i=0; iexpoName->text().toAscii().length(); i++) { - ed->name[i]=ui->expoName->text().toAscii().at(i); - } - ed->name[i]=0; + + 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()) { @@ -231,5 +185,5 @@ void ExpoDialog::valuesChanged() void ExpoDialog::shrink() { - resize(0,0); + resize(0, 0); } diff --git a/companion/src/modeledit/expodialog.h b/companion/src/modeledit/expodialog.h index a7630cc87..2d96b130a 100644 --- a/companion/src/modeledit/expodialog.h +++ b/companion/src/modeledit/expodialog.h @@ -4,27 +4,32 @@ #include #include "eeprominterface.h" +class GVarGroup; +class CurveGroup; + namespace Ui { - class ExpoDialog; + class ExpoDialog; } class ExpoDialog : public QDialog { Q_OBJECT -public: - ExpoDialog(QWidget *parent, ExpoData *mixdata, int stickMode); + public: + ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expodata, int stickMode); ~ExpoDialog(); -protected: - void changeEvent(QEvent *e); + protected: + void updateScale(); -private slots: + private slots: void valuesChanged(); - void widgetChanged(); void shrink(); -private: - Ui::ExpoDialog *ui; - ExpoData *ed; + private: + Ui::ExpoDialog * ui; + ModelData & model; + ExpoData * ed; + GVarGroup * gvGroup; + CurveGroup * curveGroup; }; #endif // EXPODIALOG_H diff --git a/companion/src/modeledit/expodialog.ui b/companion/src/modeledit/expodialog.ui index baf7c6b14..82d16dbc2 100644 --- a/companion/src/modeledit/expodialog.ui +++ b/companion/src/modeledit/expodialog.ui @@ -6,8 +6,8 @@ 0 0 - 370 - 331 + 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,14 +92,14 @@ - + Flight modes - + @@ -249,29 +256,29 @@ - + 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. - + Stick Side - + @@ -290,7 +297,7 @@ If blank then the expo is considered to be "ON" all the time. - + @@ -309,7 +316,7 @@ If blank then the expo is considered to be "ON" all the time. - + Qt::Vertical @@ -322,15 +329,8 @@ If blank then the expo is considered to be "ON" all the time. - - - - The source for the mixer - - - - - + + <!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"> @@ -352,28 +352,21 @@ p, li { white-space: pre-wrap; } - + Scale - + Include Trim - - - - Source - - - - + @@ -387,14 +380,14 @@ p, li { white-space: pre-wrap; } - + Curve - + @@ -402,7 +395,7 @@ p, li { white-space: pre-wrap; } - The curve used by the expo + The curve used by the input @@ -425,10 +418,57 @@ p, li { white-space: pre-wrap; } + + + + 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/flightmodes.cpp b/companion/src/modeledit/flightmodes.cpp index 4a4e5e651..a5cd400a0 100644 --- a/companion/src/modeledit/flightmodes.cpp +++ b/companion/src/modeledit/flightmodes.cpp @@ -17,9 +17,11 @@ FlightMode::FlightMode(QWidget * parent, ModelData & model, int phaseIdx, Genera { ui->setupUi(this); + int modesCount = GetEepromInterface()->getCapability(FlightPhases); + // Phase name QRegExp rx(CHAR_FOR_NAMES_REGEX); - if (GetEepromInterface()->getCapability(FlightPhases)) { + if (modesCount) { ui->name->setValidator(new QRegExpValidator(rx, this)); ui->name->setMaxLength(GetEepromInterface()->getCapability(FlightModesName)); connect(ui->name, SIGNAL(editingFinished()), this, SLOT(phaseName_editingFinished())); @@ -66,14 +68,19 @@ FlightMode::FlightMode(QWidget * parent, ModelData & model, int phaseIdx, Genera 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(); + QComboBox * cb = trimsUse[i]; + cb->setProperty("index", i); + cb->addItem(QObject::tr("Trim disabled"), -1); + for (int m=0; maddItem(QObject::tr("Own Trim"), m*2); + } + else if (phaseIdx > 0) { + cb->addItem(QObject::tr("Use Trim from Flight mode %1").arg(m), m*2); + cb->addItem(QObject::tr("Use Trim from Flight mode %1 + Own Trim as an offset").arg(m), m*2+1); + } } + connect(cb, SIGNAL(currentIndexChanged(int)), this, SLOT(phaseTrimUse_currentIndexChanged(int))); trimsValue[i]->setProperty("index", i); connect(trimsValue[i], SIGNAL(valueChanged(int)), this, SLOT(phaseTrim_valueChanged())); @@ -123,17 +130,6 @@ FlightMode::FlightMode(QWidget * parent, ModelData & model, int phaseIdx, Genera QLabel *label = new QLabel(ui->gvGB); 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) { @@ -193,7 +189,6 @@ void FlightMode::update() int chn = CONVERT_MODE(i+1)-1; if (chn == 2/*TODO constant*/ && model.throttleReversed) trimsSlider[i]->setInvertedAppearance(true); - trimUpdate(i); } @@ -262,23 +257,22 @@ void FlightMode::phaseFadeOut_editingFinished() 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; + lock = true; + int chn = CONVERT_MODE(trim+1)-1; + int value = model.getTrimValue(phaseIdx, chn); + trimsSlider[trim]->setValue(value); + trimsValue[trim]->setValue(value); + if (phase.trimMode[chn] < 0) { + trimsUse[trim]->setCurrentIndex(0); + trimsValue[trim]->setEnabled(false); + trimsSlider[trim]->setEnabled(false); + } + else { + trimsUse[trim]->setCurrentIndex(1 + 2*phase.trimRef[chn] + phase.trimMode[chn] - (phase.trimRef[chn] > phaseIdx ? 1 : 0)); + trimsValue[trim]->setEnabled(true); + trimsSlider[trim]->setEnabled(true); + } + lock = false; } void FlightMode::phaseGVValue_editingFinished() @@ -380,15 +374,17 @@ void FlightMode::phaseTrimUse_currentIndexChanged(int index) 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; + int data = comboBox->itemData(index).toInt(); + if (data < 0) { + phase.trimMode[chn] = -1; + phase.trimRef[chn] = 0; + phase.trim[chn] = 0; } else { + phase.trimMode[chn] = data % 2; + phase.trimRef[chn] = data / 2; phase.trim[chn] = 0; - phase.trimRef[chn] = index - 1 + (index > (int)phaseIdx ? 1 : 0); } - trimUpdate(trim); emit modified(); } @@ -401,7 +397,7 @@ void FlightMode::phaseTrim_valueChanged() int trim = spinBox->property("index").toInt(); int chn = CONVERT_MODE(trim+1)-1; int value = spinBox->value(); - phase.trim[chn] = value; + model.setTrimValue(phaseIdx, chn, value); lock = true; trimsSlider[trim]->setValue(value); lock = false; @@ -416,7 +412,7 @@ void FlightMode::phaseTrimSlider_valueChanged() int trim = slider->property("index").toInt(); int chn = CONVERT_MODE(trim+1)-1; int value = slider->value(); - phase.trim[chn] = value; + model.setTrimValue(phaseIdx, chn, value); lock = true; trimsValue[trim]->setValue(value); lock = false; diff --git a/companion/src/modeledit/heli.cpp b/companion/src/modeledit/heli.cpp index 6c584658a..a6a97a1b9 100644 --- a/companion/src/modeledit/heli.cpp +++ b/companion/src/modeledit/heli.cpp @@ -26,7 +26,7 @@ void HeliPanel::update() lock = true; ui->swashTypeCB->setCurrentIndex(model.swashRingData.type); - populateSourceCB(ui->swashCollectiveCB, model.swashRingData.collectiveSource, POPULATE_SOURCES | POPULATE_SWITCHES | POPULATE_TRIMS); + 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); diff --git a/companion/src/modeledit/inputs.cpp b/companion/src/modeledit/inputs.cpp index d8882f01b..a6e1f6eac 100644 --- a/companion/src/modeledit/inputs.cpp +++ b/companion/src/modeledit/inputs.cpp @@ -14,24 +14,24 @@ InputsPanel::InputsPanel(QWidget *parent, ModelData & model, GeneralSettings & g 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->setIcon(CompanionIcon("moveup.png")); qbUp->setShortcut(QKeySequence(tr("Ctrl+Up"))); qbDown->setText(tr("Move Down")); - qbDown->setIcon(QIcon(":/images/movedown.png")); + qbDown->setIcon(CompanionIcon("movedown.png")); qbDown->setShortcut(QKeySequence(tr("Ctrl+Down"))); - qbClear->setText(tr("Clear Expo Settings")); - qbClear->setIcon(QIcon(":/images/clear.png")); + 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(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())); @@ -48,20 +48,26 @@ 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) { + + QString str; + + while (curDest<(int)md->chn-1) { curDest++; - str = getStickStr(curDest); + str = getInputStr(model, curDest); qba.clear(); qba.append((quint8)-curDest-1); QListWidgetItem *itm = new QListWidgetItem(str); @@ -69,14 +75,30 @@ void InputsPanel::update() ExposlistWidget->addItem(itm); } - if(curDest!=(int)md->chn) { - str = getStickStr(md->chn); + 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 = " "; + } + else { + if (GetEepromInterface()->getCapability(VirtualInputs)) + str = " "; + else + str = " "; } - if (!GetEepromInterface()->getCapability(VirtualInputs)) { + 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; @@ -94,12 +116,10 @@ void InputsPanel::update() if (md->swtch.type != SWITCH_TYPE_NONE) str += " " + tr("Switch(%1)").arg(md->swtch.toString()); if (GetEepromInterface()->getCapability(HasExpoNames)) { - QString ExpoName; - ExpoName.append(md->name); - if (!ExpoName.isEmpty()) { - str+=QString("(%1)").arg(ExpoName); - } + 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)); @@ -108,9 +128,9 @@ void InputsPanel::update() ExposlistWidget->addItem(itm); //(str); } - while(curDest=C9X_MAX_EXPOS || model.expoData[C9X_MAX_EXPOS-1].mode > 0) { - QMessageBox::information(this, "companion9x", tr("Not enough available expos!")); - return false; - } + 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; + int chn = model.expoData[idx].chn; + + ExpoData * newExpo = model.insertInput(idx); + newExpo->chn = chn; + newExpo->weight = 100; + newExpo->mode = INPUT_MODE_BOTH; + + 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)); + model.removeInput(index); } void InputsPanel::gm_openExpo(int index) @@ -154,12 +172,13 @@ void InputsPanel::gm_openExpo(int index) emit modified(); update(); - ExpoDialog *g = new ExpoDialog(this, &mixd, generalSettings.stickMode); - if(g->exec()) { + ExpoDialog *g = new ExpoDialog(this, model, &mixd, generalSettings.stickMode); + if (g->exec()) { model.expoData[index] = mixd; emit modified(); update(); - } else { + } + else { if (expoInserted) { gm_deleteExpo(index); } @@ -203,8 +222,8 @@ void InputsPanel::exposDelete(bool ask) QMessageBox::StandardButton ret = QMessageBox::No; if(ask) - ret = QMessageBox::warning(this, "companion9x", - tr("Delete Selected Expos?"), + ret = QMessageBox::warning(this, "companion", + tr("Delete Selected Inputs?"), QMessageBox::Yes | QMessageBox::No); @@ -231,7 +250,7 @@ void InputsPanel::exposCopy() } QMimeData *mimeData = new QMimeData; - mimeData->setData("application/x-companion9x-expo", mxData); + mimeData->setData("application/x-companion-expo", mxData); QApplication::clipboard()->setMimeData(mimeData,QClipboard::Clipboard); } @@ -245,7 +264,7 @@ void InputsPanel::mimeExpoDropped(int index, const QMimeData *data, Qt::DropActi #include void InputsPanel::pasteExpoMimeData(const QMimeData * mimeData, int destIdx) { - if (mimeData->hasFormat("application/x-companion9x-expo")) { + if (mimeData->hasFormat("application/x-companion-expo")) { int idx; // mixer index int dch; @@ -257,7 +276,7 @@ void InputsPanel::pasteExpoMimeData(const QMimeData * mimeData, int destIdx) dch = model.expoData[idx].chn; } - QByteArray mxData = mimeData->data("application/x-companion9x-expo"); + QByteArray mxData = mimeData->data("application/x-companion-expo"); int i = 0; while (i < mxData.size()) { @@ -333,20 +352,20 @@ void InputsPanel::expolistWidget_customContextMenuRequested(QPoint pos) const QClipboard *clipboard = QApplication::clipboard(); const QMimeData *mimeData = clipboard->mimeData(); - bool hasData = mimeData->hasFormat("application/x-companion9x-expo"); + bool hasData = mimeData->hasFormat("application/x-companion-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.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(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.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(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.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); } @@ -442,7 +461,7 @@ void InputsPanel::exposDeleteList(QList list) void InputsPanel::clearExpos() { - if (QMessageBox::question(this, tr("Clear Expos?"), tr("Really clear all the expos?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { + 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/logicalswitches.cpp b/companion/src/modeledit/logicalswitches.cpp new file mode 100644 index 000000000..1902a76ae --- /dev/null +++ b/companion/src/modeledit/logicalswitches.cpp @@ -0,0 +1,398 @@ +#include "logicalswitches.h" +#include +#include +#include +#include +#include +#include +#include "helpers.h" + +LogicalSwitchesPanel::LogicalSwitchesPanel(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(LogicalSwitchesExt)) { + addLabel(gridLayout, tr("Duration"), col++); + addLabel(gridLayout, tr("Delay"), col++); + } + + lock = true; + for (int i=0; igetCapability(LogicalSwitches); 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(v1Edited(int))); + 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(v2Edited(int))); + 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(andEdited(int))); + gridLayout->addWidget(cswitchAnd[i], i+1, 4); + + if (GetEepromInterface()->getCapability(LogicalSwitchesExt)) { + // Duration + cswitchDuration[i] = new QDoubleSpinBox(this); + cswitchDuration[i]->setProperty("index", i); + cswitchDuration[i]->setSingleStep(0.1); + cswitchDuration[i]->setMaximum(25); + cswitchDuration[i]->setMinimum(0); + cswitchDuration[i]->setAccelerated(true); + cswitchDuration[i]->setDecimals(1); + connect(cswitchDuration[i], SIGNAL(valueChanged(double)), this, SLOT(durationEdited(double))); + gridLayout->addWidget(cswitchDuration[i], i+1, 5); + + // Delay + cswitchDelay[i] = new QDoubleSpinBox(this); + cswitchDelay[i]->setProperty("index", i); + cswitchDelay[i]->setSingleStep(0.1); + cswitchDelay[i]->setMaximum(25); + cswitchDelay[i]->setMinimum(0); + cswitchDelay[i]->setAccelerated(true); + cswitchDelay[i]->setDecimals(1); + connect(cswitchDelay[i], SIGNAL(valueChanged(double)), this, SLOT(delayEdited(double))); + gridLayout->addWidget(cswitchDelay[i], i+1, 6); + } + } + + lock = false; +} + +LogicalSwitchesPanel::~LogicalSwitchesPanel() +{ +} + +void LogicalSwitchesPanel::v1Edited(int value) +{ + if (!lock) { + int i = sender()->property("index").toInt(); + model.customSw[i].val1 = cswitchSource1[i]->itemData(value).toInt(); + if (model.customSw[i].getFunctionFamily() == LS_FAMILY_VOFS) { + RawSource source = RawSource(model.customSw[i].val1, &model); + if (source.type == SOURCE_TYPE_TELEMETRY) { + if (model.customSw[i].func == LS_FN_DPOS || model.customSw[i].func == LS_FN_DAPOS) { + model.customSw[i].val2 = 0; + } + else { + model.customSw[i].val2 = -128; + } + } + else { + RawSourceRange range = source.getRange(); + if (model.customSw[i].func == LS_FN_DPOS || model.customSw[i].func == LS_FN_DAPOS) { + model.customSw[i].val2 = (cswitchOffset[i]->value() / range.step); + } + else { + model.customSw[i].val2 = (cswitchOffset[i]->value() - range.offset) / range.step/* TODO - source.getRawOffset(model)*/; + } + } + setSwitchWidgetVisibility(i); + } + emit modified(); + } +} + +void LogicalSwitchesPanel::v2Edited(int value) +{ + if (!lock) { + int i = sender()->property("index").toInt(); + model.customSw[i].val2 = cswitchSource2[i]->itemData(value).toInt(); + emit modified(); + } +} + +void LogicalSwitchesPanel::andEdited(int value) +{ + if (!lock) { + int index = sender()->property("index").toInt(); + model.customSw[index].andsw = cswitchAnd[index]->itemData(value).toInt(); + emit modified(); + } +} + +void LogicalSwitchesPanel::durationEdited(double duration) +{ + int index = sender()->property("index").toInt(); + model.customSw[index].duration = (uint8_t)round(duration*10); + emit modified(); +} + +void LogicalSwitchesPanel::delayEdited(double delay) +{ + int index = sender()->property("index").toInt(); + model.customSw[index].delay = (uint8_t)round(delay*10); + emit modified(); +} + +void LogicalSwitchesPanel::edited() +{ + if (!lock) { + lock = true; + int i = sender()->property("index").toInt(); + int newFunc = csw[i]->itemData(csw[i]->currentIndex()).toInt(); + bool chAr = (model.customSw[i].getFunctionFamily() != LogicalSwitchData(newFunc).getFunctionFamily()); + model.customSw[i].func = newFunc; + if (chAr) { + if (model.customSw[i].getFunctionFamily() == LS_FAMILY_TIMER) { + model.customSw[i].val1 = -119; + model.customSw[i].val2 = -119; + } + else if (model.customSw[i].getFunctionFamily() == LS_FAMILY_STAY) { + model.customSw[i].val1 = 0; + model.customSw[i].val2 = -129; + model.customSw[i].val3 = 0; + } + else { + model.customSw[i].val1 = 0; + model.customSw[i].val2 = 0; + } + model.customSw[i].andsw = 0; + setSwitchWidgetVisibility(i); + } + + RawSource source; + switch (model.customSw[i].getFunctionFamily()) + { + case LS_FAMILY_VOFS: + { + source = RawSource(model.customSw[i].val1, &model); + RawSourceRange range = source.getRange(); + if (model.customSw[i].func == LS_FN_DPOS || model.customSw[i].func == LS_FN_DAPOS) { + model.customSw[i].val2 = (cswitchOffset[i]->value() / 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 LS_FAMILY_TIMER: + model.customSw[i].val1 = TimToVal(cswitchValue[i]->value()); + model.customSw[i].val2 = TimToVal(cswitchOffset[i]->value()); + updateTimerParam(cswitchValue[i], model.customSw[i].val1); + updateTimerParam(cswitchOffset[i], model.customSw[i].val2); + break; + case LS_FAMILY_STAY: + model.customSw[i].val2 = TimToVal(cswitchOffset[i]->value()); + updateTimerParam(cswitchOffset[i], model.customSw[i].val2, true); + break; + default: + break; + } + emit modified(); + lock = false; + } +} + +void LogicalSwitchesPanel::updateTimerParam(QDoubleSpinBox *sb, int timer, bool allowZero) +{ + sb->setVisible(true); + sb->setDecimals(1); + sb->setMinimum(allowZero ? 0.0 : 0.1); + sb->setMaximum(175); + float value = ValToTim(timer); + if (value>60) + sb->setSingleStep(1); + else if (value>2) + sb->setSingleStep(0.5); + else + sb->setSingleStep(0.1); + sb->setValue(value); +} + +void LogicalSwitchesPanel::setSwitchWidgetVisibility(int i) +{ + lock = true; + + RawSource source = RawSource(model.customSw[i].val1, &model); + RawSourceRange range = source.getRange(); + + switch (model.customSw[i].getFunctionFamily()) + { + case LS_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 == LS_FN_DPOS || model.customSw[i].func == LS_FN_DAPOS) { + cswitchOffset[i]->setMinimum(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 LS_FAMILY_VBOOL: + case LS_FAMILY_STICKY: + 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 LS_FAMILY_STAY: + cswitchSource1[i]->setVisible(true); + cswitchSource2[i]->setVisible(false); + cswitchValue[i]->setVisible(false); + populateSwitchCB(cswitchSource1[i], RawSwitch(model.customSw[i].val1)); + updateTimerParam(cswitchOffset[i], model.customSw[i].val2, true); + break; + case LS_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 LS_FAMILY_TIMER: + cswitchSource1[i]->setVisible(false); + cswitchSource2[i]->setVisible(false); + updateTimerParam(cswitchValue[i], model.customSw[i].val1); + updateTimerParam(cswitchOffset[i], model.customSw[i].val2); + break; + } + + lock = false; +} + +void LogicalSwitchesPanel::update() +{ + for (int i=0; igetCapability(LogicalSwitches); i++) { + lock = true; + populateCSWCB(csw[i], model.customSw[i].func); + lock = false; + setSwitchWidgetVisibility(i); + lock = true; + populateAndSwitchCB(cswitchAnd[i], RawSwitch(model.customSw[i].andsw)); + if (GetEepromInterface()->getCapability(LogicalSwitchesExt)) { + cswitchDuration[i]->setValue(model.customSw[i].duration/10.0); + cswitchDelay[i]->setValue(model.customSw[i].delay/10.0); + } + lock = false; + } +} + +void LogicalSwitchesPanel::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"); + + LogicalSwitchData *csw = &model.customSw[selectedSwitch]; + memcpy(csw, cswData.mid(0, sizeof(LogicalSwitchData)).constData(), sizeof(LogicalSwitchData)); + emit modified(); + updateSelectedSwitch(); + } +} + +void LogicalSwitchesPanel::cswDelete() +{ + model.customSw[selectedSwitch].clear(); + emit modified(); + updateSelectedSwitch(); +} + +void LogicalSwitchesPanel::cswCopy() +{ + QByteArray cswData; + cswData.append((char*)&model.customSw[selectedSwitch],sizeof(LogicalSwitchData)); + QMimeData *mimeData = new QMimeData; + mimeData->setData("application/x-companion-csw", cswData); + QApplication::clipboard()->setMimeData(mimeData,QClipboard::Clipboard); +} + +void LogicalSwitchesPanel::updateSelectedSwitch() +{ + lock = true; + populateCSWCB(csw[selectedSwitch], model.customSw[selectedSwitch].func); + setSwitchWidgetVisibility(selectedSwitch); + lock = false; +} + +void LogicalSwitchesPanel::cswCut() +{ + cswCopy(); + cswDelete(); +} + +// TODO make something generic here! +void LogicalSwitchesPanel::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/logicalswitches.h similarity index 64% rename from companion/src/modeledit/customswitches.h rename to companion/src/modeledit/logicalswitches.h index c00ad60b6..ef7945afd 100644 --- a/companion/src/modeledit/customswitches.h +++ b/companion/src/modeledit/logicalswitches.h @@ -5,18 +5,23 @@ #include #include -class CustomSwitchesPanel : public ModelPanel +class LogicalSwitchesPanel : public ModelPanel { Q_OBJECT public: - CustomSwitchesPanel(QWidget *parent, ModelData & model); - virtual ~CustomSwitchesPanel(); + LogicalSwitchesPanel(QWidget *parent, ModelData & model); + virtual ~LogicalSwitchesPanel(); virtual void update(); private slots: void edited(); + void v1Edited(int value); + void v2Edited(int value); + void andEdited(int value); + void durationEdited(double duration); + void delayEdited(double delay); void csw_customContextMenuRequested(QPoint pos); void cswDelete(); void cswCopy(); @@ -36,6 +41,8 @@ class CustomSwitchesPanel : public ModelPanel int selectedSwitch; void updateSelectedSwitch(); + void updateV2(int index); + void updateTimerParam(QDoubleSpinBox *sb, int timer, bool allowZero=false); }; diff --git a/companion/src/modeledit/mixerdialog.cpp b/companion/src/modeledit/mixerdialog.cpp index d0d4c3560..7ef03fdca 100644 --- a/companion/src/modeledit/mixerdialog.cpp +++ b/companion/src/modeledit/mixerdialog.cpp @@ -3,9 +3,10 @@ #include "eeprominterface.h" #include "helpers.h" -MixerDialog::MixerDialog(QWidget *parent, MixData *mixdata, int stickMode) : +MixerDialog::MixerDialog(QWidget *parent, ModelData & model, MixData *mixdata, int stickMode) : QDialog(parent), ui(new Ui::MixerDialog), + model(model), md(mixdata), lock(false) { @@ -19,84 +20,44 @@ MixerDialog::MixerDialog(QWidget *parent, MixData *mixdata, int stickMode) : 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)); - + populateSourceCB(ui->sourceCB, md->srcRaw, model, POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TRIMS); ui->sourceCB->removeItem(0); - int limit=GetEepromInterface()->getCapability(OffsetWeight); - 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); - if (md->weight>limit || md->weight<-limit) { - md->weight=100; - } - if (md->sOffset>limit || md->sOffset<-limit) { - md->sOffset=0; - } - } - populateGVCB(ui->offsetCB,md->sOffset); - populateGVCB(ui->weightCB,md->weight); - 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(); - } + 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 * curveGroup = new CurveGroup(ui->curveTypeCB, ui->curveGVarCB, ui->curveValueCB, ui->curveValueSB, md->curve); + 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(); } - 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); - int namelength=GetEepromInterface()->getCapability(HasMixerNames); + + 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 { + } + 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++) { @@ -118,9 +79,6 @@ MixerDialog::MixerDialog(QWidget *parent, MixData *mixdata, int stickMode) : } } - ui->mixerName->setValidator(new QRegExpValidator(rx, this)); - ui->mixerName->setText(md->name); - populateSwitchCB(ui->switchesCB,md->swtch); ui->warningCB->setCurrentIndex(md->mixWarn); ui->mltpxCB->setCurrentIndex(md->mltpx); @@ -147,12 +105,6 @@ MixerDialog::MixerDialog(QWidget *parent, MixData *mixdata, int stickMode) : 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->weightSB,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); - connect(ui->offsetSB,SIGNAL(editingFinished()),this,SLOT(valuesChanged())); - connect(ui->weightGV,SIGNAL(stateChanged(int)),this,SLOT(widgetChanged())); // TODO why the same slot? - connect(ui->offsetGV,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->switchesCB,SIGNAL(currentIndexChanged(int)),this,SLOT(valuesChanged())); @@ -169,54 +121,23 @@ MixerDialog::MixerDialog(QWidget *parent, MixData *mixdata, int stickMode) : MixerDialog::~MixerDialog() { - delete ui; + delete gvWeightGroup; + delete gvOffsetGroup; + delete curveGroup; + delete ui; } void MixerDialog::changeEvent(QEvent *e) { - QDialog::changeEvent(e); - switch (e->type()) { + QDialog::changeEvent(e); + + switch (e->type()) { case QEvent::LanguageChange: - ui->retranslateUi(this); - break; + ui->retranslateUi(this); + break; default: - break; - } -} - -void MixerDialog::widgetChanged() -{ - int gvars = 0; - if (GetEepromInterface()->getCapability(HasVariants)) { - if ((GetCurrentFirmwareVariant() & GVARS_VARIANT)) { - gvars = 1; - } + break; } - else { - gvars = 1; - } - - if (gvars == 1) { - 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() @@ -224,29 +145,21 @@ 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()); + 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 { + } + else { ui->MixDR_CB->setVisible(true); ui->label_MixDR->setVisible(true); } - } else { + } + 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->swtch = RawSwitch(ui->switchesCB->itemData(ui->switchesCB->currentIndex()).toInt()); @@ -276,6 +189,7 @@ void MixerDialog::valuesChanged() } } -void MixerDialog::shrink() { - resize(0,0); +void MixerDialog::shrink() +{ + resize(0, 0); } diff --git a/companion/src/modeledit/mixerdialog.h b/companion/src/modeledit/mixerdialog.h index 9435e1892..437d9ca21 100644 --- a/companion/src/modeledit/mixerdialog.h +++ b/companion/src/modeledit/mixerdialog.h @@ -4,29 +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/modeledit/mixerdialog.ui b/companion/src/modeledit/mixerdialog.ui index ed14a05b9..04d876b80 100644 --- a/companion/src/modeledit/mixerdialog.ui +++ b/companion/src/modeledit/mixerdialog.ui @@ -6,7 +6,7 @@ 0 0 - 342 + 364 434 @@ -20,7 +20,7 @@ Dialog - + :/icon.png:/icon.png @@ -612,7 +612,7 @@ If blank then the mix is considered to be "ON" all the time. - + diff --git a/companion/src/modeledit/mixerslist.cpp b/companion/src/modeledit/mixerslist.cpp index 4d2f90320..06d8cd3f5 100644 --- a/companion/src/modeledit/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/modeledit/mixerslist.h b/companion/src/modeledit/mixerslist.h index 01b225a39..52e9ffebb 100644 --- a/companion/src/modeledit/mixerslist.h +++ b/companion/src/modeledit/mixerslist.h @@ -6,24 +6,19 @@ class MixersList : public QListWidget { Q_OBJECT -public: - explicit MixersList(QWidget *parent, bool expo); -// QMimeData * mimeData ( const QList items ); + public: + explicit MixersList(QWidget *parent, bool expo); void keyPressEvent(QKeyEvent *event); - -signals: + signals: void mimeDropped(int index, const QMimeData *data, Qt::DropAction action); void keyWasPressed(QKeyEvent *event); - -protected: - -public slots: + public slots: bool dropMimeData(int index, const QMimeData *data, Qt::DropAction action); -private: + private: QPoint dragStartPosition; bool expo; diff --git a/companion/src/modeledit/mixes.cpp b/companion/src/modeledit/mixes.cpp index 63a4bcb9c..df92f5ecb 100644 --- a/companion/src/modeledit/mixes.cpp +++ b/companion/src/modeledit/mixes.cpp @@ -14,15 +14,14 @@ MixesPanel::MixesPanel(QWidget *parent, ModelData & model, GeneralSettings & gen 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->setIcon(CompanionIcon("moveup.png")); qbUp->setShortcut(QKeySequence(tr("Ctrl+Up"))); qbDown->setText(tr("Move Down")); - qbDown->setIcon(QIcon(":/images/movedown.png")); + qbDown->setIcon(CompanionIcon("movedown.png")); qbDown->setShortcut(QKeySequence(tr("Ctrl+Down"))); qbClear->setText(tr("Clear Mixes")); - qbClear->setIcon(QIcon(":/images/clear.png")); + qbClear->setIcon(CompanionIcon("clear.png")); mixesLayout->addWidget(MixerlistWidget,1,1,1,3); mixesLayout->addWidget(qbUp,2,1); @@ -54,15 +53,16 @@ void MixesPanel::update() 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++) { + 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)) { + while (curDest<(md->destCh-1)) { curDest++; if (curDest > outputs) { str = tr("X%1 ").arg(curDest-outputs); - } else { + } + else { str = tr("CH%1%2").arg(curDest/10).arg(curDest%10); if (GetEepromInterface()->getCapability(HasChNames) && showNames) { QString name=model.limitData[curDest-1].name; @@ -81,7 +81,8 @@ void MixesPanel::update() if (md->destCh > outputs) { str = tr("X%1 ").arg(md->destCh-outputs); - } else { + } + else { str = tr("CH%1%2").arg(md->destCh/10).arg(md->destCh%10); str.append(" "); if (GetEepromInterface()->getCapability(HasChNames) && showNames) { @@ -98,7 +99,7 @@ void MixesPanel::update() str.fill(' '); } - switch(md->mltpx) { + switch (md->mltpx) { case (1): str += " *"; break; case (2): str += " R"; break; default: str += " "; break; @@ -111,22 +112,26 @@ void MixesPanel::update() 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 (md->carryTrim>0) { - str += " " + tr("No Trim"); + if (md->swtch.type != SWITCH_TYPE_NONE) { + str += " " + tr("Switch(%1)").arg(md->swtch.toString()); } - else if (md->carryTrim<0) { - str += " " + RawSource(SOURCE_TYPE_TRIM, (-(md->carryTrim)-1)).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; + 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) @@ -143,8 +148,8 @@ void MixesPanel::update() 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); + itm->setData(Qt::UserRole, qba); // mix number + MixerlistWidget->addItem(itm); //(str); } while(curDestgetCapability(ExtraChannels)) { @@ -176,7 +181,7 @@ void MixesPanel::update() bool MixesPanel::gm_insertMix(int idx) { if (idx<0 || idx>=GetEepromInterface()->getCapability(Mixes) || model.mixData[GetEepromInterface()->getCapability(Mixes)-1].destCh > 0) { - QMessageBox::information(this, "companion9x", tr("Not enough available mixers!")); + QMessageBox::information(this, "companion", tr("Not enough available mixers!")); return false; } @@ -205,7 +210,7 @@ void MixesPanel::gm_openMix(int index) emit modified(); update(); - MixerDialog *g = new MixerDialog(this, &mixd, generalSettings.stickMode); + MixerDialog *g = new MixerDialog(this, model, &mixd, generalSettings.stickMode); if(g->exec()) { model.mixData[index] = mixd; emit modified(); @@ -281,7 +286,7 @@ void MixesPanel::mixersDelete(bool ask) QMessageBox::StandardButton ret = QMessageBox::No; if(ask) - ret = QMessageBox::warning(this, "companion9x", + ret = QMessageBox::warning(this, "companion", tr("Delete Selected Mixes?"), QMessageBox::Yes | QMessageBox::No); @@ -310,13 +315,13 @@ void MixesPanel::mixersCopy() } QMimeData *mimeData = new QMimeData; - mimeData->setData("application/x-companion9x-mix", mxData); + 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-companion9x-mix")) { + if(mimeData->hasFormat("application/x-companion-mix")) { int idx; // mixer index int dch; @@ -328,7 +333,7 @@ void MixesPanel::pasteMixerMimeData(const QMimeData * mimeData, int destIdx) dch = model.mixData[idx].destCh; } - QByteArray mxData = mimeData->data("application/x-companion9x-mix"); + QByteArray mxData = mimeData->data("application/x-companion-mix"); int i = 0; while(imimeData(); - bool hasData = mimeData->hasFormat("application/x-companion9x-mix"); + bool hasData = mimeData->hasFormat("application/x-companion-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.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(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.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(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.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); } diff --git a/companion/src/modeledit/modeledit.cpp b/companion/src/modeledit/modeledit.cpp index fcdc68108..efc953736 100644 --- a/companion/src/modeledit/modeledit.cpp +++ b/companion/src/modeledit/modeledit.cpp @@ -7,9 +7,11 @@ #include "mixes.h" #include "channels.h" #include "curves.h" -#include "customswitches.h" +#include "../helpers.h" +#include "logicalswitches.h" #include "customfunctions.h" #include "telemetry.h" +#include "appdata.h" #include ModelEdit::ModelEdit(RadioData & radioData, int modelId, bool openWizard, bool isNew, QWidget *parent) : @@ -17,20 +19,21 @@ ModelEdit::ModelEdit(RadioData & radioData, int modelId, bool openWizard, bool i ui(new Ui::ModelEdit), modelId(modelId), model(radioData.models[modelId]), - generalSettings(generalSettings) + generalSettings(radioData.generalSettings) { ui->setupUi(this); + restoreGeometry(g.modelEditGeo()); + 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("Custom Switches")); + addTab(new LogicalSwitchesPanel(this, model), tr("Logical Switches")); if (GetEepromInterface()->getCapability(CustomFunctions)) - addTab(new CustomFunctionsPanel(this, model, radioData.generalSettings), tr("Assignable Functions")); + addTab(new CustomFunctionsPanel(this, model, radioData.generalSettings), tr("Switch Assignment")); addTab(new Curves(this, model), tr("Curves")); - // TODO remove this capability if (!GetEepromInterface()->getCapability(FSSwitch)) if (GetEepromInterface()->getCapability(Telemetry) & TM_HASTELEMETRY) addTab(new TelemetryPanel(this, model), tr("Telemetry")); } @@ -40,6 +43,11 @@ ModelEdit::~ModelEdit() delete ui; } +void ModelEdit::closeEvent(QCloseEvent *event) +{ + g.modelEditGeo( saveGeometry() ); +} + class VerticalScrollArea : public QScrollArea { public: @@ -98,33 +106,13 @@ 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(this); - sd.loadParams(*simuData, modelId); - sd.exec(); - } - else { - simulatorDialog sd(this); - sd.loadParams(*simuData, modelId); - sd.exec(); - } - delete simuData; - } - else { - QMessageBox::warning(NULL, - QObject::tr("Warning"), - QObject::tr("Simulator for this firmware is not yet available")); - } + RadioData *simuData = new RadioData(); + simuData->generalSettings = generalSettings; + simuData->models[0] = model; + startSimulation(this, *simuData, 0); + delete simuData; } diff --git a/companion/src/modeledit/modeledit.h b/companion/src/modeledit/modeledit.h index 4208a7190..9450d90d4 100644 --- a/companion/src/modeledit/modeledit.h +++ b/companion/src/modeledit/modeledit.h @@ -15,6 +15,9 @@ class ModelEdit : public QDialog 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(); diff --git a/companion/src/modeledit/modeledit.ui b/companion/src/modeledit/modeledit.ui index a4ac2fa1e..9002e383b 100644 --- a/companion/src/modeledit/modeledit.ui +++ b/companion/src/modeledit/modeledit.ui @@ -20,7 +20,7 @@ Dialog - + :/icon.png:/icon.png @@ -50,10 +50,6 @@ Simulate - - - :/images/simulate.png:/images/simulate.png - @@ -61,7 +57,7 @@ - + diff --git a/companion/src/modeledit/setup.cpp b/companion/src/modeledit/setup.cpp index 0302d367e..6dd46c3e0 100644 --- a/companion/src/modeledit/setup.cpp +++ b/companion/src/modeledit/setup.cpp @@ -3,6 +3,7 @@ #include "ui_setup_timer.h" #include "ui_setup_module.h" #include "helpers.h" +#include "appdata.h" TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer): ModelPanel(parent, model), @@ -11,21 +12,22 @@ TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer): { ui->setupUi(this); + lock = true; + // Mode - populateTimerSwitchCB(ui->mode, timer.mode); + populateSwitchCB(ui->mode, timer.mode, POPULATE_TIMER_MODES); if (!GetEepromInterface()->getCapability(PermTimers)) { ui->persistent->hide(); ui->persistentValue->hide(); } - if (!GetEepromInterface()->getCapability(minuteBeep)) { - ui->minuteBeep->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")); - if (!GetEepromInterface()->getCapability(countdownBeep)) { - ui->countdownBeep->hide(); - } + lock = false; } TimerPanel::~TimerPanel() @@ -54,13 +56,8 @@ void TimerPanel::update() ui->persistentValue->setText(QString(" %1(%2:%3:%4)").arg(sign<0 ? "-" :" ").arg(hours, 2, 10, QLatin1Char('0')).arg(minutes, 2, 10, QLatin1Char('0')).arg(seconds, 2, 10, QLatin1Char('0'))); } - if (GetEepromInterface()->getCapability(minuteBeep)) { - ui->minuteBeep->setChecked(timer.minuteBeep); - } - - if (GetEepromInterface()->getCapability(countdownBeep)) { - ui->countdownBeep->setChecked(timer.countdownBeep); - } + ui->countdownBeep->setCurrentIndex(timer.countdownBeep); + ui->minuteBeep->setChecked(timer.minuteBeep); } void TimerPanel::on_value_editingFinished() @@ -71,8 +68,10 @@ void TimerPanel::on_value_editingFinished() void TimerPanel::on_mode_currentIndexChanged(int index) { - timer.mode = TimerMode(ui->mode->itemData(index).toInt()); - emit modified(); + if (!lock) { + timer.mode = RawSwitch(ui->mode->itemData(index).toInt()); + emit modified(); + } } void TimerPanel::on_persistent_toggled(bool checked) @@ -81,15 +80,15 @@ void TimerPanel::on_persistent_toggled(bool checked) emit modified(); } -void TimerPanel::on_minuteBeep_toggled(bool checked) +void TimerPanel::on_countdownBeep_currentIndexChanged(int index) { - timer.minuteBeep = checked; + timer.countdownBeep = index; emit modified(); } -void TimerPanel::on_countdownBeep_toggled(bool checked) +void TimerPanel::on_minuteBeep_toggled(bool checked) { - timer.countdownBeep = checked; + timer.minuteBeep = checked; emit modified(); } @@ -107,16 +106,16 @@ ModulePanel::ModulePanel(QWidget *parent, ModelData & model, ModuleData & module QString label; if (moduleIdx < 0) { - label = tr("Trainer Module"); + label = tr("Trainer Output"); ui->trainerMode->setCurrentIndex(model.trainerMode); } else { ui->label_trainerMode->hide(); ui->trainerMode->hide(); if (moduleIdx == 0) - label = tr("Internal Module"); + label = tr("Internal Radio System"); else - label = tr("External Module"); + label = tr("External Radio Module"); } ui->label_module->setText(label); @@ -131,20 +130,20 @@ ModulePanel::ModulePanel(QWidget *parent, ModelData & model, ModuleData & module 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); + QLabel * label = new QLabel(this); + label->setText(QString::number(i+1)); + QDoubleSpinBox * spinbox = new QDoubleSpinBox(this); spinbox->setMinimumSize(QSize(20, 0)); spinbox->setRange(-100, 100); - slider->setProperty("index", i); + spinbox->setSingleStep(0.1); + spinbox->setDecimals(1); + spinbox->setValue(((double)module.failsafeChannels[i]*100)/1024); + label->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(label, 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))); + connect(spinbox, SIGNAL(valueChanged(double)), this, SLOT(onFailsafeSpinChanged(double))); } } @@ -224,14 +223,14 @@ void ModulePanel::update() ui->label_failsafeMode->setVisible(mask & MASK_FAILSAFES); ui->failsafeMode->setVisible(mask & MASK_FAILSAFES); ui->failsafeMode->setCurrentIndex(module.failsafeMode); - ui->label_failsafeFrame->setVisible(mask & MASK_FAILSAFES); - ui->failsafesFrame->setVisible(mask & MASK_FAILSAFES); 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) @@ -306,16 +305,12 @@ void ModulePanel::on_failsafeMode_currentIndexChanged(int value) } } -void ModulePanel::onFailsafeChannelChanged(int value) +void ModulePanel::onFailsafeSpinChanged(double value) { if (!lock) { - lock = true; int index = sender()->property("index").toInt(); - module.failsafeChannels[index] = value; - failsafeSpins[index]->setValue(value); - failsafeSliders[index]->setValue(value); + module.failsafeChannels[index] = (value*1024)/100; emit modified(); - lock = false; } } @@ -353,8 +348,7 @@ Setup::Setup(QWidget *parent, ModelData & model): if (GetEepromInterface()->getCapability(ModelImage)) { QStringList items; items.append(""); - QSettings settings("companion9x", "companion9x"); - QString path = settings.value("sdPath", ".").toString(); + QString path = g.profile[g.id()].sdPath(); path.append("/BMP/"); QDir qd(path); int vml = GetEepromInterface()->getCapability(VoicesMaxLength)+4; @@ -398,6 +392,10 @@ Setup::Setup(QWidget *parent, ModelData & model): ui->modelImage_label->hide(); ui->imagePreview->hide(); } + + if (!GetEepromInterface()->getCapability(HasDisplayText)) { + ui->displayText->hide(); + } // Beep Center checkboxes int analogs = 4 + GetEepromInterface()->getCapability(Pots); @@ -409,14 +407,12 @@ Setup::Setup(QWidget *parent, ModelData & model): 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(); + QLabel * label = new QLabel(this); + QSlider * slider = new QSlider(this); + QCheckBox * cb = new QCheckBox(this); slider->setProperty("index", i+1); slider->setOrientation(Qt::Vertical); slider->setMinimum(0); @@ -435,13 +431,35 @@ Setup::Setup(QWidget *parent, ModelData & model): label->setText(switches9X[i]); slider->setMaximum(i==0 ? 2 : 1); } + cb->setProperty("index", i+1); ui->switchesStartupLayout->addWidget(label, 0, i+1); + ui->switchesStartupLayout->setAlignment(label, Qt::AlignCenter); ui->switchesStartupLayout->addWidget(slider, 1, i+1); + ui->switchesStartupLayout->setAlignment(slider, Qt::AlignCenter); + ui->switchesStartupLayout->addWidget(cb, 2, i+1); + ui->switchesStartupLayout->setAlignment(cb, Qt::AlignCenter); connect(slider, SIGNAL(valueChanged(int)), this, SLOT(startupSwitchEdited(int))); + connect(cb, SIGNAL(toggled(bool)), this, SLOT(startupSwitchToggled(bool))); startupSwitchesSliders << slider; + startupSwitchesCheckboxes << cb; } ui->switchesStartupLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, GetEepromInterface()->getCapability(Switches)); + // Pot warnings + if(IS_TARANIS(GetEepromInterface()->getBoard())) { + for (int i=0; igetCapability(Pots); i++) { + QCheckBox * cb = new QCheckBox(this); + cb->setProperty("index", i+1); + cb->setText(AnalogString(i+4)); + ui->potWarningLayout->addWidget(cb, 0, i+1); + connect(cb, SIGNAL(toggled(bool)), this, SLOT(potWarningToggled(bool))); + potWarningCheckboxes << cb; + } + } + else { + ui->label_potWarning->hide(); + ui->potWarningMode->hide(); + } lock = false; } @@ -458,7 +476,7 @@ void Setup::on_extendedLimits_toggled(bool checked) void Setup::on_throttleWarning_toggled(bool checked) { - model.disableThrottleWarning = checked; + model.disableThrottleWarning = !checked; emit modified(); } @@ -476,7 +494,7 @@ void Setup::on_extendedTrims_toggled(bool checked) void Setup::on_trimIncrement_currentIndexChanged(int index) { - model.trimInc = index; + model.trimInc = index-2; emit modified(); } @@ -497,8 +515,7 @@ void Setup::on_image_currentIndexChanged(int index) { if (!lock) { strncpy(model.bitmap, ui->image->currentText().toAscii(), GetEepromInterface()->getCapability(VoicesMaxLength)); - QSettings settings("companion9x", "companion9x"); - QString path=settings.value("sdPath", ".").toString(); + QString path=g.profile[g.id()].sdPath(); path.append("/BMP/"); QDir qd(path); if (qd.exists()) { @@ -532,16 +549,21 @@ void Setup::update() ui->throttleReverse->setChecked(model.throttleReversed); populateTTraceCB(ui->throttleSource, model.thrTraceSrc); - ui->throttleWarning->setChecked(model.disableThrottleWarning); + ui->throttleWarning->setChecked(!model.disableThrottleWarning); //trim inc, thro trim, thro expo, instatrim - ui->trimIncrement->setCurrentIndex(model.trimInc); + ui->trimIncrement->setCurrentIndex(model.trimInc+2); ui->throttleTrim->setChecked(model.thrTrim); ui->extendedLimits->setChecked(model.extendedLimits); ui->extendedTrims->setChecked(model.extendedTrims); + ui->displayText->setChecked(model.displayText); updateBeepCenter(); updateStartupSwitches(); + + if(IS_TARANIS(GetEepromInterface()->getBoard())) { + updatePotWarnings(); + } for (int i=0; iupdate(); @@ -563,13 +585,13 @@ 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]; + QCheckBox * cb = startupSwitchesCheckboxes[i]; + bool enabled = !(model.nSwToWarn & (1 << i)); slider->setEnabled(enabled); + cb->setChecked(enabled); if (IS_TARANIS(GetEepromInterface()->getBoard())) { slider->setValue(i==5 ? (switchStates & 0x3)/2 : switchStates & 0x3); switchStates >>= 2; @@ -590,36 +612,31 @@ void Setup::startupSwitchEdited(int value) 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); + if (IS_TARANIS(GetEepromInterface()->getBoard())) { + if (index == 6) { + shift = (index - 1) * 2; + mask = 0x02 << shift; + shift++; + } else { - shift = index*2 - 1; + shift = (index - 1) * 2; mask = 0x03 << shift; } } else { if (index == 1) { - shift = 1; - mask = 0x03 << shift; + mask = 0x03; } else { - mask = 0x01 << (index+1); + shift = index; + mask = 0x01 << shift; } } model.switchWarningStates &= ~mask; if (value) { - if (shift == 0) { - model.switchWarningStates |= mask; - } - else { - model.switchWarningStates |= (value << shift); - } + model.switchWarningStates |= (value << shift); } updateStartupSwitches(); @@ -627,6 +644,72 @@ void Setup::startupSwitchEdited(int value) } } +void Setup::startupSwitchToggled(bool checked) +{ + if (!lock) { + int index = sender()->property("index").toInt()-1; + + if (checked) + model.nSwToWarn &= ~(1 << index); + else + model.nSwToWarn |= (1 << index); + + updateStartupSwitches(); + emit modified(); + } +} + +void Setup::updatePotWarnings() +{ + lock = true; + int mode = model.nPotsToWarn >> 6; + ui->potWarningMode->setCurrentIndex(mode); + + if (mode == 0) + model.nPotsToWarn = 0x3F; + + for (int i=0; isetChecked(enabled); + potWarningCheckboxes[i]->setDisabled(mode == 0); + } + lock = false; +} + +void Setup::potWarningToggled(bool checked) +{ + if (!lock) { + int index = sender()->property("index").toInt()-1; + + if(checked) + model.nPotsToWarn &= ~(1 << index); + else + model.nPotsToWarn |= (1 << index); + + updatePotWarnings(); + emit modified(); + } +} + +void Setup::on_potWarningMode_currentIndexChanged(int index) +{ + if (!lock) { + int mask = 0xC0; + model.nPotsToWarn = model.nPotsToWarn & ~mask; + model.nPotsToWarn = model.nPotsToWarn | ((index << 6) & mask); + + updatePotWarnings(); + emit modified(); + } +} + +void Setup::on_displayText_toggled(bool checked) +{ + model.displayText = checked; + emit modified(); +} + void Setup::on_throttleTrim_toggled(bool checked) { model.thrTrim = checked; diff --git a/companion/src/modeledit/setup.h b/companion/src/modeledit/setup.h index 7b33ffe5a..b785e2750 100644 --- a/companion/src/modeledit/setup.h +++ b/companion/src/modeledit/setup.h @@ -6,6 +6,7 @@ #include #include #include +#include namespace Ui { class Setup; @@ -28,7 +29,7 @@ class TimerPanel : public ModelPanel void on_value_editingFinished(); void on_persistent_toggled(bool checked); void on_minuteBeep_toggled(bool checked); - void on_countdownBeep_toggled(bool checked); + void on_countdownBeep_currentIndexChanged(int index); private: TimerData & timer; @@ -55,14 +56,13 @@ class ModulePanel : public ModelPanel void on_ppmFrameLength_editingFinished(); void on_rxNumber_editingFinished(); void on_failsafeMode_currentIndexChanged(int value); - void onFailsafeChannelChanged(int value); + void onFailsafeSpinChanged(double value); private: ModuleData & module; int moduleIdx; Ui::Module *ui; - QVector failsafeSpins; - QVector failsafeSliders; + QVector failsafeSpins; }; class Setup : public ModelPanel @@ -83,19 +83,26 @@ class Setup : public ModelPanel void on_extendedTrims_toggled(bool checked); void on_throttleWarning_toggled(bool checked); void on_throttleReverse_toggled(bool checked); + void on_displayText_toggled(bool checked); void on_image_currentIndexChanged(int index); void on_trimIncrement_currentIndexChanged(int index); void onBeepCenterToggled(bool checked); void startupSwitchEdited(int value); + void startupSwitchToggled(bool checked); + void potWarningToggled(bool checked); + void on_potWarningMode_currentIndexChanged(int index); void onChildModified(); private: Ui::Setup *ui; QVector startupSwitchesSliders; + QVector startupSwitchesCheckboxes; + QVector potWarningCheckboxes; QVector centerBeepCheckboxes; ModulePanel * modules[C9X_NUM_MODULES+1]; TimerPanel * timers[C9X_MAX_TIMERS]; void updateStartupSwitches(); + void updatePotWarnings(); void updateBeepCenter(); }; diff --git a/companion/src/modeledit/setup.ui b/companion/src/modeledit/setup.ui index c4a632c00..29753cdb3 100644 --- a/companion/src/modeledit/setup.ui +++ b/companion/src/modeledit/setup.ui @@ -6,8 +6,8 @@ 0 0 - 782 - 334 + 787 + 727 @@ -16,134 +16,6 @@ - - - - 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 - - - - - @@ -231,6 +103,85 @@ + + + + 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 Warnings + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Center beep + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Trim Increment + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + @@ -288,6 +239,29 @@ + + + + Qt::RightToLeft + + + Display Checklist + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -353,6 +327,58 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi + + + + QLayout::SetMinimumSize + + + 0 + + + 6 + + + 6 + + + + + + + true + + + Pot Warnings + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + OFF + + + + + Manual + + + + + Auto + + + + + + diff --git a/companion/src/modeledit/setup_module.ui b/companion/src/modeledit/setup_module.ui index 500ea2fe8..406488f96 100644 --- a/companion/src/modeledit/setup_module.ui +++ b/companion/src/modeledit/setup_module.ui @@ -443,7 +443,7 @@ - + 16777215 diff --git a/companion/src/modeledit/setup_timer.ui b/companion/src/modeledit/setup_timer.ui index 96ed9370f..e87ed86b8 100644 --- a/companion/src/modeledit/setup_timer.ui +++ b/companion/src/modeledit/setup_timer.ui @@ -6,8 +6,8 @@ 0 0 - 726 - 54 + 586 + 38 @@ -33,6 +33,23 @@ + + + + Countdown + + + + + + + + + + MinuteBeep + + + @@ -47,20 +64,6 @@ - - - - MinuteBeep - - - - - - - CountDownBeep - - - diff --git a/companion/src/modeledit/telemetry.cpp b/companion/src/modeledit/telemetry.cpp index 22db68ae4..e06fe96a3 100644 --- a/companion/src/modeledit/telemetry.cpp +++ b/companion/src/modeledit/telemetry.cpp @@ -1,7 +1,9 @@ #include "telemetry.h" #include "ui_telemetry.h" #include "ui_telemetry_analog.h" +#include "ui_telemetry_customscreen.h" #include "helpers.h" +#include "appdata.h" TelemetryAnalog::TelemetryAnalog(QWidget *parent, FrSkyChannelData & analog): QWidget(parent), @@ -11,15 +13,13 @@ TelemetryAnalog::TelemetryAnalog(QWidget *parent, FrSkyChannelData & analog): { ui->setupUi(this); - float ratio; + float ratio = analog.getRatio(); if (analog.type==0 || analog.type==1 || analog.type==2) { - ratio = (analog.ratio<RatioSB->setDecimals(1); ui->RatioSB->setMaximum(25.5*GetEepromInterface()->getCapability(TelemetryMaxMultiplier)); } else { - ratio = analog.ratio<RatioSB->setDecimals(0); ui->RatioSB->setMaximum(255*GetEepromInterface()->getCapability(TelemetryMaxMultiplier)); } @@ -44,69 +44,44 @@ TelemetryAnalog::TelemetryAnalog(QWidget *parent, FrSkyChannelData & analog): void TelemetryAnalog::update() { - float ratio, alarm1value, alarm2value; - if (analog.ratio==0) { - ui->alarm1ValueSB->setMinimum(0); - ui->alarm1ValueSB->setMaximum(0); - ui->alarm2ValueSB->setMinimum(0); - ui->alarm2ValueSB->setMaximum(0); - ui->CalibSB->setMinimum(0); - ui->CalibSB->setMaximum(0); - ui->CalibSB->setValue(0); - ui->alarm1ValueSB->setValue(0); - ui->alarm2ValueSB->setValue(0); - return; - } + float ratio = analog.getRatio(); + float step = ratio / 255; + float mini = (ratio * analog.offset) / 255; + float maxi = mini + ratio; - if (analog.type==0 || analog.type==1 || analog.type==2) { - ratio=(analog.ratio<alarm1ValueSB->setDecimals(2); - ui->alarm1ValueSB->setSingleStep(ratio/255.0); - ui->alarm2ValueSB->setDecimals(2); - ui->alarm2ValueSB->setSingleStep(ratio/255.0); - ui->alarm1ValueSB->setMinimum((analog.ratio*1.0*analog.offset)/2550.0); - ui->alarm1ValueSB->setMaximum(ratio+(analog.ratio*1.0*analog.offset)/2550.0); - ui->alarm2ValueSB->setMinimum((analog.offset*1.0*analog.ratio)/2550.0); - ui->alarm2ValueSB->setMaximum(ratio+(analog.offset*1.0*analog.ratio)/2550.0); - } - else { - ratio=analog.ratio<alarm1ValueSB->setDecimals(2); - ui->alarm1ValueSB->setSingleStep(ratio/255.0); - ui->alarm2ValueSB->setDecimals(2); - ui->alarm2ValueSB->setSingleStep(ratio/255.0); - ui->alarm1ValueSB->setMinimum((analog.offset*1.0*analog.ratio)/255.0); - ui->alarm1ValueSB->setMaximum(ratio+(analog.offset*1.0*analog.ratio)/255.0); - ui->alarm2ValueSB->setMinimum((analog.offset*1.0*analog.ratio)/255.0); - ui->alarm2ValueSB->setMaximum(ratio+(analog.offset*1.0*analog.ratio)/255.0); - } - ui->CalibSB->setDecimals(2); - ui->CalibSB->setMaximum((ratio*127)/255.0); - ui->CalibSB->setMinimum((-ratio*128)/255.0); - ui->CalibSB->setSingleStep(ratio/255.0); - ui->CalibSB->setValue((analog.offset*ratio)/255); - alarm1value=ratio*(analog.alarms[0].value/255.0+analog.offset/255.0); - alarm2value=ratio*(analog.alarms[1].value/255.0+analog.offset/255.0);; - ui->alarm1ValueSB->setValue(alarm1value); - ui->alarm2ValueSB->setValue(alarm2value); + 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.type=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)); - ratio=(analog.ratio<RatioSB->setDecimals(0); ui->RatioSB->setMaximum(255*GetEepromInterface()->getCapability(TelemetryMaxMultiplier)); - ratio=(analog.ratio<RatioSB->setValue(ratio); @@ -127,7 +102,7 @@ void TelemetryAnalog::on_RatioSB_valueChanged() } else { analog.multiplier = findmult(ui->RatioSB->value(), 255); - float singlestep =(1<RatioSB->setSingleStep(singlestep); ui->RatioSB->setValue(round(ui->RatioSB->value()/singlestep)*singlestep); @@ -139,15 +114,17 @@ void TelemetryAnalog::on_RatioSB_valueChanged() void TelemetryAnalog::on_RatioSB_editingFinished() { + if (!lock) { float ratio, calib, alarm1value,alarm2value; - if (lock) return; + 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<0) { if (calib>((ratio*127)/255)) { analog.offset=127; - } else { + } + else { analog.offset=round(calib*255/ratio); } } @@ -185,18 +163,15 @@ void TelemetryAnalog::on_RatioSB_editingFinished() analog.alarms[0].value=round((alarm1value*255-analog.offset*(analog.ratio<CalibSB->value()/ratio)); calib=ratio*analog.offset/255.0; @@ -204,7 +179,8 @@ void TelemetryAnalog::on_CalibSB_editingFinished() alarm2value=ui->alarm2ValueSB->value(); if (alarm1value(ratio+calib)) { + } + else if (alarm1value>(ratio+calib)) { alarm1value=ratio+calib; } if (alarm2valuealarm1ValueSB->value(); - if (analog.type==0) { - ratio/=10; - } + if (alarm1value<((calib*ratio)/255)) { analog.alarms[0].value=0; - } else if (alarm1value>(ratio+(calib*ratio)/255)) { + } + else if (alarm1value>(ratio+(calib*ratio)/255)) { analog.alarms[0].value=255; - } else { + } + else { analog.alarms[0].value = round((alarm1value-((calib*ratio)/255))/ratio*255); } update(); @@ -259,28 +235,26 @@ void TelemetryAnalog::on_alarm1ValueSB_editingFinished() void TelemetryAnalog::on_alarm2LevelCB_currentIndexChanged(int index) { - analog.alarms[1].level = index; - emit modified(); + analog.alarms[1].level = index; + emit modified(); } void TelemetryAnalog::on_alarm2GreaterCB_currentIndexChanged(int index) { - analog.alarms[1].greater = index; - emit modified(); + analog.alarms[1].greater = index; + emit modified(); } void TelemetryAnalog::on_alarm2ValueSB_editingFinished() { - float ratio, calib, alarm2value; - ratio = analog.ratio<alarm2ValueSB->value(); - if (analog.type==0) { - ratio/=10; - } if (alarm2value<((calib*ratio)/255)) { analog.alarms[1].value=0; - } else if (alarm2value>(ratio+(calib*ratio)/255)) { + } + else if (alarm2value>(ratio+(calib*ratio)/255)) { analog.alarms[1].value=255; } else { analog.alarms[1].value = round((alarm2value-((calib*ratio)/255))/ratio*255); @@ -296,41 +270,182 @@ TelemetryAnalog::~TelemetryAnalog() /******************************************************/ +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 (int(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())); - 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(this->maxSB, maxSB, sizeof(this->maxSB)); - memcpy(this->minSB, minSB, sizeof(this->minSB)); - memcpy(csf, tmp, sizeof(csf)); + 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(); } @@ -342,23 +457,9 @@ TelemetryPanel::~TelemetryPanel() void TelemetryPanel::setup() { - QSettings settings("companion9x", "companion9x"); - QString firmware_id = settings.value("firmware", default_firmware_variant.id).toString(); + QString firmware_id = g.profile[g.id()].fwType(); lock=true; - ui->telemetryCSType1->setCurrentIndex(model.frsky.screens[0].type); - ui->telemetryCSType2->setCurrentIndex(model.frsky.screens[1].type); - ui->telemetryCSType3->setCurrentIndex(model.frsky.screens[2].type); - - for (int i=0; i<3; i++) { - bool isNum = (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) ) { @@ -371,16 +472,19 @@ void TelemetryPanel::setup() if (!GetEepromInterface()->getCapability(HasAltitudeSel)) { ui->AltitudeGPS_ChkB->hide(); - } else { + } + else { ui->AltitudeGPS_ChkB->setChecked(model.frsky.FrSkyGpsAlt); } - int varioCap=GetEepromInterface()->getCapability(HasVario); - // if (IS_TARANIS(GetEepromInterface()->getBoard())) { - if (false) { + + if (IS_TARANIS(GetEepromInterface()->getBoard())) { ui->AltitudeToolbar_ChkB->setChecked(model.frsky.altitudeDisplayed); - } else { + } + else { ui->AltitudeToolbar_ChkB->hide(); } + + int varioCap = GetEepromInterface()->getCapability(HasVario); if (!varioCap) { ui->varioLimitMax_DSB->hide(); ui->varioLimitMinOff_ChkB->hide(); @@ -394,7 +498,8 @@ void TelemetryPanel::setup() ui->VarioLabel_4->hide(); ui->varioSourceCB->hide(); ui->varioSource_label->hide(); - } else { + } + else { if (!GetEepromInterface()->getCapability(HasVarioSink)) { ui->varioLimitMinOff_ChkB->hide(); ui->varioLimitMin_DSB->hide(); @@ -428,44 +533,12 @@ void TelemetryPanel::setup() if (!(GetEepromInterface()->getCapability(HasAltitudeSel)||GetEepromInterface()->getCapability(HasVario))) { ui->altimetryGB->hide(); } - if (GetEepromInterface()->getCapability(NoTelemetryProtocol)) { - 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(NoTelemetryProtocol)) { + ui->frskyProtoCB->setDisabled(true); + } + else { + ui->frskyProtoCB->setEnabled(true); } if (!GetEepromInterface()->getCapability(TelemetryUnits)) { @@ -476,11 +549,39 @@ void TelemetryPanel::setup() } ui->frskyUnitsCB->setCurrentIndex(index); } + if ((GetEepromInterface()->getCapability(Telemetry)&TM_HASWSHH)) { ui->frskyProtoCB->addItem(tr("Winged Shadow How High")); - } else { + } + 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); @@ -488,57 +589,6 @@ void TelemetryPanel::setup() ui->frskyCurrentCB->setCurrentIndex(model.frsky.currentSource); ui->frskyVoltCB->setCurrentIndex(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], model.frsky.screens[screen].body.lines[rows].source[cols], (rows<4), model.frsky.usrProto); - } - } - } - - for (int j=0; j<12; j++) { - int screen = j/4; - int field = j%4; - populateCustomScreenFieldCB(barsCB[j], model.frsky.screens[screen].body.bars[field].source, false, model.frsky.usrProto); - switch (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(model.frsky.screens[screen].body.bars[field].source, 0, &model.frsky)); - minSB[j]->setMaximum(getBarValue(model.frsky.screens[screen].body.bars[field].source, 255, &model.frsky)); - minSB[j]->setSingleStep(getBarStep(model.frsky.screens[screen].body.bars[field].source)); - minSB[j]->setValue(getBarValue(model.frsky.screens[screen].body.bars[field].source, model.frsky.screens[screen].body.bars[field].barMin, &model.frsky)); - maxSB[j]->setMinimum(getBarValue(model.frsky.screens[screen].body.bars[field].source, 0, &model.frsky)); - maxSB[j]->setMaximum(getBarValue(model.frsky.screens[screen].body.bars[field].source, 255, &model.frsky)); - maxSB[j]->setSingleStep(getBarStep(model.frsky.screens[screen].body.bars[field].source)); - maxSB[j]->setValue(getBarValue(model.frsky.screens[screen].body.bars[field].source, (255-model.frsky.screens[screen].body.bars[field].barMax), &model.frsky)); - - if (model.frsky.screens[screen].body.bars[field].source==0 || 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())); - } lock=false; } @@ -573,367 +623,119 @@ void TelemetryPanel::on_frskyVoltCB_currentIndexChanged(int index) void TelemetryPanel::on_frskyProtoCB_currentIndexChanged(int index) { - if (lock) return; - int bindex[12]; - lock=true; - for (int i=0; i<12; i++) { - bindex[i]=barsCB[i]->currentIndex(); - model.frsky.usrProto=index; - populateCustomScreenFieldCB(barsCB[i], bindex[i], false, 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], model.frsky.screens[screen].body.lines[rows].source[cols], (rows<4), model.frsky.usrProto); - } - } - } - } - lock=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]); - } - } - emit modified(); + model.frsky.usrProto = index; + emit modified(); } -void TelemetryPanel::on_rssiAlarm1CB_currentIndexChanged(int index) { - if (lock) return; - model.frsky.rssiAlarms[0].level=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) { - if (lock) return; - model.frsky.rssiAlarms[1].level=index; - emit modified(); +void TelemetryPanel::on_rssiAlarm2CB_currentIndexChanged(int index) +{ + model.frsky.rssiAlarms[1].level = index; + emit modified(); } void TelemetryPanel::on_rssiAlarm1SB_editingFinished() { - if (lock) return; - model.frsky.rssiAlarms[0].value=(ui->rssiAlarm1SB->value()); - emit modified(); + model.frsky.rssiAlarms[0].value = ui->rssiAlarm1SB->value(); + emit modified(); } void TelemetryPanel::on_rssiAlarm2SB_editingFinished() { - if (lock) return; - model.frsky.rssiAlarms[1].value=(ui->rssiAlarm2SB->value()); - emit modified(); + model.frsky.rssiAlarms[1].value = ui->rssiAlarm2SB->value(); + emit modified(); } void TelemetryPanel::on_AltitudeGPS_ChkB_toggled(bool checked) { - if (lock) return; - model.frsky.FrSkyGpsAlt = checked; - emit modified(); - //AltitudeGPS_CB + model.frsky.FrSkyGpsAlt = checked; + emit modified(); } void TelemetryPanel::on_AltitudeToolbar_ChkB_toggled(bool checked) { - model.frsky.altitudeDisplayed = checked; - emit modified(); + model.frsky.altitudeDisplayed = checked; + emit modified(); } void TelemetryPanel::on_varioSourceCB_currentIndexChanged(int index) { - if (lock) return; - model.frsky.varioSource = index; - emit modified(); + model.frsky.varioSource = index; + emit modified(); } void TelemetryPanel::on_varioLimitMin_DSB_editingFinished() { - if (lock) return; - model.frsky.varioMin= round(ui->varioLimitMin_DSB->value()+10); - emit modified(); + model.frsky.varioMin = round(ui->varioLimitMin_DSB->value()+10); + emit modified(); } void TelemetryPanel::on_varioLimitMax_DSB_editingFinished() { - if (lock) return; - model.frsky.varioMax= round(ui->varioLimitMax_DSB->value()-10); - emit modified(); + model.frsky.varioMax = round(ui->varioLimitMax_DSB->value()-10); + emit modified(); } void TelemetryPanel::on_varioLimitCenterMin_DSB_editingFinished() { - if (lock) return; + 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); + model.frsky.varioCenterMin = round((ui->varioLimitCenterMin_DSB->value()+0.5)*10); emit modified(); + } } void TelemetryPanel::on_varioLimitMinOff_ChkB_toggled(bool checked) { - if (lock) return; + if (!lock) { model.frsky.varioCenterMin = -16; if (!checked) { lock=true; ui->varioLimitCenterMin_DSB->setValue(-2.0); ui->varioLimitCenterMin_DSB->setEnabled(true); lock=false; - } else { + } + else { ui->varioLimitCenterMin_DSB->setValue(-2.0); ui->varioLimitCenterMin_DSB->setDisabled(true); } emit modified(); + } } void TelemetryPanel::on_varioLimitCenterMax_DSB_editingFinished() { - if (lock) return; + 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); + model.frsky.varioCenterMax = round((ui->varioLimitCenterMax_DSB->value()-0.5)*10); emit modified(); -} - -void TelemetryPanel::telBarUpdate() -{ - int index; - lock=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, &model.frsky)); - minSB[i]->setMaximum(getBarValue(index, 255, &model.frsky)); - minSB[i]->setSingleStep(getBarStep(index)); - maxSB[i]->setMinimum(getBarValue(index, 0, &model.frsky)); - maxSB[i]->setMaximum(getBarValue(index, 255, &model.frsky)); - maxSB[i]->setSingleStep(getBarStep(index)); - minSB[i]->setValue(getBarValue(index, model.frsky.screens[screen].body.bars[i%4].barMin, &model.frsky)); - maxSB[i]->setValue(getBarValue(index, 255-model.frsky.screens[screen].body.bars[i%4].barMax, &model.frsky)); - } - } - lock=false; -} - -void TelemetryPanel::ScreenTypeCBcurrentIndexChanged(int index) -{ - if (lock) return; - - QComboBox *comboBox = qobject_cast(sender()); - int screen = comboBox->objectName().right(1).toInt() -1; - lock=true; - model.frsky.screens[screen].type=index; - - for (int i=0; i<3; i++) { - bool isNum = (model.frsky.screens[i].type==0); - barsGB[i]->setVisible(!isNum); - numsGB[i]->setVisible(isNum); - } - - lock=false; - emit modified(); -} - -void TelemetryPanel::telBarCBcurrentIndexChanged(int index) -{ - if (lock) 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; - model.frsky.screens[screenId].body.bars[barId].source=index; - lock=true; - if (index==0) { - model.frsky.screens[screenId].body.bars[barId].barMin=0; - 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, &model.frsky)); - minSB[bar]->setMaximum(getBarValue(index, 255, &model.frsky)); - minSB[bar]->setSingleStep(getBarStep(index)); - maxSB[bar]->setMinimum(getBarValue(index, 0, &model.frsky)); - maxSB[bar]->setMaximum(getBarValue(index, 255, &model.frsky)); - maxSB[bar]->setSingleStep(getBarStep(index)); - minSB[bar]->setValue(getBarValue(index, model.frsky.screens[screenId].body.bars[barId].barMin, &model.frsky)); - maxSB[bar]->setValue(getBarValue(index, 255-model.frsky.screens[screenId].body.bars[barId].barMax, &model.frsky)); - lock=false; - emit modified(); -} - -void TelemetryPanel::telMinSBeditingFinished() -{ - if (lock) 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; - lock=true; - if (model.frsky.screens[screenId].body.bars[barId].source==TELEMETRY_SOURCE_A1 || model.frsky.screens[screenId].body.bars[barId].source==TELEMETRY_SOURCE_A1_MIN) { - model.frsky.screens[screenId].body.bars[barId].barMin=round((minSB[minId]->value()-analogs[0]->ui->CalibSB->value())/getBarStep(model.frsky.screens[screenId].body.bars[barId].source)); - } else if (model.frsky.screens[screenId].body.bars[minId].source==TELEMETRY_SOURCE_A2 || model.frsky.screens[screenId].body.bars[minId].source==TELEMETRY_SOURCE_A2_MIN) { - model.frsky.screens[screenId].body.bars[barId].barMin=round((minSB[minId]->value()-analogs[1]->ui->CalibSB->value())/getBarStep(model.frsky.screens[screenId].body.bars[barId].source)); - } else { - model.frsky.screens[screenId].body.bars[barId].barMin=round((minSB[minId]->value()-getBarValue(model.frsky.screens[screenId].body.bars[barId].source, 0, &model.frsky))/getBarStep(model.frsky.screens[screenId].body.bars[barId].source)); - } - spinBox->setValue(getBarValue(model.frsky.screens[screenId].body.bars[barId].source, model.frsky.screens[screenId].body.bars[barId].barMin, &model.frsky)); - if (maxSB[minId]->value()value()) { - model.frsky.screens[screenId].body.bars[minId].barMax=(255-model.frsky.screens[screenId].body.bars[barId].barMin+1); - maxSB[minId]->setValue(getBarValue(model.frsky.screens[screenId].body.bars[barId].source, 255-model.frsky.screens[screenId].body.bars[barId].barMax, &model.frsky)); - } - maxSB[minId]->setMinimum(getBarValue(model.frsky.screens[screenId].body.bars[barId].source, (model.frsky.screens[screenId].body.bars[barId].barMin+1), &model.frsky)); - lock=false; - emit modified(); -} - -void TelemetryPanel::telMaxSBeditingFinished() -{ - if (lock) return; - QDoubleSpinBox *spinBox = qobject_cast(sender()); - int screenId = spinBox->objectName().mid(8,1).toInt() - 1; - int barId = spinBox->objectName().right(1).toInt() - 1; - lock=true; - if (model.frsky.screens[screenId].body.bars[barId].source==5) { - model.frsky.screens[screenId].body.bars[barId].barMax = (255-round((spinBox->value()-analogs[0]->ui->CalibSB->value())/getBarStep(model.frsky.screens[screenId].body.bars[barId].source))); - } else if (model.frsky.screens[screenId].body.bars[barId].source==6) { - model.frsky.screens[screenId].body.bars[barId].barMax = (255-round((spinBox->value()-analogs[1]->ui->CalibSB->value())/getBarStep(model.frsky.screens[screenId].body.bars[barId].source))); - } else { - model.frsky.screens[screenId].body.bars[barId].barMax = (255-round((spinBox->value()-getBarValue(model.frsky.screens[screenId].body.bars[barId].source, 0, &model.frsky))/getBarStep(model.frsky.screens[screenId].body.bars[barId].source) )); - } - spinBox->setValue(getBarValue(model.frsky.screens[screenId].body.bars[barId].source, (255-model.frsky.screens[screenId].body.bars[barId].barMax), &model.frsky)); - lock=false; - emit modified(); -} - -void TelemetryPanel::customFieldEdited() -{ - if (!lock) { - lock = true; - - 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 (model.frsky.screens[screen].type==0) { - model.frsky.screens[screen].body.lines[r].source[c]=csf[i]->currentIndex(); - } - } - emit modified(); - - lock = false; } } -float TelemetryPanel::getBarStep(int barId) +void TelemetryPanel::on_fasOffset_DSB_editingFinished() { - 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 (analogs[0]->ui->RatioSB->value()/255); - break; - case TELEMETRY_SOURCE_A2: - case TELEMETRY_SOURCE_A2_MIN: - return (analogs[1]->ui->RatioSB->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 (model.frsky.imperial==1) { - return 1; - } else { - return 1.852; - } - break; - default: - return 1; - break; - } + 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 index 6984a9f51..44233f79c 100644 --- a/companion/src/modeledit/telemetry.h +++ b/companion/src/modeledit/telemetry.h @@ -8,6 +8,7 @@ namespace Ui { class TelemetryAnalog; + class TelemetryCustomScreen; class Telemetry; } @@ -44,6 +45,32 @@ class TelemetryAnalog : public QWidget 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 @@ -74,24 +101,15 @@ class TelemetryPanel : public ModelPanel 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_fasOffset_DSB_editingFinished(); + void on_mahCount_SB_editingFinished(); + void on_mahCount_ChkB_toggled(bool checked); private: Ui::Telemetry *ui; TelemetryAnalog * analogs[2]; - QGroupBox* barsGB[3]; - QGroupBox* numsGB[3]; - QComboBox* barsCB[12]; - QDoubleSpinBox* minSB[12]; - QDoubleSpinBox* maxSB[12]; - QComboBox* csf[36]; void setup(); - float getBarStep(int barId); void telBarUpdate(); }; diff --git a/companion/src/modeledit/telemetry.ui b/companion/src/modeledit/telemetry.ui index b03ab1091..6a3a6d618 100644 --- a/companion/src/modeledit/telemetry.ui +++ b/companion/src/modeledit/telemetry.ui @@ -7,13 +7,13 @@ 0 0 692 - 540 + 457 Form - + @@ -771,1240 +771,117 @@ - - - - - - 0 - 0 - - - - - - - - 1 - - - 1 - - - + + + + 0 + 0 + + + + Various + + + + 1 + + + 1 + + + + + - + 0 0 - - 0 + + 32767 - - - 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 - - - - - - - - + + + + mAh count + + + + + + + + 0 + 0 + + + + FAS Offset + + + + + + + Persistent mAh + + + + + + + + 0 + 0 + + + + 1 + + + -1.500000000000000 + + + 1.500000000000000 + + + 0.100000000000000 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + - - - + + + + + + + + + 0 + 0 + + + + -1 + + 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 index c45b920bf..38bec941a 100644 --- a/companion/src/modeledit/templates.cpp +++ b/companion/src/modeledit/templates.cpp @@ -2,6 +2,28 @@ #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) @@ -562,8 +584,8 @@ void Templates::applyTemplate(uint8_t idx) 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); + setSwitch(0xB, LS_FN_VNEG, RawSource(SOURCE_TYPE_STICK, 2).toValue(), -99); + setSwitch(0xC, LS_FN_VPOS, RawSource(SOURCE_TYPE_CH, 13).toValue(), 0); updateSwitchesTab(); } @@ -819,9 +841,9 @@ void Templates::applyTemplate(uint8_t idx) 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); + setSwitch(1, LS_FN_LESS, RawSource(SOURCE_TYPE_CH, 14).toValue(), RawSource(SOURCE_TYPE_CH, 15).toValue()); + setSwitch(2, LS_FN_VPOS, RawSource(SOURCE_TYPE_CH, 14).toValue(), 105); + setSwitch(3, LS_FN_VNEG, RawSource(SOURCE_TYPE_CH, 14).toValue(), -105); // redraw switches tab updateSwitchesTab(); diff --git a/companion/src/modelslist.cpp b/companion/src/modelslist.cpp index 4f3b3eb02..d6e72b219 100644 --- a/companion/src/modelslist.cpp +++ b/companion/src/modelslist.cpp @@ -41,38 +41,39 @@ #include "modelslist.h" #include "mdichild.h" +#include "helpers.h" class DragDropHeader { -public: - DragDropHeader(): - general_settings(false), - models_count(0) - { - } - bool general_settings; - uint8_t models_count; - uint8_t models[C9X_MAX_MODELS]; + public: + DragDropHeader(): + general_settings(false), + models_count(0) + { + } + bool general_settings; + uint8_t models_count; + uint8_t models[C9X_MAX_MODELS]; }; ModelsListWidget::ModelsListWidget(QWidget *parent): QListWidget(parent) { - this->setFont(QFont("Courier New",12)); - radioData = &((MdiChild *)parent)->radioData; - refreshList(); + setFont(QFont("Courier New",12)); + radioData = &((MdiChild *)parent)->radioData; + refreshList(); - connect(this, SIGNAL(itemActivated(QListWidgetItem*)), this, SLOT(OpenEditWindow())); - connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowContextMenu(const QPoint&))); - connect(this, SIGNAL(currentRowChanged(int)), this, SLOT(viableModelSelected(int))); + connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(OpenEditWindow())); + connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowContextMenu(const QPoint&))); + connect(this, SIGNAL(currentRowChanged(int)), this, SLOT(viableModelSelected(int))); - setContextMenuPolicy(Qt::CustomContextMenu); - setSelectionMode(QAbstractItemView::ExtendedSelection); - setDragEnabled(true); - setAcceptDrops(true); - setDragDropOverwriteMode(true); - setDropIndicatorShown(true); + setContextMenuPolicy(Qt::CustomContextMenu); + setSelectionMode(QAbstractItemView::ExtendedSelection); + setDragEnabled(true); + setAcceptDrops(true); + setDragDropOverwriteMode(true); + setDropIndicatorShown(true); - active_highlight_color = this->palette().color(QPalette::Active, QPalette::Highlight); + active_highlight_color = palette().color(QPalette::Active, QPalette::Highlight); } void ModelsListWidget::ShowContextMenu(const QPoint& pos) @@ -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(); @@ -228,9 +229,9 @@ void ModelsListWidget::dropEvent(QDropEvent *event) // 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); @@ -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; @@ -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()); } } diff --git a/companion/src/preferencesdialog.cpp b/companion/src/preferencesdialog.cpp deleted file mode 100644 index 1e97e5785..000000000 --- a/companion/src/preferencesdialog.cpp +++ /dev/null @@ -1,853 +0,0 @@ -#include "preferencesdialog.h" -#include "ui_preferencesdialog.h" -#include "mainwindow.h" -#include "eeprominterface.h" -#include "splashlibrary.h" -#include "helpers.h" -#ifdef JOYSTICKS -#include "joystick.h" -#include "joystickdialog.h" -#endif -#include -#include - -preferencesDialog::preferencesDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::preferencesDialog), - updateLock(false) -{ - ui->setupUi(this); - - - QCheckBox * OptionCheckBox[]= { - ui->optionCheckBox_1, ui->optionCheckBox_2, ui->optionCheckBox_3, ui->optionCheckBox_4, ui->optionCheckBox_5, ui->optionCheckBox_6, ui->optionCheckBox_7, - ui->optionCheckBox_8, ui->optionCheckBox_9, ui->optionCheckBox_10, ui->optionCheckBox_11, ui->optionCheckBox_12, ui->optionCheckBox_13, ui->optionCheckBox_14, - ui->optionCheckBox_15,ui->optionCheckBox_16, ui->optionCheckBox_17, ui->optionCheckBox_18, ui->optionCheckBox_19, ui->optionCheckBox_20, ui->optionCheckBox_21, - ui->optionCheckBox_22, ui->optionCheckBox_23, ui->optionCheckBox_24, ui->optionCheckBox_25, ui->optionCheckBox_26, ui->optionCheckBox_27, ui->optionCheckBox_28, - ui->optionCheckBox_29, ui->optionCheckBox_30, ui->optionCheckBox_31, ui->optionCheckBox_32, ui->optionCheckBox_33, ui->optionCheckBox_34, ui->optionCheckBox_35, - ui->optionCheckBox_36, ui->optionCheckBox_37, ui->optionCheckBox_38, ui->optionCheckBox_39, ui->optionCheckBox_40, ui->optionCheckBox_41, ui->optionCheckBox_42, - NULL }; - - voice=NULL; - - connect(ui->langCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(firmwareLangChanged())); - connect(ui->voiceCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(firmwareLangChanged())); - - for (int i=0; OptionCheckBox[i]; i++) { - optionsCheckBoxes.push_back(OptionCheckBox[i]); - connect(OptionCheckBox[i], SIGNAL(toggled(bool)), this, SLOT(firmwareOptionChanged(bool))); - } - - populateLocale(); - initSettings(); - connect(ui->downloadVerCB, SIGNAL(currentIndexChanged(int)), this, SLOT(baseFirmwareChanged())); - connect(this, SIGNAL(accepted()), this, SLOT(writeValues())); -#ifndef JOYSTICKS - ui->joystickCB->hide(); - ui->joystickCB->setDisabled(true); - ui->joystickcalButton->hide(); - ui->joystickChkB->hide(); - ui->label_11->hide(); -#endif - resize(0,0); -} - - -preferencesDialog::~preferencesDialog() -{ - delete ui; -} - -void preferencesDialog::baseFirmwareChanged() -{ - QVariant selected_firmware = ui->downloadVerCB->itemData(ui->downloadVerCB->currentIndex()); - voice=NULL; - foreach(FirmwareInfo * firmware, firmwares) { - if (firmware->id == selected_firmware) { - if (firmware->voice) { - ui->voiceLabel->show(); - ui->voiceCombo->show(); - ui->voice_dnld->show(); - ui->sdPathButton->show(); - ui->sdPath->show(); - ui->sdPathLabel->show(); - ui->voiceLabel->setEnabled(true); - ui->voiceCombo->setEnabled(true); - ui->voice_dnld->setEnabled(true); - ui->sdPathButton->setEnabled(true); - ui->sdPath->setEnabled(true); - ui->ge_label->show(); - ui->ge_lineedit->show(); - ui->ge_pathButton->show(); - } else { - ui->voiceLabel->hide(); - ui->voiceCombo->hide(); - ui->voice_dnld->hide(); - ui->sdPathButton->hide(); - ui->sdPath->hide(); - ui->sdPathLabel->hide(); - ui->ge_label->hide(); - ui->ge_lineedit->hide(); - ui->ge_pathButton->hide(); - } - populateFirmwareOptions(firmware); - int width=firmware->eepromInterface->getCapability(LCDWidth); - ui->imageLabel->setFixedWidth(width); - break; - } - } - firmwareChanged(); -} - -FirmwareVariant preferencesDialog::getFirmwareVariant() -{ - QVariant selected_firmware = ui->downloadVerCB->itemData(ui->downloadVerCB->currentIndex()); - bool voice=false; - foreach(FirmwareInfo * firmware, firmwares) { - if (firmware->id == selected_firmware) { - QString id = firmware->id; - foreach(QCheckBox *cb, optionsCheckBoxes) { - if (cb->isChecked()) { - if (cb->text()=="voice" && cb->isChecked()) - voice=true; - id += QString("-") + cb->text(); - } - } - if (! firmware->eepromInterface->getCapability(MultiLangVoice)) { - if (ui->voiceCombo->count() && (voice || firmware->voice)) - id += QString("-tts") + ui->voiceCombo->currentText(); - } - if (ui->langCombo->count()) - id += QString("-") + ui->langCombo->currentText(); - - return GetFirmwareVariant(id); - } - } - - // Should never occur... - return default_firmware_variant; -} - -void preferencesDialog::firmwareLangChanged() -{ - firmwareChanged(); -} - -void preferencesDialog::firmwareOptionChanged(bool state) -{ - QCheckBox *cb = qobject_cast(sender()); - FirmwareInfo * firmware=NULL; - if (cb && state) { - QVariant selected_firmware = ui->downloadVerCB->itemData(ui->downloadVerCB->currentIndex()); - foreach(firmware, firmwares) { - if (firmware->id == selected_firmware) { - foreach(QList - - + + - - - - true + Simulator capture folder - - - - - 40 - 0 - - - - 15 - - - 10 + + + + Qt::Horizontal - + @@ -298,127 +388,127 @@ This is used by the templated to determine which channel goes to what number out - R E T A + R E T A - R E A T + R E A T - R T E A + R T E A - R T A E + R T A E - R A E T + R A E T - R A T E + R A T E - E R T A + E R T A - E R A T + E R A T - E T R A + E T R A - E T A R + E T A R - E A R T + E A R T - E A T R + E A T R - T R E A + T R E A - T R A E + T R A E - T E R A + T E R A - T E A R + T E A R - T A R E + T A R E - T A E R + T A E R - A R E T + A R E T - A R T E + A R T E - A E R T + A E R T - A E T R + A E T R - A T R E + A T R E - A T E R + A T E R - + @@ -431,35 +521,7 @@ This is used by the templated to determine which channel goes to what number out - - - - - - Enable - - - - - - - - 0 - 0 - - - - - - - - Calibrate - - - - - - + 1 @@ -483,7 +545,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -507,7 +569,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -520,7 +582,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -563,7 +625,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -590,7 +652,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -638,20 +700,7 @@ This is used by the templated to determine which channel goes to what number out - - - - - 0 - 0 - - - - Language (requires restart) - - - - + 1 @@ -682,7 +731,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -695,7 +744,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -711,143 +760,14 @@ This is used by the templated to determine which channel goes to what number out - - - - Mode selection: - -Mode 1: - Left stick: Elevator, Rudder - Right stick: Throttle, Aileron - -Mode 2: - Left stick: Throttle, Rudder - Right stick: Elevator, Aileron - -Mode 3: - Left stick: Elevator, Aileron - Right stick: Throttle, Rudder - -Mode 4: - Left stick: Throttle, Aileron - Right stick: Elevator, Rudder - - - - - 1 - - - - Mode 1 (RUD ELE THR AIL) - - - - - Mode 2 (RUD THR ELE AIL) - - - - - Mode 3 (AIL ELE THR RUD) - - - - - Mode 4 (AIL THR ELE RUD) - - - - - - - - 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 +783,7 @@ Mode 4: - + @@ -890,7 +810,7 @@ Mode 4: - + QLayout::SetMaximumSize @@ -981,7 +901,7 @@ May be different from firmware language - + @@ -1021,14 +941,7 @@ May be different from firmware language - - - - Simulator capture folder - - - - + @@ -1041,14 +954,7 @@ May be different from firmware language - - - - Qt::Horizontal - - - - + QLayout::SetMaximumSize @@ -1601,7 +1507,107 @@ May be different from firmware language - + + + + + 0 + 0 + + + + Splash library behaviour + + + + + + + + 0 + 0 + + + + + Include companion splashes + + + + + Only user defined splashes + + + + + + + + + + + + + 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 +1625,9 @@ May be different from firmware language - - - - Google Earth Executable - - - - locale_QB InvertPixels clearImageButton SplashFileName diff --git a/companion/src/printdialog.cpp b/companion/src/printdialog.cpp index ac1cc9feb..215771347 100644 --- a/companion/src/printdialog.cpp +++ b/companion/src/printdialog.cpp @@ -19,6 +19,7 @@ printDialog::printDialog(QWidget *parent, GeneralSettings *gg, ModelData *gm, QS ui(new Ui::printDialog) { ui->setupUi(this); + this->setWindowIcon(CompanionIcon("print.png")); g_model = gm; g_eeGeneral = gg; printfilename=filename; @@ -54,7 +55,6 @@ printDialog::printDialog(QWidget *parent, GeneralSettings *gg, ModelData *gm, QS printCurves(); printGvars(); printSwitches(); - printSafetySwitches(); printFSwitches(); printFrSky(); @@ -176,7 +176,7 @@ QString printDialog::printPhases() str.append(""+tr("Switch")+""+tr("Flight mode name")); str.append(""+tr("IN")+""+tr("OUT")+""); for (int i=0; i<4; i++) { - str.append(QString("%1").arg(getStickStr(i))); + str.append(QString("%1").arg(getInputStr(*g_model, i))); } if (gvars==1) { for (int i=0; i"); if(lastCHN!=ed->chn) { lastCHN=ed->chn; - str.append(""+getStickStr(ed->chn)+""); + str.append(""+getInputStr(*g_model, ed->chn)+""); } else str.append(" "); @@ -640,18 +640,18 @@ 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++) { + for (int i=0; igetCapability(LogicalSwitches); 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); + QString tstr = g_model->customSw[i].toString(*g_model); str.append(doTC(tstr,"green")); str.append(""); sc++; @@ -693,40 +693,12 @@ void printDialog::printGvars() } } -void printDialog::printSafetySwitches() -{ - int sc=0; - QString str = "
"+tr("CS")+QString("%1"+tr("LS")+QString("%1"+tr("CS")+('A'+(i-9))+""+tr("LS")+('A'+(i-9))+"
"; - str.append(""); - str.append("

"+tr("Safety Switches")+"

"); - str.append(""); - str.append(doTC(tr("Switch"), "", true)); - str.append(doTL(tr("Value"), "", true)); - str.append(""); - for(int i=0; igetCapability(Outputs); i++) - { - if (g_model->safetySw[i].swtch.type) { - str.append(""); - str.append(doTC(tr("CH")+QString("%1").arg(i+1),"",true)); - str.append(doTC(g_model->safetySw[i].swtch.toString(),"green")); - str.append(doTC(QString::number(g_model->safetySw[i].val),"green")); - str.append(""); - sc++; - } - } - str.append("
 
"); - str.append("
"); - if (sc!=0) - te->append(str); -} - 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)); @@ -736,10 +708,9 @@ 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")); + str.append(doTC(g_model->funcSw[i].funcToString(),"green")); + str.append(doTC(g_model->funcSw[i].paramToString(),"green")); int index=g_model->funcSw[i].func; if (index==FuncPlaySound || index==FuncPlayHaptic || index==FuncPlayValue || index==FuncPlayPrompt || index==FuncPlayBoth || index==FuncBackgroundMusic) { str.append(doTC(QString("%1").arg(g_model->funcSw[i].repeatParam),"green")); @@ -798,7 +769,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; @@ -836,12 +807,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 5e45d5a2c..c041efd7c 100644 --- a/companion/src/printdialog.ui +++ b/companion/src/printdialog.ui @@ -25,10 +25,6 @@ Dialog - - - :/images/print.png:/images/print.png - diff --git a/companion/src/radio.xsd b/companion/src/radio.xsd index b3203f138..fca4d96bc 100644 --- a/companion/src/radio.xsd +++ b/companion/src/radio.xsd @@ -1,685 +1,691 @@ - - - Radio data schema for companion9x. - - + + + Radio data schema for companion9x. + + - - - - - - + + + + + + - - - - - + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + - - - + + - - + + - - - - - + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + - - - - - + + - - - - - + + diff --git a/companion/src/simulation/CMakeLists.txt b/companion/src/simulation/CMakeLists.txt new file mode 100644 index 000000000..2b5f5cc6e --- /dev/null +++ b/companion/src/simulation/CMakeLists.txt @@ -0,0 +1,49 @@ +set(simulation_SRCS + simulatordialog.cpp +) + +set(simulation_UIS + simulatordialog-9x.ui + simulatordialog-taranis.ui +) + +set(simulation_HDRS + simulatordialog.h + cursorwidget.h + menuwidget.h + xcursorwidget.h + xmenuwidget.h + myslider.h +) + +if(SDL_FOUND) + set(simulation_SRCS + ${simulation_SRCS} + joystick.cpp + joystickdialog.cpp + ) + + set(simulation_HDRS + ${simulation_HDRS} + joystick.h + joystickdialog.h + ) + + set(simulation_UIS + ${simulation_UIS} + joystickdialog.ui + ) +endif() + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${PROJECT_SOURCE_DIR} + ${PROJECT_SOURCE_DIR}/../.. + ${COMPANION_SRC_DIRECTORY} + ${RADIO_SRC_DIRECTORY}/fonts/std +) + +qt4_wrap_ui(simulation_SRCS ${simulation_UIS}) +qt4_wrap_cpp(simulation_SRCS ${simulation_HDRS}) + +add_library(simulation ${simulation_SRCS}) diff --git a/companion/src/cursorwidget.h b/companion/src/simulation/cursorwidget.h similarity index 100% rename from companion/src/cursorwidget.h rename to companion/src/simulation/cursorwidget.h diff --git a/companion/src/joystick.cpp b/companion/src/simulation/joystick.cpp similarity index 100% rename from companion/src/joystick.cpp rename to companion/src/simulation/joystick.cpp diff --git a/companion/src/joystick.h b/companion/src/simulation/joystick.h similarity index 100% rename from companion/src/joystick.h rename to companion/src/simulation/joystick.h diff --git a/companion/src/joystickdialog.cpp b/companion/src/simulation/joystickdialog.cpp similarity index 84% rename from companion/src/joystickdialog.cpp rename to companion/src/simulation/joystickdialog.cpp index efec50a56..431717324 100644 --- a/companion/src/joystickdialog.cpp +++ b/companion/src/simulation/joystickdialog.cpp @@ -1,5 +1,6 @@ #include "joystickdialog.h" #include "ui_joystickdialog.h" +#include "appdata.h" #include joystickDialog::joystickDialog(QWidget *parent, int stick) : @@ -130,27 +131,20 @@ void joystickDialog::on_okButton_clicked() { return; } joystick->close(); - QSettings settings("companion", "companion"); - settings.beginGroup("JsCalibration"); for (int i=0; i<8;i++) { - settings.remove(QString("stick%1_axe").arg(i)); - settings.remove(QString("stick%1_max").arg(i)); - settings.remove(QString("stick%1_med").arg(i)); - settings.remove(QString("stick%1_min").arg(i)); - settings.remove(QString("stick%1_inv").arg(i)); + g.joystick[i].remove(); } QCheckBox * ib[]={ui->ChInv_1, ui->ChInv_2, ui->ChInv_3, ui->ChInv_4, ui->ChInv_5, ui->ChInv_6, ui->ChInv_7, ui->ChInv_8}; foreach(QComboBox *cb, findChildren(QRegExp("jsmapCB_[0-9]+"))) { int axe=cb->objectName().mid(cb->objectName().lastIndexOf("_")+1).toInt()-1; int stick=cb->currentIndex(); - if (stick>0) { - settings.setValue(QString("stick%1_axe").arg(stick),axe); - settings.setValue(QString("stick%1_max").arg(stick),jscal[axe][2]); - settings.setValue(QString("stick%1_med").arg(stick),jscal[axe][1]); - settings.setValue(QString("stick%1_min").arg(stick),jscal[axe][0]); - settings.setValue(QString("stick%1_inv").arg(stick),ib[axe]->isChecked() ? 1 : 0); + if (stick > 0) { + g.joystick[stick].stick_axe( axe ); + g.joystick[stick].stick_max( jscal[axe][2] ); + g.joystick[stick].stick_med( jscal[axe][1] ); + g.joystick[stick].stick_min( jscal[axe][0] ); + g.joystick[stick].stick_inv( ib[axe]->isChecked() ? 1 : 0 ); } } - settings.endGroup(); this->close(); } diff --git a/companion/src/joystickdialog.h b/companion/src/simulation/joystickdialog.h similarity index 100% rename from companion/src/joystickdialog.h rename to companion/src/simulation/joystickdialog.h diff --git a/companion/src/joystickdialog.ui b/companion/src/simulation/joystickdialog.ui similarity index 100% rename from companion/src/joystickdialog.ui rename to companion/src/simulation/joystickdialog.ui diff --git a/companion/src/lcdwidget.h b/companion/src/simulation/lcdwidget.h similarity index 91% rename from companion/src/lcdwidget.h rename to companion/src/simulation/lcdwidget.h index 073ba8726..af6cf5381 100644 --- a/companion/src/lcdwidget.h +++ b/companion/src/simulation/lcdwidget.h @@ -18,6 +18,7 @@ #define lcd_widget_h #include +#include "appdata.h" class lcdWidget : public QWidget { public: @@ -48,9 +49,9 @@ class lcdWidget : public QWidget { void setBackgroundColor(int red, int green, int blue) { - r = red; - g = green; - b = blue; + _r = red; + _g = green; + _b = blue; } void makeScreenshot(const QString & fileName) @@ -58,11 +59,10 @@ class lcdWidget : public QWidget { QPixmap buffer(2*lcdWidth, 2*lcdHeight); QPainter p(&buffer); doPaint(p); - QSettings settings("companion", "companion"); - bool toclipboard=settings.value("snapshot_to_clipboard", false).toBool(); + bool toclipboard=g.snapToClpbrd(); QApplication::clipboard()->setPixmap( buffer ); if (!toclipboard) { - QString Path=settings.value("snapshotPath", "").toString(); + QString Path=g.snapshotDir(); if (Path.isEmpty() || !QDir(Path).exists()) { Path="."; } @@ -98,14 +98,14 @@ class lcdWidget : public QWidget { unsigned char *previousBuf; bool lightEnable; - int r, g, b; + int _r, _g, _b; inline void doPaint(QPainter & p) { QRgb rgb; if (lightEnable) - rgb = qRgb(r, g, b); + rgb = qRgb(_r, _g, _b); else rgb = qRgb(161, 161, 161); @@ -136,7 +136,7 @@ class lcdWidget : public QWidget { if (z != previousDepth) { previousDepth = z; if (lightEnable) - rgb = qRgb(r-(z*r)/15, g-(z*g)/15, b-(z*b)/15); + rgb = qRgb(_r-(z*_r)/15, _g-(z*_g)/15, _b-(z*_b)/15); else rgb = qRgb(161-(z*161)/15, 161-(z*161)/15, 161-(z*161)/15); p.setPen(rgb); diff --git a/companion/src/menuwidget.h b/companion/src/simulation/menuwidget.h similarity index 100% rename from companion/src/menuwidget.h rename to companion/src/simulation/menuwidget.h diff --git a/companion/src/myslider.h b/companion/src/simulation/myslider.h similarity index 81% rename from companion/src/myslider.h rename to companion/src/simulation/myslider.h index 238e4053f..d2c6801a5 100644 --- a/companion/src/myslider.h +++ b/companion/src/simulation/myslider.h @@ -1,9 +1,6 @@ -/* - * File: mySlider.h - * Author: Romolo Manfredini - * - * Created on 11 gennaio 2012, 23.39 - */ +#ifndef MYSLIDER_H +#define MYSLIDER_H + #include #include @@ -31,4 +28,4 @@ protected: } }; - +#endif diff --git a/companion/src/simulation/simulatordialog-9x.ui b/companion/src/simulation/simulatordialog-9x.ui new file mode 100644 index 000000000..dd2e71dbc --- /dev/null +++ b/companion/src/simulation/simulatordialog-9x.ui @@ -0,0 +1,1284 @@ + + + SimulatorDialog9X + + + + 0 + 0 + 653 + 613 + + + + + 0 + 0 + + + + + 739 + 16777215 + + + + Companion Simulator + + + + :/icon.png:/icon.png + + + + 5 + + + 0 + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + QFrame::Panel + + + QFrame::Raised + + + 2 + + + + 5 + + + 6 + + + + + + + Right Double Click to Reset + + + -125 + + + 125 + + + Qt::Vertical + + + + + + + + 220 + 220 + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + + + + + 0 + + + + + + 8 + + + + false + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + THR + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + RUD + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + ELE + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + AIL + + + true + + + + + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + Hold X + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + Fix X + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + Fix Y + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + Hold Y + + + true + + + + + + + + + 20 + + + 20 + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + + + Right Double Click to Reset + + + -125 + + + 125 + + + Qt::Horizontal + + + + + + + + + + + Right Double Click to Reset + + + -125 + + + 125 + + + Qt::Vertical + + + + + + + + 220 + 220 + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:pressed { + background-color: #4CC417; + border-style: inset; + } + + + TRN + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + GEA + + + true + + + false + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + ID0 + + + true + + + true + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + ID1 + + + true + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + ID2 + + + true + + + true + + + + + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + Hold X + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + Fix X + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + Fix Y + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + Hold Y + + + true + + + + + + + + + 20 + + + 20 + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + + + Right Double Click to Reset + + + -125 + + + 125 + + + Qt::Horizontal + + + + + + + + + + + true + + + QFrame::Panel + + + QFrame::Raised + + + 2 + + + + 2 + + + + + BEEP + + + Qt::AlignCenter + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + + 50 + 50 + + + + P1 + + + -1024 + + + 1024 + + + 128 + + + 64.000000000000000 + + + true + + + + + + + 0 % + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + + 50 + 50 + + + + P2 + + + -1024 + + + 1024 + + + 128 + + + false + + + 64.000000000000000 + + + true + + + + + + + 0 % + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + + 50 + 50 + + + + P3 + + + -1024 + + + 1024 + + + 128 + + + 64.000000000000000 + + + true + + + + + + + 0 % + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 570 + 5 + + + + + + + + true + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + 0 + + + + 9x Simulator + + + + + + QLayout::SetMinimumSize + + + 0 + + + + + + 0 + 0 + + + + + 256 + 29 + + + + background:url(:/images/9xdt.png) + + + + + + + + 0 + 0 + + + + + 41 + 186 + + + + background:url(:/images/9xdl.png) + + + + + + + + 0 + 0 + + + + + 89 + 186 + + + + background:url(:/images/9xmenu.png) + + + + + + + + 0 + 0 + + + + + 256 + 128 + + + + + + + + + 0 + 0 + + + + + 256 + 29 + + + + background:url(:/images/9xdb.png) + + + + + + + + 0 + 0 + + + + + 128 + 186 + + + + true + + + background:url(:/images/9xcurs.png); + + + + + + + + 0 + 0 + + + + + 55 + 186 + + + + background:url(:/images/9xdr.png) + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Horizontal + + + + 438 + 6 + + + + + + + + + + + Outputs + + + + + + + + + + + + + + + + + lcdWidget + QWidget +
lcdwidget.h
+ 1 +
+ + cursorWidget + QWidget +
cursorwidget.h
+ 1 +
+ + menuWidget + QWidget +
menuwidget.h
+ 1 +
+ + mySlider + QSlider +
myslider.h
+
+
+ + + + +
diff --git a/companion/src/simulation/simulatordialog-taranis.ui b/companion/src/simulation/simulatordialog-taranis.ui new file mode 100644 index 000000000..ad41fe74a --- /dev/null +++ b/companion/src/simulation/simulatordialog-taranis.ui @@ -0,0 +1,1468 @@ + + + SimulatorDialogTaranis + + + + 0 + 0 + 712 + 688 + + + + + 0 + 0 + + + + + 739 + 16777215 + + + + Companion Simulator + + + + :/icon.png:/icon.png + + + + 5 + + + 0 + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + QFrame::Panel + + + QFrame::Raised + + + 2 + + + + 5 + + + 6 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 245 + 245 + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + Hold Y + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + Fix Y + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + Fix X + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + Hold X + + + true + + + + + + + + + + 0 + 0 + + + + + 16777215 + 50 + + + + SD + + + 2 + + + 1 + + + 0 + + + Qt::Vertical + + + true + + + QSlider::TicksBothSides + + + 1 + + + + + + + + 0 + 0 + + + + + 16777215 + 50 + + + + SC + + + 2 + + + 1 + + + 0 + + + Qt::Vertical + + + true + + + QSlider::TicksBothSides + + + 1 + + + + + + + + + Qt::Horizontal + + + + 10 + 20 + + + + + + + + Right Double Click to Reset + + + -125 + + + 125 + + + Qt::Vertical + + + + + + + + + + 0 + 0 + + + + + 42 + 42 + + + + S2 + + + -1024 + + + 1024 + + + 128 + + + 64.000000000000000 + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 16777215 + 50 + + + + SG + + + 2 + + + 1 + + + 0 + + + Qt::Vertical + + + true + + + false + + + QSlider::TicksBothSides + + + 1 + + + + + + + + 0 + 0 + + + + + 42 + 42 + + + + RS + + + -1024 + + + 1024 + + + 128 + + + 64.000000000000000 + + + true + + + + + + + + 0 + 0 + + + + + 16777215 + 50 + + + + SH + + + + + + 1 + + + 0 + + + 0 + + + Qt::Vertical + + + true + + + QSlider::TicksBothSides + + + 1 + + + + + + + SC + + + Qt::AlignCenter + + + + + + + SD + + + Qt::AlignCenter + + + + + + + SG + + + Qt::AlignCenter + + + + + + + SH + + + Qt::AlignCenter + + + + + + + S2 + + + Qt::AlignCenter + + + + + + + RS + + + Qt::AlignCenter + + + + + + + Right Double Click to Reset + + + -125 + + + 125 + + + Qt::Horizontal + + + + + + + 20 + + + 20 + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + Hold Y + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + Fix Y + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + Fix X + + + true + + + + + + + + 8 + + + + QPushButton { + background-color: #EEEEEE; + border-style: outset; + border-width: 1px; + border-radius: 4px; + border-color: black; + padding: 2px; + } + +QPushButton:checked { + background-color: #4CC417; + border-style: inset; + } + + + Hold X + + + true + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 42 + 42 + + + + S1 + + + -1024 + + + 1024 + + + 128 + + + 64.000000000000000 + + + true + + + + + + + 20 + + + 20 + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + TextLabel + + + Qt::AlignCenter + + + + + + + + + + 0 + 0 + + + + + 16777215 + 50 + + + + SB + + + 2 + + + 1 + + + 0 + + + Qt::Vertical + + + true + + + QSlider::TicksBothSides + + + 1 + + + + + + + + 245 + 245 + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + + + + + + 0 + 0 + + + + + 16777215 + 50 + + + + SA + + + 2 + + + 1 + + + 0 + + + Qt::Vertical + + + true + + + QSlider::TicksBothSides + + + 1 + + + + + + + Right Double Click to Reset + + + -125 + + + 125 + + + Qt::Horizontal + + + + + + + + + + 0 + 0 + + + + Right Double Click to Reset + + + -125 + + + 125 + + + Qt::Vertical + + + + + + + Qt::Horizontal + + + QSizePolicy::MinimumExpanding + + + + 5 + 20 + + + + + + + + + + + 0 + 0 + + + + + 16777215 + 50 + + + + SE + + + 2 + + + 1 + + + 0 + + + Qt::Vertical + + + true + + + QSlider::TicksBothSides + + + 1 + + + + + + + SF + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + 16777215 + 50 + + + + SF + + + SF + + + 1 + + + 1 + + + 0 + + + 0 + + + Qt::Vertical + + + true + + + QSlider::TicksBothSides + + + 1 + + + + + + + + 0 + 0 + + + + + 42 + 42 + + + + LS + + + -1024 + + + 1024 + + + 128 + + + 64.000000000000000 + + + true + + + + + + + SA + + + Qt::AlignCenter + + + + + + + SB + + + Qt::AlignCenter + + + + + + + SE + + + Qt::AlignCenter + + + + + + + LS + + + Qt::AlignCenter + + + + + + + S1 + + + Qt::AlignCenter + + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 570 + 5 + + + + + + + + true + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + 0 + + + + Taranis Simulator + + + + + + QLayout::SetMinimumSize + + + 0 + + + + + + 0 + 0 + + + + + 120 + 208 + + + + true + + + background:url(:/images/x9l0.png); + + + + + + + + 0 + 0 + + + + + 424 + 38 + + + + background:url(:/images/x9t0.png) + + + + + + + + 0 + 0 + + + + + 120 + 208 + + + + background:url(:/images/x9r0.png) + + + + + + + + 0 + 0 + + + + + 424 + 128 + + + + + + + + + 0 + 0 + + + + + 424 + 42 + + + + background:url(:/images/x9b0.png) + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Horizontal + + + + 438 + 6 + + + + + + + + + + + Outputs + + + + + + + + + + + + + + + + + lcdWidget + QWidget +
lcdwidget.h
+ 1 +
+ + mySlider + QSlider +
myslider.h
+
+ + xcursorWidget + QWidget +
xcursorwidget.h
+ 1 +
+ + xmenuWidget + QWidget +
xmenuwidget.h
+ 1 +
+
+ + + + +
diff --git a/companion/src/simulation/simulatordialog.cpp b/companion/src/simulation/simulatordialog.cpp new file mode 100644 index 000000000..597edfe35 --- /dev/null +++ b/companion/src/simulation/simulatordialog.cpp @@ -0,0 +1,755 @@ +#include "simulatordialog.h" +#include "ui_simulatordialog-9x.h" +#include "ui_simulatordialog-taranis.h" +#include +#include "helpers.h" +#include "simulatorinterface.h" + +#define GBALL_SIZE 20 +#define RESX 1024 + +int SimulatorDialog::screenshotIdx = 0; + +SimulatorDialog::SimulatorDialog(QWidget * parent, unsigned int flags): + QDialog(parent), + flags(flags), + dialP_4(NULL), + timer(NULL), + lightOn(false), + txInterface(NULL), + simulator(NULL), + beepVal(0), + buttonPressed(0), + middleButtonPressed(false) +{ +} + +SimulatorDialog9X::SimulatorDialog9X(QWidget * parent, unsigned int flags): + SimulatorDialog(parent, flags), + ui(new Ui::SimulatorDialog9X), + beepShow(0) +{ + lcdWidth = 128; + lcdDepth = 1; + + initUi(ui); + + QSettings settings; + backLight = settings.value("backLight", 0).toInt(); + if (backLight > 4) backLight = 0; + switch (backLight) { + case 1: + ui->lcd->setBackgroundColor(166,247,159); + break; + case 2: + ui->lcd->setBackgroundColor(247,159,166); + break; + case 3: + ui->lcd->setBackgroundColor(255,195,151); + break; + case 4: + ui->lcd->setBackgroundColor(247,242,159); + break; + default: + ui->lcd->setBackgroundColor(159,165,247); + break; + } + + connect(ui->dialP_1, SIGNAL(valueChanged(int)), this, SLOT(dialChanged())); + connect(ui->dialP_2, SIGNAL(valueChanged(int)), this, SLOT(dialChanged())); + connect(ui->dialP_3, SIGNAL(valueChanged(int)), this, SLOT(dialChanged())); + connect(ui->cursor, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int))); + connect(ui->menu, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int))); +} + +SimulatorDialog9X::~SimulatorDialog9X() +{ + delete ui; +} + +SimulatorDialogTaranis::SimulatorDialogTaranis(QWidget * parent, unsigned int flags): + SimulatorDialog(parent, flags), + ui(new Ui::SimulatorDialogTaranis) +{ + lcdWidth = 212; + lcdDepth = 4; + + initUi(ui); + dialP_4 = ui->dialP_4; + + ui->lcd->setBackgroundColor(47, 123, 227); + + connect(ui->cursor, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int))); + connect(ui->menu, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int))); +} + +SimulatorDialogTaranis::~SimulatorDialogTaranis() +{ + delete ui; +} + +SimulatorDialog::~SimulatorDialog() +{ + delete timer; +} + +void SimulatorDialog::closeEvent (QCloseEvent *) +{ + simulator->stop(); + timer->stop(); +} + +void SimulatorDialog::mousePressEvent(QMouseEvent *event) +{ + if (event->button() == Qt::MidButton) { + middleButtonPressed = true; + } +} + +void SimulatorDialog::mouseReleaseEvent(QMouseEvent *event) +{ + if (event->button() == Qt::MidButton) { + middleButtonPressed = false; + } +} + +void SimulatorDialog9X::dialChanged() +{ + ui->dialP_1value->setText(QString("%1 %").arg((ui->dialP_1->value()*100)/1024)); + ui->dialP_2value->setText(QString("%1 %").arg((ui->dialP_2->value()*100)/1024)); + ui->dialP_3value->setText(QString("%1 %").arg((ui->dialP_3->value()*100)/1024)); +} + +void SimulatorDialog::wheelEvent (QWheelEvent *event) +{ + simulator->wheelEvent(event->delta() > 0 ? 1 : -1); +} + +void SimulatorDialog::keyPressEvent (QKeyEvent *event) +{ + switch (event->key()) { + case Qt::Key_Enter: + case Qt::Key_Return: + buttonPressed = Qt::Key_Enter; + break; + case Qt::Key_Escape: + case Qt::Key_Backspace: + buttonPressed = Qt::Key_Escape; + break; + case Qt::Key_Up: + case Qt::Key_Down: + case Qt::Key_Right: + case Qt::Key_Left: + case Qt::Key_Minus: + case Qt::Key_Plus: + case Qt::Key_PageDown: + case Qt::Key_Menu: + buttonPressed = event->key(); + break; + } +} + +void SimulatorDialog::keyReleaseEvent(QKeyEvent * event) +{ + switch (event->key()) { + case Qt::Key_Enter: + case Qt::Key_Return: + case Qt::Key_Escape: + case Qt::Key_Backspace: + case Qt::Key_Up: + case Qt::Key_Down: + case Qt::Key_Right: + case Qt::Key_Left: + case Qt::Key_Plus: + case Qt::Key_Minus: + case Qt::Key_PageDown: + case Qt::Key_Menu: + buttonPressed = 0; + break; + } +} + +void SimulatorDialog::setupTimer() +{ + timer = new QTimer(this); + connect(timer, SIGNAL(timeout()), this, SLOT(onTimerEvent())); + timer->start(10); +} + +template +void SimulatorDialog::initUi(T * ui) +{ + ui->setupUi(this); + + lcd = ui->lcd; + leftStick = ui->leftStick; + rightStick = ui->rightStick; + dialP_1 = ui->dialP_1; + dialP_2 = ui->dialP_2; + dialP_3 = ui->dialP_3; + trimHLeft = ui->trimHLeft; + trimVLeft = ui->trimVLeft; + trimHRight = ui->trimHRight; + trimVRight = ui->trimVRight; + tabWidget = ui->tabWidget; + logicalSwitchesLayout = ui->logicalSwitchesLayout; + channelsLayout = ui->channelsLayout; + leftXPerc = ui->leftXPerc; + leftYPerc = ui->leftYPerc; + rightXPerc = ui->rightXPerc; + rightYPerc = ui->rightYPerc; + + setupSticks(); + + resize(0, 0); // to force min height, min width + setFixedSize(width(), height()); + +#ifdef JOYSTICKS + QSettings settings; + bool js_enable = settings.value("js_support",false).toBool(); + int js_ctrl=settings.value("js_ctrl",-1).toInt(); + if (js_enable) { + settings.beginGroup("JsCalibration"); + int count=0; + for (int j=0; j<8;j++){ + int axe=settings.value(QString("stick%1_axe").arg(j),-1).toInt(); + if (axe>=0 && axe<8) { + jsmap[axe]=j; + jscal[axe][0]=settings.value(QString("stick%1_min").arg(j),-32767).toInt(); + jscal[axe][1]=settings.value(QString("stick%1_med").arg(j),0).toInt(); + jscal[axe][2]=settings.value(QString("stick%1_max").arg(j),0).toInt(); + jscal[axe][3]=settings.value(QString("stick%1_inv").arg(j),0).toInt(); + count++; + } + } + settings.endGroup(); + if (count<3) { + QMessageBox::critical(this, tr("Warning"), tr("Joystick enabled but not configured correctly")); + } + if (js_ctrl!=-1) { + joystick = new Joystick(this); + if (joystick) { + if (joystick->open(js_ctrl)) { + int numAxes=std::min(joystick->numAxes,8); + for (int j=0; jsensitivities[j] = 0; + joystick->deadzones[j]=0; + } + nodeRight->setCenteringY(false); //mode 1,3 -> THR on right + ui->holdRightY->setChecked(true); + nodeRight->setCenteringX(false); //mode 1,3 -> THR on right + ui->holdRightX->setChecked(true); + nodeLeft->setCenteringY(false); //mode 1,3 -> THR on right + ui->holdLeftY->setChecked(true); + nodeLeft->setCenteringX(false); //mode 1,3 -> THR on right + ui->holdLeftX->setChecked(true); + connect(joystick, SIGNAL(axisValueChanged(int, int)), this, SLOT(onjoystickAxisValueChanged(int, int))); + } + else { + QMessageBox::critical(this, tr("Warning"), tr("Cannot open joystick, joystick disabled")); + } + } + } + } +#endif + + txInterface = GetEepromInterface(); + + windowName = tr("Simulating Tx (%1)").arg(txInterface->getName()); + setWindowTitle(windowName); + + simulator = txInterface->getSimulator(); + lcd->setData(simulator->getLcd(), lcdWidth, 64, lcdDepth); + + if (flags & SIMULATOR_FLAGS_STICK_MODE_LEFT) { + nodeLeft->setCenteringY(false); + ui->holdLeftY->setChecked(true); + } + else { + nodeRight->setCenteringY(false); + ui->holdRightY->setChecked(true); + } + + setTrims(); + + int outputs = std::min(16, txInterface->getCapability(Outputs)); + for (int i=0; isetText(RawSource(SOURCE_TYPE_CH, i).toString()); + channelsLayout->addWidget(label, line, column == 0 ? 0 : 5, 1, 1); + + QSlider * slider = new QSlider(tabWidget); + slider->setEnabled(false); + slider->setMaximumSize(QSize(16777215, 18)); + slider->setStyleSheet(QString::fromUtf8("QSlider::sub-page:horizontal:disabled {\n" + "border-color: #999;\n" + "}\n" + "\n" + "QSlider::add-page:horizontal:disabled {\n" + "border-color: #999;\n" + "}\n" + "\n" + "QSlider::handle:horizontal:disabled {\n" + "background: #0000CC;\n" + "border: 1px solid #aaa;\n" + "border-radius: 4px;\n" + "}")); + slider->setMinimum(-1024); + slider->setMaximum(1024); + slider->setPageStep(128); + slider->setTracking(false); + slider->setOrientation(Qt::Horizontal); + slider->setInvertedAppearance(false); + slider->setTickPosition(QSlider::TicksBelow); + channelSliders << slider; + channelsLayout->addWidget(slider, line, column == 0 ? 1 : 4, 1, 1); + + QLabel * value = new QLabel(tabWidget); + value->setMinimumSize(QSize(50, 0)); + value->setAlignment(Qt::AlignCenter); + channelValues << value; + channelsLayout->addWidget(value, line, column == 0 ? 2 : 3, 1, 1); + } + + int switches = txInterface->getCapability(LogicalSwitches); + for (int i=0; isetAutoFillBackground(true); + swtch->setFrameShape(QFrame::Panel); + swtch->setFrameShadow(QFrame::Raised); + swtch->setLineWidth(2); + QVBoxLayout * layout = new QVBoxLayout(swtch); + layout->setContentsMargins(2, 2, 2, 2); + QLabel * label = new QLabel(swtch); + label->setText(RawSwitch(SWITCH_TYPE_VIRTUAL, i+1).toString()); + label->setAlignment(Qt::AlignCenter); + logicalSwitchLabels << label; + layout->addWidget(label); + logicalSwitchesLayout->addWidget(swtch, i / (switches/2), i % (switches/2), 1, 1); + } + + if (flags & SIMULATOR_FLAGS_NOTX) { + ui->tabWidget->setCurrentIndex(1); + } + else { + ui->lcd->setFocus(); + } + + setupTimer(); +} + +void SimulatorDialog::onButtonPressed(int value) +{ + if (value == Qt::Key_Print) { + QSettings settings; + bool toclipboard = settings.value("snapshot_to_clipboard", false).toBool(); + QString fileName = ""; + if (!toclipboard) { + fileName = QString("screenshot-%1.png").arg(++screenshotIdx); + } + lcd->makeScreenshot(fileName); + } + else { + buttonPressed = value; + } +} + +void SimulatorDialog9X::setLightOn(bool enable) +{ + QString bg = ""; + if (enable) { + QStringList list; + list << "bl" << "gr" << "rd" << "or" << "yl"; + bg = QString("-") + list[backLight]; + } + ui->top->setStyleSheet(QString("background:url(:/images/9xdt.png%1);").arg(bg)); + ui->bottom->setStyleSheet(QString("background:url(:/images/9xdb%1.png);").arg(bg)); + ui->left->setStyleSheet(QString("background:url(:/images/9xdl%1.png);").arg(bg)); + ui->right->setStyleSheet(QString("background:url(:/images/9xdr%1.png);").arg(bg)); +} + +void SimulatorDialog9X::updateBeepButton() +{ + #define CBEEP_ON "QLabel { background-color: #FF364E }" + #define CBEEP_OFF "QLabel { }" + + if (beepVal) { + beepShow = 20; + } + + ui->label_beep->setStyleSheet(beepShow ? CBEEP_ON : CBEEP_OFF); + + if (beepShow) { + beepShow--; + } +} + +void SimulatorDialog::onTimerEvent() +{ + static unsigned int lcd_counter = 0; + if (!simulator->timer10ms()) { + QMessageBox::critical(this, "Companion", tr("Firmware %1 error: %2").arg(txInterface->getName()).arg(simulator->getError())); + timer->stop(); + return; + } + + getValues(); + + if (!(flags & SIMULATOR_FLAGS_NOTX) && tabWidget->currentIndex()==0) { + bool lightEnable; + if (simulator->lcdChanged(lightEnable)) { + lcd->onLcdChanged(lightEnable); + if (lightOn != lightEnable) { + setLightOn(lightEnable); + lightOn = lightEnable; + } + } + } + + if (!(lcd_counter++ % 5)) { + + setValues(); + + setTrims(); + + centerSticks(); + + updateBeepButton(); + + if (beepVal) { + beepVal = 0; + QApplication::beep(); + } + } +} + +void SimulatorDialog::centerSticks() +{ + if (leftStick->scene()) + nodeLeft->stepToCenter(); + + if (rightStick->scene()) + nodeRight->stepToCenter(); +} + +void SimulatorDialog::start(QByteArray & eeprom) +{ + simulator->start(eeprom, (flags & SIMULATOR_FLAGS_NOTX) ? false : true); +} + +void SimulatorDialog::start(const char * filename) +{ + simulator->start(filename); +} + +void SimulatorDialog::setTrims() +{ + Trims trims; + simulator->getTrims(trims); + + int trimMin = -125, trimMax = +125; + if (trims.extended) { + trimMin = -500; + trimMax = +500; + } + trimHLeft->setRange(trimMin, trimMax); trimHLeft->setValue(trims.values[0]); + trimVLeft->setRange(trimMin, trimMax); trimVLeft->setValue(trims.values[1]); + trimVRight->setRange(trimMin, trimMax); trimVRight->setValue(trims.values[2]); + trimHRight->setRange(trimMin, trimMax); trimHRight->setValue(trims.values[3]); +} + +void SimulatorDialog9X::getValues() +{ + TxInputs inputs = { + { + int(1024*nodeLeft->getX()), // LEFT HORZ + int(-1024*nodeLeft->getY()), // LEFT VERT + int(-1024*nodeRight->getY()), // RGHT VERT + int(1024*nodeRight->getX()) // RGHT HORZ + }, + + { + ui->dialP_1->value(), + ui->dialP_2->value(), + ui->dialP_3->value(), 0 + }, + + { + ui->switchTHR->isChecked(), + ui->switchRUD->isChecked(), + ui->switchELE->isChecked(), + ui->switchID2->isChecked() ? 1 : (ui->switchID1->isChecked() ? 0 : -1), + ui->switchAIL->isChecked(), + ui->switchGEA->isChecked(), + ui->switchTRN->isDown(), + 0, 0, 0 + }, + + { + buttonPressed == Qt::Key_Enter, + buttonPressed == Qt::Key_Escape, + buttonPressed == Qt::Key_Down, + buttonPressed == Qt::Key_Up, + buttonPressed == Qt::Key_Right, + buttonPressed == Qt::Key_Left, + }, + + middleButtonPressed + }; + + simulator->setValues(inputs); +} + +void SimulatorDialogTaranis::getValues() +{ + TxInputs inputs = { + { + int(1024*nodeLeft->getX()), // LEFT HORZ + int(-1024*nodeLeft->getY()), // LEFT VERT + int(-1024*nodeRight->getY()), // RGHT VERT + int(1024*nodeRight->getX()) // RGHT HORZ + }, + + { + -ui->dialP_1->value(), + ui->dialP_2->value(), + -ui->dialP_3->value(), + ui->dialP_4->value() + }, + + { + ui->switchA->value() - 1, + ui->switchB->value() - 1, + ui->switchC->value() - 1, + ui->switchD->value() - 1, + ui->switchE->value() - 1, + ui->switchF->value(), + ui->switchG->value() - 1, + ui->switchH->value(), 0, 0 + }, + + { + buttonPressed == Qt::Key_Menu, + buttonPressed == Qt::Key_Escape, + buttonPressed == Qt::Key_Enter, + buttonPressed == Qt::Key_PageDown, + buttonPressed == Qt::Key_Plus, + buttonPressed == Qt::Key_Minus + }, + + middleButtonPressed + }; + + simulator->setValues(inputs); +} + +inline int chVal(int val) +{ + return qMin(1024, qMax(-1024, val)); +} + +void SimulatorDialog::on_trimHLeft_valueChanged(int value) +{ + simulator->setTrim(0, value); +} + +void SimulatorDialog::on_trimVLeft_valueChanged(int value) +{ + simulator->setTrim(1, value); +} + +void SimulatorDialog::on_trimHRight_valueChanged(int value) +{ + simulator->setTrim(3, value); +} + +void SimulatorDialog::on_trimVRight_valueChanged(int value) +{ + simulator->setTrim(2, value); +} + +void SimulatorDialog::setValues() +{ + TxOutputs outputs; + simulator->getValues(outputs); + Trims trims; + simulator->getTrims(trims); + + for (int i=0; igetCapability(Outputs)); i++) { + channelSliders[i]->setValue(chVal(outputs.chans[i])); + channelValues[i]->setText(QString("%1").arg((qreal)outputs.chans[i]*100/1024, 0, 'f', 1)); + } + + leftXPerc->setText(QString("X %1%").arg((qreal)nodeLeft->getX()*100+trims.values[0]/5, 2, 'f', 0)); + leftYPerc->setText(QString("Y %1%").arg((qreal)nodeLeft->getY()*-100+trims.values[1]/5, 2, 'f', 0)); + + rightXPerc->setText(QString("X %1%").arg((qreal)nodeRight->getX()*100+trims.values[2]/5, 2, 'f', 0)); + rightYPerc->setText(QString("Y %1%").arg((qreal)nodeRight->getY()*-100+trims.values[3]/5, 2, 'f', 0)); + + QString CSWITCH_ON = "QLabel { background-color: #4CC417 }"; + QString CSWITCH_OFF = "QLabel { }"; + + for (int i=0; igetCapability(LogicalSwitches); i++) { + logicalSwitchLabels[i]->setStyleSheet(outputs.vsw[i] ? CSWITCH_ON : CSWITCH_OFF); + } + + if (outputs.beep) { + beepVal = outputs.beep; + } +} + +void SimulatorDialog::setupSticks() +{ + QGraphicsScene *leftScene = new QGraphicsScene(leftStick); + leftScene->setItemIndexMethod(QGraphicsScene::NoIndex); + leftStick->setScene(leftScene); + + // leftStick->scene()->addLine(0,10,20,30); + + QGraphicsScene *rightScene = new QGraphicsScene(rightStick); + rightScene->setItemIndexMethod(QGraphicsScene::NoIndex); + rightStick->setScene(rightScene); + + // rightStick->scene()->addLine(0,10,20,30); + + nodeLeft = new Node(); + nodeLeft->setPos(-GBALL_SIZE/2,-GBALL_SIZE/2); + nodeLeft->setBallSize(GBALL_SIZE); + leftScene->addItem(nodeLeft); + + nodeRight = new Node(); + nodeRight->setPos(-GBALL_SIZE/2,-GBALL_SIZE/2); + nodeRight->setBallSize(GBALL_SIZE); + rightScene->addItem(nodeRight); +} + +void SimulatorDialog::resizeEvent(QResizeEvent *event) +{ + if (leftStick->scene()) { + QRect qr = leftStick->contentsRect(); + qreal w = (qreal)qr.width() - GBALL_SIZE; + qreal h = (qreal)qr.height() - GBALL_SIZE; + qreal cx = (qreal)qr.width()/2; + qreal cy = (qreal)qr.height()/2; + leftStick->scene()->setSceneRect(-cx,-cy,w,h); + + QPointF p = nodeLeft->pos(); + p.setX(qMin(cx, qMax(p.x(), -cx))); + p.setY(qMin(cy, qMax(p.y(), -cy))); + nodeLeft->setPos(p); + } + + if (rightStick->scene()) { + QRect qr = rightStick->contentsRect(); + qreal w = (qreal)qr.width() - GBALL_SIZE; + qreal h = (qreal)qr.height() - GBALL_SIZE; + qreal cx = (qreal)qr.width()/2; + qreal cy = (qreal)qr.height()/2; + rightStick->scene()->setSceneRect(-cx,-cy,w,h); + + QPointF p = nodeRight->pos(); + p.setX(qMin(cx, qMax(p.x(), -cx))); + p.setY(qMin(cy, qMax(p.y(), -cy))); + nodeRight->setPos(p); + } + QDialog::resizeEvent(event); +} + +void SimulatorDialog::on_holdLeftX_clicked(bool checked) +{ + nodeLeft->setCenteringX(!checked); +} + +void SimulatorDialog::on_holdLeftY_clicked(bool checked) +{ + nodeLeft->setCenteringY(!checked); +} + +void SimulatorDialog::on_holdRightX_clicked(bool checked) +{ + nodeRight->setCenteringX(!checked); +} + +void SimulatorDialog::on_holdRightY_clicked(bool checked) +{ + nodeRight->setCenteringY(!checked); +} + +void SimulatorDialog::on_FixLeftX_clicked(bool checked) +{ + nodeLeft->setFixedX(checked); +} + +void SimulatorDialog::on_FixLeftY_clicked(bool checked) +{ + nodeLeft->setFixedY(checked); +} + +void SimulatorDialog::on_FixRightX_clicked(bool checked) +{ + nodeRight->setFixedX(checked); +} + +void SimulatorDialog::on_FixRightY_clicked(bool checked) +{ + nodeRight->setFixedY(checked); +} + +#ifdef JOYSTICKS +void SimulatorDialog::onjoystickAxisValueChanged(int axis, int value) +{ + int stick; + if (axis>=0 && axis<=8) { + stick=jsmap[axis]; + int stickval; + if (value>jscal[axis][1]) { + if ((jscal[axis][2]-jscal[axis][1])==0) + return; + stickval=(1024*(value-jscal[axis][1]))/(jscal[axis][2]-jscal[axis][1]); + } + else { + if ((jscal[axis][1]-jscal[axis][0])==0) + return; + stickval=(1024*(value-jscal[axis][1]))/(jscal[axis][1]-jscal[axis][0]); + } + if (jscal[axis][3]==1) { + stickval*=-1; + } + if (stick==1 || stick==2) { + float currX=nodeRight->getX(); + float currY=nodeRight->getY(); + if (stick==1 ) { + nodeRight->setPos(currX*100-10,-stickval*100/1024-10); + } + if (stick==2) { + nodeRight->setPos(stickval*100/1024-10,currY*100-10); + } + } + else if (stick==3 || stick==4) { + float currX=nodeLeft->getX(); + float currY=nodeLeft->getY(); + if (stick==3) { + nodeLeft->setPos(currX*100-10,-stickval*100/1024-10); + } + if (stick==4) { + nodeLeft->setPos(stickval*100/1024-10,currY*100-10); + } + } + + if (stick==5) { + dialP_1->setValue(stickval); + } + if (stick==6) { + dialP_2->setValue(stickval); + } + if (stick==7) { + dialP_3->setValue(stickval); + } + if (stick==8 && dialP_4) { + dialP_4->setValue(stickval); + } + } +} +#endif diff --git a/companion/src/simulation/simulatordialog.h b/companion/src/simulation/simulatordialog.h new file mode 100644 index 000000000..eb8c6b2e2 --- /dev/null +++ b/companion/src/simulation/simulatordialog.h @@ -0,0 +1,167 @@ +#ifndef SIMULATORDIALOG_H +#define SIMULATORDIALOG_H + +#include +#include "modeledit/node.h" +#include "eeprominterface.h" + +#ifdef JOYSTICKS +#include "joystick.h" +#endif + +#define TMR_OFF 0 +#define TMR_RUNNING 1 +#define TMR_BEEPING 2 +#define TMR_STOPPED 3 + +#define FLASH_DURATION 10 + +namespace Ui { + class SimulatorDialog9X; + class SimulatorDialogTaranis; +} + +// TODO rename + move? +class lcdWidget; +class mySlider; + +#define SIMULATOR_FLAGS_NOTX 1 +#define SIMULATOR_FLAGS_STICK_MODE_LEFT 2 + +class SimulatorDialog : public QDialog +{ + Q_OBJECT + + public: + explicit SimulatorDialog(QWidget * parent = NULL, unsigned int flags=0); + virtual ~SimulatorDialog(); + + void start(const char * filename); + void start(QByteArray & eeprom); + + protected: + template void initUi(T * ui); + virtual void setLightOn(bool enable) { } + virtual void updateBeepButton() { } + + unsigned int flags; + lcdWidget * lcd; + QGraphicsView * leftStick, * rightStick; + QDial * dialP_1, * dialP_2, * dialP_3, * dialP_4; + mySlider * trimHLeft, * trimVLeft, * trimHRight, * trimVRight; + QLabel * leftXPerc, * rightXPerc, * leftYPerc, * rightYPerc; + QTabWidget * tabWidget; + QGridLayout * logicalSwitchesLayout; + QGridLayout * channelsLayout; + QVector logicalSwitchLabels; + QVector channelSliders; + QVector channelValues; + + void init(); + Node *nodeLeft; + Node *nodeRight; + QTimer *timer; + QString windowName; + unsigned int backLight; + bool lightOn; + int switches; +#ifdef JOYSTICKS + Joystick *joystick; + int jscal[8][4]; + int jsmap[8]; +#endif + + EEPROMInterface *txInterface; + SimulatorInterface *simulator; + + void setupSticks(); + void setupTimer(); + void resizeEvent(QResizeEvent *event = 0); + + virtual void getValues() = 0; + void setValues(); + void centerSticks(); + // void timerTick(); + + bool keyState(EnumKeys key); + int getValue(qint8 i); + bool getSwitch(int swtch, bool nc, qint8 level=0); + void setTrims(); + + int beepVal; + + int lcdWidth; + int lcdDepth; + + protected: + virtual void closeEvent(QCloseEvent *); + virtual void mousePressEvent(QMouseEvent *); + virtual void mouseReleaseEvent(QMouseEvent *); + virtual void wheelEvent(QWheelEvent *); + virtual void keyPressEvent(QKeyEvent *); + virtual void keyReleaseEvent(QKeyEvent *); + static int screenshotIdx; + int buttonPressed; + bool middleButtonPressed; + + private slots: + void onButtonPressed(int value); + void on_FixRightY_clicked(bool checked); + void on_FixRightX_clicked(bool checked); + void on_FixLeftY_clicked(bool checked); + void on_FixLeftX_clicked(bool checked); + void on_holdRightY_clicked(bool checked); + void on_holdRightX_clicked(bool checked); + void on_holdLeftY_clicked(bool checked); + void on_holdLeftX_clicked(bool checked); + void on_trimHLeft_valueChanged(int); + void on_trimVLeft_valueChanged(int); + void on_trimHRight_valueChanged(int); + void on_trimVRight_valueChanged(int); + void onTimerEvent(); + +#ifdef JOYSTICKS + void onjoystickAxisValueChanged(int axis, int value); +#endif + +}; + +class SimulatorDialog9X: public SimulatorDialog +{ + Q_OBJECT + + public: + explicit SimulatorDialog9X(QWidget * parent = NULL, unsigned int flags=0); + virtual ~SimulatorDialog9X(); + + protected: + virtual void getValues(); + virtual void setLightOn(bool enable); + virtual void updateBeepButton(); + + private slots: + void dialChanged(); + + private: + Ui::SimulatorDialog9X * ui; + int beepShow; + +}; + +class SimulatorDialogTaranis: public SimulatorDialog +{ + Q_OBJECT + + public: + explicit SimulatorDialogTaranis(QWidget * parent = NULL, unsigned int flags=0); + virtual ~SimulatorDialogTaranis(); + + protected: + virtual void getValues(); + + private: + Ui::SimulatorDialogTaranis * ui; + +}; + +#endif // SIMULATORDIALOG_H diff --git a/companion/src/simulatorimport.h b/companion/src/simulation/simulatorimport.h similarity index 100% rename from companion/src/simulatorimport.h rename to companion/src/simulation/simulatorimport.h diff --git a/companion/src/simulatorinterface.h b/companion/src/simulation/simulatorinterface.h similarity index 92% rename from companion/src/simulatorinterface.h rename to companion/src/simulation/simulatorinterface.h index 42798335a..2b2e76187 100644 --- a/companion/src/simulatorinterface.h +++ b/companion/src/simulation/simulatorinterface.h @@ -47,7 +47,9 @@ class SimulatorInterface { public: - virtual void start(RadioData &radioData, bool tests) = 0; + virtual void start(QByteArray & eeprom, bool tests=true) = 0; + + virtual void start(const char * filename, bool tests=true) = 0; virtual void stop() = 0; diff --git a/companion/src/xcursorwidget.h b/companion/src/simulation/xcursorwidget.h similarity index 100% rename from companion/src/xcursorwidget.h rename to companion/src/simulation/xcursorwidget.h diff --git a/companion/src/xmenuwidget.h b/companion/src/simulation/xmenuwidget.h similarity index 100% rename from companion/src/xmenuwidget.h rename to companion/src/simulation/xmenuwidget.h diff --git a/companion/src/simulator.cpp b/companion/src/simulator.cpp new file mode 100644 index 000000000..163542a1c --- /dev/null +++ b/companion/src/simulator.cpp @@ -0,0 +1,121 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "simulatordialog.h" +#include "eeprominterface.h" + +#if defined WIN32 || !defined __GNUC__ +#include +#define sleep(x) Sleep(x*1000) +#else +#include +#endif + +#ifdef __APPLE__ +#include + +class MyProxyStyle : public QProxyStyle + { + public: + void polish ( QWidget * w ) { + QMenu* mn = dynamic_cast(w); + QPushButton* pb = dynamic_cast(w); + if(!(mn || pb) && !w->testAttribute(Qt::WA_MacNormalSize)) + w->setAttribute(Qt::WA_MacSmallSize); + } + }; +#endif + +int main(int argc, char *argv[]) +{ + Q_INIT_RESOURCE(companion); + QApplication app(argc, argv); + app.setApplicationName("OpenTX Simulator"); + app.setOrganizationName("OpenTX"); + app.setOrganizationDomain("open-tx.org"); + +#ifdef __APPLE__ + app.setStyle(new MyProxyStyle); +#endif + + QString dir; + if (argc) dir = QFileInfo(argv[0]).canonicalPath() + "/lang"; + + /* 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")); + + RegisterFirmwares(); + SimulatorDialog *dialog; + + if (argc > 1 && !strcmp(argv[1], "taranis")) { + current_firmware_variant = GetFirmwareVariant("opentx-taranis-en"); + dialog = new SimulatorDialogTaranis(); + } + else { + dialog = new SimulatorDialog9X(); + } + + dialog->show(); + dialog->start("eeprom.bin"); + + int result = app.exec(); + + delete dialog; + + return result; +} diff --git a/companion/src/simulatordialog.cpp b/companion/src/simulatordialog.cpp deleted file mode 100644 index 4d913c4f7..000000000 --- a/companion/src/simulatordialog.cpp +++ /dev/null @@ -1,742 +0,0 @@ -#include "simulatordialog.h" -#include "ui_simulatordialog.h" -#include -#include "helpers.h" -#include "simulatorinterface.h" -#ifdef JOYSTICKS -#include "joystick.h" -#endif - -#define GBALL_SIZE 20 -#define RESX 1024 -#define W 128 -#define H 64 - -int simulatorDialog::screenshotIdx = 0; -uint32_t simulatorDialog::switchstatus = 0; - - -simulatorDialog::simulatorDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::simulatorDialog), - timer(NULL), - txInterface(NULL), - simulator(NULL), - g_modelIdx(-1), - buttonPressed(0), - middleButtonPressed(false) -{ - ui->setupUi(this); - ui->lcd->setFocus(); - - beepVal = 0; - beepShow = 0; - - QSettings settings("companion", "companion"); - backLight = settings.value("backLight",0).toInt(); - bool simuSW=settings.value("simuSW",false).toBool(); - switch (backLight) { - case 1: - ui->lcd->setBackgroundColor(166,247,159); - break; - case 2: - ui->lcd->setBackgroundColor(247,159,166); - break; - case 3: - ui->lcd->setBackgroundColor(255,195,151); - break; - case 4: - ui->lcd->setBackgroundColor(247,242,159); - break; - default: - ui->lcd->setBackgroundColor(159,165,247); - break; - } - lightOn=NULL; - setupSticks(); - resize(0, 0); // to force min height, min width - this->setFixedSize(this->width(),this->height()); - if (simuSW) { - ui->switchAIL->setChecked(switchstatus & 0x1); - switchstatus >>=1; - ui->switchELE->setChecked(switchstatus & 0x1); - switchstatus >>=1; - ui->switchGEA->setChecked(switchstatus & 0x1); - switchstatus >>=1; - ui->switchID0->setChecked(switchstatus & 0x1); - switchstatus >>=1; - ui->switchID1->setChecked(switchstatus & 0x1); - switchstatus >>=1; - ui->switchID2->setChecked(switchstatus & 0x1); - switchstatus >>=1; - ui->switchRUD->setChecked(switchstatus & 0x1); - switchstatus >>=1; - ui->switchTHR->setChecked(switchstatus & 0x1); - } - -#ifdef JOYSTICKS - bool js_enable=settings.value("js_support",false).toBool(); - int js_ctrl=settings.value("js_ctrl",-1).toInt(); - if (js_enable) { - settings.beginGroup("JsCalibration"); - int count=0; - for (int j=0; j<8;j++){ - int axe=settings.value(QString("stick%1_axe").arg(j),-1).toInt(); - if (axe>=0 && axe<8) { - jsmap[axe]=j; - jscal[axe][0]=settings.value(QString("stick%1_min").arg(j),-32767).toInt(); - jscal[axe][1]=settings.value(QString("stick%1_med").arg(j),0).toInt(); - jscal[axe][2]=settings.value(QString("stick%1_max").arg(j),0).toInt(); - jscal[axe][3]=settings.value(QString("stick%1_inv").arg(j),0).toInt(); - count++; - } - } - settings.endGroup(); - if (count<3) { - QMessageBox::critical(this, tr("Warning"), tr("Joystick enabled but not configured correctly")); - } - if (js_ctrl!=-1) { - joystick = new Joystick(this); - if (joystick) { - if (joystick->open(js_ctrl)) { - int numAxes=std::min(joystick->numAxes,8); - for (int j=0; jsensitivities[j] = 0; - joystick->deadzones[j]=0; - } - nodeRight->setCenteringY(false); //mode 1,3 -> THR on right - ui->holdRightY->setChecked(true); - nodeRight->setCenteringX(false); //mode 1,3 -> THR on right - ui->holdRightX->setChecked(true); - nodeLeft->setCenteringY(false); //mode 1,3 -> THR on right - ui->holdLeftY->setChecked(true); - nodeLeft->setCenteringX(false); //mode 1,3 -> THR on right - ui->holdLeftX->setChecked(true); - connect(joystick, SIGNAL(axisValueChanged(int, int)), this, SLOT(onjoystickAxisValueChanged(int, int))); - } - else { - QMessageBox::critical(this, tr("Warning"), tr("Cannot open joystick, joystick disabled")); - } - } - } - } -#endif - connect(ui->dialP_1,SIGNAL(valueChanged(int)),this,SLOT(dialChanged())); - connect(ui->dialP_2,SIGNAL(valueChanged(int)),this,SLOT(dialChanged())); - connect(ui->dialP_3,SIGNAL(valueChanged(int)),this,SLOT(dialChanged())); - - connect(ui->cursor, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int))); - connect(ui->menu, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int))); -} - -simulatorDialog::~simulatorDialog() -{ - delete timer; - delete ui; -} - -void simulatorDialog::closeEvent (QCloseEvent *) -{ - simulator->stop(); - timer->stop(); -} - -void simulatorDialog::mousePressEvent(QMouseEvent *event) -{ - if (event->button() == Qt::MidButton) - middleButtonPressed = true; -} - -void simulatorDialog::dialChanged() -{ - ui->dialP_1value->setText(QString("%1 %").arg((ui->dialP_1->value()*100)/1024)); - ui->dialP_2value->setText(QString("%1 %").arg((ui->dialP_2->value()*100)/1024)); - ui->dialP_3value->setText(QString("%1 %").arg((ui->dialP_3->value()*100)/1024)); -} - -void simulatorDialog::mouseReleaseEvent(QMouseEvent *event) -{ - if (event->button() == Qt::MidButton) - middleButtonPressed = false; -} - -void simulatorDialog::wheelEvent (QWheelEvent *event) -{ - simulator->wheelEvent(event->delta() > 0 ? 1 : -1); -} - -void simulatorDialog::keyPressEvent (QKeyEvent *event) -{ - switch (event->key()) { - case Qt::Key_Enter: - case Qt::Key_Return: - buttonPressed = Qt::Key_Enter; - break; - case Qt::Key_Escape: - case Qt::Key_Backspace: - buttonPressed = Qt::Key_Escape; - break; - case Qt::Key_Up: - case Qt::Key_Down: - case Qt::Key_Right: - case Qt::Key_Left: - buttonPressed = event->key(); - break; - } -} - -void simulatorDialog::keyReleaseEvent(QKeyEvent * event) -{ - switch (event->key()) { - case Qt::Key_Enter: - case Qt::Key_Return: - case Qt::Key_Escape: - case Qt::Key_Backspace: - case Qt::Key_Up: - case Qt::Key_Down: - case Qt::Key_Right: - case Qt::Key_Left: - buttonPressed = 0; - break; - } -} - -void simulatorDialog::setupTimer() -{ - timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(onTimerEvent())); - timer->start(10); -} - -void simulatorDialog::onButtonPressed(int value) -{ - if (value==Qt::Key_Print) { - QSettings settings("companion", "companion"); - bool toclipboard=settings.value("snapshot_to_clipboard", false).toBool(); - QString fileName =""; - if (!toclipboard) { - fileName = QString("screenshot-%1.png").arg(++screenshotIdx); - } - ui->lcd->makeScreenshot(fileName); - } else { - buttonPressed = value; - } -} - -void simulatorDialog::onTimerEvent() -{ - static unsigned int lcd_counter = 0; - if (!simulator->timer10ms()) { - QMessageBox::critical(this, "Companion", QString(tr("Firmware %1 error: %2")).arg(txInterface->getName()).arg(simulator->getError())); - timer->stop(); - return; - } - - getValues(); - - if (g_modelIdx >= 0) { - ModelData *model = & g_radioData.models[g_modelIdx]; - setWindowTitle(windowName + (txInterface->getCapability(FlightPhases) ? tr(" - Flight mode: %1(%2)").arg(model->phaseData[simulator->getPhase()].name).arg(simulator->getPhase()) : "")); -/* TODO + QString(" - Timer: (%3, %4) %1:%2") .arg(abs( - -s_timerVal) / 60, 2, 10, QChar('0')).arg(abs(-s_timerVal) % 60, 2, 10, - QChar('0')) .arg(getTimerMode(model->timers[0].mode)) // TODO why timers[0] - .arg(model->timers[0].dir ? "Count Up" : "Count Down")); */ - } - else if (ui->tabWidget->currentIndex() == 0) { - bool lightEnable; - if (simulator->lcdChanged(lightEnable)) { - ui->lcd->onLcdChanged(lightEnable); - if (lightOn!=lightEnable) { - if (lightEnable) { - switch (backLight) { - case 1: - ui->top->setStyleSheet("background:url(:/images/9xdt-gr.png);"); - ui->bottom->setStyleSheet("background:url(:/images/9xdb-gr.png);"); - ui->left->setStyleSheet("background:url(:/images/9xdl-gr.png);"); - ui->right->setStyleSheet("background:url(:/images/9xdr-gr.png);"); - break; - case 2: - ui->top->setStyleSheet("background:url(:/images/9xdt-rd.png);"); - ui->bottom->setStyleSheet("background:url(:/images/9xdb-rd.png);"); - ui->left->setStyleSheet("background:url(:/images/9xdl-rd.png);"); - ui->right->setStyleSheet("background:url(:/images/9xdr-rd.png);"); - break; - case 3: - ui->top->setStyleSheet("background:url(:/images/9xdt-or.png);"); - ui->bottom->setStyleSheet("background:url(:/images/9xdb-or.png);"); - ui->left->setStyleSheet("background:url(:/images/9xdl-or.png);"); - ui->right->setStyleSheet("background:url(:/images/9xdr-or.png);"); - break; - case 4: - ui->top->setStyleSheet("background:url(:/images/9xdt-yl.png);"); - ui->bottom->setStyleSheet("background:url(:/images/9xdb-yl.png);"); - ui->left->setStyleSheet("background:url(:/images/9xdl-yl.png);"); - ui->right->setStyleSheet("background:url(:/images/9xdr-yl.png);"); - break; - default: - ui->top->setStyleSheet("background:url(:/images/9xdt-bl.png);"); - ui->bottom->setStyleSheet("background:url(:/images/9xdb-bl.png);"); - ui->left->setStyleSheet("background:url(:/images/9xdl-bl.png);"); - ui->right->setStyleSheet("background:url(:/images/9xdr-bl.png);"); - break; - } - } else { - ui->top->setStyleSheet("background:url(:/images/9xdt.png);"); - ui->bottom->setStyleSheet("background:url(:/images/9xdb.png);"); - ui->left->setStyleSheet("background:url(:/images/9xdl.png);"); - ui->right->setStyleSheet("background:url(:/images/9xdr.png);"); - } - lightOn=lightEnable; - } - } - } - - if (!(lcd_counter++ % 5)) { - - setValues(); - - setTrims(); - - centerSticks(); - - if (beepVal) { - beepVal = 0; - QApplication::beep(); - } - -#define CBEEP_ON "QLabel { background-color: #FF364E }" -#define CBEEP_OFF "QLabel { }" - - ui->label_beep->setStyleSheet(beepShow ? CBEEP_ON : CBEEP_OFF); - if (beepShow) { - beepShow--; - } - } -} - -void simulatorDialog::centerSticks() -{ - if(ui->leftStick->scene()) nodeLeft->stepToCenter(); - if(ui->rightStick->scene()) nodeRight->stepToCenter(); -} - -void simulatorDialog::loadParams(RadioData &radioData, const int model_idx) -{ - g_modelIdx = model_idx; - - txInterface = GetEepromInterface(); - simulator = txInterface->getSimulator(); - - g_radioData = radioData; - - if (model_idx < 0) { - windowName = QString(tr("Simulating Tx (%1)").arg(txInterface->getName())); - ui->lcd->setData(simulator->getLcd(), W, H); - } - else { - ui->tabWidget->removeTab(0); - g_radioData.generalSettings.currModel = model_idx; - windowName = tr("Simulating ") + g_radioData.models[model_idx].name; - } - - setWindowTitle(windowName); - - if (g_radioData.generalSettings.stickMode & 1) - { - nodeLeft->setCenteringY(false); //mode 1,3 -> THR on left - ui->holdLeftY->setChecked(true); - } - else - { - nodeRight->setCenteringY(false); //mode 1,3 -> THR on right - ui->holdRightY->setChecked(true); - } - - setTrims(); - - beepVal = 0; - beepShow = 0; - switches=txInterface->getCapability(CustomSwitches); - if ( switches < 13) { - ui->cswitch_13->hide(); - ui->labelCSW_13->hide(); - ui->cswitch_14->hide(); - ui->labelCSW_14->hide(); - ui->cswitch_15->hide(); - ui->labelCSW_15->hide(); - } - if ( switches < 16) { - ui->cswitch_16->hide(); - ui->labelCSW_16->hide(); - ui->cswitch_17->hide(); - ui->labelCSW_17->hide(); - ui->cswitch_18->hide(); - ui->labelCSW_18->hide(); - ui->cswitch_19->hide(); - ui->labelCSW_19->hide(); - ui->cswitch_20->hide(); - ui->labelCSW_20->hide(); - ui->cswitch_21->hide(); - ui->labelCSW_21->hide(); - ui->cswitch_22->hide(); - ui->labelCSW_22->hide(); - ui->cswitch_23->hide(); - ui->labelCSW_23->hide(); - ui->cswitch_24->hide(); - ui->labelCSW_24->hide(); - ui->cswitch_25->hide(); - ui->labelCSW_25->hide(); - ui->cswitch_26->hide(); - ui->labelCSW_26->hide(); - ui->cswitch_27->hide(); - ui->labelCSW_27->hide(); - ui->cswitch_28->hide(); - ui->labelCSW_28->hide(); - ui->cswitch_29->hide(); - ui->labelCSW_29->hide(); - ui->cswitch_30->hide(); - ui->labelCSW_30->hide(); - ui->cswitch_31->hide(); - ui->labelCSW_31->hide(); - ui->cswitch_32->hide(); - ui->labelCSW_32->hide(); - } - - simulator->start(g_radioData, model_idx<0); - - setupTimer(); -} - -void simulatorDialog::setTrims() -{ - Trims trims; - simulator->getTrims(trims); - - int trimMin = -125, trimMax = +125; - if (trims.extended) { - trimMin = -500; - trimMax = +500; - } - ui->trimHLeft->setRange(trimMin, trimMax); ui->trimHLeft->setValue(trims.values[0]); - ui->trimVLeft->setRange(trimMin, trimMax); ui->trimVLeft->setValue(trims.values[1]); - ui->trimVRight->setRange(trimMin, trimMax); ui->trimVRight->setValue(trims.values[2]); - ui->trimHRight->setRange(trimMin, trimMax); ui->trimHRight->setValue(trims.values[3]); -} - -void simulatorDialog::getValues() -{ - TxInputs inputs = {{ int(1024*nodeLeft->getX()), // LEFT HORZ - int(-1024*nodeLeft->getY()), // LEFT VERT - int(-1024*nodeRight->getY()), // RGHT VERT - int(1024*nodeRight->getX()) }, // RGHT HORZ - { ui->dialP_1->value(), - ui->dialP_2->value(), - ui->dialP_3->value(), 0 }, - { ui->switchTHR->isChecked(), - ui->switchRUD->isChecked(), - ui->switchELE->isChecked(), - ui->switchID2->isChecked() ? 1 : (ui->switchID1->isChecked() ? 0 : -1), - ui->switchAIL->isChecked(), - ui->switchGEA->isChecked(), - ui->switchTRN->isDown(), - 0, 0, 0 }, - { buttonPressed == Qt::Key_Enter, - buttonPressed == Qt::Key_Escape, - buttonPressed == Qt::Key_Down, - buttonPressed == Qt::Key_Up, - buttonPressed == Qt::Key_Right, - buttonPressed == Qt::Key_Left, - }, - middleButtonPressed - }; - - simulator->setValues(inputs); - switchstatus=ui->switchTHR->isChecked(); - switchstatus<<=1; - switchstatus+=(ui->switchRUD->isChecked()&0x1); - switchstatus<<=1; - switchstatus+=(ui->switchID2->isChecked()&0x1); - switchstatus<<=1; - switchstatus+=(ui->switchID1->isChecked()&0x1); - switchstatus<<=1; - switchstatus+=(ui->switchID0->isChecked()&0x1); - switchstatus<<=1; - switchstatus+=(ui->switchGEA->isChecked()&0x1); - switchstatus<<=1; - switchstatus+=(ui->switchELE->isChecked()&0x1); - switchstatus<<=1; - switchstatus+=(ui->switchAIL->isChecked()&0x1); -} - -inline int chVal(int val) -{ - return qMin(1024, qMax(-1024, val)); -} - -void simulatorDialog::on_trimHLeft_valueChanged(int value) -{ - simulator->setTrim(0, value); -} - -void simulatorDialog::on_trimVLeft_valueChanged(int value) -{ - simulator->setTrim(1, value); -} - -void simulatorDialog::on_trimHRight_valueChanged(int value) -{ - simulator->setTrim(3, value); -} - -void simulatorDialog::on_trimVRight_valueChanged(int value) -{ - simulator->setTrim(2, value); -} - -void simulatorDialog::setValues() -{ - TxOutputs outputs; - simulator->getValues(outputs); - - ui->chnout_1->setValue(chVal(outputs.chans[0])); - ui->chnout_2->setValue(chVal(outputs.chans[1])); - ui->chnout_3->setValue(chVal(outputs.chans[2])); - ui->chnout_4->setValue(chVal(outputs.chans[3])); - ui->chnout_5->setValue(chVal(outputs.chans[4])); - ui->chnout_6->setValue(chVal(outputs.chans[5])); - ui->chnout_7->setValue(chVal(outputs.chans[6])); - ui->chnout_8->setValue(chVal(outputs.chans[7])); - if (txInterface->getCapability(Outputs) > 8) { - ui->chnout_9->setValue(chVal(outputs.chans[8])); - ui->chnout_10->setValue(chVal(outputs.chans[9])); - ui->chnout_11->setValue(chVal(outputs.chans[10])); - ui->chnout_12->setValue(chVal(outputs.chans[11])); - ui->chnout_13->setValue(chVal(outputs.chans[12])); - ui->chnout_14->setValue(chVal(outputs.chans[13])); - ui->chnout_15->setValue(chVal(outputs.chans[14])); - ui->chnout_16->setValue(chVal(outputs.chans[15])); - } - - ui->chnoutV_1->setText(QString("%1").arg((qreal)outputs.chans[0]*100/1024, 0, 'f', 1)); - ui->chnoutV_2->setText(QString("%1").arg((qreal)outputs.chans[1]*100/1024, 0, 'f', 1)); - ui->chnoutV_3->setText(QString("%1").arg((qreal)outputs.chans[2]*100/1024, 0, 'f', 1)); - ui->chnoutV_4->setText(QString("%1").arg((qreal)outputs.chans[3]*100/1024, 0, 'f', 1)); - ui->chnoutV_5->setText(QString("%1").arg((qreal)outputs.chans[4]*100/1024, 0, 'f', 1)); - ui->chnoutV_6->setText(QString("%1").arg((qreal)outputs.chans[5]*100/1024, 0, 'f', 1)); - ui->chnoutV_7->setText(QString("%1").arg((qreal)outputs.chans[6]*100/1024, 0, 'f', 1)); - ui->chnoutV_8->setText(QString("%1").arg((qreal)outputs.chans[7]*100/1024, 0, 'f', 1)); - if (txInterface->getCapability(Outputs) > 8) { - ui->chnoutV_9->setText(QString("%1").arg((qreal)outputs.chans[8]*100/1024, 0, 'f', 1)); - ui->chnoutV_10->setText(QString("%1").arg((qreal)outputs.chans[9]*100/1024, 0, 'f', 1)); - ui->chnoutV_11->setText(QString("%1").arg((qreal)outputs.chans[10]*100/1024, 0, 'f', 1)); - ui->chnoutV_12->setText(QString("%1").arg((qreal)outputs.chans[11]*100/1024, 0, 'f', 1)); - ui->chnoutV_13->setText(QString("%1").arg((qreal)outputs.chans[12]*100/1024, 0, 'f', 1)); - ui->chnoutV_14->setText(QString("%1").arg((qreal)outputs.chans[13]*100/1024, 0, 'f', 1)); - ui->chnoutV_15->setText(QString("%1").arg((qreal)outputs.chans[14]*100/1024, 0, 'f', 1)); - ui->chnoutV_16->setText(QString("%1").arg((qreal)outputs.chans[15]*100/1024, 0, 'f', 1)); - } - - ui->leftXPerc->setText(QString("X %1%").arg((qreal)nodeLeft->getX()*100, 2, 'f', 0)); - ui->leftYPerc->setText(QString("Y %1%").arg((qreal)nodeLeft->getY()*-100, 2, 'f', 0)); - - ui->rightXPerc->setText(QString("X %1%").arg((qreal)nodeRight->getX()*100, 2, 'f', 0)); - ui->rightYPerc->setText(QString("Y %1%").arg((qreal)nodeRight->getY()*-100, 2, 'f', 0)); - -#define CSWITCH_ON "QLabel { background-color: #4CC417 }" -#define CSWITCH_OFF "QLabel { }" - - ui->labelCSW_1->setStyleSheet(outputs.vsw[0] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_2->setStyleSheet(outputs.vsw[1] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_3->setStyleSheet(outputs.vsw[2] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_4->setStyleSheet(outputs.vsw[3] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_5->setStyleSheet(outputs.vsw[4] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_6->setStyleSheet(outputs.vsw[5] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_7->setStyleSheet(outputs.vsw[6] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_8->setStyleSheet(outputs.vsw[7] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_9->setStyleSheet(outputs.vsw[8] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_10->setStyleSheet(outputs.vsw[9] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_11->setStyleSheet(outputs.vsw[10] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_12->setStyleSheet(outputs.vsw[11] ? CSWITCH_ON : CSWITCH_OFF); - if (switches > 12) { - ui->labelCSW_13->setStyleSheet(outputs.vsw[12] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_14->setStyleSheet(outputs.vsw[13] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_15->setStyleSheet(outputs.vsw[14] ? CSWITCH_ON : CSWITCH_OFF); - } - if (switches > 15) { - ui->labelCSW_16->setStyleSheet(outputs.vsw[15] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_17->setStyleSheet(outputs.vsw[16] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_18->setStyleSheet(outputs.vsw[17] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_19->setStyleSheet(outputs.vsw[18] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_20->setStyleSheet(outputs.vsw[19] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_21->setStyleSheet(outputs.vsw[20] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_22->setStyleSheet(outputs.vsw[21] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_23->setStyleSheet(outputs.vsw[22] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_24->setStyleSheet(outputs.vsw[23] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_25->setStyleSheet(outputs.vsw[24] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_26->setStyleSheet(outputs.vsw[25] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_27->setStyleSheet(outputs.vsw[26] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_28->setStyleSheet(outputs.vsw[27] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_29->setStyleSheet(outputs.vsw[28] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_30->setStyleSheet(outputs.vsw[29] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_31->setStyleSheet(outputs.vsw[30] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_32->setStyleSheet(outputs.vsw[31] ? CSWITCH_ON : CSWITCH_OFF); - } - if (outputs.beep) { - beepVal = outputs.beep; - beepShow=20; - } -} - -void simulatorDialog::setupSticks() -{ - QGraphicsScene *leftScene = new QGraphicsScene(ui->leftStick); - leftScene->setItemIndexMethod(QGraphicsScene::NoIndex); - ui->leftStick->setScene(leftScene); - - // ui->leftStick->scene()->addLine(0,10,20,30); - - QGraphicsScene *rightScene = new QGraphicsScene(ui->rightStick); - rightScene->setItemIndexMethod(QGraphicsScene::NoIndex); - ui->rightStick->setScene(rightScene); - - // ui->rightStick->scene()->addLine(0,10,20,30); - - nodeLeft = new Node(); - nodeLeft->setPos(-GBALL_SIZE/2,-GBALL_SIZE/2); - nodeLeft->setBallSize(GBALL_SIZE); - leftScene->addItem(nodeLeft); - - nodeRight = new Node(); - nodeRight->setPos(-GBALL_SIZE/2,-GBALL_SIZE/2); - nodeRight->setBallSize(GBALL_SIZE); - rightScene->addItem(nodeRight); -} - -void simulatorDialog::resizeEvent(QResizeEvent *event) -{ - - if(ui->leftStick->scene()) - { - QRect qr = ui->leftStick->contentsRect(); - qreal w = (qreal)qr.width() - GBALL_SIZE; - qreal h = (qreal)qr.height() - GBALL_SIZE; - qreal cx = (qreal)qr.width()/2; - qreal cy = (qreal)qr.height()/2; - ui->leftStick->scene()->setSceneRect(-cx,-cy,w,h); - - QPointF p = nodeLeft->pos(); - p.setX(qMin(cx, qMax(p.x(), -cx))); - p.setY(qMin(cy, qMax(p.y(), -cy))); - nodeLeft->setPos(p); - } - - if(ui->rightStick->scene()) - { - QRect qr = ui->rightStick->contentsRect(); - qreal w = (qreal)qr.width() - GBALL_SIZE; - qreal h = (qreal)qr.height() - GBALL_SIZE; - qreal cx = (qreal)qr.width()/2; - qreal cy = (qreal)qr.height()/2; - ui->rightStick->scene()->setSceneRect(-cx,-cy,w,h); - - QPointF p = nodeRight->pos(); - p.setX(qMin(cx, qMax(p.x(), -cx))); - p.setY(qMin(cy, qMax(p.y(), -cy))); - nodeRight->setPos(p); - } - QDialog::resizeEvent(event); -} - -void simulatorDialog::on_holdLeftX_clicked(bool checked) -{ - nodeLeft->setCenteringX(!checked); -} - -void simulatorDialog::on_holdLeftY_clicked(bool checked) -{ - nodeLeft->setCenteringY(!checked); -} - -void simulatorDialog::on_holdRightX_clicked(bool checked) -{ - nodeRight->setCenteringX(!checked); -} - -void simulatorDialog::on_holdRightY_clicked(bool checked) -{ - nodeRight->setCenteringY(!checked); -} - - -void simulatorDialog::on_FixLeftX_clicked(bool checked) -{ - nodeLeft->setFixedX(checked); -} - -void simulatorDialog::on_FixLeftY_clicked(bool checked) -{ - nodeLeft->setFixedY(checked); -} - -void simulatorDialog::on_FixRightX_clicked(bool checked) -{ - nodeRight->setFixedX(checked); -} - -void simulatorDialog::on_FixRightY_clicked(bool checked) -{ - nodeRight->setFixedY(checked); -} - -#ifdef JOYSTICKS -void simulatorDialog::onjoystickAxisValueChanged(int axis, int value) { - int stick; - if (axis>=0 && axis<8) { - stick=jsmap[axis]; - int stickval; - if (value>jscal[axis][1]) { - if ((jscal[axis][2]-jscal[axis][1])==0) - return; - stickval=(1024*(value-jscal[axis][1]))/(jscal[axis][2]-jscal[axis][1]); - } - else { - if ((jscal[axis][1]-jscal[axis][0])==0) - return; - stickval=(1024*(value-jscal[axis][1]))/(jscal[axis][1]-jscal[axis][0]); - } - if (jscal[axis][3]==1) { - stickval*=-1; - } - if (stick==1 || stick==2) { - float currX=nodeRight->getX(); - float currY=nodeRight->getY(); - if (stick==1 ) { - nodeRight->setPos(currX*100-10,-stickval*100/1024-10); - } - if (stick==2) { - nodeRight->setPos(stickval*100/1024-10,currY*100-10); - } - } else if (stick==3 || stick==4) { - float currX=nodeLeft->getX(); - float currY=nodeLeft->getY(); - if (stick==3) { - nodeLeft->setPos(currX*100-10,-stickval*100/1024-10); - } - if (stick==4) { - nodeLeft->setPos(stickval*100/1024-10,currY*100-10); - } - } - - - if (stick==5) { - ui->dialP_1->setValue(stickval); - } - if (stick==6) { - ui->dialP_2->setValue(stickval); - } - if (stick==7) { - ui->dialP_3->setValue(stickval); - } - } -} -#endif diff --git a/companion/src/simulatordialog.h b/companion/src/simulatordialog.h deleted file mode 100644 index 65edcb9e5..000000000 --- a/companion/src/simulatordialog.h +++ /dev/null @@ -1,118 +0,0 @@ -#ifndef SIMULATORDIALOG_H -#define SIMULATORDIALOG_H - -#include -#include "modeledit/node.h" -#include "eeprominterface.h" -#ifdef JOYSTICKS -#include "joystick.h" -#endif - -#define TMR_OFF 0 -#define TMR_RUNNING 1 -#define TMR_BEEPING 2 -#define TMR_STOPPED 3 - -#define FLASH_DURATION 10 - -namespace Ui { - class simulatorDialog; -} - -class simulatorDialog : public QDialog -{ - Q_OBJECT - -public: - explicit simulatorDialog(QWidget *parent = 0); - ~simulatorDialog(); - - void loadParams(RadioData &radioData, const int model_idx=-1); - -private: - Ui::simulatorDialog *ui; - Node *nodeLeft; - Node *nodeRight; - QTimer *timer; - QString windowName; - int backLight; - bool lightOn; - int switches; -#ifdef JOYSTICKS - Joystick *joystick; - int jscal[8][4]; - int jsmap[8]; -#endif - - - /* quint16 s_timeCumTot; - quint16 s_timeCumAbs; - quint16 s_timeCumSw; - quint16 s_timeCumThr; - quint16 s_timeCum16ThrP; - quint8 s_timerState; - quint8 beepAgain; - quint16 g_LightOffCounter; - qint16 s_timerVal; - quint16 s_time; - quint16 s_cnt; - quint16 s_sum; - quint8 sw_toggled; */ - - EEPROMInterface *txInterface; - SimulatorInterface *simulator; - RadioData g_radioData; - int g_modelIdx; - - void setupSticks(); - void setupTimer(); - void resizeEvent(QResizeEvent *event = 0); - - void getValues(); - void setValues(); - void centerSticks(); - // void timerTick(); - - bool keyState(EnumKeys key); - int getValue(qint8 i); - bool getSwitch(int swtch, bool nc, qint8 level=0); - void setTrims(); - - int beepVal; - int beepShow; - -protected: - virtual void closeEvent(QCloseEvent *); - virtual void mousePressEvent(QMouseEvent *); - virtual void mouseReleaseEvent(QMouseEvent *); - virtual void wheelEvent(QWheelEvent *); - virtual void keyPressEvent(QKeyEvent *); - virtual void keyReleaseEvent(QKeyEvent *); - static int screenshotIdx; - static uint32_t switchstatus; - int buttonPressed; - bool middleButtonPressed; - -private slots: - void onButtonPressed(int value); - void on_FixRightY_clicked(bool checked); - void on_FixRightX_clicked(bool checked); - void on_FixLeftY_clicked(bool checked); - void on_FixLeftX_clicked(bool checked); - void on_holdRightY_clicked(bool checked); - void on_holdRightX_clicked(bool checked); - void on_holdLeftY_clicked(bool checked); - void on_holdLeftX_clicked(bool checked); - void on_trimHLeft_valueChanged(int); - void on_trimVLeft_valueChanged(int); - void on_trimHRight_valueChanged(int); - void on_trimVRight_valueChanged(int); - void onTimerEvent(); - void dialChanged(); -#ifdef JOYSTICKS - void onjoystickAxisValueChanged(int axis, int value); -#endif - -}; - -#endif // SIMULATORDIALOG_H diff --git a/companion/src/simulatordialog.ui b/companion/src/simulatordialog.ui deleted file mode 100644 index a739492ac..000000000 --- a/companion/src/simulatordialog.ui +++ /dev/null @@ -1,3719 +0,0 @@ - - - simulatorDialog - - - - 0 - 0 - 653 - 590 - - - - - 0 - 0 - - - - - 739 - 16777215 - - - - Companion Simulator - - - - :/images/simulate.png:/images/simulate.png - - - - 5 - - - 0 - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 5 - - - 6 - - - - - - - Right Double Click to Reset - - - -125 - - - 125 - - - Qt::Vertical - - - - - - - - 220 - 220 - - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - - - - - 0 - - - - - - 8 - - - - false - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - THR - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - RUD - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - ELE - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - AIL - - - true - - - - - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - Hold X - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - Fix X - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - Fix Y - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - Hold Y - - - true - - - - - - - - - 20 - - - 20 - - - - - TextLabel - - - Qt::AlignCenter - - - - - - - TextLabel - - - Qt::AlignCenter - - - - - - - - - Right Double Click to Reset - - - -125 - - - 125 - - - Qt::Horizontal - - - - - - - - - - - Right Double Click to Reset - - - -125 - - - 125 - - - Qt::Vertical - - - - - - - - 220 - 220 - - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:pressed { - background-color: #4CC417; - border-style: inset; - } - - - TRN - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - GEA - - - true - - - false - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - ID0 - - - true - - - true - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - ID1 - - - true - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - ID2 - - - true - - - true - - - - - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - Hold X - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - Fix X - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - Fix Y - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - Hold Y - - - true - - - - - - - - - 20 - - - 20 - - - - - TextLabel - - - Qt::AlignCenter - - - - - - - TextLabel - - - Qt::AlignCenter - - - - - - - - - Right Double Click to Reset - - - -125 - - - 125 - - - Qt::Horizontal - - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - BEEP - - - Qt::AlignCenter - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - 0 - 0 - - - - - 50 - 50 - - - - P1 - - - -1024 - - - 1024 - - - 128 - - - 64.000000000000000 - - - true - - - - - - - 0 % - - - Qt::AlignCenter - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - 0 - 0 - - - - - 50 - 50 - - - - P2 - - - -1024 - - - 1024 - - - 128 - - - false - - - 64.000000000000000 - - - true - - - - - - - 0 % - - - Qt::AlignCenter - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - 0 - 0 - - - - - 50 - 50 - - - - P3 - - - -1024 - - - 1024 - - - 128 - - - 64.000000000000000 - - - true - - - - - - - 0 % - - - Qt::AlignCenter - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 570 - 5 - - - - - - - - true - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - 0 - - - - 9x Simulator - - - - - - QLayout::SetMinimumSize - - - 0 - - - - - - 0 - 0 - - - - - 256 - 29 - - - - background:url(:/images/9xdt.png) - - - - - - - - 0 - 0 - - - - - 41 - 186 - - - - background:url(:/images/9xdl.png) - - - - - - - - - - 0 - 0 - - - - - 89 - 186 - - - - background:url(:/images/9xmenu.png) - - - - - - - - 0 - 0 - - - - - 256 - 128 - - - - - - - - - 0 - 0 - - - - - 256 - 29 - - - - background:url(:/images/9xdb.png) - - - - - - - - 0 - 0 - - - - - 128 - 186 - - - - true - - - background:url(:/images/9xcurs.png); - - - - - - - - 0 - 0 - - - - - 55 - 186 - - - - background:url(:/images/9xdr.png) - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Horizontal - - - - 438 - 6 - - - - - - - - - - - Outputs - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS1 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS2 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS3 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS4 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS5 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS6 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS7 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS8 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS9 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSA - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSB - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSC - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSD - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSE - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSF - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSG - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSH - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSI - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - - - 2 - - - - 2 - - - - - CSJ - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSK - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSL - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSM - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSN - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSO - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSP - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSQ - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSR - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSS - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CST - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSU - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSV - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSW - - - Qt::AlignCenter - - - - - - - - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - - 0 - 0 - - - - - - - CH1 - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - CH9 - - - - - - - - 0 - 0 - - - - CH2 - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - CH10 - - - - - - - - 0 - 0 - - - - CH3 - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - CH11 - - - - - - - - 0 - 0 - - - - CH4 - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - CH12 - - - - - - - - 0 - 0 - - - - CH5 - - - - - - - false - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - CH13 - - - - - - - - 0 - 0 - - - - CH6 - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - CH14 - - - - - - - - 0 - 0 - - - - CH7 - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - CH15 - - - - - - - - 0 - 0 - - - - CH8 - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - CH16 - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - - - - - - - lcdWidget - QWidget -
lcdwidget.h
- 1 -
- - cursorWidget - QWidget -
cursorwidget.h
- 1 -
- - menuWidget - QWidget -
menuwidget.h
- 1 -
- - mySlider - QSlider -
myslider.h
-
-
- - - - -
diff --git a/companion/src/splashlabel.h b/companion/src/splashlabel.h index a724d2c8c..d82b23e4f 100644 --- a/companion/src/splashlabel.h +++ b/companion/src/splashlabel.h @@ -14,7 +14,7 @@ * */ #ifndef SPLASHLABEL_H -#define SPLASHLABEL_H +#define SPLASHLABEL_H #include #include @@ -77,5 +77,5 @@ signals: private: int index; }; -#endif /* SPLASHLABEL_H */ +#endif /* SPLASHLABEL_H */ diff --git a/companion/src/splashlibrary.cpp b/companion/src/splashlibrary.cpp index 9e5a7cc82..d35dd48a6 100644 --- a/companion/src/splashlibrary.cpp +++ b/companion/src/splashlibrary.cpp @@ -1,14 +1,17 @@ #include "splashlibrary.h" #include "ui_splashlibrary.h" - +#include "appdata.h" #include #include "helpers.h" -//#include "splashlabel.h" #include "flashinterface.h" +#include "helpers.h" splashLibrary::splashLibrary(QWidget *parent, QString * fileName) : QDialog(parent), ui(new Ui::splashLibrary) { splashFileName = fileName; ui->setupUi(this); + this->setWindowIcon(CompanionIcon("library.png")); + ui->nextPage->setIcon(CompanionIcon("arrow-right.png")); + ui->prevPage->setIcon(CompanionIcon("arrow-left.png")); page = 0; getFileList(); if (imageList.size() > 20) { @@ -19,7 +22,6 @@ splashLibrary::splashLibrary(QWidget *parent, QString * fileName) : QDialog(pare foreach(splashLabel *sl, findChildren()) { connect(sl, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int))); } - resize(0, 0); } splashLibrary::~splashLibrary() { @@ -36,7 +38,7 @@ void splashLibrary::setupPage(int page) { if ((i + 20 * page) < imageList.size()) { QImage image(imageList.at(i + 20 * page)); if (!image.isNull()) { - sl[i]->setPixmap(QPixmap::fromImage(image.scaled(SPLASH_WIDTH, SPLASH_HEIGHT).convertToFormat(QImage::Format_Mono))); + sl[i]->setPixmap(makePixMap(image, g.profile[g.id()].fwType())); sl[i]->setEnabled(true); sl[i]->setId((i + 20 * page)); sl[i]->setStyleSheet("border:1px solid; border-color:#999999;"); @@ -59,9 +61,8 @@ void splashLibrary::setupPage(int page) { } void splashLibrary::getFileList() { - QSettings settings("companion", "companion"); imageList.clear(); - if (settings.value("embedded_splashes", 0).toInt() == 0) { + if (g.embedSplashes()) { QDir myRes(":/images/library"); QStringList tmp = myRes.entryList(); for (int i = 0; i < tmp.size(); i++) { @@ -69,7 +70,7 @@ void splashLibrary::getFileList() { imageList.append(":/images/library/" + fileInfo.fileName()); } } - QString libraryPath = settings.value("libraryPath", "").toString(); + QString libraryPath = g.libDir(); if (!libraryPath.isEmpty()) { if (QDir(libraryPath).exists()) { QStringList supportedImageFormats; @@ -101,10 +102,6 @@ void splashLibrary::getFileList() { } } -void splashLibrary::shrink() { - resize(0, 0); -} - void splashLibrary::dclose() { close(); } diff --git a/companion/src/splashlibrary.h b/companion/src/splashlibrary.h index 9da9d58e4..0d9123a74 100644 --- a/companion/src/splashlibrary.h +++ b/companion/src/splashlibrary.h @@ -17,7 +17,6 @@ public: ~splashLibrary(); private slots: - void shrink() ; void dclose(); void onButtonPressed(int button); void on_nextPage_clicked(); diff --git a/companion/src/splashlibrary.ui b/companion/src/splashlibrary.ui index 8c5bcaf1d..5ce1e2502 100644 --- a/companion/src/splashlibrary.ui +++ b/companion/src/splashlibrary.ui @@ -6,22 +6,16 @@ 0 0 - 662 - 356 + 650 + 374 - + 0 0 - - - 662 - 356 - - @@ -39,17 +33,19 @@ - 50 + 34 0 + + + 34 + 16777215 + + ... - - - :/images/arrow-left.png:/images/arrow-left.png - 50 @@ -58,12 +54,15 @@
- + + + QLayout::SetNoConstraint + - + 0 0 @@ -76,7 +75,7 @@ - 130 + 214 66 @@ -109,7 +108,7 @@ - + 0 0 @@ -117,55 +116,12 @@ 130 - 66 + 0 - 130 - 66 - - - - true - - - border:1px; - - - QFrame::Panel - - - QFrame::Plain - - - 0 - - - - - - true - - - - - - - - 0 - 0 - - - - - 130 - 66 - - - - - 130 + 214 66 @@ -195,7 +151,7 @@ - + 0 0 @@ -203,12 +159,12 @@ 130 - 66 + 0 - 130 + 214 66 @@ -238,20 +194,20 @@ - + 0 0 - 130 + 0 66 - 130 + 214 66 @@ -281,20 +237,14 @@ - + 0 0 - - - 130 - 66 - - - 130 + 214 66 @@ -324,20 +274,14 @@ - + 0 0 - - - 130 - 66 - - - 130 + 214 66 @@ -367,20 +311,14 @@ - + 0 0 - - - 130 - 66 - - - 130 + 214 66 @@ -410,20 +348,20 @@ - + 0 0 - 130 + 0 66 - 130 + 214 66 @@ -453,20 +391,14 @@ - + 0 0 - - - 130 - 66 - - - 130 + 214 66 @@ -496,20 +428,14 @@ - + 0 0 - - - 130 - 66 - - - 130 + 214 66 @@ -539,20 +465,14 @@ - + 0 0 - - - 130 - 66 - - - 130 + 214 66 @@ -582,20 +502,20 @@ - + 0 0 - 130 + 0 66 - 130 + 214 66 @@ -625,20 +545,14 @@ - + 0 0 - - - 130 - 66 - - - 130 + 214 66 @@ -668,20 +582,14 @@ - + 0 0 - - - 130 - 66 - - - 130 + 214 66 @@ -711,20 +619,14 @@ - + 0 0 - - - 130 - 66 - - - 130 + 214 66 @@ -754,20 +656,20 @@ - + 0 0 - 130 + 0 66 - 130 + 214 66 @@ -797,20 +699,14 @@ - + 0 0 - - - 130 - 66 - - - 130 + 214 66 @@ -840,20 +736,14 @@ - + 0 0 - - - 130 - 66 - - - 130 + 214 66 @@ -883,7 +773,44 @@ - + + 0 + 0 + + + + + 214 + 66 + + + + true + + + border:1px; + + + QFrame::Panel + + + QFrame::Plain + + + 0 + + + + + + true + + + + + + + 0 0 @@ -891,12 +818,12 @@ 130 - 66 + 0 - 130 + 214 66 @@ -925,7 +852,7 @@ - + false @@ -938,17 +865,19 @@ - 50 + 34 0 + + + 34 + 16777215 + + ... - - - :/images/arrow-right.png:/images/arrow-right.png - 50 @@ -957,6 +886,32 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + +
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/apppreferences.png b/companion/src/themes/classic/16/apppreferences.png new file mode 100644 index 000000000..dae98ee8a Binary files /dev/null and b/companion/src/themes/classic/16/apppreferences.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/fwpreferences.png b/companion/src/themes/classic/16/fwpreferences.png new file mode 100644 index 000000000..e7a8ea790 Binary files /dev/null and b/companion/src/themes/classic/16/fwpreferences.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/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/apppreferences.png b/companion/src/themes/classic/24/apppreferences.png new file mode 100644 index 000000000..ebca2028c Binary files /dev/null and b/companion/src/themes/classic/24/apppreferences.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/fwpreferences.png b/companion/src/themes/classic/24/fwpreferences.png new file mode 100644 index 000000000..e62900a4a Binary files /dev/null and b/companion/src/themes/classic/24/fwpreferences.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/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/apppreferences.png b/companion/src/themes/classic/32/apppreferences.png new file mode 100644 index 000000000..a9cee976b Binary files /dev/null and b/companion/src/themes/classic/32/apppreferences.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/fwpreferences.png b/companion/src/themes/classic/32/fwpreferences.png new file mode 100644 index 000000000..42e933b33 Binary files /dev/null and b/companion/src/themes/classic/32/fwpreferences.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/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/apppreferences.png b/companion/src/themes/classic/48/apppreferences.png new file mode 100644 index 000000000..713e2cbeb Binary files /dev/null and b/companion/src/themes/classic/48/apppreferences.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/fwpreferences.png b/companion/src/themes/classic/48/fwpreferences.png new file mode 100644 index 000000000..4198f7553 Binary files /dev/null and b/companion/src/themes/classic/48/fwpreferences.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/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/apppreferences.png b/companion/src/themes/monoblue/16/apppreferences.png new file mode 100644 index 000000000..566b610b2 Binary files /dev/null and b/companion/src/themes/monoblue/16/apppreferences.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/fwpreferences.png b/companion/src/themes/monoblue/16/fwpreferences.png new file mode 100644 index 000000000..8a1f61836 Binary files /dev/null and b/companion/src/themes/monoblue/16/fwpreferences.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/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/apppreferences.png b/companion/src/themes/monoblue/24/apppreferences.png new file mode 100644 index 000000000..91ff56782 Binary files /dev/null and b/companion/src/themes/monoblue/24/apppreferences.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/fwpreferences.png b/companion/src/themes/monoblue/24/fwpreferences.png new file mode 100644 index 000000000..bf73ffb32 Binary files /dev/null and b/companion/src/themes/monoblue/24/fwpreferences.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/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/apppreferences.png b/companion/src/themes/monoblue/32/apppreferences.png new file mode 100644 index 000000000..dbeafbc37 Binary files /dev/null and b/companion/src/themes/monoblue/32/apppreferences.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/fwpreferences.png b/companion/src/themes/monoblue/32/fwpreferences.png new file mode 100644 index 000000000..f86c56917 Binary files /dev/null and b/companion/src/themes/monoblue/32/fwpreferences.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/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/apppreferences.png b/companion/src/themes/monoblue/48/apppreferences.png new file mode 100644 index 000000000..3b4d91a3b Binary files /dev/null and b/companion/src/themes/monoblue/48/apppreferences.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/fwpreferences.png b/companion/src/themes/monoblue/48/fwpreferences.png new file mode 100644 index 000000000..09505a474 Binary files /dev/null and b/companion/src/themes/monoblue/48/fwpreferences.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/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/apppreferences.png b/companion/src/themes/monochrome/16/apppreferences.png new file mode 100644 index 000000000..7b6770309 Binary files /dev/null and b/companion/src/themes/monochrome/16/apppreferences.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/fwpreferences.png b/companion/src/themes/monochrome/16/fwpreferences.png new file mode 100644 index 000000000..63fb581eb Binary files /dev/null and b/companion/src/themes/monochrome/16/fwpreferences.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/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/apppreferences.png b/companion/src/themes/monochrome/24/apppreferences.png new file mode 100644 index 000000000..b5d585d1e Binary files /dev/null and b/companion/src/themes/monochrome/24/apppreferences.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/fwpreferences.png b/companion/src/themes/monochrome/24/fwpreferences.png new file mode 100644 index 000000000..2d322e73d Binary files /dev/null and b/companion/src/themes/monochrome/24/fwpreferences.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/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/apppreferences.png b/companion/src/themes/monochrome/32/apppreferences.png new file mode 100644 index 000000000..d2ba00eaa Binary files /dev/null and b/companion/src/themes/monochrome/32/apppreferences.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/fwpreferences.png b/companion/src/themes/monochrome/32/fwpreferences.png new file mode 100644 index 000000000..17d781fb3 Binary files /dev/null and b/companion/src/themes/monochrome/32/fwpreferences.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/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/apppreferences.png b/companion/src/themes/monochrome/48/apppreferences.png new file mode 100644 index 000000000..8f1199953 Binary files /dev/null and b/companion/src/themes/monochrome/48/apppreferences.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/fwpreferences.png b/companion/src/themes/monochrome/48/fwpreferences.png new file mode 100644 index 000000000..aed3ed5ef Binary files /dev/null and b/companion/src/themes/monochrome/48/fwpreferences.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/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..e2cb16737 Binary files /dev/null and b/companion/src/themes/monowhite/16/add.png differ diff --git a/companion/src/themes/monowhite/16/apppreferences.png b/companion/src/themes/monowhite/16/apppreferences.png new file mode 100644 index 000000000..7b6770309 Binary files /dev/null and b/companion/src/themes/monowhite/16/apppreferences.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..df382a723 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..c2cf8ab8b 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..e1eba6ff6 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..3d142f8af 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..553ddaa10 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..6a3295aab 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..ca7664737 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..ffb5ad2f9 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..2f9d72888 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..b590d2f13 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..e2f532dfb 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..f4786d4b0 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..b2b3c569c 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..521de6d3a Binary files /dev/null and b/companion/src/themes/monowhite/16/fuses.png differ diff --git a/companion/src/themes/monowhite/16/fwpreferences.png b/companion/src/themes/monowhite/16/fwpreferences.png new file mode 100644 index 000000000..63fb581eb Binary files /dev/null and b/companion/src/themes/monowhite/16/fwpreferences.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..d7016086e 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..62b811606 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..5e71cd167 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..0cc2864d4 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..ed017edfb 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..0430b1a8e 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..34930ebba 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..4ee6b1cbd 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..4333818ef 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..e5d50479d 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..d4720f2d8 Binary files /dev/null and b/companion/src/themes/monowhite/16/play.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..39191c939 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..01b13e3c7 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..b58582958 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..214e82c4d 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..530c62174 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..d3cf237f5 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..dbf6d8695 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..791c7be33 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..5ce854790 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..42610e416 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..31b90cf36 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..d1301c613 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..6815c7668 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..a7e7c36f8 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..81cdccdbc 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..6ca6fad8b Binary files /dev/null and b/companion/src/themes/monowhite/24/add.png differ diff --git a/companion/src/themes/monowhite/24/apppreferences.png b/companion/src/themes/monowhite/24/apppreferences.png new file mode 100644 index 000000000..c08987642 Binary files /dev/null and b/companion/src/themes/monowhite/24/apppreferences.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..ae050e675 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..6c1ce6b77 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..456160d83 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..64a23752d 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..d56fa1116 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..ad431d59f 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..a5fb08873 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..09063a0d0 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..dc2ed26e1 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..68fa0ee49 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..367f931f1 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..0f5ddf04f 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..6940f1534 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..0b00dcf56 Binary files /dev/null and b/companion/src/themes/monowhite/24/fuses.png differ diff --git a/companion/src/themes/monowhite/24/fwpreferences.png b/companion/src/themes/monowhite/24/fwpreferences.png new file mode 100644 index 000000000..5a337c654 Binary files /dev/null and b/companion/src/themes/monowhite/24/fwpreferences.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..d08603e7d 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..bf2869b45 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..4ced8a69f 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..6297517b2 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..1110545aa 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..1c9f4d9d6 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..7f20e1049 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..ed4759765 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..9ce5d2435 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..e4ed5b989 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..1fc7079ab Binary files /dev/null and b/companion/src/themes/monowhite/24/play.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..6826507cb 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..259727fd0 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..6c99de805 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..bd203689c 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..020e56684 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..1aff5f44a 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..938c53959 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..31c3bfb73 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..12eec8c6a 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..4b1da49b0 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..baf7f5ba2 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..88e5941d7 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..6a82777ad 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..7cb6182bb 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..9103fc23e 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..13447d37e Binary files /dev/null and b/companion/src/themes/monowhite/32/add.png differ diff --git a/companion/src/themes/monowhite/32/apppreferences.png b/companion/src/themes/monowhite/32/apppreferences.png new file mode 100644 index 000000000..d6134a847 Binary files /dev/null and b/companion/src/themes/monowhite/32/apppreferences.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..060c33ea9 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..0375c2026 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..e547df71e 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..9449dfe4f 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..90cec9602 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..3ba9a08b4 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..c9cd49ff1 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..5499776ec 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..9868bfdf2 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..985993e04 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..2484c87a7 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..c5b4d36f5 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..bc7b0b16f 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..940fc2c91 Binary files /dev/null and b/companion/src/themes/monowhite/32/fuses.png differ diff --git a/companion/src/themes/monowhite/32/fwpreferences.png b/companion/src/themes/monowhite/32/fwpreferences.png new file mode 100644 index 000000000..0982e5c48 Binary files /dev/null and b/companion/src/themes/monowhite/32/fwpreferences.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..ac1591066 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..bec53f490 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..ba08fe0be 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..a234b09cf 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..0f8c0c6fe 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..adeb2f651 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..324d274c3 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..3ae76d223 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..04e19c28a 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..c1c049a28 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..c42949fab Binary files /dev/null and b/companion/src/themes/monowhite/32/play.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..b7cc71425 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..49aa0f929 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..926fa49ac 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..ce28b5565 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..4fb96674a 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..c44509b05 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..166b9a40c 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..aea4d8850 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..de935c6a5 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..b529d5cc0 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..9c7fcee0e 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..732b57421 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..b07c6e03f 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..192df62e7 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..eeba1bc9c 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..cc8812cf4 Binary files /dev/null and b/companion/src/themes/monowhite/48/add.png differ diff --git a/companion/src/themes/monowhite/48/apppreferences.png b/companion/src/themes/monowhite/48/apppreferences.png new file mode 100644 index 000000000..f0d8136c0 Binary files /dev/null and b/companion/src/themes/monowhite/48/apppreferences.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..b571db825 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..233997acf 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..454dd7ad0 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..e09993be5 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..6f07fcc8a 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..f4ba9449f 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..4c59eaeef 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..f2f6d533b 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..7002db951 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..34462d12d 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..44c8fe5cd 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..4fa0accd5 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..2b4be6230 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..c246f6c02 Binary files /dev/null and b/companion/src/themes/monowhite/48/fuses.png differ diff --git a/companion/src/themes/monowhite/48/fwpreferences.png b/companion/src/themes/monowhite/48/fwpreferences.png new file mode 100644 index 000000000..cf61a3ade Binary files /dev/null and b/companion/src/themes/monowhite/48/fwpreferences.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..90b518899 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..35b42d937 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..e603c79da 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..300d7c774 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..0b7a36667 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..f219acca8 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..d5c749528 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..a06e13571 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..186cc1768 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..d912c3963 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..fb1ee191f Binary files /dev/null and b/companion/src/themes/monowhite/48/play.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..37c2d1185 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..781f883d2 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..85ede191e 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..e85724d00 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..d9fc13673 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..90c3b1e1d 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..e29b45ab3 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..cb5c738ad 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..c5ebb9504 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..028180e0f 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..1368d4b4d 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..17e476414 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..b406ca98a 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..d22daf82f 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..0c4594941 Binary files /dev/null and b/companion/src/themes/monowhite/48/write_flash.png differ diff --git a/companion/src/themes/yerico/16/add.png b/companion/src/themes/yerico/16/add.png new file mode 100644 index 000000000..b23673825 Binary files /dev/null and b/companion/src/themes/yerico/16/add.png differ diff --git a/companion/src/themes/yerico/16/apppreferences.png b/companion/src/themes/yerico/16/apppreferences.png new file mode 100644 index 000000000..eec3a9bab Binary files /dev/null and b/companion/src/themes/yerico/16/apppreferences.png differ diff --git a/companion/src/themes/yerico/16/arrow-left.png b/companion/src/themes/yerico/16/arrow-left.png new file mode 100644 index 000000000..a1b3d0964 Binary files /dev/null and b/companion/src/themes/yerico/16/arrow-left.png differ diff --git a/companion/src/themes/yerico/16/arrow-right.png b/companion/src/themes/yerico/16/arrow-right.png new file mode 100644 index 000000000..1311fb52f Binary files /dev/null and b/companion/src/themes/yerico/16/arrow-right.png differ diff --git a/companion/src/themes/yerico/16/changelog.png b/companion/src/themes/yerico/16/changelog.png new file mode 100644 index 000000000..9e4e6ae57 Binary files /dev/null and b/companion/src/themes/yerico/16/changelog.png differ diff --git a/companion/src/themes/yerico/16/clear.png b/companion/src/themes/yerico/16/clear.png new file mode 100644 index 000000000..0a8c6dcc9 Binary files /dev/null and b/companion/src/themes/yerico/16/clear.png differ diff --git a/companion/src/themes/yerico/16/compare.png b/companion/src/themes/yerico/16/compare.png new file mode 100644 index 000000000..3c66fa8d1 Binary files /dev/null and b/companion/src/themes/yerico/16/compare.png differ diff --git a/companion/src/themes/yerico/16/configure.png b/companion/src/themes/yerico/16/configure.png new file mode 100644 index 000000000..a25340787 Binary files /dev/null and b/companion/src/themes/yerico/16/configure.png differ diff --git a/companion/src/themes/yerico/16/contributors.png b/companion/src/themes/yerico/16/contributors.png new file mode 100644 index 000000000..d9091a350 Binary files /dev/null and b/companion/src/themes/yerico/16/contributors.png differ diff --git a/companion/src/themes/yerico/16/copy.png b/companion/src/themes/yerico/16/copy.png new file mode 100644 index 000000000..39fd9415e Binary files /dev/null and b/companion/src/themes/yerico/16/copy.png differ diff --git a/companion/src/themes/yerico/16/currentmodel.png b/companion/src/themes/yerico/16/currentmodel.png new file mode 100644 index 000000000..6ea21cb4c Binary files /dev/null and b/companion/src/themes/yerico/16/currentmodel.png differ diff --git a/companion/src/themes/yerico/16/cut.png b/companion/src/themes/yerico/16/cut.png new file mode 100644 index 000000000..a24850323 Binary files /dev/null and b/companion/src/themes/yerico/16/cut.png differ diff --git a/companion/src/themes/yerico/16/duplicate.png b/companion/src/themes/yerico/16/duplicate.png new file mode 100644 index 000000000..90c7319e5 Binary files /dev/null and b/companion/src/themes/yerico/16/duplicate.png differ diff --git a/companion/src/themes/yerico/16/edit.png b/companion/src/themes/yerico/16/edit.png new file mode 100644 index 000000000..2157aca27 Binary files /dev/null and b/companion/src/themes/yerico/16/edit.png differ diff --git a/companion/src/themes/yerico/16/exit.png b/companion/src/themes/yerico/16/exit.png new file mode 100644 index 000000000..0bbf02d0e Binary files /dev/null and b/companion/src/themes/yerico/16/exit.png differ diff --git a/companion/src/themes/yerico/16/fuses.png b/companion/src/themes/yerico/16/fuses.png new file mode 100644 index 000000000..512a067ed Binary files /dev/null and b/companion/src/themes/yerico/16/fuses.png differ diff --git a/companion/src/themes/yerico/16/fwpreferences.png b/companion/src/themes/yerico/16/fwpreferences.png new file mode 100644 index 000000000..bc22a9f16 Binary files /dev/null and b/companion/src/themes/yerico/16/fwpreferences.png differ diff --git a/companion/src/themes/yerico/16/information.png b/companion/src/themes/yerico/16/information.png new file mode 100644 index 000000000..381173a58 Binary files /dev/null and b/companion/src/themes/yerico/16/information.png differ diff --git a/companion/src/themes/yerico/16/library.png b/companion/src/themes/yerico/16/library.png new file mode 100644 index 000000000..2d8fd6f59 Binary files /dev/null and b/companion/src/themes/yerico/16/library.png differ diff --git a/companion/src/themes/yerico/16/list.png b/companion/src/themes/yerico/16/list.png new file mode 100644 index 000000000..6bac38a45 Binary files /dev/null and b/companion/src/themes/yerico/16/list.png differ diff --git a/companion/src/themes/yerico/16/logs.png b/companion/src/themes/yerico/16/logs.png new file mode 100644 index 000000000..76fc4ff0d Binary files /dev/null and b/companion/src/themes/yerico/16/logs.png differ diff --git a/companion/src/themes/yerico/16/movedown.png b/companion/src/themes/yerico/16/movedown.png new file mode 100644 index 000000000..1bf6d77a9 Binary files /dev/null and b/companion/src/themes/yerico/16/movedown.png differ diff --git a/companion/src/themes/yerico/16/moveup.png b/companion/src/themes/yerico/16/moveup.png new file mode 100644 index 000000000..0bf5d5fc8 Binary files /dev/null and b/companion/src/themes/yerico/16/moveup.png differ diff --git a/companion/src/themes/yerico/16/new.png b/companion/src/themes/yerico/16/new.png new file mode 100644 index 000000000..3dfa467fa Binary files /dev/null and b/companion/src/themes/yerico/16/new.png differ diff --git a/companion/src/themes/yerico/16/open.png b/companion/src/themes/yerico/16/open.png new file mode 100644 index 000000000..0c5311f59 Binary files /dev/null and b/companion/src/themes/yerico/16/open.png differ diff --git a/companion/src/themes/yerico/16/paintbrush.png b/companion/src/themes/yerico/16/paintbrush.png new file mode 100644 index 000000000..d113512ac Binary files /dev/null and b/companion/src/themes/yerico/16/paintbrush.png differ diff --git a/companion/src/themes/yerico/16/paste.png b/companion/src/themes/yerico/16/paste.png new file mode 100644 index 000000000..f45a3837a Binary files /dev/null and b/companion/src/themes/yerico/16/paste.png differ diff --git a/companion/src/themes/yerico/16/play.png b/companion/src/themes/yerico/16/play.png new file mode 100644 index 000000000..fdefe966b Binary files /dev/null and b/companion/src/themes/yerico/16/play.png differ diff --git a/companion/src/themes/yerico/16/print.png b/companion/src/themes/yerico/16/print.png new file mode 100644 index 000000000..f5f22ea39 Binary files /dev/null and b/companion/src/themes/yerico/16/print.png differ diff --git a/companion/src/themes/yerico/16/profiles.png b/companion/src/themes/yerico/16/profiles.png new file mode 100644 index 000000000..db68156bc Binary files /dev/null and b/companion/src/themes/yerico/16/profiles.png differ diff --git a/companion/src/themes/yerico/16/read_eeprom.png b/companion/src/themes/yerico/16/read_eeprom.png new file mode 100644 index 000000000..c94d3b766 Binary files /dev/null and b/companion/src/themes/yerico/16/read_eeprom.png differ diff --git a/companion/src/themes/yerico/16/read_eeprom_file.png b/companion/src/themes/yerico/16/read_eeprom_file.png new file mode 100644 index 000000000..42054a6f5 Binary files /dev/null and b/companion/src/themes/yerico/16/read_eeprom_file.png differ diff --git a/companion/src/themes/yerico/16/read_flash.png b/companion/src/themes/yerico/16/read_flash.png new file mode 100644 index 000000000..e9393135b Binary files /dev/null and b/companion/src/themes/yerico/16/read_flash.png differ diff --git a/companion/src/themes/yerico/16/recentdocument.png b/companion/src/themes/yerico/16/recentdocument.png new file mode 100644 index 000000000..eee942c2d Binary files /dev/null and b/companion/src/themes/yerico/16/recentdocument.png differ diff --git a/companion/src/themes/yerico/16/save.png b/companion/src/themes/yerico/16/save.png new file mode 100644 index 000000000..916eb37dd Binary files /dev/null and b/companion/src/themes/yerico/16/save.png differ diff --git a/companion/src/themes/yerico/16/saveas.png b/companion/src/themes/yerico/16/saveas.png new file mode 100644 index 000000000..b38228708 Binary files /dev/null and b/companion/src/themes/yerico/16/saveas.png differ diff --git a/companion/src/themes/yerico/16/simulate.png b/companion/src/themes/yerico/16/simulate.png new file mode 100644 index 000000000..64f07c6c7 Binary files /dev/null and b/companion/src/themes/yerico/16/simulate.png differ diff --git a/companion/src/themes/yerico/16/stop.png b/companion/src/themes/yerico/16/stop.png new file mode 100644 index 000000000..5c1c8a7df Binary files /dev/null and b/companion/src/themes/yerico/16/stop.png differ diff --git a/companion/src/themes/yerico/16/update.png b/companion/src/themes/yerico/16/update.png new file mode 100644 index 000000000..cfe85332d Binary files /dev/null and b/companion/src/themes/yerico/16/update.png differ diff --git a/companion/src/themes/yerico/16/wizard.png b/companion/src/themes/yerico/16/wizard.png new file mode 100644 index 000000000..9608315b6 Binary files /dev/null and b/companion/src/themes/yerico/16/wizard.png differ diff --git a/companion/src/themes/yerico/16/write_eeprom.png b/companion/src/themes/yerico/16/write_eeprom.png new file mode 100644 index 000000000..02a95a633 Binary files /dev/null and b/companion/src/themes/yerico/16/write_eeprom.png differ diff --git a/companion/src/themes/yerico/16/write_eeprom_file.png b/companion/src/themes/yerico/16/write_eeprom_file.png new file mode 100644 index 000000000..cf14db557 Binary files /dev/null and b/companion/src/themes/yerico/16/write_eeprom_file.png differ diff --git a/companion/src/themes/yerico/16/write_flash.png b/companion/src/themes/yerico/16/write_flash.png new file mode 100644 index 000000000..a4a85327c Binary files /dev/null and b/companion/src/themes/yerico/16/write_flash.png differ diff --git a/companion/src/themes/yerico/24/add.png b/companion/src/themes/yerico/24/add.png new file mode 100644 index 000000000..50dc863b9 Binary files /dev/null and b/companion/src/themes/yerico/24/add.png differ diff --git a/companion/src/themes/yerico/24/apppreferences.png b/companion/src/themes/yerico/24/apppreferences.png new file mode 100644 index 000000000..2e8de5c96 Binary files /dev/null and b/companion/src/themes/yerico/24/apppreferences.png differ diff --git a/companion/src/themes/yerico/24/arrow-left.png b/companion/src/themes/yerico/24/arrow-left.png new file mode 100644 index 000000000..9ad670cce Binary files /dev/null and b/companion/src/themes/yerico/24/arrow-left.png differ diff --git a/companion/src/themes/yerico/24/arrow-right.png b/companion/src/themes/yerico/24/arrow-right.png new file mode 100644 index 000000000..084d6597c Binary files /dev/null and b/companion/src/themes/yerico/24/arrow-right.png differ diff --git a/companion/src/themes/yerico/24/changelog.png b/companion/src/themes/yerico/24/changelog.png new file mode 100644 index 000000000..7f26eafcc Binary files /dev/null and b/companion/src/themes/yerico/24/changelog.png differ diff --git a/companion/src/themes/yerico/24/clear.png b/companion/src/themes/yerico/24/clear.png new file mode 100644 index 000000000..92d92c986 Binary files /dev/null and b/companion/src/themes/yerico/24/clear.png differ diff --git a/companion/src/themes/yerico/24/compare.png b/companion/src/themes/yerico/24/compare.png new file mode 100644 index 000000000..d2955dbeb Binary files /dev/null and b/companion/src/themes/yerico/24/compare.png differ diff --git a/companion/src/themes/yerico/24/configure.png b/companion/src/themes/yerico/24/configure.png new file mode 100644 index 000000000..867a98b7e Binary files /dev/null and b/companion/src/themes/yerico/24/configure.png differ diff --git a/companion/src/themes/yerico/24/contributors.png b/companion/src/themes/yerico/24/contributors.png new file mode 100644 index 000000000..0ba8ecfa5 Binary files /dev/null and b/companion/src/themes/yerico/24/contributors.png differ diff --git a/companion/src/themes/yerico/24/copy.png b/companion/src/themes/yerico/24/copy.png new file mode 100644 index 000000000..77b37481d Binary files /dev/null and b/companion/src/themes/yerico/24/copy.png differ diff --git a/companion/src/themes/yerico/24/currentmodel.png b/companion/src/themes/yerico/24/currentmodel.png new file mode 100644 index 000000000..91658fa44 Binary files /dev/null and b/companion/src/themes/yerico/24/currentmodel.png differ diff --git a/companion/src/themes/yerico/24/cut.png b/companion/src/themes/yerico/24/cut.png new file mode 100644 index 000000000..6578d29cc Binary files /dev/null and b/companion/src/themes/yerico/24/cut.png differ diff --git a/companion/src/themes/yerico/24/duplicate.png b/companion/src/themes/yerico/24/duplicate.png new file mode 100644 index 000000000..8ff23def9 Binary files /dev/null and b/companion/src/themes/yerico/24/duplicate.png differ diff --git a/companion/src/themes/yerico/24/edit.png b/companion/src/themes/yerico/24/edit.png new file mode 100644 index 000000000..d4be877f4 Binary files /dev/null and b/companion/src/themes/yerico/24/edit.png differ diff --git a/companion/src/themes/yerico/24/exit.png b/companion/src/themes/yerico/24/exit.png new file mode 100644 index 000000000..3884d2a7d Binary files /dev/null and b/companion/src/themes/yerico/24/exit.png differ diff --git a/companion/src/themes/yerico/24/fuses.png b/companion/src/themes/yerico/24/fuses.png new file mode 100644 index 000000000..38ce749a1 Binary files /dev/null and b/companion/src/themes/yerico/24/fuses.png differ diff --git a/companion/src/themes/yerico/24/fwpreferences.png b/companion/src/themes/yerico/24/fwpreferences.png new file mode 100644 index 000000000..5f7ef8db3 Binary files /dev/null and b/companion/src/themes/yerico/24/fwpreferences.png differ diff --git a/companion/src/themes/yerico/24/information.png b/companion/src/themes/yerico/24/information.png new file mode 100644 index 000000000..4f4b0b7be Binary files /dev/null and b/companion/src/themes/yerico/24/information.png differ diff --git a/companion/src/themes/yerico/24/library.png b/companion/src/themes/yerico/24/library.png new file mode 100644 index 000000000..cbd6c1461 Binary files /dev/null and b/companion/src/themes/yerico/24/library.png differ diff --git a/companion/src/themes/yerico/24/list.png b/companion/src/themes/yerico/24/list.png new file mode 100644 index 000000000..5eeb66474 Binary files /dev/null and b/companion/src/themes/yerico/24/list.png differ diff --git a/companion/src/themes/yerico/24/logs.png b/companion/src/themes/yerico/24/logs.png new file mode 100644 index 000000000..44cd3796f Binary files /dev/null and b/companion/src/themes/yerico/24/logs.png differ diff --git a/companion/src/themes/yerico/24/movedown.png b/companion/src/themes/yerico/24/movedown.png new file mode 100644 index 000000000..1b2395232 Binary files /dev/null and b/companion/src/themes/yerico/24/movedown.png differ diff --git a/companion/src/themes/yerico/24/moveup.png b/companion/src/themes/yerico/24/moveup.png new file mode 100644 index 000000000..6eb96ec1b Binary files /dev/null and b/companion/src/themes/yerico/24/moveup.png differ diff --git a/companion/src/themes/yerico/24/new.png b/companion/src/themes/yerico/24/new.png new file mode 100644 index 000000000..4b5a515ab Binary files /dev/null and b/companion/src/themes/yerico/24/new.png differ diff --git a/companion/src/themes/yerico/24/open.png b/companion/src/themes/yerico/24/open.png new file mode 100644 index 000000000..334272766 Binary files /dev/null and b/companion/src/themes/yerico/24/open.png differ diff --git a/companion/src/themes/yerico/24/paintbrush.png b/companion/src/themes/yerico/24/paintbrush.png new file mode 100644 index 000000000..4e2ca9f70 Binary files /dev/null and b/companion/src/themes/yerico/24/paintbrush.png differ diff --git a/companion/src/themes/yerico/24/paste.png b/companion/src/themes/yerico/24/paste.png new file mode 100644 index 000000000..53ffad121 Binary files /dev/null and b/companion/src/themes/yerico/24/paste.png differ diff --git a/companion/src/themes/yerico/24/play.png b/companion/src/themes/yerico/24/play.png new file mode 100644 index 000000000..3ec82b975 Binary files /dev/null and b/companion/src/themes/yerico/24/play.png differ diff --git a/companion/src/themes/yerico/24/print.png b/companion/src/themes/yerico/24/print.png new file mode 100644 index 000000000..ba056458a Binary files /dev/null and b/companion/src/themes/yerico/24/print.png differ diff --git a/companion/src/themes/yerico/24/profiles.png b/companion/src/themes/yerico/24/profiles.png new file mode 100644 index 000000000..f2935ee96 Binary files /dev/null and b/companion/src/themes/yerico/24/profiles.png differ diff --git a/companion/src/themes/yerico/24/read_eeprom.png b/companion/src/themes/yerico/24/read_eeprom.png new file mode 100644 index 000000000..de4c08865 Binary files /dev/null and b/companion/src/themes/yerico/24/read_eeprom.png differ diff --git a/companion/src/themes/yerico/24/read_eeprom_file.png b/companion/src/themes/yerico/24/read_eeprom_file.png new file mode 100644 index 000000000..3f342b152 Binary files /dev/null and b/companion/src/themes/yerico/24/read_eeprom_file.png differ diff --git a/companion/src/themes/yerico/24/read_flash.png b/companion/src/themes/yerico/24/read_flash.png new file mode 100644 index 000000000..76a63823f Binary files /dev/null and b/companion/src/themes/yerico/24/read_flash.png differ diff --git a/companion/src/themes/yerico/24/recentdocument.png b/companion/src/themes/yerico/24/recentdocument.png new file mode 100644 index 000000000..1048efd23 Binary files /dev/null and b/companion/src/themes/yerico/24/recentdocument.png differ diff --git a/companion/src/themes/yerico/24/save.png b/companion/src/themes/yerico/24/save.png new file mode 100644 index 000000000..97faf17cb Binary files /dev/null and b/companion/src/themes/yerico/24/save.png differ diff --git a/companion/src/themes/yerico/24/saveas.png b/companion/src/themes/yerico/24/saveas.png new file mode 100644 index 000000000..c8f87f56a Binary files /dev/null and b/companion/src/themes/yerico/24/saveas.png differ diff --git a/companion/src/themes/yerico/24/simulate.png b/companion/src/themes/yerico/24/simulate.png new file mode 100644 index 000000000..0f50deb7c Binary files /dev/null and b/companion/src/themes/yerico/24/simulate.png differ diff --git a/companion/src/themes/yerico/24/stop.png b/companion/src/themes/yerico/24/stop.png new file mode 100644 index 000000000..9c1258365 Binary files /dev/null and b/companion/src/themes/yerico/24/stop.png differ diff --git a/companion/src/themes/yerico/24/update.png b/companion/src/themes/yerico/24/update.png new file mode 100644 index 000000000..03ea6bb01 Binary files /dev/null and b/companion/src/themes/yerico/24/update.png differ diff --git a/companion/src/themes/yerico/24/wizard.png b/companion/src/themes/yerico/24/wizard.png new file mode 100644 index 000000000..cab6ae467 Binary files /dev/null and b/companion/src/themes/yerico/24/wizard.png differ diff --git a/companion/src/themes/yerico/24/write_eeprom.png b/companion/src/themes/yerico/24/write_eeprom.png new file mode 100644 index 000000000..6e9542133 Binary files /dev/null and b/companion/src/themes/yerico/24/write_eeprom.png differ diff --git a/companion/src/themes/yerico/24/write_eeprom_file.png b/companion/src/themes/yerico/24/write_eeprom_file.png new file mode 100644 index 000000000..f89894945 Binary files /dev/null and b/companion/src/themes/yerico/24/write_eeprom_file.png differ diff --git a/companion/src/themes/yerico/24/write_flash.png b/companion/src/themes/yerico/24/write_flash.png new file mode 100644 index 000000000..8b97170ca Binary files /dev/null and b/companion/src/themes/yerico/24/write_flash.png differ diff --git a/companion/src/themes/yerico/32/add.png b/companion/src/themes/yerico/32/add.png new file mode 100644 index 000000000..ecd9f6a9f Binary files /dev/null and b/companion/src/themes/yerico/32/add.png differ diff --git a/companion/src/themes/yerico/32/apppreferences.png b/companion/src/themes/yerico/32/apppreferences.png new file mode 100644 index 000000000..1389fa38c Binary files /dev/null and b/companion/src/themes/yerico/32/apppreferences.png differ diff --git a/companion/src/themes/yerico/32/arrow-left.png b/companion/src/themes/yerico/32/arrow-left.png new file mode 100644 index 000000000..94f5afcb4 Binary files /dev/null and b/companion/src/themes/yerico/32/arrow-left.png differ diff --git a/companion/src/themes/yerico/32/arrow-right.png b/companion/src/themes/yerico/32/arrow-right.png new file mode 100644 index 000000000..5b26520c7 Binary files /dev/null and b/companion/src/themes/yerico/32/arrow-right.png differ diff --git a/companion/src/themes/yerico/32/changelog.png b/companion/src/themes/yerico/32/changelog.png new file mode 100644 index 000000000..952a231dd Binary files /dev/null and b/companion/src/themes/yerico/32/changelog.png differ diff --git a/companion/src/themes/yerico/32/clear.png b/companion/src/themes/yerico/32/clear.png new file mode 100644 index 000000000..89031abab Binary files /dev/null and b/companion/src/themes/yerico/32/clear.png differ diff --git a/companion/src/themes/yerico/32/compare.png b/companion/src/themes/yerico/32/compare.png new file mode 100644 index 000000000..b987f74b8 Binary files /dev/null and b/companion/src/themes/yerico/32/compare.png differ diff --git a/companion/src/themes/yerico/32/configure.png b/companion/src/themes/yerico/32/configure.png new file mode 100644 index 000000000..b43651d4e Binary files /dev/null and b/companion/src/themes/yerico/32/configure.png differ diff --git a/companion/src/themes/yerico/32/contributors.png b/companion/src/themes/yerico/32/contributors.png new file mode 100644 index 000000000..5793b3e21 Binary files /dev/null and b/companion/src/themes/yerico/32/contributors.png differ diff --git a/companion/src/themes/yerico/32/copy.png b/companion/src/themes/yerico/32/copy.png new file mode 100644 index 000000000..7c2a7ff3f Binary files /dev/null and b/companion/src/themes/yerico/32/copy.png differ diff --git a/companion/src/themes/yerico/32/currentmodel.png b/companion/src/themes/yerico/32/currentmodel.png new file mode 100644 index 000000000..c52a1595f Binary files /dev/null and b/companion/src/themes/yerico/32/currentmodel.png differ diff --git a/companion/src/themes/yerico/32/cut.png b/companion/src/themes/yerico/32/cut.png new file mode 100644 index 000000000..c089b35da Binary files /dev/null and b/companion/src/themes/yerico/32/cut.png differ diff --git a/companion/src/themes/yerico/32/duplicate.png b/companion/src/themes/yerico/32/duplicate.png new file mode 100644 index 000000000..a6c66b117 Binary files /dev/null and b/companion/src/themes/yerico/32/duplicate.png differ diff --git a/companion/src/themes/yerico/32/edit.png b/companion/src/themes/yerico/32/edit.png new file mode 100644 index 000000000..0cd776684 Binary files /dev/null and b/companion/src/themes/yerico/32/edit.png differ diff --git a/companion/src/themes/yerico/32/exit.png b/companion/src/themes/yerico/32/exit.png new file mode 100644 index 000000000..bc9e301bd Binary files /dev/null and b/companion/src/themes/yerico/32/exit.png differ diff --git a/companion/src/themes/yerico/32/fuses.png b/companion/src/themes/yerico/32/fuses.png new file mode 100644 index 000000000..c0bb8bf4c Binary files /dev/null and b/companion/src/themes/yerico/32/fuses.png differ diff --git a/companion/src/themes/yerico/32/fwpreferences.png b/companion/src/themes/yerico/32/fwpreferences.png new file mode 100644 index 000000000..2c79e0042 Binary files /dev/null and b/companion/src/themes/yerico/32/fwpreferences.png differ diff --git a/companion/src/themes/yerico/32/information.png b/companion/src/themes/yerico/32/information.png new file mode 100644 index 000000000..f7c426baf Binary files /dev/null and b/companion/src/themes/yerico/32/information.png differ diff --git a/companion/src/themes/yerico/32/library.png b/companion/src/themes/yerico/32/library.png new file mode 100644 index 000000000..ea07f460e Binary files /dev/null and b/companion/src/themes/yerico/32/library.png differ diff --git a/companion/src/themes/yerico/32/list.png b/companion/src/themes/yerico/32/list.png new file mode 100644 index 000000000..3b6f45e45 Binary files /dev/null and b/companion/src/themes/yerico/32/list.png differ diff --git a/companion/src/themes/yerico/32/logs.png b/companion/src/themes/yerico/32/logs.png new file mode 100644 index 000000000..83cf51512 Binary files /dev/null and b/companion/src/themes/yerico/32/logs.png differ diff --git a/companion/src/themes/yerico/32/movedown.png b/companion/src/themes/yerico/32/movedown.png new file mode 100644 index 000000000..03df82943 Binary files /dev/null and b/companion/src/themes/yerico/32/movedown.png differ diff --git a/companion/src/themes/yerico/32/moveup.png b/companion/src/themes/yerico/32/moveup.png new file mode 100644 index 000000000..7bc850ea0 Binary files /dev/null and b/companion/src/themes/yerico/32/moveup.png differ diff --git a/companion/src/themes/yerico/32/new.png b/companion/src/themes/yerico/32/new.png new file mode 100644 index 000000000..0aa6d568a Binary files /dev/null and b/companion/src/themes/yerico/32/new.png differ diff --git a/companion/src/themes/yerico/32/open.png b/companion/src/themes/yerico/32/open.png new file mode 100644 index 000000000..72eed7f24 Binary files /dev/null and b/companion/src/themes/yerico/32/open.png differ diff --git a/companion/src/themes/yerico/32/paintbrush.png b/companion/src/themes/yerico/32/paintbrush.png new file mode 100644 index 000000000..18dbeb214 Binary files /dev/null and b/companion/src/themes/yerico/32/paintbrush.png differ diff --git a/companion/src/themes/yerico/32/paste.png b/companion/src/themes/yerico/32/paste.png new file mode 100644 index 000000000..61f402155 Binary files /dev/null and b/companion/src/themes/yerico/32/paste.png differ diff --git a/companion/src/themes/yerico/32/play.png b/companion/src/themes/yerico/32/play.png new file mode 100644 index 000000000..fc0f9506f Binary files /dev/null and b/companion/src/themes/yerico/32/play.png differ diff --git a/companion/src/themes/yerico/32/print.png b/companion/src/themes/yerico/32/print.png new file mode 100644 index 000000000..75d3d8b2b Binary files /dev/null and b/companion/src/themes/yerico/32/print.png differ diff --git a/companion/src/themes/yerico/32/profiles.png b/companion/src/themes/yerico/32/profiles.png new file mode 100644 index 000000000..aac8f4291 Binary files /dev/null and b/companion/src/themes/yerico/32/profiles.png differ diff --git a/companion/src/themes/yerico/32/read_eeprom.png b/companion/src/themes/yerico/32/read_eeprom.png new file mode 100644 index 000000000..6df6bd7c6 Binary files /dev/null and b/companion/src/themes/yerico/32/read_eeprom.png differ diff --git a/companion/src/themes/yerico/32/read_eeprom_file.png b/companion/src/themes/yerico/32/read_eeprom_file.png new file mode 100644 index 000000000..2e3516df1 Binary files /dev/null and b/companion/src/themes/yerico/32/read_eeprom_file.png differ diff --git a/companion/src/themes/yerico/32/read_flash.png b/companion/src/themes/yerico/32/read_flash.png new file mode 100644 index 000000000..6aef83a4b Binary files /dev/null and b/companion/src/themes/yerico/32/read_flash.png differ diff --git a/companion/src/themes/yerico/32/recentdocument.png b/companion/src/themes/yerico/32/recentdocument.png new file mode 100644 index 000000000..d7919fef3 Binary files /dev/null and b/companion/src/themes/yerico/32/recentdocument.png differ diff --git a/companion/src/themes/yerico/32/save.png b/companion/src/themes/yerico/32/save.png new file mode 100644 index 000000000..c98afaf78 Binary files /dev/null and b/companion/src/themes/yerico/32/save.png differ diff --git a/companion/src/themes/yerico/32/saveas.png b/companion/src/themes/yerico/32/saveas.png new file mode 100644 index 000000000..54e046ed4 Binary files /dev/null and b/companion/src/themes/yerico/32/saveas.png differ diff --git a/companion/src/themes/yerico/32/simulate.png b/companion/src/themes/yerico/32/simulate.png new file mode 100644 index 000000000..d6bf5825f Binary files /dev/null and b/companion/src/themes/yerico/32/simulate.png differ diff --git a/companion/src/themes/yerico/32/stop.png b/companion/src/themes/yerico/32/stop.png new file mode 100644 index 000000000..c055e548c Binary files /dev/null and b/companion/src/themes/yerico/32/stop.png differ diff --git a/companion/src/themes/yerico/32/update.png b/companion/src/themes/yerico/32/update.png new file mode 100644 index 000000000..22cc1d9f3 Binary files /dev/null and b/companion/src/themes/yerico/32/update.png differ diff --git a/companion/src/themes/yerico/32/wizard.png b/companion/src/themes/yerico/32/wizard.png new file mode 100644 index 000000000..4ec873ee9 Binary files /dev/null and b/companion/src/themes/yerico/32/wizard.png differ diff --git a/companion/src/themes/yerico/32/write_eeprom.png b/companion/src/themes/yerico/32/write_eeprom.png new file mode 100644 index 000000000..1701b56e3 Binary files /dev/null and b/companion/src/themes/yerico/32/write_eeprom.png differ diff --git a/companion/src/themes/yerico/32/write_eeprom_file.png b/companion/src/themes/yerico/32/write_eeprom_file.png new file mode 100644 index 000000000..65728a70a Binary files /dev/null and b/companion/src/themes/yerico/32/write_eeprom_file.png differ diff --git a/companion/src/themes/yerico/32/write_flash.png b/companion/src/themes/yerico/32/write_flash.png new file mode 100644 index 000000000..71d8b1056 Binary files /dev/null and b/companion/src/themes/yerico/32/write_flash.png differ diff --git a/companion/src/themes/yerico/48/add.png b/companion/src/themes/yerico/48/add.png new file mode 100644 index 000000000..dbb1e9449 Binary files /dev/null and b/companion/src/themes/yerico/48/add.png differ diff --git a/companion/src/themes/yerico/48/apppreferences.png b/companion/src/themes/yerico/48/apppreferences.png new file mode 100644 index 000000000..2f60f6ee0 Binary files /dev/null and b/companion/src/themes/yerico/48/apppreferences.png differ diff --git a/companion/src/themes/yerico/48/arrow-left.png b/companion/src/themes/yerico/48/arrow-left.png new file mode 100644 index 000000000..f6bb5eb08 Binary files /dev/null and b/companion/src/themes/yerico/48/arrow-left.png differ diff --git a/companion/src/themes/yerico/48/arrow-right.png b/companion/src/themes/yerico/48/arrow-right.png new file mode 100644 index 000000000..25dfe0dab Binary files /dev/null and b/companion/src/themes/yerico/48/arrow-right.png differ diff --git a/companion/src/themes/yerico/48/changelog.png b/companion/src/themes/yerico/48/changelog.png new file mode 100644 index 000000000..bf3ed7459 Binary files /dev/null and b/companion/src/themes/yerico/48/changelog.png differ diff --git a/companion/src/themes/yerico/48/clear.png b/companion/src/themes/yerico/48/clear.png new file mode 100644 index 000000000..445702cc8 Binary files /dev/null and b/companion/src/themes/yerico/48/clear.png differ diff --git a/companion/src/themes/yerico/48/compare.png b/companion/src/themes/yerico/48/compare.png new file mode 100644 index 000000000..a9e965791 Binary files /dev/null and b/companion/src/themes/yerico/48/compare.png differ diff --git a/companion/src/themes/yerico/48/configure.png b/companion/src/themes/yerico/48/configure.png new file mode 100644 index 000000000..9e1fc5300 Binary files /dev/null and b/companion/src/themes/yerico/48/configure.png differ diff --git a/companion/src/themes/yerico/48/contributors.png b/companion/src/themes/yerico/48/contributors.png new file mode 100644 index 000000000..be8840906 Binary files /dev/null and b/companion/src/themes/yerico/48/contributors.png differ diff --git a/companion/src/themes/yerico/48/copy.png b/companion/src/themes/yerico/48/copy.png new file mode 100644 index 000000000..65dcd3d93 Binary files /dev/null and b/companion/src/themes/yerico/48/copy.png differ diff --git a/companion/src/themes/yerico/48/currentmodel.png b/companion/src/themes/yerico/48/currentmodel.png new file mode 100644 index 000000000..12d23c31a Binary files /dev/null and b/companion/src/themes/yerico/48/currentmodel.png differ diff --git a/companion/src/themes/yerico/48/cut.png b/companion/src/themes/yerico/48/cut.png new file mode 100644 index 000000000..1d423464b Binary files /dev/null and b/companion/src/themes/yerico/48/cut.png differ diff --git a/companion/src/themes/yerico/48/duplicate.png b/companion/src/themes/yerico/48/duplicate.png new file mode 100644 index 000000000..903afdd6c Binary files /dev/null and b/companion/src/themes/yerico/48/duplicate.png differ diff --git a/companion/src/themes/yerico/48/edit.png b/companion/src/themes/yerico/48/edit.png new file mode 100644 index 000000000..38bb9d672 Binary files /dev/null and b/companion/src/themes/yerico/48/edit.png differ diff --git a/companion/src/themes/yerico/48/exit.png b/companion/src/themes/yerico/48/exit.png new file mode 100644 index 000000000..cd779a402 Binary files /dev/null and b/companion/src/themes/yerico/48/exit.png differ diff --git a/companion/src/themes/yerico/48/fuses.png b/companion/src/themes/yerico/48/fuses.png new file mode 100644 index 000000000..d7fb789c4 Binary files /dev/null and b/companion/src/themes/yerico/48/fuses.png differ diff --git a/companion/src/themes/yerico/48/fwpreferences.png b/companion/src/themes/yerico/48/fwpreferences.png new file mode 100644 index 000000000..9b9946eb4 Binary files /dev/null and b/companion/src/themes/yerico/48/fwpreferences.png differ diff --git a/companion/src/themes/yerico/48/information.png b/companion/src/themes/yerico/48/information.png new file mode 100644 index 000000000..16d186a78 Binary files /dev/null and b/companion/src/themes/yerico/48/information.png differ diff --git a/companion/src/themes/yerico/48/library.png b/companion/src/themes/yerico/48/library.png new file mode 100644 index 000000000..59122cf0e Binary files /dev/null and b/companion/src/themes/yerico/48/library.png differ diff --git a/companion/src/themes/yerico/48/list.png b/companion/src/themes/yerico/48/list.png new file mode 100644 index 000000000..564d76118 Binary files /dev/null and b/companion/src/themes/yerico/48/list.png differ diff --git a/companion/src/themes/yerico/48/logs.png b/companion/src/themes/yerico/48/logs.png new file mode 100644 index 000000000..131634304 Binary files /dev/null and b/companion/src/themes/yerico/48/logs.png differ diff --git a/companion/src/themes/yerico/48/movedown.png b/companion/src/themes/yerico/48/movedown.png new file mode 100644 index 000000000..be856ff29 Binary files /dev/null and b/companion/src/themes/yerico/48/movedown.png differ diff --git a/companion/src/themes/yerico/48/moveup.png b/companion/src/themes/yerico/48/moveup.png new file mode 100644 index 000000000..c2668e845 Binary files /dev/null and b/companion/src/themes/yerico/48/moveup.png differ diff --git a/companion/src/themes/yerico/48/new.png b/companion/src/themes/yerico/48/new.png new file mode 100644 index 000000000..0179eecb8 Binary files /dev/null and b/companion/src/themes/yerico/48/new.png differ diff --git a/companion/src/themes/yerico/48/open.png b/companion/src/themes/yerico/48/open.png new file mode 100644 index 000000000..d7847e4b8 Binary files /dev/null and b/companion/src/themes/yerico/48/open.png differ diff --git a/companion/src/themes/yerico/48/paintbrush.png b/companion/src/themes/yerico/48/paintbrush.png new file mode 100644 index 000000000..0c06180d9 Binary files /dev/null and b/companion/src/themes/yerico/48/paintbrush.png differ diff --git a/companion/src/themes/yerico/48/paste.png b/companion/src/themes/yerico/48/paste.png new file mode 100644 index 000000000..f9338e4e1 Binary files /dev/null and b/companion/src/themes/yerico/48/paste.png differ diff --git a/companion/src/themes/yerico/48/play.png b/companion/src/themes/yerico/48/play.png new file mode 100644 index 000000000..0cdda36c6 Binary files /dev/null and b/companion/src/themes/yerico/48/play.png differ diff --git a/companion/src/themes/yerico/48/print.png b/companion/src/themes/yerico/48/print.png new file mode 100644 index 000000000..8cc3b9ba5 Binary files /dev/null and b/companion/src/themes/yerico/48/print.png differ diff --git a/companion/src/themes/yerico/48/profiles.png b/companion/src/themes/yerico/48/profiles.png new file mode 100644 index 000000000..bc9b3749b Binary files /dev/null and b/companion/src/themes/yerico/48/profiles.png differ diff --git a/companion/src/themes/yerico/48/read_eeprom.png b/companion/src/themes/yerico/48/read_eeprom.png new file mode 100644 index 000000000..340f717d3 Binary files /dev/null and b/companion/src/themes/yerico/48/read_eeprom.png differ diff --git a/companion/src/themes/yerico/48/read_eeprom_file.png b/companion/src/themes/yerico/48/read_eeprom_file.png new file mode 100644 index 000000000..aea295a1d Binary files /dev/null and b/companion/src/themes/yerico/48/read_eeprom_file.png differ diff --git a/companion/src/themes/yerico/48/read_flash.png b/companion/src/themes/yerico/48/read_flash.png new file mode 100644 index 000000000..46ed3b6bf Binary files /dev/null and b/companion/src/themes/yerico/48/read_flash.png differ diff --git a/companion/src/themes/yerico/48/recentdocument.png b/companion/src/themes/yerico/48/recentdocument.png new file mode 100644 index 000000000..fc3000c9d Binary files /dev/null and b/companion/src/themes/yerico/48/recentdocument.png differ diff --git a/companion/src/themes/yerico/48/save.png b/companion/src/themes/yerico/48/save.png new file mode 100644 index 000000000..deed3981d Binary files /dev/null and b/companion/src/themes/yerico/48/save.png differ diff --git a/companion/src/themes/yerico/48/saveas.png b/companion/src/themes/yerico/48/saveas.png new file mode 100644 index 000000000..87b5c7c1c Binary files /dev/null and b/companion/src/themes/yerico/48/saveas.png differ diff --git a/companion/src/themes/yerico/48/simulate.png b/companion/src/themes/yerico/48/simulate.png new file mode 100644 index 000000000..2a69b4368 Binary files /dev/null and b/companion/src/themes/yerico/48/simulate.png differ diff --git a/companion/src/themes/yerico/48/stop.png b/companion/src/themes/yerico/48/stop.png new file mode 100644 index 000000000..34bde6e33 Binary files /dev/null and b/companion/src/themes/yerico/48/stop.png differ diff --git a/companion/src/themes/yerico/48/update.png b/companion/src/themes/yerico/48/update.png new file mode 100644 index 000000000..99ea196b4 Binary files /dev/null and b/companion/src/themes/yerico/48/update.png differ diff --git a/companion/src/themes/yerico/48/wizard.png b/companion/src/themes/yerico/48/wizard.png new file mode 100644 index 000000000..058dbb536 Binary files /dev/null and b/companion/src/themes/yerico/48/wizard.png differ diff --git a/companion/src/themes/yerico/48/write_eeprom.png b/companion/src/themes/yerico/48/write_eeprom.png new file mode 100644 index 000000000..eb364f90a Binary files /dev/null and b/companion/src/themes/yerico/48/write_eeprom.png differ diff --git a/companion/src/themes/yerico/48/write_eeprom_file.png b/companion/src/themes/yerico/48/write_eeprom_file.png new file mode 100644 index 000000000..1a19dd8df Binary files /dev/null and b/companion/src/themes/yerico/48/write_eeprom_file.png differ diff --git a/companion/src/themes/yerico/48/write_flash.png b/companion/src/themes/yerico/48/write_flash.png new file mode 100644 index 000000000..e031f0ccb Binary files /dev/null and b/companion/src/themes/yerico/48/write_flash.png differ diff --git a/companion/src/translations.qrc.in b/companion/src/translations.qrc.in index 434cbd225..a23b017ea 100644 --- a/companion/src/translations.qrc.in +++ b/companion/src/translations.qrc.in @@ -1,12 +1,14 @@ - companion_fr.qm + companion_cs.qm companion_de.qm + companion_fi.qm + companion_fr.qm companion_he.qm companion_it.qm + companion_pl.qm companion_pt.qm - companion_ru.qm companion_sv.qm - companion_cs.qm + companion_ru.qm diff --git a/companion/src/translations/companion_cs.ts b/companion/src/translations/companion_cs.ts index d656507aa..3f95e3560 100644 --- a/companion/src/translations/companion_cs.ts +++ b/companion/src/translations/companion_cs.ts @@ -1,165 +1,595 @@ + + Channels + + + Name + Název + + + + Offset + + + + + Min + + + + + Max + + + + + Invert + Invertovat + + + + Center + Střed + + + + Sym + Symetrický + + + + Channel %1 + + + + + --- + + + + + INV + + + + + CurveGroup + + + Diff + Dif + + + + Expo + Expo + + + + Func + + + + + Curve + Křivka + + + + Curves + + + Form + + + + + Standard + Běžný + + + + Custom + Vlastní + + + + Lines + + + + + Smooth + + + + + Curve type + Typ křivky + + + + Curve name + Název křivky + + + + Curve %1 + + + + + %1 points + + + + + Are you sure you want to reset curve %1 ? + + + + + Editing curve %1 + Upravit křivku k%1 + + + + Not enough free points in EEPROM to store the curve. + + + + + CustomFunctionsPanel + + + Switch + Spínač + + + + Action + + + + + Parameters + + + + + Enable + + + + + CF%1 + FN%1 + + + + ON + ZAPNUTO + + + + Error + Chyba + + + + Unable to find sound file %1! + Nemohu nalézt zvukový soubor %1! + + + + &Delete + &Odstranit + + + + Delete + + + + + &Copy + &Kopírovat + + + + Ctrl+C + + + + + &Cut + &Vyjmout + + + + Ctrl+X + + + + + &Paste + &Vložit + + + + Ctrl+V + + + + + Dialog + + + Dialog + + + + + Curve type + Typ křivky + + + + Coefficient + Koeficient + + + + Both + Obě + + + + x>0 + + + + + x<0 + + + + + Y at X=0 + Y na X=0 + + + + Side + Strana + + + + Y at X=-100 + Y na X=-100 + + + + Y at X=100 + Y na X=100 + + + + Linear + Lineární + + + + Single Expo + Expo + + + + Symmetrical f(x)=-f(-x) + Symetrická f(x)=-f(-x) + + + + Symmetrical f(x)=f(-x) + Symetrická f(x)=f(-x) + + ExpoDialog - + Weight Váha - <!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-size:8pt;">Expo value</span></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-size:8pt;">Hodnota Expa</span></p></body></html> - - - Mode - Strana křivky - - - + Curve Křivka - - Switch used by the expo. -If blank then the expo is considered to be "ON" all the time. - Spínač aktivující DR/Expo. Pokud je nepoužit, je vždy "ZAPNUTO". + + The source for the mixer + Zdroj pro mix - The value of the weight - Hodnota váhy funkce + + Input name + - - - Phase used by the expo. - Režim ve které je DR/Expo aktivní. - - - - Expo - - - - Phases - Phase - Fáze - - - - - + + GV GP - + + Phase used by the input. + + + + Flight modes Letové režimy - + 0 - + 1 - + 2 - + 3 - + 4 - + 5 - + 6 - + 7 - + 8 - + Switch Spínač - - Curve/Exponential - Křivka/Expo + + Switch used by the input. +If blank then the input is considered to be "ON" all the time. + - + + <!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;">Zpoždění a zpomalení</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;">Tyto volby nastavují rychlost a zpoždění výstupu mixu. </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;">Pokud je nastaveno zpoždění, ovládání mixu bude zpoždéno o uvedený počet sekund.</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;">Pokud je nastaveno zpomalení, nastavená hodnota udává rychlost mixu -&gt; hodnota udává počet sekund které trvá změna hodnoty z -100 na 100.</p></body></html> + + + + Scale + Rozsah + + + + Include Trim + Použít trim + + + + No + + + + + Yes + Ano + + + + The curve used by the input + + + + + Source + Zdroj + + + + Line name + + + + Stick Side Strana páky - The curve used by the mix - Křivka použitá mixem - - - + NEG x<0(Negativní) - + POS x>0(Pozitivní) - + ALL Obě - - The curve used by the expo - Křivka použitá pro expo + + Edit %1 + - + + Rud + Směrovka + + + + Ele + Výškovka + + + + Thr + + + + + Ail + Křidélka + + + + FlightMode + + + Form + + + + + Fade In + Přechod při aktivaci + + + + Fade Out + Přechod při deaktivaci + + + Name - Název + Název - - DEST -> %1 - + + Switch + Spínač + + + + trim1 + + + + + trim2 + + + + + trim4 + + + + + trim3 + + + + + Rud + Směrovka + + + + Ele + Výškovka + + + + Thr + + + + + Ail + Křidélka + + + + Rotary Encoder %1 + + + + + GVAR%1 + + + + + FlightModes + + + Flight Mode %1 + + + + + (%1) + + + + + (default) + @@ -192,27 +622,27 @@ Tyto volby jsou platné pro všechny modely v jedné EEPROM. Nastevní - + Timer Beeps Upozornění stopek - + Contrast Kontrast - + Channel Order (For Templates) Pořadí kanálů (pro šablony) - + Owner Name Jméno pilota - + Mode selection: Mode 1: @@ -253,45 +683,45 @@ Mode 4: - + Mode 1 (RUD ELE THR AIL) Mód1 (Směr.Výšk.Plyn.Křid) - + Mode 2 (RUD THR ELE AIL) Mód2 (Směr.Plyn.Výšk.Křid) - + Mode 3 (AIL ELE THR RUD) Mód3 (Křid.Výšk.Plyn.Směr) - + Mode 4 (AIL THR ELE RUD) Mód4 (Křid.Plyn.Výšk.Směr) - - + + Quiet Tichý - + Only Alarms Jen alarm - - + + No Keys Bez kláves - - + + All Vše @@ -301,47 +731,47 @@ Mode 4: - + 4800 Baud - + 9600 Baud - + 14400 Baud - + 19200 Baud - + 38400 Baud - + 57600 Baud - + 76800 Baud - + 115200 Baud - + <!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; } @@ -350,22 +780,22 @@ p, li { white-space: pre-wrap; } - + Every Minute Každou celou minutu - + Beeps at 30, 15, 10, and down from5 seconds Upozorní při 30s, 15s, 10s, a pod 5 sekundami zbývajícího času stopek - + Count Down to Zero Odpočet do nuly - + <!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; } @@ -374,52 +804,38 @@ p, li { white-space: pre-wrap; } - + Flash on beep Blikat podsvětlením - + If this value is not 0, any keypress will turn on the backlight and turn it off after the specified number of seconds. Pokud tato hodnota není nula, každé stisknutí klávesy zapne podsvétlení a vypne ho až po uplynutí nastaveného počtu sekund. - - + + sec s - Backlight Auto OFF after - Auto. vypnutí podsvětlení po - - - + Input Filter Filtrování vstupů - - 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. - - - Obrácení funkce plynu. -Pokud je zaškrtnuto,funkce plynu bude opačná. Poloha vypnuto bude nahoře. -Funkce trimu bude opačná, stejně tak i varování polohy páky plynu. - - - - - + + + - - - - - - + + + + + + Beeper volume 0 - Quiet. No beeps at all. @@ -436,17 +852,16 @@ Funkce trimu bude opačná, stejně tak i varování polohy páky plynu. 4 - Extra Hlasitý. - + Alarms Only Jen alarmy - - - - - - + + + + + <!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; } @@ -461,32 +876,21 @@ p, li { white-space: pre-wrap; } - + Beeper Mode Mód zvuku - + - - - + + Off Vypnuto - - Switches Up - Spínače nahoru - - - - Switches Down - Spínače dolů - - - - + + <!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; } @@ -496,42 +900,42 @@ p, li { white-space: pre-wrap; } - + Memory Startup Warning Při zapnutí upozorňit na nízký stav paměti - - + + X-Short Extra krátký - - + + Short Krátký - - + + Normal Normální - - + + Long Dlouhý - - + + X-Long Extra dlouhý - + Battery warning voltage. This is the threashhold where the battery warning sounds. @@ -540,165 +944,160 @@ Acceptable values are 5v..10v Použitelné hodnoty jsou 5v..10v - + Battery Warning Alarm baterie - + THR - + RUD - + ELE - + AIL - + GEA - + ID0 - + ID1 - + ID2 - + Sound Mode Mód zvuku - - Reverse Throttle Operation - Reverzovat funkci plynu - - - + Pot Scrolling Enable Pohyb v menu potenciometry - + Battery Calibration Kalibrace měření baterie - + If not zero will sound beeps if the transmitter has been left without inputs for the specified number of minutes. Pokud není nastaveno na nulu, bude zapnuto zvukové upozornění, že jste rádio nechali bez povšimnutí nastavený počet minut. - + min - - + + Show splash screen on startup Zobrazit úvodní logo při zapnutí vysílčky - + Battery calibration: This value will be added to the measured battery voltage. Use this value to calibrate the meter with an external meter. Kalibrace baterie: Tato hodnota bude přidána k měřenému napětí baterie. Použijte tuto položku ke kalibraci pomocí externího voltmetru. - + Single Jednoduché - + Oversample Převzorkování - + Filter Filtovaná hodnota - + Show Splash Screen on Startup Zobrazit úvodní logo - + Inactivity Timer Časovač nečinnosti - + Beeper Bzučák - + Speaker Reproduktor - + BeeperVoice Bzučák+Hlas - + SpeakerVoice Repro+Hlas - + Beeper Length Délka zvuku - + GPS Coordinates Souřadnice GPS - + hh° (N/S) mm' ss''.dd - + NMEA - + Timeshift from UTC Časový posun od UTC - + Channel order This is used by the templated to determine which channel goes to what number output. @@ -708,172 +1107,154 @@ Toto je použito šablonami k určení který kanál patří ke kterému výstupu. - + Speaker Pitch (spkr only) Tón zvuku (pouze spkr) - + Haptic Mode Mód vibrací - + Stick Mode Výchozí mód vysílačky - Backlight Switch - Spínač podsvětlení - - - - Throttle Startup Warning - Kontrola výchozí polohy plynu - - - + Show Owner Name on Splash Jméno pilota v úvodním logu - - Switch Startup Warning - Kontrola výchozí polohy spínačů - - - + Telemetry NO DATA Alarm Alarm telemetrie NO DATA - Backlight On Stick Move - Podsvětlení při pohybu kniplu - - - + LCD Display Type Typ LCD zobrazovače - + Standard Běžný - + Optrex - + This is the switch selectrion for turning on the backlight (if installed). Toto je volba spínače který zapne podsvětlení (pokud je nainstalováno). - + Speaker Volume Hlasitost reproduktoru - + Haptic Length Délka vibrací - + Haptic Strength Síla vibrací - + BackLight Brightness Jas podsvětlení - + Alarm Warning Upozornění na vypnutý alarm - + BackLight Auto OFF after Auto. vypnutí podsvětlení po - + Bandgap Measuring Enable Povolit měření s Bandgap - + RotEnc Navigation Navigace otočným enkodérem - + BackLight Switch Spínač podsvětlení - + BackLight On Stick Move Podsvětlení při pohybu kniplu - + BackLight Invert Invertovat funkci podsvětlení - + Country Code Kód země - + Europe Evropa - + Japan Japonsko - + America Amerika - + Metric Metrické - + Imperial Imperiální - + Measurement Units Měrné jednotky - + FrSky Internal Alarm Integrovaný alarm Frsky - + StickScroll StickScroll-ovládání menu pákou - + PPMSim @@ -883,319 +1264,453 @@ který kanál patří ke kterému výstupu. Jazyk hlasových zpráv - + CrossTrim CrossTrim -použít trimy druhé páky - + Beep volume Upozornění - + Wav volume Wav soubor - + Vario volume Vario - + Background volume Zvuk v pozadí - + FAI Mode FAI mód - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. FAI je soutéžní mód (www.fai.org), zablokuje vario, zobrazení telemetrie a funkce hlasového hlášení. Tuto funkci nelze vypnout v menu rádia. - + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + Readonly Unlock - + SC - + SE - + SA - + SF - + SH - + SD - + SB - + SG - + Trainer Trenér - + Mode Mód - + Input Vstup - + Weight Váha - + Switch Spínač - - + + PPM 1 - += - += (sečíst) - - - := - := (nahradit) - - + - - - + + chn1 kanál 1 + - - - + + chn2 kanál 2 + - - - + + chn3 kanál 3 + - - - + + chn4 kanál 4 - - + + PPM 2 - - + + PPM 3 - - + + PPM 4 - + Telemetry Telemetrie - + RSSI Alarm 1 - - + + ---- - - + + Yellow Žlutá - - + + Orange Oranžová - - + + Red Červená - + RSSI Alarm 2 - + NO DATA Alarm - + Calibration Kalibrace - + POT 4 POTENCIOMETR 4 - + STICK 3 PÁKA 3 - - + + Negative span Negativní poloha - - + + Mid value Hodnota střední polohy - - + + Positive span Pozitivní poloha - + STICK 1 PÁKA 1 - + STICK 2 PÁKA 2 - + STICK 4 PÁKA 4 - + + + Pot (normal) + + + + + + Multipos Switch + + + + + S1 Type + + + + + S2 Type + + + + POT 1 POTENCIOMETR 1 - + POT 2 POTENCIOMETR 2 - + POT 3 POTENCIOMETR 3 + - - - + + += (Sum) += (Sečíst) + - - - + + := (Replace) := (Nahradit) - + Battery Baterie - + v - + PPM Multiplier PPM Násobič - + Current Proud - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. Are you sure ? @@ -1205,180 +1720,437 @@ Tuto funkci nelze vypnout v menu rádia. Opravdu to takto chcete ? - - + + Warning Pozor - + Wrong data in profile, radio calibration was not retrieved Špatná data v profilu, není možné získat parametry kalibrace - + Wrong data in profile, hw related parameters were not retrieved Špatná data v profilu, není možné získat HW parametry - + Do you want to store calibration in %1 profile<br>overwriting existing calibration? Chcete uložit kalibraci do profilu %1<br>Přepsat existující kalibraci? - + Calibration and HW parameters saved. Kalibrace a HW parametry byly uloženy. - MainWindow + Heli - companion9x - EEPROM Editor - firmware %1 - companion9x - EEPROM Editor - firmware %1 + + Form + - - - - + + Invert Elevator + Invertovat výškovku + + + + Invert Aileron + Invertovat křidélka + + + + Invert Collective + Invertovat kolektiv + + + + Invert + Invertovat + + + + Off + + + + + 120 + CH120 + + + + 120X + CH120X + + + + 140 + CH140 + + + + 90 + CH90 + + + + Collective + Kolektiv + + + + Swash Type + Typ cykliky + + + + Swash Ring + Cyklika + + + + InputsPanel + + + + Move Up + Posunout nahoru + + + + + Ctrl+Up + + + + + + Move Down + Posunout dolů + + + + + Ctrl+Down + + + + + Clear All Settings + + + + + Source(%1) + + + + + No Trim + Žádný trim + + + + Weight(%1) + + + + + Switch(%1) + + + + + Not enough available inputs! + + + + + Delete Selected Inputs? + + + + + &Add + &Přidat + + + + Ctrl+A + + + + + &Edit + + + + + Enter + + + + + &Delete + &Odstranit + + + + Delete + + + + + &Copy + &Kopírovat + + + + Ctrl+C + + + + + &Cut + &Vyjmout + + + + Ctrl+X + + + + + &Paste + &Vložit + + + + Ctrl+V + + + + + Du&plicate + &Duplikovat + + + + Ctrl+U + + + + + Clear Inputs? + + + + + Really clear all the inputs? + + + + + LogicalSwitchesPanel + + + Condition + Podmínka + + + + V1 + + + + + V2 + + + + + AND + + + + + Duration + Trvání + + + + Delay + Zpoždění + + + + + LS%1 + + + + + &Delete + &Odstranit + + + + Delete + + + + + &Copy + &Kopírovat + + + + Ctrl+C + + + + + &Cut + &Vyjmout + + + + Ctrl+X + + + + + &Paste + &Vložit + + + + Ctrl+V + + + + + MainWindow + + + + + File loaded Soubor byl načten - + Display previous warning again at startup ? Chcete zobrazit předchozí upozornění i příště ? - + Checking for updates Kontroluji aktualizace - - - - - + + + + + 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í? - - - - - - - + + + + + Save As Uložit jako - + Executable (*.exe) Spustitelný (*.exe) - + New release available 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ář - - - - + + No updates available at this time. žádné aktualizace nejsou nyní dostupné. - + Would you like to launch the installer? Chcete spustit instalátor? - - - - - - - - - - - - - + + + + + + + + + + + + + Error Chyba - - - - - + + + + + Error opening file %1: %2. Chyba při otevírání souboru %1: %2. - Firmware does not fit in flash, due to selected firmware options - S těmito volbami se Firmware nevejde do paměti FLASH rádia. Je třeba některé funkce vypnout. Vhodné je zejména vypnout podporu loga zaškrtnutím "nosplash", to ušetří značné místo - - - + Compilation server termporary failure, try later Server companion je dočasně nedostupný, zkuste to později - companion9x - EEPROM Editor - firmware %1 - profile %2 - companion9x - EEPROM Editor - firmware %1 - profil %2 - - - + Display previous message again at startup ? Chcete zobrazit předchozí zprávu i příště ? - Firmware does not longer fit in flash, due to selected firmware options - Firmware s těmito vybranými součástmi, se již nevejde do paměti FLASH rádia - - - + Compilation server temporary failure, try later Dočasná chyba kompilačního serveru, zkuste to prosím později znovu. - - + + Compilation server too busy, try later 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. - - - - + + Unknown server failure, try later Neznámá chyba serveru, zkuste to později - Do you want to flash the firmware now ? - 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 ? @@ -1387,31 +2159,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á. @@ -1419,236 +2191,175 @@ 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. - Read EEPROM From Tx - Načíst EEPROM z TX - - - Write %1 to EEPROM memory? - Zapsat %1 do paměti EEPROM? - - - The file %1 -has not been recognized as a valid EEPROM -Burn anyway ? - Soubor %1 -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 - Backup EEPROM From Tx - Zálohovat EEPROM z rádia - - - Cannot check eeprom compatibility! Continue anyway? - Nelze ověřit kompatibilitu EEprom! Mám přesto pokračovat? - - - - + + Warning Varování - Firmware in radio is of a different family of eeprom written, check file and preferences! - Firmware rádia je z jiné rodiny než EEprom, zkontrolujte nastavení předvoleb! - - - Firmware in flash is outdated, please upgrade! - Firmware rádia je zastaralý, aktualizujte ho prosím! - - - Write EEPROM To Tx - Zápis EEPROM do TX - - - Write Flash To Tx - Zapsat do paměti FLASH rádia - - - + Conversion failed Porovnání selhalo - Cannot convert EEProm for this firmware, original EEProm file will be used - Nemohu konvertovat EEPROM pro tento firmware, bude použita původní EEPROM - - - Restore EEPROM To Tx - Zapsat EEPROM do rádia - - - + Restore failed Zápis selhal - Cannot restore EEProm to TX, original EEProm file can be found at: %1 - Nemohu obnovit EEPROM v rádiu, původní EEPROM najdete zde: %1 - - - Flash failed - Zápis firmware se nezdařil - - - Cannot flash the TX, original EEProm file can be found at: %1 - Nemohu naprogramovat rádio, původní EEPROM najdete zde: %1 - - - + Backup failed Zálohování selhalo - Cannot backup existing EEProm from TX, Flash process aborted - Nemohu zálohovat sávající EEPROM z rádia, Programování bylo přerušeno - - - Read EEPROM memory to File - Načíst EEPROM z rádia do souboru - - - Read Flash to File - 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 - Models and Settings Editor - %1 - companion9x - Editor nastavení rádia a modelů - %1 - - - + Do you want to write the firmware to the transmitter now ? Chcete zapsat firmware do rádia nyní ? - - - - + + + + Read Models and Settings From Tx Načíst modely a nastavení z rádia - + 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 - + + The selected language will be used the next time you start Companion. + + + + + + + OK + + + + + The new theme will be loaded the next time you start Companion. + + + + + The icon size will be used the next time you start Companion. + + + + 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 ? @@ -1657,686 +2368,747 @@ 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 + + &Old Preferences Dialog... + - The companion9x project was originally forked from eePe - Projekt companion9x vznikl oddělením z eePe + + Used the old Preferences Dialog + - - If you've found this program useful, please support by - Pokud vám byl tento program užitečný, podpořte jej + + &Application Preferences... + - - donating - darem + + Edit application preferences + - About companion9x - O aplikaci Companion9x + + Configure transmitter start screen... + - - - + + &%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 - - - + Contributors &List... &Seznam přispěvatelů... - Show companion9x contributors list - Zobrazit seznam přispěvatelů companion9x - - - + ChangeLog... Změny... - Show companion9x changelog - Zobrazit změny ve verzích companion9x - - - - The Companion project was originally forked from eePe + + A new release of Companion is available please check the OpenTX website! - + + OpenTX Home Page: <a href='%1'>%1</a> + + + + + The OpenTX Companion project was originally forked from <a href='%2'>eePe</a> + + + + + If you've found this program useful, please support by <a href='%1'>donating</a> + + + + + Version %1, %3 + + + + About Companion - + + &Downloads and Profiles... + + + + + Firmware and voice file downloads as well as profile definition. + + + + 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 connection software... + + + + Configure software for reading from and writing to the transmitter Nastavení softwaru pro čtení a zápis do rádia - + + Classic + + + + + The multicolor classical Companion icon theme + + + + + A monochrome black icon theme + + + + + A monochrome white icon theme + + + + + A monochrome blue icon theme + + + + + Small + + + + + Use small toolbar icons + + + + + Use normal size toolbar icons + + + + + Normal + Normální + + + + Use big toolbar icons + + + + + Big + + + + + Use huge toolbar icons + + + + + Huge + + + + + System default language + + + + + Use system default language in menus + + + + + Czech + + + + + Use Czech in menus + + + + + German + + + + + Use German in menus + + + + + English + + + + + Use English in menus + + + + + French + + + + + Use French in menus + + + + + Italian + + + + + Use Italian in menus + + + + + Hebrew + + + + + Use Hebrew in menus + + + + + Polish + + + + + Use Polish in menus + + + + + Portuguese + + + + + Use Portuguese in menus + + + + + Swedish + + + + + Use Swedish in menus + + + + + Russian + + + + + Use Russian in menus + + + + + Manuals and other Documents + + + + + Open the OpenTX document page in a web browser + + + + + Set Icon Theme + + + + + Set Icon Size + + + + + &Settings + + + + &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 - &Write EEPROM To Tx - &Zapsat do EEPROM rádia - - - + Ctrl+Alt+W - Write EEPROM to transmitter - Zapsat do EEPROM rádia - - - &Read EEPROM From Tx - &Načíst EEPROM z rádia - - - + Ctrl+Alt+R - Read EEPROM from transmitter - Načíst EEPROM z rádia - - - Write Flash memory - Zapsat do paměti FLASH rádia - - - Write flash memory to transmitter - Zapsat do paměti FLASH rádia - - - Write EEPROM memory from file - Zapsat ze souboru do EEPROM rádia - - - Write EEPROM memory from file to transmitter - Zapsat ze souboru do EEPROM rádia - - - Read EEPROM memory to file - Načíst EEPROM z rádia do souboru - - - Read EEPROM memory from transmitter to file - Načíst EEPROM z rádia a uložit do souboru - - - Read Flash memory - Načíst paměť FLASH z rádia - - - Read flash memory to transmitter - Načíst paměť FLASH z rádia - - - - &Configure... - &Konfigurace... - - - Configure burning software - 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 - + + Set Menu Language + + + + &File &Soubor - + &Edit &Úpravy - &Burn - &Programátor - - - - &Window - &Okno - - - + &Help &Nápověda - + File Soubor - + Edit Úpravy - Burn - Programátor - - - + Help Nápověda - + Ready Připraven - + Unable to find file %1! Nemohu nalézt soubor %1! - Invalid EEPROM File %1 - Neplatný soubor EEPROM %1 - - - + Error reading file %1: %2. Chyba při otevírání souboru %1: %2. - - Invalid binary EEPROM File %1 - Neplatný binární soubor EEPROM %1 - MdiChild @@ -2346,187 +3118,187 @@ Chcete ho přesto zapsat ? volné[B] - + Editing model %1: Editace modelu %1: - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + Error Chyba - - + + Unable to find file %1! Nemohu nalézt soubor %1! - - - - + + + + Error opening file %1: %2. Chyba při otevírání souboru %1: %2. - - + + Invalid EEPROM File %1 Neplatný soubor EEPROM %1 - - + + Error reading file %1: %2. Chyba při otevírání souboru %1: %2. - + Invalid binary EEPROM File %1 Neplatný binární soubor EEPROM %1 - - - - + + + + Save As Uložit jako - - - - + + + + Cannot write file %1: %2. Nelze zapsat soubor %1: %2. - - + + Error writing file %1: %2. Chyba při zápisuí souboru %1: %2. - + Do you want to use model wizard? Chcete použít průvodce nastavením modelu? - - - + + + Companion - + Ask this question again ? Zobrazovat tento dotaz i příště? - + %1 has been modified. Do you want to save your changes? %1 byl změněn. Chcete ho uložit? - + 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 - + Cannot write temporary file! Nelze zapsat dočasný soubor! - - - + + + 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. - - - + + + Backup EEPROM From Tx Zálohovat EEPROM z rádia - + Cannot check eeprom compatibility! Continue anyway? Nelze ověřit kompatibilitu EEprom! Mám přesto pokračovat? - - + + Warning Varování - + Firmware in radio is of a different family of eeprom written, check file and preferences! Firmware rádia je z jiné rodiny než EEprom, zkontrolujte nastavení předvoleb! - + Firmware in flash is outdated, please upgrade! Firmware rádia je zastaralý, aktualizujte ho prosím! - + Write EEPROM To Tx Zápis EEPROM do TX - + Open Otevřít - + Invalid binary backup File %1 Neplatný binární soubor zálohy %1 @@ -2534,158 +3306,116 @@ Chcete ho uložit? MixerDialog - + Dialog - + Source Zdroj - - - - + + + + The source for the mixer Zdroj pro mix - + Weight Váha - The value of the mixer is multiplied by this value and divided by 100. - Hodnota mixu násobena touto hodnotou a dělena 100. - - - - - - + Offset Ofset - <!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;">This value is added to the <span style=" font-weight:600;">input </span>of the mixer.</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;">Tato hodnota je přidána do <span style=" font-weight:600;">vstupu </span>mixeru.</p></body></html> - - - + Include Trim Použít trim - - - + + + GV GP - + No Ne - + Yes Ano - - Enable FM Trim - Povolit FM trim - - - + Curve Křivka - + The curve used by the mix Křivka použitá pro mix - Phase - Fáze - - - + Switch used by the mix. If blank then the mix is considered to be "ON" all the time. Spínač aktivující mix. Pokud není uveden je mix aktivní pořád. - - Curve/Differential - Křivka/Diferenciace - - - Phases - Fáze - - - + Switch Spínač - + Warning Varování - - Fix Offset - Kompenzovat Offset - - - + Mixer warning. Setting this value will cause a beep to be emmitted when this value is active. Zvukové upozornění mixu. Pokud je tato volba aktivní bude na aktivaci mixu upozorněno zvukovým signálem. - + OFF Vypnuto - + 1 Beep 1x pípnutí - + 2 Beep 2x pípnutí - + 3 Beep 3x pípnutí - + Multiplex Matematická operace - + Multiplexer This determines how mixer values are added. @@ -2702,109 +3432,105 @@ Toto určuje, jak bude hodnota mixu přidána. "R" znamená že hodnota nahradí předchozí hodnoty. Pokud je spínač vypnutý hodnota bude ignorována. - + ADD Sečíst - + MULTIPLY Násobit - + REPLACE Zaměnit - Differential - Diferenciace výchylek - - - + Name Název - + Flight modes Letové režimy - + Include DR/Expo Použít DR/Expo - + 0 - + 1 - + 2 - + 3 - + 4 - + 5 - + 6 - + 7 - + 8 - + Delay Zpoždění - + Slow Zpomalení - + Up Při zapnutí mixu / (+) - + Down Při vypnutí mixu / (-) - - - - + + + + <!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; } @@ -2829,3764 +3555,1415 @@ 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;">Pokud je nastaveno zpomalení, nastavená hodnota udává rychlost mixu -&gt; hodnota udává počet sekund které trvá změna hodnoty z -100 na 100.</p></body></html> - + DEST -> X%1 - + DEST -> CH%1%2 - - - FM Trim Value - Hodnota FM trimu - - - + Rud Směrovka - + Ele Výškovka - + Thr Plyn - + Ail Křidélka + + MixesPanel + + + + Move Up + Posunout nahoru + + + + + Ctrl+Up + + + + + + Move Down + Posunout dolů + + + + + Ctrl+Down + + + + + Clear Mixes + Vymazat všechny mixy + + + + + + X%1 + + + + + + + CH%1%2 + + + + + Weight(%1) + + + + + Switch(%1) + + + + + No Trim + Žádný trim + + + + No DR/Expo + Bez DR/Expo + + + + Offset(%1) + + + + + Delay(u%1:d%2) + Zpoždění(u%1:d%2) + + + + Slow(u%1:d%2) + Zpomalení(u%1:d%2) + + + + Warn(%1) + Varování(%1) + + + + Not enough available mixers! + Není k dispozici dostatek mixů! + + + + Delete Selected Mixes? + Odstranit vybrané mixy? + + + + &Add + &Přidat + + + + Ctrl+A + + + + + &Edit + + + + + Enter + + + + + &Delete + &Odstranit + + + + Delete + + + + + &Copy + &Kopírovat + + + + Ctrl+C + + + + + &Cut + &Vyjmout + + + + Ctrl+X + + + + + &Paste + &Vložit + + + + Ctrl+V + + + + + Du&plicate + &Duplikovat + + + + Ctrl+U + + + + + Clear Mixes? + Vymazat mixy? + + + + Really clear all the mixes? + Opravdu vymazat všechny mixy? + + ModelEdit - + Dialog - + Simulate Simulace - + Setup Nastevní - - - - mSec - ms + + Heli + - - - - - - - ch - + + Inputs + - - - - usec - us + + Logical Switches + - - - - Protocol - Protokol + + Switch Assignment + - - - - PPM Frame Length - Délka PPM rámce - - - - - + Channels Počet kanálů - - - - PPM delay - PPM zpoždění - - - - Trim Increment - Krok trimu - - - - Throttle2Trig - - - - - Throttle Expo - Expo plynu - - - - Extended Limits - Rozšířené limity (125%) - - - - - - Positive - Pozitivní - - - - - - Negative - Negativní - - - - Pulse Shift (polarity) - Řazení pulzů (polarita) - - - - Timer2 - - - - - Disable Throttle Warning - Nevarovat při zapnutém plynu - - - - Exponential - Exponenciální - - - - Extra Fine - Extra jemný - - - - Fine - Jemný - - - - Medium - Střední - - - - Coarse - Hrubý - - - - Switch startup Warning - Kontrola výchozí polohy spínačů - - - - Instant Trim - - - - - Center beep - Zvuk ve středové poloze - - - - Throttle Trim - Trim plynu - - - - Throttle Source - Throttle Trace - Stopa plynu (pro spínání stopek) - - - Trainer - Trenér - - - - - RX Number - Číslo přijímače - - - - Timer1 - - - - - - - - - THR - - - - - P1 - - - - - P2 - - - - - P3 - - - - - - CH01 - - - - - - CH02 - - - - - - CH03 - - - - - - CH04 - - - - - - CH05 - - - - - - CH06 - - - - - - CH07 - - - - - - CH08 - - - - - - CH09 - - - - - - CH10 - - - - - - CH11 - - - - - - CH12 - - - - - - CH13 - - - - - - CH14 - - - - - - CH15 - - - - - - CH16 - - - - - Extended Trims - Rozšířený rozsah trimů - - - - - LP4/LP5 - - - - - - DSM2only - Jen DSM2 - - - - - DSM2/DSMX - - - - - - DSM Type - Typ DSM - - - - Model Name - Název modelu - - - - REa - - - - - - - - - - - - - RUD - - - - - - - - - - - - - - - - ELE - - - - - - - - - - - - - - AIL - - - - - REb - - - - - 3POS - - - - - - Check - Kontrola - - - - - - ON - ZAPNUTO - - - - - OFF - VYPNUTO - - - - GEA - - - - - ID0 - - - - - ID1 - - - - - ID2 - - - - - - mm:ss - - - - - - Count Down - Odečítat - - - - - Count Up - Přičítat - - - - - TriggerB - Spínač B - - - - - (00:00:00) - - - - - Model Voice - Zvuková stopa - - - - - Failsafe Mode - Režim Failsafe - - - - - Hold - Držet hodnotu - - - - - Custom - Vlastní - - - - - No Pulses - Žádné pulzy - - - - - Heli Setup - Heli - - - - Swash Type - Typ cykliky - - - - - Off - VYPNUTO - - - - 120 - - - - - 120X - - - - - 140 - - - - - 90 - - - - - Collective - Kolektiv - - - - Swash Ring - Cyklika - - - - - - Invert - Invertovat - - - - Invert Elevator - Invertovat výškovku - - - - Invert Aileron - Invertovat křidélka - - - - Invert Collective - Invertovat kolektiv - - - Phases - Letové fáze - - - Flight Phase 0 (Default) - Fáze FP0 (Výchozí) - - - Phase Name - Název - - - - - - - - - - - - Fade In - Přechod při aktivaci - - - - - - - - - - - - Fade Out - Přechod při deaktivaci - - - - - - - - - - - - trim1 - - - - - - - - - - - - - trim2 - - - - - - - - - - - - - trim4 - - - - - - - - - - - - - trim3 - - - - - - - - - - - - - GVAR1 - Glob.Proměnná GP1 - - - - - - - - - - - - Rotary encoder A - - - - - - - - - - - - - GVAR2 - Glob.Proměnná GP2 - - - - - - - - - - - - Rotary encoder B - - - - - - - - - - - - - GVAR3 - Glob.Proměnná GP3 - - - - - - - - - - - - GVAR4 - Glob.Proměnná GP4 - - - - - - - - - - - - GVAR5 - Glob.Proměnná GP5 - - - FP 1 - Fáze FP1 - - - - - - - - - - - - - - - - Switch - Spínač - - - FP 2 - Fáze FP2 - - - FP 3 - Fáze FP3 - - - FP 4 - Fáze FP4 - - - FP 5 - Fáze FP5 - - - FP 6 - Fáze FP6 - - - FP 7 - Fáze FP7 - - - FP 8 - Fáze FP8 - - - Expos/DR - DR/Expo - - - + Mixes Mixer - - Limits - Limity - - - NOR - --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INV - - - - - - - Channel - Kanál - - - - - - Offset - Subtrim - - - - ModelSetup - Nastavení modelu - - - - - Persistent - Ukládání - - - - - MinuteBeep - Minuta - - - - - CountDownBeep - Odpočet - - - - SB - - - - - SD - - - - - SA - - - - - SC - - - - - SG - - - - - SE - - - - - SF - - - - - RS - - - - Trainer mode - Mód trenér - - - - RF Module 1 - RF Modul 1 - - - - RF Module 2 - RF Modul 2 - - - - Failsafe - - - - - External module - Externí modul - - - - Internal Module - Interní modul - - - + Flight Modes Letové režimy - - Flight Mode 0 (Default) - Letový Režim 0 (Výchozí) - - - - - - - - - - - - Flight Mode Name - Název režimu - - - - FM 1 - LR 1 - - - - FM 2 - LR 2 - - - - FM 3 - LR 3 - - - - FM 4 - LR 4 - - - - FM 5 - LR 5 - - - - FM 6 - LR 6 - - - - FM 7 - LR 7 - - - - FM 8 - LR 8 - - - - Show channels names in mixes - Zobrazit názvy kanálů v mixech - - - - - - - - Min - - - - - - - - - Max - - - - PPM Center - Střed PPM - - - - - Sym - Symetrický - - - + Curves Křivky - - Curve 1 - Křivka k1 - - - - Curve 2 - Křivka k2 - - - - Curve 3 - Křivka k3 - - - - Curve 4 - Křivka k4 - - - - Curve 5 - Křivka k5 - - - - Curve 6 - Křivka k6 - - - - Curve 7 - Křivka k7 - - - - Curve 8 - Křivka k8 - - - - Curve 9 - Křivka k9 - - - - Curve 10 - Křivka k10 - - - - Curve 11 - Křivka k11 - - - - Curve 12 - Křivka k12 - - - - Curve 13 - Křivka k13 - - - - Curve 14 - Křivka k14 - - - - Curve 15 - Křivka k15 - - - - - Center - Střed - - - - Curve 16 - Křivka k16 - - - - - Curve type - Typ křivky - - - - 3 points - 3 body - - - - 3 points custom - 3 vlastní body - - - - 5 points - 5 bodů - - - - 5 points custom - 5 vlastních bodů - - - - 9 points - 9 bodů - - - - 9 points custom - 9 vlastních bodů - - - - 17 points - 17 bodů - - - - 17 points custom - 17 vlastních bodů - - - - Curve name - Název křivky - - - - Curve Creator - Kurvítko: - - - - Y at X=100 - Y na X=100 - - - - Both - Obě - - - - x>0 - - - - - x<0 - - - - - Linear - Lineární - - - - Single Expo - Expo - - - - Symmetrical f(x)=-f(-x) - Symetrická f(x)=-f(-x) - - - - Symmetrical f(x)=f(-x) - Symetrická f(x)=f(-x) - - - - Apply - Použít - - - - Side - Strana - - - - Y at X=-100 - Y na X=-100 - - - - Y at X=0 - Y na X=0 - - - - Coefficient - Koeficient - - - - Clear All Curves - Smazat všechny křivky - - - - Custom switches - Virtuální spínače - - - - CS9 - VS9 - - - - - Duration - Trvání - - - CSwitchF - VSF - - - CSwitchD - VSD - - - - - AND - - - - - - V2 - - - - - - V1 - - - - CSwitch6 - VS6 - - - CSwitch9 - VS9 - - - - Model Image - Obrázek modelu - - - - Reverse Throttle Operation - Reverzovat funkci plynu - - - - 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. - - - Obrácení funkce plynu. -Pokud je zaškrtnuto,funkce plynu bude opačná. Poloha vypnuto bude nahoře. -Funkce trimu bude opačná, stejně tak i varování polohy páky plynu. - - - - - - Master - Učitel - - - - Slave - Žák - - - - Trainer Mode - Mód trenér - - - - Master/Trainer Port - Port učitel/žák - - - - - - Start - První kanál - - - - - Polarity - Polarita - - - - GVAR6 - Glob.Proměnná GP6 - - - - GVAR7 - Glob.Proměnná GP7 - - - CSwitch1 - VS1 - - - CSwitch8 - VS8 - - - CSwitch7 - VS7 - - - CSwitchA - VSA - - - CSwitchB - VSB - - - CSwitchC - VSC - - - CSwitch5 - VS5 - - - - - - - Function - Funkce - - - CSwitch3 - VS3 - - - CSwitch2 - VS2 - - - CSwitchE - VSE - - - CSwitchG - VSG - - - CSwitch4 - VS4 - - - - - Delay - Zpoždění - - - CSwitchT - VST - - - CSwitchM - VSM - - - CSwitchP - VSP - - - CSwitchH - VSH - - - CSwitchO - VSO - - - CSwitchN - VSN - - - CSwitchQ - VSQ - - - CSwitchR - VSR - - - CSwitchS - VSS - - - CSwitchL - VSL - - - CSwitchK - VSK - - - CSwitchJ - VSJ - - - CSwitchI - VSI - - - CSwitchU - VSU - - - CSwitchV - VSV - - - CSwitchW - VSW - - - - Safety Switches - Bezpečnostní spínače - - - - Value - Hodnota - - - - Custom Functions - Function switches - Funkce - - - - - Param - Parametr - - - - - Enable - Povolit - - - + Telemetry Telemetrie - - Serial Protocol - Sériový protokol - - - - Volt source - Snímač napětí - - - - Metric - Metrické - - - - Imperial - Imperiální - - - - Current source - Snímač proudu - - - - NONE - Žádný - - - - - - - A1 - - - - - - - - A2 - - - - - - FAS - - - - - None - Žádný - - - - FrSky Sensor Hub - FrSky Senzor Hub - - - - CEL - Článek - - - - 2 - 2 - - - - 3 - - - - - 4 - - - - - Units - Jednotky - - - - Blades - Počet listů vrtule - - - - Altimetry / Vario - - - - Barometer V1 - Barometr V1 - - - Barometer V2 - Barometr V2 - - - - Vario source - Vario senzor - - - - Vario limits - Rozsah varia - - - - Use GPS as altitude source - Použít GPS jako senzor výšky - - - - Display altitude in toolbar - Zobrazit výšku v nástrojové liště - - - - - Unit - Jednotky - - - - - Max Value - Maximim - - - - - Alarm 1 - - - - - - - - - - ---- - - - - - - - - - - Yellow - Žlutá - - - - - - - - - Orange - Oranžová - - - - - - - - - Red - Červená - - - - - - - < - - - - - - - - > - - - - - - - Alarm 2 - - - - - - Min Value - Minimum - - - - - Volts (V) - Volty (V) - - - - - Amps (A) - Ampéry (A) - - - - - Speed (m/s or ft/s) - Rychlost (m/s nebo ft/s) - - - - - Raw (-) - Jednotky (-) - - - - - Speed (km/h or miles/h) - Rychlost (km/h nebo míle/h) - - - - - Meters (m or ft) - Vzdálenost (m nebo ft) - - - - - Temp (°) - Teplota (°) - - - - - Fuel (%) - Palivo (%) - - - - - mAmps (mA) - MiliAmpéry (mA) - - - - RSSI - - - - - Alarm 1 - - - - Telemetry Gauges - Telemetrické ukazatele - - - - - - Gauge 1 - Ukazatel 1 - - - - - - Gauge 2 - Ukazatel 2 - - - - - - Gauge 3 - Ukazatel 3 - - - - - - Gauge 4 - Ukazatel 4 - - - - - - Source - Zdroj - - - - Sink Max - Sunk Max - Klesání Max - - - - Climb Max - Raise Max - Stoupání Max - - - - Sink Min - Sunk Min - Klesání Min - - - - Climb Min - Raise Min - Stoupání Min - - - - - - Gauge - Ukazatel - - - - Telemetry screen 1 - Panel telemetrie 1 - - - - Sticks - Páky - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- - - - - - CSF - VSF - - - - CSD - VSD - - - - CS6 - VS6 - - - - CS1 - VS1 - - - - CS8 - VS8 - - - - CS7 - VS7 - - - - CSA - VSA - - - - CSB - VSB - - - - CSC - VSC - - - - CS5 - VS5 - - - - CS3 - VS3 - - - - CS2 - VS2 - - - - CSE - VSE - - - - CSG - VSG - - - - CS4 - VS4 - - - - CST - VST - - - - CSM - VSM - - - - CSP - VSP - - - - CSH - VSH - - - - CSO - VSO - - - - CSN - VSN - - - - CSQ - VSQ - - - - CSR - VSR - - - - CSS - VSS - - - - CSL - VSL - - - - CSK - VSK - - - - CSJ - VSJ - - - - CSI - VSI - - - - CSU - VSU - - - - CSV - VSV - - - - CSW - VSW - - - - Alti - - - - - Alti+ - - - - - Vario - - - - Center Max - Střed Max - - - Center Min - Střed Min - - - - - - Custom Screen Type - Typ panelu - - - - - - Nums - Hodnoty - - - - - - Bars - Ukazatele - - - - Telemetry screen 2 - Panel telemetrie 2 - - - - Telemetry screen 3 - Panel telemetrie 3 - - - - Templates - Šablony - - - - - - - Move Up - Posunout nahoru - - - - - - - Ctrl+Up - - - - - - - - Move Down - Posunout dolů - - - - - - - Ctrl+Down - - - - - Clear Expo Settings - Vymazat všechna expa - - - - Clear Mixes - Vymazat všechny mixy - - - - Weight - Váha - - - - - Expo - Expo - - - Phase - Fáze - - - - - Curve - Křivka - - - - - - CH%1%2 - - - - - - DISABLED - ZAKÁZÁN - - - - S1 - - - - - S2 - - - - - LS - - - - - Rud - Směrovka - - - - Ele - Výškovka - - - - Ail - Křidélka - - - - Thr - Plyn - - - - - Flight modes - Letové režimy - - - - - Flight mode - Letový režim - - - - - - X%1 - - - - - No Trim - Žádný trim - - - - No DR/Expo - Bez DR/Expo - - - - FMTrim - - - - - Diff - Dif - - - - Delay(u%1:d%2) - Zpoždění(u%1:d%2) - - - - Slow(u%1:d%2) - Zpomalení(u%1:d%2) - - - - Warn(%1) - Varování(%1) - - - FSW%1 - FS%1 - - - - - - - CH %1 - - - - CFN%1 - Fce%1 - - - - CF%1 - FN%1 - - - - Error - Chyba - - - - Unable to find sound file %1! - Nemohu nalézt zvukový soubor %1! - - - - Winged Shadow How High - - - - - Winged Shadow How High (not supported) - Winged Shadow How High (nepodporován) - - - - - Range - Rozsah - - - - Simple 4-CH - Základní 4-kanál - - - - T-Cut - - - - - Sticky T-Cut - - - - - V-Tail - - - - - Elevon\Delta - - - - - Heli Setup with gyro gain control - Nastavení Heli s řízením zisku gyra - - - - Gyro gain control - Řízení zisku gyra - - - - Heli Setup (Futaba's channel assignment style) - Nastavení Heli (Styl přiřazení kanálů - Futaba) - - - - Heli Setup with gyro gain control (Futaba's channel assignment style) - Nastavení Heli s řízením zisku gyra(Styl přiřazení kanálů - Futaba) - - - - Gyro gain control (Futaba's channel assignment style) - Řízením zisku gyra(Styl přiřazení kanálů - Futaba) - - - - Servo Test - - - - - MultiCopter - - - - - Use Model Config Wizard - Použít průvodce nastavením modelu - - - - Editing curve %1 - Upravit křivku k%1 - - - - Not enough available mixers! - Není k dispozici dostatek mixů! - - - - Not enough available expos! - Není k dispozici dostatek exp! - - - - Delete Selected Mixes? - Odstranit vybrané mixy? - - - - Delete Selected Expos? - Odstranit vybraná expa? - - - - - &Add - &Přidat - - - - - Ctrl+A - - - - - - &Edit - &Upravit - - - - - Enter - - - - - - - - &Delete - &Odstranit - - - - - - - Delete - - - - - - - - &Copy - &Kopírovat - - - - - - - Ctrl+C - - - - - - - - &Cut - &Vyjmout - - - - - - - Ctrl+X - - - - - - - - &Paste - &Vložit - - - - - - - Ctrl+V - - - - - - Du&plicate - &Duplikovat - - - - - Ctrl+U - - - - - Are you sure you want to delete curve %1 ? - Opravdu chcete smazat křivku %1 ? - - - - Apply Template? - Použít šablonu? - - - - Apply template "%1"? - Použít šablonu "%1"? - - - - Clear Expos? - Vymazat expa? - - - - Really clear all the expos? - Opravdu vymazat všechna expa? - - - - - - Clear Mixes? - Vymazat mixy? - - - - Really clear all the mixes? - Opravdu vymazat všechny mixy? - - - + Clear Curves? Vymazat křivky? - + Really clear all the curves? Opravdu vymazat všechny křivky? - - - - - - AIL2 - Křidélko2 - - - - - - - ELE2 - Výškovka2 - - - - - - - - - FLAPS - Klapky - - - - - - - - - FLAP%1 - Klapka%1 - - - - - - - PITCH - - - - - - - - - - - - GYRO - Gyro - - - - - SPOIL - Spoiler - - - - - SPOIL%1 - Spoiler%1 - - - - - RUD2 - Směrovka2 - - - - Really clear existing mixes on CH6? - Opravdu vymazat současné mixy v kanálu CH6? - - - - Really clear existing mixes on CH5? - Opravdu vymazat současné mixy v kanálu CH5? - - - - Not enough free points in eeprom to store the curve. - Není dostatek volných pozic v eeprom pro uložení křivky. - ModelsListWidget - + &Edit &Upravit - + &Restore from backup &Obnovit ze zálohy - + &Model Wizard &Průvodce nastavením modelu - + &Delete &Odstranit - + Delete - + &Copy &Kopírovat - + Ctrl+C - + &Cut &Vyjmout - + Ctrl+X - + &Paste &Vložit - + Ctrl+V - + D&uplicate &Duplikovat - + Ctrl+U - + &Use as default &Použít jako výchozí - + P&rint model Vy&tisknout model - + Alt+R - + &Simulate model &Simulovat model - + Alt+S - + General Settings Obecná nastavení - + Delete Selected Models? Odstranit vybrané modely? - - + + Cannot delete default model. Nelze odstranit výchozí model. - + Cannot cut default model. Nelze přesunout výchozí model. - + Do you want to overwrite TX general settings? Chcete přepsat obecná nastavení rádia? - + You are pasting on an not empty model, are you sure? Vkládáte do modelu který není prázdný, jste si jist? - + No free slot available, cannot duplicate Není už volný slot, nelze duplikovat + + Module + + + Form + + + + + Failsafe Mode + Režim Failsafe + + + + Start + První kanál + + + + PPM delay + PPM zpoždění + + + + usec + us + + + + Negative + Negativní + + + + Positive + Pozitivní + + + + RX Number + Číslo přijímače + + + + Master + Učitel + + + + Slave + Žák + + + + Polarity + Polarita + + + + Trainer Mode + Mód trenér + + + + mSec + ms + + + + PPM Frame Length + Délka PPM rámce + + + + Label + + + + + + ch + + + + + Channels + Počet kanálů + + + + Hold + Držet hodnotu + + + + Custom + Vlastní + + + + No Pulses + Žádné pulzy + + + + Failsafe Positions + + + + + Protocol + Protokol + + + + ModulePanel + + + Trainer Output + + + + + Internal Radio System + + + + + External Radio Module + + + QObject - - + + Rud Směrovka - - + + Ele Výškovka - - + + Thr Plyn - - + + Ail Křidélka - - - + + + P1 Potenciometr 1 - - - + + + P2 Potenciometr 2 - - - + + + P3 Potenciometr 3 - - + + S1 - - + + S2 - - + + LS - - + + RS - + TrmR Trim směrovky - + TrmE Trim výškovky - + TrmT Trim plynu - + TrmA Trim křidélek - + + + REa Otočný enkodér :a - + + + REb Otočný enkodér :b - - SA - - - - - SB - - - - - SC - - - - - SD - - - - - SE - - - - - SF - - - - - SG - - - - - SH - - - - + Batt Bat - + A1 Telem. vstup A1 - + A2 Telem. vstup A2 - + Alt Výška - + Rpm Otáčky - + Fuel Palivo - + T1 - + Tx - + Rx - + SWR VSR - + RSSI - + T2 - + Speed Rychlost - + Dist Vzdálenost - + GPS Alt Výška GPS - + Cell Článek - + Cels Články - + Vfas - + Curr Proud - + Cnsp - + Powr Výkon - + AccX - + AccY - + AccZ - + HDG - + VSpd - + A1- - + A2- - + Alt- - + Alt+ - + Rpm+ - + T1+ - + T2+ - + Spd+ - + Dst+ - + Cur+ - + ACC - + Time - + Pwr+ - + + + LS1 + + + + + + LS2 + + + + + + LS3 + + + + + + LS4 + + + + + + LS5 + + + + + + LS6 + + + + + + LS7 + + + + + + LS8 + + + + + + LS9 + + + + + + LSA + + + + + + LSB + + + + + + LSC + + + + + + LSD + + + + + + LSE + + + + + + LSF + + + + + + LSG + + + + + + LSH + + + + + + LSI + + + + + + LSJ + + + + + + LSK + + + + + + LSL + + + + + + LSM + + + + + + LSN + + + + + + LSO + + + + + + LSP + + + + + + LSQ + + + + + + LSR + + + + + + LSS + + + + + + LST + + + + + + LSU + + + + + + LSV + + + + + + LSW + + + + + Input %1 + + + + MAX - - - 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 - - - - - CSK - VSK - - - - - CSL - VSL - - - - - CSM - VSM - - - - - CSN - VSN - - - - - CSO - VSO - - - - - CSP - VSP - - - - - CSQ - VSQ - - - - - CSR - VSR - - - - - CSS - VSS - - - - - CST - VST - - - - - CSU - VSU - - - - - CSV - VSV - - - - - CSW - VSW - - - - ONE - * - - - - !ONE - ! * - - - - TRNs + + S11 - - TRNl + + S12 - - REAs + + S13 - - REAl + + S14 - - 3POS - Přepínač 3POS + + S15 + - + + S16 + + + + + S21 + + + + + S22 + + + + + S23 + + + + + S24 + + + + + S25 + + + + + S26 + + + + CYC%1 - + PPM%1 - + CH%1%2 - + X%1 - - - - + + + + ---- - - - - + + THR THR - - - RUD - RUD - - - - - ELE - ELE - - - - ID0 - ID0 - - - - ID1 - ID1 - - - - ID2 - ID2 - - - - - AIL - AIL - - - - - GEA - GEA - - - - - TRN - TRN - - - CS%1 - VS%1 - - - - + + ON ZAPNUTO - mON - mZAPNUTO - - - - + + + OFF VYPNUTO - + + Diff(%1) + + + + + Expo(%1) + + + + + Function(%1) + + + + + Curve(%1) + + + + + !Curve(%1) + + + + th9x - + er9x - gruvin9x stable for stock board - gruvin9x(stabilní vydání) pro originál 9x - - - gruvin9x trunk for stock board - gruvin9x(pracovní verze) pro originál 9x - - - gruvin9x stable for v4 board - gruvin9x(stabilní vydání) pro v4 desku - - - gruvin9x trunk for v4 board - gruvin9x(pracovní verze) pro v4 desku - - - open9x for stock board - open9x pro 9X zákl. desku - - - - + + Support for frsky telemetry mod Podpora frsky telemetrie tj. zobrazení telemetrických dat na displeji rádia (je potřeba upravit HW, bez této úpravy nebudou fungovat dva přepínače! a pochopitelně nebudou zobrazena žádná telem. data.) - - + + Support for jeti telemetry mod Podpora telemetrie JETI - - + + Support for receiving ardupilot data telemetrie - podpora pro příjem ardupilot dat - - + + Support for receiving NMEA data telemetrie - podpora pro příjem NMEA dat - + Support for telemetry easy board Podpora pro desku TelemetrEZ - - + + Support for MAVLINK devices Podpora pro zařízení s MAVLINK - + Rotary Encoder use in menus navigation Použít Rotary Encoder pro navigaci v menu - + Possibility to enable FAI MODE at field Možnost povolit FAI MODE v menu rádia. FAI je soutěžní mód (www.fai.org), zablokuje vario, zobrazení telemetrie a funkce hlasového hlášení. - + FAI MODE always enabled FAI MODE vždy aktivní (nelze vypnout v menu rádia) FAI je soutěžní mód (www.fai.org), zablokuje vario, zobrazení telemetrie a funkce hlasového hlášení. - - openTx for 9X board - openTx pro 9X zákl. desku - - - - - - - + + + + + Enable heli menu and cyclic mix support Funkce pro heli, nastavení typu mechaniky - - - - - - + + + + + + Enable TEMPLATES menu Přidá menu s jednoduchými šablonami modelu - - - - + + + + No splash screen Bez úvodního loga Firmware nebude obsahovat žádné logo, ani podporu pro něj. Toto se hodí pokud je potřeba ušetřit místo v paměti FLASH pro jiné funkce - - - - - - + + + + + + No flight modes Firmware nebude obsahovat podporu Letových Režimů - - - - - - + + + + + + In model setup menus automatically set source by moving some of them V menu nastavení modelu automaticky nastavíte Zdroj jeho pohybem - - - - - - - - + + + + + + + + Use alternative SQT5 font Použít alternativní znakovou sadu písma (jiný font) - + EEprom write progress bar Progresbar zobrazující zápis do EEPROM (tj. ukládání nastavení) - - + + No Winged Shadow How High support Bez podpory - Winged Shadow How High - - + + No vario support Bez podpory varia - - + + No GPS support Bez podpory GPS - - + + No gauges in the custom telemetry screen Bez grafických ukazatelů hodnoty na obrazovkách telemetrie - - openTx for 9XR - openTx pro 9XR zákl desku + + Allow compensating for offset errors in FrSky FAS current sensors + - - openTx for 9XR with M128 chip - openTx pro 9XR zákl desku s M128 + + OpenTX for M128 / 9X board + - + + OpenTX for 9XR + + + + + OpenTX for 9XR with M128 chip + + + + + OpenTX for Gruvin9x board / 9X + + + + + OpenTX for Sky9x board / 9X + + + + + OpenTX for FrSky Taranis Rev4a + + + + Use FrSky Taranis sticks in a 9X/9XR Použití pák z Taranis (hardware) v rádiu 9X/9XR - - + + OpenTX for FrSky Taranis + + + + + Disable HELI menu and cyclic mix support Odstranit funkce pro heli a nastavení typu mechaniky - - + + Disable TEMPLATES menu Odstranit menu s jednoduchými šablonami modelu - - + + Disable Global variables Odstranit Globální proměnné - - openTx for FrSky Taranis Rev4a - openTx pro FrSky Taranis Rev4a - - - No flight phases - Bez letových režimů - - - - - - - - + + + + + + Disable curves menus Bez uživatelsky definovatelných křivek - - - - + + + + Support for radio modified with regular speaker Vylepšený zvukový výstup, funkční i s origo pípákem, @@ -6594,120 +4971,97 @@ ale doporučuje se provést instalaci reproduktoru - - - - - + + + + + Used if you have modified your radio with voice mode Hlasový výstup pro telemetrii, nutno zastavět hlasový modul - - - - + + + + Used if you have modified your radio with haptic mode Výstrahy pomocí vibračního motoru (je třeba osadit) - - - - - - + + + + + + Battery graph Grafické znázornění stavu baterie - - - - + + + + Enable the throttle trace in Statistics Přidat Stopu Plynu (Throttle-trace) v panelu STATISTIKA - - openTx for M128 / 9X board - openTx pro 9X zákl. desku s M128 - - - openTx for 9XR board - openTx pro 9XR zákl desku - - - openTx for M128 / 9XR board - openTx pro 9XR zákl desku s M128 - - - - openTx for Gruvin9x board / 9X - openTx pro Gruvin9x zákl desku / 9X - - - + Support of FrSky PXX protocol Podpora pro Frsky PXX protokol - - openTx for Sky9x board / 9X - openTx pro Sky9x zákl. desku / 9X - - - - openTx for FrSky Taranis - openTx pro FrSky Taranis - - - - - - - + + + + + Support for DSM2 modules Podpora DSM2 modulů - + Your radio probably uses a wrong firmware, eeprom size is 4096 but only the first 2048 are used Vaše rádio pravděpodobně nepoužívá správnou verzi firmware, velikost eeprom je 4096B, ale pouze prvních 2048B je použito. - - - - - - + + OpenTX for 9X board + + + + + + + + + PPM center adjustment in limits Možnost nastavovat střed serva šířkou pulzu - - - - - - - - + + + + + + + + PPM values displayed in us hodnoty PPM budou zobrazeny v us (mikrosekundy) - - - - - - + + + + + + Symetrical Limits Symetrické limity Přidá možnost volby mezi @@ -6718,44 +5072,40 @@ Přidá možnost volby mezi nastavené limity tedy nemusí být rovny hodnotě -100% a 100%, ale budou pouze maximem výchylky) - - - - - + + + + + Pots use in menus navigation Moznost zadávat hodnoty a pohybovat se v menu pomocí potenciometrů - TelemetrEZ board support - Podpora přídavné desky TelemetrEZ - - - - + + SmartieParts 2.2 Backlight support Podpora pro modul SmartieParts 2.2 (programátor/podsvícení) Není určeno pro starší verze Smartie Parts - - - - - - + + + + + + In model setup menus automatically set switch by moving some of them Výběr spínače v mixu atd. se provádí jeho sepnutím - - - - + + + + Enable resetting values by pressing up and down at the same time Rychlé nastavení hodnoty současným stiskem dvou tlačítek. (+) a (-) invertuje hodnotu @@ -6764,22 +5114,22 @@ se provádí jeho sepnutím (UP) a (DN) vastaví výchozí hodnotu - - - - - - + + + + + + No graphical check boxes and sliders Nahrazeni posuvníku a zatržítek (checkboxu) textem - - - - - - + + + + + + Don't use bold font for highlighting active items Vypnout zvýraznění aktivních mixů/spínačů tučným písmem. Pokud není tato volby vybrána, @@ -6788,48 +5138,36 @@ zobrazovány tučným pismem. Neaktivní mixy/spínače budou zobrazeny normálním písmem - Don't show the throttle trace in Statistics - Nezobrazovat Stopu Plynu (Throttle-trace) v panelu STATISTIKA - - - - - - + + + + EEprom write Progress bar Progresbar zobrazující zápis do EEPROM (tj. ukládání nastavení) - - - - - + + + + + Imperial units Imerialní jednotky pro telemetrii (stopy, palce, míle atd.) - open9x for 9XR board - open9x pro 9XR zákl desku - - - + Bluetooth interface - open9x for x9da board - open9x pro x9da zákl. desku - - - - - - - - + + + + + + Global variables Aktivuje Globální Proměnné Jsou to proměnné, které lze použít pro konfiguraci místo některých pevných číselných hodnot. @@ -6838,228 +5176,38 @@ Jejich hodnoty naleznete u originální 9x desky v seznamu křivek. U ostatních Nastavení hodnoty se provádí přímo v seznamu proměnných, nebo pomocí Funkce - open9x for M128 / stock board - open9x pro 9X zákl. desku s M128 - - - open9x for gruvin9x board - open9x pro gruvin9x zákl. desku - - - + Support for SD memory card Podpora paměťové karty SD - + Support for DSM2 modules using ppm instead of true serial Podpora DSM2 modulů s použitím PPM místo sériového protokolu - open9x for sky9x board - open9x pro sky9x desku - - - open9x for ersky9x board - open9x pro ersky9x desku - - - + Enable HELI menu and cyclic mix support Funkce pro heli, nastavení typu mechaniky - + ersky9x - - er9x doesn't have Rotary Encoders - v er9x nelze použít rotační enkodéry - - - - er9x doesn't have trims as source - v er9x nelze použít trim jako vstup - - - - er9x doesn't have negative gvars as weight - v er9x nelze použít negativní GP jako hodnotu váhy - - - - er9x doesn't have negative gvars as offset - v er9x nelze použít negativní GP jako hodnotu ofsetu - - - - - - er9x doesn't have swappable trims - v er9x nelze přehodit trimy - - - - - - er9x on this board doesn't have Rotary Encoders - v er9x na této desce nelze použít rotační enkodéry - - - - er9x does not support Custom Switch function %1 - er9x nepodporuje ve VS funkci %1 - - - - - - er9x does not support this range for A1/A2 - er9x nepodporuje tento rozsah pro A1/A2 - - - - - - er9x does not support this telemetry units - er9x nepodporuje tyto telemetrické jednotky - - - - - Er9x doesn't accept this protocol - Er9x nepodporuje tento protokol - - - - - Er9x doesn't support custom curves as curve%1, curve as been exported as fixed point - Er9x doesn't support custom curves as curve%1, curve as been imported as fixed point - Er9x nepodporuje křivky s vlastními body jako křivka k%1, tato křivka byla exportována jako křivka s pevnými body - - - - - Er9x doesn't support curve with %1 point as curve%2 - Er9x nepodporuje křivku s %1 body jako má křivka k%2 - - - - - ersky9x doesn't have Rotary Encoders - v ersky9x nelze použít rotační enkodéry - - - - - ersky9x doesn't have trims as source - v ersky9x nelze použít trim jako vstup - - - - - ersky9x does not support Custom Switch function %1 - ersky9x nepodporuje ve VS funkci %1 - - - - - Ersky9x doesn't accept this protocol - Ersky9x nepodporuje tento protokol - - - - - - - ErSky9x doesn't support custom curves as curve%1, curve as been exported as fixed point - ErSky9x doesn't support custom curves as curve%1, curve as been imported as fixed point - ErSky9x nepodporuje křivky s vlastními body jako křivka k%1, tato křivka byla exportována jako křivka s pevnými body - - - - - - - ErSky9x doesn't support curve with %1 point as curve%2 - ErSky9x nepodporuje křivku s %1 body jako má křivka k%2 - - - - - - - + + + + Warning Varování - - + EEPROM saved with these warnings: EEPROM uložena s těmito varováními: - - - - - - Flight modes settings on expos not exported - Phases settings on expos not exported - Nastavení letových režimů v expech nebylo exportováno - - - - - - - - - - - Open9x on this board doesn't have Rotary Encoders - v Open9x na této desce nelze použít rotační enkodéry - - - - gruvin9x doesn't have trims as source - v gruvin9x nelze použít trim jako vstup - - - - gruvin9x doesn't have swappable trims - v gruvin9x nelze přehodit trimy - - - - gruvin9x on this board doesn't have Rotary Encoders - v gruvin9x na této desce nelze použít rotační enkodéry - - - - gruvin9x does not support Custom Switch function %1 - gruvin9x nepodporuje ve VS funkci %1 - - - - gruvin9x only accepts %1 expos - v gruvin9x lze použít jen %1 exp - - - - - gruvin9x doesn't support custom curves as curve%1, curve as been exported as fixed point - gruvin9x doesn't support custom curves as curve%1, curve as been imported as fixed point - gruvin9x nepodporuje křivky s vlastními body jako křivka k%1, tato křivka byla exportována jako křivka s pevnými body - - - - - gruvin9x doesn't support curve with %1 point as curve%2 - gruvin9x nepodporuje křivku s %1 body jako má křivka k%2 - @@ -7068,761 +5216,743 @@ Nastavení hodnoty se provádí přímo v seznamu proměnných, nebo pomocí Fun FM%1 - + + Input%1 + + + + English - + French - + Italian - + German - + Czech - + Slovak - + Spanish - + Portuguese - + Swedish - - CH - - - - + No Žádný - + RotEnc A Otočný enkodér :A - + Rot Enc B Otočný enkodér :B - + Rot Enc C Otočný enkodér :C - + Rot Enc D Otočný enkodér :D - + Rot Enc E Otočný enkodér :E - - + + No repeat - + %1 sec - + Safety %1 Zabezpečení(zámek) %1 - + + RudTrim Left + + + + + RudTrim Right + + + + + EleTrim Down + + + + + EleTrim Up + + + + + ThrTrim Down + + + + + ThrTrim Up + + + + + AilTrim Left + + + + + AilTrim Right + + + + + ABS + + + + + THs + + + + + TH% + + + + + THt + + + + + ??? + + + + + a>x + + + + + a<x + + + + + |a|>x + + + + + |a|<x + + + + + AND + + + + + OR + + + + + XOR + + + + + a=b + + + + + a!=b + + + + + a>b + + + + + a<b + + + + + a>=b + + + + + a<=b + + + + + d>=x + + + + + |d|>=x + + + + + a~x + + + + + Timer + + + + + Sticky + + + + + Stay + + + + + Unknown + + + + + STAY(%1, [%2:%3]) + + + + + STICKY(%1, %2) + + + + + TIMER(%1, %2) + + + + Trainer Trenér - + Trainer RUD Trenér - směrovka - + Trainer ELE Trenér - výškovka - + Trainer THR Trenér - plyn - + Trainer AIL Trenér - křidélka - + Instant Trim - + Play Sound Přehrát zvuk - + Play Haptic Vibrovat - + Reset - + + Set Timer %1 + + + + Vario - + Play Both Přehrát pár - + Play Value Přehrát hodnotu - + Start Logs Začít logovat - + Volume Hlasitost - + Backlight Podsvětlení - - - + + Adjust GV%1 + + + + + + + + + <font color=red><b>Inconsistent parameter</b></font> - + + Rotary Encoder + + + + !Flight mode %1 !Letový režim %1 - + Flight mode %1 Letový režim %1 - + Yellow Žlutá - + Orange Oranžová - + Red Červená - + Winged Shadow How High - + Winged Shadow How High (not supported) Winged Shadow How High (nepodporován) - + FrSky Sensor Hub FrSky Senzor Hub - + + None Žádný - + Imperial Imperiální - + Metric Metrické - + Extra Fine Extra jemný - + Fine Jemný - + Medium Střední - + Coarse Hrubý - + Exponential Exponenciální - + Count Up Přičítat - + Count Down Odečítat - + %1:%2, - + : %1 Channels, %2usec Delay : %1 Kanálů, %2us pauza - + + Flight modes(%1) + + + + + Flight mode(%1) + + + + Rudder Směrovka - + Elevator Výškovka - + Throttle Plyn - + Aileron Křidélka - + Play Track Hrát stopu - - + + + --- - + Rud Trim Trim směrovky - + Ele Trim Trim výškovky - + Thr Trim Trim plynu - + Ail Trim Trim křidélek - + Rot Enc - + + Polish + + + + + CH%1 + + + + Background Music Hudba na pozadí - + Background Music Pause Hudba na pozadí -pozastavit - - Adjust GV1 - Nastav GP1 - - - - Adjust GV2 - Nastav GP2 - - - - Adjust GV3 - Nastav GP3 - - - - Adjust GV4 - Nastav GP4 - - - - Adjust GV5 - Nastav GP5 - - - + Delay %1 sec Zpoždění %1sec - + Duration %1 sec Trvání %1 sec - - - + + + + Timer1 - - - + + + + Timer2 - - + + + All Vše - - + + + Telemetry Telemetrie - + + Value Hodnota - + + Decr: - + + Incr: - + + Played once, not during startup + + + + %1s - + Value Hodnota - + Source Zdroj - + GVAR Proměnná - + Increment Upravit - !Phase %1 - !Fáze %1 - - - Phase %1 - Fáze %1 - - - - Diff - Dif - - - - Expo - - - - - Own trim - Vlastní trim - - - - Flight mode %1 trim - Flight phase %1 trim - Trim režimu LR%1 - - - + Own value Vlastní hodnota - + Flight mode %1 value Flight phase %1 value Hodnota režimu LR%1 - + Keys Klávesy - + Sticks Páky - + Keys + Sticks Klávesy i páky - + + -GV%1 -GP%1 - - (-GV%1) - (-GP%1) - - - - + + + GV%1 GP%1 - - Curve - Křivka - - - - - + + + Simulator for this firmware is not yet available Simulátor pro tuto verzi firmware zatím není dostupný - - - - Open9x doesn't allow Curve%1 in expos - v Open9x nelze použít Křivku k%1 v expech - - - - + + Simultaneous usage of expo and curves is no longer supported Současné použití expa a křivek již není podporováno - - - - - - - - Flight modes settings on mixers not exported - Nastevení Letových režimů v mixech není exportováno - - - - - Flight mode settings on mixers not exported - Phases settings on mixers not exported - Nastavení letových režimů v mixech nebylo exportováno - - - - - - - This version of open9x does not support Custom Switch function %1 - Tato verze Open9x nepodporuje ve VS funkci %1 - - - Open9x on gruvin9x board doesn't accept this function - Open9x nepodporuje tuto funkci na desce gruvin9x - - - Open9x on stock board doesn't accept this function - Open9x nepodporuje tuto funkci na desce 9X/9XR - - - + openTx only accepts %1 points in all curves openTx oumožňuje pouze %1 bodů ve všech křivkách dohromady - - - + + + + OpenTX on this board doesn't accept this function OpenTX nepodporuje tuto funkci na této zákl. desce - - + + OpenTX doesn't accept this protocol OpenTX nepodporuje tento protokol - + OpenTX doesn't allow this number of channels V OpenTX nelze použít tento počet kanálů - Open9x on this board doesn't accept this function - Open9x nepodporuje tuto funkci na této zákl. desce - - - - - - - - - - - - - - - - - - - - - Open9x doesn't accept this protocol - Open9x nepodporuje tento protokol - - - Open9x doesn't allow this number of channels - V Open9x nelze použít tento počet kanálů - - - Open9x doesn't allow this number of channels for PPM2 - V Open9x nelze použít tento počet kanálů pro PPM2 - - - - - - - - - open9x only accepts %1 points in all curves - Open9x podporuje pouze %1 bodů ve všech křivkách - - - + Simultaneous usage of expo and curves is no longer supported in open9x Současné použití expa a křivek již není v Open9x podporováno - - - open9x on this board doesn't have Rotary Encoders - v Open9x na této desce nelze použít rotační enkodéry - - - - - - - - - - - - - - - - open9x only accepts %1 expos - v Open9x lze použít jen %1 exp - - - - th9x does not support Custom Switch function %1 - th9x nepodporuje ve VS funkci %1 - - - + th9x on this board doesn't have Rotary Encoders v th9x na této desce nelze použít rotační enkodéry - - - - - th9x doesn't support custom curves as curve%1, curve as been exported as fixed point - th9x doesn't support custom curves as curve%1, curve as been imported as fixed point - th9x nepodporuje křivky s vlastními body jako křivka k%1, tato křivka byla exportována jako křivka s pevnými body - - - - - - th9x doesn't support curve with %1 point as curve%2 - th9x nepodporuje křivku s %1 body jako má křivka k%2 - - - Warning! -Handling of slow up an down in open9x mix has been changed, please check your settings! - Varování! -chování funkcí zpoždění mixu bylo změněno, zkontrolujte prosím svoji konfiguraci! - - - Warning! -Telemetry channel order has been changed, please check function switches and telemetry settings! - Varování! -pořadí telemetrických kanálů bylo změněno, prosím zkontrolujte funční spínače a nastavení telemetrie! - - - Warning! -Telemetry channel order has been changed, please check function switches and telemetry settings! -Expos settings have been changed, please verify before flight! - Varování! -Pořadí telemetrických kanálů bylo změněno, prosím zkontrolujte nastvení Funkcí a nastavení telemetrie! -V konfiguraci DR/Expo byly provedeny změny, zkontrolujte nastavení než poletíte! - - - - (GV%1) - (GP%1) - - - Flight Phase 0 (Default) - Fáze FP0 (Výchozí) - - - - - Flight Mode 0 (Default) - Letový Režim 0 (Výchozí) - - - - - FM %1 - LR %1 - - - Warning! -splash image format stored in preferences has been changed! -Check your settings again. - Pozor! -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. - -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. @@ -7832,6 +5962,777 @@ We are really appreciative for that! The OpenTX/Companion Team. + + + Trim disabled + + + + + Own Trim + + + + + Use Trim from Flight mode %1 + + + + + Use Trim from Flight mode %1 + Own Trim as an offset + + + + + Setup + + + Form + + + + + Model Name + Název modelu + + + + Timer2 + + + + + Timer1 + + + + + Throttle Source + Stopa plynu (pro spínání stopek) + + + + Switch startup Warning + Kontrola výchozí polohy spínačů + + + + Center beep + Zvuk ve středové poloze + + + + Trim Increment + Krok trimu + + + + ON + ZAPNUTO + + + + OFF + + + + + Check + Kontrola + + + + Model Image + Obrázek modelu + + + + Exponential + Exponenciální + + + + Extra Fine + Extra jemný + + + + Fine + Jemný + + + + Medium + Střední + + + + Coarse + Hrubý + + + + Extended Limits + Rozšířené limity (125%) + + + + Extended Trims + Rozšířený rozsah trimů + + + + Throttle Trim + Trim plynu + + + + 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. + + + Obrácení funkce plynu. +Pokud je zaškrtnuto,funkce plynu bude opačná. Poloha vypnuto bude nahoře. +Funkce trimu bude opačná, stejně tak i varování polohy páky plynu. + + + + + + Reverse Throttle + + + + + Telemetry + + + Form + + + + + + + + A1 + Telem. vstup A1 + + + + + + + A2 + Telem. vstup A2 + + + + RSSI + + + + + Alarm 1 + + + + + + ---- + + + + + + Yellow + Žlutá + + + + + Orange + Oranžová + + + + + Red + Červená + + + + Alarm 2 + + + + + Serial Protocol + Sériový protokol + + + + Volt source + Snímač napětí + + + + Metric + Metrické + + + + Imperial + Imperiální + + + + Current source + Snímač proudu + + + + Protocol + Protokol + + + + NONE + Žádný + + + + + FAS + + + + + None + Žádný + + + + FrSky Sensor Hub + FrSky Senzor Hub + + + + CEL + Článek + + + + 2 + CH2 + + + + 3 + CH3 + + + + 4 + CH4 + + + + Units + Jednotky + + + + Blades + Počet listů vrtule + + + + Altimetry / Vario + + + + + Alti + + + + + Alti+ + + + + + Vario + + + + + Sink Max + Klesání Max + + + + Off + + + + + Climb Max + Stoupání Max + + + + Sink Min + Klesání Min + + + + Climb Min + Stoupání Min + + + + Vario source + Vario senzor + + + + Vario limits + Rozsah varia + + + + Use GPS as altitude source + Použít GPS jako senzor výšky + + + + Display altitude in toolbar + Zobrazit výšku v nástrojové liště + + + + Various + + + + + mAh count + + + + + FAS Offset + + + + + Persistent mAh + + + + + TelemetryAnalog + + + Form + + + + + Unit + Jednotky + + + + Max Value + Maximim + + + + Alarm 1 + + + + + + ---- + + + + + + Yellow + Žlutá + + + + + Orange + Oranžová + + + + + Red + Červená + + + + + < + + + + + + > + + + + + Alarm 2 + + + + + Min Value + Minimum + + + + Volts (V) + Volty (V) + + + + Amps (A) + Ampéry (A) + + + + Speed (m/s or ft/s) + Rychlost (m/s nebo ft/s) + + + + Raw (-) + Jednotky (-) + + + + Speed (km/h or miles/h) + Rychlost (km/h nebo míle/h) + + + + Meters (m or ft) + Vzdálenost (m nebo ft) + + + + Temp (°) + Teplota (°) + + + + Fuel (%) + Palivo (%) + + + + mAmps (mA) + MiliAmpéry (mA) + + + + Range + Rozsah + + + + TelemetryCustomScreen + + + Form + + + + + Custom Screen Type + Typ panelu + + + + Nums + Hodnoty + + + + Bars + Ukazatele + + + + Min + + + + + Source + Zdroj + + + + Gauge + Ukazatel + + + + Max + + + + + TelemetryPanel + + + Telemetry screen %1 + + + + + Winged Shadow How High + + + + + Winged Shadow How High (not supported) + Winged Shadow How High (nepodporován) + + + + Timer + + + Form + + + + + mm:ss + + + + + Countdown + + + + + MinuteBeep + Minuta + + + + Persistent + Ukládání + + + + (00:00:00) + + + + + TimerPanel + + + None + Žádný + + + + Beeps + + + + + Countdown + + + + + appPreferencesDialog + + + Application Preferences + + + + + Simulator capture folder + Složka pro snímky obrazovky Simu + + + + Remember simulator switch values + + + + + + + Open Folder + Vybrat složku + + + + User Splash Screens + + + + + Blue + Modrá + + + + Green + Zelená + + + + Red + Červená + + + + Orange + Oranžová + + + + Yellow + Žlutá + + + + Include companion splashes + Zahrnout i výchozí loga + + + + Only user defined splashes + Jen vlastní loga + + + + Splash Screen Library + + + + + Files to keep + + + + + Simulator BackLight + + + + + Automatic Backup Folder + Složka pro automatické zálohy + + + + Only capture to clipboard + + + + + Joystick + + + + + Find Executable + + + + + Google Earth Executable + + + + + Calibrate + Kalibrovat + + + + Enable + + + + + Show splash screen when Companion starts + + + + + Automatic check for OpenTX firmware updates + + + + + Automatic check for Companion updates + + + + + Offer to use wizard for new models + + + + + Enable automatic backup before writing firmware + + + + + Select your snapshot folder + Vyberte složku pro snímky obrazovky simulátoru + + + + + No joysticks found + Joystick nenalezen + + + + Select your library folder + Vyberte složkus s logy + + + + Select your Models and Settings backup folder + Zvolte složku pro automatické zálohy modelů a nastavení + + + + Select Google Earth executable + + avrOutputDialog @@ -8118,10 +7019,6 @@ Můžete poškodit váš mikrokontrolér. Use advanced controls Rozšířené volby - - mcu (not used for V4) - mcu (nepoužito pro V4) - @@ -8170,40 +7067,40 @@ m2560 pro V4 desky sériový port sam-ba - + DFU-UTIL Configuration Konfigurace DFU-UTIL - + SAM-BA Configuration Konfigurace SAM-BA - + AVRDUDE Configuration Konfigurace AVRDUDE - - - + + + Select Location Procházet umístění - - + + 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? <b><u>POZOR!</u></b><br>Toto nastaví pojistky %1 do továrního nastavení.<br>Zápis pojistek může poškodit vaše rádio.<br>Proveďte pouze pokud jste si jist že jsou nastaveny špatně!<br>Jste si opravdu jist, že chcete pokračovat? - + <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>VAROVÁNÍ!</u></b><br>Běžně je typ CPU vybrán podle typu zvoleného firmware.<br>Pokud změníte typ CPU, výsledná eeprom nemusí být platná. @@ -8217,7 +7114,7 @@ m2560 pro V4 desky - + Write to TX Zapsat do rádia @@ -8241,10 +7138,6 @@ m2560 pro V4 desky Patch HW setting from profile Zaměnit hodnoty HW nastavení hodnotami z profilu - - Version: - Verze: - Date & Time @@ -8255,19 +7148,11 @@ m2560 pro V4 desky SVN - - MOD/Build - MOD/Sestavení - Variant Varianta - - Load Firmware - Otevřít firmware - Invert Color @@ -8295,7 +7180,7 @@ m2560 pro V4 desky - + Browse for file Procházet ... @@ -8314,19 +7199,11 @@ m2560 pro V4 desky Use image in settings Logo nastavené v předvolbách - - Allows companion9x to write to older version of the firmware - Povolí zápis do starší verze firmware - Check Firmware compatibility Zkontrolovat kompatibilitu firmware - - Backup and restore existing eeprom - Zálohovat a obnovit stávající EEPROM - Current Profile @@ -8338,180 +7215,148 @@ m2560 pro V4 desky Zrušit - Burn to TX - Zapsat do rádia - - - + Write firmware to TX Zapsat firmware do rádia - Load eEprom - Otevřít EEPROM - - - Write models to TX - Zapsat modely do rádia - - - Write %1 to TX - Zapsat %1 do rádia - - - + Current profile Současný profil - + Open Otevřít - Choose file to write to EEPROM memory - Vyberte soubor pro zápis do paměti EEPROM - - - - - - - - + + + + + + Warning Varování - + %1 is not a known firmware %1 není známý firmware - + Burn anyway ! Přesto vypálit ! - - - - - - - - - - + + + + + + + + + + Error Chyba - + Unable to find file %1! Nemohu nalézt soubor %1! - - - + + + Error opening file %1: %2. Chyba při otevírání souboru %1: %2. - Invalid binary EEPROM File %1, Proceed anyway ? - Neplatný binární soubor EEPROM %1, Přesto pokračovat ? - - - + Write Models and Settings to TX Zapsat modely a nastavení do rádia - + Write Models and Settings in %1 to TX Zapsat modely a nastavení v %1 do rádia - + Choose file to load Models and Settings from Vyberte soubor s daty modelů a nastavení - - - + + + Invalid binary Models and Settings File %1, Proceed anyway ? Neplatný soubor s binárními daty modelů a nastavení %1, Přesto pokračovat ? - + Error reading file %1: %2. Chyba při otevírání souboru %1: %2. - + Open Image to load Otevřít soubor s logem - + Images (%1) obrázky (%1) - - + + Cannot load %1. Nemohu načíst %1. - + Cannot save customized firmware Nelze uložit upravený firmware - + Custom image not found Vlastní obrázek nebyl nalezen - + No firmware selected nebyl vybrán firmware - + Wrong radio calibration data in profile, Settings not patched Profil neobsahuje platná kalibrační data, nastavení nebyla upravena - + Wrong radio setting data in profile, Settings not patched Profil neobsahuje platná data nastavení rádia, nastavení nebyla upravena - Wrong radio calibration data in profile, eeprom not patched - Špatná kalibrační data v profilu, nebala zaměněna v EEPROM - - - Wrong radio setting data in profile, eeprom not patched - Špatná HW data v profilu, nebala zaměněna v EEPROM - - - - + + Cannot write file %1: %2. Nelze zapsat soubor %1: %2. - + Error writing file %1: %2. Chyba při zápisuí souboru %1: @@ -8551,630 +7396,485 @@ m2560 pro V4 desky Tisk do souboru - Count Up - Přičítat - - - Count Down - Odečítat - - - : %1 Channels, %2usec Delay - : %1 Channels, %2msec Delay - : %1 Kanálů, %2us pauza - - - Rudder - Směrovka - - - Elevator - Výškovka - - - Throttle - Plyn - - - Aileron - Křidélka - - - Extra Fine - Extra jemný - - - Fine - Jemný - - - Medium - Střední - - - Coarse - Hrubý - - - Exponential - Exponenciální - - - Delay %1 sec - Zpoždění %1sec - - - Duration %1 sec - Trvání %1 sec - - - Yellow - Žlutá - - - Orange - Oranžová - - - Red - Červená - - - Winged Shadow How High (not supported) - Winged Shadow How High (nepodporován) - - - FrSky Sensor Hub - FrSky Senzor Hub - - - None - Žádný - - - Imperial - Imperiální - - - Metric - Metrické - - - + General Model Settings Obecná nastavení modelu - - - + + + Name Název - - + + EEprom Size Velikost EEPROM - - + + Timer1 - - + + Timer2 - - + + Protocol Protokol - - + + Pulse Polarity Polarita pulzů - - + + Throttle Trim Trim plynu - - - - + + + + Enabled Povoleno - - - - + + + + Disabled Zakázáno - - + + Throttle Expo Expo plynu - - + + Trim Increment Krok trimu - - + + Center Beep Zvuk ve středové poloze - + Flight modes Settings Flight Phases Settings Nastavení letových fází - - + + Fades Přechody - - + + Trims Trimy - - - - - - - - - - + + + + + + + + Switch Spínač - Phase name - Název - - - - + + IN (+) - - + + OUT (-) - - - - - - - - - - + + + + + + + + + + FM FP LR - - + + Gvars GProm - - + + Rot. Enc. - + Limits Limity - - - - - - - + + + + + + + Offset Ofset - - - - - + + + + + Min - - - - - + + + + + Max - - - + + + Invert Invertovat - - - - - - + + + + + CH - - + + INV - - + + NOR --- - + Global Variables Globální proměnné - - + + GV GP - + Expo/Dr Settings Expo/Nastavení DV - - + + Weight Váha - - - Expo - - - - Phase - Fáze - - - - - - - - + + Curve Křivka - + Mixers Mixy - - + + noTrim Žádný trim - - - FMTrim - - - - - - Diff - Dif - - - - + + Delay(u%1:d%2) Zpoždění(u%1:d%2) - - + + Slow(u%1:d%2) Zpomalení(u%1:d%2) - - + + Warn Varování - Phases - Fáze - - - - + + No name Model bez jména - - - - + + + + DISABLED ZAKÁZÁN - + Curves Křivky - + 5 Points Curves Pěti-bodové křivky - - - - + + + + pt %1 bod %1 - + 9 Points Curves Devíti-bodové křivky - - Custom Switches - Virtuální spínače - - - - - CS - VS - - - Function Switches - Funkce - - - - + + Function Funkce - - + + Param Parametr - - + + Enable Povoleno - FSW - FS - - - + Telemetry Settings Nastavení telemetrie - - + + Analog - - + + Unit Jednotky - - + + Scale Rozsah - - - - + + + + A%1 - - + + Alarm 1 - - + + Alarm 2 - - - - + + + + Type Typ - - - - + + + + Condition Podmínka - - - - - - + + + + Value Hodnota - - - - + + + + Flight mode name Název režimu - - - + + + Flight modes Letové režimy - - - + + + Flight mode Letový režim - - Custom Functions - Funkce - - - - + + Repeat Opakování - CFn - Fce - - - - Safety Switches - Bezpečnostní spínače - - - - + + RSSI Alarm - - + + Telemetry Bars Telemetrické ukazatele - - + + Bar Number Číslo ukazatele - - + + Source Zdroj - - + + Custom Telemetry View Vlastní zobrazení telemetrie - + + Logical Switches + + + + + + LS + + + + + Switch Assignment + + + + CF FN - + Print Document Vytisknout dokument - + Select PDF output file Vyberte cílový PDF soubor @@ -9187,51 +7887,37 @@ m2560 pro V4 desky - + People who have contributed to this project Lidé kteří přispěli tomuto projektu - + Coders Programátoři - - 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. + + Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe) - + 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), -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 - - - + OpenTX Release Notes Poznámky k vydání OpenTX @@ -9239,137 +7925,101 @@ na jehož základech companion9x vznikl. customizeSplashDialog - - Customize Splash - Přizpůsobení loga + + Transmitter Splash Screen Editor + - - Save Image - Uložit logo + + + Invert + Invertovat - - Invert Color - Invertovat barvu + + + Load FW + - - <!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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<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> - + + + Load Pict + - - Load Firmware - Otevřít firmware + + + Load Profile + - - Load Image - Otevřít logo + + + Save + - + + Open Splash Library Otevřít knihovnu s logy - + + + + ... - - Save Firmware - Save To Hex - Uložit firmware - - - - - - Select an original firmware file - Vyberte soubor s firmwarem - - - + Open Otevřít - HEX files (*.hex);; - soubory HEX (*.hex);; - - - - Select an image to customize your splash <br />or save actual firmware splash - Vyberte obrázek kterým chcete upravit vaše úvodní logo, <br />nebo vložte aktuální logo do firmwaru - - - - - - + + + + + + Error Chyba - + Could not find bitmap to replace in file Nemohu nalézt pozici loga k nahrazení v souboru. Obsahuje firmware podporu loga? - + Open Image to load Otevřít soubor s logem - + Images (%1) obrázky (%1) - - + + Cannot load %1. Nemohu načíst %1. - - - Save your custimized firmware - Uložte upravený firmware + + + Could not store image in firmware file %1 + - - - Write to file - Uložit do souboru - - - - Error reading file %1 - Chyba při otevírání souboru %1 - - - - Firmware correctly saved. - Firmware bylo v pořádku uloženo. - - - - Firmware not saved. - Firmware nebylo uloženo. - - - - PNG images (*.png);; - obrázky PNG (*.png);; + + The image file %1 could not be stored + @@ -9496,6 +8146,403 @@ 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;">Provádějte pouze pokud opravdu víte co děláte.</p></body></html> + + fwPreferencesDialog + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox + + + + + Set language of voice. +May be different from firmware language + Vyberte jazykovou verzi hlasu tts(voice). +Může být jiná než verze firmwaru + + + + SD Structure path + Cesta k obsahu SD karty + + + + Processor ID + ID procesoru + + + + Default Stick Mode + Výchozí mód vysílačky + + + + Channel Order + + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + Výběr módu: + +Mode 1: + Levá páka : Výškovka, Směrovka + Pravá páka: Plyn, Křidélka + +Mode 2: + Levá páka : Plyn, Směrovka + Pravá páka: Výškovka, Křidélka + +Mode 3: + Levá páka : Výškovka, Křidélka + Pravá páka: Plyn, Směrovka + +Mode 4: + Levá páka : Plyn, Křidélka + Pravá páka: Výškovka, Směrovka + + + + + + Mode 1 (RUD ELE THR AIL) + + + + + Mode 2 (RUD THR ELE AIL) + + + + + Mode 3 (AIL ELE THR RUD) + + + + + Mode 4 (AIL THR ELE RUD) + + + + + Options + + + + + Channel order + +This is used by the templated to determine which channel goes to what number output. + Pořadí kanálů + +Toto je použito šablonami k určení +který kanál patří ke kterému výstupu. + + + + Open Folder + Vybrat složku + + + + Offer to write FW to Tx after download + + + + + Save Profile + Uložit profil + + + + Menu Language + + + + + Voice Language + Jazyk hlasových zpráv + + + + Firmware Type + + + + + Append version number to FW file name + + + + + Download Voice + + + + + Downloads and Profiles + + + + + FwInfo + + + + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + + Profile + + + + + Open Image + Načíst obrázek + + + + Splash Screen + + + + + Clear Image + + + + + Download FW + + + + + Check for updates + Zkontrolovat aktualizace + + + + Last downloaded release: %1 + Naposledy stažené vydání: %1 + + + + The selected firmware has never been downloaded by Companion. + + + + + The selected firmware cannot be downloaded by Companion. + + + + + 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 ? + + + + Open Image to load + + + + + Images (%1) + obrázky (%1) + + + + Error + Chyba + + + + Cannot load %1. + Nemohu načíst %1. + + joystickDialog @@ -9592,10 +8639,6 @@ p, li { white-space: pre-wrap; } P2 Potenciometr 2 - - P3 - Potenciometr 3 - @@ -9729,10 +8772,6 @@ Tlačítkem Zrušit přerušíte kalibraci logsDialog - - Companion9x log viewer - Companion9x - zobrazení logu - Companion Log Viewer @@ -9791,17 +8830,17 @@ Tlačítkem Zrušit přerušíte kalibraci %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 @@ -9809,7 +8848,7 @@ Tlačítkem Zrušit přerušíte kalibraci mdiChild - + Simulate Tx Simulace Rádia @@ -10254,220 +9293,357 @@ Tlačítkem Zrušit přerušíte kalibraci preferencesDialog + Preferences 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox - + Ask for flashing after Download Po stažení firmwaru se zeptat, zda ho hned zapsat do rádia - + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + 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 - + + Show Splash At Start + + + + + Simu BackLight BackLight Color Barva podsvětlení Simu - + + Remember simulator switches + + + + + Blue Modrá - + + Green Zelená - + + Red Červená - + + Orange Oranžová - + + Yellow Žlutá - Check selected Fw updates - 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. @@ -10477,36 +9653,28 @@ 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 - Remember switches - Pamatovat polohu přepínačů - - - + Mode selection: Mode 1: @@ -10547,349 +9715,192 @@ 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 - + Recent History Size Počet položek nedávné historie - + Find Executable - + Google Earth Executable - + Profile slot Slot profilu - eEprom backup folder - Složka pro zálohy EEprom - - - + auto backup before write zálohovat před zápisem - Sound samples dir - 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. - - - The selected firmware cannot be downloaded by companion9x. - 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 ? - Support for frsky telemetry mod - Podpora frsky telemetrie tj. zobrazení telemetrických dat na displeji rádia -(je potřeba upravit HW, bez této úpravy nebudou fungovat dva přepínače! -a pochopitelně nebudou zobrazena žádná telem. data.) - - - Support for jeti telemetry mod - Podpora telemetrie JETI - - - Support for receiving ardupilot data - telemetrie - podpora pro příjem ardupilot dat - - - Support for receiving NMEA data - telemetrie - podpora pro příjem NMEA dat - - - Enable heli menu and cyclic mix support - Funkce pro heli, nastavení typu mechaniky - - - Enable template menu - Přidá menu s jednoduchými -šablonami modelu - - - No splash screen - Bez úvodního loga -Firmware nebude obsahovat žádné logo, ani podporu pro něj. -Toto se hodí pokud je potřeba ušetřit místo v paměti FLASH pro jiné funkce - - - No flight phases - Bez letových režimů - - - Support for radio modified with regular speaker - Vylepšený zvukový výstup, -funkční i s origo pípákem, -ale doporučuje se provést -instalaci reproduktoru - - - Used if you have modified your radio with haptic mode - Výstrahy pomocí vibračního motoru -(je třeba osadit) - - - Support of frsky PXX protocol - Frsky PXX protokol, -zatim ve zkušební verzi - - - Support for DSM2 modules - Podpora DSM2 modulů - - - Support for DSM2 modules using ppm instead of true serial - 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 - SmartieParts 2.2 Backlight support - Podpora pro SmartieParts 2.2 desku -(programátor/podsvícení) - - - PPM center adjustment in limits - Možnost nastavovat střed serva šířkou pulzu - - - Symetrical Limits - Symetrické limity -Přidá možnost volby mezi --klasickými limity s označením ^ -(nastavené limity jsou rovny hodnotě -100% a 100% kde průběh od středu daného subtrimem je lineární až do limitu) --symetrickými limity s označením = -(Průběhy kanálů budou symetrické od středu daného subtrimem na obě strany, -nastavené limity tedy nemusí být rovny hodnotě -100% a 100%, ale budou pouze maximem výchylky) - - - Pots use in menus navigation - Moznost zadávat hodnoty -a pohybovat se v menu -pomocí potenciometrů - - - In model setup menus automatically set switch by moving some of them - Výběr spínače v mixu atd. -se provádí jeho sepnutím - - - Enable resetting values by pressing up and down at the same time - Rychlé nastavení hodnoty současným stiskem dvou tlačítek. -(+) a (-) invertuje hodnotu -(+)a (UP) nastaví max. hodnotu -(-) a (DN) nastaví min. hodnotu -(UP) a (DN) vastaví výchozí hodnotu - - - EEprom write Progress bar - Progresbar zobrazující zápis do EEPROM -(tj. ukládání nastavení) - - - Imperial units - Imerialní jednotky pro telemetrii -(stopy, palce, míle atd.) - - - Disable heli and templates menus - bez menu heli a jednoduchých šablon modelu - - - No graphical check boxes and sliders - Nahrazeni posuvníku a zatržítek (checkboxu) textem - - - Don't use bold font for highlighting active items - Vypnout zvýraznění aktivních mixů/spínačů tučným písmem. -Pokud není tato volby vybrána, -budou právě aktivní mixy, spínače a vlastní spínače -zobrazovány tučným pismem. Neaktivní mixy/spínače budou -zobrazeny normálním písmem - - - Used if you have modified your radio with voice mode - Hlasový výstup pro telemetrii, -nutno zastavět hlasový modul - - - Disable curves menus - Bez uživatelsky definovatelných křivek - - - + Select your snapshot folder Vyberte složku pro snímky obrazovky simulátoru - Select your eeprom backup folder - Vyber složku pro zálohování eeprom - - - - + + Error Chyba - - + + Cannot load %1. Nemohu načíst %1. - Select your sound sample folder - Vyberte složku pro zvuková data - - - Profile name is empty, profile slot %1 will we deleted.<br>Are you sure ? - 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) @@ -10922,585 +9933,429 @@ nutno zastavět hlasový modul Nastavení: - Count Up - Přičítat - - - Count Down - Odečítat - - - Yellow - Žlutá - - - Orange - Oranžová - - - Red - Červená - - - Winged Shadow How High (not supported) - Winged Shadow How High (nepodporován) - - - FrSky Sensor Hub - FrSky Senzor Hub - - - None - Žádný - - - Imperial - Imperiální - - - Metric - Metrické - - - : %1 Channels, %2usec Delay - : %1 Channels, %2msec Delay - : %1 Kanálů, %2us pauza - - - Rudder - Směrovka - - - Elevator - Výškovka - - - Throttle - Plyn - - - Aileron - Křidélka - - - Extra Fine - Extra jemný - - - Fine - Jemný - - - Medium - Střední - - - Coarse - Hrubý - - - Exponential - Exponenciální - - - + printed on: %1 vytištěno: %1 - + General Model Settings Obecná nastavení modelu - - - - + + + + Name Název - + EEprom Size Velikost EEPROM - + Timer1 - + Timer2 - + Protocol Protokol - + Pulse Polarity Polarita pulzů - + Throttle Trim Trim plynu + - - + Enabled Povoleno + - Disabled Zakázáno - + Throttle Expo Expo plynu - + Trim Increment Krok trimu - + Center Beep Zvuk ve středové poloze - + Flight modes Settings Flight Phases Settings Nastavení letových fází - + Fades Přechody - + Trims Trimy - + Gvars GProm - + Rot.Enc. - - - - - + + + + Switch Spínač - Phase name - Název + + Logical Switches + - + + + LS + + + + + Switch Assignments + + + + IN (+) - + OUT (-) - - - - + + + + FM FP LR - + Expo/Dr Settings Expo/Nastavení DV - + Weight Váha - - - - - Expo - - - - Phase - Fáze - - - - + + - - - - Curve Křivka - + Mixers Mixy - - - - - + + + + CH - + noTrim Žádný trim - - FMTrim - - - - - - - - + + + + + Offset Ofset - - Diff - Dif - - - + Delay(u%1:d%2) Zpoždění(u%1:d%2) - + Slow(u%1:d%2) Zpomalení(u%1:d%2) - + Warn Varování - Phases - Fáze - - - - + + DISABLED ZAKÁZÁN - + Limits Limity - - - - + + + + Min - - - - + + + + Max - - - + + + Invert Invertovat - - - + + + INV - - - + + + NOR --- - + Curves Křivky - 5 Points Curves - Pěti-bodové křivky - - - - - pt %1 bod %1 - - 9 Points Curves - Devíti-bodové křivky - - - - Custom Switches - Virtuální spínače - - - - - CS - VS - - - Delay %1 sec - Zpoždění %1 sec - - - Duration %1 sec - Trvání %1 sec - - - + Global Variables Globální proměnné - + GV GP - - Safety Switches - Bezpečnostní spínače - - - - - - - + + + + Value Hodnota - - Function Switches - Funkce - - - + Function Funkce - + Parameter Parametr - + Repeat Opakování - FSW - FS - - - + Telemetry Settings Nastavení telemetrie - - + + Alarm 1 - - + + Alarm 2 - + Analog - + Unit Jednotky - + Scale Rozsah - - - - + + + + Type Typ - - - - + + + + Condition Podmínka - + A%1 - + RSSI Alarm - + Frsky serial protocol Sériový protokol Frsky - + System of units Systém jednotek - + Propeller blades Počet listů vrtule - + Telemetry Bars Telemetrické ukazatele - + Bar Number Číslo ukazatele - + Source Zdroj - + ODF files (*.odt);;PDF Files(*.pdf);;HTML-Files (*.htm *.html);;All Files (*) soubor ODF (*.odt);;soubor PDF (*.pdf);;soubor HTML (*.htm *.html);;Všechny (*) - - + + Custom Telemetry View Vlastní zobrazení telemetrie - + Flight mode name Název režimu - - + + Flight modes Letové režimy - - + + Flight mode Letový režim - - CF - FN - - - + Print Document Vytisknout dokument - + Select PDF output file Vyberte cílový PDF soubor simulatorDialog - - Companion9x Simulator - Companion9x Simulátor - Companion Simulator @@ -11510,7 +10365,7 @@ nutno zastavět hlasový modul - + Right Double Click to Reset Dvojité kliknutí pravým tlačítkem myši nastaví na střed @@ -11536,33 +10391,33 @@ nutno zastavět hlasový modul - + Hold X Držet X - + Fix X Fixovat X - + Fix Y Fixovat Y - + Hold Y Držet Y - - + + TextLabel @@ -11582,39 +10437,39 @@ nutno zastavět hlasový modul - + ID1 - + ID2 - + P1 Potenciometr1 - - - + + + 0 % - + P2 Potenciometr2 - + P3 Potenciometr3 - + 9x Simulator 9x Simulátor @@ -11625,388 +10480,266 @@ nutno zastavět hlasový modul - CS1 - VS1 + LS1 + - CS2 - VS2 + LS2 + - CS3 - VS3 + LS3 + - CS4 - VS4 + LS4 + - CS5 - VS5 + LS5 + - CS6 - VS6 + LS6 + - CS7 - VS7 + LS7 + - CS8 - VS8 + LS8 + - CS9 - VS9 + LS9 + - CSA - VSA + LSA + - CSB - VSB + LSB + - CSC - VSC + LSC + - CSD - VSD + LSD + - CSE - VSE + LSE + - CSF - VSF + LSF + - CSG - VSG + LSG + - CSH - VSH + LSH + - CSI - VSI + LSI + - - CSJ - VSJ + + LSJ + - - CSL - VSL + + LSK + - - CSM - VSM + + LSL + - - CSN - VSN + + LSM + - - CSO - VSO + + LSN + - - CSP - VSP + + LSO + - - CSQ - VSQ + + LSP + - - CSR - VSR + + LSQ + - - CSS - VSS + + LSR + - - CST - VST + + LSS + - - CSU - VSU + + LST + - - CSV - VSV + + LSU + - SW1 - VS1 + + LSV + - SW2 - VS2 + + LSW + - SW3 - VS3 - - - SW4 - VS4 - - - SW5 - VS5 - - - SW6 - VS6 - - - + BEEP Zvuk - SW7 - VS7 - - - SW8 - VS8 - - - SW9 - VS9 - - - SWA - VSA - - - SWB - VSB - - - SWC - VSC - - - SWD - VSD - - - SWE - VSE - - - SWF - VSF - - - SWG - VSG - - - SWH - VSH - - - SWI - VSI - - - SWJ - VSJ - - - - CSK - SWK - VSK - - - SWL - VSL - - - SWM - VSM - - - SWN - VSN - - - SWO - VSO - - - SWP - VSP - - - SWQ - VSQ - - - SWR - VSR - - - SWS - VSS - - - SWT - VST - - - SWU - VSU - - - SWV - VSV - - - - CSW - SWW - VSW - - - + CH1 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + -100.1 - + CH9 - + CH2 - + CH10 - + CH3 - + CH11 - + CH4 - + CH12 - + CH5 - + CH13 - + CH6 - + CH14 - + CH7 - + CH15 - + CH8 - + CH16 @@ -12036,10 +10769,6 @@ nutno zastavět hlasový modul - Flight mode: %1(%2) - Letový režim: %1(%2) - - - Phase: %1(%2) - - Fáze: %1(%2) - Simulating Tx (%1) @@ -12054,43 +10783,39 @@ nutno zastavět hlasový modul splashLibrary - + ... - + Splash Library - page %1 of %2 Knihovna s logy - strana %1 z %2 - + Warning Varování - + Invalid image in library %1 Neplatné logo v knihovně %1 - + Information - + No valid image found in library, check your settings Nebylo nalezenožádné použitelné logo v knihovně, zkontrolujte nastavení xsimulatorDialog - - Companion9x Simulator - Companion9x Simulátor - @@ -12116,10 +10841,6 @@ nutno zastavět hlasový modul SB - - P2 - Potenciometr2 - @@ -12160,14 +10881,6 @@ nutno zastavět hlasový modul Hold Y Držet Y - - P1 - Potenciometr1 - - - P3 - Potenciometr3 - @@ -12216,107 +10929,11 @@ nutno zastavět hlasový modul LS - - X9DA Simulator - X9DA Simulátor - Outputs Výstupy - - SWK - VSK - - - SWD - VSD - - - SWL - VSL - - - SW1 - VS1 - - - SWH - VSH - - - SWG - VSG - - - SWE - VSE - - - SWF - VSF - - - SWM - VSM - - - SWJ - VSJ - - - SWI - VSI - - - SW2 - VS2 - - - SW3 - VS3 - - - SW4 - VS4 - - - SW5 - VS5 - - - SW6 - VS6 - - - BEEP - Zvuk - - - SW7 - VS7 - - - SW8 - VS8 - - - SW9 - VS9 - - - SWA - VSA - - - SWB - VSB - - - SWC - VSC - CH1 @@ -12339,10 +10956,10 @@ nutno zastavět hlasový modul - - - - + + + + @@ -12383,12 +11000,12 @@ nutno zastavět hlasový modul - + CH12 - + CH5 @@ -12429,203 +11046,163 @@ nutno zastavět hlasový modul - CSK - VSK + LSK + - CSC - VSC + LSC + - CSD - VSD + LSD + - CS7 - VS7 + LS7 + - CSL - VSL + LSL + - CSB - VSB + LSB + - CS1 - VS1 + LS1 + - CSH - VSH + LSH + - CSG - VSG + LSG + - CSE - VSE + LSE + - CSF - VSF + LSF + - CS8 - VS8 + LS8 + - CS9 - VS9 + LS9 + - CSA - VSA + LSA + - CSM - VSM + LSM + - CSJ - VSJ + LSJ + - CSI - VSI + LSI + - CS4 - VS4 + LS4 + - CS5 - VS5 + LS5 + - CS2 - VS2 + LS2 + - CS3 - VS3 + LS3 + - CS6 - VS6 + LS6 + - CSN - VSN + LSN + - CSO - VSO + LSO + - CSP - VSP + LSP + - CSQ - VSQ + LSQ + - CSR - VSR + LSR + - CSS - VSS + LSS + - CST - VST + LST + - CSU - VSU + LSU + - CSV - VSV + LSV + - CSW - VSW - - - SWN - VSN - - - SWO - VSO - - - SWP - VSP - - - SWQ - VSQ - - - SWR - VSR - - - SWS - VSS - - - SWT - VST - - - SWU - VSU - - - SWV - VSV - - - SWW - VSW + LSW + @@ -12644,26 +11221,22 @@ nutno zastavět hlasový modul Nelze otevřít joystick, není povolený - + Firmware %1 error: %2 Firmware %1 chyba: %2 - + - Flight mode: %1(%2) - Letový režim: %1(%2) - - Phase: %1(%2) - - Fáze: %1(%2) - - - + Simulating Tx (%1) Simulace Tx (%1) - + Simulating Simulace diff --git a/companion/src/translations/companion_de.ts b/companion/src/translations/companion_de.ts index fd62aa4cd..bc09c3fb2 100644 --- a/companion/src/translations/companion_de.ts +++ b/companion/src/translations/companion_de.ts @@ -2,166 +2,595 @@ - ExpoDialog + Channels - Dialog - Dialog - - - - Expo - Expo - - - <!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-size:8pt;">Expo value</span></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-size:8pt;">Expo value</span></p></body></html> - - - - Weight - Weg - - - + Name Name - The value of the weight - Der Wert des Weges + + Offset + Offset - Phases - Phase - Phase + + Min + Min - - - - GV - + + Max + Max - - - Phase used by the expo. - Zugewiesene Phase für Weg/Expo. + + Invert + Invertieren - - Flight modes - Flugphasen + + Center + - - 0 - 0 + + Sym + - - 1 - 1 + + Channel %1 + - - 2 - 2 + + --- + --- - - 3 - 3 + + INV + INV + + + + CurveGroup + + + Diff + Diff - - 4 - 4 + + Expo + Expo - - 5 - 5 + + Func + - - 6 - 6 + + Curve + Kurve + + + + Curves + + + Form + - - 7 - 7 + + Standard + - - 8 - 8 + + Custom + - + + Lines + + + + + Smooth + + + + + Curve type + + + + + Curve name + + + + + Curve %1 + Kurve %1 + + + + %1 points + + + + + Are you sure you want to reset curve %1 ? + + + + + Editing curve %1 + Kurve %1 bearbeiten + + + + Not enough free points in EEPROM to store the curve. + + + + + CustomFunctionsPanel + + Switch Schalter - - Switch used by the expo. -If blank then the expo is considered to be "ON" all the time. - Benützter Schalter für Weg/Expo. -Bei keiner Eingabe ist Expo generell eingeschaltet. + + Action + - - Curve/Exponential - kurve/Exponential + + Parameters + - + + Enable + Aktivieren + + + + CF%1 + + + + + ON + + + + + Error + Fehler + + + + Unable to find sound file %1! + + + + + &Delete + &Löschen + + + + Delete + Löschen + + + + &Copy + &Kopieren + + + + Ctrl+C + + + + + &Cut + &Ausschneiden + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + + + Dialog + + + Dialog + Dialog + + + + Curve type + + + + + Coefficient + + + + + Both + Beide + + + + x>0 + x>0 + + + + x<0 + x<0 + + + + Y at X=0 + + + + + Side + + + + + Y at X=-100 + + + + + Y at X=100 + + + + + Linear + + + + + Single Expo + + + + + Symmetrical f(x)=-f(-x) + + + + + Symmetrical f(x)=f(-x) + + + + + ExpoDialog + + + Weight + Weg + + + + + GV + + + + + The source for the mixer + Die Mischerquelle + + + + Input name + + + + + Phase used by the input. + + + + + Flight modes + Flugphasen + + + + 0 + 0 + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + 5 + 5 + + + + 6 + 6 + + + + 7 + 7 + + + + 8 + 8 + + + + Switch + Schalter + + + + Switch used by the input. +If blank then the input is considered to be "ON" all the time. + + + + + The curve used by the input + + + + + Source + Quelle + + + + Line name + + + + Stick Side Knüppel Seite - + + <!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;">Verzögerung</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;">Diese Einstellung beeinflußt die Geschwindigkeit und Verzögerung des Mischerausganges.</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;">Wenn Verzögerung ungleich 0 ist wird die Betätigung der Mischerfunktion für die eingegebene Anzahl Sekunden verzögert</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;">Wenn Langsam ungleich 0 ist wird die Geschwindigkeit des Mischers durch den eingegebenen Wert beeinflußt. Der Wert legt die +Anzahl Sekunden fest, welche der Mischer für einen Durchgang von -100 bis +100 benötigen soll.</p></body></html> + + + + Scale + Skala + + + + Include Trim + Trimmung einschliessen + + + + No + Nein + + + + Yes + Ja + + + Curve Kurve - - The curve used by the expo - Angewendete Kurve für Expo - - - Mode - Modus - - - + NEG NEG - + POS POS - + ALL BEIDE - - DEST -> %1 - Meaning not all clear - Ziel -> %1 + + Edit %1 + + + + + Rud + Rud + + + + Ele + Ele + + + + Thr + Thr + + + + Ail + Ail + + + + FlightMode + + + Form + + + + + Fade In + Fade In + + + + Fade Out + Fade Out + + + + Name + Name + + + + Switch + Schalter + + + + trim1 + Trimmung1 + + + + trim2 + Trimmung2 + + + + trim4 + Trimmung4 + + + + trim3 + Trimmung3 + + + + Rud + Rud + + + + Ele + Ele + + + + Thr + Thr + + + + Ail + Ail + + + + Rotary Encoder %1 + + + + + GVAR%1 + + + + + FlightModes + + + Flight Mode %1 + + + + + (%1) + + + + + (default) + @@ -184,13 +613,13 @@ Dieses sind für alle Modelle im gleichen EEPROM gültig. Einstellungen - + Contrast 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; } @@ -201,39 +630,27 @@ p, li { white-space: pre-wrap; } Die Werte können sein - + Sound Mode Sound Modus - + Beeper Piepser - PiSpkr - PiSpkr - - - PcmWav - PcmWav - - - + Speaker Pitch (spkr only) Lautstärke (nur PiSpkr) - Haptic Strength (spkr only) - Haptik Stärke (nur PiSpkr) - - - + Battery Warning Batteriewarnung - + Battery warning voltage. This is the threashhold where the battery warning sounds. @@ -244,23 +661,19 @@ Dies ist die Warnschwelle bei der die Batteriewarnung piepst Mögliche Werte von 5V..10V - + Battery Calibration Kalibrierung Batteriespannung - + Battery calibration: This value will be added to the measured battery voltage. Use this value to calibrate the meter with an external meter. Kalibrierung Batteriespannung: Dieser Wert wird zur gemessenen Batteriespannung addiert. Dieser Wert wird zur Kalibrierung der Anzeige mittels externen Messgerät genutzt. - Backlight Switch - Schalter Hintergrundbeleuchtung - - - + This is the switch selectrion for turning on the backlight (if installed). @@ -269,43 +682,39 @@ Dieser Wert wird zur gemessenen Batteriespannung addiert. Dieser Wert wird zur K - Backlight Auto On/OFF after - Automatische Hintergrundbeleuchtung EIN/AUS nach - - - + If this value is not 0, any keypress will turn on the backlight and turn it off after the specified number of seconds. Wenn dieser Wert ungleich 0 ist, wird die Hintergrundbeleuchtung nach irgendeinem Tastendruck eingeschaltet und nach einer eingestellten Zeit in Sekunden ausgeschaltet. - - + + sec sek - + Inactivity Timer Inaktivitätstimer - + If not zero will sound beeps if the transmitter has been left without inputs for the specified number of minutes. Falls ungleich 0 ertönt ein Piepston wenn der Sender für eine bestimmte Anzahl Minuten nicht bedient wurde. - + min Min - + Timer Beeps Piepston Timer - + <!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; } @@ -314,22 +723,22 @@ p, li { white-space: pre-wrap; } Einzelton jede volle Minute - + Every Minute Jede Minute - + Beeps at 30, 15, 10, and down from5 seconds Piepston bei 30, 15, 10 und 5 Sekunden - + Count Down to Zero Countdown bis 0 - + <!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; } @@ -338,47 +747,27 @@ p, li { white-space: pre-wrap; } Blinken der Hintergrundbeleuchtung nach Timerablauf - + Flash on beep Blinken während Piepsen - - Reverse Throttle Operation - Gasminimum vorne - - - - 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. - - - Gasminimum vorne. -Wenn dieses angewählt wurde ist der Knüppelweg für Gas reversiert. Leerlaufstellung ist vorne, die Trimmung sowie die Knüppelstellungswarnung ist ebenfalls umgedreht. - - - + Show Splash Screen on Startup Zeige Startbildschirm während Start - - + + Show splash screen on startup Zeige Startbildschirm während Start - - Throttle Startup Warning - Warnung Gasknüppelstellung - - - - - - - - + + + + + <!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; } @@ -399,37 +788,32 @@ Warnung stummer Betrieb - Wird angezeigt, wenn der Piepser ausgeschaltet ist - - Switch Startup Warning - Warnung Schalterstellung beim Einschalten - - - + Memory Startup Warning Warnung Speicherplatz beim Einschalten - + Alarm Warning Warnung Alarm - + Pot Scrolling Enable PotScroll einschalten - + Bandgap Measuring Enable Bandgap Messung aktivieren - + Channel Order (For Templates) Kanalanordnung - + Channel order This is used by the templated to determine which channel goes to what number output. @@ -438,12 +822,12 @@ This is used by the templated to determine which channel goes to what number out Damit werden die Kanäle den Ausgängen zugeordnet. - + Stick Mode Knüppelmodus - + Mode selection: Mode 1: @@ -484,40 +868,42 @@ Mode 4: - + 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) - + Beeper Mode Modus Piepser - + + + - - - - - - + + + + + + Beeper volume 0 - Quiet. No beeps at all. @@ -534,235 +920,212 @@ Mode 4: 4 - Sehr laut. - - + + Quiet Stumm - - + + No Keys Kein Tastaturpieps - - + + Normal Normal - - + + Long Lange - + Input Filter Filter Eingang - + Single Einfach - + Oversample Oversample - + Filter Filter - + Owner Name Besitzer - + - - - + + Off Aus - - Switches Up - Schalter oben - - - - Switches Down - Schalter unten - - - + Trainer Trainer - - + + PPM 1 PPM 1 - += - += - - - := - := - - + - - - + + chn1 chn1 + - - - + + chn2 chn2 + - - - + + chn3 chn3 + - - - + + chn4 chn4 - + Mode Modus - + Telemetry NO DATA Alarm Telemetrie Alarm aktivieren - + Show Owner Name on Splash Zeige Besitzernamen in Startbildschirm - + Only Alarms nur Alarme - - + + All Alles - Backlight On Stick Move - HG Licht bei Knüppelbewegung - - - + THR THR - + RUD RUD - + ELE ELE - + AIL leave it as abreviation? AIL - + GEA GEA - + ID0 ID0 - + ID1 ID1 - + ID2 ID2 - + Beeper Length Piepser Länge - - + + X-Short X-kurz - - + + Short Kurz - - + + X-Long X-lang - + Haptic Mode Haptik Modus - + Alarms Only nur Alarme - + Haptic Length - + GPS Coordinates @@ -777,122 +1140,122 @@ Mode 4: - + Speaker - + BeeperVoice - + SpeakerVoice - + hh° (N/S) mm' ss''.dd - + NMEA - + Timeshift from UTC - + LCD Display Type - + Standard - + Optrex - + Speaker Volume - + Haptic Strength - + BackLight Brightness Helligkeit der Hintergrundbeleuchtung - + RotEnc Navigation - + BackLight Auto OFF after Automatische Hintergrundbeleuchtung AUS nach - + BackLight Switch Schalter Hintergrundbeleuchtung - + BackLight On Stick Move HG Licht bei Knüppelbewegung - + BackLight Invert Hintergrundbeleuchtung invertieren - + Country Code - + Europe - + Japan - + America Amerika - + FrSky Internal Alarm - + StickScroll - + PPMSim @@ -902,47 +1265,47 @@ Mode 4: - + CrossTrim - + Beep volume Piepser lautstärke - + Wav volume - + Vario volume Vario Lautstärke - + Background volume Hintergrundlautstärke - + Measurement Units - + Metric Metrisch - + Imperial Imperial - + FAI Mode @@ -952,679 +1315,965 @@ Mode 4: - + 4800 Baud - + 9600 Baud - + 14400 Baud - + 19200 Baud - + 38400 Baud - + 57600 Baud - + 76800 Baud - + 115200 Baud - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. - + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + Readonly Unlock - + SC - + SE - + SA - + SF - + SH - + SD - + SB - + SG - + Input Eingang - + Weight Weg - + Switch Schalter + - - - + + += (Sum) += (add) + - - - + + := (Replace) := (ersetzen) - - + + PPM 2 PPM 2 - - + + PPM 3 PPM 3 - - + + PPM 4 PPM 4 - + Telemetry Telemetrie - + RSSI Alarm 1 RSSI Alarm 1 - - + + ---- ---- - - + + Yellow gelb - - + + Orange orange - - + + Red Rot - + RSSI Alarm 2 RSSI Alarm 2 - + NO DATA Alarm KEINE DATEN Alarm - + Calibration Kalibrierung - + POT 4 POT 4 - + Current - - + + + Pot (normal) + + + + + + Multipos Switch + + + + + S1 Type + + + + + S2 Type + + + + + Mid value Mid Value - Negative - Negativ - - - Mid - Mitte - - - Positive - Positiv - - - + STICK 1 KNÜPPEL 1 - + STICK 2 KNÜPPEL 2 - + STICK 3 KNÜPPEL 3 - - + + Negative span - - + + Positive span - + STICK 4 KNÜPPEL 4 - + POT 1 POT 1 - + POT 2 POT 2 - + POT 3 POT 3 - + Battery Akku - ANALOG 1 - ANALOG 1 - - - ANALOG 2 - ANALOG 2 - - - ANALOG 3 - ANALOG 3 - - - ANALOG 4 - ANALOG 4 - - - ANALOG 5 - ANALOG 5 - - - ANALOG 6 - ANALOG 6 - - - ANALOG 7 - ANALOG 7 - - - + v v - PPM In - PPM In - - - + PPM Multiplier PPM Multiplikator - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. Are you sure ? - - + + Warning Warnung - + Wrong data in profile, radio calibration was not retrieved - + Wrong data in profile, hw related parameters were not retrieved - + Do you want to store calibration in %1 profile<br>overwriting existing calibration? - + Calibration and HW parameters saved. + + Heli + + + Form + + + + + Invert Elevator + Höhenruder invertieren + + + + Invert Aileron + Querruder invertieren + + + + Invert Collective + Collective Pitch invertieren + + + + Invert + Invertieren + + + + Off + Aus + + + + 120 + 120 + + + + 120X + 120X + + + + 140 + 140 + + + + 90 + 90 + + + + Collective + Collective + + + + Swash Type + Taumelscheibe + + + + Swash Ring + Ring Taumelscheibe + + + + InputsPanel + + + + Move Up + Nach oben + + + + + Ctrl+Up + Ctrl+Up + + + + + Move Down + Nach unten + + + + + Ctrl+Down + Ctrl+Down + + + + Clear All Settings + + + + + Source(%1) + + + + + No Trim + + + + + Weight(%1) + + + + + Switch(%1) + + + + + Not enough available inputs! + + + + + Delete Selected Inputs? + + + + + &Add + &Addieren + + + + Ctrl+A + Ctrl+a + + + + &Edit + + + + + Enter + Eingabe + + + + &Delete + &Löschen + + + + Delete + Löschen + + + + &Copy + &Kopieren + + + + Ctrl+C + + + + + &Cut + &Ausschneiden + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + + + Du&plicate + D&uplizieren + + + + Ctrl+U + + + + + Clear Inputs? + + + + + Really clear all the inputs? + + + + + LogicalSwitchesPanel + + + Condition + Zustand + + + + V1 + V1 + + + + V2 + V2 + + + + AND + + + + + Duration + + + + + Delay + Verzögerung + + + + + LS%1 + + + + + &Delete + &Löschen + + + + Delete + Löschen + + + + &Copy + &Kopieren + + + + Ctrl+C + + + + + &Cut + &Ausschneiden + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + MainWindow - eePe - EEPROM Editor - eePe EEPROM Editor - - - - - - + + + + File loaded Datei geladen - eePe - eePe - - - A new version of ER9x is available<br>Would you like to download it? - Eine neue Version des ER9X ist vorhanden. Möchtest Du diese herunterladen ? - - - - - - - + + + + + Save As Speichern unter - EEPROM hex files (*.hex);;EEPROM bin files (*.bin) - EEPROM hex Datei (*.hex);;EEPROM bin Datei (*.bin) - - - - + + No updates available at this time. Kein Update vorhanden. - - - - - + + + + + Unable to check for updates. Kann nicht auf Updates überprüfen. - A new version of eePe is available<br>Would you like to download it? - Eine neue Version von eePe ist vorhanden. Möchtest Du diese herunterladen ? - - - A new version of ER9x (%2) is available (r%1)<br>Would you like to download it? - Eine neue Version von ER9x(%2) ist vorhanden(r%1)<br>Möchtest Du diese herunterladen ? - - - + Executable (*.exe) Anwendung (*.exe) - + + A new release of Companion is available please check the OpenTX website! + + + + Would you like to launch the installer? 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 - EEPROM files (*.bin *.hex);;BIN files (*.bin);;HEX files (*.hex) - EEPROM Dateien (*.bin *.hex);;BIN Dateien (*.bin);;HEX Dateien (*.hex) - - - - + + File saved Datei gespeichert - Read EEPROM From Tx - Lese EEPROM vom Sender - - - Choose file to write to EEPROM memory - Wähle Datei zum Schreiben in den EEPROM Speicher - - - FLASH files (*.bin *.hex);;BIN files (*.bin);;HEX files (*.hex) - FLASH Dateien (*.bin *.hex);;BIN Dateien (*.bin);;HEX Dateien (*.hex) - - - Write %1 to EEPROM memory? - Brenne %1 in den Sender ? - - - Choose file to write to flash memory - Wähle Datei zum Schreiben in den Flashspeicher - - - Write %1 to flash memory? - Schreibe %1 in den Flashspeicher ? - - - Read EEPROM memory to File - Lese EEPROM Speicher und speichere in Datei - - - HEX files (*.hex);;BIN files (*.bin);;FLASH files (*.bin *.hex) - HEX Dateien (*.hex);;BIN Dateien (*.bin);;FLASH Dateien (*.bin *.hex) - - - Read Flash to File - Lese Flash und speichere in Datei - - - + Copyright Copyright - If you've found this program and/or the er9x firmware useful please support by - If you've found this program and/or the Firmware useful please support by - Wenn Du dieses Programm und/oder die Firmware nützlich findest dann unterstütze uns durch - - - - donating - spenden - - - About eePe - Ü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... - Check for new version of eePe/er9x - Überprüfe auf eine neue Version von eePe/er9x - - - + Display previous warning again at startup ? - 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? - - - + New release available - - - - - - - - - - - - - + + + + + + + + + + + + + Error Fehler - - - - - + + + + + Error opening file %1: %2. Fehler beim Öffnen der Datei %1: %2. - + Compilation server termporary failure, try later - + 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 - + Compilation server temporary failure, try later - - + + Compilation server too busy, try later - - + + Unknown server failure, try later - + Firmware does not fit in the Tx, due to selected firmware options - + Firmware %1 does not seem to have ever been downloaded. Version %2 is available. Do you want to download it now ? @@ -1633,791 +2282,838 @@ Version %2 ist verfügbar. Möchten Sie sie jetzt herunterladen? - - - Yes - Ja - - - - No - Nein + + 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 ? - + + The selected language will be used the next time you start Companion. + + + + + + + OK + + + + + The new theme will be loaded the next time you start Companion. + + + + + The icon size will be used the next time you start Companion. + + + + 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. - The file %1 -has not been recognized as a valid EEPROM -Burn anyway ? - Die Datei %1 -wurde nicht als gültige EEPROM Datei erkannt. -Trotzdem brennen? + + &Old Preferences Dialog... + - - - + + Used the old Preferences Dialog + + + + + &Application Preferences... + + + + + Edit application preferences + + + + + Configure transmitter start screen... + + + + + + Backup is impossible - - - + + + The backup dir set in preferences does not exist - Backup EEPROM From Tx - Sicherung EEPROM von Tx - - - - + + Warning Warnung - Write Flash To Tx - Brenne Flash in den Tx - - - + Conversion failed Umwandlung gescheitert - Cannot convert EEProm for this firmware, original EEProm file will be used - EEProm Umwandlung für diese Firmware nicht möglich, die ursprüngliche EEProm Datei wird verwendet. - - - Restore EEPROM To Tx - EEPROM in Tx zurückspeichern - - - + Restore failed Zurückspeicherung gescheitert - Cannot restore EEProm to TX, original EEProm file can be found at: %1 - Wiederherstellung EEPRom in den Tx ist nicht möglich, die ursprüngliche EEProm Datei ist verfügbar unter: %1 - - - Flash failed - Flash gescheitert - - - Cannot flash the TX, original EEProm file can be found at: %1 - Flashen des Tx nicht möglich, ursprüngliche EEProm Dateil ist verfügbar unter: %1 - - - + Backup failed Sicherung fehlgeschlagen - Cannot backup existing EEProm from TX, Flash process aborted - Sicherung des bestehenden EEEPROMs vom Tx gescheitert, Flash Prozess abgebrochen - - - + 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. - - - - If you've found this program useful, please support by - Wenn Sie diese Programm hilfreich finden, bitte unterstützen Sie - - - About 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 - - - + Contributors &List... &Mitwirkende... - Show companion9x contributors list - Zeige die Liste der Mitwirkenden von 'companion9x' - - - + ChangeLog... - - The Companion project was originally forked from eePe + + OpenTX Home Page: <a href='%1'>%1</a> - + + The OpenTX Companion project was originally forked from <a href='%2'>eePe</a> + + + + + If you've found this program useful, please support by <a href='%1'>donating</a> + + + + + Version %1, %3 + + + + About Companion - + + &Downloads and Profiles... + + + + + Firmware and voice file downloads as well as profile definition. + + + + 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 connection software... + + + + Configure software for reading from and writing to the transmitter - - + + Classic + + + + + The multicolor classical Companion icon theme + + + + + A monochrome black icon theme + + + + + A monochrome white icon theme + + + + + A monochrome blue icon theme + + + + + Small + + + + + Use small toolbar icons + + + + + Use normal size toolbar icons + + + + + Normal + Normal + + + + Use big toolbar icons + + + + + Big + + + + + Use huge toolbar icons + + + + + Huge + + + + + System default language + + + + + Use system default language in menus + + + + + Czech + + + + + Use Czech in menus + + + + + German + Deutch + + + + Use German in menus + + + + + English + + + + + Use English in menus + + + + + French + + + + + Use French in menus + + + + + Italian + + + + + Use Italian in menus + + + + + Hebrew + + + + + Use Hebrew in menus + + + + + Polish + + + + + Use Polish in menus + + + + + Portuguese + + + + + Use Portuguese in menus + + + + + Swedish + + + + + Use Swedish in menus + + + + + Russian + + + + + Use Russian in menus + + + + + Manuals and other Documents + + + + + Open the OpenTX document page in a web browser + + + + + Set Icon Theme + + + + + Set Icon Size + + + + + &Settings + + + + + Invalid Models and Settings File %1 - + Invalid binary Models and Settings File %1 - &Write EEPROM To Tx - &Schreibe EEPROM in den Sender - - - + Ctrl+Alt+W Ctrl+Alt+W - Write EEPROM to transmitter - Schreibe EEPROM in den Sender - - - &Read EEPROM From Tx - &Lese EEPROM vom Sender - - - + Ctrl+Alt+R Ctrl+Alt+R - Read EEPROM from transmitter - Lese EEPROM vom Sender - - - Write Flash memory - Schreibe Flash Speicher - - - Write flash memory to transmitter - Schreibe Flash Speicher in den Sender - - - Write EEPROM memory from file - Schreibe EEPROM Speicher aus Datei - - - Write EEPROM memory from file to transmitter - Schreibe EEPROM Speicher aus Datei in den Sender - - - Read EEPROM memory to file - Lese EEprom Speicher und schreibe in Datei - - - Read EEPROM memory from transmitter to file - Lese EEPROM Speicher vom Sender und speichere in Datei - - - Read Flash memory - Lese Flash Speicher - - - Read flash memory to transmitter - Lese Flash Speicher und schreibe in den Sender - - - - &Configure... - &Einstellungen... - - - Configure burning software - 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 - + + Set Menu Language + + + + &Read/Write - + Write - + Unable to find file %1! Kann die Datei %1 nicht finden ! - Invalid EEPROM File %1 - Ungültige EEPROM Datei %1 - - - + Error reading file %1: %2. Fehler beim Lesen der Datei %1: %2. - Invalid binary EEPROM File %1 - Ungültige EEPROM Programmdatei %1 - - - &Contributors - &Mitwirkende - - - List er9x/eePe Contributors - Zeige die er9x/eePe Mitwirkende - - - - Switch layout Left/Right - Schalte Layout um Rechts/Links - - - - + + Firmware Profiles - + &File &Datei - - Switch layout direction - Schalte Programmlayout um - - - companion9x - EEPROM Editor - companion9x - EEPROM Editor - - - + Checking for updates Überprüfe auf Updates - + Ignore this version (r%1)? Diese Version ignorieren (%1)? - A new version of eePe is available (r%1)<br>Would you like to download it? - Eine neue Version von eePe ist vorhanden /r%1)<br>Möchtest Du diese herunterladen ? - - - + &Edit &Bearbeiten - &Burn - B&rennen - - - - &Window - &Fenster - - - + &Help &Hilfe - + File Datei - + Edit Bearbeiten - Burn - Brennen - - - + Help Hilfe - + Ready Fertig @@ -2425,152 +3121,82 @@ Write anyway ? MdiChild - General Settings - Generelle Einstellungen - - - Delete Selected Models? - Gewähltes Modell löschen ? - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + Error Fehler - Unable set data! - Kann die Daten nicht setzen ! - - - Unable set model! - Kann das Modell nicht anlegen ! - - - + Editing model %1: Modell %1 bearbeiten : - Unable to read settings! - Kann die Einstellungen nicht lesen ! - - - document%1.eepe - document%1.hex - Dokument%1.hex - - - - + + Unable to find file %1! Kann die Datei %1 nicht finden ! - Cannot read file %1: -%2. - Kann die Datei %1: -%2 nicht lesen. - - - Error reading file %1! - Fehler beim Lesen der Datei %1 ! - - - - + + Error reading file %1: %2. Fehler beim Lesen der Datei %1: %2. - Error loading file %1: -%2. - File wrong size - %1 - Fehler beim Lesen der datei %1: -%2. - - - Error reading file: -File wrong size - %1 - Fehler beim Lesen der Datei: -Dateigröße falsch - %1 - - - - - - + + + + Error opening file %1: %2. Fehler beim Öffnen der Datei %1: %2. - - - - + + + + Save As Speichern unter - EEPROM hex files (*.hex);;EEPROM bin files (*.bin) - EEPROM hex Datei (*.hex);;EEPROM bin Datei (*.bin) - - - - - - + + + + Cannot write file %1: %2. Kann Datei %1: %2 nicht schreiben. - :20%1000 - :20%1000 - - - %1 - %1 - - - - + + Error writing file %1: %2. Fehler beim Schreiben der Datei %1: %2. - - - eePe - eePee - - - '%1' has been modified. -Do you want to save your changes? - '%1' wurde geändert. -Möchtest Du die Änderungen speichern ? @@ -2578,302 +3204,199 @@ Möchtest Du die Änderungen speichern ? Freie Bytes - + Do you want to use model wizard? - - - + + + Companion - + Ask this question again ? - - + + Invalid EEPROM File %1 Ungültige EEPROM Datei %1 - + Invalid binary EEPROM File %1 Ungültige EEPROM Programmdatei %1 - + Backup is impossible - + The backup dir set in preferences does not exist - - - + + + Taranis radio not found - - - + + + Impossible to identify the radio on your system, please verify the eeprom disk is connected. - - - + + + Backup EEPROM From Tx Sicherung EEPROM von Tx - + Cannot check eeprom compatibility! Continue anyway? - - + + Warning Warnung - + Firmware in radio is of a different family of eeprom written, check file and preferences! - + Firmware in flash is outdated, please upgrade! - + Write EEPROM To Tx - + Open Öffnen - + Invalid binary backup File %1 - companion9x - companion9x - - - + %1 has been modified. Do you want to save your changes? %1 wurde verändert. Wollen Sie Ihre Änderungen sichern? - Write %1 to EEPROM memory? - Burn %1 to transmitter? - Brenne %1 in den Sender ? - - - + Cannot write temporary file! Kann temporäre Datei nicht schreiben! - - &Edit - &Bearbeiten - - - &Delete - &Löschen - - - Delete - Löschen - - - &Copy - &Kopieren - - - Ctrl+C - Ctrl+C - - - &Cut - &Ausschneiden - - - Ctrl+X - Ctrl+X - - - &Paste - &Einfügen - - - Ctrl+V - Ctrl+V - - - D&uplicate - D&uplizieren - - - Ctrl+U - Ctrl+U - - - &Simulate - &Simulieren - - - Alt+S - Alt+S - - - &Write To Tx - &Schreibe in den Sender - - - Ctrl+Alt+W - Ctrl+Alt+W - MixerDialog - + Dialog Dialog - + Source Quelle - - - - + + + + The source for the mixer Die Mischerquelle - + Weight Gewichtung - The value of the mixer is multiplied by this value and divided by 100. - Der Mischerwert wird mit diesem Wert multipliziert und durch 100 dividiert. - - - - - - + Offset Offset - <!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;">This value is added to the <span style=" font-weight:600;">input </span>of the mixer.</p></body></html> - Dieser Wert wird zum Eingang addiert - - - + Include Trim Trimmung einschliessen - If checked - will add the trim from the source (if available) - ?? - Wenn angewählt wird die Trimmung zur Quelle addiert (falls vorhanden) - - - + Curve Kurve - + The curve used by the mix Die Mischerkurve - + Switch Schalter - - Fix Offset - - - - - - + + + GV - + Switch used by the mix. If blank then the mix is considered to be "ON" all the time. Mischerschalter. Wenn leer ist der Mischer immer aktiv. - + Yes Ja - + No Nein - + Warning Warnung - + Name Name - - Curve/Differential - - - - Phases - Phasen - - - + Mixer warning. Setting this value will cause a beep to be emmitted when this value is active. Not clear what that means... @@ -2881,32 +3404,32 @@ Setting this value will cause a beep to be emmitted when this value is active. - + OFF AUS - + 1 Beep 1 Piepston - + 2 Beep 2 Piepstöne - + 3 Beep 3 Piepstöne - + Multiplex MULTIPLEX - + Multiplexer This determines how mixer values are added. @@ -2923,108 +3446,95 @@ Diese Einstellung bestimmt wie die Mischerwerte behandelt werden. "R" bedeutet der Wert des aktuellen Mischers ersetzt den vorhergehenden Mischer. Wenn der Schalter aus ist wird der Wert ignoriert. - + ADD ADDIEREN - + MULTIPLY MULTIPLIZIEREN - + REPLACE ERSETZEN - + Flight modes Flugphasen - + Include DR/Expo - + 0 0 - + 1 1 - + 2 2 - + 3 3 - + 4 4 - + 5 5 - + 6 6 - + 7 7 - + 8 8 - Phase - Phase - - - - Enable FM Trim - FPh Trimmung einschl - - - Differential - Differential - - - + Delay Verzögerung - + Slow Langsam - + Up Nach oben - - - - + + + + <!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; } @@ -3050,3099 +3560,554 @@ p, li { white-space: pre-wrap; } Anzahl Sekunden fest, welche der Mischer für einen Durchgang von -100 bis +100 benötigen soll.</p></body></html> - + Down Nach unten - + DEST -> X%1 - + DEST -> CH%1%2 DEST -> CH%1%2 - - - FM Trim Value - FPh Trim Wert - - - + Rud Rud - + Ele Ele - + Thr Thr - + Ail Ail + + MixesPanel + + + + Move Up + Nach oben + + + + + Ctrl+Up + Ctrl+Up + + + + + Move Down + Nach unten + + + + + Ctrl+Down + Ctrl+Down + + + + Clear Mixes + Mischer löschen + + + + + + X%1 + + + + + + + CH%1%2 + CH%1%2 + + + + Weight(%1) + + + + + Switch(%1) + + + + + No Trim + + + + + No DR/Expo + + + + + Offset(%1) + + + + + Delay(u%1:d%2) + Verzögerung(u%1:d%2) + + + + Slow(u%1:d%2) + Langsam/u%1:d%2) + + + + Warn(%1) + Warnung(%1) + + + + Not enough available mixers! + Nicht genügend Mischer verfügbar! + + + + Delete Selected Mixes? + Lösche ausgewählte Mischer? + + + + &Add + &Addieren + + + + Ctrl+A + Ctrl+a + + + + &Edit + + + + + Enter + Eingabe + + + + &Delete + &Löschen + + + + Delete + Löschen + + + + &Copy + &Kopieren + + + + Ctrl+C + + + + + &Cut + &Ausschneiden + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + + + Du&plicate + D&uplizieren + + + + Ctrl+U + + + + + Clear Mixes? + Mischer löschen? + + + + Really clear all the mixes? + Wirklich alle Mischer löschen ? + + ModelEdit - + Dialog Dialog - Trainer - Trainer - - - - Throttle2Trig - Throttle2Trig - - - - - - PPM Frame Length - not accurate Translation - PPM Frame Length - - - - - - mSec - mSec - - - - - DSM Type - DSM-Typ - - - - - LP4/LP5 - LP4/LP5 - - - - - DSM2only - nurDSM2 - - - - - DSM2/DSMX - DSM2/DSMX - - - - - RX Number - Rx Nummer - - - - Throttle Source - Throttle Trace - Gas Verfolgung - - - - - CH01 - CH01 - - - - - CH02 - CH02 - - - - - CH03 - CH03 - - - - - CH04 - CH04 - - - - - CH05 - CH05 - - - - - CH06 - CH06 - - - - - CH07 - CH07 - - - - - CH08 - CH08 - - - - - CH09 - CH09 - - - - - CH10 - CH10 - - - - - CH11 - CH11 - - - - - CH12 - CH12 - - - - - CH13 - CH13 - - - - - CH14 - CH14 - - - - - CH15 - CH15 - - - - - CH16 - CH16 - - - Function switches - Funktionsschalter - - - FSwitch13 - FSchalter13 - - - FSwitch15 - FSchalter15 - - - FSwitch14 - FSchalter14 - - - FSwitch1 - FSchalter 1 - - - FSwitch2 - FSchalter2 - - - FSwitch3 - FSchalter3 - - - FSwitch4 - FSchalter4 - - - FSwitch5 - FSchalter5 - - - FSwitch6 - FSchalter6 - - - FSwitch7 - FSchalter7 - - - FSwitch8 - FSchalter8 - - - FSwitch9 - FSchalter9 - - - FSwitch10 - FSchalter10 - - - FSwitch11 - FSchalter11 - - - FSwitch12 - FSchalter12 - - - FSwitch16 - FSchalter16 - - - - - Param - Parameter - - - - Disable Throttle Warning + + Heli - - Switch startup Warning + + Inputs - - Instant Trim - Instant Trim - - - - REa + + Logical Switches - - REb + + Switch Assignment - - 3POS - 3POS - - - - - Check - - - - - - - ON - - - - - - OFF - AUS - - - - GEA - GEA - - - - ID0 - ID0 - - - - ID1 - ID1 - - - - ID2 - ID2 - - - - - TriggerB - - - - - Model Voice - - - - - - - - - - - - - GVAR1 - - - - - - - - - - - - - GVAR2 - - - - - - - - - - - - - GVAR3 - - - - - - - - - - - - - GVAR4 - - - - - - - - - - - - - GVAR5 - - - - - - - - - - - - - Rotary encoder B - - - - - - - - - - - - - Rotary encoder A - - - - - - Sym - - - - - - Curve type - - - - - 3 points - - - - - 3 points custom - - - - - 5 points - - - - - 5 points custom - - - - - 9 points - - - - - 9 points custom - - - - - 17 points - - - - - 17 points custom - - - - - - Duration - - - - CSwitchF - CSchalterF - - - CSwitchD - CSchalterD - - - CSwitchE - CSchalterE - - - CSwitchG - CSchalterG - - - - - Delay - Verzögerung - - - CSwitchT - CSchalterT - - - CSwitchM - CSchalterM - - - CSwitchP - CSchalterP - - - CSwitchH - CSchalterH - - - CSwitchO - CSchalterO - - - CSwitchN - CSchalterN - - - CSwitchQ - CSchalterQ - - - CSwitchR - CSchalterR - - - CSwitchS - CSchalterS - - - CSwitchL - CSchalterL - - - CSwitchK - CSchalterK - - - CSwitchJ - CSchalterJ - - - CSwitchI - CSchalterI - - - CSwitchU - CSchalterU - - - CSwitchV - CSchalterV - - - CSwitchW - CSchalterW - - - - Custom Functions - - - - - Alti+ - - - - - Vario - - - - - Telemetry screen 1 - - - - - - - Custom Screen Type - - - - - - - Nums - - - - - - - Bars - - - - - Telemetry screen 2 - - - - FSwitch17 - FSchalter17 - - - FSwitch18 - FSchalter18 - - - FSwitch19 - FSchalter19 - - - FSwitch20 - FSchalter20 - - - FSwitch21 - FSchalter21 - - - FSwitch22 - FSchalter22 - - - FSwitch23 - FSchalter23 - - - FSwitch24 - FSchalter24 - - - FSwitch25 - FSchalter25 - - - FSwitch26 - FSchalter26 - - - FSwitch27 - FSchalter27 - - - FSwitch28 - FSchalter28 - - - FSwitch29 - FSchalter29 - - - FSwitch30 - FSchalter30 - - - FSwitch31 - FSchalter31 - - - FSwitch32 - FSchalter32 - - - + Telemetry Telemetrie - - - - - A1 - A1 - - - - - Unit - Einheit - - - Volts (v) - Volt(v) - - - - - Raw (-) - Roh(-) - - - - - Max Value - Maximal - - - - ModelSetup - - - - - SB - - - - - SD - - - - - SA - - - - - SC - - - - - SG - - - - - SE - - - - - SF - - - - - RS - - - - - Reverse Throttle Operation - Gasminimum vorne - - - - 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. - - - Gasminimum vorne. -Wenn dieses angewählt wurde ist der Knüppelweg für Gas reversiert. Leerlaufstellung ist vorne, die Trimmung sowie die Knüppelstellungswarnung ist ebenfalls umgedreht. - - - - Master - - - - - Slave - - - - - Trainer Mode - - - - - Master/Trainer Port - - - - - - - Start - - - - - - Polarity - - - - - RF Module 1 - - - - - RF Module 2 - - - - - - Persistent - - - - - - (00:00:00) - - - - - - MinuteBeep - - - - - - CountDownBeep - - - - - Model Image - - - - - Failsafe - - - - - External module - - - - - - Failsafe Mode - - - - - - Hold - - - - - - Custom - - - - - - No Pulses - - - - - Internal Module - - - - + Flight Modes - - Flight Mode 0 (Default) - - - - - - - - - - - - - Flight Mode Name - - - - - GVAR6 - - - - - GVAR7 - - - - - FM 1 - - - - - FM 2 - - - - - FM 3 - - - - - FM 4 - - - - - FM 5 - - - - - FM 6 - - - - - FM 7 - - - - - FM 8 - - - - - Sticks - - - - - Show channels names in mixes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- - --- - - - - - Center - - - - - Curve name - - - - - Curve Creator - - - - - Y at X=100 - - - - - Both - - - - - x>0 - - - - - x<0 - - - - - Linear - - - - - Single Expo - - - - - Symmetrical f(x)=-f(-x) - - - - - Symmetrical f(x)=f(-x) - - - - - Apply - - - - - Side - - - - - Y at X=-100 - - - - - Y at X=0 - - - - - Coefficient - - - - - CS9 - - - - - CSF - - - - - CSD - - - - - - AND - - - - - CS6 - - - - - CS1 - - - - - CS8 - - - - - CS7 - - - - - CSA - - - - - CSB - - - - - CSC - - - - - CS5 - - - - - CS3 - - - - - CS2 - - - - - CSE - - - - - CSG - - - - - CS4 - - - - - CST - - - - - CSM - - - - - CSP - - - - - CSH - - - - - CSO - - - - - CSN - - - - - CSQ - - - - - CSR - - - - - CSS - - - - - CSL - - - - - CSK - - - - - CSJ - - - - - CSI - - - - - CSU - - - - - CSV - - - - - CSW - - - - - - Enable - aktivieren - - - - Volt source - - - - - Current source - - - - - NONE - - - - - - FAS - - - - - CEL - - - - - Altimetry / Vario - - - - - Alti - - - - - Sink Max - Sunk Max - - - - - Climb Max - Raise Max - - - - - Sink Min - Sunk Min - - - - - Climb Min - Raise Min - - - - - Vario source - - - - - Vario limits - - - - - Use GPS as altitude source - - - - - Display altitude in toolbar - - - - - - Alarm 1 - Alarm 1 - - - - - - - - - ---- - ---- - - - - - - - - - Yellow - Gelb - - - - - - - - - Orange - orange - - - - - - - - - Red - Rot - - - - - - - < - < - - - - - - - > - > - - - - - - Alarm 2 - Alarm 2 - - - - - Min Value - Minimal - - - - - - - A2 - A2 - - - - RSSI - RSSI - - - - Alarm 1 - Alarm 1 - - - - Serial Protocol - Serielles Protokoll - - - - Units - Einheiten - - - - None - Nichts - - - - FrSky Sensor Hub - FrSky Sensor Hub - - - - Metric - Metrisch - - - - Imperial - Imperial - - - - 2 - 2 - - - - 3 - 3 - - - - 4 - 4 - - - - Blades - Rotorblätter - - - - - Volts (V) - - - - - - Amps (A) - - - - - - Speed (m/s or ft/s) - - - - - - Speed (km/h or miles/h) - - - - - - Meters (m or ft) - - - - - - Temp (°) - - - - - - Fuel (%) - - - - - - mAmps (mA) - - - - Telemetry Gauges - Telemetrie Balkenanzeigen - - - - - - Source - Quelle - - - - - - Gauge - Balken - - - - - - Gauge 1 - Balken 1 - - - TX Alarm - TX Alarm - - - RX Alarm - RX Alarm - - - - - - Gauge 2 - Balken 2 - - - - - - Gauge 3 - Balken 3 - - - - - - Gauge 4 - Balken 4 - - - - Telemetry screen 3 - - - - - Templates - Vorlagen - - - + Simulate Simulation - + Setup Konfiguration - - Model Name - Modell Name - - - Timer Mode - Modus Stoppuhr - - - Timer Direction - Richtung Stoppuhr - - - - - Count Down - Herunterzählen - - - - - Count Up - Hinaufzählen - - - Timer Value - Einstellung Stoppuhr - - - - - mm:ss - mm:ss - - - - Trim Increment - Trimmer Inkrement - - - - Exponential - Exponential - - - - Extra Fine - Sehr fein - - - - Fine - Fein - - - - Medium - Mittel - - - - Coarse - Grob - - - - Throttle Trim - Trimmung Gas - - - - Throttle Expo - Expo Gas - - - instaTrim Switch - instaTrim Schalter - - - - Center beep - Zentrierpiepston - - - - - - - - - - - - RUD - RUD - - - - - - - - - - - - - - - ELE - ELE - - - - - - - - THR - THR - - - - - - - - - - - - - AIL - AIL - - - - P1 - P1 - - - - P2 - P2 - - - - P3 - P3 - - - - Pulse Shift (polarity) - Puls Shift (Polarität) - - - - - - Positive - Positiv - - - - - - Negative - Negativ - - - - - - Protocol - Protokoll - - - - - + Channels Kanäle - - - - - - - ch - ch - - - ppm Delay - ppm Verzögerung - - - - - - usec - usec - - - - Extended Limits - Erweiterte Grenzen - - - - - Heli Setup - Hubschrauber Setup - - - - Swash Type - Taumelscheibe - - - - - Off - Aus - - - - 120 - 120 - - - - 120X - 120X - - - - 140 - 140 - - - - 90 - 90 - - - - Collective - Collective - - - - Swash Ring - Ring Taumelscheibe - - - - Invert Elevator - Höhenruder invertieren - - - - Invert Aileron - Querruder invertieren - - - - Invert Collective - Collective Pitch invertieren - - - Expo/Dr - Expo/Dir - - - HIGH - HOCH - - - MID - MITTE - - - LOW - NIEDRIG - - - Expo -Left - Expo links - - - D/R -Left - D/R links - - - D/R -Right - D/R rechts - - - Expo -Right - Expo rechts - - - Switch1 - Schalter1 - - - Switch2 - Schalter2 - - - Rudder - Seitenruder - - - Aileron - Querruder - - - Throttle - Gas - - - Elevator - Höhenruder - - - + Mixes Mischer - - Limits - Grenzen - - - NOR - NOR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INV - INV - - - - - - Channel - Kanal - - - - - - Offset - Offset - - - - - - - - Min - Min - - - - - - - - Max - Max - - - - - - Invert - Invertieren - - - + Curves Kurven - - Curve 1 - Kurve 1 - - - - Curve 2 - Kurve 2 - - - - Timer1 - Stoppuhr1 - - - - Timer2 - Stoppuhr2 - - - - - - PPM delay - PPM delay - - - - Extended Trims - Erweiterte Trimmung - - - Phases - Phasen - - - Flight Phase 0 (default) - Flugphase 0 (standard) - - - Phase Name - Phasen Name - - - - - - - - - - - - Fade In - Fade In - - - - - - - - - - - - Fade Out - Fade Out - - - - - - - - - - - - trim2 - Trimmung2 - - - - - - - - - - - - trim1 - Trimmung1 - - - - - - - - - - - - trim4 - Trimmung4 - - - - - - - - - - - - trim3 - Trimmung3 - - - Flight Phase 1 - Flugphase 1 - - - Flight Phase 2 - Flugphase 2 - - - Flight Phase 3 - Flugpase3 - - - Flight Phase 4 - Flugphase 4 - - - Expos/DR - Expos - Expos/DR - - - - Curve 3 - Kurve 3 - - - - Curve 4 - Kurve 4 - - - - Curve 5 - Kurve 5 - - - - Curve 6 - Kurve 6 - - - - Curve 7 - Kurve 7 - - - - Curve 8 - Kurve 8 - - - - Curve 9 - Kurve 9 - - - - Curve 10 - Kurve 10 - - - - Curve 11 - Kurve 11 - - - - Curve 12 - Kurve 12 - - - - Curve 13 - Kurve 13 - - - - Curve 14 - Kurve 14 - - - - Curve 15 - Kurve 15 - - - - Curve 16 - Kurve 16 - - - - Clear All Curves - Clear All Mixes - Alle Kurven löschen - - - Switches - Schalter - - - CSwitch1 - CSchalter1 - - - CSwitch2 - CSchalter2 - - - CSwitch3 - CSchalter3 - - - CSwitch4 - CSchalter4 - - - CSwitch5 - CSchalter5 - - - CSwitch6 - CSchalter6 - - - - - - - Function - Funktion - - - - Custom switches - Freie Schalter - - - - - V1 - V1 - - - - - V2 - V2 - - - CSwitch7 - CSchalter7 - - - CSwitch8 - CSchalter8 - - - CSwitch9 - CSchalter9 - - - CSwitchA - CSwitch10 - CSchalterA - - - CSwitchB - CSwitch11 - CSchalterB - - - CSwitchC - CSwitch12 - CSchalterC - - - - Safety Switches - Sicherheitsschalter - - - - - - - - - - - - - - - - Switch - Schalter - - - - Value - Wert - - - Trims - Trimmer - - - STICK 1 - KNÜPPEL 1 - - - STICK 2 - KNÜPPEL 2 - - - STICK 4 - KNÜPPEL 4 - - - STICK 3 - KNÜPPEL 3 - - - - - - CH%1%2 - CH%1%2 - - - Switch( - Schalter( - - - noTrim - kein Trimmer - - - Offset(%1%) - Offset(%1%) - - - Curve(%1) - Kurve(%1) - - - - Delay(u%1:d%2) - Verzögerung(u%1:d%2) - - - - Slow(u%1:d%2) - Langsam/u%1:d%2) - - - - Warn(%1) - Warnung(%1) - - - Curve %1 - Kurve %1 - - - - - Expo - Expo - - - Phase - Phase - - - - - Curve - Kurve - - - noTrim - keinTrim - - - - FMTrim - FPh Trimmung - - - - Diff - Diff - - - - CF%1 - - - - - Error - Fehler - - - - Unable to find sound file %1! - - - - - Winged Shadow How High - Winged Shadow How High - - - - Winged Shadow How High (not supported) - Winged Shadow How High (nicht unterstützt) - - - - - Range - Bereich - - - - Simple 4-CH - - - - - T-Cut - - - - - Sticky T-Cut - - - - - V-Tail - - - - - Elevon\Delta - - - - - Heli Setup with gyro gain control - - - - - Gyro gain control - - - - - Heli Setup (Futaba's channel assignment style) - - - - - Heli Setup with gyro gain control (Futaba's channel assignment style) - - - - - Gyro gain control (Futaba's channel assignment style) - - - - - Servo Test - - - - - MultiCopter - - - - - Use Model Config Wizard - - - - - Not enough available mixers! - Nicht genügend Mischer verfügbar! - - - - Not enough available expos! - Nicht genügend Expos verfügbar! - - - - Delete Selected Mixes? - Lösche ausgewählte Mischer? - - - - - &Add - &Addieren - - - - - Ctrl+A - Ctrl+a - - - - - &Edit - &Editieren - - - - - Enter - Eingabe - - - - - - - &Delete - &Löschen - - - - - - - Delete - Löschen - - - - - - - &Copy - &Kopieren - - - - - - - Ctrl+C - Ctrl+c - - - - - - - &Cut - &Ausschneiden - - - - - - - Ctrl+X - Ctrl+x - - - - - - - &Paste - &Einfügen - - - - - - - Ctrl+V - Ctrl+v - - - - - Du&plicate - D&uplizieren - - - - Are you sure you want to delete curve %1 ? - - - - - - - - AIL2 - - - - - - - - ELE2 - - - - - - - - - - FLAPS - - - - - - - - - - FLAP%1 - - - - - - - - PITCH - - - - - - - - - - - - GYRO - - - - - - SPOIL - - - - - - SPOIL%1 - - - - - - RUD2 - - - - - Really clear existing mixes on CH6? - - - - - Really clear existing mixes on CH5? - - - - - Not enough free points in eeprom to store the curve. - - - - - - - - Move Up - Nach oben - - - - - - - Ctrl+Up - Ctrl+Up - - - - - - - Move Down - Nach unten - - - - - - - Ctrl+Down - Ctrl+Down - - - - Clear Expo Settings - Expo Werte löschen - - - - Clear Mixes - Mischer löschen - - - - S1 - - - - - S2 - - - - - LS - - - - - Rud - Rud - - - - Ele - Ele - - - - Thr - Thr - - - - Ail - Ail - - - - Weight - Weight(+%1%) - Weg - - - - - Flight modes - Flugphasen - - - - - Flight mode - - - - - - DISABLED - - - - - - - X%1 - - - - - No Trim - - - - - No DR/Expo - - - - - - - - CH %1 - - - - - Editing curve %1 - Kurve %1 bearbeiten - - - - Delete Selected Expos? - Ausgewählte Expos löschen? - - - - Apply Template? - Vorlage anwenden ? - - - - Apply template "%1"? - Vorlage anwenden "%1"? - - - - Clear Expos? - Expo löschen? - - - - Really clear all the expos? - Wirklich alle Expos löschen? - - - - - - Clear Mixes? - Mischer löschen? - - - - Really clear all the mixes? - Wirklich alle Mischer löschen ? - - - + Clear Curves? Kurven löschen ? - + Really clear all the curves? Wirklich alle Kurven löschen ? - - D&uplicate - D&uplizieren - - - - - Ctrl+U - Ctrl+u - ModelsListWidget - + &Edit &Editieren - + &Restore from backup - + &Model Wizard - + &Delete &Löschen - + Delete Löschen - + &Copy &Kopieren - + Ctrl+C Ctrl+C - + &Cut &Ausschneiden - + Ctrl+X Ctrl+X - + &Paste Ein&fügen - + Ctrl+V Ctrl+V - + D&uplicate D&uplizieren - + Ctrl+U Ctrl+U - + &Use as default setze &Standard - + P&rint model Modell &drucken - + Alt+R Alt+R - + Alt+S Alt+S - + &Simulate model &Simulation - + General Settings Generelle Einstellungen - + Delete Selected Models? Gewähltes Modell löschen ? - - + + Cannot delete default model. - + Cannot cut default model. - + Do you want to overwrite TX general settings? Wollen Sie die allg. TX Einstellungen überschreiben? - + You are pasting on an not empty model, are you sure? You are pasting on an not empty model, are you sure ? Sie kopieren in ein nicht leeres Modell, fortfahren? - + No free slot available, cannot duplicate - QObject + Module - Safety - Sicherheit + + Form + + + + Failsafe Mode + + + + + Start + + + + + PPM delay + PPM delay + + + + usec + usec + + + + Negative + Negativ + + + + Positive + Positiv + + + + RX Number + Rx Nummer + + + + Master + + + + + Slave + + + + + Polarity + + + + + Trainer Mode + + + + + mSec + mSec + + + + PPM Frame Length + PPM Frame Length + + + + Label + + + + + + ch + ch + + + + Channels + Kanäle + + + + Hold + + + + + Custom + + + + + No Pulses + + + + + Failsafe Positions + + + + + Protocol + Protokoll + + + + ModulePanel + + + Trainer Output + + + + + Internal Radio System + + + + + External Radio Module + + + + + QObject @@ -6151,2127 +4116,1812 @@ Right - + + Polish + + + + + CH%1 + CH%1 + + + No Nein - + RotEnc A - + Rot Enc B - + Rot Enc C - + Rot Enc D - + Rot Enc E - + Safety %1 - + Trainer Trainer - + Trainer RUD Trainer RUD - + Trainer ELE Trainer ELE - + Trainer THR Trainer THR - + Trainer AIL Trainer AIL - + Instant Trim Instant Trim - Trims2Offsets - Trims2Offsets - - - + Play Sound Audio abspielen - Play Somo - no idea - Play Somo - - - + Start Logs Start Log - + Play Haptic - - + + Input%1 + + + + + + --- --- - + Rud Trim - + Ele Trim - + Thr Trim - + Ail Trim - + Rot Enc - + English - + French - + Italian - + German - + Deutch - + Czech - + Slovak - + Spanish - + Portuguese - + Swedish - - CH - CH - - - - + + No repeat - + %1 sec - + Reset - + + a>x + + + + + a<x + + + + + |a|>x + + + + + |a|<x + + + + + AND + + + + + OR + + + + + XOR + + + + + a=b + + + + + a!=b + + + + + a>b + + + + + a<b + + + + + a>=b + + + + + a<=b + + + + + d>=x + + + + + |d|>=x + + + + + a~x + + + + + Timer + Stoppuhr + + + + Sticky + + + + + Stay + + + + + Unknown + + + + + STAY(%1, [%2:%3]) + + + + + STICKY(%1, %2) + + + + + TIMER(%1, %2) + + + + + Set Timer %1 + + + + Vario - + Play Track - + Play Both - + Play Value - + Volume - + Backlight - + Background Music - + Background Music Pause - - Adjust GV1 - - - - - Adjust GV2 - - - - - Adjust GV3 - - - - - Adjust GV4 - - - - - Adjust GV5 - - - - + Delay %1 sec - + Duration %1 sec - - - + + + + + + <font color=red><b>Inconsistent parameter</b></font> - - + + + All Alles - - + + + Telemetry Telemetrie - + + Value - + + Decr: - + + Incr: - + + Played once, not during startup + + + + %1s %1s - + + Adjust GV%1 + + + + + Rotary Encoder + + + + Value Wert - + Source Quelle - + GVAR - + Increment - + !Flight mode %1 - + Flight mode %1 - - Flight mode %1 trim - - - - + Flight mode %1 value - + Yellow - + Orange orange - + Red - + Winged Shadow How High Winged Shadow How High - + Winged Shadow How High (not supported) Winged Shadow How High (nicht unterstützt) - + FrSky Sensor Hub FrSky Sensor Hub - + + None - + Imperial Imperial - + Metric Metrisch - + Extra Fine Sehr fein - + Fine Fein - + Medium Mittel - + Coarse - + Exponential Exponential - + Count Up Hinaufzählen - + Count Down Herunterzählen - + %1:%2, %1:%2, - + : %1 Channels, %2usec Delay : %1 Kanäle, %2usec Verzögerung {1 ?} {2u?} - + + Flight modes(%1) + + + + + Flight mode(%1) + + + + Rudder Seitenruder - + Elevator Höhenruder - + Throttle Gas - + Aileron Querruder - - Diff - Diff - - - - Expo - Expo - - - - Own trim - - - - Flight phase %1 trim - FPHase %1 Trimmung - - - + Own value - + Keys - + Sticks - + Keys + Sticks - + + -GV%1 - - (-GV%1) - - - - - + + + GV%1 - - (GV%1) - - - - - - - + + + + ---- ---- - - - RUD - RUD - - - - - ELE - ELE - - - - - - + + THR THR - - - AIL - AIL - - - - - + + + P1 P1 - - - + + + P2 P2 - - - + + + P3 P3 - - SA - - - - - SB - - - - - SC - - - - - SD - - - - - SE - - - - - SF - - - - - SG - - - - - SH - - - - + Batt - + SWR - + RSSI RSSI - + Pwr+ - + + + LS1 + + + + + + LS2 + + + + + + LS3 + + + + + + LS4 + + + + + + LS5 + + + + + + LS6 + + + + + + LS7 + + + + + + LS8 + + + + + + LS9 + + + + + + LSA + + + + + + LSB + + + + + + LSC + + + + + + LSD + + + + + + LSE + + + + + + LSF + + + + + + LSG + + + + + + LSH + + + + + + LSI + + + + + + LSJ + + + + + + LSK + + + + + + LSL + + + + + + LSM + + + + + + LSN + + + + + + LSO + + + + + + LSP + + + + + + LSQ + + + + + + LSR + + + + + + LSS + + + + + + LST + + + + + + LSU + + + + + + LSV + + + + + + LSW + + + + + Input %1 + + + + MAX MAX - - + + S11 + + + + + S12 + + + + + S13 + + + + + S14 + + + + + S15 + + + + + S16 + + + + + S21 + + + + + S22 + + + + + S23 + + + + + S24 + + + + + S25 + + + + + S26 + + + + + RudTrim Left + + + + + RudTrim Right + + + + + EleTrim Down + + + + + EleTrim Up + + + + + ThrTrim Down + + + + + ThrTrim Up + + + + + AilTrim Left + + + + + AilTrim Right + + + + + ABS + + + + + THs + + + + + TH% + + + + + THt + + + + + ??? + + + + + Diff(%1) + + + + + Expo(%1) + + + + + Function(%1) + + + + + Curve(%1) + + + + + !Curve(%1) + + + + + Rud Rud - - + + Ele Ele - - + + Thr Thr - - + + Ail unsure Ail - + TrmR - + TrmE - + TrmT - + TrmA - - + + S1 - - + + S2 - - + + LS - - + + RS - + + + REa - + + + REb - + Alt - + Rpm - + Fuel - + Tx - + Rx - + Speed - + Dist - + GPS Alt - + Cell - + Cels - + Vfas - + Curr - + Cnsp - + Powr - + AccX - + AccY - + AccZ - + HDG - + VSpd - + A1- A1- - + A2- A2- - + Alt- - + Alt+ - + Rpm+ - + T1+ T1+ - + T2+ T2+ - + Spd+ - + Dst+ - + Cur+ - + ACC - + Time - - - 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 - - - - - ONE - - - - - !ONE - - - - - TRNs - - - - - TRNl - - - - - REAs - - - - - REAl - - - - - 3POS - 3POS - - - + X%1 - - + + Support for frsky telemetry mod - - + + Support for jeti telemetry mod - - + + Support for receiving ardupilot data - - + + Support for receiving NMEA data - + Support for telemetry easy board - - + + Support for MAVLINK devices - + Rotary Encoder use in menus navigation - + Possibility to enable FAI MODE at field - + FAI MODE always enabled - - openTx for 9X board - - - - - - - - + + + + + Enable heli menu and cyclic mix support - - - - - - + + + + + + Enable TEMPLATES menu - - - - + + + + No splash screen - - - - - - + + + + + + Disable curves menus - - - - + + + + Support for radio modified with regular speaker - - - - - + + + + + Used if you have modified your radio with voice mode - - - - + + + + Used if you have modified your radio with haptic mode - - - - - - - - + + + + + + + + Use alternative SQT5 font - - - - + + + + Enable the throttle trace in Statistics - + EEprom write progress bar - - + + No Winged Shadow How High support - - + + No vario support - - + + No GPS support - - + + No gauges in the custom telemetry screen - - openTx for M128 / 9X board + + Allow compensating for offset errors in FrSky FAS current sensors - - openTx for 9XR + + OpenTX for FrSky Taranis - - openTx for 9XR with M128 chip + + OpenTX for FrSky Taranis Rev4a - - openTx for Gruvin9x board / 9X - - - - + Support of FrSky PXX protocol - + + OpenTX for Sky9x board / 9X + + + + Use FrSky Taranis sticks in a 9X/9XR - - openTx for FrSky Taranis - - - - - + + Disable HELI menu and cyclic mix support - - + + Disable TEMPLATES menu - - + + Disable Global variables - - openTx for FrSky Taranis Rev4a - - - - - - - - + + + + + Support for DSM2 modules - - - - - - + + + + + + PPM center adjustment in limits - - - - - - - - + + + + + + + + PPM values displayed in us - - - - - - + + + + + + Symetrical Limits - - - - - + + + + + Pots use in menus navigation - + Your radio probably uses a wrong firmware, eeprom size is 4096 but only the first 2048 are used - - - - - - + + OpenTX for 9X board + + + + + + + + + No flight modes - - + + SmartieParts 2.2 Backlight support - - - - - - + + + + + + In model setup menus automatically set source by moving some of them - - - - - - + + + + + + In model setup menus automatically set switch by moving some of them - - - - + + + + Enable resetting values by pressing up and down at the same time - - - - - - + + + + + + No graphical check boxes and sliders - - - - - - + + + + + + Battery graph - - - - - - + + + + + + Don't use bold font for highlighting active items - - - - + + OpenTX for M128 / 9X board + + + + + + + EEprom write Progress bar - - - - - + + + + + Imperial units - + Bluetooth interface - - - - - - + + + + + + Global variables - + + OpenTX for 9XR + + + + + OpenTX for 9XR with M128 chip + + + + + OpenTX for Gruvin9x board / 9X + + + + Support for SD memory card - + Support for DSM2 modules using ppm instead of true serial - - openTx for Sky9x board / 9X - - - - + Enable HELI menu and cyclic mix support - + ersky9x - CYC1 - CYC1 - - - CYC2 - CYC2 - - - CYC3 - CYC3 - - - PPM1 - PPM1 - - - PPM2 - PPM2 - - - PPM3 - PPM3 - - - PPM4 - PPM4 - - - PPM5 - PPM5 - - - PPM6 - PPM6 - - - PPM7 - PPM7 - - - PPM8 - PPM8 - - - CH1 - CH1 - - - CH2 - CH2 - - - CH3 - CH3 - - - CH4 - CH4 - - - CH5 - CH5 - - - CH6 - CH6 - - - CH7 - CH7 - - - CH8 - CH8 - - - CH9 - CH9 - - - CH10 - CH10 - - - CH11 - CH11 - - - CH12 - CH12 - - - CH13 - CH13 - - - CH14 - CH14 - - - CH15 - CH15 - - - CH16 - CH16 - - - - - + + + + Timer1 Stoppuhr1 - - - + + + + Timer2 Stoppuhr2 - + A1 A1 - + A2 A2 - ALT - ALT - - - RPM - RPM - - - FUEL - FUEL - - - + T1 T1 - + T2 T2 - SPEED - SPEED - - - CELL - Zelle - - - - Curve - Kurve - - - - - - - Flight modes settings on expos not exported - Phases settings on expos not exported - - - - - - - - - - - - Open9x on this board doesn't have Rotary Encoders - - - - - gruvin9x doesn't have trims as source - - - - - gruvin9x doesn't have swappable trims - - - - - gruvin9x on this board doesn't have Rotary Encoders - - - - - gruvin9x does not support Custom Switch function %1 - - - - - gruvin9x only accepts %1 expos - gruxin9x akzeptiert nur %1 Expos - - - - - gruvin9x doesn't support custom curves as curve%1, curve as been exported as fixed point - - - - - - gruvin9x doesn't support curve with %1 point as curve%2 - - - - - - - Open9x doesn't allow Curve%1 in expos - Open9x akzeptiert nicht %1 Kurven in Expos - - - - + + Simultaneous usage of expo and curves is no longer supported - - - - - - - - Flight modes settings on mixers not exported - - - - - - Flight mode settings on mixers not exported - Phases settings on mixers not exported - - - - - - - - This version of open9x does not support Custom Switch function %1 - - - - - - - - - - - - - - - - - - - - - - Open9x doesn't accept this protocol - Open9x akzeptiert dieses protokoll nicht - - - - - - - - - open9x only accepts %1 points in all curves - - - - + Simultaneous usage of expo and curves is no longer supported in open9x - - - open9x on this board doesn't have Rotary Encoders - - - - - - - - - - - - - - - - - open9x only accepts %1 expos - Gruvin9x firmware only accepts %1 expos - open9x akzeptiert nur %1 Expos - - - + th9x th9x - + er9x er9x - open9x for stock board - open9x für Standard Board - - - open9x for v4 board - open9x für v4 Board - - - er9x - JETI - er9x - JETI - - - er9x - FrSky - er9x - FrSky - - - gruvin9x stable for stock board - gruvin9x stabile Version für Standard Board - - - gruvin9x stable for v4 board - gruvin9x stabile Version für v4 Board - - - gruvin9x trunk for stock board - gruvin9x Entwickler Version für Standard Board - - - + CYC%1 - + PPM%1 - + CH%1%2 CH%1 CH%1%2 - - ID0 - ID0 - - - - ID1 - ID1 - - - - ID2 - ID2 - - - - - GEA - GEA - - - - - TRN - TRN - - - SW%1 - SW%1 - - - - + + ON - - + + + OFF AUS - gruvin9x trunk for v4 board - gruvin9x Entwickler Version für v4 Board - - - - er9x doesn't have Rotary Encoders - - - - - er9x doesn't have trims as source - - - - - er9x doesn't have negative gvars as weight - - - - - er9x doesn't have negative gvars as offset - - - - - - - er9x doesn't have swappable trims - - - - - - - er9x on this board doesn't have Rotary Encoders - - - - - er9x does not support Custom Switch function %1 - - - - - - - er9x does not support this range for A1/A2 - - - - - - - er9x does not support this telemetry units - - - - - - Er9x doesn't accept this protocol - Er9x akzeptiert dieses Protokoll nicht - - - - - Er9x doesn't support custom curves as curve%1, curve as been exported as fixed point - - - - - - Er9x doesn't support curve with %1 point as curve%2 - - - - - - - - + + + + Warning Warnung - - + EEPROM saved with these warnings: EEPROM gespeichert mit diesen Warnungen: - - - ersky9x doesn't have Rotary Encoders - - - - - - ersky9x doesn't have trims as source - - - - - - ersky9x does not support Custom Switch function %1 - - - - - - Ersky9x doesn't accept this protocol - - - - - - - - ErSky9x doesn't support custom curves as curve%1, curve as been exported as fixed point - - - - - - - - ErSky9x doesn't support curve with %1 point as curve%2 - - - - - - + + + Simulator for this firmware is not yet available - - th9x does not support Custom Switch function %1 - - - - + th9x on this board doesn't have Rotary Encoders - - - - th9x doesn't support custom curves as curve%1, curve as been exported as fixed point - - - - - - - th9x doesn't support curve with %1 point as curve%2 - - - - - - Flight Mode 0 (Default) - - - - - - FM %1 - - - - + openTx only accepts %1 points in all curves - - - + + + + OpenTX on this board doesn't accept this function - - + + OpenTX doesn't accept this protocol - + OpenTX doesn't allow this number of channels @@ -8284,6 +5934,774 @@ We are really appreciative for that! The OpenTX/Companion Team. + + + Trim disabled + + + + + Own Trim + + + + + Use Trim from Flight mode %1 + + + + + Use Trim from Flight mode %1 + Own Trim as an offset + + + + + Setup + + + Form + + + + + Model Name + Modell Name + + + + Timer2 + Stoppuhr2 + + + + Timer1 + Stoppuhr1 + + + + Throttle Source + Gas Verfolgung + + + + Switch startup Warning + + + + + Center beep + Zentrierpiepston + + + + Trim Increment + + + + + ON + + + + + OFF + AUS + + + + Check + + + + + Model Image + + + + + Exponential + Exponential + + + + Extra Fine + Sehr fein + + + + Fine + Fein + + + + Medium + Mittel + + + + Coarse + + + + + Extended Limits + Erweiterte Grenzen + + + + Extended Trims + Erweiterte Trimmung + + + + Throttle Trim + + + + + 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. + + + Gasminimum vorne. +Wenn dieses angewählt wurde ist der Knüppelweg für Gas reversiert. Leerlaufstellung ist vorne, die Trimmung sowie die Knüppelstellungswarnung ist ebenfalls umgedreht. + + + + Reverse Throttle + + + + + Telemetry + + + Form + + + + + + + + A1 + A1 + + + + + + + A2 + A2 + + + + RSSI + RSSI + + + + Alarm 1 + Alarm 1 + + + + + ---- + ---- + + + + + Yellow + + + + + + Orange + orange + + + + + Red + + + + + Alarm 2 + Alarm 2 + + + + Serial Protocol + Serielles Protokoll + + + + Volt source + + + + + Metric + Metrisch + + + + Imperial + Imperial + + + + Current source + + + + + Protocol + Protokoll + + + + NONE + + + + + + FAS + + + + + None + + + + + FrSky Sensor Hub + FrSky Sensor Hub + + + + CEL + + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + Units + Einheiten + + + + Blades + Rotorblätter + + + + Altimetry / Vario + + + + + Alti + + + + + Alti+ + + + + + Vario + + + + + Sink Max + + + + + Off + Aus + + + + Climb Max + + + + + Sink Min + + + + + Climb Min + + + + + Vario source + + + + + Vario limits + + + + + Use GPS as altitude source + + + + + Display altitude in toolbar + + + + + Various + + + + + mAh count + + + + + FAS Offset + + + + + Persistent mAh + + + + + TelemetryAnalog + + + Form + + + + + Unit + Einheit + + + + Max Value + Maximal + + + + Alarm 1 + Alarm 1 + + + + + ---- + ---- + + + + + Yellow + + + + + + Orange + orange + + + + + Red + + + + + + < + < + + + + + > + > + + + + Alarm 2 + Alarm 2 + + + + Min Value + Minimal + + + + Volts (V) + + + + + Amps (A) + + + + + Speed (m/s or ft/s) + + + + + Raw (-) + Roh(-) + + + + Speed (km/h or miles/h) + + + + + Meters (m or ft) + + + + + Temp (°) + + + + + Fuel (%) + + + + + mAmps (mA) + + + + + Range + Bereich + + + + TelemetryCustomScreen + + + Form + + + + + Custom Screen Type + + + + + Nums + + + + + Bars + + + + + Min + Min + + + + Source + Quelle + + + + Gauge + Balken + + + + Max + Max + + + + TelemetryPanel + + + Telemetry screen %1 + + + + + Winged Shadow How High + Winged Shadow How High + + + + Winged Shadow How High (not supported) + Winged Shadow How High (nicht unterstützt) + + + + Timer + + + Form + + + + + mm:ss + mm:ss + + + + Countdown + + + + + MinuteBeep + + + + + Persistent + + + + + (00:00:00) + + + + + TimerPanel + + + None + + + + + Beeps + + + + + Countdown + + + + + appPreferencesDialog + + + Application Preferences + + + + + Simulator capture folder + + + + + Remember simulator switch values + + + + + + + Open Folder + Verzeichnis öffnen + + + + User Splash Screens + + + + + Blue + blau + + + + Green + grün + + + + Red + + + + + Orange + orange + + + + Yellow + + + + + Include companion splashes + 'companion' Startbilder einschliessen + + + + Only user defined splashes + Nur Benutzer Startbilder + + + + Splash Screen Library + + + + + Files to keep + + + + + Simulator BackLight + + + + + Automatic Backup Folder + + + + + Only capture to clipboard + + + + + Joystick + Joystick + + + + Find Executable + + + + + Google Earth Executable + + + + + Calibrate + kalibrieren + + + + Enable + + + + + Show splash screen when Companion starts + + + + + Automatic check for OpenTX firmware updates + + + + + Automatic check for Companion updates + + + + + Offer to use wizard for new models + + + + + Enable automatic backup before writing firmware + + + + + Select your snapshot folder + + + + + + No joysticks found + kein Joystick gefunden + + + + Select your library folder + + + + + Select your Models and Settings backup folder + + + + + Select Google Earth executable + + avrOutputDialog @@ -8297,22 +6715,6 @@ The OpenTX/Companion Team. Show Details Zeige Details - - TextLabel - Textlabel - - - AVRDUDE result - Ergebnisse AVRDUDE - - - AVRDUDE - - AVRDUDE - - - - AVRDUDE executable not found - AVRDUDE Programm nicht gefunden - result @@ -8455,26 +6857,6 @@ Do you want some help ? Started - - AVRDUDE done - exit code %1 - AVRDUDE ist fertig - Exit code %1 - - - AVRDUDE done - SUCCESSFUL - AVRDUDE ist fertig - ERFOLGREICH - - - AVRDUDE did not finish correctly - AVRDUDE konnte nicht richtig beendet werden - - - AVRDUDE finished correctly - AVRDUDE richtig beendet - - - Started AVRDUDE - AVRDUDE gestartet - FUSES: Low=%1 High=%2 Ext=%3 @@ -8484,7 +6866,7 @@ Do you want some help ? burnConfigDialog - + AVRDUDE Configuration Einstellung AVRDUDE @@ -8502,10 +6884,6 @@ Do you want some help ? The location of the AVRDUDE.EXE executable. Speicherort der AVRDUDE Anwendung. - - Use this button to browse and look for the AVRDUDE.EXE executable file. - Drücke diesen Knopf um nach der AVRDUDE.exe zu suchen. - Programmer Configuration @@ -8607,11 +6985,6 @@ Bitte nutze dies nur wenn Du weißt was Du machst. Es gibt keine Plausibilitäts Use advanced controls - - avrdoper - What that ? - avrdoper - @@ -8645,58 +7018,38 @@ Bitte nutze dies nur wenn Du weißt was Du machst. Es gibt keine Plausibilitäts - + DFU-UTIL Configuration - + SAM-BA Configuration - - - + + + Select Location Wähle Speicherort - - + + Companion - companion9x - companion9x - - - + <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>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. - - eePe - eePe - - - <b><u>WARNING!</u></b><br>This will reset the fuses 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? - wrong ? Shouldnt it be right ? - Warnung ! -Dies wird die Fuses auf Werkseinstellungen zurücksetzen. Das Schreiben der Fuses kann Deine Fernsteuerung unbrauchbar machen. -Mache dies nur, wenn Du weißt daß diese richtig sind! -Bist Du sicher ? - - - mcu (not used for V4) - mcu (nicht benützt für V4) - @@ -8713,19 +7066,6 @@ m2560 for v4.1 boards Sollte m64 sein für Standard Radios, m2560 fürRadios mit v4.1 Boards - - m64 - m64 - - - m128 - m128 - - - m2560 - m328p - m328p - burnDialog @@ -8734,14 +7074,6 @@ m2560 fürRadios mit v4.1 Boards Customize Splash Startbildschirm anpassen - - Load Firmware - Firmware laden - - - Version: - Version: - <html><head/><body><p>Modify calibration parameters using settings from current profile</p></body></html> @@ -8772,10 +7104,6 @@ m2560 fürRadios mit v4.1 Boards SVN SVN - - MOD/Build - MOD/Build - Load Image @@ -8818,7 +7146,7 @@ m2560 fürRadios mit v4.1 Boards - + Write to TX @@ -8829,7 +7157,7 @@ m2560 fürRadios mit v4.1 Boards - + Browse for file @@ -8838,10 +7166,6 @@ m2560 fürRadios mit v4.1 Boards Check Firmware compatibility Firmware Kompatibilität prüfen - - Backup and restore existing eeprom - Sicherung und Wiederherstellung des existierenden EEProms - Current Profile @@ -8853,172 +7177,148 @@ m2560 fürRadios mit v4.1 Boards abbrechen - Burn to TX - In Sender brennen - - - + Write firmware to TX Schreibe Firmware in den Sender - Write models to TX - Schreibe Modelle in den Sender - - - + Open Öffnen - iHEX (*.hex);;BIN Files (*.bin) - iHEX (*.hex);;BIN Files (*.bin) - - - - - - - - + + + + + + Warning Warnung - + %1 is not a known firmware %1 ist keine bekannte Firmware - + Burn anyway ! Trotzdem brennen! - + Open Image to load Öffne Bilddatei - + Images (%1) Bilder (%1) - - - - - - - - - - + + + + + + + + + + Error Fehler - + Current profile - Choose file to write to EEPROM memory - Wähle Datei zum Schreiben in den EEPROM Speicher - - - + Unable to find file %1! Kann die Datei %1 nicht finden ! - - - + + + Error opening file %1: %2. Fehler beim Öffnen der Datei %1: %2. - Invalid EEPROM File %1 - Ungültige EEPROM Datei %1 - - - + Error reading file %1: %2. Fehler beim Lesen der Datei %1: %2. - Invalid binary EEPROM File %1 - Ungültige EEPROM Programmdatei %1 - - - + Write Models and Settings to TX - + Write Models and Settings in %1 to TX - + Choose file to load Models and Settings from - - - + + + Invalid binary Models and Settings File %1, Proceed anyway ? - - + + Cannot load %1. Kann %1 nicht laden. - + Cannot save customized firmware Kann benutzerspezifische Firmware nicht speichern - + Custom image not found Benutzerbild nicht gefunden - + No firmware selected Keine Firmware ausgewählt - + Wrong radio calibration data in profile, Settings not patched - + Wrong radio setting data in profile, Settings not patched - - + + Cannot write file %1: %2. Kann Datei %1: %2 nicht schreiben. - + Error writing file %1: %2. Fehler beim Schreiben der Datei %1: @@ -9058,623 +7358,483 @@ m2560 fürRadios mit v4.1 Boards Druck in Datei - - + + No name - Count Up - Hinaufzählen - - - Count Down - Herunterzählen - - - %1:%2, - %1:%2, - - - : %1 Channels, %2msec Delay - : %1 Kanäle, %2msec Verzögerung - - - Rudder - Seitenruder - - - Elevator - Höhenruder - - - Throttle - Gas - - - Aileron - Querruder - - - Extra Fine - Sehr fein - - - Fine - Fein - - - Medium - Mittel - - - Exponential - Exponential - - - Orange - orange - - - --- - --- - - - Winged Shadow How High - Winged Shadow How High - - - Winged Shadow How High (not supported) - Winged Shadow How High (nicht unterstützt) - - - FrSky Sensor Hub - FrSky Sensor Hub - - - Imperial - Imperial - - - Metric - Metrisch - - - + General Model Settings Allg. Modell Einstellungen - - - + + + Name Name - - + + EEprom Size Grö&szlig;e EEprom - - + + Timer1 Stoppuhr1 - - + + Timer2 Stoppuhr2 - - + + Protocol Protokoll - - + + Pulse Polarity Pulspolarität - - + + Throttle Trim - - - - + + + + Enabled Aktiv - - - - + + + + Disabled Inaktiv - - + + Throttle Expo Expo Gas - - + + Trim Increment - - + + Center Beep Zentrierpieps - Flight Phases Settings - Einstellung Flugphasen - - - - + + Fades Übergänge - - + + Trims Trimmer - - - - - - - - - - + + + + + + + + Switch Schalter - Phase name - Name FPhase - - - - + + IN IN - - + + OUT OUT - FP - FPh - - - - + + Gvars - - + + Rot. Enc. - + Limits Grenzen - - - - - - - + + + + + + + Offset Offset - - - - - + + + + + Min Min - - - - - + + + + + Max Max - - - + + + Invert Invertieren - - - - - - + + + + + CH CH - - + + INV INV - - + + NOR NOR - + Global Variables - - + + GV - + Expo/Dr Settings Expo/Dual Rate - - + + Weight - - - Expo - Expo + + Logical Switches + - + + + LS + + + + + Switch Assignment + + + + CF - Phases - Phasen - - - - - - + + + + DISABLED - - - - - - + + Curve Kurve - + Mixers Mischer - - + + noTrim keinTrim - - - FMTrim - FPh Trimmung - - - - - Diff - Diff - - - - + + Delay(u%1:d%2) Verzögerung(u%1:d%2) - - + + Slow(u%1:d%2) Langsam/u%1:d%2) - - + + Warn Warnung - + Curves Kurven - + 5 Points Curves 5 Punkte Kurve - - - - + + + + pt %1 pt %1 - + 9 Points Curves 9 Punkte Kurve - - Custom Switches - Freie Schalter - - - - - CS - - - - SW - FSch - - - Function Switches - Freie Schalter - - - - + + Function Funktion - - + + Param Parameter - - + + Enable aktivieren - FSW - FSch - - - + Telemetry Settings Telemetrie Einstellungen - - + + Analog Analog - - + + Unit Einheit - - + + Scale Skala - - - - + + + + A%1 A%1 - - + + Alarm 1 Alarm 1 - - + + Alarm 2 Alarm 2 - - - - + + + + Type Typ - - - - + + + + Condition Zustand - - - - - - + + + + Value Wert - + Flight modes Settings - - - - + + + + Flight mode name - - - - - - - - - - + + + + + + + + + + FM - - - + + + Flight modes Flugphasen - - - + + + Flight mode - - Custom Functions - - - - - + + Repeat - - Safety Switches - Sicherheitsschalter - - - - + + RSSI Alarm - - + + Telemetry Bars Telemetrie Balken - - + + Bar Number Balkennummer - - + + Source Quelle - - + + Custom Telemetry View - : %1 Channels, %2usec Delay - : %1 Kanäle, %2usec Verzögerung {1 ?} {2u?} - - - + Print Document Drucke Dokument - + Select PDF output file PDF Output Datei wählen @@ -9687,47 +7847,37 @@ m2560 fürRadios mit v4.1 Boards Dialog - + People who have contributed to this project Personen, die in diesem Projekt mitgewirkt haben - + Coders Programmierer - - 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 -Husterer (th9x) und auch Erez Raviv (er9x) und sein fantastisches - eePe, worauf companion9x basiert. + + Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe) + - + Thank you all !!! Besten Dank an alle! - + Contributors Mitwirkende - + OpenTX Release Notes @@ -9735,147 +7885,100 @@ Husterer (th9x) und auch Erez Raviv (er9x) und sein fantastisches customizeSplashDialog - - Customize Splash - Startbildschirm anpassen + + Transmitter Splash Screen Editor + - - Save Image - Bild sichern + + + Invert + Invertieren - - Invert Color - Farben umkehren + + + Load FW + - - Load Firmware - Firmware laden + + + Load Pict + - - Load Image - Bild laden + + + Load Profile + - + + + Save + + + + + Open Splash Library Splash Bibliothek öffnen - + + + + ... ... - - Save Firmware - Save To Hex - in HexFormat sichern - - - - <!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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<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> - <!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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<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> - - - - - - Select an original firmware file - Bitte eine original Firmware Datei auswählen - - - + Open Öffnen - HEX files (*.hex);; - HEX files (*.hex);; - - - - Select an image to customize your splash <br />or save actual firmware splash - Bitte Bild zum Bearbeiten des Startbildschirms auswählen<br />oder aktueller Startbildschirm sichern - - - - - - + + + + + + Error Fehler - + Could not find bitmap to replace in file Konnte zu ersetzendes Bitmap in der Datei nicht finden - + Open Image to load Bilddatei öffnen - + Images (%1) Bilder (%1) - - + + Cannot load %1. Kann %1 nicht laden. - - - Save your custimized firmware - die angepasste Firmware sichern + + + Could not store image in firmware file %1 + - - - Write to file - Datei sichern - - - - Error reading file %1 - Fehler beim Lesen der Datei %1 - - - - Firmware correctly saved. - Firmware erfolgreich gespeichert. - - - - Firmware not saved. - Firmware nicht gespeichert. - - - - PNG images (*.png);; - PNG images (*.png);; - - - - donatorsDialog - - List of Contributors - Liste der Mitwirkenden + + The image file %1 could not be stored + @@ -9895,14 +7998,6 @@ p, li { white-space: pre-wrap; } Companion - - companion9x - companion9x - - - eePe - eePe - Download failed: %1. @@ -9916,95 +8011,17 @@ p, li { white-space: pre-wrap; } Fuses Fuses - - <!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-size:8pt;">Reads the current fuses in the AVR AtMega 64 controller.</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-size:8pt;"></p> -<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;">Proper states:</span></p> -<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;">EEPROM erase fuse not set: 0E, 81, FF</span></p> -<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;">EEPROM erase fuse set: 0E, 89, FF</span></p></body></html> - Liest die aktuellen Fuses im AVR ATMEGA 64 -Richtiger Status: -EEPROM Lösche fuses nicht gesetzt: 0E, 81, FF -EEPROM Lösche fuses gesetzt: 0E, 89, FF - Read Fuses Lese Fuses - - <!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-size:8pt; font-weight:600; text-decoration: underline;">Reset Fuses</span></p> -<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;">Fuses in the AVR tell it how to behave. Pressing this button sets the fuses to the default parameters needed in the er9x FW.</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-size:8pt;"></p> -<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;">This button also sets the &quot;EEPROM protect&quot; Fuse.</span></p> -<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;">This prevents erasing of the EEPROM when the flash memory is written.</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-size:8pt;"></p> -<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; font-weight:600; text-decoration: underline;">WARNING</span></p> -<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;">Setting fuses can lead to problems and even a total lockout from your controller. Do this only if you know what you are doing.</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-size:8pt;"></p> -<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;">When in doubt consult either the project's page or the forums @ RCG and RXModelreviews.</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-size:8pt;"></p> -<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;">If you do get locked out - go to the project's homepage and lookup &quot;dealing with Fuse Bricks&quot;.</span></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-size:8pt; font-weight:600; text-decoration: underline;">Einstellungen der FUSES im AVR:</span></p> -<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;"> -Das Drücken dieses Knopfes setzt die Einstellungen der Fuses auf die Parameter zurück welche von der Firmware genutzt werden.</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-size:8pt;"></p> -<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;"> -Dieser Knopf setzt auch das EEPROM protect Fuse</span></p> -<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;"> -Dies verhindert das Löschen des EEPROMs wenn der Flashspeicher beschrieben wird.</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-size:8pt;"></p> -<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; font-weight:600; text-decoration: underline;">Warnung</span></p> -<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;">Das Setzen der Fuses kann zu Problemen führen und der Zugriff auf den Kontroller verhindern. Mache das nur wenn Du weißt was Du machst.</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-size:8pt;"></p> -<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;">Wenn Du Zweifel hast konsultiere die Projectseite oder die Foren auf RCG und RXModelreviews.</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-size:8pt;"></p> -<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;">Wenn der Zugriff auf den Kontroller nicht mehr möglich ist , gehe auf die Porjectseite und sehe nach wie Du mit den Fuse Bricks umgehen mußt.</span></p></body></html> - Reset Fuses EEPROM - PROTECT Fuses zurücksetzen EEPROM - PROTECT - - - <!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-size:8pt; font-weight:600; text-decoration: underline;">Reset Fuses</span></p> -<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;">Fuses in the AVR tell it how to behave. Pressing this button sets the fuses to the default parameters needed in the er9x FW.</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-size:8pt;"></p> -<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;">This button also clears the &quot;EEPROM protect&quot; Fuse.</span></p> -<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;">This causes erasing of the EEPROM when the flash memory is written.</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-size:8pt;"></p> -<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; font-weight:600; text-decoration: underline;">WARNING</span></p> -<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;">Setting fuses can lead to problems and even a total lockout from your controller. Do this only if you know what you are doing.</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-size:8pt;"></p> -<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;">When in doubt consult either the project's page or the forums @ RCG and RXModelreviews.</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-size:8pt;"></p> -<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;">If you do get locked out - go to the project's homepage and lookup &quot;dealing with Fuse Bricks&quot;.</span></p></body></html> - Einstellungen der FUSES im AVR: -Das Drücken dieses Knopfes setzt die Einstellungen der Fuses auf die Parameter zurück welche von der er9X-Firmware genutzt werden. -Dieser Knopf löscht auch das EEPROM protect Fuse -Dies ermöglicht das Löschen des EEPROMs wenn der Flashspeicher beschrieben wird. -Warnung -Das Setzen der Fuses kann zu Problemen führen und der Zugriff auf den Kontroller verhindern. Mache das nur wenn Du weißt was Du machst. -Wenn Du Zweifel hast konsultiere die Projectseite oder die Foren auf RCG und RXModelreviews. -Wenn der Zugriff auf den Kontroller nicht mehr möglich ist , gehe auf die Porjectseite und sehe nach wie Du mit den Fuse Bricks umgehen mußt. @@ -10082,6 +8099,399 @@ p, li { white-space: pre-wrap; } Mache nur weiter, wenn Du weißt was Du machst + + fwPreferencesDialog + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox + CheckBox + + + + Set language of voice. +May be different from firmware language + + + + + SD Structure path + + + + + Processor ID + + + + + Downloads and Profiles + + + + + Default Stick Mode + Standard Knüppelmodus + + + + Channel Order + + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + Modusauswahl: + +Mode 1: + Linker Knüppel: Höhe, Seite + Rechter Knüppel: Gas, Quer + +Mode 2: + Linker Knüppel: Gas, Seite + Rechter Knüppel: Höhe, Quer + +Mode 3: + Linker Knüppel: Höhe, Quer + Rechter Knüppel: Gas, Seite + +Mode 4: + Linker Knüpple: Gas, Quer + Rechter Knüppel: Höhe, Seite + + + + + + 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) + + + + Options + + + + + Channel order + +This is used by the templated to determine which channel goes to what number output. + + + + + Open Folder + Verzeichnis öffnen + + + + Offer to write FW to Tx after download + + + + + Save Profile + + + + + Menu Language + + + + + Voice Language + + + + + Firmware Type + + + + + Append version number to FW file name + + + + + Download Voice + + + + + FwInfo + FwInfo + + + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + + Profile + + + + + Open Image + Bild öffnen + + + + Splash Screen + + + + + Clear Image + + + + + Download FW + + + + + Check for updates + Prüfe für Updates + + + + Last downloaded release: %1 + Letzte geladene Version: %1 + + + + The selected firmware has never been downloaded by Companion. + + + + + The selected firmware cannot be downloaded by Companion. + + + + + Select the folder replicating your SD structure + + + + + Profile name is empty, profile slot %1 will be deleted.<br>Are you sure ? + + + + + Open Image to load + + + + + Images (%1) + Bilder (%1) + + + + Error + Fehler + + + + Cannot load %1. + Kann %1 nicht laden. + + joystickDialog @@ -10178,10 +8588,6 @@ Mache nur weiter, wenn Du weißt was Du machst P2 P2 - - P3 - P3 - @@ -10373,17 +8779,17 @@ Wähle "abbrechen", um die Kalibration abzubrechen %2 nicht schreiben. - + Select your log file - + Available fields - + The selected logfile contains %1 invalid lines out of %2 total lines @@ -10391,7 +8797,7 @@ Wähle "abbrechen", um die Kalibration abzubrechen mdiChild - + Simulate Tx Tx Simulation @@ -10836,62 +9242,29 @@ Wähle "abbrechen", um die Kalibration abzubrechen preferencesDialog + Preferences Einstellungen - - Language (requires restart) - Sprache (Benötigt Neustart) - - - er9x - er9x - - - eePe - eePe - - - - Show Splash Screen - Startbild anzeigen - - - Version to download - Version zum Herunterladen - - - er9x - JETI - er9x - JETI - - - er9x - FrSky - er9x - FrSky - - - er9x - Ardupilot - er9x - Ardupilot - - - + Recent History Size 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. @@ -10900,12 +9273,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: @@ -10946,402 +9319,534 @@ Mode 4: - Check selected Fw updates - 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 - + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + 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 - + + Remember simulator switches + + + + + 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox 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 - + + Show Splash At Start + + + + 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 - BackLight Color - 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. - - - The selected firmware cannot be downloaded by companion9x. - 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 - Select your library dir - 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. @@ -11374,724 +9879,421 @@ May be different from firmware language Einstellung für: - Count Up - Hinaufzählen - - - Count Down - Herunterzählen - - - %1:%2, - %1:%2, - - - : %1 Channels, %3msec Delay - : %1 Kanäle, %3msec Verzögerung - - - <a name=1></a><h1>ER9x Model: %1</h1><br> - ER9x Modell: %1 - - - <h2>General Model Settings</h2><br> - Generelle Modelleinstellungen - - - - - - + + + + Name Name - Timer - Stoppuhr - - - Yellow - gelb - - - Orange - orange - - - Red - rot - - - --- - --- - - - Winged Shadow How High - Winged Shadow How High - - - Winged Shadow How High (not supported) - Winged Shadow How High (nicht unterstützt) - - - FrSky Sensor Hub - FrSky Sensor Hub - - - None - keine - - - Imperial - Imperial - - - Metric - Metrisch - - - : %1 Channels, %2msec Delay - : %1 Kanäle, %2msec Verzögerung - - - Rudder - Seitenruder - - - Elevator - Höhenruder - - - Throttle - Gas - - - Aileron - Querruder - - - Extra Fine - Sehr fein - - - Fine - Fein - - - Medium - Mittel - - - Coarse - grob - - - Exponential - Exponential - - - + printed on: %1 ausgedruckt am: %1 - + General Model Settings Allg. Modell Einstellungen - + EEprom Size Grö&szlig;e EEprom - + Timer1 Stoppuhr1 - + Timer2 Stoppuhr2 - + Protocol Protokoll - + Pulse Polarity Pulspolarität - + Throttle Trim Gastrimmung + - - + Enabled Aktiv + - Disabled Inaktiv - + Throttle Expo Expo Gas - Flight Phases Settings - Einstellung Flugphasen - - - + Fades Übergänge - + Trims Trimmer - Trim Switch - Trimmerschalter - - - + Trim Increment Inkrement Trimmer - + Center Beep Zentrierpieps - <h2>Expo/Dr Settings</h2> - Expo/Dr Einstellungen - - - Switch 1: - Schalter 1: - - - Switch 2: - Schalter 2: - - - Expo Left - Expo links - - - D/R Left - D/R links - - - D/R Right - D/R rechts - - - Expo Right - Expo rechts - - - High - HOCH - - - Mid - Mitte - - - Low - Niedrig - - - <h2>Mixers</h2><br> - Mischer - - - <b>CH%1</b> - CH%1 - - - %1% - %1% - - - +%1% - +%1% - - - Switch( - Schalter( - - - noTrim - kein Trimmer - - - Offset(%1%) - Offset(%1%) - - - Curve(%1) - Kurve(%1) - - - + Delay(u%1:d%2) Verzögerung(u%1:d%2) - + Slow(u%1:d%2) Langsam/u%1:d%2) - Warn(%1) - Warnung(%1) - - - <h2>Limits</h2> - Grenzen - - - CH%1 - CH%1 - - - <h2>Curves</h2> - Kurven - - - 5-point Curves - 5-Punkt-Kurven - - - - - + pt %1 pt %1 - Curve %1 - Kurve %1 - - - 9-point Curves - 9-Punkt-Kurve - - - <h2>Custom Switches</h2> - Spezifische Schalter - - - + Source Quelle - - - - - + + + + + Offset Offset - : %1 Channels, %2usec Delay - : %1 Kanäle, %2usec Verzögerung {1 ?} {2u?} - - - + Gvars - + Rot.Enc. - + Flight mode name - - - - + + + + FM - - + + Flight modes Flugphasen - - + + Flight mode - - - CS - - - - + Global Variables - + GV - + Function Funktion - SW%1 - SW%1 - - - <h2>Safety Switches</h2> - <h2>Sicherheitsschalter</h2> - - - - - - - + + + + Switch Schalter - Phase name - Name FPhase - - - + IN IN - + OUT OUT - FP - FPh - - - + Expo/Dr Settings Expo/Dual Rate - + Weight Weg - - - - - Expo - Expo - - - Phases - Phasen - - - Phase - FPhase - - - - + + DISABLED - - + + - - - - Curve Kurve - + Mixers Mischer - - - - - + + + + CH CH - + noTrim keinTrim - - FMTrim - FPh Trimmung - - - - Diff - Diff - - - + Warn Warnung - + Limits Grenzen - - - - + + + + Min Min - - - - + + + + Max Max - - - + + + Invert Invertieren - - - + + + INV INV - - - + + + NOR NOR - + Curves Kurven - - 5 Points Curves - 5 Punkte Kurve - - - - 9 Points Curves - 9 Punkte Kurve - - + + - Custom Switches - Freie Schalter - - - SW - FSch - - - - Safety Switches - Sicherheitsschalter - - - - - - - + Value Wert - - Function Switches - Freie Schalter - - - + Parameter - + Repeat - FSW - FSch + + Logical Switches + - + + + LS + + + + + Switch Assignments + + + + Telemetry Settings Telemetrie Einstellungen - - + + Alarm 1 Alarm 1 - - + + Alarm 2 Alarm 2 - + Analog Analog - + Unit Einheit - + Scale Skala - - - - + + + + Type Typ - - - - + + + + Condition Zustand - + A%1 A%1 - + RSSI Alarm - + Frsky serial protocol Frsky serielles Protokoll - + System of units Ma&szlig;einheit - + Propeller blades Propeller Blätter - + Telemetry Bars Telemetrie Balken - + Bar Number Balkennummer - + ODF files (*.odt);;PDF Files(*.pdf);;HTML-Files (*.htm *.html);;All Files (*) - - + + Custom Telemetry View - + Flight modes Settings - - CF - - - - + Print Document Drucke Dokument - + Select PDF output file PDF Output Datei wählen @@ -12099,22 +10301,17 @@ May be different from firmware language simulatorDialog - Companion9x Simulator - ER9x Simulator - Companion9x Simulator - - - + P1 P1 - + P2 P2 - + P3 P3 @@ -12140,33 +10337,33 @@ May be different from firmware language - + Hold X Halte X - + Fix X Fixiere X - + Fix Y Fixiere Y - + Hold Y Halte Y - - + + TextLabel Textlabel @@ -12186,53 +10383,37 @@ May be different from firmware language ID0 - + ID1 ID1 - + ID2 ID2 - SW1 - SW1 - - - SW2 - SW2 - - - SW3 - SW3 - - - + BEEP Piepston - - SW4 - SW4 - - + Right Double Click to Reset Zurücksetzen mit rechtem Doppelklick - - - + + + 0 % - + 9x Simulator 9x Simulator @@ -12241,305 +10422,268 @@ May be different from firmware language Outputs Ausgaben - - SW5 - SW5 - - - SW6 - SW6 - - - SW7 - SW7 - - - SW8 - SW8 - - - SW9 - SW9 - - - SWA - SW10 - SW10 - - - SWB - SW11 - SW11 - - - SWC - SW12 - SW12 - - - - CSK - SWK - - - - - CS1 - - Companion Simulator + + + LS1 + + - CS2 + LS2 - CS3 + LS3 - CS4 + LS4 - CS5 + LS5 - CS6 + LS6 - CS7 + LS7 - CS8 + LS8 - CS9 + LS9 - CSA + LSA - CSB + LSB - CSC + LSC - CSD + LSD - CSE + LSE - CSF + LSF - CSG + LSG - CSH + LSH - CSI + LSI - - CSJ + + LSJ - - CSL + + LSK - - CSM + + LSL - - CSN + + LSM - - CSO + + LSN - - CSP + + LSO - - CSQ + + LSP - - CSR + + LSQ - - CSS + + LSR - - CST + + LSS - - CSU + + LST - - CSV + + LSU - - CSW - SWW + + LSV - + + LSW + + + + 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 @@ -12569,10 +10713,6 @@ May be different from firmware language - Flight mode: %1(%2) - - - Phase: %1(%2) - - Phase: %1(%2) - Simulating Tx (%1) @@ -12587,43 +10727,39 @@ May be different from firmware language splashLibrary - + ... ... - + Splash Library - page %1 of %2 Startbild Bibliothek - Seite %1 von %2 - + Warning Warnung - + Invalid image in library %1 ungültige Bilddatei in Bibliothek %1 - + Information Information - + No valid image found in library, check your settings keine gültige Bilddatei gefunden in Bibliothek, bitte Einstellungen prüfen xsimulatorDialog - - Companion9x Simulator - Companion9x Simulator - @@ -12649,10 +10785,6 @@ May be different from firmware language SB - - P2 - P2 - @@ -12693,14 +10825,6 @@ May be different from firmware language Hold Y Halte Y - - P1 - P1 - - - P3 - P3 - @@ -12730,64 +10854,6 @@ May be different from firmware language Outputs Ausgaben - - - CSK - SWK - - - - SW1 - SW1 - - - SW2 - SW2 - - - SW3 - SW3 - - - SW4 - SW4 - - - SW5 - SW5 - - - SW6 - SW6 - - - BEEP - Piepston - - - SW7 - SW7 - - - SW8 - SW8 - - - SW9 - SW9 - - - SWA - SW10 - - - SWB - SW11 - - - SWC - SW12 - CH1 @@ -12834,10 +10900,10 @@ May be different from firmware language - - - - + + + + @@ -12878,12 +10944,12 @@ May be different from firmware language CH4 - + CH12 CH12 - + CH5 CH5 @@ -12922,160 +10988,164 @@ May be different from firmware language CH16 CH16 + + + LSK + + - CSC + LSC - CSD + LSD - CS7 + LS7 - CSL + LSL - CSB + LSB - CS1 + LS1 - CSH + LSH - CSG + LSG - CSE + LSE - CSF + LSF - CS8 + LS8 - CS9 + LS9 - CSA + LSA - CSM + LSM - CSJ + LSJ - CSI + LSI - CS4 + LS4 - CS5 + LS5 - CS2 + LS2 - CS3 + LS3 - CS6 + LS6 - CSN + LSN - CSO + LSO - CSP + LSP - CSQ + LSQ - CSR + LSR - CSS + LSS - CST + LST - CSU + LSU - CSV + LSV - CSW - SWW + LSW @@ -13095,26 +11165,22 @@ May be different from firmware language Kann joystick nicht öffnen, joystick ausgeschaltet - + Firmware %1 error: %2 Firmware %1 Fehler: %2 - + - Flight mode: %1(%2) - - Phase: %1(%2) - - Phase: %1(%2) - - - + Simulating Tx (%1) Simuliere Tx (%1) - + Simulating Simuliere diff --git a/companion/src/translations/companion_fi.ts b/companion/src/translations/companion_fi.ts new file mode 100644 index 000000000..96023cc65 --- /dev/null +++ b/companion/src/translations/companion_fi.ts @@ -0,0 +1,11084 @@ + + + + + Channels + + + Name + + + + + Offset + + + + + Min + + + + + Max + + + + + Invert + + + + + Center + + + + + Sym + + + + + Channel %1 + + + + + --- + + + + + INV + + + + + CurveGroup + + + Diff + + + + + Expo + + + + + Func + + + + + Curve + + + + + Curves + + + Form + + + + + Standard + + + + + Custom + + + + + Lines + + + + + Smooth + + + + + Curve type + + + + + Curve name + + + + + Curve %1 + + + + + %1 points + + + + + Are you sure you want to reset curve %1 ? + + + + + Editing curve %1 + + + + + Not enough free points in EEPROM to store the curve. + + + + + CustomFunctionsPanel + + + Switch + + + + + Action + + + + + Parameters + + + + + Enable + + + + + CF%1 + + + + + ON + + + + + Error + + + + + Unable to find sound file %1! + + + + + &Delete + + + + + Delete + + + + + &Copy + + + + + Ctrl+C + + + + + &Cut + + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + + + Dialog + + + Dialog + + + + + Curve type + + + + + Coefficient + + + + + Both + + + + + x>0 + + + + + x<0 + + + + + Y at X=0 + + + + + Side + + + + + Y at X=-100 + + + + + Y at X=100 + + + + + Linear + + + + + Single Expo + + + + + Symmetrical f(x)=-f(-x) + + + + + Symmetrical f(x)=f(-x) + + + + + ExpoDialog + + + The source for the mixer + + + + + Input name + + + + + Weight + + + + + + GV + + + + + Phase used by the input. + + + + + Flight modes + + + + + 0 + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + Switch + + + + + Switch used by the input. +If blank then the input is considered to be "ON" all the time. + + + + + Stick Side + + + + + NEG + + + + + POS + + + + + ALL + + + + + <!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> + + + + + Scale + + + + + Include Trim + + + + + No + + + + + Yes + + + + + Curve + + + + + The curve used by the input + + + + + Source + + + + + Line name + + + + + Edit %1 + + + + + Rud + + + + + Ele + + + + + Thr + + + + + Ail + + + + + FlightMode + + + Form + + + + + Fade In + + + + + Fade Out + + + + + Name + + + + + Switch + + + + + trim1 + + + + + trim2 + + + + + trim4 + + + + + trim3 + + + + + Rud + + + + + Ele + + + + + Thr + + + + + Ail + + + + + Rotary Encoder %1 + + + + + GVAR%1 + + + + + FlightModes + + + Flight Mode %1 + + + + + (%1) + + + + + (default) + + + + + GeneralEdit + + + General Edit + + + + + Retrieve calib. and hw settings from profile + + + + + Store calib. and hw settings in selected profile + + + + + General settings used throught the transmitter. +These will be relevant for all models in the same EEPROM. + + + + + Setup + + + + + Country Code + + + + + America + + + + + Japan + + + + + Europe + + + + + MAVLink Baud Rate + + + + + Voice Language + + + + + Measurement Units + + + + + <!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-size:8pt;">Single Beep Every whole Minute</span></p></body></html> + + + + + Every Minute + + + + + Beeps at 30, 15, 10, and down from5 seconds + + + + + Count Down to Zero + + + + + <!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-size:8pt;">Flash backlight on timer beep</span></p></body></html> + + + + + Flash on beep + + + + + Beep volume + + + + + Wav volume + + + + + Vario volume + + + + + Background volume + + + + + PPMSim + + + + + 4800 Baud + + + + + 9600 Baud + + + + + 14400 Baud + + + + + 19200 Baud + + + + + 38400 Baud + + + + + 57600 Baud + + + + + 76800 Baud + + + + + 115200 Baud + + + + + Beeper Length + + + + + Pot Scrolling Enable + + + + + + <!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-size:8pt;">LCD Screen Contrast</span></p> +<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;">Values can be 20-45</span></p></body></html> + + + + + Haptic Length + + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + + + + + Mode 1 (RUD ELE THR AIL) + + + + + Mode 2 (RUD THR ELE AIL) + + + + + Mode 3 (AIL ELE THR RUD) + + + + + Mode 4 (AIL THR ELE RUD) + + + + + LCD Display Type + + + + + BackLight On Stick Move + + + + + + sec + + + + + Beeper Mode + + + + + Timeshift from UTC + + + + + RotEnc Navigation + + + + + FrSky Internal Alarm + + + + + THR + + + + + RUD + + + + + ELE + + + + + AIL + + + + + GEA + + + + + ID0 + + + + + ID1 + + + + + ID2 + + + + + + + + + <!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> + + + + + GPS Coordinates + + + + + hh° (N/S) mm' ss''.dd + + + + + NMEA + + + + + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. + + + + + Channel order + +This is used by the templated to determine which channel goes to what number output. + + + + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + + Show Owner Name on Splash + + + + + Speaker Pitch (spkr only) + + + + + + X-Short + + + + + + Short + + + + + + Normal + + + + + + Long + + + + + + X-Long + + + + + StickScroll + + + + + FAI Mode + + + + + Haptic Strength + + + + + Beeper + + + + + Speaker + + + + + BeeperVoice + + + + + SpeakerVoice + + + + + Show Splash Screen on Startup + + + + + Metric + + + + + Imperial + + + + + Channel Order (For Templates) + + + + + Stick Mode + + + + + Haptic Mode + + + + + Owner Name + + + + + BackLight Invert + + + + + Standard + + + + + Optrex + + + + + + Show splash screen on startup + + + + + + Quiet + + + + + Only Alarms + + + + + + No Keys + + + + + + All + + + + + + + + + + + + + + + Beeper volume + +0 - Quiet. No beeps at all. +1 - No Keys. Normal beeps but menu keys do not beep. +2 - Normal. +3 - Loud. +4 - Extra loud. + + + + + Alarms Only + + + + + If this value is not 0, any keypress will turn on the backlight and turn it off after the specified number of seconds. + + + + + Timer Beeps + + + + + BackLight Brightness + + + + + Contrast + + + + + BackLight Auto OFF after + + + + + Single + + + + + Oversample + + + + + Filter + + + + + This is the switch selectrion for turning on the backlight (if installed). + + + + + + + Bandgap Measuring Enable + + + + + Input Filter + + + + + CrossTrim + + + + + Sound Mode + + + + + BackLight Switch + + + + + Battery calibration: +This value will be added to the measured battery voltage. Use this value to calibrate the meter with an external meter. + + + + + Battery Calibration + + + + + Battery Warning + + + + + Battery warning voltage. +This is the threashhold where the battery warning sounds. + +Acceptable values are 5v..10v + + + + + Telemetry NO DATA Alarm + + + + + Readonly Unlock + + + + + Speaker Volume + + + + + If not zero will sound beeps if the transmitter has been left without inputs for the specified number of minutes. + + + + + min + + + + + Inactivity Timer + + + + + SC + + + + + SE + + + + + SA + + + + + SF + + + + + SH + + + + + SD + + + + + SB + + + + + SG + + + + + Alarm Warning + + + + + Memory Startup Warning + + + + + Trainer + + + + + Mode + + + + + Input + + + + + Weight + + + + + Switch + + + + + + PPM 1 + + + + + + + + Off + + + + + + + + += (Sum) + + + + + + + + := (Replace) + + + + + + + + chn1 + + + + + + + + chn2 + + + + + + + + chn3 + + + + + + + + chn4 + + + + + + PPM 2 + + + + + + PPM 3 + + + + + + PPM 4 + + + + + Telemetry + + + + + RSSI Alarm 1 + + + + + + ---- + + + + + + Yellow + + + + + + Orange + + + + + + Red + + + + + RSSI Alarm 2 + + + + + NO DATA Alarm + + + + + Calibration + + + + + POT 4 + + + + + POT 3 + + + + + POT 2 + + + + + POT 1 + + + + + STICK 3 + + + + + + Negative span + + + + + + Mid value + + + + + + Positive span + + + + + STICK 1 + + + + + STICK 2 + + + + + STICK 4 + + + + + Battery + + + + + v + + + + + PPM Multiplier + + + + + Current + + + + + + Pot (normal) + + + + + + Multipos Switch + + + + + S1 Type + + + + + S2 Type + + + + + If you enable FAI, you loose the vario, the play functions, the telemetry screen. +This function cannot be disabled by the radio. +Are you sure ? + + + + + + Warning + + + + + Wrong data in profile, radio calibration was not retrieved + + + + + Wrong data in profile, hw related parameters were not retrieved + + + + + Do you want to store calibration in %1 profile<br>overwriting existing calibration? + + + + + Calibration and HW parameters saved. + + + + + Heli + + + Form + + + + + Invert Elevator + + + + + Invert Aileron + + + + + Invert Collective + + + + + Invert + + + + + Off + + + + + 120 + + + + + 120X + + + + + 140 + + + + + 90 + + + + + Collective + + + + + Swash Type + + + + + Swash Ring + + + + + InputsPanel + + + + Move Up + + + + + + Ctrl+Up + + + + + + Move Down + + + + + + Ctrl+Down + + + + + Clear All Settings + + + + + Source(%1) + + + + + No Trim + + + + + Weight(%1) + + + + + Switch(%1) + + + + + Not enough available inputs! + + + + + Delete Selected Inputs? + + + + + &Add + + + + + Ctrl+A + + + + + &Edit + + + + + Enter + + + + + &Delete + + + + + Delete + + + + + &Copy + + + + + Ctrl+C + + + + + &Cut + + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + + + Du&plicate + + + + + Ctrl+U + + + + + Clear Inputs? + + + + + Really clear all the inputs? + + + + + LogicalSwitchesPanel + + + Condition + + + + + V1 + + + + + V2 + + + + + AND + + + + + Duration + + + + + Delay + + + + + + LS%1 + + + + + &Delete + + + + + Delete + + + + + &Copy + + + + + Ctrl+C + + + + + &Cut + + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + + + MainWindow + + + + + + File loaded + + + + + Display previous warning again at startup ? + + + + + Display previous message again at startup ? + + + + + Checking for updates + + + + + + + + + Unable to check for updates. + + + + + A new version of Companion is available (version %1)<br>Would you like to download it? + + + + + + + + + Save As + + + + + Executable (*.exe) + + + + + New release available + + + + + A new release of Companion is available please check the OpenTX website! + + + + + + No updates available at this time. + + + + + Would you like to launch the installer? + + + + + + + + + + + + + + + + + Error + + + + + + + + + Error opening file %1: +%2. + + + + + Firmware does not longer fit in the Tx, due to selected firmware options + + + + + Compilation server temporary failure, try later + + + + + + Compilation server too busy, try later + + + + + + Compilation server requires registration, please check OpenTX web site + + + + + + Unknown server failure, try later + + + + + Firmware does not fit in the Tx, due to selected firmware options + + + + + Compilation server termporary failure, try later + + + + + 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 ? + + + + + + 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 ? + + + + + The selected language will be used the next time you start Companion. + + + + + + + OK + + + + + The new theme will be loaded the next time you start Companion. + + + + + The icon size will be used the next time you start Companion. + + + + + Open + + + + + + File saved + + + + + 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. + + + + + + + + + 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 is impossible + + + + + + + The backup dir set in preferences does not exist + + + + + + + + + + Backup Models and Settings From Tx + + + + + Cannot check Models and Settings compatibility! Continue anyway? + + + + + + Warning + + + + + 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 + + + + + Conversion failed + + + + + Cannot convert Models and Settings for use with this firmware, original data will be used + + + + + Restore Models and Settings To Tx + + + + + Restore failed + + + + + 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 + + + + + Backup failed + + + + + 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 + + + + + OpenTX Home Page: <a href='%1'>%1</a> + + + + + The OpenTX Companion project was originally forked from <a href='%2'>eePe</a> + + + + + If you've found this program useful, please support by <a href='%1'>donating</a> + + + + + Version %1, %3 + + + + + Copyright + + + + + About Companion + Noin Companion + + + + OpenTX Companion - FW: %1 - Profile: %2 + + + + + + New + + + + + Create a new file + + + + + Open... + + + + + Open an existing file + + + + + Save... + + + + + + Save the document to disk + + + + + Save As... + + + + + Exit + + + + + Exit the application + + + + + Cut + + + + + Cut current selection to the clipboard + + + + + Copy... + + + + + Copy current selection to the clipboard + + + + + Paste... + + + + + Paste clipboard into current selection + + + + + Classical + + + + + The classical Companion icon theme + + + + + The new Companion 2 icon theme + + + + + Monochrome + + + + + A monochrome black icon theme + + + + + MonoWhite + + + + + A monochrome white icon theme + + + + + MonoBlue + + + + + A monochrome blue icon theme + + + + + Small + + + + + Use small toolbar icons + + + + + Normal + + + + + Use normal size toolbar icons + + + + + Big + + + + + Use big toolbar icons + + + + + Huge + + + + + Use huge toolbar icons + + + + + System language + + + + + Use system language in menus + + + + + Czech + + + + + Use Czech in menus + + + + + German + + + + + Use German in menus + + + + + English + + + + + Use English in menus + + + + + French + + + + + Use French in menus + + + + + Italian + + + + + Use Italian in menus + + + + + Hebrew + + + + + Use Hebrew in menus + + + + + Polish + + + + + Use Polish in menus + + + + + Portuguese + + + + + Use Portuguese in menus + + + + + Swedish + + + + + Use Swedish in menus + + + + + Russian + + + + + Use Russian in menus + + + + + About + Noin + + + + Show the application's About box + + + + + Print + + + + + Print current model + + + + + Simulate + + + + + Simulate selected model + + + + + loadBackup... + + + + + Load backup from file + + + + + Logs + + + + + Open log file + + + + + Setting... + + + + + Edit Settings + + + + + Downloads... + + + + + Download firmware and voice files + + + + + Check for updates... + + + + + Check OpenTX and Companion updates + + + + + ChangeLog... + + + + + Show Companion changelog + + + + + Firmware ChangeLog... + + + + + Show firmware changelog + + + + + Compare... + + + + + Compare models + + + + + Edit Tx Splash Image... + + + + + edit the splash screen of your TX + + + + + List programmers + + + + + List available programmers + + + + + Fuses... + + + + + Show fuses dialog + + + + + Read Firmware + + + + + Read firmware from transmitter + + + + + Write Firmware + + + + + Write firmware to transmitter + + + + + New Profile + + + + + Create a new Radio Setting Profile + + + + + Manuals and other Documents + + + + + Open the OpenTX document page in a web browser + + + + + Write Models and Settings to transmitter + + + + + Read Models and Settings from transmitter + + + + + Configure connection software... + + + + + Configure software for reading from and writing to the transmitter + + + + + Write Models and Settings from file to Tx + + + + + Write Models and Settings from file to transmitter + + + + + Save Tx Models and Settings to file + + + + + Save the Models and Settings from the transmitter to a file + + + + + Contributors + + + + + A tribute to those who have contributed to OpenTX and Companion + + + + + + Recent Files + + + + + Set Menu Language + + + + + Set Icon Theme + + + + + Set Icon Size + + + + + + File + + + + + + Edit + + + + + Settings + + + + + Read/Write + + + + + + Help + + + + + Radio Settings Profiles + + + + + Show a selection list of recent documents + + + + + Radio Profiles + + + + + Show a selection list of radio settings profiles + + + + + Write + + + + + Ready + + + + + + &%1 %2 + + + + + Unable to find file %1! + + + + + + Invalid Models and Settings File %1 + + + + + Error reading file %1: +%2. + + + + + Invalid binary Models and Settings File %1 + + + + + MdiChild + + + free bytes + + + + + + + Companion + + + + + Do you want to use model wizard? + + + + + Ask this question again ? + + + + + Editing model %1: + + + + + + + + + + + + + + + + + + + + + + + Error + + + + + + Unable to find file %1! + + + + + + + + Error opening file %1: +%2. + + + + + + Invalid EEPROM File %1 + + + + + + Error reading file %1: +%2. + + + + + Invalid binary EEPROM File %1 + + + + + + + + Save As + + + + + + + + Cannot write file %1: +%2. + + + + + + Error writing file %1: +%2. + + + + + %1 has been modified. +Do you want to save your changes? + + + + + Backup is impossible + + + + + The backup dir set in preferences does not exist + + + + + Cannot write temporary file! + + + + + + + Taranis radio not found + + + + + + + Impossible to identify the radio on your system, please verify the eeprom disk is connected. + + + + + + + Backup EEPROM From Tx + + + + + Cannot check eeprom compatibility! Continue anyway? + + + + + + Warning + + + + + Firmware in radio is of a different family of eeprom written, check file and preferences! + + + + + Firmware in flash is outdated, please upgrade! + + + + + Write EEPROM To Tx + + + + + Open + + + + + Invalid binary backup File %1 + + + + + MixerDialog + + + Dialog + + + + + Delay + + + + + Slow + + + + + Up + + + + + Down + + + + + + + + <!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> + + + + + Include Trim + + + + + Offset + + + + + Weight + + + + + 0 + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + Name + + + + + Source + + + + + Multiplex + + + + + Warning + + + + + The curve used by the mix + + + + + Include DR/Expo + + + + + Flight modes + + + + + Switch + + + + + Mixer warning. +Setting this value will cause a beep to be emmitted when this value is active. + + + + + OFF + + + + + 1 Beep + + + + + 2 Beep + + + + + 3 Beep + + + + + No + + + + + Yes + + + + + + + GV + + + + + + + + The source for the mixer + + + + + 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 + + + + + Curve + + + + + Switch used by the mix. +If blank then the mix is considered to be "ON" all the time. + + + + + DEST -> X%1 + + + + + DEST -> CH%1%2 + + + + + Rud + + + + + Ele + + + + + Thr + + + + + Ail + + + + + MixesPanel + + + + Move Up + + + + + + Ctrl+Up + + + + + + Move Down + + + + + + Ctrl+Down + + + + + Clear Mixes + + + + + + + X%1 + + + + + + + CH%1%2 + + + + + Weight(%1) + + + + + Switch(%1) + + + + + No Trim + + + + + No DR/Expo + + + + + Offset(%1) + + + + + Delay(u%1:d%2) + + + + + Slow(u%1:d%2) + + + + + Warn(%1) + + + + + Not enough available mixers! + + + + + Delete Selected Mixes? + + + + + &Add + + + + + Ctrl+A + + + + + &Edit + + + + + Enter + + + + + &Delete + + + + + Delete + + + + + &Copy + + + + + Ctrl+C + + + + + &Cut + + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + + + Du&plicate + + + + + Ctrl+U + + + + + Clear Mixes? + + + + + Really clear all the mixes? + + + + + ModelEdit + + + Dialog + + + + + Simulate + + + + + Clear Curves? + + + + + Really clear all the curves? + + + + + Setup + + + + + Heli + + + + + Flight Modes + + + + + Inputs + + + + + Mixes + + + + + Channels + + + + + Logical Switches + + + + + Switch Assignment + + + + + Curves + + + + + Telemetry + + + + + ModelsListWidget + + + &Edit + + + + + &Restore from backup + + + + + &Model Wizard + + + + + &Delete + + + + + Delete + + + + + &Copy + + + + + Ctrl+C + + + + + &Cut + + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + + + D&uplicate + + + + + Ctrl+U + + + + + &Use as default + + + + + P&rint model + + + + + Alt+R + + + + + &Simulate model + + + + + Alt+S + + + + + General Settings + + + + + Delete Selected Models? + + + + + + Cannot delete default model. + + + + + Cannot cut default model. + + + + + Do you want to overwrite TX general settings? + + + + + You are pasting on an not empty model, are you sure? + + + + + No free slot available, cannot duplicate + + + + + Module + + + Form + + + + + Failsafe Mode + + + + + Start + + + + + PPM delay + + + + + usec + + + + + Negative + + + + + Positive + + + + + RX Number + + + + + Master + + + + + Slave + + + + + Polarity + + + + + Trainer Mode + + + + + mSec + + + + + PPM Frame Length + + + + + Label + + + + + + ch + + + + + Channels + + + + + Hold + + + + + Custom + + + + + No Pulses + + + + + Failsafe Positions + + + + + Protocol + + + + + ModulePanel + + + Trainer Output + + + + + Internal Radio System + + + + + External Radio Module + + + + + QObject + + + FW: %1 + + + + + Pict: %1 + + + + + Profile image + + + + + + Rud + + + + + + Ele + + + + + + Thr + + + + + + Ail + + + + + + + P1 + + + + + + + P2 + + + + + + + P3 + + + + + + S1 + + + + + + S2 + + + + + + LS + + + + + + RS + + + + + + + REa + + + + + + + REb + + + + + TrmR + + + + + TrmE + + + + + TrmT + + + + + TrmA + + + + + Batt + + + + + + + + Timer1 + + + + + + + + Timer2 + + + + + SWR + + + + + Tx + + + + + RSSI + + + + + Rx + + + + + A1 + + + + + A2 + + + + + Alt + + + + + Rpm + + + + + Fuel + + + + + T1 + + + + + T2 + + + + + Speed + + + + + Dist + + + + + GPS Alt + + + + + Cell + + + + + Cels + + + + + Vfas + + + + + Curr + + + + + Cnsp + + + + + Powr + + + + + AccX + + + + + AccY + + + + + AccZ + + + + + HDG + + + + + VSpd + + + + + ASpd + + + + + dTE + + + + + A1- + + + + + A2- + + + + + Alt- + + + + + Alt+ + + + + + Rpm+ + + + + + T1+ + + + + + T2+ + + + + + Spd+ + + + + + Dst+ + + + + + Cel- + + + + + Vfs- + + + + + Cur+ + + + + + Pwr+ + + + + + ACC + + + + + Time + + + + + + LS1 + + + + + + LS2 + + + + + + LS3 + + + + + + LS4 + + + + + + LS5 + + + + + + LS6 + + + + + + LS7 + + + + + + LS8 + + + + + + LS9 + + + + + + LSA + + + + + + LSB + + + + + + LSC + + + + + + LSD + + + + + + LSE + + + + + + LSF + + + + + + LSG + + + + + + LSH + + + + + + LSI + + + + + + LSJ + + + + + + LSK + + + + + + LSL + + + + + + LSM + + + + + + LSN + + + + + + LSO + + + + + + LSP + + + + + + LSQ + + + + + + LSR + + + + + + LSS + + + + + + LST + + + + + + LSU + + + + + + LSV + + + + + + LSW + + + + + + + + ---- + + + + + Input %1 + + + + + MAX + + + + + CYC%1 + + + + + PPM%1 + + + + + CH%1%2 + + + + + X%1 + + + + + + + GV%1 + + + + + S11 + + + + + S12 + + + + + S13 + + + + + S14 + + + + + S15 + + + + + S16 + + + + + S21 + + + + + S22 + + + + + S23 + + + + + S24 + + + + + S25 + + + + + S26 + + + + + RudTrim Left + + + + + RudTrim Right + + + + + EleTrim Down + + + + + EleTrim Up + + + + + ThrTrim Down + + + + + ThrTrim Up + + + + + AilTrim Left + + + + + AilTrim Right + + + + + + + OFF + + + + + ABS + + + + + THs + + + + + TH% + + + + + THt + + + + + + ON + + + + + ??? + + + + + Diff(%1) + + + + + Expo(%1) + + + + + Function(%1) + + + + + Curve(%1) + + + + + !Curve(%1) + + + + + + + --- + + + + + a>x + + + + + a<x + + + + + |a|>x + + + + + |a|<x + + + + + AND + + + + + OR + + + + + XOR + + + + + a=b + + + + + a!=b + + + + + a>b + + + + + a<b + + + + + a>=b + + + + + a<=b + + + + + d>=x + + + + + |d|>=x + + + + + a~x + + + + + Timer + + + + + Sticky + + + + + Stay + + + + + Unknown + + + + + STAY(%1, [%2:%3]) + + + + + STICKY(%1, %2) + + + + + TIMER(%1, %2) + + + + + Delay %1 sec + + + + + Duration %1 sec + + + + + + + + + + <font color=red><b>Inconsistent parameter</b></font> + + + + + + + All + + + + + + + Telemetry + + + + + + Value + + + + + + Decr: + + + + + + Incr: + + + + + Safety %1 + + + + + Trainer + + + + + Trainer RUD + + + + + Trainer ELE + + + + + Trainer THR + + + + + Trainer AIL + + + + + Instant Trim + + + + + Play Sound + + + + + Play Haptic + + + + + Reset + + + + + Set Timer %1 + + + + + Vario + + + + + Play Track + + + + + Play Both + + + + + Play Value + + + + + Start Logs + + + + + Volume + + + + + Backlight + + + + + Background Music + + + + + Background Music Pause + + + + + Adjust GV%1 + + + + + + No repeat + + + + + %1 sec + + + + + th9x + + + + + er9x + + + + + ersky9x + + + + + + Simultaneous usage of expo and curves is no longer supported + + + + + Simultaneous usage of expo and curves is no longer supported in open9x + + + + + openTx only accepts %1 points in all curves + + + + + + + + OpenTX on this board doesn't accept this function + + + + + + OpenTX doesn't accept this protocol + + + + + OpenTX doesn't allow this number of channels + + + + + Your radio probably uses a wrong firmware, + eeprom size is 4096 but only the first 2048 are used + + + + + + + + Warning + + + + + EEPROM saved with these warnings: + + + + + + Support for frsky telemetry mod + + + + + Support for telemetry easy board + + + + + + Support for jeti telemetry mod + + + + + + Support for receiving ardupilot data + + + + + + Support for receiving NMEA data + + + + + + Support for MAVLINK devices + + + + + Rotary Encoder use in menus navigation + + + + + + + + + Pots use in menus navigation + + + + + Possibility to enable FAI MODE at field + + + + + FAI MODE always enabled + + + + + OpenTX for 9X board + + + + + + + + + Enable heli menu and cyclic mix support + + + + + + + + + + Enable TEMPLATES menu + + + + + + + + No splash screen + + + + + + + + + + No flight modes + + + + + + + + + + Disable curves menus + + + + + + + + Support for radio modified with regular speaker + + + + + + + + + Used if you have modified your radio with voice mode + + + + + + + + Used if you have modified your radio with haptic mode + + + + + + + + + Support for DSM2 modules + + + + + + + + + + PPM center adjustment in limits + + + + + + + + + + + + PPM values displayed in us + + + + + + + + + + Global variables + + + + + + + + + + Symetrical Limits + + + + + + SmartieParts 2.2 Backlight support + + + + + + + + + + In model setup menus automatically set source by moving some of them + + + + + + + + + + In model setup menus automatically set switch by moving some of them + + + + + + + + Enable resetting values by pressing up and down at the same time + + + + + + + + + + No graphical check boxes and sliders + + + + + + + + + + Battery graph + + + + + + + + + + Don't use bold font for highlighting active items + + + + + + + + + + + + Use alternative SQT5 font + + + + + + + + Enable the throttle trace in Statistics + + + + + EEprom write progress bar + + + + + + + + + Imperial units + + + + + + No Winged Shadow How High support + + + + + + No vario support + + + + + + No GPS support + + + + + + No gauges in the custom telemetry screen + + + + + Allow compensating for offset errors in FrSky FAS current sensors + + + + + OpenTX for M128 / 9X board + + + + + + + + EEprom write Progress bar + + + + + OpenTX for 9XR + + + + + OpenTX for 9XR with M128 chip + + + + + OpenTX for Gruvin9x board / 9X + + + + + Support for SD memory card + + + + + Support of FrSky PXX protocol + + + + + Support for DSM2 modules using ppm instead of true serial + + + + + OpenTX for Sky9x board / 9X + + + + + Enable HELI menu and cyclic mix support + + + + + Use FrSky Taranis sticks in a 9X/9XR + + + + + Bluetooth interface + + + + + OpenTX for FrSky Taranis + + + + + + Disable HELI menu and cyclic mix support + + + + + + Disable TEMPLATES menu + + + + + + Disable Global variables + + + + + OpenTX for FrSky Taranis Rev4a + + + + + th9x on this board doesn't have Rotary Encoders + + + + + + FM%1 + + + + + Input%1 + + + + + Rud Trim + + + + + Ele Trim + + + + + Thr Trim + + + + + Ail Trim + + + + + Rot Enc + + + + + English + + + + + French + + + + + Italian + + + + + German + + + + + Czech + + + + + Slovak + + + + + Spanish + + + + + Polish + + + + + Portuguese + + + + + Swedish + + + + + + THR + + + + + CH%1 + + + + + No + + + + + RotEnc A + + + + + Rot Enc B + + + + + Rot Enc C + + + + + Rot Enc D + + + + + Rot Enc E + + + + + !Flight mode %1 + + + + + Flight mode %1 + + + + + Own value + + + + + Flight mode %1 value + + + + + Keys + + + + + Sticks + + + + + Keys + Sticks + + + + + + -GV%1 + + + + + Yellow + + + + + Orange + + + + + Red + + + + + Winged Shadow How High + + + + + Winged Shadow How High (not supported) + + + + + FrSky Sensor Hub + + + + + + None + + + + + Imperial + + + + + Metric + + + + + Extra Fine + + + + + Fine + + + + + Medium + + + + + Coarse + + + + + Exponential + + + + + Count Up + + + + + Count Down + + + + + %1:%2, + + + + + : %1 Channels, %2usec Delay + + + + + Flight modes(%1) + + + + + Flight mode(%1) + + + + + Rudder + + + + + Elevator + + + + + Throttle + + + + + Aileron + + + + + + + Simulator for this firmware is not yet available + + + + + Played once, not during startup + + + + + %1s + + + + + Value + + + + + Source + + + + + GVAR + + + + + Increment + + + + + Rotary Encoder + + + + + Trim disabled + + + + + Own Trim + + + + + Use Trim from Flight mode %1 + + + + + Use Trim from Flight mode %1 + Own Trim as an offset + + + + + 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. + + + + + Setup + + + Form + + + + + Model Image + + + + + Model Name + + + + + Timer2 + + + + + Timer1 + + + + + Throttle Source + + + + + Switch Warnings + + + + + Center beep + + + + + Trim Increment + + + + + Exponential + + + + + Extra Fine + + + + + Fine + + + + + Medium + + + + + Coarse + + + + + Extended Limits + + + + + Extended Trims + + + + + Display Checklist + + + + + Throttle Trim + + + + + 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. + + + + + + + Reverse Throttle + + + + + Pot Warnings + + + + + OFF + + + + + Manual + + + + + Auto + + + + + Telemetry + + + Form + + + + + + + + A1 + + + + + + + + A2 + + + + + RSSI + + + + + Alarm 1 + + + + + + ---- + + + + + + Yellow + + + + + + Orange + + + + + + Red + + + + + Alarm 2 + + + + + Serial Protocol + + + + + Volt source + + + + + Metric + + + + + Imperial + + + + + Current source + + + + + Protocol + + + + + NONE + + + + + + FAS + + + + + None + + + + + FrSky Sensor Hub + + + + + CEL + + + + + 2 + + + + + 3 + + + + + 4 + + + + + Units + + + + + Blades + + + + + Altimetry / Vario + + + + + Alti + + + + + Alti+ + + + + + Vario + + + + + Sink Max + + + + + Off + + + + + Climb Max + + + + + Sink Min + + + + + Climb Min + + + + + Vario source + + + + + Vario limits + + + + + Use GPS as altitude source + + + + + Display altitude in toolbar + + + + + Various + + + + + mAh count + + + + + FAS Offset + + + + + Persistent mAh + + + + + TelemetryAnalog + + + Form + + + + + Unit + + + + + Max Value + + + + + Alarm 1 + + + + + + ---- + + + + + + Yellow + + + + + + Orange + + + + + + Red + + + + + + < + + + + + + > + + + + + Alarm 2 + + + + + Min Value + + + + + 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) + + + + + Range + + + + + TelemetryCustomScreen + + + Form + + + + + Custom Screen Type + + + + + Nums + + + + + Bars + + + + + Min + + + + + Source + + + + + Gauge + + + + + Max + + + + + TelemetryPanel + + + Telemetry screen %1 + + + + + Winged Shadow How High + + + + + Winged Shadow How High (not supported) + + + + + Timer + + + Form + + + + + mm:ss + + + + + Countdown + + + + + MinuteBeep + + + + + Persistent + + + + + (00:00:00) + + + + + TimerPanel + + + None + + + + + Beeps + + + + + Countdown + + + + + appPreferencesDialog + + + Edit Settings + + + + + Application Settings + + + + + Automatic Backup Folder + + + + + User Splash Screens + + + + + Include companion splashes + + + + + Only user defined splashes + + + + + Google Earth Executable + + + + + Automatic check for OpenTX firmware updates + + + + + + + + Open Folder + + + + + Find Executable + + + + + Files to keep + + + + + Splash Screen Library + + + + + Enable automatic backup before writing firmware + + + + + Automatic check for Companion updates + + + + + Offer to use wizard for new models + + + + + Show splash screen when Companion starts + + + + + Simulator Settings + + + + + Simulator BackLight + + + + + Enable + + + + + Blue + + + + + Green + + + + + Red + + + + + Orange + + + + + Yellow + + + + + Joystick + + + + + Only capture to clipboard + + + + + Calibrate + + + + + Remember simulator switch values + + + + + Simulator capture folder + + + + + Radio Settings + + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + + + + + Mode 1 (RUD ELE THR AIL) + + + + + Mode 2 (RUD THR ELE AIL) + + + + + Mode 3 (AIL ELE THR RUD) + + + + + Mode 4 (AIL THR ELE RUD) + + + + + Channel order + +This is used by the templated to determine which channel goes to what number output. + + + + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + + Default Stick Mode + + + + + Settings Profile + + + + + Splash Screen + + + + + Channel Order + + + + + Append version number to FW file name + + + + + SD Structure path + + + + + Offer to write FW to Tx after download + + + + + Remove Profile + + + + + Firmware + + + + + Select Image + + + + + Clear Image + + + + + Select your snapshot folder + + + + + + No joysticks found + + + + + Select your library folder + + + + + Select your Models and Settings backup folder + + + + + Select Google Earth executable + + + + + Select the folder replicating your SD structure + + + + + Not possible to remove profile + + + + + The default profile can not be removed. + + + + + Open Image to load + + + + + Images (%1) + + + + + avrOutputDialog + + + Dialog + + + + + Show Details + + + + + result + + + + + executable not found + + + + + + Error + + + + + Cannot open source file + + + + + Cannot write destination + + + + + Writing file: + + + + + ie: OpenTX for 9X board or OpenTX for 9XR board + + + + + ie: OpenTX for M128 / 9X board or OpenTX for 9XR board with M128 chip + + + + + ie: OpenTX for Gruvin9X board + + + + + Your radio uses a %1 CPU!!! + +Please check advanced burn options to set the correct cpu type. + + + + + Your radio uses a %1 CPU!!! + +Please select an appropriate firmware type to program it. + + + + + +You are currently using: + %1 + + + + + + Writing + + + + + + Reading + + + + + + Verifying + + + + + done - exit code %1 + + + + + done with errors + + + + + + done - SUCCESSFUL + + + + + did not finish correctly + + + + + did not finish correctly! +Do you want some help ? + + + + + Copy did not finish correctly + + + + + finished correctly + + + + + Copy finished correctly + + + + + Started + + + + + FUSES: Low=%1 High=%2 Ext=%3 + + + + + burnConfigDialog + + + Programmer Configuration + + + + + + Location of sam-ba executable + + + + + + + + The location of the AVRDUDE executable. + + + + + DFU-Util Location + + + + + Location of AVRDUDE executable + + + + + + + Use this button to browse and look for the AVRDUDE executable file. + + + + + + + Browse... + + + + + Programmer + + + + + Programmer used for communicating with the controller. +Please consult the programmer's documentation and the AVRDUDE documentation to select the appropriate programmer. + + + + + List all available programmers. + + + + + List Available + + + + + + Extra arguments that will be passed to AVRDUDE on every call + + + + + + Extra arguments used in AVRDUDE. +This can be used for providing extra information to AVRDUDE. + +Please only use this if you know what you are doing. There are no error checks and you could cripple your controller. + + + + + Extra Arguments + + + + + Show AVRDUDE help + + + + + Show Help + + + + + Communication port to the programmer. + + + + + + + Port + + + + + AVRDUDE Location + + + + + MCU + + + + + + CPU of your TX + + + + + + CPU present on your 9x radio +Should be m64 for stock radios +m2560 for v4.1 boards + + + + + SAM-BA Location + + + + + ARM MCU + + + + + sam-ba serial port + + + + + Alternate device + + + + + Use advanced controls + + + + + DFU-UTIL Configuration + + + + + SAM-BA Configuration + + + + + AVRDUDE Configuration + + + + + + + Select Location + + + + + + 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? + + + + + <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. + + + + + burnDialog + + + Customize Splash + + + + + Cancel + + + + + + Write to TX + + + + + <html><head/><body><p>Modify calibration parameters using settings from current profile</p></body></html> + + + + + Patch calibration setting from profile + + + + + <html><head/><body><p>Modify HW parameters using settings from current profile</p></body></html> + + + + + Patch HW setting from profile + + + + + Date & Time + + + + + SVN + + + + + Variant + + + + + + Browse for file + + + + + Allows Companion to write to older version of the firmware + + + + + Check Firmware compatibility + + + + + Backup and restore Models and Settings + + + + + Current Profile + + + + + Invert Color + + + + + Use image in settings + + + + + Substitute image in firmware + + + + + Load Image + + + + + Open Splash Library + + + + + ... + + + + + Write firmware to TX + + + + + Write Models and Settings to TX + + + + + Write Models and Settings in %1 to TX + + + + + Current profile + + + + + Open + + + + + Choose file to load Models and Settings from + + + + + + + + + + Warning + + + + + %1 is not a known firmware + + + + + Burn anyway ! + + + + + + + + + + + + + + Error + + + + + Unable to find file %1! + + + + + + + Error opening file %1: +%2. + + + + + + + Invalid binary Models and Settings File %1, Proceed anyway ? + + + + + Error reading file %1: +%2. + + + + + Open Image to load + + + + + Images (%1) + + + + + + Cannot load %1. + + + + + Cannot save customized firmware + + + + + Custom image not found + + + + + No firmware selected + + + + + Wrong radio calibration data in profile, Settings not patched + + + + + Wrong radio setting data in profile, Settings not patched + + + + + + Cannot write file %1: +%2. + + + + + Error writing file %1: +%2. + + + + + compareDialog + + + Dialog + + + + + Drag first model here + + + + + Drag second model here + + + + + Close + + + + + Print + + + + + Print to file + + + + + + No name + + + + + General Model Settings + + + + + + + Name + + + + + + EEprom Size + + + + + + Timer1 + + + + + + Timer2 + + + + + + Protocol + + + + + + Pulse Polarity + + + + + + Throttle Trim + + + + + + + + Enabled + + + + + + + + Disabled + + + + + + Throttle Expo + + + + + + Trim Increment + + + + + + Center Beep + + + + + Flight modes Settings + + + + + + Fades + + + + + + Trims + + + + + + + + + + + + Switch + + + + + + + + Flight mode name + + + + + + IN + + + + + + OUT + + + + + + + + + + + + + + FM + + + + + + Gvars + + + + + + Rot. Enc. + + + + + Limits + + + + + + + + + + + Offset + + + + + + + + + Min + + + + + + + + + Max + + + + + + + Invert + + + + + + + + + CH + + + + + + INV + + + + + + NOR + + + + + Global Variables + + + + + + GV + + + + + Expo/Dr Settings + + + + + + Weight + + + + + + + + Flight modes + + + + + + + + Flight mode + + + + + + + + DISABLED + + + + + Mixers + + + + + + noTrim + + + + + + Delay(u%1:d%2) + + + + + + Slow(u%1:d%2) + + + + + + Warn + + + + + Curves + + + + + 5 Points Curves + + + + + + + + pt %1 + + + + + + Curve + + + + + 9 Points Curves + + + + + Logical Switches + + + + + + LS + + + + + Switch Assignment + + + + + + Function + + + + + + Param + + + + + + Repeat + + + + + + Enable + + + + + CF + + + + + Telemetry Settings + + + + + + Analog + + + + + + Unit + + + + + + Scale + + + + + + + + A%1 + + + + + + Alarm 1 + + + + + + Alarm 2 + + + + + + + + Type + + + + + + + + Condition + + + + + + + + Value + + + + + + RSSI Alarm + + + + + + Custom Telemetry View + + + + + + Telemetry Bars + + + + + + Bar Number + + + + + + Source + + + + + Print Document + + + + + Select PDF output file + + + + + contributorsDialog + + + Dialog + + + + + People who have contributed to this project + + + + + Coders + + + + + Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe) + + + + + Thank you all !!! + + + + + Contributors + + + + + Companion Release Notes + + + + + OpenTX Release Notes + + + + + customizeSplashDialog + + + Transmitter Splash Screen Editor + + + + + + Invert + + + + + + Open Splash Library + + + + + + + + ... + + + + + + Load Profile + + + + + + Load FW + + + + + + Load Pict + + + + + + Save + + + + + Open + + + + + + + + Error + + + + + Cannot load embedded FW image from %1. + + + + + Open Image to load + + + + + Images (%1) + + + + + Cannot load the image file %1. + + + + + Cannot load the profile image %1. + + + + + Cannot load the library image %1. + + + + + File Saved + + + + + The image was saved to the file %1 + + + + + Image Refresh Error + + + + + Failed to refresh image from file %1 + + + + + File Save Error + + + + + Failed to write image to %1 + + + + + downloadDialog + + + Downloading: + + + + + Unable to save the file %1: %2. + + + + + Companion + + + + + Download failed: %1. + + + + + fusesDialog + + + Fuses + + + + + <!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:'Sans Serif'; font-size:9pt; 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-family:'MS Shell Dlg 2'; font-size:8pt;">Reads the current fuses in the AVR controller.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Proper states for </span><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">AtMega 64 </span><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">EEPROM erase fuse not set: 0E, 81, FF</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">EEPROM erase fuse set: 0E, 89, FF</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Proper states for AtMega 2560 :</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">EEPROM erase fuse not set: D7, 11, FC</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">EEPROM erase fuse set: D7, 19, FC</span></p></body></html> + + + + + Read Fuses + + + + + <!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:'Sans Serif'; font-size:9pt; 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-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600; text-decoration: underline;">Reset Fuses</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Fuses in the AVR tell it how to behave. Pressing this button sets the fuses to the default parameters needed in the FW. These parameters are different for stock and 4.1 MB, please verify you selected the appropriate processor type in preferences.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">This button also sets the &quot;EEPROM protect&quot; Fuse.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">This prevents erasing of the EEPROM when the flash memory is written.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600; text-decoration: underline;">WARNING</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Setting fuses can lead to problems and even a total lockout from your controller. Do this only if you know what you are doing.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">When in doubt consult either the project's page or the 9xforum (http://9xforums.com/forum/)</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">If you do get locked out - google lookup for &quot;dealing with Fuse Bricks&quot;.</span></p></body></html> + + + + + Reset Fuses +EEPROM - PROTECT + + + + + <!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:'Sans Serif'; font-size:9pt; 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-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600; text-decoration: underline;">Reset Fuses</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Fuses in the AVR tell it how to behave. Pressing this button sets the fuses to the default parameters needed in the </span><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">FW. These parameters are different for stock and 4.1 MB, please verify you selected the appropriate processor type in preferences.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">This button also clears the &quot;EEPROM protect&quot; Fuse.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">This causes erasing of the EEPROM when the flash memory is written.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600; text-decoration: underline;">WARNING</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Setting fuses can lead to problems and even a total lockout from your controller. Do this only if you know what you are doing.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">When in doubt consult either the project's page or the 9xforum (http://9xforums.com/forum/)</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">If you do get locked out - google lookup for &quot;dealing with Fuse Bricks&quot;.</span></p></body></html> + + + + + Reset Fuses +EEPROM - DELETE + + + + + <!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:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> +<p align="center" 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;">WARNING</span></p> +<p align="center" 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 align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Changing the fuses can mess up your radio.</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Proceed only if you know what you are doing.</p></body></html> + + + + + fwPreferencesDialog + + + Downloads + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox + + + + + Menu Language + + + + + Firmware Type + + + + + Check for updates + + + + + Voice Language + + + + + Set language of voice. +May be different from firmware language + + + + + Download Voice + + + + + Download FW + + + + + Options + + + + + Processor ID + + + + + FwInfo + + + + + Last downloaded release: %1 + + + + + The selected firmware has never been downloaded by Companion. + + + + + The selected firmware cannot be downloaded by Companion. + + + + + joystickDialog + + + Configure Joystick + + + + + Ch2 + + + + + + + + + + + + Not Assigned + + + + + + + + + + + + Right Vertical + + + + + + + + + + + + Right Horizontal + + + + + + + + + + + + Left Vertical + + + + + + + + + + + + Left Horizontal + + + + + + + + + + + + P1 + + + + + + + + + + + + P2 + + + + + + + + + + + + P3/LS + + + + + + + + + + + + RS + + + + + Ch1 + + + + + Ch4 + + + + + Ch6 + + + + + Ch3 + + + + + Ch5 + + + + + Ch7 + + + + + Ch8 + + + + + Instructions + + + + + Cancel + + + + + Next + + + + + Ok + + + + + Move sticks and pots in every direction making full movement +Press next when finished + + + + + + Error + + + + + Cannot open joystick. + + + + + Place sticks and pots in middle position. +Press next when done + + + + + Map joystick channels to controls using comboboxes. +Press next when done + + + + + Check inversion checkbox to get maximum at top-right position. +Press next when done + + + + + Press ok to save configuration +Press cancel to abort joystick calibration + + + + + Duplicated stick assignement + + + + + logsDialog + + + Companion Log Viewer + + + + + Filename + + + + + Open LogFile + + + + + 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 + + + + + mdiChild + + + Simulate Tx + + + + + modelConfigDialog + + + Model Configuration Wizard + + + + + Engine + + + + + Model Type + + + + + Airplane + + + + + Helicopter + + + + + Glider + + + + + Wing + + + + + Aileron controls + + + + + No Ailerons + + + + + 1 Servo (or Y) + + + + + + + 2 Servos + + + + + Flaps controls + + + + + No Flaps + + + + + 1 Servo (or inverting Y) + + + + + Spoilers + + + + + No Spoilers/Airbrakes + + + + + 1 Servo (or Y or inverting Y) + + + + + Swash Plate + + + + + Swash plate + + + + + 90° / Fixed / Coax + + + + + 120° + + + + + 120X° + + + + + 140° + + + + + FlyBarLess + + + + + Tail + + + + + Tail controls + + + + + 1 Servo Elevator / 1 Servo Rudder + + + + + V Tail + + + + + 2 Servos Elevator / 1 Servo Rudder + + + + + Gyroscope + + + + + NoGyro + + + + + Switch control + + + + + Pot control + + + + + Channel style + + + + + Open9x Style + + + + + Futaba Style + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + 9 + + + + + 1 + + + + + 10 + + + + + Ele2 + + + + + Use advanced controls + + + + + Spoiler2 + + + + + Flap2 + + + + + Flap1 + + + + + Rud2 + + + + + + + + + + + AUTO + + + + + + + + + + + CH01 + + + + + + + + + + + CH02 + + + + + + + + + + + CH03 + + + + + + + + + + + CH04 + + + + + + + + + + + CH05 + + + + + + + + + + + CH06 + + + + + + + + + + + CH07 + + + + + + + + + + + CH08 + + + + + + + + + + + CH09 + + + + + + + + + + + CH10 + + + + + Ail2 + + + + + Spoiler 1 + + + + + Delta wing + + + + + + Not present + + + + + Present + + + + + Rudder + + + + + Single rudder + + + + + Dual rudder (with 2 servos) + + + + + Apply configuration ? + + + + + Apply configuration deleting existing model ? + + + + + preferencesDialog + + + + Preferences + + + + + + Simu BackLight + + + + + + Simulator capture folder + + + + + + Joystick + + + + + Remember simulator switches + + + + + + Enable + + + + + + Use clipboard only + + + + + + Calibrate + + + + + + Blue + + + + + + Green + + + + + + Red + + + + + + Orange + + + + + + Yellow + + + + + + + + + + Open Folder + + + + + + Personal splash library + + + + + + Include companion splashes + + + + + + Only user defined splashes + + + + + + Splash library behaviour + + + + + + Custom TX splash screen + + + + + + Open Image + + + + + + + + ... + + + + + + Invert Pixels + + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + + + + + Mode 1 (RUD ELE THR AIL) + + + + + Mode 2 (RUD THR ELE AIL) + + + + + Mode 3 (AIL ELE THR RUD) + + + + + Mode 4 (AIL THR ELE RUD) + + + + + auto backup before write + + + + + Automatic Backup Folder + + + + + Show Splash At Start + + + + + Ask use of wizard for new models + + + + + Remember switches in simulator + + + + + Channel order + +This is used by the templated to determine which channel goes to what number output. + + + + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + + FwInfo + + + + + Check for updates + + + + + Ask for flashing after Download + + + + + Export Profile + + + + + Save Profile + + + + + Import Profile + + + + + Profile Name + + + + + Default Stick Mode + + + + + Default Channel Order + + + + + Profile slot + + + + + Automatically add version number to the filename after download + + + + + Voice + + + + + + Download + + + + + Set language of voice. +May be different from firmware language + + + + + Language + + + + + Firmware + + + + + SD Structure path + + + + + Processor ID + + + + + Recent History Size + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox + + + + + Check for updates on startup + + + + + Check for selected Fw updates + + + + + Google Earth Executable + + + + + Find Executable + + + + + Last downloaded release: %1 + + + + + The selected firmware has never been downloaded by Companion. + + + + + The selected firmware cannot be downloaded by Companion. + + + + + Image stored in settings + + + + + + No joysticks found + + + + + Select your library folder + + + + + Select your snapshot folder + + + + + Select your Models and Settings backup folder + + + + + Select Google Earth executable + + + + + + Error + + + + + + Cannot load %1. + + + + + 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) + + + + + printDialog + + + Dialog + + + + + Close + + + + + Print + + + + + Print to file + + + + + Setup for: + + + + + printed on: %1 + + + + + General Model Settings + + + + + + + + Name + + + + + EEprom Size + + + + + Timer1 + + + + + Timer2 + + + + + Protocol + + + + + Pulse Polarity + + + + + Throttle Trim + + + + + + + Enabled + + + + + + Disabled + + + + + Throttle Expo + + + + + Trim Increment + + + + + Center Beep + + + + + Flight modes Settings + + + + + Fades + + + + + Trims + + + + + Gvars + + + + + Rot.Enc. + + + + + + + + Switch + + + + + Flight mode name + + + + + IN + + + + + OUT + + + + + + + + FM + + + + + Expo/Dr Settings + + + + + Weight + + + + + + Flight modes + + + + + + Flight mode + + + + + + DISABLED + + + + + Mixers + + + + + + + + CH + + + + + noTrim + + + + + + + + + Offset + + + + + Delay(u%1:d%2) + + + + + Slow(u%1:d%2) + + + + + Warn + + + + + Limits + + + + + + + + Min + + + + + + + + Max + + + + + + + Invert + + + + + + + INV + + + + + + + NOR + + + + + Curves + + + + + + + Curve + + + + + pt %1 + + + + + Logical Switches + + + + + + LS + + + + + Global Variables + + + + + GV + + + + + Switch Assignments + + + + + Function + + + + + Parameter + + + + + Repeat + + + + + Telemetry Settings + + + + + + Alarm 1 + + + + + + Alarm 2 + + + + + Analog + + + + + Unit + + + + + Scale + + + + + + + + Type + + + + + + + + Condition + + + + + + + + Value + + + + + A%1 + + + + + RSSI Alarm + + + + + Frsky serial protocol + + + + + System of units + + + + + Propeller blades + + + + + + Custom Telemetry View + + + + + Telemetry Bars + + + + + Bar Number + + + + + Source + + + + + Print Document + + + + + Select PDF output file + + + + + ODF files (*.odt);;PDF Files(*.pdf);;HTML-Files (*.htm *.html);;All Files (*) + + + + + simulatorDialog + + + Companion Simulator + + + + + + + + Right Double Click to Reset + + + + + THR + + + + + RUD + + + + + ELE + + + + + AIL + + + + + + Hold X + + + + + + Fix X + + + + + + Fix Y + + + + + + Hold Y + + + + + + + + TextLabel + + + + + TRN + + + + + GEA + + + + + ID0 + + + + + ID1 + + + + + ID2 + + + + + BEEP + + + + + P1 + + + + + + + 0 % + + + + + P2 + + + + + P3 + + + + + 9x Simulator + + + + + Outputs + + + + + LS1 + + + + + LS2 + + + + + LS3 + + + + + LS4 + + + + + LS5 + + + + + LS6 + + + + + LS7 + + + + + LS8 + + + + + LS9 + + + + + LSA + + + + + LSB + + + + + LSC + + + + + LSD + + + + + LSE + + + + + LSF + + + + + LSG + + + + + LSH + + + + + LSI + + + + + LSJ + + + + + LSK + + + + + LSL + + + + + LSM + + + + + LSN + + + + + LSO + + + + + LSP + + + + + LSQ + + + + + LSR + + + + + LSS + + + + + LST + + + + + LSU + + + + + LSV + + + + + LSW + + + + + CH1 + + + + + + + + + + + + + + + + + + + + -100.1 + + + + + CH9 + + + + + CH2 + + + + + CH10 + + + + + CH3 + + + + + CH11 + + + + + CH4 + + + + + CH12 + + + + + CH5 + + + + + CH13 + + + + + CH6 + + + + + CH14 + + + + + CH7 + + + + + CH15 + + + + + CH8 + + + + + CH16 + + + + + + Warning + + + + + Joystick enabled but not configured correctly + + + + + Cannot open joystick, joystick disabled + + + + + Firmware %1 error: %2 + + + + + - Flight mode: %1(%2) + + + + + Simulating Tx (%1) + + + + + Simulating + + + + + splashLibrary + + + + ... + + + + + Splash Library - page %1 of %2 + + + + + Warning + + + + + Invalid image in library %1 + + + + + Information + + + + + No valid image found in library, check your settings + + + + + xsimulatorDialog + + + Companion Simulator + + + + + + Hold Y + + + + + + Fix Y + + + + + + Fix X + + + + + + Hold X + + + + + + SD + + + + + + SC + + + + + + + + Right Double Click to Reset + + + + + + S2 + + + + + + SG + + + + + + RS + + + + + + SH + + + + + + + + TextLabel + + + + + + S1 + + + + + + SB + + + + + + SA + + + + + + SE + + + + + + + SF + + + + + + LS + + + + + Taranis Simulator + + + + + Outputs + + + + + CH1 + + + + + + + + + + + + + + + + + + + + -100.1 + + + + + CH9 + + + + + CH2 + + + + + CH10 + + + + + CH3 + + + + + CH11 + + + + + CH4 + + + + + CH12 + + + + + CH5 + + + + + CH13 + + + + + CH6 + + + + + CH14 + + + + + CH7 + + + + + CH15 + + + + + CH8 + + + + + CH16 + + + + + LSK + + + + + LSC + + + + + LSD + + + + + LS7 + + + + + LSL + + + + + LSB + + + + + LS1 + + + + + LSH + + + + + LSG + + + + + LSE + + + + + LSF + + + + + LS8 + + + + + LS9 + + + + + LSA + + + + + LSM + + + + + LSJ + + + + + LSI + + + + + LS4 + + + + + LS5 + + + + + LS2 + + + + + LS3 + + + + + LS6 + + + + + LSN + + + + + LSO + + + + + LSP + + + + + LSQ + + + + + LSR + + + + + LSS + + + + + LST + + + + + LSU + + + + + LSV + + + + + LSW + + + + + + Warning + + + + + Joystick enabled but not configured correctly + + + + + Cannot open joystick, joystick disabled + + + + + Firmware %1 error: %2 + + + + + - Flight mode: %1(%2) + + + + + Simulating Tx (%1) + + + + + Simulating + + + + diff --git a/companion/src/translations/companion_fr.ts b/companion/src/translations/companion_fr.ts index d62d3e8c8..ed25bd127 100644 --- a/companion/src/translations/companion_fr.ts +++ b/companion/src/translations/companion_fr.ts @@ -2,153 +2,611 @@ - ExpoDialog + Channels - - Expo - Expo + + Name + Nom - + + Offset + + + + + Min + Min + + + + Max + Max + + + + Invert + Inversion + + + + Center + Centre + + + + Sym + Sym + + + + Channel %1 + + + + + --- + --- + + + + INV + Inversion + + + + CurveGroup + + + Diff + Diff + + + + Expo + Expo + + + + Func + + + + + Curve + Courbe + + + + Curves + + + Form + + + + + Standard + + + + + Custom + Prédéfini + + + + Lines + + + + + Smooth + + + + + Curve type + Type de courbe + + + + Curve name + Nom de la courbe + + + + Curve %1 + + + + + %1 points + + + + + Are you sure you want to reset curve %1 ? + + + + + Editing curve %1 + Édition de la courbe %1 + + + + Not enough free points in EEPROM to store the curve. + + + + + CustomFunctionsPanel + + + Switch + Interrupteur + + + + Action + + + + + Parameters + + + + + Enable + Actif + + + + CF%1 + FS%1 + + + + ON + + + + + Error + Erreur + + + + Unable to find sound file %1! + Impossible de trouver le fichier %1! + + + + &Delete + &Supprimer + + + + Delete + Supprimer + + + + &Copy + &Copier + + + + Ctrl+C + Ctrl+C + + + + &Cut + C&ouper + + + + Ctrl+X + Ctrl+X + + + + &Paste + + + + + Ctrl+V + Ctrl+V + + + + Dialog + + + Dialog + Dialogue + + + + Curve type + Type de courbe + + + + Coefficient + + + + + Both + Les 2 + + + + x>0 + + + + + x<0 + + + + + Y at X=0 + Y pour X=0 + + + + Side + Direction + + + + Y at X=-100 + Y pour X=-100 + + + + Y at X=100 + Y pour X=100 + + + + Linear + Linéaire + + + + Single Expo + Expo simple + + + + Symmetrical f(x)=-f(-x) + Symétrique f(x)=-f(-x) + + + + Symmetrical f(x)=f(-x) + Symétrique f(x)=f(-x) + + + + ExpoDialog + + Weight Ratio - - Name - Nom - - - - - Phase used by the expo. - Phase utilisée par l'expo. - - - + 0 0 - + Flight modes Phases de vol - - - + + The source for the mixer + La voie maître pour le mixage + + + + Input name + + + + + GV VG - + + Phase used by the input. + + + + 1 1 - + 2 2 - + 3 3 - + 4 4 - + 5 5 - + 6 6 - + 7 7 - + 8 8 - + Switch Interrupteur - - Switch used by the expo. -If blank then the expo is considered to be "ON" all the time. - Interrupteur utilisé par l'expo. -Expo actif par défaut si non renseigné. + + Switch used by the input. +If blank then the input is considered to be "ON" all the time. + - - Curve/Exponential - Courbe/Exponentiel + + The curve used by the input + - + + Source + + + + + Line name + + + + Stick Side Direction - + + <!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;">Délai et Ralenti</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;">Ces valeurs contrôlent la vitesse et le délai à l'entrée du mixage.</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;">Si Délai est différent de 0, le départ du mixage sera décalé du nombre de secondes spécifié.</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;">Si Ralentissement est différent de 0, la vitesse du mixage sera la valeur spécifiée -&gt; La valeur représente le nombre de secondes nécessaires à la course -100/100.</p></body></html> + + + + Scale + Echelle + + + + Include Trim + Inclure Trim + + + + No + Non + + + + Yes + Oui + + + Curve Courbe - - The curve used by the expo - Courbe utilisée par l'expo - - - + NEG Négatif - + POS Positif - + ALL Partout - - DEST -> %1 - Destination -> %1 + + Edit %1 + + + + + Rud + Dir + + + + Ele + Prf + + + + Thr + Gaz + + + + Ail + Ail + + + + FlightMode + + + Form + + + + + Fade In + Fondu en entrée + + + + Fade Out + Fondu en sortie + + + + Name + Nom + + + + Switch + Interrupteur + + + + trim1 + + + + + trim2 + + + + + trim4 + + + + + trim3 + + + + + Rud + Dir + + + + Ele + Prf + + + + Thr + Gaz + + + + Ail + Ail + + + + Rotary Encoder %1 + + + + + GVAR%1 + + + + + FlightModes + + + Flight Mode %1 + + + + + (%1) + + + + + (default) + GeneralEdit - + v - + min - - + + sec @@ -158,8 +616,8 @@ Expo actif par défaut si non renseigné. Configuration - - + + <!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; } @@ -174,22 +632,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;"><span style=" font-size:8pt;">Plage de valeurs: 20...45</span></p></body></html> - + Input Filter Conversion - + Inactivity Timer Alerte d'inactivité - + Every Minute Toutes les minutes - + If not zero will sound beeps if the transmitter has been left without inputs for the specified number of minutes. Si différent de 0, émission d'un bip sonore régulier si aucune action n'a été effectuée sur l'émetteur depuis le temps spécifié (en minutes). Réinitialisation en agissant sur n'importe lequel des manches / touches de navigation. @@ -200,18 +658,7 @@ Réinitialisation en agissant sur n'importe lequel des manches / touches de Paramètres généraux - - 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. - - - Inversion des gaz. -Si cette option est cochée, la voie des gaz est inversée: le ralenti est 'manche en haut'. Le trim et l'alerte des gaz sont inversés également. - - - - - + <!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; } @@ -220,47 +667,49 @@ p, li { white-space: pre-wrap; } Le rétroéclairage clignote en synchro avec les bips du chrono - + Memory Startup Warning Alerte mémoire - + Beeps at 30, 15, 10, and down from5 seconds Bip à 30, 15, 10, 5 puis toutes les secondes - + This is the switch selectrion for turning on the backlight (if installed). Interrupteur déclenchant le rétroéclairage' (si installé). - + Timer Beeps Bips du chrono - + Mode 2 (RUD THR ELE AIL) Mode 2 (DIR GAZ PROF AIL) - + Filter Filtre (si 'jitter' - Latence +30msec) - + + + - - - - - - + + + + + + Beeper volume 0 - Quiet. No beeps at all. @@ -277,32 +726,27 @@ Long : bips plus longs. Extra long : bips extra longs. - - Throttle Startup Warning - Alerte gaz - - - + Single Simple conversion (1024 bits) - + Battery Warning Alerte batterie - + Contrast Contraste - + Mode 4 (AIL THR ELE RUD) Mode 4 (AIL GAZ PROF DIR) - + Mode selection: Mode 1: @@ -343,15 +787,10 @@ Manche Droit: Profondeur, Direction - + Mode 3 (AIL ELE THR RUD) Mode 3 (AIL PROF GAZ DIR) - - - Reverse Throttle Operation - Inversion des gaz - General settings used throught the transmitter. @@ -360,17 +799,17 @@ These will be relevant for all models in the same EEPROM. Communs à tous les modèles d'une même EEPROM. - + Flash on beep Clignotement avec les bips - + Oversample Suréchantillonnage (2048 bits) - + Battery warning voltage. This is the threashhold where the battery warning sounds. @@ -381,17 +820,17 @@ Seuil auquel se déclenche l'alarme de batterie. Plage de valeurs: 5v...10v - + Calibration Étalonnage - + Stick Mode Mode - + Channel order This is used by the templated to determine which channel goes to what number output. @@ -399,34 +838,34 @@ This is used by the templated to determine which channel goes to what number out Indique l'affectation voie / numéro d'entrée pour les présélections (=Templates). - + Battery Calibration Étalonnage batterie - + Count Down to Zero Compte à rebours - + If this value is not 0, any keypress will turn on the backlight and turn it off after the specified number of seconds. Si cette valeur est différente de 0, l'appui sur une touche de navigation déclenche le rétroéclairage qui s'éteint après la durée spécifiée (en secondes). - + Beeper Mode Réglage des bips - + Battery calibration: This value will be added to the measured battery voltage. Use this value to calibrate the meter with an external meter. Étalonnage batterie: Cette valeur est ajoutée à la tension mesurée.Mesurer la tension réelle' à l'aide d'un multimètre pour déterminer l'écart à appliquer. - + <!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; } @@ -439,12 +878,11 @@ 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;">Emet un bip à chaque minute écoulée</span></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; } @@ -469,263 +907,247 @@ 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;">Alerte mode silencieux - Avertissement si les bips sont désactivés</p></body></html> - + Mode 1 (RUD ELE THR AIL) Mode 1 (DIR PROF GAZ AIL) - + Channel Order (For Templates) Ordre des voies par défaut - - Switch Startup Warning - Alerte interrupteurs - - - + Show Splash Screen on Startup Afficher l'écran de démarrage - - + + Show splash screen on startup Affiche l'écran d'accueil au démarrage - + Alarm Warning Alerte mode silencieux - - + + Quiet Mode silencieux - - + + No Keys Touches silencieuses - - + + Normal Normal - - + + Long Long - + PPM Multiplier Coeff. multiplicateur PPM - + Owner Name Nom du propriétaire - + - - - + + Off Aucun - - Switches Up - Inters vers le haut - - - - Switches Down - Inters vers le bas - - - + Trainer Ecolage - - + + PPM 1 PPM 1 + - - - + + chn1 Can. 1 + - - - + + chn2 Can. 2 + - - - + + chn3 Can. 3 + - - - + + chn4 Can. 4 - + Mode Mode - + Sound Mode Mode Son - + Beeper Bipeur - + Speaker Pitch (spkr only) Tonalité (HP uniquement) - + Pot Scrolling Enable Navigation avec les pots - + Bandgap Measuring Enable Mesure Bandgap - + Show Owner Name on Splash Nom sur l'écran de démarrage - + Telemetry NO DATA Alarm Alarme Pas de télémesure - + Only Alarms Seulement les alarmes - - + + All Tous - + THR THR - + RUD RUD - + ELE ELE - + AIL AIL - + GEA - + ID0 - + ID1 - + ID2 - + Beeper Length Durée des bips - - + + X-Short X-court - - + + Short Court - - + + X-Long X-long - + Haptic Mode Mode du vibreur - + Alarms Only Seulement les Alarmes - + Haptic Length Durée vibreur - + GPS Coordinates Coordonnées GPS @@ -740,137 +1162,137 @@ p, li { white-space: pre-wrap; } Lire étalonnage et réglages hw du profil - + Speaker Haut-parleur - + BeeperVoice Bipeur/Voix - + SpeakerVoice Haut-parleur/Voix - + hh° (N/S) mm' ss''.dd - + NMEA - + Timeshift from UTC Décalage horaire (UTC) - + LCD Display Type Type de LCD - + Standard - + Optrex - + Speaker Volume Volume haut-parleur - + Haptic Strength Puissance vibreur - + BackLight Brightness Luminosité rétroéclairage - + RotEnc Navigation Navigation avec encodeur - + BackLight Auto OFF after Durée rétroéclairage - + BackLight Switch Inter rétroéclairage - + BackLight On Stick Move Rétroéclairage par sticks - + BackLight Invert Inversion du rétroéclairage - + Country Code - + Europe - + Japan - + America - + Metric Métrique - + Imperial Impérial - + Measurement Units Unités - + FrSky Internal Alarm Alarmes FrSky internes - + StickScroll Défilement par manches - + PPMSim PPMSim @@ -880,37 +1302,37 @@ p, li { white-space: pre-wrap; } Langue audio - + CrossTrim Trims croisés - + Beep volume Volume des bips - + Wav volume Volume des fichiers audio - + Vario volume Volume du variomètre - + Background volume Volume de la musique d'ambiance - + FAI Mode Mode FAI - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. Lorsque le mode FAI est activé, le variomètre ainsi que l'écran et la lecture des valeurs de télémesure sont désactivés. Ce mode ne peut pas être désactivé sur la radio. @@ -920,1177 +1342,1565 @@ p, li { white-space: pre-wrap; } Baudrate Mavlink - + 4800 Baud - + 9600 Baud - + 14400 Baud - + 19200 Baud - + 38400 Baud - + 57600 Baud - + 76800 Baud - + 115200 Baud - + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + Readonly Unlock Débloquage lecture seule - + SC - + SE - + SA - + SF - + SH - + SD - + SB - + SG - + Input Entrée - + Weight Ratio - + Switch Interrupteur + - - - + + += (Sum) += (Additionne) + - - - + + := (Replace) := (Remplace) - - + + PPM 2 PPM 2 - - + + PPM 3 PPM 3 - - + + PPM 4 PPM 4 - + Telemetry Télémesure - + RSSI Alarm 1 Alarme RSSI 1 - - + + ---- ---- - - + + Yellow Jaune - - + + Orange Orange - - + + Red Rouge - + RSSI Alarm 2 Alarme RSSI 2 - + NO DATA Alarm Alarme Pas de télémesure - + POT 4 POT 4 - - + + Negative span Amplitude nég. - - + + Mid value Centre - - + + Positive span Amplitude pos. - + STICK 1 MANCHE 1 - + STICK 2 MANCHE 2 - + Current Courant - + + + Pot (normal) + + + + + + Multipos Switch + + + + + S1 Type + + + + + S2 Type + + + + STICK 3 MANCHE 3 - + STICK 4 MANCHE 4 - + POT 1 POT 1 - + POT 2 POT 2 - + POT 3 POT 3 - + Battery Batterie - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. Are you sure ? Lorsque le mode FAI est activé, le variomètre ainsi que l'écran et la lecture des valeurs de télémesure sont désactivés.\nCe mode ne peut pas être désactivé sur la radio.\nEtes-vous sûr? - - + + Warning Avertissement - + Wrong data in profile, radio calibration was not retrieved Données du profil erronnées, l'étalonnage n'a pas été lu - + Wrong data in profile, hw related parameters were not retrieved Données du profil erronnées, les paramètres hw n'ont pas été lus - + Do you want to store calibration in %1 profile<br>overwriting existing calibration? Voulez-vous stocker l'étalonnage dans le profil %1<br> et écraser l'étalonnage existant? - + Calibration and HW parameters saved. Etalonnage et paramètres hw enregistrés avec succès. + + Heli + + + Form + + + + + Invert Elevator + Profondeur + + + + Invert Aileron + Aileron + + + + Invert Collective + Pas collectif + + + + Invert + Inversion + + + + Off + Aucun + + + + 120 + 120 + + + + 120X + 120X + + + + 140 + 140 + + + + 90 + 90 + + + + Collective + Source du pas collectif + + + + Swash Type + Type de plateau cyclique + + + + Swash Ring + Limite cyclique + + + + InputsPanel + + + + Move Up + Monter + + + + + Ctrl+Up + Ctrl+Haut + + + + + Move Down + Descendre + + + + + Ctrl+Down + Ctrl+Bas + + + + Clear All Settings + + + + + Source(%1) + + + + + No Trim + Pas de Trim + + + + Weight(%1) + + + + + Switch(%1) + + + + + Not enough available inputs! + + + + + Delete Selected Inputs? + + + + + &Add + &Ajouter + + + + Ctrl+A + Ctrl+A + + + + &Edit + + + + + Enter + Entrée + + + + &Delete + &Supprimer + + + + Delete + Supprimer + + + + &Copy + &Copier + + + + Ctrl+C + Ctrl+C + + + + &Cut + C&ouper + + + + Ctrl+X + Ctrl+X + + + + &Paste + + + + + Ctrl+V + Ctrl+V + + + + Du&plicate + Du&pliquer + + + + Ctrl+U + + + + + Clear Inputs? + + + + + Really clear all the inputs? + + + + + LogicalSwitchesPanel + + + Condition + Condition + + + + V1 + V1 + + + + V2 + V2 + + + + AND + ET + + + + Duration + Durée + + + + Delay + Délai + + + + + LS%1 + + + + + &Delete + &Supprimer + + + + Delete + Supprimer + + + + &Copy + &Copier + + + + Ctrl+C + Ctrl+C + + + + &Cut + C&ouper + + + + Ctrl+X + Ctrl+X + + + + &Paste + + + + + Ctrl+V + Ctrl+V + + MainWindow - + &New &Nouveau - Burn - Flasher - - - + Cu&t C&ouper - + Edit Edition - + File Fichier - companion9x - EEPROM Editor - firmware %1 - companion9x - Éditeur d'EEPROM - Firmware %1 - - - + Display previous warning again at startup ? Afficher les alertes précédentes lors du prochain démarrage ? - + New release available 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 - - - - - - - - - - - - - - - + + + + + + + + + + + + + Error Erreur - - - - - + + + + + Error opening file %1: %2. Erreur à l'ouverture du fichier %1: %2. - Firmware does not fit in flash, due to selected firmware options - Ce firmware est trop gros, trop d'options choisies - - - + Compilation server termporary failure, try later Erreur temporaire du serveur de compilation - companion9x - EEPROM Editor - firmware %1 - profile %2 - companion9x - Editeur d'EEPROM - firmware %1 - profil %2 - - - + Display previous message again at startup ? Afficher les alertes précédentes lors du prochain démarrage ? - Firmware does not longer fit in flash, due to selected firmware options - Les options sélectionnées prennent trop de place par rapport à la taille de flash disponible - - - + Compilation server temporary failure, try later Erreur temporaire du serveur de compilation - - + + Compilation server too busy, try later 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 - - - - + + Unknown server failure, try later Erreur inconnue du serveur de compilation - Do you want to flash the firmware now ? - 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. - The file %1 -has not been recognized as a valid EEPROM -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 - Backup EEPROM From Tx - Sauvegarder l'EEPROM de l'émetteur - - - Cannot check eeprom compatibility! Continue anyway? - Impossible de vérifier la compatibilité de l'EEPROM! Continuer quand même? - - - - + + Warning Avertissement - Firmware in radio is of a different family of eeprom written, check file and preferences! - Le firmware de la radio n'est pas compatible avec la version de l'EEPROM à flasher, vérifier le fichier et les préférences! - - - Firmware in flash is outdated, please upgrade! - Le firmware de la radio est dépassé, veuillez mettre à jour! - - - Write EEPROM To Tx - Transférer l'EEPROM vers l'émetteur - - - Write Flash To Tx - Flasher l'émetteur - - - + Conversion failed La conversion a échoué - Cannot convert EEProm for this firmware, original EEProm file will be used - Impossible de convertir l'EEPROM pour ce firmware, l'EEPROM d'origine sera utilisée - - - Restore EEPROM To Tx - Restaurer l'EEPROM vers l'émetteur - - - + Restore failed Erreur lors de la restauration - Cannot restore EEProm to TX, original EEProm file can be found at: %1 - Impossible de restaurer l'EEProm, le fichier sauvagardé se trouve dans : %1 - - - Flash failed - Erreur lors du flash - - - Cannot flash the TX, original EEProm file can be found at: %1 - Impossible de flasher l'émetteur, l'EEPROM d'origine se trouve dans : %1 - - - + Backup failed Erreur lors de la sauvegarde - Cannot backup existing EEProm from TX, Flash process aborted - 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 - + + &Old Preferences Dialog... + + + + + Used the old Preferences Dialog + + + + + &Application Preferences... + + + + + Edit application preferences + + + + ChangeLog... Historique des changements... - Show companion9x changelog - 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 transmitter start screen... + + + + + &Configure connection software... + + + + 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 - + + Classic + + + + + The multicolor classical Companion icon theme + + + + + A monochrome black icon theme + + + + + A monochrome white icon theme + + + + + A monochrome blue icon theme + + + + + Small + + + + + Use small toolbar icons + + + + + Use normal size toolbar icons + + + + + Normal + Normal + + + + Use big toolbar icons + + + + + Big + + + + + Use huge toolbar icons + + + + + Huge + + + + + System default language + + + + + Use system default language in menus + + + + + Czech + Tchèque + + + + Use Czech in menus + + + + + German + Allemand + + + + Use German in menus + + + + + English + Anglais + + + + Use English in menus + + + + + French + Français + + + + Use French in menus + + + + + Italian + Italien + + + + Use Italian in menus + + + + + Hebrew + + + + + Use Hebrew in menus + + + + + Polish + + + + + Use Polish in menus + + + + + Portuguese + Portugais + + + + Use Portuguese in menus + + + + + Swedish + Suédois + + + + Use Swedish in menus + + + + + Russian + + + + + Use Russian in menus + + + + + Manuals and other Documents + + + + + Open the OpenTX document page in a web browser + + + + + Set Icon Theme + + + + + Set Icon Size + + + + + &Settings + + + + &Read/Write &Lire/Ecrire - + Write Ecrire - + Unable to find file %1! Fichier %1 introuvable! - Invalid EEPROM File %1 - Fichier EEPROM %1 invalide - - - + Error reading file %1: %2. Fichier %1 corrompu: %2. - Invalid binary EEPROM File %1 - Fichier binaire %1 invalide - - - &Write EEPROM To Tx - &Transférer l'EEPROM vers l'émetteur - - - &Burn - 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? - + + OpenTX Home Page: <a href='%1'>%1</a> + + + + + The OpenTX Companion project was originally forked from <a href='%2'>eePe</a> + + + + + If you've found this program useful, please support by <a href='%1'>donating</a> + + + + + Version %1, %3 + + + + + &Downloads and Profiles... + + + + + Firmware and voice file downloads as well as profile definition. + + + + Show Companion contributors list - + Show Companion changelog - - Ne&xt - Sui&vante - - - - + + Firmware Profiles Profils de firmware - + Ready Prêt - Read Flash to File - 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 - + + A new release of Companion is available please check the OpenTX website! + + + + &Paste Co&ller - + &Print Im&primer - + Save &As... Enregistrer &Sous... - - Cascade the windows - Disposer les fenêtres en cascade - - - Read Flash memory - 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é. - Read EEPROM from transmitter - Charger l'EEPROM de l'émetteur - - - - Close all the windows - Fermer toutes les fenêtres - - - Write flash memory to transmitter - É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 - Write Flash memory - É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 - - - Read flash memory to transmitter - 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 - - - + &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 - Write EEPROM to transmitter - 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 - Configure burning software - Configurer le logiciel de flashage - - - &Read EEPROM From Tx - &Charger l'EEPROM de l'émetteur - - - Read EEPROM From Tx - Charger l'EEPROM de l'émetteur - - - Read EEPROM memory to File - 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 - - - - Customize your &TX... - &Personnaliser votre émetteur... - - - + Customize the splash screen of your TX Personnaliser l'écran de démarrage de votre émetteur - Write EEPROM memory from file - Transférer un fichier EEPROM vers l'émetteur - - - Write EEPROM memory from file to transmitter - Transférer un fichier EEPROM vers l'émetteur - - - Read EEPROM memory to file - Enregistrer l'EEPROM de l'émetteur dans un fichier - - - Read EEPROM memory from transmitter to file - Enregistrer l'EEPROM de l'émetteur dans un fichier - - - - - - - + + + + + Save As Enregistrer Sous - + Executable (*.exe) Exécutable (*.exe) - - + + No updates available at this time. Aucune mise à jour disponible. - - - - - + + + + + Unable to check for updates. Impossible de rechercher des mises à jour. - + Would you like to launch the installer? 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). Voulez vous la télécharger maintenant ? - Write %1 to EEPROM memory? - 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é - - - + Copyright Copyright - - Switch layout Left/Right - Inverser l'interface gauche/droite - - - + Ignore this version (r%1)? Ignorer cette version (r%1)? - + Help Aide - + Checking for updates Recherche de mises à jour - companion9x - Models and Settings Editor - %1 - profile %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 - - - 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 ? - - - + Do you want to write the firmware to the transmitter now ? 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 ? @@ -2099,15 +2909,37 @@ La version %2 est disponible. Voulez-vous la télécharger maintenant ? - - - - + + The selected language will be used the next time you start Companion. + + + + + + + OK + + + + + The new theme will be loaded the next time you start Companion. + + + + + The icon size will be used the next time you start Companion. + + + + + + + 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 ? @@ -2116,197 +2948,180 @@ 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 - - - + &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 - &Configure Communication... - &Configurer la communication - - - Configure software for communication with the transmitter - Configure le programme pour communiquer correctement avec la radio - - - - + + Recent Files Derniers documents utilisés - - + + Set Menu Language + + + + + 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 @@ -2314,83 +3129,83 @@ Ecrire quand même? MdiChild - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + Error Erreur - - - - + + + + Cannot write file %1: %2. Ecriture fichier %1 impossible: %2. - - + + Unable to find file %1! Fichier %1 introuvable! - - - - + + + + Save As Enregister Sous - + Cannot write temporary file! Ecriture de fichier temporaire impossible! - + Editing model %1: Édition du modèle %1 : - - + + Error writing file %1: %2. Erreur d'écriture fichier %1: %2. - - + + Error reading file %1: %2. Fichier %1 corrompu: %2. - - - - + + + + Error opening file %1: %2. Erreur à l'ouverture du fichier %1: @@ -2402,102 +3217,102 @@ Ecrire quand même? octets libres - + Do you want to use model wizard? Voulez-vous utiliser l'assistant de configuration de modèle ? - - - + + + Companion - + Ask this question again ? Poser la question à nouveau ? - - + + Invalid EEPROM File %1 Fichier EEPROM %1 invalide - + Invalid binary EEPROM File %1 Fichier binaire %1 invalide - + Backup is impossible Impossible de sauvegarder - + The backup dir set in preferences does not exist Le dossier de sauvegarde configuré dans les préférences n'existe pas - - - + + + 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. - - - + + + Backup EEPROM From Tx Sauvegarder l'EEPROM de l'émetteur - + Cannot check eeprom compatibility! Continue anyway? Impossible de vérifier la compatibilité de l'EEPROM! Continuer quand même? - - + + Warning Avertissement - + Firmware in radio is of a different family of eeprom written, check file and preferences! Le firmware de la radio n'est pas compatible avec la version de l'EEPROM à flasher, vérifier le fichier et les préférences! - + Firmware in flash is outdated, please upgrade! Le firmware de la radio est dépassé, veuillez mettre à jour! - + Write EEPROM To Tx Transférer l'EEPROM vers l'émetteur - + Open Ouvrir - + Invalid binary backup File %1 Fichier de sauvegarde %1 invalide - + %1 has been modified. Do you want to save your changes? %1 a été modifié. @@ -2507,52 +3322,42 @@ Enregistrer les changements ? MixerDialog - + Up Haut - + ADD Ajouter - - Fix Offset - Décalage sur la sortie - - - + OFF - - Enable FM Trim - Trims de phases de vol - - - + Down Bas - + Slow Ralenti - + Delay Délai - + Curve Courbe - + Multiplexer This determines how mixer values are added. @@ -2569,127 +3374,119 @@ Spécifie comment les valeurs de mixage sont interprétées. "R": la valeur remplace les valeurs précédentes. Si l'inter est sur OFF, la valeur est ignorée . - + The curve used by the mix Courbe utilisée par le mixage - - - + + + GV VG - + Yes Oui - + No Non - - Curve/Differential - Courbe/Différentiel - - - + Mixer warning. Setting this value will cause a beep to be emmitted when this value is active. Alerte de mixage. Si activée, signale par des bips que le mixage est actif. - + 1 Beep 1 Bip - + 2 Beep 2 Bips - + 3 Beep 3 Bips - + Multiplex Multiplexage - + Dialog Dialogue - - - - + Offset Décalage - + Source Maître - + Switch Interrupteur - + Weight Ratio - + REPLACE Remplacer - - - - + + + + The source for the mixer La voie maître pour le mixage - + MULTIPLY Multiplier - + Switch used by the mix. If blank then the mix is considered to be "ON" all the time. Interrupteur utilisé par le mixage. Mixage actif par défaut si non-renseigné. - + Warning Avertissement - + Name Nom - - - - + + + + <!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; } @@ -2714,2719 +3511,608 @@ 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;">Si Ralentissement est différent de 0, la vitesse du mixage sera la valeur spécifiée -&gt; La valeur représente le nombre de secondes nécessaires à la course -100/100.</p></body></html> - + DEST -> X%1 - + DEST -> CH%1%2 - - - FM Trim Value - Trim de phase de vol - - - + Rud Dir - + Ele Prf - + Thr Gaz - + Ail Ale Ail - + Include Trim Inclure Trim - + Flight modes Phases de vol - + Include DR/Expo Inclure DR/Expo - + 0 0 - + 1 1 - + 2 2 - + 3 3 - + 4 4 - + 5 5 - + 6 6 - + 7 7 - + 8 8 + + MixesPanel + + + + Move Up + Monter + + + + + Ctrl+Up + Ctrl+Haut + + + + + Move Down + Descendre + + + + + Ctrl+Down + Ctrl+Bas + + + + Clear Mixes + Effacer les mixages + + + + + + X%1 + + + + + + + CH%1%2 + VOIE%1%2 + + + + Weight(%1) + + + + + Switch(%1) + + + + + No Trim + Pas de Trim + + + + No DR/Expo + Pas d'expo/DR + + + + Offset(%1) + + + + + Delay(u%1:d%2) + Délai(u%1:d%2) + + + + Slow(u%1:d%2) + Ralentissement(u%1:d%2) + + + + Warn(%1) + Alerte(%1) + + + + Not enough available mixers! + Plus de mixages disponibles ! + + + + Delete Selected Mixes? + Supprimer mixages sélectionnés ? + + + + &Add + &Ajouter + + + + Ctrl+A + Ctrl+A + + + + &Edit + + + + + Enter + Entrée + + + + &Delete + &Supprimer + + + + Delete + Supprimer + + + + &Copy + &Copier + + + + Ctrl+C + Ctrl+C + + + + &Cut + C&ouper + + + + Ctrl+X + Ctrl+X + + + + &Paste + + + + + Ctrl+V + Ctrl+V + + + + Du&plicate + Du&pliquer + + + + Ctrl+U + + + + + Clear Mixes? + Effacer les mixages ? + + + + Really clear all the mixes? + Êtes-vous sûr de vraiment vouloir effacer tous les mixages ? + + ModelEdit - - P1 - - - - - P2 - - - - - P3 - - - - - - - - - - ch - - - - - - - - - - - - - - AIL - AIL - - - - - - - - - - - - - - - ELE - PROF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INV - - - - - - - - - Max - - - - - - - - - Min - - - - - - - - - - - - - RUD - DIR - - - - - - - - THR - GAZ - - - - - &Add - &Ajouter - - - - - - - &Cut - C&ouper - - - - Fine - Fin - - - - - - usec - - - - - - - - &Copy - &Copier - - - - - &Edit - &Edition - - - + Simulate Simulation - - - Enter - Entrée + + Heli + - + + Inputs + + + + Mixes Mixages - + + Logical Switches + + + + + Switch Assignment + + + + Setup Configuration - - - mm:ss - - - - - Trim Increment - Incrément trims - - - - Slow(u%1:d%2) - Ralentissement(u%1:d%2) - - - - - - - &Paste - &Coller - - - - Delay(u%1:d%2) - Délai(u%1:d%2) - - - - Coarse - Grossier - - - - - - - Delete - Supprimer - - - + Curves Courbes - + Dialog Dialogue - - - - Invert - Inversion - - - - Exponential - Exponentiel - - - - Limits - Débattements - - - - Medium - Moyen - - - - - - Offset - SubTrim - - - - - Count Down - Décroissant - - - - Pulse Shift (polarity) - Modulation - - - - - - Positive - - - - - - Count Up - Croissant - - - - Extra Fine - Extra fin - - - - Throttle Trim - Trim des gaz - - - - Throttle Expo - Expo des gaz - - - - Warn(%1) - Alerte(%1) - - - - - - Protocol - Codage - - - - - - Channel - Voie - - - - - - - &Delete - &Supprimer - - - - Curve 1 - Courbe 1 - - - - Curve 2 - Courbe 2 - - - - Curve 3 - Courbe 3 - - - - Curve 4 - Courbe 4 - - - - Curve 5 - Courbe 5 - - - - Curve 6 - Courbe 6 - - - - Curve 7 - Courbe 7 - - - - Curve 8 - Courbe 8 - - - - Curve 9 - Courbe 9 - - - - Delete Selected Mixes? - Supprimer mixages sélectionnés ? - - - - - - Negative - Négative - - - - Model Name - Nom du modèle - - - - Center beep - Bip de centrage - - - - - - - Function - Fonction - - - - Curve 10 - Courbe 10 - - - - Curve 11 - Courbe 11 - - - - Curve 12 - Courbe 12 - - - - Curve 13 - Courbe 13 - - - - Curve 14 - Courbe 14 - - - - Curve 15 - Courbe 15 - - - - Curve 16 - Courbe 16 - - - - - + Channels Voies - - - V1 - V1 - - - - - V2 - V2 - - - - Extended Limits - Débattements étendus - - - - Safety Switches - Inters de sécurité - - - - - - - - - - - - - - - - Switch - Interrupteur - - - - Value - Valeur - - - - - Du&plicate - Du&pliquer - - - - - - - Move Up - Monter - - - - - - - Ctrl+Up - Ctrl+Haut - - - - - - - Move Down - Descendre - - - - - - - Ctrl+Down - Ctrl+Bas - - - - Swash Type - Type de plateau cyclique - - - - - Off - Aucun - - - - 120 - - - - - 120X - - - - - 140 - - - - - 90 - - - - - Collective - Source du pas collectif - - - - - - - - - - - - GVAR1 - Variable globale VG1 - - - - - - - - - - - - Rotary encoder A - Encodeur rotatif A - - - - - - - - - - - - GVAR2 - Variable globale VG2 - - - - - - - - - - - - Rotary encoder B - Encodeur rotatif B - - - - - - - - - - - - GVAR3 - Variable globale VG3 - - - - - - - - - - - - GVAR4 - Variable globale VG4 - - - - - - - - - - - - GVAR5 - Variable globale VG5 - - - - - Sym - Sym - - - - - Curve type - Type de courbe - - - - 3 points - 3 points - - - - 3 points custom - 3 points personnalisée - - - - 5 points - 5 points - - - - 5 points custom - 5 points personnalisée - - - - 9 points - 9 points - - - - 9 points custom - 9 points personnalisée - - - - 17 points - 17 points - - - - 17 points custom - 17 points personnalisée - - - - - Duration - Durée - - - - - AND - ET - - - - - Delay - Délai - - - - - FAS - FAS - - - - CEL - ELEM - - - - Alti - Alti - - - - Alti+ - Alti+ - - - - Vario - Vario - - - - CS6 - CSw1 - IP6 - - - - Telemetry screen 1 - Ecran de télémesure 1 - - - - - - Custom Screen Type - Type d'écran personnalisé - - - - - - Nums - Valeurs - - - - - - Bars - Barres - - - - Telemetry screen 2 - Ecran de télémesure 2 - - - - Telemetry screen 3 - Ecran de télémesure 3 - - - - - Max Value - Valeur Max - - - - - Min Value - Valeur Min - - - - RSSI - - - - - Alarm 1 - Alarme 1 - - - - Serial Protocol - Protocole Série - - - - Units - Unités - - - - None - Aucun - - - - FrSky Sensor Hub - Sensor Hub FrSky - - - - Metric - Métrique - - - - Imperial - Impérial - - - - 2 - - - - - - Enable - Actif - - - - Sticks - Manches - - - - CS9 - IP9 - - - - CSF - IPF - - - - CSD - IPD - - - - CS1 - IP1 - - - - CS8 - IP8 - - - - CS7 - IP7 - - - - CSA - IPA - - - - CSB - IPB - - - - CSC - IPC - - - - CS5 - IP5 - - - - CS3 - IP3 - - - - CS2 - IP2 - - - - CSE - IPE - - - - CSG - IPG - - - - CS4 - IP4 - - - - CST - IPT - - - - CSM - IPM - - - - CSP - IPQ - - - - CSH - IPH - - - - CSO - IPO - - - - CSN - IPN - - - - CSQ - IPR - - - - CSR - IPS - - - - CSS - IPS - - - - CSL - IPL - - - - CSK - IPK - - - - CSJ - IPJ - - - - CSI - IPI - - - - CSU - IPU - - - - CSV - IPV - - - - CSW - IPW - - - - Volt source - Source de mesure de tension - - - - Current source - Source de mesure de courant - - - - NONE - Aucune - - - - 3 - - - - - 4 - - - - - Blades - Pales - - - - Altimetry / Vario - Altimètre / Vario - - - - Sink Max - Chute max - - - - Climb Max - Montée max - - - - Sink Min - Chute min - - - - Climb Min - Montée min - - - - Vario source - Source vario - - - - Vario limits - Limites vario - - - - Use GPS as altitude source - Utiliser le GPS comme source d'altitude - - - - Display altitude in toolbar - Affichage de l'altitude dans la barre de notifs - - - - - Volts (V) - Tension (V) - - - - - Amps (A) - Courant (A) - - - - - Speed (m/s or ft/s) - Vitesse (m/s ou ft/s) - - - - - Speed (km/h or miles/h) - Vitesse (km/h ou miles/h) - - - - - Meters (m or ft) - Distance (m ou ft) - - - - - Temp (°) - Temp (°) - - - - - Fuel (%) - Carburant (%) - - - - - mAmps (mA) - Courant (mA) - - - - - - Source - Source - - - - - - Gauge - Jauge - - - - - - Gauge 1 - Jauge 1 - - - - - - Gauge 2 - Jauge 2 - - - - - - Gauge 3 - Jauge 3 - - - - - - Gauge 4 - Jauge 4 - - - - Templates - Gabarits - - - - Apply Template? - Appliquer le gabarit ? - - - - Apply template "%1"? - Appliquer le gabarit "%1" ? - - - - - - Clear Mixes? - Effacer les mixages ? - - - - Really clear all the mixes? - Êtes-vous sûr de vraiment vouloir effacer tous les mixages ? - - - + Clear Curves? Effacer les courbes ? - + Really clear all the curves? Êtes-vous sûr de vraiment vouloir effacer toutes les courbes ? - - Swash Ring - Limite cyclique - - - - - Heli Setup - Hélicoptère - - - - RS - - - - - SB - - - - - ModelSetup - Configuration du modèle - - - - Model Image - Image du modèle - - - - SD - - - - - SA - - - - - SC - - - - - SG - - - - - SE - - - - - SF - - - - - Reverse Throttle Operation - Inversion des gaz - - - - 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. - - - Inversion des gaz. -Si cette option est cochée, la voie des gaz est inversée: le ralenti est 'manche en haut'. Le trim et l'alerte des gaz sont inversés également. - - - - - - Master - Maître - - - - Slave - Elève - - - - Trainer Mode - Mode écolage - - - - Master/Trainer Port - Prise écolage - - - - - - Start - 1er canal - - - - - Polarity - Polarité - - - - RF Module 1 - Module HF interne - - - - RF Module 2 - Module HF externe - - - - - (00:00:00) - - - - - Failsafe - Failsafe - - - - External module - Module HF externe - - - - - Failsafe Mode - Mode Failsafe - - - - - Hold - Maintien - - - - - Custom - Prédéfini - - - - - No Pulses - Pas d'impulsions - - - - Internal Module - Module HF interne - - - - Invert Elevator - Profondeur - - - - Invert Aileron - Aileron - - - - Invert Collective - Pas collectif - - - + Flight Modes Phases de vol - - Flight Mode 0 (Default) - Phase de vol 0 (par défaut) - - - - - - - - - - - - Flight Mode Name - Nom de la phase - - - - GVAR6 - Variable globale VG6 - - - - GVAR7 - Variable globale VG7 - - - - FM 1 - PV 1 - - - - FM 2 - PV 2 - - - - FM 3 - PV 3 - - - - FM 4 - PV 4 - - - - FM 5 - PV 5 - - - - FM 6 - PV 6 - - - - FM 7 - PV 7 - - - - FM 8 - PV 8 - - - - Show channels names in mixes - Montrer les noms des canaux dans les mixages - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- - --- - - - - - Center - Centre - - - - Curve name - Nom de la courbe - - - - Curve Creator - Créateur de courbes - - - - Both - Les 2 - - - - x>0 - - - - - x<0 - - - - - Linear - Linéaire - - - - Single Expo - Expo simple - - - - Symmetrical f(x)=-f(-x) - Simmetrycal f(x)=-f(-x) - Symétrique f(x)=-f(-x) - - - - Symmetrical f(x)=f(-x) - Simmetrycal f(x)=f(-x) - Symétrique f(x)=f(-x) - - - - Apply - Appliquer - - - - Side - Direction - - - - Y at X=-100 - Y pour X=-100 - - - - Y at X=0 - Y pour X=0 - - - - Y at X=100 - Y pour X=100 - - - - Coefficient - - - - - Clear All Curves - Effacer toutes les courbes - - - - Timer1 - Chrono 1 - - - - Timer2 - Chrono2 - - - - - - PPM delay - Délai PPM - - - - Extended Trims - Trims étendus - - - - Throttle2Trig - - - - - - - PPM Frame Length - Longueur de trame PPM - - - - - - mSec - ms - - - - - - - - - - - - Fade In - Fondu en entrée - - - - - - - - - - - - Fade Out - Fondu en sortie - - - - - - - - - - - - trim2 - - - - - - - - - - - - - trim1 - - - - - - DSM Type - Type DSM - - - - - LP4/LP5 - - - - - - DSM2only - DSM2seul - - - - - DSM2/DSMX - - - - - - RX Number - Numéro de récepteur - - - - Disable Throttle Warning - Désactiver alerte gaz - - - - Switch startup Warning - Alerte interrupteurs - - - - Instant Trim - Trims instantanés - - - - Throttle Source - Throttle Trace - Source de Gaz - - - - - Persistent - Persistant - - - - - MinuteBeep - Bip chaque minute - - - - - CountDownBeep - Compte à rebours final - - - - - CH01 - VOIE01 - - - - - CH02 - VOIE02 - - - - - CH03 - VOIE03 - - - - - CH04 - VOIE04 - - - - - CH05 - VOIE05 - - - - - CH06 - VOIE06 - - - - - CH07 - VOIE07 - - - - - CH08 - VOIE08 - - - - - CH09 - VOIE09 - - - - - CH10 - VOIE10 - - - - - CH11 - VOIE11 - - - - - CH12 - VOIE12 - - - - - CH13 - VOIE13 - - - - - CH14 - VOIE14 - - - - - CH15 - VOIE15 - - - - - CH16 - VOIE16 - - - - REa - - - - - REb - - - - - 3POS - - - - - - Check - Vérif. - - - - - - ON - - - - - - OFF - - - - - GEA - - - - - ID0 - - - - - ID1 - - - - - ID2 - - - - - - TriggerB - 2e condition - - - - Model Voice - Fichier son - - - - - - - - - - - - trim4 - - - - - - - - - - - - - trim3 - - - - Expos/DR - Expos - Expos / Doubles débattements - - - - Custom switches - Inters personnalisés - - - - Custom Functions - Function switches - Fonctions personnalisées - - - - - Param - Paramètre - - - + Telemetry Télémesure - - - - - - A1 - A1 - - - Sunk Max - Chute max - - - Raise Max - Montée max - - - Sunk Min - Chute min - - - Raise Min - Montée min - - - - - Unit - Unité - - - - - Raw (-) - Chiffres bruts (-) - - - - - Alarm 1 - Alarme 1 - - - - - - - - - ---- - ---- - - - - - - - - - Yellow - Jaune - - - - - - - - - Orange - Orange - - - - - - - - - Red - Rouge - - - - - - - < - < - - - - - - - > - > - - - - - - Alarm 2 - Alarme 2 - - - - - - - A2 - A2 - - - - Editing curve %1 - Édition de la courbe %1 - - - - Delete Selected Expos? - Supprimer les expos sélectionnés ? - - - - Clear Expos? - Effacer les expos ? - - - - Really clear all the expos? - Êtes-vous sûr de vraiment vouloir effacer toutes les données d'expos ? - - - - Weight - Weight(+%1%) - Ratio - - - - Clear Expo Settings - Effacer les données d'expos - - - - Clear Mixes - Effacer les mixages - - - - - Expo - Expo - - - - - Curve - Courbe - - - - - - CH%1%2 - VOIE%1%2 - - - - No Trim - Pas de Trim - - - - No DR/Expo - Pas d'expo/DR - - - - FMTrim - Trims des phases de vol - - - - Diff - Diff - - - - CF%1 - FS%1 - - - - Error - Erreur - - - - Unable to find sound file %1! - Impossible de trouver le fichier %1! - - - - Winged Shadow How High - - - - - Winged Shadow How High (not supported) - Winged Shadow How High (non supporté) - - - - - Range - Plage - - - - Simple 4-CH - 4 Canaux simple - - - - T-Cut - Coupure de gaz - - - - Sticky T-Cut - Coupure de gaz avec maintien (nécessite la remise à 0 du manche pour déverrouiller) - - - - V-Tail - Stabilisateur en V - - - - Elevon\Delta - Elevon, aile delta - - - - Heli Setup with gyro gain control - Hélicoptère avec contrôle du gain du gyro - - - - Gyro gain control - Contrôle du gain du gyro pour hélicoptères - - - - Heli Setup (Futaba's channel assignment style) - Hélicoptère (assignation des canaux style Futaba) - - - - Heli Setup with gyro gain control (Futaba's channel assignment style) - Hélicoptère avec contrôle du gain du gyro (assignation des canaux style Futaba) - - - - Gyro gain control (Futaba's channel assignment style) - Contrôle du gain du gyro pour hélicoptères (assignation des canaux style Futaba) - - - - Servo Test - Test de servos (CH15) - - - - MultiCopter - Multicoptère - - - - Use Model Config Wizard - Utiliser l'assistant de configuration de modèle (BETA - POUR COMMENTAIRES!) - - - - Not enough available mixers! - Plus de mixages disponibles ! - - - - Not enough available expos! - Plus d'expos disponibles ! - - - - - Ctrl+A - Ctrl+A - - - - - - - Ctrl+C - Ctrl+C - - - - - - - Ctrl+X - Ctrl+X - - - - - - - Ctrl+V - Ctrl+V - - - - - Ctrl+U - Ctlf+U - - - - Are you sure you want to delete curve %1 ? - Etes-vous sûr de vouloir effacer la courbe %1? - - - - - - - AIL2 - AIL2 - - - - - - - - - FLAPS - VOLETS - - - - - - - - - FLAP%1 - VOLET%1 - - - - - - - PITCH - PAS - - - - - - - - - - - GYRO - GYRO - - - - - - - ELE2 - PROF2 - - - - S1 - - - - - S2 - - - - - LS - - - - - Rud - Dir - - - - Ele - Prf - - - - Thr - Gaz - - - - Ail - Ail - - - - - Flight modes - Phases de vol - - - - - Flight mode - Phase de vol - - - - - DISABLED - DESACTIVE - - - - - - X%1 - - - - - - - - CH %1 - VOIE %1 - - - CFN%1 - FP%1 - - - - - SPOIL - SPOIL - - - - - SPOIL%1 - SPOIL%1 - - - - - RUD2 - DIR2 - - - - Really clear existing mixes on CH6? - Voulez-vous vraiment effacer tous les mixages du canal 6? - - - - Really clear existing mixes on CH5? - Voulez-vous vraiment effacer tous les mixages du canal 5? - - - - Not enough free points in eeprom to store the curve. - Not enought points free in eeprom to store the curve. - Pas assez de points libres dans l'eeprom pour enregistrer la courbe. - ModelsListWidget - + &Edit Éditio&n - + &Restore from backup &Restaurer à partir d'une sauvegarde - + &Model Wizard &Assistant de configuration - + &Delete &Supprimer - + Delete Supprimer - + &Copy &Copier - + Ctrl+C Ctrl+C - + &Cut C&ouper - + Ctrl+X Ctrl+X - + &Paste Co&ller - + Ctrl+V Ctrl+V - + D&uplicate D&upliquer - + Ctrl+U Ctrl+U - + &Use as default &Choisir comme modèle par défaut - + P&rint model Im&primer les données du modèle - + Alt+S Alt+S - + &Simulate model &Simuler le modèle sélectionné - + General Settings Paramètres généraux - + Delete Selected Models? Supprimer les modèles sélectionnés ? - - + + Cannot delete default model. Le modèle actif ne peut être supprimé. - + Cannot cut default model. Le modèle actif ne peut être coupé. - + Do you want to overwrite TX general settings? Voulez vous écraser les paramètres généraux de l'émetteur ? - + You are pasting on an not empty model, are you sure? You are pasting on an not empty model, are you sure ? Vous allez écraser un modèle, êtes vous sûr ? - + No free slot available, cannot duplicate Pas d'emplacement libre, impossible de dupliquer - + Alt+R Alt+R + + Module + + + Form + + + + + Failsafe Mode + Mode Failsafe + + + + Start + 1er canal + + + + PPM delay + Délai PPM + + + + usec + + + + + Negative + Négative + + + + Positive + + + + + RX Number + Numéro de récepteur + + + + Master + Maître + + + + Slave + Elève + + + + Polarity + Polarité + + + + Trainer Mode + Mode écolage + + + + mSec + ms + + + + PPM Frame Length + Longueur de trame PPM + + + + Label + + + + + + ch + + + + + Channels + Voies + + + + Hold + Maintien + + + + Custom + Prédéfini + + + + No Pulses + Pas d'impulsions + + + + Failsafe Positions + + + + + Protocol + Codage + + + + ModulePanel + + + Trainer Output + + + + + Internal Radio System + + + + + External Radio Module + + + QObject @@ -5437,1975 +4123,1815 @@ Si cette option est cochée, la voie des gaz est inversée: le ralenti est &apo PV%1 - + + Input%1 + + + + + Polish + + + + + CH%1 + VOIE%1 + + + No Non - + RotEnc A Enc Rot A - + Rot Enc B Enc Rot B - + Rot Enc C Enc Rot C - + Rot Enc D Enc Rot D - + Rot Enc E Enc Rot E - + Safety %1 Sécurité %1 - + Trainer Ecolage - + Trainer RUD Ecolage Direction - + Trainer ELE Ecolage Profondeur - + Trainer THR Ecolage Gaz - + Trainer AIL Ecolage Ailerons - + Instant Trim Trims instantanés - + Play Sound Jouer Son - + Start Logs Démarrer les Logs - + Play Haptic Vibreur - + + a>x + + + + + a<x + + + + + |a|>x + + + + + |a|<x + + + + + AND + ET + + + + OR + + + + + XOR + + + + + a=b + + + + + a!=b + + + + + a>b + + + + + a<b + + + + + a>=b + + + + + a<=b + + + + + d>=x + + + + + |d|>=x + + + + + a~x + + + + + Timer + + + + + Sticky + + + + + Stay + + + + + Unknown + + + + + STAY(%1, [%2:%3]) + + + + + STICKY(%1, %2) + + + + + TIMER(%1, %2) + + + + Reset Remise à zéro - + + Set Timer %1 + + + + Vario - + Volume Volume - + Play Value Lire valeur - + Backlight Rétroéclairage - + Play Track Jouer fichier - - + + + --- --- - + Rud Trim Trim Dir - + Ele Trim Trim Prf - + Thr Trim Trim Gaz - + Ail Trim Trim Ail - + Rot Enc Enc. rot. - + English Anglais - + French Français - + Italian Italien - + German Allemand - + Czech Tchèque - + Slovak Slovaque - + Spanish Espagnol - + Portuguese Portugais - + Swedish Suédois - - CH - VOIE - - - - + + No repeat Pas de rép. - + %1 sec %1 sec - + Play Both Jouer les 2 - + Background Music Musique de fond - + Background Music Pause Pause musique de fond - - Adjust GV1 - Ajuster VG1 - - - - Adjust GV2 - Ajuster VG2 - - - - Adjust GV3 - Ajuster VG3 - - - - Adjust GV4 - Ajuster VG4 - - - - Adjust GV5 - Ajuster VG5 - - - + Delay %1 sec Délai %1 sec - + Duration %1 sec Durée %1 sec - - - + + + + + + <font color=red><b>Inconsistent parameter</b></font> <font color=red><b>Paramètre inconsistant</b></font> - - + + + All Tous - - + + + Telemetry Télémesure - + + Value Valeur - + + Decr: Décr: - + + Incr: Incr: - + + Played once, not during startup + + + + %1s %1s - + Value Valeur - + Source Source - + GVAR VG - + Increment Incrément - + !Flight mode %1 !Phase de vol %1 - + Flight mode %1 Phase de vol %1 - - Diff - Diff - - - - Expo - Expo - - - - Own trim - Trim indépendant - - - - Flight mode %1 trim - Flight phase %1 trim - Trim de la phase de vol %1 - - - + Own value Valeur indépendante - + Flight mode %1 value Flight phase %1 value Valeur de la phase de vol %1 - + Keys Touches - + Sticks Manches - + Keys + Sticks Touches + manches - + + -GV%1 -VG%1 - - (-GV%1) - (-VG%1) + + Adjust GV%1 + - + + Rotary Encoder + + + + Yellow Jaune - + Orange Orange - + Red Rouge - + Winged Shadow How High Winged Shadow How High - + Winged Shadow How High (not supported) Winged Shadow How High (non supporté) - + FrSky Sensor Hub Sensor Hub FrSky - + + None Aucun - + Imperial Impérial - + Metric Métrique - + Extra Fine Extra fin - + Fine Fin - + Medium Moyen - + Coarse Grossier - + Exponential Exponentiel - + Count Up Croissant - + Count Down Décroissant - + %1:%2, %1:%2, - + : %1 Channels, %2usec Delay : %1 voies, délai de %2us - + + Flight modes(%1) + + + + + Flight mode(%1) + + + + Rudder Direction - + Elevator Profondeur - + Throttle Gaz - + Aileron Ailerons - - + + + GV%1 VG%1 - - - - + + + + ---- ---- - - - RUD - - - - - - ELE - - - - - - - + + THR - - SA - - - - - SB - - - - - SC - - - - - SD - - - - - SE - - - - - SF - - - - - SG - - - - - SH - - - - + Batt - + SWR SWR - + RSSI RSSI - + Pwr+ Puis+ - - ID0 - - - - - ID1 - - - - - ID2 - - - - - - AIL - - - - - - + + + P1 P1 - - - + + + P2 P2 - - - + + + P3 P3 - + + + LS1 + + + + + + LS2 + + + + + + LS3 + + + + + + LS4 + + + + + + LS5 + + + + + + LS6 + + + + + + LS7 + + + + + + LS8 + + + + + + LS9 + + + + + + LSA + + + + + + LSB + + + + + + LSC + + + + + + LSD + + + + + + LSE + + + + + + LSF + + + + + + LSG + + + + + + LSH + + + + + + LSI + + + + + + LSJ + + + + + + LSK + + + + + + LSL + + + + + + LSM + + + + + + LSN + + + + + + LSO + + + + + + LSP + + + + + + LSQ + + + + + + LSR + + + + + + LSS + + + + + + LST + + + + + + LSU + + + + + + LSV + + + + + + LSW + + + + + Input %1 + + + + MAX MAX - - + + S11 + + + + + S12 + + + + + S13 + + + + + S14 + + + + + S15 + + + + + S16 + + + + + S21 + + + + + S22 + + + + + S23 + + + + + S24 + + + + + S25 + + + + + S26 + + + + + RudTrim Left + + + + + RudTrim Right + + + + + EleTrim Down + + + + + EleTrim Up + + + + + ThrTrim Down + + + + + ThrTrim Up + + + + + AilTrim Left + + + + + AilTrim Right + + + + + ABS + + + + + THs + + + + + TH% + + + + + THt + + + + + ??? + + + + + Diff(%1) + + + + + Expo(%1) + + + + + Function(%1) + + + + + Curve(%1) + + + + + !Curve(%1) + + + + + Rud Dir - - + + Ele Prf - - + + Thr Gaz - - + + Ail Ail - + TrmR TrmD - + TrmE TrmP - + TrmT TrmG - + TrmA TrmA - - + + S1 - - + + S2 - - + + LS - - + + RS - + + + REa - + + + REb - + Alt - + Rpm - + Fuel Carb - + Tx - + Rx Rx - + Speed Vitesse - + Dist - + GPS Alt Alt GPS - + Cell Elem - + Cels Velm - + Vfas Vfas - + Curr Cour - + Cnsp Cnsm - + Powr Puis - + AccX - + AccY - + AccZ - + HDG Cap - + VSpd VitV - + A1- - + A2- - + Alt- - + Alt+ - + Rpm+ - + T1+ - + T2+ - + Spd+ Vit+ - + Dst+ - + Cur+ - + ACC - + Time Temps - - - 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 - - - - - CSK - IPK - - - - - CSL - IPL - - - - - CSM - IPM - - - - - CSN - IPN - - - - - CSO - IPO - - - - - CSP - IPQ - - - - - CSQ - IPR - - - - - CSR - IPS - - - - - CSS - IPS - - - - - CST - IPT - - - - - CSU - IPU - - - - - CSV - IPV - - - - - CSW - IPW - - - - ONE - UNE - - - - !ONE - !UNE - - - - TRNs - - - - - TRNl - - - - - REAs - - - - - REAl - - - - - 3POS - - - - + CYC%1 - + PPM%1 - + CH%1%2 VOIE%1%2 - + X%1 - - - GEA - - - - - - TRN - - - - - + + ON - - + + + OFF - - + + Support for frsky telemetry mod Support de la télémétrie FrSky - - + + Support for jeti telemetry mod Support de la télémétrie JETI - - + + Support for receiving ardupilot data Support de la télémétrie ARDUPILOT - - + + Support for receiving NMEA data Support de la télémétrie NMEA - + Support for telemetry easy board Support de la carte TelemetrEZ - - + + Support for MAVLINK devices Support du protocole MAVLINK - + Rotary Encoder use in menus navigation Utiliser un encodeur rotatif pour la navigation - + Possibility to enable FAI MODE at field Possibilité d'activer le mode FAI sur le terrain - + FAI MODE always enabled Mode FAI toujours actif - - openTx for 9X board - openTx pour carte d'origine 9X - - - - - - - + + + + + Enable heli menu and cyclic mix support Activer le menu hélico et les mixages CCPM - - - - - - + + + + + + Enable TEMPLATES menu Inclure les gabarits - - - - + + + + No splash screen Pas d'écran de démarrage - - - - - - + + + + + + Disable curves menus Désactiver le menu des courbes - - - - + + + + Support for radio modified with regular speaker Haut-parleur au lieu du buzzer d'origine - - - - - + + + + + Used if you have modified your radio with voice mode Support du module vocal - - - - + + + + Used if you have modified your radio with haptic mode Support du vibreur - - - - - - + + + + + + In model setup menus automatically set source by moving some of them Sélectionner les sources des mixeurs en bougeant le contrôle désiré - - - - - - + + + + + + Battery graph Graphique de batterie - - - - - - - - + + + + + + + + Use alternative SQT5 font Utiliser la police alternative SQT5 - - - - + + + + Enable the throttle trace in Statistics Activer l'historique du manche des gaz dans les statistiques - + EEprom write progress bar Barre de progression pour l'écriture de l'EEPROM - - + + No Winged Shadow How High support Supprimer le support du variomètre Winged Shadow How High - - + + No vario support Supprimer la fonction variomètre audio - - + + No GPS support Supprimer le support du GPS - - + + No gauges in the custom telemetry screen Supptimer l'affichage des valeurs de télémesure par barres - - openTx for M128 / 9X board - openTx pour carte d'origine 9X avec M128 + + Allow compensating for offset errors in FrSky FAS current sensors + - - openTx for 9XR - openTx pour 9XR + + OpenTX for FrSky Taranis Rev4a + - - openTx for 9XR with M128 chip - openTx pour 9XR avec M128 - - - - openTx for Gruvin9x board / 9X - openTx pour carte Gruvin9x - - - + Support of FrSky PXX protocol Support du protocole PXX FrSky - + Use FrSky Taranis sticks in a 9X/9XR Use FrSky's taranis like sticks Manches de FrSky Taranis installés dans une 9X/9XR - - + + OpenTX for FrSky Taranis + + + + + Disable HELI menu and cyclic mix support Supprimer le menu HELICO et les mixages cycliques - - + + Disable TEMPLATES menu Supprimer le menu des gabarits - - + + Disable Global variables Supprimer le support des variables globales - - openTx for FrSky Taranis Rev4a - openTx pour FrSky Taranis REV4a - - - - - - - + + + + + Support for DSM2 modules Support du protocole DSM2 - - - - - - + + + + + + PPM center adjustment in limits Centres PPM ajustables - - - - - - - - + + + + + + + + PPM values displayed in us Positions de canaux affichées en us - - - - - - + + + + + + Symetrical Limits Limites symétriques - - - - - + + + + + Pots use in menus navigation Support de la navigation dans les menus avec les POTS - + Your radio probably uses a wrong firmware, eeprom size is 4096 but only the first 2048 are used Il semblerait que votre radio utilise le mauvais firmware. La taille de l'EEPROM est de 4096, mais seulement les 2048 premiers sont utilisés. Pensez à charger la version pour m128. - - - - - - + + OpenTX for 9X board + + + + + + + + + No flight modes Pas de phases de vol - - + + SmartieParts 2.2 Backlight support Support du rétroéclairage pour la carte SmartieParts 2.2 - - - - - - + + + + + + In model setup menus automatically set switch by moving some of them Sélection automatique des Switches dans les menus - - - - + + + + Enable resetting values by pressing up and down at the same time Permet la remise à zéro des valeurs en pressant haut-bas en même temps, valeur min avec gauche/bas, valeur max avec haut/droite - - - - - - + + + + + + No graphical check boxes and sliders Pas de cases à cocher et de curseurs graphiques - - - - - - + + + + + + Don't use bold font for highlighting active items Ne pas mettre les lignes actives en gras - - - - + + OpenTX for M128 / 9X board + + + + + + + EEprom write Progress bar Barre de progression affichée lors des écritures EEPROM - - - - - + + + + + Imperial units Unités Impériales - - openTx for Sky9x board / 9X - openTx pour 9x avec carte Sky9x - - - + Bluetooth interface Interface Bluetooth - - openTx for FrSky Taranis - open9x for x9da board - openTx pour FrSky Taranis - - - - - - - - + + + + + + Global variables Variables globales - + + OpenTX for 9XR + + + + + OpenTX for 9XR with M128 chip + + + + + OpenTX for Gruvin9x board / 9X + + + + Support for SD memory card Support de la carte SD - + Support for DSM2 modules using ppm instead of true serial Support pour les modules DSM2 par le signal PPM - + + OpenTX for Sky9x board / 9X + + + + Enable HELI menu and cyclic mix support Activer le menu hélico et les mixages CCPM - + ersky9x - - - + + + + Timer1 Chrono1 - - - + + + + Timer2 Chrono 2 - + A1 A1 - + A2 A2 - + T1 - + T2 - - Curve - Courbe - Courbe - - - - - - - Flight modes settings on expos not exported - Phases settings on expos not exported - Les réglages de phase des expos ne sont pas exportés - - - - - - - - - - - Open9x on this board doesn't have Rotary Encoders - Open9x ne supporte pas d'encodeurs rotatifs sur cette carte - - - - gruvin9x doesn't have trims as source - Les trims ne sont pas disponibles comme source dans gruvin9x - - - - gruvin9x doesn't have swappable trims - Les trims ne peuvent pas être changés dans gruvin9x - - - - gruvin9x on this board doesn't have Rotary Encoders - gruvin9x ne supporte pas d'encodeurs rotatifs sur cette carte - - - - gruvin9x does not support Custom Switch function %1 - gruvin9x ne supporte pas la fonction %1 dans les inters personnalisés - - - - gruvin9x only accepts %1 expos - gruvin9x accepte jusqu'à %1 expos uniquement - - - - - gruvin9x doesn't support custom curves as curve%1, curve as been exported as fixed point - gruvin9x ne supporte pas les courbes personnalisées, la courbe %1 a été exportée avec des points à abscisse fixe. - - - - - gruvin9x doesn't support curve with %1 point as curve%2 - gruvin9x ne supporte pas les courbes à %1 points (courbe%2) - - - - - - Open9x doesn't allow Curve%1 in expos - Open9x d'accepte pas la Courbe%1 dans les DR/Expos - - - - + + Simultaneous usage of expo and curves is no longer supported L'utilisation simultanée de l'expo et d'une courbe n'est plus possible - - - - - - - - Flight modes settings on mixers not exported - La sélection des phases de vol dans les mixeurs ne sera pas exportée. - - - - - Flight mode settings on mixers not exported - Phases settings on mixers not exported - La sélection des phases de vol dans les mixeurs ne sera pas exportée. - - - - - - - This version of open9x does not support Custom Switch function %1 - Cette version d'open9x ne supporte pas la fonction %1 dans les inters personnalisés - - - - - - - - - - - - - - - - - - - - - Open9x doesn't accept this protocol - Open9x n'accepte pas ce protocole - - - - - - - - - open9x only accepts %1 points in all curves - open9x n'accepte que %1 points entre toutes les courbes - - - + Simultaneous usage of expo and curves is no longer supported in open9x L'utilisation simultanée de l'expo et d'une courbe n'est plus possible dans open9x - - - open9x on this board doesn't have Rotary Encoders - Open9x ne supporte pas d'encodeurs rotatifs sur cette carte - - - - - - - - - - - - - - - - open9x only accepts %1 expos - Gruvin9x firmware only accepts %1 expos - open9x accepte jusqu'à %1 expos - - - + th9x - + er9x er9x - - er9x doesn't have Rotary Encoders - er9x ne supporte pas d'encodeurs rotatifs - - - - er9x doesn't have trims as source - Les trims ne sont pas disponibles comme source dans er9x - - - - er9x doesn't have negative gvars as weight - ER9X ne supporte pas les variables globales négatives comme ratio - - - - er9x doesn't have negative gvars as offset - ER9X ne supporte pas les variables globales négatives comme décalage - - - - - - er9x doesn't have swappable trims - Les trims ne peuvent pas être changés dans er9x - - - - - - er9x on this board doesn't have Rotary Encoders - er9x ne supporte pas d'encodeurs rotatifs sur cette carte - - - - er9x does not support Custom Switch function %1 - er9x ne supporte pas la fonction %1 dans les inters personnalisés - - - - - - er9x does not support this range for A1/A2 - er9x ne supporte pas cette plage pour A1/A2 - - - - - - er9x does not support this telemetry units - er9x ne supporte pas ces unités - - - - - Er9x doesn't accept this protocol - Er9x ne supporte pas ce protocole - - - - - Er9x doesn't support custom curves as curve%1, curve as been exported as fixed point - er9x ne supporte pas les courbes personnalisées, la courbe %1 a été exportée avec des points à abscisse fixe. - - - - - Er9x doesn't support curve with %1 point as curve%2 - er9x ne supporte pas les courbes à %1 points (courbe%2) - - - - - - - + + + + Warning Avertissement - - + EEPROM saved with these warnings: EEPROM enregistrée avec ces avertissements : - - - ersky9x doesn't have Rotary Encoders - ersky9x ne supporte pas d'encodeurs rotatifs - - - - - ersky9x doesn't have trims as source - Les trims ne sont pas disponibles comme source dans ersky9x - - - - - ersky9x does not support Custom Switch function %1 - ersky9x ne supporte pas la fonction %1 dans les inters personnalisés - - - - - Ersky9x doesn't accept this protocol - Ersky9x ne supporte pas ce protocole - - - - - - - ErSky9x doesn't support custom curves as curve%1, curve as been exported as fixed point - ErSky9x doesn't support custom curves as curve%1, curve as been imported as fixed point - ersky9x ne supporte pas les courbes personnalisées, la courbe %1 a été exportée avec des points à abscisse fixe. - - - - - - - ErSky9x doesn't support curve with %1 point as curve%2 - ersky9x ne supporte pas les courbes à %1 points (courbe%2) - - - - - + + + Simulator for this firmware is not yet available Le simulateur n'est pas encore disponible pour ce firmware - - th9x does not support Custom Switch function %1 - th9x ne supporte pas la fonction %1 dans les inters personnalisés - - - + th9x on this board doesn't have Rotary Encoders th9x ne supporte pas d'encodeurs rotatifs sur cette carte - - - - th9x doesn't support custom curves as curve%1, curve as been exported as fixed point - th9x ne supporte pas les courbes personnalisées, la courbe %1 a été exportée avec des points à abscisse fixe. - - - - - - th9x doesn't support curve with %1 point as curve%2 - th9x ne supporte pas les courbes à %1 points (courbe%2) - - - - (GV%1) - (VG%1) - - - - - Flight Mode 0 (Default) - Phase de vol 0 (par défaut) - - - - - FM %1 - PV %1 - - - + openTx only accepts %1 points in all curves openTx ne supporte que %1 points répartis entre toutes les courbes - - - + + + + OpenTX on this board doesn't accept this function openTx ne supporte pas cette fonction sur cette carte - - + + OpenTX doesn't accept this protocol openTx ne supporte pas ce protocole - + OpenTX doesn't allow this number of channels openTx ne supporte pas ce nombre de canaux - - Warning! -splash image format stored in preferences has been changed! -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. - -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. @@ -7415,6 +5941,776 @@ We are really appreciative for that! The OpenTX/Companion Team. + + + Trim disabled + + + + + Own Trim + + + + + Use Trim from Flight mode %1 + + + + + Use Trim from Flight mode %1 + Own Trim as an offset + + + + + Setup + + + Form + + + + + Model Name + Nom du modèle + + + + Timer2 + + + + + Timer1 + Chrono1 + + + + Throttle Source + Source de Gaz + + + + Switch startup Warning + Alerte interrupteurs + + + + Center beep + Bip de centrage + + + + Trim Increment + + + + + ON + + + + + OFF + + + + + Check + Vérif. + + + + Model Image + Image du modèle + + + + Exponential + Exponentiel + + + + Extra Fine + Extra fin + + + + Fine + Fin + + + + Medium + Moyen + + + + Coarse + Grossier + + + + Extended Limits + Débattements étendus + + + + Extended Trims + Trims étendus + + + + Throttle Trim + + + + + 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. + + + Inversion des gaz. +Si cette option est cochée, la voie des gaz est inversée: le ralenti est 'manche en haut'. Le trim et l'alerte des gaz sont inversés également. + + + + + + Reverse Throttle + + + + + Telemetry + + + Form + + + + + + + + A1 + A1 + + + + + + + A2 + A2 + + + + RSSI + RSSI + + + + Alarm 1 + Alarme 1 + + + + + ---- + ---- + + + + + Yellow + Jaune + + + + + Orange + Orange + + + + + Red + Rouge + + + + Alarm 2 + Alarme 2 + + + + Serial Protocol + Protocole Série + + + + Volt source + Source de mesure de tension + + + + Metric + Métrique + + + + Imperial + Impérial + + + + Current source + Source de mesure de courant + + + + Protocol + Codage + + + + NONE + Aucune + + + + + FAS + FAS + + + + None + Aucun + + + + FrSky Sensor Hub + Sensor Hub FrSky + + + + CEL + ELEM + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + Units + Unités + + + + Blades + Pales + + + + Altimetry / Vario + Altimètre / Vario + + + + Alti + Alti + + + + Alti+ + Alti+ + + + + Vario + Vario + + + + Sink Max + Chute max + + + + Off + Aucun + + + + Climb Max + Montée max + + + + Sink Min + Chute min + + + + Climb Min + Montée min + + + + Vario source + Source vario + + + + Vario limits + Limites vario + + + + Use GPS as altitude source + Utiliser le GPS comme source d'altitude + + + + Display altitude in toolbar + Affichage de l'altitude dans la barre de notifs + + + + Various + + + + + mAh count + + + + + FAS Offset + + + + + Persistent mAh + + + + + TelemetryAnalog + + + Form + + + + + Unit + Unité + + + + Max Value + Valeur Max + + + + Alarm 1 + Alarme 1 + + + + + ---- + ---- + + + + + Yellow + Jaune + + + + + Orange + Orange + + + + + Red + Rouge + + + + + < + < + + + + + > + > + + + + Alarm 2 + Alarme 2 + + + + Min Value + Valeur Min + + + + Volts (V) + Tension (V) + + + + Amps (A) + Courant (A) + + + + Speed (m/s or ft/s) + Vitesse (m/s ou ft/s) + + + + Raw (-) + Chiffres bruts (-) + + + + Speed (km/h or miles/h) + Vitesse (km/h ou miles/h) + + + + Meters (m or ft) + Distance (m ou ft) + + + + Temp (°) + Temp (°) + + + + Fuel (%) + Carburant (%) + + + + mAmps (mA) + Courant (mA) + + + + Range + Plage + + + + TelemetryCustomScreen + + + Form + + + + + Custom Screen Type + Type d'écran personnalisé + + + + Nums + Valeurs + + + + Bars + Barres + + + + Min + Min + + + + Source + + + + + Gauge + Jauge + + + + Max + Max + + + + TelemetryPanel + + + Telemetry screen %1 + + + + + Winged Shadow How High + Winged Shadow How High + + + + Winged Shadow How High (not supported) + Winged Shadow How High (non supporté) + + + + Timer + + + Form + + + + + mm:ss + + + + + Countdown + + + + + MinuteBeep + Bip chaque minute + + + + Persistent + Persistant + + + + (00:00:00) + + + + + TimerPanel + + + None + Aucun + + + + Beeps + + + + + Countdown + + + + + appPreferencesDialog + + + Application Preferences + + + + + Simulator capture folder + Dossier de sauvegarde des captures d'écran + + + + Remember simulator switch values + + + + + + + Open Folder + Ouvrir le répertoire + + + + User Splash Screens + + + + + Blue + Bleu + + + + Green + Vert + + + + Red + Rouge + + + + Orange + Orange + + + + Yellow + Jaune + + + + Include companion splashes + Inclure les écrans d'accueil de companion9x + + + + Only user defined splashes + Seulement vos écrans d'accueil + + + + Splash Screen Library + + + + + Files to keep + + + + + Simulator BackLight + + + + + Automatic Backup Folder + Dossier de sauvegardes automatiques + + + + Only capture to clipboard + + + + + Joystick + Joystick + + + + Find Executable + + + + + Google Earth Executable + + + + + Calibrate + Calibrer + + + + Enable + Actif + + + + Show splash screen when Companion starts + + + + + Automatic check for OpenTX firmware updates + + + + + Automatic check for Companion updates + + + + + Offer to use wizard for new models + + + + + Enable automatic backup before writing firmware + + + + + Select your snapshot folder + Sélectionner le dossier où stocker les captures d'écran + + + + + No joysticks found + Aucun joystick + + + + Select your library folder + Sélectionner le dossier de bibliothèque + + + + 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 + + avrOutputDialog @@ -7663,35 +6959,35 @@ Consulter la documentation du programmateur utilisé et celle d'AVRDUDE pou Parcourir... - + DFU-UTIL Configuration Configuration de DFU-UTIL - + SAM-BA Configuration Configuration de SAM-BA - - - + + + 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? <b><u>AVERTISSEMENT!</u></b><br>Ceci réinitialisera les fusibles %1 à leur valeur par défaut.<br>Modifier les fusibles peut entraîner le blocage de votre émetteur.<br>Ne l'effectuer que si vous êtes certain qu'ils sont incorrects!<br>Etes-vous sûr de vouloir continuer? - + <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>ATTENTION!</u></b><br>Le type de processeur est normalement choisi automatiquement pour le firmware sélectionné.<br>Si vous le changez, l'EEPROM peut être corrompue lors du transfert. @@ -7735,7 +7031,7 @@ A n'utiliser qu'en connaissance de cause: il n'y a pas de contrô Paramètres complémentaires passés à chaque appel du programme - + AVRDUDE Configuration Configuration d'AVRDUDE @@ -7784,10 +7080,6 @@ m2560 for v4.1 boards sam-ba serial port Port série de SAM-BA - - companion9x - companion9x - burnDialog @@ -7796,10 +7088,6 @@ m2560 for v4.1 boards Customize Splash Personnaliser l'écran d'accueil - - Load Firmware - Charger le firmware - <html><head/><body><p>Modify calibration parameters using settings from current profile</p></body></html> @@ -7832,7 +7120,7 @@ m2560 for v4.1 boards - + Browse for file Parcourir... @@ -7878,7 +7166,7 @@ m2560 for v4.1 boards - + Write to TX Transférer @@ -7887,19 +7175,11 @@ m2560 for v4.1 boards Variant Variante - - Allows companion9x to write to older version of the firmware - Permet à companion9x de programmer des anciennes versions de firmware - Check Firmware compatibility Vérifier la compatibilité du firmware - - Backup and restore existing eeprom - Sauvegarder / Restaurer l'EEPROM - Current Profile @@ -7911,180 +7191,148 @@ m2560 for v4.1 boards Annuler - Burn to TX - Flasher l'émetteur - - - + Write firmware to TX Transférer le firmware vers l'émetteur - Write models to TX - Transférer les modèles vers l'émetteur - - - + Open Ouvrir - - - - - - + + + + + + Warning Avertissement - + %1 is not a known firmware %1 n'est pas un firmware connu - + Burn anyway ! Confirmer le transfert ! - Invalid binary EEPROM File %1, Proceed anyway ? - Fichier binaire EEPROM %1 invalide. Continuer quand même? - - - + Open Image to load Ouvrir l'image à charger - + Images (%1) Images (%1) - - - - - - - - - - + + + + + + + + + + Error Erreur - Load eEprom - Charger l'EEPROM - - - Write %1 to TX - Ecrire %1 dans la radio - - - + Current profile Profil courant - Choose file to write to EEPROM memory - Choisir le fichier EEPROM à transmettre à l'émetteur - - - + Write Models and Settings to TX Transférer les modèles et réglages à la radio - + Write Models and Settings in %1 to TX Transférer les modèles et réglages %1 à la radio - + Choose file to load Models and Settings from Chemin des fichers deréglages et modèles par défaut - + Unable to find file %1! Fichier %1 introuvable! - - - + + + Error opening file %1: %2. Erreur à l'ouverture du fichier %1: %2. - - - + + + Invalid binary Models and Settings File %1, Proceed anyway ? Fichier binaire de réglages et modèles %1 invalide, continuer quand même? - + Error reading file %1: %2. Fichier %1 corrompu: %2. - - + + Cannot load %1. Impossible de charger %1. - + Cannot save customized firmware Impossible d'enregistrer le firmware personnalisé - + Custom image not found Image personnalisée non trouvée - + No firmware selected Aucun firmware sélectionné - + Wrong radio calibration data in profile, Settings not patched Données de calibration incorrectes dans le profil, les réglages ne seront pas transférés - + Wrong radio setting data in profile, Settings not patched Données de configuration incorrectes dans le profil, les réglages ne seront pas transférés - Wrong radio calibration data in profile, eeprom not patched - Données d'étalonnage invalides, l'EEPROM n'a pas été patchée! - - - Wrong radio setting data in profile, eeprom not patched - Paramètres hardware invalides, l'EEPROM n'a pas été patchée! - - - - + + Cannot write file %1: %2. Ecriture fichier %1 impossible: %2. - + Error writing file %1: %2. Erreur d'écriture fichier %1: @@ -8124,521 +7372,485 @@ m2560 for v4.1 boards Imprimer vers un fichier - + General Model Settings Paramètres généraux - - - + + + Name Nom - - + + EEprom Size Taille d'EEPROM - - + + Timer1 Chrono1 - - + + Timer2 Chrono2 - - + + Protocol Codage - - + + Pulse Polarity Modulation - - + + Throttle Trim Trim des gaz - - - - + + + + Enabled Actif - - - - + + + + Disabled Inactif - - + + Throttle Expo Expo des gaz - - + + Trim Increment Incrément trims - - + + Center Beep Bip de Centrage - + Flight modes Settings Flight Phases Settings Paramètres de phases de vol - - + + Fades Fondus - - + + Trims Trims - - - - - - - - - - + + + + + + + + Switch Interrupteur - - + + IN Entrée - - + + OUT Sortie - - - - - - - - - - + + + + + + + + + + FM FP PV - - + + Gvars Variables globales - - + + Rot. Enc. Enc. Rot. - + Limits Débattements - - - - - - - + + + + + + + Offset Décalage - - - - - + + + + + Min Min - - - - - + + + + + Max Max - - - + + + Invert Inversion - - - - - - + + + + + CH VOIE - - + + INV Inversion - - + + NOR Normal - + Global Variables Variables globales - - + + GV VG - + Expo/Dr Settings Expos / Valeurs de dual rates - - + + Weight Ratio - - - Expo - Expo - - - - - - - - + + Curve Courbe - + Mixers Mixages - - + + noTrim Pas de trim - - - FMTrim - Trims des phases de vol - - - - - Diff - Diff - - - - + + Delay(u%1:d%2) Délai(u%1:d%2) - - + + Slow(u%1:d%2) Ralentissement(u%1:d%2) - - + + Warn Avertissement - - + + No name Sans titre - - - - + + + + DISABLED DESACTIVE - + Curves Courbes - + 5 Points Curves Courbes à 5 points - - - - + + + + pt %1 point %1 - + 9 Points Curves Courbes à 9 points - - Custom Switches - Inters personnalisés - - - - - CS - SW - - - - + + Function Fonction - - + + Param Paramètre - - + + Enable Actif - + CF FS - + Telemetry Settings Paramètres de télémesure - - + + Analog Analogue - - + + Unit Unité - - + + Scale Echelle - - - - + + + + A%1 A%1 - - + + Alarm 1 Alarme 1 - - + + Alarm 2 Alarme 2 - - - - + + + + Type Type - - - - + + + + Condition Condition - - - - - - + + + + Value Valeur - - - - + + + + Flight mode name Nom del la phase de vol - - - + + + Flight modes Phases de vol - - - + + + Flight mode Phase de vol - - Custom Functions - Fonctions spéciales - - - - + + Repeat Répétition - CFn - FSn - - - - Safety Switches - Inters de sécurité - - - - + + RSSI Alarm Alarme RSSI - - + + Telemetry Bars Jauges de Télémétrie - - + + Bar Number Barre - - + + Source - - + + Custom Telemetry View Vue Télémesure personnalisée - + + Logical Switches + + + + + + LS + + + + + Switch Assignment + + + + Print Document Imprimer le Document - + Select PDF output file Choisir le fichier PDF de sortie @@ -8651,50 +7863,37 @@ m2560 for v4.1 boards Dialogue - + People who have contributed to this project Personnes qui ont contribué au projet - + Coders Développeurs - - 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. + + Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe) - + 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. -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 - - - + OpenTX Release Notes Notes de version d'openTx @@ -8702,132 +7901,100 @@ Egalement à Erez Raviv (er9x) et son fantastique programme eePe d'où est customizeSplashDialog - - Customize Splash - Personnaliser l'écran d'accueil + + Transmitter Splash Screen Editor + - - Save Image - Enregistrer l'image + + + Invert + Inversion - - Invert Color - Inverser les couleurs + + + Load FW + - - Load Firmware - Charger le firmware + + + Load Pict + - - Load Image - Charger une image + + + Load Profile + - + + + Save + + + + + Open Splash Library Ouvrir la bibliothèque de Splashes - + + + + ... - - Save Firmware - Save To Hex - Sauvegarder le firmware - - - - <!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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<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> - - - - - - - Select an original firmware file - Choisissez un fichier de firmware - - - + Open Ouvrir - - Select an image to customize your splash <br />or save actual firmware splash - Choisir une image pour personnaliser votre Splash <br/> ou enregistrer le Splash de votre firmware courant - - - - - - + + + + + + Error Erreur - + Could not find bitmap to replace in file Impossible de trouver l'image à remplacer dans le fichier - + Open Image to load Ouvrir l'image à charger - + Images (%1) Images (%1) - - + + Cannot load %1. Impossible de charger %1. - - - Save your custimized firmware - Enregistrer votre firmware personnalisé + + + Could not store image in firmware file %1 + - - - Write to file - Ecrire vers le fichier - - - - Error reading file %1 - Fichier %1 corrompu! {1?} - - - - Firmware correctly saved. - Firmware enregistré. - - - - Firmware not saved. - Firmware non enregistré. - - - - PNG images (*.png);; - Images PNG (*.png);; + + The image file %1 could not be stored + @@ -8847,10 +8014,6 @@ p, li { white-space: pre-wrap; } Companion - - companion9x - companion9x - Download failed: %1. @@ -8973,6 +8136,400 @@ p, li { white-space: pre-wrap; } Lire Fusibles + + fwPreferencesDialog + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox + + + + + Set language of voice. +May be different from firmware language + Langue des voix. +Peut être différente de la langue du firmware + + + + SD Structure path + Chemin de la structure de la carte SD + + + + Processor ID + ID du processeur + + + + Default Stick Mode + Mode par défaut + + + + Channel Order + + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + Choix du mode: + +Mode 1: +Manche Gauche: Profondeur, Direction +Manche Droit: Gaz, Ailerons + +Mode 2: +Manche Gauche: Gaz, Direction +Manche Droit: Profondeur, Ailerons + +Mode 3: +Manche Gauche: Profondeur, Ailerons +Manche Droit: Gaz, Direction + +Mode 4: +Manche Gauche: Gaz, Ailerons +Manche Droit: Profondeur, Direction + + + + + + Mode 1 (RUD ELE THR AIL) + Mode 1 (DIR PROF GAZ AIL) + + + + Mode 2 (RUD THR ELE AIL) + Mode 2 (DIR GAZ PROF AIL) + + + + Mode 3 (AIL ELE THR RUD) + Mode 3 (AIL PROF GAZ DIR) + + + + Mode 4 (AIL THR ELE RUD) + Mode 4 (AIL GAZ PROF DIR) + + + + Options + + + + + Channel order + +This is used by the templated to determine which channel goes to what number output. + + + + + Open Folder + Ouvrir le répertoire + + + + Offer to write FW to Tx after download + + + + + Save Profile + Sauvegarder profil + + + + Menu Language + + + + + Voice Language + Langue audio + + + + Firmware Type + + + + + Append version number to FW file name + + + + + Download Voice + + + + + Downloads and Profiles + + + + + FwInfo + + + + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + + Profile + + + + + Open Image + Charger une image + + + + Splash Screen + + + + + Clear Image + + + + + Download FW + + + + + Check for updates + Vérifier les mises à jour + + + + Last downloaded release: %1 + Dernière version téléchargée : %1 + + + + The selected firmware has never been downloaded by Companion. + + + + + The selected firmware cannot be downloaded by Companion. + + + + + 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? + + + + Open Image to load + + + + + Images (%1) + Images (%1) + + + + Error + Erreur + + + + Cannot load %1. + Impossible de charger %1. + + joystickDialog @@ -9201,10 +8758,6 @@ Press cancel to abort joystick calibration logsDialog - - Companion9x log viewer - Visualiseur de log - Companion Log Viewer @@ -9263,17 +8816,17 @@ Press cancel to abort joystick calibration %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 @@ -9281,7 +8834,7 @@ Press cancel to abort joystick calibration mdiChild - + Simulate Tx Simulation de l'émetteur @@ -9728,17 +9281,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: @@ -9779,144 +9332,278 @@ Manche Droit: Profondeur, Direction - + Mode 3 (AIL ELE THR RUD) Mode 3 (AIL PROF GAZ DIR) - + Firmware - - + + + + ... - + + Enable Actif - + + Remember simulator switches + + + + + 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 - + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox - + 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. @@ -9924,289 +9611,281 @@ 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 - + + Show Splash At Start + + + + 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 + Preferences 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 - - - + Recent History Size 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. - - - The selected firmware cannot be downloaded by 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 - Select your eeprom backup folder - Sélectionner le dossier de sauvegarde d'EEPROM - - - - + + Cannot load %1. Impossible de charger %1. @@ -10214,10 +9893,10 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de printDialog - - - - + + + + Name Nom @@ -10232,15 +9911,13 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de Imprimer - - - + pt %1 point %1 + - Disabled Inactif @@ -10250,34 +9927,34 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de Configuration pour: - + Trim Increment Incrémentation Trim - + Flight mode name Nom del la phase de vol - - + + Flight modes Phases de vol - - + + Flight mode Phase de vol - + Slow(u%1:d%2) Ralentissement(u%1:d%2) - + Delay(u%1:d%2) Délai(u%1:d%2) @@ -10287,97 +9964,105 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de Dialogue - - - - - + + + + + Offset Décalage - - - CS - SW - - - + Global Variables Variables globales - + GV VG - + Scale Echelle - + Source Source - + Throttle Trim Trim des Gaz - + Throttle Expo Expo des Gaz - + Protocol Codage - + Pulse Polarity Modulation - + Center Beep Bip de Centrage + - - + Enabled Actif - + + Logical Switches + + + + + + LS + + + + + Switch Assignments + + + + Function Fonction - + Print Document Imprimer le Document - - - - - + + + + Switch Interrupteur - - - - - + + + + Value Valeur @@ -10387,326 +10072,269 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de Imprimer vers un fichier - + printed on: %1 Imprimé le : %1 - + General Model Settings Paramètres généraux - + EEprom Size Taille d'EEPROM - + Timer1 Chrono1 - + Timer2 Chrono2 - + Flight modes Settings Flight Phases Settings Paramètres de phases de vol - + Fades Fondus - + Trims Trims - + Gvars Variables globales - + Rot.Enc. Enc. Rot. - + IN Entrée - + OUT Sortie - - - - + + + + FM FP PV - + Expo/Dr Settings Expos / Valeurs de dual rates - + Weight Ratio - - - - - Expo - Expo - - - - + + - - - - Curve Courbe - + Mixers Mixages - - - - - + + + + CH VOIE - + noTrim Pas de trim - - FMTrim - Trims des phases de vol - - - - Diff - Diff - - - + Warn Avertissement - - + + DISABLED DESACTIVE - + Limits Débattements - - - - + + + + Min Min - - - - + + + + Max Max - - - + + + Invert Inversion - - - + + + INV Inversion - - - + + + NOR Normal - + Curves Courbes - - 5 Points Curves - Courbes à 5 points - - - - 9 Points Curves - Courbes à 9 points - - - - Custom Switches - Inters personnalisés - - - - CF - FS - - - + ODF files (*.odt);;PDF Files(*.pdf);;HTML-Files (*.htm *.html);;All Files (*) Fichiers ODF (*.odt);; Fichiers PDF (*.pdf);;Fichiers HTML (*.htm *.html);;Tous les fichiers (*) - - Safety Switches - Inters de sécurité - - - - Function Switches - Fonctions personnalisées - - - + Parameter Paramètre - + Repeat Répétition - FSW - FP - - - + Telemetry Settings Paramètres de télémesure - - + + Alarm 1 Alarme 1 - - + + Alarm 2 Alarme 2 - + Analog Analogue - + Unit Unité - - - - + + + + Type Type - - - - + + + + Condition Condition - + A%1 A%1 - + RSSI Alarm Alarme RSSI - + Frsky serial protocol Protocole Série FrSky - + System of units Unités - + Propeller blades Pales de l'hélice - + Telemetry Bars Jauges de Télémesure - + Bar Number Barre no - - + + Custom Telemetry View Vue Télémesure personnalisée - + Select PDF output file Choisir le fichier PDF de sortie @@ -10714,17 +10342,17 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de simulatorDialog - + P1 - + P2 - + P3 @@ -10734,59 +10362,47 @@ 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 @@ -10806,12 +10422,12 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de - + ID1 - + ID2 @@ -10829,7 +10445,7 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de - + Right Double Click to Reset Double cliquer pour remettre à 0 @@ -10839,14 +10455,14 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de - - - + + + 0 % - + BEEP BIP @@ -10856,231 +10472,241 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de - - 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 - + Fix X Verrou X - + Fix Y Verrou Y - - - - - - - - - - - - - - - - + + LS1 + + + + + LS2 + + + + + LS3 + + + + + LS4 + + + + + LS5 + + + + + LS6 + + + + + LS7 + + + + + LS8 + + + + + LS9 + + + + + LSA + + + + + LSB + + + + + LSC + + + + + LSD + + + + + LSE + + + + + LSF + + + + + LSG + + + + + LSH + + + + + LSI + + + + + LSJ + + + + + LSK + + + + + LSL + + + + + LSM + + + + + LSN + + + + + LSO + + + + + LSP + + + + + LSQ + + + + + LSR + + + + + LSS + + + + + LST + + + + + LSU + + + + + LSV + + + + + LSW + + + + + + + + + + + + + + + + + + + -100.1 - + Hold X Retenir X - + Hold Y Retenir Y @@ -11092,17 +10718,13 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de - - + + TextLabel - Companion9x Simulator - Simulateur companion9x - - - + 9x Simulator Simulateur 9x @@ -11147,43 +10769,39 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de splashLibrary - + ... - + Splash Library - page %1 of %2 Bibliothèque de splash - page %1 sur %2 - + Warning Avertissement - + Invalid image in library %1 Image invalide dans la bibliothèque %1 - + Information - + No valid image found in library, check your settings Aucune image valide trouvée dans la bibliothèque, vérifiez vos paramètres xsimulatorDialog - - Companion9x Simulator - Simulateur companion9x - @@ -11302,12 +10920,6 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de Outputs Sorties - - - CSK - SWK - IPK - CH1 @@ -11330,10 +10942,10 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de - - - - + + + + @@ -11374,12 +10986,12 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de VOIE4 - + CH12 VOIE12 - + CH5 VOIE5 @@ -11418,161 +11030,165 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de CH16 VOIE16 + + + LSK + + - CSC - IPC + LSC + - CSD - IPD + LSD + - CS7 - IP7 + LS7 + - CSL - IPL + LSL + - CSB - IPB + LSB + - CS1 - IP1 + LS1 + - CSH - IPH + LSH + - CSG - IPG + LSG + - CSE - IPE + LSE + - CSF - IPF + LSF + - CS8 - IP8 + LS8 + - CS9 - IP9 + LS9 + - CSA - IPA + LSA + - CSM - IPM + LSM + - CSJ - IPJ + LSJ + - CSI - IPI + LSI + - CS4 - IP4 + LS4 + - CS5 - IP5 + LS5 + - CS2 - IP2 + LS2 + - CS3 - IP3 + LS3 + - CS6 - IP6 + LS6 + - CSN - IPN + LSN + - CSO - IPO + LSO + - CSP - IPQ + LSP + - CSQ - IPR + LSQ + - CSR - IPS + LSR + - CSS - IPS + LSS + - CST - IPT + LST + - CSU - IPU + LSU + - CSV - IPV + LSV + - CSW - SWW - IPW + LSW + @@ -11591,23 +11207,23 @@ Indique l'affectation voie / numéro de canal par défaut utilisée lors de Impossible d'accéder au joystick. Joystick désactivé - + Firmware %1 error: %2 Firmware %1 erreur : %2 - + - Flight mode: %1(%2) - Phase: %1(%2) - Phase : %1(%2) - + Simulating Tx (%1) Simulation de l'émetteur (%1) - + Simulating Simulation diff --git a/companion/src/translations/companion_he.ts b/companion/src/translations/companion_he.ts index ddfaa4e3d..9bccc4af5 100644 --- a/companion/src/translations/companion_he.ts +++ b/companion/src/translations/companion_he.ts @@ -2,134 +2,583 @@ - ExpoDialog + Channels - - Expo - - - - - Weight - - - - + Name - - - - GV + + Offset - - - Phase used by the expo. + + Min - - Flight modes + + Max - - 0 + + Invert - - 1 + + Center - - 2 + + Sym - - 3 + + Channel %1 - - 4 + + --- - - 5 + + INV + + + + + CurveGroup + + + Diff - - 6 + + Expo - - 7 + + Func - - 8 + + Curve + + + + + Curves + + + Form - + + Standard + + + + + Custom + + + + + Lines + + + + + Smooth + + + + + Curve type + + + + + Curve name + + + + + Curve %1 + + + + + %1 points + + + + + Are you sure you want to reset curve %1 ? + + + + + Editing curve %1 + + + + + Not enough free points in EEPROM to store the curve. + + + + + CustomFunctionsPanel + + Switch - - Switch used by the expo. -If blank then the expo is considered to be "ON" all the time. + + Action - - Curve/Exponential + + Parameters - + + Enable + + + + + CF%1 + + + + + ON + + + + + Error + + + + + Unable to find sound file %1! + + + + + &Delete + + + + + Delete + + + + + &Copy + + + + + Ctrl+C + + + + + &Cut + + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + + + Dialog + + + Dialog + + + + + Curve type + + + + + Coefficient + + + + + Both + + + + + x>0 + + + + + x<0 + + + + + Y at X=0 + + + + + Side + + + + + Y at X=-100 + + + + + Y at X=100 + + + + + Linear + + + + + Single Expo + + + + + Symmetrical f(x)=-f(-x) + + + + + Symmetrical f(x)=f(-x) + + + + + ExpoDialog + + + Weight + + + + + + GV + + + + + The source for the mixer + + + + + Input name + + + + + Phase used by the input. + + + + + Flight modes + + + + + 0 + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + Switch + + + + + Switch used by the input. +If blank then the input is considered to be "ON" all the time. + + + + + The curve used by the input + + + + + Source + + + + + Line name + + + + Stick Side - + + <!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> + + + + + Scale + + + + + Include Trim + + + + + No + + + + + Yes + + + + Curve - - The curve used by the expo - - - - + NEG - + POS - + ALL - - DEST -> %1 + + Edit %1 + + + + + Rud + + + + + Ele + + + + + Thr + + + + + Ail + + + + + FlightMode + + + Form + + + + + Fade In + + + + + Fade Out + + + + + Name + + + + + Switch + + + + + trim1 + + + + + trim2 + + + + + trim4 + + + + + trim3 + + + + + Rud + + + + + Ele + + + + + Thr + + + + + Ail + + + + + Rotary Encoder %1 + + + + + GVAR%1 + + + + + FlightModes + + + Flight Mode %1 + + + + + (%1) + + + + + (default) @@ -152,13 +601,13 @@ These will be relevant for all models in the same EEPROM. - + Contrast - - + + <!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; } @@ -168,12 +617,12 @@ p, li { white-space: pre-wrap; } - + Battery Warning - + Battery warning voltage. This is the threashhold where the battery warning sounds. @@ -181,260 +630,236 @@ Acceptable values are 5v..10v - + Battery Calibration - + Battery calibration: This value will be added to the measured battery voltage. Use this value to calibrate the meter with an external meter. - + This is the switch selectrion for turning on the backlight (if installed). - + If this value is not 0, any keypress will turn on the backlight and turn it off after the specified number of seconds. - - + + sec - + Inactivity Timer - + If not zero will sound beeps if the transmitter has been left without inputs for the specified number of minutes. - + min - - 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. - - - - - - + Owner Name - + - - - + + Off - - Switches Up - - - - - Switches Down - - - - + Trainer - - + + PPM 1 + - - - + + chn1 + - - - + + chn2 + - - - + + chn3 + - - - + + chn4 - + Mode - + Telemetry NO DATA Alarm - + Show Owner Name on Splash - + Sound Mode - + Beeper - + Speaker Pitch (spkr only) - + Only Alarms - - + + All - + Pot Scrolling Enable - + Bandgap Measuring Enable - + THR - + RUD - + ELE - + AIL - + GEA - + ID0 - + ID1 - + ID2 - + Beeper Length - - + + X-Short - - + + Short - - + + X-Long - + Haptic Mode - + Alarms Only - + Haptic Length - + GPS Coordinates @@ -449,102 +874,102 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi - + Speaker - + BeeperVoice - + SpeakerVoice - + hh° (N/S) mm' ss''.dd - + NMEA - + Timeshift from UTC - + LCD Display Type - + Standard - + Optrex - + Speaker Volume - + Haptic Strength - + BackLight Brightness - + RotEnc Navigation - + BackLight Auto OFF after - + BackLight Switch - + BackLight On Stick Move - + Country Code - + America - + Japan - + Europe @@ -559,333 +984,475 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi - + Measurement Units - + Beep volume - + Wav volume - + Vario volume - + Background volume - + PPMSim - + 4800 Baud - + 9600 Baud - + 14400 Baud - + 19200 Baud - + 38400 Baud - + 57600 Baud - + 76800 Baud - + 115200 Baud - + FrSky Internal Alarm - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. - + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + StickScroll - + FAI Mode - + Metric - + Imperial - + BackLight Invert - + CrossTrim - + Readonly Unlock - + SC - + SE - + SA - + SF - + SH - + SD - + SB - + SG - + Input - + Weight - + Switch + - - - + + += (Sum) + - - - + + := (Replace) - - + + PPM 2 - - + + PPM 3 - - + + PPM 4 - + Telemetry - + RSSI Alarm 1 - - + + ---- - - + + Yellow - - + + Orange - - + + Red - + RSSI Alarm 2 - + NO DATA Alarm - + POT 4 - - + + Negative span - - + + Mid value - - + + Positive span - + STICK 1 - + STICK 2 - + Current - + + + Pot (normal) + + + + + + Multipos Switch + + + + + S1 Type + + + + + S2 Type + + + + STICK 3 - + STICK 4 - + POT 1 - + POT 2 - + POT 3 - + Battery - + PPM Multiplier - + Timer Beeps - + <!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; } @@ -894,22 +1461,22 @@ p, li { white-space: pre-wrap; } - + Every Minute - + Beeps at 30, 15, 10, and down from5 seconds - + Count Down to Zero - + <!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; } @@ -918,71 +1485,65 @@ p, li { white-space: pre-wrap; } - + Flash on beep - + Alarm Warning - - + + Quiet - - + + No Keys - - + + Normal - - + + Long - + Input Filter - + Single - + Oversample - + Filter - - Throttle Startup Warning - - - - - - - - - + + + + + <!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; } @@ -997,30 +1558,27 @@ p, li { white-space: pre-wrap; } - - Switch Startup Warning - - - - + Memory Startup Warning - + Beeper Mode - + + + - - - - - - + + + + + + Beeper volume 0 - Quiet. No beeps at all. @@ -1031,24 +1589,24 @@ p, li { white-space: pre-wrap; } - + Channel Order (For Templates) - + Channel order This is used by the templated to determine which channel goes to what number output. - + Stick Mode - + Mode selection: Mode 1: @@ -1071,974 +1629,1431 @@ 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) - + Show Splash Screen on Startup - - + + Show splash screen on startup - + Calibration - + v - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. Are you sure ? - - + + Warning - + Wrong data in profile, radio calibration was not retrieved - + Wrong data in profile, hw related parameters were not retrieved - + Do you want to store calibration in %1 profile<br>overwriting existing calibration? - + Calibration and HW parameters saved. + + Heli + + + Form + + + + + Invert Elevator + + + + + Invert Aileron + + + + + Invert Collective + + + + + Invert + + + + + Off + + + + + 120 + + + + + 120X + + + + + 140 + + + + + 90 + + + + + Collective + + + + + Swash Type + + + + + Swash Ring + + + + + InputsPanel + + + + Move Up + + + + + + Ctrl+Up + + + + + + Move Down + + + + + + Ctrl+Down + + + + + Clear All Settings + + + + + Source(%1) + + + + + No Trim + + + + + Weight(%1) + + + + + Switch(%1) + + + + + Not enough available inputs! + + + + + Delete Selected Inputs? + + + + + &Add + + + + + Ctrl+A + + + + + &Edit + + + + + Enter + + + + + &Delete + + + + + Delete + + + + + &Copy + + + + + Ctrl+C + + + + + &Cut + + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + + + Du&plicate + + + + + Ctrl+U + + + + + Clear Inputs? + + + + + Really clear all the inputs? + + + + + LogicalSwitchesPanel + + + Condition + + + + + V1 + + + + + V2 + + + + + AND + + + + + Duration + + + + + Delay + + + + + + LS%1 + + + + + &Delete + + + + + Delete + + + + + &Copy + + + + + Ctrl+C + + + + + &Cut + + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + MainWindow - - - - + + + + File loaded - - - - - + + + + + Save As - - + + No updates available at this time. - - - - - + + + + + Unable to check for updates. - + Checking for updates - + Executable (*.exe) - + Would you like to launch the installer? - + 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 ? - + Open - - + + File saved - + + OpenTX Home Page: <a href='%1'>%1</a> + + + + + The OpenTX Companion project was originally forked from <a href='%2'>eePe</a> + + + + + If you've found this program useful, please support by <a href='%1'>donating</a> + + + + + Version %1, %3 + + + + 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 - - - - + Display previous warning again at startup ? - + New release available - - - - - - - - - - - - - + + + + + + + + + + + + + Error - - - - - + + + + + Error opening file %1: %2. - + Compilation server termporary failure, try later - + Display previous message again at startup ? - + + A new release of Companion is available please check the OpenTX website! + + + + Firmware does not longer fit in the Tx, due to selected firmware options - + Compilation server temporary failure, try later - - + + Compilation server too busy, try later - - + + Unknown server failure, try later - + Firmware does not fit in the Tx, due to selected firmware options - - + + 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 - - - - + &loadBackup... - + Load backup from file - + Lo&gs - + Ctrl+G - + Open log file - - - Contributors &List... - - - - - 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... + &Old Preferences Dialog... - Configure software for reading from and writing to the transmitter + Used the old Preferences Dialog + + + + + &Application Preferences... - &List programmers + Edit application preferences - - List available programmers - - - - - &Fuses... - - - - - Show fuses dialog - - - - - &Simulate - - - - - Alt+S - - - - - Simulate selected model. - - - - - &Print + + Contributors &List... - Ctrl+P + ChangeLog... - - Print current model. + + Firmware ChangeLog... - Cl&ose + Show firmware changelog - - Close the active window + + Compare... - - Close &All + + Compare models - - Close all the windows + + Customize the splash screen of your TX - - &Tile - - - - - Tile the windows + + E&xit - &Cascade + Exit the application - - Cascade the windows + + Cu&t - - Ne&xt + + Cut the current selection's contents to the clipboard - - Move the focus to the next window + + &Copy - - Pre&vious + + Copy the current selection's contents to the clipboard - - Move the focus to the previous window + + &Paste - + + Paste the clipboard's contents into the current selection + + + + + Ctrl+Alt+W + + + + + Ctrl+Alt+R + + + + + 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. + + + + &About - + Show the application's About box - - + + Recent Files - + + Set Menu Language + + + + &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 - - - - + + The selected language will be used the next time you start Companion. + + + + + + + OK + + + + + The new theme will be loaded the next time you start Companion. + + + + + The icon size will be used the next time you start Companion. + + + + + + + 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 - + + &Downloads and Profiles... + + + + + Firmware and voice file downloads as well as profile definition. + + + + Check for new version of Companion - + Show Companion contributors list - + Show Companion changelog - + + Configure transmitter start screen... + + + + &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 + + &Configure connection software... - - &Edit + + Classic - - - Invalid Models and Settings File %1 + + The multicolor classical Companion icon theme - - Invalid binary Models and Settings File %1 + + A monochrome black icon theme - - &Window + + A monochrome white icon theme - - &Help + + A monochrome blue icon theme + + + + + Small + + + + + Use small toolbar icons + + + + + Use normal size toolbar icons + + + + + Normal + + + + + Use big toolbar icons + + + + + Big + + + + + Use huge toolbar icons + + + + + Huge + + + + + System default language + + + + + Use system default language in menus + + + + + Czech + + + + + Use Czech in menus + + + + + German + Use German in menus + + + + + English + + + + + Use English in menus + + + + + French + + + + + Use French in menus + + + + + Italian + + + + + Use Italian in menus + + + + + Hebrew + + + + + Use Hebrew in menus + + + + + Polish + + + + + Use Polish in menus + + + + + Portuguese + + + + + Use Portuguese in menus + + + + + Swedish + + + + + Use Swedish in menus + + + + + Russian + + + + + Use Russian in menus + + + + + Manuals and other Documents + + + + + Open the OpenTX document page in a web browser + + + + + + Firmware Profiles + + + + + Set Icon Theme + + + + + Set Icon Size + + + + + &Edit + + + + + &Settings + + + + + + Invalid Models and Settings File %1 + + + + + Invalid binary Models and Settings File %1 + + + + + &Help + + + + File - + Edit - + Help - + Ready @@ -2046,42 +3061,42 @@ Write anyway ? MdiChild - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + Error - + Editing model %1: - - + + Unable to find file %1! - - + + Error reading file %1: %2. @@ -2092,141 +3107,141 @@ Write anyway ? - - - - + + + + Error opening file %1: %2. - - + + Invalid EEPROM File %1 - + Invalid binary EEPROM File %1 - - - - + + + + Save As - - - - + + + + Cannot write file %1: %2. - + Do you want to use model wizard? - - - + + + Companion - + Ask this question again ? - + %1 has been modified. Do you want to save your changes? - + Backup is impossible - + The backup dir set in preferences does not exist - - - + + + Taranis radio not found - - - + + + Impossible to identify the radio on your system, please verify the eeprom disk is connected. - - - + + + Backup EEPROM From Tx - + Cannot check eeprom compatibility! Continue anyway? - - + + Warning - + Firmware in radio is of a different family of eeprom written, check file and preferences! - + Firmware in flash is outdated, please upgrade! - + Write EEPROM To Tx - + Open - + Invalid binary backup File %1 - - + + Error writing file %1: %2. - + Cannot write temporary file! @@ -2234,134 +3249,121 @@ Do you want to save your changes? MixerDialog - + Dialog - + Source - - - - + + + + The source for the mixer - + Weight - - Fix Offset - - - - - - + + + GV - + Switch used by the mix. If blank then the mix is considered to be "ON" all the time. The value of the mixer is multiplied by this value and divided by 100. - - - - + Offset - + Include Trim - + Curve - + The curve used by the mix - + Switch - + Yes - + No - + Warning - + Name - - Curve/Differential - - - - + Mixer warning. Setting this value will cause a beep to be emmitted when this value is active. - + OFF - + 1 Beep - + 2 Beep 2 Beeo - + 3 Beep - + Multiplex - + Multiplexer This determines how mixer values are added. @@ -2372,100 +3374,95 @@ This determines how mixer values are added. - + ADD - + MULTIPLY - + REPLACE - + Flight modes - + Include DR/Expo - + 0 - + 1 - + 2 - + 3 - + 4 - + 5 - + 6 - + 7 - + 8 - - Enable FM Trim - - - - + Delay - + Slow - + Up - - - - + + + + <!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; } @@ -2480,2630 +3477,552 @@ p, li { white-space: pre-wrap; } - + Down - + DEST -> X%1 - + DEST -> CH%1%2 - - - FM Trim Value - - - - + Rud - + Ele - + Thr - + Ail + + MixesPanel + + + + Move Up + + + + + + Ctrl+Up + + + + + + Move Down + + + + + + Ctrl+Down + + + + + Clear Mixes + + + + + + + X%1 + + + + + + + CH%1%2 + + + + + Weight(%1) + + + + + Switch(%1) + + + + + No Trim + + + + + No DR/Expo + + + + + Offset(%1) + + + + + Delay(u%1:d%2) + + + + + Slow(u%1:d%2) + + + + + Warn(%1) + + + + + Not enough available mixers! + + + + + Delete Selected Mixes? + + + + + &Add + + + + + Ctrl+A + + + + + &Edit + + + + + Enter + + + + + &Delete + + + + + Delete + + + + + &Copy + + + + + Ctrl+C + + + + + &Cut + + + + + Ctrl+X + + + + + &Paste + + + + + Ctrl+V + + + + + Du&plicate + + + + + Ctrl+U + + + + + Clear Mixes? + + + + + Really clear all the mixes? + + + ModelEdit - + Dialog - + Setup - - Model Name + + Heli - - - Count Down + + Inputs - - - Count Up + + Logical Switches - - - mm:ss + + Switch Assignment - - Trim Increment - - - - - Exponential - - - - - Extra Fine - - - - - Fine - - - - - Medium - - - - - Coarse - - - - - Throttle Trim - - - - - Throttle Expo - - - - - Center beep - - - - - - - - - - - - - RUD - - - - - - - - - - - - - - - - ELE - - - - - - - - - THR - - - - - - - - - - - - - - AIL - - - - - P1 - - - - - P2 - - - - - P3 - - - - - Pulse Shift (polarity) - - - - - - - Positive - - - - - - - Negative - - - - - - - Protocol - - - - - - + Channels - - - - - - - ch - - - - - - - usec - - - - - Extended Limits - - - - - - Heli Setup - - - - - Swash Type - - - - - - Off - - - - - 120 - - - - - 120X - - - - - 140 - - - - - 90 - - - - - Collective - - - - - Swash Ring - - - - - Invert Elevator - - - - - Invert Aileron - - - - - Invert Collective - - - - + Mixes - - Limits - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INV - - - - - - - Channel - - - - - - - Offset - - - - - - - - - Min - - - - - - - - - Max - - - - - - - Invert - - - - + Curves - - Curve 1 - - - - - Curve 2 - - - - - Timer1 - - - - - Timer2 - - - - - - - PPM delay - - - - - Extended Trims - - - - - Throttle2Trig - - - - - - - PPM Frame Length - - - - - - - mSec - - - - - - - - - - - - - Fade In - - - - - - - - - - - - - Fade Out - - - - - - - - - - - - - trim2 - - - - - - - - - - - - - trim1 - - - - - - DSM Type - - - - - - LP4/LP5 - - - - - - DSM2only - - - - - - DSM2/DSMX - - - - - - RX Number - - - - - Disable Throttle Warning - - - - - Switch startup Warning - - - - - Instant Trim - - - - - - CH01 - - - - - - CH02 - - - - - - CH03 - - - - - - CH04 - - - - - - CH05 - - - - - - CH06 - - - - - - CH07 - - - - - - CH08 - - - - - - CH09 - - - - - - CH10 - - - - - - CH11 - - - - - - CH12 - - - - - - CH13 - - - - - - CH14 - - - - - - CH15 - - - - - - CH16 - - - - - REa - - - - - REb - - - - - 3POS - - - - - - Check - - - - - - - ON - - - - - - OFF - - - - - GEA - - - - - ID0 - - - - - ID1 - - - - - ID2 - - - - - - TriggerB - - - - - Model Voice - - - - - - - - - - - - - trim4 - - - - - - - - - - - - - trim3 - - - - - - - - - - - - - GVAR1 - - - - - - - - - - - - - GVAR2 - - - - - - - - - - - - - GVAR3 - - - - - - - - - - - - - GVAR4 - - - - - - - - - - - - - GVAR5 - - - - - - - - - - - - - Rotary encoder B - - - - - - - - - - - - - Rotary encoder A - - - - - - Sym - - - - - Curve 3 - - - - - Curve 4 - - - - - Curve 5 - - - - - Curve 6 - - - - - Curve 7 - - - - - Curve 8 - - - - - Curve 9 - - - - - Curve 10 - - - - - Curve 11 - - - - - Curve 12 - - - - - Curve 13 - - - - - Curve 14 - - - - - Curve 15 - - - - - Curve 16 - - - - - - Curve type - - - - - 3 points - - - - - 3 points custom - - - - - 5 points - - - - - 5 points custom - - - - - 9 points - - - - - 9 points custom - - - - - 17 points - - - - - 17 points custom - - - - - Clear All Curves - Clear All Mixes - - - - - - Duration - - - - - - Delay - - - - - - Param - - - - + Telemetry - - Volt source - - - - - Current source - - - - - NONE - - - - - - - - A1 - - - - - - FAS - - - - - CEL - - - - - - Unit - - - - - - Raw (-) - - - - - Telemetry screen 1 - - - - - - - Custom Screen Type - - - - - - - Nums - - - - - - - Bars - - - - - Telemetry screen 2 - - - - - - Alarm 1 - - - - - ModelSetup - - - - - Throttle Source - - - - - SB - - - - - SD - - - - - SA - - - - - SC - - - - - SG - - - - - SE - - - - - SF - - - - - RS - - - - - 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. - - - - - - - Master - - - - - Slave - - - - - Trainer Mode - - - - - Master/Trainer Port - - - - - - - Start - - - - - - Polarity - - - - - RF Module 1 - - - - - RF Module 2 - - - - - - Persistent - - - - - - (00:00:00) - - - - - - MinuteBeep - - - - - - CountDownBeep - - - - - Model Image - - - - - Failsafe - - - - - External module - - - - - - Failsafe Mode - - - - - - Hold - - - - - - Custom - - - - - - No Pulses - - - - - Internal Module - - - - + Flight Modes - - Flight Mode 0 (Default) - - - - - - - - - - - - - Flight Mode Name - - - - - GVAR6 - - - - - GVAR7 - - - - - FM 1 - - - - - FM 2 - - - - - FM 3 - - - - - FM 4 - - - - - FM 5 - - - - - FM 6 - - - - - FM 7 - - - - - FM 8 - - - - - Sticks - - - - - Show channels names in mixes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- - - - - - - Center - - - - - Curve name - - - - - Curve Creator - - - - - Y at X=100 - - - - - Both - - - - - x>0 - - - - - x<0 - - - - - Linear - - - - - Single Expo - - - - - Symmetrical f(x)=-f(-x) - - - - - Symmetrical f(x)=f(-x) - - - - - Apply - - - - - Side - - - - - Y at X=-100 - - - - - Y at X=0 - - - - - Coefficient - - - - - CS9 - - - - - CSF - - - - - CSD - - - - - - AND - - - - - CS6 - - - - - CS1 - - - - - CS8 - - - - - CS7 - - - - - CSA - - - - - CSB - - - - - CSC - - - - - CS5 - - - - - CS3 - - - - - CS2 - - - - - CSE - - - - - CSG - - - - - CS4 - - - - - CST - - - - - CSM - - - - - CSP - - - - - CSH - - - - - CSO - - - - - CSN - - - - - CSQ - - - - - CSR - - - - - CSS - - - - - CSL - - - - - CSK - - - - - CSJ - - - - - CSI - - - - - CSU - - - - - CSV - - - - - CSW - - - - - - Enable - - - - - Altimetry / Vario - - - - - Sink Max - - - - - Climb Max - - - - - Sink Min - - - - - Climb Min - - - - - Vario source - - - - - Vario limits - - - - - Use GPS as altitude source - - - - - Display altitude in toolbar - - - - - - - - - - ---- - - - - - - - - - - Yellow - - - - - - - - - - Orange - - - - - - - - - - Red - - - - - - - - < - - - - - - - - > - - - - - - - Alarm 2 - - - - - - Min Value - - - - - - - - A2 - - - - - - - - Function - - - - - Custom switches - - - - - - V1 - - - - - - V2 - - - - - Safety Switches - - - - - - - - - - - - - - - - - Switch - - - - - Value - - - - - - Max Value - - - - - RSSI - - - - - Alarm 1 - - - - - Serial Protocol - - - - - Units - - - - - None - - - - - FrSky Sensor Hub - - - - - Metric - - - - - Custom Functions - - - - - Imperial - - - - - 2 - - - - - 3 - - - - - 4 - - - - - Blades - - - - - Alti - - - - - Alti+ - - - - - Vario - - - - - - Volts (V) - - - - - - Amps (A) - - - - - - Speed (m/s or ft/s) - - - - - - Speed (km/h or miles/h) - - - - - - Meters (m or ft) - - - - - - Temp (°) - - - - - - Fuel (%) - - - - - - mAmps (mA) - - - - - - - Source - - - - - - - Gauge - - - - - - - Gauge 1 - - - - - - - Gauge 2 - - - - - - - Gauge 3 - - - - - - - Gauge 4 - - - - - Telemetry screen 3 - - - - - Templates - - - - + Simulate - - - - - Move Up - - - - - - - - Ctrl+Up - - - - - - - - Move Down - - - - - - - - Ctrl+Down - - - - - Clear Expo Settings - - - - - Clear Mixes - - - - - S1 - - - - - S2 - - - - - LS - - - - - Weight - Weight(+%1%) - - - - - - Flight modes - - - - - - Flight mode - - - - - - - CH%1%2 - - - - - - Expo - - - - - Rud - - - - - Ele - - - - - Thr - - - - - Ail - - - - - - DISABLED - - - - - - Curve - - - - - - - X%1 - - - - - No Trim - - - - - No DR/Expo - - - - - FMTrim - - - - - Diff - - - - - Delay(u%1:d%2) - - - - - Slow(u%1:d%2) - - - - - Warn(%1) - - - - - - - - CH %1 - - - - - CF%1 - - - - - Error - - - - - Unable to find sound file %1! - - - - - Winged Shadow How High - - - - - Winged Shadow How High (not supported) - - - - - - Range - - - - - Simple 4-CH - - - - - T-Cut - - - - - Sticky T-Cut - - - - - V-Tail - - - - - Elevon\Delta - - - - - Heli Setup with gyro gain control - - - - - Gyro gain control - - - - - Heli Setup (Futaba's channel assignment style) - - - - - Heli Setup with gyro gain control (Futaba's channel assignment style) - - - - - Gyro gain control (Futaba's channel assignment style) - - - - - Servo Test - - - - - MultiCopter - - - - - Use Model Config Wizard - - - - - Editing curve %1 - - - - - Not enough available mixers! - - - - - Not enough available expos! - - - - - Delete Selected Mixes? - - - - - Delete Selected Expos? - - - - - - &Add - - - - - - Ctrl+A - - - - - - &Edit - - - - - - Enter - - - - - - - - &Delete - - - - - - - - Delete - - - - - - - - &Copy - - - - - - - - Ctrl+C - - - - - - - - &Cut - - - - - - - - Ctrl+X - - - - - - - - &Paste - - - - - - - - Ctrl+V - - - - - - Du&plicate - - - - - - Ctrl+U - - - - - Are you sure you want to delete curve %1 ? - - - - - Apply Template? - - - - - Apply template "%1"? - - - - - Clear Expos? - - - - - Really clear all the expos? - - - - - - - Clear Mixes? - - - - - Really clear all the mixes? - - - - + Clear Curves? - + Really clear all the curves? - - - - - - AIL2 - - - - - - - - ELE2 - - - - - - - - - - FLAPS - - - - - - - - - - FLAP%1 - - - - - - - - PITCH - - - - - - - - - - - - GYRO - - - - - - SPOIL - - - - - - SPOIL%1 - - - - - - RUD2 - - - - - Really clear existing mixes on CH6? - - - - - Really clear existing mixes on CH5? - - - - - Not enough free points in eeprom to store the curve. - - ModelsListWidget - + &Edit - + &Restore from backup - + &Model Wizard - + &Delete - + Delete - + &Copy - + Ctrl+C - + &Cut - + Ctrl+X - + &Paste - + Ctrl+V - + D&uplicate - + Ctrl+U - + &Use as default - + P&rint model - + Alt+R - + Alt+S - + &Simulate model - + General Settings - + Delete Selected Models? - - + + Cannot delete default model. - + Cannot cut default model. - + Do you want to overwrite TX general settings? - + You are pasting on an not empty model, are you sure? You are pasting on an not empty model, are you sure ? - + No free slot available, cannot duplicate + + Module + + + Form + + + + + Failsafe Mode + + + + + Start + + + + + PPM delay + + + + + usec + + + + + Negative + + + + + Positive + + + + + RX Number + + + + + Master + + + + + Slave + + + + + Polarity + + + + + Trainer Mode + + + + + mSec + + + + + PPM Frame Length + + + + + Label + + + + + + ch + + + + + Channels + + + + + Hold + + + + + Custom + + + + + No Pulses + + + + + Failsafe Positions + + + + + Protocol + + + + + ModulePanel + + + Trainer Output + + + + + Internal Radio System + + + + + External Radio Module + + + QObject @@ -5114,1950 +4033,1811 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi - + + Input%1 + + + + + Polish + + + + + CH%1 + + + + No - + RotEnc A - + Rot Enc B - + Rot Enc C - + Rot Enc D - + Rot Enc E - + Safety %1 - + Trainer - + Trainer RUD - + Trainer ELE - + Trainer THR - + Trainer AIL - + Instant Trim - + Play Sound - + Start Logs - + Play Haptic - - + + + --- - + Rud Trim - + Ele Trim - + Thr Trim - + Ail Trim - + Rot Enc - + English - + French - + Italian - + German - + Czech - + Slovak - + Spanish - + Portuguese - + Swedish - - CH - - - - - + + No repeat - + %1 sec - + Reset - - Vario + + RudTrim Left - - Play Track + + RudTrim Right - - Play Both + + EleTrim Down - - Play Value + + EleTrim Up - - Volume + + ThrTrim Down - - Backlight + + ThrTrim Up - - Background Music + + AilTrim Left - - Background Music Pause - - - - - Adjust GV1 - - - - - Adjust GV2 - - - - - Adjust GV3 - - - - - Adjust GV4 - - - - - Adjust GV5 - - - - - Delay %1 sec - - - - - Duration %1 sec - - - - - - - <font color=red><b>Inconsistent parameter</b></font> - - - - - Value - - - - - Decr: - - - - - Incr: - - - - - %1s - - - - - Value - - - - - Source - - - - - GVAR - - - - - Increment - - - - - !Flight mode %1 - - - - - Flight mode %1 - - - - - Flight mode %1 trim - - - - - Flight mode %1 value - - - - - Yellow - - - - - Orange - - - - - Red - - - - - Winged Shadow How High - - - - - Winged Shadow How High (not supported) - - - - - FrSky Sensor Hub - - - - - None - - - - - Imperial - - - - - Metric - - - - - Extra Fine - - - - - Fine - - - - - Medium - - - - - Coarse - - - - - Exponential - - - - - Count Up - - - - - Count Down - - - - - %1:%2, - - - - - : %1 Channels, %2usec Delay - - - - - Rudder - - - - - Elevator - - - - - Throttle - - - - - Aileron - - - - - - - Timer1 - - - - - - - Timer2 - - - - - - All - - - - - - Telemetry - - - - - Diff - - - - - Expo - - - - - Own trim - - - - - Own value - - - - - Keys - - - - - Sticks - - - - - Keys + Sticks - - - - - -GV%1 - - - - - (-GV%1) - - - - - (GV%1) + + AilTrim Right - - - - ---- + ABS - - - - P1 + + THs - - - - P2 + + TH% - - - - P3 + + THt - - MAX + + ??? - - - Rud + + a>x - - - Ele + + a<x - - - Thr - - - - - - Ail - - - - - REa - - - - - REb + + |a|>x - ONE + |a|<x - - !ONE + + AND - - TRNs - TX + + OR - - Alt + + XOR - - Rpm + + a=b - - Fuel + + a!=b - - Speed + + a>b - - Dist + + a<b - - GPS Alt + + a>=b - - Cell + + a<=b - - 3POS + + d>=x - - A1 + + |d|>=x - - A2 + + a~x - - T1 + + Timer - - T2 + + Sticky - - Curve + + Stay - - - - - Flight modes settings on expos not exported - Phases settings on expos not exported + + Unknown - - - - - - - - - Open9x on this board doesn't have Rotary Encoders + + STAY(%1, [%2:%3]) - - gruvin9x doesn't have trims as source + + STICKY(%1, %2) - - gruvin9x doesn't have swappable trims + + TIMER(%1, %2) - - gruvin9x on this board doesn't have Rotary Encoders + + Set Timer %1 - - gruvin9x does not support Custom Switch function %1 + + Vario - - gruvin9x only accepts %1 expos + + Play Track - - - gruvin9x doesn't support custom curves as curve%1, curve as been exported as fixed point + + Play Both - - - gruvin9x doesn't support curve with %1 point as curve%2 + + Play Value - - - - Open9x doesn't allow Curve%1 in expos + + Volume - - - Simultaneous usage of expo and curves is no longer supported + + Backlight - - - - - - - - Flight modes settings on mixers not exported + + Background Music - - - Flight mode settings on mixers not exported - Phases settings on mixers not exported + + Background Music Pause - - - - - This version of open9x does not support Custom Switch function %1 + + Delay %1 sec - - - - - - - - - - - - - - - - - - - Open9x doesn't accept this protocol + + Duration %1 sec - - - - - - - open9x only accepts %1 points in all curves + + + + + + + <font color=red><b>Inconsistent parameter</b></font> - - Simultaneous usage of expo and curves is no longer supported in open9x + + + Value - - - open9x on this board doesn't have Rotary Encoders + + + Decr: - - - - - - - - - - - - - - open9x only accepts %1 expos - Gruvin9x firmware only accepts %1 expos + + + Incr: - - th9x + + Played once, not during startup - - er9x + + %1s - - TrmR + + Adjust GV%1 - - TrmE + + Rotary Encoder - - TrmT + + Value - - TrmA + + Source - - - S1 + + GVAR - - - S2 + + Increment - - - LS + + !Flight mode %1 - - - RS + + Flight mode %1 - - SA + + Flight mode %1 value - - SB + + Yellow - - SC + + Orange - - SD + + Red - - SE + + Winged Shadow How High - - SF + + Winged Shadow How High (not supported) - - SG + + FrSky Sensor Hub - - SH + + + None + + + + + Imperial + + + + + Metric + + + + + Extra Fine + + + + + Fine + + + + + Medium + + + + + Coarse + + + + + Exponential + + + + + Count Up + + + + + Count Down + + + + + %1:%2, + + + + + : %1 Channels, %2usec Delay + + + + + Flight modes(%1) + + + + + Flight mode(%1) + + + + + Rudder + + + + + Elevator + + + + + Throttle + + + + + Aileron + + + + + + + + Timer1 + + + + + + + + Timer2 + + + + + + + All + + + + + + + Telemetry + + + + + Own value + + + + + Keys + + + + + Sticks + + + + + Keys + Sticks + + + + + + -GV%1 + + + + + + + + ---- + + + + + + + P1 + + + + + + + P2 + + + + + + + P3 + + + + + MAX + + + + + + Rud + + + + + + Ele + + + + + + Thr + + + + + + Ail + + + + + + + REa + + + + + + + REb + + + + + + LS1 + + + + + + LS2 + + + + + + LS3 + + + + + + LS4 + + + + + + LS5 + + + + + + LS6 + + + + + + LS7 + + + + + + LS8 + + + + + + LS9 + + + + + + LSA + + + + + + LSB + + + + + + LSC + + + + + + LSD + + + + + + LSE + + + + + + LSF + + + + + + LSG + + + + + + LSH + + + + + + LSI + + + + + + LSJ + + + + + + LSK + + + + + + LSL + + + + + + LSM + + + + + + LSN + + + + + + LSO + + + + + + LSP + + + + + + LSQ + + + + + + LSR + + + + + + LSS + + + + + + LST + + + + + + LSU + + + + + + LSV + + + + + + LSW + + + + + Input %1 + + + + + S11 + + + + + S12 + + + + + S13 + + + + + S14 + + + + + S15 + + + + + S16 + S21 + + + + + S22 + + + + + S23 + + + + + S24 + + + + + S25 + + + + + S26 + + + + + Diff(%1) + + + + + Expo(%1) + + + + + Function(%1) + + + + + Curve(%1) + + + + + !Curve(%1) + + + + + Alt + + + + + Rpm + + + + + Fuel + + + + + Speed + + + + + Dist + + + + + GPS Alt + + + + + Cell + + + + + A1 + + + + + A2 + + + + + T1 + + + + + T2 + + + + + + Simultaneous usage of expo and curves is no longer supported + + + + + Simultaneous usage of expo and curves is no longer supported in open9x + + + + + th9x + + + + + er9x + + + + + TrmR + + + + + TrmE + + + + + TrmT + + + + + TrmA + + + + + + S1 + + + + + + S2 + + + + + + LS + + + + + + RS + + + + Batt - + SWR - + Tx - + RSSI - + Rx - + Cels - + Vfas - + Curr - + Cnsp - + Powr - + AccX - + AccY - + AccZ - + HDG - + VSpd - + A1- - + A2- - + Alt- - + Alt+ - + Rpm+ - + T1+ - + T2+ - + Spd+ - + Dst+ - + Cur+ - + ACC - + Time - + Pwr+ - - - 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 - - - - + CYC%1 - + PPM%1 - + CH%1%2 CH%1 - + X%1 - - TRNl - - - - - REAs - - - - - REAl - - - - - + + + GV%1 - - - - + + THR - - - RUD - - - - - - ELE - - - - - ID0 - - - - - ID1 - - - - - ID2 - - - - - - AIL - - - - - - GEA - - - - - - TRN - - - - - + + ON - - + + + OFF - - + + Support for frsky telemetry mod - - + + Support for jeti telemetry mod - - + + Support for receiving ardupilot data - - + + Support for receiving NMEA data - + Support for telemetry easy board - - + + Support for MAVLINK devices - + Rotary Encoder use in menus navigation - + Possibility to enable FAI MODE at field - + FAI MODE always enabled - - openTx for 9X board - - - - - - - - + + + + + Enable heli menu and cyclic mix support - - - - - - + + + + + + Enable TEMPLATES menu - - - - + + + + No splash screen - - - - - - + + + + + + Disable curves menus - - - - + + + + Support for radio modified with regular speaker - - - - - + + + + + Used if you have modified your radio with voice mode - - - - + + + + Used if you have modified your radio with haptic mode - - - - - - - - + + + + + + + + Use alternative SQT5 font - - - - + + + + Enable the throttle trace in Statistics - + EEprom write progress bar - - + + No Winged Shadow How High support - - + + No vario support - - + + No GPS support - - + + No gauges in the custom telemetry screen - - openTx for M128 / 9X board + + Allow compensating for offset errors in FrSky FAS current sensors - - openTx for 9XR + + OpenTX for FrSky Taranis - - openTx for 9XR with M128 chip + + OpenTX for FrSky Taranis Rev4a - - openTx for Gruvin9x board / 9X - - - - + Support of FrSky PXX protocol - + + OpenTX for Sky9x board / 9X + + + + Use FrSky Taranis sticks in a 9X/9XR - - openTx for FrSky Taranis - - - - - + + Disable HELI menu and cyclic mix support - - + + Disable TEMPLATES menu - - + + Disable Global variables - - openTx for FrSky Taranis Rev4a - - - - - - - - + + + + + Support for DSM2 modules - - - - - - + + + + + + PPM center adjustment in limits - - - - - - - - + + + + + + + + PPM values displayed in us - - - - - - + + + + + + Symetrical Limits - - - - - + + + + + Pots use in menus navigation - + Your radio probably uses a wrong firmware, eeprom size is 4096 but only the first 2048 are used - - - - - - + + OpenTX for 9X board + + + + + + + + + No flight modes - - + + SmartieParts 2.2 Backlight support - - - - - - + + + + + + In model setup menus automatically set source by moving some of them - - - - - - + + + + + + In model setup menus automatically set switch by moving some of them - - - - + + + + Enable resetting values by pressing up and down at the same time - - - - - - + + + + + + No graphical check boxes and sliders - - - - - - + + + + + + Battery graph - - - - - - + + + + + + Don't use bold font for highlighting active items - - - - + + OpenTX for M128 / 9X board + + + + + + + EEprom write Progress bar - - - - - + + + + + Imperial units - + Bluetooth interface - - - - - - + + + + + + Global variables - + + OpenTX for 9XR + + + + + OpenTX for 9XR with M128 chip + + + + + OpenTX for Gruvin9x board / 9X + + + + Support for SD memory card - + Support for DSM2 modules using ppm instead of true serial - - openTx for Sky9x board / 9X - - - - + Enable HELI menu and cyclic mix support - + ersky9x - - er9x doesn't have Rotary Encoders - - - - - er9x doesn't have trims as source - - - - - er9x doesn't have negative gvars as weight - - - - - er9x doesn't have negative gvars as offset - - - - - - - er9x doesn't have swappable trims - - - - - - - er9x on this board doesn't have Rotary Encoders - - - - - er9x does not support Custom Switch function %1 - - - - - - - er9x does not support this range for A1/A2 - - - - - - - er9x does not support this telemetry units - - - - - - Er9x doesn't accept this protocol - - - - - - Er9x doesn't support custom curves as curve%1, curve as been exported as fixed point - - - - - - Er9x doesn't support curve with %1 point as curve%2 - - - - - - - - + + + + Warning - - + EEPROM saved with these warnings: - - - ersky9x doesn't have Rotary Encoders - - - - - - ersky9x doesn't have trims as source - - - - - - ersky9x does not support Custom Switch function %1 - - - - - - Ersky9x doesn't accept this protocol - - - - - - - - ErSky9x doesn't support custom curves as curve%1, curve as been exported as fixed point - - - - - - - - ErSky9x doesn't support curve with %1 point as curve%2 - - - - - - + + + Simulator for this firmware is not yet available - - th9x does not support Custom Switch function %1 - - - - + th9x on this board doesn't have Rotary Encoders - - - - th9x doesn't support custom curves as curve%1, curve as been exported as fixed point - - - - - - - th9x doesn't support curve with %1 point as curve%2 - - - - - - Flight Mode 0 (Default) - - - - - - FM %1 - - - - + openTx only accepts %1 points in all curves - - - + + + + OpenTX on this board doesn't accept this function - - + + OpenTX doesn't accept this protocol - + OpenTX doesn't allow this number of channels @@ -7070,6 +5850,773 @@ We are really appreciative for that! The OpenTX/Companion Team. + + + Trim disabled + + + + + Own Trim + + + + + Use Trim from Flight mode %1 + + + + + Use Trim from Flight mode %1 + Own Trim as an offset + + + + + Setup + + + Form + + + + + Model Name + + + + + Timer2 + + + + + Timer1 + + + + + Throttle Source + + + + + Switch startup Warning + + + + + Center beep + + + + + Trim Increment + + + + + ON + + + + + OFF + + + + + Check + + + + + Model Image + + + + + Exponential + + + + + Extra Fine + + + + + Fine + + + + + Medium + + + + + Coarse + + + + + Extended Limits + + + + + Extended Trims + + + + + Throttle Trim + + + + + 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. + + + + + + + Reverse Throttle + + + + + Telemetry + + + Form + + + + + + + + A1 + + + + + + + + A2 + + + + + RSSI + + + + + Alarm 1 + + + + + + ---- + + + + + + Yellow + + + + + + Orange + + + + + + Red + + + + + Alarm 2 + + + + + Serial Protocol + + + + + Volt source + + + + + Metric + + + + + Imperial + + + + + Current source + + + + + Protocol + + + + + NONE + + + + + + FAS + + + + + None + + + + + FrSky Sensor Hub + + + + + CEL + + + + + 2 + + + + + 3 + + + + + 4 + + + + + Units + + + + + Blades + + + + + Altimetry / Vario + + + + + Alti + + + + + Alti+ + + + + + Vario + + + + + Sink Max + + + + + Off + + + + + Climb Max + + + + + Sink Min + + + + + Climb Min + + + + + Vario source + + + + + Vario limits + + + + + Use GPS as altitude source + + + + + Display altitude in toolbar + + + + + Various + + + + + mAh count + + + + + FAS Offset + + + + + Persistent mAh + + + + + TelemetryAnalog + + + Form + + + + + Unit + + + + + Max Value + + + + + Alarm 1 + + + + + + ---- + + + + + + Yellow + + + + + + Orange + + + + + + Red + + + + + + < + + + + + + > + + + + + Alarm 2 + + + + + Min Value + + + + + 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) + + + + + Range + + + + + TelemetryCustomScreen + + + Form + + + + + Custom Screen Type + + + + + Nums + + + + + Bars + + + + + Min + + + + + Source + + + + + Gauge + + + + + Max + + + + + TelemetryPanel + + + Telemetry screen %1 + + + + + Winged Shadow How High + + + + + Winged Shadow How High (not supported) + + + + + Timer + + + Form + + + + + mm:ss + + + + + Countdown + + + + + MinuteBeep + + + + + Persistent + + + + + (00:00:00) + + + + + TimerPanel + + + None + + + + + Beeps + + + + + Countdown + + + + + appPreferencesDialog + + + Application Preferences + + + + + Simulator capture folder + + + + + Remember simulator switch values + + + + + + + Open Folder + + + + + User Splash Screens + + + + + Blue + + + + + Green + + + + + Red + + + + + Orange + + + + + Yellow + + + + + Include companion splashes + + + + + Only user defined splashes + + + + + Splash Screen Library + + + + + Files to keep + + + + + Simulator BackLight + + + + + Automatic Backup Folder + + + + + Only capture to clipboard + + + + + Joystick + + + + + Find Executable + + + + + Google Earth Executable + + + + + Calibrate + + + + + Enable + + + + + Show splash screen when Companion starts + + + + + Automatic check for OpenTX firmware updates + + + + + Automatic check for Companion updates + + + + + Offer to use wizard for new models + + + + + Enable automatic backup before writing firmware + + + + + Select your snapshot folder + + + + + + No joysticks found + + + + + Select your library folder + + + + + Select your Models and Settings backup folder + + + + + Select Google Earth executable + + avrOutputDialog @@ -7368,40 +6915,40 @@ Please only use this if you know what you are doing. There are no error checks - + DFU-UTIL Configuration - + SAM-BA Configuration - + AVRDUDE Configuration - - - + + + Select Location - - + + 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? - + <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. @@ -7459,7 +7006,7 @@ m2560 for v4.1 boards - + Browse for file @@ -7505,7 +7052,7 @@ m2560 for v4.1 boards - + Write to TX @@ -7530,146 +7077,146 @@ m2560 for v4.1 boards - + Write firmware to TX - + Current profile - + Open - + Write Models and Settings to TX - + Write Models and Settings in %1 to TX - + Choose file to load Models and Settings from - - - - - - + + + + + + Warning - + %1 is not a known firmware - + Burn anyway ! - + Unable to find file %1! - - - + + + Error opening file %1: %2. - - - + + + Invalid binary Models and Settings File %1, Proceed anyway ? - + Error reading file %1: %2. - + Open Image to load - + Images (%1) - + Wrong radio calibration data in profile, Settings not patched - + Wrong radio setting data in profile, Settings not patched - - + + Cannot write file %1: %2. - + Error writing file %1: %2. - - - - - - - - - - + + + + + + + + + + Error - - + + Cannot load %1. - + Cannot save customized firmware - + Custom image not found - + No firmware selected @@ -7707,515 +7254,483 @@ m2560 for v4.1 boards - - + + No name - + General Model Settings - - - + + + Name - - + + EEprom Size - - + + Timer1 - - + + Timer2 - - + + Protocol - - + + Pulse Polarity - - + + Throttle Trim - - - - + + + + Enabled - - - - + + + + Disabled - - + + Throttle Expo - - + + Trim Increment - - + + Center Beep - - + + Fades - - + + Trims - - - - - - - - - - + + + + + + + + Switch - - + + IN - - + + OUT - - + + Gvars - - + + Rot. Enc. - + Limits - - - - - - - + + + + + + + Offset - - - - - + + + + + Min - - - - - + + + + + Max - - - + + + Invert - - - - - - + + + + + CH - - + + INV - - + + NOR - + Global Variables - - + + GV - + Expo/Dr Settings - - + + Weight - - - Expo - - - - - - - + + + + DISABLED - - - - - - + + Curve - + Mixers - - + + noTrim - - - FMTrim - - - - - - Diff - - - - - + + Delay(u%1:d%2) - - + + Slow(u%1:d%2) - - + + Warn - + Curves - + 5 Points Curves - - - - + + + + pt %1 - + 9 Points Curves - - Custom Switches - - - - - - CS - - - - - + + Function - - + + Param - - + + Enable - + Telemetry Settings - - + + Analog - - + + Unit - - + + Scale - - - - + + + + A%1 - - + + Alarm 1 - - + + Alarm 2 - - - - + + + + Type - - - - + + + + Condition - - - - - - + + + + Value - + Flight modes Settings - - - - + + + + Flight mode name - - - - - - - - - - + + + + + + + + + + FM - - - + + + Flight modes - - - + + + Flight mode - - Custom Functions - - - - - + + Repeat - + CF - - Safety Switches - - - - - + + RSSI Alarm - - + + Telemetry Bars - - + + Bar Number - - + + Source - - + + Custom Telemetry View - + + Logical Switches + + + + + + LS + + + + + Switch Assignment + + + + Print Document - + Select PDF output file @@ -8228,39 +7743,37 @@ m2560 for v4.1 boards - + People who have contributed to this project - + Coders - - 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 - + Thank you all !!! - + + Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe) + + + + Contributors - + OpenTX Release Notes @@ -8268,131 +7781,99 @@ which was the staring point for OpenTX Companion. customizeSplashDialog - - Customize Splash + + Transmitter Splash Screen Editor - - Save Image + + + Invert - - Invert Color + + + Load FW - - Load Firmware + + + Load Pict - - Load Image + + + Load Profile - + + + Save + + + + + Open Splash Library - + + + + ... - - Save Firmware - Save To Hex - - - - - <!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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<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> - - - - - - - Select an original firmware file - - - - + Open - - Select an image to customize your splash <br />or save actual firmware splash - - - - - - - + + + + + + Error - + Could not find bitmap to replace in file - + Open Image to load - + Images (%1) - - + + Cannot load %1. - - - Save your custimized firmware + + + Could not store image in firmware file %1 - - - Write to file - - - - - Error reading file %1 - - - - - Firmware correctly saved. - - - - - Firmware not saved. - - - - - PNG images (*.png);; + + The image file %1 could not be stored @@ -8511,6 +7992,381 @@ p, li { white-space: pre-wrap; } + + fwPreferencesDialog + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox + + + + + Set language of voice. +May be different from firmware language + + + + + SD Structure path + + + + + Processor ID + + + + + Downloads and Profiles + + + + + Default Stick Mode + + + + + Channel Order + + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + + + + + Mode 1 (RUD ELE THR AIL) + + + + + Mode 2 (RUD THR ELE AIL) + + + + + Mode 3 (AIL ELE THR RUD) + + + + + Mode 4 (AIL THR ELE RUD) + + + + + Options + + + + + Channel order + +This is used by the templated to determine which channel goes to what number output. + + + + + Open Folder + + + + + Offer to write FW to Tx after download + + + + + Save Profile + + + + + Menu Language + + + + + Voice Language + + + + + Firmware Type + + + + + Append version number to FW file name + + + + + Download Voice + + + + + FwInfo + + + + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + + Profile + + + + + Open Image + + + + + Splash Screen + + + + + Clear Image + + + + + Download FW + + + + + Check for updates + + + + + Last downloaded release: %1 + + + + + The selected firmware has never been downloaded by Companion. + + + + + The selected firmware cannot be downloaded by Companion. + + + + + Select the folder replicating your SD structure + + + + + Profile name is empty, profile slot %1 will be deleted.<br>Are you sure ? + + + + + Open Image to load + + + + + Images (%1) + + + + + Error + + + + + Cannot load %1. + + + joystickDialog @@ -8792,17 +8648,17 @@ Press cancel to abort joystick calibration - + Select your log file - + Available fields - + The selected logfile contains %1 invalid lines out of %2 total lines @@ -8810,7 +8666,7 @@ Press cancel to abort joystick calibration mdiChild - + Simulate Tx @@ -9255,75 +9111,68 @@ Press cancel to abort joystick calibration preferencesDialog + Preferences - - Language (requires restart) - - - - + SD Structure path - + Processor ID - + + Simulator capture folder - + + Use clipboard only - + Recent History Size - - + + 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: @@ -9346,357 +9195,507 @@ 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 - + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + 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 - + + Remember simulator switches + + + + + Include companion splashes - + + Only user defined splashes - + + Custom TX splash screen - + + Personal splash library - + + Joystick - - - - + + + + + + Open Folder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox - + 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 - + + Show Splash At Start + + + + 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 - + 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. @@ -9729,468 +9728,421 @@ May be different from firmware language - - - - + + + + Name - + General Model Settings - + EEprom Size - + Timer1 - + Timer2 - + Protocol - + Pulse Polarity - + Throttle Trim + - - + Enabled + - Disabled - + Throttle Expo - + Fades - + Trims - + Trim Increment - + Center Beep - + Flight modes Settings - + Flight mode name - - - - + + + + FM - - + + Flight modes - - + + Flight mode - + Delay(u%1:d%2) - + Slow(u%1:d%2) - - - + pt %1 - - - - - + + + + Switch - + printed on: %1 - + Gvars - + Rot.Enc. - + IN - + OUT - + Expo/Dr Settings - + Weight - - - - - Expo - - - - - + + DISABLED - - + + - - - - Curve - + Mixers - - - - - + + + + CH - + noTrim - - FMTrim - - - - - - - - + + + + + Offset - - Diff - - - - + Warn - + Limits - - - - + + + + Min - - - - + + + + Max - - - + + + Invert - - - + + + INV - - - + + + NOR - + Curves - - 5 Points Curves - - - - - 9 Points Curves - - - - - Custom Switches - - - - - - CS - - - - + Global Variables - + GV - - Safety Switches - - - - - - - - + + + + Value - - Function Switches - - - - + Function - + Parameter - + ODF files (*.odt);;PDF Files(*.pdf);;HTML-Files (*.htm *.html);;All Files (*) - + Telemetry Settings - - + + Logical Switches + + + + + + LS + + + + + Switch Assignments + + + + + Alarm 1 - - + + Alarm 2 - + Analog - + Unit - + Scale - - - - + + + + Type - - - - + + + + Condition - + A%1 - + RSSI Alarm - + Frsky serial protocol - + System of units - + Propeller blades - + Telemetry Bars - + Bar Number - + Source - - + + Custom Telemetry View - + Repeat - - CF - - - - + Print Document - + Select PDF output file @@ -10198,17 +10150,17 @@ May be different from firmware language simulatorDialog - + P1 - + P2 - + P3 @@ -10234,33 +10186,33 @@ May be different from firmware language - + Hold X - + Fix X - + Fix Y - + Hold Y - - + + TextLabel @@ -10280,17 +10232,17 @@ May be different from firmware language - + ID1 - + ID2 - + BEEP @@ -10298,7 +10250,7 @@ May be different from firmware language - + Right Double Click to Reset @@ -10308,14 +10260,14 @@ May be different from firmware language - - - + + + 0 % - + 9x Simulator @@ -10326,261 +10278,261 @@ May be different from firmware language - CS1 + LS1 - CS2 + LS2 - CS3 + LS3 - CS4 + LS4 - CS5 + LS5 - CS6 + LS6 - CS7 + LS7 - CS8 + LS8 - CS9 + LS9 - CSA + LSA - CSB + LSB - CSC + LSC - CSD + LSD - CSE + LSE - CSF + LSF - CSG + LSG - CSH + LSH - CSI + LSI - - CSJ + + LSJ - - CSK + + LSK - - CSL + + LSL - - CSM + + LSM - - CSN + + LSN - - CSO + + LSO - - CSP + + LSP - - CSQ + + LSQ - - CSR + + LSR - - CSS + + LSS - - CST + + LST - - CSU + + LSU - - CSV + + LSV - - CSW + + LSW - + CH1 - + CH9 - + CH2 - + CH10 - + CH3 - + CH11 - + CH4 - + CH12 - + CH5 - + CH13 - + CH6 - + CH14 - + CH7 - + CH15 - + CH8 - + CH16 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + -100.1 @@ -10624,33 +10576,33 @@ May be different from firmware language splashLibrary - + ... - + Splash Library - page %1 of %2 - + Warning - + Invalid image in library %1 - + Information - + No valid image found in library, check your settings @@ -10797,10 +10749,10 @@ May be different from firmware language - - - - + + + + @@ -10841,12 +10793,12 @@ May be different from firmware language - + CH12 - + CH5 @@ -10887,162 +10839,162 @@ May be different from firmware language - CSK + LSK - CSC + LSC - CSD + LSD - CS7 + LS7 - CSL + LSL - CSB + LSB - CS1 + LS1 - CSH + LSH - CSG + LSG - CSE + LSE - CSF + LSF - CS8 + LS8 - CS9 + LS9 - CSA + LSA - CSM + LSM - CSJ + LSJ - CSI + LSI - CS4 + LS4 - CS5 + LS5 - CS2 + LS2 - CS3 + LS3 - CS6 + LS6 - CSN + LSN - CSO + LSO - CSP + LSP - CSQ + LSQ - CSR + LSR - CSS + LSS - CST + LST - CSU + LSU - CSV + LSV - CSW + LSW @@ -11062,22 +11014,22 @@ May be different from firmware language - + Firmware %1 error: %2 - + - Flight mode: %1(%2) - + Simulating Tx (%1) - + Simulating diff --git a/companion/src/translations/companion_it.ts b/companion/src/translations/companion_it.ts index d880d890b..8b821a5be 100644 --- a/companion/src/translations/companion_it.ts +++ b/companion/src/translations/companion_it.ts @@ -2,136 +2,594 @@ - ExpoDialog + Channels - - Expo - Esponenziale + + Name + Nome - + + Offset + + + + + Min + Min + + + + Max + Max + + + + Invert + + + + + Center + Centro + + + + Sym + Simm + + + + Channel %1 + + + + + --- + --- + + + + INV + INV + + + + CurveGroup + + + Diff + Diff + + + + Expo + + + + + Func + + + + + Curve + Curva + + + + Curves + + + Form + + + + + Standard + + + + + Custom + Personalizzato + + + + Lines + + + + + Smooth + + + + + Curve type + Tipo curva + + + + Curve name + Nome curva + + + + Curve %1 + + + + + %1 points + + + + + Are you sure you want to reset curve %1 ? + + + + + Editing curve %1 + Modifica curva %1 + + + + Not enough free points in EEPROM to store the curve. + + + + + CustomFunctionsPanel + + + Switch + + + + + Action + + + + + Parameters + + + + + Enable + Abilita + + + + CF%1 + CF%1 + + + + ON + Acceso + + + + Error + Errore + + + + Unable to find sound file %1! + Impossibile trovare il file sonoro %1! + + + + &Delete + &Elimina + + + + Delete + Elimina + + + + &Copy + + + + + Ctrl+C + Ctrl+C + + + + &Cut + &Taglia + + + + Ctrl+X + Ctrl+X + + + + &Paste + &Incolla + + + + Ctrl+V + Ctrl+V + + + + Dialog + + + Dialog + + + + + Curve type + Tipo curva + + + + Coefficient + Coefficiente + + + + Both + Entrambi + + + + x>0 + + + + + x<0 + + + + + Y at X=0 + Y a X=0 + + + + Side + Lato + + + + Y at X=-100 + Y a X=-100 + + + + Y at X=100 + Y a X=100 + + + + Linear + Lineare + + + + Single Expo + Esponenziale singola + + + + Symmetrical f(x)=-f(-x) + Expo simmetrica f(x)=-f(-x) + + + + Symmetrical f(x)=f(-x) + Expo simmetrica f(x)=f(-x) + + + + ExpoDialog + + Weight Peso - - Name - Nome - - - - - Phase used by the expo. - Fase utilizzata per gli esponenziali. - - - + 0 0 - + Flight modes Fasi di volo - - - + + The source for the mixer + Sorgente da miscelare + + + + Input name + + + + + GV VG - + + Phase used by the input. + + + + 1 1 - + 2 2 - + 3 3 - + 4 4 - + 5 5 - + 6 6 - + 7 7 - + 8 8 - + Switch Interruttore - - Switch used by the expo. -If blank then the expo is considered to be "ON" all the time. - Interruttore utilizzato per attivare l'esponenziale. -Se vuoto l'esponenziale è sempre attivo nella fase scelta (o in tutte). + + The curve used by the input + - - Curve/Exponential - Curva/Esponenziale + + Source + Sorgente - - The curve used by the expo - Curva utilizzata dall'impostazione stick + + Line name + - + Stick Side Lato dello stick - + + <!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;">Ritardi e Rallentamenti</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;">Questi valori controllano la velocità e il ritardo dell'uscita della miscelazione</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;">Se il ritardo non è zero l'applicazione del mix verrà ritardata del numero specificato di secondi.</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;">Se il rallentamento non è zero allora la velocità verrà impostata al valore selezionato -&gt; il valore indica il numero di secondi per passare da -100 a 100.</p></body></html> + + + + Scale + Campo di misura + + + + Include Trim + Include i Trim + + + + No + No + + + + Yes + Si + + + Curve Curva - + NEG NEG - + + Switch used by the input. +If blank then the input is considered to be "ON" all the time. + + + + POS POS - + ALL TUTTI - - DEST -> %1 - DEST -> %1 + + Edit %1 + + + + + Rud + Direzionale + + + + Ele + Elevatore + + + + Thr + Motore + + + + Ail + Alettoni + + + + FlightMode + + + Form + + + + + Fade In + Tempo transizione in ingresso + + + + Fade Out + Tempo transizione in uscita + + + + Name + Nome + + + + Switch + + + + + trim1 + trim1 + + + + trim2 + trim2 + + + + trim4 + trim4 + + + + trim3 + trim3 + + + + Rud + Direzionale + + + + Ele + Elevatore + + + + Thr + Motore + + + + Ail + Alettoni + + + + Rotary Encoder %1 + + + + + GVAR%1 + + + + + FlightModes + + + Flight Mode %1 + + + + + (%1) + + + + + (default) + @@ -154,13 +612,13 @@ Queste impostazioni sono comuni a tutti i modelli nella stessa EEPROM.Impostazioni - + Contrast Contrasto - - + + <!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,27 +633,27 @@ 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;">I valori possono andare da 20 a 45</span></p></body></html> - + Sound Mode Modalità audio - + Beeper Altoparlante standard - + Speaker Pitch (spkr only) Tonalità suono (modifica HW) - + Battery Warning Allarme batteria scarica - + Battery warning voltage. This is the threashhold where the battery warning sounds. @@ -206,57 +664,57 @@ Al di sotto di questo valore verrà generato un seganle di allarme. Valori accettabili da 5v a 10v - + Battery Calibration Calibrazione Batteria - + Battery calibration: This value will be added to the measured battery voltage. Use this value to calibrate the meter with an external meter. Calibrazione batteria: Questo vlore verrà sommato al voltaggio misurato. Impostate questo valore per calibrare la lettura utilizzando un multimetro. - + This is the switch selectrion for turning on the backlight (if installed). Questo è l'interruttore selezionato per l'accensione della retroilluminazione (se installata). - + If this value is not 0, any keypress will turn on the backlight and turn it off after the specified number of seconds. Se questo valore non è 0, ogni pressione di tasto provocherà l'accensione della luce e questa verrà spenta dopo il numero di secondi specificato. - - + + sec sec - + Inactivity Timer Temporizzatore di inattività - + If not zero will sound beeps if the transmitter has been left without inputs for the specified number of minutes. Se non è zero, verrà fatto suonare l'allarme se la radio non è utilizzata per il numero di minuti specificato. - + min min - + Timer Beeps Allarmi timer - + <!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; } @@ -269,22 +727,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;"><span style=" font-size:8pt;">Avviso singolo ogni minuto.</span></p></body></html> - + Every Minute ogni Minuto - + Beeps at 30, 15, 10, and down from5 seconds Avvisi a 30, 15, 10, e poi ogni secondo da 5 in giù - + Count Down to Zero Conto alla rovescia - + <!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; } @@ -297,49 +755,27 @@ 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;">Lampeggio della retroilluminazione durante gli avvisi del temporizzatori</span></p></body></html> - + Flash on beep Lampeggio durante il beep - - Reverse Throttle Operation - Stick motore invertito - - - - 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. - - - Stick motore inverso. -Se l'opzione selezionata lo stick motore verrà rovesciato. Il minimo sarà in avanti, anche i trim verranno rovesciati e anche gli avvisi. - - - - - + Show Splash Screen on Startup Mostra schermata all'avvio - - + + Show splash screen on startup Mostra schermata all'avvio - - Throttle Startup Warning - Avviso motore all'avvio - - - - - - - - + + + + + <!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; } @@ -364,37 +800,32 @@ 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;">Suoni disabilitati - avvisa se i suoni sono disabilitati (0)</p></body></html> - - Switch Startup Warning - Avviso interruttori all'avvio - - - + Memory Startup Warning Avviso memoria all'avvio - + Alarm Warning Avvisi sonori - + Pot Scrolling Enable Abilita scorrimento con POT - + Bandgap Measuring Enable Misurazione BandGap - + Channel Order (For Templates) Ordine uscita canali (Per modelli) - + Channel order This is used by the templated to determine which channel goes to what number output. @@ -403,12 +834,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. - + Stick Mode Modo Stick - + Mode selection: Mode 1: @@ -449,40 +880,42 @@ Mode 4: - + 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) - + Beeper Mode Modalità suono beeper - + + + - - - - - - + + + + + + Beeper volume 0 - Quiet. No beeps at all. @@ -499,242 +932,231 @@ Mode 4: 4 - Fortissimo. - - + + Quiet Silenzioso - - + + No Keys No Tasti - - + + Normal Normale - - + + Long Lungo - + Input Filter Filtro ingressi - + Single Singolo - + Oversample Sovracampionato - + Filter Filtro - + Owner Name Proprietario - + - - - + + Off NO - - Switches Up - Interruttori Su - - - - Switches Down - Interruttori Giù - - - + Trainer Maestro/Allievo - - + + PPM 1 PPM 1 + - - - + + chn1 chn1 + - - - + + chn2 chn2 + - - - + + chn3 chn3 + - - - + + chn4 chn4 - + Mode Modo - + Show Owner Name on Splash Mostra proprietario all'avvio - + Telemetry NO DATA Alarm Allame mancanza telemetria - + THR THR - + RUD RUD - + ELE ELE - + AIL AIL - + GEA GEA - + ID0 ID0 - + ID1 ID1 - + ID2 ID2 - + Beeper Length Lunghezza suono - - + + X-Short Extra Corto - - + + Short Corto - - + + X-Long Extra Lungo - + Haptic Mode Modalità vibrazione - + Only Alarms Solo allarmi - - + + All Tutti - + Alarms Only Solo allarmi - + Timeshift from UTC Differenza in ore da GMT - + GPS Coordinates Coordinate GPS - + hh° (N/S) mm' ss''.dd - + NMEA - + Haptic Length Lunghezza vibrazione - + LCD Display Type Tipo display LCD @@ -749,122 +1171,122 @@ Mode 4: Recupera calib. e settaggi HW dal profilo scelto - + Speaker Altoparlante - + BeeperVoice Buzzer e voce - + SpeakerVoice Altoparlante e Voce - + Standard - + Optrex - + Speaker Volume Volume altoparlante - + Haptic Strength Intensità vibrazione (mod. HW) - + BackLight Brightness Luminosità retroilluminazione - + RotEnc Navigation Navigazione con Encoder - + BackLight Auto OFF after Auto spegnimento luce dopo - + StickScroll Scoll con stick - + CrossTrim Trim incrociati - + BackLight Switch Interruttore retroilluminazione - + BackLight On Stick Move Retroilluminazione su stick - + BackLight Invert Inversione retroilluminazione - + Country Code Codice paese - + Europe - + Japan - + America - + Metric Sistema Metrico - + Imperial Imperiale - + Measurement Units Unità di misura - + FrSky Internal Alarm Allarme interno FrSky - + PPMSim @@ -874,27 +1296,27 @@ Mode 4: Lingua per le voci - + Beep volume Volume Beeps - + Wav volume Volume file Wav - + Vario volume Volume per vario - + Background volume Volume sottofondo - + FAI Mode Modalità FAI @@ -904,273 +1326,415 @@ Mode 4: - + 4800 Baud - + 9600 Baud - + 14400 Baud - + 19200 Baud - + 38400 Baud - + 57600 Baud - + 76800 Baud - + 115200 Baud - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. Se abilitate la modalità FAI, il variometro, le funzioni di lettura della telemetria e gli schermi telemetrici verrano disabilitati. Questa funzione non è disattivabile dalla radio. - + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + Readonly Unlock Sblocco modalità sola lettura - + SC - + SE - + SA - + SF - + SH - + SD - + SB - + SG - + Input Ingresso - + Weight Peso - + Switch Interruttore + - - - + + += (Sum) += (Somma) + - - - + + := (Replace) := (Sostituisci) - - + + PPM 2 PPM 2 - - + + PPM 3 PPM 3 - - + + PPM 4 PPM 4 - + Telemetry Telemetria - + RSSI Alarm 1 Allarme RSSI 1 - - + + ---- ---- - - + + Yellow Giallo - - + + Orange Arancione - - + + Red Rosso - + RSSI Alarm 2 Allarme RSSI 2 - + NO DATA Alarm Allarme NO DATA - + Calibration Calibrazione - + STICK 1 STICK 1 - + STICK 2 STICK 2 - - + + + Pot (normal) + + + + + + Multipos Switch + + + + + S1 Type + + + + + S2 Type + + + + + Mid value Valore intermedio - + POT 4 POT 4 - + STICK 3 STICK 3 - - + + Negative span Corsa negativa - - + + Positive span Corsa positiva - + STICK 4 STICK 4 - + POT 1 POT 1 - + POT 2 POT 2 - + POT 3 POT 3 - + Battery Batteria - + v v - + PPM Multiplier Moltiplicatore PPM - + Current Corrente - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. Are you sure ? @@ -1180,149 +1744,410 @@ Questa funzione non è disabilitabile dalla radio. Siete sicuri ? - - + + Warning Avviso - + Wrong data in profile, radio calibration was not retrieved Dati errati nel profilo, la calibrazione della radio non è stata ripristinata - + Wrong data in profile, hw related parameters were not retrieved Dati errati nel profilo, i settaggi HW della radio non sono stati ripristinati - + Do you want to store calibration in %1 profile<br>overwriting existing calibration? Volete salvare la calibrazione e i settaggi nel profilo %1<br>sovrascrivendo i settaggi esistenti ? - + Calibration and HW parameters saved. Dati di calibrazione e settaggi HW salvati. + + Heli + + + Form + + + + + Invert Elevator + Elevatore + + + + Invert Aileron + Alettoni + + + + Invert Collective + Collettivo + + + + Invert + + + + + Off + NO + + + + 120 + 120 + + + + 120X + 120X + + + + 140 + 140 + + + + 90 + 90 + + + + Collective + Collettivo + + + + Swash Type + Tipo ciclico + + + + Swash Ring + Anello del ciclico + + + + InputsPanel + + + + Move Up + Muovi in Su + + + + + Ctrl+Up + Ctrl+Up + + + + + Move Down + Muovi in Giù + + + + + Ctrl+Down + Ctrl+Down + + + + Clear All Settings + + + + + Source(%1) + + + + + No Trim + No Trim + + + + Weight(%1) + + + + + Switch(%1) + + + + + Not enough available inputs! + + + + + Delete Selected Inputs? + + + + + &Add + &Aggiungi + + + + Ctrl+A + Ctrl+A + + + + &Edit + &Modifica + + + + Enter + Invio + + + + &Delete + &Elimina + + + + Delete + Elimina + + + + &Copy + + + + + Ctrl+C + Ctrl+C + + + + &Cut + &Taglia + + + + Ctrl+X + Ctrl+X + + + + &Paste + &Incolla + + + + Ctrl+V + Ctrl+V + + + + Du&plicate + Dup&lica + + + + Ctrl+U + Ctrl+U + + + + Clear Inputs? + + + + + Really clear all the inputs? + + + + + LogicalSwitchesPanel + + + Condition + Condizione + + + + V1 + V1 + + + + V2 + V2 + + + + AND + AND + + + + Duration + Durata + + + + Delay + Ritardo + + + + + LS%1 + + + + + &Delete + &Elimina + + + + Delete + Elimina + + + + &Copy + + + + + Ctrl+C + Ctrl+C + + + + &Cut + &Taglia + + + + Ctrl+X + Ctrl+X + + + + &Paste + &Incolla + + + + Ctrl+V + Ctrl+V + + MainWindow - - - - + + + + File loaded Documento caricato - + Display previous warning again at startup ? Mostrare il precedente avviso all'avvio ? - + Checking for updates Controllo aggiornamenti - - - - - + + + + + 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 ? - - - - - - - + + + + + Save As Salva come - + Executable (*.exe) Eseguibili (*.exe) - + New release available 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 - - - - + + No updates available at this time. Nessun aggiornamento disponibile. - + Would you like to launch the installer? Desiderate eseguire l'aggiornamento ? - - - - - + + + + + Error opening file %1: %2. Errore durante l'apertura del file %1: %2. - Firmware does not fit in flash, due to selected firmware options - Il firmware richiesto è troppo grande per la flash a causa delle opzioni selezionate - - - + Compilation server termporary failure, try later Guasto temporaneo del server di compilazione, riprovate più tardi - - + + Compilation server too busy, try later Il server di compilazione è occupato, provate più tardi - companion9x - Models and Settings Editor - %1 - profile %2 - Companion9x - EEPROM Editor - %1- profilo %2 - - - companion9x - Models and Settings Editor - %1 - Companion9x - EEPROM Editor - %1 - - - Firmware does not longer fit in program memory, due to selected firmware options - Il firmware selezionato è diventato troppo grande per la memoria della radio, a causa delle opzioni selezionate - - - - + + Unknown server failure, try later Errore del server sconosciuto, provare più tardi - Do you want to flash the firmware now ? - 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 ? @@ -1331,279 +2156,205 @@ 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 - - - - - - - - - - - - - + + + + + + + + + + + + + Error Errore - companion9x - EEPROM Editor - firmware %1 - profile %2 - Companion9x - EEPROM Editor - firmware %1- profilo %2 - - - companion9x - EEPROM Editor - firmware %1 - Companion9x - EEPROM Editor - firmware %1 - - - + Display previous message again at startup ? Mostrare il precedente avviso all'avvio ? - Firmware does not longer fit in flash, due to selected firmware options - Il firmware selezionato è diventato troppo grande per la flash, a causa delle opzioni slezionate - - - + Compilation server temporary failure, try later 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 - - - Firmware does not fit in program memory, due to selected firmware options - Il firmware richiesto è troppo grande per la memoria della radio a causa delle opzioni selezionate - - - + Do you want to write the firmware to the transmitter now ? 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. - Read EEPROM From Tx - Leggi la memoria dalla radio - - - Write %1 to EEPROM memory? - Scrivere %1 nella memoria della radio ? - - - The file %1 -has not been recognized as a valid EEPROM -Burn anyway ? - Il file %1 -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 - Backup EEPROM From Tx - Salva memoria della radio - - - Cannot check eeprom compatibility! Continue anyway? - Non posso controllare la compatibilità delle impostazioni! Continuare ugualmente ? - - - - + + Warning Avviso - Firmware in radio is of a different family of eeprom written, check file and preferences! - Il firmware nella radio è di una famiglia differente\n rispetto a quello della eEprom che si sta scrivendo.\n Controllare la eeprom e le preferenze! - - - Firmware in flash is outdated, please upgrade! - Il firmware nella radio è obsoleto, pianificate un aggiornamento! - - - Write EEPROM To Tx - Scrivi la memoria nella radio - - - Write Flash To Tx - Scrivi il fimware sulla radio - - - + Conversion failed Conversione fallita - Cannot convert EEProm for this firmware, original EEProm file will be used - Non posso convertire la eeprom per questo firmware, verrà usata la EEProm originale - - - Restore EEPROM To Tx - Ripristina memoria sulla Radio - - - + Restore failed Ripristino fallito - Cannot restore EEProm to TX, original EEProm file can be found at: %1 - Non posso ripristinare le impostazioni sulla radio, il file originale può essere trovato in %1 - - - Flash failed - Scrittura del firmware fallita - - - Cannot flash the TX, original EEProm file can be found at: %1 - Non posso aggiornare il firmware, la memoria dei settaggi originale può essere trovata in %1 - - - + Backup failed Salvataggio fallito - Cannot backup existing EEProm from TX, Flash process aborted - Non riesco a salvare la memoria dalla radio, l'aggiornamento firmware viene annullato - - - Read EEPROM memory to File - Scrivi le impostazioni della radio in un documento - - - Read Flash to File - Scrivi il firmware in un documento - - - - - - + + + + Read Models and Settings From Tx Leggi le impostazioni dalla radio - Load %1 to Models and Settings? - Scrivere %1 nella memoria della radio ? - - - + Firmware does not longer fit in the Tx, due to selected firmware options Il firmware selezionato è diventato troppo grande per la radio, a causa delle opzioni selezionate - + Firmware does not fit in the Tx, due to selected firmware options Il firmware richiesto è troppo grande per la radio a causa delle opzioni selezionate - + + The selected language will be used the next time you start Companion. + + + + + + + OK + + + + + The new theme will be loaded the next time you start Companion. + + + + + The icon size will be used the next time you start Companion. + + + + 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 ? @@ -1612,725 +2363,775 @@ 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 - - - - 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 - - - - - - &%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 - - - - Contributors &List... - E&lenco collaboratori... - - - Show companion9x contributors list - Mostra l'elenco di quelli che hanno contribuito a companion9x - - - - ChangeLog... - Cambiamenti... - - - Show companion9x changelog - 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 + + &Old Preferences Dialog... + - Configure software for reading from and writing to the transmitter - Configura il software per la lettura/scrittura del microprocessore - - - &Configure Communication... - &Configure... - - - Configure software for communication with the transmitter - 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 - - - &Write EEPROM To Tx - &Scrivi la memoria nella radio - - - - Ctrl+Alt+W - Ctrl+Alt+W - - - Write EEPROM to transmitter - Scrivi le impostazioni nella radio - - - &Read EEPROM From Tx - &Leggi la memoria dalla radio - - - - Ctrl+Alt+R - Ctrl+Alt+R - - - Read EEPROM from transmitter - Leggi le impostazioni dalla radio - - - Write Flash memory - Scrivi il firmware della radio - - - Write flash memory to transmitter - Scrivi il firmware nella radio - - - Write EEPROM memory from file - Scrivi le impostazioni da un documento - - - Write EEPROM memory from file to transmitter - Scrivi le impostazioni della radio da un documento su disco - - - Read EEPROM memory to file - Scrivi la memoria in un documento - - - Read EEPROM memory from transmitter to file - Leggi le impostazioni dalla radio e scrivile in un documento - - - Read Flash memory - Leggi il firmware - - - Read flash memory to transmitter - Leggi il firmware dalla radio - - - - &Configure... - &Configura... - - - Configure burning software - Configura il programmatore del microprocessore - - - - - - Companion - Models and Settings Editor - %1 - profile %2 + Used the old Preferences Dialog - - - - - 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 + + &Application Preferences... + Edit application preferences + + + + + Classic + + + + + The multicolor classical Companion icon theme + + + + + A monochrome black icon theme + + + + + A monochrome white icon theme + + + + + A monochrome blue icon theme + + + + + Small + + + + + Use small toolbar icons + + + + + Use normal size toolbar icons + + + + + Normal + Normale + + + + Use big toolbar icons + + + + + Big + + + + + Use huge toolbar icons + + + + + Huge + + + + + System default language + + + + + Use system default language in menus + + + + + Czech + Ceco + + + + Use Czech in menus + + + + + German + Tedesco + + + + Use German in menus + + + + + English + Inglese + + + + Use English in menus + + + + + French + Francese + + + + Use French in menus + + + + + Italian + Italiano + + + + Use Italian in menus + + + + + Hebrew + + + + + Use Hebrew in menus + + + + + Polish + + + + + Use Polish in menus + + + + + Portuguese + Portoghese + + + + Use Portuguese in menus + + + + + Swedish + Svedese + + + + Use Swedish in menus + + + + + Russian + + + + + Use Russian in menus + + + + + Manuals and other Documents + + + + + Open the OpenTX document page in a web browser + + + + + Set Menu Language + + + + + &Settings + + + + + + &%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 + + + + &Check for updates... + &Controlla aggiornamenti... + + + + Contributors &List... + E&lenco collaboratori... + + + + ChangeLog... + Cambiamenti... + + + + A new release of Companion is available please check the OpenTX website! + + + + + OpenTX Home Page: <a href='%1'>%1</a> + + + + + The OpenTX Companion project was originally forked from <a href='%2'>eePe</a> + + + + + If you've found this program useful, please support by <a href='%1'>donating</a> + + + + + Version %1, %3 + + + + + Firmware ChangeLog... + Cambiamenti del firmware... + + + + Show firmware changelog + Mostra l'elenco dei cambiamenti del firmware + + + + Compare... + Confronta... + + + + Compare models + Confronta due modelli + + + + 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 connection software... + + + + + Configure software for reading from and writing to the transmitter + Configura il software per la lettura/scrittura 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 + + + + Ctrl+Alt+W + Ctrl+Alt+W + + + + Ctrl+Alt+R + Ctrl+Alt+R + + + + + + + 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? + + + + + + Compilation server requires registration, please check OpenTX web site + + + + + About Companion + + + + + &Downloads and Profiles... + + + + + Firmware and voice file downloads as well as profile definition. + + + + + Check for new version of Companion + + + + + Show Companion contributors list + + + + + Show Companion changelog + + + + + Configure transmitter start screen... + + + + &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 - + + Set Icon Theme + + + + + Set Icon Size + + + + &File &Documento - + &Edit &Modifica - &Burn - &Programma - - - - &Window - &Finestra - - - + &Help &Aiuto - + File Documento - + Edit Modifica - Burn - Scrivi - - - + Help Aiuto - + Ready Pronto - + Unable to find file %1! Impossibile trovare il file %1! - Invalid EEPROM File %1 - File impostazioni non valido %1 - - - + Error reading file %1: %2. Error durante la lettura del file %1: %2. - - Invalid binary EEPROM File %1 - File binario delle impostazioni non valido %1 - MdiChild @@ -2340,191 +3141,187 @@ Scriverlo ugualmente ? byte liberi - + Do you want to use model wizard? Utilizzare l'assistente di configurazione dei modelli ? - - - + + + Companion - + Ask this question again ? Volete che vi sia ancora richiesto ? - + Editing model %1: Modifica modello %1: - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + Error Errore - - + + Unable to find file %1! Impossibile trovare il file %1! - - - - + + + + Error opening file %1: %2. Errore durante l'apertura del file %1: %2. - - + + Invalid EEPROM File %1 File impostazioni non valido %1 - - + + Error reading file %1: %2. Error durante la lettura del file %1: %2. - + Invalid binary EEPROM File %1 File binario delle impostazioni non valido %1 - - - - + + + + Save As Salva Come - - - - + + + + Cannot write file %1: %2. Non posso scrivere il file %1: %2. - - + + Error writing file %1: %2. Errore durante la scrittura del file %1: %2. - + 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 - - - + + + 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. - - - + + + Backup EEPROM From Tx Salva impostazioni dalla radio - + Cannot check eeprom compatibility! Continue anyway? Non posso controllare la compatibilità della eEprom! Continuare ugualmente ? - - + + Warning Avviso - + Firmware in radio is of a different family of eeprom written, check file and preferences! Il firmware nella radio è di una famiglia differente\n rispetto a quello della eEprom che si sta scrivendo.\n Controllare la eeprom e le preferenze! - + Firmware in flash is outdated, please upgrade! Il firmware nella radio è obsoleto, pianificate un aggiornamento! - + Write EEPROM To Tx Scrivi le impostazioni nella radio - + Open Apri - + Invalid binary backup File %1 File di backup binario non valido %1 - companion9x - companion9x - - - + %1 has been modified. Do you want to save your changes? %1 è stato modificato. Salvare le modifiche ? - + Cannot write temporary file! Errore durante la scittura del file temporaneo! @@ -2532,129 +3329,121 @@ Salvare le modifiche ? MixerDialog - + Dialog Dialogo - + Source Sorgente - - - - + + + + The source for the mixer Sorgente da miscelare - + Weight Peso - - - - + Offset Spostamento - + Include Trim Include i Trim - + Curve Curva - + The curve used by the mix Curva utilizzata dalla miscelazione - + Switch Interruttore - - - + + + GV VG - + Switch used by the mix. If blank then the mix is considered to be "ON" all the time. Interruttore che controlla la miscelazione. Se vuoto la miscelazione è sempre attiva. - + Yes Si - + No No - + Warning Avviso - - Curve/Differential - Curva/Differenziale - - - + Mixer warning. Setting this value will cause a beep to be emmitted when this value is active. Allarme miscelazione. Impostare questo valore causa un'allarme in corrispondenza del valore. - + OFF Spento - + 1 Beep 1 Beep - + 2 Beep 2 Beep - + 3 Beep 3 Beep - + Multiplex Miscelatore - + Flight modes Fasi di volo - + Multiplexer This determines how mixer values are added. @@ -2671,105 +3460,95 @@ Determina come il valore viene aggiunto alla miscelazione. "R" significa che il valore rimpiazza il valore attuale del canale. Se l'interruttore è spento questo valore verrà ignorato. - + ADD AGGIUNGI - + MULTIPLY MOLTIPLICA - + REPLACE SOSTITUISCI - + Include DR/Expo Include DR/Espo - + 0 0 - + 1 1 - + 2 2 - + 3 3 - + 4 4 - + 5 5 - + 6 6 - + 7 7 - + 8 8 - - Enable FM Trim - Abilita FM Trim - - - + Name Nome - - Fix Offset - Spostamento fisso - - - + Delay Ritardo - + Slow Rallentamento - + Up Su - - - - + + + + <!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; } @@ -2794,2544 +3573,286 @@ 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;">Se il rallentamento non è zero allora la velocità verrà impostata al valore selezionato -&gt; il valore indica il numero di secondi per passare da -100 a 100.</p></body></html> - + Down Giù - + DEST -> X%1 - + DEST -> CH%1%2 DEST -> CH%1%2 - - - FM Trim Value - Valore FM Trim - - - + Rud - + Ele - + Thr - + Ail + + MixesPanel + + + + Move Up + Muovi in Su + + + + + Ctrl+Up + Ctrl+Up + + + + + Move Down + Muovi in Giù + + + + + Ctrl+Down + Ctrl+Down + + + + Clear Mixes + Cancella Miscelazioni + + + + + + X%1 + + + + + + + CH%1%2 + CH%1%2 + + + + Weight(%1) + + + + + Switch(%1) + + + + + No Trim + No Trim + + + + No DR/Expo + No DR/Expo + + + + Offset(%1) + + + + + Delay(u%1:d%2) + Ritarda(s%1:g%2) + + + + Slow(u%1:d%2) + Rallenta(s%1:g%2) + + + + Warn(%1) + Avviso(%1) + + + + Not enough available mixers! + Non ci sono più miscelazioni disponibili! + + + + Delete Selected Mixes? + Cancellare le miscelazioni selezionate ? + + + + &Add + &Aggiungi + + + + Ctrl+A + Ctrl+A + + + + &Edit + &Modifica + + + + Enter + Invio + + + + &Delete + &Elimina + + + + Delete + Elimina + + + + &Copy + + + + + Ctrl+C + Ctrl+C + + + + &Cut + &Taglia + + + + Ctrl+X + Ctrl+X + + + + &Paste + &Incolla + + + + Ctrl+V + Ctrl+V + + + + Du&plicate + Dup&lica + + + + Ctrl+U + Ctrl+U + + + + Clear Mixes? + Cancellare le miscelazioni ? + + + + Really clear all the mixes? + Sicuri di voler cancellare le miscelazioni ? + + ModelEdit - + Dialog Dialogo - + Simulate Simula Modello - + Setup Impostazioni - - Model Name - Nome del modello + + Heli + - - Timer1 - Temporizzatore1 + + Inputs + - - - mm:ss - mm:ss + + Logical Switches + - - - Count Down - Decrementa + + Switch Assignment + - - - Count Up - Incrementa - - - - Timer2 - Temporizzatore2 - - - - Trim Increment - Incremento del Trim - - - - Exponential - Esponenziale - - - - Extra Fine - Extra Fine - - - - Fine - Fine - - - - Medium - Medio - - - - Coarse - Ampio - - - - Throttle Trim - Trim Motore - - - - Throttle Expo - Esponenziale Motore - - - - Center beep - Avviso centraggio - - - - - - - - - - - - RUD - RUD - - - - - - - - - - - - - - - ELE - ELE - - - - - - - - THR - THR - - - - - - - - - - - - - AIL - AIL - - - - P1 - P1 - - - - P2 - P2 - - - - P3 - P3 - - - - Pulse Shift (polarity) - Polarità impulso - - - - - - Positive - positivo - - - - - - Negative - Negativo - - - - Extended Limits - Limiti estesi - - - - - - Protocol - Protocollo - - - - - + Channels Canali - - - - - - - ch - ch - - - - - - PPM delay - Ritardo PPM - - - - - - usec - usec - - - - Extended Trims - Trim estesi - - - - Throttle2Trig - Avvia T2 con motore - - - - - - PPM Frame Length - Lunghezza segnale PPM - - - - - - mSec - mSec - - - - - Heli Setup - Elicottero - - - - Swash Type - Tipo ciclico - - - - - Off - NO - - - - 120 - 120 - - - - 120X - 120X - - - - 140 - 140 - - - - 90 - 90 - - - - Collective - Collettivo - - - - Swash Ring - Anello del ciclico - - - - - - Invert - Invers - - - - Invert Elevator - Elevatore - - - - Invert Aileron - Alettoni - - - - Invert Collective - Collettivo - - - - - - - - - - - - Fade In - Tempo transizione in ingresso - - - - - - - - - - - - Fade Out - Tempo transizione in uscita - - - - - - - - - - - - trim2 - trim2 - - - - - - - - - - - - trim1 - trim1 - - - - - DSM Type - Tipologia DSM - - - - - LP4/LP5 - LP4/LP5 - - - - - DSM2only - DSM2 - - - - - DSM2/DSMX - DSM2/DSMX - - - - - RX Number - ID Ricevente - - - - Throttle Source - Throttle Trace - Sorgente motore - - - - - CH01 - CH01 - - - - - CH02 - CH02 - - - - - CH03 - CH03 - - - - - CH04 - CH04 - - - - - CH05 - CH05 - - - - - CH06 - CH06 - - - - - CH07 - CH07 - - - - - CH08 - CH08 - - - - - CH09 - CH09 - - - - - CH10 - CH10 - - - - - CH11 - CH11 - - - - - CH12 - CH12 - - - - - CH13 - CH13 - - - - - CH14 - CH14 - - - - - CH15 - CH15 - - - - - CH16 - CH16 - - - - - Check - Controllo - - - - Model Voice - Voce per il modello - - - - Flight Mode 0 (Default) - Fase di volo 0 (Predefinita) - - - - - - - - - - - - trim4 - trim4 - - - - - - - - - - - - trim3 - trim3 - - - - - - - - - - - - GVAR1 - VARG1 - - - - - - - - - - - - GVAR2 - VARG2 - - - - - - - - - - - - GVAR3 - VARG3 - - - - - - - - - - - - GVAR4 - VARG4 - - - - - - - - - - - - GVAR5 - VARG5 - - - - - - - - - - - - Rotary encoder B - Encoder Rotativo B - - - - - - - - - - - - Rotary encoder A - Encoder Rotativo A - - - - - - - - - - - - - - - - Switch - Interruttore - - - Expos/DR - Esponenziali/DR - - - + Mixes Miscelazioni - - Limits - Limiti - - - NOR - NOR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INV - INV - - - - - - Channel - Canale - - - - - - Offset - Sposta - - - - - - - - Min - Min - - - - - - - - Max - Max - - - + Curves Curve - - Curve 3 - Curva 3 - - - - Curve 4 - Curva 4 - - - - Curve 5 - Curva 5 - - - - Curve 6 - Curva 6 - - - - Curve 7 - Curva 7 - - - - Curve 8 - Curva 8 - - - - Curve 9 - Curva 9 - - - - Curve 10 - Curva 10 - - - - Curve 11 - Curva 11 - - - - Curve 12 - Curva 12 - - - - Curve 13 - Curva 13 - - - - Curve 14 - Curva 14 - - - - Curve 15 - Curva 15 - - - - Curve 16 - Curva 16 - - - - Curve 2 - Curva 2 - - - - Curve 1 - Curva 1 - - - - Clear All Curves - Azzera tutte le curve - - - - Custom switches - Int. Personalizzati - - - - - - - Function - Funzione - - - - - V1 - V1 - - - - - V2 - V2 - - - - Safety Switches - Int. Sicurezza - - - - Value - Valore - - - - - TriggerB - - - - - Disable Throttle Warning - Disabilita avviso Motore - - - - Switch startup Warning - Avviso interruttori all'avvio - - - - GEA - GEA - - - - 3POS - - - - - - - ON - Acceso - - - - - OFF - Spento - - - - ID0 - ID0 - - - - ID1 - ID1 - - - - ID2 - ID2 - - - - REa - REa - - - - REb - REb - - - - Instant Trim - Trim Istantanei - - - - - Persistent - Persistente - - - - - MinuteBeep - Suono al minuto - - - - - CountDownBeep - Suono nel conto alla rovescia - - - - RS - - - - - ModelSetup - Impostazione modello - - - - SB - - - - - SD - - - - - SA - - - - - SC - - - - - SG - - - - - SE - - - - - SF - - - - - RF Module 1 - Modulo n° 1 - - - - RF Module 2 - Modulo n° 2 - - - - Reverse Throttle Operation - Stick motore invertito - - - - Model Image - Immagine modello - - - - 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. - - - Stick motore inverso. -Se l'opzione selezionata lo stick motore verrà rovesciato. Il minimo sarà in avanti, anche i trim verranno rovesciati e anche gli avvisi. - - - - - - Master - Maestro - - - - Slave - Allievo - - - - Trainer Mode - Modalità maestro allievo - - - - Master/Trainer Port - Porta maestro/allievo - - - - - - Start - Inizio - - - - - Polarity - Polarità - - - - Failsafe - Impostazioni sicurezza - - - - External module - Modulo esterno - - - - - Failsafe Mode - Modalità FailSafe - - - - - Hold - Mantieni - - - - - Custom - Personalizzato - - - - - No Pulses - No impulsi - - - - Internal Module - Modulo interno - - - + Flight Modes Fasi di volo - - - - - - - - - - Flight Mode Name - Nome fase di volo - - - - GVAR6 - VARG6 - - - - GVAR7 - VARG7 - - - - FM 1 - FV 1 - - - - FM 2 - FV 2 - - - - FM 3 - FV 3 - - - - FM 4 - FV 4 - - - - FM 5 - FV 5 - - - - FM 6 - FV 6 - - - - FM 7 - FV 7 - - - - FM 8 - FV 8 - - - - - Center - Centro - - - - - Sym - Simm - - - - - Curve type - Tipo curva - - - - 3 points - 3 punti - - - - 3 points custom - 3 punti personalizzata - - - - 5 points - 5 punti - - - - 5 points custom - 5 punti personalizzata - - - - 9 points - 9 punti - - - - 9 points custom - 9 punti personalizzata - - - - 17 points - 17 punti - - - - 17 points custom - 17 punti personalizzata - - - - Curve name - Nome curva - - - - Curve Creator - Assistente Curve - - - - Both - Entrambi - - - - x>0 - - - - - x<0 - - - - - Linear - Lineare - - - - Single Expo - Esponenziale singola - - - - Symmetrical f(x)=-f(-x) - Simmetrycal f(x)=-f(-x) - Expo simmetrica f(x)=-f(-x) - - - - Symmetrical f(x)=f(-x) - Simmetrycal f(x)=f(-x) - Expo simmetrica f(x)=f(-x) - - - - Side - Lato - - - - Y at X=0 - Y a X=0 - - - - Y at X=100 - Y a X=100 - - - - Coefficient - Coefficiente - - - - Y at X=-100 - Y a X=-100 - - - - Apply - Applica - - - - CS9 - CSw9 - CS9 - - - - - Duration - Durata - - - - CSF - CSwF - CSF - - - - CSD - CSwD - CSD - - - - - AND - AND - - - - - Delay - Ritardo - - - - Custom Functions - Funzioni personalizzate - - - - - Param - Parametro - - - - - Enable - Abilita - - - + Telemetry Telemetria - - - - - A1 - A1 - - - - - FAS - FAS - - - - CEL - CEL - - - - Alti - - - - - Alti+ - - - - - Vario - Variometro - - - - Sink Min - Sunk Min - Min Discesa - - - - - Unit - Unità - - - - - Raw (-) - Grezza (-) - - - - - Max Value - Valore MAX - - - - - Alarm 1 - Allarme 1 - - - - - - - - - ---- - ---- - - - - - - - - - Yellow - Giallo - - - - - - - - - Orange - Arancione - - - - - - - - - Red - Rosso - - - - - - - < - < - - - - - - - > - > - - - - - - Alarm 2 - Allarme 2 - - - - - Min Value - Valore Min - - - - - - - A2 - A2 - - - - RSSI - RSSI - - - - Alarm 1 - Allarme 1 - - - - Serial Protocol - Protocollo seriale - - - - Units - Unità - - - - None - Nessuno - - - - FrSky Sensor Hub - FrSky Sensor Hub - - - - Metric - Sistema Metrico - - - - - (00:00:00) - - - - - Sticks - Expo/DR - - - - Show channels names in mixes - Mostra i nomi dei canali definiti in "Limiti" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- - --- - - - - CS6 - CSw6 - CS6 - - - - CS1 - CSw1 - CS1 - - - - CS8 - CSw8 - CS8 - - - - CS7 - CSw7 - CS7 - - - - CSA - CSwA - CSA - - - - CSB - CSwB - CSB - - - - CSC - CSwC - CSC - - - - CS5 - CSw5 - CS5 - - - - CS3 - CSw3 - CS3 - - - - CS2 - CSw2 - CS2 - - - - CSE - CSwE - CSE - - - - CSG - CSwG - CSG - - - - CS4 - CSw4 - CS4 - - - - CST - CSwT - CST - - - - CSM - CSwM - CSM - - - - CSP - CSwP - CSP - - - - CSH - CSwH - CSH - - - - CSO - CSwO - CSO - - - - CSN - CSwN - CSN - - - - CSQ - CSwQ - CSQ - - - - CSR - CSwR - CSR - - - - CSS - CSwS - CSS - - - - CSL - CSwL - CSL - - - - CSK - CSwK - CSK - - - - CSJ - CSwJ - CSJ - - - - CSI - CSwI - CSI - - - - CSU - CSwU - CSU - - - - CSV - CSwV - CSV - - - - CSW - CSwW - CSW - - - - Volt source - Misura della tensione - - - - Imperial - Imperiale - - - - Current source - Misura della corrente - - - - NONE - Nessuno - - - - 2 - 2 - - - - 3 - 3 - - - - 4 - 4 - - - - Blades - Pale dell'elica - - - - Sink Max - Sunk Max - Max Discesa - - - - Climb Max - Raise Max - Max Salita - - - - Climb Min - Raise Min - Min Salita - - - - Display altitude in toolbar - Mostra l'altitudine sulla barra - - - - - Volts (V) - Voltaggio (V) - - - - - Amps (A) - Corrente (A) - - - - - Speed (m/s or ft/s) - Velocità (m/s o ft/s) - - - - - Speed (km/h or miles/h) - Velocità (km/h o miglia/h) - - - - - Meters (m or ft) - Metri (m o ft) - - - - - Temp (°) - Temperatura (°) - - - - - Fuel (%) - Carburante (%) - - - - - mAmps (mA) - Corrente (mA) - - - - - - Source - Sorgente - - - - - - Gauge - Barra - - - - - - Gauge 1 - Barra 1 - - - - - - Gauge 2 - Barra 2 - - - - - - Gauge 3 - Barra 3 - - - - - - Gauge 4 - Barra 4 - - - - Altimetry / Vario - Altimetria / Variometro - - - - Vario source - Sorgente per il Vario - - - - Vario limits - Limiti per il Vario - - - - Use GPS as altitude source - Usa il GPS per l'altitudine - - - - Telemetry screen 1 - Schermo telemetria 1 - - - - - - Custom Screen Type - Tipo schermo personalizzato - - - - - - Nums - Valori - - - - - - Bars - Barre - - - - Telemetry screen 2 - Schermo telemetria 2 - - - - Telemetry screen 3 - Schermo telemetria 3 - - - - Templates - Modelli - - - - - - - Ctrl+Up - Ctrl+Up - - - - - - - Ctrl+Down - Ctrl+Down - - - - Clear Expo Settings - Cancella Esponenziali - - - - Clear Mixes - Cancella Miscelazioni - - - - Weight - Peso - - - - - - CH%1%2 - CH%1%2 - - - - - DISABLED - DISABILITATO - - - - Ele - Elevatore - - - - Thr - Motore - - - - Ail - Alettoni - - - - Rud - Direzionale - - - - - Flight modes - Fasi di volo - - - - - Flight mode - Fase di volo - - - - - - X%1 - - - - - No Trim - No Trim - - - - No DR/Expo - No DR/Expo - - - - Delay(u%1:d%2) - Ritarda(s%1:g%2) - - - - Slow(u%1:d%2) - Rallenta(s%1:g%2) - - - - Warn(%1) - Avviso(%1) - - - - CF%1 - CF%1 - - - - Error - Errore - - - - Unable to find sound file %1! - Impossibile trovare il file sonoro %1! - - - - Winged Shadow How High - Winged Shadow How High - - - - Winged Shadow How High (not supported) - Winged Shadow How High (non supportato) - - - - - Range - Intervallo - - - - Simple 4-CH - 4 Canali (Modello base) - - - - T-Cut - Taglio Motore - - - - Sticky T-Cut - Taglio motore con controllo comando - - - - V-Tail - Coda a V - - - - Elevon\Delta - Elevoni/Ala a delta - - - - Heli Setup with gyro gain control - Elicottero con controllo giroscopio - - - - Gyro gain control - Controllo giroscopio - - - - Heli Setup (Futaba's channel assignment style) - Elicottero (Assegnazione canali alla Futaba) - - - - Heli Setup with gyro gain control (Futaba's channel assignment style) - Elicottero con controllo giroscopio (Assegnazione canali alla Futaba) - - - - Gyro gain control (Futaba's channel assignment style) - Controllo giroscopio (Assegnazione canali alla Futaba) - - - - Servo Test - Controllo servocomandi - - - - MultiCopter - Multirotore - - - - Use Model Config Wizard - Usa assistente di configurazione modelli - - - - Editing curve %1 - Modifica curva %1 - - - - Not enough available mixers! - Non ci sono più miscelazioni disponibili! - - - - Not enough available expos! - Non ci sono più esponenziali disponibili! - - - - Delete Selected Mixes? - Cancellare le miscelazioni selezionate ? - - - - Delete Selected Expos? - Cancellare le impostazioni dell'esponenziale selezionate ? - - - - - &Add - &Aggiungi - - - - - Ctrl+A - Ctrl+A - - - - - &Edit - &Modifica - - - - - Enter - Invio - - - - - - - &Delete - &Elimina - - - - - - - Delete - Elimina - - - - - - - &Copy - Co&pia - - - - - - - Ctrl+C - Ctrl+C - - - - - - - &Cut - &Taglia - - - - - - - Ctrl+X - Ctrl+X - - - - - - - &Paste - &Incolla - - - - - - - Ctrl+V - Ctrl+V - - - - - Du&plicate - Dup&lica - - - - - Ctrl+U - Ctrl+U - - - - Are you sure you want to delete curve %1 ? - Sicuro di voler cancella re la curva %1 ? - - - - - - - AIL2 - - - - - - - - ELE2 - - - - - - - - - - FLAPS - - - - - - - - - - FLAP%1 - - - - - - - - PITCH - - - - - - - - - - - - GYRO - - - - - - SPOIL - - - - - - SPOIL%1 - - - - - - RUD2 - - - - - Really clear existing mixes on CH6? - Sicuri di voler cancellare le miscelazioni sul canale 6 ? - - - - Really clear existing mixes on CH5? - Sicuri di voler cancellare le miscelazioni sul canale 5? - - - - Not enough free points in eeprom to store the curve. - Non ci sono punti liberi a sufficienza per il tipo di curva. - - - - - - - Move Up - Muovi in Su - - - - - - - Move Down - Muovi in Giù - - - - S1 - - - - - S2 - - - - - LS - - - - - - Expo - Espo - - - - - Curve - Curva - - - - FMTrim - FMTrim - - - - Diff - Diff - - - - - - - CH %1 - CH %1 - - - - Apply Template? - Applicare il modelo ? - - - - Apply template "%1"? - Applicare il modello "%1"? - - - - Clear Expos? - Cancellare gli esponenziali ? - - - - Really clear all the expos? - Sicuri di voler cancellare gli esponenziali ? - - - - - - Clear Mixes? - Cancellare le miscelazioni ? - - - - Really clear all the mixes? - Sicuri di voler cancellare le miscelazioni ? - - - + Clear Curves? Cancellare le curve ? - + Really clear all the curves? Sicuri di voler cancellare le curve ? @@ -5339,132 +3860,264 @@ Se l'opzione selezionata lo stick motore verrà rovesciato. Il minimo sarà ModelsListWidget - + &Edit &Modifica - + &Restore from backup &Ripristina da backup - + &Model Wizard &Assistente di configurazione - + &Delete &Elimina - + Delete Elimina - + &Copy &Copia - + Ctrl+C Ctrl+C - + &Cut &Taglia - + Ctrl+X Ctrl+X - + &Paste &Incolla - + Ctrl+V Ctrl+V - + D&uplicate D&uplica - + Ctrl+U Ctrl+U - + &Use as default &Predefinito - + P&rint model S&tampa modello - + Alt+R ALT+T - + Alt+S Alt+S - + &Simulate model Sim&ula modello - + General Settings Impostazioni generali radio - + Delete Selected Models? Cancellare i modelli selezionati ? - - + + Cannot delete default model. Non posso cancellare il modello predefinito. - + Cannot cut default model. Non posso tagliare il modello predefinito. - + Do you want to overwrite TX general settings? Volete sovrascrivere le impostazioni generali della radio ? - + You are pasting on an not empty model, are you sure? State copiando su un modello non vuoto, siete sicuri ? - + No free slot available, cannot duplicate Nussun spazio di memoria libero, non posso duplicare + + Module + + + Form + + + + + Failsafe Mode + Modalità FailSafe + + + + Start + Inizio + + + + PPM delay + Ritardo PPM + + + + usec + usec + + + + Negative + Negativo + + + + Positive + positivo + + + + RX Number + ID Ricevente + + + + Master + Maestro + + + + Slave + Allievo + + + + Polarity + Polarità + + + + Trainer Mode + Modalità maestro allievo + + + + mSec + mSec + + + + PPM Frame Length + Lunghezza segnale PPM + + + + Label + + + + + + ch + ch + + + + Channels + Canali + + + + Hold + Mantieni + + + + Custom + Personalizzato + + + + No Pulses + No impulsi + + + + Failsafe Positions + + + + + Protocol + Protocollo + + + + ModulePanel + + + Trainer Output + + + + + Internal Radio System + + + + + External Radio Module + + + QObject @@ -5474,1954 +4127,1815 @@ Se l'opzione selezionata lo stick motore verrà rovesciato. Il minimo sarà FV %1 - + + Input%1 + + + + + Polish + + + + + CH%1 + CH%1 + + + No No - + RotEnc A - + Rot Enc B - + Rot Enc C - + Rot Enc D - + Rot Enc E - + Safety %1 - + Trainer - + Trainer RUD - + Trainer ELE - + Trainer THR - + Trainer AIL - + Instant Trim Trim Istantanei - + Play Sound - + Play Track - + Start Logs - + Play Haptic - + + a>x + + + + + a<x + + + + + |a|>x + + + + + |a|<x + + + + + AND + AND + + + + OR + + + + + XOR + + + + + a=b + + + + + a!=b + + + + + a>b + + + + + a<b + + + + + a>=b + + + + + a<=b + + + + + d>=x + + + + + |d|>=x + + + + + a~x + + + + + Timer + + + + + Sticky + + + + + Stay + + + + + Unknown + + + + + STAY(%1, [%2:%3]) + + + + + STICKY(%1, %2) + + + + + TIMER(%1, %2) + + + + Reset - + + Set Timer %1 + + + + Vario Variometro - + Volume - + Backlight - + Play Value - - + + + --- --- - + Rud Trim - + Ele Trim - + Thr Trim - + Ail Trim - + Rot Enc - + English Inglese - + French Francese - + Italian Italiano - + German Tedesco - + Czech Ceco - + Slovak Slovacco - + Spanish Spagnolo - + Portuguese Portoghese - + Swedish Svedese - - CH - CH - - - - + + No repeat Non ripetere - + %1 sec - + Play Both - + Background Music - + Background Music Pause - - Adjust GV1 - Aggiusta VG1 - - - - Adjust GV2 - Aggiusta VG2 - - - - Adjust GV3 - Aggiusta VG3 - - - - Adjust GV4 - Aggiusta VG4 - - - - Adjust GV5 - Aggiusta VG5 - - - + Delay %1 sec Ritardo %1 sec - + Duration %1 sec Durata %1 sec - - - + + + + + + <font color=red><b>Inconsistent parameter</b></font> <font color=red><b>Parametro inconsistente</b></font> - - + + + All - - + + + Telemetry - + + Value Valore - + + Decr: - + + Incr: - + + Played once, not during startup + + + + %1s - + Value Valore - + Source Sorgente - + GVAR VARG - + Increment Incremento - + !Flight mode %1 !Fase di volo %1 - + Flight mode %1 Fase di volo %1 - - Diff - - - - - Expo - - - - - Own trim - Legato alla fase - - - - Flight mode %1 trim - Trim Fase di Volo %1 - - - + Own value Legato alla fase - + Flight mode %1 value Valore Fase di Volo %1 - + Keys Tasti - + Sticks Leve - + Keys + Sticks Tasti + Leve - + + -GV%1 -VG%1 - - (-GV%1) - (-VG%1) + + Adjust GV%1 + - + + Rotary Encoder + + + + Yellow Giallo - + Orange Arancione - + Red Rosso - + Winged Shadow How High Winged Shadow How High - + Winged Shadow How High (not supported) Winged Shadow How High (non supportato) - + FrSky Sensor Hub FrSky Sensor Hub - + + None Nessuno - + Imperial Imperiale - + Metric Sistema Metrico - + Extra Fine Extra Fine - + Fine Fine - + Medium Medio - + Coarse Ampio - + Exponential Esponenziale - + Count Up Incrementa - + Count Down Decrementa - + %1:%2, %1:%2, - + : %1 Channels, %2usec Delay : %1 Canali, %2usec Ritardo - + + Flight modes(%1) + + + + + Flight mode(%1) + + + + Rudder Direzionale - + Elevator Elevatore - + Throttle Motore - + Aileron Alettoni - - + + + GV%1 VG%1 - - (GV%1) - (VG%1) - - - - - - + + + + ---- ---- - - - RUD - RUD - - - - - ELE - ELE - - - - - - + + THR THR - - - AIL - AIL - - - - - + + + P1 P1 - - - + + + P2 P2 - - - + + + P3 P3 - + + + REa REa - + + + REb REb - + Alt Alt - + Rpm - + Fuel - + Speed - + Dist - + GPS Alt - + Cell - + MAX - - + + Rud - - + + Ele - - + + Thr - - + + Ail - - 3POS - - - - - - + + + + Timer1 - - - + + + + Timer2 - + A1 A1 - + A2 A2 - + T1 - + T2 - - Curve - Curva - - - - - - - Flight modes settings on expos not exported - Le impostazioni delle fasi negli esponenziali non sono state esportate - - - - gruvin9x doesn't have trims as source - Gruvin9x non accetta i trim come sorgenti - - - - gruvin9x doesn't have swappable trims - Gruvin9x non accetta l'incroco dei trim - - - - gruvin9x on this board doesn't have Rotary Encoders - Gruvin9x su questa piastra non ha gli Encoder Rotativi - - - - gruvin9x does not support Custom Switch function %1 - gruvin9x non supporta la funzione %1 negli interruttori personalizzati - - - - gruvin9x only accepts %1 expos - gruvin9x accetta solamente %1 esponenziali - - - - - gruvin9x doesn't support custom curves as curve%1, curve as been exported as fixed point - gruvin9x non supporta curve customizzate per la curva %1, la curva viene esportata come curva a punti fissi - - - - - gruvin9x doesn't support curve with %1 point as curve%2 - gruvin9x non supporta curve con %1 punti come curva %2 - - - - - - Open9x doesn't allow Curve%1 in expos - Open9x non consente la Curva %1 negli esponenziali - - - - + + Simultaneous usage of expo and curves is no longer supported L'uso simultaneo degli esponenziali e delle curve non è più supportato - - - - - - - - Flight modes settings on mixers not exported - Le impostazioni delle fasi nelle miscelazioni non sono state esportate - - - - - Flight mode settings on mixers not exported - Le impostazioni delle fasi nelle miscelazioni non sono state esportate - - - - - - - This version of open9x does not support Custom Switch function %1 - Questa versione di open9x non supporta la Funzione %1 negli interruttori personalizzati - - - - - - - - - open9x only accepts %1 points in all curves - open9x accetta solamente %1 punti in tutte le curve - - - + openTx only accepts %1 points in all curves openTx accetta solamente %1 punti in tutte le curve - - - + + + + OpenTX on this board doesn't accept this function OpenTX in questa piattaforma non accetta la funzione - - + + OpenTX doesn't accept this protocol OpenTX non accetta questo protocollo - + OpenTX doesn't allow this number of channels OpenTX non consente questo numero di canali - - - - - - - - - Open9x on this board doesn't have Rotary Encoders - Open9x su questa piastra non ha gli Encoder Rotativi - - - - - - - - - - - - - - - - - - - - - Open9x doesn't accept this protocol - Open9x non accetta questo protocollo - - - + Simultaneous usage of expo and curves is no longer supported in open9x L'uso simultaneo degli esponenziali e delle curve non è più supportato in open9x - - - open9x on this board doesn't have Rotary Encoders - Open9x su questa piastra non ha gli Encoder Rotativi - - - - - - - - - - - - - - - - open9x only accepts %1 expos - open9x accetta solamente %1 esponenziali - - - + th9x - + er9x - - + + Support for frsky telemetry mod Supporto per la modifica per la telemetria FrSky - - + + Support for jeti telemetry mod Supporto per la modifica per la telemetria Jeti - - + + Support for receiving ardupilot data Supporto per la modifica per la ricezione dati ardupilot - - + + Support for receiving NMEA data Supporto per la modifica per la ricezione dati NMEA - + Support for telemetry easy board Supporto per la scheda Telemetrez - - + + Support for MAVLINK devices Supporto per dispositivi MAVLINK - + Rotary Encoder use in menus navigation Utilizzo dell'encoder rotativo nella navigazione dei menù - + Possibility to enable FAI MODE at field Impostazione della modalità FAI da radio - + FAI MODE always enabled Modalità FAI sempre attiva - - openTx for 9X board - openTx per scheda originale - - - - - - - + + + + + Enable heli menu and cyclic mix support Abilita supporto menù elicotteri e miscelazione ciclico - - - - - - + + + + + + Enable TEMPLATES menu Abilita menù dei MODELLI - - - - + + + + No splash screen Disabilita schermata di avvio - - - - - - + + + + + + No flight modes Disabilita supporto fasi di volo - - - - - - + + + + + + Disable curves menus Disabilita il menu delle curve - - - - + + + + Support for radio modified with regular speaker Supporto per modifica con altoparlante - - - - - + + + + + Used if you have modified your radio with voice mode Utilizzato per la gestione del modulo audio - - - - + + + + Used if you have modified your radio with haptic mode Abilita supporto vibrazione - - - - - - + + + + + + In model setup menus automatically set source by moving some of them Selezione automatica delle sorgenti nei menù tramite loro azionamento - - - - - - + + + + + + Battery graph Grafico della batteria - - - - - - - - + + + + + + + + Use alternative SQT5 font Usa font alternativo SQT5 (Leggermente quadrato) - - - - + + + + Enable the throttle trace in Statistics Abilita il grafico utilizzo motore nelle statistiche - + EEprom write progress bar Barra di avanzamento durante la scrittura della eeprom - - + + No Winged Shadow How High support Disabilita supporto Winged Shadow How High - - + + No vario support Nessun Variometro - - + + No GPS support Disabilita supporto GPS - - + + No gauges in the custom telemetry screen Disabilita schermate telemetriche a barre - - openTx for M128 / 9X board - openTx per scheda originale con CPU ATMEGA 128 + + Allow compensating for offset errors in FrSky FAS current sensors + - - openTx for 9XR - openTx per 9XR + + OpenTX for FrSky Taranis + - - openTx for 9XR with M128 chip - openTx per 9XR con chip M128 + + OpenTX for FrSky Taranis Rev4a + - - openTx for Gruvin9x board / 9X - openTX per piastra Gruivin9X - - - + Support of FrSky PXX protocol Supporto del protocollo PXX FrSky - + Use FrSky Taranis sticks in a 9X/9XR Use FrSky's taranis like sticks Usa stick tipo FrSky Taranis - - openTx for FrSky Taranis - openTx per FrSky Taranis - - - - + + Disable HELI menu and cyclic mix support Disabilita il menù HELI e le funzioni del piatto ciclico - - + + Disable TEMPLATES menu Disabilita menù dei MODELLI - - + + Disable Global variables Disabilita variabili globali - - openTx for FrSky Taranis Rev4a - openTx per FrSky Taranis Rev4a - - - - - - - + + + + + Support for DSM2 modules Supporto per moduli DSM2 - - - - - - + + + + + + PPM center adjustment in limits Regolazione del centro PPM nel menù limiti - - - - - - - - + + + + + + + + PPM values displayed in us Valori del PPM in uSec - - - - - - + + + + + + Symetrical Limits Limiti Simmetrici - - - - - + + + + + Pots use in menus navigation Utilizzo dei potenziometri per la navigazione nei menù - + Your radio probably uses a wrong firmware, eeprom size is 4096 but only the first 2048 are used La tua radio probabilmente sta utilizzando un firmware sbagliato, la eeprom è 4096 bytes ma solo 2048 vengono utilizzati - - + + OpenTX for 9X board + + + + + SmartieParts 2.2 Backlight support Abilita il supporto per la scheda SmartiePart versione 2.2 - - - - - - + + + + + + In model setup menus automatically set switch by moving some of them Selezione automatica degli switch nei menù tramite loro azionamento - - - - + + + + Enable resetting values by pressing up and down at the same time Abilita l'azzeramento di un valore mediante pressione contemporanea di tasti - - - - - - + + + + + + No graphical check boxes and sliders Disabilita grafica per caselle di spunta e cursori - - - - - - + + + + + + Don't use bold font for highlighting active items Non utilizzare font in grassetto per evidenziare le voci attive - - - - + + OpenTX for M128 / 9X board + + + + + + + EEprom write Progress bar Barra di avanzamento durante la scrittura della eeprom - - - - - + + + + + Imperial units Unità Imperiali nella telemetria - - openTx for Sky9x board / 9X - openTx per piastra sky9x - - - + Bluetooth interface Interfaccia bluetooth - - - - - - + + + + + + Global variables Variabili Globali - + + OpenTX for 9XR + + + + + OpenTX for 9XR with M128 chip + + + + + OpenTX for Gruvin9x board / 9X + + + + Support for SD memory card Supporto memorie SD - + Support for DSM2 modules using ppm instead of true serial Supporto per moduli DSM2 usando il ppm invece della seriale - + + OpenTX for Sky9x board / 9X + + + + Enable HELI menu and cyclic mix support Abilita il menù HELI e le funzioni del piatto ciclico - + ersky9x - + TrmR - + TrmE - + TrmT - + TrmA - - + + S1 - - + + S2 - - + + LS - - + + RS - - SA - - - - - SB - - - - - SC - - - - - SD - - - - - SE - - - - - SF - - - - - SG - - - - - SH - - - - + Batt Batt - + Tx - + Rx - + Cels - + Vfas - + Curr - + Cnsp - + Powr - + AccX - + AccY - + AccZ - + HDG - + VSpd - + A1- A1- - + A2- A2- - + Alt- - + Alt+ - + Rpm+ - + T1+ - + T2+ - + Spd+ - + Dst+ - + Cur+ - + ACC - + Time Tempo - + Pwr+ - + + + LS1 + + + + + + LS2 + + + + + + LS3 + + + + + + LS4 + + + + + + LS5 + + + + + + LS6 + + + + + + LS7 + + + + + + LS8 + + + + + + LS9 + + + + + + LSA + + + + + + LSB + + + + + + LSC + + + + + + LSD + + + + + + LSE + + + + + + LSF + + + + + + LSG + + + + + + LSH + + + + + + LSI + + + + + + LSJ + + + + + + LSK + + + + + + LSL + + + + + + LSM + + + + + + LSN + + + + + + LSO + + + + + + LSP + + + + + + LSQ + + + + + + LSR + + + + + + LSS + + + + + + LST + + + + + + LSU + + + + + + LSV + + + + + + LSW + + + + + Input %1 + + + + CYC%1 - + PPM%1 - + CH%1%2 CH%1%2 - + X%1 - - - CS1 - CS1 + + S11 + - + + S12 + + + + + S13 + + + + + S14 + + + + + S15 + + + + + S16 + + + + + S21 + + + + + S22 + + + + + S23 + + + + + S24 + + + + + S25 + + + + + S26 + + + + + RudTrim Left + + + + + RudTrim Right + + + + + EleTrim Down + + + + + EleTrim Up + + + + + ThrTrim Down + + + + + ThrTrim Up + + + + + AilTrim Left + + + + + AilTrim Right + + + + + ABS + + + + + THs + + + + + TH% + + + + + THt + + + + + ??? + + + + + Diff(%1) + + + + + Expo(%1) + + + + + Function(%1) + + + + + Curve(%1) + + + + + !Curve(%1) + + + + SWR - + RSSI RSSI - - - 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 - - - - - CSK - CSK - - - - - CSL - CSL - - - - - CSM - CSM - - - - - CSN - CSN - - - - - CSO - CSO - - - - - CSP - CSP - - - - - CSQ - CSQ - - - - - CSR - CSR - - - - - CSS - CSS - - - - - CST - CST - - - - - CSU - CSU - - - - - CSV - CSV - - - - - CSW - CSW - - - - ONE - - - - - !ONE - - - - - TRNs - - - - - TRNl - - - - - REAs - - - - - REAl - - - - - ID0 - ID0 - - - - ID1 - ID1 - - - - ID2 - ID2 - - - - - GEA - GEA - - - - - TRN - TRN - - - CS%1 - CS%1 - - - - + + ON - - + + + OFF - - er9x doesn't have Rotary Encoders - er9x non ha gli Encoder Rotativi - - - - er9x doesn't have trims as source - er9x non accetta i trim come sorgenti - - - - er9x doesn't have negative gvars as weight - er9x non può utilizzare le variabili GV negative come peso - - - - er9x doesn't have negative gvars as offset - er9x non può utilizzare le variabili GV negative come spostamento - - - - - - er9x doesn't have swappable trims - er9x non accetta l'incroco dei trim - - - - - - er9x on this board doesn't have Rotary Encoders - er9x su questa piastra non ha gli Encoder Rotativi - - - - er9x does not support Custom Switch function %1 - er9x non supporta la funzione %1 negli interruttori personalizzati - - - - - - er9x does not support this range for A1/A2 - er9x non accetta il voltaggio di fondo scala settato per A1/A2 - - - - - - er9x does not support this telemetry units - er9x non supporta l'unità di telemetria scelta per A1/A2 - - - - - Er9x doesn't accept this protocol - Er9x non accetta questo protocollo - - - - - Er9x doesn't support custom curves as curve%1, curve as been exported as fixed point - Er9x non supporta curve customizzate per la curva %1, la curva viene esportata come curva a punti fissi - - - - - Er9x doesn't support curve with %1 point as curve%2 - Er9x non supporta curve con %1 punti come curva %2 - - - - - - - + + + + Warning Avviso - - + EEPROM saved with these warnings: EEPROM salvata con questi avvisi: - - - ersky9x doesn't have Rotary Encoders - ersky9x non ha gli Encoder Rotativi - - - - - ersky9x doesn't have trims as source - ersky9x non accetta i trim come sorgenti - - - - - ersky9x does not support Custom Switch function %1 - ersky9x non supporta la funzione %1 negli interruttori personalizzati - - - - - Ersky9x doesn't accept this protocol - Ersky9x non accetta questo protocollo - - - - - - - ErSky9x doesn't support custom curves as curve%1, curve as been exported as fixed point - Ersky9x non supporta curve customizzate per la curva %1, la curva viene esportata come curva a punti fissi - - - - - - - ErSky9x doesn't support curve with %1 point as curve%2 - Ersky9x non supporta curve con %1 punti come curva %2 - - - - - + + + Simulator for this firmware is not yet available Il simulatore per questo firmware non è ancora disponibile - - th9x does not support Custom Switch function %1 - th9x non supporta la funzione %1 negli interruttori personalizzati - - - + th9x on this board doesn't have Rotary Encoders th9x non ha gli Encoder Rotativi - - - - - th9x doesn't support custom curves as curve%1, curve as been exported as fixed point - th9x non supporta curve customizzate per la curva %1, la curva viene esportata come curva a punti fissi - - - - - - th9x doesn't support curve with %1 point as curve%2 - th9x non supporta curve con %1 punti come curva %2 - - - - - Flight Mode 0 (Default) - Fase di volo 0 (Predefinita) - - - - - FM %1 - FV %1 - Thanks all for the donations, kind messages, nice ideas, constructive proposals etc. for the next OpenTX/Companion funding model. @@ -7431,6 +5945,776 @@ We are really appreciative for that! The OpenTX/Companion Team. + + + Trim disabled + + + + + Own Trim + + + + + Use Trim from Flight mode %1 + + + + + Use Trim from Flight mode %1 + Own Trim as an offset + + + + + Setup + + + Form + + + + + Model Name + Nome del modello + + + + Timer2 + + + + + Timer1 + Tempo1 + + + + Throttle Source + Sorgente motore + + + + Switch startup Warning + Avviso interruttori all'avvio + + + + Center beep + Avviso centraggio + + + + Trim Increment + Incremento del Trim + + + + ON + Acceso + + + + OFF + Spento + + + + Check + Controllo + + + + Model Image + Immagine modello + + + + Exponential + Esponenziale + + + + Extra Fine + Extra Fine + + + + Fine + Fine + + + + Medium + Medio + + + + Coarse + Ampio + + + + Extended Limits + Limiti estesi + + + + Extended Trims + Trim estesi + + + + Throttle Trim + Trim Motore + + + + 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. + + + Stick motore inverso. +Se l'opzione selezionata lo stick motore verrà rovesciato. Il minimo sarà in avanti, anche i trim verranno rovesciati e anche gli avvisi. + + + + + + Reverse Throttle + + + + + Telemetry + + + Form + + + + + + + + A1 + A1 + + + + + + + A2 + A2 + + + + RSSI + RSSI + + + + Alarm 1 + Allarme 1 + + + + + ---- + ---- + + + + + Yellow + Giallo + + + + + Orange + Arancione + + + + + Red + Rosso + + + + Alarm 2 + Allarme 2 + + + + Serial Protocol + Protocollo seriale + + + + Volt source + Misura della tensione + + + + Metric + Sistema Metrico + + + + Imperial + Imperiale + + + + Current source + Misura della corrente + + + + Protocol + Protocollo + + + + NONE + Nessuno + + + + + FAS + FAS + + + + None + Nessuno + + + + FrSky Sensor Hub + FrSky Sensor Hub + + + + CEL + CEL + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + Units + Unità + + + + Blades + Pale dell'elica + + + + Altimetry / Vario + Altimetria / Variometro + + + + Alti + + + + + Alti+ + + + + + Vario + Variometro + + + + Sink Max + Max Discesa + + + + Off + NO + + + + Climb Max + Max Salita + + + + Sink Min + Min Discesa + + + + Climb Min + Min Salita + + + + Vario source + Sorgente per il Vario + + + + Vario limits + Limiti per il Vario + + + + Use GPS as altitude source + Usa il GPS per l'altitudine + + + + Display altitude in toolbar + Mostra l'altitudine sulla barra + + + + Various + + + + + mAh count + + + + + FAS Offset + + + + + Persistent mAh + + + + + TelemetryAnalog + + + Form + + + + + Unit + Unità + + + + Max Value + Valore MAX + + + + Alarm 1 + Allarme 1 + + + + + ---- + ---- + + + + + Yellow + Giallo + + + + + Orange + Arancione + + + + + Red + Rosso + + + + + < + < + + + + + > + > + + + + Alarm 2 + Allarme 2 + + + + Min Value + Valore Min + + + + Volts (V) + Voltaggio (V) + + + + Amps (A) + Corrente (A) + + + + Speed (m/s or ft/s) + Velocità (m/s o ft/s) + + + + Raw (-) + Grezza (-) + + + + Speed (km/h or miles/h) + Velocità (km/h o miglia/h) + + + + Meters (m or ft) + Metri (m o ft) + + + + Temp (°) + Temperatura (°) + + + + Fuel (%) + Carburante (%) + + + + mAmps (mA) + Corrente (mA) + + + + Range + Intervallo + + + + TelemetryCustomScreen + + + Form + + + + + Custom Screen Type + Tipo schermo personalizzato + + + + Nums + Valori + + + + Bars + Barre + + + + Min + Min + + + + Source + Sorgente + + + + Gauge + Barra + + + + Max + Max + + + + TelemetryPanel + + + Telemetry screen %1 + + + + + Winged Shadow How High + Winged Shadow How High + + + + Winged Shadow How High (not supported) + Winged Shadow How High (non supportato) + + + + Timer + + + Form + + + + + mm:ss + mm:ss + + + + Countdown + + + + + MinuteBeep + Suono al minuto + + + + Persistent + Persistente + + + + (00:00:00) + + + + + TimerPanel + + + None + Nessuno + + + + Beeps + + + + + Countdown + + + + + appPreferencesDialog + + + Application Preferences + + + + + Simulator capture folder + Cartella per cattura schermate + + + + Remember simulator switch values + + + + + + + Open Folder + Apri Cartella + + + + User Splash Screens + + + + + Blue + Blu + + + + Green + Verde + + + + Red + Rosso + + + + Orange + Arancione + + + + Yellow + Giallo + + + + Include companion splashes + Includi sfondi predefiniti + + + + Only user defined splashes + Solamente sfondi utente + + + + Splash Screen Library + + + + + Files to keep + + + + + Simulator BackLight + + + + + Automatic Backup Folder + Cartella per backup + + + + Only capture to clipboard + + + + + Joystick + Joystick + + + + Find Executable + + + + + Google Earth Executable + + + + + Calibrate + Calibrazione + + + + Enable + Abilita + + + + Show splash screen when Companion starts + + + + + Automatic check for OpenTX firmware updates + + + + + Automatic check for Companion updates + + + + + Offer to use wizard for new models + + + + + Enable automatic backup before writing firmware + + + + + Select your snapshot folder + Selezionare la cartella per le schermate del simulatore + + + + + No joysticks found + Nessun joystick trovato + + + + Select your library folder + Selezionare la cartella degli sfondi + + + + Select your Models and Settings backup folder + Selezionare la cartella per i backup + + + + Select Google Earth executable + + avrOutputDialog @@ -7748,47 +7032,43 @@ utilizzatelo solo se sapete cosa state facendo. Non viene fatto alcun controllo Porta seriale per sam-ba - + DFU-UTIL Configuration DFU-UTIL Cconfiguration Configurazione DFU-UTIL - + SAM-BA Configuration SAM-BA Cconfiguration Configurazione SAM-BA - + AVRDUDE Configuration AVRDUDE Cconfiguration Configurazione AVRDUDE - - - + + + Select Location Seleziona eseguibile - - + + Companion - companion9x - companion9x - - - + <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>ATTENZIONE!</u></b><br>Questa operazione ripristinerà i fuse del processore %1 ai valori di fabbrica.<br>Modificare i fuse pruo bloccare la radio.<br>Fatelo solo se siete assolutamente sicuri che siano sbagliati<br>sicuri di voler continuare ? - + <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>Attenzione!</u></b><br>Normalmente il processore viene selezionato automaticamente in base al firmware scelto.<br>Se cambiate il tipo di processore la EEPROM potrebbe risultare incoerente. @@ -7816,10 +7096,6 @@ m2560 per le schede v4.1 Customize Splash Personalizza schermata di avvio - - Load Firmware - Carica Firmware - <html><head/><body><p>Modify calibration parameters using settings from current profile</p></body></html> @@ -7852,7 +7128,7 @@ m2560 per le schede v4.1 - + Browse for file Apri file @@ -7898,7 +7174,7 @@ m2560 per le schede v4.1 - + Write to TX Scrivi sulla radio @@ -7907,19 +7183,11 @@ m2560 per le schede v4.1 Variant Variante - - Allows companion9x to write to older version of the firmware - Abilita companion a scrivere in versioni precedenti o diverse del firmware - Check Firmware compatibility Verifica compatibilità firmware - - Backup and restore existing eeprom - Salva e ripristina la EEProm presente sulla radio - Current Profile @@ -7931,180 +7199,148 @@ m2560 per le schede v4.1 Annulla - Burn to TX - Scrivi sulla radio - - - + Write firmware to TX Scrittura firmware sulla radio - Write models to TX - Scrittura impostazioni sulla radio - - - + Open Apri - - - - - - + + + + + + Warning Avviso - + %1 is not a known firmware %1 non è un firmware conosciuto - + Burn anyway ! Forza scrittura ! - Invalid binary EEPROM File %1, Proceed anyway ? - EEPROM File binario non valido %1, Procedere ugualmente ? - - - + Open Image to load Apri l'immagine da caricare - + Images (%1) Immagini (%1) - - - - - - - - - - + + + + + + + + + + Error Errore - Load eEprom - Apri eEprom - - - Write %1 to TX - Scrittura di %1 sulla radio - - - + Current profile Profilo Attuale - Choose file to write to EEPROM memory - Scegli il documento da scrivere nella EEPROM - - - + Write Models and Settings to TX Scrittura impostazioni sulla radio - + Write Models and Settings in %1 to TX Scrittura impostazioni sulla radio da %1 - + Choose file to load Models and Settings from Scegli il documento di impostazioni da scrivere - + Unable to find file %1! Impossibile trovare il file %1! - - - + + + Error opening file %1: %2. Errore durante l'apertura del file %1: %2. - - - + + + Invalid binary Models and Settings File %1, Proceed anyway ? File binario delle impostazioni non valido %1, Procedere ugualmente ? - + Error reading file %1: %2. Error durante la lettura del file %1: %2. - - + + Cannot load %1. Non posso caricare %1. - + Cannot save customized firmware Errore durante la scrittura del file temporaneo - + Custom image not found Immagine personalizzata non trovata - + No firmware selected Nessun firmware selezionato - + Wrong radio calibration data in profile, Settings not patched Dati errati nel profilo, la calibrazione della radio non è stata sostituita - + Wrong radio setting data in profile, Settings not patched Dati errati nel profilo, i settaggi HW della radio non sono stati sostituiti - Wrong radio calibration data in profile, eeprom not patched - Dati errati nel profilo, la calibrazione della radio non è stata sostituita - - - Wrong radio setting data in profile, eeprom not patched - Dati errati nel profilo, i settaggi HW della radio non sono stati sostituiti - - - - + + Cannot write file %1: %2. Non posso scrivere il file %1: %2. - + Error writing file %1: %2. Errore durante la scrittura del file %1: @@ -8144,515 +7380,483 @@ m2560 per le schede v4.1 Stampa su file - + General Model Settings Impostazioni generali del modello - - - + + + Name Nome - - + + EEprom Size Dimensione in EEprom - - + + Timer1 Tempo1 - - + + Timer2 Tempo2 - - + + Protocol Protocollo - - + + Pulse Polarity Polarità impulso - - + + Throttle Trim Trim Motore - - - - + + + + Enabled Abilitato - - - - + + + + Disabled Disabilitato - - + + Throttle Expo Esponenziale Motore - - + + Trim Increment Incremento del Trim - - + + Center Beep Avviso centraggio - + Flight modes Settings Impostazioni Fasi di Volo - - + + Fades Transizioni - - + + Trims Trims - - - - - - - - - - + + + + + + + + Switch - - + + IN Ingr. - - + + OUT Usc. - - - - - - - - - - + + + + + + + + + + FM FV - - + + Gvars Var Glob - - + + Rot. Enc. Enc. Rot. - + Limits Limiti - - - - - - - + + + + + + + Offset Spostamento - - - - - + + + + + Min Min - - - - - + + + + + Max Max - - - + + + Invert Inversione - - - - - - + + + + + CH CH - - + + INV INV - - + + NOR NOR - + Global Variables Variabili Globali - - + + GV VG - + Expo/Dr Settings Impostazioni Corsa/Esponenziali - - + + Weight Peso - - - Expo - Espo - - - - - - - - + + Curve Curva - + Mixers Miscelazioni - - + + noTrim noTrim - - - FMTrim - FMTrim - - - - - Diff - Diff - - - - + + Delay(u%1:d%2) Ritarda(s%1:g%2) - - + + Slow(u%1:d%2) Rallenta(s%1:g%2) - - + + Warn Avviso - - - - + + + + DISABLED DISABILITATO - - + + No name Modello senza nome - + Curves Curve - + 5 Points Curves Curve a 5 Punti - - - - + + + + pt %1 pt %1 - + 9 Points Curves Curve a 9 Punti - - Custom Switches - Interruttori personalizzati - - - - - CS - - - - - + + Function Funzione - - + + Param Parametro - - + + Enable Abilita - + CF CF - + Telemetry Settings Impostazioni telemetria - - + + Analog Analogico - - + + Unit Unità - - + + Scale Campo di misura - - - - + + + + A%1 A%1 - - + + Alarm 1 Allarme 1 - - + + Alarm 2 Allarme 2 - - - - + + + + Type Tipo - - - - + + + + Condition Condizione - - - - - - + + + + Value Valore - - - - + + + + Flight mode name Nome fase di volo - - - + + + Flight modes Fasi di volo - - - + + + Flight mode Fase di volo - - Custom Functions - Funzioni personalizzate - - - - + + Repeat Ripeti - - Safety Switches - Interruttori di sicurezza - - - - + + RSSI Alarm - - + + Telemetry Bars Barre Telemetria - - + + Bar Number Numero Barra - - + + Source Sorgente - - + + Custom Telemetry View Schermata personalizzata dati telemetrici - + + Logical Switches + + + + + + LS + + + + + Switch Assignment + + + + Print Document Stampa documento - + Select PDF output file Scegliere il nome del file PDF @@ -8665,51 +7869,37 @@ m2560 per le schede v4.1 Dialogo - + People who have contributed to this project Persone che hanno contribuito a questo progetto - + Coders Programmatori e grafici - - 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. + + Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe) - + 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). -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 - - - + OpenTX Release Notes informazioni su aggiornamenti OpenTX @@ -8717,131 +7907,100 @@ companion9x. customizeSplashDialog - - Customize Splash - Personalizza schermata di avvio + + Transmitter Splash Screen Editor + - - Save Image - Salva immagine + + + Invert + - - Invert Color - Negativo + + + Load FW + - - Load Firmware - Carica Firmware + + + Load Pict + - - Load Image - Apri immagine + + + Load Profile + - + + + Save + + + + + Open Splash Library Apri libreria sfondi - + + + + ... - - Save Firmware - Salva firmware - - - - <!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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<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> - - - - - - - Select an original firmware file - Seleziona un firmware (possibilmente non modificato) - - - + Open Apri - - Select an image to customize your splash <br />or save actual firmware splash - Selezionare un'immagine personalizzata <br/>o salvare l'immagine nel firmware caricato - - - - - - + + + + + + Error Errore - + Could not find bitmap to replace in file Immagine non trovata nel firmware - + Open Image to load Apri l'immagine da caricare - + Images (%1) Immagini (%1) - - + + Cannot load %1. Non posso caricare %1. - - - Save your custimized firmware - Salva il firmware personalizzato + + + Could not store image in firmware file %1 + - - - Write to file - Scrivi in un file - - - - Error reading file %1 - Error durante la lettura del file %1 - - - - Firmware correctly saved. - Firmware salvato correttamente. - - - - Firmware not saved. - Firmware non slavato correttamente. - - - - PNG images (*.png);; - Immagini PNG (*.png);; + + The image file %1 could not be stored + @@ -8861,10 +8020,6 @@ p, li { white-space: pre-wrap; } Companion - - companion9x - companion9x - Download failed: %1. @@ -9000,6 +8155,402 @@ 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;">Proseguire solo se si sa cosa si sta facendo.</p></body></html> + + fwPreferencesDialog + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox + CheckBox + + + + Set language of voice. +May be different from firmware language + Impostazione del linguaggio della voce. +Può essere differente dalla lingua del firmware + + + + SD Structure path + Cartella Struttura Scheda SD + + + + Processor ID + ID del processore + + + + Default Stick Mode + Modalità Stick + + + + Channel Order + + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + Modalità stick: + +Modo 1: + Stick sinistro: Elevatore, Direzionale + Stick destro: Motore, Alettoni + +Mode 2: + Stick sinistro: Motore, Direzionale + Stick destro: Elevatore, Alettoni + +Mode 3: + Stick sinistro: Elevatore, Alettoni + Stick destro: Motore, Direzionale + +Mode 4: + Stick sinistro: Motore, Alettoni + Stick destro: Elevatore, Direzionale + + + + + + 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) + + + + Options + + + + + Channel order + +This is used by the templated to determine which channel goes to what number output. + Ordinamento canali + +Utilizzato dai Modelli per stabilire quale uscita viene assegnata ai canali. + + + + Open Folder + Apri Cartella + + + + Offer to write FW to Tx after download + + + + + Save Profile + Salva Profilo + + + + Menu Language + + + + + Voice Language + Lingua per le voci + + + + Firmware Type + + + + + Append version number to FW file name + + + + + Download Voice + + + + + Downloads and Profiles + + + + + FwInfo + + + + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + + Profile + + + + + Open Image + Apri immagine + + + + Splash Screen + + + + + Clear Image + + + + + Download FW + + + + + Check for updates + Verifica aggiornamenti + + + + Last downloaded release: %1 + Ultima versione scaricata: %1 + + + + The selected firmware has never been downloaded by Companion. + + + + + The selected firmware cannot be downloaded by Companion. + + + + + Select the folder replicating your SD structure + Selezionare la cartella contenente la struttura della scheda SD + + + + 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 ? + + + + Open Image to load + Apri l'immagine da caricare + + + + Images (%1) + Immagini (%1) + + + + Error + Errore + + + + Cannot load %1. + Non posso caricare %1. + + joystickDialog @@ -9230,10 +8781,6 @@ Premere annulla per cancellare l'operazione logsDialog - - Companion9x log viewer - Visualizzatore di file di log di Companion9x - Companion Log Viewer @@ -9292,17 +8839,17 @@ Premere annulla per cancellare l'operazione %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 @@ -9310,7 +8857,7 @@ Premere annulla per cancellare l'operazione mdiChild - + Simulate Tx Simula TX @@ -9755,53 +9302,44 @@ Premere annulla per cancellare l'operazione preferencesDialog + Preferences 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 - - - + Recent History Size 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. @@ -9810,12 +9348,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: @@ -9856,383 +9394,519 @@ Mode 4: - - + + + + ... - + + Enable Abilita - + + Remember simulator switches + + + + + 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 - eEprom backup folder - 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox 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) - + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + Profile slot Profilo personalizzato - + Find Executable - + Google Earth Executable - + Profile Name Descrizione - + Save Profile Salva Profilo - + + Blue Blu - + Language Lingua - + + Green Verde - + + Show Splash At Start + + + + + 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. - - - The selected firmware cannot be downloaded by 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 - Select your eeprom backup folder - 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. @@ -10265,472 +9939,421 @@ Può essere differente dalla lingua del firmware Impostazioni per: - + printed on: %1 stampato il: %1 - + General Model Settings Impostazioni generali del modello - - - - + + + + Name Nome - + EEprom Size Dimensione in EEprom - + Timer1 Tempo1 - + Timer2 Tempo2 - + Protocol Protocollo - + Pulse Polarity Polarità impulso - + Throttle Trim Trim Motore + - - + Enabled Abilitato + - Disabled Disabilitato - + Throttle Expo Esponenziale Motore - + Trim Increment Incremento del Trim - + Center Beep Avviso centraggio - + Flight modes Settings Impostazioni Fasi di Volo - + Fades Transizioni - + Trims Trims - + Gvars Var Glob - + Rot.Enc. Enc. Rot. - - - - - + + + + Switch Int. - + Flight mode name Nome fase di volo - - + + Flight modes Fasi di volo - - + + Flight mode Fase di volo - - CF - CF - - - + ODF files (*.odt);;PDF Files(*.pdf);;HTML-Files (*.htm *.html);;All Files (*) Documenti ODF (*.odt);;Documenti PDF (*.pdf);;Documenti HTML (*.htm *.html);;Tutti i documenti (*) - + IN Ingr. - + OUT Usc. - - Diff - Diff - - - - + + DISABLED DISABILITATO - + + Logical Switches + + + + + + LS + + + + + Switch Assignments + + + + Parameter Parametro - + Scale Campo di misura - - - - + + + + FM FV - + Expo/Dr Settings Impostazioni Corsa/Esponenziali - + Weight Peso - - - - - Expo - Esponenziale - - - - + + - - - - Curve Curva - + Mixers Miscelazioni - - - - - + + + + CH CH - + noTrim noTrim - - - - - + + + + + Offset Spostamento - + Delay(u%1:d%2) Ritarda(s%1:g%2) - + Slow(u%1:d%2) Rallenta(s%1:g%2) - + Warn Avviso - - - CS - - - - + Select PDF output file Scegliere il nome del file PDF - + Limits Limiti - - FMTrim - FMTrim - - - - - - + + + + Min Min - - - - + + + + Max Max - - - + + + Invert Invers - - - + + + INV INV - - - + + + NOR NOR - + Curves Curve - 5 Points Curves - Curve a 5 Punti - - - - - pt %1 pt %1 - - 9 Points Curves - Curve a 9 Punti - - - - Custom Switches - Interruttori personalizzati - - - + Global Variables Variabili Globali - + GV VG - - Safety Switches - Interruttori di sicurezza - - - - - - - + + + + Value Valore - - Function Switches - Interruttori di funzione - - - + Function Funzione - + Repeat Ripeti - FSW - FSW - - - + Telemetry Settings Impostazioni telemetria - - + + Alarm 1 Allarme 1 - - + + Alarm 2 Allarme 2 - + Analog Analogico - + Unit Unità - - - - + + + + Type Tipo - - - - + + + + Condition Condizione - + A%1 A%1 - + RSSI Alarm Allarmi RSSI - + Frsky serial protocol Protocollo seriale FrSky - + System of units Sistema di misura - + Propeller blades Pale dell'elica - + Telemetry Bars Barre Telemetria - + Bar Number Numero Barra - + Source Sorgente - - + + Custom Telemetry View Schermata personalizzata dati telemetrici - + Print Document Stampa documento @@ -10738,21 +10361,17 @@ Può essere differente dalla lingua del firmware simulatorDialog - Companion9x Simulator - companion9x - - - + P1 P1 - + P2 P2 - + P3 P3 @@ -10770,7 +10389,7 @@ Può essere differente dalla lingua del firmware - + Right Double Click to Reset Doppio click con il destro per portare a 0 @@ -10791,33 +10410,33 @@ Può essere differente dalla lingua del firmware - + Hold X Tieni X - + Fix X Fissa X - + Fix Y Fissa Y - + Hold Y Tieni Y - - + + TextLabel TextLabel @@ -10837,24 +10456,24 @@ Può essere differente dalla lingua del firmware ID0 - + ID1 ID1 - + ID2 ID2 - - - + + + 0 % - + 9x Simulator Simulatore 9x @@ -10865,268 +10484,266 @@ Può essere differente dalla lingua del firmware - CS1 - CS1 + LS1 + - CS2 - CS2 + LS2 + - CS3 - CS3 + LS3 + - CS4 - CS4 + LS4 + - CS5 - CS5 + LS5 + - CS6 - CS6 + LS6 + - CS7 - CS7 + LS7 + - CS8 - CS8 + LS8 + - CS9 - CS9 + LS9 + - CSA - CSA + LSA + - CSB - CSB + LSB + - CSC - CSC + LSC + - CSD - CSD + LSD + - CSE - CSE + LSE + - CSF - CSF + LSF + - CSG - CSG + LSG + - CSH - CSH + LSH + - CSI - CSI + LSI + - - CSJ - CSJ + + LSJ + - - CSL - CSL + + LSK + - - CSM - CSM + + LSL + - - CSN - CSN + + LSM + - - CSO - CSO + + LSN + - - CSP - CSP + + LSO + - - CSQ - CSQ + + LSP + - - CSR - CSR + + LSQ + - - CSS - CSS + + LSR + - - CST - CST + + LSS + - - CSU - CSU + + LST + - - CSV - CSV + + LSU + - + + LSV + + + + + LSW + + + + BEEP 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 @@ -11170,43 +10787,39 @@ Può essere differente dalla lingua del firmware splashLibrary - + ... - + Splash Library - page %1 of %2 Libreria sfondi - pagina %1 di %2 - + Warning Avviso - + Invalid image in library %1 Immagine corrotta nella libreria %1 - + Information Informazione - + No valid image found in library, check your settings Nessuna immagine trovata nella libreria, controllate le impostazioni xsimulatorDialog - - Companion9x Simulator - companion9x - @@ -11330,18 +10943,6 @@ Può essere differente dalla lingua del firmware Outputs Uscite - - - CSK - SWK - CSK - - - - CSW - SWW - CSW - CH1 @@ -11359,10 +10960,10 @@ Può essere differente dalla lingua del firmware - - - - + + + + @@ -11403,12 +11004,12 @@ Può essere differente dalla lingua del firmware CH4 - + CH12 CH12 - + CH5 CH5 @@ -11447,155 +11048,165 @@ Può essere differente dalla lingua del firmware CH16 CH16 + + + LSK + + - CSC - CSC + LSC + - CSD - CSD + LSD + - CS7 - CS7 + LS7 + - CSL - CSL + LSL + - CSB - CSB + LSB + - CS1 - CS1 + LS1 + - CSH - CSH + LSH + - CSG - CSG + LSG + - CSE - CSE + LSE + - CSF - CSF + LSF + - CS8 - CS8 + LS8 + - CS9 - CS9 + LS9 + - CSA - CSA + LSA + - CSM - CSM + LSM + - CSJ - CSJ + LSJ + - CSI - CSI + LSI + - CS4 - CS4 + LS4 + - CS5 - CS5 + LS5 + - CS2 - CS2 + LS2 + - CS3 - CS3 + LS3 + - CS6 - CS6 + LS6 + - CSN - CSN + LSN + - CSO - CSO + LSO + - CSP - CSP + LSP + - CSQ - CSQ + LSQ + - CSR - CSR + LSR + - CSS - CSS + LSS + - CST - CST + LST + - CSU - CSU + LSU + - CSV - CSV + LSV + + + + + LSW + @@ -11614,22 +11225,22 @@ Può essere differente dalla lingua del firmware Non riesco ad aprire il joystick, supporto joystick disabilitato - + Firmware %1 error: %2 Firmware %1 errore: %2 - + - Flight mode: %1(%2) - Fase di Volo: %1(%2) - + Simulating Tx (%1) Simulazione Tx (%1) - + Simulating Simulazione in corso diff --git a/companion/src/translations/companion_pl.ts b/companion/src/translations/companion_pl.ts new file mode 100644 index 000000000..ab649090f --- /dev/null +++ b/companion/src/translations/companion_pl.ts @@ -0,0 +1,10698 @@ + + + + + Channels + + + Name + Nazwa + + + + Offset + Wyrównanie + + + + Min + Min + + + + Max + Maks + + + + Invert + Odwróć + + + + Center + Centrowanie + + + + Sym + Sym + + + + Channel %1 + Kanały %1 + + + + --- + --- + + + + INV + Odwr + + + + CurveGroup + + + Diff + Róźnicowość + + + + Expo + Expo + + + + Func + Funkcja + + + + Curve + Krzywa + + + + Curves + + + Form + Formularz + + + + Standard + Standard + + + + Custom + Ustawienia Własne + + + + Lines + Linie + + + + Smooth + Gładkie + + + + Curve type + Typy Krzywej + + + + Curve name + Nazwa krzywej + + + + Curve %1 + Krzywa %1 + + + + %1 points + %1 punktowa + + + + Are you sure you want to reset curve %1 ? + Jesteś pewien by zresetować krzywą %1 ? + + + + Editing curve %1 + Edycja krzywej k%1 + + + + Not enough free points in EEPROM to store the curve. + Za mało wolnych punktów w eepromie by zapamiętać krzywą. + + + + CustomFunctionsPanel + + + Switch + Przełącznik + + + + Action + Akcja + + + + Parameters + Parametry + + + + Enable + Włączone + + + + CF%1 + FS%1 + + + + ON + Włącz + + + + Error + Błąd + + + + Unable to find sound file %1! + Nie mogę odnaleźć pliku dźwiękowego %1! + + + + &Delete + &Wykasuj + + + + Delete + Wykasuj + + + + &Copy + &Kopiuj + + + + Ctrl+C + Ctrl+C + + + + &Cut + &Wytnij + + + + Ctrl+X + Ctrl+X + + + + &Paste + &Wklej + + + + Ctrl+V + Ctrl+V + + + + Dialog + + + Dialog + Formularz + + + + Curve type + Typy Krzywych + + + + Coefficient + Współczynnik + + + + Both + Obie + + + + x>0 + x>0 + + + + x<0 + x<0 + + + + Y at X=0 + Y dla X=0 + + + + Side + Strona + + + + Y at X=-100 + Y dla X=-100 + + + + Y at X=100 + Y dla X=100 + + + + Linear + Liniowa + + + + Single Expo + Pojedyncze expo (wykładnicza) + + + + Symmetrical f(x)=-f(-x) + Symetryczna (nieparzysta) f(x)=-f(-x) + + + + Symmetrical f(x)=f(-x) + Symetryczna (parzysta) f(x)=f(-x) + + + + ExpoDialog + + + Weight + Waga + + + + Switch used by the input. +If blank then the input is considered to be "ON" all the time. + Przełącznik używany przez Wejście, jeśli pole jest puste: będzie uznane za "WŁĄCZONE" przez cały czas. + + + + <!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;">Opóźnienie i spowolnienie</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;">Te wartośći określają prędkość i opóźnienie wyjścia mikserów </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;">Jeśli opóżnienie nie jest równe 0 aktywacja miksera zostanie opózniona o określoną ilość sekund.</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;">Jeśli spowolnienie nie jest równe 0 wtedy prędkość miksera zostanie ustawiona na podaną wartość-&gt; wartość oznacza liczbę sekund jaką mikser potrzebuje by pokonać drogę od -100 do 100.</p></body></html> + + + + Scale + Skala + + + + Include Trim + Uwzględnij trymer + + + + No + Nie + + + + Yes + Tak + + + + Curve + Krzywa + + + + The source for the mixer + Źródło miksera + + + + Input name + Wprowadź Nazwę + + + + + GV + ZG + + + + Phase used by the input. + Faza lotu używana przez Wejście. + + + + Flight modes + Fazy lotu + + + + 0 + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + Switch + Przełącznik + + + + The curve used by the input + Krzywa używana przez Wejście + + + + Source + Źródło + + + + Line name + Nazwa linii + + + + Stick Side + Strona drążka + + + + NEG + x<0(Ujemnie) + + + + POS + x>0(Dodatnio) + + + + ALL + Wszystkie + + + + Edit %1 + Edycja %1 + + + + Rud + SK + + + + Ele + SW + + + + Thr + Gaz + + + + Ail + Lotki + + + + FlightMode + + + Form + Formularz + + + + Fade In + Spowolnienie aktywacji + + + + Fade Out + Spowolnienie wyłączania + + + + Name + Nazwa + + + + Switch + Przełącznik + + + + trim1 + trymer 1 + + + + trim2 + trymer 2 + + + + trim4 + trymer 4 + + + + trim3 + trymer 3 + + + + Rud + SK + + + + Ele + SW + + + + Thr + Gaz + + + + Ail + Lotki + + + + Rotary Encoder %1 + Pokrętło %1 + + + + GVAR%1 + ZmGl%1 + + + + FlightModes + + + Flight Mode %1 + Faza lotu %1 + + + + (%1) + (%1) + + + + (default) + (bazowa) + + + + GeneralEdit + + + General Edit + Główne ustawienia + + + + Store calib. and hw settings in selected profile + Zapamiętanie kalibracji i ustawień HW w wybranym profilu + + + + Retrieve calib. and hw settings from profile + Odtworzenie kalibracji i ustawień HW z profilu + + + + General settings used throught the transmitter. +These will be relevant for all models in the same EEPROM. + Główne ustawienia radia. +Będą one obowiązywać dla wszystkich modeli w tym samym EEPROM-ie. + + + + Setup + Ustawienia + + + + Timer Beeps + Pikanie timerów + + + + Contrast + Kontrast + + + + Channel Order (For Templates) + Kolejność kanałów (dla szablonów) + + + + Owner Name + Imię użytkownika + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + Wybór mode: + +Mode 1: + Lewa ręka : Ster Wysokości, Ster Kierunku + Prawa ręka : Gaz, Lotki + +Mode 2: + Lewa ręka : Gaz, Ster Kierunku + Prawa ręka : Ster Wysokości, Lotki + +Mode 3: + Lewa ręka : Ster Wysokości, Lotki + Prawa ręka : Gaz, Ster Kierunku + +Mode 4: + Lewa ręka : Gaz, Lotki + Prawa ręka : Ster Wysokości, Ster Kierunku + + + + + + Mode 1 (RUD ELE THR AIL) + Mod 1 (SK.SW.Gaz.Lot) + + + + Mode 2 (RUD THR ELE AIL) + Mod 2 (SK.Gaz.SW.Lot) + + + + Mode 3 (AIL ELE THR RUD) + Mod 3 (Lot.SW.Gaz.SK) + + + + Mode 4 (AIL THR ELE RUD) + Mod 4 (Lot.Gaz.SW.SK) + + + + + Quiet + Cichy + + + + Only Alarms + Tylko Alarmy + + + + + No Keys + Bez przycisków + + + + + All + Wszystkie + + + + MAVLink Baud Rate + Prędkość przesyłu MAVLink + + + + 4800 Baud + 4800 bps + + + + 9600 Baud + 9600 bps + + + + 14400 Baud + 14400 bps + + + + 19200 Baud + 19200 bps + + + + 38400 Baud + 38400 bps + + + + 57600 Baud + 57600 bps + + + + 76800 Baud + 76800 bps + + + + 115200 Baud + 115200 bps + + + + <!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-size:8pt;">Single Beep Every whole Minute</span></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-size:8pt;">Jedno piknięcie co każdą pełną minutę</span></p></body></html> + + + + Every Minute + Co minutę + + + + Beeps at 30, 15, 10, and down from5 seconds + Sygnały w 30s, 15s, 10s i odliczanie od 5 sekund do 0 + + + + Count Down to Zero + Odliczanie do zera + + + + <!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-size:8pt;">Flash backlight on timer beep</span></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-size:8pt;">Błyśnij podświetlaniem przy piknięciu timera</span></p></body></html> + + + + Flash on beep + Błyskanie w czasie sygnału + + + + If this value is not 0, any keypress will turn on the backlight and turn it off after the specified number of seconds. + Jeśli ta wartość jest różna od 0, każde naciśnięcie klawisza włączy podświetlenie, które zgaśnie po ustalonej liczbie sekund. + + + + + sec + s + + + + Input Filter + Wprowadź filtr + + + + + + + + + + + + + + Beeper volume + +0 - Quiet. No beeps at all. +1 - No Keys. Normal beeps but menu keys do not beep. +2 - Normal. +3 - Loud. +4 - Extra loud. + Głośność piknięć + +0 -Cicho. Żadnych piknięć. +1 - Bez przycisków. Normalne piknięcia ale bez pikania dla przycisków menu. +2 - Normalna. +3 - Głośna. +4 - Bardzo głośna. + + + + Alarms Only + Tylko alarmy + + + + + + + + <!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> + <!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;">To ustawienie definiuje ostrzeżenia startowe.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Ostrzeżenie gazu - będzie ostrzegało gdy gaz nie jest na 0</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Ostrzeżenie o przełącznikach - będzie ostrzegało gdy przełączniki nie są w pozycji bazowej</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Ostrzeżenie pamięci - będzie ostrzegało gdy pozostało juz niewiele wolnej pamięci</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Ostrzeżenie cichej pracy - będzie ostrzegało gdy pikanie jest ustawione na cicho(0)</p></body></html> + + + + Beeper Mode + Tryb pikania + + + + + + + Off + Wyłączony + + + + + <!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-size:8pt;">LCD Screen Contrast</span></p> +<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;">Values can be 20-45</span></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-size:8pt;">Kontrast ekranu LCD</span></p> +<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;">Wartości z zakresu 20-45</span></p></body></html> + + + + Memory Startup Warning + Ostrzeżenie o małym zapasie pamięci + + + + + X-Short + Bardzo krótka + + + + + Short + Krótka + + + + + Normal + Normalna + + + + + Long + Długa + + + + + X-Long + Bardzo długa + + + + Battery warning voltage. +This is the threashhold where the battery warning sounds. + +Acceptable values are 5v..10v + Ostrzeżenie o napięciu zasilania. +Ustala próg ostrzeżenia. + +Dopuszczalne wartości 5v-10v + + + + Battery Warning + Ostrzeżenie o zasilaniu + + + + THR + Gaz + + + + RUD + SK + + + + ELE + SW + + + + AIL + Lotki + + + + GEA + + + + + ID0 + + + + + ID1 + + + + + ID2 + + + + + Sound Mode + Tryb dźwiękowy + + + + Pot Scrolling Enable + Przewijanie potencjometrem włączone + + + + Battery Calibration + Kalibracja zasilania + + + + If not zero will sound beeps if the transmitter has been left without inputs for the specified number of minutes. + Radio zasygnalizuje dźwiękiem brak aktywności po określonej liczbie minut. 0- wyłącza tę funkcję. + + + + min + Min + + + + + Show splash screen on startup + Pokazuj ekran startowy z logo + + + + Battery calibration: +This value will be added to the measured battery voltage. Use this value to calibrate the meter with an external meter. + Kalibracja zasilania: +Ta wartość będzie dodana do zmierzonej wartości napięcia zasilania. Użyj tej wartości w celu kalibracji wyświetlanego napięcia aby było zgodne z napięciem wskazywanym przez miernik. + + + + Single + Pojedynczy + + + + Oversample + + + + + Filter + Filtr + + + + Show Splash Screen on Startup + Pokazuj ekran startowy z logo + + + + Inactivity Timer + Timer bezczynności + + + + Beeper + Pikanie + + + + Speaker + Głośnik + + + + BeeperVoice + Pikanie i głosy + + + + SpeakerVoice + Głośnik i głosy + + + + Beeper Length + Długość piknięcia + + + + GPS Coordinates + Koordynaty GPS + + + + hh° (N/S) mm' ss''.dd + hh° (N/S) mm' ss''.dd + + + + NMEA + + + + + Timeshift from UTC + Strefa czasowa względem UTC + + + + Channel order + +This is used by the templated to determine which channel goes to what number output. + Kolejność kanałów + +To ustawienie jest używane przez szablony, określa jakie wyjście przypisane jest do kanału. + + + + Speaker Pitch (spkr only) + Wysokość tonów (tylko dźwięki) + + + + Haptic Mode + Tryb wibracji + + + + Stick Mode + Mod drążków + + + + Show Owner Name on Splash + Pokaż imię pilota na ekranie + + + + Telemetry NO DATA Alarm + Telemetria: Alarm braku danych + + + + LCD Display Type + Typ ekranu LCD + + + + Standard + Standard + + + + Optrex + + + + + This is the switch selectrion for turning on the backlight (if installed). + + + To jest przełącznik do włączenia podświetlenia (jeśli zainstalowane). + + + + Speaker Volume + Głośność dźwięków + + + + Haptic Length + Długość wibracji + + + + Haptic Strength + Siła wibracji + + + + BackLight Brightness + Jasność podświetlenia + + + + Alarm Warning + Ostrzeżenie alarmowe + + + + BackLight Auto OFF after + Podświetlenie. Automatyczne wyłącznie po + + + + Bandgap Measuring Enable + Włączone pomiary pasma + + + + RotEnc Navigation + Nawigacja pokrętłem + + + + BackLight Switch + Przełącznik podświetlania + + + + BackLight On Stick Move + Podświetlenie włączone przy ruchu drążka + + + + BackLight Invert + Odwróć podświetlanie + + + + Country Code + Kod kraju + + + + Europe + Europa + + + + Japan + Japonia + + + + America + Ameryka + + + + Metric + Metryczne + + + + Imperial + Imperialne + + + + Measurement Units + Jednostki miar + + + + FrSky Internal Alarm + Wewnętrzny alarm FrSky + + + + StickScroll + Przewijanie drążkiem + + + + PPMSim + + + + + Voice Language + Język komunikatów + + + + CrossTrim + Trymery krzyżowe + + + + Beep volume + Głośność sygnałów + + + + Wav volume + Głośność WAV + + + + Vario volume + Głośność wariometru + + + + Background volume + Głośność tła + + + + FAI Mode + Tryb FAI + + + + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. + Jeśli uaktywnisz tryb FAI, utracisz informacje o wariometrze, funkcje odtwarzania i ekrany telemetrii. Ten tryb nie może być dezaktywowany. + + + + R E T A + K W G L + + + + R E A T + K W L G + + + + R T E A + K G W L + + + + R T A E + K G L W + + + + R A E T + K L W G + + + + R A T E + K L G W + + + + E R T A + W K G L + + + + E R A T + W K L G + + + + E T R A + W G K L + + + + E T A R + W G L K + + + + E A R T + W L K G + + + + E A T R + W L G K + + + + T R E A + G K W L + + + + T R A E + G K L W + + + + T E R A + G W K L + + + + T E A R + G W L K + + + + T A R E + G L K W + + + + T A E R + G L W K + + + + A R E T + L K W G + + + + A R T E + L R G W + + + + A E R T + L W K G + + + + A E T R + L W G K + + + + A T R E + L G K W + + + + A T E R + L G W K + + + + Readonly Unlock + Odblokuj "Tylko do odczytu" + + + + SC + + + + + SE + + + + + SA + + + + + SF + + + + + SH + + + + + SD + + + + + SB + + + + + SG + + + + + Trainer + Trener + + + + Mode + Tryb + + + + Input + Wejście + + + + Weight + Waga + + + + Switch + Przełącznik + + + + + PPM 1 + PPM 1 + + + + + + + chn1 + Kanał 01 + + + + + + + chn2 + Kanał 02 + + + + + + + chn3 + Kanał 03 + + + + + + + chn4 + Kanał 04 + + + + + PPM 2 + PPM 2 + + + + + PPM 3 + PPM 3 + + + + + PPM 4 + PPM 4 + + + + Telemetry + Telemetria + + + + RSSI Alarm 1 + Alarm RSSI 1 + + + + + ---- + ---- + + + + + Yellow + Żółty + + + + + Orange + Pomarańczowy + + + + + Red + Czerwony + + + + RSSI Alarm 2 + Alarm RSSI 2 + + + + NO DATA Alarm + Alarm braku danych + + + + Calibration + Kalibracja + + + + POT 4 + Potencjometr 04 + + + + STICK 3 + Drążek 03 + + + + + Negative span + Ujemny zakres + + + + + Mid value + Wartość środkowa + + + + + Positive span + Dodatni zakres + + + + STICK 1 + Drążek 01 + + + + STICK 2 + Drążek 02 + + + + STICK 4 + Drążek 04 + + + + + Pot (normal) + Potencjometr (std) + + + + + Multipos Switch + Przeł. wielopoz + + + + S1 Type + Typ P1 + + + + S2 Type + Typ P2 + + + + POT 1 + Potencjometr 01 + + + + POT 2 + Potencjometr 02 + + + + POT 3 + Potencjometr 03 + + + + + + + += (Sum) + += (Suma) + + + + + + + := (Replace) + := (Zastąpienie) + + + + Battery + Zasilanie + + + + v + V + + + + PPM Multiplier + Mnożnik PPM + + + + Current + Natężenie + + + + If you enable FAI, you loose the vario, the play functions, the telemetry screen. +This function cannot be disabled by the radio. +Are you sure ? + Jeśli uaktywnisz tryb FAI, utracisz informacje o wariometrze, +funkcje odtwarzania i ekrany telemetrii. Ten tryb nie może być dezaktywowany. +Jesteś pewien ? + + + + + Warning + Ostrzeżenie + + + + Wrong data in profile, radio calibration was not retrieved + Błędne dane w profilu, kalibracja nie została odzyskana + + + + Wrong data in profile, hw related parameters were not retrieved + Błędne dane w profilu, parametry HW nie zostały odzyskana + + + + Do you want to store calibration in %1 profile<br>overwriting existing calibration? + Chcesz zapamiętać dane kalibracji profilu %1<br> Zastąpią one aktualne dane kalibracji? + + + + Calibration and HW parameters saved. + Kalibracja i parametry HW zapamiętane. + + + + Heli + + + Form + Formularz + + + + Invert Elevator + Odwróć SW + + + + Invert Aileron + Odwróć lotki + + + + Invert Collective + Odwróć Pochylenie (Collective) + + + + Invert + Odwróć + + + + Off + Wyłącz + + + + 120 + 120 + + + + 120X + 120X + + + + 140 + 140 + + + + 90 + 90 + + + + Collective + Pochylenie (collective) + + + + Swash Type + Typ tarczy + + + + Swash Ring + Pierścień tarczy + + + + InputsPanel + + + + Move Up + W górę + + + + + Ctrl+Up + Ctrl+Up + + + + + Move Down + W dół + + + + + Ctrl+Down + Ctrl+Down + + + + Clear All Settings + Wyczyść wszytkie ustawienia + + + + Source(%1) + Źródło(%1) + + + + No Trim + Bez trymera + + + + Weight(%1) + Waga(%1) + + + + Switch(%1) + Przełącznik(%1) + + + + Not enough available inputs! + Za mało dostępnych wejść! + + + + Delete Selected Inputs? + Skasować Wybrane Wejścia? + + + + &Add + &Dodaj + + + + Ctrl+A + Ctrl+A + + + + &Edit + &Edycja + + + + Enter + Enter + + + + &Delete + &Wykasuj + + + + Delete + Wykasuj + + + + &Copy + &Kopiuj + + + + Ctrl+C + Ctrl+C + + + + &Cut + &Wytnij + + + + Ctrl+X + Ctrl+X + + + + &Paste + &Wklej + + + + Ctrl+V + Ctrl+V + + + + Du&plicate + &Zduplikuj + + + + Ctrl+U + Ctrl+U + + + + Clear Inputs? + Wyczyść Wejścia? + + + + Really clear all the inputs? + Czy na pewno wyczyścić wszystkie wejścia? + + + + LogicalSwitchesPanel + + + Condition + Warunek + + + + V1 + Wartość 1 + + + + V2 + Wartość 2 + + + + AND + I (logiczne) + + + + Duration + Czas trwania + + + + Delay + Opóźnienie + + + + + LS%1 + PL%1 + + + + &Delete + &Wykasuj + + + + Delete + Wykasuj + + + + &Copy + &Kopiuj + + + + Ctrl+C + Ctrl+C + + + + &Cut + &Wytnij + + + + Ctrl+X + Ctrl+X + + + + &Paste + &Wklej + + + + Ctrl+V + Ctrl+V + + + + MainWindow + + + + + + File loaded + Plik załadowany + + + + Display previous warning again at startup ? + Wyświetlić poprzednie ostrzeżenie przy uruchomieniu? + + + + Checking for updates + Sprawdź aktualizacje + + + + + + + + Unable to check for updates. + Nie mogę sprawdzić aktualizacji. + + + + + + + + Save As + Zapisz jako + + + + Executable (*.exe) + Wykonywalny (*.exe) + + + + New release available + Dostępne jest nowe wydanie + + + + + No updates available at this time. + Brak aktualizacji dostępnych teraz. + + + + Would you like to launch the installer? + Chcesz uruchomić instalator? + + + + + + + + + + + + + + + + Error + Błąd + + + + + + + + Error opening file %1: +%2. + Błąd otwarcia pliku %1: +%2. + + + + Compilation server termporary failure, try later + Serwer kompilacji chwilowo nieczynny, spróbuj później + + + + Display previous message again at startup ? + Czy ponownie wyświetlić poprzednią informację przy uruchomieniu? + + + + Compilation server temporary failure, try later + Serwer kompilacji chwilowo nieczynny, spróbuj później + + + + + Compilation server too busy, try later + Serwer kompilacji zbyt zajęty, spróbuj później + + + + + Unknown server failure, try later + Nieznany błąd serwera, spróbuj później + + + + Firmware %1 does not seem to have ever been downloaded. +Version %2 is available. +Do you want to download it now ? + Firmware %1 nigdy nie zostało pobrane. +Dostępna jest wersja %2 +Pobrać teraz? + + + + + + Yes + Tak + + + + + No + Nie + + + + + Release Notes + Informacje o wydaniu + + + + + Do you want to download release %1 now ? + Chcesz pobrać wydanie %1 teraz? + + + + A new version of %1 firmware is available (current %2 - newer %3). +Do you want to download it now ? + Jest dostępna nowa wersja firmware %1 +(aktualna %2 - nowsza %3) +Chcesz pobrać teraz? + + + + Ignore this version (r%1)? + Zignorować wersję (r%1)? + + + + Release notes contain very important informations. Do you want to see them now ? + Opis wydania zawiera bardzo ważne informacje. Chcesz je przeczytać teraz? + + + + + File saved + Plik zapisany + + + + Firmware updates + Aktualizacja firmware + + + + Current firmware does not provide release notes informations. + Aktualny firmware nie zawiera opisu wydania. + + + + Cannot write file %1: +%2. + Nie mogę zapisać pliku %1: +%2. + + + + + + + + Taranis radio not found + Nie znaleziono Radia Taranis + + + + + + + Impossible to identify the radio on your system, please verify the eeprom disk is connected. + Identyfikacja radia niemożliwa w Twoim systemie, proszę sprawdzić podłączony dysk eeprom. + + + + + + Backup is impossible + Backup jest niemożliwy do wykonania + + + + + + The backup dir set in preferences does not exist + Brak ustawień ścieżki backupu + + + + + Warning + Ostrzeżenie + + + + Conversion failed + Konwersja nieudana + + + + Restore failed + Zapis nieudany + + + + Backup failed + Backup nieudany + + + + Copyright + + + + + OpenTX Companion - FW: %1 - Profile: %2 + OpenTX Companion - FW: %1 - Profil: %2 + + + + About... + O aplikacji... + + + + Print... + Drukuj... + + + + Simulate... + Symulacja... + + + + Simulate current model + Symulacja aktualnego modelu + + + + Load Backup... + Załaduj backup... + + + + View Log File... + Obejrzyj plik logów... + + + + Open and view log file + Otwórz i obejrzyj plik logów + + + + Edit Settings + Edycja Ustawień + + + + Settings... + Ustawienia... + + + + Download firmware and voice files + Pobierz firmware i pliki dźwiękowe + + + + Create a new Radio Setting Profile + Utwórz nowy Profil Ustawień Radia + + + + A monochrome black icon theme + Monochromatyczny czarny wygląd ikon + + + + + Open Models and Settings file + Otwórz plik Modeli i Ustawień + + + + New Models+Settings + Nowe Modele+Ustawienia + + + + Create a new Models and Settings file + Utwórz nowy plik Modeli i Ustawień + + + + Open Models+Settings... + Otwórz Modele i Ustawienia... + + + + Save Models+Settings... + Zapisz Modele i Ustawienia... + + + + + Save Models and Settings file + Zapisz plik Modeli i Ustawień + + + + Save Models+Settings as... + Zapisz Modele+Ustawienia jako... + + + + Cut Model + Wytnij Model + + + + Cut current model to the clipboard + Wytnij aktualny model do schowka + + + + Copy Model... + Kopiuj Model... + + + + Copy current model to the clipboard + Wytnij aktualny model do schowka + + + + Paste Model... + Wklej Model... + + + + Paste model from clipboard + Wklaj Model ze schowka + + + + The classic companion9x icon theme + Klasyczny zestaw ikon Companion + + + + A monochrome white icon theme + Monochromatyczny biały wygląd ikon + + + + A monochrome blue icon theme + Monochromatyczny niebieski wygląd ikon + + + + Small + Małe + + + + Use small toolbar icons + Użyj małych ikon paska narzędzi + + + + Use normal size toolbar icons + Użyj normalnych ikon paska narzędzi + + + + Normal + Normalne + + + + Use big toolbar icons + Użyj dużych ikon paska narzędzi + + + + Big + Duże + + + + Use huge toolbar icons + Użyj olbrzymich ikon paska narzędzi + + + + Huge + Olbrzymie + + + + Czech + Czeski + + + + Use Czech in menus + Użyj Czeskiego w menu + + + + German + Niemiecki + + + + Use German in menus + Użyj Niemieckiego w menu + + + + English + Angielski + + + + Use English in menus + Użyj Angielskiego w menu + + + + Finnish + Fiński + + + + Use Finnish in menus + Użyj Fińskiego w menu + + + + French + Francuski + + + + Use French in menus + Użyj Francuskiego w menu + + + + Italian + Włoski + + + + Use Italian in menus + Użyj Włoskiego w menu + + + + Hebrew + Hebrajski + + + + Use Hebrew in menus + Użyj Hebrajskiego w menu + + + + Polish + Polski + + + + Use Polish in menus + Użyj Polskiego w menu + + + + Portuguese + Portugalski + + + + Use Portuguese in menus + Użyj Portualskiego w menu + + + + Swedish + Szwedzki + + + + Use Swedish in menus + Użyj Szwedzkiego w menu + + + + Russian + Rosyjski + + + + Use Russian in menus + Użyj Rosyjskiego w menu + + + + + Radio Settings Profile + Profil Ustawień Radia + + + + Show recent Models+Settings documents + Pokaż ostatanie dokumenty Modeli i Ustawień + + + + Print current model + Drukuj aktualny model + + + + Check OpenTX and Companion updates + Sprawdź aktualizacje OpenTX i Companion + + + + Edit Tx Splash Image... + Edytor erkanu startowego radia... + + + + Fuses... + Bezpieczniki... + + + + Manuals and other Documents + Podręcznik i dokumentacja + + + + Open the OpenTX document page in a web browser + Otwórz stronę dokumentacji OpenTX w przeglądarce + + + + Save Tx Models and Settings to file + Zapisz modele radia i ustawienia do pliku + + + + A tribute to those who have contributed to OpenTX and Companion + Hołd dla tych, którzy przyczynili się do rozwoju OpenTX i Companion + + + + Contributors... + Współpracownicy... + + + + + Recent Models+Settings + Ostatnie Modele+Ustawienia + + + + Set Icon Theme + Ustaw wygląd ikon + + + + Set Icon Size + Ustaw wielkość ikon + + + + A new version of Companion is available (version %1)<br>Would you like to download it? + Dostępna jest nowy Companion (wersja %1)<br>Chcesz ją pobrać ? + + + + A new release of Companion is available please check the OpenTX website! + Nowe wydanie Companion jest dostępne, proszę sprawdzić stronę OpenTX! + + + + Firmware does not longer fit in the Tx, due to selected firmware options + Firmware już nie mieści się w pamięci radia ze względu na wybrane parametry + + + + + Compilation server requires registration, please check OpenTX web site + Serwer kompilacji wymaga rejestracji, proszę odwiedzić stronę OpenTX + + + + Firmware does not fit in the Tx, due to selected firmware options + Firmware już nie mieści się w pamięci radia ze względu na wybrane parametry + + + + Do you want to write the firmware to the transmitter now ? + Chcesz wgrać firmware do radia teraz? + + + + The selected language will be used the next time you start Companion. + Wybrany język będzie użyty po ponownym uruchomieniu Comapnion. + + + + + + OK + OK + + + + The new theme will be loaded the next time you start Companion. + Wybrany wygląd będzie użyty po ponownym uruchomieniu Comapnion. + + + + The icon size will be used the next time you start Companion. + Wybrana wiekość ikon będzie użyta po ponownym uruchomieniu Comapnion. + + + + + + + + Read Models and Settings From Tx + Wczytaj Modele i Ustawienia z radia + + + + Write Models and settings from %1 to the Tx? + Czy zapisać Modele i Ustawienia z %1 do radia ? + + + + The file %1 +has not been recognized as a valid Models and Settings file +Write anyway ? + Plik %1 +nie został rozpoznany jako prawidłowy pli Modeli i Ustawień. +Czy mimo wszystko zapisać? + + + + + + + + + Backup Models and Settings From Tx + Zbakupuj Modele i Ustawienia z radia + + + + Cannot check Models and Settings compatibility! Continue anyway? + Nie mogę potwierdzić kompatybilności Modeli i Ustawień. Kontynuować? + + + + The transmitter firmware belongs to another product family, check file and preferences! + Firmwqare radia nalezy do innej rodziny produktów, sprawdź plik i preferencje ! + + + + The transmitter firmware is outdated, please upgrade! + Firmware radia jest przestarzały, proszę zaktualizować! + + + + + Write Models and Settings To Tx + Zapisz Modele i Ustawienia do radia + + + + + Write Firmware To Tx + Zapisz firmware do radia + + + + Cannot convert Models and Settings for use with this firmware, original data will be used + Nie mogę skonwertować Modeli i Ustawień na ten rodzaj firmware, zostaną użyte oryginalne dane + + + + Restore Models and Settings To Tx + Odtwórz Modele i Ustawienia do radia + + + + Could not restore Models and Settings to TX. The models and settings data file can be found at: %1 + Nie mogę odtworzyć Modeli i Ustawień do radia. Plik modeli i ustawień mozna znaleźć w: %1 + + + + Firmware write failed + Zapis firmawe nie powiódł się + + + + Could not write firmware to to transmitter. The models and settings data file can be found at: %1 + Nie mogę zapisać Firmware do radia. Plik modeli i ustawień mozna znaleźć w: %1 + + + + Cannot backup existing Models and Settings from TX. Firmware write process aborted + Nie mogę zbackupować Modeli i Ustawień z radia, Zapis Firmawe przerwany + + + + Save transmitter Models and Settings to File + Zapisz Modele i Ustawienia z radia do pliku + + + + Impossible to identify the radio on your system, please verify that the eeprom disk is connected. + Identyfikacja radia niemożliwa w Twoim systemie, proszę sprawdzić podłączony dysk eeprom. + + + + Read Tx Firmware to File + Odczytaj firmware z radia do pliku + + + + OpenTX Home Page: <a href='%1'>%1</a> + Strona domowa OpenTX: <a href='%1'>%1</a> + + + + The OpenTX Companion project was originally forked from <a href='%2'>eePe</a> + Projekt Companion odłączony z oryginalnego <a href='%2'>eePe</a> + + + + If you've found this program useful, please support by <a href='%1'>donating</a> + Jeśli uważasz, że ten program jest użyteczny, wesprzyj poprzez <a href='%1'>donację</a> + + + + Version %1, %3 + Wersja %1, %3 + + + + About Companion + O aplikacji Companion + + + + Load backup from file + Załaduj backup z pliku + + + + Write Models and Settings to transmitter + Zapisz Modele i Ustawienia do radia + + + + Read Models and Settings from transmitter + Wczytaj Modele i Ustawienia z radia + + + + Write Firmware + Zapisz firmware + + + + Exit + Zakończ + + + + Monochrome + Monochromatyczny + + + + MonoWhite + MonoBiały + + + + MonoBlue + MonoNiebieski + + + + System language + Język systemu + + + + Use system language in menus + Użyj języka systemu w menu + + + + Download... + Pobieranie... + + + + Check for Updates... + Sprawdź aktualizacje... + + + + Companion Changes... + Zmiany w Companion... + + + + Show Companion change log + Pokaż log zmian Companion + + + + Firmware Changes... + Zmiany w Firmware... + + + + Show firmware change log + Pokaż log zmian Firmware + + + + Compare Models... + Porównaj modele... + + + + Edit the splash image of your TX + Edytuj ekran startowy swojego radia + + + + List programmers... + Lista programistów... + + + + Write firmware to transmitter + Zapisz firmware do radia + + + + Add Radio Profile + Dodaj profil radia + + + + Configure Communications... + Ustaw komunikację... + + + + Configure software for communicating with the transmitter + Ustaw oprogramowanie komunikacyjne z radiem + + + + Write Models and Settings from file to Tx + Zapisz Modele i Ustawienia z pliku do radia + + + + Write Models and Settings from file to transmitter + Zapisz Modele i Ustawienia z pliku do radia + + + + Save the Models and Settings from the transmitter to a file + Zapisz Modele i Ustawienia z radia do pliku + + + + Read Firmware + Wczytaj Firmware + + + + Yerico + + + + + Yellow round honey sweet icon theme + Żółty zaokrąglony miodiowy motyw ikon + + + + Read firmware from transmitter + Wczytaj Firmware z radia + + + + Write + Zapis + + + + %2 + %2 + + + + + Invalid Models and Settings File %1 + Błędny plik %1 Modeli i Ustawień + + + + Invalid binary Models and Settings File %1 + Błędny binarny plik %1 Modeli i Ustawień + + + + Compare models + Porównaj modele + + + + Exit the application + Zakończ aplikację companion9x + + + + List available programmers + Lista dostępnych programatorów + + + + Show fuses dialog + Pokaż okno ustawień mikro-kontrolera + + + + Show the application's About box + O aplikacji companion9x + + + + Classical + Klasyczny + + + + Set Menu Language + Ustaw język menu + + + + + File + Plik + + + + + Edit + Edycja + + + + Settings + Ustawienia + + + + Read/Write + Odczyt/Zapis + + + + + Help + Pomoc + + + + Show a selection list of radio settings profiles + Pokaż listę wyboru profili ustawiań radia + + + + Ready + Gotowe + + + + Unable to find file %1! + Nie mogę znaleźć pliku %1! + + + + Error reading file %1: +%2. + Błąd odczytu pliku %1: +%2. + + + + MdiChild + + + free bytes + wolna pamięć[B] + + + + Editing model %1: + Edycja modelu %1: + + + + + + + + + + + + + + + + + + + + + + + Error + Błąd + + + + + Unable to find file %1! + Nie mogę odnaleźć pliku %1! + + + + + + + Error opening file %1: +%2. + Błąd otwarcia pliku %1: +%2. + + + + + Invalid EEPROM File %1 + Zły plik EEPROM %1 + + + + Invalid binary EEPROM File %1 + Nieprawidłowy plik binarny EEPROM %1 + + + + + + + Save As + Zapisz jako + + + + + + + Cannot write file %1: +%2. + Nie mogę zapisać pliku %1: +%2. + + + + + Error writing file %1: +%2. + Błąd zapisu pliku %1: +%2. + + + + Do you want to use model wizard? + Czy chcesz użyć konfiguratora modelu? + + + + + + Companion + Companion + + + + Ask this question again ? + Czy ponownie zapytać ? + + + + + Error reading file %1: +%2. + Błąd odczytu pliku %1: +%2. + + + + %1 has been modified. +Do you want to save your changes? + %1 został zmieniony. +Zapisać? + + + + Backup is impossible + Backup jest niemożliwy + + + + The backup dir set in preferences does not exist + Ustawienia preferencji katalogu backupu nie istnieją + + + + Cannot write temporary file! + Nie mogę zapisać pliku tymczasowego! + + + + + + Taranis radio not found + Nie odnaleziono Radia Taranis + + + + + + Impossible to identify the radio on your system, please verify the eeprom disk is connected. + Identyfikacja radia w Twoim systemie nie jest możliwa, sprawdź dysk eeprom podpięty do komputera. + + + + + + Backup EEPROM From Tx + Backup EEPROM z radia + + + + Cannot check eeprom compatibility! Continue anyway? + Nie mogę sprawdzić kompatybilności EEprom! Kontynuować ? + + + + + Warning + Ostrzeżenie + + + + Firmware in radio is of a different family of eeprom written, check file and preferences! + Firmware w radiu jest różny od zapisanego eepromu, sprawdź plik i ustawienia! + + + + Firmware in flash is outdated, please upgrade! + Firmware w radiu jest przestarzały. Proszę zaktualizować! + + + + Write EEPROM To Tx + Zapis EEPROM do radia + + + + Open backup Models and Settings file + Otwórz plik backupu Modeli i Ustawień + + + + Invalid binary backup File %1 + nieprawidłowy binarny plik %1 + + + + MixerDialog + + + Dialog + + + + + Source + Źródło + + + + + + + The source for the mixer + Źródło miksera + + + + Weight + Waga + + + + Offset + Wyrównanie + + + + Include Trim + Uwzględnij trymer + + + + + + GV + + + + + No + Nie + + + + Yes + Tak + + + + Curve + Krzywa + + + + The curve used by the mix + Krzywa użyta do miksera + + + + Switch used by the mix. +If blank then the mix is considered to be "ON" all the time. + Przełącznik użyty do miksera +Jeśli pusty - mikser będzie stale aktywny. + + + + Switch + Przełącznik + + + + Warning + Ostrzeżenie + + + + Mixer warning. +Setting this value will cause a beep to be emmitted when this value is active. + Ostrzeżenie miksera. +Ustawienie tej wartości spowoduje emitowanie dźwięku kiedy wartość będzie aktywna. + + + + OFF + Wyłącz + + + + 1 Beep + 1 piknięcie + + + + 2 Beep + 2 piknięcia + + + + 3 Beep + 3 piknięcia + + + + Multiplex + Połączenie + + + + 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. + Multiplexer + +Ustala w jaki sposób miksery są łączone. + +"+" oznacza dowanie wartości miksera do wcześniejszych mikserów na tym kanale. +"*" oznacza mnożenie wartości miksera przez wcześniejsze miksery na tym kanale. +"R" oznacza zastąpienie wartością miksera, wcześniejszych mikserów na tym kanale. + + + + ADD + Dodawaj + + + + MULTIPLY + Pomnóż + + + + REPLACE + Zastąp + + + + Name + Nazwa + + + + Flight modes + Fazy lotu + + + + Include DR/Expo + Dołącz DR/Expo + + + + 0 + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + Delay + Opóźnienie + + + + Slow + Spowolnienie + + + + Up + Do góry / (+) + + + + Down + Do dołu / (-) + + + + + + + <!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;">Opóźnienie i spowolnienie</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;">Te wartośći określają prędkość i opóźnienie wyjścia mikserów </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;">Jeśli opóżnienie nie jest równe 0 aktywacja miksera zostanie opózniona o określoną ilość sekund.</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;">Jeśli spowolnienie nie jest równe 0 wtedy prędkość miksera zostanie ustawiona na podaną wartość-&gt; wartość oznacza liczbę sekund jaką mikser potrzebuje by pokonać drogę od -100 do 100.</p></body></html> + + + + DEST -> X%1 + Cel -> X%1 + + + + DEST -> CH%1%2 + Cel -> KAN%1%2 + + + + Rud + SK + + + + Ele + SW + + + + Thr + Gaz + + + + Ail + Lotki + + + + MixesPanel + + + + Move Up + W górę + + + + + Ctrl+Up + Ctrl+Up + + + + + Move Down + W dół + + + + + Ctrl+Down + Ctrl+Down + + + + Clear Mixes + Wyczyść miksery + + + + + + X%1 + X%1 + + + + + + CH%1%2 + Kan %1%2 + + + + Weight(%1) + Waga(%1) + + + + Switch(%1) + Przełącznik(%1) + + + + No Trim + Bez trymera + + + + No DR/Expo + Bez DR/Expo + + + + Offset(%1) + Wyrównanie(%1) + + + + Delay(u%1:d%2) + Opóźnienie(u%1:d%2) + + + + Slow(u%1:d%2) + Spowolnienie(u%1:d%2) + + + + Warn(%1) + Ostrzeżenie(%1) + + + + Not enough available mixers! + Za mało dostępnych mikserów! + + + + Delete Selected Mixes? + Skasować wybrane miksery? + + + + &Add + &Dodaj + + + + Ctrl+A + Ctrl+A + + + + &Edit + &Edycja + + + + Enter + Enter + + + + &Delete + &Wykasuj + + + + Delete + Wykasuj + + + + &Copy + &Kopiuj + + + + Ctrl+C + Ctrl+C + + + + &Cut + &Wytnij + + + + Ctrl+X + Ctrl+X + + + + &Paste + &Wklej + + + + Ctrl+V + Ctrl+V + + + + Du&plicate + &Zduplikuj + + + + Ctrl+U + Ctrl+U + + + + Clear Mixes? + Wyczyść miksery? + + + + Really clear all the mixes? + Czy na pewno wyczyścić wszystkie miksery? + + + + ModelEdit + + + Dialog + + + + + Simulate + Symulacja + + + + Setup + Ustawienia + + + + Heli + Heli + + + + Inputs + Wejścia + + + + Logical Switches + Przełączniki Logiczne + + + + Switch Assignment + Przypisanie Przełączników + + + + Channels + Kanały + + + + Mixes + Miksery + + + + Flight Modes + Fazy lotu + + + + Curves + Krzywe + + + + Telemetry + Telemetria + + + + Clear Curves? + Wyczyść krzywe? + + + + Really clear all the curves? + Czy na pewno wyczyścić wszystkie krzywe? + + + + ModelsListWidget + + + &Edit + &Edycja + + + + &Restore from backup + &Odtworzyć z backupu + + + + &Model Wizard + &Kreator ustawień modelu + + + + &Delete + &Wykasuj + + + + Delete + Wykasuj + + + + &Copy + &Kopiuj + + + + Ctrl+C + + + + + &Cut + &Wytnij + + + + Ctrl+X + + + + + &Paste + &Wklej + + + + Ctrl+V + + + + + D&uplicate + &Zduplikuj + + + + Ctrl+U + + + + + &Use as default + &Użyj jako bazowy + + + + P&rint model + Wy&drukuj model + + + + Alt+R + + + + + &Simulate model + &Zasymuluj model + + + + Alt+S + + + + + General Settings + Główne ustawienia + + + + Delete Selected Models? + Skasować wybrane modele? + + + + + Cannot delete default model. + Nie mogę wykasować bazowego modelu. + + + + Cannot cut default model. + Nie mogę wyciąć bazowego modelu. + + + + Do you want to overwrite TX general settings? + Chcesz nadpisać generalne ustawienia radia? + + + + You are pasting on an not empty model, are you sure? + Wklejasz na niepustym modelu, jesteś pewien? + + + + No free slot available, cannot duplicate + Brak wolnych miejsc, nie mogę zduplikować + + + + Module + + + Form + Formularz + + + + Failsafe Mode + Tryb Failsafe + + + + Start + Start + + + + PPM delay + Opóźnienie PPM + + + + usec + us + + + + Negative + Ujemna + + + + Positive + Dodatnia + + + + RX Number + Numer Odbiornika + + + + Master + Trener + + + + Slave + Uczeń + + + + Polarity + Polaryzacja + + + + Trainer Mode + Tryb trenera + + + + mSec + ms + + + + PPM Frame Length + Długość ramki PPM + + + + Label + Etykieta + + + + + ch + kanał + + + + Channels + Kanały + + + + Hold + Utrzymuj + + + + Custom + Ustawienia Własne + + + + No Pulses + Brak sygnałów + + + + Failsafe Positions + Pozycja Failsave + + + + Protocol + Protokół + + + + ModulePanel + + + Trainer Output + Wyjśćie Trenera + + + + Internal Radio System + Wenętrzny moduł radiowy + + + + External Radio Module + External Radio Module - Internal Radio System - zaznaczyć by opisać spójność nazw angielskich + + Zewnętrzny moduł radiowy + + + + QObject + + + + Rud + SK + + + + + Ele + SW + + + + + Thr + Gaz + + + + + Ail + Lotki + + + + + + P1 + Potencjometr 1 + + + + + + P2 + Potencjometr 2 + + + + + + P3 + Potencjometr 3 + + + + + S1 + Potencjometr 1 + + + + + S2 + Potencjometr 2 + + + + + LS + Lewy suwak + + + + + RS + Prawy suwak + + + + TrmR + Trymer SK + + + + TrmE + Trymer SW + + + + TrmT + Trymer gazu + + + + TrmA + Trymer lotek + + + + + + REa + Pokrętło :a + + + + + + REb + Pokrętło :b + + + + Batt + Bateria + + + + A1 + Sygnał telemetrii A1 + + + + A2 + Sygnał telemetrii A2 + + + + Alt + Wysokość + + + + Rpm + Obroty + + + + Fuel + Paliwo + + + + T1 + + + + + Tx + + + + + Rx + + + + + SWR + SWR + + + + RSSI + + + + + T2 + + + + + Speed + Prędkość + + + + Dist + Odległość + + + + GPS Alt + Wysokość GPS + + + + Cell + Cela + + + + Cels + Cele + + + + Vfas + + + + + Curr + Natężenie + + + + Cnsp + + + + + Powr + Moc + + + + AccX + + + + + AccY + + + + + AccZ + + + + + HDG + + + + + VSpd + + + + + A1- + + + + + A2- + + + + + Alt- + + + + + Alt+ + + + + + Rpm+ + + + + + T1+ + + + + + T2+ + + + + + Spd+ + + + + + Dst+ + + + + + Cur+ + + + + + ACC + + + + + Time + + + + + Pwr+ + + + + + + LS1 + PL1 + + + + + LS2 + PL2 + + + + + LS3 + PL3 + + + + + LS4 + PL4 + + + + + LS5 + PL5 + + + + + LS6 + PL6 + + + + + LS7 + PL7 + + + + + LS8 + PL8 + + + + + LS9 + PL9 + + + + + LSA + PLA + + + + + LSB + PLB + + + + + LSC + PLC + + + + + LSD + PLD + + + + + LSE + PLE + + + + + LSF + PLF + + + + + LSG + PLG + + + + + LSH + PLH + + + + + LSI + PLI + + + + + LSJ + PLJ + + + + + LSK + PLK + + + + + LSL + PLL + + + + + LSM + PLM, + + + + + LSN + PLN + + + + + LSO + PLO + + + + + LSP + PLP + + + + + LSQ + PLQ + + + + + LSR + PLR + + + + + LSS + PLS + + + + + LST + PLT + + + + + LSU + PLU + + + + + LSV + PLV + + + + + LSW + PLW + + + + Input %1 + Wejście %1 + + + + MAX + + + + + S11 + P11 + + + + S12 + P12 + + + + S13 + P13 + + + + S14 + P14 + + + + S15 + P15 + + + + S16 + P16 + + + + S21 + P21 + + + + S22 + P22 + + + + S23 + P23 + + + + S24 + P24 + + + + S25 + P25 + + + + S26 + P26 + + + + CYC%1 + + + + + PPM%1 + + + + + CH%1%2 + Kan %1%2 + + + + X%1 + + + + + + + + ---- + + + + + + THR + THR + + + + + ON + Włącz + + + + + + OFF + Wyłącz + + + + Diff(%1) + Róźnicowość(%1) + + + + Expo(%1) + Expo(%1) + + + + Function(%1) + Funkcja(%1) + + + + Curve(%1) + Krzywa(%1) + + + + !Curve(%1) + !Krzywa(%1) + + + + + Support for frsky telemetry mod + Wsparcie dla telemetrii FrSky + + + + + Support for jeti telemetry mod + Wsparcie telemetrii JETI + + + + + Support for receiving ardupilot data + Wsparcie dla otrzymywania danych ardupilota + + + + + Support for receiving NMEA data + Wsparcie dla otrzymywania danych NMEA + + + + Support for telemetry easy board + Wsparcie dla platformy TelemetrEZ + + + + + Support for MAVLINK devices + Wsparcie urządzeń MAVLINK + + + + Rotary Encoder use in menus navigation + Użycie pokrętła do nawigacji w menu + + + + Possibility to enable FAI MODE at field + Umożliwienie uaktywniania tryb FAI w menu + + + + FAI MODE always enabled + Tryb FAI zawsze aktywny + + + + + + + + Enable heli menu and cyclic mix support + Uaktywnione menu Heli i wsparcie dla cyklicznych mikserów + + + + + + + + + Enable TEMPLATES menu + Uaktywnienie menu szablonów + + + + + + + No splash screen + Bez loga na ekranie + + + + + + + + + No flight modes + Firmware bez menu faz lotu + + + + + + + + + In model setup menus automatically set source by moving some of them + W menu ustawień modelu automatycznie wybierz źródło poprzez poruszenie nim + + + + + + + + + + + Use alternative SQT5 font + Użyj alternatywnego fontu SQT5 + + + + EEprom write progress bar + Pasek postępu wgrywania EEPROMu + + + + + No Winged Shadow How High support + Bez wsparcia - Winged Shadow How High + + + + + No vario support + Bez wsparcia wario + + + + + No GPS support + Bez wsparcia GPS + + + + + No gauges in the custom telemetry screen + Bez graficznych wskazań telemetrii + + + + Allow compensating for offset errors in FrSky FAS current sensors + Pozwolenie na kompensację błędów w czujnikach natężenia FrSky FAS + + + + OpenTX for FrSky Taranis Rev4a + OpenTX dla platformy FrSky Taranis Rev4a + + + + Use FrSky Taranis sticks in a 9X/9XR + Użyj drążków Taranisa w 9X/9XR + + + + OpenTX for FrSky Taranis + OpenTX dla platformy FrSky Taranis + + + + + Disable HELI menu and cyclic mix support + Dezaktywowane menu Heli i wsparcie dla cyklicznych mikserów + + + + + Disable TEMPLATES menu + Dezaktywowane menu szablonów + + + + + Disable Global variables + dezaktywowane zmienne globalne + + + + + + + + + Disable curves menus + Bez menu krzywych + + + + + + + Support for radio modified with regular speaker + Wsparcie dla modyfikacji radia zwykłym głośnikiem + + + + + + + + Used if you have modified your radio with voice mode + Używane jeśli radio jest zmodyfikowane w calu użycia komunikatów głosowych + + + + + + + Used if you have modified your radio with haptic mode + Używane jeśli radio jest zmodyfikowane do użycia wibracji + + + + + + + + + Battery graph + Grafika baterii + + + + + + + Enable the throttle trace in Statistics + Uaktywnić śledzenie gazu w statystykach + + + + Support of FrSky PXX protocol + Wsparcie dla protokołu Frsky PXX + + + + + + + + Support for DSM2 modules + wsparcie modułu DSM2 + + + + Your radio probably uses a wrong firmware, + eeprom size is 4096 but only the first 2048 are used + Twoje radio prawdopodobnie używa złego firmware, + wielkość eepromu jest 4096 ale tylko pierwsze 2048 jest używane + + + + + + + + + PPM center adjustment in limits + Limit dostrojenia centrowania PPM + + + + + + + + + + + PPM values displayed in us + Wartości PPM wyświetlane w us (mikrosekundy) + + + + + + + + + Symetrical Limits + Limity symetryczne + + + + + + + + Pots use in menus navigation + Użycie potencjometrów do nawigacji w menu + + + + OpenTX for 9X board + OpenTX dla platformy 9X + + + + + SmartieParts 2.2 Backlight support + Wsparcie podświetlenia SmartieParts 2.2 + + + + + + + + + In model setup menus automatically set switch by moving some of them + W menu modelu automatyczne wybranie przełącznika w przez jego poruszenie + + + + + + + Enable resetting values by pressing up and down at the same time + Szybkie nastawianie wartości +(+) a (-) neguje wartość +(+)a (UP) ustawia max +(-) a (DN) ustawia min +(UP) a (DN) ustawia 0 + + + + + + + + + No graphical check boxes and sliders + Brak graficznych chekboxów i sliderów + + + + + + + + + Don't use bold font for highlighting active items + Nie używaj podświetlenia dla wybranych aktywnych elementów, mikserów, krzywych, expo, etc + + + + OpenTX for M128 / 9X board + OpenTX dla platformy M128 / 9X + + + + + + + EEprom write Progress bar + Pasek postępu zapisywania EEPROM + + + + + + + + Imperial units + Imperialne jednostki w telemetrii + + + + Bluetooth interface + Interface Bluetooth + + + + + + + + + Global variables + Globalne zmienne + + + + OpenTX for 9XR + OpenTX dla platformy 9XR + + + + OpenTX for 9XR with M128 chip + OpenTX dla platformy 9X z układem M128 + + + + OpenTX for Gruvin9x board / 9X + ie: OpenTX dla platformy Gruvin9X / 9X + + + + Support for SD memory card + Wsparcie karty SD + + + + Support for DSM2 modules using ppm instead of true serial + Wsparcie modułu DSM2 przez użycie PPM zamiast prawdziwego szeregowego + + + + OpenTX for Sky9x board / 9X + OpenTX dla platformy Sky9x / 9X + + + + Enable HELI menu and cyclic mix support + Uaktywnij menu HELI i cyklicznych mikserów + + + + + Warning + Ostrzeżenie + + + + EEPROM saved with these warnings: + EEPROM zapisany z tymi ostrzeżeniami: + + + + + FM%1 + FP%1 + FM%1 + + + + Input%1 + Wejście %1 + + + + English + Angielski + + + + French + Francuski + + + + Italian + Włoski + + + + German + Niemiecki + + + + Czech + Czeski + + + + Slovak + Słowacki + + + + Spanish + Hiszpański + + + + Portuguese + Portugalski + + + + Polish + Polski + + + + Finnish + Fiński + + + + No + Nie + + + + RotEnc A + Pokrętło :A + + + + Rot Enc B + Pokrętło :B + + + + Rot Enc C + Pokrętło :C + + + + Rot Enc D + Pokrętło :D + + + + Rot Enc E + Pokrętło :E + + + + + No repeat + Bez powtórzeń + + + + %1 sec + %1 s + + + + Safety %1 + Bezpieczny %1 + + + + ASpd + ASpd + + + + dTE + dTE + + + + Cel- + Cel- + + + + Vfs- + Vfs- + + + + RudTrim Left + SK Trymer lewy + + + + RudTrim Right + SK Trymer prawy + + + + EleTrim Down + SW Trymer w dół + + + + EleTrim Up + SW Trymer w górę + + + + ThrTrim Down + Gaz Trymer w dół + + + + ThrTrim Up + Gaz Trymer w gorę + + + + AilTrim Left + Lotki trymer w lewo + + + + AilTrim Right + Lotki trymer w prawo + + + + ABS + ABS + + + + THs + THs + + + + TH% + TH% + + + + THt + THt + + + + ??? + ??? + + + + a>x + a>x + + + + a<x + a<x + + + + |a|>x + |a|>x + + + + |a|<x + |a|<x + + + + AND + I (logiczne) + + + + OR + Lub (logiczne) + + + + XOR + XOR (Logiczne) + + + + a=b + a=b + + + + a!=b + a!=b + + + + a>b + a>b + + + + a<b + a<b + + + + a>=b + a>=b + + + + a<=b + a<=b + + + + d>=x + d>=x + + + + |d|>=x + |d|>=x + + + + a~x + a~x + + + + Timer + Timer + + + + Sticky + + + + + Stay + Utrzymuj + + + + Unknown + Nieznane + + + + STAY(%1, [%2:%3]) + Utrzymuj(%1, [%2:%3]) + + + + STICKY(%1, %2) + + + + + TIMER(%1, %2) + TIMER(%1, %2) + + + + Trainer + Trener + + + + Trainer RUD + Trener - SK + + + + Trainer ELE + Trener - SW + + + + Trainer THR + Trener - Gaz + + + + Trainer AIL + Trener - Lotki + + + + Instant Trim + Natychmiastowe trymowanie + + + + Play Sound + Odtwórz dźwięk + + + + Play Haptic + Wibruj + + + + Reset + Zresetuj + + + + Set Timer %1 + Ustaw Timer %1 + + + + Vario + Wariometr + + + + Play Both + Odtwórz oba + + + + Play Value + Odtwórz wartość + + + + Start Logs + Start logowania + + + + Volume + Głośność + + + + Backlight + Podświetlenie + + + + Adjust GV%1 + Ustaw ZG%1 + + + + + + + + + <font color=red><b>Inconsistent parameter</b></font> + Niespójny parametr + <font color=red><b>Niespójny parametr</b></font> + + + + Rotary Encoder + Pokrętło + + + + !Flight mode %1 + !Faza lotu %1 + + + + Flight mode %1 + Faza lotu %1 + + + + Yellow + Żółty + + + + Orange + Pomarańczowy + + + + Red + Czerwony + + + + Winged Shadow How High + + + + + Winged Shadow How High (not supported) + Winged Shadow How High (nie obsługiwane) + + + + FrSky Sensor Hub + Hub sensora FrSky + + + + + None + Żaden + + + + Imperial + Imperialne + + + + Metric + Metryczne + + + + Extra Fine + Bardzo dokładne + + + + Fine + Dokładne + + + + Medium + Średni + + + + Coarse + Gruby + + + + Exponential + Eksponencjalny + + + + Count Up + Licz + + + + Count Down + Odliczaj + + + + %1:%2, + + + + + : %1 Channels, %2usec Delay + :Kanały %1, opóźnienie %2usX + + + + Flight modes(%1) + Fazy lotu(%1) + + + + Flight mode(%1) + Faza lotu (%1) + + + + Rudder + SK + + + + Elevator + SW + + + + Throttle + Gaz + + + + Aileron + Lotki + + + + Play Track + Odtwórz ścieżkę + + + + + + --- + + + + + Rud Trim + Trymer SK + + + + Ele Trim + Trymer SW + + + + Thr Trim + Trymer gazu + + + + Ail Trim + Trymer lotek + + + + Rot Enc + Pokrętło + + + + Swedish + Szwedzki + + + + CH%1 + Kan %1 + + + + Background Music + Muzyka tła + + + + Background Music Pause + Muzyka tła - pauza + + + + Delay %1 sec + Opóźnienie %1sec + + + + Duration %1 sec + Czas trwania %1 sec + + + + + + + Timer1 + + + + + + + + Timer2 + + + + + + + All + Wszystkie + + + + + + Telemetry + Telemetria + + + + + Value + Wartość + + + + + Decr: + Zmniejsz: + + + + + Incr: + Zwiększ: + + + + Played once, not during startup + Otwarzaj raz, nie w trakcie uruchomienia + + + + %1s + + + + + Value + Wartość + + + + Source + Źródło + + + + GVAR + Zmienna + + + + Increment + Zwiększanie + + + + Own value + Własny Wartość + + + + Flight mode %1 value + Flight phase %1 value + Wartość Fazy lotu FL%1 + + + + Keys + Przyciski + + + + Sticks + Drążki + + + + Keys + Sticks + Przyciski i Drążki + + + + + -GV%1 + -ZG%1 + + + + + + GV%1 + ZG%1 + + + + Simulator for this firmware is not yet available + Nie jest dostępny symulator dla tego firmware + + + + + Simultaneous usage of expo and curves is no longer supported + Równoległe użycie expo i krzywych nie jest dłużej wspierane + + + + openTx only accepts %1 points in all curves + openTx dopuszcza tylko %1 punktów dla wszystkich krzywych + + + + + + + OpenTX on this board doesn't accept this function + OpenTX na tej platformie nie dopuszcza tej funkcji + + + + + OpenTX doesn't accept this protocol + OpenTX nie obsługuje tego protokołu + + + + OpenTX doesn't allow this number of channels + OpenTX nie obsługuje tej ilości kanałów + + + + Simultaneous usage of expo and curves is no longer supported in open9x + Jednoczesne użycie expo i krzywych nie jest dłużej wspierane dla Open9x + + + + th9x on this board doesn't have Rotary Encoders + th9x nie posiada pokręteł na tej platformie + + + + 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. + Dziękujemy za wszystkie datki, miłe wiadomości, ciekawe pomysły, konstruktywne propozycje. etc. dla następnych aparatur działających z OpenTX/Companion + +Bardzo nam na tym zależy i są to dla nas bardzo wazne elementy + +Zespół OpenTX/Companion. + + + + Trim disabled + Trymery wyłączone + + + + Own Trim + Własne trymery + + + + Use Trim from Flight mode %1 + Użyj trymerów dla Fazy Lotu %1 + + + + Use Trim from Flight mode %1 + Own Trim as an offset + Użyj trymerów dla Fazy Lotu %1 + Własne trymery jako offset + + + + FW: %1 + FW:%1 + + + + Pict: %1 + Obrazek:%1 + + + + Profile image + Obrazek Profilu + + + + Setup + + + Form + Formularz + + + + Model Name + Nazwa modelu + + + + Timer2 + Timer 02 + + + + Timer1 + Timer 01 + + + + Throttle Source + Źródło gazu + + + + Center beep + Pikanie przy centrowaniu + + + + Trim Increment + Kroki trymera + + + + OFF + Wyłącz + + + + Model Image + Obrazek modelu + + + + Switch Warnings + Ostrzeżenie o przełącznikach + + + + Exponential + Wykładnicze + + + + Extra Fine + Bardzo dokładne + + + + Fine + Dokładne + + + + Medium + Średnie + + + + Coarse + Zgrubne + + + + Extended Limits + Rozszerzone limity (125%) + + + + Extended Trims + Poszerzone trymery + + + + Display Checklist + Wyświetl Czeklistę + + + + Throttle Trim + Trymer gazu + + + + Throttle Warning + Ostrzeżenie o gazie + + + + 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. + + + Odwrócenie gazu. +Wolne obroty będą na górze, trymer i ostrzeżenie o otwartym gazie również zostaną odwrócone. + + + + + Reverse Throttle + Odwrotna praca gazu + + + + Pot Warnings + Ostrzeżenie o potencjometrach + + + + Manual + + + + + Auto + Automatyczne + + + + SimulatorDialog + + + + Warning + Ostrzeżenie + + + + Joystick enabled but not configured correctly + Joystick uaktywniony ale nieprawidłowo skonfigurowany + + + + Cannot open joystick, joystick disabled + Nie mogę otworzyć joysticka, dezaktywowany + + + + Simulating Tx (%1) + Symulacja Tx (%1) + + + + Firmware %1 error: %2 + Firmware %1 błąd: %2 + + + + SimulatorDialog9X + + + Companion Simulator + Symulator Companion + + + + + + + Right Double Click to Reset + Powójne kliknięcie PPM w celu zresetowania + + + + THR + Gaz + + + + RUD + SK + + + + ELE + SW + + + + AIL + Lotki + + + + + Hold X + Przytrzymaj X + + + + + Fix X + Zablokuj X + + + + + Fix Y + Zablokuj Y + + + + + Hold Y + Przytrzymaj Y + + + + + + + TextLabel + Etykieta + + + + TRN + TRN + + + + GEA + GEA + + + + ID0 + ID0 + + + + ID1 + DI1 + + + + ID2 + ID2 + + + + BEEP + Dźwięk + + + + P1 + Potencjometr1 + + + + + + 0 % + + + + + P2 + Potencjometr2 + + + + P3 + Potencjometr 3 + + + + 9x Simulator + Symulator 9x + + + + Outputs + Wyjścia + + + + SimulatorDialogTaranis + + + Companion Simulator + Symulator Companion + + + + + Hold Y + Przytrzymaj Y + + + + + Fix Y + Zablokuj Y + + + + + Fix X + Zablokuj X + + + + + Hold X + Przytrzymaj X + + + + + SD + SD + + + + + SC + SC + + + + + + + Right Double Click to Reset + Powójne kliknięcie PPM w celu zresetowania + + + + + S2 + S2 + + + + + SG + SG + + + + + RS + RS + + + + + SH + SH + + + + + + + TextLabel + Etykieta + + + + + S1 + S1 + + + + + SB + SB + + + + + SA + SA + + + + + SE + SE + + + + + + SF + SF + + + + + LS + LS + + + + Taranis Simulator + Symulator Taranis + + + + Outputs + Wyjścia + + + + Telemetry + + + Form + Formularz + + + + + + + A1 + A1 + + + + + + + A2 + A2 + + + + RSSI + RSSI + + + + Alarm 1 + Alarm 1 + + + + + ---- + ---- + + + + + Yellow + Żółty + + + + + Orange + Pomarańczowy + + + + + Red + Czerwony + + + + Alarm 2 + Alarm 2 + + + + Serial Protocol + Protokół szeregowy + + + + Volt source + Źródło napięcia + + + + Metric + Metryczne + + + + Imperial + Imperialne + + + + Current source + Źródło prądu(natężenia) + + + + Protocol + Protokół + + + + NONE + BRAK + + + + + FAS + FAS + + + + None + Żadne + + + + FrSky Sensor Hub + Hub Czujników FrSky + + + + CEL + Ogniwo + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + Units + Jednostki + + + + Blades + Łopaty śmigła + + + + Altimetry / Vario + Wysokościomierz/Wario + + + + Alti + Wysokościomierz + + + + Alti+ + Wysokościomierz+ + + + + Vario + Wario + + + + Sink Max + Maks. Opadanie + + + + Off + Wyłączone + + + + Climb Max + Maks. Wznoszenie + + + + Sink Min + Min. Opadanie + + + + Climb Min + Min. Wznoszenie + + + + Vario source + Źródło wario + + + + Vario limits + Limity wario + + + + Use GPS as altitude source + Używaj GPS jako źródła danych wysokości + + + + Display altitude in toolbar + Wyświetl wysokość na pasku + + + + Various + Różne + + + + mAh count + Licznik mAh + + + + FAS Offset + Wyrównanie FAS + + + + Persistent mAh + Stałe mAh + + + + TelemetryAnalog + + + Form + Formularz + + + + Unit + Jednostka + + + + Max Value + Maks. wartość + + + + Alarm 1 + Alarm 1 + + + + + ---- + ---- + + + + + Yellow + Żółty + + + + + Orange + Pomarańczowy + + + + + Red + Czerwony + + + + + < + < + + + + + > + > + + + + Alarm 2 + Alarm 2 + + + + Min Value + Min. Wartość + + + + Volts (V) + Wolty (V) + + + + Amps (A) + Ampery (A) + + + + Speed (m/s or ft/s) + Prędkość (m/s albo ft/s) + + + + Raw (-) + Bezwymiarowe (-) + + + + Speed (km/h or miles/h) + Prędkość (km/h albo míle/h) + + + + Meters (m or ft) + Wysokość (m albo ft) + + + + Temp (°) + Temp (°) + + + + Fuel (%) + Paliwo (%) + + + + mAmps (mA) + miliAmpery (mA) + + + + Range + Zasięg + + + + TelemetryCustomScreen + + + Form + Formularz + + + + Custom Screen Type + Typ panelu + + + + Nums + Liczby + + + + Bars + Paski + + + + Min + Min + + + + Source + Źródło + + + + Gauge + Pomiar + + + + Max + Maks + + + + TelemetryPanel + + + Telemetry screen %1 + Panel Telemetrii %1 + + + + Winged Shadow How High + Winged Shadow How High + + + + Winged Shadow How High (not supported) + Winged Shadow How High (Nie obsługiwane) + + + + Timer + + + Form + Formularz + + + + mm:ss + mm:ss + + + + Countdown + Odliczanie + + + + MinuteBeep + Pikanie minutowe + + + + Persistent + Stały + + + + (00:00:00) + (00:00:00) + + + + TimerPanel + + + None + Żaden + + + + Beeps + Dźwięk + + + + Countdown + Odlicznie + + + + appPreferencesDialog + + + Simulator capture folder + Katalog zapisu symulatora + + + + Remember simulator switch values + Zapamiętaj ustawienia przełączników w symulatorze + + + + + + + Open Folder + Otwórz katalog + + + + User Splash Screens + Użyj ekranu powitalnego + + + + Edit Settings + Edycja Ustawień + + + + Application Settings + Ustawienia Aplikacji + + + + Only show user splash images + Pokaż tylko ekrany powitalne użytkownika + + + + Show user and companion splash images + Pokaż ekrany powitalne użytkownika i Companion + + + + Simulator Settings + Ustawienia Symulatora + + + + Blue + Niebieskie + + + + Green + Zielone + + + + Red + Czerwone + + + + Orange + Pomarańczowe + + + + Yellow + Żółte + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + + + + + Mode 1 (RUD ELE THR AIL) + Mod 1 (SK.SW.Gaz.Lot) + + + + Mode 2 (RUD THR ELE AIL) + Mod 2 (SK.Gaz.SW.Lot) + + + + Mode 3 (AIL ELE THR RUD) + + + + + Mode 4 (AIL THR ELE RUD) + Mod 4 (Lot.Gaz.SW.SK) + + + + Channel order + +This is used by the templated to determine which channel goes to what number output. + Kolejność kanałów + +To ustawienie jest używane przez szablony, określa jakie wyjście przypisane jest do kanału. + + + + R E T A + K W G L + + + + R E A T + K W L G + + + + R T E A + + + + + R T A E + K G L W + + + + R A E T + K L W G + + + + R A T E + K L G W + + + + E R T A + W K G L + + + + E R A T + W K L G + + + + E T R A + W G K L + + + + E T A R + W G L K + + + + E A R T + W L K G + + + + E A T R + W L G K + + + + T R E A + G K W L + + + + T R A E + G K L W + + + + T E R A + G W K L + + + + T E A R + G W L K + + + + T A R E + G L K W + + + + T A E R + G L W K + + + + A R E T + L K W G + + + + A R T E + L R G W + + + + A E R T + L W K G + + + + A E T R + L W G K + + + + A T R E + L G K W + + + + A T E R + L G W K + + + + Default Stick Mode + Bazowy mod drążków + + + + Splash Screen + Ekran startowy + + + + Channel Order + Kolejność kanałów + + + + Append version number to FW file name + Dodaj numer Firmware do nazwy pliku + + + + SD Structure path + Struktura karty SD + + + + Firmware Variant + Wariant Firmware + + + + Select Image + Wybierz obrazek + + + + Firmware File + Plik Firmware + + + + Offer to write FW to Tx after download + Zaproponuj zapisanie FirmWare do radia po pobraniu + + + + Radio Settings Profile + Profil Ustawień Radia + + + + Profile Name + Nazwa profilu + + + + Remove Profile + Usuń Profil + + + + Clear Image + Wyczyść obrazek + + + Firmware + Firmware + + + + Splash Screen Library + Biblioteka ekranół powitalnych + + + + Files to keep + Pkili to zapamiętania + + + + Simulator BackLight + Podświetlenie symularota + + + + Automatic Backup Folder + Automatyczny Katalog Backupów + + + + Only capture to clipboard + Przechwyć tylko do schowka + + + + Joystick + Joystick + + + + Find Executable + Znajdź plik wykonywalny + + + + Google Earth Executable + Plik wykonywalny Google Earth + + + + Calibrate + Kalibracja + + + + Enable + Aktywowany + + + + Show splash screen when Companion starts + Pokaz ekran startowy przy uruchamianiu Companion + + + + Automatic check for OpenTX firmware updates + Automatycznie sprawdź aktualizacje firmware OpenTX + + + + Automatic check for Companion updates + Automatycznie sprawdź aktualizacje Companion + + + + Offer to use wizard for new models + Zaproponuj użycie konfiguratora dla nowych modeli + + + + Enable automatic backup before writing firmware + Uaktywnij automatyczny backup przed zapisem firmware + + + + Select your snapshot folder + Katalog zrzutów + + + + + No joysticks found + Brak oysticka + + + + Select your library folder + Wybierz katalog bibliteki + + + + Select your Models and Settings backup folder + Wybierz folder do backupowania Modeli i Ustawień + + + + Select Google Earth executable + Wybierz wykonywalny plik Google Earth + + + + Select the folder replicating your SD structure + Wybierz folder do zreplikowania struktury Twojej karty SD + + + + Not possible to remove profile + Usunięcie profilu jest niemożliwe + + + + The default profile can not be removed. + Podstawowy profil nie moze być usunięty. + + + + Open Image to load + Otwórz obrazek do załadowania + + + + Images (%1) + Obrazki (%1) + + + + avrOutputDialog + + + Dialog + + + + + Show Details + Pokaż szczegóły + + + + result + result + Wynik + + + + executable not found + executable not found + plik wykonywalny nie został znaleziony + + + + + Error + Błąd + + + + Cannot open source file + Nie mogę otworzyć pliku źródłowego + + + + Cannot write destination + Nie mogę zapisać w miejscu docelowym + + + + Writing file: + Zapisuję plik: + + + + ie: OpenTX for 9X board or OpenTX for 9XR board + ie: OpenTX dal platformy 9X lub OpenTX lub 9XR + + + + ie: OpenTX for M128 / 9X board or OpenTX for 9XR board with M128 chip + ie: OpenTX dla platformy M128 / 9X lub OpenTX dla platformy 9XR z chipem M128 + + + + ie: OpenTX for Gruvin9X board + ie: OpenTX dla platformy Gruvin9X + + + + Your radio uses a %1 CPU!!! + +Please check advanced burn options to set the correct cpu type. + Twoje radio używa procesora %1!!! + +Sprawdź zaawansowane funkcje wypiekania by ustalić prawidłowy procesor. + + + + Your radio uses a %1 CPU!!! + +Please select an appropriate firmware type to program it. + Twoje radio używa procesora %1!!! + +Proszę wybrać poprany rodzaj firmware. + + + + +You are currently using: + %1 + +Aktualnie używasz: + %1 + + + + + Writing + Zapis + + + + + Reading + Czytanie + + + + + Verifying + Weryfikacja + + + + done - exit code %1 + done - exit code %1 + Zakończone z kodem %1 + + + + done with errors + done with errors + Zakończone z Błędami + + + + + done - SUCCESSFUL + done - SUCCESSFUL + Zakończono sukcesem + + + + did not finish correctly + did not finish correctly + Nie zakończono poprawnie + + + + did not finish correctly! +Do you want some help ? + did not finish correctly! +Do you want some help ? + Nie zakończono poprawnie +Potrzebujesz pomocy ? + + + + Copy did not finish correctly + Nie zakończono poprawnie kopiowania + + + + finished correctly + finished correctly + Zakończono poprawnie + + + + Copy finished correctly + Zakończono poprawnie kopiowanie + + + + Started + Started + Rozpoczęto + + + + FUSES: Low=%1 High=%2 Ext=%3 + Bezpieczniki: Low=%1 High=%2 Ext=%3 + + + + burnConfigDialog + + + Programmer Configuration + Configuration AVRDUDE / SAM-BA + Konfiguracja programatora + + + + Location of AVRDUDE executable + Położenie wykonywalnego AVRDUDE + + + + + + + The location of the AVRDUDE executable. + Położenie wykonywalnego AVRDUDE. + + + + DFU-Util Location + Położenie narzędzia DFU + + + + + + Use this button to browse and look for the AVRDUDE executable file. + Użyj tego przycisku w celu znalezienia pliku wykonywalnego AVRDUDE. + + + + + + Browse... + Przeglądaj ... + + + + Programmer + Typ programatora + + + + Programmer used for communicating with the controller. +Please consult the programmer's documentation and the AVRDUDE documentation to select the appropriate programmer. + Programator użyty do komunikacji z mikrokontrolerem. + + + + List all available programmers. + Lista wszystkich dostępnych programów. + + + + List Available + Lista dostępnych + + + + + Extra arguments that will be passed to AVRDUDE on every call + Dodatkowe argumenty przekazywane do AVRDUDE przy każdorazowym wywołaniu + + + + + Extra arguments used in AVRDUDE. +This can be used for providing extra information to AVRDUDE. + +Please only use this if you know what you are doing. There are no error checks and you could cripple your controller. + Dodatkowe argumenty AVRDUDE. +Mogą być użyte do przekazania dodatowych informacji do AVRDUDE. + +Użyj tylko jeśli dokłądnie wiesz co robisz !! +Nie ma to spradzania błędów i mozesz uszkodzić mikrokontroler. + + + + + Extra Arguments + Dodatkowe argumenty + + + + Show AVRDUDE help + Pokaż pomoc AVRDUDE + + + + Show Help + Pokaż pomoc + + + + + Port + Port + + + + AVRDUDE Location + Położenie AVRDUDE + + + + Use advanced controls + Użyj zaawansowanych ustawień + + + + + CPU of your TX + Procesor/mikrokontroler twojego radia + + + + Communication port to the programmer. + + Port komunikacyjny do programatora. + + + + + CPU present on your 9x radio +Should be m64 for stock radios +m2560 for v4.1 boards + CPU zainstalowany w twoim radiu 9x : +m64 dla zwykłego radia +m2560 dla platformy V4 + + + + SAM-BA Location + Położenie SAM-BA + + + + Alternate device + Alternatywne urządzenie + + + + + Location of sam-ba executable + Położenie plików wykonywalnych sam-ba + + + + MCU + Typ procesora CPU/MCU + + + + ARM MCU + Procesor ARM + + + + sam-ba serial port + Port szeregowy sam-ba + + + + DFU-UTIL Configuration + Konfiguracja DFU-UTIL + + + + SAM-BA Configuration + Konfiguracja SAM-BA + + + + AVRDUDE Configuration + Konfiguracja AVRDUDE + + + + + + Select Location + Wybierz położenie + + + + + Companion + 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? + <b><u>UWAGA!</u></b><br>U zresetuje bezpieczniki %1 do fabrycznych ustawień.<br>Zapis bezpieczników może uszkodzić twoje radio.<br>Zrób to tylko jeśli jesteś pewien że są złe!<br>Jesteś pewien by kontynuować? + + + + <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>Ostrzeżenie!</u></b><br>Normalnie typ procesora jest wybierany automatycznie zgodnie z wybranym firmware.<br>Jeśli zmienisz typ procesora dla EEpromu rezultaty mogą być nieprzewidywalne. + + + + burnDialog + + + Customize Splash + Własne logo + + + + Write to TX + Zapisz do radia + + + + <html><head/><body><p>Modify calibration parameters using settings from current profile</p></body></html> + <html><head/><body><p>Zmiana parametrów kalibracji przy użyciu aktualnego profilu</p></body></html> + + + + Patch calibration setting from profile + Zamień ustawienia kalibracji wartościami z profilu + + + + <html><head/><body><p>Modify HW parameters using settings from current profile</p></body></html> + <html><head/><body><p>Zmień ustawiania parametrów HW przy pomocy wartości z aktualnego profilu</p></body></html> + + + + Patch HW setting from profile + Zmień ustawiania parametrów HW wartościami z profilu + + + + Date & Time + Data i Czas + + + + Use firmware start screen + Użyj ekranu startowego z firmware + + + + Use another start screen + Użyj innego ekranu startowego + + + + Use profile start screen + Użyj ekranu startowego z profilu + + + + Use library start screen + Użyj ekranu startowego z biblioteki + + + + SVN + + + + + Variant + Wariant + + + Invert Color + Odwróć kolory + + + Load Image + Otwórz logo + + + Open Splash Library + Otwórz bibliotekę obrazków + + + Substitute image in firmware + Zmień logo w firmware + + + + + Browse for file + Przeglądaj pliki + + + + Allows Companion to write to older version of the firmware + Pozwól Companion na zapis do starszej wersji firmware + + + + Backup and restore Models and Settings + Zbakupuj i odtwórz Modele i Ustawienia + + + Use image in settings + Użyj Logo w ustawieniach + + + + Check Firmware compatibility + Sprawdź kompatybilność firmware + + + + Current Profile + Aktualny profil + + + + Cancel + Przerwij + + + + Write firmware to TX + Zapisz firmware do radia + + + + Current profile + Aktualny profil + + + + + + + + + Warning + Ostrzeżenie + + + %1 is not a known firmware + %1 nie jest znanym firmware + + + Burn anyway ! + Wypiecz mimo wszystko ! + + + + + + + + + + + + + + + + Error + Błąd + + + + Unable to find file %1! + Nie mogę odnaleźć pliku %1! + + + + + + Error opening file %1: +%2. + Błąd otwarcia pliku %1: +%2. + + + + Write Models and Settings to TX + Zapisz Modele i Ustawienia do radia + + + + Write Models and Settings in %1 to TX + Zapisz Modele i Ustawienia w %1 do radia + + + + Open Firmware File + Otwórz plik Firmware + + + + Choose file to load Models and Settings from + Wybierz plik Modeli i Ustawien do wczytania + + + + %1 may not be a valid firmware file + %1 moze nie być prawidłowym plikiem firmware + + + + + + Invalid binary Models and Settings File %1, Proceed anyway ? + Nieprawidłowy plik Modeli i Ustawień : %1. Kontynuować ? + + + + Error reading file %1: +%2. + Błąd odczytu pliku %1: +%2. + + + + The firmware file is not valid. + Plik firmware jest błedny. + + + + There is no start screen image in the firmware file. + Brak obrazka ekranu startowego w firmware. + + + + The profile image %1 does not contain an image. + Obraz profilu %1 nie zawiera obrazka. + + + + Open image file to use as Tx start screen + Otwórz plik obrazka by użyć go jako ekran startowy radia + + + + Image could not be loaded from %1 + Obrazek nie moze być załadowany z %1 + + + + The library image could not be loaded + Obrazek z biblioteki nie może być załadowany + + + Open Image to load + Otwórz plik z logo + + + + Images (%1) + Obrazki (%1) + + + Cannot load %1. + Nie mogę załadować %1. + + + + Cannot save customized firmware + Nie mogę zapisać przystosowanego firmware + + + + Custom image not found + Własny obrazek nie odnaleziony + + + + No firmware selected + Brak wyboru firmware + + + + Wrong radio calibration data in profile, Settings not patched + Błędna kalibracja radia w profilu, Ustawienia nie spatchowane + + + + Wrong radio setting data in profile, Settings not patched + Błędne ustawienia radia w profilu, Ustawienia nie spatchowane + + + + + Cannot write file %1: +%2. + Nie mogę zapisać pliku %1: +%2. + + + + Error writing file %1: +%2. + Błąd zapisu pliku %1: +%2. + + + + compareDialog + + + Compare Models + Porównaj modele + + + + Drag first model here + Przeciągnij tutaj pierwszy model + + + + Drag second model here + Przeciągnij tutaj drugi model + + + + Close + Zamknij + + + + Print + Drukuj + + + + Print to file + Drukuj do pliku + + + + General Model Settings + Główne ustawienia modelu + + + + + + Name + Nazwa + + + + + EEprom Size + Wielkość EEPROM + + + + + Timer1 + + + + + + Timer2 + + + + + + Protocol + Protokół + + + + + Pulse Polarity + Polaryzacja impulsu + + + + + Throttle Trim + Trymer gazu + + + + + + + Enabled + Włączone + + + + + + + Disabled + Wyłączone + + + + + Throttle Expo + Expo gazu + + + + + Trim Increment + Krok trymera + + + + + Center Beep + Dźwięk centrowania + + + + Flight modes Settings + Flight Phases Settings + Ustawiania faz lotu + + + + + Fades + Przejścia + + + + + Trims + Trymery + + + + + + + + + + + Switch + Przełącznik + + + + + IN + (+) + + + + + OUT + (-) + + + + + + + + + + + + + FM + FP + FL + + + + + Gvars + Gl-Zm + + + + + Rot. Enc. + Pokrętło. + + + + Limits + Limity + + + + + + + + + + Offset + Ofset + + + + + + + + Min + + + + + + + + + Max + Maks + + + + + + Invert + Odwróć + + + + + + + + CH + Kanał + + + + + INV + Odwr + + + + + NOR + --- + + + + Global Variables + Zmienne globalne + + + + + GV + ZG + + + + Expo/Dr Settings + Expo/Ustawienia DR + + + + + Weight + Waga + + + + + Curve + Krzywa + + + + Mixers + Miksery + + + + + noTrim + Bez trymera + + + + + Delay(u%1:d%2) + Opóźnienie(u%1:d%2) + + + + + Slow(u%1:d%2) + Spowolnienie(u%1:d%2) + + + + + Warn + Ostrzeżenie + + + + + No name + Model bez nazwy + + + + + + + DISABLED + Wyłączone + + + + Curves + Krzywe + + + + 5 Points Curves + 5-cio punktowe Krzywe + + + + + + + pt %1 + punkt %1 + + + + 9 Points Curves + 9-cio punktowe Krzywe + + + + + Function + Funkcja + + + + + Param + Parametr + + + + + Enable + Włączone + + + + Telemetry Settings + Ustawienia telemetrii + + + + + Analog + Analogowy + + + + + Unit + Jednostki + + + + + Scale + Skala + + + + + + + A%1 + + + + + + Alarm 1 + + + + + + Alarm 2 + + + + + + + + Type + Typ + + + + + + + Condition + Warunek + + + + + + + Value + Wartość + + + + + + + Flight mode name + Nazwa fazy lotu + + + + + + + Flight modes + Fazy lotu + + + + + + + Flight mode + Faza lotu + + + + + Repeat + Powtórz + + + + + RSSI Alarm + Alarm RSSI + + + + + Telemetry Bars + Wskaźniki telemetryczne + + + + + Bar Number + Numer wskaźnika + + + + + Source + Źródło + + + + + Custom Telemetry View + Własny ekran telemetrii + + + + Logical Switches + Przełączniki Logiczne + + + + + LS + L suwak + + + + Switch Assignment + Przypisanie Przełączników + + + + CF + FS + + + + Print Document + Drukuj dokument + + + + Select PDF output file + Wybierz plik docelowy PDF + + + + contributorsDialog + + + Dialog + + + + + People who have contributed to this project + Ludzie związani z tym projektem + + + + Coders + Programiści + + + + Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe) + Specjalne podziękowania Rafałowi Tomczakowi (RadioClone), Thomasowi Husteterowi (th9x) a także Erazowi Ravivowi(er9x i eePe) + + + + Companion Release Notes + Informacje o wydaniu Companion + + + + Thank you all !!! + Wszystkim wam dziękujemy !!! + + + + Contributors + Współpracownicy + + + + OpenTX Release Notes + Informacje o wydaniu OpenTX + + + + customizeSplashDialog + + + Transmitter Splash Screen Editor + Edytor ekrany startowego radia + + + + + Invert + Odwróć + + + + + Load FW + Otwórz firmware + + + + + Load Pict + Otwórz obrazek + + + + + Load Profile + Załaduj profil + + + + + Save + Zapisz + + + + + Open Splash Library + Otwórz bibliotekę obrazków + + + + + + + ... + + + + + + + + Error + Błąd + + + + Cannot load the image file %1. + Nie mogę załadować pliku obrazka %1. + + + + Cannot load the profile image %1. + Nie mogę załadować obrazu Profilu %1. + + + + Cannot load the library image %1. + Nie mogę załadować obrazu biblioteki %1. + + + + File Saved + Plik Zapisany + + + + The image was saved to the file %1 + Obraz został zapisany do pliku %1 + + + + Image Refresh Error + Błąd odświeżenia obrazka + + + + Failed to refresh image from file %1 + Nieudane odswieżenie obrazka z pliku %1 + + + + File Save Error + Błąd zapisu pliku + + + + Failed to write image to %1 + Nieudany zapis obrazka do %1 + + + + Open Image to load + Otwórz obrazek do załadowania + + + + Open Firmware File + Otwórz plik Firmware + + + + Can not load embedded image from firmware file %1. + Nie mogę załądować wbudowanego obrazka z pliku Firmware %1. + + + + Images (%1) + Obrazki (%1) + + + + downloadDialog + + + Downloading: + Pobierz: + + + + Unable to save the file %1: %2. + Nie mogę zapisać pliku %1: %2. + + + + Companion + Companion + + + + Download failed: %1. + Pobieranie nieudane: %1. + + + + fusesDialog + + + Fuses + Bezpieczniki + + + + <!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:'Sans Serif'; font-size:9pt; 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-family:'MS Shell Dlg 2'; font-size:8pt;">Reads the current fuses in the AVR controller.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Proper states for </span><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">AtMega 64 </span><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">EEPROM erase fuse not set: 0E, 81, FF</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">EEPROM erase fuse set: 0E, 89, FF</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Proper states for AtMega 2560 :</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">EEPROM erase fuse not set: D7, 11, FC</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">EEPROM erase fuse set: D7, 19, FC</span></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:'Sans Serif'; font-size:9pt; 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-family:'MS Shell Dlg 2'; font-size:8pt;">Czyta aktualne ustawienia bezpieczników z kontrolera AVR</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Prawidłowe ustawienia </span><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">AtMega 64 </span><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">EEPROM wyczyszczenie nieustawionego bezpiecznika: 0E, 81, FF</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">EEPROM wyczyszczenie ustawionego bezpiecznika: 0E, 89, FF</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Przwidłowe ustawienia AtMega 2560 :</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">EEPROM wyczyszczenie nieustawionego bezpiecznika: D7, 11, FC</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">EEPROM wyczyszczenie ustawionego bezpiecznika: D7, 19, FC</span></p></body></html> + + + + Read Fuses + Odczytaj bezpieczniki + + + + <!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:'Sans Serif'; font-size:9pt; 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-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600; text-decoration: underline;">Reset Fuses</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Fuses in the AVR tell it how to behave. Pressing this button sets the fuses to the default parameters needed in the FW. These parameters are different for stock and 4.1 MB, please verify you selected the appropriate processor type in preferences.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">This button also sets the &quot;EEPROM protect&quot; Fuse.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">This prevents erasing of the EEPROM when the flash memory is written.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600; text-decoration: underline;">WARNING</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Setting fuses can lead to problems and even a total lockout from your controller. Do this only if you know what you are doing.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">When in doubt consult either the project's page or the 9xforum (http://9xforums.com/forum/)</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">If you do get locked out - google lookup for &quot;dealing with Fuse Bricks&quot;.</span></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:'Sans Serif'; font-size:9pt; 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-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600; text-decoration: underline;">Reset bezpieczników</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Bezpieczniki w AVR opisz zachowanie. Naciśnięcie tego przycisku ustawia bezpieczniki do domyślnych parametrów potrzebnych w FW. Parametry te są różne dla zwykłej oraz 4,1 płyty głównej, sprawdź, czy wybrano odpowiedni typ procesora w preferencjach.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Ten przycisk róznież ustawia &quot;Bezpiecznik ochrony EEPROM&quot; Fuse.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">To ochrania EEPROM przed wymazaniem gdy flaszujesz radio.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600; text-decoration: underline;">UWAGA!!</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Ustawianie bezpieczników moze prowadzić do problemów łacznie z całkowitym zablokowaniem twojego radia. Rób to tylko wtedy gdy masz absolutną pewność i wiedzę.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Gdy masz wątpliwości skonsultuj się ze stroną projektu lub na 9xforum (http://9xforums.com/forum/)</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Jeśli urządzeni zostanie zablokowane przeszukaj google w celu znalezienia &quot;Jak naprawić Fuse BRICK &quot;.</span></p></body></html> + + + + Reset Fuses +EEPROM - PROTECT + Zresetuj bezpieczniki +EEPROM jest chroniony + + + + <!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:'Sans Serif'; font-size:9pt; 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-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600; text-decoration: underline;">Reset Fuses</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Fuses in the AVR tell it how to behave. Pressing this button sets the fuses to the default parameters needed in the </span><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">FW. These parameters are different for stock and 4.1 MB, please verify you selected the appropriate processor type in preferences.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">This button also clears the &quot;EEPROM protect&quot; Fuse.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">This causes erasing of the EEPROM when the flash memory is written.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600; text-decoration: underline;">WARNING</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Setting fuses can lead to problems and even a total lockout from your controller. Do this only if you know what you are doing.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">When in doubt consult either the project's page or the 9xforum (http://9xforums.com/forum/)</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">If you do get locked out - google lookup for &quot;dealing with Fuse Bricks&quot;.</span></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:'Sans Serif'; font-size:9pt; 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-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600; text-decoration: underline;">Reset bezpieczników</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Bezpiecznieki w AVR opisz zachowanie. Naciśnięcie tego przycisku ustawia bezpieczniki do domyślnych parametrów potrzebnych w FW. Parametry te są różne dla zwykłej oraz 4,1 płyty głównej, sprawdź, czy wybrano odpowiedni typ procesora w preferencjach.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Ten przycisk róznież ustawia &quot;Bezpiecznik ochrony EEPROM&quot; Fuse.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">To ochrania EEPROM przed wymazaniem gdy flaszujesz radio.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:600; text-decoration: underline;">UWAGA!!</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Ustawianie bezpieczników moze prowadzić do problemów łacznie z całkowitym zablokowaniem twojego radia. Rób to tylko wtedy gdy masz absolutną pewność i wiedzę.</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-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Gdy masz wątpliwości skonsultuj się ze stroną projektu lub na 9xforum (http://9xforums.com/forum/)</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Jeśli urządzeni zostanie zablokowane przeszukaj google w celu znalezienia &quot;Jak naprawić Fuse BRICK &quot;.</span></p></body></html> + + + + Reset Fuses +EEPROM - DELETE + Zresetuj bezpieczniki +EEPROM będzie skasowany + + + + <!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:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> +<p align="center" 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;">WARNING</span></p> +<p align="center" 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 align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Changing the fuses can mess up your radio.</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Proceed only if you know what you are doing.</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:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> +<p align="center" 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;">UWAGA!!</span></p> +<p align="center" 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 align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Zmiana ustawień bezpieczników może zepsuć swoje radio.</p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Rób to tylko wtedy gdy masz absolutną pewność i wiedzę.</p></body></html> + + + + fwPreferencesDialog + + + Downloads + Pobrania + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox + CheckBox + + + + Set language of voice. +May be different from firmware language + Ustaw język komuniaktów głosowych (). +Moze być inny od języka firmware + + + + Processor ID + ID procesora + + + + Options + Opcje + + + + Menu Language + Język Menu + + + + Voice Language + Język komunikatów + + + + Firmware Type + TYp Firmware + + + + Download Voice + Pobierz Głos + + + + FwInfo + Informacje o Firmware + + + + Download FW + Pobiesz Firmware + + + + Check for updates + Sprawdź aktualizacje + + + + Last downloaded release: %1 + Ostatnie pobrane wydanie: %1 + + + + The selected firmware has never been downloaded by Companion. + Wybrany firmware nie został nigdy pobrany przez Companion. + + + + The selected firmware cannot be downloaded by Companion. + Companion nie moze pobrac wybranego firmware. + + + + joystickDialog + + + Configure Joystick + Ustaw joystick + + + + Ch2 + Kanał 02 + + + + + + + + + + + Not Assigned + Nie przydzielono + + + + + + + + + + + Right Vertical + Prawy pionowy + + + + + + + + + + + Right Horizontal + Prawy poziomy + + + + + + + + + + + Left Vertical + Lewy pionowy + + + + + + + + + + + Left Horizontal + Lewy poziomy + + + + + + + + + + + P1 + Potencjometr 1 + + + + + + + + + + + P2 + Potencjometr 2 + + + + + + + + + + + P3/LS + Potencjometr 3 /Lewy suwak + + + + + + + + + + + RS + Prawy suwak + + + + Ch1 + Kanał 01 + + + + Ch4 + Kanał 04 + + + + Ch6 + Kanał 06 + + + + Ch3 + Kanał 03 + + + + Ch5 + Kanał 05 + + + + Ch7 + Kanał 07 + + + + Ch8 + Kanał 08 + + + + Instructions + Instrukcja + + + + Cancel + Przerwij + + + + Next + Następny + + + + Ok + OK + + + + Move sticks and pots in every direction making full movement +Press next when finished + Poruszaj drązkami i potencjometrami w pełnym możliwym zakresie. +Naciśnij Dalej po skończeniu + + + + + Error + Błąd + + + + Cannot open joystick. + Nie mogę otwórz joysticka. + + + + Place sticks and pots in middle position. +Press next when done + Ustaw drążki i potencjometry w środku. +Naciśnij Dalej po skończeniu + + + + Map joystick channels to controls using comboboxes. +Press next when done + Zmapuj kanały joysticka używają comboboxów. +Naciśnij Dalej po skończeniu + + + + Check inversion checkbox to get maximum at top-right position. +Press next when done + Sprawdż checkbox rewersu w celu uzyskania maksimum w górnej prawej pozycji. +Naciśnij Dalej po skończeniu + + + + Press ok to save configuration +Press cancel to abort joystick calibration + Naciśnij OK w celu zapisu, Anuluj w celu przerwania kalibracji joysticka. +Tlačítkem Zrušit přerušíte kalibraci + + + + Duplicated stick assignement + Duplicitní přiřazení Drążki + + + + logsDialog + + + Companion Log Viewer + Companion - przegląd logów + + + + Filename + nazwa pliku + + + + Open LogFile + Otwórz plik logu + + + + Zoom + Przybliżenie + + + + X + X + + + + Y + Y + + + + Fly sessions + Loty + + + + Telemetry logs + Logi Telemetrii + + + + Time + Czas + + + + Error + Błąd + + + + Cannot write file %1: +%2. + Nie mogę zapisać pliku %1: +%2. + + + + Select your log file + Wybierz plik loga + + + + Available fields + Dostępne pola + + + + The selected logfile contains %1 invalid lines out of %2 total lines + Wybrany plik zawiera %1 błędnych linii z %2 wszystkich linii + + + + mdiChild + + + Simulate Tx + Symulacja radia + + + + modelConfigDialog + + + Model Configuration Wizard + Kreator ustawień modelu + + + + Engine + Silnik + + + + Model Type + Typ modelu + + + + Airplane + Samolot + + + + Helicopter + Heli + + + + Glider + Szybowiec + + + + Wing + Skrzydła + + + + Aileron controls + Lotki + + + + No Ailerons + Bez lotek + + + + 1 Servo (or Y) + Jedno serwo (lub odwracający Y kabel) + + + + + + 2 Servos + Dwa serwa + + + + Flaps controls + Klapy + + + + No Flaps + Bez klap + + + + 1 Servo (or inverting Y) + Jedno serwo (lub Y kabel) + + + + Spoilers + Przerywacze + + + + No Spoilers/Airbrakes + Bez przerywaczy/hamulców + + + + 1 Servo (or Y or inverting Y) + Jedno serwo (lub Y kabel) + + + + Swash Plate + Tarcza + + + + Swash plate + Tarcza + + + + 90° / Fixed / Coax + + + + + 120° + + + + + 120X° + + + + + 140° + + + + + FlyBarLess + + + + + Tail + Ogon + + + + Tail controls + Kontrola ogona + + + + 1 Servo Elevator / 1 Servo Rudder + 1x serwo SW / 1x serwo SK + + + + V Tail + Deltamix (Usterzenie motylkowe) + + + + 2 Servos Elevator / 1 Servo Rudder + 2x serwo SW / 1x serwo SK + + + + Gyroscope + Gyro + + + + NoGyro + Bez gyra + + + + Switch control + Kontrola przełącznikem + + + + Pot control + Kontrola potencjometrem + + + + Channel style + Styl kanału + + + + Open9x Style + Styl Open9x + + + + Futaba Style + Styl Futaba + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + 9 + + + + + 1 + + + + + 10 + + + + + Ele2 + SW2 + + + + Use advanced controls + Użyj zaawansowanych ustawień + + + + Spoiler2 + Przerywacz2 + + + + Flap2 + Klapa2 + + + + Flap1 + Klapa1 + + + + Rud2 + SK2 + + + + + + + + + + AUTO + + + + + + + + + + + CH01 + Kanał 01 + + + + + + + + + + CH02 + Kanał 01 + + + + + + + + + + CH03 + Kanał 03 + + + + + + + + + + CH04 + Kanał 04 + + + + + + + + + + CH05 + Kanał 05 + + + + + + + + + + CH06 + Kanał 06 + + + + + + + + + + CH07 + Kanał 07 + + + + + + + + + + CH08 + Kanał 08 + + + + + + + + + + CH09 + Kanał 09 + + + + + + + + + + CH10 + Kanał 10 + + + + Ail2 + Lotka2 + + + + Spoiler 1 + Przerywacz1 + + + + Delta wing + Skrzydło delta + + + + + Not present + Brak + + + + Present + Jest + + + + Rudder + SK + + + + Single rudder + Pojedynczy SK + + + + Dual rudder (with 2 servos) + Podwójny SK (dwa serwa) + + + + Apply configuration ? + Zastosować konfigurację ? + + + + Apply configuration deleting existing model ? + Zastosować konfigurację kasując instniejący model ? + + + + preferencesDialog + + + + Preferences + Preferencje + + + + Check for selected Fw updates + Sprawdź aktualizacje firmware + + + + Ask use of wizard for new models + Zapytać czy używać konfiguratora nowych modeli + + + + + Invert Pixels + Odwrócić piksele + + + + + + + ... + + + + + Remember switches in simulator + Zapamietać przaełaczniki w symulatorze + + + + + Enable + Włącz + + + + + Calibrate + Kalibruj + + + + + + + + + Open Folder + Otwórz katalog + + + + FwInfo + + + + + Check for updates + Sprawdź aktualizacje + + + + + Open Image + Otwórz obrazek + + + + Language + Język + + + + + Download + Pobierz + + + + Set language of voice. +May be different from firmware language + Ustaw język komuniaktów głosowych (). +Moze być inny od języka firmware + + + + Voice + Komuniakty głosowe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox + + + + + Ask for flashing after Download + Zapytaj o flaszowanie po pobraniu + + + + R E T A + K W G L + + + + R E A T + K W L G + + + + R T E A + K G W L + + + + R T A E + K G L W + + + + R A E T + K L W G + + + + R A T E + K G L W + + + + E R T A + W K G L + + + + E R A T + W K L G + + + + E T R A + W G K L + + + + E T A R + W G L K + + + + E A R T + W L K G + + + + E A T R + W L G K + + + + T R E A + G K W L + + + + T R A E + G K L W + + + + T E R A + G W K L + + + + T E A R + G L W K + + + + T A R E + G L K W + + + + T A E R + G L W K + + + + A R E T + L K W G + + + + A R T E + L R G W + + + + A E R T + L W K G + + + + A E T R + L W G K + + + + A T R E + L G K W + + + + A T E R + L G W K + + + + Export Profile + Eksport profili + + + + Import Profile + Import profili + + + + Profile Name + Nazwa profilu + + + + Automatically add version number to the filename after download + Automatycznie dodaj numer wersji do nazwy pliku po pobraniu + + + + Save Profile + Zapisz profil + + + + Show Splash At Start + Pokazuj ekran startowy z logo + + + + Automatic Backup Folder + Automatyczny Katalog Backupów + + + + + Simu BackLight + BackLight Color + Kolor podświetlenia + + + + Remember simulator switches + Zapamietać przaełaczniki symulatora + + + + + Blue + Niebieski + + + + + Green + Zielony + + + + + Red + Czerwony + + + + + Orange + Pomarańczowy + + + + + Yellow + Żółty + + + + Check for updates on startup + Sprawdź aktualizacje na przy uruchomieniu + + + + Google Earth Executable + Wykonywalny plik Google Earth + + + + Find Executable + Znajdź wykonywalny plik + + + + + Custom TX splash screen + Własny obrazek na wyświetlaczu + + + + Channel order + +This is used by the templated to determine which channel goes to what number output. + Kolejność kanałów + To ustawienie jest używane przez szablony, jakie wyjście przypisane jest do kanałów. + + + + Firmware + + + + + Default Stick Mode + Bazowy mod drążków + + + + Default Channel Order + Bazowa kolejność kanałów + + + + + Personal splash library + Własna biblioteka obrazków + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + Wybór modu: + +Mode 1: + Lewa ręka : Ster Wysokości, Ster Kierunku + Prawa ręka : Gaz, Lotki + +Mode 2: + Lewa ręka : Gaz, Ster Kierunku + Prawa ręka : Ster Wysokości, Lotki + +Mode 3: + Lewa ręka : Ster Wysokości, Lotki + Prawa ręka : Gaz, Ster Kierunku + +Mode 4: + Lewa ręka : Gaz, Lotki + Prawa ręka : Ster Wysokości, Ster Kierunku + + + + + + Mode 1 (RUD ELE THR AIL) + Mod 1 (SK.SW.Gaz.Lot) + + + + Mode 2 (RUD THR ELE AIL) + Mod 2 (SK.Gaz.SW.Lot) + + + + Mode 3 (AIL ELE THR RUD) + Mod 3 (LOT.SW.Gaz.SK) + + + + Mode 4 (AIL THR ELE RUD) + Mod 4 (Lot.Gaz.SW.SK) + + + + + Joystick + + + + + + Include companion splashes + Załącz bazowe logo + + + + + Only user defined splashes + Własne logo + + + + + Splash library behaviour + Zachowanie bibliteki obrazków + + + + SD Structure path + Struktura karty SD + + + + Processor ID + ID procesora + + + + Recent History Size + Wielkość zapamietanej historii + + + + Profile slot + Slot profilu + + + + auto backup before write + Automatyczny backup przed zapisem + + + + + Simulator capture folder + Katalog zapisu symulatora + + + + + Use clipboard only + Użycie schowka do kopiowania + + + + printDialog + + + Dialog + + + + + Close + Zamknij + + + + Print + Drukuj + + + + Print to file + Drukuj do pliku + + + + Setup for: + Ustawianie: + + + + printed on: %1 + Wydrukowanno na: %1 + + + + General Model Settings + Główne ustawienia modelu + + + + + + + Name + Nazwa + + + + EEprom Size + Rozmiar EEPROM + + + + Timer1 + + + + + Timer2 + + + + + Protocol + Protokół + + + + Pulse Polarity + Polaryzacja pulsu + + + + Throttle Trim + Trymer gazu + + + + + + Enabled + Włączone + + + + + Disabled + Wyłaczone + + + + Throttle Expo + Expo gazu + + + + Trim Increment + Krok trymera + + + + Center Beep + Sygnał centrowania + + + + Flight modes Settings + Flight Phases Settings + Uztawienie faz lotu + + + + Fades + Przejścia + + + + Trims + Trymery + + + + Gvars + Zmienne globalne + + + + Rot.Enc. + Pokrętło. + + + + + + + Switch + Przełącznik + + + + Logical Switches + Przełączniki Logiczne + + + + + LS + PL + + + + Switch Assignments + Przypisanie Przełączników + + + + IN + (+) + + + + OUT + (-) + + + + + + + FM + FP + LR + + + + Expo/Dr Settings + Ustawienia Expo/DR + + + + Weight + Vaga + + + + + + Curve + Krzywa + + + + Mixers + Miksery + + + + + + + CH + Kanał + + + + noTrim + Bez trimu + + + + + + + + Offset + Ofset + + + + Delay(u%1:d%2) + Opóżnienie(u%1:d%2) + + + + Slow(u%1:d%2) + Spowolnienie(u%1:d%2) + + + + Warn + Ostrzeżenie + + + + + DISABLED + Wyłączone + + + + Limits + Limity + + + + + + + Min + + + + + + + + Max + Maks + + + + + + Invert + Odwrócenie + + + + + + INV + Odwr + + + + + + NOR + --- + + + + Curves + Krzywe + + + + pt %1 + pkt %1 + + + + Global Variables + Zmienne globalne + + + + GV + GZ + + + + + + + Value + Wartość + + + + Function + Funkcja + + + + Parameter + Parametr + + + + Repeat + Powtórz + + + + Telemetry Settings + Ustawienia telemetrii + + + + + Alarm 1 + Alarm 1 + + + + + Alarm 2 + Alarm 2 + + + + Analog + Analog + + + + Unit + Jednostki + + + + Scale + Skala + + + + + + + Type + Typ + + + + + + + Condition + Warunek + + + + A%1 + + + + + RSSI Alarm + Alarm RSSI + + + + Frsky serial protocol + Protokół szeregowy Frsky + + + + System of units + System jednostek + + + + Propeller blades + Łopaty śmigła + + + + Telemetry Bars + Belki telemetrii + + + + Bar Number + Numer belki + + + + Source + Źródło + + + + ODF files (*.odt);;PDF Files(*.pdf);;HTML-Files (*.htm *.html);;All Files (*) + pliki ODF (*.odt);;pliki PDF (*.pdf);;pliki HTML (*.htm *.html);;Wszystkie pliki (*) + + + + + Custom Telemetry View + Widok telemetrii użytkownika + + + + Flight mode name + Nazwa trybu lotu + + + + + Flight modes + Tryby lotu + + + + + Flight mode + Tryb lotu + + + + Print Document + Drukuj dokument + + + + Select PDF output file + Wybierz docelowy plik PDF + + + + splashLibrary + + + + ... + + + + + Splash Library - page %1 of %2 + Biblioteka obrazków - strona %1 z %2 + + + + Warning + Ostrzeżenie + + + + Invalid image in library %1 + Nieprawidłowy obrazek w bibliotece %1 + + + + Information + Informacja + + + + No valid image found in library, check your settings + Nie znaleziono prawodłowego obrazka w biblitece, sprawdź ustawienia + + + diff --git a/companion/src/translations/companion_pt.ts b/companion/src/translations/companion_pt.ts index 97da176bb..fd5a57f52 100644 --- a/companion/src/translations/companion_pt.ts +++ b/companion/src/translations/companion_pt.ts @@ -2,138 +2,583 @@ - ExpoDialog + Channels - Dialog - Dialogo - - - - Expo - - - - - Weight - Peso - - - + Name Nome - - - - GV + + Offset - - - Phase used by the expo. + + Min + Min + + + + Max + Max + + + + Invert + Inverter + + + + Center - - Flight modes + + Sym - - 0 + + Channel %1 - - 1 + + --- - - 2 + + INV + INV + + + + CurveGroup + + + Diff - - 3 + + Expo - - 4 + + Func - - 5 + + Curve + Curva + + + + Curves + + + Form - - 6 + + Standard - - 7 + + Custom - - 8 + + Lines - + + Smooth + + + + + Curve type + + + + + Curve name + + + + + Curve %1 + Curva %1 + + + + %1 points + + + + + Are you sure you want to reset curve %1 ? + + + + + Editing curve %1 + + + + + Not enough free points in EEPROM to store the curve. + + + + + CustomFunctionsPanel + + Switch Interruptor - - Switch used by the expo. -If blank then the expo is considered to be "ON" all the time. + + Action - - Curve/Exponential + + Parameters - + + Enable + + + + + CF%1 + + + + + ON + + + + + Error + Erro + + + + Unable to find sound file %1! + + + + + &Delete + + + + + Delete + + + + + &Copy + &Copiar + + + + Ctrl+C + Ctrl+C + + + + &Cut + + + + + Ctrl+X + + + + + &Paste + Co&lar + + + + Ctrl+V + Ctrl+V + + + + Dialog + + + Dialog + Dialogo + + + + Curve type + + + + + Coefficient + + + + + Both + + + + + x>0 + + + + + x<0 + + + + + Y at X=0 + + + + + Side + + + + + Y at X=-100 + + + + + Y at X=100 + + + + + Linear + + + + + Single Expo + + + + + Symmetrical f(x)=-f(-x) + + + + + Symmetrical f(x)=f(-x) + + + + + ExpoDialog + + + Weight + Peso + + + + + GV + + + + + The source for the mixer + A fonte para a mistura + + + + Input name + + + + + Phase used by the input. + + + + + Flight modes + + + + + 0 + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + Switch + Interruptor + + + + Switch used by the input. +If blank then the input is considered to be "ON" all the time. + + + + + The curve used by the input + + + + + Source + Fonte + + + + Line name + + + + Stick Side - + + <!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> + + + + + Scale + + + + + Include Trim + Incluir Ajustes (Trim) + + + + No + + + + + Yes + + + + Curve Curva - - The curve used by the expo - - - - + NEG - + POS - + ALL - - DEST -> %1 + + Edit %1 + + + + + Rud + + + + + Ele + + + + + Thr + + + + + Ail + + + + + FlightMode + + + Form + + + + + Fade In + + + + + Fade Out + + + + + Name + Nome + + + + Switch + Interruptor + + + + trim1 + + + + + trim2 + + + + + trim4 + + + + + trim3 + + + + + Rud + + + + + Ele + + + + + Thr + + + + + Ail + + + + + Rotary Encoder %1 + + + + + GVAR%1 + + + + + FlightModes + + + Flight Mode %1 + + + + + (%1) + + + + + (default) @@ -156,13 +601,13 @@ These will be relevant for all models in the same EEPROM. Parâmetros - + Contrast Contraste - - + + <!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; } @@ -172,12 +617,12 @@ p, li { white-space: pre-wrap; } - + Battery Warning Alerta de Bateria - + Battery warning voltage. This is the threashhold where the battery warning sounds. @@ -185,82 +630,61 @@ Acceptable values are 5v..10v - + v v - + Battery Calibration Calibração da Bateria - + Battery calibration: This value will be added to the measured battery voltage. Use this value to calibrate the meter with an external meter. - Backlight Switch - Interruptor de Retro-iluminação - - - + This is the switch selectrion for turning on the backlight (if installed). - Backlight Auto On/OFF after - Desligar Retro-iluminação depois de - - - + If this value is not 0, any keypress will turn on the backlight and turn it off after the specified number of seconds. - - + + sec seg. - + Inactivity Timer Temporizador de Inatividade - + If not zero will sound beeps if the transmitter has been left without inputs for the specified number of minutes. - + min min. - - Reverse Throttle Operation - Inverter Acelerador - - - - 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. - - - - - - + Timer Beeps Sons do Temporizador - + <!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; } @@ -269,22 +693,22 @@ p, li { white-space: pre-wrap; } - + Every Minute Todos os Minutos - + Beeps at 30, 15, 10, and down from5 seconds Soar aos 30, 15, 10 e a descontar a partir de 5 segundos - + Count Down to Zero Contar até Zero - + <!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; } @@ -293,257 +717,246 @@ p, li { white-space: pre-wrap; } - + Flash on beep Piscar Ecrã com os Sons - + Alarm Warning - - + + Quiet - - + + No Keys - - + + Normal - - + + Long - + Input Filter Filtro de Entrada - + Single Simples - + Oversample Oversample - + Filter Filtro - + Owner Name - + - - - + + Off - - Switches Up - - - - - Switches Down - - - - + Trainer - - + + PPM 1 + - - - + + chn1 + - - - + + chn2 + - - - + + chn3 + - - - + + chn4 - + Mode - + Telemetry NO DATA Alarm - + Show Owner Name on Splash - + Sound Mode - + Beeper - + Speaker Pitch (spkr only) - + Only Alarms - - + + All - + Pot Scrolling Enable - + Bandgap Measuring Enable - + THR THR - + RUD RUD - + ELE ELE - + AIL AIL - + GEA GEA - + ID0 ID0 - + ID1 ID1 - + ID2 ID2 - + Beeper Length - - + + X-Short - - + + Short - - + + X-Long - + Haptic Mode - + Alarms Only - + Haptic Length - + GPS Coordinates @@ -558,122 +971,122 @@ p, li { white-space: pre-wrap; } - + Speaker - + BeeperVoice - + SpeakerVoice - + hh° (N/S) mm' ss''.dd - + NMEA - + Timeshift from UTC - + LCD Display Type - + Standard - + Optrex - + Speaker Volume - + Haptic Strength - + BackLight Brightness - + RotEnc Navigation - + BackLight Auto OFF after - + BackLight Switch - + BackLight On Stick Move - + BackLight Invert - + Country Code - + Europe - + Japan - + America - + FrSky Internal Alarm - + StickScroll - + PPMSim @@ -683,47 +1096,47 @@ p, li { white-space: pre-wrap; } - + CrossTrim - + Beep volume - + Wav volume - + Vario volume - + Background volume - + Measurement Units - + Metric - + Imperial - + FAI Mode @@ -733,273 +1146,409 @@ p, li { white-space: pre-wrap; } - + 4800 Baud - + 9600 Baud - + 14400 Baud - + 19200 Baud - + 38400 Baud - + 57600 Baud - + 76800 Baud - + 115200 Baud - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. - + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + Readonly Unlock - + SC - + SE - + SA - + SF - + SH - + SD - + SB - + SG - + Input - + Weight Peso - + Switch Interruptor + - - - + + += (Sum) + - - - + + := (Replace) - - + + PPM 2 - - + + PPM 3 - - + + PPM 4 - + Telemetry - + RSSI Alarm 1 - - + + ---- - - + + Yellow - - + + Orange - - + + Red - + RSSI Alarm 2 - + NO DATA Alarm - + POT 4 - - + + Negative span - - + + Mid value - - + + Positive span - + STICK 1 STICK 1 - + STICK 2 STICK 2 - + Current - + + + Pot (normal) + + + + + + Multipos Switch + + + + + S1 Type + + + + + S2 Type + + + + STICK 3 STICK 4 - + STICK 4 STICK 3 - + POT 1 - + POT 2 - + POT 3 - + Battery - + PPM Multiplier - - Throttle Startup Warning - Aviso Inicial sobre Acelerador - - - - - - - - + + + + + <!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; } @@ -1014,34 +1563,27 @@ p, li { white-space: pre-wrap; } - - Switch Startup Warning - Aviso Inicial sobre Interruptores - - - + Memory Startup Warning Aviso Inicial sobre Memória - Silent mode (No Alarm) - Modo Silencioso (sem Alarmes) - - - + Beeper Mode Modo dos Alarmes Sonoros - + + + - - - - - - + + + + + + Beeper volume 0 - Quiet. No beeps at all. @@ -1052,44 +1594,24 @@ p, li { white-space: pre-wrap; } - 0 - Quiet - 0 - Silencioso - - - 1 - No Keys - 0 - Sem Sons de Teclas - - - 2 - Normal - 2 - Normal - - - 3 - Long - 3 - Longo - - - 4 - Extra Long - 4 - Extra Longo - - - + Channel Order (For Templates) Ordem dos Canais (para as Mascaras) - + Channel order This is used by the templated to determine which channel goes to what number output. - + Stick Mode Modo do Emissor - + Mode selection: Mode 1: @@ -1112,1097 +1634,1426 @@ 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) - + Show Splash Screen on Startup - - + + Show splash screen on startup - + Calibration Calibração - ANALOG 7 - ANALÓGICO 7 - - - ANALOG 6 - ANALÓGICO 6 - - - ANALOG 5 - ANALÓGICO 5 - - - ANALOG 4 - ANALÓGICO 4 - - - ANALOG 3 - ANALÓGICO 3 - - - ANALOG 2 - ANALÓGICO 2 - - - ANALOG 1 - ANALÓGICO 1 - - - PPM In - Entrada PPM - - - Negative - Negativo - - - Mid - Meio - - - Positive - Positivo - - - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. Are you sure ? - - + + Warning Aviso - + Wrong data in profile, radio calibration was not retrieved - + Wrong data in profile, hw related parameters were not retrieved - + Do you want to store calibration in %1 profile<br>overwriting existing calibration? - + Calibration and HW parameters saved. - MainWindow + Heli - companion9x - EEPROM Editor - companion9x - Editor de EEPROM + + Form + - - - - + + Invert Elevator + + + + + Invert Aileron + + + + + Invert Collective + + + + + Invert + Inverter + + + + Off + + + + + 120 + + + + + 120X + + + + + 140 + + + + + 90 + + + + + Collective + + + + + Swash Type + + + + + Swash Ring + + + + + InputsPanel + + + + Move Up + + + + + + Ctrl+Up + + + + + + Move Down + + + + + + Ctrl+Down + + + + + Clear All Settings + + + + + Source(%1) + + + + + No Trim + + + + + Weight(%1) + + + + + Switch(%1) + + + + + Not enough available inputs! + + + + + Delete Selected Inputs? + + + + + &Add + &Adicionar + + + + Ctrl+A + Ctrl+A + + + + &Edit + &Editar + + + + Enter + Enter + + + + &Delete + + + + + Delete + + + + + &Copy + &Copiar + + + + Ctrl+C + Ctrl+C + + + + &Cut + + + + + Ctrl+X + + + + + &Paste + Co&lar + + + + Ctrl+V + Ctrl+V + + + + Du&plicate + + + + + Ctrl+U + + + + + Clear Inputs? + + + + + Really clear all the inputs? + + + + + LogicalSwitchesPanel + + + Condition + + + + + V1 + + + + + V2 + + + + + AND + + + + + Duration + + + + + Delay + Atraso + + + + + LS%1 + + + + + &Delete + + + + + Delete + + + + + &Copy + &Copiar + + + + Ctrl+C + Ctrl+C + + + + &Cut + + + + + Ctrl+X + + + + + &Paste + Co&lar + + + + Ctrl+V + Ctrl+V + + + + MainWindow + + + + + File loaded Ficheiro carregado - companion9x - companion9x - - - - - - - + + + + + Save As Gravar Como - EEPROM hex files (*.hex);;EEPROM bin files (*.bin) - Ficheiros EEPROM hex (*.hex);;EEPROM bin files (*.bin) - - - - + + No updates available at this time. - - - - - + + + + + Unable to check for updates. - + Executable (*.exe) - + Would you like to launch the installer? - EEPROM files (*.bin *.hex);;BIN files (*.bin);;HEX files (*.hex) - Ficheiros EEPROM (*.bin *.hex);;BIN files (*.bin);;HEX files (*.hex) - - - + Open Abrir - - + + File saved Ficheiro gravado - Read EEPROM From Tx - Ler EEPROM do Rádio - - - FLASH files (*.bin *.hex);;BIN files (*.bin);;HEX files (*.hex) - Ficheiros FLASH (*.bin *.hex);;BIN files (*.bin);;HEX files (*.hex) - - - Write %1 to EEPROM memory? - Gravar %1 no Rádio? - - - HEX files (*.hex);;BIN files (*.bin);;FLASH files (*.bin *.hex) - Ficheiros HEX (*.hex);;BIN files (*.bin);;FLASH files (*.bin *.hex) - - - + Copyright - + Display previous warning again at startup ? - + New release available - - - - - - - - - - - - - + + + + + + + + + + + + + Error Erro - - - - - + + + + + Error opening file %1: %2. - + Compilation server termporary failure, try later - + Display previous message again at startup ? - - - + + + + Companion - Models and Settings Editor - %1 - profile %2 - - - - + + + + + Companion - Models and Settings Editor - %1 - + + A new release of Companion is available please check the OpenTX website! + + + + Firmware does not longer fit in the Tx, due to selected firmware options - + Compilation server temporary failure, try later - - + + Compilation server too busy, try later - - + + Unknown server failure, try later - + Firmware does not fit in the Tx, due to selected firmware options - - + + 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 - - - - - If you've found this program useful, please support by - - - - - donating - doar - - - About companion9x - Sobre o companion9x - - - - - + + &%1 %2 &%1 %2 - - %1 %2 - %1 %2 + + OpenTX Home Page: <a href='%1'>%1</a> + - + + The OpenTX Companion project was originally forked from <a href='%2'>eePe</a> + + + + + If you've found this program useful, please support by <a href='%1'>donating</a> + + + + + Version %1, %3 + + + + &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... - + Contributors &List... - + 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 - - + + Set Menu Language + + + + + &Settings + + + + + Invalid Models and Settings File %1 - + Invalid binary Models and Settings File %1 - &Write EEPROM To Tx - &Gravar EEPROM no Rádio - - - + Ctrl+Alt+W Ctrl+Alt+W - Write EEPROM to transmitter - Gravar EEPROM no Rádio - - - &Read EEPROM From Tx - &Ler EEPROM do Rádio - - - + Ctrl+Alt+R Ctrl-Alt-R - Read EEPROM from transmitter - Ler EEPROM do Rádio - - - Write Flash memory - Gravar memória Flash - - - Write flash memory to transmitter - Gravar memória Flash para o Rádio - - - Read Flash memory - Ler memória Flash - - - Read flash memory to transmitter - Ler memória Flash do Rádio - - - - &Configure... - &Configurar... - - - Configure burning software - 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. - &Contributors - Contri&buidores - - - List er9x/companion9x Contributors - Lista de contribuidores do er9x/companion9x - - - - Switch layout Left/Right - - - - + &File &Ficheiro - - Switch layout direction - Mudar apresentação dos menus - - - + 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 ? - - - - + + The selected language will be used the next time you start Companion. + + + + + + + OK + + + + + The new theme will be loaded the next time you start Companion. + + + + + The icon size will be used the next time you start Companion. + + + + + + + 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 - + + &Old Preferences Dialog... + + + + + Used the old Preferences Dialog + + + + + &Application Preferences... + + + + + Edit application preferences + + + + + &Downloads and Profiles... + + + + + Firmware and voice file downloads as well as profile definition. + + + + Check for new version of Companion - + Show Companion contributors list - + Show Companion changelog - + + Configure transmitter start screen... + + + + &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 connection software... + + + + + Classic + + + + + The multicolor classical Companion icon theme + + + + + A monochrome black icon theme + + + + + A monochrome white icon theme + + + + + A monochrome blue icon theme + + + + + Small + + + + + Use small toolbar icons + + + + + Use normal size toolbar icons + + + + + Normal + + + + + Use big toolbar icons + + + + + Big + + + + + Use huge toolbar icons + + + + + Huge + + + + + System default language + + + + + Use system default language in menus + + + + + Czech + + + + + Use Czech in menus + + + + + German + + + + + Use German in menus + + + + + English + + + + + Use English in menus + + + + + French + + + + + Use French in menus + + + + + Italian + + + + + Use Italian in menus + + + + + Hebrew + + + + + Use Hebrew in menus + + + + + Polish + + + + + Use Polish in menus + + + + + Portuguese + + + + + Use Portuguese in menus + + + + + Swedish + + + + + Use Swedish in menus + + + + + Russian + + + + + Use Russian in menus + + + + + Manuals and other Documents + + + + + Open the OpenTX document page in a web browser + + + + + Firmware Profiles - + + Set Icon Theme + + + + + Set Icon Size + + + + &Edit &Editar - - &Window - &Janela - - - + &Help &Ajuda - + File Ficheiro - + Edit Editar - Burn - Gravar - - - + Help - + Ready Pronto @@ -2210,442 +3061,309 @@ Write anyway ? MdiChild - General Settings - Parâmetros Gerais - - - companion9x - companion9x - - - Delete Selected Models? - Apagar Modelos Seleccionados? - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + Error Erro - Unable set data! - Impossível aplicar dados! - - - Unable set model! - Impossível aplicar modelo! - - - + Editing model %1: A editar o modelo %1: - Unable to read settings! - Impossível ler parâmetros! - - - document%1.eepe - document%1.hex - documento%1.hex - - - - + + Unable to find file %1! Impossível encontrar o ficheiro %1! - Error reading file %1! - Erro ao ler o ficheiro %1! - - - - + + Error reading file %1: %2. - - Error loading file %1: -%2. - File wrong size - %1 - Ficheiro com tamanho incorrecto - %1 - free bytes - + Do you want to use model wizard? - - - + + + Companion - + Ask this question again ? - - - - + + + + Error opening file %1: %2. - - + + Invalid EEPROM File %1 - + Invalid binary EEPROM File %1 - - - - + + + + Save As Gravar Como - + Backup is impossible - + The backup dir set in preferences does not exist - - - + + + Taranis radio not found - - - + + + Impossible to identify the radio on your system, please verify the eeprom disk is connected. - - - + + + Backup EEPROM From Tx - + Cannot check eeprom compatibility! Continue anyway? - - + + Warning Aviso - + Firmware in radio is of a different family of eeprom written, check file and preferences! - + Firmware in flash is outdated, please upgrade! - + Write EEPROM To Tx - + Open Abrir - + Invalid binary backup File %1 - + %1 has been modified. Do you want to save your changes? - EEPROM hex files (*.hex);;EEPROM bin files (*.bin) - Ficheiros EEPROM hex (*.hex);;EEPROM bin files (*.bin) - - - - - - + + + + Cannot write file %1: %2. - :20%1000 - :20%1000 - - - %1 - %1 - - - - + + Error writing file %1: %2. - Write %1 to EEPROM memory? - Burn %1 to transmitter? - Gravar %1 no Rádio? - - - + Cannot write temporary file! Impossível gravar ficheiro temporário! - - &Edit - &Editar - - - &Delete - &Apagar - - - Delete - Apagar - - - &Copy - &Copiar - - - Ctrl+C - Ctrl+C - - - &Cut - Cor&tar - - - Ctrl+X - Ctrl-X - - - &Paste - Co&lar - - - Ctrl+V - Ctrl+V - - - D&uplicate - &Duplicar - - - Ctrl+U - Ctrl-U - - - &Simulate - &Simular - - - Alt+S - Alt+S - - - &Write To Tx - &Gravar no Rádio - - - Ctrl+Alt+W - Ctrl+Alt+W - MixerDialog - + Dialog Dialogo - + Source Fonte - - - - + + + + The source for the mixer A fonte para a mistura - + Weight Peso - - Fix Offset - - - - - - + + + GV - + Switch used by the mix. If blank then the mix is considered to be "ON" all the time. The value of the mixer is multiplied by this value and divided by 100. O valor da mistura é multiplicado por este valor e dividido por 100. - - - - + Offset Desvio - + Include Trim Incluir Ajustes (Trim) - If checked - will add the trim from the source (if available) - Se escolhido vai adicionar o ajuste (trim) da fonte (se disponível) - - - + Curve Curva - + The curve used by the mix Curva a usar pela mistura - + Switch Interruptor - + Yes - + No - + Warning Aviso - + Name Nome - - Curve/Differential - - - - + Mixer warning. Setting this value will cause a beep to be emmitted when this value is active. - + OFF OFF - + 1 Beep 1 Beep - + 2 Beep 2 Beeo 2 Beeps - + 3 Beep 3 Beeps - + Multiplex Multiplexar - + Multiplexer This determines how mixer values are added. @@ -2656,100 +3374,95 @@ This determines how mixer values are added. - + ADD ADICIONAR - + MULTIPLY MULTIPLICAR - + REPLACE SUBSTITUIR - + Flight modes - + Include DR/Expo - + 0 - + 1 - + 2 - + 3 - + 4 - + 5 - + 6 - + 7 - + 8 - - Enable FM Trim - - - - + Delay Atraso - + Slow Lento - + Up Cima - - - - + + + + <!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; } @@ -2764,2849 +3477,552 @@ p, li { white-space: pre-wrap; } - + Down Baixo - + DEST -> X%1 - + DEST -> CH%1%2 DEST -> CH%1%2 - - - FM Trim Value - - - - + Rud - + Ele - + Thr - + Ail + + MixesPanel + + + + Move Up + + + + + + Ctrl+Up + + + + + + Move Down + + + + + + Ctrl+Down + + + + + Clear Mixes + + + + + + + X%1 + + + + + + + CH%1%2 + CH%1%2 + + + + Weight(%1) + + + + + Switch(%1) + + + + + No Trim + + + + + No DR/Expo + + + + + Offset(%1) + + + + + Delay(u%1:d%2) + Atraso(u%1:d%2) + + + + Slow(u%1:d%2) + Lento(u%1:d%2) + + + + Warn(%1) + Aviso(%1) + + + + Not enough available mixers! + + + + + Delete Selected Mixes? + Apagar misturas selecionadas? + + + + &Add + &Adicionar + + + + Ctrl+A + Ctrl+A + + + + &Edit + &Editar + + + + Enter + Enter + + + + &Delete + + + + + Delete + + + + + &Copy + &Copiar + + + + Ctrl+C + Ctrl+C + + + + &Cut + + + + + Ctrl+X + + + + + &Paste + Co&lar + + + + Ctrl+V + Ctrl+V + + + + Du&plicate + + + + + Ctrl+U + + + + + Clear Mixes? + + + + + Really clear all the mixes? + + + ModelEdit - + Dialog Dialogo - + Setup Configuração - - Model Name - Nome do Modelo + + Heli + - Timer Mode - Modo do Temporizador + + Inputs + - Timer Direction - Direcção do Temporizador + + Logical Switches + - - - Count Down - Contagem regressiva + + Switch Assignment + - - - Count Up - Contagem progressiva - - - Timer Value - Valor Inicial do Temporizador - - - - - mm:ss - mm:ss - - - - Trim Increment - Incremento nos Ajustes (trims) - - - - Exponential - Exponencial - - - - Extra Fine - Extra-fino - - - - Fine - Fino - - - - Medium - Médio - - - - Coarse - Aberto - - - - Throttle Trim - Ajuste (trim) do Acelerador - - - - Throttle Expo - Exponencial do Acelerador - - - instaTrim Switch - Interruptor "instaTrim" - - - - Center beep - Sons ao centrar - - - - - - - - - - - - RUD - RUD - - - - - - - - - - - - - - - ELE - ELE - - - - - - - - THR - THR - - - - - - - - - - - - - AIL - AIL - - - - P1 - P1 - - - - P2 - P2 - - - - P3 - P3 - - - - Pulse Shift (polarity) - Polaridade (pulse shift) - - - - - - Positive - Positiva - - - - - - Negative - Negativa - - - - - - Protocol - Protocolo - - - - - + Channels Canais - - - - - - - ch - ch - - - ppm Delay - Atraso ppm - - - - - - usec - useg - - - - Extended Limits - - - - - - Heli Setup - - - - - Swash Type - - - - - - Off - - - - - 120 - - - - - 120X - - - - - 140 - - - - - 90 - - - - - Collective - - - - - Swash Ring - - - - - Invert Elevator - - - - - Invert Aileron - - - - - Invert Collective - - - - Expo/Dr - Expo/Dr - - - HIGH - ALTO - - - MID - MEIO - - - LOW - BAIXO - - - Switch1 - Interruptor1 - - - Switch2 - Interruptor2 - - - Rudder - Leme - - - Aileron - Aileron - - - Throttle - Acelerador - - - Elevator - Elevador - - - + Mixes Misturas - - Limits - Limites - - - - Clear All Curves - Clear All Mixes - - - - - Custom switches - - - - CSwitch7 - CSwitch7 - - - CSwitch8 - CSwitch8 - - - CSwitch9 - CSwitch9 - - - CSwitchA - CSwitch10 - CSwitch10 - - - CSwitchB - CSwitch11 - CSwitch11 - - - CSwitchC - CSwitch12 - CSwitch12 - - - - Safety Switches - - - - - - - - - - - - - - - - - Switch - Interruptor - - - - Value - - - - CH1 - CH1 - - - NOR - NOR - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INV - INV - - - CH2 - CH2 - - - CH3 - CH3 - - - CH4 - CH4 - - - CH5 - CH5 - - - CH6 - CH6 - - - CH7 - CH7 - - - CH8 - CH8 - - - CH9 - CH9 - - - - - CH10 - CH10 - - - - - CH11 - CH11 - - - - - CH12 - CH12 - - - - - CH13 - CH13 - - - - - CH14 - CH14 - - - - - CH15 - CH15 - - - - - CH16 - CH16 - - - - - - Channel - Canal - - - - - - Offset - Desvio - - - - - - - - Min - Min - - - - - - - - Max - Max - - - - - - Invert - Inverter - - - + Curves Curvas - - Curve 1 - Curva 1 - - - - Curve 2 - Curva 2 - - - - Timer1 - - - - - Timer2 - - - - - - - PPM delay - - - - - Extended Trims - - - - - Throttle2Trig - - - - - - - PPM Frame Length - - - - - - - mSec - - - - - - - - - - - - - Fade In - - - - - - - - - - - - - Fade Out - - - - - - - - - - - - - trim2 - - - - - - - - - - - - - trim1 - - - - - - DSM Type - - - - - - LP4/LP5 - - - - - - DSM2only - - - - - - DSM2/DSMX - - - - - - RX Number - - - - - - CH01 - CH01 - - - - - CH02 - CH02 - - - - - CH03 - CH03 - - - - - CH04 - CH04 - - - - - CH05 - CH05 - - - - - CH06 - CH06 - - - - - CH07 - CH07 - - - - - CH08 - CH08 - - - - - CH09 - CH09 - - - - - - - - - - - - trim4 - - - - - - - - - - - - - trim3 - - - - - Curve 3 - Curva 3 - - - - Curve 4 - Curva 4 - - - - Curve 5 - Curva 5 - - - - Curve 6 - Curva 6 - - - - Curve 7 - Curva 7 - - - - Curve 8 - Curva 8 - - - - Curve 9 - Curva 9 - - - - Curve 10 - Curva 10 - - - - Curve 11 - Curva 11 - - - - Curve 12 - Curva 12 - - - - Curve 13 - Curva 13 - - - - Curve 14 - Curva 14 - - - - Curve 15 - Curva 15 - - - - Curve 16 - Curva 16 - - - - - Param - - - - - Disable Throttle Warning - - - - - Switch startup Warning - - - - - Instant Trim - - - - - REa - - - - - REb - - - - - 3POS - - - - - - Check - - - - - - - ON - - - - - - OFF - OFF - - - - GEA - GEA - - - - ID0 - ID0 - - - - ID1 - ID1 - - - - ID2 - ID2 - - - - - TriggerB - - - - - Model Voice - - - - - - - - - - - - - GVAR1 - - - - - - - - - - - - - GVAR2 - - - - - - - - - - - - - GVAR3 - - - - - - - - - - - - - GVAR4 - - - - - - - - - - - - - GVAR5 - - - - - - - - - - - - - Rotary encoder B - - - - - - - - - - - - - Rotary encoder A - - - - - - Sym - - - - - - Curve type - - - - - 3 points - - - - - 3 points custom - - - - - 5 points - - - - - 5 points custom - - - - - 9 points - - - - - 9 points custom - - - - - 17 points - - - - - 17 points custom - - - - - - Duration - - - - - - Delay - Atraso - - - - Custom Functions - - - - + Telemetry - - Volt source - - - - - Current source - - - - - NONE - - - - - - - - A1 - - - - - - FAS - - - - - CEL - - - - - Alti - - - - - Alti+ - - - - - Vario - - - - - - Unit - - - - - - Raw (-) - - - - - Telemetry screen 1 - - - - - - - Custom Screen Type - - - - - - - Nums - - - - - - - Bars - - - - - Telemetry screen 2 - - - - - Telemetry screen 3 - - - - - - Max Value - - - - - RSSI - - - - - Alarm 1 - - - - - Serial Protocol - - - - - Units - - - - - None - - - - - FrSky Sensor Hub - - - - - Metric - - - - - ModelSetup - - - - - Model Image - - - - - - Persistent - - - - - - MinuteBeep - - - - - - CountDownBeep - - - - - SB - - - - - Throttle Source - - - - - SD - - - - - SA - - - - - SC - - - - - SG - - - - - SE - - - - - SF - - - - - RS - - - - - Reverse Throttle Operation - Inverter Acelerador - - - - 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. - - - - - - - Master - - - - - Slave - - - - - Trainer Mode - - - - - Master/Trainer Port - - - - - - - Start - - - - - - Polarity - - - - - RF Module 1 - - - - - RF Module 2 - - - - - - (00:00:00) - - - - - Failsafe - - - - - External module - - - - - - Failsafe Mode - - - - - - Hold - - - - - - Custom - - - - - - No Pulses - - - - - Internal Module - - - - + Flight Modes - - Flight Mode 0 (Default) - - - - - - - - - - - - - Flight Mode Name - - - - - GVAR6 - - - - - GVAR7 - - - - - FM 1 - - - - - FM 2 - - - - - FM 3 - - - - - FM 4 - - - - - FM 5 - - - - - FM 6 - - - - - FM 7 - - - - - FM 8 - - - - - Sticks - - - - - Show channels names in mixes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- - - - - - - Center - - - - - Curve name - - - - - Curve Creator - - - - - Y at X=100 - - - - - Both - - - - - x>0 - - - - - x<0 - - - - - Linear - - - - - Single Expo - - - - - Symmetrical f(x)=-f(-x) - - - - - Symmetrical f(x)=f(-x) - - - - - Apply - - - - - Side - - - - - Y at X=-100 - - - - - Y at X=0 - - - - - Coefficient - - - - - CS9 - - - - - CSF - - - - - CSD - - - - - - AND - - - - - CS6 - - - - - CS1 - - - - - CS8 - - - - - CS7 - - - - - CSA - - - - - CSB - - - - - CSC - - - - - CS5 - - - - - CS3 - - - - - CS2 - - - - - CSE - - - - - CSG - - - - - CS4 - - - - - CST - - - - - CSM - - - - - CSP - - - - - CSH - - - - - CSO - - - - - CSN - - - - - CSQ - - - - - CSR - - - - - CSS - - - - - CSL - - - - - CSK - - - - - CSJ - - - - - CSI - - - - - CSU - - - - - CSV - - - - - CSW - - - - - Imperial - - - - - 2 - - - - - 3 - - - - - 4 - - - - - Blades - - - - - Sink Max - - - - - Climb Max - - - - - Sink Min - - - - - Climb Min - - - - - Display altitude in toolbar - - - - - - Volts (V) - - - - - - Amps (A) - - - - - - Speed (m/s or ft/s) - - - - - - Speed (km/h or miles/h) - - - - - - Meters (m or ft) - - - - - - Temp (°) - - - - - - Fuel (%) - - - - - - mAmps (mA) - - - - - - - Source - Fonte - - - - - - Gauge - - - - - - - Gauge 1 - - - - - - - Gauge 2 - - - - - - - Gauge 3 - - - - - - - Gauge 4 - - - - - - Alarm 1 - - - - - - Enable - - - - - Altimetry / Vario - - - - - Vario source - - - - - Vario limits - - - - - Use GPS as altitude source - - - - - - - - - - ---- - - - - - - - - - - Yellow - - - - - - - - - - Orange - - - - - - - - - - Red - - - - - - - - < - - - - - - - - > - - - - - - - Alarm 2 - - - - - - Min Value - - - - - - - - A2 - - - - Switches - Interruptores - - - CSwitch1 - CSwitch1 - - - CSwitch2 - CSwitch2 - - - CSwitch3 - CSwitch3 - - - CSwitch4 - CSwitch4 - - - CSwitch5 - CSwitch5 - - - CSwitch6 - CSwitch6 - - - - - - - Function - CSwitch7 - - - - - V1 - - - - - - V2 - - - - Source/SW1 - Fonte/SW1 - - - Value/SW2 - Valor/SW2 - - - Trims - Ajustes - - - STICK 1 - STICK 1 - - - STICK 2 - STICK 2 - - - STICK 4 - STICK 3 - - - STICK 3 - STICK 4 - - - - Templates - - - - + Simulate Simular - - - - CH%1%2 - CH%1%2 - - - %1% - %1% - - - +%1% - +%1% - - - Switch( - Interruptor( - - - noTrim - semAjuste - - - Offset(%1%) - Atraso(%1%) - - - Curve(%1) - Curva(%1) - - - - Clear Mixes - - - - - S1 - - - - - S2 - - - - - LS - - - - - Rud - - - - - Ele - - - - - Thr - - - - - Ail - - - - - Weight - Weight(+%1%) - Peso - - - - - Flight modes - - - - - - Flight mode - - - - - No Trim - - - - - Delay(u%1:d%2) - Atraso(u%1:d%2) - - - - Slow(u%1:d%2) - Lento(u%1:d%2) - - - - Warn(%1) - Aviso(%1) - - - Curve %1 - Curva %1 - - - companion9x - companion9x - - - - - Expo - - - - - - DISABLED - - - - - - Curve - Curva - - - - - - X%1 - - - - - No DR/Expo - - - - - FMTrim - - - - - Diff - - - - - - - - CH %1 - - - - - CF%1 - - - - - Error - Erro - - - - Unable to find sound file %1! - - - - - Winged Shadow How High - - - - - Winged Shadow How High (not supported) - - - - - - Range - - - - - Simple 4-CH - - - - - T-Cut - - - - - Sticky T-Cut - - - - - V-Tail - - - - - Elevon\Delta - - - - - Heli Setup with gyro gain control - - - - - Gyro gain control - - - - - Heli Setup (Futaba's channel assignment style) - - - - - Heli Setup with gyro gain control (Futaba's channel assignment style) - - - - - Gyro gain control (Futaba's channel assignment style) - - - - - Servo Test - - - - - MultiCopter - - - - - Use Model Config Wizard - - - - - Editing curve %1 - - - - - Not enough available mixers! - - - - - Not enough available expos! - - - - - Delete Selected Mixes? - Apagar misturas selecionadas? - - - - Delete Selected Expos? - - - - - - &Add - &Adicionar - - - - - Ctrl+A - Ctrl+A - - - - - &Edit - &Editar - - - - - Enter - Enter - - - - - - - &Delete - &Eliminar - - - - - - - Delete - Eliminar - - - - - - - &Copy - &Copiar - - - - - - - Ctrl+C - Ctrl+C - - - - - - - &Cut - &Cor&tar - - - - - - - Ctrl+X - Ctrl+X - - - - - - - &Paste - Co&lar - - - - - - - Ctrl+V - Ctrl+V - - - - - Du&plicate - - - - - Are you sure you want to delete curve %1 ? - - - - - Apply Template? - - - - - Apply template "%1"? - - - - - Clear Expos? - - - - - Really clear all the expos? - - - - - - - Clear Mixes? - - - - - Really clear all the mixes? - - - - + Clear Curves? - + Really clear all the curves? - - - - - - AIL2 - - - - - - - - ELE2 - - - - - - - - - - FLAPS - - - - - - - - - - FLAP%1 - - - - - - - - PITCH - - - - - - - - - - - - GYRO - - - - - - SPOIL - - - - - - SPOIL%1 - - - - - - RUD2 - - - - - Really clear existing mixes on CH6? - - - - - Really clear existing mixes on CH5? - - - - - Not enough free points in eeprom to store the curve. - - - - - - - - Move Up - - - - - - - - Ctrl+Up - - - - - - - - Move Down - - - - - - - - Ctrl+Down - - - - - Clear Expo Settings - - - - D&uplicate - &Duplicar - - - - - Ctrl+U - Ctrl+U - ModelsListWidget - + &Edit &Editar - + &Restore from backup - + &Model Wizard - + &Delete - + Delete - + &Copy &Copiar - + Ctrl+C Ctrl+C - + &Cut - + Ctrl+X - + &Paste Co&lar - + Ctrl+V Ctrl+V - + D&uplicate &Duplicar - + Ctrl+U - + &Use as default - + P&rint model - + Alt+R - + Alt+S Alt+S - + &Simulate model - + General Settings Parâmetros Gerais - + Delete Selected Models? Apagar Modelos Seleccionados? - - + + Cannot delete default model. - + Cannot cut default model. - + Do you want to overwrite TX general settings? - + You are pasting on an not empty model, are you sure? You are pasting on an not empty model, are you sure ? - + No free slot available, cannot duplicate + + Module + + + Form + + + + + Failsafe Mode + + + + + Start + + + + + PPM delay + + + + + usec + useg + + + + Negative + + + + + Positive + + + + + RX Number + + + + + Master + + + + + Slave + + + + + Polarity + + + + + Trainer Mode + + + + + mSec + + + + + PPM Frame Length + + + + + Label + + + + + + ch + ch + + + + Channels + Canais + + + + Hold + + + + + Custom + + + + + No Pulses + + + + + Failsafe Positions + + + + + Protocol + Protocolo + + + + ModulePanel + + + Trainer Output + + + + + Internal Radio System + + + + + External Radio Module + + + QObject @@ -5617,2017 +4033,1811 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi - + + Input%1 + + + + + Polish + + + + + CH%1 + CH%1 + + + No - + RotEnc A - + Rot Enc B - + Rot Enc C - + Rot Enc D - + Rot Enc E - + Safety %1 - + Trainer - + Trainer RUD - + Trainer ELE - + Trainer THR - + Trainer AIL - + Instant Trim - + Play Sound - + Start Logs - + Play Haptic - - + + + --- - + Rud Trim - + Ele Trim - + Thr Trim - + Ail Trim - + Rot Enc - + English - + French - + Italian - + German - + Czech - + Slovak - + Spanish - + Portuguese - + Swedish - - CH - - - - - + + No repeat - + %1 sec - + Reset - - Vario + + a>x - - Play Track + + a<x - - Play Both - - - - - Play Value - - - - - Volume - - - - - Backlight - - - - - Background Music - - - - - Background Music Pause - - - - - Adjust GV1 - - - - - Adjust GV2 - - - - - Adjust GV3 - - - - - Adjust GV4 - - - - - Adjust GV5 - - - - - Delay %1 sec - - - - - Duration %1 sec - - - - - - - <font color=red><b>Inconsistent parameter</b></font> - - - - - Value - - - - - Decr: - - - - - Incr: - - - - - %1s - %1s - - - - Value - - - - - Source - Fonte - - - - GVAR - - - - - Increment - - - - - !Flight mode %1 - - - - - Flight mode %1 - - - - - Flight mode %1 trim - - - - - Flight mode %1 value - - - - - Yellow - - - - - Orange - - - - - Red - - - - - Winged Shadow How High - - - - - Winged Shadow How High (not supported) - - - - - FrSky Sensor Hub - - - - - None - - - - - Imperial - - - - - Metric - - - - - Extra Fine - Extra-fino - - - - Fine - Fino - - - - Medium - Médio - - - - Coarse - Aberto - - - - Exponential - Exponencial - - - - Count Up - Contagem progressiva - - - - Count Down - Contagem regressiva - - - - %1:%2, - %1:%2, - - - - : %1 Channels, %2usec Delay - :%1 Canais, Atraso de %3 mseg {1 ?} {2m?} {1 ?} {2u?} - - - - Rudder - Leme - - - - Elevator - Elevador - - - - Throttle - Acelerador - - - - Aileron - Aileron - - - - - - Timer1 - - - - - - - Timer2 - - - - - - All - - - - - - Telemetry - - - - - Diff - - - - - Expo - - - - - Own trim - - - - - Own value - - - - - Keys - - - - - Sticks - - - - - Keys + Sticks - - - - - -GV%1 - - - - - (-GV%1) - - - - - (GV%1) - - - - - - - - ---- - - - - - - RUD - RUD - - - - - ELE - ELE - - - - - - - THR - THR - - - - - AIL - AIL - - - - - - P1 - P1 - - - - - - P2 - P2 - - - - - - P3 - P3 - - - - SA - - - - - SB - - - - - SC - - - - - SD - - - - - SE - - - - - SF - - - - - SG - - - - - SH - - - - - Batt - - - - - Pwr+ - - - - - MAX - - - - - - Rud - - - - - - Ele - - - - - - Thr - - - - - - Ail - - - - - TrmR - - - - - TrmE - - - - - TrmT - - - - - TrmA - - - - - - S1 - - - - - - S2 - - - - - - LS - - - - - - RS - - - - - REa - - - - - REb - - - - - Alt - - - - - Rpm - - - - - Fuel - - - - - Tx - - - - - Rx - - - - - SWR - - - - - RSSI - - - - - Speed - - - - - Dist - - - - - GPS Alt - - - - - Cell - - - - - Cels - - - - - Vfas - - - - - Curr - - - - - Cnsp - - - - - Powr - - - - - AccX - - - - - AccY - - - - - AccZ - - - - - HDG - - - - - VSpd - - - - - A1- - - - - - A2- - - - - - Alt- - - - - - Alt+ - - - - - Rpm+ - - - - - T1+ - - - - - T2+ - - - - - Spd+ - - - - - Dst+ - - - - - Cur+ - - - - - ACC - - - - - Time - - - - - - 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 + + |a|>x - ONE + |a|<x - - !ONE + + AND - - TRNs + + OR + + + + + XOR + + + + + a=b + + + + + a!=b + + + + + a>b + + + + + a<b - TRNl + a>=b + + + + + a<=b + + + + + d>=x - REAs + |d|>=x - - REAl + + a~x - - 3POS + + Timer + Temporizador + + + + Sticky - + + Stay + + + + + Unknown + + + + + STAY(%1, [%2:%3]) + + + + + STICKY(%1, %2) + + + + + TIMER(%1, %2) + + + + + Set Timer %1 + + + + + Vario + + + + + Play Track + + + + + Play Both + + + + + Play Value + + + + + Volume + + + + + Backlight + + + + + Background Music + + + + + Background Music Pause + + + + + Delay %1 sec + + + + + Duration %1 sec + + + + + + + + + + <font color=red><b>Inconsistent parameter</b></font> + + + + + + Value + + + + + + Decr: + + + + + + Incr: + + + + + Played once, not during startup + + + + + %1s + %1s + + + + Adjust GV%1 + + + + + Rotary Encoder + + + + + Value + + + + + Source + Fonte + + + + GVAR + + + + + Increment + + + + + !Flight mode %1 + + + + + Flight mode %1 + + + + + Flight mode %1 value + + + + + Yellow + + + + + Orange + + + + + Red + + + + + Winged Shadow How High + + + + + Winged Shadow How High (not supported) + + + + + FrSky Sensor Hub + + + + + + None + + + + + Imperial + + + + + Metric + + + + + Extra Fine + Extra-fino + + + + Fine + Fino + + + + Medium + Médio + + + + Coarse + Aberto + + + + Exponential + Exponencial + + + + Count Up + Contagem progressiva + + + + Count Down + Contagem regressiva + + + + %1:%2, + %1:%2, + + + + : %1 Channels, %2usec Delay + :%1 Canais, Atraso de %3 mseg {1 ?} {2m?} {1 ?} {2u?} + + + + Flight modes(%1) + + + + + Flight mode(%1) + + + + + Rudder + Leme + + + + Elevator + Elevador + + + + Throttle + Acelerador + + + + Aileron + Aileron + + + + + + + Timer1 + + + + + + + + Timer2 + + + + + + + All + + + + + + + Telemetry + + + + + Own value + + + + + Keys + + + + + Sticks + + + + + Keys + Sticks + + + + + + -GV%1 + + + + + + + + ---- + + + + + + THR + THR + + + + + + P1 + P1 + + + + + + P2 + P2 + + + + + + P3 + P3 + + + + Batt + + + + + Pwr+ + + + + + + LS1 + + + + + + LS2 + + + + + + LS3 + + + + + + LS4 + + + + + + LS5 + + + + + + LS6 + + + + + + LS7 + + + + + + LS8 + + + + + + LS9 + + + + + + LSA + + + + + + LSB + + + + + + LSC + + + + + + LSD + + + + + + LSE + + + + + + LSF + + + + + + LSG + + + + + + LSH + + + + + + LSI + + + + + + LSJ + + + + + + LSK + + + + + + LSL + + + + + + LSM + + + + + + LSN + + + + + + LSO + + + + + + LSP + + + + + + LSQ + + + + + + LSR + + + + + + LSS + + + + + + LST + + + + + + LSU + + + + + + LSV + + + + + + LSW + + + + + Input %1 + + + + + MAX + + + + + + Rud + + + + + + Ele + + + + + + Thr + + + + + + Ail + + + + + TrmR + + + + + TrmE + + + + + TrmT + + + + + TrmA + + + + + + S1 + + + + + + S2 + + + + + + LS + + + + + + RS + + + + + + + REa + + + + + + + REb + + + + + Alt + + + + + Rpm + + + + + Fuel + + + + + Tx + + + + + Rx + + + + + SWR + + + + + RSSI + + + + + Speed + + + + + Dist + + + + + GPS Alt + + + + + Cell + + + + + Cels + + + + + Vfas + + + + + Curr + + + + + Cnsp + + + + + Powr + + + + + AccX + + + + + AccY + + + + + AccZ + + + + + HDG + + + + + VSpd + + + + + A1- + + + + + A2- + + + + + Alt- + + + + + Alt+ + + + + + Rpm+ + + + + + T1+ + + + + + T2+ + + + + + Spd+ + + + + + Dst+ + + + + + Cur+ + + + + + ACC + + + + + Time + + + + + S11 + + + + + S12 + + + + + S13 + + + + + S14 + + + + + S15 + + + + + S16 + + + + + S21 + + + + + S22 + + + + + S23 + + + + + S24 + + + + + S25 + + + + + S26 + + + + + RudTrim Left + + + + + RudTrim Right + + + + + EleTrim Down + + + + + EleTrim Up + + + + + ThrTrim Down + + + + + ThrTrim Up + + + + + AilTrim Left + + + + + AilTrim Right + + + + + ABS + + + + + THs + + + + + TH% + + + + + THt + + + + + ??? + + + + + Diff(%1) + + + + + Expo(%1) + + + + + Function(%1) + + + + + Curve(%1) + + + + + !Curve(%1) + + + + X%1 - - + + + GV%1 - - + + Support for frsky telemetry mod - - + + Support for jeti telemetry mod - - + + Support for receiving ardupilot data - - + + Support for receiving NMEA data - + Support for telemetry easy board - - + + Support for MAVLINK devices - + Rotary Encoder use in menus navigation - + Possibility to enable FAI MODE at field - + FAI MODE always enabled - - openTx for 9X board - - - - - - - - + + + + + Enable heli menu and cyclic mix support - - - - - - + + + + + + Enable TEMPLATES menu - - - - + + + + No splash screen - - - - - - + + + + + + Disable curves menus - - - - + + + + Support for radio modified with regular speaker - - - - - + + + + + Used if you have modified your radio with voice mode - - - - + + + + Used if you have modified your radio with haptic mode - - - - - - - - + + + + + + + + Use alternative SQT5 font - - - - + + + + Enable the throttle trace in Statistics - + EEprom write progress bar - - + + No Winged Shadow How High support - - + + No vario support - - + + No GPS support - - + + No gauges in the custom telemetry screen - - openTx for M128 / 9X board + + Allow compensating for offset errors in FrSky FAS current sensors - - openTx for 9XR + + OpenTX for FrSky Taranis - - openTx for 9XR with M128 chip + + OpenTX for FrSky Taranis Rev4a - - openTx for Gruvin9x board / 9X - - - - + Support of FrSky PXX protocol - + + OpenTX for Sky9x board / 9X + + + + Use FrSky Taranis sticks in a 9X/9XR - - openTx for FrSky Taranis - - - - - + + Disable HELI menu and cyclic mix support - - + + Disable TEMPLATES menu - - + + Disable Global variables - - openTx for FrSky Taranis Rev4a - - - - - - - - + + + + + Support for DSM2 modules - - - - - - + + + + + + PPM center adjustment in limits - - - - - - - - + + + + + + + + PPM values displayed in us - - - - - - + + + + + + Symetrical Limits - - - - - + + + + + Pots use in menus navigation - + Your radio probably uses a wrong firmware, eeprom size is 4096 but only the first 2048 are used - - - - - - + + OpenTX for 9X board + + + + + + + + + No flight modes - - + + SmartieParts 2.2 Backlight support - - - - - - + + + + + + In model setup menus automatically set source by moving some of them - - - - - - + + + + + + In model setup menus automatically set switch by moving some of them - - - - + + + + Enable resetting values by pressing up and down at the same time - - - - - - + + + + + + No graphical check boxes and sliders - - - - - - + + + + + + Battery graph - - - - - - + + + + + + Don't use bold font for highlighting active items - - - - + + OpenTX for M128 / 9X board + + + + + + + EEprom write Progress bar - - - - - + + + + + Imperial units - + Bluetooth interface - - - - - - + + + + + + Global variables - + + OpenTX for 9XR + + + + + OpenTX for 9XR with M128 chip + + + + + OpenTX for Gruvin9x board / 9X + + + + Support for SD memory card - + Support for DSM2 modules using ppm instead of true serial - - openTx for Sky9x board / 9X - - - - + Enable HELI menu and cyclic mix support - + ersky9x - CH1 - CH1 - - - CH2 - CH2 - - - CH3 - CH3 - - - CH4 - CH4 - - - CH5 - CH5 - - - CH6 - CH6 - - - CH7 - CH7 - - - CH8 - CH8 - - - CH9 - CH9 - - - CH10 - CH10 - - - CH11 - CH11 - - - CH12 - CH12 - - - CH13 - CH13 - - - CH14 - CH14 - - - CH15 - CH15 - - - CH16 - CH16 - - - + A1 - + A2 - + T1 - + T2 - - Curve - Curva - - - - - - - Flight modes settings on expos not exported - Phases settings on expos not exported - - - - - - - - - - - - Open9x on this board doesn't have Rotary Encoders - - - - - gruvin9x doesn't have trims as source - - - - - gruvin9x doesn't have swappable trims - - - - - gruvin9x on this board doesn't have Rotary Encoders - - - - - gruvin9x does not support Custom Switch function %1 - - - - - gruvin9x only accepts %1 expos - - - - - - gruvin9x doesn't support custom curves as curve%1, curve as been exported as fixed point - - - - - - gruvin9x doesn't support curve with %1 point as curve%2 - - - - - - - Open9x doesn't allow Curve%1 in expos - - - - - + + Simultaneous usage of expo and curves is no longer supported - - - - - - - - Flight modes settings on mixers not exported - - - - - - Flight mode settings on mixers not exported - Phases settings on mixers not exported - - - - - - - - This version of open9x does not support Custom Switch function %1 - - - - - - - - - - - - - - - - - - - - - - Open9x doesn't accept this protocol - - - - - - - - - - open9x only accepts %1 points in all curves - - - - + Simultaneous usage of expo and curves is no longer supported in open9x - - - open9x on this board doesn't have Rotary Encoders - - - - - - - - - - - - - - - - - open9x only accepts %1 expos - Gruvin9x firmware only accepts %1 expos - - - - + th9x - + er9x - + CYC%1 - + PPM%1 - + CH%1%2 CH%1 CH%1 - - ID0 - ID0 - - - - ID1 - ID1 - - - - ID2 - ID2 - - - - - GEA - GEA - - - - - TRN - TRN - - - SW%1 - SW%1 - - - - + + ON - - + + + OFF OFF - - er9x doesn't have Rotary Encoders - - - - - er9x doesn't have trims as source - - - - - er9x doesn't have negative gvars as weight - - - - - er9x doesn't have negative gvars as offset - - - - - - - er9x doesn't have swappable trims - - - - - - - er9x on this board doesn't have Rotary Encoders - - - - - er9x does not support Custom Switch function %1 - - - - - - - er9x does not support this range for A1/A2 - - - - - - - er9x does not support this telemetry units - - - - - - Er9x doesn't accept this protocol - - - - - - Er9x doesn't support custom curves as curve%1, curve as been exported as fixed point - - - - - - Er9x doesn't support curve with %1 point as curve%2 - - - - - - - - + + + + Warning Aviso - - + EEPROM saved with these warnings: - - - ersky9x doesn't have Rotary Encoders - - - - - - ersky9x doesn't have trims as source - - - - - - ersky9x does not support Custom Switch function %1 - - - - - - Ersky9x doesn't accept this protocol - - - - - - - - ErSky9x doesn't support custom curves as curve%1, curve as been exported as fixed point - - - - - - - - ErSky9x doesn't support curve with %1 point as curve%2 - - - - - - + + + Simulator for this firmware is not yet available - - th9x does not support Custom Switch function %1 - - - - + th9x on this board doesn't have Rotary Encoders - - - - th9x doesn't support custom curves as curve%1, curve as been exported as fixed point - - - - - - - th9x doesn't support curve with %1 point as curve%2 - - - - - - Flight Mode 0 (Default) - - - - - - FM %1 - - - - + openTx only accepts %1 points in all curves - - - + + + + OpenTX on this board doesn't accept this function - - + + OpenTX doesn't accept this protocol - + OpenTX doesn't allow this number of channels @@ -7640,6 +5850,773 @@ We are really appreciative for that! The OpenTX/Companion Team. + + + Trim disabled + + + + + Own Trim + + + + + Use Trim from Flight mode %1 + + + + + Use Trim from Flight mode %1 + Own Trim as an offset + + + + + Setup + + + Form + + + + + Model Name + Nome do Modelo + + + + Timer2 + + + + + Timer1 + + + + + Throttle Source + + + + + Switch startup Warning + + + + + Center beep + Sons ao centrar + + + + Trim Increment + + + + + ON + + + + + OFF + OFF + + + + Check + + + + + Model Image + + + + + Exponential + Exponencial + + + + Extra Fine + Extra-fino + + + + Fine + Fino + + + + Medium + Médio + + + + Coarse + Aberto + + + + Extended Limits + + + + + Extended Trims + + + + + Throttle Trim + + + + + 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. + + + + + + + Reverse Throttle + + + + + Telemetry + + + Form + + + + + + + + A1 + + + + + + + + A2 + + + + + RSSI + + + + + Alarm 1 + + + + + + ---- + + + + + + Yellow + + + + + + Orange + + + + + + Red + + + + + Alarm 2 + + + + + Serial Protocol + + + + + Volt source + + + + + Metric + + + + + Imperial + + + + + Current source + + + + + Protocol + Protocolo + + + + NONE + + + + + + FAS + + + + + None + + + + + FrSky Sensor Hub + + + + + CEL + + + + + 2 + + + + + 3 + + + + + 4 + + + + + Units + + + + + Blades + + + + + Altimetry / Vario + + + + + Alti + + + + + Alti+ + + + + + Vario + + + + + Sink Max + + + + + Off + + + + + Climb Max + + + + + Sink Min + + + + + Climb Min + + + + + Vario source + + + + + Vario limits + + + + + Use GPS as altitude source + + + + + Display altitude in toolbar + + + + + Various + + + + + mAh count + + + + + FAS Offset + + + + + Persistent mAh + + + + + TelemetryAnalog + + + Form + + + + + Unit + + + + + Max Value + + + + + Alarm 1 + + + + + + ---- + + + + + + Yellow + + + + + + Orange + + + + + + Red + + + + + + < + + + + + + > + + + + + Alarm 2 + + + + + Min Value + + + + + 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) + + + + + Range + + + + + TelemetryCustomScreen + + + Form + + + + + Custom Screen Type + + + + + Nums + + + + + Bars + + + + + Min + Min + + + + Source + Fonte + + + + Gauge + + + + + Max + Max + + + + TelemetryPanel + + + Telemetry screen %1 + + + + + Winged Shadow How High + + + + + Winged Shadow How High (not supported) + + + + + Timer + + + Form + + + + + mm:ss + mm:ss + + + + Countdown + + + + + MinuteBeep + + + + + Persistent + + + + + (00:00:00) + + + + + TimerPanel + + + None + + + + + Beeps + + + + + Countdown + + + + + appPreferencesDialog + + + Application Preferences + + + + + Simulator capture folder + + + + + Remember simulator switch values + + + + + + + Open Folder + + + + + User Splash Screens + + + + + Blue + + + + + Green + + + + + Red + + + + + Orange + + + + + Yellow + + + + + Include companion splashes + + + + + Only user defined splashes + + + + + Splash Screen Library + + + + + Files to keep + + + + + Simulator BackLight + + + + + Automatic Backup Folder + + + + + Only capture to clipboard + + + + + Joystick + + + + + Find Executable + + + + + Google Earth Executable + + + + + Calibrate + + + + + Enable + + + + + Show splash screen when Companion starts + + + + + Automatic check for OpenTX firmware updates + + + + + Automatic check for Companion updates + + + + + Offer to use wizard for new models + + + + + Enable automatic backup before writing firmware + + + + + Select your snapshot folder + + + + + + No joysticks found + + + + + Select your library folder + + + + + Select your Models and Settings backup folder + + + + + Select Google Earth executable + + avrOutputDialog @@ -7653,14 +6630,6 @@ The OpenTX/Companion Team. Show Details - - AVRDUDE result - Resultado do AVRDUDE - - - AVRDUDE - - AVRDUDE - - result @@ -7793,12 +6762,6 @@ Do you want some help ? Copy finished correctly - - Started AVRDUDE - Started AVRDUDE - - AVRDUDE Iniciado\n - FUSES: Low=%1 High=%2 Ext=%3 @@ -7808,7 +6771,7 @@ Do you want some help ? burnConfigDialog - + AVRDUDE Configuration Configuração do AVRDUDE @@ -7838,10 +6801,6 @@ Do you want some help ? The location of the AVRDUDE.EXE executable. Localização do ficheiro executável AVRDUDE - - Use this button to browse and look for the AVRDUDE.EXE executable file. - Utilize este botão para procurar o ficheiro executável do AVRDUDE - @@ -7849,18 +6808,6 @@ Do you want some help ? Browse... Procurar... - - Temporary Directory - Directório Temporário - - - Stores temporary files - Localização dos ficheiros temporários - - - Use this button to browse and select the temporary directory. - Utilize este botão para escolher o directório para os ficheiros temporários - @@ -7973,51 +6920,35 @@ Please only use this if you know what you are doing. There are no error checks - Reset Fuses - Reinicializar os Fuses - - - Read Fuses - Ler os Fuses - - - Set EEPROM Erase Fuse - Activar o Fuse "Limpar EEPROM" - - - + DFU-UTIL Configuration - + SAM-BA Configuration - - - + + + Select Location Selecionar localização - - + + Companion - companion9x - companion9x - - - + <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>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. @@ -8075,7 +7006,7 @@ m2560 for v4.1 boards - + Browse for file @@ -8121,7 +7052,7 @@ m2560 for v4.1 boards - + Write to TX @@ -8146,146 +7077,146 @@ m2560 for v4.1 boards - + Write firmware to TX - + Current profile - + Open Abrir - + Write Models and Settings to TX - + Write Models and Settings in %1 to TX - + Choose file to load Models and Settings from - - - - - - + + + + + + Warning Aviso - + %1 is not a known firmware - + Burn anyway ! - + Unable to find file %1! Impossível encontrar o ficheiro %1! - - - + + + Error opening file %1: %2. - - - + + + Invalid binary Models and Settings File %1, Proceed anyway ? - + Error reading file %1: %2. - + Open Image to load - + Images (%1) - + Wrong radio calibration data in profile, Settings not patched - + Wrong radio setting data in profile, Settings not patched - - + + Cannot write file %1: %2. - + Error writing file %1: %2. - - - - - - - - - - + + + + + + + + + + Error Erro - - + + Cannot load %1. - + Cannot save customized firmware - + Custom image not found - + No firmware selected @@ -8323,571 +7254,483 @@ m2560 for v4.1 boards - - + + No name - Count Up - Contagem progressiva - - - Count Down - Contagem regressiva - - - %1:%2, - %1:%2, - - - : %1 Channels, %2msec Delay - :%1 Canais, Atraso de %3 mseg {1 ?} {2m?} - - - Rudder - Leme - - - Elevator - Elevador - - - Throttle - Acelerador - - - Aileron - Aileron - - - Extra Fine - Extra-fino - - - Fine - Fino - - - Medium - Médio - - - Coarse - Aberto - - - Exponential - Exponencial - - - + General Model Settings - - - + + + Name Nome - - + + EEprom Size - - + + Timer1 - - + + Timer2 - - + + Protocol Protocolo - - + + Pulse Polarity Polaridade - - + + Throttle Trim - - - - + + + + Enabled Activo - - - - + + + + Disabled Inactivo - - + + Throttle Expo Exponencial do Acelerador - - + + Trim Increment - - + + Center Beep Som ao Centrar - - + + Fades - - + + Trims Ajustes - - - - - - - - - - + + + + + + + + Switch Interruptor - - + + IN - - + + OUT - - + + Gvars - - + + Rot. Enc. - + Limits Limites - - - - - - - + + + + + + + Offset - - - - - + + + + + Min Min - - - - - + + + + + Max Max - - - + + + Invert Inverter - - - - - - + + + + + CH - - + + INV INV - - + + NOR NOR - + Global Variables - - + + GV - + Expo/Dr Settings - - + + Weight Peso - - - Expo + + Logical Switches - - - - + + + LS + + + + + Switch Assignment + + + + + + + DISABLED - - - - - - + + Curve Curva - + Mixers - - + + noTrim - - - FMTrim - - - - - - Diff - - - - - + + Delay(u%1:d%2) Atraso(u%1:d%2) - - + + Slow(u%1:d%2) Lento(u%1:d%2) - - + + Warn - + Curves Curvas - + 5 Points Curves - - - - + + + + pt %1 pt %1 - + 9 Points Curves - - Custom Switches - - - - - - CS - - - - - + + Function - - + + Param - - + + Enable - + CF - + Telemetry Settings - - + + Analog - - + + Unit - - + + Scale - - - - + + + + A%1 - - + + Alarm 1 - - + + Alarm 2 - - - - + + + + Type - - - - + + + + Condition - - - - - - + + + + Value - + Flight modes Settings - - - - + + + + Flight mode name - - - - - - - - - - + + + + + + + + + + FM - - - + + + Flight modes - - - + + + Flight mode - - Custom Functions - - - - - + + Repeat - - Safety Switches - - - - - + + RSSI Alarm - - + + Telemetry Bars - - + + Bar Number - - + + Source Fonte - - + + Custom Telemetry View - : %1 Channels, %2usec Delay - :%1 Canais, Atraso de %3 mseg {1 ?} {2m?} {1 ?} {2u?} - - - + Print Document Imprimir Documento - + Select PDF output file @@ -8900,39 +7743,37 @@ m2560 for v4.1 boards Dialogo - + People who have contributed to this project - + Coders - - 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 - + Thank you all !!! - + + Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe) + + + + Contributors - + OpenTX Release Notes @@ -8940,140 +7781,101 @@ which was the staring point for OpenTX Companion. customizeSplashDialog - - Customize Splash + + Transmitter Splash Screen Editor - - Save Image + + + Invert + Inverter + + + + + Load FW - - Invert Color + + + Load Pict - - Load Firmware + + + Load Profile - - Load Image + + + Save - + + Open Splash Library - + + + + ... - - Save Firmware - Save To Hex - - - - - <!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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<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> - - - - - - - Select an original firmware file - - - - + Open Abrir - - Select an image to customize your splash <br />or save actual firmware splash - - - - - - - + + + + + + Error Erro - + Could not find bitmap to replace in file - + Open Image to load - + Images (%1) - - + + Cannot load %1. - - - Save your custimized firmware + + + Could not store image in firmware file %1 - - - Write to file + + The image file %1 could not be stored - - - Error reading file %1 - Erro ao ler o ficheiro %1! {1?} - - - - Firmware correctly saved. - - - - - Firmware not saved. - - - - - PNG images (*.png);; - - - - - donatorsDialog - - List of Contributors - Lista de Contribuidores - downloadDialog @@ -9092,10 +7894,6 @@ p, li { white-space: pre-wrap; } Companion - - companion9x - companion9x - Download failed: %1. @@ -9194,6 +7992,381 @@ p, li { white-space: pre-wrap; } + + fwPreferencesDialog + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox + + + + + Set language of voice. +May be different from firmware language + + + + + SD Structure path + + + + + Processor ID + + + + + Downloads and Profiles + + + + + Default Stick Mode + Modo do Rádio por Defeito + + + + Channel Order + + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + + + + + 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) + + + + Options + + + + + Channel order + +This is used by the templated to determine which channel goes to what number output. + + + + + Open Folder + + + + + Offer to write FW to Tx after download + + + + + Save Profile + + + + + Menu Language + + + + + Voice Language + + + + + Firmware Type + + + + + Append version number to FW file name + + + + + Download Voice + + + + + FwInfo + + + + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + + Profile + + + + + Open Image + + + + + Splash Screen + + + + + Clear Image + + + + + Download FW + + + + + Check for updates + + + + + Last downloaded release: %1 + + + + + The selected firmware has never been downloaded by Companion. + + + + + The selected firmware cannot be downloaded by Companion. + + + + + Select the folder replicating your SD structure + + + + + Profile name is empty, profile slot %1 will be deleted.<br>Are you sure ? + + + + + Open Image to load + + + + + Images (%1) + + + + + Error + Erro + + + + Cannot load %1. + + + joystickDialog @@ -9290,10 +8463,6 @@ p, li { white-space: pre-wrap; } P2 P2 - - P3 - P3 - @@ -9479,17 +8648,17 @@ Press cancel to abort joystick calibration - + Select your log file - + Available fields - + The selected logfile contains %1 invalid lines out of %2 total lines @@ -9497,7 +8666,7 @@ Press cancel to abort joystick calibration mdiChild - + Simulate Tx @@ -9942,54 +9111,41 @@ Press cancel to abort joystick calibration preferencesDialog + Preferences Preferências - - Language (requires restart) - Língua (necessita uma reinicialização) - - - + Recent History Size - - + + 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. - companion9x - companion9x - - - - Show Splash Screen - - - - + Mode selection: Mode 1: @@ -10012,382 +9168,534 @@ 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 - + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + 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 - + + Remember simulator switches + + + + + 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox - + 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 - + + Show Splash At Start + + + + 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 - + 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. @@ -10420,648 +9728,421 @@ May be different from firmware language Configurar para: - Count Up - Contagem progressiva - - - Count Down - Contagem regressiva - - - %1:%2, - %1:%2, - - - : %1 Channels, %3msec Delay - :%1 Canais, Atraso de %3 mseg - - - <a name=1></a><h1>ER9x Model: %1</h1><br> - <a name=1></a><h1>ER9x Modelo: %1</h1><br> - - - <h2>General Model Settings</h2><br> - <h2>Parametros Gerais do Modelo</h2><br> - - - - - - + + + + Name Nome - Timer - Temporizador - - - : %1 Channels, %2msec Delay - :%1 Canais, Atraso de %3 mseg {1 ?} {2m?} - - - Rudder - Leme - - - Elevator - Elevador - - - Throttle - Acelerador - - - Aileron - Aileron - - - Extra Fine - Extra-fino - - - Fine - Fino - - - Medium - Médio - - - Coarse - Aberto - - - Exponential - Exponencial - - - + printed on: %1 - + General Model Settings - + EEprom Size - + Timer1 - + Timer2 - + Protocol Protocolo - + Pulse Polarity Polaridade + - - + Enabled Activo + - Disabled Inactivo - + Throttle Trim Ajuste do Acelerador - + Throttle Expo Exponencial do Acelerador - + Fades - + Trims Ajustes - Trim Switch - Interruptor para instaTrim - - - + Trim Increment Incremento do Ajuste - + Center Beep Som ao Centrar - <h2>Expo/Dr Settings</h2> - <h2>Parâmetros de Exponencial/Dual Rate</h2> - - - Switch 1: - Interruptor 1: - - - Switch 2: - Interruptor 2: - - - Expo Left - Exponencial à Esquerda - - - D/R Left - D/R à Esquerda - - - D/R Right - D/R à Direita - - - Expo Right - Exponencial à Direita - - - High - Alto - - - Mid - Meio - - - Low - Baixo - - - <h2>Mixers</h2><br> - <h2>Misturas</h2><br> - - - %1% - <b>CH%1</b> - - - +%1% - +%1% - - - Switch( - Interruptor( - - - noTrim - semAjuste - - - Offset(%1%) - Offset(%1%) - - - Curve(%1) - Curva(%1) - - - + Delay(u%1:d%2) Atraso(u%1:d%2) - + Slow(u%1:d%2) Lento(u%1:d%2) - Warn(%1) - Aviso(%1) - - - <h2>Limits</h2> - <h2>Limites</h2> - - - CH%1 - CH%1 - - - <h2>Curves</h2> - <h2>Curvas</h2> - - - 5-point Curves - Curvas de 5 pontos - - - - - + pt %1 pt %1 - Curve %1 - Curva %1 - - - 9-point Curves - Curvas de 9 pontos - - - <h2>Custom Switches</h2> - <h2>Interruptores Customizaveis</h2> - - - + Source Fonte - - - - - + + + + + Offset Compensação - : %1 Channels, %2usec Delay - :%1 Canais, Atraso de %3 mseg {1 ?} {2m?} {1 ?} {2u?} - - - + Gvars - + Rot.Enc. - + Flight mode name - - - - + + + + FM - - + + Flight modes - - + + Flight mode - - - CS - - - - + Function Função - SW%1 - SW%1 - - - - - - - + + + + Switch Interruptor - + IN - + OUT - + Expo/Dr Settings - + Weight Peso - - - - - Expo - - - - - + + DISABLED - - + + - - - - Curve Curva - + Mixers - - - - - + + + + CH - + noTrim - - FMTrim - - - - - Diff - - - - + Warn - + Limits Limites - - - - + + + + Min Min - - - - + + + + Max Max - - - + + + Invert Inverter - - - + + + INV INV - - - + + + NOR NOR - + Curves Curvas - - 5 Points Curves - - - - - 9 Points Curves - - - - - Custom Switches - - - - + Global Variables - + GV - - Safety Switches - - - - - - - - + + + + Value - - Function Switches - - - - + Parameter - + Repeat - + ODF files (*.odt);;PDF Files(*.pdf);;HTML-Files (*.htm *.html);;All Files (*) - + Telemetry Settings - - + + Logical Switches + + + + + + LS + + + + + Switch Assignments + + + + + Alarm 1 - - + + Alarm 2 - + Analog - + Unit - + Scale - - - - + + + + Type - - - - + + + + Condition - + A%1 - + RSSI Alarm - + Frsky serial protocol - + System of units - + Propeller blades - + Telemetry Bars - + Bar Number - - + + Custom Telemetry View - + Flight modes Settings - - CF - - - - + Print Document Imprimir Documento - + Select PDF output file @@ -11069,22 +10150,17 @@ May be different from firmware language simulatorDialog - Companion9x Simulator - ER9x Simulator - Simulador ER9x - - - + P1 P1 - + P2 P2 - + P3 P3 @@ -11110,33 +10186,33 @@ May be different from firmware language - + Hold X Manter X - + Fix X Fixar X - + Fix Y Fixar Y - + Hold Y Manter Y - - + + TextLabel @@ -11156,53 +10232,37 @@ May be different from firmware language ID0 - + ID1 ID1 - + ID2 ID2 - SW1 - SW1 - - - SW2 - SW2 - - - SW3 - SW3 - - - + BEEP BEEP - - SW4 - SW4 - - + Right Double Click to Reset - - - + + + 0 % - + 9x Simulator @@ -11211,312 +10271,271 @@ May be different from firmware language Outputs - - SW5 - SW5 - - - SW6 - SW6 - - - SW7 - SW7 - - - SW8 - SW8 - - - SW9 - SW9 - - - SWA - SW10 - SW10 - - - SWB - SW11 - SW11 - - - SWC - SW12 - SW12 - - - - CSK - SWK - - - - - CS1 - - Companion Simulator + + + LS1 + + - CS2 + LS2 - CS3 + LS3 - CS4 + LS4 - CS5 + LS5 - CS6 + LS6 - CS7 + LS7 - CS8 + LS8 - CS9 + LS9 - CSA + LSA - CSB + LSB - CSC + LSC - CSD + LSD - CSE + LSE - CSF + LSF - CSG + LSG - CSH + LSH - CSI + LSI - - CSJ + + LSJ - - CSL + + LSK - - CSM + + LSL - - CSN + + LSM - - CSO + + LSN - - CSP + + LSO - - CSQ + + LSP - - CSR + + LSQ - - CSS + + LSR - - CST + + LSS - - CSU + + LST - - CSV + + LSU - - CSW - SWW + + LSV - + + LSW + + + + 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 - - %1 - %1 - @@ -11557,43 +10576,39 @@ May be different from firmware language splashLibrary - + ... - + Splash Library - page %1 of %2 - + Warning Aviso - + Invalid image in library %1 - + Information - + No valid image found in library, check your settings xsimulatorDialog - - Companion9x Simulator - Simulador ER9x - @@ -11619,10 +10634,6 @@ May be different from firmware language SB - - P2 - P2 - @@ -11663,14 +10674,6 @@ May be different from firmware language Hold Y Manter Y - - P1 - P1 - - - P3 - P3 - @@ -11700,58 +10703,6 @@ May be different from firmware language Outputs - - SW1 - SW1 - - - SW2 - SW2 - - - SW3 - SW3 - - - SW4 - SW4 - - - SW5 - SW5 - - - SW6 - SW6 - - - BEEP - BEEP - - - SW7 - SW7 - - - SW8 - SW8 - - - SW9 - SW9 - - - SWA - SW10 - - - SWB - SW11 - - - SWC - SW12 - CH1 @@ -11798,10 +10749,10 @@ May be different from firmware language - - - - + + + + @@ -11842,12 +10793,12 @@ May be different from firmware language CH4 - + CH12 CH12 - + CH5 CH5 @@ -11888,162 +10839,162 @@ May be different from firmware language - CSK + LSK - CSC + LSC - CSD + LSD - CS7 + LS7 - CSL + LSL - CSB + LSB - CS1 + LS1 - CSH + LSH - CSG + LSG - CSE + LSE - CSF + LSF - CS8 + LS8 - CS9 + LS9 - CSA + LSA - CSM + LSM - CSJ + LSJ - CSI + LSI - CS4 + LS4 - CS5 + LS5 - CS2 + LS2 - CS3 + LS3 - CS6 + LS6 - CSN + LSN - CSO + LSO - CSP + LSP - CSQ + LSQ - CSR + LSR - CSS + LSS - CST + LST - CSU + LSU - CSV + LSV - CSW + LSW @@ -12063,22 +11014,22 @@ May be different from firmware language - + Firmware %1 error: %2 - + - Flight mode: %1(%2) - + Simulating Tx (%1) - + Simulating diff --git a/companion/src/translations/companion_ru.ts b/companion/src/translations/companion_ru.ts index 92c12ee9b..b727f8f0f 100644 --- a/companion/src/translations/companion_ru.ts +++ b/companion/src/translations/companion_ru.ts @@ -2,138 +2,586 @@ - ExpoDialog + Channels - Dialog - Диалог - - - - Expo - - - - - Weight - Вес - - - + Name - - - - GV + + Offset - - - Phase used by the expo. + + Min + Мин + + + + Max + Макс + + + + Invert + Инверт + + + + Center - - Flight modes + + Sym - - 0 + + Channel %1 - - 1 + + --- - - 2 + + INV + + + + + CurveGroup + + + Diff - - 3 + + Expo - - 4 + + Func - - 5 + + Curve + Кривая + + + + Curves + + + Form - - 6 + + Standard - - 7 + + Custom - - 8 + + Lines - + + Smooth + + + + + Curve type + + + + + Curve name + + + + + Curve %1 + Кривая %1 + + + + %1 points + + + + + Are you sure you want to reset curve %1 ? + + + + + Editing curve %1 + + + + + Not enough free points in EEPROM to store the curve. + + + + + CustomFunctionsPanel + + Switch - - Switch used by the expo. -If blank then the expo is considered to be "ON" all the time. + + Action - - Curve/Exponential + + Parameters - + + Enable + + + + + CF%1 + + + + + ON + + + + + Error + Ошибка + + + + Unable to find sound file %1! + + + + + &Delete + Удалить + + + + Delete + Удалить + + + + &Copy + Копировать + + + + Ctrl+C + + + + + &Cut + Вырезать + + + + Ctrl+X + + + + + &Paste + Вставить + + + + Ctrl+V + + + + + Dialog + + + Dialog + Диалог + + + + Curve type + + + + + Coefficient + + + + + Both + + + + + x>0 + + + + + x<0 + + + + + Y at X=0 + + + + + Side + + + + + Y at X=-100 + + + + + Y at X=100 + + + + + Linear + + + + + Single Expo + + + + + Symmetrical f(x)=-f(-x) + + + + + Symmetrical f(x)=f(-x) + + + + + ExpoDialog + + + Weight + Вес + + + + + GV + + + + + The source for the mixer + Источник для микшера + + + + Input name + + + + + Phase used by the input. + + + + + Flight modes + + + + + 0 + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + Switch + + + + + Switch used by the input. +If blank then the input is considered to be "ON" all the time. + + + + + The curve used by the input + + + + + Source + Источник + + + + Line name + + + + Stick Side - + + <!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> + Задержка и замедление. +Эти значение управляют скоростью и задержкой на выходе микшера. +Если "Задержка" не равна нулю, то срабатывание микшера происходит через указанное число секунд. +Если "Замедление" не равно нулю, то это значение означает число секунд для перемещения от -100 до +100. + + + + Scale + + + + + Include Trim + Исп. трим + + + + No + + + + + Yes + + + + Curve Кривая - - The curve used by the expo - - - - + NEG - + POS - + ALL - - DEST -> %1 + + Edit %1 + + + + + Rud + + + + + Ele + + + + + Thr + + + + + Ail + + + + + FlightMode + + + Form + + + + + Fade In + + + + + Fade Out + + + + + Name + + + + + Switch + + + + + trim1 + + + + + trim2 + + + + + trim4 + + + + + trim3 + + + + + Rud + + + + + Ele + + + + + Thr + + + + + Ail + + + + + Rotary Encoder %1 + + + + + GVAR%1 + + + + + FlightModes + + + Flight Mode %1 + + + + + (%1) + + + + + (default) @@ -157,13 +605,13 @@ These will be relevant for all models in the same EEPROM. Настройка - + Contrast Конраст - - + + <!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; } @@ -174,12 +622,12 @@ p, li { white-space: pre-wrap; } Значения в пределах 20-45 - + Battery Warning Напряж. при разряде - + Battery warning voltage. This is the threashhold where the battery warning sounds. @@ -190,83 +638,62 @@ Acceptable values are 5v..10v Диапазон 5В..10В - + v В - + Battery Calibration Калибровка батареи - + Battery calibration: This value will be added to the measured battery voltage. Use this value to calibrate the meter with an external meter. Калибровка батареи: Это значение добавляется к измеренному напряжению. - Backlight Switch - Тумблер подсветки - - - + This is the switch selectrion for turning on the backlight (if installed). Включение подсветки (при ее наличии). - Backlight Auto On/OFF after - Подсветка вкл/выкл после - - - + If this value is not 0, any keypress will turn on the backlight and turn it off after the specified number of seconds. Если не равно нулю, то любое нажатие кнопок будет включать подсветку и выключать ее через указанное кол-во секунд. - - + + sec сек - + Inactivity Timer Таймер активности - + If not zero will sound beeps if the transmitter has been left without inputs for the specified number of minutes. Если не равно нулю, начнет бипать при отсутсвии активности через указанное кол-во минут. - + min мин - - 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. - - - Реверсировать канал газа (а также триммеры и предупреждения) - - - + Timer Beeps Звук таймера - + <!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; } @@ -275,22 +702,22 @@ p, li { white-space: pre-wrap; } Бип каждую минуту - + Every Minute Кажд. минуту - + Beeps at 30, 15, 10, and down from5 seconds Бипать за 30, 15, 10, и 5 секунд до конца. - + Count Down to Zero Достиж. нуля - + <!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; } @@ -299,258 +726,247 @@ p, li { white-space: pre-wrap; } Моргать подсветкой при бипах таймера - + Flash on beep Моргать - + Alarm Warning Предупр. "тишина" - - + + Quiet тихо - - + + No Keys без кнопок - - + + Normal нормально - - + + Long долго - + Input Filter Входной фильтр - + Single ??? Одиночный - + Oversample Передискретизация - + Filter Фильтр - + Owner Name Имя владельца - + - - - + + Off - - Switches Up - - - - - Switches Down - - - - + Trainer - - + + PPM 1 + - - - + + chn1 + - - - + + chn2 + - - - + + chn3 + - - - + + chn4 - + Mode - + Telemetry NO DATA Alarm - + Show Owner Name on Splash - + Sound Mode - + Beeper - + Speaker Pitch (spkr only) - + Only Alarms - - + + All - + Pot Scrolling Enable - + Bandgap Measuring Enable - + THR - + RUD - + ELE - + AIL - + GEA - + ID0 - + ID1 - + ID2 - + Beeper Length - - + + X-Short - - + + Short - - + + X-Long - + Haptic Mode - + Alarms Only - + Haptic Length - + GPS Coordinates @@ -565,122 +981,122 @@ p, li { white-space: pre-wrap; } - + Speaker - + BeeperVoice - + SpeakerVoice - + hh° (N/S) mm' ss''.dd - + NMEA - + Timeshift from UTC - + LCD Display Type - + Standard - + Optrex - + Speaker Volume - + Haptic Strength - + BackLight Brightness - + RotEnc Navigation - + BackLight Auto OFF after - + BackLight Switch - + BackLight On Stick Move - + BackLight Invert - + Country Code - + Europe - + Japan - + America - + FrSky Internal Alarm - + StickScroll - + PPMSim @@ -690,47 +1106,47 @@ p, li { white-space: pre-wrap; } - + CrossTrim - + Beep volume - + Wav volume - + Vario volume - + Background volume - + Measurement Units - + Metric - + Imperial - + FAI Mode @@ -740,273 +1156,409 @@ p, li { white-space: pre-wrap; } - + 4800 Baud - + 9600 Baud - + 14400 Baud - + 19200 Baud - + 38400 Baud - + 57600 Baud - + 76800 Baud - + 115200 Baud - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. - + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + Readonly Unlock - + SC - + SE - + SA - + SF - + SH - + SD - + SB - + SG - + Input - + Weight Вес - + Switch + - - - + + += (Sum) + - - - + + := (Replace) - - + + PPM 2 - - + + PPM 3 - - + + PPM 4 - + Telemetry - + RSSI Alarm 1 - - + + ---- - - + + Yellow - - + + Orange - - + + Red - + RSSI Alarm 2 - + NO DATA Alarm - + POT 4 - - + + Negative span - - + + Mid value - - + + Positive span - + STICK 1 - + STICK 2 - + Current - + + + Pot (normal) + + + + + + Multipos Switch + + + + + S1 Type + + + + + S2 Type + + + + STICK 3 - + STICK 4 - + POT 1 - + POT 2 - + POT 3 - + Battery - + PPM Multiplier PPM множитель - - Throttle Startup Warning - Предупр. "газ не в нуле" - - - - - - - - + + + + + <!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; } @@ -1025,30 +1577,27 @@ p, li { white-space: pre-wrap; } "Тишина" - Предупреждение о "тихом" режиме (без звука) - - Switch Startup Warning - Предупр. "тумблеры" - - - + Memory Startup Warning Предупр. "память" - + Beeper Mode Режим бипов - + + + - - - - - - + + + + + + Beeper volume 0 - Quiet. No beeps at all. @@ -1065,12 +1614,12 @@ p, li { white-space: pre-wrap; } 4 - Очень громкая. - + Channel Order (For Templates) Порядок каналов - + Channel order This is used by the templated to determine which channel goes to what number output. @@ -1079,12 +1628,12 @@ This is used by the templated to determine which channel goes to what number out Используется в шаблоне порядка следования каналов. - + Stick Mode Режим стиков - + Mode selection: Mode 1: @@ -1108,1116 +1657,1428 @@ 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) - + Show Splash Screen on Startup Показывать заставку - - + + Show splash screen on startup Показывать заставку при включении - + Calibration Калибровка. - ANALOG 7 - АНАЛОГ 7 - - - ANALOG 6 - АНАЛОГ 6 - - - ANALOG 5 - АНАЛОГ 5 - - - ANALOG 4 - АНАЛОГ 4 - - - ANALOG 3 - АНАЛОГ 3 - - - ANALOG 2 - АНАЛОГ 2 - - - ANALOG 1 - АНАЛОГ 1 - - - PPM In - Вход PPM - - - Negative - негатив - - - Mid - центр - - - Positive - позитив - - - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. Are you sure ? - - + + Warning Звук - + Wrong data in profile, radio calibration was not retrieved - + Wrong data in profile, hw related parameters were not retrieved - + Do you want to store calibration in %1 profile<br>overwriting existing calibration? - + Calibration and HW parameters saved. + + Heli + + + Form + + + + + Invert Elevator + + + + + Invert Aileron + + + + + Invert Collective + + + + + Invert + Инверт + + + + Off + + + + + 120 + + + + + 120X + + + + + 140 + + + + + 90 + + + + + Collective + + + + + Swash Type + + + + + Swash Ring + + + + + InputsPanel + + + + Move Up + + + + + + Ctrl+Up + + + + + + Move Down + + + + + + Ctrl+Down + + + + + Clear All Settings + + + + + Source(%1) + + + + + No Trim + + + + + Weight(%1) + + + + + Switch(%1) + + + + + Not enough available inputs! + + + + + Delete Selected Inputs? + + + + + &Add + Добавить + + + + Ctrl+A + + + + + &Edit + + + + + Enter + Ввод + + + + &Delete + Удалить + + + + Delete + Удалить + + + + &Copy + Копировать + + + + Ctrl+C + + + + + &Cut + Вырезать + + + + Ctrl+X + + + + + &Paste + Вставить + + + + Ctrl+V + + + + + Du&plicate + + + + + Ctrl+U + + + + + Clear Inputs? + + + + + Really clear all the inputs? + + + + + LogicalSwitchesPanel + + + Condition + + + + + V1 + + + + + V2 + + + + + AND + + + + + Duration + + + + + Delay + Задержка + + + + + LS%1 + + + + + &Delete + Удалить + + + + Delete + Удалить + + + + &Copy + Копировать + + + + Ctrl+C + + + + + &Cut + Вырезать + + + + Ctrl+X + + + + + &Paste + Вставить + + + + Ctrl+V + + + MainWindow - - - - + + + + File loaded Файл загружен - - - - - + + + + + Save As Сохранить как... - - + + No updates available at this time. - - - - - + + + + + Unable to check for updates. - + Executable (*.exe) - + Would you like to launch the installer? - EEPROM files (*.bin *.hex);;BIN files (*.bin);;HEX files (*.hex) - файлы EEPROM (*.bin *.hex);;файлы BIN (*.bin);;файлы HEX (*.hex) - - - + Open Открыть - - + + File saved Файл записан - Read EEPROM From Tx - Считать EEPROM из TX - - - Choose file to write to EEPROM memory - Выберите файл для записи в EEPROM - - - Write %1 to EEPROM memory? - Прошить %1 в передатчик? - - - Choose file to write to flash memory - Выберите файл для записи в прошивку - - - Read EEPROM memory to File - Считать EEPROM в файл - - - Read Flash to File - Считать прошивку в файл - - - + Copyright - If you've found this program and/or the er9x firmware useful please support by - If you've found this program and/or the Firmware useful please support by - Если эта программа и/или прошивка оказалась полезной, вы можете - - - - donating - поддержать ее - - - About eePe - О 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 - - - - + Display previous warning again at startup ? - + New release available - - - - - - - - - - - - - + + + + + + + + + + + + + Error Ошибка - - - - - + + + + + Error opening file %1: %2. - + Compilation server termporary failure, try later - + Display previous message again at startup ? - - - + + + + Companion - Models and Settings Editor - %1 - profile %2 - - - - + + + + + Companion - Models and Settings Editor - %1 - + + A new release of Companion is available please check the OpenTX website! + + + + Firmware does not longer fit in the Tx, due to selected firmware options - + Compilation server temporary failure, try later - - + + Compilation server too busy, try later - - + + Unknown server failure, try later - + Firmware does not fit in the Tx, due to selected firmware options - - + + 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 ? - + + The selected language will be used the next time you start Companion. + + + + + + + OK + + + + + The new theme will be loaded the next time you start Companion. + + + + + The icon size will be used the next time you start Companion. + + + + 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 + + OpenTX Home Page: <a href='%1'>%1</a> - + + The OpenTX Companion project was originally forked from <a href='%2'>eePe</a> + + + + + If you've found this program useful, please support by <a href='%1'>donating</a> + + + + + Version %1, %3 + + + + &loadBackup... - + Load backup from file - + Lo&gs - + Ctrl+G - + Open log file - + + &Downloads and Profiles... + + + + + Firmware and voice file downloads as well as profile definition. + + + + Contributors &List... - + 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 - &Write EEPROM To Tx - Записать EEPROM в TX - - - + Ctrl+Alt+W - Write EEPROM to transmitter - Записать EEPROM в передатчик - - - &Read EEPROM From Tx - Считать EEPROM из TX - - - + Ctrl+Alt+R - Read EEPROM from transmitter - Считать EEPROM из передатчика - - - Write Flash memory - Загрузить прошивку - - - Write flash memory to transmitter - Загрузить прошивку в передатчик - - - Write EEPROM memory from file - Загрузить EEPROM из файла - - - Write EEPROM memory from file to transmitter - Загрузить EEPROM из файла в передатчик - - - Read EEPROM memory to file - Считать EEPROM в файл - - - Read EEPROM memory from transmitter to file - Считать EEPROM из передатчика в файл - - - Read Flash memory - Считать прошивку - - - Read flash memory to transmitter - Считать прошивку из передатчика - - - - &Configure... - Настройка - - - Configure burning software - Настроить программатор - - - + &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 - + + Set Menu Language + + + + &Read/Write - + Write - + Unable to find file %1! Невозможно найти файл %1! - + Error reading file %1: %2. Ошибка при считывании файла %1: %2. - &Contributors - Авторы - - - - Switch layout Left/Right - - - - + &File Файл - - Switch layout direction - Зеркало - - - + 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 - + + &Old Preferences Dialog... + + + + + Used the old Preferences Dialog + + + + + &Application Preferences... + + + + + Edit application preferences + + + + Check for new version of Companion - + Show Companion contributors list - + Show Companion changelog - + + Configure transmitter start screen... + + + + &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 connection software... + + + + + Classic + + + + + The multicolor classical Companion icon theme + + + + + A monochrome black icon theme + + + + + A monochrome white icon theme + + + + + A monochrome blue icon theme + + + + + Small + + + + + Use small toolbar icons + + + + + Use normal size toolbar icons + + + + + Normal + нормально + + + + Use big toolbar icons + + + + + Big + + + + + Use huge toolbar icons + + + + + Huge + + + + + System default language + + + + + Use system default language in menus + + + + + Czech + + + + + Use Czech in menus + + + + + German + + + + + Use German in menus + + + + + English + + + + + Use English in menus + + + + + French + + + + + Use French in menus + + + + + Italian + + + + + Use Italian in menus + + + + + Hebrew + + + + + Use Hebrew in menus + + + + + Polish + + + + + Use Polish in menus + + + + + Portuguese + + + + + Use Portuguese in menus + + + + + Swedish + + + + + Use Swedish in menus + + + + + Russian + + + + + Use Russian in menus + + + + + Manuals and other Documents + + + + + Open the OpenTX document page in a web browser + + + + + Firmware Profiles - + + Set Icon Theme + + + + + Set Icon Size + + + + &Edit Правка - - + + &Settings + + + + + Invalid Models and Settings File %1 - + Invalid binary Models and Settings File %1 - &Burn - Запись - - - - &Window - Окна - - - + &Help Помощь - + File Файл - + Edit Правка - Burn - Запись - - - + Help - + Ready Готово @@ -2225,88 +3086,52 @@ Write anyway ? MdiChild - General Settings - Основные настройки - - - Delete Selected Models? - Удалить выбранные модели? - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + Error Ошибка - Unable set data! - Невозможно установить данные! - - - Unable set model! - Невозможно установить модель! - - - + Editing model %1: Редактирование модели %1: - Unable to read settings! - Невозможно считать настройки! - - - - + + Unable to find file %1! Невозможно найти файл %1! - Cannot read file %1: -%2. - Не удается считать файл %1: -%2. - - - Error reading file %1! - Ошибка при считывании файла %1! - - - - + + Error reading file %1: %2. Ошибка при считывании файла %1: %2. - Error loading file %1: -%2. - File wrong size - %1 - Неверный размер файла - %1 - - - - - - + + + + Error opening file %1: %2. @@ -2317,330 +3142,258 @@ Write anyway ? - + Do you want to use model wizard? - - - + + + Companion - + Ask this question again ? - - + + Invalid EEPROM File %1 - + Invalid binary EEPROM File %1 - - - - + + + + Save As Сохранить как... - - - - + + + + Cannot write file %1: %2. Не удается записать файл %1: %2. - + Backup is impossible - + The backup dir set in preferences does not exist - - - + + + Taranis radio not found - - - + + + Impossible to identify the radio on your system, please verify the eeprom disk is connected. - - - + + + Backup EEPROM From Tx - + Cannot check eeprom compatibility! Continue anyway? - - + + Warning Звук - + Firmware in radio is of a different family of eeprom written, check file and preferences! - + Firmware in flash is outdated, please upgrade! - + Write EEPROM To Tx - + Open Открыть - + Invalid binary backup File %1 - + %1 has been modified. Do you want to save your changes? - - + + Error writing file %1: %2. Ошибка при записи файла %1: %2. - '%1' has been modified. -Do you want to save your changes? - '%1' был изменен. -Вы хотите сохранить изменения? - - - Write %1 to EEPROM memory? - Burn %1 to transmitter? - Прошить %1 в передатчик? - - - + Cannot write temporary file! Не удается записать временный файл! - - &Edit - Править - - - &Delete - Удалить - - - Delete - Удалить - - - &Copy - Копировать - - - &Cut - Вырезать - - - &Paste - Вставить - - - D&uplicate - Дублировать - - - &Simulate - Симуляция - - - &Write To Tx - Записать в TX - MixerDialog - + Dialog ??? Диалог - + Source Источник - - - - + + + + The source for the mixer Источник для микшера - + Weight Вес - - Fix Offset - - - - - - + + + GV - + Switch used by the mix. If blank then the mix is considered to be "ON" all the time. The value of the mixer is multiplied by this value and divided by 100. Значение микшера умножается на это значение и делится на 100 - - - - + Offset Смещен. - <!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;">This value is added to the <span style=" font-weight:600;">input </span>of the mixer.</p></body></html> - Это значение добавляется к микшеру. - - - + Include Trim Исп. трим - If checked - will add the trim from the source (if available) - Если отмечено - использует триммеры из источника (при их наличии) - - - + Curve Кривая - + The curve used by the mix Кривая используемая микшером - + Switch Тумблер - + Yes - + No - + Warning Звук - + Name - - Curve/Differential - - - - + Mixer warning. Setting this value will cause a beep to be emmitted when this value is active. Индикация включения. Когда микшер активируется звучит выбранный сигнал. - + OFF ВЫКЛ - + 1 Beep 1 бип - + 2 Beep 2 Beeo 2 бипа - + 3 Beep 3 бипа - + Multiplex Режим - + Multiplexer This determines how mixer values are added. @@ -2657,100 +3410,95 @@ This determines how mixer values are added. "R" - значение текущего микшера заменяет предыдущее значение на этом же канале. - + ADD ДОБАВИТЬ - + MULTIPLY УМНОЖИТЬ - + REPLACE ЗАМЕНИТЬ - + Flight modes - + Include DR/Expo - + 0 - + 1 - + 2 - + 3 - + 4 - + 5 - + 6 - + 7 - + 8 - - Enable FM Trim - - - - + Delay Задержка - + Slow Замедлен. - + Up Верх - - - - + + + + <!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; } @@ -2768,2786 +3516,553 @@ p, li { white-space: pre-wrap; } Если "Замедление" не равно нулю, то это значение означает число секунд для перемещения от -100 до +100. - + Down Низ - + DEST -> X%1 - + DEST -> CH%1%2 ??? - - - FM Trim Value - - - - + Rud - + Ele - + Thr - + Ail + + MixesPanel + + + + Move Up + + + + + + Ctrl+Up + + + + + + Move Down + + + + + + Ctrl+Down + + + + + Clear Mixes + + + + + + + X%1 + + + + + + + CH%1%2 + + + + + Weight(%1) + + + + + Switch(%1) + + + + + No Trim + + + + + No DR/Expo + + + + + Offset(%1) + + + + + Delay(u%1:d%2) + Задержка(u%1:d%2) + + + + Slow(u%1:d%2) + Задержка(u%1:d%2) + + + + Warn(%1) + Пред(%1) + + + + Not enough available mixers! + + + + + Delete Selected Mixes? + Удалить выбранные микшеры? + + + + &Add + Добавить + + + + Ctrl+A + + + + + &Edit + + + + + Enter + Ввод + + + + &Delete + Удалить + + + + Delete + Удалить + + + + &Copy + Копировать + + + + Ctrl+C + + + + + &Cut + Вырезать + + + + Ctrl+X + + + + + &Paste + Вставить + + + + Ctrl+V + + + + + Du&plicate + + + + + Ctrl+U + + + + + Clear Mixes? + + + + + Really clear all the mixes? + + + ModelEdit - + Dialog Диалог - + Setup Настройка - - Model Name - Название модели + + Heli + - Timer Mode - Режим таймера + + Inputs + - Timer Direction - Направ. таймера + + Logical Switches + - - - Count Down - Обратный отсчет + + Switch Assignment + - - - Count Up - Прямой отсчет - - - Timer Value - Значен. таймера - - - - - mm:ss - - - - - Trim Increment - Изм. триммеров - - - - Exponential - экспонента - - - - Extra Fine - очень точно - - - - Fine - точно - - - - Medium - средне - - - - Coarse - грубо - - - - Throttle Trim - Газ трим - - - - Throttle Expo - Газ экспо - - - instaTrim Switch - инстаТрим - - - - Center beep - Бип в центре - - - - - - - - - - - - RUD - - - - - - - - - - - - - - - - ELE - - - - - - - - - THR - - - - - - - - - - - - - - AIL - - - - - P1 - - - - - P2 - - - - - P3 - - - - - Pulse Shift (polarity) - PPM модуляция - - - - - - Positive - Положительная - - - - - - Negative - Негативная - - - - - - Protocol - Протокол - - - - - + Channels Каналы - - - - - - - ch - ch - - - ppm Delay - PPM пауза - - - - - - usec - мсек - - - - Extended Limits - Расш. лимиты - - - - - Heli Setup - - - - - Swash Type - - - - - - Off - - - - - 120 - - - - - 120X - - - - - 140 - - - - - 90 - - - - - Collective - - - - - Swash Ring - - - - - Invert Elevator - - - - - Invert Aileron - - - - - Invert Collective - - - - Expo/Dr - Расходы/Экспо - - - Expo -Left - Expo -слева - - - D/R -Left - D/R -слева - - - D/R -Right - D/R -справа - - - Expo -Right - Expo -справа - - - Switch1 - Тумблер 1 - - - Switch2 - Тумблер 2 - - - Rudder - Руддер - - - Aileron - Элероны - - - Throttle - Газ - - - Elevator - Элеватор - - - + Mixes Микшеры - - Limits - Лимиты - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INV - - - - - - - Channel - Канал - - - - - - Offset - Смещение - - - - - - - - Min - Мин - - - - - - - - Max - Макс - - - - - - Invert - Инверт - - - + Curves Кривые - - Curve 1 - Кривая 1 - - - - Curve 2 - Кривая 2 - - - - Timer1 - - - - - Timer2 - - - - - - - PPM delay - - - - - Extended Trims - - - - - Throttle2Trig - - - - - - - PPM Frame Length - - - - - - - mSec - - - - - - - - - - - - - Fade In - - - - - - - - - - - - - Fade Out - - - - - - - - - - - - - trim2 - - - - - - - - - - - - - trim1 - - - - - - DSM Type - - - - - - LP4/LP5 - - - - - - DSM2only - - - - - - DSM2/DSMX - - - - - - RX Number - - - - - Disable Throttle Warning - - - - - Switch startup Warning - - - - - Instant Trim - - - - - - CH01 - - - - - - CH02 - - - - - - CH03 - - - - - - CH04 - - - - - - CH05 - - - - - - CH06 - - - - - - CH07 - - - - - - CH08 - - - - - - CH09 - - - - - - CH10 - - - - - - CH11 - - - - - - CH12 - - - - - - CH13 - - - - - - CH14 - - - - - - CH15 - - - - - - CH16 - - - - - REa - - - - - REb - - - - - 3POS - - - - - - Check - - - - - - - ON - - - - - - OFF - ВЫКЛ - - - - GEA - - - - - ID0 - - - - - ID1 - - - - - ID2 - - - - - - TriggerB - - - - - Model Voice - - - - - - - - - - - - - trim4 - - - - - - - - - - - - - trim3 - - - - - - - - - - - - - GVAR1 - - - - - - - - - - - - - GVAR2 - - - - - - - - - - - - - GVAR3 - - - - - - - - - - - - - GVAR4 - - - - - - - - - - - - - GVAR5 - - - - - - - - - - - - - Rotary encoder B - - - - - - - - - - - - - Rotary encoder A - - - - - - Sym - - - - - Curve 3 - Кривая 3 - - - - Curve 4 - Кривая 4 - - - - Curve 5 - Кривая 5 - - - - Curve 6 - Кривая 6 - - - - Curve 7 - Кривая 7 - - - - Curve 8 - Кривая 8 - - - - Curve 9 - Кривая 9 - - - - Curve 10 - Кривая 10 - - - - Curve 11 - Кривая 11 - - - - Curve 12 - Кривая 12 - - - - Curve 13 - Кривая 13 - - - - Curve 14 - Кривая 14 - - - - Curve 15 - Кривая 15 - - - - Curve 16 - Кривая 16 - - - - - Curve type - - - - - 3 points - - - - - 3 points custom - - - - - 5 points - - - - - 5 points custom - - - - - 9 points - - - - - 9 points custom - - - - - 17 points - - - - - 17 points custom - - - - - Clear All Curves - Clear All Mixes - - - - - - Duration - - - - - - Delay - Задержка - - - - Telemetry screen 3 - - - - - - Param - - - - - Telemetry screen 1 - - - - - - - Custom Screen Type - - - - - - - Nums - - - - - - - Bars - - - - - Telemetry screen 2 - - - - - Custom Functions - - - - + Telemetry - - Volt source - - - - - Current source - - - - - NONE - - - - - - - - A1 - - - - - - FAS - - - - - CEL - - - - - Alti - - - - - Alti+ - - - - - Vario - - - - - - Unit - - - - - - Raw (-) - - - - - - Max Value - - - - - RSSI - - - - - Alarm 1 - - - - - Serial Protocol - - - - - Units - - - - - None - - - - - FrSky Sensor Hub - - - - - Metric - - - - - ModelSetup - - - - - Model Image - - - - - - Persistent - - - - - - MinuteBeep - - - - - - CountDownBeep - - - - - SB - - - - - Throttle Source - - - - - SD - - - - - SA - - - - - SC - - - - - SG - - - - - SE - - - - - SF - - - - - RS - - - - - 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. - - - Реверсировать канал газа (а также триммеры и предупреждения) - - - - Master - - - - - Slave - - - - - Trainer Mode - - - - - Master/Trainer Port - - - - - - - Start - - - - - - Polarity - - - - - RF Module 1 - - - - - RF Module 2 - - - - - - (00:00:00) - - - - - Failsafe - - - - - External module - - - - - - Failsafe Mode - - - - - - Hold - - - - - - Custom - - - - - - No Pulses - - - - - Internal Module - - - - + Flight Modes - - Flight Mode 0 (Default) - - - - - - - - - - - - - Flight Mode Name - - - - - GVAR6 - - - - - GVAR7 - - - - - FM 1 - - - - - FM 2 - - - - - FM 3 - - - - - FM 4 - - - - - FM 5 - - - - - FM 6 - - - - - FM 7 - - - - - FM 8 - - - - - Sticks - - - - - Show channels names in mixes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- - - - - - - Center - - - - - Curve name - - - - - Curve Creator - - - - - Y at X=100 - - - - - Both - - - - - x>0 - - - - - x<0 - - - - - Linear - - - - - Single Expo - - - - - Symmetrical f(x)=-f(-x) - - - - - Symmetrical f(x)=f(-x) - - - - - Apply - - - - - Side - - - - - Y at X=-100 - - - - - Y at X=0 - - - - - Coefficient - - - - - CS9 - - - - - CSF - - - - - CSD - - - - - - AND - - - - - CS6 - - - - - CS1 - - - - - CS8 - - - - - CS7 - - - - - CSA - - - - - CSB - - - - - CSC - - - - - CS5 - - - - - CS3 - - - - - CS2 - - - - - CSE - - - - - CSG - - - - - CS4 - - - - - CST - - - - - CSM - - - - - CSP - - - - - CSH - - - - - CSO - - - - - CSN - - - - - CSQ - - - - - CSR - - - - - CSS - - - - - CSL - - - - - CSK - - - - - CSJ - - - - - CSI - - - - - CSU - - - - - CSV - - - - - CSW - - - - - Imperial - - - - - 2 - - - - - 3 - - - - - 4 - - - - - Blades - - - - - Sink Max - - - - - Climb Max - - - - - Sink Min - - - - - Climb Min - - - - - Display altitude in toolbar - - - - - - Volts (V) - - - - - - Amps (A) - - - - - - Speed (m/s or ft/s) - - - - - - Speed (km/h or miles/h) - - - - - - Meters (m or ft) - - - - - - Temp (°) - - - - - - Fuel (%) - - - - - - mAmps (mA) - - - - - - - Source - Источник - - - - - - Gauge - - - - - - - Gauge 1 - - - - - - - Gauge 2 - - - - - - - Gauge 3 - - - - - - - Gauge 4 - - - - - - Alarm 1 - - - - - - Enable - - - - - Altimetry / Vario - - - - - Vario source - - - - - Vario limits - - - - - Use GPS as altitude source - - - - - - - - - - ---- - - - - - - - - - - Yellow - - - - - - - - - - Orange - - - - - - - - - - Red - - - - - - - - < - - - - - - - - > - - - - - - - Alarm 2 - - - - - - Min Value - - - - - - - - A2 - - - - Switches - Триггеры - - - CSwitch1 - Триггер 1 - - - CSwitch2 - Триггер 2 - - - CSwitch3 - Триггер 3 - - - CSwitch4 - Триггер 4 - - - CSwitch5 - Триггер 5 - - - CSwitch6 - Триггер 6 - - - - - - - Function - Функция - - - - Custom switches - - - - - - V1 - - - - - - V2 - - - - CSwitch7 - Триггер 7 - - - CSwitch8 - Триггер 8 - - - CSwitch9 - Триггер 9 - - - CSwitchA - CSwitch10 - Триггер 10 - - - CSwitchB - CSwitch11 - Триггер 11 - - - CSwitchC - CSwitch12 - Триггер 12 - - - - Safety Switches - Защитные выкл. - - - - - - - - - - - - - - - - Switch - Выключатель - - - - Value - Значение - - - Trims - Триммеры - - - - Templates - - - - + Simulate Симуляция - Switch( - Тумблер( - - - noTrim - безТрим - - - Offset(%1%) - Смещение(%1%) - - - Curve(%1) - Кривая(%1) - - - - Clear Mixes - - - - - S1 - - - - - S2 - - - - - LS - - - - - Rud - - - - - Ele - - - - - Thr - - - - - Ail - - - - - Weight - Weight(+%1%) - Вес - - - - - Flight modes - - - - - - Flight mode - - - - - - - CH%1%2 - - - - - No Trim - - - - - Delay(u%1:d%2) - Задержка(u%1:d%2) - - - - Slow(u%1:d%2) - Задержка(u%1:d%2) - - - - Warn(%1) - Пред(%1) - - - - - - - CH %1 - - - - - Editing curve %1 - - - - Curve %1 - Кривая %1 - - - - - Expo - - - - - - DISABLED - - - - - - Curve - Кривая - - - - - - X%1 - - - - - No DR/Expo - - - - - FMTrim - - - - - Diff - - - - - CF%1 - - - - - Error - Ошибка - - - - Unable to find sound file %1! - - - - - Winged Shadow How High - - - - - Winged Shadow How High (not supported) - - - - - - Range - - - - - Simple 4-CH - - - - - T-Cut - - - - - Sticky T-Cut - - - - - V-Tail - - - - - Elevon\Delta - - - - - Heli Setup with gyro gain control - - - - - Gyro gain control - - - - - Heli Setup (Futaba's channel assignment style) - - - - - Heli Setup with gyro gain control (Futaba's channel assignment style) - - - - - Gyro gain control (Futaba's channel assignment style) - - - - - Servo Test - - - - - MultiCopter - - - - - Use Model Config Wizard - - - - - Not enough available mixers! - - - - - Not enough available expos! - - - - - Delete Selected Mixes? - Удалить выбранные микшеры? - - - - Delete Selected Expos? - - - - - - &Add - Добавить - - - - - Ctrl+A - - - - - - &Edit - Правка - - - - - Enter - Ввод - - - - - - - &Delete - Удалить - - - - - - - Delete - Удалить - - - - - - - &Copy - Копировать - - - - - - - Ctrl+C - - - - - - - - &Cut - Вырезать - - - - - - - Ctrl+X - - - - - - - - &Paste - Вставить - - - - - - - Ctrl+V - - - - - - Du&plicate - - - - - - Ctrl+U - - - - - Are you sure you want to delete curve %1 ? - - - - - Apply Template? - - - - - Apply template "%1"? - - - - - Clear Expos? - - - - - Really clear all the expos? - - - - - - - Clear Mixes? - - - - - Really clear all the mixes? - - - - + Clear Curves? - + Really clear all the curves? - - - - - - AIL2 - - - - - - - - ELE2 - - - - - - - - - - FLAPS - - - - - - - - - - FLAP%1 - - - - - - - - PITCH - - - - - - - - - - - - GYRO - - - - - - SPOIL - - - - - - SPOIL%1 - - - - - - RUD2 - - - - - Really clear existing mixes on CH6? - - - - - Really clear existing mixes on CH5? - - - - - Not enough free points in eeprom to store the curve. - - - - - - - - Move Up - - - - - - - - Ctrl+Up - - - - - - - - Move Down - - - - - - - - Ctrl+Down - - - - - Clear Expo Settings - - - - D&uplicate - Дублировать - ModelsListWidget - + &Edit - + &Restore from backup - + &Model Wizard - + &Delete Удалить - + Delete Удалить - + &Copy Копировать - + Ctrl+C - + &Cut Вырезать - + Ctrl+X - + &Paste Вставить - + Ctrl+V - + D&uplicate Дублировать - + Ctrl+U - + &Use as default - + P&rint model - + Alt+R - + Alt+S - + &Simulate model - + General Settings Основные настройки - + Delete Selected Models? Удалить выбранные модели? - - + + Cannot delete default model. - + Cannot cut default model. - + Do you want to overwrite TX general settings? - + You are pasting on an not empty model, are you sure? You are pasting on an not empty model, are you sure ? - + No free slot available, cannot duplicate + + Module + + + Form + + + + + Failsafe Mode + + + + + Start + + + + + PPM delay + + + + + usec + мсек + + + + Negative + + + + + Positive + + + + + RX Number + + + + + Master + + + + + Slave + + + + + Polarity + + + + + Trainer Mode + + + + + mSec + + + + + PPM Frame Length + + + + + Label + + + + + + ch + ch + + + + Channels + Каналы + + + + Hold + + + + + Custom + + + + + No Pulses + + + + + Failsafe Positions + + + + + Protocol + Протокол + + + + ModulePanel + + + Trainer Output + + + + + Internal Radio System + + + + + External Radio Module + + + QObject @@ -5558,1949 +4073,1811 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi - + + Input%1 + + + + + Polish + + + + + CH%1 + + + + No - + RotEnc A - + Rot Enc B - + Rot Enc C - + Rot Enc D - + Rot Enc E - + Safety %1 - + Trainer - + Trainer RUD - + Trainer ELE - + Trainer THR - + Trainer AIL - + Instant Trim - + Play Sound - + Start Logs - + Play Haptic - - + + + --- - + Rud Trim - + Ele Trim - + Thr Trim - + Ail Trim - + Rot Enc - + English - + French - + Italian - + German - + Czech - + Slovak - + Spanish - + Portuguese - + Swedish - - CH - - - - - + + No repeat - + %1 sec - + Reset - - Vario + + RudTrim Left - - Play Track + + RudTrim Right - - Play Both + + EleTrim Down - - Play Value + + EleTrim Up - - Volume + + ThrTrim Down - - Backlight + + ThrTrim Up - - Background Music + + AilTrim Left - - Background Music Pause - - - - - Adjust GV1 - - - - - Adjust GV2 - - - - - Adjust GV3 - - - - - Adjust GV4 - - - - - Adjust GV5 - - - - - Delay %1 sec - - - - - Duration %1 sec - - - - - - - <font color=red><b>Inconsistent parameter</b></font> - - - - - Value - - - - - Decr: - - - - - Incr: - - - - - %1s - - - - - Value - Значение - - - - Source - Источник - - - - GVAR - - - - - Increment - - - - - !Flight mode %1 - - - - - Flight mode %1 - - - - - Flight mode %1 trim - - - - - Flight mode %1 value - - - - - Yellow - - - - - Orange - - - - - Red - - - - - Winged Shadow How High - - - - - Winged Shadow How High (not supported) - - - - - FrSky Sensor Hub - - - - - None - - - - - Imperial - - - - - Metric - - - - - Extra Fine - очень точно - - - - Fine - точно - - - - Medium - средне - - - - Coarse - грубо - - - - Exponential - экспонента - - - - Count Up - Прямой отсчет - - - - Count Down - Обратный отсчет - - - - %1:%2, - - - - - : %1 Channels, %2usec Delay - - - - - Rudder - Руддер - - - - Elevator - Элеватор - - - - Throttle - Газ - - - - Aileron - Элероны - - - - - - Timer1 - - - - - - - Timer2 - - - - - - All - - - - - - Telemetry - - - - - Diff - - - - - Expo - - - - - Own trim - - - - - Own value - - - - - Keys - - - - - Sticks - - - - - Keys + Sticks - - - - - -GV%1 - - - - - (-GV%1) - - - - - (GV%1) + + AilTrim Right - - - + ABS + + + + + THs + + + + + TH% + + + + + THt + + + + + ??? + + + + + a>x + + + + + a<x + + + + + |a|>x + + + + + |a|<x + + + + + AND + + + + + OR + + + + + XOR + + + + + a=b + + + + + a!=b + + + + + a>b + + + + + a<b + + + + + a>=b + + + + + a<=b + + + + + d>=x + + + + + |d|>=x + + + + + a~x + + + + + Timer + + + + + Sticky + + + + + Stay + + + + + Unknown + + + + + STAY(%1, [%2:%3]) + + + + + STICKY(%1, %2) + + + + + TIMER(%1, %2) + + + + + Set Timer %1 + + + + + Vario + + + + + Play Track + + + + + Play Both + + + + + Play Value + + + + + Volume + + + + + Backlight + + + + + Background Music + + + + + Background Music Pause + + + + + Delay %1 sec + + + + + Duration %1 sec + + + + + + + + + + <font color=red><b>Inconsistent parameter</b></font> + + + + + + Value + + + + + + Decr: + + + + + + Incr: + + + + + Played once, not during startup + + + + + %1s + + + + + Adjust GV%1 + + + + + Rotary Encoder + + + + + Value + Значение + + + + Source + Источник + + + + GVAR + + + + + Increment + + + + + !Flight mode %1 + + + + + Flight mode %1 + + + + + Flight mode %1 value + + + + + Yellow + + + + + Orange + + + + + Red + + + + + Winged Shadow How High + + + + + Winged Shadow How High (not supported) + + + + + FrSky Sensor Hub + + + + + + None + + + + + Imperial + + + + + Metric + + + + + Extra Fine + очень точно + + + + Fine + точно + + + + Medium + средне + + + + Coarse + грубо + + + + Exponential + экспонента + + + + Count Up + Прямой отсчет + + + + Count Down + Обратный отсчет + + + + %1:%2, + + + + + : %1 Channels, %2usec Delay + + + + + Flight modes(%1) + + + + + Flight mode(%1) + + + + + Rudder + Руддер + + + + Elevator + Элеватор + + + + Throttle + Газ + + + + Aileron + Элероны + + + + + + + Timer1 + + + + + + + + Timer2 + + + + + + + All + + + + + + + Telemetry + + + + + Own value + + + + + Keys + + + + + Sticks + + + + + Keys + Sticks + + + + + + -GV%1 + + + + + + + ---- - - - + + + P1 - - - + + + P2 - - - + + + P3 - + MAX - - + + Rud - - + + Ele - - + + Thr - - + + Ail - + + + REa - + + + REb - + Alt - + Rpm - + Fuel - + Speed - + Dist - + GPS Alt - + Cell - - 3POS - - - - + A1 - + A2 - + T1 - + T2 - - Curve - Кривая - - - - - - - Flight modes settings on expos not exported - Phases settings on expos not exported - - - - - - - - - - - - Open9x on this board doesn't have Rotary Encoders - - - - - gruvin9x doesn't have trims as source - - - - - gruvin9x doesn't have swappable trims - - - - - gruvin9x on this board doesn't have Rotary Encoders - - - - - gruvin9x does not support Custom Switch function %1 - - - - - gruvin9x only accepts %1 expos - - - - - - gruvin9x doesn't support custom curves as curve%1, curve as been exported as fixed point - - - - - - gruvin9x doesn't support curve with %1 point as curve%2 - - - - - - - Open9x doesn't allow Curve%1 in expos - - - - - + + Simultaneous usage of expo and curves is no longer supported - - - - - - - - Flight modes settings on mixers not exported - - - - - - Flight mode settings on mixers not exported - Phases settings on mixers not exported - - - - - - - - This version of open9x does not support Custom Switch function %1 - - - - - - - - - - - - - - - - - - - - - - Open9x doesn't accept this protocol - - - - - - - - - - open9x only accepts %1 points in all curves - - - - + Simultaneous usage of expo and curves is no longer supported in open9x - - - open9x on this board doesn't have Rotary Encoders - - - - - - - - - - - - - - - - - open9x only accepts %1 expos - Gruvin9x firmware only accepts %1 expos - - - - + th9x - + er9x - + TrmR - + TrmE - + TrmT - + TrmA - - + + S1 - - + + S2 - - + + LS - - + + RS - - SA - - - - - SB - - - - - SC - - - - - SD - - - - - SE - - - - - SF - - - - - SG - - - - - SH - - - - + Batt - + Tx - + Rx - + SWR - + RSSI - + Cels - + Vfas - + Curr - + Cnsp - + Powr - + AccX - + AccY - + AccZ - + HDG - + VSpd - + A1- - + A2- - + Alt- - + Alt+ - + Rpm+ - + T1+ - + T2+ - + Spd+ - + Dst+ - + Cur+ - + ACC - + Time - + Pwr+ - + + + LS1 + + + + + + LS2 + + + + + + LS3 + + + + + + LS4 + + + + + + LS5 + + + + + + LS6 + + + + + + LS7 + + + + + + LS8 + + + + + + LS9 + + + + + + LSA + + + + + + LSB + + + + + + LSC + + + + + + LSD + + + + + + LSE + + + + + + LSF + + + + + + LSG + + + + + + LSH + + + + + + LSI + + + + + + LSJ + + + + + + LSK + + + + + + LSL + + + + + + LSM + + + + + + LSN + + + + + + LSO + + + + + + LSP + + + + + + LSQ + + + + + + LSR + + + + + + LSS + + + + + + LST + + + + + + LSU + + + + + + LSV + + + + + + LSW + + + + + Input %1 + + + + CYC%1 - + PPM%1 - + CH%1%2 CH%1 - + X%1 - - ONE + + S11 - - !ONE + + S12 - - TRNs + + S13 - - TRNl + + S14 - - REAs + + S15 - - REAl + + S16 - - + + S21 + + + + + S22 + + + + + S23 + + + + + S24 + + + + + S25 + + + + + S26 + + + + + Diff(%1) + + + + + Expo(%1) + + + + + Function(%1) + + + + + Curve(%1) + + + + + !Curve(%1) + + + + + + GV%1 - - - - + + THR - - - RUD - - - - - - ELE - - - - - ID0 - - - - - ID1 - - - - - ID2 - - - - - - AIL - - - - - - GEA - - - - - - TRN - - - - - - 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 - - - - - + + ON - - + + + OFF ВЫКЛ - - + + Support for frsky telemetry mod - - + + Support for jeti telemetry mod - - + + Support for receiving ardupilot data - - + + Support for receiving NMEA data - + Support for telemetry easy board - - + + Support for MAVLINK devices - + Rotary Encoder use in menus navigation - + Possibility to enable FAI MODE at field - + FAI MODE always enabled - - openTx for 9X board - - - - - - - - + + + + + Enable heli menu and cyclic mix support - - - - - - + + + + + + Enable TEMPLATES menu - - - - + + + + No splash screen - - - - - - + + + + + + Disable curves menus - - - - + + + + Support for radio modified with regular speaker - - - - - + + + + + Used if you have modified your radio with voice mode - - - - + + + + Used if you have modified your radio with haptic mode - - - - - - - - + + + + + + + + Use alternative SQT5 font - - - - + + + + Enable the throttle trace in Statistics - + EEprom write progress bar - - + + No Winged Shadow How High support - - + + No vario support - - + + No GPS support - - + + No gauges in the custom telemetry screen - - openTx for M128 / 9X board + + Allow compensating for offset errors in FrSky FAS current sensors - - openTx for 9XR + + OpenTX for FrSky Taranis - - openTx for 9XR with M128 chip + + OpenTX for FrSky Taranis Rev4a - - openTx for Gruvin9x board / 9X - - - - + Support of FrSky PXX protocol - + + OpenTX for Sky9x board / 9X + + + + Use FrSky Taranis sticks in a 9X/9XR - - openTx for FrSky Taranis - - - - - + + Disable HELI menu and cyclic mix support - - + + Disable TEMPLATES menu - - + + Disable Global variables - - openTx for FrSky Taranis Rev4a - - - - - - - - + + + + + Support for DSM2 modules - - - - - - + + + + + + PPM center adjustment in limits - - - - - - - - + + + + + + + + PPM values displayed in us - - - - - - + + + + + + Symetrical Limits - - - - - + + + + + Pots use in menus navigation - + Your radio probably uses a wrong firmware, eeprom size is 4096 but only the first 2048 are used - - - - - - + + OpenTX for 9X board + + + + + + + + + No flight modes - - + + SmartieParts 2.2 Backlight support - - - - - - + + + + + + In model setup menus automatically set source by moving some of them - - - - - - + + + + + + In model setup menus automatically set switch by moving some of them - - - - + + + + Enable resetting values by pressing up and down at the same time - - - - - - + + + + + + No graphical check boxes and sliders - - - - - - + + + + + + Battery graph - - - - - - + + + + + + Don't use bold font for highlighting active items - - - - + + OpenTX for M128 / 9X board + + + + + + + EEprom write Progress bar - - - - - + + + + + Imperial units - + Bluetooth interface - - - - - - + + + + + + Global variables - + + OpenTX for 9XR + + + + + OpenTX for 9XR with M128 chip + + + + + OpenTX for Gruvin9x board / 9X + + + + Support for SD memory card - + Support for DSM2 modules using ppm instead of true serial - - openTx for Sky9x board / 9X - - - - + Enable HELI menu and cyclic mix support - + ersky9x - - er9x doesn't have Rotary Encoders - - - - - er9x doesn't have trims as source - - - - - er9x doesn't have negative gvars as weight - - - - - er9x doesn't have negative gvars as offset - - - - - - - er9x doesn't have swappable trims - - - - - - - er9x on this board doesn't have Rotary Encoders - - - - - er9x does not support Custom Switch function %1 - - - - - - - er9x does not support this range for A1/A2 - - - - - - - er9x does not support this telemetry units - - - - - - Er9x doesn't accept this protocol - - - - - - Er9x doesn't support custom curves as curve%1, curve as been exported as fixed point - - - - - - Er9x doesn't support curve with %1 point as curve%2 - - - - - - - - + + + + Warning Звук - - + EEPROM saved with these warnings: - - - ersky9x doesn't have Rotary Encoders - - - - - - ersky9x doesn't have trims as source - - - - - - ersky9x does not support Custom Switch function %1 - - - - - - Ersky9x doesn't accept this protocol - - - - - - - - ErSky9x doesn't support custom curves as curve%1, curve as been exported as fixed point - - - - - - - - ErSky9x doesn't support curve with %1 point as curve%2 - - - - - - + + + Simulator for this firmware is not yet available - - th9x does not support Custom Switch function %1 - - - - + th9x on this board doesn't have Rotary Encoders - - - - th9x doesn't support custom curves as curve%1, curve as been exported as fixed point - - - - - - - th9x doesn't support curve with %1 point as curve%2 - - - - - - Flight Mode 0 (Default) - - - - - - FM %1 - - - - + openTx only accepts %1 points in all curves - - - + + + + OpenTX on this board doesn't accept this function - - + + OpenTX doesn't accept this protocol - + OpenTX doesn't allow this number of channels @@ -7513,6 +5890,773 @@ We are really appreciative for that! The OpenTX/Companion Team. + + + Trim disabled + + + + + Own Trim + + + + + Use Trim from Flight mode %1 + + + + + Use Trim from Flight mode %1 + Own Trim as an offset + + + + + Setup + + + Form + + + + + Model Name + Название модели + + + + Timer2 + + + + + Timer1 + + + + + Throttle Source + + + + + Switch startup Warning + + + + + Center beep + Бип в центре + + + + Trim Increment + Изм. триммеров + + + + ON + + + + + OFF + ВЫКЛ + + + + Check + + + + + Model Image + + + + + Exponential + экспонента + + + + Extra Fine + очень точно + + + + Fine + точно + + + + Medium + средне + + + + Coarse + грубо + + + + Extended Limits + Расш. лимиты + + + + Extended Trims + + + + + Throttle Trim + Газ трим + + + + 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. + + + Реверсировать канал газа (а также триммеры и предупреждения) + + + + Reverse Throttle + + + + + Telemetry + + + Form + + + + + + + + A1 + + + + + + + + A2 + + + + + RSSI + + + + + Alarm 1 + + + + + + ---- + + + + + + Yellow + + + + + + Orange + + + + + + Red + + + + + Alarm 2 + + + + + Serial Protocol + + + + + Volt source + + + + + Metric + + + + + Imperial + + + + + Current source + + + + + Protocol + Протокол + + + + NONE + + + + + + FAS + + + + + None + + + + + FrSky Sensor Hub + + + + + CEL + + + + + 2 + + + + + 3 + + + + + 4 + + + + + Units + + + + + Blades + + + + + Altimetry / Vario + + + + + Alti + + + + + Alti+ + + + + + Vario + + + + + Sink Max + + + + + Off + + + + + Climb Max + + + + + Sink Min + + + + + Climb Min + + + + + Vario source + + + + + Vario limits + + + + + Use GPS as altitude source + + + + + Display altitude in toolbar + + + + + Various + + + + + mAh count + + + + + FAS Offset + + + + + Persistent mAh + + + + + TelemetryAnalog + + + Form + + + + + Unit + + + + + Max Value + + + + + Alarm 1 + + + + + + ---- + + + + + + Yellow + + + + + + Orange + + + + + + Red + + + + + + < + + + + + + > + + + + + Alarm 2 + + + + + Min Value + + + + + 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) + + + + + Range + + + + + TelemetryCustomScreen + + + Form + + + + + Custom Screen Type + + + + + Nums + + + + + Bars + + + + + Min + Мин + + + + Source + Источник + + + + Gauge + + + + + Max + Макс + + + + TelemetryPanel + + + Telemetry screen %1 + + + + + Winged Shadow How High + + + + + Winged Shadow How High (not supported) + + + + + Timer + + + Form + + + + + mm:ss + + + + + Countdown + + + + + MinuteBeep + + + + + Persistent + + + + + (00:00:00) + + + + + TimerPanel + + + None + + + + + Beeps + + + + + Countdown + + + + + appPreferencesDialog + + + Application Preferences + + + + + Simulator capture folder + + + + + Remember simulator switch values + + + + + + + Open Folder + + + + + User Splash Screens + + + + + Blue + + + + + Green + + + + + Red + + + + + Orange + + + + + Yellow + + + + + Include companion splashes + + + + + Only user defined splashes + + + + + Splash Screen Library + + + + + Files to keep + + + + + Simulator BackLight + + + + + Automatic Backup Folder + + + + + Only capture to clipboard + + + + + Joystick + + + + + Find Executable + + + + + Google Earth Executable + + + + + Calibrate + + + + + Enable + + + + + Show splash screen when Companion starts + + + + + Automatic check for OpenTX firmware updates + + + + + Automatic check for Companion updates + + + + + Offer to use wizard for new models + + + + + Enable automatic backup before writing firmware + + + + + Select your snapshot folder + + + + + + No joysticks found + + + + + Select your library folder + + + + + Select your Models and Settings backup folder + + + + + Select Google Earth executable + + avrOutputDialog @@ -7667,7 +6811,7 @@ Do you want some help ? burnConfigDialog - + AVRDUDE Configuration Настроить программатор @@ -7697,10 +6841,6 @@ Do you want some help ? The location of the AVRDUDE.EXE executable. Расположение исполняемого файла AVRDUDE. - - Use this button to browse and look for the AVRDUDE.EXE executable file. - Поиск AVRDUDE.EXE. - @@ -7821,42 +6961,38 @@ Please only use this if you know what you are doing. There are no error checks - + DFU-UTIL Configuration - + SAM-BA Configuration - - - + + + Select Location Выбрать расположение - - + + 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? - + <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>WARNING!</u></b><br>This will reset the fuses 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? - Внимание!<br>Произойдет сброс фьюзов на значения по-умолчанию. Вы уверены в том, что хотите продолжить? - @@ -7911,7 +7047,7 @@ m2560 for v4.1 boards - + Browse for file @@ -7957,7 +7093,7 @@ m2560 for v4.1 boards - + Write to TX @@ -7982,153 +7118,149 @@ m2560 for v4.1 boards - + Write firmware to TX - + Current profile - + Open Открыть - Choose file to write to EEPROM memory - Выберите файл для записи в EEPROM - - - + Write Models and Settings to TX - + Write Models and Settings in %1 to TX - + Choose file to load Models and Settings from - - - - - - + + + + + + Warning Звук - + %1 is not a known firmware - + Burn anyway ! - + Unable to find file %1! Невозможно найти файл %1! - - - + + + Error opening file %1: %2. - - - + + + Invalid binary Models and Settings File %1, Proceed anyway ? - + Error reading file %1: %2. Ошибка при считывании файла %1: %2. - + Open Image to load - + Images (%1) - + Wrong radio calibration data in profile, Settings not patched - + Wrong radio setting data in profile, Settings not patched - - + + Cannot write file %1: %2. Не удается записать файл %1: %2. - + Error writing file %1: %2. Ошибка при записи файла %1: %2. - - - - - - - - - - + + + + + + + + + + Error Ошибка - - + + Cannot load %1. - + Cannot save customized firmware - + Custom image not found - + No firmware selected @@ -8166,559 +7298,483 @@ m2560 for v4.1 boards - - + + No name - Count Up - Прямой отсчет - - - Count Down - Обратный отсчет - - - Rudder - Руддер - - - Elevator - Элеватор - - - Throttle - Газ - - - Aileron - Элероны - - - Extra Fine - очень точно - - - Fine - точно - - - Medium - средне - - - Coarse - грубо - - - Exponential - экспонента - - - + General Model Settings - - - + + + Name - - + + EEprom Size - - + + Timer1 - - + + Timer2 - - + + Protocol Протокол - - + + Pulse Polarity - - + + Throttle Trim Газ трим - - - - + + + + Enabled - - - - + + + + Disabled - - + + Throttle Expo Газ экспо - - + + Trim Increment Изм. триммеров - - + + Center Beep - - + + Fades - - + + Trims Триммеры - - - - - - - - - - + + + + + + + + Switch - - + + IN - - + + OUT - - + + Gvars - - + + Rot. Enc. - + Limits Лимиты - - - - - - - + + + + + + + Offset - - - - - + + + + + Min Мин - - - - - + + + + + Max Макс - - - + + + Invert Инверт - - - - - - + + + + + CH - - + + INV - - + + NOR - + Global Variables - - + + GV - + Expo/Dr Settings - - + + Weight Вес - - - Expo - - - - - - - + + + + DISABLED - - - - - - + + Curve Кривая - + Mixers - - + + noTrim - - - FMTrim - - - - - - Diff - - - - - + + Delay(u%1:d%2) Задержка(u%1:d%2) - - + + Slow(u%1:d%2) Задержка(u%1:d%2) - - + + Warn - + Curves Кривые - + 5 Points Curves - - - - + + + + pt %1 - + 9 Points Curves - - Custom Switches - - - - - - CS - - - - - + + Function Функция - - + + Param - - + + Enable - + CF - + Telemetry Settings - - + + Analog - - + + Unit - - + + Scale - - - - + + + + A%1 - - + + Alarm 1 - - + + Alarm 2 - - - - + + + + Type - - - - + + + + Condition - - - - - - + + + + Value Значение - + Flight modes Settings - - - - + + + + Flight mode name - - - - - - - - - - + + + + + + + + + + FM - - - + + + Flight modes - - - + + + Flight mode - - Custom Functions - - - - - + + Repeat - - Safety Switches - Защитные выкл. - - - - + + RSSI Alarm - - + + Telemetry Bars - - + + Bar Number - - + + Source Источник - - + + Custom Telemetry View - + + Logical Switches + + + + + + LS + + + + + Switch Assignment + + + + Print Document - + Select PDF output file @@ -8731,39 +7787,37 @@ m2560 for v4.1 boards Диалог - + People who have contributed to this project - + Coders - - 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 - + Thank you all !!! - + + Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe) + + + + Contributors - + OpenTX Release Notes @@ -8771,140 +7825,101 @@ which was the staring point for OpenTX Companion. customizeSplashDialog - - Customize Splash + + Transmitter Splash Screen Editor - - Save Image + + + Invert + Инверт + + + + + Load FW - - Invert Color + + + Load Pict - - Load Firmware + + + Load Profile - - Load Image + + + Save - + + Open Splash Library - + + + + ... - - Save Firmware - Save To Hex - - - - - <!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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<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> - - - - - - - Select an original firmware file - - - - + Open Открыть - - Select an image to customize your splash <br />or save actual firmware splash - - - - - - - + + + + + + Error Ошибка - + Could not find bitmap to replace in file - + Open Image to load - + Images (%1) - - + + Cannot load %1. - - - Save your custimized firmware + + + Could not store image in firmware file %1 - - - Write to file + + The image file %1 could not be stored - - - Error reading file %1 - Ошибка при считывании файла %1! {1?} - - - - Firmware correctly saved. - - - - - Firmware not saved. - - - - - PNG images (*.png);; - - - - - donatorsDialog - - List of Contributors - Список авторов - downloadDialog @@ -9021,6 +8036,381 @@ p, li { white-space: pre-wrap; } + + fwPreferencesDialog + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox + + + + + Set language of voice. +May be different from firmware language + + + + + SD Structure path + + + + + Processor ID + + + + + Downloads and Profiles + + + + + Default Stick Mode + Режим стиков + + + + Channel Order + + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + + + + + Mode 1 (RUD ELE THR AIL) + + + + + Mode 2 (RUD THR ELE AIL) + + + + + Mode 3 (AIL ELE THR RUD) + + + + + Mode 4 (AIL THR ELE RUD) + + + + + Options + + + + + Channel order + +This is used by the templated to determine which channel goes to what number output. + + + + + Open Folder + + + + + Offer to write FW to Tx after download + + + + + Save Profile + + + + + Menu Language + + + + + Voice Language + + + + + Firmware Type + + + + + Append version number to FW file name + + + + + Download Voice + + + + + FwInfo + + + + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + + Profile + + + + + Open Image + + + + + Splash Screen + + + + + Clear Image + + + + + Download FW + + + + + Check for updates + + + + + Last downloaded release: %1 + + + + + The selected firmware has never been downloaded by Companion. + + + + + The selected firmware cannot be downloaded by Companion. + + + + + Select the folder replicating your SD structure + + + + + Profile name is empty, profile slot %1 will be deleted.<br>Are you sure ? + + + + + Open Image to load + + + + + Images (%1) + + + + + Error + Ошибка + + + + Cannot load %1. + + + joystickDialog @@ -9303,17 +8693,17 @@ Press cancel to abort joystick calibration %2. - + Select your log file - + Available fields - + The selected logfile contains %1 invalid lines out of %2 total lines @@ -9321,7 +8711,7 @@ Press cancel to abort joystick calibration mdiChild - + Simulate Tx @@ -9766,38 +9156,34 @@ Press cancel to abort joystick calibration preferencesDialog + Preferences Настройки - - Language (requires restart) - Язык (треб. перезапуск) - - - + Recent History Size - - + + Download - + Default Channel Order Порядок следов. каналов - + Default Stick Mode Режим стиков - + Channel order This is used by the templated to determine which channel goes to what number output. @@ -9806,17 +9192,12 @@ This is used by the templated to determine which channel goes to what number out Шаблон для определения порядка следования каналов. - + FwInfo - - Show Splash Screen - - - - + Mode selection: Mode 1: @@ -9839,377 +9220,529 @@ 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 - + + R E T A + + + + + R E A T + + + + + R T E A + + + + + R T A E + + + + + R A E T + + + + + R A T E + + + + + E R T A + + + + + E R A T + + + + + E T R A + + + + + E T A R + + + + + E A R T + + + + + E A T R + + + + + T R E A + + + + + T R A E + + + + + T E R A + + + + + T E A R + + + + + T A R E + + + + + T A E R + + + + + A R E T + + + + + A R T E + + + + + A E R T + + + + + A E T R + + + + + A T R E + + + + + A T E R + + + + 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 - + + Remember simulator switches + + + + + 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox - + 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 - + + Show Splash At Start + + + + 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 - + 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. @@ -10242,540 +9775,421 @@ May be different from firmware language - Count Up - Прямой отсчет - - - Count Down - Обратный отсчет - - - - - - + + + + Name - Rudder - Руддер - - - Elevator - Элеватор - - - Throttle - Газ - - - Aileron - Элероны - - - Extra Fine - очень точно - - - Fine - точно - - - Medium - средне - - - Coarse - грубо - - - Exponential - экспонента - - - + General Model Settings - + EEprom Size - + Timer1 - + Timer2 - + Protocol Протокол - + Pulse Polarity + - - + Enabled + - Disabled - + Throttle Trim Газ трим - + Throttle Expo Газ экспо - + Fades - + Trims Триммеры - + Trim Increment Изм. триммеров - + Center Beep - Mid - центр - - - Switch( - Тумблем( - - - noTrim - безТрим - - - Offset(%1%) - Смещение(%1%) - - - Curve(%1) - Кривая(%1) - - - + Delay(u%1:d%2) Задержка(u%1:d%2) - + Slow(u%1:d%2) Задержка(u%1:d%2) - Warn(%1) - Пред(%1) - - - - - + pt %1 - Curve %1 - Кривая %1 - - - + Source Источник - + Function Функция - - - - - + + + + Switch - + printed on: %1 - + Gvars - + Rot.Enc. - + IN - + OUT - + Expo/Dr Settings - + Weight Вес - - - - - Expo - - - - - + + DISABLED - - + + - - - - Curve Кривая - + Mixers - - - - - + + + + CH - + noTrim - - FMTrim - - - - - - - - + + + + + Offset - - Diff - - - - + Warn - + Limits Лимиты - - - - + + + + Min Мин - - - - + + + + Max Макс - - - + + + Invert Инверт - - - + + + INV - - - + + + NOR - + Curves Кривые - - 5 Points Curves - - - - - 9 Points Curves - - - - - Custom Switches - - - - - - CS - - - - + Global Variables - + GV - - Safety Switches - Защитные выкл. - - - - - - - + + + + Value Значение - - Function Switches - - - - + Parameter - + Repeat - + ODF files (*.odt);;PDF Files(*.pdf);;HTML-Files (*.htm *.html);;All Files (*) - + Telemetry Settings - - + + Logical Switches + + + + + + LS + + + + + Switch Assignments + + + + + Alarm 1 - - + + Alarm 2 - + Analog - + Unit - + Scale - - - - + + + + Type - - - - + + + + Condition - + A%1 - + RSSI Alarm - + Frsky serial protocol - + System of units - + Propeller blades - + Telemetry Bars - + Bar Number - - + + Custom Telemetry View - + Flight modes Settings - + Flight mode name - - - - + + + + FM - - + + Flight modes - - + + Flight mode - - CF - - - - + Print Document - + Select PDF output file @@ -10783,22 +10197,17 @@ May be different from firmware language simulatorDialog - Companion9x Simulator - ER9x Simulator - ER9x Симулятор - - - + P1 - + P2 - + P3 @@ -10824,33 +10233,33 @@ May be different from firmware language - + Hold X - + Fix X - + Fix Y - + Hold Y - - + + TextLabel @@ -10870,17 +10279,17 @@ May be different from firmware language - + ID1 - + ID2 - + BEEP @@ -10888,19 +10297,19 @@ May be different from firmware language - + Right Double Click to Reset - - - + + + 0 % - + 9x Simulator @@ -10909,270 +10318,268 @@ May be different from firmware language Outputs - - - CSK - SWK - - - - - CS1 - - Companion Simulator + + + LS1 + + - CS2 + LS2 - CS3 + LS3 - CS4 + LS4 - CS5 + LS5 - CS6 + LS6 - CS7 + LS7 - CS8 + LS8 - CS9 + LS9 - CSA + LSA - CSB + LSB - CSC + LSC - CSD + LSD - CSE + LSE - CSF + LSF - CSG + LSG - CSH + LSH - CSI + LSI - - CSJ + + LSJ - - CSL + + LSK - - CSM + + LSL - - CSN + + LSM - - CSO + + LSN - - CSP + + LSO - - CSQ + + LSP - - CSR + + LSQ - - CSS + + LSR - - CST + + LSS - - CSU + + LST - - CSV + + LSU - - CSW - SWW + + LSV - + + LSW + + + + CH1 - + CH9 - + CH2 - + CH10 - + CH3 - + CH11 - + CH4 - + CH12 - + CH5 - + CH13 - + CH6 - + CH14 - + CH7 - + CH15 - + CH8 - + CH16 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + -100.1 @@ -11216,43 +10623,39 @@ May be different from firmware language splashLibrary - + ... - + Splash Library - page %1 of %2 - + Warning Звук - + Invalid image in library %1 - + Information - + No valid image found in library, check your settings xsimulatorDialog - - Companion9x Simulator - ER9x Симулятор - @@ -11393,10 +10796,10 @@ May be different from firmware language - - - - + + + + @@ -11437,12 +10840,12 @@ May be different from firmware language - + CH12 - + CH5 @@ -11483,162 +10886,162 @@ May be different from firmware language - CSK + LSK - CSC + LSC - CSD + LSD - CS7 + LS7 - CSL + LSL - CSB + LSB - CS1 + LS1 - CSH + LSH - CSG + LSG - CSE + LSE - CSF + LSF - CS8 + LS8 - CS9 + LS9 - CSA + LSA - CSM + LSM - CSJ + LSJ - CSI + LSI - CS4 + LS4 - CS5 + LS5 - CS2 + LS2 - CS3 + LS3 - CS6 + LS6 - CSN + LSN - CSO + LSO - CSP + LSP - CSQ + LSQ - CSR + LSR - CSS + LSS - CST + LST - CSU + LSU - CSV + LSV - CSW + LSW @@ -11658,22 +11061,22 @@ May be different from firmware language - + Firmware %1 error: %2 - + - Flight mode: %1(%2) - + Simulating Tx (%1) - + Simulating Симуляция diff --git a/companion/src/translations/companion_sv.ts b/companion/src/translations/companion_sv.ts index dad124c89..091cd0560 100644 --- a/companion/src/translations/companion_sv.ts +++ b/companion/src/translations/companion_sv.ts @@ -2,47 +2,391 @@ - 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 + + + + CF%1 + + + + + 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 + + + + 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 +396,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 +451,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 @@ -142,7 +601,7 @@ Om fältet lämnas tomt så är expo påslaget hela tiden. Allmänna inställningar - + General settings used throught the transmitter. These will be relevant for all models in the same EEPROM. Allmänna inställningar för sändaren @@ -151,16 +610,16 @@ Dessa inställningar gäller för alla modeller. Setup - Sändarinställningar + Välj Sändarens Startbild - + 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 +634,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 +649,7 @@ p, li { white-space: pre-wrap; } Högtalarton (endast högtalare) - + Battery Warning Batterivarning @@ -218,7 +677,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 +691,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 +712,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 +763,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 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 +803,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 +827,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 +893,13 @@ Mode 4: Mode 4 (SKE GAS HÖJ ROD) - + Beeper Mode Summerläge - - + + @@ -475,6 +907,8 @@ Mode 4: + + Beeper volume 0 - Quiet. No beeps at all. @@ -491,19 +925,19 @@ Mode 4: 4 - Extra högt. - - + + Quiet Tyst - - + + No Keys Ej vid knapptryck - + Normal Normal @@ -515,7 +949,7 @@ Mode 4: Lång - + Input Filter Filtrering av indata @@ -535,13 +969,12 @@ Mode 4: Filter - + Owner Name Ägare - - + @@ -549,17 +982,7 @@ Mode 4: Av - - Switches Up - Brytare upp - - - - Switches Down - Brytare ned - - - + @@ -596,28 +1019,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 +1080,132 @@ Mode 4: ID2 - + Beeper Length Längd på summerton - + + R E T A + R H G S + + + + R E A T + R H S G + + + + R T E A + R G H S + + + + R T A E + R G S H + + + + R A E T + R S H G + + + + R A T E + R S G H + + + + E R T A + H R G S + + + + E R A T + H R S G + + + + E T R A + H G R S + + + + E T A R + H G S R + + + + E A R T + H S R G + + + + E A T R + H S G R + + + + T R E A + G R H S + + + + T R A E + G R S H + + + + T E R A + G H R S + + + + T E A R + G H S R + + + + T A R E + G S R H + + + + T A E R + G S H R + + + + A R E T + S R H G + + + + A R T E + S R G H + + + + A E R T + S H R G + + + + A E T R + S H G R + + + + A T R E + S G R H + + + + A T E R + S G H R + + + X-Short Extra Kort @@ -685,12 +1228,12 @@ Mode 4: Vibrationsläge - + Readonly Unlock Upphäv Skrivskyddet - + SC SC @@ -730,7 +1273,7 @@ Mode 4: SG - + Weight Vikt @@ -811,7 +1354,29 @@ Mode 4: SPAK 2 - + + + Pot (normal) + Potentiometer + + + + + Multipos Switch + Flerlägesväljare + + + + S1 Type + S1-ratten + + + + S2 Type + S2-ratten + + + STICK 3 SPAK 3 @@ -836,12 +1401,12 @@ Mode 4: PPM Multiplikator - + Pot Scrolling Enable Bläddra med potentiometer - + Bandgap Measuring Enable Mät bandluckor @@ -851,7 +1416,7 @@ Mode 4: Endast för alarm - + Trainer Slavsändare @@ -888,12 +1453,12 @@ Mode 4: POT 3 - + Timeshift from UTC Tidsdifferens till UTC - + GPS Coordinates GPS-koordinater @@ -908,17 +1473,17 @@ Mode 4: NMEA - + Haptic Length Vibrationstid - + LCD Display Type LCD-typ - + Standard Standard @@ -928,7 +1493,7 @@ Mode 4: Optrex - + Store calib. and hw settings in selected profile Spara kalibrering och hårdvaruinställningar i vald profil @@ -938,22 +1503,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 +1541,7 @@ Mode 4: Spänning - + Warning Varning @@ -992,17 +1557,17 @@ Mode 4: Felaktig information i profilen, hårdvaruinställningar lästes inte in - + Do you want to store calibration in %1 profile<br>overwriting existing calibration? Vill du skriva över existerande kalibreringsdata<br>i profilen %1 med de nuvarande? - + Calibration and HW parameters saved. Kalibrering ojch hårdvaruinställningar sparades. - + Speaker Högtalare @@ -1017,42 +1582,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 +1627,12 @@ Mode 4: Spakscrollning - + CrossTrim Kross-trimning - + Country Code Landskod @@ -1087,7 +1652,7 @@ Mode 4: Amerika - + Metric Meter, Centimeter, Millimeter @@ -1097,22 +1662,22 @@ Mode 4: Yard, Fot, Tum - + Measurement Units Måttenheter - + Voice Language Språk för Röst - + PPMSim PPMSim - + If you enable FAI, you loose the vario, the play functions, the telemetry screen. This function cannot be disabled by the radio. Are you sure ? @@ -1141,12 +1706,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 +1751,7 @@ FAI-funktionen kan inte slås av i sändaren. 115200 Baud - + @@ -1207,42 +1772,331 @@ 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? + + + + LogicalSwitchesPanel + + + Condition + Villkor + + + + V1 + V1 + + + + V2 + V2 + + + + AND + OCH + + + + Duration + Varaktighet + + + + Delay + Fördröjning + + + + + 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 + + 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. - + Executable (*.exe) Program (*.exe) @@ -1252,112 +2106,253 @@ FAI-funktionen kan inte slås av i sändaren. Vill du starta installationsprogrammet? - + Do you want to write the firmware to the transmitter now ? 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 + Öppna - + File saved Filen sparades - + Copyright Copyright - - donating - bidra + New + Ny - - - - &%1 %2 - &%1 %2 + Open... + Öppna... - - %1 %2 - %1 %2 + Save... + Spara... - - &New - &Ny + Save As... + Spara Som... + + + + Exit + Avsluta + + + Cut + Klipp Ut + + + Cut current selection to the clipboard + Klipp ut markeringens innehåll till klippbordet + + + Copy... + Kopiera... + + + Copy current selection to the clipboard + Kopiera markeringens innehåll till klippbordet + + + Paste... + Klistra In... + + + Paste clipboard into current selection + Klistra in klippbokens innehåll i det valda avsnittet + + + + Classical + Klassiskt + + + The classical Companion icon theme + Det klassiska Companion-temat + + + The new Companion 2 icon theme + Det nya Companion2-temat + + + Companion2 + Companion2 - Create a new file - Skapa ny fil - - - - &Open... - &Öppna... - - - - Open an existing file - Öppna en existerande fil - - - - &Save - &Spara - - - - Save the document to disk - Spara dokumentet till fil - - - - Save &As... - Spara S&om... - - - - Save the document under a new name - Spara dokumentet under nytt namn - - - - &Preferences... - &Inställningar... + Monochrome + Monokromt - Edit general preferences - Redigera sändarens generella inställningarna + MonoWhite + MonoVitt + + + + MonoBlue + MonoBlått + + + + System language + Systemspråk + + + + Use system language in menus + Använd systemspråket i menyerna + + + About + Om + + + Print + Skriv ut + + + + Print current model + Skriv ut modell + + + Simulate + Simulera + + + Simulate selected model + Simulera modell + + + loadBackup... + Ladda backup från fil... + + + Logs + Loggar + + + Setting... + Inställningar... + + + Downloads... + Nedladdningar... + + + Check for updates... + Sök efter uppdateringar... + + + + Edit Tx Splash Image... + Startbildsredigerare... + + + edit the splash screen of your TX + Editera startbilder för din sändare + + + List programmers + Programmerare + + + + Fuses... + Säkringar... + + + Configure connection software... + Inställningar för kommunikation... + + + + Save Tx Models and Settings to file + Spara sändarens Modeller och Inställningar till fil + + + Contributors + Bidragande + + + + A tribute to those who have contributed to OpenTX and Companion + Ett tack till alla de som bidragit till OpenTX och Companion + + + + Settings + Inställningar + + + + Read/Write + Läs/Skriv + + + &%1 %2 + &%1 %2 + + + &New + &Ny + + + Create a new file + Skapa ny fil + + + &Open... + &Öppna... + + + Open an existing file + Öppna en existerande fil + + + &Save + &Spara + + + Save the document to disk + Spara dokumentet till fil + + + Save &As... + Spara S&om... + + + Save the document under a new name + Spara dokumentet under nytt namn - &Check for updates... - &Sök efter uppdateringar... + &Sök efter uppdateringar... - + Display previous message again at startup ? Skall föregående varning visas igen vid uppstart ? - + Firmware does not longer 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 @@ -1367,12 +2362,12 @@ Vill du ladda ned den nya versionen nu ? Tillfälligt fel i byggservern. Försök igen senare - + 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 ? @@ -1381,119 +2376,109 @@ 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 - - - - 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 - - Customize your &TX... - Sändari&nställningar... + OpenTX Companion - FW: %1 - Profile: %2 + OpenTX Companion - FW: %1 - Profil: %2 + + + &Setting... + &Inställningar... + + + + Edit Settings + Redigera Inställningar + + + &Downloads... + &Nedladdningar... + Download firmware and voice files + Ladda ned firmware och röstfiler + + Customize the splash screen of your TX - Ställ in din sändares startlbild + Ställ din sändares startbild - E&xit - &Avsluta + &Avsluta - + Exit the application Avsluta programmet - Cu&t - Klipp &Ut + Klipp &Ut - Cut the current selection's contents to the clipboard - Klipp ut markeringens innehåll till klippbordet + Klipp ut markeringens innehåll till klippbordet - &Copy - &Kopiera + &Kopiera - Copy the current selection's contents to the clipboard - Kopiera markeringens innehåll till klippbordet + Kopiera markeringens innehåll till klippbordet - &Paste - Klistra &In + Klistra &In - Paste the clipboard's contents into the current selection - Klistra in klippbokens innehåll i det valda avsnittet + Klistra in klippbokens innehåll i det valda avsnittet - Ctrl+Alt+W - Ctrl+Alt+W + Ctrl+Alt+W - Ctrl+Alt+R - Ctrl+Alt+R + Ctrl+Alt+R - - &Configure... - &Kommunikationsinställningar... - - - Configure software for reading from and writing to the transmitter - Inställningar för mjukvaran som kommunicerar med sändaren + Inställningar för mjukvaran som kommunicerar med sändaren - &List programmers - &Programmerare + &Programmerare - + List available programmers Lista upp tillgängliga prorammerare - &Fuses... - S&äkringar... + S&äkringar... @@ -1501,200 +2486,226 @@ Vill du ladda ned den nu ? Visa säkrings-dialog - &Simulate - S&imulera + S&imulera - Alt+S - Alt+S + Alt+S - Simulate selected model. - Simulera den valda modellen. + Simulera den valda modellen. - &Print - Skriv &ut + Skriv &ut - Ctrl+P - Ctrl+P + Ctrl+P - Print current model. - Skriv ut den valda modellen. + 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 + &Om - + Show the application's About box Visa information om programmet - - Recent Files - Senaste Filer + Senaste Filer - - Switch layout Left/Right - Byt layout Höger/Vänster - - - &File - &Arkiv + &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 - 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 + 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)? - - 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 + + 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 + + + &Old Preferences Dialog... + Den &Gamla Inställningsdialogen... + + + Used the old Preferences Dialog + Använde den gamla inställningsdialogen + + + &Application Preferences... + &Programmets Inställningar... + + + Edit application preferences + Redigera programmets inställningar + + + 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 + + + Write Models and Settings to transmitter Skriv Modeller och Inställningar till sändaren - &Read Models and Settings From Tx - &Läs Modeller och Inställningar från sändaren + &Läs Modeller och Inställningar från sändaren - + Read Models and Settings from transmitter Läs Modeller och Inställningar från sändaren - + Write Firmware Skriv Firmware + + + New Models+Settings + Ny Modeller+Inställningar + + + + Create a new Models and Settings file + Skapa en ny Modeller och Inställningar-fil + + Open Models+Settings... + Öppna MOdeller+Inställningar... + + + + Save Models+Settings... + Spara Modeller+Inställningar... + + + + + Save Models and Settings file + Spara Modeller och Inställningar-fil + + + + Save Models+Settings as... + Spara Modeller+Inställningar som... + + + + Cut Model + Klipp ut Modell + + + + Cut current model to the clipboard + Klipp ut vald modell till klippbordet + + + + Copy Model... + Kopera Modell... + + + + Copy current model to the clipboard + Kopiera vald modell till klippbordet + + + + Paste Model... + Klistra in Modell... + + + + Paste model from clipboard + Klistra in modell från klippbordet + + + + The classic companion9x icon theme + Det klassiska companion9x-temat + + + + Yerico + Yerico + + + + Yellow round honey sweet icon theme + Yellow round honey sweet icon theme + + + Write firmware to transmitter Skriv firmware till sändaren - + Write Models and Settings from file to Tx Skriv Modeller och Inställningar från fil till sändaren - + Write Models and Settings from file to transmitter Skriv Modeller och Inställningar från fil till sändaren - Save transmitter Models and Settings to file - Spara sändarens Modeller och Inställningar till en fil + Spara sändarens Modeller och Inställningar till en fil @@ -1702,67 +2713,83 @@ Vill du ladda ned den nu ? Spara sändarens Modeller och Inställningar till en fil - + Read Firmware Läs Firmware - + Read firmware from transmitter Läs firmware från sändaren - + + Set Menu Language + Ställ in Menyspråk + + &Edit - &Redigera + &Redigera - - &Window - &Fönster - - - &Help - &Hjälp + &Hjälp - + + File Arkiv - + + Edit Redigera - + + Help Hjälp - + + + Radio Settings Profile + Radioprofil + + + + Show recent Models+Settings documents + Visa senaste Modeller+Inställningar-dokument + + + + Show a selection list of radio settings profiles + Visa en lista med radioprofiler + + + Ready Redo - Contributors &List... - &Bidragsgivare... + &Bidragsgivare... - + Display previous warning again at startup ? SKall föregående varning visas igen vid uppstart ? - + - + - - + + @@ -1774,21 +2801,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 - - - + + + Error opening file %1: @@ -1797,70 +2824,72 @@ Vill du ladda ned den nu ? %2. - + Compilation server termporary failure, try later Tillfälligt fel i byggservern. Försök igen senare - - + + Compilation server too busy, try later Byggservern är upptagen. Försök igen senare - - + + Unknown server failure, try later Okänt server-fel. Försök igen senare - Compare... - Jämför... + Jämför... - + Compare models 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 + Profiler för Firmware - &Read/Write - &Läs/Skriv + &Läs/Skriv - + Write Skriv - + + %2 + %2 + + + + Unable to find file %1! Kan inte hitta filen %1 ! @@ -1872,71 +2901,62 @@ Vill du ladda ned den nu ? %2. - &loadBackup... - ladda&Backup... + ladda&Backup... - + Load backup from file Ladda backup från fil - Lo&gs - &Loggar + &Loggar - Ctrl+G - Ctrl+G + Ctrl+G - Open log file - Öppna loggfil + Ö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? - - A new release of Companion is available please check the repository - En ny version av Companion finns tillgänglig. Kontrollera källkods-repository - - - - + + Compilation server requires registration, please check OpenTX web site Byggservern kräver registrering. Var god kontrollera OpenTX webbsida - + No Nej @@ -1954,12 +2974,40 @@ Vill du ladda ned den nu ? Vill du ladda ned firmware %1 nu ? - + Release notes contain very important informations. Do you want to see them now ? Release notes innehåller väldigt viktig information. Vill du läsa dem nu? - + + The selected language will be used the next time you start Companion. + Språket som valts kommer att användas nästa gång Companion startas. + + + + + + OK + OK + + + + The new theme will be loaded the next time you start Companion. + De nya ikonerna kommer att användas nästa gång Companion startas. + + + + The icon size will be used the next time you start Companion. + Ikonernas storlek kommer att justeras nästa gång Companion startas. + + + + + Open Models and Settings file + Öppna Modeller och Inställningar-fil + + + Firmware updates Firmware-uppdatering @@ -1971,13 +3019,14 @@ 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 ? @@ -1988,15 +3037,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? @@ -2006,23 +3055,24 @@ 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 @@ -2032,12 +3082,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 @@ -2047,12 +3097,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 @@ -2062,47 +3112,387 @@ 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 - - The Companion project was originally forked from eePe - Ursprungligen grenades Companion av från eePe - - - + About Companion Om Companion - + &Downloads and Profiles... + &Nedladdningar och Profiler... + + + Firmware and voice file downloads as well as profile definition. + Ladda ned firmware och röstfiler. Definera profildata. + + Check for new version of Companion - Sök efter ny version av Companion + Sök efter ny version av Companion - Show Companion contributors list - Visa vilka som bidragit till Companion + Visa vilka som bidragit till Companion - ChangeLog... - Förändringar... + Förändringar... - Firmware ChangeLog... - Firmware-förändringar... + Firmware-förändringar... + + + Show firmware changelog + Visa firmware-förändringar + + + Configure transmitter start screen... + Konfigurera sändarens startbild... + + + &Configure connection software... + Inställningar för &kommunikation... + + + New Profile + Ny Profil + + + + Create a new Radio Setting Profile + Lägg till en ny profil med radio-inställningar + + + Classic + Klassiskt + + + The multicolor classical Companion icon theme + Det flerfärgade klassiska Companion-temat + + + + A monochrome black icon theme + Ett monokromt svart tema - Show firmware changelog - Visa firmware-förändringar + A monochrome white icon theme + Ett monokromt vitt tema - + + A monochrome blue icon theme + Ett monokromt blått tema + + + + Small + Liten + + + + Use small toolbar icons + Använd små ikoner i verktygsfälten + + + + Use normal size toolbar icons + Använd normalstora ikoner i verktygsfälten + + + + Normal + Normal + + + + Use big toolbar icons + Använd stora ikoner i verktygsfälten + + + + Big + Stor + + + + Use huge toolbar icons + Använd mycket stora ikoner i verktygsfälten + + + + Huge + Mycket Stor + + + System default language + Systemspråk + + + Use system default language in menus + Använd systemspråket i menyerna (om tillgängligt) + + + + Czech + Czeckiska + + + + Use Czech in menus + Använd Tjeckiska i menyerna + + + + German + Tyska + + + + Use German in menus + Använd Tyska i menyerna + + + + English + Engelska + + + + Use English in menus + Använd Engelska i menyerna + + + + Finnish + Finska + + + + Use Finnish in menus + Använd Finska i menyerna + + + + French + Franska + + + + Use French in menus + Använd Franska i menyerna + + + + Italian + Italienska + + + + Use Italian in menus + Använd Italienska i menyerna + + + + Hebrew + Hebreiska + + + + Use Hebrew in menus + Använd Hebreiska i menyerna + + + + Polish + Polska + + + + Use Polish in menus + Använd Polska i menyerna + + + + Portuguese + Portugisiska + + + + Use Portuguese in menus + Använd Portugisiska i menyerna + + + + Swedish + Svenska + + + + Use Swedish in menus + Använd Svenska i menyerna + + + + Russian + Ryska + + + + Use Russian in menus + Använd Ryska i menyerna + + + + About... + Om... + + + + Print... + Skriv Ut... + + + + Simulate... + Simulera... + + + + Simulate current model + Simulera vald modell + + + + Load Backup... + Ladda backup från fil... + + + + View Log File... + Visa loggfil... + + + + Open and view log file + Öppna och visa loggfil + + + + Settings... + Inställningar... + + + + Download... + Nedladdning... + + + + Check for Updates... + Sök efter uppdateringar... + + + + Check OpenTX and Companion updates + Sök efter uppdateringar av Companion och OpenTX + + + + Companion Changes... + Förändringar i Companion... + + + + Show Companion change log + Visa en lista med förändringar av Companion + + + + Firmware Changes... + OpenTX-förändringar... + + + + Show firmware change log + Visa en lista med förändringar av OpenTX + + + + Compare Models... + Jämför modeller... + + + + Edit the splash image of your TX + Editera startbilden' för din sändare + + + + List programmers... + Visa programmerare... + + + + Add Radio Profile + Lägg till Radioprofil + + + + Manuals and other Documents + Manualer och andra Dokument + + + + Open the OpenTX document page in a web browser + Öppna OpenTX dokumentsida i en webbläsare + + + + Configure Communications... + Kommunikations-inställningar... + + + + Configure software for communicating with the transmitter + Ställ in mjukvara för kommunikation med sändaren + + + + Contributors... + Bidragande... + + + + + Recent Models+Settings + Senaste Modell+Inställnings-filer + + + + Set Icon Theme + Ställ in Ikontema + + + + Set Icon Size + Ställ in Ikonstorlek + + + &Settings + &Inställningar + + + Radio Settings Profiles + Profiler för Radioinställningar + + + Invalid Models and Settings File %1 Filen innehåller inte Modeller och Inställningar: %1 @@ -2116,7 +3506,7 @@ Starta skrivningen i alla fall ? MdiChild - + @@ -2124,14 +3514,15 @@ Starta skrivningen i alla fall ? - + - - + + + @@ -2139,36 +3530,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. - + @@ -2194,12 +3585,12 @@ Starta skrivningen i alla fall ? %2. - + free bytes bytes lediga - + Invalid EEPROM File %1 Ogiltig modelldatafil %1 @@ -2210,43 +3601,43 @@ Starta skrivningen i alla fall ? Ogiltig binär modelldatafil %1 - + %1 has been modified. Do you want to save your changes? %1 har förändrats. Vill du spara förändringarna? - + Cannot write temporary file! En temporär fil kunde inte skrivas! - + Backup is impossible 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 + Den katalog som konfigurerats för säkerhetskopiering existerar inte - - - + + + 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? @@ -2259,7 +3650,7 @@ Vill du spara förändringarna? Firmware in radio is of a different family of eeprom written, check file and preferences! - sändarens firmware är av en annan typ än den aktuella. Kontrollera Arkiv och Inställningar! + sändarens firmware är av en annan typ än den aktuella. Kontrollera konfigurationen! @@ -2267,9 +3658,13 @@ Vill du spara förändringarna? Firmware i flashminnet är föråldrat. Var god uppgradera! - + + Open backup Models and Settings file + Öppna Modeller och Inställningar-fil + + Open - Öppna + Öppna @@ -2278,25 +3673,25 @@ Vill du spara förändringarna? - - + + 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? @@ -2309,70 +3704,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... @@ -2400,12 +3792,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. @@ -2437,12 +3829,7 @@ Anger hur mixervärden påverkar kanalen. Ersätt - - Enable FM Trim - Slå på FM-Trim - - - + Delay Fördröjning @@ -2490,18 +3877,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 @@ -2511,7 +3892,7 @@ p, li { white-space: pre-wrap; } Nej - + Rud Rod @@ -2531,22 +3912,17 @@ p, li { white-space: pre-wrap; } Ske - + Name Namn - - - Curve/Differential - Kurva/Diff - Include DR/Expo Inkludera DR/Expo - + 0 0 @@ -2591,940 +3967,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) @@ -3539,233 +4070,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? @@ -3775,1309 +4228,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 @@ -5204,11 +4363,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 @@ -5228,12 +4519,12 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga P3 - + MAX MAX - + A1 A1 @@ -5253,73 +4544,15 @@ 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 + th9x - er9x - er9x + er9x - - - Er9x doesn't accept this protocol - Er9x accepterar inte detta protokoll - - - + Trainer Trainer @@ -5354,21 +4587,21 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Spela ljud - + Start Logs Starta loggning - - - - + + + + ---- ---- - - + + Rud Rod @@ -5391,99 +4624,57 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Ske - - 3POS - 3POS - - - - - + + + + Timer1 Timer1 - - - + + + + Timer2 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 + 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 @@ -5518,7 +4709,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 @@ -5528,100 +4916,36 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga PPM%1 - - - + THR GAS - - - RUD - ROD - - - - - ELE - HÖJ - - - - ID0 - ID0 - - - - ID1 - ID1 - - - - ID2 - ID2 - - - - - AIL - SKE - - - - - GEA - LAN - - - - - TRN - TRN - - - - + + ON På - + + OFF 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 @@ -5641,49 +4965,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga 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 Spela Vibration @@ -5693,29 +4975,31 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Nollställ - + Vario Vario - - + + + All För alla händelser - - + + + Telemetry Telemetri - + Play Value Spela Värde - + Cels Celsius @@ -5735,12 +5019,12 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga VHastighet - + A1- A1- - + A2- A2- @@ -5780,12 +5064,12 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Avstånd+ - + Cur+ Ström+ - + ACC ACC @@ -5795,63 +5079,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga 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 Nej @@ -5881,7 +5109,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Inm.Hjul E - + Play Track Spela Spår @@ -5896,22 +5124,7 @@ 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 @@ -5926,36 +5139,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 @@ -5979,8 +5174,13 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Stöd för att ta emot NMEA-data - - + + OpenTX for 9X board + OpenTX för 9X + + + + @@ -5988,8 +5188,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 - - + + @@ -5998,16 +5198,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 - - + + @@ -6016,16 +5216,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 - - + + @@ -6033,21 +5233,46 @@ 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 Används om vibrator monterats i sändaren - + + OpenTX for M128 / 9X board + OpenTX för 9X med m128-processor + + + + OpenTX for 9XR + OpenTX för 9XR + + + + OpenTX for 9XR with M128 chip + OpenTX för 9XR med m128-processor + + + + OpenTX for Gruvin9x board / 9X + OpenTX för 9X med Gruvin9X-kort + + + Support of FrSky PXX protocol Stöd för FrSky PXX-protokoll - - + + OpenTX for FrSky Taranis Rev4a + OpenTX för FrSky Taranis Rev4a + + + + @@ -6055,8 +5280,8 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Stöd för DSM2-moduler - - + + @@ -6065,8 +5290,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 - - + + @@ -6075,8 +5300,8 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Symetriska Gränser - - + + @@ -6084,14 +5309,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 - - + + @@ -6100,16 +5325,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 - - + + @@ -6118,8 +5343,8 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Använd inte grafiska kontroller - - + + @@ -6136,8 +5361,8 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Visa skrivning av modelldata - - + + @@ -6145,8 +5370,8 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga British Imperial Units - - + + @@ -6165,31 +5390,17 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Stöd för DSM2-moduler via ppm istället för via seriellt gränssnitt - + + OpenTX for Sky9x board / 9X + OpenTX för 9X med Sky9X-kort + + + Enable HELI menu and cyclic mix support 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 @@ -6199,19 +5410,21 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga X%1 - - + + + GV%1 GV%1 - - + + + --- ---- - + Rud Trim Rod.Trim @@ -6241,7 +5454,17 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Svenska - + + Polish + Polska + + + + CH%1 + KN%1 + + + Background Music Bakgrundsmusik @@ -6251,32 +5474,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 @@ -6286,50 +5484,46 @@ 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 - + - + PPM values displayed in us PPM-värden visade i ms - + Bluetooth interface Blåtandsinterface - - + + S1 S1 @@ -6352,7 +5546,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga RS - + Batt Batt @@ -6397,50 +5591,271 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga HDG - - + + ASpd + + + + + dTE + + + + + Cel- + + + + + Vfs- + + + + + RudTrim Left + RoderTrim Vänster + + + + RudTrim Right + RoderTrim Höger + + + + EleTrim Down + HöjdTrim Ned + + + + EleTrim Up + HöjdTrim Upp + + + + ThrTrim Down + GasTrim Ned + + + + ThrTrim Up + GasTrim Upp + + + + AilTrim Left + SkevTrim Vänster + + + + AilTrim Right + SkevTrim Höger + + + + ABS + ABS + + + + THs + + + + + TH% + + + + + THt + + + + + ??? + ??? + + + + a>x + a>x + + + + a<x + a<x + + + + |a|>x + |a|>x + + + + |a|<x + |a|<x + + + + AND + OCH + + + + OR + ELLER + + + + XOR + XOR + + + + a=b + a=b + + + + a!=b + a!=b + + + + a>b + a>b + + + + a<b + a<b + + + + a>=b + a>=b + + + + a<=b + a<=b + + + + d>=x + d>=x + + + + |d|>=x + |d|>=x + + + + a~x + a~x + + + + Timer + Timer + + + + Sticky + Klistrig + + + + Stay + Håll + + + + Unknown + Okänd + + + + STAY(%1, [%2:%3]) + HÅLL(%1, [%2:%3]) + + + + STICKY(%1, %2) + KLISTRIG(%1, %2) + + + + TIMER(%1, %2) + TIMER(%1, %2) + + + + Set Timer %1 + Stääll in Timer %1 + + + + No repeat Repetera ej - + %1 sec %1 sek - + Play Both Spela båda - + + Adjust GV%1 + Justera GV%1 + + + + + + <font color=red><b>Inconsistent parameter</b></font> <font color=red><b>Ogiltig parameter</b></font> - + + Value Värde - + + Decr: Minsk: - + + Incr: Öka: - + + Played once, not during startup + Spelas en gång, ej vid uppstart + + + %1s %1s - + Value Värde @@ -6460,7 +5875,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Ökning - + Yellow Gul @@ -6491,11 +5906,12 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga + None Ingen - + Imperial Imperial @@ -6505,7 +5921,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Metrisk - + Extra Fine Extrafin @@ -6550,7 +5966,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 @@ -6570,18 +5996,13 @@ 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 - - openTx for 9X board - openTx för 9X - - - - + + @@ -6590,67 +6011,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Batteriikon - - openTx for M128 / 9X board - openTx för 9X/9XR med M128-processor - - - - openTx for Gruvin9x board / 9X - openTx för 9X med Gruvin9x - - - - openTx for Sky9x board / 9X - openTx for 9X med Sky9x - - - - openTx for FrSky Taranis - openTx för FrSky Taranis - - - - SA - SA - - - - SB - SB - - - - SC - SC - - - - SD - SD - - - - SE - SE - - - - SF - SF - - - - SG - SG - - - - SH - SH - - - + SWR SWR @@ -6660,258 +6021,108 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga RSSI - + Pwr+ - - - CS1 - LB1 + + S11 + S11 - - - CS2 - LB2 + + S12 + S12 - - - CS3 - LB3 + + S13 + S13 - - - CS4 - LB4 + + S14 + S14 - - - CS5 - LB5 + + S15 + S15 - - - CS6 - LB6 + + S16 + S16 - - - CS7 - LB7 + + S21 + S21 - - - CS8 - LB8 + + S22 + S22 - - - CS9 - LB9 + + S23 + S23 - - - CSA - LBA + + S24 + S24 - - - CSB - LBB + + S25 + S25 - - - CSC - LBC + + S26 + S26 - - - CSD - LBD + + Diff(%1) + Diff(%1) - - - CSE - LBE + + Expo(%1) + Expo(%1) - - - CSF - LBF + + Function(%1) + Funktion(%1) - - - CSG - LBG + + Curve(%1) + Kurva(%1) - - - CSH - LBH + + !Curve(%1) + !Kurva(%1) - - - 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 - - - - !ONE - !ONE - - - - TRNs - TRNs - - - - TRNl - TRNl - - - - REAs - REAs - - - - REAl - REAl - - - - er9x doesn't have negative gvars as weight - er9x kan inte använda negativa gvar-värden som vikter - - - - er9x doesn't have negative gvars as offset - er9x kan inte använda negativa gvar-värden som offset - - - - - - - Flight modes settings on expos not exported - Flygmod-inställningar för expos stöds inte - - - + FM%1 FM%1 - + + Input%1 + Filter%1 + + + English Engelska @@ -6951,97 +6162,75 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga Portugisiska - - CH - KN + + Finnish + Finska - + !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 - - + + @@ -7050,105 +6239,89 @@ 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 - - + + - + Use alternative SQT5 font Anvä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 - - openTx for 9XR - openTX för 9XR + + 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 with M128 chip - openTX för 9XR med M128-CPU - - - + Use FrSky Taranis sticks in a 9X/9XR Använd spakar från FrSky Taranis i 9X/9XR - - + + OpenTX for FrSky Taranis + OpenTx för FrSky Taranis + + + + Disable HELI menu and cyclic mix support Slå av HELI-menyn och stöd för cykliska mixar - - + + Disable TEMPLATES menu Slå av menyn för Mallar - - + + Disable Global variables Slå av Globala Variabler - - openTx for FrSky Taranis Rev4a - openTX 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 @@ -7170,6 +6343,1426 @@ Vi uppskattar ert stöd! Gruppen bakom OpenTX/Companion. + + + Trim disabled + Trim inaktiv + + + + Own Trim + Egen trim + + + + Use Trim from Flight mode %1 + Använd trim från flygläge %1 + + + + Use Trim from Flight mode %1 + Own Trim as an offset + Använd trim från flygläge %1 + Eget trim som offset + + + + FW: %1 + FW: %1 + + + + Pict: %1 + Bild: %1 + + + + Profile image + Profilbild + + + + 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 + + + + Switch Warnings + Brytarvarningar + + + + Exponential + Exponentiella + + + + Extra Fine + Extrafina + + + + Fine + Fina + + + + Medium + Medium + + + + Coarse + Grova + + + + Extended Limits + Utökade gränser + + + + Extended Trims + Utökade trimmar + + + + Display Checklist + Visa Checklista + + + + 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 + + + + Pot Warnings + Pot-varningar + + + + Manual + Manuella + + + + Auto + Automatiska + + + + SimulatorDialog + + + + Warning + Varning + + + + Joystick enabled but not configured correctly + Joysticken påslagen, men ej rätt inställd + + + + Cannot open joystick, joystick disabled + Joysticken kan inte hittas. Joysticken stängs av + + + + Simulating Tx (%1) + Simulerar sändare (%1) + + + + Firmware %1 error: %2 + Firmware %1 fel: %2 + + + + SimulatorDialog9X + + + Companion Simulator + Companion Simulator + + + + + + + Right Double Click to Reset + Höger dubbelklick nollställer + + + + THR + GAS + + + + RUD + ROD + + + + ELE + HÖJ + + + + AIL + SKE + + + + + Hold X + Håll X + + + + + Fix X + Fixera X + + + + + Fix Y + Fixera Y + + + + + Hold Y + Håll Y + + + + + + + TextLabel + Textettikett + + + + TRN + TRN + + + + GEA + LAN + + + + ID0 + ID0 + + + + ID1 + ID1 + + + + ID2 + ID2 + + + + BEEP + Summer + + + + P1 + P1 + + + + + + 0 % + 0 % + + + + P2 + P2 + + + + P3 + P3 + + + + 9x Simulator + Simulator för 9x + + + + Outputs + Utgångar + + + + SimulatorDialogTaranis + + + Companion Simulator + Companion Simulator + + + + + Hold Y + Håll Y + + + + + Fix Y + Fixera Y + + + + + Fix X + Fixera X + + + + + Hold X + Håll X + + + + + SD + SD + + + + + SC + SC + + + + + + + Right Double Click to Reset + Höger dubbelklick nollställer + + + + + S2 + S2 + + + + + SG + SG + + + + + RS + RS + + + + + SH + SH + + + + + + + TextLabel + Textettikett + + + + + S1 + S1 + + + + + SB + SB + + + + + SA + SA + + + + + SE + SE + + + + + + SF + SF + + + + + LS + LS + + + + Taranis Simulator + Taranissimulator + + + + Outputs + Utgångar + + + + 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 + + + + 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 + + + + TelemetryCustomScreen + + + Form + Form + + + + Custom Screen Type + Visa data som + + + + Nums + Nummer + + + + Bars + Staplar + + + + Min + Min + + + + Source + Ursprung + + + + Gauge + Mätare + + + + Max + Max + + + + TelemetryPanel + + + Telemetry screen %1 + Telemetriskärm %1 + + + + 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 + + + + appPreferencesDialog + + Application Preferences + Programmets Inställningar + + + + Simulator capture folder + Lagra simulatorbilder i + + + + Remember simulator switch values + Spara läget för alla brytare i simulatorn + + + + + + + Open Folder + Öppna katalog + + + + User Splash Screens + Egna Startbilder + + + + Edit Settings + Redigera Inställningar + + + + Application Settings + Programmet + + + + Only show user splash images + Enbart användarens bilder + + + + Show user and companion splash images + Både användarens bilder och Companion-bilder + + + + Simulator Settings + Simulatorn + + + + Blue + Blå + + + + Green + Grön + + + + Red + Röd + + + + Orange + Orange + + + + Yellow + Gul + + + Radio Settings + Radion + + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + Välj Mode: + +Mode 1: + Vänster spak: Höjdroder, Sidroder + Höger spak: Gas, Skevroder + +Mode 2: + Vänster spak: Gas, Sidroder + Höger spak: Höjdroder, Skevroder + +Mode 3: + Vänster spak: Höjdroder, Skevroder + Höger spak: Gas, Sidroder + +Mode 4: + Vänster spak: Gas, Skevroder + Höger spak: Höjdroder, Sidroder + + + + + + Mode 1 (RUD ELE THR AIL) + Mode 1 (ROD HÖJ GAS SKE) + + + + Mode 2 (RUD THR ELE AIL) + Mode 2 (ROD GAS HÖJ SKE) + + + + Mode 3 (AIL ELE THR RUD) + Mode 3 (SKE HÖJ GAS ROD) + + + + Mode 4 (AIL THR ELE RUD) + Mode 4 (SKE GAS HÖJ ROD) + + + + Channel order + +This is used by the templated to determine which channel goes to what number output. + Kanalordning + +Detta används av mallen för att koppla kanal till output-nummer. + + + + R E T A + R H G S + + + + R E A T + R H S G + + + + R T E A + R G H S + + + + R T A E + R G S H + + + + R A E T + R S H G + + + + R A T E + R S G H + + + + E R T A + H R G S + + + + E R A T + H R S G + + + + E T R A + H G R S + + + + E T A R + H G S R + + + + E A R T + H S R G + + + + E A T R + H S G R + + + + T R E A + G R H S + + + + T R A E + G R S H + + + + T E R A + G H R S + + + + T E A R + G H S R + + + + T A R E + G S R H + + + + T A E R + G S H R + + + + A R E T + S R H G + + + + A R T E + S R G H + + + + A E R T + S H R G + + + + A E T R + S H G R + + + + A T R E + S G R H + + + + A T E R + S G H R + + + + Default Stick Mode + Spaktilldelning + + + + Firmware File + Firmware + + + Settings Profile + Profil + + + + Splash Screen + Startbild + + + + Channel Order + Kanalordning + + + + Append version number to FW file name + Addera versionsnumret till FW-filnamnet + + + + SD Structure path + Sökväg till SD-struktur + + + + Firmware Variant + Firmware-typ + + + + Select Image + Välj Bild + + + + Offer to write FW to Tx after download + Skriv FW till Tx efter nedladdning + + + + Radio Settings Profile + Radioprofile + + + + Profile Name + Profilnamn + + + + Remove Profile + Ta bort Profil + + + + Clear Image + Ta bort Bild + + + Firmware + Firmware + + + Include companion splashes + Användarens bilder och Companion-bilder + + + Only user defined splashes + Enbart användarens bilder + + + + Splash Screen Library + Bibliotek för startbilder + + + + Files to keep + Behåll filer + + + + Simulator BackLight + Simulatorbelysning + + + + Automatic Backup Folder + Säkerhetskopiera till folder + + + + Only capture to clipboard + Spara bara bilder till Urklipp + + + + Joystick + Joystick + + + + Find Executable + Sök Program + + + + Google Earth Executable + Sökväg till Google Earth + + + + Calibrate + Kalibrera + + + + Enable + Aktivera + + + + Show splash screen when Companion starts + Visa en start-bild då Companion startas + + + + Automatic check for OpenTX firmware updates + Sök automatiskt efter uppdateringar av OpenTX + + + + Automatic check for Companion updates + Sök automatiskt efter uppdateringar av Companion + + + + Offer to use wizard for new models + Erbjud användning av modellguiden för nya modeller + + + + Enable automatic backup before writing firmware + Säkerhetskopiera innan firmware-skrivning + + + + Select your snapshot folder + Välj katalog för snapshots av Tx-simulatorn + + + + + No joysticks found + Ingen joystick hittades + + + + Select your library folder + Välj bibliotekskatalog + + + + 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 + + + + Select the folder replicating your SD structure + Välj katalog med en kopia av din SD-struktur + + + + Not possible to remove profile + Det går inte att ta bort profilen + + + + The default profile can not be removed. + Standard-profilen kan inte tas bort. + + + Error + Fel + + + Cannot load %1. + Det går inte att ladda %1. + + + + Open Image to load + Öppna bild för laddning + + + + Images (%1) + Bilder (%1) + avrOutputDialog @@ -7436,7 +8029,7 @@ 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 @@ -7459,7 +8052,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? @@ -7512,7 +8105,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. @@ -7522,7 +8115,7 @@ m2560 för v4.1-kort Inställningar för Programmerare - + DFU-UTIL Configuration Inställningar för DFU-UTIL @@ -7537,8 +8130,8 @@ m2560 för v4.1-kort Inställningar för AVRDUDE - - + + Companion Companion @@ -7548,15 +8141,15 @@ m2560 för v4.1-kort Customize Splash - Välj Startbild + Välj Sändarens Startbild - + Date & Time Dag & Tid - + SVN Subversion @@ -7566,130 +8159,121 @@ m2560 för v4.1-kort Tillåter Companon att skriva till äldre firmware-versioner - Load Image - Ladda Bild + Ladda Bild - Open Splash Library - Öppna bildbibliotek + Öppna bildbibliotek - ... - ... + ... - Substitute image in firmware - Byt ut bilden i firmware-filen + Byt ut bilden i firmware-filen - - + Write to TX Skriv till sändaren - Use image in settings - Använd bilden från inställningarna + Använd bilden från inställningarna - Invert Color - Invertera Bilden + Invertera Bilden - + Check Firmware compatibility Kontrollera att firmware-filen är kompatibel - + Cancel Avbryt - + Write firmware to TX Skriv firmware till sändaren - Open - Öppna + Öppna - - + + - - + + Warning Varning - Burn anyway ! - Starta bränningen! + Starta bränningen! - Open Image to load - Öppna bilden som skall laddas + Öppna bilden som skall laddas - + Images (%1) Bilder (%1) - + - - - - - + + + + + + + + Error 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. + Det går inte att ladda %1. - + Cannot save customized firmware Det gick inte att spara den modifierade firmware-filen @@ -7699,12 +8283,12 @@ m2560 för v4.1-kort Bildfilen hittades inte - + No firmware selected Ingen firmware har valts - + Wrong radio calibration data in profile, Settings not patched Felaktig information i profilen, sändarens-kalibrering kunde inte läsas in @@ -7714,12 +8298,11 @@ 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 + %1 är inte en fimware-fil - + <html><head/><body><p>Modify calibration parameters using settings from current profile</p></body></html> <html><head/><body><p>Uppdatera kalibrerings-parametrarna med data från nuvarande profil</p></body></html> @@ -7739,8 +8322,8 @@ m2560 för v4.1-kort Uppdatera med HW-inställningar från profilen - - + + Browse for file Välj fil @@ -7755,19 +8338,49 @@ m2560 för v4.1-kort Nuvarande Profil - + + Use firmware start screen + Använd firmware-startskärmen + + + + Use another start screen + Använd en annan startskärm + + + + Use profile start screen + Använd profilens startskärm + + + + Use library start screen + Använd biblioteks-startskärm + + + Current profile Nuvarande profil - + + Open Firmware File + Öppna firmware-fil + + + + %1 may not be a valid firmware file + %1 är kanske inte en giltig firmware-fil + + + Unable to find file %1! Kan inte hitta filen %1 ! - - + + Error opening file %1: %2. Fel vid öppning av filen %1: @@ -7781,7 +8394,37 @@ m2560 för v4.1-kort %2. - + + The firmware file is not valid. + Firmware-filen är inte giltig. + + + + There is no start screen image in the firmware file. + Firmware-filen innehåller inte någon startbild. + + + + The profile image %1 does not contain an image. + Profil-bilden %1 innehåller inte någon startbild. + + + + Open image file to use as Tx start screen + Öppna bildfil för användning som radions startsskärm + + + + Image could not be loaded from %1 + Det gick inte att ladda en bild från %1 + + + + The library image could not be loaded + Bild-biblioteket kunde inte öppnas + + + Cannot write file %1: %2. @@ -7796,7 +8439,7 @@ m2560 för v4.1-kort %2. - + Variant Variant @@ -7804,12 +8447,16 @@ m2560 för v4.1-kort compareDialog - Dialog - Dialog + Dialog - + + Compare Models + Jämför Modeller + + + Drag first model here Dra hit första modellen @@ -7930,19 +8577,17 @@ m2560 för v4.1-kort - - - - - + + + + + - - Switch Brytare - + IN IN @@ -7962,33 +8607,33 @@ m2560 för v4.1-kort - - - - + + + + Offset Offset - + - - + + Min Min - + - - + + Max Max - + Invert @@ -7999,13 +8644,12 @@ m2560 för v4.1-kort - - + CH KN - + INV INV @@ -8023,64 +8667,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 @@ -8108,12 +8730,7 @@ m2560 för v4.1-kort 9-punktskurva - - Custom Switches - Logiska Brytare - - - + Function Funktion @@ -8124,106 +8741,120 @@ m2560 för v4.1-kort CF - + Telemetry Settings Inställningar för Telemetri - + Analog Analog - - + + Unit Enhet - - + + Scale Skala - + - + A%1 A%1 - - + + Alarm 1 Alarm 1 - - + + Alarm 2 Alarm 2 - + - + Type Typ - + - + Condition Villkor - + - - - + Value Värde - - + + Logical Switches + Logiska Brytare + + + + + LS + LB + + + + Switch Assignment + BrytarEffekter + + + + RSSI Alarm RSSI-alarm - - + + Telemetry Bars Telemetri-staplar - - + + Bar Number Stapelnummer - - + + Source Källa - - + + Custom Telemetry View Egna inställning av telemetriskärmen - + Print Document Skriv dokument @@ -8233,27 +8864,21 @@ m2560 för v4.1-kort Välj PDF-fil att skriva till - + No name Inget namn - + + + - - DISABLED INAKTIV - - - CS - LB - - - + Param Param @@ -8265,7 +8890,7 @@ m2560 för v4.1-kort Slå på - + Gvars Gvars @@ -8288,25 +8913,15 @@ m2560 för v4.1-kort GV - - Custom Functions - Specialfunktioner - - - + Repeat Upprepa - - Safety Switches - Säkerhetsbrytare - - - + Flight modes Settings - Inställningar för flygmod + Inställningar för flyglägen @@ -8314,7 +8929,7 @@ m2560 för v4.1-kort Flight mode name - Namn för flygmod + Namn för flygläget @@ -8331,20 +8946,20 @@ m2560 för v4.1-kort FM - + + + - - Flight modes - Flygmoder + Flyglägen - + + + - - Flight mode - Flygmod + Flygläge @@ -8355,41 +8970,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 the fantastic eePe program -which was the staring point for OpenTX Companion. - All heder åt Rafal Tomczak (RadioClone) och Thomas Husterer (th9x) naturligtvis. -Dessutom till Erez Raviv (er9x) och hans fantastiska eePe, från vilken -OpenTX Companion 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 - + OpenTX Release Notes OpenTX Release Notes @@ -8397,67 +9008,123 @@ OpenTX Companion grenades av. customizeSplashDialog - - Customize Splash - Ställ in Startbild + + Transmitter Splash Screen Editor + Startbildsredigerare - - Save Image - Spara bild + + + Invert + Invertera - - Invert Color - Invertera bild + + + Load FW + Ladda FW - - Load Firmware - Ladda firmware + + + Load Pict + Ladda Bild - - Load Image - Ladda bild + + + Load Profile + Ladda Profil - + + + Save + Spara + + + + Open Splash Library Öppna bildbibliotek - - - - Select an original firmware file - Välj original-firmware - - - Open - Öppna + Ö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 + Cannot load embedded FW image from %1. + Det gick inte att ladda bild från FW-filen %1. + + + + Open Firmware File + Öppna firmware-fil + + + + Can not load embedded image from firmware file %1. + Det gick inte att ladda bild från firmware-filen %1. + + + + Cannot load the image file %1. + Det gick inte att ladda bildfilen %1. + + + + Cannot load the profile image %1. + Det gick inte att ladda profilbilden %1. + Cannot load the library image %1. + Det gick inte att ladda biblioteks-bilden %1. + + + + File Saved + Filen sparades + + + + The image was saved to the file %1 + Bilden sparades till filen %1 + + + + Image Refresh Error + Fel vid återläsning av bild + + + + Failed to refresh image from file %1 + Det gick inte att återladda bilden från filen %1 + + + + File Save Error + Fel vid filskrivning + + + + Failed to write image to %1 + Filen %1 kunde inte skrivas + + + 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 @@ -8467,66 +9134,25 @@ OpenTX Companion grenades av. Bilder (%1) - - Cannot load %1. - Kunde inte ladda %1. + Kunde inte ladda %1. - - - Save your custimized firmware - Spara din modifierade firmware-fil + Could not store image in firmware file %1 + Det gick inte att spara bilden i firmware-filen %1 - - - Write to file - Skriv till fil + The image file %1 could not be stored + Det gick inte att spara bilden i filen %1 - - Error reading file %1 - Fel vid läsning från filen %1 - - - - Firmware correctly saved. - Firmware sparades. - - - - Firmware not saved. - Firmware sparades inte. - - - - PNG images (*.png);; - PNG bilder (*.png);; - - - + + + + ... ... - - - <!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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<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> - <!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:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<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 - downloadDialog @@ -8536,7 +9162,7 @@ p, li { white-space: pre-wrap; } Nedladdning: - + Unable to save the file %1: %2. Kan ej spara filen %1: %2. @@ -8559,7 +9185,7 @@ p, li { white-space: pre-wrap; } Säkringar - + Read Fuses Läs in säkringarna @@ -8692,10 +9318,263 @@ 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-family:'MS Shell Dlg 2'; font-size:8pt;">Om du ändå råkar låsa sändaren så googla på &quot;dealing with Fuse Bricks&quot;.</span></p></body></html> + + fwPreferencesDialog + + + Downloads + Nedladdningar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CheckBox + Kryssruta + + + + Set language of voice. +May be different from firmware language + Välj språk för röstfunktioner. +Får skilja från språket för firmware + + + SD Structure path + Sökväg till SD-struktur + + + + Processor ID + Processortyp + + + Default Stick Mode + Spaktilldelning + + + Channel Order + Kanalordning + + + Mode selection: + +Mode 1: + Left stick: Elevator, Rudder + Right stick: Throttle, Aileron + +Mode 2: + Left stick: Throttle, Rudder + Right stick: Elevator, Aileron + +Mode 3: + Left stick: Elevator, Aileron + Right stick: Throttle, Rudder + +Mode 4: + Left stick: Throttle, Aileron + Right stick: Elevator, Rudder + + + Välj Mode: + +Mode 1: + Vänster spak: Höjdroder, Sidroder + Höger spak: Gas, Skevroder + +Mode 2: + Vänster spak: Gas, Sidroder + Höger spak: Höjdroder, Skevroder + +Mode 3: + Vänster spak: Höjdroder, Skevroder + Höger spak: Gas, Sidroder + +Mode 4: + Vänster spak: Gas, Skevroder + Höger spak: Höjdroder, Sidroder + + + + + Mode 1 (RUD ELE THR AIL) + Mode 1 (ROD HÖJ GAS SKE) + + + Mode 2 (RUD THR ELE AIL) + Mode 2 (ROD GAS HÖJ SKE) + + + Mode 3 (AIL ELE THR RUD) + Mode 3 (SKE HÖJ GAS ROD) + + + Mode 4 (AIL THR ELE RUD) + Mode 4 (SKE GAS HÖJ ROD) + + + + Options + Val + + + Channel order + +This is used by the templated to determine which channel goes to what number output. + Kanalordning + +Används av mallarna för att koppla ihop kanaler med numrerade utgångar. + + + Open Folder + Öppna Katalog + + + Offer to write FW to Tx after download + Skriv FW till Tx efter nedladdning + + + Downloads and Profiles + Nedladdning och Profiler + + + Save Profile + Spara Profil + + + + Menu Language + Menyspråk + + + Profile + Profil + + + + Voice Language + Röstspråk + + + + Firmware Type + Firmware-typ + + + Append version number to FW file name + Addera versionsnumret till FW-filnamnet + + + + Download Voice + Ladda Röstfiler + + + + FwInfo + --- + + + Open Image + Öppna bild + + + Clear Image + Ta bort Bild + + + + Download FW + Ladda ned Firmware + + + + Check for updates + Sök efter uppdateringar + + + + Last downloaded release: %1 + Senast nedladdade release: %1 + + + + 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. + + + Select the folder replicating your SD structure + Välj katalog med en kopia av din SD-struktur + + + 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? + + + Open Image to load + Öppna bildfil för laddning + + + Images (%1) + Bilder (%1) + + + Error + Fel + + + Cannot load %1. + Kan inte ladda %1. + + joystickDialog - + Configure Joystick Ställ in Joystick @@ -8844,7 +9723,7 @@ p, li { white-space: pre-wrap; } OK - + Move sticks and pots in every direction making full movement Press next when finished Rör spakar och pottentiometrar. Ge fulla utslag. @@ -8895,7 +9774,7 @@ Tryck på Avbryt för att avburyta kalibreringen Dubblerad koppling av spak - + @@ -8927,7 +9806,7 @@ Tryck på Avbryt för att avburyta kalibreringen Companion Logg-läsare - + Filename Filnamn @@ -8937,7 +9816,7 @@ Tryck på Avbryt för att avburyta kalibreringen Öppna Loggfil - + Zoom Zoom @@ -8952,7 +9831,7 @@ Tryck på Avbryt för att avburyta kalibreringen Y - + Telemetry logs Telemetriloggar @@ -8962,7 +9841,7 @@ Tryck på Avbryt för att avburyta kalibreringen Tid - + Error Fel @@ -8974,7 +9853,7 @@ Tryck på Avbryt för att avburyta kalibreringen %2. - + Select your log file Välj loggfil @@ -9010,7 +9889,7 @@ Tryck på Avbryt för att avburyta kalibreringen Guide för modellkonfiguaration - + Engine Motor @@ -9424,7 +10303,7 @@ Tryck på Avbryt för att avburyta kalibreringen Dubbla Sidoroder (med 2 servon) - + Apply configuration ? Tillämpa inställningarna? @@ -9442,38 +10321,29 @@ Tryck på Avbryt för att avburyta kalibreringen preferencesDialog + Preferences - Inställningar + Konfiguration - - Language (requires restart) - Språk (kräver omstart) - - - - Show Splash Screen - Visa Startbild - - - + 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. @@ -9482,12 +10352,17 @@ 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 - + Mode selection: Mode 1: @@ -9548,61 +10423,188 @@ Mode 4: Mode 4 (SKE GAS HÖJ ROD) - + Automatic Backup Folder Säkerhetskopiera till folder - + + R E T A + R H G S + + + + R E A T + R H S G + + + + R T E A + R G H S + + + + R T A E + R G S H + + + + R A E T + R S H G + + + + R A T E + R S G H + + + + E R T A + H R G S + + + + E R A T + H R S G + + + + E T R A + H G R S + + + + E T A R + H G S R + + + + E A R T + H S R G + + + + E A T R + H S G R + + + + T R E A + G R H S + + + + T R A E + G R S H + + + + T E R A + G H R S + + + + T E A R + G H S R + + + + T A R E + G S R H + + + + T A E R + G S H R + + + + A R E T + S R H G + + + + A R T E + S R G H + + + + A E R T + S H R G + + + + A E T R + S H G R + + + + A T R E + S G R H + + + + A T E R + S G H R + + + Firmware Firmware - + 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 - + @@ -9648,146 +10650,149 @@ Mode 4: Kryssruta - + Check for updates Sök efter uppdateringar - + + Blue Blu Blå + Green Grön + Red Röd + Orange Orange + Yellow Gul - + + Enable Slå på - + + Remember simulator switches + Spara läget simulator-brytarna + + + + Calibrate Kalibrera - + + Open Image Öppna bild - + + Invert Pixels Invertera bild - + FwInfo Firmware-info - Last downloaded release: %1 - Senast nedladdade release: %1 + Senast nedladdade release: %1 - - No joysticks found - Ingen joystick hittades + Ingen joystick hittades - Select your Models and Settings backup folder - Välj folder för automatisk säkerhetskopiering + Välj folder för automatisk säkerhetskopiering - Select Google Earth executable - Sökväg till Google Earth + Sökväg till Google Earth - Open Image to load - Öppna bild för laddning + Öppna bild för laddning - Images (%1) - Bilder (%1) + Bilder (%1) - - Error - Fel + Fel - The selected firmware has never been downloaded by Companion. - Firmware-filen har aldrig laddats ned av 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. + Firmware-filen kan inte laddas ned av Companion. - - Cannot load %1. - %1 kunde inte laddas. + %1 kunde inte laddas. - Image stored in settings - Bilden lagras i inställningar + Bilden lagras i inställningar - + + Include companion splashes Användarens bilder och companion-bilder + Only user defined splashes 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 @@ -9797,22 +10802,21 @@ Mode 4: Spara Profil - + Profile slot Profilplats - + auto backup before write säkerhetskopiera innan skrivning - Select your library folder - Välj bibliotekskatalog + Välj bibliotekskatalog - + Export Profile Exportera Profil @@ -9822,7 +10826,7 @@ Mode 4: Importera Profil - + Automatically add version number to the filename after download Lägg automatiskt till ett versionsnummer till filnamnet @@ -9839,74 +10843,71 @@ May be different from firmware language Får skilja från språket för mjukvaran - Export profile As - Exportera profil som + Exportera profil som - Profile slot is not empty, profile slot %1 will we overwritten.<br>Are you sure ? - Det finns redan en profil i position %1,. Den kommer att skrivas över.<br> Är du säker ? + Det finns redan en profil i position %1,. Den kommer att skrivas över.<br> Är du säker ? - Open Profile to import - Öppna profil för import + Ö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 + 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? + 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 - Select the folder replicating your SD structure - Välj katalog som härmar din SD-struktur + Välj katalog som härmar din SD-struktur @@ -9917,7 +10918,7 @@ Får skilja från språket för mjukvaran Dialog - + Close Stäng @@ -9932,20 +10933,20 @@ Får skilja från språket för mjukvaran Skriv till fil - + Setup for: Inställningar för: - - + + Name Namn - + printed on: %1 Utskriven: %1 @@ -9987,12 +10988,12 @@ Får skilja från språket för mjukvaran - + Enabled Aktiv - + Disabled Inaktiv @@ -10023,7 +11024,7 @@ Får skilja från språket för mjukvaran Centrumpip - + Delay(u%1:d%2) Fördröjning(u%1:d%2) @@ -10033,42 +11034,55 @@ 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 @@ -10083,50 +11097,32 @@ 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 @@ -10139,20 +11135,20 @@ Får skilja från språket för mjukvaran - + Min Minimum - + - + Max Maximum - + Invert @@ -10178,28 +11174,7 @@ 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 - - - - + @@ -10207,17 +11182,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 @@ -10285,7 +11250,7 @@ Får skilja från språket för mjukvaran Stapelnummer - + Print Document Skriv dokument @@ -10295,17 +11260,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 @@ -10326,24 +11286,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 @@ -10353,7 +11307,7 @@ Får skilja från språket för mjukvaran Inm.Hjul. - + Global Variables Globala Variabler @@ -10363,19 +11317,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 @@ -10386,19 +11340,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 (*) @@ -10406,444 +11360,337 @@ Får skilja från språket för mjukvaran simulatorDialog - P1 - P1 + P1 - P2 - P2 + P2 - P3 - P3 + P3 - THR - GAS + GAS - RUD - ROD + ROD - ELE - HÖJ + HÖJ - AIL - SKE + SKE - - Hold X - Håll X + Håll X - - Fix X - Fixera X + Fixera X - - Fix Y - Fixera Y + Fixera Y - - Hold Y - Håll Y + Håll Y - - - - TextLabel - Textettikett + Textettikett - TRN - TRN + TRN - GEA - LAN + LAN - ID0 - ID0 + ID0 - ID1 - ID1 + ID1 - ID2 - ID2 + ID2 - BEEP - Summer + Summer - - - - Right Double Click to Reset - Höger dubbelklick nollställer + Höger dubbelklick nollställer - Companion Simulator - Companion Simulator + Companion Simulator - 9x Simulator - Simulator för 9x + Simulator för 9x - Outputs - Utgångar + Utgångar + + + 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 - CH1 - KN1 + KN1 - CH9 - KN9 + KN9 - CH2 - KN2 + KN2 - CH10 - KN10 + KN10 - CH3 - KN3 + KN3 - CH11 - KN11 + KN11 - CH4 - KN4 + KN4 - CH12 - KN12 + KN12 - CH5 - KN5 + KN5 - CH13 - KN13 + KN13 - CH6 - KN6 + KN6 - CH14 - KN14 + KN14 - CH7 - KN7 + KN7 - CH15 - KN15 + KN15 - CH8 - KN8 + KN8 - CH16 - KN16 + KN16 - - - - - - - - - - - - - - - - -100.1 - -100.1 + -100.1 - - Warning - Varning + Varning - Joystick enabled but not configured correctly - Joysticken påslagen, men ej rätt inställd + Joysticken påslagen, men ej rätt inställd - Cannot open joystick, joystick disabled - Joysticken kan inte hittas. Joysticken stängs av + Joysticken kan inte hittas. Joysticken stängs av - Firmware %1 error: %2 - Firmware %1 fel: %2 + Firmware %1 fel: %2 - Simulating Tx (%1) - Simulerar sändare (%1) + Simulerar sändare (%1) - Simulating - Simulerar + Simulerar - - - 0 % - 0 % + 0 % - - Flight mode: %1(%2) - - Fligmod: %1(%2) - - - - 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 + - Fligmod: %1(%2) splashLibrary - + ... ... - + Splash Library - page %1 of %2 Bildbibliotek - Sida %1 av %2 - + Warning Varning @@ -10866,428 +11713,312 @@ Får skilja från språket för mjukvaran xsimulatorDialog - - SE - SE + SE - - SA - SA + SA - - SB - SB + SB - - - - Right Double Click to Reset - Höger dubbelklick nollställer + Höger dubbelklick nollställer - - - - TextLabel - Textettikett + Textettikett - - Hold X - Håll X + Håll X - - Fix X - Fixera X + Fixera X - - Fix Y - Fixera Y + Fixera Y - - Hold Y - Håll Y + Håll Y - - SH - SH + SH - - SG - SG + SG - Companion Simulator - Companion Simulator + Companion Simulator - - SD - SD + SD - - SC - SC + SC - Outputs - Utgångar + Utgångar - CH1 - KN1 + KN1 - - - - - - - - - - - - - - - - -100.1 - -100.1 + -100.1 - CH9 - KN9 + KN9 - CH2 - KN2 + KN2 - CH10 - KN10 + KN10 - CH3 - KN3 + KN3 - CH11 - KN11 + KN11 - CH4 - KN4 + KN4 - CH12 - KN12 + KN12 - CH5 - KN5 + KN5 - CH13 - KN13 + KN13 - CH6 - KN6 + KN6 - CH14 - KN14 + KN14 - CH7 - KN7 + KN7 - CH15 - KN15 + KN15 - CH8 - KN8 + KN8 - CH16 - KN16 + KN16 + + + LSK + LBK + + + LSC + LBC + + + LSD + LBD + + + LS7 + LB7 + + + LSL + LBL + + + LSB + LBB + + + LS1 + LB1 + + + LSH + LBH + + + LSG + LBG + + + LSE + LBE + + + LSF + LBF + + + LS8 + LB8 + + + LS9 + LB9 + + + LSA + LBA + + + LSM + LBM + + + LSJ + LBJ + + + LSI + LBI + + + LS4 + LB4 + + + LS5 + LB5 + + + LS2 + LB2 + + + LS3 + LB3 + + + LS6 + LB6 + + + LSN + LBN + + + LSO + LBO + + + LSP + LBP + + + LSQ + LBQ + + + LSR + LBR + + + LSS + LBS + + + LST + LBT + + + LSU + LBU + + + LSV + LBV + + + LSW + LBW - - Warning - Varning + Varning - Joystick enabled but not configured correctly - Joysticken påslagen, men ej rätt inställd + Joysticken påslagen, men ej rätt inställd - Cannot open joystick, joystick disabled - Joysticken kan inte hittas. Joysticken stängs av + Joysticken kan inte hittas. Joysticken stängs av - Firmware %1 error: %2 - Firmware %1 fel: %2 + Firmware %1 fel: %2 - Simulating Tx (%1) - Simulerar sändare (%1) + Simulerar sändare (%1) - Simulating - Simulerar + Simulerar - - - SF - SF + SF - - S2 - S2 + S2 - - RS - RS + RS - - S1 - S1 + S1 - - LS - LS + LS - Taranis Simulator - Taranissimulator + Taranissimulator - - Flight mode: %1(%2) - - Fligmod: %1(%2) - - - - CSK - LBK - - - - CSC - LBC - - - - CSD - LBD - - - - CS7 - LB7 - - - - CSL - LBL - - - - CSB - LBB - - - - CS1 - LB1 - - - - CSH - LBH - - - - CSG - LBG - - - - CSE - LBE - - - - CSF - LBF - - - - CS8 - LB8 - - - - CS9 - LB9 - - - - CSA - LBA - - - - CSM - LBM - - - - CSJ - LBJ - - - - CSI - LBI - - - - CS4 - LB4 - - - - CS5 - LB5 - - - - CS2 - LB2 - - - - CS3 - LB3 - - - - CS6 - LB6 - - - - CSN - LBN - - - - CSO - LBO - - - - CSP - LBP - - - - CSQ - LBQ - - - - CSR - LBR - - - - CSS - LBS - - - - CST - LBT - - - - CSU - LBU - - - - CSV - LBV - - - - CSW - LBW + - Fligmod: %1(%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 c8fb4753e..d322e36a5 100644 --- a/companion/src/warnings.h +++ b/companion/src/warnings.h @@ -1,8 +1,8 @@ #ifndef WARNINGS_H -#define WARNINGS_H +#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/Companion funding model.\n\nWe are really appreciative for that!\n\nThe OpenTX/Companion Team.") -#endif /* WARNINGS_H */ +#endif /* WARNINGS_H */ diff --git a/companion/src/xsimulatordialog.cpp b/companion/src/xsimulatordialog.cpp deleted file mode 100644 index be071b6af..000000000 --- a/companion/src/xsimulatordialog.cpp +++ /dev/null @@ -1,635 +0,0 @@ -#include "xsimulatordialog.h" -#include "ui_xsimulatordialog.h" -#include -#include "helpers.h" -#include "simulatorinterface.h" -#ifdef JOYSTICKS -#include "joystick.h" -#endif - -#define GBALL_SIZE 20 -#define RESX 1024 -#define W 212 -#define H 64 - -int xsimulatorDialog::screenshotIdx = 0; -uint32_t xsimulatorDialog::xswitchstatus = 0; - -xsimulatorDialog::xsimulatorDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::xsimulatorDialog), - timer(NULL), - lightOn(false), - txInterface(NULL), - simulator(NULL), - g_modelIdx(-1), - beepVal(0), - beepShow(0), - buttonPressed(0) -{ - ui->setupUi(this); - ui->lcd->setFocus(); - - QSettings settings("companion", "companion"); - ui->lcd->setBackgroundColor(47, 123, 227); - setupSticks(); - resize(0, 0); // to force min height, min width - this->setFixedSize(this->width(), this->height()); - bool simuSW=settings.value("simuSW",false).toBool(); -#ifdef JOYSTICKS - bool js_enable=settings.value("js_support",false).toBool(); - int js_ctrl=settings.value("js_ctrl",-1).toInt(); - if (js_enable) { - settings.beginGroup("JsCalibration"); - int count=0; - for (int j=0; j<8;j++){ - int axe=settings.value(QString("stick%1_axe").arg(j),-1).toInt(); - if (axe>=0 && axe<8) { - jsmap[axe]=j; - jscal[axe][0]=settings.value(QString("stick%1_min").arg(j),-32767).toInt(); - jscal[axe][1]=settings.value(QString("stick%1_med").arg(j),0).toInt(); - jscal[axe][2]=settings.value(QString("stick%1_max").arg(j),0).toInt(); - jscal[axe][3]=settings.value(QString("stick%1_inv").arg(j),0).toInt(); - count++; - } - } - settings.endGroup(); - if (count<3) { - QMessageBox::critical(this, tr("Warning"), tr("Joystick enabled but not configured correctly")); - } - if (js_ctrl!=-1) { - joystick = new Joystick(this); - if (joystick) { - if (joystick->open(js_ctrl)) { - int numAxes=std::min(joystick->numAxes,8); - for (int j=0; jsensitivities[j] = 0; - joystick->deadzones[j]=0; - } - nodeRight->setCenteringY(false); //mode 1,3 -> THR on right - ui->holdRightY->setChecked(true); - nodeRight->setCenteringX(false); //mode 1,3 -> THR on right - ui->holdRightX->setChecked(true); - nodeLeft->setCenteringY(false); //mode 1,3 -> THR on right - ui->holdLeftY->setChecked(true); - nodeLeft->setCenteringX(false); //mode 1,3 -> THR on right - ui->holdLeftX->setChecked(true); - connect(joystick, SIGNAL(axisValueChanged(int, int)), this, SLOT(onjoystickAxisValueChanged(int, int))); - } - else { - QMessageBox::critical(this, tr("Warning"), tr("Cannot open joystick, joystick disabled")); - } - } - } - } -#endif - if (simuSW) { - ui->switchH->setValue(xswitchstatus & 0x3); - xswitchstatus>>=2; - ui->switchG->setValue(xswitchstatus & 0x3); - xswitchstatus>>=2; - ui->switchF->setValue(xswitchstatus & 0x3); - xswitchstatus>>=2; - ui->switchE->setValue(xswitchstatus & 0x3); - xswitchstatus>>=2; - ui->switchD->setValue(xswitchstatus & 0x3); - xswitchstatus>>=2; - ui->switchC->setValue(xswitchstatus & 0x3); - xswitchstatus>>=2; - ui->switchB->setValue(xswitchstatus & 0x3); - xswitchstatus>>=2; - ui->switchA->setValue(xswitchstatus & 0x3); - } - connect(ui->cursor, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int))); - connect(ui->menu, SIGNAL(buttonPressed(int)), this, SLOT(onButtonPressed(int))); -} - -xsimulatorDialog::~xsimulatorDialog() -{ - delete timer; - delete ui; -} - -void xsimulatorDialog::closeEvent (QCloseEvent *) -{ - simulator->stop(); - timer->stop(); -} - -void xsimulatorDialog::mousePressEvent(QMouseEvent *event) -{ - if (event->button() == Qt::MidButton) - middleButtonPressed = true; -} - -void xsimulatorDialog::mouseReleaseEvent(QMouseEvent *event) -{ - if (event->button() == Qt::MidButton) - middleButtonPressed = false; -} - -void xsimulatorDialog::wheelEvent (QWheelEvent *event) -{ - simulator->wheelEvent(event->delta() > 0 ? 1 : -1); -} - -void xsimulatorDialog::keyPressEvent (QKeyEvent *event) -{ - switch (event->key()) { - case Qt::Key_Enter: - case Qt::Key_Return: - buttonPressed = Qt::Key_Enter; - break; - case Qt::Key_Escape: - case Qt::Key_Backspace: - buttonPressed = Qt::Key_Escape; - break; - case Qt::Key_Minus: - case Qt::Key_Plus: - case Qt::Key_PageDown: - case Qt::Key_Menu: - buttonPressed = event->key(); - break; - } -} - -void xsimulatorDialog::keyReleaseEvent(QKeyEvent * event) -{ - switch (event->key()) { - case Qt::Key_Enter: - case Qt::Key_Return: - case Qt::Key_Escape: - case Qt::Key_Backspace: - case Qt::Key_Plus: - case Qt::Key_Minus: - case Qt::Key_PageDown: - case Qt::Key_Menu: - buttonPressed = 0; - break; - } -} - -void xsimulatorDialog::setupTimer() -{ - timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(onTimerEvent())); - timer->start(10); -} - -void xsimulatorDialog::onButtonPressed(int value) -{ - if (value==Qt::Key_Print) { - QSettings settings("companion", "companion"); - bool toclipboard=settings.value("snapshot_to_clipboard", false).toBool(); - QString fileName =""; - if (!toclipboard) { - fileName = QString("screenshot-%1.png").arg(++screenshotIdx); - } - ui->lcd->makeScreenshot(fileName); - } else { - buttonPressed = value; - } -} - -void xsimulatorDialog::onTimerEvent() -{ - static unsigned int lcd_counter = 0; - - if (!simulator->timer10ms()) { - QMessageBox::critical(this, "companion", tr("Firmware %1 error: %2").arg(txInterface->getName()).arg(simulator->getError())); - timer->stop(); - return; - } - - getValues(); - - if (g_modelIdx >= 0) { - ModelData *model = & g_radioData.models[g_modelIdx]; - setWindowTitle(windowName + (txInterface->getCapability(FlightPhases) ? tr(" - Flight mode: %1(%2)").arg(model->phaseData[simulator->getPhase()].name).arg(simulator->getPhase()) : "")); - } - else if (ui->tabWidget->currentIndex() == 0) { - bool lightEnable; - if (simulator->lcdChanged(lightEnable)) { - ui->lcd->onLcdChanged(lightEnable); - if (lightOn!=lightEnable) { - lightOn=lightEnable; - } - } - } - - if (!(lcd_counter++ % 5)) { - - setValues(); - - setTrims(); - - centerSticks(); - - if (beepVal) { - beepVal = 0; - QApplication::beep(); - } - -#define CBEEP_ON "QLabel { background-color: #FF364E }" -#define CBEEP_OFF "QLabel { }" - - if (beepShow) { - beepShow--; - } - } -} - -void xsimulatorDialog::centerSticks() -{ - if(ui->leftStick->scene()) nodeLeft->stepToCenter(); - if(ui->rightStick->scene()) nodeRight->stepToCenter(); -} - -void xsimulatorDialog::loadParams(RadioData &radioData, const int model_idx) -{ - g_modelIdx = model_idx; - - txInterface = GetEepromInterface(); - simulator = txInterface->getSimulator(); - - g_radioData = radioData; - - if (model_idx < 0) { - windowName = QString(tr("Simulating Tx (%1)").arg(txInterface->getName())); - ui->lcd->setData(simulator->getLcd(), W, H, 4); - } - else { - ui->tabWidget->removeTab(0); - g_radioData.generalSettings.currModel = model_idx; - windowName = tr("Simulating ") + g_radioData.models[model_idx].name; - } - - setWindowTitle(windowName); - - if (g_radioData.generalSettings.stickMode & 1) - { - nodeLeft->setCenteringY(false); //mode 1,3 -> THR on left - ui->holdLeftY->setChecked(true); - } - else - { - nodeRight->setCenteringY(false); //mode 1,3 -> THR on right - ui->holdRightY->setChecked(true); - } - - setTrims(); - - beepVal = 0; - beepShow = 0; - - simulator->start(g_radioData, model_idx<0); - - setupTimer(); -} - -void xsimulatorDialog::setTrims() -{ - Trims trims; - simulator->getTrims(trims); - - int trimMin = -125, trimMax = +125; - if (trims.extended) { - trimMin = -500; - trimMax = +500; - } - ui->trimHLeft->setRange(trimMin, trimMax); ui->trimHLeft->setValue(trims.values[0]); - ui->trimVLeft->setRange(trimMin, trimMax); ui->trimVLeft->setValue(trims.values[1]); - ui->trimVRight->setRange(trimMin, trimMax); ui->trimVRight->setValue(trims.values[2]); - ui->trimHRight->setRange(trimMin, trimMax); ui->trimHRight->setValue(trims.values[3]); -} - -void xsimulatorDialog::getValues() -{ - TxInputs inputs = {{ int(1024*nodeLeft->getX()), // LEFT HORZ - int(-1024*nodeLeft->getY()), // LEFT VERT - int(-1024*nodeRight->getY()), // RGHT VERT - int(1024*nodeRight->getX()) }, // RGHT HORZ - { -ui->dialP_1->value(), - ui->dialP_2->value(), - -ui->dialP_3->value(), - ui->dialP_4->value() }, - { ui->switchA->value() - 1, - ui->switchB->value() - 1, - ui->switchC->value() - 1, - ui->switchD->value() - 1, - ui->switchE->value() - 1, - ui->switchF->value(), - ui->switchG->value() - 1, - ui->switchH->value(), 0, 0 }, - { - buttonPressed == Qt::Key_Menu, - buttonPressed == Qt::Key_Escape, - buttonPressed == Qt::Key_Enter, - buttonPressed == Qt::Key_PageDown, - buttonPressed == Qt::Key_Plus, - buttonPressed == Qt::Key_Minus }, - middleButtonPressed - }; - - simulator->setValues(inputs); - xswitchstatus=ui->switchA->value(); - xswitchstatus<<=2; - xswitchstatus+=ui->switchB->value(); - xswitchstatus<<=2; - xswitchstatus+=ui->switchC->value(); - xswitchstatus<<=2; - xswitchstatus+=ui->switchD->value(); - xswitchstatus<<=2; - xswitchstatus+=ui->switchE->value(); - xswitchstatus<<=2; - xswitchstatus+=ui->switchF->value(); - xswitchstatus<<=2; - xswitchstatus+=ui->switchG->value(); - xswitchstatus<<=2; - xswitchstatus+=ui->switchH->value(); -} - -inline int chVal(int val) -{ - return qMin(1024, qMax(-1024, val)); -} - -void xsimulatorDialog::on_switchH_sliderReleased() -{ - QTimer::singleShot(400, this, SLOT(resetTrn())); -} - -void xsimulatorDialog::on_trimHLeft_valueChanged(int value) -{ - simulator->setTrim(0, value); -} - -void xsimulatorDialog::on_trimVLeft_valueChanged(int value) -{ - simulator->setTrim(1, value); -} - -void xsimulatorDialog::on_trimHRight_valueChanged(int value) -{ - simulator->setTrim(3, value); -} - -void xsimulatorDialog::on_trimVRight_valueChanged(int value) -{ - simulator->setTrim(2, value); -} - -void xsimulatorDialog::setValues() -{ - TxOutputs outputs; - simulator->getValues(outputs); - - ui->chnout_1->setValue(chVal(outputs.chans[0])); - ui->chnout_2->setValue(chVal(outputs.chans[1])); - ui->chnout_3->setValue(chVal(outputs.chans[2])); - ui->chnout_4->setValue(chVal(outputs.chans[3])); - ui->chnout_5->setValue(chVal(outputs.chans[4])); - ui->chnout_6->setValue(chVal(outputs.chans[5])); - ui->chnout_7->setValue(chVal(outputs.chans[6])); - ui->chnout_8->setValue(chVal(outputs.chans[7])); - if (txInterface->getCapability(Outputs) > 8) { - ui->chnout_9->setValue(chVal(outputs.chans[8])); - ui->chnout_10->setValue(chVal(outputs.chans[9])); - ui->chnout_11->setValue(chVal(outputs.chans[10])); - ui->chnout_12->setValue(chVal(outputs.chans[11])); - ui->chnout_13->setValue(chVal(outputs.chans[12])); - ui->chnout_14->setValue(chVal(outputs.chans[13])); - ui->chnout_15->setValue(chVal(outputs.chans[14])); - ui->chnout_16->setValue(chVal(outputs.chans[15])); - } - - ui->chnoutV_1->setText(QString("%1").arg((qreal)outputs.chans[0]*100/1024, 0, 'f', 1)); - ui->chnoutV_2->setText(QString("%1").arg((qreal)outputs.chans[1]*100/1024, 0, 'f', 1)); - ui->chnoutV_3->setText(QString("%1").arg((qreal)outputs.chans[2]*100/1024, 0, 'f', 1)); - ui->chnoutV_4->setText(QString("%1").arg((qreal)outputs.chans[3]*100/1024, 0, 'f', 1)); - ui->chnoutV_5->setText(QString("%1").arg((qreal)outputs.chans[4]*100/1024, 0, 'f', 1)); - ui->chnoutV_6->setText(QString("%1").arg((qreal)outputs.chans[5]*100/1024, 0, 'f', 1)); - ui->chnoutV_7->setText(QString("%1").arg((qreal)outputs.chans[6]*100/1024, 0, 'f', 1)); - ui->chnoutV_8->setText(QString("%1").arg((qreal)outputs.chans[7]*100/1024, 0, 'f', 1)); - if (txInterface->getCapability(Outputs) > 8) { - ui->chnoutV_9->setText(QString("%1").arg((qreal)outputs.chans[8]*100/1024, 0, 'f', 1)); - ui->chnoutV_10->setText(QString("%1").arg((qreal)outputs.chans[9]*100/1024, 0, 'f', 1)); - ui->chnoutV_11->setText(QString("%1").arg((qreal)outputs.chans[10]*100/1024, 0, 'f', 1)); - ui->chnoutV_12->setText(QString("%1").arg((qreal)outputs.chans[11]*100/1024, 0, 'f', 1)); - ui->chnoutV_13->setText(QString("%1").arg((qreal)outputs.chans[12]*100/1024, 0, 'f', 1)); - ui->chnoutV_14->setText(QString("%1").arg((qreal)outputs.chans[13]*100/1024, 0, 'f', 1)); - ui->chnoutV_15->setText(QString("%1").arg((qreal)outputs.chans[14]*100/1024, 0, 'f', 1)); - ui->chnoutV_16->setText(QString("%1").arg((qreal)outputs.chans[15]*100/1024, 0, 'f', 1)); - } - - ui->leftXPerc->setText(QString("X %1%").arg((qreal)nodeLeft->getX()*100, 2, 'f', 0)); - ui->leftYPerc->setText(QString("Y %1%").arg((qreal)nodeLeft->getY()*-100, 2, 'f', 0)); - - ui->rightXPerc->setText(QString("X %1%").arg((qreal)nodeRight->getX()*100, 2, 'f', 0)); - ui->rightYPerc->setText(QString("Y %1%").arg((qreal)nodeRight->getY()*-100, 2, 'f', 0)); - -#define CSWITCH_ON "QLabel { background-color: #4CC417 }" -#define CSWITCH_OFF "QLabel { }" - - ui->labelCSW_1->setStyleSheet(outputs.vsw[0] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_2->setStyleSheet(outputs.vsw[1] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_3->setStyleSheet(outputs.vsw[2] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_4->setStyleSheet(outputs.vsw[3] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_5->setStyleSheet(outputs.vsw[4] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_6->setStyleSheet(outputs.vsw[5] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_7->setStyleSheet(outputs.vsw[6] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_8->setStyleSheet(outputs.vsw[7] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_9->setStyleSheet(outputs.vsw[8] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_10->setStyleSheet(outputs.vsw[9] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_11->setStyleSheet(outputs.vsw[10] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_12->setStyleSheet(outputs.vsw[11] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_13->setStyleSheet(outputs.vsw[12] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_14->setStyleSheet(outputs.vsw[13] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_15->setStyleSheet(outputs.vsw[14] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_16->setStyleSheet(outputs.vsw[15] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_17->setStyleSheet(outputs.vsw[16] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_18->setStyleSheet(outputs.vsw[17] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_19->setStyleSheet(outputs.vsw[18] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_20->setStyleSheet(outputs.vsw[19] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_21->setStyleSheet(outputs.vsw[20] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_22->setStyleSheet(outputs.vsw[21] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_23->setStyleSheet(outputs.vsw[22] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_24->setStyleSheet(outputs.vsw[23] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_25->setStyleSheet(outputs.vsw[24] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_26->setStyleSheet(outputs.vsw[25] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_27->setStyleSheet(outputs.vsw[26] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_28->setStyleSheet(outputs.vsw[27] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_29->setStyleSheet(outputs.vsw[28] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_30->setStyleSheet(outputs.vsw[29] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_31->setStyleSheet(outputs.vsw[30] ? CSWITCH_ON : CSWITCH_OFF); - ui->labelCSW_32->setStyleSheet(outputs.vsw[31] ? CSWITCH_ON : CSWITCH_OFF); - - if (outputs.beep) { - beepVal = outputs.beep; - beepShow=20; - } -} - -void xsimulatorDialog::setupSticks() -{ - QGraphicsScene *leftScene = new QGraphicsScene(ui->leftStick); - leftScene->setItemIndexMethod(QGraphicsScene::NoIndex); - ui->leftStick->setScene(leftScene); - - // ui->leftStick->scene()->addLine(0,10,20,30); - - QGraphicsScene *rightScene = new QGraphicsScene(ui->rightStick); - rightScene->setItemIndexMethod(QGraphicsScene::NoIndex); - ui->rightStick->setScene(rightScene); - - // ui->rightStick->scene()->addLine(0,10,20,30); - - nodeLeft = new Node(); - nodeLeft->setPos(-GBALL_SIZE/2,-GBALL_SIZE/2); - nodeLeft->setBallSize(GBALL_SIZE); - leftScene->addItem(nodeLeft); - - nodeRight = new Node(); - nodeRight->setPos(-GBALL_SIZE/2,-GBALL_SIZE/2); - nodeRight->setBallSize(GBALL_SIZE); - rightScene->addItem(nodeRight); -} - -void xsimulatorDialog::resizeEvent(QResizeEvent *event) -{ - - if(ui->leftStick->scene()) - { - QRect qr = ui->leftStick->contentsRect(); - qreal w = (qreal)qr.width() - GBALL_SIZE; - qreal h = (qreal)qr.height() - GBALL_SIZE; - qreal cx = (qreal)qr.width()/2; - qreal cy = (qreal)qr.height()/2; - ui->leftStick->scene()->setSceneRect(-cx,-cy,w,h); - - QPointF p = nodeLeft->pos(); - p.setX(qMin(cx, qMax(p.x(), -cx))); - p.setY(qMin(cy, qMax(p.y(), -cy))); - nodeLeft->setPos(p); - } - - if(ui->rightStick->scene()) - { - QRect qr = ui->rightStick->contentsRect(); - qreal w = (qreal)qr.width() - GBALL_SIZE; - qreal h = (qreal)qr.height() - GBALL_SIZE; - qreal cx = (qreal)qr.width()/2; - qreal cy = (qreal)qr.height()/2; - ui->rightStick->scene()->setSceneRect(-cx,-cy,w,h); - - QPointF p = nodeRight->pos(); - p.setX(qMin(cx, qMax(p.x(), -cx))); - p.setY(qMin(cy, qMax(p.y(), -cy))); - nodeRight->setPos(p); - } - QDialog::resizeEvent(event); -} - -void xsimulatorDialog::on_holdLeftX_clicked(bool checked) -{ - nodeLeft->setCenteringX(!checked); -} - -void xsimulatorDialog::on_holdLeftY_clicked(bool checked) -{ - nodeLeft->setCenteringY(!checked); -} - -void xsimulatorDialog::on_holdRightX_clicked(bool checked) -{ - nodeRight->setCenteringX(!checked); -} - -void xsimulatorDialog::on_holdRightY_clicked(bool checked) -{ - nodeRight->setCenteringY(!checked); -} - - -void xsimulatorDialog::on_FixLeftX_clicked(bool checked) -{ - nodeLeft->setFixedX(checked); -} - -void xsimulatorDialog::on_FixLeftY_clicked(bool checked) -{ - nodeLeft->setFixedY(checked); -} - -void xsimulatorDialog::on_FixRightX_clicked(bool checked) -{ - nodeRight->setFixedX(checked); -} - -void xsimulatorDialog::on_FixRightY_clicked(bool checked) -{ - nodeRight->setFixedY(checked); -} - -void xsimulatorDialog::resetTrn() -{ - ui->switchH->setValue(0); -} - - -#ifdef JOYSTICKS -void xsimulatorDialog::onjoystickAxisValueChanged(int axis, int value) { - int stick; - if (axis>=0 && axis<8) { - stick=jsmap[axis]; - int stickval; - if (value>jscal[axis][1]) { - if ((jscal[axis][2]-jscal[axis][1])==0) - return; - stickval=(1024*(value-jscal[axis][1]))/(jscal[axis][2]-jscal[axis][1]); - } - else { - if ((jscal[axis][1]-jscal[axis][0])==0) - return; - stickval=(1024*(value-jscal[axis][1]))/(jscal[axis][1]-jscal[axis][0]); - } - if (jscal[axis][3]==1) { - stickval*=-1; - } - if (stick==1 || stick==2) { - float currX=nodeRight->getX(); - float currY=nodeRight->getY(); - if (stick==1 ) { - nodeRight->setPos(currX*100-10,-stickval*100/1024-10); - } - if (stick==2) { - nodeRight->setPos(stickval*100/1024-10,currY*100-10); - } - } - else if (stick==3 || stick==4) { - float currX=nodeLeft->getX(); - float currY=nodeLeft->getY(); - if (stick==3) { - nodeLeft->setPos(currX*100-10,-stickval*100/1024-10); - } - if (stick==4) { - nodeLeft->setPos(stickval*100/1024-10,currY*100-10); - } - } - - - if (stick==5) { - ui->dialP_1->setValue(stickval); - } - if (stick==6) { - ui->dialP_2->setValue(stickval); - } - if (stick==7) { - ui->dialP_3->setValue(stickval); - } - if (stick==8) { - ui->dialP_4->setValue(stickval); - } - } -} -#endif diff --git a/companion/src/xsimulatordialog.h b/companion/src/xsimulatordialog.h deleted file mode 100644 index a78143fc7..000000000 --- a/companion/src/xsimulatordialog.h +++ /dev/null @@ -1,104 +0,0 @@ -#ifndef XSIMULATORDIALOG_H -#define XSIMULATORDIALOG_H - -#include -#include "modeledit/node.h" -#include "eeprominterface.h" -#ifdef JOYSTICKS -#include "joystick.h" -#endif - -#define TMR_OFF 0 -#define TMR_RUNNING 1 -#define TMR_BEEPING 2 -#define TMR_STOPPED 3 - -#define FLASH_DURATION 10 -; - -namespace Ui { - class xsimulatorDialog; -} - -class xsimulatorDialog : public QDialog -{ - Q_OBJECT - -public: - explicit xsimulatorDialog(QWidget *parent = 0); - ~xsimulatorDialog(); - - void loadParams(RadioData &radioData, const int model_idx=-1); - -private: - Ui::xsimulatorDialog *ui; - Node *nodeLeft; - Node *nodeRight; - QTimer *timer; - QString windowName; - int backLight; - bool lightOn; -#ifdef JOYSTICKS - Joystick *joystick; - int jscal[8][4]; - int jsmap[8]; -#endif - - EEPROMInterface *txInterface; - SimulatorInterface *simulator; - RadioData g_radioData; - int g_modelIdx; - - void setupSticks(); - void setupTimer(); - void resizeEvent(QResizeEvent *event = 0); - - void getValues(); - void setValues(); - void centerSticks(); - // void timerTick(); - - bool keyState(EnumKeys key); - int getValue(qint8 i); - bool getSwitch(int swtch, bool nc, qint8 level=0); - void setTrims(); - - int beepVal; - int beepShow; - -protected: - virtual void closeEvent(QCloseEvent *); - virtual void mousePressEvent(QMouseEvent *); - virtual void mouseReleaseEvent(QMouseEvent *); - virtual void wheelEvent(QWheelEvent *); - virtual void keyPressEvent(QKeyEvent *); - virtual void keyReleaseEvent(QKeyEvent *); - static int screenshotIdx; - int buttonPressed; - bool middleButtonPressed; - static uint32_t xswitchstatus; - -private slots: - void onButtonPressed(int value); - void on_FixRightY_clicked(bool checked); - void on_FixRightX_clicked(bool checked); - void on_FixLeftY_clicked(bool checked); - void on_FixLeftX_clicked(bool checked); - void on_holdRightY_clicked(bool checked); - void on_holdRightX_clicked(bool checked); - void on_holdLeftY_clicked(bool checked); - void on_holdLeftX_clicked(bool checked); - void on_trimHLeft_valueChanged(int); - void on_trimVLeft_valueChanged(int); - void on_trimHRight_valueChanged(int); - void on_trimVRight_valueChanged(int); - void on_switchH_sliderReleased(); - void onTimerEvent(); - void resetTrn(); -#ifdef JOYSTICKS - void onjoystickAxisValueChanged(int axis, int value); -#endif - -}; - -#endif // SIMULATORDIALOG_H diff --git a/companion/src/xsimulatordialog.ui b/companion/src/xsimulatordialog.ui deleted file mode 100644 index d8f7d3f6f..000000000 --- a/companion/src/xsimulatordialog.ui +++ /dev/null @@ -1,3908 +0,0 @@ - - - xsimulatorDialog - - - - 0 - 0 - 705 - 665 - - - - - 0 - 0 - - - - - 739 - 16777215 - - - - Companion Simulator - - - - :/images/simulate.png:/images/simulate.png - - - - 5 - - - 0 - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 5 - - - 6 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 245 - 245 - - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - Hold Y - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - Fix Y - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - Fix X - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - Hold X - - - true - - - - - - - - - - 0 - 0 - - - - - 16777215 - 50 - - - - SD - - - 2 - - - 1 - - - 0 - - - Qt::Vertical - - - true - - - QSlider::TicksBothSides - - - 1 - - - - - - - - 0 - 0 - - - - - 16777215 - 50 - - - - SC - - - 2 - - - 1 - - - 0 - - - Qt::Vertical - - - true - - - QSlider::TicksBothSides - - - 1 - - - - - - - - - Qt::Horizontal - - - - 10 - 20 - - - - - - - - Right Double Click to Reset - - - -125 - - - 125 - - - Qt::Vertical - - - - - - - - - - 0 - 0 - - - - - 42 - 42 - - - - S2 - - - -1024 - - - 1024 - - - 128 - - - 64.000000000000000 - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 16777215 - 50 - - - - SG - - - 2 - - - 1 - - - 0 - - - Qt::Vertical - - - true - - - false - - - QSlider::TicksBothSides - - - 1 - - - - - - - - 0 - 0 - - - - - 42 - 42 - - - - RS - - - -1024 - - - 1024 - - - 128 - - - 64.000000000000000 - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 50 - - - - SH - - - - - - 1 - - - 0 - - - 0 - - - Qt::Vertical - - - true - - - QSlider::TicksBothSides - - - 1 - - - - - - - SC - - - Qt::AlignCenter - - - - - - - SD - - - Qt::AlignCenter - - - - - - - SG - - - Qt::AlignCenter - - - - - - - SH - - - Qt::AlignCenter - - - - - - - S2 - - - Qt::AlignCenter - - - - - - - RS - - - Qt::AlignCenter - - - - - - - Right Double Click to Reset - - - -125 - - - 125 - - - Qt::Horizontal - - - - - - - 20 - - - 20 - - - - - TextLabel - - - Qt::AlignCenter - - - - - - - TextLabel - - - Qt::AlignCenter - - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - Hold Y - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - Fix Y - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - Fix X - - - true - - - - - - - - 8 - - - - QPushButton { - background-color: #EEEEEE; - border-style: outset; - border-width: 1px; - border-radius: 4px; - border-color: black; - padding: 2px; - } - -QPushButton:checked { - background-color: #4CC417; - border-style: inset; - } - - - Hold X - - - true - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 42 - 42 - - - - S1 - - - -1024 - - - 1024 - - - 128 - - - 64.000000000000000 - - - true - - - - - - - 20 - - - 20 - - - - - TextLabel - - - Qt::AlignCenter - - - - - - - TextLabel - - - Qt::AlignCenter - - - - - - - - - - 0 - 0 - - - - - 16777215 - 50 - - - - SB - - - 2 - - - 1 - - - 0 - - - Qt::Vertical - - - true - - - QSlider::TicksBothSides - - - 1 - - - - - - - - 245 - 245 - - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - - - - - - 0 - 0 - - - - - 16777215 - 50 - - - - SA - - - 2 - - - 1 - - - 0 - - - Qt::Vertical - - - true - - - QSlider::TicksBothSides - - - 1 - - - - - - - Right Double Click to Reset - - - -125 - - - 125 - - - Qt::Horizontal - - - - - - - - - - 0 - 0 - - - - Right Double Click to Reset - - - -125 - - - 125 - - - Qt::Vertical - - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 5 - 20 - - - - - - - - - - - 0 - 0 - - - - - 16777215 - 50 - - - - SE - - - 2 - - - 1 - - - 0 - - - Qt::Vertical - - - true - - - QSlider::TicksBothSides - - - 1 - - - - - - - SF - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 16777215 - 50 - - - - SF - - - SF - - - 1 - - - 1 - - - 0 - - - 0 - - - Qt::Vertical - - - true - - - QSlider::TicksBothSides - - - 1 - - - - - - - - 0 - 0 - - - - - 42 - 42 - - - - LS - - - -1024 - - - 1024 - - - 128 - - - 64.000000000000000 - - - true - - - - - - - SA - - - Qt::AlignCenter - - - - - - - SB - - - Qt::AlignCenter - - - - - - - SE - - - Qt::AlignCenter - - - - - - - LS - - - Qt::AlignCenter - - - - - - - S1 - - - Qt::AlignCenter - - - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 570 - 5 - - - - - - - - true - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - 0 - - - - Taranis Simulator - - - - - - QLayout::SetMinimumSize - - - 0 - - - - - - 0 - 0 - - - - - 120 - 208 - - - - true - - - background:url(:/images/x9l0.png); - - - - - - - - 0 - 0 - - - - - 424 - 38 - - - - background:url(:/images/x9t0.png) - - - - - - - - 0 - 0 - - - - - 120 - 208 - - - - background:url(:/images/x9r0.png) - - - - - - - - 0 - 0 - - - - - 424 - 128 - - - - - - - - - 0 - 0 - - - - - 424 - 42 - - - - background:url(:/images/x9b0.png) - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Horizontal - - - - 438 - 6 - - - - - - - - - - - Outputs - - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - - - - CH1 - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - CH9 - - - - - - - - 0 - 0 - - - - CH2 - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - CH10 - - - - - - - - 0 - 0 - - - - CH3 - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - CH11 - - - - - - - - 0 - 0 - - - - CH4 - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - CH12 - - - - - - - - 0 - 0 - - - - CH5 - - - - - - - false - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - CH13 - - - - - - - - 0 - 0 - - - - CH6 - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - CH14 - - - - - - - - 0 - 0 - - - - CH7 - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - CH15 - - - - - - - - 0 - 0 - - - - CH8 - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - -100.1 - - - Qt::AlignCenter - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 18 - - - - QSlider::sub-page:horizontal:disabled { -border-color: #999; -} - -QSlider::add-page:horizontal:disabled { -border-color: #999; -} - -QSlider::handle:horizontal:disabled { -background: #0000CC; -border: 1px solid #aaa; -border-radius: 4px; -} - - - -1024 - - - 1024 - - - 128 - - - false - - - Qt::Horizontal - - - false - - - QSlider::TicksBelow - - - - - - - - 0 - 0 - - - - CH16 - - - - - - - - - QLayout::SetDefaultConstraint - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSK - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSC - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSD - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS7 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSL - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSB - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS1 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSH - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSG - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSE - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSF - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS8 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS9 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSA - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSM - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSJ - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSI - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS4 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS5 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS2 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS3 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CS6 - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSN - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSO - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSP - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSQ - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSR - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSS - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CST - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSU - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSV - - - Qt::AlignCenter - - - - - - - - - - true - - - QFrame::Panel - - - QFrame::Raised - - - 2 - - - - 2 - - - - - CSW - - - Qt::AlignCenter - - - - - - - - - - - - - - - - - - - mySlider - QSlider -
myslider.h
-
- - xcursorWidget - QWidget -
xcursorwidget.h
- 1 -
- - xmenuWidget - QWidget -
xmenuwidget.h
- 1 -
- - lcdWidget - QWidget -
lcdwidget.h
- 1 -
-
- - - - -
diff --git a/companion/targets/windows/companion-msys.nsi.in b/companion/targets/windows/companion-msys.nsi.in index 3b38bb303..cbf3b0c34 100644 --- a/companion/targets/windows/companion-msys.nsi.in +++ b/companion/targets/windows/companion-msys.nsi.in @@ -12,11 +12,11 @@ ;General ;Name and file - Name "openTx companion" + Name "OpenTX companion" OutFile "companionInstall_v@C9X_VERSION@.exe" ;Default installation folder - InstallDir "$PROGRAMFILES\openTx companion" + InstallDir "$PROGRAMFILES\OpenTX companion" ;Get installation folder from registry if available InstallDirRegKey HKCU "Software\companion9x" "" @@ -76,7 +76,7 @@ ;-------------------------------- ;Installer Sections -Section "openTx companion" SecDummy +Section "OpenTX companion" SecDummy SetOutPath "$INSTDIR" @@ -129,8 +129,8 @@ 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" + 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 diff --git a/companion/targets/windows/companion-vs.nsi.in b/companion/targets/windows/companion-vs.nsi.in index 340abc782..64432c62d 100644 --- a/companion/targets/windows/companion-vs.nsi.in +++ b/companion/targets/windows/companion-vs.nsi.in @@ -12,11 +12,11 @@ ;General ;Name and file - Name "openTx companion" + Name "OpenTX companion" OutFile "companionInstall_v@C9X_VERSION@.exe" ;Default installation folder - InstallDir "$PROGRAMFILES\openTx companion" + InstallDir "$PROGRAMFILES\OpenTX companion" ;Get installation folder from registry if available InstallDirRegKey HKCU "Software\companion9x" "" @@ -95,12 +95,13 @@ ;-------------------------------- ;Installer Sections -Section "openTx companion" SecDummy +Section "OpenTX companion" SecDummy SetOutPath "$INSTDIR" File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\license.txt" File "Release\companion.exe" + File "Release\simulator.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" @@ -155,8 +156,8 @@ 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" + 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 @@ -172,6 +173,7 @@ Section "Uninstall" Delete "$INSTDIR\license.txt" Delete "$INSTDIR\companion.exe" + Delete "$INSTDIR\simulator.exe" Delete "$INSTDIR\pthreadVC2.dll" Delete "$INSTDIR\xerces-c_3_1.dll" Delete "$INSTDIR\SDL.dll" diff --git a/radio/.gitignore b/radio/.gitignore new file mode 100644 index 000000000..7091e5b78 --- /dev/null +++ b/radio/.gitignore @@ -0,0 +1 @@ +/gtest-1.6.0 diff --git a/radio/src/.gitignore b/radio/src/.gitignore index 31c048a1d..af2b25b2f 100644 --- a/radio/src/.gitignore +++ b/radio/src/.gitignore @@ -1,8 +1,18 @@ /stamp-opentx.h /opentx.elf /simu -/eeprom.bin -/opentx.hex /opentx.map /simu.d /snapshot_*.png +/*.sh +/*.bat +/*.o +/*.bin +/*.bin.* +/*.hex +/*.lst +/SCRIPTS +/TEMPLATES +/SOUNDS +/LOGS +/allsrc.cpp diff --git a/radio/src/Makefile b/radio/src/Makefile index cdc10e396..41c800531 100644 --- a/radio/src/Makefile +++ b/radio/src/Makefile @@ -67,6 +67,14 @@ EXT = STD # Values = YES, NO, CHOICE FAI = NO +# the latests deliveries for Turnigy 9x transmitters (since 2 years now, 2014) do not stop sending if no pulses are generated. +# This fact totally breaks the nice throttle and switch warning concept, because even we prevent sending pulses the +# transmitter modul ignores this, and continous to send the last value or 0 at beginning. And 0 means in the middle of throttle -> 50%. +# To cope with this situation, we need a new concept how to handle throttle and switch warnings. +# if you have a 0 value (50% ) for throttle, while throttle warning is active, you should activate this switch +# Values = YES, NO +TURNIGY_TRANSMITTER_FIX = NO + # Enable heli menu # Values = YES, NO HELI = NO @@ -159,6 +167,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 @@ -204,7 +216,7 @@ TX_CADDY = NO IRPROTOS = NO # TRANSLATIONS -# Values = cz, de, en, fr, it, se, es, pl, pt +# Values = cz, de, en, fi, fr, it, se, es, pl, pt TRANSLATIONS = EN # TTS @@ -246,6 +258,10 @@ GVARS = NO # Values = NO, POT1, POT2, POT3, 3POS = NO +# Lua interpreter embedded +# Values = NO, NO_MODEL_SCRIPTS, YES +LUA = NO + # Menu Lock modes # Values = NO, READONLY, NOMENUS MENUS_LOCK == NO @@ -259,9 +275,9 @@ BOOTLOADER = YES # Define programs and commands. SHELL = sh IMG2LBM = -python ../util/img2lbm.py -TRANSLATE = -python ../util/translate.py -SVNREV = $(shell sh -c "svnversion | egrep -o '[[:digit:]]+[[:alpha:]]*$$'") BIN2LBM = -python ../util/bin2lbm.py +TRANSLATE = -python ../util/translate.py +VERSION = 2.0 SRC = CPPSRC = @@ -286,7 +302,7 @@ ifeq ($(PCB), $(filter $(PCB), STD 9X 9XR)) ARCH = AVR TRGT = avr- MCU = atmega64 - OPT = s + OPT = s SDCARD = NO THR_TRACE = NO INCDIRS += targets/stock @@ -337,6 +353,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)) @@ -621,7 +641,7 @@ ifeq ($(PCB), TARANIS) EEPROMSRC = eeprom_common.cpp eeprom_rlc.cpp eeprom_conversions.cpp PULSESSRC = protocols/pulses_arm.cpp protocols/ppm_arm.cpp protocols/pxx_arm.cpp CPPSRC += audio_arm.cpp - CPPSRC += targets/taranis/pwr_driver.cpp targets/taranis/pulses_driver.cpp targets/taranis/keys_driver.cpp targets/taranis/adc_driver.cpp targets/taranis/trainer_driver.cpp targets/taranis/audio_driver.cpp targets/taranis/delays.cpp targets/taranis/uart_driver.cpp targets/taranis/sport_driver.cpp + CPPSRC += targets/taranis/pwr_driver.cpp targets/taranis/pulses_driver.cpp targets/taranis/keys_driver.cpp targets/taranis/adc_driver.cpp targets/taranis/trainer_driver.cpp targets/taranis/audio_driver.cpp targets/taranis/delays.cpp targets/taranis/uart3_driver.cpp targets/taranis/sport_driver.cpp CPPSRC += bmp.cpp gui/view_channels.cpp gui/view_about.cpp gui/view_text.cpp SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c SRC += targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/misc.c @@ -648,6 +668,20 @@ ifeq ($(PCB), TARANIS) EXTRABOARDSRC += targets/taranis/usbd_usr.cpp targets/taranis/usbd_storage_msd.cpp SRC += targets/sky9x/syscalls.c + ifneq ($(LUA), NO) + ifeq ($(LUA), YES) + CPPDEFS += -DLUA_MODEL_SCRIPTS + endif + CPPDEFS += -DLUA + INCDIRS += lua/src + CPPSRC += lua.cpp + LUASRC = lua/src/lapi.c lua/src/lcode.c lua/src/lctype.c lua/src/ldebug.c lua/src/ldo.c lua/src/ldump.c lua/src/lfunc.c lua/src/lgc.c lua/src/llex.c lua/src/lmem.c \ + lua/src/lobject.c lua/src/lopcodes.c lua/src/lparser.c lua/src/lstate.c lua/src/lstring.c lua/src/ltable.c lua/src/ltm.c lua/src/lundump.c lua/src/lvm.c lua/src/lzio.c \ + lua/src/lbaselib.c lua/src/linit.c lua/src/lmathlib.c lua/src/loadlib.c lua/src/lauxlib.c lua/src/ltablib.c lua/src/lcorolib.c + # lua/src/loslib.c lua/src/lbitlib.c lua/src/lstrlib.c lua/src/liolib.c lua/src/ldblib.c + SRC += $(LUASRC) + endif + ifeq ($(SDCARD), YES) EXTRABOARDSRC += FatFs/ff.c FatFs/fattime.c FatFs/option/ccsbcs.c targets/taranis/diskio.cpp CPPDEFS += -DVOICE @@ -749,6 +783,14 @@ ifeq ($(NAVIGATION), ROTENC) CPPDEFS += -DROTARY_ENCODER_NAVIGATION endif +ifeq ($(TURNIGY_TRANSMITTER_FIX), YES) + ifeq ($(PCB), TARANIS) + $(warning TURNIGY_TRANSMITTER_FIX is not available on Taranis) + else + CPPDEFS += -DMODULE_ALWAYS_SEND_PULSES + endif +endif + ifeq ($(AUTOSWITCH), YES) CPPDEFS += -DAUTOSWITCH endif @@ -793,10 +835,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) @@ -1066,7 +1106,7 @@ endif $(MAKE) -C ../bootloader PCB=$(PCB) $(BIN2LBM) bootloader.lbm ../bootloader/bootloader_ramBoot.bin -tra: translations/cz.h translations/de.h translations/es.h translations/fr.h translations/it.h translations/pl.h translations/pt.h translations/se.h +tra: translations/en.h translations/cz.h translations/de.h translations/es.h translations/fi.h translations/fr.h translations/it.h translations/pl.h translations/pt.h translations/se.h lbm: fonts bitmaps/sticks.lbm elf: $(TARGET).elf @@ -1078,96 +1118,96 @@ sym: $(TARGET).sym # Build stamp-file stamp_header: - @echo - @echo "Generate Version-stamp:" - @echo "//Automatically generated file (Makefile) - do not edit" > stamp-opentx.h + @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 - @cat stamp-opentx.h + @echo "#define VERS_STR \"$(VERSION)\"" >> stamp-opentx.h + @echo "#define VERS_NUM $(VERSION)" >> 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/en.h: translations/en.h.txt + @echo + @echo "Create English language specific header files" + $(TRANSLATE) translations/en.h.txt translations/en.h en + 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/fi.h: translations/fi.h.txt + @echo + @echo "Create Finnish language specific header files" + $(TRANSLATE) translations/fi.h.txt translations/fi.h fi + 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 @@ -1230,7 +1270,7 @@ FOXLIB=-L/usr/local/lib \ -Wl,-rpath,$(FOXPATH)/src/.libs simu: stamp_header $(BOARDSRC) $(CPPSRC) Makefile simu.cpp simpgmspace.cpp *.h tra lbm eeprom.bin - g++ $(CPPFLAGS) $(INCFLAGS) simu.cpp $(BOARDSRC) $(CPPSRC) simpgmspace.cpp -MD -DSIMU -O0 -o simu $(FOXINC) $(FOXLIB) -pthread -fexceptions + g++ $(CPPFLAGS) $(INCFLAGS) simu.cpp $(BOARDSRC) $(CPPSRC) $(LUASRC) simpgmspace.cpp -MD -DSIMU -O0 -o simu $(FOXINC) $(FOXLIB) -pthread -fexceptions eeprom.bin: dd if=/dev/zero of=$@ bs=1 count=2048 @@ -1385,11 +1425,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 @@ -1403,4 +1443,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 3fff37af0..36f11d17e 100644 --- a/radio/src/audio_arm.cpp +++ b/radio/src/audio_arm.cpp @@ -41,24 +41,111 @@ extern OS_MutexID audioMutex; const int16_t sineValues[] = { - 0, 64, 128, 191, 254, 316, 376, 435, 493, 548, - 601, 652, 700, 746, 789, 828, 864, 897, 926, 952, - 973, 991, 1005, 1015, 1021, 1024, 1021, 1015, 1005, 991, - 973, 952, 926, 897, 864, 828, 789, 746, 700, 652, - 601, 548, 493, 435, 376, 316, 254, 191, 128, 64, - 0, -64, -128, -191, -254, -316, -376, -435, -493, -548, - -601, -652, -700, -746, -789, -828, -864, -897, -926, -952, - -973, -991, -1005, -1015, -1021, -1024, -1021, -1015, -1005, -991, - -973, -952, -926, -897, -864, -828, -789, -746, -700, -652, - -601, -548, -493, -435, -376, -316, -254, -191, -128, -64, + 0, 196, 392, 588, 784, 980, 1175, 1370, 1564, 1758, + 1951, 2143, 2335, 2525, 2715, 2904, 3091, 3278, 3463, 3647, + 3829, 4011, 4190, 4369, 4545, 4720, 4894, 5065, 5235, 5403, + 5569, 5733, 5895, 6055, 6213, 6369, 6522, 6673, 6822, 6969, + 7113, 7255, 7395, 7532, 7667, 7799, 7929, 8056, 8180, 8302, + 8422, 8539, 8653, 8765, 8874, 8980, 9084, 9185, 9283, 9379, + 9472, 9562, 9650, 9735, 9818, 9898, 9975, 10050, 10123, 10192, + 10260, 10324, 10387, 10447, 10504, 10559, 10612, 10663, 10711, 10757, + 10801, 10843, 10882, 10920, 10955, 10989, 11020, 11050, 11078, 11104, + 11128, 11151, 11172, 11191, 11209, 11225, 11240, 11254, 11266, 11277, + 11287, 11296, 11303, 11310, 11316, 11320, 11324, 11327, 11330, 11331, + 11332, 11333, 11333, 11333, 11332, 11331, 11329, 11328, 11326, 11324, + 11323, 11321, 11319, 11318, 11316, 11315, 11314, 11313, 11313, 11313, + 11314, 11315, 11317, 11319, 11323, 11326, 11331, 11336, 11342, 11349, + 11356, 11365, 11375, 11385, 11397, 11409, 11423, 11437, 11453, 11470, + 11488, 11507, 11527, 11548, 11571, 11595, 11620, 11646, 11673, 11702, + 11732, 11763, 11795, 11828, 11863, 11899, 11936, 11974, 12013, 12054, + 12095, 12138, 12182, 12227, 12273, 12320, 12368, 12417, 12467, 12518, + 12570, 12623, 12676, 12731, 12786, 12842, 12898, 12956, 13014, 13072, + 13131, 13191, 13251, 13311, 13372, 13433, 13495, 13556, 13618, 13680, + 13743, 13805, 13867, 13929, 13991, 14053, 14115, 14177, 14238, 14299, + 14359, 14419, 14479, 14538, 14597, 14655, 14712, 14768, 14824, 14879, + 14933, 14986, 15039, 15090, 15140, 15189, 15237, 15284, 15330, 15375, + 15418, 15460, 15500, 15539, 15577, 15614, 15648, 15682, 15714, 15744, + 15772, 15799, 15825, 15849, 15871, 15891, 15910, 15927, 15942, 15955, + 15967, 15977, 15985, 15991, 15996, 15999, 16000, 15999, 15996, 15991, + 15985, 15977, 15967, 15955, 15942, 15927, 15910, 15891, 15871, 15849, + 15825, 15799, 15772, 15744, 15714, 15682, 15648, 15614, 15577, 15539, + 15500, 15460, 15418, 15375, 15330, 15284, 15237, 15189, 15140, 15090, + 15039, 14986, 14933, 14879, 14824, 14768, 14712, 14655, 14597, 14538, + 14479, 14419, 14359, 14299, 14238, 14177, 14115, 14053, 13991, 13929, + 13867, 13805, 13743, 13680, 13618, 13556, 13495, 13433, 13372, 13311, + 13251, 13191, 13131, 13072, 13014, 12956, 12898, 12842, 12786, 12731, + 12676, 12623, 12570, 12518, 12467, 12417, 12368, 12320, 12273, 12227, + 12182, 12138, 12095, 12054, 12013, 11974, 11936, 11899, 11863, 11828, + 11795, 11763, 11732, 11702, 11673, 11646, 11620, 11595, 11571, 11548, + 11527, 11507, 11488, 11470, 11453, 11437, 11423, 11409, 11397, 11385, + 11375, 11365, 11356, 11349, 11342, 11336, 11331, 11326, 11323, 11319, + 11317, 11315, 11314, 11313, 11313, 11313, 11314, 11315, 11316, 11318, + 11319, 11321, 11323, 11324, 11326, 11328, 11329, 11331, 11332, 11333, + 11333, 11333, 11332, 11331, 11330, 11327, 11324, 11320, 11316, 11310, + 11303, 11296, 11287, 11277, 11266, 11254, 11240, 11225, 11209, 11191, + 11172, 11151, 11128, 11104, 11078, 11050, 11020, 10989, 10955, 10920, + 10882, 10843, 10801, 10757, 10711, 10663, 10612, 10559, 10504, 10447, + 10387, 10324, 10260, 10192, 10123, 10050, 9975, 9898, 9818, 9735, + 9650, 9562, 9472, 9379, 9283, 9185, 9084, 8980, 8874, 8765, + 8653, 8539, 8422, 8302, 8180, 8056, 7929, 7799, 7667, 7532, + 7395, 7255, 7113, 6969, 6822, 6673, 6522, 6369, 6213, 6055, + 5895, 5733, 5569, 5403, 5235, 5065, 4894, 4720, 4545, 4369, + 4190, 4011, 3829, 3647, 3463, 3278, 3091, 2904, 2715, 2525, + 2335, 2143, 1951, 1758, 1564, 1370, 1175, 980, 784, 588, + 392, 196, 0, -196, -392, -588, -784, -980, -1175, -1370, + -1564, -1758, -1951, -2143, -2335, -2525, -2715, -2904, -3091, -3278, + -3463, -3647, -3829, -4011, -4190, -4369, -4545, -4720, -4894, -5065, + -5235, -5403, -5569, -5733, -5895, -6055, -6213, -6369, -6522, -6673, + -6822, -6969, -7113, -7255, -7395, -7532, -7667, -7799, -7929, -8056, + -8180, -8302, -8422, -8539, -8653, -8765, -8874, -8980, -9084, -9185, + -9283, -9379, -9472, -9562, -9650, -9735, -9818, -9898, -9975, -10050, + -10123, -10192, -10260, -10324, -10387, -10447, -10504, -10559, -10612, -10663, + -10711, -10757, -10801, -10843, -10882, -10920, -10955, -10989, -11020, -11050, + -11078, -11104, -11128, -11151, -11172, -11191, -11209, -11225, -11240, -11254, + -11266, -11277, -11287, -11296, -11303, -11310, -11316, -11320, -11324, -11327, + -11330, -11331, -11332, -11333, -11333, -11333, -11332, -11331, -11329, -11328, + -11326, -11324, -11323, -11321, -11319, -11318, -11316, -11315, -11314, -11313, + -11313, -11313, -11314, -11315, -11317, -11319, -11323, -11326, -11331, -11336, + -11342, -11349, -11356, -11365, -11375, -11385, -11397, -11409, -11423, -11437, + -11453, -11470, -11488, -11507, -11527, -11548, -11571, -11595, -11620, -11646, + -11673, -11702, -11732, -11763, -11795, -11828, -11863, -11899, -11936, -11974, + -12013, -12054, -12095, -12138, -12182, -12227, -12273, -12320, -12368, -12417, + -12467, -12518, -12570, -12623, -12676, -12731, -12786, -12842, -12898, -12956, + -13014, -13072, -13131, -13191, -13251, -13311, -13372, -13433, -13495, -13556, + -13618, -13680, -13743, -13805, -13867, -13929, -13991, -14053, -14115, -14177, + -14238, -14299, -14359, -14419, -14479, -14538, -14597, -14655, -14712, -14768, + -14824, -14879, -14933, -14986, -15039, -15090, -15140, -15189, -15237, -15284, + -15330, -15375, -15418, -15460, -15500, -15539, -15577, -15614, -15648, -15682, + -15714, -15744, -15772, -15799, -15825, -15849, -15871, -15891, -15910, -15927, + -15942, -15955, -15967, -15977, -15985, -15991, -15996, -15999, -16000, -15999, + -15996, -15991, -15985, -15977, -15967, -15955, -15942, -15927, -15910, -15891, + -15871, -15849, -15825, -15799, -15772, -15744, -15714, -15682, -15648, -15614, + -15577, -15539, -15500, -15460, -15418, -15375, -15330, -15284, -15237, -15189, + -15140, -15090, -15039, -14986, -14933, -14879, -14824, -14768, -14712, -14655, + -14597, -14538, -14479, -14419, -14359, -14299, -14238, -14177, -14115, -14053, + -13991, -13929, -13867, -13805, -13743, -13680, -13618, -13556, -13495, -13433, + -13372, -13311, -13251, -13191, -13131, -13072, -13014, -12956, -12898, -12842, + -12786, -12731, -12676, -12623, -12570, -12518, -12467, -12417, -12368, -12320, + -12273, -12227, -12182, -12138, -12095, -12054, -12013, -11974, -11936, -11899, + -11863, -11828, -11795, -11763, -11732, -11702, -11673, -11646, -11620, -11595, + -11571, -11548, -11527, -11507, -11488, -11470, -11453, -11437, -11423, -11409, + -11397, -11385, -11375, -11365, -11356, -11349, -11342, -11336, -11331, -11326, + -11323, -11319, -11317, -11315, -11314, -11313, -11313, -11313, -11314, -11315, + -11316, -11318, -11319, -11321, -11323, -11324, -11326, -11328, -11329, -11331, + -11332, -11333, -11333, -11333, -11332, -11331, -11330, -11327, -11324, -11320, + -11316, -11310, -11303, -11296, -11287, -11277, -11266, -11254, -11240, -11225, + -11209, -11191, -11172, -11151, -11128, -11104, -11078, -11050, -11020, -10989, + -10955, -10920, -10882, -10843, -10801, -10757, -10711, -10663, -10612, -10559, + -10504, -10447, -10387, -10324, -10260, -10192, -10123, -10050, -9975, -9898, + -9818, -9735, -9650, -9562, -9472, -9379, -9283, -9185, -9084, -8980, + -8874, -8765, -8653, -8539, -8422, -8302, -8180, -8056, -7929, -7799, + -7667, -7532, -7395, -7255, -7113, -6969, -6822, -6673, -6522, -6369, + -6213, -6055, -5895, -5733, -5569, -5403, -5235, -5065, -4894, -4720, + -4545, -4369, -4190, -4011, -3829, -3647, -3463, -3278, -3091, -2904, + -2715, -2525, -2335, -2143, -1951, -1758, -1564, -1370, -1175, -980, + -784, -588, -392, -196, }; -#if 1 - const unsigned int toneVolumes[] = { 2, 4, 8, 12, 16 }; -#else - const unsigned int toneVolumes[] = { 4000, 8000, 16000, 24000, 32000 }; -#endif - #if defined(SDCARD) const char * audioFilenames[] = { "tada", @@ -117,180 +204,261 @@ const char * audioFilenames[] = { }; uint64_t sdAvailableSystemAudioFiles = 0; -uint8_t sdAvailablePhaseAudioFiles[MAX_PHASES] = { 0 }; -uint8_t sdAvailableMixerAudioFiles[MAX_MIXERS] = { 0 }; +uint32_t sdAvailablePhaseAudioFiles = 0; +uint64_t sdAvailableSwitchAudioFiles = 0; +uint64_t sdAvailableLogicalSwitchAudioFiles = 0; -void refreshSystemAudioFiles() +#define MASK_SYSTEM_AUDIO_FILE(index) ((uint64_t)1 << index) +#define MASK_PHASE_AUDIO_FILE(index, event) ((uint32_t)1 << (2*index+event)) +#define MASK_SWITCH_AUDIO_FILE(index) ((uint64_t)1 << index) +#define MASK_LOGICAL_SWITCH_AUDIO_FILE(index, event) ((uint64_t)1 << (2*index+event)) + +bool isFileAvailable(const char * filename) { FILINFO info; -#if _USE_LFN TCHAR lfn[_MAX_LFN + 1]; info.lfname = lfn; info.lfsize = sizeof(lfn); -#endif + return f_stat(filename, &info) == FR_OK; +} - char filename[32] = SYSTEM_SOUNDS_PATH "/"; - strncpy(filename+SOUNDS_PATH_LNG_OFS, currentLanguagePack->id, 2); +char * getAudioPath(char * path) +{ + strcpy(path, SOUNDS_PATH "/"); + strncpy(path+SOUNDS_PATH_LNG_OFS, currentLanguagePack->id, 2); + return path + sizeof(SOUNDS_PATH); +} + +char * getSystemAudioPath(char * path) +{ + char * str = getAudioPath(path); + strcpy(str, SYSTEM_SUBDIR "/"); + return str + sizeof(SYSTEM_SUBDIR); +} + +void getSystemAudioFile(char * filename, int index) +{ + char * str = getSystemAudioPath(filename); + strcpy(str, audioFilenames[index]); + strcat(str, SOUNDS_EXT); +} + +void referenceSystemAudioFiles() +{ + char path[AUDIO_FILENAME_MAXLEN+1]; + FILINFO fno; + DIR dir; + char *fn; /* This function is assuming non-Unicode cfg. */ + TCHAR lfn[_MAX_LFN + 1]; + fno.lfname = lfn; + fno.lfsize = sizeof(lfn); + + uint64_t availableAudioFiles = 0; assert(sizeof(audioFilenames)==AU_FRSKY_FIRST*sizeof(char *)); assert(sizeof(sdAvailableSystemAudioFiles)*8 >= AU_FRSKY_FIRST); - uint64_t availableAudioFiles = 0; + char * filename = getSystemAudioPath(path); + *(filename-1) = '\0'; - for (uint32_t i=0; iid, 2); + char * result = strcat_modelname(path+sizeof(SOUNDS_PATH), g_eeGeneral.currModel); + *result++ = '/'; + *result = '\0'; return result; } -void refreshModelAudioFiles() +void getPhaseAudioFile(char * filename, int index, unsigned int event) { - FILINFO info; + char * str = getModelPath(filename); + char * tmp = strcat_phasename(str, index); + strcpy(tmp, suffixes[event]); + strcat(tmp, SOUNDS_EXT); +} + +void getSwitchAudioFile(char * filename, int index) +{ + char * str = getModelPath(filename); + int len = STR_VSWITCHES[0]; + strncpy(str, &STR_VSWITCHES[1+len*index], len); + str += len-1; + if (*str == '\300') { + strcpy(str, "-up"); + str += 3; + } + else if (*str == '-') { + strcpy(str, "-mid"); + str += 4; + } + else if (*str == '\301') { + strcpy(str, "-down"); + str += 5; + } + else { + str += 1; + } + strcat(str, SOUNDS_EXT); +} + +void getLogicalSwitchAudioFile(char * filename, int index, unsigned int event) +{ + char * str = getModelPath(filename); + int len = STR_VSWITCHES[0]; + strncpy(str, &STR_VSWITCHES[1+len*(index+SWSRC_FIRST_CSW-1)], len); + str += len; + strcpy(str, suffixes[event]); + strcat(str, SOUNDS_EXT); +} + +void referenceModelAudioFiles() +{ + char path[AUDIO_FILENAME_MAXLEN+1]; + FILINFO fno; + DIR dir; + char *fn; /* This function is assuming non-Unicode cfg. */ TCHAR lfn[_MAX_LFN + 1]; - info.lfname = lfn; - info.lfsize = sizeof(lfn); + fno.lfname = lfn; + fno.lfsize = sizeof(lfn); - char filename[AUDIO_FILENAME_MAXLEN+1] = SOUNDS_PATH "/"; - strncpy(filename+SOUNDS_PATH_LNG_OFS, currentLanguagePack->id, 2); + sdAvailablePhaseAudioFiles = 0; + sdAvailableSwitchAudioFiles = 0; + sdAvailableLogicalSwitchAudioFiles = 0; - if (sdMounted()) { - char *buf = strcat_modelname(&filename[sizeof(SOUNDS_PATH)], g_eeGeneral.currModel); - *buf++ = '/'; + char * filename = getModelPath(path); + *(filename-1) = '\0'; - for (uint32_t i=0; i-[on|off].wav + for (int i=0; i-[up|mid|down].wav + for (int i=0; i-[on|off].wav + for (int i=0; i> 24); uint8_t index = (i >> 16) & 0xFF; uint8_t event = i & 0xFF; #if 0 - printf("isAudioFileAvailable(%08x)\n", i); fflush(stdout); + printf("isAudioFileReferenced(%08x)\n", i); fflush(stdout); #endif if (category == SYSTEM_AUDIO_CATEGORY) { - if (sdAvailableSystemAudioFiles & ((uint64_t)1 << event)) { - strcpy(filename, SYSTEM_SOUNDS_PATH "/"); - strncpy(filename+SOUNDS_PATH_LNG_OFS, currentLanguagePack->id, 2); - strcpy(filename+sizeof(SYSTEM_SOUNDS_PATH), audioFilenames[i]); - strcat(filename+sizeof(SYSTEM_SOUNDS_PATH), SOUNDS_EXT); + if (sdAvailableSystemAudioFiles & MASK_SYSTEM_AUDIO_FILE(event)) { + getSystemAudioFile(filename, event); return true; } } else if (category == PHASE_AUDIO_CATEGORY) { - if (sdAvailablePhaseAudioFiles[index] & ((uint32_t)1 << event)) { - strcpy(filename, SOUNDS_PATH "/"); - strncpy(filename+SOUNDS_PATH_LNG_OFS, currentLanguagePack->id, 2); - char *str = strcat_modelname(filename+sizeof(SOUNDS_PATH), g_eeGeneral.currModel); - *str++ = '/'; - char * tmp = strcat_phasename(str, index); - if (tmp != str) { - strcpy(tmp, suffixes[event]); - strcat(tmp, SOUNDS_EXT); + if (sdAvailablePhaseAudioFiles & MASK_PHASE_AUDIO_FILE(index, event)) { + getPhaseAudioFile(filename, index, event); return true; } } + else if (category == SWITCH_AUDIO_CATEGORY) { + if (sdAvailableSwitchAudioFiles & MASK_SWITCH_AUDIO_FILE(index)) { + getSwitchAudioFile(filename, index); + return true; + } } - else if (category == MIXER_AUDIO_CATEGORY) { - if (sdAvailableMixerAudioFiles[index] & ((uint32_t)1 << event)) { - strcpy(filename, SOUNDS_PATH "/"); - strncpy(filename+SOUNDS_PATH_LNG_OFS, currentLanguagePack->id, 2); - char *str = strcat_modelname(filename+sizeof(SOUNDS_PATH), g_eeGeneral.currModel); - *str++ = '/'; - char * tmp = strcat_mixername(str, index); - if (tmp != str) { - strcpy(tmp, suffixes[event]); - strcat(tmp, SOUNDS_EXT); + else if (category == LOGICAL_SWITCH_AUDIO_CATEGORY) { + if (sdAvailableLogicalSwitchAudioFiles & MASK_LOGICAL_SWITCH_AUDIO_FILE(index, event)) { + getLogicalSwitchAudioFile(filename, index, event); return true; } } - } return false; } -#else -#define isAudioFileAvailable(i, f) false -#endif -int16_t alawTable[256]; -int16_t ulawTable[256]; +tmr10ms_t timeAutomaticPromptsSilence = 0; -#define SIGN_BIT (0x80) /* Sign bit for a A-law byte. */ -#define QUANT_MASK (0xf) /* Quantization field mask. */ -#define SEG_SHIFT (4) /* Left shift for segment number. */ -#define SEG_MASK (0x70) /* Segment field mask. */ -#define BIAS (0x84) /* Bias for linear code. */ - -static short alaw2linear(unsigned char a_val) +void playModelEvent(uint8_t category, uint8_t index, uint8_t event) { - int t; - int seg; - - a_val ^= 0x55; - - t = a_val & QUANT_MASK; - seg = ((unsigned)a_val & SEG_MASK) >> SEG_SHIFT; - if(seg) t= (t + t + 1 + 32) << (seg + 2); - else t= (t + t + 1 ) << 3; - - return (a_val & SIGN_BIT) ? t : -t; -} - -static short ulaw2linear(unsigned char u_val) -{ - int t; - - /* Complement to obtain normal u-law value. */ - u_val = ~u_val; - - /* - * Extract and bias the quantization bits. Then - * shift up by the segment number and subtract out the bias. - */ - t = ((u_val & QUANT_MASK) << 3) + BIAS; - t <<= ((unsigned)u_val & SEG_MASK) >> SEG_SHIFT; - - return (u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS); -} - -void codecsInit() -{ - for (uint32_t i=0; i<256; i++) { - alawTable[i] = alaw2linear(i); - ulawTable[i] = ulaw2linear(i); + char filename[AUDIO_FILENAME_MAXLEN+1]; + if ((get_tmr10ms()-timeAutomaticPromptsSilence > 50) && isAudioFileReferenced((category << 24) + (index << 16) + event, filename)) { + audioQueue.playFile(filename); } } +#else + +#define isAudioFileReferenced(i, f) false + +#endif + +const int16_t alawTable[256] = { -5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736, -7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784, -2752, -2624, -3008, -2880, -2240, -2112, -2496, -2368, -3776, -3648, -4032, -3904, -3264, -3136, -3520, -3392, -22016, -20992, -24064, -23040, -17920, -16896, -19968, -18944, -30208, -29184, -32256, -31232, -26112, -25088, -28160, -27136, -11008, -10496, -12032, -11520, -8960, -8448, -9984, -9472, -15104, -14592, -16128, -15616, -13056, -12544, -14080, -13568, -344, -328, -376, -360, -280, -264, -312, -296, -472, -456, -504, -488, -408, -392, -440, -424, -88, -72, -120, -104, -24, -8, -56, -40, -216, -200, -248, -232, -152, -136, -184, -168, -1376, -1312, -1504, -1440, -1120, -1056, -1248, -1184, -1888, -1824, -2016, -1952, -1632, -1568, -1760, -1696, -688, -656, -752, -720, -560, -528, -624, -592, -944, -912, -1008, -976, -816, -784, -880, -848, 5504, 5248, 6016, 5760, 4480, 4224, 4992, 4736, 7552, 7296, 8064, 7808, 6528, 6272, 7040, 6784, 2752, 2624, 3008, 2880, 2240, 2112, 2496, 2368, 3776, 3648, 4032, 3904, 3264, 3136, 3520, 3392, 22016, 20992, 24064, 23040, 17920, 16896, 19968, 18944, 30208, 29184, 32256, 31232, 26112, 25088, 28160, 27136, 11008, 10496, 12032, 11520, 8960, 8448, 9984, 9472, 15104, 14592, 16128, 15616, 13056, 12544, 14080, 13568, 344, 328, 376, 360, 280, 264, 312, 296, 472, 456, 504, 488, 408, 392, 440, 424, 88, 72, 120, 104, 24, 8, 56, 40, 216, 200, 248, 232, 152, 136, 184, 168, 1376, 1312, 1504, 1440, 1120, 1056, 1248, 1184, 1888, 1824, 2016, 1952, 1632, 1568, 1760, 1696, 688, 656, 752, 720, 560, 528, 624, 592, 944, 912, 1008, 976, 816, 784, 880, 848 }; +const int16_t ulawTable[256] = { -32124, -31100, -30076, -29052, -28028, -27004, -25980, -24956, -23932, -22908, -21884, -20860, -19836, -18812, -17788, -16764, -15996, -15484, -14972, -14460, -13948, -13436, -12924, -12412, -11900, -11388, -10876, -10364, -9852, -9340, -8828, -8316, -7932, -7676, -7420, -7164, -6908, -6652, -6396, -6140, -5884, -5628, -5372, -5116, -4860, -4604, -4348, -4092, -3900, -3772, -3644, -3516, -3388, -3260, -3132, -3004, -2876, -2748, -2620, -2492, -2364, -2236, -2108, -1980, -1884, -1820, -1756, -1692, -1628, -1564, -1500, -1436, -1372, -1308, -1244, -1180, -1116, -1052, -988, -924, -876, -844, -812, -780, -748, -716, -684, -652, -620, -588, -556, -524, -492, -460, -428, -396, -372, -356, -340, -324, -308, -292, -276, -260, -244, -228, -212, -196, -180, -164, -148, -132, -120, -112, -104, -96, -88, -80, -72, -64, -56, -48, -40, -32, -24, -16, -8, 0, 32124, 31100, 30076, 29052, 28028, 27004, 25980, 24956, 23932, 22908, 21884, 20860, 19836, 18812, 17788, 16764, 15996, 15484, 14972, 14460, 13948, 13436, 12924, 12412, 11900, 11388, 10876, 10364, 9852, 9340, 8828, 8316, 7932, 7676, 7420, 7164, 6908, 6652, 6396, 6140, 5884, 5628, 5372, 5116, 4860, 4604, 4348, 4092, 3900, 3772, 3644, 3516, 3388, 3260, 3132, 3004, 2876, 2748, 2620, 2492, 2364, 2236, 2108, 1980, 1884, 1820, 1756, 1692, 1628, 1564, 1500, 1436, 1372, 1308, 1244, 1180, 1116, 1052, 988, 924, 876, 844, 812, 780, 748, 716, 684, 652, 620, 588, 556, 524, 492, 460, 428, 396, 372, 356, 340, 324, 308, 292, 276, 260, 244, 228, 212, 196, 180, 164, 148, 132, 120, 112, 104, 96, 88, 80, 72, 64, 56, 48, 40, 32, 24, 16, 8, 0 }; AudioQueue audioQueue; @@ -320,7 +488,6 @@ void audioTask(void* pdata) #if defined(SDCARD) if (!unexpectedShutdown) { - codecsInit(); sdInit(); AUDIO_TADA(); } @@ -348,7 +515,7 @@ void AudioQueue::pushBuffer(AudioBuffer *buffer) __enable_irq(); } -void mix(uint16_t * result, int sample, unsigned int fade) +void mixSample(uint16_t * result, int sample, unsigned int fade) { *result = limit(0, *result + ((sample >> fade) >> 4), 4095); } @@ -358,42 +525,41 @@ void mix(uint16_t * result, int sample, unsigned int fade) #define RIFF_CHUNK_SIZE 12 uint8_t wavBuffer[AUDIO_BUFFER_SIZE*2]; -int AudioQueue::mixWav(AudioContext &context, AudioBuffer *buffer, int volume, unsigned int fade) +int WavContext::mixBuffer(AudioBuffer *buffer, int volume, unsigned int fade) { FRESULT result = FR_OK; UINT read = 0; - AudioFragment & fragment = context.fragment; if (fragment.file[1]) { - result = f_open(&context.state.wav.file, fragment.file, FA_OPEN_EXISTING | FA_READ); + result = f_open(&state.file, fragment.file, FA_OPEN_EXISTING | FA_READ); fragment.file[1] = 0; if (result == FR_OK) { - result = f_read(&context.state.wav.file, wavBuffer, RIFF_CHUNK_SIZE+8, &read); + result = f_read(&state.file, wavBuffer, RIFF_CHUNK_SIZE+8, &read); if (result == FR_OK && read == RIFF_CHUNK_SIZE+8 && !memcmp(wavBuffer, "RIFF", 4) && !memcmp(wavBuffer+8, "WAVEfmt ", 8)) { uint32_t size = *((uint32_t *)(wavBuffer+16)); - result = (size < 256 ? f_read(&context.state.wav.file, wavBuffer, size+8, &read) : FR_DENIED); + result = (size < 256 ? f_read(&state.file, wavBuffer, size+8, &read) : FR_DENIED); if (result == FR_OK && read == size+8) { - context.state.wav.codec = ((uint16_t *)wavBuffer)[0]; - context.state.wav.freq = ((uint16_t *)wavBuffer)[2]; + state.codec = ((uint16_t *)wavBuffer)[0]; + state.freq = ((uint16_t *)wavBuffer)[2]; uint32_t *wavSamplesPtr = (uint32_t *)(wavBuffer + size); uint32_t size = wavSamplesPtr[1]; - if (context.state.wav.freq != 0 && context.state.wav.freq * (AUDIO_SAMPLE_RATE / context.state.wav.freq) == AUDIO_SAMPLE_RATE) { - context.state.wav.resampleRatio = (AUDIO_SAMPLE_RATE / context.state.wav.freq); - context.state.wav.readSize = (context.state.wav.codec == CODEC_ID_PCM_S16LE ? 2*AUDIO_BUFFER_SIZE : AUDIO_BUFFER_SIZE) / context.state.wav.resampleRatio; + if (state.freq != 0 && state.freq * (AUDIO_SAMPLE_RATE / state.freq) == AUDIO_SAMPLE_RATE) { + state.resampleRatio = (AUDIO_SAMPLE_RATE / state.freq); + state.readSize = (state.codec == CODEC_ID_PCM_S16LE ? 2*AUDIO_BUFFER_SIZE : AUDIO_BUFFER_SIZE) / state.resampleRatio; } else { result = FR_DENIED; } while (result == FR_OK && memcmp(wavSamplesPtr, "data", 4) != 0) { - result = f_lseek(&context.state.wav.file, f_tell(&context.state.wav.file)+size); + result = f_lseek(&state.file, f_tell(&state.file)+size); if (result == FR_OK) { - result = f_read(&context.state.wav.file, wavBuffer, 8, &read); + result = f_read(&state.file, wavBuffer, 8, &read); if (read != 8) result = FR_DENIED; wavSamplesPtr = (uint32_t *)wavBuffer; size = wavSamplesPtr[1]; } } - context.state.wav.size = size; + state.size = size; } else { result = FR_DENIED; @@ -407,128 +573,134 @@ int AudioQueue::mixWav(AudioContext &context, AudioBuffer *buffer, int volume, u read = 0; if (result == FR_OK) { - result = f_read(&context.state.wav.file, wavBuffer, context.state.wav.readSize, &read); + result = f_read(&state.file, wavBuffer, state.readSize, &read); if (result == FR_OK) { - if (read > context.state.wav.size) { - read = context.state.wav.size; + if (read > state.size) { + read = state.size; } - context.state.wav.size -= read; + state.size -= read; - if (read != context.state.wav.readSize) { - f_close(&context.state.wav.file); + if (read != state.readSize) { + f_close(&state.file); fragment.clear(); } uint16_t * samples = buffer->data; - if (context.state.wav.codec == CODEC_ID_PCM_S16LE) { + if (state.codec == CODEC_ID_PCM_S16LE) { read /= 2; for (uint32_t i=0; idata; } } - fragment.clear(); + clear(); return -result; } #else -int AudioQueue::mixWav(AudioContext &context, AudioBuffer *buffer, int volume, unsigned int fade) +int WavContext::mixBuffer(AudioBuffer *buffer, int volume, unsigned int fade) { return 0; } #endif -int AudioQueue::mixBeep(AudioContext &context, AudioBuffer *buffer, int volume, unsigned int fade) +const unsigned int toneVolumes[] = { 10, 8, 6, 4, 2 }; +inline float evalVolumeRatio(int freq, int volume) { - AudioFragment & fragment = context.fragment; - int duration = 0; - int result = 0; - - if (fragment.tone.duration > 0) { - result = AUDIO_BUFFER_SIZE; - if (fragment.tone.freq && context.state.tone.freq!=fragment.tone.freq && (!fragment.tone.freqIncr || abs(context.state.tone.freq-fragment.tone.freq) > 100)) { - int periods = BEEP_POINTS_COUNT / ((AUDIO_SAMPLE_RATE / fragment.tone.freq) + 1); - context.state.tone.count = (periods * AUDIO_SAMPLE_RATE) / fragment.tone.freq; - if (context.state.tone.idx >= context.state.tone.count) context.state.tone.idx = 0; -#if 1 - for (unsigned int i=0; idata[i], context.state.tone.points[context.state.tone.idx], fade); - context.state.tone.idx = context.state.tone.idx + 1; - if (context.state.tone.idx >= context.state.tone.count) { - context.state.tone.idx = 0; - if (end && i+BEEP_POINTS_COUNT>points) break; - } - } - - fragment.tone.duration -= duration; - if (fragment.tone.duration > 0) - return AUDIO_BUFFER_SIZE; + float result = toneVolumes[2+volume]; + if (freq < 330) { + result = (result * freq * freq) / (330 * 330); } - - if (fragment.tone.pause > 0) { - result = AUDIO_BUFFER_SIZE; - fragment.tone.pause -= min(AUDIO_BUFFER_DURATION-duration, fragment.tone.pause); - if (fragment.tone.pause > 0) - return AUDIO_BUFFER_SIZE; - } - - fragment.clear(); return result; } -int AudioQueue::mixAudioContext(AudioContext &context, AudioBuffer *buffer, int beepVolume, int wavVolume, unsigned int fade) +int ToneContext::mixBuffer(AudioBuffer *buffer, int volume, unsigned int fade) { - int result; - AudioFragment & fragment = context.fragment; + int duration = 0; + int result = 0; - if (fragment.type == FRAGMENT_TONE) { - result = mixBeep(context, buffer, beepVolume, fade); - } - else if (fragment.type == FRAGMENT_FILE) { - result = mixWav(context, buffer, wavVolume, fade); - } - else { - result = 0; + int remainingDuration = fragment.tone.duration - state.duration; + if (remainingDuration > 0) { + int points; + double toneIdx = state.idx; + + if (fragment.tone.reset) { + fragment.tone.reset = 0; + state.duration = 0; + state.pause = 0; + } + + if (fragment.tone.freq != state.freq) { + state.freq = fragment.tone.freq; + state.step = double(DIM(sineValues)*fragment.tone.freq) / AUDIO_SAMPLE_RATE; + state.volume = evalVolumeRatio(fragment.tone.freq, volume); + } + + if (fragment.tone.freqIncr) { + fragment.tone.freq += AUDIO_BUFFER_DURATION * fragment.tone.freqIncr; + } + + if (remainingDuration > AUDIO_BUFFER_DURATION) { + duration = AUDIO_BUFFER_DURATION; + points = AUDIO_BUFFER_SIZE; + } + else { + duration = remainingDuration; + points = (duration * AUDIO_BUFFER_SIZE) / AUDIO_BUFFER_DURATION; + unsigned int end = toneIdx + (state.step * points); + if (end > DIM(sineValues)) + end -= (end % DIM(sineValues)); + else + end = DIM(sineValues); + points = (double(end) - toneIdx) / state.step; + } + + for (int i=0; idata[i], sample, fade); + toneIdx += state.step; + if ((unsigned int)toneIdx >= DIM(sineValues)) + toneIdx -= DIM(sineValues); + } + + if (remainingDuration > AUDIO_BUFFER_DURATION) { + state.duration += AUDIO_BUFFER_DURATION; + state.idx = toneIdx; + return AUDIO_BUFFER_SIZE; + } + else { + state.duration = 32000; // once the tone is finished, it's not possible to update its frequency and duration + } } + remainingDuration = fragment.tone.pause - state.pause; + if (remainingDuration > 0) { + result = AUDIO_BUFFER_SIZE; + state.pause += min(AUDIO_BUFFER_DURATION-duration, fragment.tone.pause); + if (fragment.tone.pause > state.pause) + return result; + } + + clear(); return result; } @@ -545,15 +717,20 @@ void AudioQueue::wakeup() buffer->data[i] = 0x8000 >> 4; /* silence */ } - // mix the foreground context - result = mixAudioContext(foregroundContext, buffer, g_eeGeneral.beepVolume, g_eeGeneral.wavVolume, fade); + // mix the priority context (only tones) + result = priorityContext.mixBuffer(buffer, g_eeGeneral.beepVolume, fade); if (result > 0) { - size = max(size, result); + size = result; fade += 1; } - // mix the normal context - result = mixAudioContext(currentContext, buffer, g_eeGeneral.beepVolume, g_eeGeneral.wavVolume, fade); + // mix the normal context (tones and wavs) + if (normalContext.fragment.type == FRAGMENT_TONE) + result = normalContext.tone.mixBuffer(buffer, g_eeGeneral.beepVolume, fade); + else if (normalContext.fragment.type == FRAGMENT_FILE) + result = normalContext.wav.mixBuffer(buffer, g_eeGeneral.wavVolume, fade); + else + result = 0; if (result > 0) { size = max(size, result); fade += 1; @@ -561,8 +738,7 @@ void AudioQueue::wakeup() else { CoEnterMutexSection(audioMutex); if (ridx != widx) { - currentContext.clear(); - currentContext.fragment = fragments[ridx]; + normalContext.fragment = fragments[ridx]; if (!fragments[ridx].repeat--) { ridx = (ridx + 1) % AUDIO_QUEUE_LENGTH; } @@ -570,9 +746,16 @@ void AudioQueue::wakeup() CoLeaveMutexSection(audioMutex); } + // mix the vario context + result = varioContext.mixBuffer(buffer, g_eeGeneral.varioVolume, fade); + if (result > 0) { + size = max(size, result); + fade += 1; + } + // mix the background context - if (!isFunctionActive(FUNC_BACKGND_MUSIC_PAUSE)) { - result = mixAudioContext(backgroundContext, buffer, g_eeGeneral.varioVolume, g_eeGeneral.backgroundVolume, fade); + if (isFunctionActive(FUNCTION_BACKGND_MUSIC) && !isFunctionActive(FUNCTION_BACKGND_MUSIC_PAUSE)) { + result = backgroundContext.mixBuffer(buffer, g_eeGeneral.backgroundVolume, fade); if (result > 0) { size = max(size, result); } @@ -600,12 +783,12 @@ inline unsigned int getToneLength(uint16_t len) void AudioQueue::pause(uint16_t len) { - play(0, 0, len); + playTone(0, 0, len); } bool AudioQueue::isPlaying(uint8_t id) { - if (currentContext.fragment.id == id || backgroundContext.fragment.id == id) + if (normalContext.fragment.id == id || backgroundContext.fragment.id == id) return true; uint8_t i = ridx; @@ -618,7 +801,7 @@ bool AudioQueue::isPlaying(uint8_t id) return false; } -void AudioQueue::play(uint16_t freq, uint16_t len, uint16_t pause, uint8_t flags, int8_t freqIncr) +void AudioQueue::playTone(uint16_t freq, uint16_t len, uint16_t pause, uint8_t flags, int8_t freqIncr) { CoEnterMutexSection(audioMutex); @@ -626,21 +809,21 @@ void AudioQueue::play(uint16_t freq, uint16_t len, uint16_t pause, uint8_t flags freq = BEEP_MIN_FREQ; if (flags & PLAY_BACKGROUND) { - AudioFragment & fragment = backgroundContext.fragment; - backgroundContext.clear(); + AudioFragment & fragment = varioContext.fragment; fragment.type = FRAGMENT_TONE; fragment.tone.freq = freq; fragment.tone.duration = len; fragment.tone.pause = pause; + fragment.tone.reset = (flags & PLAY_NOW); } else { freq += g_eeGeneral.speakerPitch * 15; len = getToneLength(len); if (flags & PLAY_NOW) { - AudioFragment & fragment = foregroundContext.fragment; + AudioFragment & fragment = priorityContext.fragment; if (fragment.type == FRAGMENT_EMPTY) { - foregroundContext.clear(); + priorityContext.clear(); fragment.type = FRAGMENT_TONE; fragment.repeat = flags & 0x0f; fragment.tone.freq = freq; @@ -679,6 +862,9 @@ void AudioQueue::playFile(const char *filename, uint8_t flags, uint8_t id) if (!sdMounted()) return; + if (g_eeGeneral.beepMode == e_mode_quiet) + return; + if (strlen(filename) > AUDIO_FILENAME_MAXLEN) { POPUP_WARNING(STR_PATH_TOO_LONG); return; @@ -694,9 +880,9 @@ void AudioQueue::playFile(const char *filename, uint8_t flags, uint8_t id) fragment.id = id; } else if (flags & PLAY_NOW) { - AudioFragment & fragment = foregroundContext.fragment; + AudioFragment & fragment = priorityContext.fragment; if (fragment.type == FRAGMENT_EMPTY) { - foregroundContext.clear(); + priorityContext.clear(); fragment.type = FRAGMENT_FILE; strcpy(fragment.file, filename); fragment.repeat = flags & 0x0f; @@ -737,7 +923,7 @@ void AudioQueue::stopSD() { sdAvailableSystemAudioFiles = 0; reset(); - play(0, 0, 100, PLAY_NOW); // insert a 100ms pause + playTone(0, 0, 100, PLAY_NOW); // insert a 100ms pause } #endif @@ -746,18 +932,15 @@ void AudioQueue::reset() { CoEnterMutexSection(audioMutex); widx = ridx; // clean the queue - foregroundContext.clear(); - currentContext.clear(); + priorityContext.clear(); + normalContext.tone.clear(); + varioContext.clear(); backgroundContext.clear(); CoLeaveMutexSection(audioMutex); } void audioEvent(uint8_t e, uint16_t f) { -#if defined(SDCARD) - char filename[AUDIO_FILENAME_MAXLEN+1]; -#endif - #if defined(HAPTIC) haptic.event(e); //do this before audio to help sync timings #endif @@ -770,7 +953,8 @@ void audioEvent(uint8_t e, uint16_t f) if (g_eeGeneral.beepMode>0 || (g_eeGeneral.beepMode==0 && e>=AU_TRIM_MOVE) || (g_eeGeneral.beepMode>=-1 && e<=AU_ERROR)) { #if defined(SDCARD) - if (e < AU_FRSKY_FIRST && isAudioFileAvailable(e, filename)) { + char filename[AUDIO_FILENAME_MAXLEN+1]; + if (e < AU_FRSKY_FIRST && isAudioFileReferenced(e, filename)) { audioQueue.playFile(filename); } else @@ -779,23 +963,23 @@ void audioEvent(uint8_t e, uint16_t f) switch (e) { // inactivity timer alert case AU_INACTIVITY: - audioQueue.play(2250, 80, 20, PLAY_REPEAT(2)); + audioQueue.playTone(2250, 80, 20, PLAY_REPEAT(2)); break; // low battery in tx case AU_TX_BATTERY_LOW: - audioQueue.play(1950, 160, 20, PLAY_REPEAT(2), 1); - audioQueue.play(2550, 160, 20, PLAY_REPEAT(2), -1); + audioQueue.playTone(1950, 160, 20, PLAY_REPEAT(2), 1); + audioQueue.playTone(2550, 160, 20, PLAY_REPEAT(2), -1); break; #if defined(PCBSKY9X) case AU_TX_MAH_HIGH: // TODO Rob something better here? - audioQueue.play(1950, 160, 20, PLAY_REPEAT(2), 1); - audioQueue.play(2550, 160, 20, PLAY_REPEAT(2), -1); + audioQueue.playTone(1950, 160, 20, PLAY_REPEAT(2), 1); + audioQueue.playTone(2550, 160, 20, PLAY_REPEAT(2), -1); break; case AU_TX_TEMP_HIGH: // TODO Rob something better here? - audioQueue.play(1950, 160, 20, PLAY_REPEAT(2), 1); - audioQueue.play(2550, 160, 20, PLAY_REPEAT(2), -1); + audioQueue.playTone(1950, 160, 20, PLAY_REPEAT(2), 1); + audioQueue.playTone(2550, 160, 20, PLAY_REPEAT(2), -1); break; #endif #if defined(VOICE) @@ -803,43 +987,43 @@ void audioEvent(uint8_t e, uint16_t f) case AU_SWITCH_ALERT: #endif case AU_ERROR: - audioQueue.play(BEEP_DEFAULT_FREQ, 200, 20, PLAY_NOW); + audioQueue.playTone(BEEP_DEFAULT_FREQ, 200, 20, PLAY_NOW); break; // keypad up (seems to be used when going left/right through system menu options. 0-100 scales etc) case AU_KEYPAD_UP: - audioQueue.play(BEEP_KEY_UP_FREQ, 80, 20, PLAY_NOW); + audioQueue.playTone(BEEP_KEY_UP_FREQ, 80, 20, PLAY_NOW); break; // keypad down (seems to be used when going left/right through system menu options. 0-100 scales etc) case AU_KEYPAD_DOWN: - audioQueue.play(BEEP_KEY_DOWN_FREQ, 80, 20, PLAY_NOW); + audioQueue.playTone(BEEP_KEY_DOWN_FREQ, 80, 20, PLAY_NOW); break; // menu display (also used by a few generic beeps) case AU_MENUS: - audioQueue.play(BEEP_DEFAULT_FREQ, 80, 20, PLAY_NOW); + audioQueue.playTone(BEEP_DEFAULT_FREQ, 80, 20, PLAY_NOW); break; // trim move case AU_TRIM_MOVE: - audioQueue.play(f, 40, 20, PLAY_NOW); + audioQueue.playTone(f, 40, 20, PLAY_NOW); break; // trim center case AU_TRIM_MIDDLE: - audioQueue.play(f, 80, 20, PLAY_NOW); + audioQueue.playTone(f, 80, 20, PLAY_NOW); break; // trim center case AU_TRIM_END: - audioQueue.play(f, 80, 20, PLAY_NOW); + audioQueue.playTone(f, 80, 20, PLAY_NOW); break; // warning one case AU_WARNING1: - audioQueue.play(BEEP_DEFAULT_FREQ, 80, 20, PLAY_NOW); + audioQueue.playTone(BEEP_DEFAULT_FREQ, 80, 20, PLAY_NOW); break; // warning two case AU_WARNING2: - audioQueue.play(BEEP_DEFAULT_FREQ, 160, 20, PLAY_NOW); + audioQueue.playTone(BEEP_DEFAULT_FREQ, 160, 20, PLAY_NOW); break; // warning three case AU_WARNING3: - audioQueue.play(BEEP_DEFAULT_FREQ, 200, 20, PLAY_NOW); + audioQueue.playTone(BEEP_DEFAULT_FREQ, 200, 20, PLAY_NOW); break; // pot/stick center case AU_STICK1_MIDDLE: @@ -854,120 +1038,120 @@ void audioEvent(uint8_t e, uint16_t f) #else case AU_POT3_MIDDLE: #endif - audioQueue.play(BEEP_DEFAULT_FREQ+1500, 80, 20, PLAY_NOW); + audioQueue.playTone(BEEP_DEFAULT_FREQ+1500, 80, 20, PLAY_NOW); break; // mix warning 1 case AU_MIX_WARNING_1: - audioQueue.play(BEEP_DEFAULT_FREQ+1440, 48, 32); + audioQueue.playTone(BEEP_DEFAULT_FREQ+1440, 48, 32); break; // mix warning 2 case AU_MIX_WARNING_2: - audioQueue.play(BEEP_DEFAULT_FREQ+1560, 48, 32, PLAY_REPEAT(1)); + audioQueue.playTone(BEEP_DEFAULT_FREQ+1560, 48, 32, PLAY_REPEAT(1)); break; // mix warning 3 case AU_MIX_WARNING_3: - audioQueue.play(BEEP_DEFAULT_FREQ+1680, 48, 32, PLAY_REPEAT(2)); + audioQueue.playTone(BEEP_DEFAULT_FREQ+1680, 48, 32, PLAY_REPEAT(2)); break; // timer == 0 case AU_TIMER_00: - audioQueue.play(BEEP_DEFAULT_FREQ+150, 240, 20, PLAY_NOW); + audioQueue.playTone(BEEP_DEFAULT_FREQ+150, 300, 20, PLAY_NOW); break; // timer <= 10 seconds left case AU_TIMER_LT10: - audioQueue.play(BEEP_DEFAULT_FREQ+150, 120, 20, PLAY_NOW); + audioQueue.playTone(BEEP_DEFAULT_FREQ+150, 120, 20, PLAY_NOW); break; // timer 20 seconds left case AU_TIMER_20: - audioQueue.play(BEEP_DEFAULT_FREQ+150, 120, 20, PLAY_REPEAT(1)|PLAY_NOW); + audioQueue.playTone(BEEP_DEFAULT_FREQ+150, 120, 20, PLAY_REPEAT(1)|PLAY_NOW); break; // timer 30 seconds left case AU_TIMER_30: - audioQueue.play(BEEP_DEFAULT_FREQ+150, 120, 20, PLAY_REPEAT(2)|PLAY_NOW); + audioQueue.playTone(BEEP_DEFAULT_FREQ+150, 120, 20, PLAY_REPEAT(2)|PLAY_NOW); break; #if defined(PCBTARANIS) case AU_A1_ORANGE: - audioQueue.play(BEEP_DEFAULT_FREQ+600, 200, 20, PLAY_NOW); + audioQueue.playTone(BEEP_DEFAULT_FREQ+600, 200, 20, PLAY_NOW); break; case AU_A1_RED: - audioQueue.play(BEEP_DEFAULT_FREQ+600, 200, 20, PLAY_REPEAT(1)|PLAY_NOW); + audioQueue.playTone(BEEP_DEFAULT_FREQ+600, 200, 20, PLAY_REPEAT(1)|PLAY_NOW); break; case AU_A2_ORANGE: - audioQueue.play(BEEP_DEFAULT_FREQ+1500, 200, 20, PLAY_NOW); + audioQueue.playTone(BEEP_DEFAULT_FREQ+1500, 200, 20, PLAY_NOW); break; case AU_A2_RED: - audioQueue.play(BEEP_DEFAULT_FREQ+1500, 200, 20, PLAY_REPEAT(1)|PLAY_NOW); + audioQueue.playTone(BEEP_DEFAULT_FREQ+1500, 200, 20, PLAY_REPEAT(1)|PLAY_NOW); break; case AU_RSSI_ORANGE: - audioQueue.play(BEEP_DEFAULT_FREQ+1500, 800, 20, PLAY_NOW); + audioQueue.playTone(BEEP_DEFAULT_FREQ+1500, 800, 20, PLAY_NOW); break; case AU_RSSI_RED: - audioQueue.play(BEEP_DEFAULT_FREQ+1800, 800, 20, PLAY_REPEAT(1)|PLAY_NOW); + audioQueue.playTone(BEEP_DEFAULT_FREQ+1800, 800, 20, PLAY_REPEAT(1)|PLAY_NOW); break; case AU_SWR_RED: - audioQueue.play(450, 160, 40, PLAY_REPEAT(2), 1); + audioQueue.playTone(450, 160, 40, PLAY_REPEAT(2), 1); break; #endif case AU_FRSKY_BEEP1: - audioQueue.play(BEEP_DEFAULT_FREQ, 60, 20); + audioQueue.playTone(BEEP_DEFAULT_FREQ, 60, 20); break; case AU_FRSKY_BEEP2: - audioQueue.play(BEEP_DEFAULT_FREQ, 120, 20); + audioQueue.playTone(BEEP_DEFAULT_FREQ, 120, 20); break; case AU_FRSKY_BEEP3: - audioQueue.play(BEEP_DEFAULT_FREQ, 200, 20); + audioQueue.playTone(BEEP_DEFAULT_FREQ, 200, 20); break; case AU_FRSKY_WARN1: - audioQueue.play(BEEP_DEFAULT_FREQ+600, 120, 40, PLAY_REPEAT(2)); + audioQueue.playTone(BEEP_DEFAULT_FREQ+600, 120, 40, PLAY_REPEAT(2)); break; case AU_FRSKY_WARN2: - audioQueue.play(BEEP_DEFAULT_FREQ+900, 120, 40, PLAY_REPEAT(2)); + audioQueue.playTone(BEEP_DEFAULT_FREQ+900, 120, 40, PLAY_REPEAT(2)); break; case AU_FRSKY_CHEEP: - audioQueue.play(BEEP_DEFAULT_FREQ+900, 80, 20, PLAY_REPEAT(2), 2); + audioQueue.playTone(BEEP_DEFAULT_FREQ+900, 80, 20, PLAY_REPEAT(2), 2); break; case AU_FRSKY_RING: - audioQueue.play(BEEP_DEFAULT_FREQ+750, 40, 20, PLAY_REPEAT(10)); - audioQueue.play(BEEP_DEFAULT_FREQ+750, 40, 80, PLAY_REPEAT(1)); - audioQueue.play(BEEP_DEFAULT_FREQ+750, 40, 20, PLAY_REPEAT(10)); + audioQueue.playTone(BEEP_DEFAULT_FREQ+750, 40, 20, PLAY_REPEAT(10)); + audioQueue.playTone(BEEP_DEFAULT_FREQ+750, 40, 80, PLAY_REPEAT(1)); + audioQueue.playTone(BEEP_DEFAULT_FREQ+750, 40, 20, PLAY_REPEAT(10)); break; case AU_FRSKY_SCIFI: - audioQueue.play(2550, 80, 20, PLAY_REPEAT(2), -1); - audioQueue.play(1950, 80, 20, PLAY_REPEAT(2), 1); - audioQueue.play(2250, 80, 20, 0); + audioQueue.playTone(2550, 80, 20, PLAY_REPEAT(2), -1); + audioQueue.playTone(1950, 80, 20, PLAY_REPEAT(2), 1); + audioQueue.playTone(2250, 80, 20, 0); break; case AU_FRSKY_ROBOT: - audioQueue.play(2250, 40, 20, PLAY_REPEAT(1)); - audioQueue.play(1650, 120, 20, PLAY_REPEAT(1)); - audioQueue.play(2550, 120, 20, PLAY_REPEAT(1)); + audioQueue.playTone(2250, 40, 20, PLAY_REPEAT(1)); + audioQueue.playTone(1650, 120, 20, PLAY_REPEAT(1)); + audioQueue.playTone(2550, 120, 20, PLAY_REPEAT(1)); break; case AU_FRSKY_CHIRP: - audioQueue.play(BEEP_DEFAULT_FREQ+1200, 40, 20, PLAY_REPEAT(2)); - audioQueue.play(BEEP_DEFAULT_FREQ+1620, 40, 20, PLAY_REPEAT(3)); + audioQueue.playTone(BEEP_DEFAULT_FREQ+1200, 40, 20, PLAY_REPEAT(2)); + audioQueue.playTone(BEEP_DEFAULT_FREQ+1620, 40, 20, PLAY_REPEAT(3)); break; case AU_FRSKY_TADA: - audioQueue.play(1650, 80, 40); - audioQueue.play(2850, 80, 40); - audioQueue.play(3450, 64, 36, PLAY_REPEAT(2)); + audioQueue.playTone(1650, 80, 40); + audioQueue.playTone(2850, 80, 40); + audioQueue.playTone(3450, 64, 36, PLAY_REPEAT(2)); break; case AU_FRSKY_CRICKET: - audioQueue.play(2550, 40, 80, PLAY_REPEAT(3)); - audioQueue.play(2550, 40, 160, PLAY_REPEAT(1)); - audioQueue.play(2550, 40, 80, PLAY_REPEAT(3)); + audioQueue.playTone(2550, 40, 80, PLAY_REPEAT(3)); + audioQueue.playTone(2550, 40, 160, PLAY_REPEAT(1)); + audioQueue.playTone(2550, 40, 80, PLAY_REPEAT(3)); break; case AU_FRSKY_SIREN: - audioQueue.play(450, 160, 40, PLAY_REPEAT(2), 2); + audioQueue.playTone(450, 160, 40, PLAY_REPEAT(2), 2); break; case AU_FRSKY_ALARMC: - audioQueue.play(1650, 32, 68, PLAY_REPEAT(2)); - audioQueue.play(2250, 64, 156, PLAY_REPEAT(1)); - audioQueue.play(1650, 64, 76, PLAY_REPEAT(2)); - audioQueue.play(2250, 32, 168, PLAY_REPEAT(1)); + audioQueue.playTone(1650, 32, 68, PLAY_REPEAT(2)); + audioQueue.playTone(2250, 64, 156, PLAY_REPEAT(1)); + audioQueue.playTone(1650, 64, 76, PLAY_REPEAT(2)); + audioQueue.playTone(2250, 32, 168, PLAY_REPEAT(1)); break; case AU_FRSKY_RATATA: - audioQueue.play(BEEP_DEFAULT_FREQ+1500, 40, 80, PLAY_REPEAT(10)); + audioQueue.playTone(BEEP_DEFAULT_FREQ+1500, 40, 80, PLAY_REPEAT(10)); break; case AU_FRSKY_TICK: - audioQueue.play(BEEP_DEFAULT_FREQ+1500, 40, 400, PLAY_REPEAT(2)); + audioQueue.playTone(BEEP_DEFAULT_FREQ+1500, 40, 400, PLAY_REPEAT(2)); break; default: break; @@ -979,16 +1163,13 @@ void audioEvent(uint8_t e, uint16_t f) void pushPrompt(uint16_t prompt, uint8_t id) { #if defined(SDCARD) - - char filename[] = SYSTEM_SOUNDS_PATH "/0000" SOUNDS_EXT; - strncpy(filename+SOUNDS_PATH_LNG_OFS, currentLanguagePack->id, 2); - + char filename[AUDIO_FILENAME_MAXLEN+1]; + char * str = getSystemAudioPath(filename); + strcpy(str, "0000" SOUNDS_EXT); for (int8_t i=3; i>=0; i--) { - filename[sizeof(SYSTEM_SOUNDS_PATH)+i] = '0' + (prompt%10); + str[i] = '0' + (prompt%10); prompt /= 10; } - audioQueue.playFile(filename, 0, id); - #endif } diff --git a/radio/src/audio_arm.h b/radio/src/audio_arm.h index 9b45187b0..65a9d6233 100644 --- a/radio/src/audio_arm.h +++ b/radio/src/audio_arm.h @@ -47,11 +47,10 @@ #define AUDIO_BUFFER_SIZE (AUDIO_SAMPLE_RATE*AUDIO_BUFFER_DURATION/1000) #define AUDIO_BUFFER_COUNT (3) -#define BEEP_MIN_FREQ (440) +#define BEEP_MIN_FREQ (150) #define BEEP_DEFAULT_FREQ (2250) #define BEEP_KEY_UP_FREQ (BEEP_DEFAULT_FREQ+150) #define BEEP_KEY_DOWN_FREQ (BEEP_DEFAULT_FREQ-150) -#define BEEP_POINTS_COUNT 100 #define AUDIO_BUFFER_FREE (0) #define AUDIO_BUFFER_FILLED (1) @@ -63,9 +62,11 @@ struct AudioBuffer { uint8_t state; }; -#define FRAGMENT_EMPTY 0 -#define FRAGMENT_TONE 1 -#define FRAGMENT_FILE 2 +enum FragmentTypes { + FRAGMENT_EMPTY, + FRAGMENT_TONE, + FRAGMENT_FILE, +}; struct AudioFragment { uint8_t type; @@ -77,6 +78,7 @@ struct AudioFragment { uint16_t duration; uint16_t pause; int8_t freqIncr; + uint8_t reset; } tone; char file[AUDIO_FILENAME_MAXLEN+1]; @@ -88,34 +90,57 @@ struct AudioFragment { } }; -class AudioContext { +class ToneContext { public: AudioFragment fragment; - union { -#if defined(SDCARD) - struct { - FIL file; - uint8_t codec; - uint32_t freq; - uint32_t size; - uint8_t resampleRatio; - uint16_t readSize; - } wav; -#endif + struct { + double step; + double idx; + float volume; + uint16_t freq; + uint16_t duration; + uint16_t pause; + } state; - struct { - int16_t points[BEEP_POINTS_COUNT]; - uint8_t count; - uint8_t idx; - uint16_t freq; - } tone; + inline void clear() + { + memset(this, 0, sizeof(ToneContext)); + } + + int mixBuffer(AudioBuffer *buffer, int volume, unsigned int fade); +}; + +class WavContext { + public: + AudioFragment fragment; + + struct { + FIL file; + uint8_t codec; + uint32_t freq; + uint32_t size; + uint8_t resampleRatio; + uint16_t readSize; } state; inline void clear() { fragment.clear(); } + + int mixBuffer(AudioBuffer *buffer, int volume, unsigned int fade); +}; + +class MixedContext { + public: + union { + AudioFragment fragment; + ToneContext tone; + WavContext wav; + }; + + int mixBuffer(AudioBuffer *buffer, int volume, unsigned int fade); }; bool dacQueue(AudioBuffer *buffer); @@ -130,7 +155,7 @@ class AudioQueue { void start(); - void play(uint16_t freq, uint16_t len, uint16_t pause=0, uint8_t flags=0, int8_t freqIncr=0); + void playTone(uint16_t freq, uint16_t len, uint16_t pause=0, uint8_t flags=0, int8_t freqIncr=0); void playFile(const char *filename, uint8_t flags=0, uint8_t id=0); @@ -178,19 +203,16 @@ class AudioQueue { void wakeup(); - int mixAudioContext(AudioContext &context, AudioBuffer *buffer, int beepVolume, int wavVolume, unsigned int fade); - int mixBeep(AudioContext &context, AudioBuffer *buffer, int volume, unsigned int fade); - int mixWav(AudioContext &context, AudioBuffer *buffer, int volume, unsigned int fade); - volatile bool state; uint8_t ridx; uint8_t widx; AudioFragment fragments[AUDIO_QUEUE_LENGTH]; - AudioContext backgroundContext; // for background music / vario - AudioContext currentContext; - AudioContext foregroundContext; // for important beeps + MixedContext normalContext; + WavContext backgroundContext; + ToneContext priorityContext; + ToneContext varioContext; AudioBuffer buffers[AUDIO_BUFFER_COUNT]; uint8_t bufferRIdx; @@ -254,13 +276,11 @@ void audioStart(); #define AUDIO_INACTIVITY() AUDIO_BUZZER(audioEvent(AU_INACTIVITY), beep(3)) #define AUDIO_MIX_WARNING(x) AUDIO_BUZZER(audioEvent(AU_MIX_WARNING_1+x-1), beep(1)) #define AUDIO_POT_MIDDLE(x) AUDIO_BUZZER(audioEvent(AU_STICK1_MIDDLE+x), beep(2)) -#define AUDIO_VARIO_UP() audioEvent(AU_KEYPAD_UP) -#define AUDIO_VARIO_DOWN() audioEvent(AU_KEYPAD_DOWN) #define AUDIO_TRIM_MIDDLE(f) AUDIO_BUZZER(audioEvent(AU_TRIM_MIDDLE, f), beep(2)) #define AUDIO_TRIM_END(f) AUDIO_BUZZER(audioEvent(AU_TRIM_END, f), beep(2)) #define AUDIO_TRIM(event, f) AUDIO_BUZZER(audioEvent(AU_TRIM_MOVE, f), { if (!IS_KEY_FIRST(event)) warble = true; beep(1); }) #define AUDIO_PLAY(p) audioEvent(p) -#define AUDIO_VARIO(f, t) audioQueue.play(f, t, 0, PLAY_BACKGROUND) +#define AUDIO_VARIO(fq, t, p, f) audioQueue.playTone(fq, t, p, f) #if defined(PCBTARANIS) #define AUDIO_A1_ORANGE() audioEvent(AU_A1_ORANGE) @@ -277,16 +297,21 @@ void audioStart(); #define AUDIO_HEARTBEAT() -#define SYSTEM_AUDIO_CATEGORY 0 -#define MODEL_AUDIO_CATEGORY 1 -#define PHASE_AUDIO_CATEGORY 2 -#define MIXER_AUDIO_CATEGORY 3 +enum AutomaticPromptsCategories { + SYSTEM_AUDIO_CATEGORY, + MODEL_AUDIO_CATEGORY, + PHASE_AUDIO_CATEGORY, + SWITCH_AUDIO_CATEGORY, + LOGICAL_SWITCH_AUDIO_CATEGORY, +}; -#define AUDIO_EVENT_OFF 0 -#define AUDIO_EVENT_ON 1 -#define AUDIO_EVENT_BG 2 +enum AutomaticPromptsEvents { + AUDIO_EVENT_OFF, + AUDIO_EVENT_ON, + AUDIO_EVENT_MID, +}; -extern void pushPrompt(uint16_t prompt, uint8_t id=0); +void pushPrompt(uint16_t prompt, uint8_t id=0); #define I18N_PLAY_FUNCTION(lng, x, ...) void lng ## _ ## x(__VA_ARGS__, uint8_t id) #define PLAY_FUNCTION(x, ...) void x(__VA_ARGS__, uint8_t id) @@ -300,15 +325,26 @@ extern void pushPrompt(uint16_t prompt, uint8_t id=0); #define AUDIO_RESET() audioQueue.reset() #if defined(SDCARD) - #define PLAY_PHASE_OFF(phase) do { char filename[AUDIO_FILENAME_MAXLEN+1]; if (isAudioFileAvailable((PHASE_AUDIO_CATEGORY << 24) + (phase << 16) + AUDIO_EVENT_OFF, filename)) audioQueue.playFile(filename); } while (0) - #define PLAY_PHASE_ON(phase) do { char filename[AUDIO_FILENAME_MAXLEN+1]; if (isAudioFileAvailable((PHASE_AUDIO_CATEGORY << 24) + (phase << 16) + AUDIO_EVENT_ON, filename)) audioQueue.playFile(filename); } while (0) + extern tmr10ms_t timeAutomaticPromptsSilence; + void playModelEvent(uint8_t category, uint8_t index, uint8_t event=0); + #define PLAY_PHASE_OFF(phase) playModelEvent(PHASE_AUDIO_CATEGORY, phase, AUDIO_EVENT_OFF) + #define PLAY_PHASE_ON(phase) playModelEvent(PHASE_AUDIO_CATEGORY, phase, AUDIO_EVENT_ON) + #define PLAY_SWITCH_MOVED(sw) playModelEvent(SWITCH_AUDIO_CATEGORY, sw) + #define PLAY_LOGICAL_SWITCH_OFF(sw) playModelEvent(LOGICAL_SWITCH_AUDIO_CATEGORY, sw, AUDIO_EVENT_OFF) + #define PLAY_LOGICAL_SWITCH_ON(sw) playModelEvent(LOGICAL_SWITCH_AUDIO_CATEGORY, sw, AUDIO_EVENT_ON) + #define SKIP_AUTOMATIC_PROMPTS() timeAutomaticPromptsSilence = get_tmr10ms() #else #define PLAY_PHASE_OFF(phase) #define PLAY_PHASE_ON(phase) + #define PLAY_SWITCH_MOVED(sw) + #define PLAY_LOGICAL_SWITCH_OFF(sw) + #define PLAY_LOGICAL_SWITCH_ON(sw) + #define SKIP_AUTOMATIC_PROMPTS() #endif -extern void refreshSystemAudioFiles(); -extern void refreshModelAudioFiles(); -extern bool isAudioFileAvailable(uint32_t i, char * filename); +void referenceSystemAudioFiles(); +void referenceModelAudioFiles(); + +bool isAudioFileReferenced(uint32_t i, char * filename/*at least AUDIO_FILENAME_MAXLEN+1 long*/); #endif diff --git a/radio/src/audio_avr.cpp b/radio/src/audio_avr.cpp index 356e9051d..9931269eb 100644 --- a/radio/src/audio_avr.cpp +++ b/radio/src/audio_avr.cpp @@ -227,7 +227,7 @@ void audioQueue::event(uint8_t e, uint8_t f) break; default: { - const static pm_uint8_t singleSounds[] PROGMEM = { + static const pm_uint8_t singleSounds[] PROGMEM = { 70, 10, 2, PLAY_REPEAT(2)|PLAY_NOW, // INACTIVITY BEEP_DEFAULT_FREQ, 40, 1, PLAY_NOW, // ERROR BEEP_KEY_UP_FREQ, 10, 1, PLAY_NOW, // KEYPAD_UP diff --git a/radio/src/audio_avr.h b/radio/src/audio_avr.h index ba5e9653a..691305655 100644 --- a/radio/src/audio_avr.h +++ b/radio/src/audio_avr.h @@ -141,7 +141,7 @@ void audioDefevent(uint8_t e); #define AUDIO_TIMER_LT10(m, x) AUDIO_BUZZER(audioDefevent(AU_TIMER_LT10), beep(2)) #define AUDIO_TIMER_00(m) AUDIO_BUZZER(audioDefevent(AU_TIMER_00), beep(3)) #define AUDIO_MIX_WARNING(x) AUDIO_BUZZER(audioDefevent(AU_MIX_WARNING_1+x-1), beep(1)) -#define AUDIO_POT_MIDDLE(x) AUDIO_BUZZER(audioDefevent(AU_POT_MIDDLE), beep(2)) +#define AUDIO_POT_MIDDLE() AUDIO_BUZZER(audioDefevent(AU_POT_MIDDLE), beep(2)) #define AUDIO_VARIO_UP() audioDefevent(AU_KEYPAD_UP) #define AUDIO_VARIO_DOWN() audioDefevent(AU_KEYPAD_DOWN) #define AUDIO_TRIM_MIDDLE(f) AUDIO_BUZZER(audio.event(AU_TRIM_MIDDLE, f), beep(2)) @@ -157,5 +157,9 @@ void audioDefevent(uint8_t e); #define PLAY_PHASE_OFF(phase) #define PLAY_PHASE_ON(phase) +#define PLAY_SWITCH_MOVED(sw) +#define PLAY_LOGICAL_SWITCH_OFF(sw) +#define PLAY_LOGICAL_SWITCH_ON(sw) +#define SKIP_AUTOMATIC_PROMPTS() #endif 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/buzzer.h b/radio/src/buzzer.h index 4f89e78cb..6d901bbbb 100644 --- a/radio/src/buzzer.h +++ b/radio/src/buzzer.h @@ -87,7 +87,7 @@ void beep(uint8_t val); #define AUDIO_WARNING1() beep(3) #define AUDIO_ERROR() beep(4) #define AUDIO_MIX_WARNING(x) beep(1) - #define AUDIO_POT_MIDDLE(x) beep(2) + #define AUDIO_POT_MIDDLE() beep(2) #define AUDIO_TIMER_LT10(m, x) beep(2) #define AUDIO_TIMER_00(m) beep(3) #define AUDIO_VARIO_UP() _beep(1) @@ -102,6 +102,10 @@ void beep(uint8_t val); #define PLAY_PHASE_OFF(phase) #define PLAY_PHASE_ON(phase) + #define PLAY_SWITCH_MOVED(sw) + #define PLAY_LOGICAL_SWITCH_OFF(sw) + #define PLAY_LOGICAL_SWITCH_ON(sw) + #define SKIP_AUTOMATIC_PROMPTS() #endif #if !defined(CPUARM) diff --git a/radio/src/debug.h b/radio/src/debug.h index f259d4b11..cd852f852 100644 --- a/radio/src/debug.h +++ b/radio/src/debug.h @@ -73,7 +73,6 @@ inline void dump(unsigned char *data, unsigned int size) extern "C" { #endif -void debugPutc(const char c); void debugPuts(const char *string, ...); void dump(unsigned char *data, unsigned int size); diff --git a/radio/src/eeprom_conversions.cpp b/radio/src/eeprom_conversions.cpp index 0e325d247..d6f95a775 100644 --- a/radio/src/eeprom_conversions.cpp +++ b/radio/src/eeprom_conversions.cpp @@ -122,7 +122,7 @@ PACK(typedef struct { }) TimerData_v215; PACK(typedef struct { - TRIMS_ARRAY; + int16_t trim[4]; int8_t swtch; // swtch of phase[0] is not used char name[LEN_FP_NAME]; uint8_t fadeIn; @@ -131,6 +131,30 @@ PACK(typedef struct { gvar_t gvars[5]; }) PhaseData_v215; +PACK(typedef struct { + int16_t v1; + int16_t v2; + uint8_t func; + uint8_t delay; + uint8_t duration; + int8_t andsw; +}) LogicalSwitchData_v215; + +PACK(typedef struct { + int8_t swtch; + uint8_t func; + PACK(union { + char name[10]; + struct { + int16_t val; + int16_t ext1; + int16_t ext2; + } composite; + }) param; + uint8_t mode:2; + uint8_t active:6; +}) CustomFnData_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 @@ -168,8 +192,8 @@ PACK(typedef struct { int16_t curves[16]; int8_t points[NUM_POINTS]; - CustomSwData customSw[NUM_CSW]; - CustomFnData funcSw[NUM_CFN]; + LogicalSwitchData_v215 customSw[NUM_CSW]; + CustomFnData_v215 funcSw[32]; SwashRingData swashR; PhaseData_v215 phaseData[MAX_PHASES]; @@ -188,11 +212,178 @@ PACK(typedef struct { }) ModelData_v215; +#if defined(PCBTARANIS) + #define NUM_POTS_215 4 +#else + #define NUM_POTS_215 3 +#endif + +PACK(typedef struct { + uint8_t version; + uint16_t variant; + int16_t calibMid[NUM_STICKS+NUM_POTS_215]; + int16_t calibSpanNeg[NUM_STICKS+NUM_POTS_215]; + int16_t calibSpanPos[NUM_STICKS+NUM_POTS_215]; + uint16_t chkSum; + int8_t currModel; + uint8_t contrast; + uint8_t vBatWarn; + int8_t vBatCalib; + int8_t backlightMode; + TrainerData trainer; + uint8_t view; // index of view in main screen + int8_t buzzerMode:2; // -2=quiet, -1=only alarms, 0=no keys, 1=all + uint8_t fai:1; + int8_t beepMode:2; // -2=quiet, -1=only alarms, 0=no keys, 1=all + uint8_t alarmsFlash:1; + uint8_t disableMemoryWarning:1; + uint8_t disableAlarmWarning:1; + uint8_t stickMode:2; + int8_t timezone:5; + uint8_t spare1:1; + uint8_t inactivityTimer; + uint8_t mavbaud:3; + SPLASH_MODE; /* 3bits */ + int8_t hapticMode:2; // -2=quiet, -1=only alarms, 0=no keys, 1=all + uint8_t blOffBright:4; + uint8_t blOnBright:4; + uint8_t lightAutoOff; + uint8_t templateSetup; // RETA order for receiver channels + int8_t PPM_Multiplier; + int8_t hapticLength; + uint8_t reNavigation; // not used on STOCK board + int8_t beepLength:3; + uint8_t hapticStrength:3; + uint8_t gpsFormat:1; + uint8_t unexpectedShutdown:1; + uint8_t speakerPitch; + int8_t speakerVolume; + int8_t vBatMin; + int8_t vBatMax; + uint8_t backlightBright; + int8_t currentCalib; + int8_t temperatureWarn; + uint8_t mAhWarn; + uint16_t mAhUsed; + uint32_t globalTimer; + int8_t temperatureCalib; + uint8_t btBaudrate; + uint8_t optrexDisplay; + uint8_t sticksGain; + uint8_t rotarySteps; + uint8_t countryCode; + uint8_t imperial; + char ttsLanguage[2]; + int8_t beepVolume; + int8_t wavVolume; + int8_t varioVolume; + int8_t backgroundVolume; +}) GeneralSettings_v215; + void ConvertGeneralSettings_215_to_216(EEGeneral &settings) { + GeneralSettings_v215 oldSettings; + memcpy(&oldSettings, &settings, sizeof(oldSettings)); + settings.version = 216; + for (int i=0, j=0; i= TELEM_RSSI_TX) + source += 1; + // RxBatt added + if (source >= TELEM_RX_VOLTAGE) + source += 1; + // A3 and A4 added + if (source >= TELEM_A3) + source += 2; + // ASpd and dTE added + 5 reserve + if (source >= TELEM_ASPD) + source += 7; + // A3 and A4 MIN added + if (source >= TELEM_MIN_A3) + source += 2; + // Cel- Cels- and Vfas- added + if (source >= TELEM_MIN_CELL) + source += 3; + // 5 reserve added + if (source >= TELEM_RESERVE6) + source += 5; + + return source; +} + +#if defined(PCBTARANIS) +int ConvertSource_215_to_216(int source, bool insertZero=false) +{ + if (insertZero) + source += 1; + // Virtual Inputs and Lua Outputs added + if (source > 0) + source += MAX_INPUTS + MAX_SCRIPTS*MAX_SCRIPT_OUTPUTS; + // S3 added + if (source > MIXSRC_POT2) + source += 1; + // PPM9-PPM16 added + if (source > MIXSRC_FIRST_PPM+7) + source += 8; + // 4 GVARS added + if (source > MIXSRC_GVAR1+4) + source += 4; + // Telemetry conversions + if (source >= MIXSRC_FIRST_TELEM) + source = MIXSRC_FIRST_TELEM + ConvertTelemetrySource_215_to_216(source-MIXSRC_FIRST_TELEM+1) - 1; + + return source; +} + +int ConvertSwitch_215_to_216(int swtch) +{ + if (swtch < 0) + return -ConvertSwitch_215_to_216(-swtch); + else if (swtch <= SWSRC_LAST_SWITCH) + return swtch; + else + return swtch + (2*4) + (3*6); // 4 trims and 2 * 6-pos added as switches +} +#else +int ConvertSource_215_to_216(int source, bool insertZero=false) +{ + if (insertZero) + source += 1; + // 4 GVARS added + if (source > MIXSRC_GVAR1+4) + source += 4; + // Telemetry conversions + if (source >= MIXSRC_FIRST_TELEM) + source = MIXSRC_FIRST_TELEM + ConvertTelemetrySource_215_to_216(source-MIXSRC_FIRST_TELEM+1) - 1; + + return source; +} + +int ConvertSwitch_215_to_216(int swtch) +{ + if (swtch <= SWSRC_LAST_SWITCH) + return swtch; + else + return swtch + (2*4) + 1; // 4 trims and REa added +} +#endif + void ConvertModel_215_to_216(ModelData &model) { // Virtual inputs added instead of Expo/DR @@ -204,8 +395,7 @@ void ConvertModel_215_to_216(ModelData &model) // Custom Switches: better precision for x when A comes from telemetry // Main View: altitude in top bar // Mixes: GVARS in weight moved from 512 to 4096 and -512 to -4096, because GVARS may be used in limits [-1250:1250] - - TRACE("Model conversion from v215 to v216"); + // Switches: two 6-pos pots added, REa added to Sky9x assert(sizeof(ModelData_v215) <= sizeof(ModelData)); @@ -213,18 +403,26 @@ void ConvertModel_215_to_216(ModelData &model) memcpy(&oldModel, &model, sizeof(oldModel)); memset(&model, 0, sizeof(ModelData)); + char name[LEN_MODEL_NAME+1]; + zchar2str(name, oldModel.header.name, LEN_MODEL_NAME); + TRACE("Model %s conversion from v215 to v216", name); + memcpy(&g_model.header, &oldModel.header, sizeof(g_model.header)); for (uint8_t i=0; i<2; i++) { - g_model.timers[i].mode = oldModel.timers[i].mode; - g_model.timers[i].start = oldModel.timers[i].start; - g_model.timers[i].minuteBeep = oldModel.timers[i].minuteBeep; - g_model.timers[i].persistent = oldModel.timers[i].persistent; - g_model.timers[i].countdownBeep = oldModel.timers[i].countdownBeep; - g_model.timers[i].value = oldModel.timers[i].value; + TimerData & timer = g_model.timers[i]; + if (oldModel.timers[i].mode >= TMRMODE_FIRST_SWITCH) + timer.mode = TMRMODE_FIRST_SWITCH + ConvertSwitch_215_to_216(oldModel.timers[i].mode - TMRMODE_FIRST_SWITCH + 1) - 1; + else + timer.mode = oldModel.timers[i].mode; + timer.start = oldModel.timers[i].start; + timer.minuteBeep = oldModel.timers[i].minuteBeep; + timer.persistent = oldModel.timers[i].persistent; + timer.countdownBeep = oldModel.timers[i].countdownBeep; + timer.value = oldModel.timers[i].value; } 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; @@ -232,43 +430,44 @@ void ConvertModel_215_to_216(ModelData &model) g_model.beepANACenter = oldModel.beepANACenter; for (uint8_t i=0; i<64; i++) { + MixData & mix = g_model.mixData[i]; #if defined(PCBTARANIS) - g_model.mixData[i].destCh = oldModel.mixData[i].destCh; - g_model.mixData[i].phases = oldModel.mixData[i].phases; - g_model.mixData[i].mltpx = oldModel.mixData[i].mltpx; - g_model.mixData[i].weight = oldModel.mixData[i].weight; - g_model.mixData[i].swtch = oldModel.mixData[i].swtch; + mix.destCh = oldModel.mixData[i].destCh; + mix.phases = oldModel.mixData[i].phases; + mix.mltpx = oldModel.mixData[i].mltpx; + mix.weight = oldModel.mixData[i].weight; + mix.swtch = ConvertSwitch_215_to_216(oldModel.mixData[i].swtch); if (oldModel.mixData[i].curveMode==0/*differential*/) { - g_model.mixData[i].curve.type = CURVE_REF_DIFF; - g_model.mixData[i].curve.value = oldModel.mixData[i].curveParam; + mix.curve.type = CURVE_REF_DIFF; + mix.curve.value = oldModel.mixData[i].curveParam; } else if (oldModel.mixData[i].curveParam <= 6) { - g_model.mixData[i].curve.type = CURVE_REF_FUNC; - g_model.mixData[i].curve.value = oldModel.mixData[i].curveParam; + mix.curve.type = CURVE_REF_FUNC; + mix.curve.value = oldModel.mixData[i].curveParam; } else { - g_model.mixData[i].curve.type = CURVE_REF_CUSTOM; - g_model.mixData[i].curve.value = oldModel.mixData[i].curveParam - 6; + mix.curve.type = CURVE_REF_CUSTOM; + mix.curve.value = oldModel.mixData[i].curveParam - 6; } - g_model.mixData[i].mixWarn = oldModel.mixData[i].mixWarn; - g_model.mixData[i].delayUp = oldModel.mixData[i].delayUp; - g_model.mixData[i].delayDown = oldModel.mixData[i].delayDown; - g_model.mixData[i].speedUp = oldModel.mixData[i].speedUp; - g_model.mixData[i].speedDown = oldModel.mixData[i].speedDown; - g_model.mixData[i].srcRaw = oldModel.mixData[i].srcRaw; - if (g_model.mixData[i].srcRaw > 4 || oldModel.mixData[i].noExpo) - g_model.mixData[i].srcRaw += MAX_INPUTS + MAX_SCRIPTS*MAX_SCRIPT_OUTPUTS; - g_model.mixData[i].offset = oldModel.mixData[i].offset; - memcpy(g_model.mixData[i].name, oldModel.mixData[i].name, LEN_EXPOMIX_NAME); + mix.mixWarn = oldModel.mixData[i].mixWarn; + mix.delayUp = oldModel.mixData[i].delayUp; + mix.delayDown = oldModel.mixData[i].delayDown; + mix.speedUp = oldModel.mixData[i].speedUp; + mix.speedDown = oldModel.mixData[i].speedDown; + mix.srcRaw = oldModel.mixData[i].srcRaw; + if (mix.srcRaw > 4 || oldModel.mixData[i].noExpo) + mix.srcRaw = ConvertSource_215_to_216(mix.srcRaw); + mix.offset = oldModel.mixData[i].offset; + memcpy(mix.name, oldModel.mixData[i].name, LEN_EXPOMIX_NAME); #else - memcpy(&g_model.mixData[i], &oldModel.mixData[i], sizeof(g_model.mixData[i])); + memcpy(&mix, &oldModel.mixData[i], sizeof(mix)); #endif - if (g_model.mixData[i].weight <= -508) - g_model.mixData[i].weight = g_model.mixData[i].weight + 512 - 4096; - else if (g_model.mixData[i].weight >= 507) - g_model.mixData[i].weight = g_model.mixData[i].weight - 512 + 4096; + if (mix.weight <= -508) + mix.weight = mix.weight + 512 - 4096; + else if (mix.weight >= 507) + mix.weight = mix.weight - 512 + 4096; else - g_model.mixData[i].offset = g_model.mixData[i].offset * g_model.mixData[i].weight / 100; + mix.offset = mix.offset * mix.weight / 100; } for (uint8_t i=0; i<32; i++) { g_model.limitData[i].min = 10 * oldModel.limitData[i].min; @@ -297,7 +496,7 @@ void ConvertModel_215_to_216(ModelData &model) } g_model.expoData[i].srcRaw = MIXSRC_Rud+chn; g_model.expoData[i].chn = chn; - g_model.expoData[i].swtch = oldModel.expoData[i].swtch; + g_model.expoData[i].swtch = ConvertSwitch_215_to_216(oldModel.expoData[i].swtch); g_model.expoData[i].phases = oldModel.expoData[i].phases; g_model.expoData[i].weight = oldModel.expoData[i].weight; memcpy(&g_model.expoData[i].name, &oldModel.expoData[i].name, LEN_EXPOMIX_NAME); @@ -358,93 +557,197 @@ void ConvertModel_215_to_216(ModelData &model) g_model.points[i] = oldModel.points[i]; } for (uint8_t i=0; i<32; i++) { - g_model.customSw[i] = oldModel.customSw[i]; + LogicalSwitchData & sw = g_model.customSw[i]; + sw.func = oldModel.customSw[i].func; + if (sw.func >= LS_FUNC_VEQUAL) sw.func += 1; + if (sw.func >= LS_FUNC_RANGE) sw.func += 1; + if (sw.func >= LS_FUNC_STAY) sw.func += 1; + sw.v1 = oldModel.customSw[i].v1; + sw.v2 = oldModel.customSw[i].v2; + sw.delay = oldModel.customSw[i].delay * 5; + sw.duration = oldModel.customSw[i].duration * 5; + sw.andsw = ConvertSwitch_215_to_216(oldModel.customSw[i].andsw); #if defined(PCBTARANIS) - CustomSwData * cs = &g_model.customSw[i]; - uint8_t cstate = cswFamily(cs->func); - if (cstate == CS_VOFS || cstate == CS_VCOMP || cstate == CS_VDIFF) { - if (cs->v1 > 0) cs->v1 += MAX_INPUTS + MAX_SCRIPTS*MAX_SCRIPT_OUTPUTS; - if (cs->v1 > MIXSRC_GVAR1+4) cs->v1 += 4; + uint8_t cstate = cswFamily(sw.func); + if (cstate == LS_FAMILY_BOOL) { + sw.v1 = ConvertSwitch_215_to_216(sw.v1); + sw.v2 = ConvertSwitch_215_to_216(sw.v2); } - if (cstate == CS_VOFS || cstate == CS_VDIFF) { - if (cs->v1 >= MIXSRC_FIRST_TELEM) { - switch (cs->v1) { - case MIXSRC_FIRST_TELEM + TELEM_TM1-1: - case MIXSRC_FIRST_TELEM + TELEM_TM2-1: - cs->v2 = (cs->v2+128) * 3; - break; - case MIXSRC_FIRST_TELEM + TELEM_ALT-1: - case MIXSRC_FIRST_TELEM + TELEM_GPSALT-1: - case MIXSRC_FIRST_TELEM + TELEM_MIN_ALT-1: - case MIXSRC_FIRST_TELEM + TELEM_MAX_ALT-1: - cs->v2 = (cs->v2+128) * 8 - 500; - break; - case MIXSRC_FIRST_TELEM + TELEM_RPM-1: - case MIXSRC_FIRST_TELEM + TELEM_MAX_RPM-1: - cs->v2 = (cs->v2+128) * 50; - break; - case MIXSRC_FIRST_TELEM + TELEM_T1-1: - case MIXSRC_FIRST_TELEM + TELEM_T2-1: - case MIXSRC_FIRST_TELEM + TELEM_MAX_T1-1: - case MIXSRC_FIRST_TELEM + TELEM_MAX_T2-1: - cs->v2 = (cs->v2+128) + 30; - break; - case MIXSRC_FIRST_TELEM + TELEM_CELL-1: - case MIXSRC_FIRST_TELEM + TELEM_HDG-1: - cs->v2 = (cs->v2+128) * 2; - break; - case MIXSRC_FIRST_TELEM + TELEM_DIST-1: - case MIXSRC_FIRST_TELEM + TELEM_MAX_DIST-1: - cs->v2 = (cs->v2+128) * 8; - break; - case MIXSRC_FIRST_TELEM + TELEM_CURRENT-1: - case MIXSRC_FIRST_TELEM + TELEM_POWER-1: - cs->v2 = (cs->v2+128) * 5; - break; - case MIXSRC_FIRST_TELEM + TELEM_CONSUMPTION-1: - cs->v2 = (cs->v2+128) * 20; - break; - default: - cs->v2 += 128; - break; + else if (cstate == LS_FAMILY_OFS || cstate == LS_FAMILY_COMP || cstate == LS_FAMILY_DIFF) { + sw.v1 = ConvertSource_215_to_216(sw.v1); + if (cstate == LS_FAMILY_OFS || cstate == LS_FAMILY_DIFF) { + if ((uint8_t)sw.v1 >= MIXSRC_FIRST_TELEM) { + switch ((uint8_t)sw.v1) { + case MIXSRC_FIRST_TELEM + TELEM_TM1-1: + case MIXSRC_FIRST_TELEM + TELEM_TM2-1: + sw.v2 = (sw.v2+128) * 3; + break; + case MIXSRC_FIRST_TELEM + TELEM_ALT-1: + case MIXSRC_FIRST_TELEM + TELEM_GPSALT-1: + case MIXSRC_FIRST_TELEM + TELEM_MIN_ALT-1: + case MIXSRC_FIRST_TELEM + TELEM_MAX_ALT-1: + sw.v2 = (sw.v2+128) * 8 - 500; + break; + case MIXSRC_FIRST_TELEM + TELEM_RPM-1: + case MIXSRC_FIRST_TELEM + TELEM_MAX_RPM-1: + sw.v2 = (sw.v2+128) * 50; + break; + case MIXSRC_FIRST_TELEM + TELEM_T1-1: + case MIXSRC_FIRST_TELEM + TELEM_T2-1: + case MIXSRC_FIRST_TELEM + TELEM_MAX_T1-1: + case MIXSRC_FIRST_TELEM + TELEM_MAX_T2-1: + sw.v2 = (sw.v2+128) + 30; + break; + case MIXSRC_FIRST_TELEM + TELEM_CELL-1: + case MIXSRC_FIRST_TELEM + TELEM_HDG-1: + sw.v2 = (sw.v2+128) * 2; + break; + case MIXSRC_FIRST_TELEM + TELEM_DIST-1: + case MIXSRC_FIRST_TELEM + TELEM_MAX_DIST-1: + sw.v2 = (sw.v2+128) * 8; + break; + case MIXSRC_FIRST_TELEM + TELEM_CURRENT-1: + case MIXSRC_FIRST_TELEM + TELEM_POWER-1: + sw.v2 = (sw.v2+128) * 5; + break; + case MIXSRC_FIRST_TELEM + TELEM_CONSUMPTION-1: + sw.v2 = (sw.v2+128) * 20; + break; + default: + sw.v2 += 128; + break; + } } } - } - if (cstate == CS_VCOMP) { - if (cs->v2 > 0) cs->v2 += MAX_INPUTS + MAX_SCRIPTS*MAX_SCRIPT_OUTPUTS; - if (cs->v2 > MIXSRC_GVAR1+4) cs->v2 += 4; + else if (cstate == LS_FAMILY_COMP) { + sw.v2 = ConvertSource_215_to_216(sw.v2); + } } #endif } for (uint8_t i=0; i<32; i++) { - g_model.funcSw[i] = oldModel.funcSw[i]; - CustomFnData *sd = &g_model.funcSw[i]; - if (CFN_FUNC(sd) == FUNC_PLAY_VALUE || CFN_FUNC(sd) == FUNC_VOLUME || (IS_ADJUST_GV_FUNCTION(sd) && CFN_GVAR_MODE(sd) == FUNC_ADJUST_GVAR_SOURCE)) { + CustomFnData & fn = g_model.funcSw[i]; + fn.swtch = ConvertSwitch_215_to_216(oldModel.funcSw[i].swtch); + fn.func = oldModel.funcSw[i].func; + if (fn.func <= 15) { + fn.all.param = fn.func; + fn.func = FUNC_SAFETY_CHANNEL; + } + else if (fn.func <= 20) { + fn.all.param = fn.func - 16; + fn.func = FUNC_TRAINER; + } + else if (fn.func == 21) { + fn.func = FUNC_INSTANT_TRIM; + } + else if (fn.func == 22) { + fn.func = FUNC_PLAY_SOUND; + } +#if defined(PCBSKY9X) + else if (fn.func == 23) { + fn.func = FUNC_HAPTIC; + } +#endif + else if (fn.func == 23+IS_PCBSKY9X) { + fn.func = FUNC_RESET; + } + else if (fn.func == 24+IS_PCBSKY9X) { + fn.func = FUNC_VARIO; + } + else if (fn.func == 25+IS_PCBSKY9X) { + fn.func = FUNC_PLAY_TRACK; + } + else if (fn.func == 26+IS_PCBSKY9X) { + fn.func = FUNC_PLAY_VALUE; + } + else if (fn.func == 27+IS_PCBSKY9X) { + fn.func = FUNC_LOGS; + } + else if (fn.func == 28+IS_PCBSKY9X) { + fn.func = FUNC_VOLUME; + } + else if (fn.func == 29+IS_PCBSKY9X) { + fn.func = FUNC_BACKLIGHT; + } + else if (fn.func == 30+IS_PCBSKY9X) { + fn.func = FUNC_BACKGND_MUSIC; + } + else if (fn.func == 31+IS_PCBSKY9X) { + fn.func = FUNC_BACKGND_MUSIC_PAUSE; + } + else { + fn.all.param = fn.func - 32 - IS_PCBSKY9X; + fn.all.mode = oldModel.funcSw[i].mode; + fn.func = FUNC_ADJUST_GVAR; + } + + fn.active = oldModel.funcSw[i].active; + if (HAS_REPEAT_PARAM(fn.func)) { + fn.active *= 5; + } + + if (fn.func == FUNC_PLAY_TRACK || fn.func == FUNC_BACKGND_MUSIC) { + memcpy(fn.play.name, oldModel.funcSw[i].param.name, 8); + } + else { + fn.all.val = oldModel.funcSw[i].param.composite.val; + } + if (fn.func == FUNC_PLAY_VALUE || fn.func == FUNC_VOLUME || (IS_ADJUST_GV_FUNC(fn.func) && fn.all.mode == FUNC_ADJUST_GVAR_SOURCE)) { #if defined(PCBTARANIS) - CFN_PARAM(sd) += 1 + MAX_INPUTS + MAX_SCRIPTS*MAX_SCRIPT_OUTPUTS; + fn.all.val = ConvertSource_215_to_216(fn.all.val, true); #endif - if (CFN_PARAM(sd) > MIXSRC_GVAR1+4) CFN_PARAM(sd) += 4; } - if (HAS_REPEAT_PARAM(sd)) - CFN_PLAY_REPEAT(sd) *= 5; } g_model.swashR = oldModel.swashR; -#if defined(PCBTARANIS) - if (g_model.swashR.collectiveSource > 0) g_model.swashR.collectiveSource += MAX_INPUTS + MAX_SCRIPTS*MAX_SCRIPT_OUTPUTS; - if (g_model.swashR.collectiveSource > MIXSRC_GVAR1+4) g_model.swashR.collectiveSource += 4; -#endif + g_model.swashR.collectiveSource = ConvertSource_215_to_216(g_model.swashR.collectiveSource); for (uint8_t i=0; i<9; i++) { memcpy(&g_model.phaseData[i], &oldModel.phaseData[i], sizeof(oldModel.phaseData[i])); // the last 4 gvars will remain blank + g_model.phaseData[i].swtch = ConvertSwitch_215_to_216(oldModel.phaseData[i].swtch); +#if defined(PCBTARANIS) + for (uint8_t t=0; t<4; t++) { + int trim = oldModel.phaseData[i].trim[t]; + if (trim > 500) { + trim -= 501; + if (trim >= i) + trim += 1; + g_model.phaseData[i].trim[t].mode = 2*trim; + g_model.phaseData[i].trim[t].value = 0; + } + else { + g_model.phaseData[i].trim[t].mode = 2*i; + g_model.phaseData[i].trim[t].value = trim; + } + } +#endif } g_model.thrTraceSrc = oldModel.thrTraceSrc; - g_model.switchWarningStates = oldModel.switchWarningStates; + g_model.switchWarningStates = oldModel.switchWarningStates >> 1; + g_model.nSwToWarn = (oldModel.switchWarningStates & 0x01) ? 0xFF : 0; for (uint8_t i=0; i<5; i++) { memcpy(g_model.gvars[i].name, oldModel.gvar_names[i], LEN_GVAR_NAME); } memcpy(&g_model.frsky, &oldModel.frsky, sizeof(oldModel.frsky)); + for (int i=0; i<3; i++) { + if (g_model.frsky.screensType & (1<> 16 ; - *(p+2) = eeAddress >> 8 ; - *(p+3) = eeAddress ; // 3 bytes address - spi_PDC_action( p, 0, 0, 4, 0 ) ; - Eeprom32_process_state = E32_ERASESENDING ; - Eeprom32_state_after_erase = E32_WRITESTART ; + eeAddress = Eeprom32_address ; + eeprom_write_enable() ; + p = Spi_tx_buf ; + *p = 0x20 ; // Block Erase command + *(p+1) = eeAddress >> 16 ; + *(p+2) = eeAddress >> 8 ; + *(p+3) = eeAddress ; // 3 bytes address + spi_PDC_action( p, 0, 0, 4, 0 ) ; + Eeprom32_process_state = E32_ERASESENDING ; + Eeprom32_state_after_erase = E32_WRITESTART ; #endif - // } - // } } - if ( Eeprom32_process_state == E32_WRITESTART ) - { + if (Eeprom32_process_state == E32_WRITESTART) { uint32_t total_size ; p = Eeprom32_source_address; q = (uint8_t *) &Eeprom_buffer.data; diff --git a/radio/src/eeprom_rlc.cpp b/radio/src/eeprom_rlc.cpp index a56834186..5dc845404 100644 --- a/radio/src/eeprom_rlc.cpp +++ b/radio/src/eeprom_rlc.cpp @@ -746,8 +746,7 @@ void RlcFile::nextRlcWriteStep() if (m_rlc_len==0) goto close; - for (i=1; 1; i++) // !! laeuft ein byte zu weit !! - { + for (i=1; 1; i++) { // !! laeuft ein byte zu weit !! bool cur0 = m_rlc_buf[i] == 0; if (cur0 != run0 || cnt==0x3f || (cnt0 && cnt==0x0f) || i==m_rlc_len) { if (run0) { @@ -782,59 +781,57 @@ void RlcFile::nextRlcWriteStep() close: - switch(m_write_step) { - case WRITE_START_STEP: - { - blkid_t fri=0; + switch(m_write_step) { + case WRITE_START_STEP: { + blkid_t fri = 0; - if (m_currBlk && (fri=EeFsGetLink(m_currBlk))) { - // TODO reuse EeFsFree!!! - blkid_t prev_freeList = eeFs.freeList; - eeFs.freeList = fri; + if (m_currBlk && (fri = EeFsGetLink(m_currBlk))) { + // TODO reuse EeFsFree!!! + blkid_t prev_freeList = eeFs.freeList; + eeFs.freeList = fri; #if defined(PCBTARANIS) - freeBlocks++; + freeBlocks++; #endif - while( EeFsGetLink(fri)) { - fri = EeFsGetLink(fri); + while (EeFsGetLink(fri)) { + fri = EeFsGetLink(fri); #if defined(PCBTARANIS) - freeBlocks++; + freeBlocks++; #endif - } - m_write_step = WRITE_FREE_UNUSED_BLOCKS_STEP1; - EeFsSetLink(fri, prev_freeList); - return; - } - } + } + m_write_step = WRITE_FREE_UNUSED_BLOCKS_STEP1; + EeFsSetLink(fri, prev_freeList); + return; + } + } - case WRITE_FINAL_DIRENT_STEP: - { - m_currBlk = eeFs.files[FILE_TMP].startBlk; - DirEnt & f = eeFs.files[m_fileId]; - eeFs.files[FILE_TMP].startBlk = f.startBlk; - eeFs.files[FILE_TMP].size = f.size; - f.startBlk = m_currBlk; - f.size = m_pos; - f.typ = eeFs.files[FILE_TMP].typ; - m_write_step = WRITE_TMP_DIRENT_STEP; - EeFsFlushDirEnt(m_fileId); - return; - } + case WRITE_FINAL_DIRENT_STEP: { + m_currBlk = eeFs.files[FILE_TMP].startBlk; + DirEnt & f = eeFs.files[m_fileId]; + eeFs.files[FILE_TMP].startBlk = f.startBlk; + eeFs.files[FILE_TMP].size = f.size; + f.startBlk = m_currBlk; + f.size = m_pos; + f.typ = eeFs.files[FILE_TMP].typ; + m_write_step = WRITE_TMP_DIRENT_STEP; + EeFsFlushDirEnt(m_fileId); + return; + } - case WRITE_TMP_DIRENT_STEP: - m_write_step = 0; - EeFsFlushDirEnt(FILE_TMP); - return; + case WRITE_TMP_DIRENT_STEP: + m_write_step = 0; + EeFsFlushDirEnt(FILE_TMP); + return; - case WRITE_FREE_UNUSED_BLOCKS_STEP1: - m_write_step = WRITE_FREE_UNUSED_BLOCKS_STEP2; - EeFsSetLink(m_currBlk, 0); - return; + case WRITE_FREE_UNUSED_BLOCKS_STEP1: + m_write_step = WRITE_FREE_UNUSED_BLOCKS_STEP2; + EeFsSetLink(m_currBlk, 0); + return; - case WRITE_FREE_UNUSED_BLOCKS_STEP2: - m_write_step = WRITE_FINAL_DIRENT_STEP; - EeFsFlushFreelist(); - return; - } + case WRITE_FREE_UNUSED_BLOCKS_STEP2: + m_write_step = WRITE_FINAL_DIRENT_STEP; + EeFsFlushFreelist(); + return; + } } void RlcFile::flush() @@ -948,7 +945,6 @@ void eeLoadModel(uint8_t id) resumePulses(); } - activeSwitches = 0; activeFnSwitches = 0; activeFunctions = 0; memclear(lastFunctionTime, sizeof(lastFunctionTime)); @@ -979,7 +975,7 @@ void eeLoadModel(uint8_t id) #endif #if defined(CPUARM) && defined(SDCARD) - refreshModelAudioFiles(); + referenceModelAudioFiles(); #endif LOAD_MODEL_BITMAP(); diff --git a/radio/src/eeprom_rlc.h b/radio/src/eeprom_rlc.h index bec337033..db285a6fe 100644 --- a/radio/src/eeprom_rlc.h +++ b/radio/src/eeprom_rlc.h @@ -161,10 +161,10 @@ inline uint8_t write_errno() { return s_write_err; } class RlcFile: public EFile { - uint8_t m_bRlc; // control byte for run length decoder - uint8_t m_zeroes; + uint8_t m_bRlc; // control byte for run length decoder + uint8_t m_zeroes; - uint8_t m_flags; + uint8_t m_flags; #define WRITE_FIRST_LINK 0x01 #define WRITE_NEXT_LINK_1 0x02 #define WRITE_NEXT_LINK_2 0x03 @@ -173,41 +173,41 @@ class RlcFile: public EFile #define WRITE_FREE_UNUSED_BLOCKS_STEP2 0x30 #define WRITE_FINAL_DIRENT_STEP 0x40 #define WRITE_TMP_DIRENT_STEP 0x50 - uint8_t m_write_step; - uint16_t m_rlc_len; - uint8_t * m_rlc_buf; - uint8_t m_cur_rlc_len; - uint8_t m_write1_byte; - uint8_t m_write_len; - uint8_t * m_write_buf; + uint8_t m_write_step; + uint16_t m_rlc_len; + uint8_t * m_rlc_buf; + uint8_t m_cur_rlc_len; + uint8_t m_write1_byte; + uint8_t m_write_len; + uint8_t * m_write_buf; #if defined (EEPROM_PROGRESS_BAR) - uint8_t m_ratio; + uint8_t m_ratio; #endif -public: + public: - void openRlc(uint8_t i_fileId); + void openRlc(uint8_t i_fileId); - void create(uint8_t i_fileId, uint8_t typ, uint8_t sync_write); + void create(uint8_t i_fileId, uint8_t typ, uint8_t sync_write); - /// copy contents of i_fileSrc to i_fileDst - bool copy(uint8_t i_fileDst, uint8_t i_fileSrc); + /// copy contents of i_fileSrc to i_fileDst + bool copy(uint8_t i_fileDst, uint8_t i_fileSrc); - inline bool isWriting() { return m_write_step != 0; } - void write(uint8_t *buf, uint8_t i_len); - void write1(uint8_t b); - void nextWriteStep(); - void nextRlcWriteStep(); - void writeRlc(uint8_t i_fileId, uint8_t typ, uint8_t *buf, uint16_t i_len, uint8_t sync_write); + inline bool isWriting() { return m_write_step != 0; } + void write(uint8_t *buf, uint8_t i_len); + void write1(uint8_t b); + void nextWriteStep(); + void nextRlcWriteStep(); + void writeRlc(uint8_t i_fileId, uint8_t typ, uint8_t *buf, uint16_t i_len, uint8_t sync_write); - // flush the current write operation if any - void flush(); + // flush the current write operation if any + void flush(); - // read from opened file and decode rlc-coded data - uint16_t readRlc(uint8_t *buf, uint16_t i_len); + // read from opened file and decode rlc-coded data + uint16_t readRlc(uint8_t *buf, uint16_t i_len); #if defined (EEPROM_PROGRESS_BAR) - void DisplayProgressBar(uint8_t x); + void DisplayProgressBar(uint8_t x); #endif }; 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..64c8545ec Binary files /dev/null and b/radio/src/fonts/sqt5/font_05x07_B_compressed.png differ diff --git a/radio/src/fonts/sqt5/font_05x07_avr.png b/radio/src/fonts/sqt5/font_05x07_avr.png new file mode 100644 index 000000000..4843d8f6c Binary files /dev/null and b/radio/src/fonts/sqt5/font_05x07_avr.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_fi_04x06.png b/radio/src/fonts/sqt5/font_fi_04x06.png new file mode 100644 index 000000000..39346ec75 Binary files /dev/null and b/radio/src/fonts/sqt5/font_fi_04x06.png differ diff --git a/radio/src/fonts/sqt5/font_fi_05x07.png b/radio/src/fonts/sqt5/font_fi_05x07.png new file mode 100644 index 000000000..59311bd3c Binary files /dev/null and b/radio/src/fonts/sqt5/font_fi_05x07.png differ diff --git a/radio/src/fonts/sqt5/font_fi_08x10.png b/radio/src/fonts/sqt5/font_fi_08x10.png new file mode 100644 index 000000000..3602d7811 Binary files /dev/null and b/radio/src/fonts/sqt5/font_fi_08x10.png differ diff --git a/radio/src/fonts/sqt5/font_fi_10x14.png b/radio/src/fonts/sqt5/font_fi_10x14.png new file mode 100644 index 000000000..dbd4d48d4 Binary files /dev/null and b/radio/src/fonts/sqt5/font_fi_10x14.png differ 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..d2e197228 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_avr.png b/radio/src/fonts/std/font_05x07_avr.png new file mode 100644 index 000000000..c95126af5 Binary files /dev/null and b/radio/src/fonts/std/font_05x07_avr.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_05x07_extra.png b/radio/src/fonts/std/font_05x07_extra.png index 4d939852c..79d190243 100644 Binary files a/radio/src/fonts/std/font_05x07_extra.png and b/radio/src/fonts/std/font_05x07_extra.png differ 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_fi_04x06.png b/radio/src/fonts/std/font_fi_04x06.png new file mode 100644 index 000000000..83a45306a Binary files /dev/null and b/radio/src/fonts/std/font_fi_04x06.png differ diff --git a/radio/src/fonts/std/font_fi_05x07.png b/radio/src/fonts/std/font_fi_05x07.png new file mode 100644 index 000000000..8456af741 Binary files /dev/null and b/radio/src/fonts/std/font_fi_05x07.png differ diff --git a/radio/src/fonts/std/font_fi_08x10.png b/radio/src/fonts/std/font_fi_08x10.png new file mode 100644 index 000000000..70fbdbcfd Binary files /dev/null and b/radio/src/fonts/std/font_fi_08x10.png differ diff --git a/radio/src/fonts/std/font_fi_10x14.png b/radio/src/fonts/std/font_fi_10x14.png new file mode 100644 index 000000000..4ac08c4d5 Binary files /dev/null and b/radio/src/fonts/std/font_fi_10x14.png differ 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/gtests.cpp b/radio/src/gtests.cpp index 2b8d8f2e8..dbb8df463 100644 --- a/radio/src/gtests.cpp +++ b/radio/src/gtests.cpp @@ -91,8 +91,6 @@ TEST(Trims, infiniteChainedTrims) TEST(outdezNAtt, test_unsigned) { - uint16_t altitude = 65530; - uint8_t refBuf[sizeof(displayBuf)]; memset(displayBuf, 0, sizeof(displayBuf)); lcd_putc(0*FWNUM, 0, '6'); @@ -103,12 +101,12 @@ TEST(outdezNAtt, test_unsigned) memcpy(refBuf, displayBuf, sizeof(displayBuf)); memset(displayBuf, 0, sizeof(displayBuf)); - lcd_outdezNAtt(1, 0, altitude, LEFT|UNSIGN); + lcd_outdezNAtt(0, 0, 65530, LEFT|UNSIGN); EXPECT_EQ(memcmp(refBuf, displayBuf, sizeof(displayBuf)), 0) << "Unsigned numbers will be bad displayed"; } -TEST(EEPROM, 1000_random_writes) +TEST(EEPROM, 100_random_writes) { eepromFile = NULL; // in memory RlcFile f; @@ -117,7 +115,7 @@ TEST(EEPROM, 1000_random_writes) EeFsFormat(); - for(int i=0; i<1000; i++) { + for(int i=0; i<100; i++) { int size = rand()%800; for(int j=0; j(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 +1140,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); } @@ -1127,7 +1154,7 @@ void menuGeneralDiagAna(uint8_t event) #if defined(PCBTARANIS) lcd_putsLeft(6*FH+1, STR_BATT_CALIB); static int32_t adcBatt; - adcBatt = ((adcBatt * 7) + anaIn(8)) / 8; + adcBatt = ((adcBatt * 7) + anaIn(TX_VOLTAGE)) / 8; uint32_t batCalV = (adcBatt + (adcBatt*g_eeGeneral.vBatCalib)/128) * BATT_SCALE; batCalV >>= 11; batCalV += 2; // because of the diode @@ -1135,7 +1162,7 @@ void menuGeneralDiagAna(uint8_t event) #elif defined(PCBSKY9X) lcd_putsLeft(5*FH+1, STR_BATT_CALIB); static int32_t adcBatt; - adcBatt = ((adcBatt * 7) + anaIn(7)) / 8; + adcBatt = ((adcBatt * 7) + anaIn(TX_VOLTAGE)) / 8; uint32_t batCalV = (adcBatt + adcBatt*(g_eeGeneral.vBatCalib)/128) * 4191; batCalV /= 55296; putsVolts(LEN_CALIB_FIELDS*FW+4*FW, 5*FH+1, batCalV, (m_posVert==1 ? INVERS : 0)); @@ -1143,7 +1170,7 @@ void menuGeneralDiagAna(uint8_t event) lcd_putsLeft(6*FH-2, STR_BATT_CALIB); // Gruvin wants 2 decimal places and instant update of volts calib field when button pressed static uint16_t adcBatt; - adcBatt = ((adcBatt * 7) + anaIn(7)) / 8; // running average, sourced directly (to avoid unending debate :P) + adcBatt = ((adcBatt * 7) + anaIn(TX_VOLTAGE)) / 8; // running average, sourced directly (to avoid unending debate :P) uint32_t batCalV = ((uint32_t)adcBatt*1390 + (10*(int32_t)adcBatt*g_eeGeneral.vBatCalib)/8) / BandGap; lcd_outdezNAtt(LEN_CALIB_FIELDS*FW+4*FW, 6*FH-2, batCalV, PREC2|(m_posVert==1 ? INVERS : 0)); #else @@ -1160,12 +1187,63 @@ void menuGeneralDiagAna(uint8_t event) #if defined(PCBSKY9X) lcd_putsLeft(7*FH+1, STR_TEMP_CALIB); - putsTelemetryValue(LEN_CALIB_FIELDS*FW+4*FW, 7*FH+1, getTemperature(), UNIT_DEGREES, (m_posVert==3 ? INVERS : 0)) ; + putsTelemetryValue(LEN_CALIB_FIELDS*FW+4*FW, 7*FH+1, getTemperature(), UNIT_TEMPERATURE, (m_posVert==3 ? INVERS : 0)) ; if (m_posVert==3) CHECK_INCDEC_GENVAR(event, g_eeGeneral.temperatureCalib, -100, 100); #endif } -#if defined(PCBSKY9X) +#if defined(PCBTARANIS) +enum menuGeneralHwItems { + ITEM_SETUP_HW_POT1, + ITEM_SETUP_HW_POT2, + ITEM_SETUP_HW_POT3, + 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_POT1: + case ITEM_SETUP_HW_POT2: + case ITEM_SETUP_HW_POT3: + { + int idx = i - ITEM_SETUP_HW_POT1; + uint8_t shift = (2*idx); + uint8_t mask = (0x03 << shift); + putsMixerSource(sizeof(TR_TYPE)*FW, y, MIXSRC_FIRST_POT+idx); + uint8_t potType = (g_eeGeneral.potsType & mask) >> shift; + if (potType == POT_TYPE_NONE && i < 2) + potType = 1; + potType = selectMenuItem(HW_SETTINGS_COLUMN, y, STR_TYPE, STR_POTTYPES, potType, 0, POT_TYPE_MAX, attr, event); + if (potType == POT_TYPE_POT && i < 2) + potType = 0; + g_eeGeneral.potsType &= ~mask; + g_eeGeneral.potsType |= (potType << shift); + break; + } + + case ITEM_SETUP_HW_UART3_MODE: + g_eeGeneral.uart3Mode = selectMenuItem(HW_SETTINGS_COLUMN, y, STR_UART3MODE, STR_UART3MODES, g_eeGeneral.uart3Mode, 0, UART_MODE_MAX, attr, event); + if (checkIncDec_Ret) { + uart3Init(g_eeGeneral.uart3Mode); + } + break; + + } + } +} + +#elif defined(PCBSKY9X) enum menuGeneralHwItems { ITEM_SETUP_HW_OPTREX_DISPLAY, ITEM_SETUP_HW_STICKS_GAINS_LABELS, @@ -1238,19 +1316,45 @@ void menuGeneralHardware(uint8_t event) } #endif +#define XPOT_DELTA 5 void menuCommonCalib(uint8_t event) { - for (uint8_t i=0; i= NUM_STICKS && i < NUM_STICKS+NUM_POTS-2) { -#else - if (i >= NUM_STICKS) { -#endif + if (i >= POT1 && i <= POT_LAST) { reusableBuffer.calib.midVals[i] = (reusableBuffer.calib.hiVals[i] + reusableBuffer.calib.loVals[i]) / 2; +#if defined(PCBTARANIS) + uint8_t idx = i - POT1; + int count = reusableBuffer.calib.xpotsCalib[idx].stepsCount; + if (IS_POT_MULTIPOS(i) && count <= XPOTS_MULTIPOS_COUNT) { + if (reusableBuffer.calib.xpotsCalib[idx].lastCount == 0 || vt < reusableBuffer.calib.xpotsCalib[idx].lastPosition - XPOT_DELTA || vt > reusableBuffer.calib.xpotsCalib[idx].lastPosition + XPOT_DELTA) { + reusableBuffer.calib.xpotsCalib[idx].lastPosition = vt; + reusableBuffer.calib.xpotsCalib[idx].lastCount = 1; + } + else { + if (reusableBuffer.calib.xpotsCalib[idx].lastCount < 255) reusableBuffer.calib.xpotsCalib[idx].lastCount++; + } + if (reusableBuffer.calib.xpotsCalib[idx].lastCount == 10/*100ms*/) { + int16_t position = reusableBuffer.calib.xpotsCalib[idx].lastPosition; + bool found = false; + for (int j=0; j= reusableBuffer.calib.xpotsCalib[idx].steps[j]-XPOT_DELTA && position <= reusableBuffer.calib.xpotsCalib[idx].steps[j]+XPOT_DELTA) { + found = true; + break; + } + } + if (!found) { + if (count < XPOTS_MULTIPOS_COUNT) { + reusableBuffer.calib.xpotsCalib[idx].steps[count] = position; + } + reusableBuffer.calib.xpotsCalib[idx].stepsCount += 1; + } + } + } +#endif } } @@ -1284,6 +1388,12 @@ void menuCommonCalib(uint8_t event) reusableBuffer.calib.loVals[i] = 15000; reusableBuffer.calib.hiVals[i] = -15000; reusableBuffer.calib.midVals[i] = anaIn(i); +#if defined(PCBTARANIS) + if (i50) { - g_eeGeneral.calibMid[i] = reusableBuffer.calib.midVals[i]; + if (abs(reusableBuffer.calib.loVals[i]-reusableBuffer.calib.hiVals[i]) > 50) { + g_eeGeneral.calib[i].mid = reusableBuffer.calib.midVals[i]; int16_t v = reusableBuffer.calib.midVals[i] - reusableBuffer.calib.loVals[i]; - g_eeGeneral.calibSpanNeg[i] = v - v/STICK_TOLERANCE; + g_eeGeneral.calib[i].spanNeg = v - v/STICK_TOLERANCE; v = reusableBuffer.calib.hiVals[i] - reusableBuffer.calib.midVals[i]; - g_eeGeneral.calibSpanPos[i] = v - v/STICK_TOLERANCE; + g_eeGeneral.calib[i].spanPos = v - v/STICK_TOLERANCE; } } break; case 3: +#if defined(PCBTARANIS) + for (uint8_t i=POT1; i<=POT_LAST; i++) { + int idx = i - POT1; + int count = reusableBuffer.calib.xpotsCalib[idx].stepsCount; + if (IS_POT_MULTIPOS(i) && count > 1 && count <= XPOTS_MULTIPOS_COUNT) { + for (int j=0; jcount = count - 1; + for (int j=0; jcount; j++) { + calib->steps[j] = (reusableBuffer.calib.xpotsCalib[idx].steps[j+1] + reusableBuffer.calib.xpotsCalib[idx].steps[j]) >> 5; + } + } + else { + g_eeGeneral.potsType &= ~(1<count + 1; + } + if (steps > 0 && steps <= XPOTS_MULTIPOS_COUNT) { + lcd_outdezAtt(LCD_W/2-2+(i-POT1)*5, LCD_H-6, steps, TINSIZE); + } + } #endif } diff --git a/radio/src/gui/menu_model.cpp b/radio/src/gui/menu_model.cpp index d1f9889fb..bea52b0ce 100644 --- a/radio/src/gui/menu_model.cpp +++ b/radio/src/gui/menu_model.cpp @@ -55,7 +55,7 @@ enum EnumTabModel { #if LCD_W >= 212 IF_GVARS(e_GVars) #endif - e_CustomSwitches, + e_LogicalSwitches, e_CustomFunctions, #if defined(LUA_MODEL_SCRIPTS) e_CustomScripts, @@ -74,7 +74,7 @@ void menuModelMixAll(uint8_t event); void menuModelLimits(uint8_t event); void menuModelCurvesAll(uint8_t event); void menuModelGVars(uint8_t event); -void menuModelCustomSwitches(uint8_t event); +void menuModelLogicalSwitches(uint8_t event); void menuModelCustomFunctions(uint8_t event); void menuModelCustomScripts(uint8_t event); void menuModelTelemetry(uint8_t event); @@ -93,7 +93,7 @@ const MenuFuncP_PROGMEM menuTabModel[] PROGMEM = { #if LCD_W >= 212 && defined(GVARS) && defined(FLIGHT_MODES) IF_GVARS(menuModelGVars) #endif - menuModelCustomSwitches, + menuModelLogicalSwitches, menuModelCustomFunctions, #if defined(LUA_MODEL_SCRIPTS) menuModelCustomScripts, @@ -669,7 +669,8 @@ void menuModelFailsafe(uint8_t event) bool newLongNames = false; uint8_t ch; - if (event == EVT_KEY_BREAK(KEY_ENTER) && s_editMode) { + if (event == EVT_KEY_LONG(KEY_ENTER) && s_editMode) { + s_noHi = NO_HI_LEN; g_model.moduleData[g_moduleIdx].failsafeChannels[m_posVert] = channelOutputs[m_posVert]; eeDirty(EE_MODEL); AUDIO_WARNING1(); @@ -721,7 +722,7 @@ void menuModelFailsafe(uint8_t event) // Value LcdFlags flags = TINSIZE; - if (m_posVert == ch) { + if (m_posVert == ch && !s_noHi) { flags |= INVERS; if (s_editMode) flags |= BLINK; @@ -768,7 +769,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 +837,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; @@ -868,7 +874,11 @@ enum menuModelSetupItems { ITEM_MODEL_THROTTLE_TRACE, ITEM_MODEL_THROTTLE_TRIM, ITEM_MODEL_THROTTLE_WARNING, +#if defined(PCBTARANIS) + ITEM_MODEL_CHECKLIST_DISPLAY, +#endif ITEM_MODEL_SWITCHES_WARNING, + CASE_PCBTARANIS(ITEM_MODEL_POT_WARNING) ITEM_MODEL_BEEP_CENTER, #if defined(PCBTARANIS) ITEM_MODEL_INTERNAL_MODULE_LABEL, @@ -951,21 +961,22 @@ void menuModelSetup(uint8_t event) #define PORT_CHANNELS_ROWS(x) (x==0 ? PORT1_CHANNELS_ROWS() : (x==1 ? PORT2_CHANNELS_ROWS() : TRAINER_CHANNELS_ROWS())) #define FAILSAFE_ROWS(x) ((g_model.moduleData[x].rfProtocol==RF_PROTO_X16 || g_model.moduleData[x].rfProtocol==RF_PROTO_LR12) ? (g_model.moduleData[x].failsafeMode==FAILSAFE_CUSTOM ? (uint8_t)1 : (uint8_t)0) : HIDDEN_ROW) #define MODEL_SETUP_MAX_LINES (1+ITEM_MODEL_SETUP_MAX) + #define POT_WARN_ITEMS() ((g_model.nPotsToWarn >> 6) ? (uint8_t)NUM_POTS : (uint8_t)0) bool CURSOR_ON_CELL = (m_posHorz >= 0); - MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, NAVIGATION_LINE_BY_LINE|(NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1), LABEL(InternalModule), 0, IF_PORT1_ON(1), IF_PORT1_ON(IS_D8_RX(0) ? (uint8_t)1 : (uint8_t)2), IF_PORT1_ON(FAILSAFE_ROWS(0)), LABEL(ExternalModule), (g_model.externalModule==MODULE_TYPE_XJT || IS_MODULE_DSM2(EXTERNAL_MODULE)) ? (uint8_t)1 : (uint8_t)0, PORT2_CHANNELS_ROWS(), (IS_MODULE_XJT(1) && IS_D8_RX(1)) ? (uint8_t)1 : (IS_MODULE_PPM(1) || IS_MODULE_XJT(1) || IS_MODULE_DSM2(1)) ? (uint8_t)2 : HIDDEN_ROW, IF_PORT2_XJT(FAILSAFE_ROWS(1)), LABEL(Trainer), 0, TRAINER_CHANNELS_ROWS(), IF_TRAINER_ON(2)}); + MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 1, 0, 0, 0, 0, 0, CASE_PCBTARANIS(0) 7, POT_WARN_ITEMS(), NAVIGATION_LINE_BY_LINE|(NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1), LABEL(InternalModule), 0, IF_PORT1_ON(1), IF_PORT1_ON(IS_D8_RX(0) ? (uint8_t)1 : (uint8_t)2), IF_PORT1_ON(FAILSAFE_ROWS(0)), LABEL(ExternalModule), (g_model.externalModule==MODULE_TYPE_XJT || IS_MODULE_DSM2(EXTERNAL_MODULE)) ? (uint8_t)1 : (uint8_t)0, PORT2_CHANNELS_ROWS(), (IS_MODULE_XJT(1) && IS_D8_RX(1)) ? (uint8_t)1 : (IS_MODULE_PPM(1) || IS_MODULE_XJT(1) || IS_MODULE_DSM2(1)) ? (uint8_t)2 : HIDDEN_ROW, IF_PORT2_XJT(FAILSAFE_ROWS(1)), LABEL(Trainer), 0, TRAINER_CHANNELS_ROWS(), IF_TRAINER_ON(2)}); #elif defined(CPUM64) #define CURSOR_ON_CELL (true) #define MODEL_SETUP_MAX_LINES ((IS_PPM_PROTOCOL(protocol)||IS_DSM2_PROTOCOL(protocol)||IS_PXX_PROTOCOL(protocol)) ? 1+ITEM_MODEL_SETUP_MAX : ITEM_MODEL_SETUP_MAX) uint8_t protocol = g_model.protocol; - MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1, FIELD_PROTOCOL_MAX, 2 }); + MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1, FIELD_PROTOCOL_MAX, 2 }); #else #define CURSOR_ON_CELL (true) #define MODEL_SETUP_MAX_LINES ((IS_PPM_PROTOCOL(protocol)||IS_DSM2_PROTOCOL(protocol)||IS_PXX_PROTOCOL(protocol)) ? 1+ITEM_MODEL_SETUP_MAX : ITEM_MODEL_SETUP_MAX) uint8_t protocol = g_model.protocol; - MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1, FIELD_PROTOCOL_MAX, 2, IF_PCBSKY9X(1) IF_PCBSKY9X(2) }); + MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 1, 0, 0, 0, 0, 0, 6, NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1, FIELD_PROTOCOL_MAX, 2, CASE_PCBSKY9X(1) CASE_PCBSKY9X(2) }); #endif if (!MENU_CHECK(menuTabModel, e_ModelSetup, MODEL_SETUP_MAX_LINES)) { @@ -1046,7 +1057,7 @@ void menuModelSetup(uint8_t event) } else { putsStrIdx(0*FW, y, STR_TIMER, k>=ITEM_MODEL_TIMER2 ? 2 : 1); - putsTmrMode(MODEL_SETUP_2ND_COLUMN, y, timer->mode, m_posHorz==0 ? attr : 0); + putsTimerMode(MODEL_SETUP_2ND_COLUMN, y, timer->mode, m_posHorz==0 ? attr : 0); putsTime(MODEL_SETUP_2ND_COLUMN+5*FW-2+5*FWNUM+1, y, timer->start, m_posHorz==1 ? attr : 0, m_posHorz==2 ? attr : 0); #if defined(PCBTARANIS) if (attr && m_posHorz < 0) lcd_filled_rect(MODEL_SETUP_2ND_COLUMN, y, LCD_W-MODEL_SETUP_2ND_COLUMN-MENUS_SCROLLBAR_WIDTH, 8); @@ -1055,7 +1066,7 @@ void menuModelSetup(uint8_t event) div_t qr = div(timer->start, 60); switch (m_posHorz) { case 0: - CHECK_INCDEC_MODELVAR(event, timer->mode, -2*(MAX_PSWITCH+NUM_CSW), TMR_VAROFS-1+2*(MAX_PSWITCH+NUM_CSW)); + CHECK_INCDEC_MODELVAR(event, timer->mode, SWSRC_FIRST, TMR_VAROFS+SWSRC_LAST-1/*--- which is OFF*/); break; case 1: CHECK_INCDEC_MODELVAR_ZERO(event, qr.quot, 59); @@ -1091,10 +1102,11 @@ void menuModelSetup(uint8_t event) g_model.extendedTrims = onoffMenuItem(g_model.extendedTrims, MODEL_SETUP_2ND_COLUMN, y, STR_ETRIMS, attr, event); #else g_model.extendedTrims = onoffMenuItem(g_model.extendedTrims, MODEL_SETUP_2ND_COLUMN, y, STR_ETRIMS, m_posHorz<=0 ? attr : 0, event==EVT_KEY_BREAK(KEY_ENTER) ? event : 0); - lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+3*FW, y, STR_RESET_BTN, m_posHorz>0 ? attr : 0); + lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+3*FW, y, STR_RESET_BTN, m_posHorz>0 && !s_noHi ? attr : 0); if (attr && m_posHorz>0) { s_editMode = 0; if (event==EVT_KEY_LONG(KEY_ENTER)) { + s_noHi = NO_HI_LEN; for (uint8_t i=0; i>= 1; - for (uint8_t i=1; i>= 2; + c = "\300-\301"[states & 0x03]; + lcd_putcAtt(MODEL_SETUP_2ND_COLUMN+i*(2*FW), y, 'A'+i, line && (m_posHorz == i) ? INVERS : 0); + if (swactive) lcd_putc(MODEL_SETUP_2ND_COLUMN+i*(2*FW)+FWNUM, y, c); + lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+((NUM_SWITCHES-1)*2*FW+2), y, PSTR("<]"), (m_posHorz == NUM_SWITCHES-1 && !s_noHi) ? line : 0); + states >>= 2; #else - attr = 0; - if (IS_3POS(i-1)) { - c = '0'+(states & 0x03); - states >>= 2; - } - else { - if (states & 0x01) - attr = INVERS; - c = pgm_read_byte(STR_VSWITCHES - 2 + 6 + (3*i)); - states >>= 1; - } - lcd_putcAtt(MODEL_SETUP_2ND_COLUMN+2*FW+i*FW, y, c, attr); -#endif + attr = 0; + + if (IS_3POS(i)) { + c = '0'+(states & 0x03); + states >>= 2; } + else { + if ((states & 0x01) && swactive) + attr = INVERS; + c = pgm_read_byte(STR_VSWITCHES - 2 + 9 + (3*i)); + states >>= 1; + } + if (line && (m_posHorz == i)) { + attr = BLINK; + if (swactive) + attr |= INVERS; + } + lcd_putcAtt(MODEL_SETUP_2ND_COLUMN+i*FW, y, (swactive || (attr & BLINK)) ? c : '-', attr); +#if !defined(CPUM64) + lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+(NUM_SWITCHES*FW), y, PSTR("<]"), (m_posHorz == NUM_SWITCHES-1 && !s_noHi) ? line : 0); +#endif +#endif } break; } +#if defined(PCBTARANIS) + case ITEM_MODEL_POT_WARNING: + { + lcd_putsLeft(y, STR_POTWARNING); + uint8_t potMode = g_model.nPotsToWarn >> 6; + if(attr) { + if (m_posHorz) s_editMode = 0; + if (!READ_ONLY() && m_posHorz) { + switch(event) { + case EVT_KEY_LONG(KEY_ENTER): + killEvents(event); + if(potMode == 1) { + g_model.potPosition[m_posHorz-1] = getValue(MIXSRC_FIRST_POT+m_posHorz-1) >> 3; + AUDIO_WARNING1(); + eeDirty(EE_MODEL); + } + break; + case EVT_KEY_BREAK(KEY_ENTER): + g_model.nPotsToWarn ^= (1 << (m_posHorz-1)); + eeDirty(EE_MODEL); + break; + } + } + } + + lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN, y, PSTR("\004""Off\0""Man\0""Auto"), potMode, attr & ((m_posHorz == 0) ? attr : !INVERS)); + if (potMode) + for (uint8_t i=0; i= 212 +#if defined(PCBTARANIS) enum FlightModesItems { ITEM_PHASES_NAME, ITEM_PHASES_SWITCH, - ITEM_PHASES_TRIMS, + ITEM_PHASES_TRIM_RUD, + ITEM_PHASES_TRIM_ELE, + ITEM_PHASES_TRIM_THR, + ITEM_PHASES_TRIM_AIL, ITEM_PHASES_FADE_IN, ITEM_PHASES_FADE_OUT, ITEM_PHASES_COUNT, ITEM_PHASES_LAST = ITEM_PHASES_COUNT-1 }; -void editPhaseTrims(uint8_t x, uint8_t y, uint8_t phase, uint8_t event, uint8_t active) +bool isTrimModeAvailable(int mode) { - static uint8_t cursorPos = 0; - - for (uint8_t t=0; t 0) { - if (p1valdiff || IS_ROTARY_RIGHT(event) || IS_ROTARY_LEFT(event) || event==EVT_KEY_FIRST(KEY_DOWN) || event==EVT_KEY_FIRST(KEY_UP) - || event==EVT_KEY_REPT(KEY_DOWN) || event==EVT_KEY_REPT(KEY_UP)) { - int16_t v = getRawTrimValue(phase, cur); - if (v < TRIM_EXTENDED_MAX) v = TRIM_EXTENDED_MAX; - v = checkIncDec(event, v, TRIM_EXTENDED_MAX, TRIM_EXTENDED_MAX+MAX_PHASES-1, EE_MODEL); - if (checkIncDec_Ret) { - if (v == TRIM_EXTENDED_MAX) v = 0; - setTrimValue(phase, cur, v); - } - } - - switch (event) { -#if defined(ROTARY_ENCODER_NAVIGATION) || defined(PCBTARANIS) - case EVT_ROTARY_BREAK: - if (s_editMode == EDIT_MODIFY_FIELD) { - s_editMode = EDIT_MODIFY_STRING; - cur = 0; - } - else if (cur0) cur--; - break; - case EVT_KEY_BREAK(KEY_RIGHT): - if (cur 0) { posHorz += 2; } + if (sub==0 && posHorz > 0) { posHorz += 5; } if (sub=0) { displayColumnHeader(STR_PHASES_HEADERS, posHorz); @@ -1823,35 +1854,41 @@ void menuModelFlightModesAll(uint8_t event) for (uint8_t j=0; j0) ? BLINK|INVERS : INVERS) : 0); uint8_t active = (attr && (s_editMode>0 || p1valdiff)) ; - switch(j) - { + switch (j) { case ITEM_PHASES_NAME: - editName(4*FW, y, p->name, sizeof(p->name), event, attr); + editName(4*FW-1, y, p->name, sizeof(p->name), event, attr); break; case ITEM_PHASES_SWITCH: if (k == 0) { - lcd_puts((5+LEN_FP_NAME)*FW+FW/2, y, STR_DEFAULT); + lcd_puts((5+LEN_FP_NAME)*FW, y, STR_DEFAULT); } else { putsSwitches((5+LEN_FP_NAME)*FW+FW/2, y, p->swtch, attr); - if (active) CHECK_INCDEC_MODELSWITCH(event, p->swtch, -MAX_SWITCH, MAX_SWITCH); + if (active) CHECK_INCDEC_MODELSWITCH(event, p->swtch, SWSRC_FIRST, SWSRC_LAST); } break; - case ITEM_PHASES_TRIMS: + case ITEM_PHASES_TRIM_RUD: + case ITEM_PHASES_TRIM_ELE: + case ITEM_PHASES_TRIM_THR: + case ITEM_PHASES_TRIM_AIL: if (k != 0) { - editPhaseTrims((10+LEN_FP_NAME)*FW+FW/2, y, k, event, attr); + uint8_t t = j-ITEM_PHASES_TRIM_RUD; + putsTrimMode((4+LEN_FP_NAME)*FW+j*(5*FW/2), y, k, t, attr); + if (active) { + trim_t & v = p->trim[t]; + v.mode = checkIncDec(event, v.mode==TRIM_MODE_NONE ? -1 : v.mode, -1, 2*MAX_PHASES-1, EE_MODEL, isTrimModeAvailable); + } } break; - case ITEM_PHASES_FADE_IN: - lcd_outdezAtt(29*FW, y, (10/DELAY_STEP)*p->fadeIn, attr|PREC1); + lcd_outdezAtt(32*FW-2, y, (10/DELAY_STEP)*p->fadeIn, attr|PREC1); if (active) p->fadeIn = checkIncDec(event, p->fadeIn, 0, DELAY_MAX, EE_MODEL|NO_INCDEC_MARKS); break; case ITEM_PHASES_FADE_OUT: - lcd_outdezAtt(34*FW, y, (10/DELAY_STEP)*p->fadeOut, attr|PREC1); + lcd_outdezAtt(35*FW, y, (10/DELAY_STEP)*p->fadeOut, attr|PREC1); if (active) p->fadeOut = checkIncDec(event, p->fadeOut, 0, DELAY_MAX, EE_MODEL|NO_INCDEC_MARKS); break; @@ -1860,7 +1897,7 @@ void menuModelFlightModesAll(uint8_t event) } } -#else // LCD_W >= 212 +#else // PCBTARANIS enum menuModelPhaseItems { ITEM_MODEL_PHASE_NAME, @@ -2149,7 +2186,7 @@ void menuModelHeli(uint8_t event) uint8_t attr = (sub == i ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0); switch(i) { case ITEM_HELI_SWASHTYPE: - g_model.swashR.type = selectMenuItem(HELI_PARAM_OFS, y, STR_SWASHTYPE, STR_VSWASHTYPE, g_model.swashR.type, 0, SWASH_TYPE_NUM, attr, event); + g_model.swashR.type = selectMenuItem(HELI_PARAM_OFS, y, STR_SWASHTYPE, STR_VSWASHTYPE, g_model.swashR.type, 0, SWASH_TYPE_MAX, attr, event); break; case ITEM_HELI_COLLECTIVE: @@ -2266,7 +2303,8 @@ void DrawCurve(uint8_t offset=0) uint8_t i = 0; do { - point_t point = getPoint(i++); + point_t point = getPoint(i); + i++; if (point.x == 0) break; lcd_filled_rect(point.x-offset, point.y-1, 3, 3, SOLID, FORCE); // do markup square } while(1); @@ -2883,7 +2921,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 @@ -2903,7 +2941,7 @@ void menuModelExpoOne(uint8_t event) case EXPO_FIELD_SCALE: lcd_putsLeft(y, STR_SCALE); putsTelemetryChannel(EXPO_ONE_2ND_COLUMN, y, ed->srcRaw - MIXSRC_FIRST_TELEM, convertTelemValue(ed->srcRaw - MIXSRC_FIRST_TELEM + 1, ed->scale), LEFT|attr); - if (attr) ed->scale = checkIncDec(event, ed->scale, 0, maxTelemValue(ed->srcRaw - MIXSRC_FIRST_TELEM + 1), EE_MODEL, NULL); + if (attr) ed->scale = checkIncDec(event, ed->scale, 0, maxTelemValue(ed->srcRaw - MIXSRC_FIRST_TELEM + 1), EE_MODEL); break; #endif @@ -3039,7 +3077,7 @@ void gvarWeightItem(xcoord_t x, uint8_t y, MixData *md, uint8_t attr, uint8_t ev { u_int8int16_t weight; MD_WEIGHT_TO_UNION(md, weight); - weight.word = GVAR_MENU_ITEM(x, y, weight.word, -500, 500, attr, 0, event); + weight.word = GVAR_MENU_ITEM(x, y, weight.word, GV_RANGELARGE_WEIGHT_NEG, GV_RANGELARGE_WEIGHT, attr, 0, event); MD_UNION_TO_WEIGHT(weight, md); } @@ -3117,7 +3155,7 @@ void menuModelMixOne(uint8_t event) lcd_putsColumnLeft(COLUMN_X, y, NO_INDENT(STR_OFFSET)); u_int8int16_t offset; MD_OFFSET_TO_UNION(md2, offset); - offset.word = GVAR_MENU_ITEM(COLUMN_X+MIXES_2ND_COLUMN, y, offset.word, GV_RANGELARGE_NEG, GV_RANGELARGE, attr|LEFT, 0, event); + offset.word = GVAR_MENU_ITEM(COLUMN_X+MIXES_2ND_COLUMN, y, offset.word, GV_RANGELARGE_OFFSET_NEG, GV_RANGELARGE_OFFSET, attr|LEFT, 0, event); MD_UNION_TO_OFFSET(offset, md2); break; } @@ -3234,7 +3272,7 @@ static uint8_t s_copySrcCh; #define MIX_LINE_SRC_POS 4*FW-1 #if LCD_W >= 212 - #define EXPO_LINE_WEIGHT_POS 8*FW+1 + #define EXPO_LINE_WEIGHT_POS 8*FW+3 #define EXPO_LINE_SRC_POS 9*FW-2 #define EXPO_LINE_CURVE_POS 12*FW+4 #define EXPO_LINE_SWITCH_POS 17*FW-1 @@ -3246,7 +3284,7 @@ static uint8_t s_copySrcCh; #define MIX_LINE_SWITCH_POS 16*FW+1 #define MIX_LINE_DELAY_POS 19*FW+2 #elif defined(CPUARM) - #define EXPO_LINE_WEIGHT_POS 7*FW-1 + #define EXPO_LINE_WEIGHT_POS 7*FW+1 #define EXPO_LINE_EXPO_POS 10*FW+5 #define EXPO_LINE_SWITCH_POS 11*FW+2 #define EXPO_LINE_SIDE_POS 14*FW+2 @@ -3258,7 +3296,7 @@ static uint8_t s_copySrcCh; #define MIX_LINE_SWITCH_POS 16*FW #define MIX_LINE_DELAY_POS 19*FW+7 #else - #define EXPO_LINE_WEIGHT_POS 7*FW-1 + #define EXPO_LINE_WEIGHT_POS 7*FW+1 #define EXPO_LINE_EXPO_POS 11*FW #define EXPO_LINE_SWITCH_POS 11*FW+4 #if MAX_PHASES == 6 @@ -3309,8 +3347,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 +3590,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 +3783,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) @@ -4045,9 +4085,25 @@ void onGVARSMenu(const char *result) } } +#define GVARS_FM_COLUMN(p) (12*FW + FWNUM + (p)*(2+3*FWNUM) - 3) + void menuModelGVars(uint8_t event) { - MENU(STR_MENUGLOBALVARS, menuTabModel, e_GVars, 1+MAX_GVARS, {0, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES}); + tmr10ms_t tmr10ms = get_tmr10ms(); + const char * menuTitle; + bool first2seconds = (tmr10ms - menuEntryTime > 200); /*2 seconds*/ + + if (first2seconds) { + menuTitle = STR_GLOBAL_V; + for (int i=0; i0) ? BLINK|INVERS : INVERS) : 0); - xcoord_t x = 12*FW + FWNUM + (j-1)*(2+3*FWNUM) - 3; + xcoord_t x = GVARS_FM_COLUMN(j-1); #if MAX_GVARS == 6 if (i==0 && j!=9) putsStrIdx(x+2, FH+1, STR_FP, j, SMLSIZE); @@ -4162,25 +4218,28 @@ void menuModelGVars(uint8_t event) #define CHECK_INCDEC_PARAM(event, var, min, max) checkIncDec(event, var, min, max, incdecFlag) #endif -enum CustomSwitchFields { - CSW_FIELD_FUNCTION, - CSW_FIELD_V1, - CSW_FIELD_V2, - CSW_FIELD_ANDSW, -#if defined(CPUARM) - CSW_FIELD_DURATION, - CSW_FIELD_DELAY, +enum LogicalSwitchFields { + LS_FIELD_FUNCTION, + LS_FIELD_V1, + LS_FIELD_V2, +#if defined(PCBTARANIS) + LS_FIELD_V3, #endif - CSW_FIELD_COUNT, - CSW_FIELD_LAST = CSW_FIELD_COUNT-1 + LS_FIELD_ANDSW, +#if defined(CPUARM) + LS_FIELD_DURATION, + LS_FIELD_DELAY, +#endif + LS_FIELD_COUNT, + LS_FIELD_LAST = LS_FIELD_COUNT-1 }; #if LCD_W >= 212 #define CSW_1ST_COLUMN (4*FW-3) - #define CSW_2ND_COLUMN (8*FW+1) - #define CSW_3RD_COLUMN (14*FW) - #define CSW_4TH_COLUMN (21*FW+1) - #define CSW_5TH_COLUMN (26*FW+1) + #define CSW_2ND_COLUMN (8*FW+2+FW/2) + #define CSW_3RD_COLUMN (14*FW+1+FW/2) + #define CSW_4TH_COLUMN (22*FW) + #define CSW_5TH_COLUMN (26*FW+3) #define CSW_6TH_COLUMN (31*FW+1) #else #define CSW_1ST_COLUMN (4*FW-3) @@ -4193,14 +4252,15 @@ enum CustomSwitchFields { #define CSWONE_2ND_COLUMN (11*FW) -void menuModelCustomSwitchOne(uint8_t event) +void menuModelLogicalSwitchOne(uint8_t event) { - TITLE(STR_MENUCUSTOMSWITCH); + TITLE(STR_MENULOGICALSWITCH); - CustomSwData * cs = cswAddress(s_currIdx); + LogicalSwitchData * cs = cswAddress(s_currIdx); uint8_t sw = SWSRC_SW1+s_currIdx; putsSwitches(14*FW, 0, sw, (getSwitch(sw) ? BOLD : 0)); - SIMPLE_SUBMENU_NOTITLE(CSW_FIELD_COUNT); + + SUBMENU_NOTITLE(LS_FIELD_COUNT, {0, 0, 1, 0 /*, 0...*/}); int8_t sub = m_posVert; @@ -4210,26 +4270,34 @@ void menuModelCustomSwitchOne(uint8_t event) uint8_t attr = (sub==i ? (s_editMode>0 ? BLINK|INVERS : INVERS) : 0); uint8_t cstate = cswFamily(cs->func); switch(i) { - case CSW_FIELD_FUNCTION: + case LS_FIELD_FUNCTION: lcd_putsLeft(y, STR_FUNC); lcd_putsiAtt(CSWONE_2ND_COLUMN, y, STR_VCSWFUNC, cs->func, attr); if (attr) { - CHECK_INCDEC_MODELVAR_ZERO(event, cs->func, CS_MAXF); - if (cstate != cswFamily(cs->func)) { - cs->v1 = 0; - cs->v2 = 0; + cs->func = checkIncDec(event, cs->func, 0, LS_FUNC_MAX, EE_MODEL, isLogicalSwitchFunctionAvailable); + uint8_t new_cstate = cswFamily(cs->func); + if (cstate != new_cstate) { + if (new_cstate == LS_FAMILY_TIMER) { + cs->v1 = cs->v2 = -119; + } + else if (new_cstate == LS_FAMILY_STAY) { + cs->v1 = 0; cs->v2 = -129; cs->v3 = 0; + } + else { + cs->v1 = cs->v2 = 0; + } } } break; - case CSW_FIELD_V1: + case LS_FIELD_V1: { lcd_putsLeft(y, STR_V1); int8_t v1_min=0, v1_max=MIXSRC_LAST_TELEM; - if (cstate == CS_VBOOL) { + if (cstate == LS_FAMILY_BOOL || cstate == LS_FAMILY_STICKY || cstate == LS_FAMILY_STAY) { putsSwitches(CSWONE_2ND_COLUMN, y, cs->v1, attr); v1_min = SWSRC_OFF+1; v1_max = SWSRC_ON-1; } - else if (cstate == CS_VTIMER) { + else if (cstate == LS_FAMILY_TIMER) { lcd_outdezAtt(CSWONE_2ND_COLUMN, y, cs->v1+1, LEFT|attr); v1_max = 99; } @@ -4241,19 +4309,35 @@ void menuModelCustomSwitchOne(uint8_t event) } break; } - case CSW_FIELD_V2: + case LS_FIELD_V2: { lcd_putsLeft(y, STR_V2); - int8_t v2_min=0, v2_max=MIXSRC_LAST_TELEM; - if (cstate == CS_VBOOL) { + int16_t v2_min=0, v2_max=MIXSRC_LAST_TELEM; + if (cstate == LS_FAMILY_BOOL || cstate == LS_FAMILY_STICKY) { putsSwitches(CSWONE_2ND_COLUMN, y, cs->v2, attr); v2_min = SWSRC_OFF+1; v2_max = SWSRC_ON-1; } - else if (cstate == CS_VTIMER) { + else if (cstate == LS_FAMILY_TIMER) { lcd_outdezAtt(CSWONE_2ND_COLUMN, y, cs->v2+1, LEFT|attr); v2_max = 99; } - else if (cstate == CS_VCOMP) { + else if (cstate == LS_FAMILY_STAY) { + lcd_putc(CSWONE_2ND_COLUMN-4, y, '['); + lcd_outdezAtt(CSWONE_2ND_COLUMN, y, cswTimerValue(cs->v2), LEFT|PREC1|(m_posHorz==0 ? attr : 0)); + lcd_putc(lcdLastPos, y, ':'); + if (cs->v3 == 0) + lcd_putsAtt(lcdLastPos+3, y, "--", (m_posHorz==1 ? attr : 0)); + else + lcd_outdezAtt(lcdLastPos+3, y, cswTimerValue(cs->v2+cs->v3), LEFT|PREC1|(m_posHorz==1 ? attr : 0)); + lcd_putc(lcdLastPos, y, ']'); + if (s_editMode <= 0) continue; + if (attr && m_posHorz==1) { + CHECK_INCDEC_MODELVAR(event, cs->v3, 0, 222 - cs->v2); + break; + } + v2_min=-129; v2_max = 122; + } + else if (cstate == LS_FAMILY_COMP) { putsMixerSource(CSWONE_2ND_COLUMN, y, cs->v2, attr); } else { @@ -4261,7 +4345,7 @@ void menuModelCustomSwitchOne(uint8_t event) if (cs->v1 >= MIXSRC_FIRST_TELEM) { putsTelemetryChannel(CSWONE_2ND_COLUMN, y, cs->v1 - MIXSRC_FIRST_TELEM, convertCswTelemValue(cs), attr|LEFT); v2_max = maxTelemValue(cs->v1 - MIXSRC_FIRST_TELEM + 1); - if (cstate == CS_VOFS) { + if (cstate == LS_FAMILY_OFS) { v2_min = -128; v2_max -= 128; } @@ -4287,34 +4371,34 @@ void menuModelCustomSwitchOne(uint8_t event) } break; } - case CSW_FIELD_ANDSW: + case LS_FIELD_ANDSW: lcd_putsLeft(y, STR_AND_SWITCH); putsSwitches(CSWONE_2ND_COLUMN, y, cs->andsw, attr); - if (attr) CHECK_INCDEC_MODELVAR(event, cs->andsw, -MAX_SWITCH, MAX_SWITCH); + if (attr) CHECK_INCDEC_MODELVAR(event, cs->andsw, -MAX_LS_ANDSW, MAX_LS_ANDSW); break; - case CSW_FIELD_DURATION: + case LS_FIELD_DURATION: lcd_putsLeft(y, STR_DURATION); if (cs->duration > 0) - lcd_outdezAtt(CSWONE_2ND_COLUMN, y, 5*cs->duration, attr|PREC1|LEFT); + lcd_outdezAtt(CSWONE_2ND_COLUMN, y, cs->duration, attr|PREC1|LEFT); else lcd_putsiAtt(CSWONE_2ND_COLUMN, y, STR_MMMINV, 0, attr); - if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, cs->duration, MAX_CSW_DURATION); + if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, cs->duration, MAX_LS_DURATION); break; - case CSW_FIELD_DELAY: + case LS_FIELD_DELAY: lcd_putsLeft(y, STR_DELAY); if (cs->delay > 0) - lcd_outdezAtt(CSWONE_2ND_COLUMN, y, 5*cs->delay, attr|PREC1|LEFT); + lcd_outdezAtt(CSWONE_2ND_COLUMN, y, cs->delay, attr|PREC1|LEFT); else lcd_putsiAtt(CSWONE_2ND_COLUMN, y, STR_MMMINV, 0, attr); - if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, cs->delay, MAX_CSW_DELAY); + if (attr) CHECK_INCDEC_MODELVAR_ZERO(event, cs->delay, MAX_LS_DELAY); break; } } } -void menuModelCustomSwitches(uint8_t event) +void menuModelLogicalSwitches(uint8_t event) { - SIMPLE_MENU(STR_MENUCUSTOMSWITCHES, menuTabModel, e_CustomSwitches, NUM_CSW+1); + SIMPLE_MENU(STR_MENULOGICALSWITCHES, menuTabModel, e_LogicalSwitches, NUM_CSW+1); uint8_t y = 0; uint8_t k = 0; @@ -4328,7 +4412,7 @@ void menuModelCustomSwitches(uint8_t event) case EVT_KEY_FIRST(KEY_ENTER): if (sub >= 0) { s_currIdx = sub; - pushMenu(menuModelCustomSwitchOne); + pushMenu(menuModelLogicalSwitchOne); } break; } @@ -4336,7 +4420,7 @@ void menuModelCustomSwitches(uint8_t event) for (uint8_t i=0; ifunc); - if (cstate == CS_VBOOL) { + if (cstate == LS_FAMILY_BOOL || cstate == LS_FAMILY_STICKY) { putsSwitches(CSW_2ND_COLUMN, y, cs->v1, 0); putsSwitches(CSW_3RD_COLUMN, y, cs->v2, 0); } - else if (cstate == CS_VCOMP) { + else if (cstate == LS_FAMILY_COMP) { putsMixerSource(CSW_2ND_COLUMN, y, cs->v1, 0); putsMixerSource(CSW_3RD_COLUMN, y, cs->v2, 0); } - else if (cstate == CS_VTIMER) { + else if (cstate == LS_FAMILY_STAY) { + putsSwitches(CSW_2ND_COLUMN, y, cs->v1, 0); + lcd_putc(CSW_3RD_COLUMN-4, y, '['); + lcd_outdezAtt(CSW_3RD_COLUMN, y, cswTimerValue(cs->v2), LEFT|PREC1); + lcd_putc(lcdLastPos, y, ':'); + if (cs->v3 == 0) + lcd_puts(lcdLastPos+3, y, "--"); + else + lcd_outdezAtt(lcdLastPos+3, y, cswTimerValue(cs->v2+cs->v3), LEFT|PREC1); + lcd_putc(lcdLastPos-1, y, ']'); + } + else if (cstate == LS_FAMILY_TIMER) { lcd_outdezAtt(CSW_2ND_COLUMN, y, cs->v1+1, LEFT); lcd_outdezAtt(CSW_3RD_COLUMN, y, cs->v2+1, LEFT); } @@ -4390,17 +4485,17 @@ enum ClipboardType { struct Clipboard { ClipboardType type; union { - CustomSwData csw; + LogicalSwitchData csw; CustomFnData cfn; } data; }; Clipboard clipboard; -void onCustomSwitchesMenu(const char *result) +void onLogicalSwitchesMenu(const char *result) { int8_t sub = m_posVert-1; - CustomSwData * cs = cswAddress(sub); + LogicalSwitchData * cs = cswAddress(sub); if (result == STR_COPY) { clipboard.type = CLIPBOARD_TYPE_CUSTOM_SWITCH; @@ -4411,17 +4506,17 @@ void onCustomSwitchesMenu(const char *result) eeDirty(EE_MODEL); } else if (result == STR_DELETE) { - memset(cs, 0, sizeof(CustomSwData)); + memset(cs, 0, sizeof(LogicalSwitchData)); eeDirty(EE_MODEL); } } #endif -void menuModelCustomSwitches(uint8_t event) +void menuModelLogicalSwitches(uint8_t event) { INCDEC_DECLARE_VARS(); - MENU(STR_MENUCUSTOMSWITCHES, menuTabModel, e_CustomSwitches, NUM_CSW+1, {0, NAVIGATION_LINE_BY_LINE|CSW_FIELD_LAST/*repeated...*/}); + MENU(STR_MENULOGICALSWITCHES, menuTabModel, e_LogicalSwitches, NUM_CSW+1, {0, NAVIGATION_LINE_BY_LINE|LS_FIELD_LAST/*repeated...*/}); uint8_t y = 0; uint8_t k = 0; @@ -4435,15 +4530,15 @@ void menuModelCustomSwitches(uint8_t event) #endif #if defined(PCBTARANIS) - if (sub>=0 && horz<0 && event==EVT_KEY_LONG(KEY_ENTER) && !READ_ONLY()) { - killEvents(event); - CustomSwData * cs = cswAddress(sub); - if (cs->func) MENU_ADD_ITEM(STR_COPY); - if (clipboard.type == CLIPBOARD_TYPE_CUSTOM_SWITCH) - MENU_ADD_ITEM(STR_PASTE); - if (cs->func || cs->v1 || cs->v2 || cs->delay || cs->duration || cs->andsw) MENU_ADD_ITEM(STR_DELETE); - menuHandler = onCustomSwitchesMenu; - } + if (sub>=0 && horz<0 && event==EVT_KEY_LONG(KEY_ENTER) && !READ_ONLY()) { + killEvents(event); + LogicalSwitchData * cs = cswAddress(sub); + if (cs->func) MENU_ADD_ITEM(STR_COPY); + if (clipboard.type == CLIPBOARD_TYPE_CUSTOM_SWITCH) + MENU_ADD_ITEM(STR_PASTE); + if (cs->func || cs->v1 || cs->v2 || cs->delay || cs->duration || cs->andsw) MENU_ADD_ITEM(STR_DELETE); + menuHandler = onLogicalSwitchesMenu; + } #endif for (uint8_t i=0; i0) ? BLINK|INVERS : INVERS) : 0); uint8_t attr1 = (horz==1 ? attr : 0); uint8_t attr2 = (horz==2 ? attr : 0); - CustomSwData * cs = cswAddress(k); + LogicalSwitchData * cs = cswAddress(k); // CSW name uint8_t sw = SWSRC_SW1+k; @@ -4464,26 +4559,52 @@ void menuModelCustomSwitches(uint8_t event) // CSW params uint8_t cstate = cswFamily(cs->func); #if defined(CPUARM) - int16_t v1_min=0, v1_max=MIXSRC_LAST_TELEM, v2_min=0, v2_max=MIXSRC_LAST_TELEM; + int16_t v1_val=cs->v1, v1_min=0, v1_max=MIXSRC_LAST_TELEM, v2_min=0, v2_max=MIXSRC_LAST_TELEM; + int16_t v3_min=0, v3_max=100; #else int8_t v1_min=0, v1_max=MIXSRC_LAST_TELEM, v2_min=0, v2_max=MIXSRC_LAST_TELEM; + #define v1_val cs->v1 #endif - if (cstate == CS_VBOOL) { + if (cstate == LS_FAMILY_BOOL || cstate == LS_FAMILY_STICKY) { putsSwitches(CSW_2ND_COLUMN, y, cs->v1, attr1); putsSwitches(CSW_3RD_COLUMN, y, cs->v2, attr2); v1_min = SWSRC_OFF+1; v1_max = SWSRC_ON-1; v2_min = SWSRC_OFF+1; v2_max = SWSRC_ON-1; INCDEC_SET_FLAG(INCDEC_SWITCH); - INCDEC_ENABLE_CHECK(NULL); + INCDEC_ENABLE_CHECK(isSwitchAvailableInLogicalSwitches); } - else if (cstate == CS_VCOMP) { - putsMixerSource(CSW_2ND_COLUMN, y, cs->v1, attr1); +#if defined(CPUARM) + else if (cstate == LS_FAMILY_STAY) { + putsSwitches(CSW_2ND_COLUMN, y, cs->v1, attr1); + lcd_putc(CSW_3RD_COLUMN-4, y, '['); + lcd_outdezAtt(CSW_3RD_COLUMN, y, cswTimerValue(cs->v2), LEFT|PREC1|attr2); + lcd_putc(lcdLastPos, y, ':'); + if (cs->v3 == 0) + lcd_putsAtt(lcdLastPos+3, y, "--", (horz==LS_FIELD_V3 ? attr : 0)); + else + lcd_outdezAtt(lcdLastPos+3, y, cswTimerValue(cs->v2+cs->v3), LEFT|PREC1|(horz==LS_FIELD_V3 ? attr : 0)); + lcd_putc(lcdLastPos, y, ']'); + v1_min = SWSRC_OFF+1; v1_max = SWSRC_ON-1; + v2_min=-129; v2_max = 122; + v3_max = 222 - cs->v2; + if (horz == 1) { + INCDEC_SET_FLAG(INCDEC_SWITCH); + INCDEC_ENABLE_CHECK(isSwitchAvailable); + } + else { + INCDEC_SET_FLAG(0); + INCDEC_ENABLE_CHECK(NULL); + } + } +#endif + else if (cstate == LS_FAMILY_COMP) { + putsMixerSource(CSW_2ND_COLUMN, y, v1_val, attr1); putsMixerSource(CSW_3RD_COLUMN, y, cs->v2, attr2); INCDEC_SET_FLAG(INCDEC_SOURCE); INCDEC_ENABLE_CHECK(isSourceAvailable); } - else if (cstate == CS_VTIMER) { + else if (cstate == LS_FAMILY_TIMER) { lcd_outdezAtt(CSW_2ND_COLUMN, y, cswTimerValue(cs->v1), LEFT|PREC1|attr1); lcd_outdezAtt(CSW_3RD_COLUMN, y, cswTimerValue(cs->v2), LEFT|PREC1|attr2); v1_min = v2_min = -128; @@ -4492,7 +4613,10 @@ void menuModelCustomSwitches(uint8_t event) INCDEC_ENABLE_CHECK(NULL); } else { - putsMixerSource(CSW_2ND_COLUMN, y, cs->v1, attr1); +#if defined(CPUARM) + v1_val = (uint8_t)cs->v1; +#endif + putsMixerSource(CSW_2ND_COLUMN, y, v1_val, attr1); if (horz == 1) { INCDEC_SET_FLAG(INCDEC_SOURCE); INCDEC_ENABLE_CHECK(isSourceAvailable); @@ -4502,17 +4626,17 @@ void menuModelCustomSwitches(uint8_t event) INCDEC_ENABLE_CHECK(NULL); } #if defined(FRSKY) - if (cs->v1 >= MIXSRC_FIRST_TELEM) { - putsTelemetryChannel(CSW_3RD_COLUMN, y, cs->v1 - MIXSRC_FIRST_TELEM, convertCswTelemValue(cs), LEFT|attr2); - v2_max = maxTelemValue(cs->v1 - MIXSRC_FIRST_TELEM + 1); + if (v1_val >= MIXSRC_FIRST_TELEM) { + putsTelemetryChannel(CSW_3RD_COLUMN, y, v1_val - MIXSRC_FIRST_TELEM, convertCswTelemValue(cs), LEFT|attr2); + v2_max = maxTelemValue(v1_val - MIXSRC_FIRST_TELEM + 1); #if defined(CPUARM) - v2_min = minTelemValue(cs->v1 - MIXSRC_FIRST_TELEM + 1); + v2_min = minTelemValue(v1_val - MIXSRC_FIRST_TELEM + 1); if (cs->v2 < v2_min || cs->v2 > v2_max) { cs->v2 = 0; eeDirty(EE_MODEL); } #else - if (cstate == CS_VOFS) { + if (cstate == LS_FAMILY_OFS) { v2_min = -128; v2_max -= 128; } @@ -4531,8 +4655,8 @@ void menuModelCustomSwitches(uint8_t event) v2_min = -125; v2_max = 125; } #else - if (cs->v1 >= MIXSRC_FIRST_TELEM) { - putsTelemetryChannel(CSW_3RD_COLUMN, y, cs->v1 - MIXSRC_FIRST_TELEM, convertCswTelemValue(cs), LEFT|attr2); + if (v1_val >= MIXSRC_FIRST_TELEM) { + putsTelemetryChannel(CSW_3RD_COLUMN, y, v1_val - MIXSRC_FIRST_TELEM, convertCswTelemValue(cs), LEFT|attr2); v2_min = -128; v2_max = 127; } else { @@ -4542,64 +4666,107 @@ void menuModelCustomSwitches(uint8_t event) #endif } - // CSW and switch - putsSwitches(CSW_4TH_COLUMN, y, cs->andsw, horz==3 ? attr : 0); + // CSW AND switch +#if defined(CPUARM) + putsSwitches(CSW_4TH_COLUMN, y, cs->andsw, horz==LS_FIELD_ANDSW ? attr : 0); +#else + uint8_t andsw = cs->andsw; + if (andsw > SWSRC_LAST_SWITCH) { + andsw += SWSRC_SW1-SWSRC_LAST_SWITCH-1; + } + putsSwitches(CSW_4TH_COLUMN, y, andsw, horz==LS_FIELD_ANDSW ? attr : 0); +#endif #if defined(CPUARM) // CSW duration if (cs->duration > 0) - lcd_outdezAtt(CSW_5TH_COLUMN, y, 5*cs->duration, (horz==4 ? attr : 0)|PREC1|LEFT); + lcd_outdezAtt(CSW_5TH_COLUMN, y, cs->duration, (horz==LS_FIELD_DURATION ? attr : 0)|PREC1|LEFT); else - lcd_putsiAtt(CSW_5TH_COLUMN, y, STR_MMMINV, 0, horz==4 ? attr : 0); + lcd_putsiAtt(CSW_5TH_COLUMN, y, STR_MMMINV, 0, horz==LS_FIELD_DURATION ? attr : 0); // CSW delay - if (cs->delay > 0) - lcd_outdezAtt(CSW_6TH_COLUMN, y, 5*cs->delay, (horz==5 ? attr : 0)|PREC1|LEFT); - else - lcd_putsiAtt(CSW_6TH_COLUMN, y, STR_MMMINV, 0, horz==5 ? attr : 0); + if (cstate == LS_FAMILY_STAY) { + lcd_puts(CSW_6TH_COLUMN, y, "N/A"); + if (attr && horz == LS_FIELD_DELAY) { + REPEAT_LAST_CURSOR_MOVE(); + } + } + else if (cs->delay > 0) { + lcd_outdezAtt(CSW_6TH_COLUMN, y, cs->delay, (horz==LS_FIELD_DELAY ? attr : 0)|PREC1|LEFT); + } + else { + lcd_putsiAtt(CSW_6TH_COLUMN, y, STR_MMMINV, 0, horz==LS_FIELD_DELAY ? attr : 0); + } + + if (attr && horz == LS_FIELD_V3 && cstate != LS_FAMILY_STAY) { + REPEAT_LAST_CURSOR_MOVE(); + } #endif if ((s_editMode>0 || p1valdiff) && attr) { switch (horz) { - case CSW_FIELD_FUNCTION: + case LS_FIELD_FUNCTION: { - CHECK_INCDEC_MODELVAR_ZERO(event, cs->func, CS_MAXF); +#if defined(CPUARM) + cs->func = checkIncDec(event, cs->func, 0, LS_FUNC_MAX, EE_MODEL, isLogicalSwitchFunctionAvailable); +#else + CHECK_INCDEC_MODELVAR_ZERO(event, cs->func, LS_FUNC_MAX); +#endif uint8_t new_cstate = cswFamily(cs->func); - if (cstate != new_cstate) - cs->v1 = cs->v2 = (new_cstate==CS_VTIMER ? -119/*1.0*/ : 0); + if (cstate != new_cstate) { +#if defined(CPUARM) + if (new_cstate == LS_FAMILY_TIMER) { + cs->v1 = cs->v2 = -119; + } + else if (new_cstate == LS_FAMILY_STAY) { + cs->v1 = 0; cs->v2 = -129; cs->v3 = 0; + } + else { + cs->v1 = cs->v2 = 0; + } +#else + cs->v1 = cs->v2 = (new_cstate==LS_FAMILY_TIMER ? -119/*1.0*/ : 0); +#endif + } break; } - case CSW_FIELD_V1: - cs->v1 = CHECK_INCDEC_PARAM(event, cs->v1, v1_min, v1_max); + case LS_FIELD_V1: + cs->v1 = CHECK_INCDEC_PARAM(event, v1_val, v1_min, v1_max); break; - case CSW_FIELD_V2: + case LS_FIELD_V2: cs->v2 = CHECK_INCDEC_PARAM(event, cs->v2, v2_min, v2_max); #if defined(PCBTARANIS) - if (cstate==CS_VOFS && cs->v1!=0 && event==EVT_KEY_LONG(KEY_ENTER)) { + if (cstate==LS_FAMILY_OFS && cs->v1!=0 && event==EVT_KEY_LONG(KEY_ENTER)) { killEvents(event); - getvalue_t x = getValue(cs->v1); - TRACE("AUTO x=%d", x); - if (cs->v1 < MIXSRC_GVAR1) + getvalue_t x = getValue(v1_val); + if (v1_val < MIXSRC_GVAR1) cs->v2 = calcRESXto100(x); - else if (cs->v1 - MIXSRC_FIRST_TELEM + 1 == TELEM_ALT) + else if (v1_val - MIXSRC_FIRST_TELEM + 1 == TELEM_ALT) cs->v2 *= 100; eeDirty(EE_MODEL); } #endif break; - case CSW_FIELD_ANDSW: #if defined(CPUARM) - CHECK_INCDEC_MODELSWITCH(event, cs->andsw, -MAX_CSW_ANDSW, MAX_CSW_ANDSW); + case LS_FIELD_V3: + cs->v3 = CHECK_INCDEC_PARAM(event, cs->v3, v3_min, v3_max); + break; +#endif + case LS_FIELD_ANDSW: +#if defined(CPUARM) + INCDEC_SET_FLAG(INCDEC_SWITCH); + INCDEC_ENABLE_CHECK(isSwitchAvailableInLogicalSwitches); + cs->andsw = CHECK_INCDEC_PARAM(event, cs->andsw, -MAX_LS_ANDSW, MAX_LS_ANDSW); #else - CHECK_INCDEC_MODELVAR_ZERO(event, cs->andsw, MAX_CSW_ANDSW); + CHECK_INCDEC_MODELVAR_ZERO(event, cs->andsw, MAX_LS_ANDSW); #endif break; #if defined(CPUARM) - case CSW_FIELD_DURATION: - CHECK_INCDEC_MODELVAR_ZERO(event, cs->duration, MAX_CSW_DURATION); + case LS_FIELD_DURATION: + CHECK_INCDEC_MODELVAR_ZERO(event, cs->duration, MAX_LS_DURATION); break; - case CSW_FIELD_DELAY: - CHECK_INCDEC_MODELVAR_ZERO(event, cs->delay, MAX_CSW_DELAY); + case LS_FIELD_DELAY: + CHECK_INCDEC_MODELVAR_ZERO(event, cs->delay, MAX_LS_DELAY); break; #endif } @@ -4609,9 +4776,9 @@ void menuModelCustomSwitches(uint8_t event) #endif #if LCD_W >= 212 - #define MODEL_CUSTOM_FUNC_1ST_COLUMN (5+4*FW) - #define MODEL_CUSTOM_FUNC_2ND_COLUMN (9*FW) - #define MODEL_CUSTOM_FUNC_3RD_COLUMN (21*FW) + #define MODEL_CUSTOM_FUNC_1ST_COLUMN (5+3*FW) + #define MODEL_CUSTOM_FUNC_2ND_COLUMN (8*FW) + #define MODEL_CUSTOM_FUNC_3RD_COLUMN (20*FW) #define MODEL_CUSTOM_FUNC_4TH_COLUMN (33*FW-3) #define MODEL_CUSTOM_FUNC_4TH_COLUMN_ONOFF (34*FW-3) #else @@ -4634,14 +4801,14 @@ void onCustomFunctionsFileSelectionMenu(const char *result) if (result == STR_UPDATE_LIST) { char directory[] = SOUNDS_PATH; strncpy(directory+SOUNDS_PATH_LNG_OFS, currentLanguagePack->id, 2); - if (!listSdFiles(directory, SOUNDS_EXT, sizeof(g_model.funcSw[sub].param), NULL)) { + if (!listSdFiles(directory, SOUNDS_EXT, sizeof(g_model.funcSw[sub].play.name), NULL)) { POPUP_WARNING(STR_NO_SOUNDS_ON_SD); s_menu_flags = 0; } } else { // The user choosed a wav file in the list - memcpy(g_model.funcSw[sub].param.name, result, sizeof(g_model.funcSw[sub].param.name)); + memcpy(g_model.funcSw[sub].play.name, result, sizeof(g_model.funcSw[sub].play.name)); eeDirty(EE_MODEL); } } @@ -4681,7 +4848,7 @@ void onCustomFunctionsMenu(const char *result) void menuModelCustomFunctions(uint8_t event) { - MENU(STR_MENUCUSTOMFUNC, menuTabModel, e_CustomFunctions, NUM_CFN+1, {0, NAVIGATION_LINE_BY_LINE|3/*repeated*/}); + MENU(STR_MENUCUSTOMFUNC, menuTabModel, e_CustomFunctions, NUM_CFN+1, {0, NAVIGATION_LINE_BY_LINE|4/*repeated*/}); uint8_t y; uint8_t k = 0; @@ -4714,237 +4881,239 @@ void menuModelCustomFunctions(uint8_t event) #endif CustomFnData *sd = &g_model.funcSw[k]; - for (uint8_t j=0; j<4; j++) { + uint8_t func = CFN_FUNC(sd); + for (uint8_t j=0; j<5; j++) { uint8_t attr = ((sub==k && m_posHorz==j) ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0); uint8_t active = (attr && (s_editMode>0 || p1valdiff)); switch (j) { case 0: - putsSwitches(MODEL_CUSTOM_FUNC_1ST_COLUMN, y, sd->swtch, attr | ((activeFnSwitches & ((MASK_CFN_TYPE)1 << k)) ? BOLD : 0)); - if (active || AUTOSWITCH_ENTER_LONG()) CHECK_INCDEC_MODELSWITCH(event, sd->swtch, SWSRC_FIRST, SWSRC_LAST); + putsSwitches(MODEL_CUSTOM_FUNC_1ST_COLUMN, y, CFN_SWITCH(sd), attr | ((activeFnSwitches & ((MASK_CFN_TYPE)1 << k)) ? BOLD : 0)); + if (active || AUTOSWITCH_ENTER_LONG()) CHECK_INCDEC_MODELSWITCH(event, CFN_SWITCH(sd), SWSRC_FIRST, SWSRC_LAST); break; case 1: - if (sd->swtch) { - uint8_t func_displayed; - if (CFN_FUNC(sd) < FUNC_TRAINER) { - func_displayed = 0; - putsChn(MODEL_CUSTOM_FUNC_2ND_COLUMN+6*FW, y, CFN_CH_NUMBER(sd)+1, attr); - } - else if (CFN_FUNC(sd) <= FUNC_TRAINER + NUM_STICKS) { - func_displayed = 1; - if (CFN_FUNC(sd) != FUNC_TRAINER) - putsMixerSource(MODEL_CUSTOM_FUNC_2ND_COLUMN+7*FW, y, MIXSRC_Rud+CFN_FUNC(sd)-FUNC_TRAINER-1, attr); - } -#if defined(DEBUG) - else if (CFN_FUNC(sd) == FUNC_TEST) { -#if defined(GVARS) - func_displayed = FUNC_TEST - FUNC_TRAINER - NUM_STICKS - MAX_GVARS + 2; -#else - func_displayed = FUNC_TEST - FUNC_TRAINER - NUM_STICKS + 1; -#endif - } -#endif -#if defined(GVARS) - else if (CFN_FUNC(sd) >= FUNC_ADJUST_GV1) { - func_displayed = FUNC_ADJUST_GV1 - FUNC_TRAINER - NUM_STICKS + 1; - putsStrIdx(MODEL_CUSTOM_FUNC_2ND_COLUMN+7*FW, y, STR_GV, CFN_FUNC(sd)-FUNC_ADJUST_GV1+1, attr); - } -#endif - else { - func_displayed = 2 + CFN_FUNC(sd) - FUNC_TRAINER - NUM_STICKS - 1; - } - lcd_putsiAtt(MODEL_CUSTOM_FUNC_2ND_COLUMN, y, STR_VFSWFUNC, func_displayed, attr); + if (CFN_SWITCH(sd)) { + lcd_putsiAtt(MODEL_CUSTOM_FUNC_2ND_COLUMN, y, STR_VFSWFUNC, func, attr); if (active) { #if defined(CPUARM) - CHECK_INCDEC_MODELVAR_ZERO(event, CFN_FUNC(sd), FUNC_MAX-1); + CFN_FUNC(sd) = checkIncDec(event, CFN_FUNC(sd), 0, FUNC_MAX-1, EE_MODEL, isAssignableFunctionAvailable); #else - if (CFN_FUNC(sd) < FUNC_TRAINER) { - CHECK_INCDEC_MODELVAR_ZERO(event, sd->internal.func_safety.func, 16); - } - else { - CHECK_INCDEC_MODELVAR_ZERO(event, CFN_FUNC(sd), FUNC_MAX-1); - if (CFN_FUNC(sd) < FUNC_TRAINER) - sd->internal.func_safety.func = 15; - } + CHECK_INCDEC_MODELVAR_ZERO(event, CFN_FUNC(sd), FUNC_MAX-1); #endif if (checkIncDec_Ret) CFN_RESET(sd); } } - else if (attr) { - REPEAT_LAST_CURSOR_MOVE(); + else { + j = 4; // skip other fields + if (sub==k && m_posHorz > 0) { + REPEAT_LAST_CURSOR_MOVE(); + } } break; case 2: - if (sd->swtch) { - INCDEC_DECLARE_VARS(); - int16_t val_displayed = CFN_PARAM(sd); - int8_t val_min = 0; - uint8_t val_max = 255; - if (CFN_FUNC(sd) == FUNC_PLAY_SOUND) { -#if defined(AUDIO) - val_max = AU_FRSKY_LAST-AU_FRSKY_FIRST-1; - lcd_putsiAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, STR_FUNCSOUNDS, val_displayed, attr); + { + int8_t maxParam = NUM_CHNOUT-1; + if (func == FUNC_SAFETY_CHANNEL) { + putsChn(lcdNextPos, y, CFN_CH_INDEX(sd)+1, attr); + } + else if (func == FUNC_TRAINER) { + maxParam = 4; +#if defined(CPUARM) + putsMixerSource(lcdNextPos, y, CFN_CH_INDEX(sd)==0 ? 0 : MIXSRC_Rud+CFN_CH_INDEX(sd)-1, attr); #else - break; + putsMixerSource(lcdNextPos, y, MIXSRC_Rud+CFN_CH_INDEX(sd)-1, attr); #endif - } -#if defined(HAPTIC) - else if (CFN_FUNC(sd) == FUNC_HAPTIC) { - val_max = 3; - lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr|LEFT); - } -#endif -#if defined(CPUARM) && defined(SDCARD) - else if (CFN_FUNC(sd) == FUNC_PLAY_TRACK || CFN_FUNC(sd) == FUNC_BACKGND_MUSIC) { -#if LCD_W >= 212 - xcoord_t x = MODEL_CUSTOM_FUNC_3RD_COLUMN; -#else - xcoord_t x = (CFN_FUNC(sd) == FUNC_PLAY_TRACK ? MODEL_CUSTOM_FUNC_2ND_COLUMN + FW + FW*strlen(TR_PLAY_TRACK) : MODEL_CUSTOM_FUNC_3RD_COLUMN); -#endif - if (ZEXIST(sd->param.name)) - lcd_putsnAtt(x, y, sd->param.name, sizeof(sd->param.name), attr); - else - lcd_putsiAtt(x, y, STR_VCSWFUNC, 0, attr); - if (active && event==EVT_KEY_BREAK(KEY_ENTER)) { - s_editMode = 0; - char directory[] = SOUNDS_PATH; - strncpy(directory+SOUNDS_PATH_LNG_OFS, currentLanguagePack->id, 2); - if (listSdFiles(directory, SOUNDS_EXT, sizeof(sd->param.name), sd->param.name)) { - menuHandler = onCustomFunctionsFileSelectionMenu; - } - else { - POPUP_WARNING(STR_NO_SOUNDS_ON_SD); - s_menu_flags = 0; - } - } - break; - } - else if (CFN_FUNC(sd) == FUNC_PLAY_VALUE) { - val_max = MIXSRC_FIRST_TELEM + TELEM_DISPLAY_MAX - 1; - putsMixerSource(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr); - INCDEC_ENABLE_CHECK(isSourceAvailable); - } + } +#if defined(GVARS) + else if (func == FUNC_ADJUST_GVAR) { + maxParam = MAX_GVARS-1; + putsStrIdx(lcdNextPos, y, STR_GV, CFN_GVAR_INDEX(sd)+1, attr); + if (active) CHECK_INCDEC_MODELVAR_ZERO(event, CFN_GVAR_INDEX(sd), maxParam); + break; + } #endif #if defined(CPUARM) - else if (CFN_FUNC(sd) == FUNC_VOLUME) { - val_max = MIXSRC_LAST_CH; - putsMixerSource(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr); - INCDEC_ENABLE_CHECK(isSourceAvailable); - } -#elif defined(VOICE) - else if (CFN_FUNC(sd) == FUNC_PLAY_TRACK) { -#if defined(GVARS) - if (attr && event==EVT_KEY_LONG(KEY_ENTER)) { - killEvents(event); - s_editMode = !s_editMode; - active = true; - val_displayed = (val_displayed > 250 ? 0 : 251); - } - if (val_displayed > 250) { - putsStrIdx(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, STR_GV, val_displayed-250, attr); - } - else { - lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed+PROMPT_CUSTOM_BASE, attr|LEFT); - } -#else - lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed+PROMPT_CUSTOM_BASE, attr|LEFT); -#endif - } - else if (CFN_FUNC(sd) == FUNC_PLAY_BOTH) { - lcd_putcAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN+3*FWNUM, y, '|', attr); - lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN+3*FWNUM, y, val_displayed+PROMPT_CUSTOM_BASE, attr); - lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN+2+3*FWNUM, y, (val_displayed+PROMPT_CUSTOM_BASE+1)%10, attr|LEFT); - } - else if (CFN_FUNC(sd) == FUNC_PLAY_VALUE) { - val_max = MIXSRC_FIRST_TELEM + TELEM_DISPLAY_MAX - 1; - putsMixerSource(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr); - INCDEC_ENABLE_CHECK(isSourceAvailable); - } -#endif -#if defined(SDCARD) - else if (CFN_FUNC(sd) == FUNC_LOGS) { - if (val_displayed) { - lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr|PREC1|LEFT); - lcd_putc(lcdLastPos, y, 's'); - } - else { - lcd_putsiAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, STR_MMMINV, 0, attr); - } - } -#endif - else if (CFN_FUNC(sd) == FUNC_RESET) { - val_max = FUNC_RESET_PARAM_LAST; - lcd_putsiAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, STR_VFSWRESET, CFN_PARAM(sd), attr); - } - else if (CFN_FUNC(sd) < FUNC_TRAINER) { - val_displayed = (int8_t)CFN_PARAM(sd); - val_min = -125; val_max = 125; - lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr|LEFT); - } -#if defined(GVARS) - else if (CFN_FUNC(sd) >= FUNC_ADJUST_GV1 -#if defined(DEBUG) - && CFN_FUNC(sd) <= FUNC_ADJUST_GVLAST -#endif - ) { - switch (CFN_GVAR_MODE(sd)) { - case FUNC_ADJUST_GVAR_CONSTANT: - val_displayed = (int8_t)CFN_PARAM(sd); - val_min = -125; val_max = 125; - lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr|LEFT); - break; - case FUNC_ADJUST_GVAR_SOURCE: - val_max = MIXSRC_LAST_CH; - putsMixerSource(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr); - INCDEC_ENABLE_CHECK(isSourceAvailable); - break; - case FUNC_ADJUST_GVAR_GVAR: - val_max = MAX_GVARS-1; - putsStrIdx(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, STR_GV, val_displayed+1, attr); - break; - default: // FUNC_ADJUST_GVAR_INC - val_max = 1; - lcd_putsiAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, PSTR("\002-1+1"), val_displayed, attr); - break; - } - - if (attr && event==EVT_KEY_LONG(KEY_ENTER)) { - killEvents(event); - s_editMode = !s_editMode; - active = true; - CFN_GVAR_MODE(sd) += 1; - val_displayed = 0; - } - } -#endif - else { - if (attr) m_posHorz = (CURSOR_MOVED_LEFT(event) ? 1 : 3); - break; - } - - if (active) { - CFN_PARAM(sd) = CHECK_INCDEC_PARAM(event, val_displayed, val_min, val_max); - } + else if (func == FUNC_SET_TIMER) { + maxParam = 1; + putsStrIdx(lcdNextPos, y, STR_TIMER, CFN_TIMER_INDEX(sd)+1, attr); + if (active) CHECK_INCDEC_MODELVAR_ZERO(event, CFN_TIMER_INDEX(sd), maxParam); + break; } +#endif else if (attr) { REPEAT_LAST_CURSOR_MOVE(); } + if (active) CHECK_INCDEC_MODELVAR_ZERO(event, CFN_CH_INDEX(sd), maxParam); break; + } case 3: - if (sd->swtch && (CFN_FUNC(sd) <= FUNC_INSTANT_TRIM -#if defined(GVARS) - || CFN_FUNC(sd) >= FUNC_ADJUST_GV1 + { + INCDEC_DECLARE_VARS(); + int16_t val_displayed = CFN_PARAM(sd); + int8_t val_min = 0; +#if defined(CPUARM) + int16_t val_max = 255; +#else + uint8_t val_max = 255; +#endif + if (func == FUNC_SAFETY_CHANNEL) { + val_displayed = (int8_t)CFN_PARAM(sd); + val_min = -125; val_max = 125; + lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr|LEFT); + } +#if defined(CPUARM) + else if (func == FUNC_SET_TIMER) { + val_max = 59*60+59; + putsTime(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr|LEFT, attr); + } +#endif +#if defined(AUDIO) + else if (func == FUNC_PLAY_SOUND) { + val_max = AU_FRSKY_LAST-AU_FRSKY_FIRST-1; + lcd_putsiAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, STR_FUNCSOUNDS, val_displayed, attr); + } +#endif +#if defined(HAPTIC) + else if (func == FUNC_HAPTIC) { + val_max = 3; + lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr|LEFT); + } +#endif +#if defined(CPUARM) && defined(SDCARD) + else if (func == FUNC_PLAY_TRACK || func == FUNC_BACKGND_MUSIC) { +#if LCD_W >= 212 + xcoord_t x = MODEL_CUSTOM_FUNC_3RD_COLUMN; +#else + xcoord_t x = (func == FUNC_PLAY_TRACK ? MODEL_CUSTOM_FUNC_2ND_COLUMN + FW + FW*strlen(TR_PLAY_TRACK) : MODEL_CUSTOM_FUNC_3RD_COLUMN); +#endif + if (ZEXIST(sd->play.name)) + lcd_putsnAtt(x, y, sd->play.name, sizeof(sd->play.name), attr); + else + lcd_putsiAtt(x, y, STR_VCSWFUNC, 0, attr); + if (active && event==EVT_KEY_BREAK(KEY_ENTER)) { + s_editMode = 0; + char directory[] = SOUNDS_PATH; + strncpy(directory+SOUNDS_PATH_LNG_OFS, currentLanguagePack->id, 2); + if (listSdFiles(directory, SOUNDS_EXT, sizeof(sd->play.name), sd->play.name)) { + menuHandler = onCustomFunctionsFileSelectionMenu; + } + else { + POPUP_WARNING(STR_NO_SOUNDS_ON_SD); + s_menu_flags = 0; + } + } + break; + } + else if (func == FUNC_PLAY_VALUE) { + val_max = MIXSRC_FIRST_TELEM + TELEM_DISPLAY_MAX - 1; + putsMixerSource(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr); + INCDEC_ENABLE_CHECK(isSourceAvailable); + } #endif #if defined(CPUARM) - || CFN_FUNC(sd) == FUNC_VOLUME + else if (func == FUNC_VOLUME) { + val_max = MIXSRC_LAST_CH; + putsMixerSource(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr); + INCDEC_ENABLE_CHECK(isSourceAvailable); + } +#elif defined(VOICE) + else if (func == FUNC_PLAY_TRACK) { +#if defined(GVARS) + if (attr && event==EVT_KEY_LONG(KEY_ENTER)) { + killEvents(event); + s_editMode = !s_editMode; + active = true; + val_displayed = (val_displayed > 250 ? 0 : 251); + } + if (val_displayed > 250) { + putsStrIdx(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, STR_GV, val_displayed-250, attr); + } + else { + lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed+PROMPT_CUSTOM_BASE, attr|LEFT); + } +#else + lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed+PROMPT_CUSTOM_BASE, attr|LEFT); #endif - )) { + } + else if (func == FUNC_PLAY_BOTH) { + lcd_putcAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN+3*FWNUM, y, '|', attr); + lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN+3*FWNUM, y, val_displayed+PROMPT_CUSTOM_BASE, attr); + lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN+2+3*FWNUM, y, (val_displayed+PROMPT_CUSTOM_BASE+1)%10, attr|LEFT); + } + else if (func == FUNC_PLAY_VALUE) { + val_max = MIXSRC_FIRST_TELEM + TELEM_DISPLAY_MAX - 1; + putsMixerSource(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr); + INCDEC_ENABLE_CHECK(isSourceAvailable); + } +#endif +#if defined(SDCARD) + else if (func == FUNC_LOGS) { + if (val_displayed) { + lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr|PREC1|LEFT); + lcd_putc(lcdLastPos, y, 's'); + } + else { + lcd_putsiAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, STR_MMMINV, 0, attr); + } + } +#endif + else if (func == FUNC_RESET) { + val_max = FUNC_RESET_PARAM_LAST; + lcd_putsiAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, STR_VFSWRESET, CFN_PARAM(sd), attr); + } +#if defined(GVARS) + else if (func == FUNC_ADJUST_GVAR) { + switch (CFN_GVAR_MODE(sd)) { + case FUNC_ADJUST_GVAR_CONSTANT: + val_displayed = (int8_t)CFN_PARAM(sd); + val_min = -125; val_max = 125; + lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr|LEFT); + break; + case FUNC_ADJUST_GVAR_SOURCE: + val_max = MIXSRC_LAST_CH; + putsMixerSource(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr); + INCDEC_ENABLE_CHECK(isSourceAvailable); + break; + case FUNC_ADJUST_GVAR_GVAR: + val_max = MAX_GVARS-1; + putsStrIdx(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, STR_GV, val_displayed+1, attr); + break; + default: // FUNC_ADJUST_GVAR_INC + val_max = 1; + lcd_putsiAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, PSTR("\002-1+1"), val_displayed, attr); + break; + } + + if (attr && event==EVT_KEY_LONG(KEY_ENTER)) { + killEvents(event); + s_editMode = !s_editMode; + active = true; + CFN_GVAR_MODE(sd) += 1; +#if defined(CPUARM) + CFN_GVAR_MODE(sd) &= 0x03; +#endif + val_displayed = 0; + } + } +#endif + else if (attr) { + REPEAT_LAST_CURSOR_MOVE(); + } + + if (active) { + CFN_PARAM(sd) = CHECK_INCDEC_PARAM(event, val_displayed, val_min, val_max); + } + break; + } + + case 4: + if (HAS_ENABLE_PARAM(func)) { menu_lcd_onoff(MODEL_CUSTOM_FUNC_4TH_COLUMN_ONOFF, y, CFN_ACTIVE(sd), attr); if (active) CHECK_INCDEC_MODELVAR_ZERO(event, CFN_ACTIVE(sd), 1); } - else if (sd->swtch && HAS_REPEAT_PARAM(sd)) { + else if (HAS_REPEAT_PARAM(func)) { if (CFN_PLAY_REPEAT(sd) == 0) { #if LCD_W >= 212 lcd_putsAtt(MODEL_CUSTOM_FUNC_4TH_COLUMN+2, y, "1x", attr); @@ -4989,8 +5158,8 @@ void onModelCustomScriptMenu(const char *result) ScriptData &sd = g_model.scriptsData[s_currIdx]; if (result == STR_UPDATE_LIST) { - if (!listSdFiles(SCRIPTS_PATH, MIXES_EXT, sizeof(sd.file), NULL)) { - POPUP_WARNING(STR_NO_BITMAPS_ON_SD); + if (!listSdFiles(SCRIPTS_PATH, SCRIPTS_EXT, sizeof(sd.file), NULL)) { + POPUP_WARNING(STR_NO_SCRIPTS_ON_SD); s_menu_flags = 0; } } @@ -5031,13 +5200,13 @@ void menuModelCustomScriptOne(uint8_t event) if (i == ITEM_MODEL_CUSTOMSCRIPT_FILE) { lcd_putsLeft(y, "Script"); - if (ZEXIST(sd.file) > 0) + if (ZEXIST(sd.file)) lcd_putsnAtt(SCRIPT_ONE_2ND_COLUMN_POS, y, sd.file, sizeof(sd.file), attr); else lcd_putsiAtt(SCRIPT_ONE_2ND_COLUMN_POS, y, STR_VCSWFUNC, 0, attr); if (attr && event==EVT_KEY_BREAK(KEY_ENTER) && !READ_ONLY()) { s_editMode = 0; - if (listSdFiles(SCRIPTS_PATH, MIXES_EXT, sizeof(sd.file), sd.file, LIST_NONE_SD_FILE)) { + if (listSdFiles(SCRIPTS_PATH, SCRIPTS_EXT, sizeof(sd.file), sd.file, LIST_NONE_SD_FILE)) { menuHandler = onModelCustomScriptMenu; } else { @@ -5167,6 +5336,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 +5419,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 +5581,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 +5601,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: @@ -5454,10 +5646,7 @@ void menuModelTelemetry(uint8_t event) } #else lcd_outdezAtt(TELEM_COL2, y, -10+g_model.frsky.varioMin, (m_posHorz<=0 ? attr : 0)|LEFT); - if (g_model.frsky.varioCenterMin == -16) - lcd_putsAtt(TELEM_COL2+4*FW-2, y, STR_OFF, m_posHorz==1 ? attr : 0); - else - lcd_outdezAtt(TELEM_COL2+7*FW-2, y, -5+g_model.frsky.varioCenterMin, ((m_posHorz<0 || m_posHorz==1) ? attr : 0)|PREC1); + lcd_outdezAtt(TELEM_COL2+7*FW-2, y, -5+g_model.frsky.varioCenterMin, ((m_posHorz<0 || m_posHorz==1) ? attr : 0)|PREC1); lcd_outdezAtt(TELEM_COL2+10*FW, y, 5+g_model.frsky.varioCenterMax, ((m_posHorz<0 || m_posHorz==2) ? attr : 0)|PREC1); lcd_outdezAtt(TELEM_COL2+13*FW+2, y, 10+g_model.frsky.varioMax, ((m_posHorz<0 || m_posHorz==3) ? attr : 0)); if (attr && (s_editMode>0 || p1valdiff)) { @@ -5499,7 +5688,7 @@ void menuModelTelemetry(uint8_t event) putsStrIdx(0*FW, y, STR_SCREEN, screenIndex+1); #if defined(GAUGES) bool screenType = IS_BARS_SCREEN(screenIndex); - if (screenType != selectMenuItem(TELEM_SCRTYPE_COL, y, PSTR(""), STR_VSCREEN, screenType, 0, 1, attr, event)) + if (screenType != (bool)selectMenuItem(TELEM_SCRTYPE_COL, y, PSTR(""), STR_VSCREEN, screenType, 0, 1, attr, event)) g_model.frsky.screensType ^= (1 << screenIndex); #endif break; @@ -5510,7 +5699,7 @@ void menuModelTelemetry(uint8_t event) putsStrIdx(0*FW, y, STR_SCREEN, screenIndex); #if defined(GAUGES) bool screenType = g_model.frsky.screensType & screenIndex; - if (screenType != selectMenuItem(TELEM_SCRTYPE_COL, y, PSTR(""), STR_VSCREEN, screenType, 0, 1, attr, event)) + if (screenType != (bool)selectMenuItem(TELEM_SCRTYPE_COL, y, PSTR(""), STR_VSCREEN, screenType, 0, 1, attr, event)) g_model.frsky.screensType ^= screenIndex; #endif break; @@ -5550,18 +5739,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(); @@ -5569,17 +5754,17 @@ void menuModelTelemetry(uint8_t event) if (attr && (s_editMode>0 || p1valdiff)) { switch (m_posHorz) { case 0: - bar.source = checkIncDecModel(event, barSource, 0, TELEM_DISPLAY_MAX); + bar.source = CHECK_INCDEC_MODELVAR_ZERO_CHECK(event, barSource, TELEM_DISPLAY_MAX, isTelemetrySourceAvailable); 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; } } @@ -5597,7 +5782,7 @@ void menuModelTelemetry(uint8_t event) #endif lcd_putsiAtt(pos[c], y, STR_VTELEMCHNS, value, cellAttr); if (cellAttr && (s_editMode>0 || p1valdiff)) { - CHECK_INCDEC_MODELVAR_ZERO(event, value, (lineIndex==3 && c==0) ? TELEM_STATUS_MAX : TELEM_DISPLAY_MAX); + CHECK_INCDEC_MODELVAR_ZERO_CHECK(event, value, (lineIndex==3 && c==0) ? TELEM_STATUS_MAX : TELEM_DISPLAY_MAX, isTelemetrySourceAvailable); } } if (attr && m_posHorz == NUM_LINE_ITEMS) { diff --git a/radio/src/gui/menus.cpp b/radio/src/gui/menus.cpp index 5580a998d..70ceb4412 100644 --- a/radio/src/gui/menus.cpp +++ b/radio/src/gui/menus.cpp @@ -113,7 +113,7 @@ int16_t checkIncDec(uint8_t event, int16_t val, int16_t i_min, int16_t i_max, ui #endif { int16_t newval = val; - + #if defined(DBLKEYS) uint8_t in = KEYS_PRESSED(); if (EVT_KEY_MASK(event)) { @@ -228,18 +228,6 @@ int16_t checkIncDec(uint8_t event, int16_t val, int16_t i_min, int16_t i_max, ui #endif } } - - if (event == EVT_KEY_LONG(KEY_ENTER) && i_max > SWSRC_ON) { - s_editMode = !s_editMode; - if (newval > SWSRC_ON) - newval -= (MAX_SWITCH+1); - else if (newval > 0) - newval += (MAX_SWITCH+1); - else if (newval < SWSRC_OFF) - newval += (MAX_SWITCH+1); - else if (newval < 0) - newval -= (MAX_SWITCH+1); - } } #endif @@ -370,47 +358,25 @@ void onLongMenuPress(const char *result) } #endif -bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t menuTabSize, const pm_uint8_t *horTab, uint8_t horTabMax, vertpos_t maxrow) +#if defined(CPUARM) +tmr10ms_t menuEntryTime; +#endif + +#if defined(PCBTARANIS) +bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t menuTabSize, const pm_uint8_t *horTab, uint8_t horTabMax, vertpos_t maxrow, uint8_t flags) { vertpos_t l_posVert = m_posVert; horzpos_t l_posHorz = m_posHorz; uint8_t maxcol = MAXCOL(l_posVert); -#ifdef NAVIGATION_POT1 - // check pot 1 - if changed -> scroll values - static int16_t p1val; - static int16_t p1valprev; - p1valdiff = (p1val-calibratedStick[6]) / SCROLL_POT1_TH; - if (p1valdiff) { - p1valdiff = (p1valprev-calibratedStick[6]) / 2; - p1val = calibratedStick[6]; - } - p1valprev = calibratedStick[6]; -#endif - -#ifdef NAVIGATION_POT2 - // check pot 2 - if changed -> scroll menu - static int16_t p2valprev; - p2valdiff = (p2valprev-calibratedStick[4]) / SCROLL_TH; - if (p2valdiff) p2valprev = calibratedStick[4]; -#endif - -#ifdef NAVIGATION_POT3 - // check pot 3 if changed -> cursor down/up - static int16_t p3valprev; - int8_t scrollUD = (p3valprev-calibratedStick[5]) / SCROLL_TH; - if (scrollUD) p3valprev = calibratedStick[5]; -#else #define scrollUD 0 -#endif if (p2valdiff || scrollUD || p1valdiff) backlightOn(); // on keypress turn the light on if (menuTab) { uint8_t attr = 0; -#if defined(PCBTARANIS) int8_t cc = curr; switch(event) { case EVT_KEY_LONG(KEY_MENU): @@ -447,7 +413,271 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t chainMenu((MenuFuncP)pgm_read_adr(&menuTab[cc])); return false; } + + s_noScroll = 0; + + if (!(flags&CHECK_FLAG_NO_SCREEN_INDEX)) { + displayScreenIndex(curr, menuTabSize, attr); + } + + lcd_filled_rect(0, 0, LCD_W, FH, SOLID, FILL_WHITE|GREY_DEFAULT); + } + + DISPLAY_PROGRESS_BAR(menuTab ? lcdLastPos-2*FW-((curr+1)/10*FWNUM)-2 : 20*FW+1); + + if (s_editMode<=0) { + if (scrollUD) { + l_posVert = limit((int8_t)0, (int8_t)(l_posVert - scrollUD), (int8_t)maxrow); + l_posHorz = min((uint8_t)l_posHorz, MAXCOL(l_posVert)); + } + + if (p2valdiff && l_posVert>0) { + l_posHorz = limit((int8_t)0, (int8_t)((uint8_t)l_posHorz - p2valdiff), (int8_t)maxcol); + } + } + + switch(event) + { + case EVT_ENTRY: + menuEntryTime = get_tmr10ms(); + l_posVert = POS_VERT_INIT; + l_posHorz = POS_HORZ_INIT(l_posVert); + SET_SCROLLBAR_X(LCD_W-1); +#if defined(ROTARY_ENCODER_NAVIGATION) + if (menuTab) { + s_editMode = EDIT_MODE_INIT; + break; + } + // no break #else + s_editMode = EDIT_MODE_INIT; + break; +#endif + + case EVT_ENTRY_UP: + menuEntryTime = get_tmr10ms(); + s_editMode = 0; + l_posHorz = POS_HORZ_INIT(l_posVert); + SET_SCROLLBAR_X(LCD_W-1); + break; + + case EVT_ROTARY_BREAK: + if (s_editMode > 1) break; + if (m_posHorz < 0 && maxcol > 0 && READ_ONLY_UNLOCKED()) { + l_posHorz = 0; + break; + } + if (!menuTab || l_posVert>0) { + if (READ_ONLY_UNLOCKED()) { + s_editMode = (s_editMode<=0); + } + } + break; + +#if defined(ROTARY_ENCODER_NAVIGATION) + case EVT_ROTARY_LONG: + if (s_editMode > 1) break; + killEvents(event); + if (l_posVert != POS_VERT_INIT) { + l_posVert = POS_VERT_INIT; + s_editMode = EDIT_MODE_INIT; + break; + } + // no break +#endif + case EVT_KEY_LONG(KEY_EXIT): + s_editMode = 0; // TODO needed? we call ENTRY_UP after which does the same + popMenu(); + return false; + + case EVT_KEY_BREAK(KEY_EXIT): +#if defined(ROTARY_ENCODER_NAVIGATION) + if (s_editMode == 0) + s_editMode = EDIT_MODE_INIT; + else +#endif + if (s_editMode>0) { + s_editMode = 0; + break; + } + + if (l_posHorz >= 0 && (COLATTR(l_posVert) & NAVIGATION_LINE_BY_LINE)) { + l_posHorz = -1; + } + else + { + uint8_t posVertInit = POS_VERT_INIT; + if (s_pgOfs != 0 || l_posVert != posVertInit) { + s_pgOfs = 0; + l_posVert = posVertInit; + l_posHorz = POS_HORZ_INIT(l_posVert); + } + else { + popMenu(); + return false; + } + } + break; + + CASE_EVT_ROTARY_MOVE_RIGHT + if (s_editMode != 0) break; + if ((COLATTR(l_posVert) & NAVIGATION_LINE_BY_LINE)) { + if (l_posHorz >= 0) { + INC(l_posHorz, 0, maxcol); + break; + } + } + else { + if (l_posHorz < maxcol) { + l_posHorz++; + break; + } + else { + l_posHorz = 0; + if (!IS_ROTARY_MOVE_RIGHT(event)) + break; + } + } + + do { + INC(l_posVert, POS_VERT_INIT, maxrow); + } while (CURSOR_NOT_ALLOWED_IN_ROW(l_posVert)); + + s_editMode = 0; // if we go down, we must be in this mode + + l_posHorz = POS_HORZ_INIT(l_posVert); + break; + + CASE_EVT_ROTARY_MOVE_LEFT + if (s_editMode != 0) break; + if ((COLATTR(l_posVert) & NAVIGATION_LINE_BY_LINE)) { + if (l_posHorz >= 0) { + DEC(l_posHorz, 0, maxcol); + break; + } + } + else { + if (l_posHorz > 0) { + l_posHorz--; + break; + } + else if (IS_ROTARY_MOVE_LEFT(event) && s_editMode == 0) { + l_posHorz = 0xff; + } + else { + l_posHorz = maxcol; + break; + } + } + + do { + DEC(l_posVert, POS_VERT_INIT, maxrow); + } while (CURSOR_NOT_ALLOWED_IN_ROW(l_posVert)); + + s_editMode = 0; // if we go up, we must be in this mode + + if ((COLATTR(l_posVert) & NAVIGATION_LINE_BY_LINE)) + l_posHorz = -1; + else + l_posHorz = min((uint8_t)l_posHorz, MAXCOL(l_posVert)); + + break; + } + +#if defined(CPUARM) + if (l_posVert<1) s_pgOfs=0; + else if (menuTab && horTab) { + vertpos_t realPosVert = l_posVert; + vertpos_t realPgOfs = s_pgOfs; + vertpos_t realMaxrow = maxrow; + for (vertpos_t i=1; i<=maxrow; i++) { + if (MAXCOL(i) == HIDDEN_ROW) { + realMaxrow--; + if (i < l_posVert) + realPosVert--; + if (i < s_pgOfs) + realPgOfs--; + } + } + if (realPosVert>(LCD_LINES-1)+realPgOfs) realPgOfs = realPosVert-(LCD_LINES-1); + else if (realPosVert<1+realPgOfs) realPgOfs = realPosVert-1; + s_pgOfs = realPgOfs; + for (vertpos_t i=1; i<=realPgOfs; i++) { + if (MAXCOL(i) == HIDDEN_ROW) { + s_pgOfs++; + } + } + maxrow = realMaxrow; + } + else { + uint8_t max = menuTab ? LCD_LINES-1 : LCD_LINES-2; + if (l_posVert>max+s_pgOfs) s_pgOfs = l_posVert-max; + else if (l_posVert<1+s_pgOfs) s_pgOfs = l_posVert-1; + } + +#if LCD_W >= 212 + if (maxrow > LCD_LINES-1 && scrollbar_X) + displayScrollbar(scrollbar_X, FH, LCD_H-FH, s_pgOfs, menuTab ? maxrow : maxrow+1, LCD_LINES-1); +#endif + +#else + uint8_t max = menuTab ? LCD_LINES-1 : LCD_LINES-2; + if (l_posVert<1) s_pgOfs=0; + else if (l_posVert>max+s_pgOfs) s_pgOfs = l_posVert-max; + else if (l_posVert<1+s_pgOfs) s_pgOfs = l_posVert-1; +#endif + m_posVert = l_posVert; + m_posHorz = l_posHorz; + if (s_pgOfs > 0) { + l_posVert--; + if (l_posVert == s_pgOfs && CURSOR_NOT_ALLOWED_IN_ROW(l_posVert)) + s_pgOfs = l_posVert-1; + } + return true; +} + +#else // defined(PCBTARANIS) + +bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t menuTabSize, const pm_uint8_t *horTab, uint8_t horTabMax, vertpos_t maxrow) +{ + vertpos_t l_posVert = m_posVert; + horzpos_t l_posHorz = m_posHorz; + + uint8_t maxcol = MAXCOL(l_posVert); + +#if defined(NAVIGATION_POT1) + // check pot 1 - if changed -> scroll values + static int16_t p1val; + static int16_t p1valprev; + p1valdiff = (p1val-calibratedStick[6]) / SCROLL_POT1_TH; + if (p1valdiff) { + p1valdiff = (p1valprev-calibratedStick[6]) / 2; + p1val = calibratedStick[6]; + } + p1valprev = calibratedStick[6]; +#endif + +#if defined(NAVIGATION_POT2) + // check pot 2 - if changed -> scroll menu + static int16_t p2valprev; + p2valdiff = (p2valprev-calibratedStick[4]) / SCROLL_TH; + if (p2valdiff) p2valprev = calibratedStick[4]; +#endif + +#if defined(NAVIGATION_POT3) + // check pot 3 if changed -> cursor down/up + static int16_t p3valprev; + int8_t scrollUD = (p3valprev-calibratedStick[5]) / SCROLL_TH; + if (scrollUD) p3valprev = calibratedStick[5]; +#else + #define scrollUD 0 +#endif + + if (p2valdiff || scrollUD || p1valdiff) backlightOn(); // on keypress turn the light on + + if (menuTab) { + uint8_t attr = 0; + if (l_posVert==0 && !s_noScroll) { attr = INVERS; @@ -508,14 +738,10 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t attr = INVERS|BLINK; #endif } -#endif s_noScroll = 0; displayScreenIndex(curr, menuTabSize, attr); -#if defined(PCBTARANIS) - lcd_filled_rect(0, 0, LCD_W, FH, SOLID, FILL_WHITE|GREY_DEFAULT); -#endif } DISPLAY_PROGRESS_BAR(menuTab ? lcdLastPos-2*FW-((curr+1)/10*FWNUM)-2 : 20*FW+1); @@ -534,6 +760,9 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t switch(event) { case EVT_ENTRY: +#if defined(CPUARM) + menuEntryTime = get_tmr10ms(); +#endif l_posVert = POS_VERT_INIT; l_posHorz = POS_HORZ_INIT(l_posVert); SET_SCROLLBAR_X(LCD_W-1); @@ -548,20 +777,7 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t break; #endif -#if defined(PCBTARANIS) - case EVT_ENTRY_UP: - s_editMode = 0; - l_posHorz = POS_HORZ_INIT(l_posVert); - SET_SCROLLBAR_X(LCD_W-1); - break; - - case EVT_ROTARY_BREAK: - if (s_editMode > 1) break; - if (m_posHorz < 0 && maxcol > 0 && READ_ONLY_UNLOCKED()) { - l_posHorz = 0; - break; - } -#elif defined(ROTARY_ENCODER_NAVIGATION) +#if defined(ROTARY_ENCODER_NAVIGATION) case EVT_ENTRY_UP: s_editMode = 0; SET_SCROLLBAR_X(LCD_W-1); @@ -571,9 +787,7 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t if (s_editMode > 1) break; #endif -#if !defined(PCBTARANIS) case EVT_KEY_FIRST(KEY_ENTER): -#endif if (!menuTab || l_posVert>0) { if (READ_ONLY_UNLOCKED()) { s_editMode = (s_editMode<=0); @@ -607,24 +821,7 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t s_editMode = 0; break; } -#if defined(PCBTARANIS) - if (l_posHorz >= 0 && (COLATTR(l_posVert) & NAVIGATION_LINE_BY_LINE)) { - l_posHorz = -1; - } - else - { - uint8_t posVertInit = POS_VERT_INIT; - if (s_pgOfs != 0 || l_posVert != posVertInit) { - s_pgOfs = 0; - l_posVert = posVertInit; - l_posHorz = POS_HORZ_INIT(l_posVert); - } - else { - popMenu(); - return false; - } - } -#else + if (l_posVert==0 || !menuTab) { popMenu(); // beeps itself return false; @@ -634,39 +831,16 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t l_posVert = 0; l_posHorz = 0; } -#endif break; -#if !defined(PCBTARANIS) case EVT_KEY_REPT(KEY_RIGHT): //inc if (l_posHorz==maxcol) break; // no break case EVT_KEY_FIRST(KEY_RIGHT)://inc if (!horTab || s_editMode>0) break; -#endif -#if defined(PCBTARANIS) - CASE_EVT_ROTARY_MOVE_RIGHT - if (s_editMode != 0) break; - if ((COLATTR(l_posVert) & NAVIGATION_LINE_BY_LINE)) { - if (l_posHorz >= 0) { - INC(l_posHorz, 0, maxcol); - break; - } - } - else { - if (l_posHorz < maxcol) { - l_posHorz++; - break; - } - else { - l_posHorz = 0; - if (!IS_ROTARY_MOVE_RIGHT(event)) - break; - } - } -#elif defined(ROTARY_ENCODER_NAVIGATION) +#if defined(ROTARY_ENCODER_NAVIGATION) CASE_EVT_ROTARY_MOVE_RIGHT if (s_editMode != 0) break; if (l_posHorz < maxcol) { @@ -683,61 +857,31 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t break; #endif -#if !defined(PCBTARANIS) case EVT_KEY_REPT(KEY_DOWN): //inc if (!IS_ROTARY_RIGHT(event) && l_posVert==maxrow) break; // no break case EVT_KEY_FIRST(KEY_DOWN): //inc if (s_editMode>0) break; -#endif do { INC(l_posVert, POS_VERT_INIT, maxrow); } while (CURSOR_NOT_ALLOWED_IN_ROW(l_posVert)); -#if defined(ROTARY_ENCODER_NAVIGATION) || defined(PCBTARANIS) +#if defined(ROTARY_ENCODER_NAVIGATION) s_editMode = 0; // if we go down, we must be in this mode #endif -#if defined(PCBTARANIS) - l_posHorz = POS_HORZ_INIT(l_posVert); -#else l_posHorz = min(l_posHorz, MAXCOL(l_posVert)); -#endif break; -#if !defined(PCBTARANIS) case EVT_KEY_REPT(KEY_LEFT): //dec if (l_posHorz==0) break; // no break case EVT_KEY_FIRST(KEY_LEFT)://dec if (!horTab || s_editMode>0) break; -#endif -#if defined(PCBTARANIS) - CASE_EVT_ROTARY_MOVE_LEFT - if (s_editMode != 0) break; - if ((COLATTR(l_posVert) & NAVIGATION_LINE_BY_LINE)) { - if (l_posHorz >= 0) { - DEC(l_posHorz, 0, maxcol); - break; - } - } - else { - if (l_posHorz > 0) { - l_posHorz--; - break; - } - else if (IS_ROTARY_MOVE_LEFT(event) && s_editMode == 0) { - l_posHorz = 0xff; - } - else { - l_posHorz = maxcol; - break; - } - } -#elif defined(ROTARY_ENCODER_NAVIGATION) +#if defined(ROTARY_ENCODER_NAVIGATION) CASE_EVT_ROTARY_MOVE_LEFT if (s_editMode != 0) break; if (l_posHorz > 0) { @@ -756,13 +900,11 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t break; #endif -#if !defined(PCBTARANIS) case EVT_KEY_REPT(KEY_UP): //dec if (!IS_ROTARY_LEFT(event) && l_posVert==0) break; // no break case EVT_KEY_FIRST(KEY_UP): //dec if (s_editMode>0) break; -#endif do { DEC(l_posVert, POS_VERT_INIT, maxrow); @@ -772,14 +914,7 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t s_editMode = 0; // if we go up, we must be in this mode #endif -#if defined(PCBTARANIS) - if ((COLATTR(l_posVert) & NAVIGATION_LINE_BY_LINE)) - l_posHorz = -1; - else - l_posHorz = min((uint8_t)l_posHorz, MAXCOL(l_posVert)); -#else l_posHorz = min((uint8_t)l_posHorz, MAXCOL(l_posVert)); -#endif break; } @@ -790,7 +925,7 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t vertpos_t realPgOfs = s_pgOfs; vertpos_t realMaxrow = maxrow; for (vertpos_t i=1; i<=maxrow; i++) { - if (horTab[i] == HIDDEN_ROW) { + if (MAXCOL(i) == HIDDEN_ROW) { realMaxrow--; if (i < l_posVert) realPosVert--; @@ -802,7 +937,7 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t else if (realPosVert<1+realPgOfs) realPgOfs = realPosVert-1; s_pgOfs = realPgOfs; for (vertpos_t i=1; i<=realPgOfs; i++) { - if (horTab[i] == HIDDEN_ROW) { + if (MAXCOL(i) == HIDDEN_ROW) { s_pgOfs++; } } @@ -837,6 +972,7 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t #endif return true; } +#endif MenuFuncP g_menuStack[5]; uint8_t g_menuPos[4]; @@ -976,7 +1112,7 @@ int8_t switchMenuItem(uint8_t x, uint8_t y, int8_t value, LcdFlags attr, uint8_t { lcd_putsColumnLeft(x, y, STR_SWITCH); putsSwitches(x, y, value, attr); - if (attr) CHECK_INCDEC_MODELSWITCH(event, value, -MAX_SWITCH, MAX_SWITCH); + if (attr) CHECK_INCDEC_MODELSWITCH(event, value, SWSRC_FIRST, SWSRC_LAST); return value; } @@ -1046,6 +1182,16 @@ int16_t gvarMenuItem(uint8_t x, uint8_t y, int16_t value, int16_t min, int16_t m } #endif +void repeatLastCursorMove(uint8_t event) +{ + if (CURSOR_MOVED_LEFT(event) || CURSOR_MOVED_RIGHT(event)) { + putEvent(event); + } + else { + m_posHorz = 0; + } +} + #if LCD_W >= 212 #define MENU_X 30 #define MENU_Y 16 @@ -1187,7 +1333,7 @@ void drawStatusLine() #endif #if defined(CPUARM) -bool isSourceAvailable(int16_t source) +bool isSourceAvailable(int source) { #if defined(PCBTARANIS) if (source>=MIXSRC_FIRST_INPUT && source<=MIXSRC_LAST_INPUT) { @@ -1205,6 +1351,12 @@ bool isSourceAvailable(int16_t source) return false; #endif +#if defined(PCBTARANIS) + if (source>=MIXSRC_FIRST_POT && source<=MIXSRC_LAST_POT) { + return IS_POT_AVAILABLE(POT1+source-MIXSRC_FIRST_POT); + } +#endif + #if !defined(HELI) if (source>=MIXSRC_CYC1 && source<=MIXSRC_CYC3) return false; @@ -1221,8 +1373,8 @@ bool isSourceAvailable(int16_t source) } if (source>=MIXSRC_SW1 && source<=MIXSRC_LAST_CSW) { - CustomSwData * cs = cswAddress(source-MIXSRC_SW1); - return (cs->func != CS_OFF); + LogicalSwitchData * cs = cswAddress(source-MIXSRC_SW1); + return (cs->func != LS_FUNC_NONE); } #if !defined(GVARS) @@ -1230,10 +1382,35 @@ bool isSourceAvailable(int16_t source) return false; #endif + if (source>=MIXSRC_FIRST_TELEM && source<=MIXSRC_LAST_TELEM) + return isTelemetrySourceAvailable(source-MIXSRC_FIRST_TELEM+1); + return true; } -bool isInputSourceAvailable(int16_t source) +bool isTelemetrySourceAvailable(int source) +{ + if (source == TELEM_RX_VOLTAGE || source == TELEM_A3 || source == TELEM_A4 || source == TELEM_MIN_A3 || source == TELEM_MIN_A4) + return false; + +#if defined(PCBTARANIS) + if (source == TELEM_RSSI_TX) + return false; +#endif + + if (source >= TELEM_RESERVE1 && source <= TELEM_RESERVE5) + return false; + + if (source >= TELEM_RESERVE6 && source <= TELEM_RESERVE10) + return false; + + if (source == TELEM_DTE) + return false; + + return true; +} + +bool isInputSourceAvailable(int source) { if (source>=MIXSRC_Rud && source<=MIXSRC_MAX) return true; @@ -1244,13 +1421,16 @@ bool isInputSourceAvailable(int16_t source) if (source>=MIXSRC_FIRST_CH && source<=MIXSRC_LAST_CH) return true; - if (source>=MIXSRC_FIRST_TELEM && source<=MIXSRC_LAST_TELEM) + if (source>=MIXSRC_FIRST_PPM && source<=MIXSRC_LAST_PPM) return true; + if (source>=MIXSRC_FIRST_TELEM && source<=MIXSRC_LAST_TELEM) + return isTelemetrySourceAvailable(source-MIXSRC_FIRST_TELEM+1); + return false; } -bool isSwitchAvailable(int16_t swtch) +bool isSwitchAvailableInLogicalSwitches(int swtch) { if (swtch < 0) { if (swtch <= -SWSRC_ON) @@ -1263,11 +1443,65 @@ bool isSwitchAvailable(int16_t swtch) swtch = -swtch; } - if (swtch>=SWSRC_FIRST_CSW && swtch<=SWSRC_LAST_CSW) { - CustomSwData * cs = cswAddress(swtch-SWSRC_FIRST_CSW); - return (cs->func != CS_OFF); +#if defined(PCBTARANIS) + if (swtch >= SWSRC_FIRST_MULTIPOS_SWITCH && swtch <= SWSRC_LAST_MULTIPOS_SWITCH) { + int index = (swtch - SWSRC_FIRST_MULTIPOS_SWITCH) / XPOTS_MULTIPOS_COUNT; + if (IS_POT_MULTIPOS(POT1+index)) { + StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[POT1+index]; + return (calib->count >= ((swtch - SWSRC_FIRST_MULTIPOS_SWITCH) % XPOTS_MULTIPOS_COUNT)); + } + else { + return false; + } + } +#endif + + return true; +} + +bool isSwitchAvailable(int swtch) +{ + if (!isSwitchAvailableInLogicalSwitches(swtch)) { + return false; + } + + if (swtch >= SWSRC_FIRST_CSW && swtch <= SWSRC_LAST_CSW) { + LogicalSwitchData * cs = cswAddress(swtch-SWSRC_FIRST_CSW); + return (cs->func != LS_FUNC_NONE); } return true; } + +bool isLogicalSwitchFunctionAvailable(int function) +{ + return function != LS_FUNC_RANGE; +} + +bool isAssignableFunctionAvailable(int function) +{ + switch (function) { + +#if !defined(HAPTIC) + case FUNC_HAPTIC: + return false; +#endif + +#if !defined(GVARS) + case FUNC_ADJUST_GVAR: + return false; +#endif + + case FUNC_PLAY_DIFF: + case FUNC_RESERVE1: + case FUNC_RESERVE2: + case FUNC_RESERVE3: + case FUNC_RESERVE4: + case FUNC_RESERVE5: + return false; + + default: + return true; + } +} #endif diff --git a/radio/src/gui/menus.h b/radio/src/gui/menus.h index 872af4fa3..3ee37c250 100644 --- a/radio/src/gui/menus.h +++ b/radio/src/gui/menus.h @@ -88,6 +88,10 @@ inline void displayColumnHeader(const char **headers, uint8_t index) #define horzpos_t uint8_t #endif +#if defined(CPUARM) + extern tmr10ms_t menuEntryTime; +#endif + extern vertpos_t m_posVert; extern horzpos_t m_posHorz; extern vertpos_t s_pgOfs; @@ -167,7 +171,7 @@ extern int8_t s_editMode; // global editmode #define HIDDEN_ROW ((uint8_t)-2) #if defined(CPUARM) -typedef bool (*IsValueAvailable)(int16_t); +typedef bool (*IsValueAvailable)(int); int16_t checkIncDec(uint8_t event, int16_t i_pval, int16_t i_min, int16_t i_max, uint8_t i_flags=0, IsValueAvailable isValueAvailable=NULL); #else int16_t checkIncDec(uint8_t event, int16_t i_pval, int16_t i_min, int16_t i_max, uint8_t i_flags=0); @@ -190,7 +194,18 @@ int8_t checkIncDecGen(uint8_t event, int8_t i_val, int8_t i_min, int8_t i_max); var = checkIncDecModelZero(event,var,max) #if defined(CPUARM) - bool isSwitchAvailable(int16_t swtch); + #define CHECK_INCDEC_MODELVAR_ZERO_CHECK(event, var, max, check) \ + var = checkIncDec(event, var, 0, max, EE_MODEL, check) +#else + #define CHECK_INCDEC_MODELVAR_ZERO_CHECK(event, var, max, check) \ + CHECK_INCDEC_MODELVAR_ZERO(event, var, max) +#endif + +#if defined(CPUARM) + bool isLogicalSwitchFunctionAvailable(int function); + bool isAssignableFunctionAvailable(int function); + bool isSwitchAvailable(int swtch); + bool isSwitchAvailableInLogicalSwitches(int swtch); #define AUTOSWITCH_ENTER_LONG() (attr && event==EVT_KEY_LONG(KEY_ENTER)) #define CHECK_INCDEC_MODELSWITCH(event, var, min, max) \ var = checkIncDec(event,var,min,max,EE_MODEL|INCDEC_SWITCH|NO_INCDEC_MARKS, isSwitchAvailable) @@ -204,8 +219,9 @@ int8_t checkIncDecGen(uint8_t event, int8_t i_val, int8_t i_min, int8_t i_max); #endif #if defined(CPUARM) - bool isSourceAvailable(int16_t source); - bool isInputSourceAvailable(int16_t source); + bool isSourceAvailable(int source); + bool isTelemetrySourceAvailable(int source); + bool isInputSourceAvailable(int source); #define CHECK_INCDEC_MODELSOURCE(event, var, min, max) \ var = checkIncDec(event,var,min,max,EE_MODEL|INCDEC_SOURCE|NO_INCDEC_MARKS, isSourceAvailable) #elif defined(AUTOSOURCE) @@ -223,7 +239,14 @@ int8_t checkIncDecGen(uint8_t event, int8_t i_val, int8_t i_min, int8_t i_max); #else #define NAVIGATION_LINE_BY_LINE 0 #endif -bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t menuTabSize, const pm_uint8_t *subTab, uint8_t subTabMax, vertpos_t maxrow); + +#if defined(PCBTARANIS) + #define CHECK_FLAG_NO_SCREEN_INDEX 1 + bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t menuTabSize, const pm_uint8_t *horTab, uint8_t horTabMax, vertpos_t maxrow, uint8_t flags=0); +#else + bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t menuTabSize, const pm_uint8_t *horTab, uint8_t horTabMax, vertpos_t maxrow); +#endif + bool check_simple(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t menuTabSize, vertpos_t maxrow); bool check_submenu_simple(check_event_t event, uint8_t maxrow); @@ -239,11 +262,19 @@ void title(const pm_char * s); #define MENU_CHECK(tab, menu, lines_count) \ check(event, menu, tab, DIM(tab), mstate_tab, DIM(mstate_tab)-1, (lines_count)-1) +#define MENU_CHECK_FLAGS(tab, menu, flags, lines_count) \ + check(event, menu, tab, DIM(tab), mstate_tab, DIM(mstate_tab)-1, (lines_count)-1, flags) + #define MENU(title, tab, menu, lines_count, ...) \ MENU_TAB(__VA_ARGS__); \ if (!MENU_CHECK(tab, menu, lines_count)) return; \ TITLE(title) +#define MENU_FLAGS(title, tab, menu, flags, lines_count, ...) \ + MENU_TAB(__VA_ARGS__); \ + if (!MENU_CHECK_FLAGS(tab, menu, flags, lines_count)) return; \ + TITLE(title) + #define SIMPLE_MENU_NOTITLE(tab, menu, lines_count) \ if (!check_simple(event,menu,tab,DIM(tab),(lines_count)-1)) return; @@ -369,6 +400,7 @@ void displayWarning(uint8_t event); #if defined(PCBTARANIS) void menuChannelsView(uint8_t event); void pushMenuTextView(const char *filename); +bool modelHasNotes(); #endif #define LABEL(...) (uint8_t)-1 @@ -400,7 +432,8 @@ void pushMenuTextView(const char *filename); #define REPEAT_LAST_CURSOR_MOVE() { if (EVT_KEY_MASK(event) >= 0x0e) putEvent(event); else m_posHorz = 0; } #define MOVE_CURSOR_FROM_HERE() if (m_posHorz > 0) REPEAT_LAST_CURSOR_MOVE() #else - #define REPEAT_LAST_CURSOR_MOVE() m_posHorz = 0; + void repeatLastCursorMove(uint8_t event); + #define REPEAT_LAST_CURSOR_MOVE() repeatLastCursorMove(event) #define MOVE_CURSOR_FROM_HERE() REPEAT_LAST_CURSOR_MOVE() #endif diff --git a/radio/src/gui/view_main.cpp b/radio/src/gui/view_main.cpp index 51465631d..4c373e18c 100644 --- a/radio/src/gui/view_main.cpp +++ b/radio/src/gui/view_main.cpp @@ -120,10 +120,12 @@ void drawPotsBars() { // Optimization by Mike Blandford - uint8_t x, y, len ; // declare temporary variables - for (x=LCD_W/2-5, y=NUM_STICKS; yNUM_STICKS+1 ? LCD_H/2+1 : 1); + if (i == POT3) { + continue; + } + xcoord_t x = ((i==POT1 || i==SLIDER1) ? 3 : LCD_W-5); + int8_t y = (i>=SLIDER1 ? LCD_H/2+1 : 1); lcd_vline(x, y, LCD_H/2-2); lcd_vline(x+1, y, LCD_H/2-2); y += LCD_H/2-4; @@ -268,9 +273,9 @@ void displayTopBar() } /* Altitude */ - if (g_model.frsky.altitudeDisplayed && frskyData.hub.baroAltitudeOffset) { + if (g_model.frsky.altitudeDisplayed && TELEMETRY_BARO_ALT_AVAILABLE()) { LCD_ICON(altitude_icon_x, BAR_Y, ICON_ALTITUDE); - putsTelemetryValue(altitude_icon_x+2*FW-1, BAR_Y+1, TELEMETRY_ALT_BP, UNIT_METERS, LEFT); + putsTelemetryValue(altitude_icon_x+2*FW-1, BAR_Y+1, TELEMETRY_RELATIVE_BARO_ALT_BP, UNIT_SPEED, LEFT); } } @@ -295,7 +300,7 @@ void displayTopBar() x -= 12; } - if (isFunctionActive(FUNC_LOGS)) { + if (isFunctionActive(FUNCTION_LOGS)) { LCD_NOTIF_ICON(x, ICON_LOGS); x -= 12; } @@ -318,7 +323,9 @@ void displayTopBar() /* RTC time */ struct gtm t; gettime(&t); - lcd_putcAtt(BAR_TIME_X-1, BAR_Y+1, ':', BLINK); + if (t.tm_sec % 2) { + lcd_putcAtt(BAR_TIME_X+1, BAR_Y+1, ':', 0); + } 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); @@ -343,7 +350,7 @@ void displayTimers() if (g_model.timers[0].mode) { TimerState & timerState = timersStates[0]; putsTime(TIMERS_X, TIMER1_Y, timerState.val, MIDSIZE|LEFT, MIDSIZE|LEFT); - putsTmrMode(TIMERS_X, TIMER1_Y-6, g_model.timers[0].mode, STRCONDENSED|SMLSIZE); + putsTimerMode(TIMERS_X, TIMER1_Y-6, g_model.timers[0].mode, SMLSIZE); if (g_model.timers[0].persistent) lcd_putcAtt(TIMERS_R, TIMER1_Y+1, 'P', SMLSIZE); if (timerState.val < 0) { if (BLINK_ON_PHASE) { @@ -356,7 +363,7 @@ void displayTimers() if (g_model.timers[1].mode) { TimerState & timerState = timersStates[1]; putsTime(TIMERS_X, TIMER2_Y, timerState.val, MIDSIZE|LEFT, MIDSIZE|LEFT); - putsTmrMode(TIMERS_X, TIMER2_Y-6, g_model.timers[1].mode, STRCONDENSED|SMLSIZE); + putsTimerMode(TIMERS_X, TIMER2_Y-6, g_model.timers[1].mode, SMLSIZE); if (g_model.timers[1].persistent) lcd_putcAtt(TIMERS_R, TIMER2_Y+1, 'P', SMLSIZE); if (timerState.val < 0) { if (BLINK_ON_PHASE) { @@ -373,7 +380,7 @@ void displayTimers() TimerState & timerState = timersStates[0]; uint8_t att = DBLSIZE | (timerState.val<0 ? BLINK|INVERS : 0); putsTime(12*FW+2+10*FWNUM-4, FH*2, timerState.val, att, att); - putsTmrMode(timerState.val >= 0 ? 9*FW-FW/2+3 : 9*FW-FW/2-4, FH*3, g_model.timers[0].mode, STRCONDENSED); + putsTimerMode(timerState.val >= 0 ? 9*FW-FW/2+3 : 9*FW-FW/2-4, FH*3, g_model.timers[0].mode); } } #endif @@ -404,7 +411,7 @@ void displayBattVoltage() void displayVoltageOrAlarm() { if (g_vbat100mV > g_eeGeneral.vBatWarn && g_eeGeneral.temperatureWarn && getTemperature() >= g_eeGeneral.temperatureWarn) { - putsTelemetryValue(6*FW-1, 3*FH, getTemperature(), UNIT_DEGREES, BLINK|INVERS|DBLSIZE); + putsTelemetryValue(6*FW-1, 3*FH, getTemperature(), UNIT_TEMPERATURE, BLINK|INVERS|DBLSIZE); } else if (g_vbat100mV > g_eeGeneral.vBatWarn && g_eeGeneral.mAhWarn && (g_eeGeneral.mAhUsed + Current_used * (488 + g_eeGeneral.currentCalib)/8192/36) / 500 >= g_eeGeneral.mAhWarn) { putsTelemetryValue(7*FW-1, 3*FH, (g_eeGeneral.mAhUsed + Current_used*(488 + g_eeGeneral.currentCalib)/8192/36)/10, UNIT_MAH, BLINK|INVERS|DBLSIZE); @@ -818,7 +825,7 @@ void menuMainView(uint8_t event) } else { // timer2 putsTime(33+FW+2+10*FWNUM-4, FH*5, timersStates[1].val, DBLSIZE, DBLSIZE); - putsTmrMode(timersStates[1].val >= 0 ? 20-FW/2+5 : 20-FW/2-2, FH*6, g_model.timers[1].mode, STRCONDENSED); + putsTimerMode(timersStates[1].val >= 0 ? 20-FW/2+5 : 20-FW/2-2, FH*6, g_model.timers[1].mode); // lcd_outdezNAtt(33+11*FW, FH*6, s_timerVal_10ms[1], LEADING0, 2); // 1/100s } #endif // PCBTARANIS diff --git a/radio/src/gui/view_statistics.cpp b/radio/src/gui/view_statistics.cpp index b352b85da..36c4d5b78 100644 --- a/radio/src/gui/view_statistics.cpp +++ b/radio/src/gui/view_statistics.cpp @@ -57,15 +57,13 @@ void menuStatisticsView(uint8_t event) return; } - lcd_puts( 1*FW, FH*1, STR_TM1TM2); + lcd_puts( 1*FW, FH*0, STR_TOTTM1TM2THRTHP); putsTime( 5*FW+5*FWNUM+1, FH*1, timersStates[0].val, 0, 0); putsTime( 12*FW+5*FWNUM+1, FH*1, timersStates[1].val, 0, 0); - lcd_puts( 1*FW, FH*2, STR_THRTHP); putsTime( 5*FW+5*FWNUM+1, FH*2, s_timeCumThr, 0, 0); putsTime( 12*FW+5*FWNUM+1, FH*2, s_timeCum16ThrP/16, 0, 0); - lcd_puts( 17*FW, FH*0, STR_TOT); putsTime( 12*FW+5*FWNUM+1, FH*0, s_timeCumTot, 0, 0); #if defined(PCBTARANIS) @@ -154,8 +152,8 @@ void menuStatisticsDebug(uint8_t event) #if defined(PCBSKY9X) lcd_putsLeft(3*FH, STR_CPU_TEMP); - putsTelemetryValue(MENU_DEBUG_COL_OFS, 3*FH, getTemperature(), UNIT_DEGREES, 0); - putsTelemetryValue(20*FW+2, 3*FH, maxTemperature+g_eeGeneral.temperatureCalib, UNIT_DEGREES, 0); + putsTelemetryValue(MENU_DEBUG_COL_OFS, 3*FH, getTemperature(), UNIT_TEMPERATURE, 0); + putsTelemetryValue(20*FW+2, 3*FH, maxTemperature+g_eeGeneral.temperatureCalib, UNIT_TEMPERATURE, 0); #endif #if defined(PCBSKY9X) @@ -171,8 +169,8 @@ void menuStatisticsDebug(uint8_t event) lcd_putsAtt(9*FW+2, 4*FH, PSTR("Upgr.TinyApp"),INVERS); } else { - putsTelemetryValue(MENU_DEBUG_COL_OFS, 4*FH, Coproc_temp, UNIT_DEGREES, 0); - putsTelemetryValue(20*FW+2, 4*FH, Coproc_maxtemp, UNIT_DEGREES, 0); + putsTelemetryValue(MENU_DEBUG_COL_OFS, 4*FH, Coproc_temp, UNIT_TEMPERATURE, 0); + putsTelemetryValue(20*FW+2, 4*FH, Coproc_maxtemp, UNIT_TEMPERATURE, 0); } #elif defined(PCBTARANIS) && !defined(SIMU) lcd_putsLeft(4*FH, "Free Mem"); diff --git a/radio/src/gui/view_telemetry.cpp b/radio/src/gui/view_telemetry.cpp index ff06cd142..bc6faba85 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) { @@ -379,7 +379,7 @@ void menuTelemetryFrsky(uint8_t event) #else uint8_t attr = PREC2; #endif - lcd_outdezNAtt(LCD_W, y, frskyData.hub.cellVolts[k] * 2, attr, 4); + lcd_outdezNAtt(LCD_W, y, TELEMETRY_CELL_VOLTAGE(k), attr, 4); y += 1*FH; } lcd_vline(LCD_W-3*FW-2, 8, 47); diff --git a/radio/src/lcd.cpp b/radio/src/lcd.cpp index b8702878d..0bfd78820 100644 --- a/radio/src/lcd.cpp +++ b/radio/src/lcd.cpp @@ -64,7 +64,8 @@ void lcd_img(xcoord_t x, uint8_t y, const pm_uchar * img, uint8_t idx, LcdFlags for (uint8_t yb = 0; yb < hb; yb++) { uint8_t *p = &displayBuf[ (y / 8 + yb) * LCD_W + x ]; for (xcoord_t i=0; i=',' && c<=':') c_remapped = c - ',' + 1; @@ -122,23 +131,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,26 +172,35 @@ 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; } - uint8_t ym8 = (y & 0x07); + const uint8_t ym8 = (y & 0x07); if (&p[LCD_W+1] < DISPLAY_END) { LCD_BYTE_FILTER(p, ~(0xff << ym8), b1 << ym8); uint8_t *r = p + LCD_W; @@ -183,15 +215,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]; - uint8_t ym8 = (y & 0x07); - p += 4; - for (int8_t i=4; i>=0; i--) { - uint8_t b = pgm_read_byte(q--); + q = (c < 0xC0) ? &font_4x6[(c-0x20)*5] : &font_4x6_extra[(c-0xC0)*5]; + const uint8_t ym8 = (y & 0x07); + 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]; - 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); + q = &font_3x5[((uint16_t)c-0x2D)*3]; + const uint8_t ym8 = (y & 0x07); + 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; + const uint8_t ym8 = (y & 0x07); +#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]; } - - uint8_t ym8 = (y & 0x07); - p += 5; - for (uint8_t i=6, b=0; i>0; i--, b=pgm_read_byte(q--)) { +#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,7 +361,9 @@ 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) { - while(len!=0) { + xcoord_t orig_x = x; + bool setx = false; + while(len--) { unsigned char c; switch (mode & (BSS+ZCHAR)) { case BSS: @@ -301,29 +376,40 @@ 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 + + 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 += FW; - if (c == '|') x -= 4; - if (mode&DBLSIZE) x += FW-1; - else if (mode&MIDSIZE) x += FW-3; - else if (mode&SMLSIZE) x -= 1; + x = lcdNextPos; + } + else if (setx) { + x = c; + setx = false; + } + else if (c == 0x1F) { //X-coord prefix + setx = true; + } + else if (c == 0x1E) { //NEWLINE + x = orig_x; + y += FH; +#if defined(CPUARM) + if (mode & DBLSIZE) y += FH; + else if (mode & MIDSIZE) y += 4; + else if (mode & SMLSIZE) y--; +#endif + if (y >= LCD_H) break; } 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 +438,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 +463,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 +495,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 +522,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 +531,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 +539,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 +561,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 +570,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 +590,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); } @@ -581,7 +669,7 @@ void lcd_hlineStip(xcoord_t x, uint8_t y, xcoord_t w, uint8_t pat, LcdFlags att) uint8_t *p = &displayBuf[ y / 8 * LCD_W + x ]; uint8_t msk = BITMASK(y%8); - while(w) { + while(w--) { if(pat&1) { lcd_mask(p, msk, att); pat = (pat >> 1) | 0x80; @@ -589,7 +677,6 @@ void lcd_hlineStip(xcoord_t x, uint8_t y, xcoord_t w, uint8_t pat, LcdFlags att) else { pat = pat >> 1; } - w--; p++; } } @@ -772,15 +859,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 +900,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 +924,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 +943,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 +954,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); @@ -988,38 +1040,6 @@ void putsSwitches(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att) lcd_vlineStip(x-2, y, 8, 0x5E/*'!'*/); idx = -idx; } - -#if ROTARY_ENCODERS > 0 - 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); - } -#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); -#if ROTARY_ENCODERS > 0 - if (idx >= 2) { - idx -= 2; - return lcd_putsiAtt(x, y, STR_VRENCODERS, idx/2, att); - } - else -#endif - { - return lcd_putsiAtt(x, y, STR_VSWITCHES, SWSRC_TRAINER-1, 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); - } lcd_putsiAtt(x, y, STR_VSWITCHES, idx-1, att); } @@ -1086,27 +1106,39 @@ void putsCurve(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att) } #endif -void putsTmrMode(xcoord_t x, uint8_t y, int8_t mode, LcdFlags att) +void putsTimerMode(xcoord_t x, uint8_t y, int8_t mode, LcdFlags att) { - if (mode < 0) { - mode = TMR_VAROFS - mode - 1; - lcd_putcAtt(x-1*FW, y, '!', att); + if (mode >= 0) { + if (mode < TMR_VAROFS) + return lcd_putsiAtt(x, y, STR_VTMRMODES, mode, att); + else + mode -= (TMR_VAROFS-1); } - else if (mode < TMR_VAROFS) { - lcd_putsiAtt(x, y, STR_VTMRMODES, mode, att); - return; - } - - if (mode >= TMR_VAROFS+MAX_PSWITCH+NUM_CSW) { - mode++; - } - - putsSwitches(x, y, mode-(TMR_VAROFS-1), att); + putsSwitches(x, y, mode, att); } +#if defined(PCBTARANIS) void putsTrimMode(xcoord_t x, uint8_t y, uint8_t phase, uint8_t idx, LcdFlags att) { - int16_t v = getRawTrimValue(phase, idx); + trim_t v = getRawTrimValue(phase, idx); + unsigned int mode = v.mode; + unsigned int p = mode >> 1; + + if (mode == TRIM_MODE_NONE) { + lcd_putsAtt(x, y, "--", att); + } + else { + if (mode % 2 == 0) + lcd_putcAtt(x, y, ':', att|FIXEDWIDTH); + else + lcd_putcAtt(x, y, '+', att|FIXEDWIDTH); + lcd_putcAtt(lcdNextPos, y, '0'+p, att); + } +} +#else +void putsTrimMode(xcoord_t x, uint8_t y, uint8_t phase, uint8_t idx, LcdFlags att) +{ + trim_t v = getRawTrimValue(phase, idx); if (v > TRIM_EXTENDED_MAX) { uint8_t p = v - TRIM_EXTENDED_MAX - 1; @@ -1117,6 +1149,7 @@ void putsTrimMode(xcoord_t x, uint8_t y, uint8_t phase, uint8_t idx, LcdFlags at putsChnLetter(x, y, idx+1, att); } } +#endif #if ROTARY_ENCODERS > 0 void putsRotaryEncoderMode(xcoord_t x, uint8_t y, uint8_t phase, uint8_t idx, LcdFlags att) @@ -1147,19 +1180,20 @@ void putsTelemetryValue(xcoord_t x, uint8_t y, lcdint_t val, uint8_t unit, uint8 { convertUnit(val, unit); lcd_outdezAtt(x, y, val, att & (~NO_UNIT)); - if (!(att & NO_UNIT) && unit != UNIT_RAW) + if (!(att & NO_UNIT) && unit != UNIT_RAW) { lcd_putsiAtt(lcdLastPos/*+1*/, y, STR_VTELEMUNIT, unit, 0); + } } const pm_uint8_t bchunit_ar[] PROGMEM = { - UNIT_METERS, // Alt + UNIT_DIST, // Alt UNIT_RAW, // Rpm UNIT_PERCENT, // Fuel - UNIT_DEGREES, // T1 - UNIT_DEGREES, // T2 + UNIT_TEMPERATURE, // T1 + UNIT_TEMPERATURE, // T2 UNIT_KTS, // Speed - UNIT_METERS, // Dist - UNIT_METERS, // GPS Alt + UNIT_DIST, // Dist + UNIT_DIST, // GPS Alt }; void putsTelemetryChannel(xcoord_t x, uint8_t y, uint8_t channel, lcdint_t val, uint8_t att) @@ -1203,12 +1237,15 @@ void putsTelemetryChannel(xcoord_t x, uint8_t y, uint8_t channel, lcdint_t val, #endif case TELEM_CELL-1: + case TELEM_MIN_CELL-1: putsTelemetryValue(x, y, val, UNIT_VOLTS, att|PREC2); break; case TELEM_TX_VOLTAGE-1: case TELEM_VFAS-1: case TELEM_CELLS_SUM-1: + case TELEM_MIN_CELLS_SUM-1: + case TELEM_MIN_VFAS-1: putsTelemetryValue(x, y, val, UNIT_VOLTS, att|PREC1); break; @@ -1230,9 +1267,13 @@ void putsTelemetryChannel(xcoord_t x, uint8_t y, uint8_t channel, lcdint_t val, case TELEM_ACCy-1: case TELEM_ACCz-1: case TELEM_VSPD-1: + case TELEM_ASPD-1: putsTelemetryValue(x, y, val, UNIT_RAW, att|PREC2); break; +#if defined(CPUARM) + case TELEM_SWR-1: +#endif case TELEM_RSSI_TX-1: case TELEM_RSSI_RX-1: putsTelemetryValue(x, y, val, UNIT_RAW, att); @@ -1240,7 +1281,7 @@ void putsTelemetryChannel(xcoord_t x, uint8_t y, uint8_t channel, lcdint_t val, #if defined(FRSKY_SPORT) case TELEM_ALT-1: - putsTelemetryValue(x, y, val/10, UNIT_METERS, att|PREC1); + putsTelemetryValue(x, y, val/10, UNIT_DIST, att|PREC1); break; #elif defined(WS_HOW_HIGH) case TELEM_ALT-1: @@ -1263,7 +1304,7 @@ void putsTelemetryChannel(xcoord_t x, uint8_t y, uint8_t channel, lcdint_t val, if (channel >= TELEM_MIN_ALT-1 && channel <= TELEM_MAX_ALT-1) unit = 0; if (channel == TELEM_HDG-1) - unit = 3; + unit = UNIT_HDG; putsTelemetryValue(x, y, val, pgm_read_byte(bchunit_ar+unit), att); break; } diff --git a/radio/src/lcd.h b/radio/src/lcd.h index 52a9ae8ce..5becc5c57 100644 --- a/radio/src/lcd.h +++ b/radio/src/lcd.h @@ -78,12 +78,11 @@ /* 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 ZCHAR 0x80 /* lcd outdez flags */ @@ -139,6 +138,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 ; @@ -173,7 +173,7 @@ void putsFlightPhase(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att=0); void putsCurveRef(xcoord_t x, uint8_t y, CurveRef &curve, LcdFlags att); #endif void putsCurve(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att=0); -void putsTmrMode(xcoord_t x, uint8_t y, int8_t mode, LcdFlags att); +void putsTimerMode(xcoord_t x, uint8_t y, int8_t mode, LcdFlags att=0); void putsTrimMode(xcoord_t x, uint8_t y, uint8_t phase, uint8_t idx, LcdFlags att); #if defined(ROTARY_ENCODERS) void putsRotaryEncoderMode(xcoord_t x, uint8_t y, uint8_t phase, uint8_t idx, LcdFlags att); @@ -198,6 +198,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 +227,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/logs.cpp b/radio/src/logs.cpp index 58c47eacc..99ad03d98 100644 --- a/radio/src/logs.cpp +++ b/radio/src/logs.cpp @@ -137,19 +137,25 @@ const pm_char * openLogs() #endif #if defined(FRSKY_HUB) - if (IS_USR_PROTO_FRSKY_HUB()) - f_puts("GPS Date,GPS Time,Long,Lat,Course,GPS Speed,GPS Alt,Baro Alt,Vertical Speed,Temp1,Temp2,RPM,Fuel,Cell volts,Cell 1,Cell 2,Cell 3,Cell 4,Cell 5,Cell 6,Current,Consumption,Vfas,AccelX,AccelY,AccelZ,", &g_oLogFile); + if (IS_USR_PROTO_FRSKY_HUB()) { + f_puts("GPS Date,GPS Time,Long,Lat,Course,GPS Speed(", &g_oLogFile); + f_puts(TELEMETRY_GPS_SPEED_UNIT, &g_oLogFile); + f_puts("),GPS Alt,Baro Alt(", &g_oLogFile); + f_puts(TELEMETRY_BARO_ALT_UNIT, &g_oLogFile); + f_puts("),Vertical Speed,Temp1,Temp2,RPM,Fuel,Cell volts,Cell 1,Cell 2,Cell 3,Cell 4,Cell 5,Cell 6,Current,Consumption,Vfas,AccelX,AccelY,AccelZ,", &g_oLogFile); + } #endif #if defined(WS_HOW_HIGH) - if (IS_USR_PROTO_WS_HOW_HIGH()) + if (IS_USR_PROTO_WS_HOW_HIGH()) { f_puts("WSHH Alt,", &g_oLogFile); + } #endif #if defined(PCBTARANIS) - f_puts("Rud,Ele,Thr,Ail,S1,S2,LS,RS,SA,SB,SC,SD,SE,SF,SG,SH\n", &g_oLogFile); + f_puts("Rud,Ele,Thr,Ail,S1,S2,S3,LS,RS,SA,SB,SC,SD,SE,SF,SG,SH\n", &g_oLogFile); #else - f_puts("Rud,Ele,Thr,Ail,P1,P2,P3,THR,RUD,ELE,ID0,ID1,ID2,AIL,GEA,TRN\n", &g_oLogFile); + f_puts("Rud,Ele,Thr,Ail,P1,P2,P3,THR,RUD,ELE,3POS,AIL,GEA,TRN\n", &g_oLogFile); #endif } else { @@ -170,12 +176,18 @@ void closeLogs() lastLogTime = 0; } +getvalue_t getConvertedTelemetryValue(getvalue_t val, uint8_t unit) +{ + convertUnit(val, unit); + return val; +} + // TODO test when disk full void writeLogs() { static const pm_char * error_displayed = NULL; - if (isFunctionActive(FUNC_LOGS) && logDelay > 0) { + if (isFunctionActive(FUNCTION_LOGS) && logDelay > 0) { tmr10ms_t tmr10ms = get_tmr10ms(); if (lastLogTime == 0 || (tmr10ms_t)(tmr10ms - lastLogTime) >= (tmr10ms_t)logDelay*10) { lastLogTime = tmr10ms; @@ -213,8 +225,10 @@ void writeLogs() #endif #if defined(FRSKY_HUB) + TELEMETRY_BARO_ALT_PREPARE(); + if (IS_USR_PROTO_FRSKY_HUB()) { - f_printf(&g_oLogFile, "%4d-%02d-%02d,%02d:%02d:%02d,%03d.%04d%c,%03d.%04d%c,%03d.%02d,%d.%02d,%d.%02d," TELEMETRY_ALT_FORMAT TELEMETRY_VSPEED_FORMAT "%d,%d,%d,%d," TELEMETRY_CELLS_FORMAT TELEMETRY_CURRENT_FORMAT "%d," TELEMETRY_VFAS_FORMAT "%d,%d,%d,", + f_printf(&g_oLogFile, "%4d-%02d-%02d,%02d:%02d:%02d,%03d.%04d%c,%03d.%04d%c,%03d.%02d," TELEMETRY_GPS_SPEED_FORMAT TELEMETRY_GPS_ALT_FORMAT TELEMETRY_BARO_ALT_FORMAT TELEMETRY_VSPEED_FORMAT "%d,%d,%d,%d," TELEMETRY_CELLS_FORMAT TELEMETRY_CURRENT_FORMAT "%d," TELEMETRY_VFAS_FORMAT "%d,%d,%d,", frskyData.hub.year+2000, frskyData.hub.month, frskyData.hub.day, @@ -229,20 +243,18 @@ void writeLogs() frskyData.hub.gpsLatitudeNS ? frskyData.hub.gpsLatitudeNS : '-', frskyData.hub.gpsCourse_bp, frskyData.hub.gpsCourse_ap, - TELEMETRY_GPS_SPEED_BP, - TELEMETRY_GPS_SPEED_AP, - TELEMETRY_GPS_ALT_BP, - TELEMETRY_GPS_ALT_AP, - TELEMETRY_ALT, - TELEMETRY_VSPEED, + TELEMETRY_GPS_SPEED_ARGS + TELEMETRY_GPS_ALT_ARGS + TELEMETRY_BARO_ALT_ARGS + TELEMETRY_VSPEED_ARGS frskyData.hub.temperature1, frskyData.hub.temperature2, frskyData.hub.rpm, frskyData.hub.fuelLevel, - TELEMETRY_CELLS, - TELEMETRY_CURRENT, + TELEMETRY_CELLS_ARGS + TELEMETRY_CURRENT_ARGS frskyData.hub.currentConsumption, - TELEMETRY_VFAS, + TELEMETRY_VFAS_ARGS frskyData.hub.accelX, frskyData.hub.accelY, frskyData.hub.accelZ); @@ -251,7 +263,7 @@ void writeLogs() #if defined(WS_HOW_HIGH) if (IS_USR_PROTO_WS_HOW_HIGH()) { - f_printf(&g_oLogFile, "%d,", TELEMETRY_ALT_BP); + f_printf(&g_oLogFile, "%d,", TELEMETRY_RELATIVE_BARO_ALT_BP); } #endif diff --git a/radio/src/lua.cpp b/radio/src/lua.cpp new file mode 100644 index 000000000..1a2ab9e1a --- /dev/null +++ b/radio/src/lua.cpp @@ -0,0 +1,1124 @@ +/* + * Authors (alphabetical order) + * - Andre Bernet + * - Andreas Weitl + * - Bertrand Songis + * - Bryan J. Rentoul (Gruvin) + * - Cameron Weeks + * - Erez Raviv + * - Gabriel Birkus + * - Jean-Pierre Parisy + * - Karl Szmutny + * - Michael Blandford + * - Michal Hlavinka + * - Pat Mackenzie + * - Philip Moss + * - Rob Thomson + * - Romolo Manfredini + * - Thomas Husterer + * + * opentx is based on code named + * gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/, + * er9x by Erez Raviv: http://code.google.com/p/er9x/, + * and the original (and ongoing) project by + * Thomas Husterer, th9x: http://code.google.com/p/th9x/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include "opentx.h" +#include "stamp-opentx.h" + +#if !defined(SIMU) +extern "C" { +#endif + #include + #include + #include +#if !defined(SIMU) +} +#endif + +#define lua_registerint(L, n, i) (lua_pushinteger(L, (i)), lua_setglobal(L, (n))) +#define lua_pushtablenil(L, k) (lua_pushstring(L, (k)), lua_pushnil(L), lua_settable(L, -3)) +#define lua_pushtableboolean(L, k, v) (lua_pushstring(L, (k)), lua_pushboolean(L, (v)), lua_settable(L, -3)) +#define lua_pushtablenumber(L, k, v) (lua_pushstring(L, (k)), lua_pushinteger(L, (v)), lua_settable(L, -3)) +#define lua_pushtablestring(L, k, v) (lua_pushstring(L, (k)), lua_pushstring(L, (v)), lua_settable(L, -3)) +#define lua_pushtablezstring(L, k, v) { char _zz[sizeof(v)+1]; zchar2str(_zz, (v), sizeof(v)); lua_pushstring(L, (k)); lua_pushstring(L, _zz); lua_settable(L, -3); } +#define lua_registerlib(L, name, tab) (luaL_newmetatable(L, name), luaL_setfuncs(L, tab, 0), lua_setglobal(L, name)) + +lua_State *L = NULL; +uint8_t luaState = 0; +ScriptInternalData scriptInternalData[MAX_SCRIPTS] = { { SCRIPT_NOFILE, 0 } }; +ScriptInternalData standaloneScript = { SCRIPT_NOFILE, 0 }; + +#define PERMANENT_SCRIPTS_MAX_INSTRUCTIONS (1000/100) +#define MANUAL_SCRIPTS_MAX_INSTRUCTIONS (10000/100) +#define SCRIPTS_MAX_HEAP 50 +#define SET_LUA_INSTRUCTIONS_COUNT(x) (instructionsPercent=0, lua_sethook(L, hook, LUA_MASKCOUNT, x)) + +static int instructionsPercent = 0; +void hook(lua_State* L, lua_Debug *ar) +{ + instructionsPercent++; + if (instructionsPercent > 100) { + // From now on, as soon as a line is executed, error + // keep erroring until you're script reaches the top + lua_sethook(L, hook, LUA_MASKLINE, 0); + luaL_error(L, ""); + } +} + +static int luaGetVersion(lua_State *L) +{ + lua_pushnumber(L, VERS_NUM); + return 1; +} + +static int luaGetTime(lua_State *L) +{ + lua_pushunsigned(L, get_tmr10ms()); + return 1; +} + +static int luaGetValue(lua_State *L) +{ + if (lua_isnumber(L, 1)) { + int src = luaL_checkinteger(L, 1); + lua_pushinteger(L, getValue(src)); + return 1; + } + else { + const char *what = luaL_checkstring(L, 1); + if (!strcmp(what, "altitude")) { + lua_pushnumber(L, double(frskyData.hub.baroAltitude)/100); + return 1; + } + else if (!strcmp(what, "latitude")) { + if (frskyData.hub.gpsFix) + lua_pushnumber(L, gpsToDouble(frskyData.hub.gpsLatitudeNS=='S', frskyData.hub.gpsLatitude_bp, frskyData.hub.gpsLatitude_ap)); + else + lua_pushnil(L); + return 1; + } + else if (!strcmp(what, "longitude")) { + if (frskyData.hub.gpsFix) + lua_pushnumber(L, gpsToDouble(frskyData.hub.gpsLongitudeEW=='W', frskyData.hub.gpsLongitude_bp, frskyData.hub.gpsLongitude_ap)); + else + lua_pushnil(L); + return 1; + } + else if (!strcmp(what, "pilot latitude")) { + if (frskyData.hub.gpsFix) + lua_pushnumber(L, pilotLatitude); + else + lua_pushnil(L); + return 1; + } + else if (!strcmp(what, "pilot longitude")) { + if (frskyData.hub.gpsFix) + lua_pushnumber(L, pilotLongitude); + else + lua_pushnil(L); + return 1; + } + } + + return 0; +} + +static int luaPlayFile(lua_State *L) +{ + const char * filename = luaL_checkstring(L, 1); + PLAY_FILE(filename, 0, 0); + return 0; +} + +static int luaLcdLock(lua_State *L) +{ + lcd_locked = true; + return 0; +} + +static int luaLcdClear(lua_State *L) +{ + lcd_clear(); + return 0; +} + +static int luaLcdDrawPoint(lua_State *L) +{ + int x = luaL_checkinteger(L, 1); + int y = luaL_checkinteger(L, 2); + lcd_plot(x, y); + return 0; +} + +static int luaLcdDrawLine(lua_State *L) +{ + int x1 = luaL_checkinteger(L, 1); + int y1 = luaL_checkinteger(L, 2); + int x2 = luaL_checkinteger(L, 3); + int y2 = luaL_checkinteger(L, 4); + lcd_line(x1, y1, x2, y2); + return 0; +} + +static int luaLcdDrawRectangle(lua_State *L) +{ + int x = luaL_checkinteger(L, 1); + int y = luaL_checkinteger(L, 2); + int w = luaL_checkinteger(L, 3); + int h = luaL_checkinteger(L, 4); + lcd_rect(x, y, w, h, 0xff, 0); + return 0; +} + +static int luaLcdDrawText(lua_State *L) +{ + int x = luaL_checkinteger(L, 1); + int y = luaL_checkinteger(L, 2); + const char * s = luaL_checkstring(L, 3); + int att = luaL_checkinteger(L, 4); + lcd_putsAtt(x, y, s, att); + return 0; +} + +static int luaLcdDrawSwitch(lua_State *L) +{ + int x = luaL_checkinteger(L, 1); + int y = luaL_checkinteger(L, 2); + int s = luaL_checkinteger(L, 3); + int att = luaL_checkinteger(L, 4); + putsSwitches(x, y, s, att); + return 0; +} + +static int luaLcdDrawPixmap(lua_State *L) +{ + int x = luaL_checkinteger(L, 1); + int y = luaL_checkinteger(L, 2); + const char * filename = luaL_checkstring(L, 3); + // TODO int att = luaL_checkinteger(L, 4); + bmp_ptr_t bitmap = 0; + const pm_char * error = bmpLoad(bitmap, filename, LCD_W, LCD_H); + if (bitmap && !error) { + lcd_bmp(x, y, bitmap); + // free(bitmap); + } + return 0; +} + +static int luaLcdDrawScreenTitle(lua_State *L) +{ + const char * str = luaL_checkstring(L, 1); + int idx = luaL_checkinteger(L, 2); + int cnt = luaL_checkinteger(L, 3); + + displayScreenIndex(idx-1, cnt, 0); + lcd_filled_rect(0, 0, LCD_W, FH, SOLID, FILL_WHITE|GREY_DEFAULT); + title(str); + + return 0; +} + +static int luaModelGetTimer(lua_State *L) +{ + int idx = luaL_checkunsigned(L, 1); + if (idx < MAX_TIMERS) { + TimerData & timer = g_model.timers[idx]; + lua_newtable(L); + lua_pushtablenumber(L, "mode", timer.mode); + lua_pushtablenumber(L, "start", timer.start); + lua_pushtablenumber(L, "value", timersStates[idx].val); + lua_pushtablenumber(L, "countdownBeep", timer.countdownBeep); + lua_pushtableboolean(L, "minuteBeep", timer.minuteBeep); + lua_pushtableboolean(L, "persistent", timer.persistent); + } + else { + lua_pushnil(L); + } + return 1; +} + +static int luaModelSetTimer(lua_State *L) +{ + int idx = luaL_checkunsigned(L, 1); + + if (idx < MAX_TIMERS) { + TimerData & timer = g_model.timers[idx]; + luaL_checktype(L, -1, LUA_TTABLE); + for (lua_pushnil(L); lua_next(L, -2); lua_pop(L, 1)) { + luaL_checktype(L, -2, LUA_TSTRING); // key is string + const char * key = luaL_checkstring(L, -2); + if (!strcmp(key, "mode")) { + timer.mode = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "start")) { + timer.start = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "value")) { + timersStates[idx].val = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "countdownBeep")) { + timer.countdownBeep = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "minuteBeep")) { + timer.minuteBeep = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "persistent")) { + timer.persistent = luaL_checkinteger(L, -1); + } + } + eeDirty(EE_MODEL); + } + return 0; +} + +static int getFirstInput(int chn) +{ + for (int i=0; isrcRaw || expo->chn>chn) break; + if (expo->chn == chn) { + return i; + } + } + return -1; +} + +static int getInputsCountFromFirst(int chn, int first) +{ + int count = 0; + if (first >= 0) { + for (int i=first; isrcRaw || expo->chn!=chn) break; + count++; + } + } + return count; +} + +static int getInputsCount(int chn) +{ + int first = getFirstInput(chn); + return getInputsCountFromFirst(chn, first); +} + +static int luaModelGetInputsCount(lua_State *L) +{ + int chn = luaL_checkunsigned(L, 1); + int count = getInputsCount(chn); + lua_pushinteger(L, count); + return 1; +} + +static int luaModelGetInput(lua_State *L) +{ + int chn = luaL_checkunsigned(L, 1); + int idx = luaL_checkunsigned(L, 2); + int first = getFirstInput(chn); + int count = getInputsCountFromFirst(chn, first); + if (first>=0 && idxname); + lua_pushtablenumber(L, "source", expo->srcRaw); + lua_pushtablenumber(L, "weight", expo->weight); + lua_pushtablenumber(L, "offset", expo->offset); + } + else { + lua_pushnil(L); + } + return 1; +} + +static int luaModelInsertInput(lua_State *L) +{ + int chn = luaL_checkunsigned(L, 1); + int idx = luaL_checkunsigned(L, 2); + + int first = getFirstInput(chn); + int count = getInputsCountFromFirst(chn, first); + + if (chnname, name, sizeof(expo->name)); + } + else if (!strcmp(key, "source")) { + expo->srcRaw = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "weight")) { + expo->weight = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "offset")) { + expo->offset = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "switch")) { + expo->swtch = luaL_checkinteger(L, -1); + } + } + } + + return 0; +} + +static int luaModelDeleteInput(lua_State *L) +{ + int chn = luaL_checkunsigned(L, 1); + int idx = luaL_checkunsigned(L, 2); + + int first = getFirstInput(chn); + int count = getInputsCountFromFirst(chn, first); + + if (first>=0 && idxsrcRaw || mix->destCh>chn) break; + if (mix->destCh == chn) { + return i; + } + } + return -1; +} + +static int getMixesCountFromFirst(int chn, int first) +{ + int count = 0; + if (first >= 0) { + for (int i=first; isrcRaw || mix->destCh!=chn) break; + count++; + } + } + return count; +} + +static int getMixesCount(int chn) +{ + int first = getFirstMix(chn); + return getMixesCountFromFirst(chn, first); +} + +static int luaModelGetMixesCount(lua_State *L) +{ + int chn = luaL_checkunsigned(L, 1); + int count = getMixesCount(chn); + lua_pushinteger(L, count); + return 1; +} + +static int luaModelGetMix(lua_State *L) +{ + int chn = luaL_checkunsigned(L, 1); + int idx = luaL_checkunsigned(L, 2); + int first = getFirstMix(chn); + int count = getMixesCountFromFirst(chn, first); + if (first>=0 && idxname); + lua_pushtablenumber(L, "source", mix->srcRaw); + lua_pushtablenumber(L, "weight", mix->weight); + lua_pushtablenumber(L, "offset", mix->offset); + lua_pushtablenumber(L, "switch", mix->swtch); + lua_pushtablenumber(L, "multiplex", mix->mltpx); + } + else { + lua_pushnil(L); + } + return 1; +} + +static int luaModelInsertMix(lua_State *L) +{ + int chn = luaL_checkunsigned(L, 1); + int idx = luaL_checkunsigned(L, 2); + + int first = getFirstMix(chn); + int count = getMixesCountFromFirst(chn, first); + + if (chnname, name, sizeof(mix->name)); + } + else if (!strcmp(key, "source")) { + mix->srcRaw = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "weight")) { + mix->weight = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "offset")) { + mix->offset = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "switch")) { + mix->swtch = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "multiplex")) { + mix->mltpx = luaL_checkinteger(L, -1); + } + } + } + + return 0; +} + +static int luaModelDeleteMix(lua_State *L) +{ + int chn = luaL_checkunsigned(L, 1); + int idx = luaL_checkunsigned(L, 2); + + int first = getFirstMix(chn); + int count = getMixesCountFromFirst(chn, first); + + if (first>=0 && idxfunc); + lua_pushtablenumber(L, "v1", sw->v1); + lua_pushtablenumber(L, "v2", sw->v2); + lua_pushtablenumber(L, "v3", sw->v3); + lua_pushtablenumber(L, "and", sw->andsw); + lua_pushtablenumber(L, "delay", sw->delay); + lua_pushtablenumber(L, "duration", sw->duration); + } + else { + lua_pushnil(L); + } + return 1; +} + +static int luaModelSetLogicalSwitch(lua_State *L) +{ + int idx = luaL_checkunsigned(L, 1); + if (idx < NUM_CSW) { + LogicalSwitchData * sw = cswAddress(idx); + luaL_checktype(L, -1, LUA_TTABLE); + for (lua_pushnil(L); lua_next(L, -2); lua_pop(L, 1)) { + luaL_checktype(L, -2, LUA_TSTRING); // key is string + const char * key = luaL_checkstring(L, -2); + if (!strcmp(key, "function")) { + sw->func = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "v1")) { + sw->v1 = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "v2")) { + sw->v2 = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "v3")) { + sw->v3 = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "and")) { + sw->andsw = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "delay")) { + sw->delay = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "duration")) { + sw->duration = luaL_checkinteger(L, -1); + } + } + } + + return 0; +} + +static int luaModelGetCustomFunction(lua_State *L) +{ + int idx = luaL_checkunsigned(L, 1); + if (idx < NUM_CFN) { + CustomFnData * cfn = &g_model.funcSw[idx]; + lua_newtable(L); + lua_pushtablenumber(L, "switch", CFN_SWITCH(cfn)); + lua_pushtablenumber(L, "function", CFN_FUNC(cfn)); + lua_pushtablezstring(L, "name", cfn->play.name); + lua_pushtablenumber(L, "value", cfn->all.val); + lua_pushtablenumber(L, "mode", cfn->all.mode); + lua_pushtablenumber(L, "active", CFN_ACTIVE(cfn)); + } + else { + lua_pushnil(L); + } + return 1; +} + +static int luaModelSetCustomFunction(lua_State *L) +{ + int idx = luaL_checkunsigned(L, 1); + if (idx < NUM_CFN) { + CustomFnData * cfn = &g_model.funcSw[idx]; + luaL_checktype(L, -1, LUA_TTABLE); + for (lua_pushnil(L); lua_next(L, -2); lua_pop(L, 1)) { + luaL_checktype(L, -2, LUA_TSTRING); // key is string + const char * key = luaL_checkstring(L, -2); + if (!strcmp(key, "switch")) { + CFN_SWITCH(cfn) = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "function")) { + CFN_FUNC(cfn) = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "name")) { + const char * name = luaL_checkstring(L, -1); + str2zchar(cfn->play.name, name, sizeof(cfn->play.name)); + } + else if (!strcmp(key, "value")) { + cfn->all.val = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "mode")) { + cfn->all.mode = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "active")) { + CFN_ACTIVE(cfn) = luaL_checkinteger(L, -1); + } + } + } + + return 0; +} + +static int luaModelGetOutput(lua_State *L) +{ + int idx = luaL_checkunsigned(L, 1); + if (idx < NUM_CHNOUT) { + LimitData * limit = limitAddress(idx); + lua_newtable(L); + lua_pushtablezstring(L, "name", limit->name); + lua_pushtablenumber(L, "min", limit->min); + lua_pushtablenumber(L, "max", limit->min); + lua_pushtablenumber(L, "offset", limit->offset); + lua_pushtablenumber(L, "ppmCenter", limit->ppmCenter); + lua_pushtableboolean(L, "symetrical", limit->symetrical); + lua_pushtableboolean(L, "revert", limit->revert); + if (limit->curve) + lua_pushtablenil(L, "curve"); + else + lua_pushtablenumber(L, "curve", limit->curve-1); + } + else { + lua_pushnil(L); + } + return 1; +} + +static int luaModelSetOutput(lua_State *L) +{ + int idx = luaL_checkunsigned(L, 1); + if (idx < NUM_CHNOUT) { + LimitData * limit = limitAddress(idx); + luaL_checktype(L, -1, LUA_TTABLE); + for (lua_pushnil(L); lua_next(L, -2); lua_pop(L, 1)) { + luaL_checktype(L, -2, LUA_TSTRING); // key is string + const char * key = luaL_checkstring(L, -2); + if (!strcmp(key, "name")) { + const char * name = luaL_checkstring(L, -1); + str2zchar(limit->name, name, sizeof(limit->name)); + } + else if (!strcmp(key, "min")) { + limit->min = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "max")) { + limit->max = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "offset")) { + limit->offset = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "ppmCenter")) { + limit->ppmCenter = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "symetrical")) { + limit->symetrical = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "revert")) { + limit->revert = luaL_checkinteger(L, -1); + } + else if (!strcmp(key, "curve")) { + if (lua_isnil(L, -1)) + limit->curve = 0; + else + limit->curve = luaL_checkinteger(L, -1) + 1; + } + } + } + + return 0; +} +static int luaPopupInput(lua_State *L) +{ + uint8_t event = luaL_checkinteger(L, 2); + s_warning_input_value = luaL_checkinteger(L, 3); + s_warning_input_min = luaL_checkinteger(L, 4); + s_warning_input_max = luaL_checkinteger(L, 5); + s_warning = luaL_checkstring(L, 1); + s_warning_type = WARNING_TYPE_INPUT; + displayWarning(event); + if (s_warning_result) { + s_warning_result = 0; + lua_pushstring(L, "OK"); + } + else if (!s_warning) { + lua_pushstring(L, "CANCEL"); + } + else { + lua_pushinteger(L, s_warning_input_value); + } + s_warning = NULL; + return 1; +} + +int luaGetInputs(ScriptInternalData & sid) +{ + if (!lua_istable(L, -1)) + return -1; + + sid.inputsCount = 0; + for (lua_pushnil(L); lua_next(L, -2) && sid.inputsCount100) { + TRACE("Script killed"); + standaloneScript.state = SCRIPT_KILLED; + } + else { + TRACE("Script error"); + standaloneScript.state = SCRIPT_SYNTAX_ERROR; + } + luaState = LUASTATE_RELOAD_MODEL_SCRIPTS; + } + else { + int scriptResult = lua_tointeger(L, -1); + lua_pop(L, 1); /* pop returned value */ + if (scriptResult == 0) { + if (lua_gc(L, LUA_GCCOUNT, 0) > SCRIPTS_MAX_HEAP) { + TRACE("Script memory leak"); + standaloneScript.state = SCRIPT_LEAK; + luaState = LUASTATE_RELOAD_MODEL_SCRIPTS; + } + } + else { + TRACE("Script finished with status %d", scriptResult); + standaloneScript.state = SCRIPT_NOFILE; + luaState = LUASTATE_RELOAD_MODEL_SCRIPTS; + } + } + } + else { + TRACE("Script error: %s", lua_tostring(L, -1)); + standaloneScript.state = (instructionsPercent > 100 ? SCRIPT_KILLED : SCRIPT_SYNTAX_ERROR); + luaState = LUASTATE_RELOAD_MODEL_SCRIPTS; + } + + if (standaloneScript.state != SCRIPT_OK) { + luaError(standaloneScript.state); + } + + } + } + else { + // model scripts + if (luaState & LUASTATE_RELOAD_MODEL_SCRIPTS) { + luaState = 0; + LUA_RESET(); + luaLoadModelScripts(); + } + + for (int i=0; i 100 ? SCRIPT_KILLED : SCRIPT_SYNTAX_ERROR); + TRACE("Script %10s disabled", sd.file); + break; + } + sid.outputs[j].value = lua_tointeger(L, -1); + lua_pop(L, 1); + } + } + else { + if (instructionsPercent > 100) { + TRACE("Script %10s killed", sd.file); + sid.state = SCRIPT_KILLED; + } + else { + TRACE("Script %10s error: %s", sd.file, lua_tostring(L, -1)); + sid.state = SCRIPT_SYNTAX_ERROR; + } + } + + if (sid.state != SCRIPT_OK) { + luaFree(sid); + } + else { + sid.memory += lua_gc(L, LUA_GCCOUNT, 0) - prev_mem; + if (instructionsPercent > sid.instructions) { + sid.instructions = instructionsPercent; + } + } + } + } + + // TRACE("gc=%d", lua_gc(L, LUA_GCCOUNT, 0)); + + if (lua_gc(L, LUA_GCCOUNT, 0) > SCRIPTS_MAX_HEAP) { + uint8_t max_memory = 0; + int8_t max_idx = -1; + for (int i=0; i max_memory && sid.memory > 15) { + max_idx = i; + } + } + if (max_idx >= 0) { + ScriptInternalData & sid = scriptInternalData[max_idx]; + TRACE("Script %d killed", max_idx); + sid.state = SCRIPT_LEAK; + luaFree(sid); + } + } + } +} diff --git a/radio/src/lua/Makefile b/radio/src/lua/Makefile new file mode 100644 index 000000000..bd9515fd8 --- /dev/null +++ b/radio/src/lua/Makefile @@ -0,0 +1,114 @@ +# Makefile for installing Lua +# See doc/readme.html for installation and customization instructions. + +# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= + +# Your platform. See PLATS for possible values. +PLAT= none + +# Where to install. The installation starts in the src and doc directories, +# so take care if INSTALL_TOP is not an absolute path. See the local target. +# You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with +# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. +INSTALL_TOP= /usr/local +INSTALL_BIN= $(INSTALL_TOP)/bin +INSTALL_INC= $(INSTALL_TOP)/include +INSTALL_LIB= $(INSTALL_TOP)/lib +INSTALL_MAN= $(INSTALL_TOP)/man/man1 +INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V +INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V + +# How to install. If your install program does not support "-p", then +# you may have to run ranlib on the installed liblua.a. +INSTALL= install -p +INSTALL_EXEC= $(INSTALL) -m 0755 +INSTALL_DATA= $(INSTALL) -m 0644 +# +# If you don't have "install" you can use "cp" instead. +# INSTALL= cp -p +# INSTALL_EXEC= $(INSTALL) +# INSTALL_DATA= $(INSTALL) + +# Other utilities. +MKDIR= mkdir -p +RM= rm -f + +# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE ======= + +# Convenience platforms targets. +PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris + +# What to install. +TO_BIN= lua luac +TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp +TO_LIB= liblua.a +TO_MAN= lua.1 luac.1 + +# Lua version and release. +V= 5.2 +R= $V.1 + +# Targets start here. +all: $(PLAT) + +$(PLATS) clean: + cd src && $(MAKE) $@ + +test: dummy + src/lua -v + +install: dummy + cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) + cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) + +uninstall: + cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN) + cd src && cd $(INSTALL_INC) && $(RM) $(TO_INC) + cd src && cd $(INSTALL_LIB) && $(RM) $(TO_LIB) + cd doc && cd $(INSTALL_MAN) && $(RM) $(TO_MAN) + +local: + $(MAKE) install INSTALL_TOP=../install + +none: + @echo "Please do 'make PLATFORM' where PLATFORM is one of these:" + @echo " $(PLATS)" + @echo "See doc/readme.html for complete instructions." + +# make may get confused with test/ and install/ +dummy: + +# echo config parameters +echo: + @cd src && $(MAKE) -s echo + @echo "PLAT= $(PLAT)" + @echo "V= $V" + @echo "R= $R" + @echo "TO_BIN= $(TO_BIN)" + @echo "TO_INC= $(TO_INC)" + @echo "TO_LIB= $(TO_LIB)" + @echo "TO_MAN= $(TO_MAN)" + @echo "INSTALL_TOP= $(INSTALL_TOP)" + @echo "INSTALL_BIN= $(INSTALL_BIN)" + @echo "INSTALL_INC= $(INSTALL_INC)" + @echo "INSTALL_LIB= $(INSTALL_LIB)" + @echo "INSTALL_MAN= $(INSTALL_MAN)" + @echo "INSTALL_LMOD= $(INSTALL_LMOD)" + @echo "INSTALL_CMOD= $(INSTALL_CMOD)" + @echo "INSTALL_EXEC= $(INSTALL_EXEC)" + @echo "INSTALL_DATA= $(INSTALL_DATA)" + +# echo pkg-config data +pc: + @echo "version=$R" + @echo "prefix=$(INSTALL_TOP)" + @echo "libdir=$(INSTALL_LIB)" + @echo "includedir=$(INSTALL_INC)" + +# list targets that do not create files (but not all makes understand .PHONY) +.PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho + +# (end of Makefile) diff --git a/radio/src/lua/README b/radio/src/lua/README new file mode 100644 index 000000000..6e2aee6ce --- /dev/null +++ b/radio/src/lua/README @@ -0,0 +1,6 @@ + +This is Lua 5.2.2, released on 21 Mar 2013. + +For installation instructions, license details, and +further information about Lua, see doc/readme.html. + diff --git a/radio/src/lua/doc/contents.html b/radio/src/lua/doc/contents.html new file mode 100644 index 000000000..0ce297da1 --- /dev/null +++ b/radio/src/lua/doc/contents.html @@ -0,0 +1,533 @@ + + + +Lua 5.2 Reference Manual - contents + + + + + + + +
+

+ +Lua 5.2 Reference Manual +

+ +

+The reference manual is the official definition of the Lua language. +For a complete introduction to Lua programming, see the book +Programming in Lua. + +

+start +· +contents +· +index +


+ +Copyright © 2011–2013 Lua.org, PUC-Rio. +Freely available under the terms of the +Lua license. + + +

Contents

+ + +

Index

+ + + + + + + +
+

Lua functions

+

+_G
+_VERSION
+ +

+assert
+collectgarbage
+dofile
+error
+getmetatable
+ipairs
+load
+loadfile
+next
+pairs
+pcall
+print
+rawequal
+rawget
+rawlen
+rawset
+require
+select
+setmetatable
+tonumber
+tostring
+type
+xpcall
+ +

+bit32.arshift
+bit32.band
+bit32.bnot
+bit32.bor
+bit32.btest
+bit32.bxor
+bit32.extract
+bit32.lrotate
+bit32.lshift
+bit32.replace
+bit32.rrotate
+bit32.rshift
+ +

+coroutine.create
+coroutine.resume
+coroutine.running
+coroutine.status
+coroutine.wrap
+coroutine.yield
+ +

+debug.debug
+debug.getuservalue
+debug.gethook
+debug.getinfo
+debug.getlocal
+debug.getmetatable
+debug.getregistry
+debug.getupvalue
+debug.setuservalue
+debug.sethook
+debug.setlocal
+debug.setmetatable
+debug.setupvalue
+debug.traceback
+debug.upvalueid
+debug.upvaluejoin
+ +

+file:close
+file:flush
+file:lines
+file:read
+file:seek
+file:setvbuf
+file:write
+ +

+io.close
+io.flush
+io.input
+io.lines
+io.open
+io.output
+io.popen
+io.read
+io.stderr
+io.stdin
+io.stdout
+io.tmpfile
+io.type
+io.write
+ +

+

 

+

+math.abs
+math.acos
+math.asin
+math.atan
+math.atan2
+math.ceil
+math.cos
+math.cosh
+math.deg
+math.exp
+math.floor
+math.fmod
+math.frexp
+math.huge
+math.ldexp
+math.log
+math.max
+math.min
+math.modf
+math.pi
+math.pow
+math.rad
+math.random
+math.randomseed
+math.sin
+math.sinh
+math.sqrt
+math.tan
+math.tanh
+ +

+os.clock
+os.date
+os.difftime
+os.execute
+os.exit
+os.getenv
+os.remove
+os.rename
+os.setlocale
+os.time
+os.tmpname
+ +

+package.config
+package.cpath
+package.loaded
+package.loadlib
+package.path
+package.preload
+package.searchers
+package.searchpath
+ +

+string.byte
+string.char
+string.dump
+string.find
+string.format
+string.gmatch
+string.gsub
+string.len
+string.lower
+string.match
+string.rep
+string.reverse
+string.sub
+string.upper
+ +

+table.concat
+table.insert
+table.pack
+table.remove
+table.sort
+table.unpack
+ +

+

C API

+

+lua_Alloc
+lua_CFunction
+lua_Debug
+lua_Hook
+lua_Integer
+lua_Number
+lua_Reader
+lua_State
+lua_Unsigned
+lua_Writer
+ +

+lua_absindex
+lua_arith
+lua_atpanic
+lua_call
+lua_callk
+lua_checkstack
+lua_close
+lua_compare
+lua_concat
+lua_copy
+lua_createtable
+lua_dump
+lua_error
+lua_gc
+lua_getallocf
+lua_getctx
+lua_getfield
+lua_getglobal
+lua_gethook
+lua_gethookcount
+lua_gethookmask
+lua_getinfo
+lua_getlocal
+lua_getmetatable
+lua_getstack
+lua_gettable
+lua_gettop
+lua_getupvalue
+lua_getuservalue
+lua_insert
+lua_isboolean
+lua_iscfunction
+lua_isfunction
+lua_islightuserdata
+lua_isnil
+lua_isnone
+lua_isnoneornil
+lua_isnumber
+lua_isstring
+lua_istable
+lua_isthread
+lua_isuserdata
+lua_len
+lua_load
+lua_newstate
+lua_newtable
+lua_newthread
+lua_newuserdata
+lua_next
+lua_pcall
+lua_pcallk
+lua_pop
+lua_pushboolean
+lua_pushcclosure
+lua_pushcfunction
+lua_pushfstring
+lua_pushglobaltable
+lua_pushinteger
+lua_pushlightuserdata
+lua_pushliteral
+lua_pushlstring
+lua_pushnil
+lua_pushnumber
+lua_pushstring
+lua_pushthread
+lua_pushunsigned
+lua_pushvalue
+lua_pushvfstring
+lua_rawequal
+lua_rawget
+lua_rawgeti
+lua_rawgetp
+lua_rawlen
+lua_rawset
+lua_rawseti
+lua_rawsetp
+lua_register
+lua_remove
+lua_replace
+lua_resume
+lua_setallocf
+lua_setfield
+lua_setglobal
+lua_sethook
+lua_setlocal
+lua_setmetatable
+lua_settable
+lua_settop
+lua_setupvalue
+lua_setuservalue
+lua_status
+lua_toboolean
+lua_tocfunction
+lua_tointeger
+lua_tointegerx
+lua_tolstring
+lua_tonumber
+lua_tonumberx
+lua_topointer
+lua_tostring
+lua_tothread
+lua_tounsigned
+lua_tounsignedx
+lua_touserdata
+lua_type
+lua_typename
+lua_upvalueid
+lua_upvalueindex
+lua_upvaluejoin
+lua_version
+lua_xmove
+lua_yield
+lua_yieldk
+ +

+

auxiliary library

+

+luaL_Buffer
+luaL_Reg
+ +

+luaL_addchar
+luaL_addlstring
+luaL_addsize
+luaL_addstring
+luaL_addvalue
+luaL_argcheck
+luaL_argerror
+luaL_buffinit
+luaL_buffinitsize
+luaL_callmeta
+luaL_checkany
+luaL_checkint
+luaL_checkinteger
+luaL_checklong
+luaL_checklstring
+luaL_checknumber
+luaL_checkoption
+luaL_checkstack
+luaL_checkstring
+luaL_checktype
+luaL_checkudata
+luaL_checkunsigned
+luaL_checkversion
+luaL_dofile
+luaL_dostring
+luaL_error
+luaL_execresult
+luaL_fileresult
+luaL_getmetafield
+luaL_getmetatable
+luaL_getsubtable
+luaL_gsub
+luaL_len
+luaL_loadbuffer
+luaL_loadbufferx
+luaL_loadfile
+luaL_loadfilex
+luaL_loadstring
+luaL_newlib
+luaL_newlibtable
+luaL_newmetatable
+luaL_newstate
+luaL_openlibs
+luaL_optint
+luaL_optinteger
+luaL_optlong
+luaL_optlstring
+luaL_optnumber
+luaL_optstring
+luaL_optunsigned
+luaL_prepbuffer
+luaL_prepbuffsize
+luaL_pushresult
+luaL_pushresultsize
+luaL_ref
+luaL_requiref
+luaL_setfuncs
+luaL_setmetatable
+luaL_testudata
+luaL_tolstring
+luaL_traceback
+luaL_typename
+luaL_unref
+luaL_where
+ +

+ +
+ +Last update: +Tue Mar 12 11:22:18 BRT 2013 + + + + + diff --git a/radio/src/lua/doc/logo.gif b/radio/src/lua/doc/logo.gif new file mode 100644 index 000000000..2f5e4ac2e Binary files /dev/null and b/radio/src/lua/doc/logo.gif differ diff --git a/radio/src/lua/doc/lua.1 b/radio/src/lua/doc/lua.1 new file mode 100644 index 000000000..1dbf04366 --- /dev/null +++ b/radio/src/lua/doc/lua.1 @@ -0,0 +1,116 @@ +.\" $Id: lua.man,v 1.13 2011/11/16 17:16:53 lhf Exp $ +.TH LUA 1 "$Date: 2011/11/16 17:16:53 $" +.SH NAME +lua \- Lua interpreter +.SH SYNOPSIS +.B lua +[ +.I options +] +[ +.I script +[ +.I args +] +] +.SH DESCRIPTION +.B lua +is the standalone Lua interpreter. +It loads and executes Lua programs, +either in textual source form or +in precompiled binary form. +(Precompiled binaries are output by +.BR luac , +the Lua compiler.) +.B lua +can be used as a batch interpreter and also interactively. +.LP +The given +.I options +are handled in order and then +the Lua program in file +.I script +is loaded and executed. +The given +.I args +are available to +.I script +as strings in a global table named +.BR arg . +If no options or arguments are given, +then +.B "\-v \-i" +is assumed when the standard input is a terminal; +otherwise, +.B "\-" +is assumed. +.LP +In interactive mode, +.B lua +prompts the user, +reads lines from the standard input, +and executes them as they are read. +If a line does not contain a complete statement, +then a secondary prompt is displayed and +lines are read until a complete statement is formed or +a syntax error is found. +If a line starts with +.BR '=' , +then +.B lua +evaluates and displays +the values of the expressions in the remainder of the line. +.LP +At the very start, +before even handling the command line, +.B lua +checks the contents of the environment variables +.B LUA_INIT_5_2 +or +.BR LUA_INIT , +in that order. +If the contents is of the form +.RI '@ filename ', +then +.I filename +is executed. +Otherwise, the string is assumed to be a Lua statement and is executed. +.SH OPTIONS +.TP +.BI \-e " stat" +execute statement +.IR stat . +.TP +.B \-i +enter interactive mode after executing +.IR script . +.TP +.BI \-l " name" +execute the equivalent of +.IB name =require(' name ') +before executing +.IR script . +.TP +.B \-v +show version information. +.TP +.B \-E +ignore environment variables. +.TP +.B \-\- +stop handling options. +.TP +.B \- +stop handling options and execute the standard input as a file. +.SH "SEE ALSO" +.BR luac (1) +.br +The documentation at lua.org, +especially section 7 of the reference manual. +.SH DIAGNOSTICS +Error messages should be self explanatory. +.SH AUTHORS +R. Ierusalimschy, +L. H. de Figueiredo, +W. Celes +.\" EOF diff --git a/radio/src/lua/doc/lua.css b/radio/src/lua/doc/lua.css new file mode 100644 index 000000000..240e85eb8 --- /dev/null +++ b/radio/src/lua/doc/lua.css @@ -0,0 +1,83 @@ +body { + color: #000000 ; + background-color: #FFFFFF ; + font-family: Helvetica, Arial, sans-serif ; + text-align: justify ; + margin-right: 30px ; + margin-left: 30px ; +} + +h1, h2, h3, h4 { + font-family: Verdana, Geneva, sans-serif ; + font-weight: normal ; + font-style: italic ; +} + +h2 { + padding-top: 0.4em ; + padding-bottom: 0.4em ; + padding-left: 1em ; + padding-right: 1em ; + background-color: #E0E0FF ; + border-radius: 8px ; +} + +h3 { + padding-left: 0.5em ; + border-left: solid #E0E0FF 1em ; +} + +table h3 { + padding-left: 0px ; + border-left: none ; +} + +a:link { + color: #000080 ; + background-color: inherit ; + text-decoration: none ; +} + +a:visited { + background-color: inherit ; + text-decoration: none ; +} + +a:link:hover, a:visited:hover { + color: #000080 ; + background-color: #E0E0FF ; +} + +a:link:active, a:visited:active { + color: #FF0000 ; +} + +hr { + border: 0 ; + height: 1px ; + color: #a0a0a0 ; + background-color: #a0a0a0 ; +} + +:target { + background-color: #F8F8F8 ; + padding: 8px ; + border: solid #a0a0a0 2px ; +} + +.footer { + color: gray ; + font-size: small ; +} + +input[type=text] { + border: solid #a0a0a0 2px ; + border-radius: 2em ; + -moz-border-radius: 2em ; + background-image: url('images/search.png') ; + background-repeat: no-repeat; + background-position: 4px center ; + padding-left: 20px ; + height: 2em ; +} + diff --git a/radio/src/lua/doc/luac.1 b/radio/src/lua/doc/luac.1 new file mode 100644 index 000000000..33a4ed00a --- /dev/null +++ b/radio/src/lua/doc/luac.1 @@ -0,0 +1,118 @@ +.\" $Id: luac.man,v 1.29 2011/11/16 13:53:40 lhf Exp $ +.TH LUAC 1 "$Date: 2011/11/16 13:53:40 $" +.SH NAME +luac \- Lua compiler +.SH SYNOPSIS +.B luac +[ +.I options +] [ +.I filenames +] +.SH DESCRIPTION +.B luac +is the Lua compiler. +It translates programs written in the Lua programming language +into binary files containing precompiled chunks +that can be later loaded and executed. +.LP +The main advantages of precompiling chunks are: +faster loading, +protecting source code from accidental user changes, +and +off-line syntax checking. +Precompiling does not imply faster execution +because in Lua chunks are always compiled into bytecodes before being executed. +.B luac +simply allows those bytecodes to be saved in a file for later execution. +Precompiled chunks are not necessarily smaller than the corresponding source. +The main goal in precompiling is faster loading. +.LP +In the command line, +you can mix +text files containing Lua source and +binary files containing precompiled chunks. +.B luac +produces a single output file containing the combined bytecodes +for all files given. +Executing the combined file is equivalent to executing the given files. +By default, +the output file is named +.BR luac.out , +but you can change this with the +.B \-o +option. +.LP +Precompiled chunks are +.I not +portable across different architectures. +Moreover, +the internal format of precompiled chunks +is likely to change when a new version of Lua is released. +Make sure you save the source files of all Lua programs that you precompile. +.LP +.SH OPTIONS +.TP +.B \-l +produce a listing of the compiled bytecode for Lua's virtual machine. +Listing bytecodes is useful to learn about Lua's virtual machine. +If no files are given, then +.B luac +loads +.B luac.out +and lists its contents. +Use +.B \-l \-l +for a full listing. +.TP +.BI \-o " file" +output to +.IR file , +instead of the default +.BR luac.out . +(You can use +.B "'\-'" +for standard output, +but not on platforms that open standard output in text mode.) +The output file may be one of the given files because +all files are loaded before the output file is written. +Be careful not to overwrite precious files. +.TP +.B \-p +load files but do not generate any output file. +Used mainly for syntax checking and for testing precompiled chunks: +corrupted files will probably generate errors when loaded. +If no files are given, then +.B luac +loads +.B luac.out +and tests its contents. +No messages are displayed if the file loads without errors. +.TP +.B \-s +strip debug information before writing the output file. +This saves some space in very large chunks, +but if errors occur when running a stripped chunk, +then the error messages may not contain the full information they usually do. +In particular, +line numbers and names of local variables are lost. +.TP +.B \-v +show version information. +.TP +.B \-\- +stop handling options. +.TP +.B \- +stop handling options and process standard input. +.SH "SEE ALSO" +.BR lua (1) +.br +The documentation at lua.org. +.SH DIAGNOSTICS +Error messages should be self explanatory. +.SH AUTHORS +R. Ierusalimschy, +L. H. de Figueiredo, +W. Celes +.\" EOF diff --git a/radio/src/lua/doc/manual.css b/radio/src/lua/doc/manual.css new file mode 100644 index 000000000..269bd4358 --- /dev/null +++ b/radio/src/lua/doc/manual.css @@ -0,0 +1,26 @@ +h3 code { + font-family: inherit ; + font-size: inherit ; +} + +pre, code { + font-size: 12pt ; +} + +span.apii { + float: right ; + font-family: inherit ; + font-style: normal ; + font-size: small ; + color: gray ; +} + +p+h1, ul+h1 { + padding-top: 0.4em ; + padding-bottom: 0.4em ; + padding-left: 24px ; + margin-left: -24px ; + background-color: #E0E0FF ; + border-radius: 8px ; +} + diff --git a/radio/src/lua/doc/manual.html b/radio/src/lua/doc/manual.html new file mode 100644 index 000000000..85365363f --- /dev/null +++ b/radio/src/lua/doc/manual.html @@ -0,0 +1,10507 @@ + + + + +Lua 5.2 Reference Manual + + + + + + + +
+

+ +Lua 5.2 Reference Manual +

+ +by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes +

+ +Copyright © 2011–2013 Lua.org, PUC-Rio. +Freely available under the terms of the +Lua license. + +


+

+ +contents +· +index + + +

+ + + + + + +

1 – Introduction

+ +

+Lua is an extension programming language designed to support +general procedural programming with data description +facilities. +It also offers good support for object-oriented programming, +functional programming, and data-driven programming. +Lua is intended to be used as a powerful, lightweight, +embeddable scripting language for any program that needs one. +Lua is implemented as a library, written in clean C, +the common subset of Standard C and C++. + + +

+Being an extension language, Lua has no notion of a "main" program: +it only works embedded in a host client, +called the embedding program or simply the host. +The host program can invoke functions to execute a piece of Lua code, +can write and read Lua variables, +and can register C functions to be called by Lua code. +Through the use of C functions, Lua can be augmented to cope with +a wide range of different domains, +thus creating customized programming languages sharing a syntactical framework. +The Lua distribution includes a sample host program called lua, +which uses the Lua library to offer a complete, standalone Lua interpreter, +for interactive or batch use. + + +

+Lua is free software, +and is provided as usual with no guarantees, +as stated in its license. +The implementation described in this manual is available +at Lua's official web site, www.lua.org. + + +

+Like any other reference manual, +this document is dry in places. +For a discussion of the decisions behind the design of Lua, +see the technical papers available at Lua's web site. +For a detailed introduction to programming in Lua, +see Roberto's book, Programming in Lua. + + + +

2 – Basic Concepts

+ +

+This section describes the basic concepts of the language. + + + +

2.1 – Values and Types

+ +

+Lua is a dynamically typed language. +This means that +variables do not have types; only values do. +There are no type definitions in the language. +All values carry their own type. + + +

+All values in Lua are first-class values. +This means that all values can be stored in variables, +passed as arguments to other functions, and returned as results. + + +

+There are eight basic types in Lua: +nil, boolean, number, +string, function, userdata, +thread, and table. +Nil is the type of the value nil, +whose main property is to be different from any other value; +it usually represents the absence of a useful value. +Boolean is the type of the values false and true. +Both nil and false make a condition false; +any other value makes it true. +Number represents real (double-precision floating-point) numbers. +Operations on numbers follow the same rules of +the underlying C implementation, +which, in turn, usually follows the IEEE 754 standard. +(It is easy to build Lua interpreters that use other +internal representations for numbers, +such as single-precision floats or long integers; +see file luaconf.h.) +String represents immutable sequences of bytes. + +Lua is 8-bit clean: +strings can contain any 8-bit value, +including embedded zeros ('\0'). + + +

+Lua can call (and manipulate) functions written in Lua and +functions written in C +(see §3.4.9). + + +

+The type userdata is provided to allow arbitrary C data to +be stored in Lua variables. +A userdata value is a pointer to a block of raw memory. +There are two kinds of userdata: +full userdata, where the block of memory is managed by Lua, +and light userdata, where the block of memory is managed by the host. +Userdata has no predefined operations in Lua, +except assignment and identity test. +By using metatables, +the programmer can define operations for full userdata values +(see §2.4). +Userdata values cannot be created or modified in Lua, +only through the C API. +This guarantees the integrity of data owned by the host program. + + +

+The type thread represents independent threads of execution +and it is used to implement coroutines (see §2.6). +Do not confuse Lua threads with operating-system threads. +Lua supports coroutines on all systems, +even those that do not support threads. + + +

+The type table implements associative arrays, +that is, arrays that can be indexed not only with numbers, +but with any Lua value except nil and NaN +(Not a Number, a special numeric value used to represent +undefined or unrepresentable results, such as 0/0). +Tables can be heterogeneous; +that is, they can contain values of all types (except nil). +Any key with value nil is not considered part of the table. +Conversely, any key that is not part of a table has +an associated value nil. + + +

+Tables are the sole data structuring mechanism in Lua; +they can be used to represent ordinary arrays, sequences, +symbol tables, sets, records, graphs, trees, etc. +To represent records, Lua uses the field name as an index. +The language supports this representation by +providing a.name as syntactic sugar for a["name"]. +There are several convenient ways to create tables in Lua +(see §3.4.8). + + +

+We use the term sequence to denote a table where +the set of all positive numeric keys is equal to {1..n} +for some integer n, +which is called the length of the sequence (see §3.4.6). + + +

+Like indices, +the values of table fields can be of any type. +In particular, +because functions are first-class values, +table fields can contain functions. +Thus tables can also carry methods (see §3.4.10). + + +

+The indexing of tables follows +the definition of raw equality in the language. +The expressions a[i] and a[j] +denote the same table element +if and only if i and j are raw equal +(that is, equal without metamethods). + + +

+Tables, functions, threads, and (full) userdata values are objects: +variables do not actually contain these values, +only references to them. +Assignment, parameter passing, and function returns +always manipulate references to such values; +these operations do not imply any kind of copy. + + +

+The library function type returns a string describing the type +of a given value (see §6.1). + + + + + +

2.2 – Environments and the Global Environment

+ +

+As will be discussed in §3.2 and §3.3.3, +any reference to a global name var is syntactically translated +to _ENV.var. +Moreover, every chunk is compiled in the scope of +an external local variable called _ENV (see §3.3.2), +so _ENV itself is never a global name in a chunk. + + +

+Despite the existence of this external _ENV variable and +the translation of global names, +_ENV is a completely regular name. +In particular, +you can define new variables and parameters with that name. +Each reference to a global name uses the _ENV that is +visible at that point in the program, +following the usual visibility rules of Lua (see §3.5). + + +

+Any table used as the value of _ENV is called an environment. + + +

+Lua keeps a distinguished environment called the global environment. +This value is kept at a special index in the C registry (see §4.5). +In Lua, the variable _G is initialized with this same value. + + +

+When Lua compiles a chunk, +it initializes the value of its _ENV upvalue +with the global environment (see load). +Therefore, by default, +global variables in Lua code refer to entries in the global environment. +Moreover, all standard libraries are loaded in the global environment +and several functions there operate on that environment. +You can use load (or loadfile) +to load a chunk with a different environment. +(In C, you have to load the chunk and then change the value +of its first upvalue.) + + +

+If you change the global environment in the registry +(through C code or the debug library), +all chunks loaded after the change will get the new environment. +Previously loaded chunks are not affected, however, +as each has its own reference to the environment in its _ENV variable. +Moreover, the variable _G +(which is stored in the original global environment) +is never updated by Lua. + + + + + +

2.3 – Error Handling

+ +

+Because Lua is an embedded extension language, +all Lua actions start from C code in the host program +calling a function from the Lua library (see lua_pcall). +Whenever an error occurs during +the compilation or execution of a Lua chunk, +control returns to the host, +which can take appropriate measures +(such as printing an error message). + + +

+Lua code can explicitly generate an error by calling the +error function. +If you need to catch errors in Lua, +you can use pcall or xpcall +to call a given function in protected mode. + + +

+Whenever there is an error, +an error object (also called an error message) +is propagated with information about the error. +Lua itself only generates errors where the error object is a string, +but programs may generate errors with +any value for the error object. + + +

+When you use xpcall or lua_pcall, +you may give a message handler +to be called in case of errors. +This function is called with the original error message +and returns a new error message. +It is called before the error unwinds the stack, +so that it can gather more information about the error, +for instance by inspecting the stack and creating a stack traceback. +This message handler is still protected by the protected call; +so, an error inside the message handler +will call the message handler again. +If this loop goes on, Lua breaks it and returns an appropriate message. + + + + + +

2.4 – Metatables and Metamethods

+ +

+Every value in Lua can have a metatable. +This metatable is an ordinary Lua table +that defines the behavior of the original value +under certain special operations. +You can change several aspects of the behavior +of operations over a value by setting specific fields in its metatable. +For instance, when a non-numeric value is the operand of an addition, +Lua checks for a function in the field "__add" of the value's metatable. +If it finds one, +Lua calls this function to perform the addition. + + +

+The keys in a metatable are derived from the event names; +the corresponding values are called metamethods. +In the previous example, the event is "add" +and the metamethod is the function that performs the addition. + + +

+You can query the metatable of any value +using the getmetatable function. + + +

+You can replace the metatable of tables +using the setmetatable function. +You cannot change the metatable of other types from Lua +(except by using the debug library); +you must use the C API for that. + + +

+Tables and full userdata have individual metatables +(although multiple tables and userdata can share their metatables). +Values of all other types share one single metatable per type; +that is, there is one single metatable for all numbers, +one for all strings, etc. +By default, a value has no metatable, +but the string library sets a metatable for the string type (see §6.4). + + +

+A metatable controls how an object behaves in arithmetic operations, +order comparisons, concatenation, length operation, and indexing. +A metatable also can define a function to be called +when a userdata or a table is garbage collected. +When Lua performs one of these operations over a value, +it checks whether this value has a metatable with the corresponding event. +If so, the value associated with that key (the metamethod) +controls how Lua will perform the operation. + + +

+Metatables control the operations listed next. +Each operation is identified by its corresponding name. +The key for each operation is a string with its name prefixed by +two underscores, '__'; +for instance, the key for operation "add" is the +string "__add". + + +

+The semantics of these operations is better explained by a Lua function +describing how the interpreter executes the operation. +The code shown here in Lua is only illustrative; +the real behavior is hard coded in the interpreter +and it is much more efficient than this simulation. +All functions used in these descriptions +(rawget, tonumber, etc.) +are described in §6.1. +In particular, to retrieve the metamethod of a given object, +we use the expression + +

+     metatable(obj)[event]
+

+This should be read as + +

+     rawget(getmetatable(obj) or {}, event)
+

+This means that the access to a metamethod does not invoke other metamethods, +and access to objects with no metatables does not fail +(it simply results in nil). + + +

+For the unary - and # operators, +the metamethod is called with a dummy second argument. +This extra argument is only to simplify Lua's internals; +it may be removed in future versions and therefore it is not present +in the following code. +(For most uses this extra argument is irrelevant.) + + + +

    + +
  • "add": +the + operation. + + + +

    +The function getbinhandler below defines how Lua chooses a handler +for a binary operation. +First, Lua tries the first operand. +If its type does not define a handler for the operation, +then Lua tries the second operand. + +

    +     function getbinhandler (op1, op2, event)
    +       return metatable(op1)[event] or metatable(op2)[event]
    +     end
    +

    +By using this function, +the behavior of the op1 + op2 is + +

    +     function add_event (op1, op2)
    +       local o1, o2 = tonumber(op1), tonumber(op2)
    +       if o1 and o2 then  -- both operands are numeric?
    +         return o1 + o2   -- '+' here is the primitive 'add'
    +       else  -- at least one of the operands is not numeric
    +         local h = getbinhandler(op1, op2, "__add")
    +         if h then
    +           -- call the handler with both operands
    +           return (h(op1, op2))
    +         else  -- no handler available: default behavior
    +           error(···)
    +         end
    +       end
    +     end
    +

    +

  • + +
  • "sub": +the - operation. + +Behavior similar to the "add" operation. +
  • + +
  • "mul": +the * operation. + +Behavior similar to the "add" operation. +
  • + +
  • "div": +the / operation. + +Behavior similar to the "add" operation. +
  • + +
  • "mod": +the % operation. + +Behavior similar to the "add" operation, +with the operation +o1 - floor(o1/o2)*o2 as the primitive operation. +
  • + +
  • "pow": +the ^ (exponentiation) operation. + +Behavior similar to the "add" operation, +with the function pow (from the C math library) +as the primitive operation. +
  • + +
  • "unm": +the unary - operation. + + +
    +     function unm_event (op)
    +       local o = tonumber(op)
    +       if o then  -- operand is numeric?
    +         return -o  -- '-' here is the primitive 'unm'
    +       else  -- the operand is not numeric.
    +         -- Try to get a handler from the operand
    +         local h = metatable(op).__unm
    +         if h then
    +           -- call the handler with the operand
    +           return (h(op))
    +         else  -- no handler available: default behavior
    +           error(···)
    +         end
    +       end
    +     end
    +

    +

  • + +
  • "concat": +the .. (concatenation) operation. + + +
    +     function concat_event (op1, op2)
    +       if (type(op1) == "string" or type(op1) == "number") and
    +          (type(op2) == "string" or type(op2) == "number") then
    +         return op1 .. op2  -- primitive string concatenation
    +       else
    +         local h = getbinhandler(op1, op2, "__concat")
    +         if h then
    +           return (h(op1, op2))
    +         else
    +           error(···)
    +         end
    +       end
    +     end
    +

    +

  • + +
  • "len": +the # operation. + + +
    +     function len_event (op)
    +       if type(op) == "string" then
    +         return strlen(op)      -- primitive string length
    +       else
    +         local h = metatable(op).__len
    +         if h then
    +           return (h(op))       -- call handler with the operand
    +         elseif type(op) == "table" then
    +           return #op              -- primitive table length
    +         else  -- no handler available: error
    +           error(···)
    +         end
    +       end
    +     end
    +

    +See §3.4.6 for a description of the length of a table. +

  • + +
  • "eq": +the == operation. + +The function getequalhandler defines how Lua chooses a metamethod +for equality. +A metamethod is selected only when both values +being compared have the same type +and the same metamethod for the selected operation, +and the values are either tables or full userdata. + +
    +     function getequalhandler (op1, op2)
    +       if type(op1) ~= type(op2) or
    +          (type(op1) ~= "table" and type(op1) ~= "userdata") then
    +         return nil     -- different values
    +       end
    +       local mm1 = metatable(op1).__eq
    +       local mm2 = metatable(op2).__eq
    +       if mm1 == mm2 then return mm1 else return nil end
    +     end
    +

    +The "eq" event is defined as follows: + +

    +     function eq_event (op1, op2)
    +       if op1 == op2 then   -- primitive equal?
    +         return true   -- values are equal
    +       end
    +       -- try metamethod
    +       local h = getequalhandler(op1, op2)
    +       if h then
    +         return not not h(op1, op2)
    +       else
    +         return false
    +       end
    +     end
    +

    +Note that the result is always a boolean. +

  • + +
  • "lt": +the < operation. + + +
    +     function lt_event (op1, op2)
    +       if type(op1) == "number" and type(op2) == "number" then
    +         return op1 < op2   -- numeric comparison
    +       elseif type(op1) == "string" and type(op2) == "string" then
    +         return op1 < op2   -- lexicographic comparison
    +       else
    +         local h = getbinhandler(op1, op2, "__lt")
    +         if h then
    +           return not not h(op1, op2)
    +         else
    +           error(···)
    +         end
    +       end
    +     end
    +

    +Note that the result is always a boolean. +

  • + +
  • "le": +the <= operation. + + +
    +     function le_event (op1, op2)
    +       if type(op1) == "number" and type(op2) == "number" then
    +         return op1 <= op2   -- numeric comparison
    +       elseif type(op1) == "string" and type(op2) == "string" then
    +         return op1 <= op2   -- lexicographic comparison
    +       else
    +         local h = getbinhandler(op1, op2, "__le")
    +         if h then
    +           return not not h(op1, op2)
    +         else
    +           h = getbinhandler(op1, op2, "__lt")
    +           if h then
    +             return not h(op2, op1)
    +           else
    +             error(···)
    +           end
    +         end
    +       end
    +     end
    +

    +Note that, in the absence of a "le" metamethod, +Lua tries the "lt", assuming that a <= b is +equivalent to not (b < a). + + +

    +As with the other comparison operators, +the result is always a boolean. +

  • + +
  • "index": +The indexing access table[key]. +Note that the metamethod is tried only +when key is not present in table. +(When table is not a table, +no key is ever present, +so the metamethod is always tried.) + + +
    +     function gettable_event (table, key)
    +       local h
    +       if type(table) == "table" then
    +         local v = rawget(table, key)
    +         -- if key is present, return raw value
    +         if v ~= nil then return v end
    +         h = metatable(table).__index
    +         if h == nil then return nil end
    +       else
    +         h = metatable(table).__index
    +         if h == nil then
    +           error(···)
    +         end
    +       end
    +       if type(h) == "function" then
    +         return (h(table, key))     -- call the handler
    +       else return h[key]           -- or repeat operation on it
    +       end
    +     end
    +

    +

  • + +
  • "newindex": +The indexing assignment table[key] = value. +Note that the metamethod is tried only +when key is not present in table. + + +
    +     function settable_event (table, key, value)
    +       local h
    +       if type(table) == "table" then
    +         local v = rawget(table, key)
    +         -- if key is present, do raw assignment
    +         if v ~= nil then rawset(table, key, value); return end
    +         h = metatable(table).__newindex
    +         if h == nil then rawset(table, key, value); return end
    +       else
    +         h = metatable(table).__newindex
    +         if h == nil then
    +           error(···)
    +         end
    +       end
    +       if type(h) == "function" then
    +         h(table, key,value)           -- call the handler
    +       else h[key] = value             -- or repeat operation on it
    +       end
    +     end
    +

    +

  • + +
  • "call": +called when Lua calls a value. + + +
    +     function function_event (func, ...)
    +       if type(func) == "function" then
    +         return func(...)   -- primitive call
    +       else
    +         local h = metatable(func).__call
    +         if h then
    +           return h(func, ...)
    +         else
    +           error(···)
    +         end
    +       end
    +     end
    +

    +

  • + +
+ + + + +

2.5 – Garbage Collection

+ +

+Lua performs automatic memory management. +This means that +you have to worry neither about allocating memory for new objects +nor about freeing it when the objects are no longer needed. +Lua manages memory automatically by running +a garbage collector to collect all dead objects +(that is, objects that are no longer accessible from Lua). +All memory used by Lua is subject to automatic management: +strings, tables, userdata, functions, threads, internal structures, etc. + + +

+Lua implements an incremental mark-and-sweep collector. +It uses two numbers to control its garbage-collection cycles: +the garbage-collector pause and +the garbage-collector step multiplier. +Both use percentage points as units +(e.g., a value of 100 means an internal value of 1). + + +

+The garbage-collector pause +controls how long the collector waits before starting a new cycle. +Larger values make the collector less aggressive. +Values smaller than 100 mean the collector will not wait to +start a new cycle. +A value of 200 means that the collector waits for the total memory in use +to double before starting a new cycle. + + +

+The garbage-collector step multiplier +controls the relative speed of the collector relative to +memory allocation. +Larger values make the collector more aggressive but also increase +the size of each incremental step. +Values smaller than 100 make the collector too slow and +can result in the collector never finishing a cycle. +The default is 200, +which means that the collector runs at "twice" +the speed of memory allocation. + + +

+If you set the step multiplier to a very large number +(larger than 10% of the maximum number of +bytes that the program may use), +the collector behaves like a stop-the-world collector. +If you then set the pause to 200, +the collector behaves as in old Lua versions, +doing a complete collection every time Lua doubles its +memory usage. + + +

+You can change these numbers by calling lua_gc in C +or collectgarbage in Lua. +You can also use these functions to control +the collector directly (e.g., stop and restart it). + + +

+As an experimental feature in Lua 5.2, +you can change the collector's operation mode +from incremental to generational. +A generational collector assumes that most objects die young, +and therefore it traverses only young (recently created) objects. +This behavior can reduce the time used by the collector, +but also increases memory usage (as old dead objects may accumulate). +To mitigate this second problem, +from time to time the generational collector performs a full collection. +Remember that this is an experimental feature; +you are welcome to try it, +but check your gains. + + + +

2.5.1 – Garbage-Collection Metamethods

+ +

+You can set garbage-collector metamethods for tables +and, using the C API, +for full userdata (see §2.4). +These metamethods are also called finalizers. +Finalizers allow you to coordinate Lua's garbage collection +with external resource management +(such as closing files, network or database connections, +or freeing your own memory). + + +

+For an object (table or userdata) to be finalized when collected, +you must mark it for finalization. + +You mark an object for finalization when you set its metatable +and the metatable has a field indexed by the string "__gc". +Note that if you set a metatable without a __gc field +and later create that field in the metatable, +the object will not be marked for finalization. +However, after an object is marked, +you can freely change the __gc field of its metatable. + + +

+When a marked object becomes garbage, +it is not collected immediately by the garbage collector. +Instead, Lua puts it in a list. +After the collection, +Lua does the equivalent of the following function +for each object in that list: + +

+     function gc_event (obj)
+       local h = metatable(obj).__gc
+       if type(h) == "function" then
+         h(obj)
+       end
+     end
+
+ +

+At the end of each garbage-collection cycle, +the finalizers for objects are called in +the reverse order that they were marked for collection, +among those collected in that cycle; +that is, the first finalizer to be called is the one associated +with the object marked last in the program. +The execution of each finalizer may occur at any point during +the execution of the regular code. + + +

+Because the object being collected must still be used by the finalizer, +it (and other objects accessible only through it) +must be resurrected by Lua. +Usually, this resurrection is transient, +and the object memory is freed in the next garbage-collection cycle. +However, if the finalizer stores the object in some global place +(e.g., a global variable), +then there is a permanent resurrection. +In any case, +the object memory is freed only when it becomes completely inaccessible; +its finalizer will never be called twice. + + +

+When you close a state (see lua_close), +Lua calls the finalizers of all objects marked for finalization, +following the reverse order that they were marked. +If any finalizer marks new objects for collection during that phase, +these new objects will not be finalized. + + + + + +

2.5.2 – Weak Tables

+ +

+A weak table is a table whose elements are +weak references. +A weak reference is ignored by the garbage collector. +In other words, +if the only references to an object are weak references, +then the garbage collector will collect that object. + + +

+A weak table can have weak keys, weak values, or both. +A table with weak keys allows the collection of its keys, +but prevents the collection of its values. +A table with both weak keys and weak values allows the collection of +both keys and values. +In any case, if either the key or the value is collected, +the whole pair is removed from the table. +The weakness of a table is controlled by the +__mode field of its metatable. +If the __mode field is a string containing the character 'k', +the keys in the table are weak. +If __mode contains 'v', +the values in the table are weak. + + +

+A table with weak keys and strong values +is also called an ephemeron table. +In an ephemeron table, +a value is considered reachable only if its key is reachable. +In particular, +if the only reference to a key comes through its value, +the pair is removed. + + +

+Any change in the weakness of a table may take effect only +at the next collect cycle. +In particular, if you change the weakness to a stronger mode, +Lua may still collect some items from that table +before the change takes effect. + + +

+Only objects that have an explicit construction +are removed from weak tables. +Values, such as numbers and light C functions, +are not subject to garbage collection, +and therefore are not removed from weak tables +(unless its associated value is collected). +Although strings are subject to garbage collection, +they do not have an explicit construction, +and therefore are not removed from weak tables. + + +

+Resurrected objects +(that is, objects being finalized +and objects accessible only through objects being finalized) +have a special behavior in weak tables. +They are removed from weak values before running their finalizers, +but are removed from weak keys only in the next collection +after running their finalizers, when such objects are actually freed. +This behavior allows the finalizer to access properties +associated with the object through weak tables. + + +

+If a weak table is among the resurrected objects in a collection cycle, +it may not be properly cleared until the next cycle. + + + + + + + +

2.6 – Coroutines

+ +

+Lua supports coroutines, +also called collaborative multithreading. +A coroutine in Lua represents an independent thread of execution. +Unlike threads in multithread systems, however, +a coroutine only suspends its execution by explicitly calling +a yield function. + + +

+You create a coroutine by calling coroutine.create. +Its sole argument is a function +that is the main function of the coroutine. +The create function only creates a new coroutine and +returns a handle to it (an object of type thread); +it does not start the coroutine. + + +

+You execute a coroutine by calling coroutine.resume. +When you first call coroutine.resume, +passing as its first argument +a thread returned by coroutine.create, +the coroutine starts its execution, +at the first line of its main function. +Extra arguments passed to coroutine.resume are passed on +to the coroutine main function. +After the coroutine starts running, +it runs until it terminates or yields. + + +

+A coroutine can terminate its execution in two ways: +normally, when its main function returns +(explicitly or implicitly, after the last instruction); +and abnormally, if there is an unprotected error. +In the first case, coroutine.resume returns true, +plus any values returned by the coroutine main function. +In case of errors, coroutine.resume returns false +plus an error message. + + +

+A coroutine yields by calling coroutine.yield. +When a coroutine yields, +the corresponding coroutine.resume returns immediately, +even if the yield happens inside nested function calls +(that is, not in the main function, +but in a function directly or indirectly called by the main function). +In the case of a yield, coroutine.resume also returns true, +plus any values passed to coroutine.yield. +The next time you resume the same coroutine, +it continues its execution from the point where it yielded, +with the call to coroutine.yield returning any extra +arguments passed to coroutine.resume. + + +

+Like coroutine.create, +the coroutine.wrap function also creates a coroutine, +but instead of returning the coroutine itself, +it returns a function that, when called, resumes the coroutine. +Any arguments passed to this function +go as extra arguments to coroutine.resume. +coroutine.wrap returns all the values returned by coroutine.resume, +except the first one (the boolean error code). +Unlike coroutine.resume, +coroutine.wrap does not catch errors; +any error is propagated to the caller. + + +

+As an example of how coroutines work, +consider the following code: + +

+     function foo (a)
+       print("foo", a)
+       return coroutine.yield(2*a)
+     end
+     
+     co = coroutine.create(function (a,b)
+           print("co-body", a, b)
+           local r = foo(a+1)
+           print("co-body", r)
+           local r, s = coroutine.yield(a+b, a-b)
+           print("co-body", r, s)
+           return b, "end"
+     end)
+     
+     print("main", coroutine.resume(co, 1, 10))
+     print("main", coroutine.resume(co, "r"))
+     print("main", coroutine.resume(co, "x", "y"))
+     print("main", coroutine.resume(co, "x", "y"))
+

+When you run it, it produces the following output: + +

+     co-body 1       10
+     foo     2
+     main    true    4
+     co-body r
+     main    true    11      -9
+     co-body x       y
+     main    true    10      end
+     main    false   cannot resume dead coroutine
+
+ +

+You can also create and manipulate coroutines through the C API: +see functions lua_newthread, lua_resume, +and lua_yield. + + + + + +

3 – The Language

+ +

+This section describes the lexis, the syntax, and the semantics of Lua. +In other words, +this section describes +which tokens are valid, +how they can be combined, +and what their combinations mean. + + +

+Language constructs will be explained using the usual extended BNF notation, +in which +{a} means 0 or more a's, and +[a] means an optional a. +Non-terminals are shown like non-terminal, +keywords are shown like kword, +and other terminal symbols are shown like ‘=’. +The complete syntax of Lua can be found in §9 +at the end of this manual. + + + +

3.1 – Lexical Conventions

+ +

+Lua is a free-form language. +It ignores spaces (including new lines) and comments +between lexical elements (tokens), +except as delimiters between names and keywords. + + +

+Names +(also called identifiers) +in Lua can be any string of letters, +digits, and underscores, +not beginning with a digit. +Identifiers are used to name variables, table fields, and labels. + + +

+The following keywords are reserved +and cannot be used as names: + + +

+     and       break     do        else      elseif    end
+     false     for       function  goto      if        in
+     local     nil       not       or        repeat    return
+     then      true      until     while
+
+ +

+Lua is a case-sensitive language: +and is a reserved word, but And and AND +are two different, valid names. +As a convention, names starting with an underscore followed by +uppercase letters (such as _VERSION) +are reserved for variables used by Lua. + + +

+The following strings denote other tokens: + +

+     +     -     *     /     %     ^     #
+     ==    ~=    <=    >=    <     >     =
+     (     )     {     }     [     ]     ::
+     ;     :     ,     .     ..    ...
+
+ +

+Literal strings +can be delimited by matching single or double quotes, +and can contain the following C-like escape sequences: +'\a' (bell), +'\b' (backspace), +'\f' (form feed), +'\n' (newline), +'\r' (carriage return), +'\t' (horizontal tab), +'\v' (vertical tab), +'\\' (backslash), +'\"' (quotation mark [double quote]), +and '\'' (apostrophe [single quote]). +A backslash followed by a real newline +results in a newline in the string. +The escape sequence '\z' skips the following span +of white-space characters, +including line breaks; +it is particularly useful to break and indent a long literal string +into multiple lines without adding the newlines and spaces +into the string contents. + + +

+A byte in a literal string can also be specified by its numerical value. +This can be done with the escape sequence \xXX, +where XX is a sequence of exactly two hexadecimal digits, +or with the escape sequence \ddd, +where ddd is a sequence of up to three decimal digits. +(Note that if a decimal escape is to be followed by a digit, +it must be expressed using exactly three digits.) +Strings in Lua can contain any 8-bit value, including embedded zeros, +which can be specified as '\0'. + + +

+Literal strings can also be defined using a long format +enclosed by long brackets. +We define an opening long bracket of level n as an opening +square bracket followed by n equal signs followed by another +opening square bracket. +So, an opening long bracket of level 0 is written as [[, +an opening long bracket of level 1 is written as [=[, +and so on. +A closing long bracket is defined similarly; +for instance, a closing long bracket of level 4 is written as ]====]. +A long literal starts with an opening long bracket of any level and +ends at the first closing long bracket of the same level. +It can contain any text except a closing bracket of the proper level. +Literals in this bracketed form can run for several lines, +do not interpret any escape sequences, +and ignore long brackets of any other level. +Any kind of end-of-line sequence +(carriage return, newline, carriage return followed by newline, +or newline followed by carriage return) +is converted to a simple newline. + + +

+Any byte in a literal string not +explicitly affected by the previous rules represents itself. +However, Lua opens files for parsing in text mode, +and the system file functions may have problems with +some control characters. +So, it is safer to represent +non-text data as a quoted literal with +explicit escape sequences for non-text characters. + + +

+For convenience, +when the opening long bracket is immediately followed by a newline, +the newline is not included in the string. +As an example, in a system using ASCII +(in which 'a' is coded as 97, +newline is coded as 10, and '1' is coded as 49), +the five literal strings below denote the same string: + +

+     a = 'alo\n123"'
+     a = "alo\n123\""
+     a = '\97lo\10\04923"'
+     a = [[alo
+     123"]]
+     a = [==[
+     alo
+     123"]==]
+
+ +

+A numerical constant can be written with an optional fractional part +and an optional decimal exponent, +marked by a letter 'e' or 'E'. +Lua also accepts hexadecimal constants, +which start with 0x or 0X. +Hexadecimal constants also accept an optional fractional part +plus an optional binary exponent, +marked by a letter 'p' or 'P'. +Examples of valid numerical constants are + +

+     3     3.0     3.1416     314.16e-2     0.31416E1
+     0xff  0x0.1E  0xA23p-4   0X1.921FB54442D18P+1
+
+ +

+A comment starts with a double hyphen (--) +anywhere outside a string. +If the text immediately after -- is not an opening long bracket, +the comment is a short comment, +which runs until the end of the line. +Otherwise, it is a long comment, +which runs until the corresponding closing long bracket. +Long comments are frequently used to disable code temporarily. + + + + + +

3.2 – Variables

+ +

+Variables are places that store values. +There are three kinds of variables in Lua: +global variables, local variables, and table fields. + + +

+A single name can denote a global variable or a local variable +(or a function's formal parameter, +which is a particular kind of local variable): + +

+	var ::= Name
+

+Name denotes identifiers, as defined in §3.1. + + +

+Any variable name is assumed to be global unless explicitly declared +as a local (see §3.3.7). +Local variables are lexically scoped: +local variables can be freely accessed by functions +defined inside their scope (see §3.5). + + +

+Before the first assignment to a variable, its value is nil. + + +

+Square brackets are used to index a table: + +

+	var ::= prefixexp ‘[’ exp ‘]’
+

+The meaning of accesses to table fields can be changed via metatables. +An access to an indexed variable t[i] is equivalent to +a call gettable_event(t,i). +(See §2.4 for a complete description of the +gettable_event function. +This function is not defined or callable in Lua. +We use it here only for explanatory purposes.) + + +

+The syntax var.Name is just syntactic sugar for +var["Name"]: + +

+	var ::= prefixexp ‘.’ Name
+
+ +

+An access to a global variable x +is equivalent to _ENV.x. +Due to the way that chunks are compiled, +_ENV is never a global name (see §2.2). + + + + + +

3.3 – Statements

+ +

+Lua supports an almost conventional set of statements, +similar to those in Pascal or C. +This set includes +assignments, control structures, function calls, +and variable declarations. + + + +

3.3.1 – Blocks

+ +

+A block is a list of statements, +which are executed sequentially: + +

+	block ::= {stat}
+

+Lua has empty statements +that allow you to separate statements with semicolons, +start a block with a semicolon +or write two semicolons in sequence: + +

+	stat ::= ‘;’
+
+ +

+Function calls and assignments +can start with an open parenthesis. +This possibility leads to an ambiguity in Lua's grammar. +Consider the following fragment: + +

+     a = b + c
+     (print or io.write)('done')
+

+The grammar could see it in two ways: + +

+     a = b + c(print or io.write)('done')
+     
+     a = b + c; (print or io.write)('done')
+

+The current parser always sees such constructions +in the first way, +interpreting the open parenthesis +as the start of the arguments to a call. +To avoid this ambiguity, +it is a good practice to always precede with a semicolon +statements that start with a parenthesis: + +

+     ;(print or io.write)('done')
+
+ +

+A block can be explicitly delimited to produce a single statement: + +

+	stat ::= do block end
+

+Explicit blocks are useful +to control the scope of variable declarations. +Explicit blocks are also sometimes used to +add a return statement in the middle +of another block (see §3.3.4). + + + + + +

3.3.2 – Chunks

+ +

+The unit of compilation of Lua is called a chunk. +Syntactically, +a chunk is simply a block: + +

+	chunk ::= block
+
+ +

+Lua handles a chunk as the body of an anonymous function +with a variable number of arguments +(see §3.4.10). +As such, chunks can define local variables, +receive arguments, and return values. +Moreover, such anonymous function is compiled as in the +scope of an external local variable called _ENV (see §2.2). +The resulting function always has _ENV as its only upvalue, +even if it does not use that variable. + + +

+A chunk can be stored in a file or in a string inside the host program. +To execute a chunk, +Lua first precompiles the chunk into instructions for a virtual machine, +and then it executes the compiled code +with an interpreter for the virtual machine. + + +

+Chunks can also be precompiled into binary form; +see program luac for details. +Programs in source and compiled forms are interchangeable; +Lua automatically detects the file type and acts accordingly. + + + + + + +

3.3.3 – Assignment

+ +

+Lua allows multiple assignments. +Therefore, the syntax for assignment +defines a list of variables on the left side +and a list of expressions on the right side. +The elements in both lists are separated by commas: + +

+	stat ::= varlist ‘=’ explist
+	varlist ::= var {‘,’ var}
+	explist ::= exp {‘,’ exp}
+

+Expressions are discussed in §3.4. + + +

+Before the assignment, +the list of values is adjusted to the length of +the list of variables. +If there are more values than needed, +the excess values are thrown away. +If there are fewer values than needed, +the list is extended with as many nil's as needed. +If the list of expressions ends with a function call, +then all values returned by that call enter the list of values, +before the adjustment +(except when the call is enclosed in parentheses; see §3.4). + + +

+The assignment statement first evaluates all its expressions +and only then are the assignments performed. +Thus the code + +

+     i = 3
+     i, a[i] = i+1, 20
+

+sets a[3] to 20, without affecting a[4] +because the i in a[i] is evaluated (to 3) +before it is assigned 4. +Similarly, the line + +

+     x, y = y, x
+

+exchanges the values of x and y, +and + +

+     x, y, z = y, z, x
+

+cyclically permutes the values of x, y, and z. + + +

+The meaning of assignments to global variables +and table fields can be changed via metatables. +An assignment to an indexed variable t[i] = val is equivalent to +settable_event(t,i,val). +(See §2.4 for a complete description of the +settable_event function. +This function is not defined or callable in Lua. +We use it here only for explanatory purposes.) + + +

+An assignment to a global variable x = val +is equivalent to the assignment +_ENV.x = val (see §2.2). + + + + + +

3.3.4 – Control Structures

+The control structures +if, while, and repeat have the usual meaning and +familiar syntax: + + + + +

+	stat ::= while exp do block end
+	stat ::= repeat block until exp
+	stat ::= if exp then block {elseif exp then block} [else block] end
+

+Lua also has a for statement, in two flavors (see §3.3.5). + + +

+The condition expression of a +control structure can return any value. +Both false and nil are considered false. +All values different from nil and false are considered true +(in particular, the number 0 and the empty string are also true). + + +

+In the repeat–until loop, +the inner block does not end at the until keyword, +but only after the condition. +So, the condition can refer to local variables +declared inside the loop block. + + +

+The goto statement transfers the program control to a label. +For syntactical reasons, +labels in Lua are considered statements too: + + + +

+	stat ::= goto Name
+	stat ::= label
+	label ::= ‘::’ Name ‘::’
+
+ +

+A label is visible in the entire block where it is defined, +except +inside nested blocks where a label with the same name is defined and +inside nested functions. +A goto may jump to any visible label as long as it does not +enter into the scope of a local variable. + + +

+Labels and empty statements are called void statements, +as they perform no actions. + + +

+The break statement terminates the execution of a +while, repeat, or for loop, +skipping to the next statement after the loop: + + +

+	stat ::= break
+

+A break ends the innermost enclosing loop. + + +

+The return statement is used to return values +from a function or a chunk (which is a function in disguise). + +Functions can return more than one value, +so the syntax for the return statement is + +

+	stat ::= return [explist] [‘;’]
+
+ +

+The return statement can only be written +as the last statement of a block. +If it is really necessary to return in the middle of a block, +then an explicit inner block can be used, +as in the idiom do return end, +because now return is the last statement in its (inner) block. + + + + + +

3.3.5 – For Statement

+ +

+ +The for statement has two forms: +one numeric and one generic. + + +

+The numeric for loop repeats a block of code while a +control variable runs through an arithmetic progression. +It has the following syntax: + +

+	stat ::= for Name ‘=’ exp ‘,’ exp [‘,’ exp] do block end
+

+The block is repeated for name starting at the value of +the first exp, until it passes the second exp by steps of the +third exp. +More precisely, a for statement like + +

+     for v = e1, e2, e3 do block end
+

+is equivalent to the code: + +

+     do
+       local var, limit, step = tonumber(e1), tonumber(e2), tonumber(e3)
+       if not (var and limit and step) then error() end
+       while (step > 0 and var <= limit) or (step <= 0 and var >= limit) do
+         local v = var
+         block
+         var = var + step
+       end
+     end
+

+Note the following: + +

    + +
  • +All three control expressions are evaluated only once, +before the loop starts. +They must all result in numbers. +
  • + +
  • +var, limit, and step are invisible variables. +The names shown here are for explanatory purposes only. +
  • + +
  • +If the third expression (the step) is absent, +then a step of 1 is used. +
  • + +
  • +You can use break to exit a for loop. +
  • + +
  • +The loop variable v is local to the loop; +you cannot use its value after the for ends or is broken. +If you need this value, +assign it to another variable before breaking or exiting the loop. +
  • + +
+ +

+The generic for statement works over functions, +called iterators. +On each iteration, the iterator function is called to produce a new value, +stopping when this new value is nil. +The generic for loop has the following syntax: + +

+	stat ::= for namelist in explist do block end
+	namelist ::= Name {‘,’ Name}
+

+A for statement like + +

+     for var_1, ···, var_n in explist do block end
+

+is equivalent to the code: + +

+     do
+       local f, s, var = explist
+       while true do
+         local var_1, ···, var_n = f(s, var)
+         if var_1 == nil then break end
+         var = var_1
+         block
+       end
+     end
+

+Note the following: + +

    + +
  • +explist is evaluated only once. +Its results are an iterator function, +a state, +and an initial value for the first iterator variable. +
  • + +
  • +f, s, and var are invisible variables. +The names are here for explanatory purposes only. +
  • + +
  • +You can use break to exit a for loop. +
  • + +
  • +The loop variables var_i are local to the loop; +you cannot use their values after the for ends. +If you need these values, +then assign them to other variables before breaking or exiting the loop. +
  • + +
+ + + + +

3.3.6 – Function Calls as Statements

+To allow possible side-effects, +function calls can be executed as statements: + +

+	stat ::= functioncall
+

+In this case, all returned values are thrown away. +Function calls are explained in §3.4.9. + + + + + +

3.3.7 – Local Declarations

+Local variables can be declared anywhere inside a block. +The declaration can include an initial assignment: + +

+	stat ::= local namelist [‘=’ explist]
+

+If present, an initial assignment has the same semantics +of a multiple assignment (see §3.3.3). +Otherwise, all variables are initialized with nil. + + +

+A chunk is also a block (see §3.3.2), +and so local variables can be declared in a chunk outside any explicit block. + + +

+The visibility rules for local variables are explained in §3.5. + + + + + + + +

3.4 – Expressions

+ +

+The basic expressions in Lua are the following: + +

+	exp ::= prefixexp
+	exp ::= nil | false | true
+	exp ::= Number
+	exp ::= String
+	exp ::= functiondef
+	exp ::= tableconstructor
+	exp ::= ‘...’
+	exp ::= exp binop exp
+	exp ::= unop exp
+	prefixexp ::= var | functioncall | ‘(’ exp ‘)’
+
+ +

+Numbers and literal strings are explained in §3.1; +variables are explained in §3.2; +function definitions are explained in §3.4.10; +function calls are explained in §3.4.9; +table constructors are explained in §3.4.8. +Vararg expressions, +denoted by three dots ('...'), can only be used when +directly inside a vararg function; +they are explained in §3.4.10. + + +

+Binary operators comprise arithmetic operators (see §3.4.1), +relational operators (see §3.4.3), logical operators (see §3.4.4), +and the concatenation operator (see §3.4.5). +Unary operators comprise the unary minus (see §3.4.1), +the unary not (see §3.4.4), +and the unary length operator (see §3.4.6). + + +

+Both function calls and vararg expressions can result in multiple values. +If a function call is used as a statement (see §3.3.6), +then its return list is adjusted to zero elements, +thus discarding all returned values. +If an expression is used as the last (or the only) element +of a list of expressions, +then no adjustment is made +(unless the expression is enclosed in parentheses). +In all other contexts, +Lua adjusts the result list to one element, +either discarding all values except the first one +or adding a single nil if there are no values. + + +

+Here are some examples: + +

+     f()                -- adjusted to 0 results
+     g(f(), x)          -- f() is adjusted to 1 result
+     g(x, f())          -- g gets x plus all results from f()
+     a,b,c = f(), x     -- f() is adjusted to 1 result (c gets nil)
+     a,b = ...          -- a gets the first vararg parameter, b gets
+                        -- the second (both a and b can get nil if there
+                        -- is no corresponding vararg parameter)
+     
+     a,b,c = x, f()     -- f() is adjusted to 2 results
+     a,b,c = f()        -- f() is adjusted to 3 results
+     return f()         -- returns all results from f()
+     return ...         -- returns all received vararg parameters
+     return x,y,f()     -- returns x, y, and all results from f()
+     {f()}              -- creates a list with all results from f()
+     {...}              -- creates a list with all vararg parameters
+     {f(), nil}         -- f() is adjusted to 1 result
+
+ +

+Any expression enclosed in parentheses always results in only one value. +Thus, +(f(x,y,z)) is always a single value, +even if f returns several values. +(The value of (f(x,y,z)) is the first value returned by f +or nil if f does not return any values.) + + + +

3.4.1 – Arithmetic Operators

+Lua supports the usual arithmetic operators: +the binary + (addition), +- (subtraction), * (multiplication), +/ (division), % (modulo), and ^ (exponentiation); +and unary - (mathematical negation). +If the operands are numbers, or strings that can be converted to +numbers (see §3.4.2), +then all operations have the usual meaning. +Exponentiation works for any exponent. +For instance, x^(-0.5) computes the inverse of the square root of x. +Modulo is defined as + +

+     a % b == a - math.floor(a/b)*b
+

+That is, it is the remainder of a division that rounds +the quotient towards minus infinity. + + + + + +

3.4.2 – Coercion

+ +

+Lua provides automatic conversion between +string and number values at run time. +Any arithmetic operation applied to a string tries to convert +this string to a number, following the rules of the Lua lexer. +(The string may have leading and trailing spaces and a sign.) +Conversely, whenever a number is used where a string is expected, +the number is converted to a string, in a reasonable format. +For complete control over how numbers are converted to strings, +use the format function from the string library +(see string.format). + + + + + +

3.4.3 – Relational Operators

+The relational operators in Lua are + +

+     ==    ~=    <     >     <=    >=
+

+These operators always result in false or true. + + +

+Equality (==) first compares the type of its operands. +If the types are different, then the result is false. +Otherwise, the values of the operands are compared. +Numbers and strings are compared in the usual way. +Tables, userdata, and threads +are compared by reference: +two objects are considered equal only if they are the same object. +Every time you create a new object +(a table, userdata, or thread), +this new object is different from any previously existing object. +Closures with the same reference are always equal. +Closures with any detectable difference +(different behavior, different definition) are always different. + + +

+You can change the way that Lua compares tables and userdata +by using the "eq" metamethod (see §2.4). + + +

+The conversion rules of §3.4.2 +do not apply to equality comparisons. +Thus, "0"==0 evaluates to false, +and t[0] and t["0"] denote different +entries in a table. + + +

+The operator ~= is exactly the negation of equality (==). + + +

+The order operators work as follows. +If both arguments are numbers, then they are compared as such. +Otherwise, if both arguments are strings, +then their values are compared according to the current locale. +Otherwise, Lua tries to call the "lt" or the "le" +metamethod (see §2.4). +A comparison a > b is translated to b < a +and a >= b is translated to b <= a. + + + + + +

3.4.4 – Logical Operators

+The logical operators in Lua are +and, or, and not. +Like the control structures (see §3.3.4), +all logical operators consider both false and nil as false +and anything else as true. + + +

+The negation operator not always returns false or true. +The conjunction operator and returns its first argument +if this value is false or nil; +otherwise, and returns its second argument. +The disjunction operator or returns its first argument +if this value is different from nil and false; +otherwise, or returns its second argument. +Both and and or use short-cut evaluation; +that is, +the second operand is evaluated only if necessary. +Here are some examples: + +

+     10 or 20            --> 10
+     10 or error()       --> 10
+     nil or "a"          --> "a"
+     nil and 10          --> nil
+     false and error()   --> false
+     false and nil       --> false
+     false or nil        --> nil
+     10 and 20           --> 20
+

+(In this manual, +--> indicates the result of the preceding expression.) + + + + + +

3.4.5 – Concatenation

+The string concatenation operator in Lua is +denoted by two dots ('..'). +If both operands are strings or numbers, then they are converted to +strings according to the rules mentioned in §3.4.2. +Otherwise, the __concat metamethod is called (see §2.4). + + + + + +

3.4.6 – The Length Operator

+ +

+The length operator is denoted by the unary prefix operator #. +The length of a string is its number of bytes +(that is, the usual meaning of string length when each +character is one byte). + + +

+A program can modify the behavior of the length operator for +any value but strings through the __len metamethod (see §2.4). + + +

+Unless a __len metamethod is given, +the length of a table t is only defined if the +table is a sequence, +that is, +the set of its positive numeric keys is equal to {1..n} +for some integer n. +In that case, n is its length. +Note that a table like + +

+     {10, 20, nil, 40}
+

+is not a sequence, because it has the key 4 +but does not have the key 3. +(So, there is no n such that the set {1..n} is equal +to the set of positive numeric keys of that table.) +Note, however, that non-numeric keys do not interfere +with whether a table is a sequence. + + + + + +

3.4.7 – Precedence

+Operator precedence in Lua follows the table below, +from lower to higher priority: + +

+     or
+     and
+     <     >     <=    >=    ~=    ==
+     ..
+     +     -
+     *     /     %
+     not   #     - (unary)
+     ^
+

+As usual, +you can use parentheses to change the precedences of an expression. +The concatenation ('..') and exponentiation ('^') +operators are right associative. +All other binary operators are left associative. + + + + + +

3.4.8 – Table Constructors

+Table constructors are expressions that create tables. +Every time a constructor is evaluated, a new table is created. +A constructor can be used to create an empty table +or to create a table and initialize some of its fields. +The general syntax for constructors is + +

+	tableconstructor ::= ‘{’ [fieldlist] ‘}’
+	fieldlist ::= field {fieldsep field} [fieldsep]
+	field ::= ‘[’ exp ‘]’ ‘=’ exp | Name ‘=’ exp | exp
+	fieldsep ::= ‘,’ | ‘;’
+
+ +

+Each field of the form [exp1] = exp2 adds to the new table an entry +with key exp1 and value exp2. +A field of the form name = exp is equivalent to +["name"] = exp. +Finally, fields of the form exp are equivalent to +[i] = exp, where i are consecutive numerical integers, +starting with 1. +Fields in the other formats do not affect this counting. +For example, + +

+     a = { [f(1)] = g; "x", "y"; x = 1, f(x), [30] = 23; 45 }
+

+is equivalent to + +

+     do
+       local t = {}
+       t[f(1)] = g
+       t[1] = "x"         -- 1st exp
+       t[2] = "y"         -- 2nd exp
+       t.x = 1            -- t["x"] = 1
+       t[3] = f(x)        -- 3rd exp
+       t[30] = 23
+       t[4] = 45          -- 4th exp
+       a = t
+     end
+
+ +

+If the last field in the list has the form exp +and the expression is a function call or a vararg expression, +then all values returned by this expression enter the list consecutively +(see §3.4.9). + + +

+The field list can have an optional trailing separator, +as a convenience for machine-generated code. + + + + + +

3.4.9 – Function Calls

+A function call in Lua has the following syntax: + +

+	functioncall ::= prefixexp args
+

+In a function call, +first prefixexp and args are evaluated. +If the value of prefixexp has type function, +then this function is called +with the given arguments. +Otherwise, the prefixexp "call" metamethod is called, +having as first parameter the value of prefixexp, +followed by the original call arguments +(see §2.4). + + +

+The form + +

+	functioncall ::= prefixexp ‘:’ Name args
+

+can be used to call "methods". +A call v:name(args) +is syntactic sugar for v.name(v,args), +except that v is evaluated only once. + + +

+Arguments have the following syntax: + +

+	args ::= ‘(’ [explist] ‘)’
+	args ::= tableconstructor
+	args ::= String
+

+All argument expressions are evaluated before the call. +A call of the form f{fields} is +syntactic sugar for f({fields}); +that is, the argument list is a single new table. +A call of the form f'string' +(or f"string" or f[[string]]) +is syntactic sugar for f('string'); +that is, the argument list is a single literal string. + + +

+A call of the form return functioncall is called +a tail call. +Lua implements proper tail calls +(or proper tail recursion): +in a tail call, +the called function reuses the stack entry of the calling function. +Therefore, there is no limit on the number of nested tail calls that +a program can execute. +However, a tail call erases any debug information about the +calling function. +Note that a tail call only happens with a particular syntax, +where the return has one single function call as argument; +this syntax makes the calling function return exactly +the returns of the called function. +So, none of the following examples are tail calls: + +

+     return (f(x))        -- results adjusted to 1
+     return 2 * f(x)
+     return x, f(x)       -- additional results
+     f(x); return         -- results discarded
+     return x or f(x)     -- results adjusted to 1
+
+ + + + +

3.4.10 – Function Definitions

+ +

+The syntax for function definition is + +

+	functiondef ::= function funcbody
+	funcbody ::= ‘(’ [parlist] ‘)’ block end
+
+ +

+The following syntactic sugar simplifies function definitions: + +

+	stat ::= function funcname funcbody
+	stat ::= local function Name funcbody
+	funcname ::= Name {‘.’ Name} [‘:’ Name]
+

+The statement + +

+     function f () body end
+

+translates to + +

+     f = function () body end
+

+The statement + +

+     function t.a.b.c.f () body end
+

+translates to + +

+     t.a.b.c.f = function () body end
+

+The statement + +

+     local function f () body end
+

+translates to + +

+     local f; f = function () body end
+

+not to + +

+     local f = function () body end
+

+(This only makes a difference when the body of the function +contains references to f.) + + +

+A function definition is an executable expression, +whose value has type function. +When Lua precompiles a chunk, +all its function bodies are precompiled too. +Then, whenever Lua executes the function definition, +the function is instantiated (or closed). +This function instance (or closure) +is the final value of the expression. + + +

+Parameters act as local variables that are +initialized with the argument values: + +

+	parlist ::= namelist [‘,’ ‘...’] | ‘...’
+

+When a function is called, +the list of arguments is adjusted to +the length of the list of parameters, +unless the function is a vararg function, +which is indicated by three dots ('...') +at the end of its parameter list. +A vararg function does not adjust its argument list; +instead, it collects all extra arguments and supplies them +to the function through a vararg expression, +which is also written as three dots. +The value of this expression is a list of all actual extra arguments, +similar to a function with multiple results. +If a vararg expression is used inside another expression +or in the middle of a list of expressions, +then its return list is adjusted to one element. +If the expression is used as the last element of a list of expressions, +then no adjustment is made +(unless that last expression is enclosed in parentheses). + + +

+As an example, consider the following definitions: + +

+     function f(a, b) end
+     function g(a, b, ...) end
+     function r() return 1,2,3 end
+

+Then, we have the following mapping from arguments to parameters and +to the vararg expression: + +

+     CALL            PARAMETERS
+     
+     f(3)             a=3, b=nil
+     f(3, 4)          a=3, b=4
+     f(3, 4, 5)       a=3, b=4
+     f(r(), 10)       a=1, b=10
+     f(r())           a=1, b=2
+     
+     g(3)             a=3, b=nil, ... -->  (nothing)
+     g(3, 4)          a=3, b=4,   ... -->  (nothing)
+     g(3, 4, 5, 8)    a=3, b=4,   ... -->  5  8
+     g(5, r())        a=5, b=1,   ... -->  2  3
+
+ +

+Results are returned using the return statement (see §3.3.4). +If control reaches the end of a function +without encountering a return statement, +then the function returns with no results. + + +

+ +There is a system-dependent limit on the number of values +that a function may return. +This limit is guaranteed to be larger than 1000. + + +

+The colon syntax +is used for defining methods, +that is, functions that have an implicit extra parameter self. +Thus, the statement + +

+     function t.a.b.c:f (params) body end
+

+is syntactic sugar for + +

+     t.a.b.c.f = function (self, params) body end
+
+ + + + + + +

3.5 – Visibility Rules

+ +

+ +Lua is a lexically scoped language. +The scope of a local variable begins at the first statement after +its declaration and lasts until the last non-void statement +of the innermost block that includes the declaration. +Consider the following example: + +

+     x = 10                -- global variable
+     do                    -- new block
+       local x = x         -- new 'x', with value 10
+       print(x)            --> 10
+       x = x+1
+       do                  -- another block
+         local x = x+1     -- another 'x'
+         print(x)          --> 12
+       end
+       print(x)            --> 11
+     end
+     print(x)              --> 10  (the global one)
+
+ +

+Notice that, in a declaration like local x = x, +the new x being declared is not in scope yet, +and so the second x refers to the outside variable. + + +

+Because of the lexical scoping rules, +local variables can be freely accessed by functions +defined inside their scope. +A local variable used by an inner function is called +an upvalue, or external local variable, +inside the inner function. + + +

+Notice that each execution of a local statement +defines new local variables. +Consider the following example: + +

+     a = {}
+     local x = 20
+     for i=1,10 do
+       local y = 0
+       a[i] = function () y=y+1; return x+y end
+     end
+

+The loop creates ten closures +(that is, ten instances of the anonymous function). +Each of these closures uses a different y variable, +while all of them share the same x. + + + + + +

4 – The Application Program Interface

+ +

+ +This section describes the C API for Lua, that is, +the set of C functions available to the host program to communicate +with Lua. +All API functions and related types and constants +are declared in the header file lua.h. + + +

+Even when we use the term "function", +any facility in the API may be provided as a macro instead. +Except where stated otherwise, +all such macros use each of their arguments exactly once +(except for the first argument, which is always a Lua state), +and so do not generate any hidden side-effects. + + +

+As in most C libraries, +the Lua API functions do not check their arguments for validity or consistency. +However, you can change this behavior by compiling Lua +with the macro LUA_USE_APICHECK defined. + + + +

4.1 – The Stack

+ +

+Lua uses a virtual stack to pass values to and from C. +Each element in this stack represents a Lua value +(nil, number, string, etc.). + + +

+Whenever Lua calls C, the called function gets a new stack, +which is independent of previous stacks and of stacks of +C functions that are still active. +This stack initially contains any arguments to the C function +and it is where the C function pushes its results +to be returned to the caller (see lua_CFunction). + + +

+For convenience, +most query operations in the API do not follow a strict stack discipline. +Instead, they can refer to any element in the stack +by using an index: +A positive index represents an absolute stack position +(starting at 1); +a negative index represents an offset relative to the top of the stack. +More specifically, if the stack has n elements, +then index 1 represents the first element +(that is, the element that was pushed onto the stack first) +and +index n represents the last element; +index -1 also represents the last element +(that is, the element at the top) +and index -n represents the first element. + + + + + +

4.2 – Stack Size

+ +

+When you interact with the Lua API, +you are responsible for ensuring consistency. +In particular, +you are responsible for controlling stack overflow. +You can use the function lua_checkstack +to ensure that the stack has extra slots when pushing new elements. + + +

+Whenever Lua calls C, +it ensures that the stack has at least LUA_MINSTACK extra slots. +LUA_MINSTACK is defined as 20, +so that usually you do not have to worry about stack space +unless your code has loops pushing elements onto the stack. + + +

+When you call a Lua function +without a fixed number of results (see lua_call), +Lua ensures that the stack has enough size for all results, +but it does not ensure any extra space. +So, before pushing anything in the stack after such a call +you should use lua_checkstack. + + + + + +

4.3 – Valid and Acceptable Indices

+ +

+Any function in the API that receives stack indices +works only with valid indices or acceptable indices. + + +

+A valid index is an index that refers to a +real position within the stack, that is, +its position lies between 1 and the stack top +(1 ≤ abs(index) ≤ top). + +Usually, functions that can modify the value at an index +require valid indices. + + +

+Unless otherwise noted, +any function that accepts valid indices also accepts pseudo-indices, +which represent some Lua values that are accessible to C code +but which are not in the stack. +Pseudo-indices are used to access the registry +and the upvalues of a C function (see §4.4). + + +

+Functions that do not need a specific stack position, +but only a value in the stack (e.g., query functions), +can be called with acceptable indices. +An acceptable index can be any valid index, +including the pseudo-indices, +but it also can be any positive index after the stack top +within the space allocated for the stack, +that is, indices up to the stack size. +(Note that 0 is never an acceptable index.) +Except when noted otherwise, +functions in the API work with acceptable indices. + + +

+Acceptable indices serve to avoid extra tests +against the stack top when querying the stack. +For instance, a C function can query its third argument +without the need to first check whether there is a third argument, +that is, without the need to check whether 3 is a valid index. + + +

+For functions that can be called with acceptable indices, +any non-valid index is treated as if it +contains a value of a virtual type LUA_TNONE, +which behaves like a nil value. + + + + + +

4.4 – C Closures

+ +

+When a C function is created, +it is possible to associate some values with it, +thus creating a C closure +(see lua_pushcclosure); +these values are called upvalues and are +accessible to the function whenever it is called. + + +

+Whenever a C function is called, +its upvalues are located at specific pseudo-indices. +These pseudo-indices are produced by the macro +lua_upvalueindex. +The first value associated with a function is at position +lua_upvalueindex(1), and so on. +Any access to lua_upvalueindex(n), +where n is greater than the number of upvalues of the +current function (but not greater than 256), +produces an acceptable but invalid index. + + + + + +

4.5 – Registry

+ +

+Lua provides a registry, +a predefined table that can be used by any C code to +store whatever Lua values it needs to store. +The registry table is always located at pseudo-index +LUA_REGISTRYINDEX, +which is a valid index. +Any C library can store data into this table, +but it should take care to choose keys +that are different from those used +by other libraries, to avoid collisions. +Typically, you should use as key a string containing your library name, +or a light userdata with the address of a C object in your code, +or any Lua object created by your code. +As with global names, +string keys starting with an underscore followed by +uppercase letters are reserved for Lua. + + +

+The integer keys in the registry are used by the reference mechanism, +implemented by the auxiliary library, +and by some predefined values. +Therefore, integer keys should not be used for other purposes. + + +

+When you create a new Lua state, +its registry comes with some predefined values. +These predefined values are indexed with integer keys +defined as constants in lua.h. +The following constants are defined: + +

    +
  • LUA_RIDX_MAINTHREAD: At this index the registry has +the main thread of the state. +(The main thread is the one created together with the state.) +
  • + +
  • LUA_RIDX_GLOBALS: At this index the registry has +the global environment. +
  • +
+ + + + +

4.6 – Error Handling in C

+ +

+Internally, Lua uses the C longjmp facility to handle errors. +(You can also choose to use exceptions if you compile Lua as C++; +search for LUAI_THROW in the source code.) +When Lua faces any error +(such as a memory allocation error, type errors, syntax errors, +and runtime errors) +it raises an error; +that is, it does a long jump. +A protected environment uses setjmp +to set a recovery point; +any error jumps to the most recent active recovery point. + + +

+If an error happens outside any protected environment, +Lua calls a panic function (see lua_atpanic) +and then calls abort, +thus exiting the host application. +Your panic function can avoid this exit by +never returning +(e.g., doing a long jump to your own recovery point outside Lua). + + +

+The panic function runs as if it were a message handler (see §2.3); +in particular, the error message is at the top of the stack. +However, there is no guarantees about stack space. +To push anything on the stack, +the panic function should first check the available space (see §4.2). + + +

+Most functions in the API can throw an error, +for instance due to a memory allocation error. +The documentation for each function indicates whether +it can throw errors. + + +

+Inside a C function you can throw an error by calling lua_error. + + + + + +

4.7 – Handling Yields in C

+ +

+Internally, Lua uses the C longjmp facility to yield a coroutine. +Therefore, if a function foo calls an API function +and this API function yields +(directly or indirectly by calling another function that yields), +Lua cannot return to foo any more, +because the longjmp removes its frame from the C stack. + + +

+To avoid this kind of problem, +Lua raises an error whenever it tries to yield across an API call, +except for three functions: +lua_yieldk, lua_callk, and lua_pcallk. +All those functions receive a continuation function +(as a parameter called k) to continue execution after a yield. + + +

+We need to set some terminology to explain continuations. +We have a C function called from Lua which we will call +the original function. +This original function then calls one of those three functions in the C API, +which we will call the callee function, +that then yields the current thread. +(This can happen when the callee function is lua_yieldk, +or when the callee function is either lua_callk or lua_pcallk +and the function called by them yields.) + + +

+Suppose the running thread yields while executing the callee function. +After the thread resumes, +it eventually will finish running the callee function. +However, +the callee function cannot return to the original function, +because its frame in the C stack was destroyed by the yield. +Instead, Lua calls a continuation function, +which was given as an argument to the callee function. +As the name implies, +the continuation function should continue the task +of the original function. + + +

+Lua treats the continuation function as if it were the original function. +The continuation function receives the same Lua stack +from the original function, +in the same state it would be if the callee function had returned. +(For instance, +after a lua_callk the function and its arguments are +removed from the stack and replaced by the results from the call.) +It also has the same upvalues. +Whatever it returns is handled by Lua as if it were the return +of the original function. + + +

+The only difference in the Lua state between the original function +and its continuation is the result of a call to lua_getctx. + + + + + +

4.8 – Functions and Types

+ +

+Here we list all functions and types from the C API in +alphabetical order. +Each function has an indicator like this: +[-o, +p, x] + + +

+The first field, o, +is how many elements the function pops from the stack. +The second field, p, +is how many elements the function pushes onto the stack. +(Any function always pushes its results after popping its arguments.) +A field in the form x|y means the function can push (or pop) +x or y elements, +depending on the situation; +an interrogation mark '?' means that +we cannot know how many elements the function pops/pushes +by looking only at its arguments +(e.g., they may depend on what is on the stack). +The third field, x, +tells whether the function may throw errors: +'-' means the function never throws any error; +'e' means the function may throw errors; +'v' means the function may throw an error on purpose. + + + +


lua_absindex

+[-0, +0, –] +

int lua_absindex (lua_State *L, int idx);
+ +

+Converts the acceptable index idx into an absolute index +(that is, one that does not depend on the stack top). + + + + + +


lua_Alloc

+
typedef void * (*lua_Alloc) (void *ud,
+                             void *ptr,
+                             size_t osize,
+                             size_t nsize);
+ +

+The type of the memory-allocation function used by Lua states. +The allocator function must provide a +functionality similar to realloc, +but not exactly the same. +Its arguments are +ud, an opaque pointer passed to lua_newstate; +ptr, a pointer to the block being allocated/reallocated/freed; +osize, the original size of the block or some code about what +is being allocated; +nsize, the new size of the block. + + +

+When ptr is not NULL, +osize is the size of the block pointed by ptr, +that is, the size given when it was allocated or reallocated. + + +

+When ptr is NULL, +osize encodes the kind of object that Lua is allocating. +osize is any of +LUA_TSTRING, LUA_TTABLE, LUA_TFUNCTION, +LUA_TUSERDATA, or LUA_TTHREAD when (and only when) +Lua is creating a new object of that type. +When osize is some other value, +Lua is allocating memory for something else. + + +

+Lua assumes the following behavior from the allocator function: + + +

+When nsize is zero, +the allocator should behave like free +and return NULL. + + +

+When nsize is not zero, +the allocator should behave like realloc. +The allocator returns NULL +if and only if it cannot fulfill the request. +Lua assumes that the allocator never fails when +osize >= nsize. + + +

+Here is a simple implementation for the allocator function. +It is used in the auxiliary library by luaL_newstate. + +

+     static void *l_alloc (void *ud, void *ptr, size_t osize,
+                                                size_t nsize) {
+       (void)ud;  (void)osize;  /* not used */
+       if (nsize == 0) {
+         free(ptr);
+         return NULL;
+       }
+       else
+         return realloc(ptr, nsize);
+     }
+

+Note that Standard C ensures +that free(NULL) has no effect and that +realloc(NULL, size) is equivalent to malloc(size). +This code assumes that realloc does not fail when shrinking a block. +(Although Standard C does not ensure this behavior, +it seems to be a safe assumption.) + + + + + +


lua_arith

+[-(2|1), +1, e] +

void lua_arith (lua_State *L, int op);
+ +

+Performs an arithmetic operation over the two values +(or one, in the case of negation) +at the top of the stack, +with the value at the top being the second operand, +pops these values, and pushes the result of the operation. +The function follows the semantics of the corresponding Lua operator +(that is, it may call metamethods). + + +

+The value of op must be one of the following constants: + +

+ + + + +

lua_atpanic

+[-0, +0, –] +

lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf);
+ +

+Sets a new panic function and returns the old one (see §4.6). + + + + + +


lua_call

+[-(nargs+1), +nresults, e] +

void lua_call (lua_State *L, int nargs, int nresults);
+ +

+Calls a function. + + +

+To call a function you must use the following protocol: +first, the function to be called is pushed onto the stack; +then, the arguments to the function are pushed +in direct order; +that is, the first argument is pushed first. +Finally you call lua_call; +nargs is the number of arguments that you pushed onto the stack. +All arguments and the function value are popped from the stack +when the function is called. +The function results are pushed onto the stack when the function returns. +The number of results is adjusted to nresults, +unless nresults is LUA_MULTRET. +In this case, all results from the function are pushed. +Lua takes care that the returned values fit into the stack space. +The function results are pushed onto the stack in direct order +(the first result is pushed first), +so that after the call the last result is on the top of the stack. + + +

+Any error inside the called function is propagated upwards +(with a longjmp). + + +

+The following example shows how the host program can do the +equivalent to this Lua code: + +

+     a = f("how", t.x, 14)
+

+Here it is in C: + +

+     lua_getglobal(L, "f");                  /* function to be called */
+     lua_pushstring(L, "how");                        /* 1st argument */
+     lua_getglobal(L, "t");                    /* table to be indexed */
+     lua_getfield(L, -1, "x");        /* push result of t.x (2nd arg) */
+     lua_remove(L, -2);                  /* remove 't' from the stack */
+     lua_pushinteger(L, 14);                          /* 3rd argument */
+     lua_call(L, 3, 1);     /* call 'f' with 3 arguments and 1 result */
+     lua_setglobal(L, "a");                         /* set global 'a' */
+

+Note that the code above is "balanced": +at its end, the stack is back to its original configuration. +This is considered good programming practice. + + + + + +


lua_callk

+[-(nargs + 1), +nresults, e] +

void lua_callk (lua_State *L, int nargs, int nresults, int ctx,
+                lua_CFunction k);
+ +

+This function behaves exactly like lua_call, +but allows the called function to yield (see §4.7). + + + + + +


lua_CFunction

+
typedef int (*lua_CFunction) (lua_State *L);
+ +

+Type for C functions. + + +

+In order to communicate properly with Lua, +a C function must use the following protocol, +which defines the way parameters and results are passed: +a C function receives its arguments from Lua in its stack +in direct order (the first argument is pushed first). +So, when the function starts, +lua_gettop(L) returns the number of arguments received by the function. +The first argument (if any) is at index 1 +and its last argument is at index lua_gettop(L). +To return values to Lua, a C function just pushes them onto the stack, +in direct order (the first result is pushed first), +and returns the number of results. +Any other value in the stack below the results will be properly +discarded by Lua. +Like a Lua function, a C function called by Lua can also return +many results. + + +

+As an example, the following function receives a variable number +of numerical arguments and returns their average and sum: + +

+     static int foo (lua_State *L) {
+       int n = lua_gettop(L);    /* number of arguments */
+       lua_Number sum = 0;
+       int i;
+       for (i = 1; i <= n; i++) {
+         if (!lua_isnumber(L, i)) {
+           lua_pushstring(L, "incorrect argument");
+           lua_error(L);
+         }
+         sum += lua_tonumber(L, i);
+       }
+       lua_pushnumber(L, sum/n);        /* first result */
+       lua_pushnumber(L, sum);         /* second result */
+       return 2;                   /* number of results */
+     }
+
+ + + + +

lua_checkstack

+[-0, +0, –] +

int lua_checkstack (lua_State *L, int extra);
+ +

+Ensures that there are at least extra free stack slots in the stack. +It returns false if it cannot fulfill the request, +because it would cause the stack to be larger than a fixed maximum size +(typically at least a few thousand elements) or +because it cannot allocate memory for the new stack size. +This function never shrinks the stack; +if the stack is already larger than the new size, +it is left unchanged. + + + + + +


lua_close

+[-0, +0, –] +

void lua_close (lua_State *L);
+ +

+Destroys all objects in the given Lua state +(calling the corresponding garbage-collection metamethods, if any) +and frees all dynamic memory used by this state. +On several platforms, you may not need to call this function, +because all resources are naturally released when the host program ends. +On the other hand, long-running programs that create multiple states, +such as daemons or web servers, +might need to close states as soon as they are not needed. + + + + + +


lua_compare

+[-0, +0, e] +

int lua_compare (lua_State *L, int index1, int index2, int op);
+ +

+Compares two Lua values. +Returns 1 if the value at index index1 satisfies op +when compared with the value at index index2, +following the semantics of the corresponding Lua operator +(that is, it may call metamethods). +Otherwise returns 0. +Also returns 0 if any of the indices is non valid. + + +

+The value of op must be one of the following constants: + +

    + +
  • LUA_OPEQ: compares for equality (==)
  • +
  • LUA_OPLT: compares for less than (<)
  • +
  • LUA_OPLE: compares for less or equal (<=)
  • + +
+ + + + +

lua_concat

+[-n, +1, e] +

void lua_concat (lua_State *L, int n);
+ +

+Concatenates the n values at the top of the stack, +pops them, and leaves the result at the top. +If n is 1, the result is the single value on the stack +(that is, the function does nothing); +if n is 0, the result is the empty string. +Concatenation is performed following the usual semantics of Lua +(see §3.4.5). + + + + + +


lua_copy

+[-0, +0, –] +

void lua_copy (lua_State *L, int fromidx, int toidx);
+ +

+Moves the element at index fromidx +into the valid index toidx +without shifting any element +(therefore replacing the value at that position). + + + + + +


lua_createtable

+[-0, +1, e] +

void lua_createtable (lua_State *L, int narr, int nrec);
+ +

+Creates a new empty table and pushes it onto the stack. +Parameter narr is a hint for how many elements the table +will have as a sequence; +parameter nrec is a hint for how many other elements +the table will have. +Lua may use these hints to preallocate memory for the new table. +This pre-allocation is useful for performance when you know in advance +how many elements the table will have. +Otherwise you can use the function lua_newtable. + + + + + +


lua_dump

+[-0, +0, e] +

int lua_dump (lua_State *L, lua_Writer writer, void *data);
+ +

+Dumps a function as a binary chunk. +Receives a Lua function on the top of the stack +and produces a binary chunk that, +if loaded again, +results in a function equivalent to the one dumped. +As it produces parts of the chunk, +lua_dump calls function writer (see lua_Writer) +with the given data +to write them. + + +

+The value returned is the error code returned by the last +call to the writer; +0 means no errors. + + +

+This function does not pop the Lua function from the stack. + + + + + +


lua_error

+[-1, +0, v] +

int lua_error (lua_State *L);
+ +

+Generates a Lua error. +The error message (which can actually be a Lua value of any type) +must be on the stack top. +This function does a long jump, +and therefore never returns +(see luaL_error). + + + + + +


lua_gc

+[-0, +0, e] +

int lua_gc (lua_State *L, int what, int data);
+ +

+Controls the garbage collector. + + +

+This function performs several tasks, +according to the value of the parameter what: + +

    + +
  • LUA_GCSTOP: +stops the garbage collector. +
  • + +
  • LUA_GCRESTART: +restarts the garbage collector. +
  • + +
  • LUA_GCCOLLECT: +performs a full garbage-collection cycle. +
  • + +
  • LUA_GCCOUNT: +returns the current amount of memory (in Kbytes) in use by Lua. +
  • + +
  • LUA_GCCOUNTB: +returns the remainder of dividing the current amount of bytes of +memory in use by Lua by 1024. +
  • + +
  • LUA_GCSTEP: +performs an incremental step of garbage collection. +The step "size" is controlled by data +(larger values mean more steps) in a non-specified way. +If you want to control the step size +you must experimentally tune the value of data. +The function returns 1 if the step finished a +garbage-collection cycle. +
  • + +
  • LUA_GCSETPAUSE: +sets data as the new value +for the pause of the collector (see §2.5). +The function returns the previous value of the pause. +
  • + +
  • LUA_GCSETSTEPMUL: +sets data as the new value for the step multiplier of +the collector (see §2.5). +The function returns the previous value of the step multiplier. +
  • + +
  • LUA_GCISRUNNING: +returns a boolean that tells whether the collector is running +(i.e., not stopped). +
  • + +
  • LUA_GCGEN: +changes the collector to generational mode +(see §2.5). +
  • + +
  • LUA_GCINC: +changes the collector to incremental mode. +This is the default mode. +
  • + +
+ +

+For more details about these options, +see collectgarbage. + + + + + +


lua_getallocf

+[-0, +0, –] +

lua_Alloc lua_getallocf (lua_State *L, void **ud);
+ +

+Returns the memory-allocation function of a given state. +If ud is not NULL, Lua stores in *ud the +opaque pointer passed to lua_newstate. + + + + + +


lua_getctx

+[-0, +0, –] +

int lua_getctx (lua_State *L, int *ctx);
+ +

+This function is called by a continuation function (see §4.7) +to retrieve the status of the thread and a context information. + + +

+When called in the original function, +lua_getctx always returns LUA_OK +and does not change the value of its argument ctx. +When called inside a continuation function, +lua_getctx returns LUA_YIELD and sets +the value of ctx to be the context information +(the value passed as the ctx argument +to the callee together with the continuation function). + + +

+When the callee is lua_pcallk, +Lua may also call its continuation function +to handle errors during the call. +That is, upon an error in the function called by lua_pcallk, +Lua may not return to the original function +but instead may call the continuation function. +In that case, a call to lua_getctx will return the error code +(the value that would be returned by lua_pcallk); +the value of ctx will be set to the context information, +as in the case of a yield. + + + + + +


lua_getfield

+[-0, +1, e] +

void lua_getfield (lua_State *L, int index, const char *k);
+ +

+Pushes onto the stack the value t[k], +where t is the value at the given index. +As in Lua, this function may trigger a metamethod +for the "index" event (see §2.4). + + + + + +


lua_getglobal

+[-0, +1, e] +

void lua_getglobal (lua_State *L, const char *name);
+ +

+Pushes onto the stack the value of the global name. + + + + + +


lua_getmetatable

+[-0, +(0|1), –] +

int lua_getmetatable (lua_State *L, int index);
+ +

+Pushes onto the stack the metatable of the value at the given index. +If the value does not have a metatable, +the function returns 0 and pushes nothing on the stack. + + + + + +


lua_gettable

+[-1, +1, e] +

void lua_gettable (lua_State *L, int index);
+ +

+Pushes onto the stack the value t[k], +where t is the value at the given index +and k is the value at the top of the stack. + + +

+This function pops the key from the stack +(putting the resulting value in its place). +As in Lua, this function may trigger a metamethod +for the "index" event (see §2.4). + + + + + +


lua_gettop

+[-0, +0, –] +

int lua_gettop (lua_State *L);
+ +

+Returns the index of the top element in the stack. +Because indices start at 1, +this result is equal to the number of elements in the stack +(and so 0 means an empty stack). + + + + + +


lua_getuservalue

+[-0, +1, –] +

void lua_getuservalue (lua_State *L, int index);
+ +

+Pushes onto the stack the Lua value associated with the userdata +at the given index. +This Lua value must be a table or nil. + + + + + +


lua_insert

+[-1, +1, –] +

void lua_insert (lua_State *L, int index);
+ +

+Moves the top element into the given valid index, +shifting up the elements above this index to open space. +This function cannot be called with a pseudo-index, +because a pseudo-index is not an actual stack position. + + + + + +


lua_Integer

+
typedef ptrdiff_t lua_Integer;
+ +

+The type used by the Lua API to represent signed integral values. + + +

+By default it is a ptrdiff_t, +which is usually the largest signed integral type the machine handles +"comfortably". + + + + + +


lua_isboolean

+[-0, +0, –] +

int lua_isboolean (lua_State *L, int index);
+ +

+Returns 1 if the value at the given index is a boolean, +and 0 otherwise. + + + + + +


lua_iscfunction

+[-0, +0, –] +

int lua_iscfunction (lua_State *L, int index);
+ +

+Returns 1 if the value at the given index is a C function, +and 0 otherwise. + + + + + +


lua_isfunction

+[-0, +0, –] +

int lua_isfunction (lua_State *L, int index);
+ +

+Returns 1 if the value at the given index is a function +(either C or Lua), and 0 otherwise. + + + + + +


lua_islightuserdata

+[-0, +0, –] +

int lua_islightuserdata (lua_State *L, int index);
+ +

+Returns 1 if the value at the given index is a light userdata, +and 0 otherwise. + + + + + +


lua_isnil

+[-0, +0, –] +

int lua_isnil (lua_State *L, int index);
+ +

+Returns 1 if the value at the given index is nil, +and 0 otherwise. + + + + + +


lua_isnone

+[-0, +0, –] +

int lua_isnone (lua_State *L, int index);
+ +

+Returns 1 if the given index is not valid, +and 0 otherwise. + + + + + +


lua_isnoneornil

+[-0, +0, –] +

int lua_isnoneornil (lua_State *L, int index);
+ +

+Returns 1 if the given index is not valid +or if the value at this index is nil, +and 0 otherwise. + + + + + +


lua_isnumber

+[-0, +0, –] +

int lua_isnumber (lua_State *L, int index);
+ +

+Returns 1 if the value at the given index is a number +or a string convertible to a number, +and 0 otherwise. + + + + + +


lua_isstring

+[-0, +0, –] +

int lua_isstring (lua_State *L, int index);
+ +

+Returns 1 if the value at the given index is a string +or a number (which is always convertible to a string), +and 0 otherwise. + + + + + +


lua_istable

+[-0, +0, –] +

int lua_istable (lua_State *L, int index);
+ +

+Returns 1 if the value at the given index is a table, +and 0 otherwise. + + + + + +


lua_isthread

+[-0, +0, –] +

int lua_isthread (lua_State *L, int index);
+ +

+Returns 1 if the value at the given index is a thread, +and 0 otherwise. + + + + + +


lua_isuserdata

+[-0, +0, –] +

int lua_isuserdata (lua_State *L, int index);
+ +

+Returns 1 if the value at the given index is a userdata +(either full or light), and 0 otherwise. + + + + + +


lua_len

+[-0, +1, e] +

void lua_len (lua_State *L, int index);
+ +

+Returns the "length" of the value at the given index; +it is equivalent to the '#' operator in Lua (see §3.4.6). +The result is pushed on the stack. + + + + + +


lua_load

+[-0, +1, –] +

int lua_load (lua_State *L,
+              lua_Reader reader,
+              void *data,
+              const char *source,
+              const char *mode);
+ +

+Loads a Lua chunk (without running it). +If there are no errors, +lua_load pushes the compiled chunk as a Lua +function on top of the stack. +Otherwise, it pushes an error message. + + +

+The return values of lua_load are: + +

    + +
  • LUA_OK: no errors;
  • + +
  • LUA_ERRSYNTAX: +syntax error during precompilation;
  • + +
  • LUA_ERRMEM: +memory allocation error;
  • + +
  • LUA_ERRGCMM: +error while running a __gc metamethod. +(This error has no relation with the chunk being loaded. +It is generated by the garbage collector.) +
  • + +
+ +

+The lua_load function uses a user-supplied reader function +to read the chunk (see lua_Reader). +The data argument is an opaque value passed to the reader function. + + +

+The source argument gives a name to the chunk, +which is used for error messages and in debug information (see §4.9). + + +

+lua_load automatically detects whether the chunk is text or binary +and loads it accordingly (see program luac). +The string mode works as in function load, +with the addition that +a NULL value is equivalent to the string "bt". + + +

+lua_load uses the stack internally, +so the reader function should always leave the stack +unmodified when returning. + + +

+If the resulting function has one upvalue, +this upvalue is set to the value of the global environment +stored at index LUA_RIDX_GLOBALS in the registry (see §4.5). +When loading main chunks, +this upvalue will be the _ENV variable (see §2.2). + + + + + +


lua_newstate

+[-0, +0, –] +

lua_State *lua_newstate (lua_Alloc f, void *ud);
+ +

+Creates a new thread running in a new, independent state. +Returns NULL if cannot create the thread or the state +(due to lack of memory). +The argument f is the allocator function; +Lua does all memory allocation for this state through this function. +The second argument, ud, is an opaque pointer that Lua +passes to the allocator in every call. + + + + + +


lua_newtable

+[-0, +1, e] +

void lua_newtable (lua_State *L);
+ +

+Creates a new empty table and pushes it onto the stack. +It is equivalent to lua_createtable(L, 0, 0). + + + + + +


lua_newthread

+[-0, +1, e] +

lua_State *lua_newthread (lua_State *L);
+ +

+Creates a new thread, pushes it on the stack, +and returns a pointer to a lua_State that represents this new thread. +The new thread returned by this function shares with the original thread +its global environment, +but has an independent execution stack. + + +

+There is no explicit function to close or to destroy a thread. +Threads are subject to garbage collection, +like any Lua object. + + + + + +


lua_newuserdata

+[-0, +1, e] +

void *lua_newuserdata (lua_State *L, size_t size);
+ +

+This function allocates a new block of memory with the given size, +pushes onto the stack a new full userdata with the block address, +and returns this address. +The host program can freely use this memory. + + + + + +


lua_next

+[-1, +(2|0), e] +

int lua_next (lua_State *L, int index);
+ +

+Pops a key from the stack, +and pushes a key–value pair from the table at the given index +(the "next" pair after the given key). +If there are no more elements in the table, +then lua_next returns 0 (and pushes nothing). + + +

+A typical traversal looks like this: + +

+     /* table is in the stack at index 't' */
+     lua_pushnil(L);  /* first key */
+     while (lua_next(L, t) != 0) {
+       /* uses 'key' (at index -2) and 'value' (at index -1) */
+       printf("%s - %s\n",
+              lua_typename(L, lua_type(L, -2)),
+              lua_typename(L, lua_type(L, -1)));
+       /* removes 'value'; keeps 'key' for next iteration */
+       lua_pop(L, 1);
+     }
+
+ +

+While traversing a table, +do not call lua_tolstring directly on a key, +unless you know that the key is actually a string. +Recall that lua_tolstring may change +the value at the given index; +this confuses the next call to lua_next. + + +

+See function next for the caveats of modifying +the table during its traversal. + + + + + +


lua_Number

+
typedef double lua_Number;
+ +

+The type of numbers in Lua. +By default, it is double, but that can be changed in luaconf.h. +Through this configuration file you can change +Lua to operate with another type for numbers (e.g., float or long). + + + + + +


lua_pcall

+[-(nargs + 1), +(nresults|1), –] +

int lua_pcall (lua_State *L, int nargs, int nresults, int msgh);
+ +

+Calls a function in protected mode. + + +

+Both nargs and nresults have the same meaning as +in lua_call. +If there are no errors during the call, +lua_pcall behaves exactly like lua_call. +However, if there is any error, +lua_pcall catches it, +pushes a single value on the stack (the error message), +and returns an error code. +Like lua_call, +lua_pcall always removes the function +and its arguments from the stack. + + +

+If msgh is 0, +then the error message returned on the stack +is exactly the original error message. +Otherwise, msgh is the stack index of a +message handler. +(In the current implementation, this index cannot be a pseudo-index.) +In case of runtime errors, +this function will be called with the error message +and its return value will be the message +returned on the stack by lua_pcall. + + +

+Typically, the message handler is used to add more debug +information to the error message, such as a stack traceback. +Such information cannot be gathered after the return of lua_pcall, +since by then the stack has unwound. + + +

+The lua_pcall function returns one of the following codes +(defined in lua.h): + +

    + +
  • LUA_OK (0): +success.
  • + +
  • LUA_ERRRUN: +a runtime error. +
  • + +
  • LUA_ERRMEM: +memory allocation error. +For such errors, Lua does not call the message handler. +
  • + +
  • LUA_ERRERR: +error while running the message handler. +
  • + +
  • LUA_ERRGCMM: +error while running a __gc metamethod. +(This error typically has no relation with the function being called. +It is generated by the garbage collector.) +
  • + +
+ + + + +

lua_pcallk

+[-(nargs + 1), +(nresults|1), –] +

int lua_pcallk (lua_State *L,
+                int nargs,
+                int nresults,
+                int errfunc,
+                int ctx,
+                lua_CFunction k);
+ +

+This function behaves exactly like lua_pcall, +but allows the called function to yield (see §4.7). + + + + + +


lua_pop

+[-n, +0, –] +

void lua_pop (lua_State *L, int n);
+ +

+Pops n elements from the stack. + + + + + +


lua_pushboolean

+[-0, +1, –] +

void lua_pushboolean (lua_State *L, int b);
+ +

+Pushes a boolean value with value b onto the stack. + + + + + +


lua_pushcclosure

+[-n, +1, e] +

void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n);
+ +

+Pushes a new C closure onto the stack. + + +

+When a C function is created, +it is possible to associate some values with it, +thus creating a C closure (see §4.4); +these values are then accessible to the function whenever it is called. +To associate values with a C function, +first these values should be pushed onto the stack +(when there are multiple values, the first value is pushed first). +Then lua_pushcclosure +is called to create and push the C function onto the stack, +with the argument n telling how many values should be +associated with the function. +lua_pushcclosure also pops these values from the stack. + + +

+The maximum value for n is 255. + + +

+When n is zero, +this function creates a light C function, +which is just a pointer to the C function. +In that case, it never throws a memory error. + + + + + +


lua_pushcfunction

+[-0, +1, –] +

void lua_pushcfunction (lua_State *L, lua_CFunction f);
+ +

+Pushes a C function onto the stack. +This function receives a pointer to a C function +and pushes onto the stack a Lua value of type function that, +when called, invokes the corresponding C function. + + +

+Any function to be registered in Lua must +follow the correct protocol to receive its parameters +and return its results (see lua_CFunction). + + +

+lua_pushcfunction is defined as a macro: + +

+     #define lua_pushcfunction(L,f)  lua_pushcclosure(L,f,0)
+

+Note that f is used twice. + + + + + +


lua_pushfstring

+[-0, +1, e] +

const char *lua_pushfstring (lua_State *L, const char *fmt, ...);
+ +

+Pushes onto the stack a formatted string +and returns a pointer to this string. +It is similar to the ANSI C function sprintf, +but has some important differences: + +

    + +
  • +You do not have to allocate space for the result: +the result is a Lua string and Lua takes care of memory allocation +(and deallocation, through garbage collection). +
  • + +
  • +The conversion specifiers are quite restricted. +There are no flags, widths, or precisions. +The conversion specifiers can only be +'%%' (inserts a '%' in the string), +'%s' (inserts a zero-terminated string, with no size restrictions), +'%f' (inserts a lua_Number), +'%p' (inserts a pointer as a hexadecimal numeral), +'%d' (inserts an int), and +'%c' (inserts an int as a byte). +
  • + +
+ + + + +

lua_pushglobaltable

+[-0, +1, –] +

void lua_pushglobaltable (lua_State *L);
+ +

+Pushes the global environment onto the stack. + + + + + +


lua_pushinteger

+[-0, +1, –] +

void lua_pushinteger (lua_State *L, lua_Integer n);
+ +

+Pushes a number with value n onto the stack. + + + + + +


lua_pushlightuserdata

+[-0, +1, –] +

void lua_pushlightuserdata (lua_State *L, void *p);
+ +

+Pushes a light userdata onto the stack. + + +

+Userdata represent C values in Lua. +A light userdata represents a pointer, a void*. +It is a value (like a number): +you do not create it, it has no individual metatable, +and it is not collected (as it was never created). +A light userdata is equal to "any" +light userdata with the same C address. + + + + + +


lua_pushliteral

+[-0, +1, e] +

const char *lua_pushliteral (lua_State *L, const char *s);
+ +

+This macro is equivalent to lua_pushlstring, +but can be used only when s is a literal string. +It automatically provides the string length. + + + + + +


lua_pushlstring

+[-0, +1, e] +

const char *lua_pushlstring (lua_State *L, const char *s, size_t len);
+ +

+Pushes the string pointed to by s with size len +onto the stack. +Lua makes (or reuses) an internal copy of the given string, +so the memory at s can be freed or reused immediately after +the function returns. +The string can contain any binary data, +including embedded zeros. + + +

+Returns a pointer to the internal copy of the string. + + + + + +


lua_pushnil

+[-0, +1, –] +

void lua_pushnil (lua_State *L);
+ +

+Pushes a nil value onto the stack. + + + + + +


lua_pushnumber

+[-0, +1, –] +

void lua_pushnumber (lua_State *L, lua_Number n);
+ +

+Pushes a number with value n onto the stack. + + + + + +


lua_pushstring

+[-0, +1, e] +

const char *lua_pushstring (lua_State *L, const char *s);
+ +

+Pushes the zero-terminated string pointed to by s +onto the stack. +Lua makes (or reuses) an internal copy of the given string, +so the memory at s can be freed or reused immediately after +the function returns. + + +

+Returns a pointer to the internal copy of the string. + + +

+If s is NULL, pushes nil and returns NULL. + + + + + +


lua_pushthread

+[-0, +1, –] +

int lua_pushthread (lua_State *L);
+ +

+Pushes the thread represented by L onto the stack. +Returns 1 if this thread is the main thread of its state. + + + + + +


lua_pushunsigned

+[-0, +1, –] +

void lua_pushunsigned (lua_State *L, lua_Unsigned n);
+ +

+Pushes a number with value n onto the stack. + + + + + +


lua_pushvalue

+[-0, +1, –] +

void lua_pushvalue (lua_State *L, int index);
+ +

+Pushes a copy of the element at the given index +onto the stack. + + + + + +


lua_pushvfstring

+[-0, +1, e] +

const char *lua_pushvfstring (lua_State *L,
+                              const char *fmt,
+                              va_list argp);
+ +

+Equivalent to lua_pushfstring, except that it receives a va_list +instead of a variable number of arguments. + + + + + +


lua_rawequal

+[-0, +0, –] +

int lua_rawequal (lua_State *L, int index1, int index2);
+ +

+Returns 1 if the two values in indices index1 and +index2 are primitively equal +(that is, without calling metamethods). +Otherwise returns 0. +Also returns 0 if any of the indices are non valid. + + + + + +


lua_rawget

+[-1, +1, –] +

void lua_rawget (lua_State *L, int index);
+ +

+Similar to lua_gettable, but does a raw access +(i.e., without metamethods). + + + + + +


lua_rawgeti

+[-0, +1, –] +

void lua_rawgeti (lua_State *L, int index, int n);
+ +

+Pushes onto the stack the value t[n], +where t is the table at the given index. +The access is raw; +that is, it does not invoke metamethods. + + + + + +


lua_rawgetp

+[-0, +1, –] +

void lua_rawgetp (lua_State *L, int index, const void *p);
+ +

+Pushes onto the stack the value t[k], +where t is the table at the given index and +k is the pointer p represented as a light userdata. +The access is raw; +that is, it does not invoke metamethods. + + + + + +


lua_rawlen

+[-0, +0, –] +

size_t lua_rawlen (lua_State *L, int index);
+ +

+Returns the raw "length" of the value at the given index: +for strings, this is the string length; +for tables, this is the result of the length operator ('#') +with no metamethods; +for userdata, this is the size of the block of memory allocated +for the userdata; +for other values, it is 0. + + + + + +


lua_rawset

+[-2, +0, e] +

void lua_rawset (lua_State *L, int index);
+ +

+Similar to lua_settable, but does a raw assignment +(i.e., without metamethods). + + + + + +


lua_rawseti

+[-1, +0, e] +

void lua_rawseti (lua_State *L, int index, int n);
+ +

+Does the equivalent of t[n] = v, +where t is the table at the given index +and v is the value at the top of the stack. + + +

+This function pops the value from the stack. +The assignment is raw; +that is, it does not invoke metamethods. + + + + + +


lua_rawsetp

+[-1, +0, e] +

void lua_rawsetp (lua_State *L, int index, const void *p);
+ +

+Does the equivalent of t[k] = v, +where t is the table at the given index, +k is the pointer p represented as a light userdata, +and v is the value at the top of the stack. + + +

+This function pops the value from the stack. +The assignment is raw; +that is, it does not invoke metamethods. + + + + + +


lua_Reader

+
typedef const char * (*lua_Reader) (lua_State *L,
+                                    void *data,
+                                    size_t *size);
+ +

+The reader function used by lua_load. +Every time it needs another piece of the chunk, +lua_load calls the reader, +passing along its data parameter. +The reader must return a pointer to a block of memory +with a new piece of the chunk +and set size to the block size. +The block must exist until the reader function is called again. +To signal the end of the chunk, +the reader must return NULL or set size to zero. +The reader function may return pieces of any size greater than zero. + + + + + +


lua_register

+[-0, +0, e] +

void lua_register (lua_State *L, const char *name, lua_CFunction f);
+ +

+Sets the C function f as the new value of global name. +It is defined as a macro: + +

+     #define lua_register(L,n,f) \
+            (lua_pushcfunction(L, f), lua_setglobal(L, n))
+
+ + + + +

lua_remove

+[-1, +0, –] +

void lua_remove (lua_State *L, int index);
+ +

+Removes the element at the given valid index, +shifting down the elements above this index to fill the gap. +This function cannot be called with a pseudo-index, +because a pseudo-index is not an actual stack position. + + + + + +


lua_replace

+[-1, +0, –] +

void lua_replace (lua_State *L, int index);
+ +

+Moves the top element into the given valid index +without shifting any element +(therefore replacing the value at the given index), +and then pops the top element. + + + + + +


lua_resume

+[-?, +?, –] +

int lua_resume (lua_State *L, lua_State *from, int nargs);
+ +

+Starts and resumes a coroutine in a given thread. + + +

+To start a coroutine, +you push onto the thread stack the main function plus any arguments; +then you call lua_resume, +with nargs being the number of arguments. +This call returns when the coroutine suspends or finishes its execution. +When it returns, the stack contains all values passed to lua_yield, +or all values returned by the body function. +lua_resume returns +LUA_YIELD if the coroutine yields, +LUA_OK if the coroutine finishes its execution +without errors, +or an error code in case of errors (see lua_pcall). + + +

+In case of errors, +the stack is not unwound, +so you can use the debug API over it. +The error message is on the top of the stack. + + +

+To resume a coroutine, +you remove any results from the last lua_yield, +put on its stack only the values to +be passed as results from yield, +and then call lua_resume. + + +

+The parameter from represents the coroutine that is resuming L. +If there is no such coroutine, +this parameter can be NULL. + + + + + +


lua_setallocf

+[-0, +0, –] +

void lua_setallocf (lua_State *L, lua_Alloc f, void *ud);
+ +

+Changes the allocator function of a given state to f +with user data ud. + + + + + +


lua_setfield

+[-1, +0, e] +

void lua_setfield (lua_State *L, int index, const char *k);
+ +

+Does the equivalent to t[k] = v, +where t is the value at the given index +and v is the value at the top of the stack. + + +

+This function pops the value from the stack. +As in Lua, this function may trigger a metamethod +for the "newindex" event (see §2.4). + + + + + +


lua_setglobal

+[-1, +0, e] +

void lua_setglobal (lua_State *L, const char *name);
+ +

+Pops a value from the stack and +sets it as the new value of global name. + + + + + +


lua_setmetatable

+[-1, +0, –] +

void lua_setmetatable (lua_State *L, int index);
+ +

+Pops a table from the stack and +sets it as the new metatable for the value at the given index. + + + + + +


lua_settable

+[-2, +0, e] +

void lua_settable (lua_State *L, int index);
+ +

+Does the equivalent to t[k] = v, +where t is the value at the given index, +v is the value at the top of the stack, +and k is the value just below the top. + + +

+This function pops both the key and the value from the stack. +As in Lua, this function may trigger a metamethod +for the "newindex" event (see §2.4). + + + + + +


lua_settop

+[-?, +?, –] +

void lua_settop (lua_State *L, int index);
+ +

+Accepts any index, or 0, +and sets the stack top to this index. +If the new top is larger than the old one, +then the new elements are filled with nil. +If index is 0, then all stack elements are removed. + + + + + +


lua_setuservalue

+[-1, +0, –] +

void lua_setuservalue (lua_State *L, int index);
+ +

+Pops a table or nil from the stack and sets it as +the new value associated to the userdata at the given index. + + + + + +


lua_State

+
typedef struct lua_State lua_State;
+ +

+An opaque structure that points to a thread and indirectly +(through the thread) to the whole state of a Lua interpreter. +The Lua library is fully reentrant: +it has no global variables. +All information about a state is accessible through this structure. + + +

+A pointer to this structure must be passed as the first argument to +every function in the library, except to lua_newstate, +which creates a Lua state from scratch. + + + + + +


lua_status

+[-0, +0, –] +

int lua_status (lua_State *L);
+ +

+Returns the status of the thread L. + + +

+The status can be 0 (LUA_OK) for a normal thread, +an error code if the thread finished the execution +of a lua_resume with an error, +or LUA_YIELD if the thread is suspended. + + +

+You can only call functions in threads with status LUA_OK. +You can resume threads with status LUA_OK +(to start a new coroutine) or LUA_YIELD +(to resume a coroutine). + + + + + +


lua_toboolean

+[-0, +0, –] +

int lua_toboolean (lua_State *L, int index);
+ +

+Converts the Lua value at the given index to a C boolean +value (0 or 1). +Like all tests in Lua, +lua_toboolean returns true for any Lua value +different from false and nil; +otherwise it returns false. +(If you want to accept only actual boolean values, +use lua_isboolean to test the value's type.) + + + + + +


lua_tocfunction

+[-0, +0, –] +

lua_CFunction lua_tocfunction (lua_State *L, int index);
+ +

+Converts a value at the given index to a C function. +That value must be a C function; +otherwise, returns NULL. + + + + + +


lua_tointeger

+[-0, +0, –] +

lua_Integer lua_tointeger (lua_State *L, int index);
+ +

+Equivalent to lua_tointegerx with isnum equal to NULL. + + + + + +


lua_tointegerx

+[-0, +0, –] +

lua_Integer lua_tointegerx (lua_State *L, int index, int *isnum);
+ +

+Converts the Lua value at the given index +to the signed integral type lua_Integer. +The Lua value must be a number or a string convertible to a number +(see §3.4.2); +otherwise, lua_tointegerx returns 0. + + +

+If the number is not an integer, +it is truncated in some non-specified way. + + +

+If isnum is not NULL, +its referent is assigned a boolean value that +indicates whether the operation succeeded. + + + + + +


lua_tolstring

+[-0, +0, e] +

const char *lua_tolstring (lua_State *L, int index, size_t *len);
+ +

+Converts the Lua value at the given index to a C string. +If len is not NULL, +it also sets *len with the string length. +The Lua value must be a string or a number; +otherwise, the function returns NULL. +If the value is a number, +then lua_tolstring also +changes the actual value in the stack to a string. +(This change confuses lua_next +when lua_tolstring is applied to keys during a table traversal.) + + +

+lua_tolstring returns a fully aligned pointer +to a string inside the Lua state. +This string always has a zero ('\0') +after its last character (as in C), +but can contain other zeros in its body. +Because Lua has garbage collection, +there is no guarantee that the pointer returned by lua_tolstring +will be valid after the corresponding value is removed from the stack. + + + + + +


lua_tonumber

+[-0, +0, –] +

lua_Number lua_tonumber (lua_State *L, int index);
+ +

+Equivalent to lua_tonumberx with isnum equal to NULL. + + + + + +


lua_tonumberx

+[-0, +0, –] +

lua_Number lua_tonumberx (lua_State *L, int index, int *isnum);
+ +

+Converts the Lua value at the given index +to the C type lua_Number (see lua_Number). +The Lua value must be a number or a string convertible to a number +(see §3.4.2); +otherwise, lua_tonumberx returns 0. + + +

+If isnum is not NULL, +its referent is assigned a boolean value that +indicates whether the operation succeeded. + + + + + +


lua_topointer

+[-0, +0, –] +

const void *lua_topointer (lua_State *L, int index);
+ +

+Converts the value at the given index to a generic +C pointer (void*). +The value can be a userdata, a table, a thread, or a function; +otherwise, lua_topointer returns NULL. +Different objects will give different pointers. +There is no way to convert the pointer back to its original value. + + +

+Typically this function is used only for debug information. + + + + + +


lua_tostring

+[-0, +0, e] +

const char *lua_tostring (lua_State *L, int index);
+ +

+Equivalent to lua_tolstring with len equal to NULL. + + + + + +


lua_tothread

+[-0, +0, –] +

lua_State *lua_tothread (lua_State *L, int index);
+ +

+Converts the value at the given index to a Lua thread +(represented as lua_State*). +This value must be a thread; +otherwise, the function returns NULL. + + + + + +


lua_tounsigned

+[-0, +0, –] +

lua_Unsigned lua_tounsigned (lua_State *L, int index);
+ +

+Equivalent to lua_tounsignedx with isnum equal to NULL. + + + + + +


lua_tounsignedx

+[-0, +0, –] +

lua_Unsigned lua_tounsignedx (lua_State *L, int index, int *isnum);
+ +

+Converts the Lua value at the given index +to the unsigned integral type lua_Unsigned. +The Lua value must be a number or a string convertible to a number +(see §3.4.2); +otherwise, lua_tounsignedx returns 0. + + +

+If the number is not an integer, +it is truncated in some non-specified way. +If the number is outside the range of representable values, +it is normalized to the remainder of its division by +one more than the maximum representable value. + + +

+If isnum is not NULL, +its referent is assigned a boolean value that +indicates whether the operation succeeded. + + + + + +


lua_touserdata

+[-0, +0, –] +

void *lua_touserdata (lua_State *L, int index);
+ +

+If the value at the given index is a full userdata, +returns its block address. +If the value is a light userdata, +returns its pointer. +Otherwise, returns NULL. + + + + + +


lua_type

+[-0, +0, –] +

int lua_type (lua_State *L, int index);
+ +

+Returns the type of the value in the given valid index, +or LUA_TNONE for a non-valid (but acceptable) index. +The types returned by lua_type are coded by the following constants +defined in lua.h: +LUA_TNIL, +LUA_TNUMBER, +LUA_TBOOLEAN, +LUA_TSTRING, +LUA_TTABLE, +LUA_TFUNCTION, +LUA_TUSERDATA, +LUA_TTHREAD, +and +LUA_TLIGHTUSERDATA. + + + + + +


lua_typename

+[-0, +0, –] +

const char *lua_typename (lua_State *L, int tp);
+ +

+Returns the name of the type encoded by the value tp, +which must be one the values returned by lua_type. + + + + + +


lua_Unsigned

+
typedef unsigned long lua_Unsigned;
+ +

+The type used by the Lua API to represent unsigned integral values. +It must have at least 32 bits. + + +

+By default it is an unsigned int or an unsigned long, +whichever can hold 32-bit values. + + + + + +


lua_upvalueindex

+[-0, +0, –] +

int lua_upvalueindex (int i);
+ +

+Returns the pseudo-index that represents the i-th upvalue of +the running function (see §4.4). + + + + + +


lua_version

+[-0, +0, v] +

const lua_Number *lua_version (lua_State *L);
+ +

+Returns the address of the version number stored in the Lua core. +When called with a valid lua_State, +returns the address of the version used to create that state. +When called with NULL, +returns the address of the version running the call. + + + + + +


lua_Writer

+
typedef int (*lua_Writer) (lua_State *L,
+                           const void* p,
+                           size_t sz,
+                           void* ud);
+ +

+The type of the writer function used by lua_dump. +Every time it produces another piece of chunk, +lua_dump calls the writer, +passing along the buffer to be written (p), +its size (sz), +and the data parameter supplied to lua_dump. + + +

+The writer returns an error code: +0 means no errors; +any other value means an error and stops lua_dump from +calling the writer again. + + + + + +


lua_xmove

+[-?, +?, –] +

void lua_xmove (lua_State *from, lua_State *to, int n);
+ +

+Exchange values between different threads of the same state. + + +

+This function pops n values from the stack from, +and pushes them onto the stack to. + + + + + +


lua_yield

+[-?, +?, –] +

int lua_yield (lua_State *L, int nresults);
+ +

+This function is equivalent to lua_yieldk, +but it has no continuation (see §4.7). +Therefore, when the thread resumes, +it returns to the function that called +the function calling lua_yield. + + + + + +


lua_yieldk

+[-?, +?, –] +

int lua_yieldk (lua_State *L, int nresults, int ctx, lua_CFunction k);
+ +

+Yields a coroutine. + + +

+This function should only be called as the +return expression of a C function, as follows: + +

+     return lua_yieldk (L, n, i, k);
+

+When a C function calls lua_yieldk in that way, +the running coroutine suspends its execution, +and the call to lua_resume that started this coroutine returns. +The parameter nresults is the number of values from the stack +that are passed as results to lua_resume. + + +

+When the coroutine is resumed again, +Lua calls the given continuation function k to continue +the execution of the C function that yielded (see §4.7). +This continuation function receives the same stack +from the previous function, +with the results removed and +replaced by the arguments passed to lua_resume. +Moreover, +the continuation function may access the value ctx +by calling lua_getctx. + + + + + + + +

4.9 – The Debug Interface

+ +

+Lua has no built-in debugging facilities. +Instead, it offers a special interface +by means of functions and hooks. +This interface allows the construction of different +kinds of debuggers, profilers, and other tools +that need "inside information" from the interpreter. + + + +


lua_Debug

+
typedef struct lua_Debug {
+  int event;
+  const char *name;           /* (n) */
+  const char *namewhat;       /* (n) */
+  const char *what;           /* (S) */
+  const char *source;         /* (S) */
+  int currentline;            /* (l) */
+  int linedefined;            /* (S) */
+  int lastlinedefined;        /* (S) */
+  unsigned char nups;         /* (u) number of upvalues */
+  unsigned char nparams;      /* (u) number of parameters */
+  char isvararg;              /* (u) */
+  char istailcall;            /* (t) */
+  char short_src[LUA_IDSIZE]; /* (S) */
+  /* private part */
+  other fields
+} lua_Debug;
+ +

+A structure used to carry different pieces of +information about a function or an activation record. +lua_getstack fills only the private part +of this structure, for later use. +To fill the other fields of lua_Debug with useful information, +call lua_getinfo. + + +

+The fields of lua_Debug have the following meaning: + +

    + +
  • source: +the source of the chunk that created the function. +If source starts with a '@', +it means that the function was defined in a file where +the file name follows the '@'. +If source starts with a '=', +the remainder of its contents describe the source in a user-dependent manner. +Otherwise, +the function was defined in a string where +source is that string. +
  • + +
  • short_src: +a "printable" version of source, to be used in error messages. +
  • + +
  • linedefined: +the line number where the definition of the function starts. +
  • + +
  • lastlinedefined: +the line number where the definition of the function ends. +
  • + +
  • what: +the string "Lua" if the function is a Lua function, +"C" if it is a C function, +"main" if it is the main part of a chunk. +
  • + +
  • currentline: +the current line where the given function is executing. +When no line information is available, +currentline is set to -1. +
  • + +
  • name: +a reasonable name for the given function. +Because functions in Lua are first-class values, +they do not have a fixed name: +some functions can be the value of multiple global variables, +while others can be stored only in a table field. +The lua_getinfo function checks how the function was +called to find a suitable name. +If it cannot find a name, +then name is set to NULL. +
  • + +
  • namewhat: +explains the name field. +The value of namewhat can be +"global", "local", "method", +"field", "upvalue", or "" (the empty string), +according to how the function was called. +(Lua uses the empty string when no other option seems to apply.) +
  • + +
  • istailcall: +true if this function invocation was called by a tail call. +In this case, the caller of this level is not in the stack. +
  • + +
  • nups: +the number of upvalues of the function. +
  • + +
  • nparams: +the number of fixed parameters of the function +(always 0 for C functions). +
  • + +
  • isvararg: +true if the function is a vararg function +(always true for C functions). +
  • + +
+ + + + +

lua_gethook

+[-0, +0, –] +

lua_Hook lua_gethook (lua_State *L);
+ +

+Returns the current hook function. + + + + + +


lua_gethookcount

+[-0, +0, –] +

int lua_gethookcount (lua_State *L);
+ +

+Returns the current hook count. + + + + + +


lua_gethookmask

+[-0, +0, –] +

int lua_gethookmask (lua_State *L);
+ +

+Returns the current hook mask. + + + + + +


lua_getinfo

+[-(0|1), +(0|1|2), e] +

int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar);
+ +

+Gets information about a specific function or function invocation. + + +

+To get information about a function invocation, +the parameter ar must be a valid activation record that was +filled by a previous call to lua_getstack or +given as argument to a hook (see lua_Hook). + + +

+To get information about a function you push it onto the stack +and start the what string with the character '>'. +(In that case, +lua_getinfo pops the function from the top of the stack.) +For instance, to know in which line a function f was defined, +you can write the following code: + +

+     lua_Debug ar;
+     lua_getglobal(L, "f");  /* get global 'f' */
+     lua_getinfo(L, ">S", &ar);
+     printf("%d\n", ar.linedefined);
+
+ +

+Each character in the string what +selects some fields of the structure ar to be filled or +a value to be pushed on the stack: + +

    + +
  • 'n': fills in the field name and namewhat; +
  • + +
  • 'S': +fills in the fields source, short_src, +linedefined, lastlinedefined, and what; +
  • + +
  • 'l': fills in the field currentline; +
  • + +
  • 't': fills in the field istailcall; +
  • + +
  • 'u': fills in the fields +nups, nparams, and isvararg; +
  • + +
  • 'f': +pushes onto the stack the function that is +running at the given level; +
  • + +
  • 'L': +pushes onto the stack a table whose indices are the +numbers of the lines that are valid on the function. +(A valid line is a line with some associated code, +that is, a line where you can put a break point. +Non-valid lines include empty lines and comments.) +
  • + +
+ +

+This function returns 0 on error +(for instance, an invalid option in what). + + + + + +


lua_getlocal

+[-0, +(0|1), –] +

const char *lua_getlocal (lua_State *L, lua_Debug *ar, int n);
+ +

+Gets information about a local variable of +a given activation record or a given function. + + +

+In the first case, +the parameter ar must be a valid activation record that was +filled by a previous call to lua_getstack or +given as argument to a hook (see lua_Hook). +The index n selects which local variable to inspect; +see debug.getlocal for details about variable indices +and names. + + +

+lua_getlocal pushes the variable's value onto the stack +and returns its name. + + +

+In the second case, ar should be NULL and the function +to be inspected must be at the top of the stack. +In this case, only parameters of Lua functions are visible +(as there is no information about what variables are active) +and no values are pushed onto the stack. + + +

+Returns NULL (and pushes nothing) +when the index is greater than +the number of active local variables. + + + + + +


lua_getstack

+[-0, +0, –] +

int lua_getstack (lua_State *L, int level, lua_Debug *ar);
+ +

+Gets information about the interpreter runtime stack. + + +

+This function fills parts of a lua_Debug structure with +an identification of the activation record +of the function executing at a given level. +Level 0 is the current running function, +whereas level n+1 is the function that has called level n +(except for tail calls, which do not count on the stack). +When there are no errors, lua_getstack returns 1; +when called with a level greater than the stack depth, +it returns 0. + + + + + +


lua_getupvalue

+[-0, +(0|1), –] +

const char *lua_getupvalue (lua_State *L, int funcindex, int n);
+ +

+Gets information about a closure's upvalue. +(For Lua functions, +upvalues are the external local variables that the function uses, +and that are consequently included in its closure.) +lua_getupvalue gets the index n of an upvalue, +pushes the upvalue's value onto the stack, +and returns its name. +funcindex points to the closure in the stack. +(Upvalues have no particular order, +as they are active through the whole function. +So, they are numbered in an arbitrary order.) + + +

+Returns NULL (and pushes nothing) +when the index is greater than the number of upvalues. +For C functions, this function uses the empty string "" +as a name for all upvalues. + + + + + +


lua_Hook

+
typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar);
+ +

+Type for debugging hook functions. + + +

+Whenever a hook is called, its ar argument has its field +event set to the specific event that triggered the hook. +Lua identifies these events with the following constants: +LUA_HOOKCALL, LUA_HOOKRET, +LUA_HOOKTAILCALL, LUA_HOOKLINE, +and LUA_HOOKCOUNT. +Moreover, for line events, the field currentline is also set. +To get the value of any other field in ar, +the hook must call lua_getinfo. + + +

+For call events, event can be LUA_HOOKCALL, +the normal value, or LUA_HOOKTAILCALL, for a tail call; +in this case, there will be no corresponding return event. + + +

+While Lua is running a hook, it disables other calls to hooks. +Therefore, if a hook calls back Lua to execute a function or a chunk, +this execution occurs without any calls to hooks. + + +

+Hook functions cannot have continuations, +that is, they cannot call lua_yieldk, +lua_pcallk, or lua_callk with a non-null k. + + +

+Hook functions can yield under the following conditions: +Only count and line events can yield +and they cannot yield any value; +to yield a hook function must finish its execution +calling lua_yield with nresults equal to zero. + + + + + +


lua_sethook

+[-0, +0, –] +

int lua_sethook (lua_State *L, lua_Hook f, int mask, int count);
+ +

+Sets the debugging hook function. + + +

+Argument f is the hook function. +mask specifies on which events the hook will be called: +it is formed by a bitwise or of the constants +LUA_MASKCALL, +LUA_MASKRET, +LUA_MASKLINE, +and LUA_MASKCOUNT. +The count argument is only meaningful when the mask +includes LUA_MASKCOUNT. +For each event, the hook is called as explained below: + +

    + +
  • The call hook: is called when the interpreter calls a function. +The hook is called just after Lua enters the new function, +before the function gets its arguments. +
  • + +
  • The return hook: is called when the interpreter returns from a function. +The hook is called just before Lua leaves the function. +There is no standard way to access the values +to be returned by the function. +
  • + +
  • The line hook: is called when the interpreter is about to +start the execution of a new line of code, +or when it jumps back in the code (even to the same line). +(This event only happens while Lua is executing a Lua function.) +
  • + +
  • The count hook: is called after the interpreter executes every +count instructions. +(This event only happens while Lua is executing a Lua function.) +
  • + +
+ +

+A hook is disabled by setting mask to zero. + + + + + +


lua_setlocal

+[-(0|1), +0, –] +

const char *lua_setlocal (lua_State *L, lua_Debug *ar, int n);
+ +

+Sets the value of a local variable of a given activation record. +Parameters ar and n are as in lua_getlocal +(see lua_getlocal). +lua_setlocal assigns the value at the top of the stack +to the variable and returns its name. +It also pops the value from the stack. + + +

+Returns NULL (and pops nothing) +when the index is greater than +the number of active local variables. + + + + + +


lua_setupvalue

+[-(0|1), +0, –] +

const char *lua_setupvalue (lua_State *L, int funcindex, int n);
+ +

+Sets the value of a closure's upvalue. +It assigns the value at the top of the stack +to the upvalue and returns its name. +It also pops the value from the stack. +Parameters funcindex and n are as in the lua_getupvalue +(see lua_getupvalue). + + +

+Returns NULL (and pops nothing) +when the index is greater than the number of upvalues. + + + + + +


lua_upvalueid

+[-0, +0, –] +

void *lua_upvalueid (lua_State *L, int funcindex, int n);
+ +

+Returns an unique identifier for the upvalue numbered n +from the closure at index funcindex. +Parameters funcindex and n are as in the lua_getupvalue +(see lua_getupvalue) +(but n cannot be greater than the number of upvalues). + + +

+These unique identifiers allow a program to check whether different +closures share upvalues. +Lua closures that share an upvalue +(that is, that access a same external local variable) +will return identical ids for those upvalue indices. + + + + + +


lua_upvaluejoin

+[-0, +0, –] +

void lua_upvaluejoin (lua_State *L, int funcindex1, int n1,
+                                    int funcindex2, int n2);
+ +

+Make the n1-th upvalue of the Lua closure at index funcindex1 +refer to the n2-th upvalue of the Lua closure at index funcindex2. + + + + + + + +

5 – The Auxiliary Library

+ +

+ +The auxiliary library provides several convenient functions +to interface C with Lua. +While the basic API provides the primitive functions for all +interactions between C and Lua, +the auxiliary library provides higher-level functions for some +common tasks. + + +

+All functions and types from the auxiliary library +are defined in header file lauxlib.h and +have a prefix luaL_. + + +

+All functions in the auxiliary library are built on +top of the basic API, +and so they provide nothing that cannot be done with that API. +Nevertheless, the use of the auxiliary library ensures +more consistency to your code. + + +

+Several functions in the auxiliary library use internally some +extra stack slots. +When a function in the auxiliary library uses less than five slots, +it does not check the stack size; +it simply assumes that there are enough slots. + + +

+Several functions in the auxiliary library are used to +check C function arguments. +Because the error message is formatted for arguments +(e.g., "bad argument #1"), +you should not use these functions for other stack values. + + +

+Functions called luaL_check* +always throw an error if the check is not satisfied. + + + +

5.1 – Functions and Types

+ +

+Here we list all functions and types from the auxiliary library +in alphabetical order. + + + +


luaL_addchar

+[-?, +?, e] +

void luaL_addchar (luaL_Buffer *B, char c);
+ +

+Adds the byte c to the buffer B +(see luaL_Buffer). + + + + + +


luaL_addlstring

+[-?, +?, e] +

void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l);
+ +

+Adds the string pointed to by s with length l to +the buffer B +(see luaL_Buffer). +The string can contain embedded zeros. + + + + + +


luaL_addsize

+[-?, +?, e] +

void luaL_addsize (luaL_Buffer *B, size_t n);
+ +

+Adds to the buffer B (see luaL_Buffer) +a string of length n previously copied to the +buffer area (see luaL_prepbuffer). + + + + + +


luaL_addstring

+[-?, +?, e] +

void luaL_addstring (luaL_Buffer *B, const char *s);
+ +

+Adds the zero-terminated string pointed to by s +to the buffer B +(see luaL_Buffer). +The string cannot contain embedded zeros. + + + + + +


luaL_addvalue

+[-1, +?, e] +

void luaL_addvalue (luaL_Buffer *B);
+ +

+Adds the value at the top of the stack +to the buffer B +(see luaL_Buffer). +Pops the value. + + +

+This is the only function on string buffers that can (and must) +be called with an extra element on the stack, +which is the value to be added to the buffer. + + + + + +


luaL_argcheck

+[-0, +0, v] +

void luaL_argcheck (lua_State *L,
+                    int cond,
+                    int arg,
+                    const char *extramsg);
+ +

+Checks whether cond is true. +If not, raises an error with a standard message. + + + + + +


luaL_argerror

+[-0, +0, v] +

int luaL_argerror (lua_State *L, int arg, const char *extramsg);
+ +

+Raises an error with a standard message +that includes extramsg as a comment. + + +

+This function never returns, +but it is an idiom to use it in C functions +as return luaL_argerror(args). + + + + + +


luaL_Buffer

+
typedef struct luaL_Buffer luaL_Buffer;
+ +

+Type for a string buffer. + + +

+A string buffer allows C code to build Lua strings piecemeal. +Its pattern of use is as follows: + +

    + +
  • First declare a variable b of type luaL_Buffer.
  • + +
  • Then initialize it with a call luaL_buffinit(L, &b).
  • + +
  • +Then add string pieces to the buffer calling any of +the luaL_add* functions. +
  • + +
  • +Finish by calling luaL_pushresult(&b). +This call leaves the final string on the top of the stack. +
  • + +
+ +

+If you know beforehand the total size of the resulting string, +you can use the buffer like this: + +

    + +
  • First declare a variable b of type luaL_Buffer.
  • + +
  • Then initialize it and preallocate a space of +size sz with a call luaL_buffinitsize(L, &b, sz).
  • + +
  • Then copy the string into that space.
  • + +
  • +Finish by calling luaL_pushresultsize(&b, sz), +where sz is the total size of the resulting string +copied into that space. +
  • + +
+ +

+During its normal operation, +a string buffer uses a variable number of stack slots. +So, while using a buffer, you cannot assume that you know where +the top of the stack is. +You can use the stack between successive calls to buffer operations +as long as that use is balanced; +that is, +when you call a buffer operation, +the stack is at the same level +it was immediately after the previous buffer operation. +(The only exception to this rule is luaL_addvalue.) +After calling luaL_pushresult the stack is back to its +level when the buffer was initialized, +plus the final string on its top. + + + + + +


luaL_buffinit

+[-0, +0, –] +

void luaL_buffinit (lua_State *L, luaL_Buffer *B);
+ +

+Initializes a buffer B. +This function does not allocate any space; +the buffer must be declared as a variable +(see luaL_Buffer). + + + + + +


luaL_buffinitsize

+[-?, +?, e] +

char *luaL_buffinitsize (lua_State *L, luaL_Buffer *B, size_t sz);
+ +

+Equivalent to the sequence +luaL_buffinit, luaL_prepbuffsize. + + + + + +


luaL_callmeta

+[-0, +(0|1), e] +

int luaL_callmeta (lua_State *L, int obj, const char *e);
+ +

+Calls a metamethod. + + +

+If the object at index obj has a metatable and this +metatable has a field e, +this function calls this field passing the object as its only argument. +In this case this function returns true and pushes onto the +stack the value returned by the call. +If there is no metatable or no metamethod, +this function returns false (without pushing any value on the stack). + + + + + +


luaL_checkany

+[-0, +0, v] +

void luaL_checkany (lua_State *L, int arg);
+ +

+Checks whether the function has an argument +of any type (including nil) at position arg. + + + + + +


luaL_checkint

+[-0, +0, v] +

int luaL_checkint (lua_State *L, int arg);
+ +

+Checks whether the function argument arg is a number +and returns this number cast to an int. + + + + + +


luaL_checkinteger

+[-0, +0, v] +

lua_Integer luaL_checkinteger (lua_State *L, int arg);
+ +

+Checks whether the function argument arg is a number +and returns this number cast to a lua_Integer. + + + + + +


luaL_checklong

+[-0, +0, v] +

long luaL_checklong (lua_State *L, int arg);
+ +

+Checks whether the function argument arg is a number +and returns this number cast to a long. + + + + + +


luaL_checklstring

+[-0, +0, v] +

const char *luaL_checklstring (lua_State *L, int arg, size_t *l);
+ +

+Checks whether the function argument arg is a string +and returns this string; +if l is not NULL fills *l +with the string's length. + + +

+This function uses lua_tolstring to get its result, +so all conversions and caveats of that function apply here. + + + + + +


luaL_checknumber

+[-0, +0, v] +

lua_Number luaL_checknumber (lua_State *L, int arg);
+ +

+Checks whether the function argument arg is a number +and returns this number. + + + + + +


luaL_checkoption

+[-0, +0, v] +

int luaL_checkoption (lua_State *L,
+                      int arg,
+                      const char *def,
+                      const char *const lst[]);
+ +

+Checks whether the function argument arg is a string and +searches for this string in the array lst +(which must be NULL-terminated). +Returns the index in the array where the string was found. +Raises an error if the argument is not a string or +if the string cannot be found. + + +

+If def is not NULL, +the function uses def as a default value when +there is no argument arg or when this argument is nil. + + +

+This is a useful function for mapping strings to C enums. +(The usual convention in Lua libraries is +to use strings instead of numbers to select options.) + + + + + +


luaL_checkstack

+[-0, +0, v] +

void luaL_checkstack (lua_State *L, int sz, const char *msg);
+ +

+Grows the stack size to top + sz elements, +raising an error if the stack cannot grow to that size. +msg is an additional text to go into the error message +(or NULL for no additional text). + + + + + +


luaL_checkstring

+[-0, +0, v] +

const char *luaL_checkstring (lua_State *L, int arg);
+ +

+Checks whether the function argument arg is a string +and returns this string. + + +

+This function uses lua_tolstring to get its result, +so all conversions and caveats of that function apply here. + + + + + +


luaL_checktype

+[-0, +0, v] +

void luaL_checktype (lua_State *L, int arg, int t);
+ +

+Checks whether the function argument arg has type t. +See lua_type for the encoding of types for t. + + + + + +


luaL_checkudata

+[-0, +0, v] +

void *luaL_checkudata (lua_State *L, int arg, const char *tname);
+ +

+Checks whether the function argument arg is a userdata +of the type tname (see luaL_newmetatable) and +returns the userdata address (see lua_touserdata). + + + + + +


luaL_checkunsigned

+[-0, +0, v] +

lua_Unsigned luaL_checkunsigned (lua_State *L, int arg);
+ +

+Checks whether the function argument arg is a number +and returns this number cast to a lua_Unsigned. + + + + + +


luaL_checkversion

+[-0, +0, –] +

void luaL_checkversion (lua_State *L);
+ +

+Checks whether the core running the call, +the core that created the Lua state, +and the code making the call are all using the same version of Lua. +Also checks whether the core running the call +and the core that created the Lua state +are using the same address space. + + + + + +


luaL_dofile

+[-0, +?, e] +

int luaL_dofile (lua_State *L, const char *filename);
+ +

+Loads and runs the given file. +It is defined as the following macro: + +

+     (luaL_loadfile(L, filename) || lua_pcall(L, 0, LUA_MULTRET, 0))
+

+It returns false if there are no errors +or true in case of errors. + + + + + +


luaL_dostring

+[-0, +?, –] +

int luaL_dostring (lua_State *L, const char *str);
+ +

+Loads and runs the given string. +It is defined as the following macro: + +

+     (luaL_loadstring(L, str) || lua_pcall(L, 0, LUA_MULTRET, 0))
+

+It returns false if there are no errors +or true in case of errors. + + + + + +


luaL_error

+[-0, +0, v] +

int luaL_error (lua_State *L, const char *fmt, ...);
+ +

+Raises an error. +The error message format is given by fmt +plus any extra arguments, +following the same rules of lua_pushfstring. +It also adds at the beginning of the message the file name and +the line number where the error occurred, +if this information is available. + + +

+This function never returns, +but it is an idiom to use it in C functions +as return luaL_error(args). + + + + + +


luaL_execresult

+[-0, +3, e] +

int luaL_execresult (lua_State *L, int stat);
+ +

+This function produces the return values for +process-related functions in the standard library +(os.execute and io.close). + + + + + +


luaL_fileresult

+[-0, +(1|3), e] +

int luaL_fileresult (lua_State *L, int stat, const char *fname);
+ +

+This function produces the return values for +file-related functions in the standard library +(io.open, os.rename, file:seek, etc.). + + + + + +


luaL_getmetafield

+[-0, +(0|1), e] +

int luaL_getmetafield (lua_State *L, int obj, const char *e);
+ +

+Pushes onto the stack the field e from the metatable +of the object at index obj. +If the object does not have a metatable, +or if the metatable does not have this field, +returns false and pushes nothing. + + + + + +


luaL_getmetatable

+[-0, +1, –] +

void luaL_getmetatable (lua_State *L, const char *tname);
+ +

+Pushes onto the stack the metatable associated with name tname +in the registry (see luaL_newmetatable). + + + + + +


luaL_getsubtable

+[-0, +1, e] +

int luaL_getsubtable (lua_State *L, int idx, const char *fname);
+ +

+Ensures that the value t[fname], +where t is the value at index idx, +is a table, +and pushes that table onto the stack. +Returns true if it finds a previous table there +and false if it creates a new table. + + + + + +


luaL_gsub

+[-0, +1, e] +

const char *luaL_gsub (lua_State *L,
+                       const char *s,
+                       const char *p,
+                       const char *r);
+ +

+Creates a copy of string s by replacing +any occurrence of the string p +with the string r. +Pushes the resulting string on the stack and returns it. + + + + + +


luaL_len

+[-0, +0, e] +

int luaL_len (lua_State *L, int index);
+ +

+Returns the "length" of the value at the given index +as a number; +it is equivalent to the '#' operator in Lua (see §3.4.6). +Raises an error if the result of the operation is not a number. +(This case only can happen through metamethods.) + + + + + +


luaL_loadbuffer

+[-0, +1, –] +

int luaL_loadbuffer (lua_State *L,
+                     const char *buff,
+                     size_t sz,
+                     const char *name);
+ +

+Equivalent to luaL_loadbufferx with mode equal to NULL. + + + + + +


luaL_loadbufferx

+[-0, +1, –] +

int luaL_loadbufferx (lua_State *L,
+                      const char *buff,
+                      size_t sz,
+                      const char *name,
+                      const char *mode);
+ +

+Loads a buffer as a Lua chunk. +This function uses lua_load to load the chunk in the +buffer pointed to by buff with size sz. + + +

+This function returns the same results as lua_load. +name is the chunk name, +used for debug information and error messages. +The string mode works as in function lua_load. + + + + + +


luaL_loadfile

+[-0, +1, e] +

int luaL_loadfile (lua_State *L, const char *filename);
+ +

+Equivalent to luaL_loadfilex with mode equal to NULL. + + + + + +


luaL_loadfilex

+[-0, +1, e] +

int luaL_loadfilex (lua_State *L, const char *filename,
+                                            const char *mode);
+ +

+Loads a file as a Lua chunk. +This function uses lua_load to load the chunk in the file +named filename. +If filename is NULL, +then it loads from the standard input. +The first line in the file is ignored if it starts with a #. + + +

+The string mode works as in function lua_load. + + +

+This function returns the same results as lua_load, +but it has an extra error code LUA_ERRFILE +if it cannot open/read the file or the file has a wrong mode. + + +

+As lua_load, this function only loads the chunk; +it does not run it. + + + + + +


luaL_loadstring

+[-0, +1, –] +

int luaL_loadstring (lua_State *L, const char *s);
+ +

+Loads a string as a Lua chunk. +This function uses lua_load to load the chunk in +the zero-terminated string s. + + +

+This function returns the same results as lua_load. + + +

+Also as lua_load, this function only loads the chunk; +it does not run it. + + + + + +


luaL_newlib

+[-0, +1, e] +

void luaL_newlib (lua_State *L, const luaL_Reg *l);
+ +

+Creates a new table and registers there +the functions in list l. +It is implemented as the following macro: + +

+     (luaL_newlibtable(L,l), luaL_setfuncs(L,l,0))
+
+ + + + +

luaL_newlibtable

+[-0, +1, e] +

void luaL_newlibtable (lua_State *L, const luaL_Reg l[]);
+ +

+Creates a new table with a size optimized +to store all entries in the array l +(but does not actually store them). +It is intended to be used in conjunction with luaL_setfuncs +(see luaL_newlib). + + +

+It is implemented as a macro. +The array l must be the actual array, +not a pointer to it. + + + + + +


luaL_newmetatable

+[-0, +1, e] +

int luaL_newmetatable (lua_State *L, const char *tname);
+ +

+If the registry already has the key tname, +returns 0. +Otherwise, +creates a new table to be used as a metatable for userdata, +adds it to the registry with key tname, +and returns 1. + + +

+In both cases pushes onto the stack the final value associated +with tname in the registry. + + + + + +


luaL_newstate

+[-0, +0, –] +

lua_State *luaL_newstate (void);
+ +

+Creates a new Lua state. +It calls lua_newstate with an +allocator based on the standard C realloc function +and then sets a panic function (see §4.6) that prints +an error message to the standard error output in case of fatal +errors. + + +

+Returns the new state, +or NULL if there is a memory allocation error. + + + + + +


luaL_openlibs

+[-0, +0, e] +

void luaL_openlibs (lua_State *L);
+ +

+Opens all standard Lua libraries into the given state. + + + + + +


luaL_optint

+[-0, +0, v] +

int luaL_optint (lua_State *L, int arg, int d);
+ +

+If the function argument arg is a number, +returns this number cast to an int. +If this argument is absent or is nil, +returns d. +Otherwise, raises an error. + + + + + +


luaL_optinteger

+[-0, +0, v] +

lua_Integer luaL_optinteger (lua_State *L,
+                             int arg,
+                             lua_Integer d);
+ +

+If the function argument arg is a number, +returns this number cast to a lua_Integer. +If this argument is absent or is nil, +returns d. +Otherwise, raises an error. + + + + + +


luaL_optlong

+[-0, +0, v] +

long luaL_optlong (lua_State *L, int arg, long d);
+ +

+If the function argument arg is a number, +returns this number cast to a long. +If this argument is absent or is nil, +returns d. +Otherwise, raises an error. + + + + + +


luaL_optlstring

+[-0, +0, v] +

const char *luaL_optlstring (lua_State *L,
+                             int arg,
+                             const char *d,
+                             size_t *l);
+ +

+If the function argument arg is a string, +returns this string. +If this argument is absent or is nil, +returns d. +Otherwise, raises an error. + + +

+If l is not NULL, +fills the position *l with the result's length. + + + + + +


luaL_optnumber

+[-0, +0, v] +

lua_Number luaL_optnumber (lua_State *L, int arg, lua_Number d);
+ +

+If the function argument arg is a number, +returns this number. +If this argument is absent or is nil, +returns d. +Otherwise, raises an error. + + + + + +


luaL_optstring

+[-0, +0, v] +

const char *luaL_optstring (lua_State *L,
+                            int arg,
+                            const char *d);
+ +

+If the function argument arg is a string, +returns this string. +If this argument is absent or is nil, +returns d. +Otherwise, raises an error. + + + + + +


luaL_optunsigned

+[-0, +0, v] +

lua_Unsigned luaL_optunsigned (lua_State *L,
+                               int arg,
+                               lua_Unsigned u);
+ +

+If the function argument arg is a number, +returns this number cast to a lua_Unsigned. +If this argument is absent or is nil, +returns u. +Otherwise, raises an error. + + + + + +


luaL_prepbuffer

+[-?, +?, e] +

char *luaL_prepbuffer (luaL_Buffer *B);
+ +

+Equivalent to luaL_prepbuffsize +with the predefined size LUAL_BUFFERSIZE. + + + + + +


luaL_prepbuffsize

+[-?, +?, e] +

char *luaL_prepbuffsize (luaL_Buffer *B, size_t sz);
+ +

+Returns an address to a space of size sz +where you can copy a string to be added to buffer B +(see luaL_Buffer). +After copying the string into this space you must call +luaL_addsize with the size of the string to actually add +it to the buffer. + + + + + +


luaL_pushresult

+[-?, +1, e] +

void luaL_pushresult (luaL_Buffer *B);
+ +

+Finishes the use of buffer B leaving the final string on +the top of the stack. + + + + + +


luaL_pushresultsize

+[-?, +1, e] +

void luaL_pushresultsize (luaL_Buffer *B, size_t sz);
+ +

+Equivalent to the sequence luaL_addsize, luaL_pushresult. + + + + + +


luaL_ref

+[-1, +0, e] +

int luaL_ref (lua_State *L, int t);
+ +

+Creates and returns a reference, +in the table at index t, +for the object at the top of the stack (and pops the object). + + +

+A reference is a unique integer key. +As long as you do not manually add integer keys into table t, +luaL_ref ensures the uniqueness of the key it returns. +You can retrieve an object referred by reference r +by calling lua_rawgeti(L, t, r). +Function luaL_unref frees a reference and its associated object. + + +

+If the object at the top of the stack is nil, +luaL_ref returns the constant LUA_REFNIL. +The constant LUA_NOREF is guaranteed to be different +from any reference returned by luaL_ref. + + + + + +


luaL_Reg

+
typedef struct luaL_Reg {
+  const char *name;
+  lua_CFunction func;
+} luaL_Reg;
+ +

+Type for arrays of functions to be registered by +luaL_setfuncs. +name is the function name and func is a pointer to +the function. +Any array of luaL_Reg must end with an sentinel entry +in which both name and func are NULL. + + + + + +


luaL_requiref

+[-0, +1, e] +

void luaL_requiref (lua_State *L, const char *modname,
+                    lua_CFunction openf, int glb);
+ +

+Calls function openf with string modname as an argument +and sets the call result in package.loaded[modname], +as if that function has been called through require. + + +

+If glb is true, +also stores the result into global modname. + + +

+Leaves a copy of that result on the stack. + + + + + +


luaL_setfuncs

+[-nup, +0, e] +

void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup);
+ +

+Registers all functions in the array l +(see luaL_Reg) into the table on the top of the stack +(below optional upvalues, see next). + + +

+When nup is not zero, +all functions are created sharing nup upvalues, +which must be previously pushed on the stack +on top of the library table. +These values are popped from the stack after the registration. + + + + + +


luaL_setmetatable

+[-0, +0, –] +

void luaL_setmetatable (lua_State *L, const char *tname);
+ +

+Sets the metatable of the object at the top of the stack +as the metatable associated with name tname +in the registry (see luaL_newmetatable). + + + + + +


luaL_testudata

+[-0, +0, e] +

void *luaL_testudata (lua_State *L, int arg, const char *tname);
+ +

+This function works like luaL_checkudata, +except that, when the test fails, +it returns NULL instead of throwing an error. + + + + + +


luaL_tolstring

+[-0, +1, e] +

const char *luaL_tolstring (lua_State *L, int idx, size_t *len);
+ +

+Converts any Lua value at the given index to a C string +in a reasonable format. +The resulting string is pushed onto the stack and also +returned by the function. +If len is not NULL, +the function also sets *len with the string length. + + +

+If the value has a metatable with a "__tostring" field, +then luaL_tolstring calls the corresponding metamethod +with the value as argument, +and uses the result of the call as its result. + + + + + +


luaL_traceback

+[-0, +1, e] +

void luaL_traceback (lua_State *L, lua_State *L1, const char *msg,
+                     int level);
+ +

+Creates and pushes a traceback of the stack L1. +If msg is not NULL it is appended +at the beginning of the traceback. +The level parameter tells at which level +to start the traceback. + + + + + +


luaL_typename

+[-0, +0, –] +

const char *luaL_typename (lua_State *L, int index);
+ +

+Returns the name of the type of the value at the given index. + + + + + +


luaL_unref

+[-0, +0, –] +

void luaL_unref (lua_State *L, int t, int ref);
+ +

+Releases reference ref from the table at index t +(see luaL_ref). +The entry is removed from the table, +so that the referred object can be collected. +The reference ref is also freed to be used again. + + +

+If ref is LUA_NOREF or LUA_REFNIL, +luaL_unref does nothing. + + + + + +


luaL_where

+[-0, +1, e] +

void luaL_where (lua_State *L, int lvl);
+ +

+Pushes onto the stack a string identifying the current position +of the control at level lvl in the call stack. +Typically this string has the following format: + +

+     chunkname:currentline:
+

+Level 0 is the running function, +level 1 is the function that called the running function, +etc. + + +

+This function is used to build a prefix for error messages. + + + + + + + +

6 – Standard Libraries

+ +

+The standard Lua libraries provide useful functions +that are implemented directly through the C API. +Some of these functions provide essential services to the language +(e.g., type and getmetatable); +others provide access to "outside" services (e.g., I/O); +and others could be implemented in Lua itself, +but are quite useful or have critical performance requirements that +deserve an implementation in C (e.g., table.sort). + + +

+All libraries are implemented through the official C API +and are provided as separate C modules. +Currently, Lua has the following standard libraries: + +

    + +
  • basic library (§6.1);
  • + +
  • coroutine library (§6.2);
  • + +
  • package library (§6.3);
  • + +
  • string manipulation (§6.4);
  • + +
  • table manipulation (§6.5);
  • + +
  • mathematical functions (§6.6) (sin, log, etc.);
  • + +
  • bitwise operations (§6.7);
  • + +
  • input and output (§6.8);
  • + +
  • operating system facilities (§6.9);
  • + +
  • debug facilities (§6.10).
  • + +

+Except for the basic and the package libraries, +each library provides all its functions as fields of a global table +or as methods of its objects. + + +

+To have access to these libraries, +the C host program should call the luaL_openlibs function, +which opens all standard libraries. +Alternatively, +the host program can open them individually by using +luaL_requiref to call +luaopen_base (for the basic library), +luaopen_package (for the package library), +luaopen_coroutine (for the coroutine library), +luaopen_string (for the string library), +luaopen_table (for the table library), +luaopen_math (for the mathematical library), +luaopen_bit32 (for the bit library), +luaopen_io (for the I/O library), +luaopen_os (for the Operating System library), +and luaopen_debug (for the debug library). +These functions are declared in lualib.h. + + + +

6.1 – Basic Functions

+ +

+The basic library provides core functions to Lua. +If you do not include this library in your application, +you should check carefully whether you need to provide +implementations for some of its facilities. + + +

+


assert (v [, message])

+Issues an error when +the value of its argument v is false (i.e., nil or false); +otherwise, returns all its arguments. +message is an error message; +when absent, it defaults to "assertion failed!" + + + + +

+


collectgarbage ([opt [, arg]])

+ + +

+This function is a generic interface to the garbage collector. +It performs different functions according to its first argument, opt: + +

    + +
  • "collect": +performs a full garbage-collection cycle. +This is the default option. +
  • + +
  • "stop": +stops automatic execution of the garbage collector. +The collector will run only when explicitly invoked, +until a call to restart it. +
  • + +
  • "restart": +restarts automatic execution of the garbage collector. +
  • + +
  • "count": +returns the total memory in use by Lua (in Kbytes) and +a second value with the total memory in bytes modulo 1024. +The first value has a fractional part, +so the following equality is always true: + +
    +     k, b = collectgarbage("count")
    +     assert(k*1024 == math.floor(k)*1024 + b)
    +

    +(The second result is useful when Lua is compiled +with a non floating-point type for numbers.) +

  • + +
  • "step": +performs a garbage-collection step. +The step "size" is controlled by arg +(larger values mean more steps) in a non-specified way. +If you want to control the step size +you must experimentally tune the value of arg. +Returns true if the step finished a collection cycle. +
  • + +
  • "setpause": +sets arg as the new value for the pause of +the collector (see §2.5). +Returns the previous value for pause. +
  • + +
  • "setstepmul": +sets arg as the new value for the step multiplier of +the collector (see §2.5). +Returns the previous value for step. +
  • + +
  • "isrunning": +returns a boolean that tells whether the collector is running +(i.e., not stopped). +
  • + +
  • "generational": +changes the collector to generational mode. +This is an experimental feature (see §2.5). +
  • + +
  • "incremental": +changes the collector to incremental mode. +This is the default mode. +
  • + +
+ + + +

+


dofile ([filename])

+Opens the named file and executes its contents as a Lua chunk. +When called without arguments, +dofile executes the contents of the standard input (stdin). +Returns all values returned by the chunk. +In case of errors, dofile propagates the error +to its caller (that is, dofile does not run in protected mode). + + + + +

+


error (message [, level])

+Terminates the last protected function called +and returns message as the error message. +Function error never returns. + + +

+Usually, error adds some information about the error position +at the beginning of the message, if the message is a string. +The level argument specifies how to get the error position. +With level 1 (the default), the error position is where the +error function was called. +Level 2 points the error to where the function +that called error was called; and so on. +Passing a level 0 avoids the addition of error position information +to the message. + + + + +

+


_G

+A global variable (not a function) that +holds the global environment (see §2.2). +Lua itself does not use this variable; +changing its value does not affect any environment, +nor vice-versa. + + + + +

+


getmetatable (object)

+ + +

+If object does not have a metatable, returns nil. +Otherwise, +if the object's metatable has a "__metatable" field, +returns the associated value. +Otherwise, returns the metatable of the given object. + + + + +

+


ipairs (t)

+ + +

+If t has a metamethod __ipairs, +calls it with t as argument and returns the first three +results from the call. + + +

+Otherwise, +returns three values: an iterator function, the table t, and 0, +so that the construction + +

+     for i,v in ipairs(t) do body end
+

+will iterate over the pairs (1,t[1]), (2,t[2]), ..., +up to the first integer key absent from the table. + + + + +

+


load (ld [, source [, mode [, env]]])

+ + +

+Loads a chunk. + + +

+If ld is a string, the chunk is this string. +If ld is a function, +load calls it repeatedly to get the chunk pieces. +Each call to ld must return a string that concatenates +with previous results. +A return of an empty string, nil, or no value signals the end of the chunk. + + +

+If there are no syntactic errors, +returns the compiled chunk as a function; +otherwise, returns nil plus the error message. + + +

+If the resulting function has upvalues, +the first upvalue is set to the value of env, +if that parameter is given, +or to the value of the global environment. +(When you load a main chunk, +the resulting function will always have exactly one upvalue, +the _ENV variable (see §2.2). +When you load a binary chunk created from a function (see string.dump), +the resulting function can have arbitrary upvalues.) + + +

+source is used as the source of the chunk for error messages +and debug information (see §4.9). +When absent, +it defaults to ld, if ld is a string, +or to "=(load)" otherwise. + + +

+The string mode controls whether the chunk can be text or binary +(that is, a precompiled chunk). +It may be the string "b" (only binary chunks), +"t" (only text chunks), +or "bt" (both binary and text). +The default is "bt". + + + + +

+


loadfile ([filename [, mode [, env]]])

+ + +

+Similar to load, +but gets the chunk from file filename +or from the standard input, +if no file name is given. + + + + +

+


next (table [, index])

+ + +

+Allows a program to traverse all fields of a table. +Its first argument is a table and its second argument +is an index in this table. +next returns the next index of the table +and its associated value. +When called with nil as its second argument, +next returns an initial index +and its associated value. +When called with the last index, +or with nil in an empty table, +next returns nil. +If the second argument is absent, then it is interpreted as nil. +In particular, +you can use next(t) to check whether a table is empty. + + +

+The order in which the indices are enumerated is not specified, +even for numeric indices. +(To traverse a table in numeric order, +use a numerical for.) + + +

+The behavior of next is undefined if, +during the traversal, +you assign any value to a non-existent field in the table. +You may however modify existing fields. +In particular, you may clear existing fields. + + + + +

+


pairs (t)

+ + +

+If t has a metamethod __pairs, +calls it with t as argument and returns the first three +results from the call. + + +

+Otherwise, +returns three values: the next function, the table t, and nil, +so that the construction + +

+     for k,v in pairs(t) do body end
+

+will iterate over all key–value pairs of table t. + + +

+See function next for the caveats of modifying +the table during its traversal. + + + + +

+


pcall (f [, arg1, ···])

+ + +

+Calls function f with +the given arguments in protected mode. +This means that any error inside f is not propagated; +instead, pcall catches the error +and returns a status code. +Its first result is the status code (a boolean), +which is true if the call succeeds without errors. +In such case, pcall also returns all results from the call, +after this first result. +In case of any error, pcall returns false plus the error message. + + + + +

+


print (···)

+Receives any number of arguments +and prints their values to stdout, +using the tostring function to convert each argument to a string. +print is not intended for formatted output, +but only as a quick way to show a value, +for instance for debugging. +For complete control over the output, +use string.format and io.write. + + + + +

+


rawequal (v1, v2)

+Checks whether v1 is equal to v2, +without invoking any metamethod. +Returns a boolean. + + + + +

+


rawget (table, index)

+Gets the real value of table[index], +without invoking any metamethod. +table must be a table; +index may be any value. + + + + +

+


rawlen (v)

+Returns the length of the object v, +which must be a table or a string, +without invoking any metamethod. +Returns an integer number. + + + + +

+


rawset (table, index, value)

+Sets the real value of table[index] to value, +without invoking any metamethod. +table must be a table, +index any value different from nil and NaN, +and value any Lua value. + + +

+This function returns table. + + + + +

+


select (index, ···)

+ + +

+If index is a number, +returns all arguments after argument number index; +a negative number indexes from the end (-1 is the last argument). +Otherwise, index must be the string "#", +and select returns the total number of extra arguments it received. + + + + +

+


setmetatable (table, metatable)

+ + +

+Sets the metatable for the given table. +(You cannot change the metatable of other types from Lua, only from C.) +If metatable is nil, +removes the metatable of the given table. +If the original metatable has a "__metatable" field, +raises an error. + + +

+This function returns table. + + + + +

+


tonumber (e [, base])

+ + +

+When called with no base, +tonumber tries to convert its argument to a number. +If the argument is already a number or +a string convertible to a number (see §3.4.2), +then tonumber returns this number; +otherwise, it returns nil. + + +

+When called with base, +then e should be a string to be interpreted as +an integer numeral in that base. +The base may be any integer between 2 and 36, inclusive. +In bases above 10, the letter 'A' (in either upper or lower case) +represents 10, 'B' represents 11, and so forth, +with 'Z' representing 35. +If the string e is not a valid numeral in the given base, +the function returns nil. + + + + +

+


tostring (v)

+Receives a value of any type and +converts it to a string in a reasonable format. +(For complete control of how numbers are converted, +use string.format.) + + +

+If the metatable of v has a "__tostring" field, +then tostring calls the corresponding value +with v as argument, +and uses the result of the call as its result. + + + + +

+


type (v)

+Returns the type of its only argument, coded as a string. +The possible results of this function are +"nil" (a string, not the value nil), +"number", +"string", +"boolean", +"table", +"function", +"thread", +and "userdata". + + + + +

+


_VERSION

+A global variable (not a function) that +holds a string containing the current interpreter version. +The current contents of this variable is "Lua 5.2". + + + + +

+


xpcall (f, msgh [, arg1, ···])

+ + +

+This function is similar to pcall, +except that it sets a new message handler msgh. + + + + + + + +

6.2 – Coroutine Manipulation

+ +

+The operations related to coroutines comprise a sub-library of +the basic library and come inside the table coroutine. +See §2.6 for a general description of coroutines. + + +

+


coroutine.create (f)

+ + +

+Creates a new coroutine, with body f. +f must be a Lua function. +Returns this new coroutine, +an object with type "thread". + + + + +

+


coroutine.resume (co [, val1, ···])

+ + +

+Starts or continues the execution of coroutine co. +The first time you resume a coroutine, +it starts running its body. +The values val1, ... are passed +as the arguments to the body function. +If the coroutine has yielded, +resume restarts it; +the values val1, ... are passed +as the results from the yield. + + +

+If the coroutine runs without any errors, +resume returns true plus any values passed to yield +(if the coroutine yields) or any values returned by the body function +(if the coroutine terminates). +If there is any error, +resume returns false plus the error message. + + + + +

+


coroutine.running ()

+ + +

+Returns the running coroutine plus a boolean, +true when the running coroutine is the main one. + + + + +

+


coroutine.status (co)

+ + +

+Returns the status of coroutine co, as a string: +"running", +if the coroutine is running (that is, it called status); +"suspended", if the coroutine is suspended in a call to yield, +or if it has not started running yet; +"normal" if the coroutine is active but not running +(that is, it has resumed another coroutine); +and "dead" if the coroutine has finished its body function, +or if it has stopped with an error. + + + + +

+


coroutine.wrap (f)

+ + +

+Creates a new coroutine, with body f. +f must be a Lua function. +Returns a function that resumes the coroutine each time it is called. +Any arguments passed to the function behave as the +extra arguments to resume. +Returns the same values returned by resume, +except the first boolean. +In case of error, propagates the error. + + + + +

+


coroutine.yield (···)

+ + +

+Suspends the execution of the calling coroutine. +Any arguments to yield are passed as extra results to resume. + + + + + + + +

6.3 – Modules

+ +

+The package library provides basic +facilities for loading modules in Lua. +It exports one function directly in the global environment: +require. +Everything else is exported in a table package. + + +

+


require (modname)

+ + +

+Loads the given module. +The function starts by looking into the package.loaded table +to determine whether modname is already loaded. +If it is, then require returns the value stored +at package.loaded[modname]. +Otherwise, it tries to find a loader for the module. + + +

+To find a loader, +require is guided by the package.searchers sequence. +By changing this sequence, +we can change how require looks for a module. +The following explanation is based on the default configuration +for package.searchers. + + +

+First require queries package.preload[modname]. +If it has a value, +this value (which should be a function) is the loader. +Otherwise require searches for a Lua loader using the +path stored in package.path. +If that also fails, it searches for a C loader using the +path stored in package.cpath. +If that also fails, +it tries an all-in-one loader (see package.searchers). + + +

+Once a loader is found, +require calls the loader with two arguments: +modname and an extra value dependent on how it got the loader. +(If the loader came from a file, +this extra value is the file name.) +If the loader returns any non-nil value, +require assigns the returned value to package.loaded[modname]. +If the loader does not return a non-nil value and +has not assigned any value to package.loaded[modname], +then require assigns true to this entry. +In any case, require returns the +final value of package.loaded[modname]. + + +

+If there is any error loading or running the module, +or if it cannot find any loader for the module, +then require raises an error. + + + + +

+


package.config

+ + +

+A string describing some compile-time configurations for packages. +This string is a sequence of lines: + +

    + +
  • The first line is the directory separator string. +Default is '\' for Windows and '/' for all other systems.
  • + +
  • The second line is the character that separates templates in a path. +Default is ';'.
  • + +
  • The third line is the string that marks the +substitution points in a template. +Default is '?'.
  • + +
  • The fourth line is a string that, in a path in Windows, +is replaced by the executable's directory. +Default is '!'.
  • + +
  • The fifth line is a mark to ignore all text before it +when building the luaopen_ function name. +Default is '-'.
  • + +
+ + + +

+


package.cpath

+ + +

+The path used by require to search for a C loader. + + +

+Lua initializes the C path package.cpath in the same way +it initializes the Lua path package.path, +using the environment variable LUA_CPATH_5_2 +or the environment variable LUA_CPATH +or a default path defined in luaconf.h. + + + + +

+


package.loaded

+ + +

+A table used by require to control which +modules are already loaded. +When you require a module modname and +package.loaded[modname] is not false, +require simply returns the value stored there. + + +

+This variable is only a reference to the real table; +assignments to this variable do not change the +table used by require. + + + + +

+


package.loadlib (libname, funcname)

+ + +

+Dynamically links the host program with the C library libname. + + +

+If funcname is "*", +then it only links with the library, +making the symbols exported by the library +available to other dynamically linked libraries. +Otherwise, +it looks for a function funcname inside the library +and returns this function as a C function. +So, funcname must follow the lua_CFunction prototype +(see lua_CFunction). + + +

+This is a low-level function. +It completely bypasses the package and module system. +Unlike require, +it does not perform any path searching and +does not automatically adds extensions. +libname must be the complete file name of the C library, +including if necessary a path and an extension. +funcname must be the exact name exported by the C library +(which may depend on the C compiler and linker used). + + +

+This function is not supported by Standard C. +As such, it is only available on some platforms +(Windows, Linux, Mac OS X, Solaris, BSD, +plus other Unix systems that support the dlfcn standard). + + + + +

+


package.path

+ + +

+The path used by require to search for a Lua loader. + + +

+At start-up, Lua initializes this variable with +the value of the environment variable LUA_PATH_5_2 or +the environment variable LUA_PATH or +with a default path defined in luaconf.h, +if those environment variables are not defined. +Any ";;" in the value of the environment variable +is replaced by the default path. + + + + +

+


package.preload

+ + +

+A table to store loaders for specific modules +(see require). + + +

+This variable is only a reference to the real table; +assignments to this variable do not change the +table used by require. + + + + +

+


package.searchers

+ + +

+A table used by require to control how to load modules. + + +

+Each entry in this table is a searcher function. +When looking for a module, +require calls each of these searchers in ascending order, +with the module name (the argument given to require) as its +sole parameter. +The function can return another function (the module loader) +plus an extra value that will be passed to that loader, +or a string explaining why it did not find that module +(or nil if it has nothing to say). + + +

+Lua initializes this table with four searcher functions. + + +

+The first searcher simply looks for a loader in the +package.preload table. + + +

+The second searcher looks for a loader as a Lua library, +using the path stored at package.path. +The search is done as described in function package.searchpath. + + +

+The third searcher looks for a loader as a C library, +using the path given by the variable package.cpath. +Again, +the search is done as described in function package.searchpath. +For instance, +if the C path is the string + +

+     "./?.so;./?.dll;/usr/local/?/init.so"
+

+the searcher for module foo +will try to open the files ./foo.so, ./foo.dll, +and /usr/local/foo/init.so, in that order. +Once it finds a C library, +this searcher first uses a dynamic link facility to link the +application with the library. +Then it tries to find a C function inside the library to +be used as the loader. +The name of this C function is the string "luaopen_" +concatenated with a copy of the module name where each dot +is replaced by an underscore. +Moreover, if the module name has a hyphen, +its prefix up to (and including) the first hyphen is removed. +For instance, if the module name is a.v1-b.c, +the function name will be luaopen_b_c. + + +

+The fourth searcher tries an all-in-one loader. +It searches the C path for a library for +the root name of the given module. +For instance, when requiring a.b.c, +it will search for a C library for a. +If found, it looks into it for an open function for +the submodule; +in our example, that would be luaopen_a_b_c. +With this facility, a package can pack several C submodules +into one single library, +with each submodule keeping its original open function. + + +

+All searchers except the first one (preload) return as the extra value +the file name where the module was found, +as returned by package.searchpath. +The first searcher returns no extra value. + + + + +

+


package.searchpath (name, path [, sep [, rep]])

+ + +

+Searches for the given name in the given path. + + +

+A path is a string containing a sequence of +templates separated by semicolons. +For each template, +the function replaces each interrogation mark (if any) +in the template with a copy of name +wherein all occurrences of sep +(a dot, by default) +were replaced by rep +(the system's directory separator, by default), +and then tries to open the resulting file name. + + +

+For instance, if the path is the string + +

+     "./?.lua;./?.lc;/usr/local/?/init.lua"
+

+the search for the name foo.a +will try to open the files +./foo/a.lua, ./foo/a.lc, and +/usr/local/foo/a/init.lua, in that order. + + +

+Returns the resulting name of the first file that it can +open in read mode (after closing the file), +or nil plus an error message if none succeeds. +(This error message lists all file names it tried to open.) + + + + + + + +

6.4 – String Manipulation

+ +

+This library provides generic functions for string manipulation, +such as finding and extracting substrings, and pattern matching. +When indexing a string in Lua, the first character is at position 1 +(not at 0, as in C). +Indices are allowed to be negative and are interpreted as indexing backwards, +from the end of the string. +Thus, the last character is at position -1, and so on. + + +

+The string library provides all its functions inside the table +string. +It also sets a metatable for strings +where the __index field points to the string table. +Therefore, you can use the string functions in object-oriented style. +For instance, string.byte(s,i) +can be written as s:byte(i). + + +

+The string library assumes one-byte character encodings. + + +

+


string.byte (s [, i [, j]])

+Returns the internal numerical codes of the characters s[i], +s[i+1], ..., s[j]. +The default value for i is 1; +the default value for j is i. +These indices are corrected +following the same rules of function string.sub. + + +

+Numerical codes are not necessarily portable across platforms. + + + + +

+


string.char (···)

+Receives zero or more integers. +Returns a string with length equal to the number of arguments, +in which each character has the internal numerical code equal +to its corresponding argument. + + +

+Numerical codes are not necessarily portable across platforms. + + + + +

+


string.dump (function)

+ + +

+Returns a string containing a binary representation of the given function, +so that a later load on this string returns +a copy of the function (but with new upvalues). + + + + +

+


string.find (s, pattern [, init [, plain]])

+ + +

+Looks for the first match of +pattern in the string s. +If it finds a match, then find returns the indices of s +where this occurrence starts and ends; +otherwise, it returns nil. +A third, optional numerical argument init specifies +where to start the search; +its default value is 1 and can be negative. +A value of true as a fourth, optional argument plain +turns off the pattern matching facilities, +so the function does a plain "find substring" operation, +with no characters in pattern being considered magic. +Note that if plain is given, then init must be given as well. + + +

+If the pattern has captures, +then in a successful match +the captured values are also returned, +after the two indices. + + + + +

+


string.format (formatstring, ···)

+ + +

+Returns a formatted version of its variable number of arguments +following the description given in its first argument (which must be a string). +The format string follows the same rules as the ANSI C function sprintf. +The only differences are that the options/modifiers +*, h, L, l, n, +and p are not supported +and that there is an extra option, q. +The q option formats a string between double quotes, +using escape sequences when necessary to ensure that +it can safely be read back by the Lua interpreter. +For instance, the call + +

+     string.format('%q', 'a string with "quotes" and \n new line')
+

+may produce the string: + +

+     "a string with \"quotes\" and \
+      new line"
+
+ +

+Options +A and a (when available), +E, e, f, +G, and g all expect a number as argument. +Options c, d, +i, o, u, X, and x +also expect a number, +but the range of that number may be limited by +the underlying C implementation. +For options o, u, X, and x, +the number cannot be negative. +Option q expects a string; +option s expects a string without embedded zeros. +If the argument to option s is not a string, +it is converted to one following the same rules of tostring. + + + + +

+


string.gmatch (s, pattern)

+Returns an iterator function that, +each time it is called, +returns the next captures from pattern over the string s. +If pattern specifies no captures, +then the whole match is produced in each call. + + +

+As an example, the following loop +will iterate over all the words from string s, +printing one per line: + +

+     s = "hello world from Lua"
+     for w in string.gmatch(s, "%a+") do
+       print(w)
+     end
+

+The next example collects all pairs key=value from the +given string into a table: + +

+     t = {}
+     s = "from=world, to=Lua"
+     for k, v in string.gmatch(s, "(%w+)=(%w+)") do
+       t[k] = v
+     end
+
+ +

+For this function, a caret '^' at the start of a pattern does not +work as an anchor, as this would prevent the iteration. + + + + +

+


string.gsub (s, pattern, repl [, n])

+Returns a copy of s +in which all (or the first n, if given) +occurrences of the pattern have been +replaced by a replacement string specified by repl, +which can be a string, a table, or a function. +gsub also returns, as its second value, +the total number of matches that occurred. +The name gsub comes from Global SUBstitution. + + +

+If repl is a string, then its value is used for replacement. +The character % works as an escape character: +any sequence in repl of the form %d, +with d between 1 and 9, +stands for the value of the d-th captured substring. +The sequence %0 stands for the whole match. +The sequence %% stands for a single %. + + +

+If repl is a table, then the table is queried for every match, +using the first capture as the key. + + +

+If repl is a function, then this function is called every time a +match occurs, with all captured substrings passed as arguments, +in order. + + +

+In any case, +if the pattern specifies no captures, +then it behaves as if the whole pattern was inside a capture. + + +

+If the value returned by the table query or by the function call +is a string or a number, +then it is used as the replacement string; +otherwise, if it is false or nil, +then there is no replacement +(that is, the original match is kept in the string). + + +

+Here are some examples: + +

+     x = string.gsub("hello world", "(%w+)", "%1 %1")
+     --> x="hello hello world world"
+     
+     x = string.gsub("hello world", "%w+", "%0 %0", 1)
+     --> x="hello hello world"
+     
+     x = string.gsub("hello world from Lua", "(%w+)%s*(%w+)", "%2 %1")
+     --> x="world hello Lua from"
+     
+     x = string.gsub("home = $HOME, user = $USER", "%$(%w+)", os.getenv)
+     --> x="home = /home/roberto, user = roberto"
+     
+     x = string.gsub("4+5 = $return 4+5$", "%$(.-)%$", function (s)
+           return load(s)()
+         end)
+     --> x="4+5 = 9"
+     
+     local t = {name="lua", version="5.2"}
+     x = string.gsub("$name-$version.tar.gz", "%$(%w+)", t)
+     --> x="lua-5.2.tar.gz"
+
+ + + +

+


string.len (s)

+Receives a string and returns its length. +The empty string "" has length 0. +Embedded zeros are counted, +so "a\000bc\000" has length 5. + + + + +

+


string.lower (s)

+Receives a string and returns a copy of this string with all +uppercase letters changed to lowercase. +All other characters are left unchanged. +The definition of what an uppercase letter is depends on the current locale. + + + + +

+


string.match (s, pattern [, init])

+Looks for the first match of +pattern in the string s. +If it finds one, then match returns +the captures from the pattern; +otherwise it returns nil. +If pattern specifies no captures, +then the whole match is returned. +A third, optional numerical argument init specifies +where to start the search; +its default value is 1 and can be negative. + + + + +

+


string.rep (s, n [, sep])

+Returns a string that is the concatenation of n copies of +the string s separated by the string sep. +The default value for sep is the empty string +(that is, no separator). + + + + +

+


string.reverse (s)

+Returns a string that is the string s reversed. + + + + +

+


string.sub (s, i [, j])

+Returns the substring of s that +starts at i and continues until j; +i and j can be negative. +If j is absent, then it is assumed to be equal to -1 +(which is the same as the string length). +In particular, +the call string.sub(s,1,j) returns a prefix of s +with length j, +and string.sub(s, -i) returns a suffix of s +with length i. + + +

+If, after the translation of negative indices, +i is less than 1, +it is corrected to 1. +If j is greater than the string length, +it is corrected to that length. +If, after these corrections, +i is greater than j, +the function returns the empty string. + + + + +

+


string.upper (s)

+Receives a string and returns a copy of this string with all +lowercase letters changed to uppercase. +All other characters are left unchanged. +The definition of what a lowercase letter is depends on the current locale. + + + +

6.4.1 – Patterns

+ + +

Character Class:

+A character class is used to represent a set of characters. +The following combinations are allowed in describing a character class: + +

    + +
  • x: +(where x is not one of the magic characters +^$()%.[]*+-?) +represents the character x itself. +
  • + +
  • .: (a dot) represents all characters.
  • + +
  • %a: represents all letters.
  • + +
  • %c: represents all control characters.
  • + +
  • %d: represents all digits.
  • + +
  • %g: represents all printable characters except space.
  • + +
  • %l: represents all lowercase letters.
  • + +
  • %p: represents all punctuation characters.
  • + +
  • %s: represents all space characters.
  • + +
  • %u: represents all uppercase letters.
  • + +
  • %w: represents all alphanumeric characters.
  • + +
  • %x: represents all hexadecimal digits.
  • + +
  • %x: (where x is any non-alphanumeric character) +represents the character x. +This is the standard way to escape the magic characters. +Any punctuation character (even the non magic) +can be preceded by a '%' +when used to represent itself in a pattern. +
  • + +
  • [set]: +represents the class which is the union of all +characters in set. +A range of characters can be specified by +separating the end characters of the range, +in ascending order, with a '-', +All classes %x described above can also be used as +components in set. +All other characters in set represent themselves. +For example, [%w_] (or [_%w]) +represents all alphanumeric characters plus the underscore, +[0-7] represents the octal digits, +and [0-7%l%-] represents the octal digits plus +the lowercase letters plus the '-' character. + + +

    +The interaction between ranges and classes is not defined. +Therefore, patterns like [%a-z] or [a-%%] +have no meaning. +

  • + +
  • [^set]: +represents the complement of set, +where set is interpreted as above. +
  • + +

+For all classes represented by single letters (%a, %c, etc.), +the corresponding uppercase letter represents the complement of the class. +For instance, %S represents all non-space characters. + + +

+The definitions of letter, space, and other character groups +depend on the current locale. +In particular, the class [a-z] may not be equivalent to %l. + + + + + +

Pattern Item:

+A pattern item can be + +

    + +
  • +a single character class, +which matches any single character in the class; +
  • + +
  • +a single character class followed by '*', +which matches 0 or more repetitions of characters in the class. +These repetition items will always match the longest possible sequence; +
  • + +
  • +a single character class followed by '+', +which matches 1 or more repetitions of characters in the class. +These repetition items will always match the longest possible sequence; +
  • + +
  • +a single character class followed by '-', +which also matches 0 or more repetitions of characters in the class. +Unlike '*', +these repetition items will always match the shortest possible sequence; +
  • + +
  • +a single character class followed by '?', +which matches 0 or 1 occurrence of a character in the class; +
  • + +
  • +%n, for n between 1 and 9; +such item matches a substring equal to the n-th captured string +(see below); +
  • + +
  • +%bxy, where x and y are two distinct characters; +such item matches strings that start with x, end with y, +and where the x and y are balanced. +This means that, if one reads the string from left to right, +counting +1 for an x and -1 for a y, +the ending y is the first y where the count reaches 0. +For instance, the item %b() matches expressions with +balanced parentheses. +
  • + +
  • +%f[set], a frontier pattern; +such item matches an empty string at any position such that +the next character belongs to set +and the previous character does not belong to set. +The set set is interpreted as previously described. +The beginning and the end of the subject are handled as if +they were the character '\0'. +
  • + +
+ + + + +

Pattern:

+A pattern is a sequence of pattern items. +A caret '^' at the beginning of a pattern anchors the match at the +beginning of the subject string. +A '$' at the end of a pattern anchors the match at the +end of the subject string. +At other positions, +'^' and '$' have no special meaning and represent themselves. + + + + + +

Captures:

+A pattern can contain sub-patterns enclosed in parentheses; +they describe captures. +When a match succeeds, the substrings of the subject string +that match captures are stored (captured) for future use. +Captures are numbered according to their left parentheses. +For instance, in the pattern "(a*(.)%w(%s*))", +the part of the string matching "a*(.)%w(%s*)" is +stored as the first capture (and therefore has number 1); +the character matching "." is captured with number 2, +and the part matching "%s*" has number 3. + + +

+As a special case, the empty capture () captures +the current string position (a number). +For instance, if we apply the pattern "()aa()" on the +string "flaaap", there will be two captures: 3 and 5. + + + + + + + + + + + +

6.5 – Table Manipulation

+ +

+This library provides generic functions for table manipulation. +It provides all its functions inside the table table. + + +

+Remember that, whenever an operation needs the length of a table, +the table should be a proper sequence +or have a __len metamethod (see §3.4.6). +All functions ignore non-numeric keys +in tables given as arguments. + + +

+For performance reasons, +all table accesses (get/set) performed by these functions are raw. + + +

+


table.concat (list [, sep [, i [, j]]])

+ + +

+Given a list where all elements are strings or numbers, +returns the string list[i]..sep..list[i+1] ··· sep..list[j]. +The default value for sep is the empty string, +the default for i is 1, +and the default for j is #list. +If i is greater than j, returns the empty string. + + + + +

+


table.insert (list, [pos,] value)

+ + +

+Inserts element value at position pos in list, +shifting up the elements +list[pos], list[pos+1], ···, list[#list]. +The default value for pos is #list+1, +so that a call table.insert(t,x) inserts x at the end +of list t. + + + + +

+


table.pack (···)

+ + +

+Returns a new table with all parameters stored into keys 1, 2, etc. +and with a field "n" with the total number of parameters. +Note that the resulting table may not be a sequence. + + + + +

+


table.remove (list [, pos])

+ + +

+Removes from list the element at position pos, +returning the value of the removed element. +When pos is an integer between 1 and #list, +it shifts down the elements +list[pos+1], list[pos+2], ···, list[#list] +and erases element list[#list]; +The index pos can also be 0 when #list is 0, +or #list + 1; +in those cases, the function erases the element list[pos]. + + +

+The default value for pos is #list, +so that a call table.remove(t) removes the last element +of list t. + + + + +

+


table.sort (list [, comp])

+ + +

+Sorts list elements in a given order, in-place, +from list[1] to list[#list]. +If comp is given, +then it must be a function that receives two list elements +and returns true when the first element must come +before the second in the final order +(so that not comp(list[i+1],list[i]) will be true after the sort). +If comp is not given, +then the standard Lua operator < is used instead. + + +

+The sort algorithm is not stable; +that is, elements considered equal by the given order +may have their relative positions changed by the sort. + + + + +

+


table.unpack (list [, i [, j]])

+ + +

+Returns the elements from the given table. +This function is equivalent to + +

+     return list[i], list[i+1], ···, list[j]
+

+By default, i is 1 and j is #list. + + + + + + + +

6.6 – Mathematical Functions

+ +

+This library is an interface to the standard C math library. +It provides all its functions inside the table math. + + +

+


math.abs (x)

+ + +

+Returns the absolute value of x. + + + + +

+


math.acos (x)

+ + +

+Returns the arc cosine of x (in radians). + + + + +

+


math.asin (x)

+ + +

+Returns the arc sine of x (in radians). + + + + +

+


math.atan (x)

+ + +

+Returns the arc tangent of x (in radians). + + + + +

+


math.atan2 (y, x)

+ + +

+Returns the arc tangent of y/x (in radians), +but uses the signs of both parameters to find the +quadrant of the result. +(It also handles correctly the case of x being zero.) + + + + +

+


math.ceil (x)

+ + +

+Returns the smallest integer larger than or equal to x. + + + + +

+


math.cos (x)

+ + +

+Returns the cosine of x (assumed to be in radians). + + + + +

+


math.cosh (x)

+ + +

+Returns the hyperbolic cosine of x. + + + + +

+


math.deg (x)

+ + +

+Returns the angle x (given in radians) in degrees. + + + + +

+


math.exp (x)

+ + +

+Returns the value ex. + + + + +

+


math.floor (x)

+ + +

+Returns the largest integer smaller than or equal to x. + + + + +

+


math.fmod (x, y)

+ + +

+Returns the remainder of the division of x by y +that rounds the quotient towards zero. + + + + +

+


math.frexp (x)

+ + +

+Returns m and e such that x = m2e, +e is an integer and the absolute value of m is +in the range [0.5, 1) +(or zero when x is zero). + + + + +

+


math.huge

+ + +

+The value HUGE_VAL, +a value larger than or equal to any other numerical value. + + + + +

+


math.ldexp (m, e)

+ + +

+Returns m2e (e should be an integer). + + + + +

+


math.log (x [, base])

+ + +

+Returns the logarithm of x in the given base. +The default for base is e +(so that the function returns the natural logarithm of x). + + + + +

+


math.max (x, ···)

+ + +

+Returns the maximum value among its arguments. + + + + +

+


math.min (x, ···)

+ + +

+Returns the minimum value among its arguments. + + + + +

+


math.modf (x)

+ + +

+Returns two numbers, +the integral part of x and the fractional part of x. + + + + +

+


math.pi

+ + +

+The value of π. + + + + +

+


math.pow (x, y)

+ + +

+Returns xy. +(You can also use the expression x^y to compute this value.) + + + + +

+


math.rad (x)

+ + +

+Returns the angle x (given in degrees) in radians. + + + + +

+


math.random ([m [, n]])

+ + +

+This function is an interface to the simple +pseudo-random generator function rand provided by Standard C. +(No guarantees can be given for its statistical properties.) + + +

+When called without arguments, +returns a uniform pseudo-random real number +in the range [0,1). +When called with an integer number m, +math.random returns +a uniform pseudo-random integer in the range [1, m]. +When called with two integer numbers m and n, +math.random returns a uniform pseudo-random +integer in the range [m, n]. + + + + +

+


math.randomseed (x)

+ + +

+Sets x as the "seed" +for the pseudo-random generator: +equal seeds produce equal sequences of numbers. + + + + +

+


math.sin (x)

+ + +

+Returns the sine of x (assumed to be in radians). + + + + +

+


math.sinh (x)

+ + +

+Returns the hyperbolic sine of x. + + + + +

+


math.sqrt (x)

+ + +

+Returns the square root of x. +(You can also use the expression x^0.5 to compute this value.) + + + + +

+


math.tan (x)

+ + +

+Returns the tangent of x (assumed to be in radians). + + + + +

+


math.tanh (x)

+ + +

+Returns the hyperbolic tangent of x. + + + + + + + +

6.7 – Bitwise Operations

+ +

+This library provides bitwise operations. +It provides all its functions inside the table bit32. + + +

+Unless otherwise stated, +all functions accept numeric arguments in the range +(-251,+251); +each argument is normalized to +the remainder of its division by 232 +and truncated to an integer (in some unspecified way), +so that its final value falls in the range [0,232 - 1]. +Similarly, all results are in the range [0,232 - 1]. +Note that bit32.bnot(0) is 0xFFFFFFFF, +which is different from -1. + + +

+


bit32.arshift (x, disp)

+ + +

+Returns the number x shifted disp bits to the right. +The number disp may be any representable integer. +Negative displacements shift to the left. + + +

+This shift operation is what is called arithmetic shift. +Vacant bits on the left are filled +with copies of the higher bit of x; +vacant bits on the right are filled with zeros. +In particular, +displacements with absolute values higher than 31 +result in zero or 0xFFFFFFFF (all original bits are shifted out). + + + + +

+


bit32.band (···)

+ + +

+Returns the bitwise and of its operands. + + + + +

+


bit32.bnot (x)

+ + +

+Returns the bitwise negation of x. +For any integer x, +the following identity holds: + +

+     assert(bit32.bnot(x) == (-1 - x) % 2^32)
+
+ + + +

+


bit32.bor (···)

+ + +

+Returns the bitwise or of its operands. + + + + +

+


bit32.btest (···)

+ + +

+Returns a boolean signaling +whether the bitwise and of its operands is different from zero. + + + + +

+


bit32.bxor (···)

+ + +

+Returns the bitwise exclusive or of its operands. + + + + +

+


bit32.extract (n, field [, width])

+ + +

+Returns the unsigned number formed by the bits +field to field + width - 1 from n. +Bits are numbered from 0 (least significant) to 31 (most significant). +All accessed bits must be in the range [0, 31]. + + +

+The default for width is 1. + + + + +

+


bit32.replace (n, v, field [, width])

+ + +

+Returns a copy of n with +the bits field to field + width - 1 +replaced by the value v. +See bit32.extract for details about field and width. + + + + +

+


bit32.lrotate (x, disp)

+ + +

+Returns the number x rotated disp bits to the left. +The number disp may be any representable integer. + + +

+For any valid displacement, +the following identity holds: + +

+     assert(bit32.lrotate(x, disp) == bit32.lrotate(x, disp % 32))
+

+In particular, +negative displacements rotate to the right. + + + + +

+


bit32.lshift (x, disp)

+ + +

+Returns the number x shifted disp bits to the left. +The number disp may be any representable integer. +Negative displacements shift to the right. +In any direction, vacant bits are filled with zeros. +In particular, +displacements with absolute values higher than 31 +result in zero (all bits are shifted out). + + +

+For positive displacements, +the following equality holds: + +

+     assert(bit32.lshift(b, disp) == (b * 2^disp) % 2^32)
+
+ + + +

+


bit32.rrotate (x, disp)

+ + +

+Returns the number x rotated disp bits to the right. +The number disp may be any representable integer. + + +

+For any valid displacement, +the following identity holds: + +

+     assert(bit32.rrotate(x, disp) == bit32.rrotate(x, disp % 32))
+

+In particular, +negative displacements rotate to the left. + + + + +

+


bit32.rshift (x, disp)

+ + +

+Returns the number x shifted disp bits to the right. +The number disp may be any representable integer. +Negative displacements shift to the left. +In any direction, vacant bits are filled with zeros. +In particular, +displacements with absolute values higher than 31 +result in zero (all bits are shifted out). + + +

+For positive displacements, +the following equality holds: + +

+     assert(bit32.rshift(b, disp) == math.floor(b % 2^32 / 2^disp))
+
+ +

+This shift operation is what is called logical shift. + + + + + + + +

6.8 – Input and Output Facilities

+ +

+The I/O library provides two different styles for file manipulation. +The first one uses implicit file descriptors; +that is, there are operations to set a default input file and a +default output file, +and all input/output operations are over these default files. +The second style uses explicit file descriptors. + + +

+When using implicit file descriptors, +all operations are supplied by table io. +When using explicit file descriptors, +the operation io.open returns a file descriptor +and then all operations are supplied as methods of the file descriptor. + + +

+The table io also provides +three predefined file descriptors with their usual meanings from C: +io.stdin, io.stdout, and io.stderr. +The I/O library never closes these files. + + +

+Unless otherwise stated, +all I/O functions return nil on failure +(plus an error message as a second result and +a system-dependent error code as a third result) +and some value different from nil on success. +On non-Posix systems, +the computation of the error message and error code +in case of errors +may be not thread safe, +because they rely on the global C variable errno. + + +

+


io.close ([file])

+ + +

+Equivalent to file:close(). +Without a file, closes the default output file. + + + + +

+


io.flush ()

+ + +

+Equivalent to io.output():flush(). + + + + +

+


io.input ([file])

+ + +

+When called with a file name, it opens the named file (in text mode), +and sets its handle as the default input file. +When called with a file handle, +it simply sets this file handle as the default input file. +When called without parameters, +it returns the current default input file. + + +

+In case of errors this function raises the error, +instead of returning an error code. + + + + +

+


io.lines ([filename ···])

+ + +

+Opens the given file name in read mode +and returns an iterator function that +works like file:lines(···) over the opened file. +When the iterator function detects the end of file, +it returns nil (to finish the loop) and automatically closes the file. + + +

+The call io.lines() (with no file name) is equivalent +to io.input():lines(); +that is, it iterates over the lines of the default input file. +In this case it does not close the file when the loop ends. + + +

+In case of errors this function raises the error, +instead of returning an error code. + + + + +

+


io.open (filename [, mode])

+ + +

+This function opens a file, +in the mode specified in the string mode. +It returns a new file handle, +or, in case of errors, nil plus an error message. + + +

+The mode string can be any of the following: + +

    +
  • "r": read mode (the default);
  • +
  • "w": write mode;
  • +
  • "a": append mode;
  • +
  • "r+": update mode, all previous data is preserved;
  • +
  • "w+": update mode, all previous data is erased;
  • +
  • "a+": append update mode, previous data is preserved, + writing is only allowed at the end of file.
  • +

+The mode string can also have a 'b' at the end, +which is needed in some systems to open the file in binary mode. + + + + +

+


io.output ([file])

+ + +

+Similar to io.input, but operates over the default output file. + + + + +

+


io.popen (prog [, mode])

+ + +

+This function is system dependent and is not available +on all platforms. + + +

+Starts program prog in a separated process and returns +a file handle that you can use to read data from this program +(if mode is "r", the default) +or to write data to this program +(if mode is "w"). + + + + +

+


io.read (···)

+ + +

+Equivalent to io.input():read(···). + + + + +

+


io.tmpfile ()

+ + +

+Returns a handle for a temporary file. +This file is opened in update mode +and it is automatically removed when the program ends. + + + + +

+


io.type (obj)

+ + +

+Checks whether obj is a valid file handle. +Returns the string "file" if obj is an open file handle, +"closed file" if obj is a closed file handle, +or nil if obj is not a file handle. + + + + +

+


io.write (···)

+ + +

+Equivalent to io.output():write(···). + + + + +

+


file:close ()

+ + +

+Closes file. +Note that files are automatically closed when +their handles are garbage collected, +but that takes an unpredictable amount of time to happen. + + +

+When closing a file handle created with io.popen, +file:close returns the same values +returned by os.execute. + + + + +

+


file:flush ()

+ + +

+Saves any written data to file. + + + + +

+


file:lines (···)

+ + +

+Returns an iterator function that, +each time it is called, +reads the file according to the given formats. +When no format is given, +uses "*l" as a default. +As an example, the construction + +

+     for c in file:lines(1) do body end
+

+will iterate over all characters of the file, +starting at the current position. +Unlike io.lines, this function does not close the file +when the loop ends. + + +

+In case of errors this function raises the error, +instead of returning an error code. + + + + +

+


file:read (···)

+ + +

+Reads the file file, +according to the given formats, which specify what to read. +For each format, +the function returns a string (or a number) with the characters read, +or nil if it cannot read data with the specified format. +When called without formats, +it uses a default format that reads the next line +(see below). + + +

+The available formats are + +

    + +
  • "*n": +reads a number; +this is the only format that returns a number instead of a string. +
  • + +
  • "*a": +reads the whole file, starting at the current position. +On end of file, it returns the empty string. +
  • + +
  • "*l": +reads the next line skipping the end of line, +returning nil on end of file. +This is the default format. +
  • + +
  • "*L": +reads the next line keeping the end of line (if present), +returning nil on end of file. +
  • + +
  • number: +reads a string with up to this number of bytes, +returning nil on end of file. +If number is zero, +it reads nothing and returns an empty string, +or nil on end of file. +
  • + +
+ + + +

+


file:seek ([whence [, offset]])

+ + +

+Sets and gets the file position, +measured from the beginning of the file, +to the position given by offset plus a base +specified by the string whence, as follows: + +

    +
  • "set": base is position 0 (beginning of the file);
  • +
  • "cur": base is current position;
  • +
  • "end": base is end of file;
  • +

+In case of success, seek returns the final file position, +measured in bytes from the beginning of the file. +If seek fails, it returns nil, +plus a string describing the error. + + +

+The default value for whence is "cur", +and for offset is 0. +Therefore, the call file:seek() returns the current +file position, without changing it; +the call file:seek("set") sets the position to the +beginning of the file (and returns 0); +and the call file:seek("end") sets the position to the +end of the file, and returns its size. + + + + +

+


file:setvbuf (mode [, size])

+ + +

+Sets the buffering mode for an output file. +There are three available modes: + +

    + +
  • "no": +no buffering; the result of any output operation appears immediately. +
  • + +
  • "full": +full buffering; output operation is performed only +when the buffer is full or when +you explicitly flush the file (see io.flush). +
  • + +
  • "line": +line buffering; output is buffered until a newline is output +or there is any input from some special files +(such as a terminal device). +
  • + +

+For the last two cases, size +specifies the size of the buffer, in bytes. +The default is an appropriate size. + + + + +

+


file:write (···)

+ + +

+Writes the value of each of its arguments to file. +The arguments must be strings or numbers. + + +

+In case of success, this function returns file. +Otherwise it returns nil plus a string describing the error. + + + + + + + +

6.9 – Operating System Facilities

+ +

+This library is implemented through table os. + + +

+


os.clock ()

+ + +

+Returns an approximation of the amount in seconds of CPU time +used by the program. + + + + +

+


os.date ([format [, time]])

+ + +

+Returns a string or a table containing date and time, +formatted according to the given string format. + + +

+If the time argument is present, +this is the time to be formatted +(see the os.time function for a description of this value). +Otherwise, date formats the current time. + + +

+If format starts with '!', +then the date is formatted in Coordinated Universal Time. +After this optional character, +if format is the string "*t", +then date returns a table with the following fields: +year (four digits), month (1–12), day (1–31), +hour (0–23), min (0–59), sec (0–61), +wday (weekday, Sunday is 1), +yday (day of the year), +and isdst (daylight saving flag, a boolean). +This last field may be absent +if the information is not available. + + +

+If format is not "*t", +then date returns the date as a string, +formatted according to the same rules as the ANSI C function strftime. + + +

+When called without arguments, +date returns a reasonable date and time representation that depends on +the host system and on the current locale +(that is, os.date() is equivalent to os.date("%c")). + + +

+On non-Posix systems, +this function may be not thread safe +because of its reliance on C function gmtime and C function localtime. + + + + +

+


os.difftime (t2, t1)

+ + +

+Returns the number of seconds from time t1 to time t2. +In POSIX, Windows, and some other systems, +this value is exactly t2-t1. + + + + +

+


os.execute ([command])

+ + +

+This function is equivalent to the ANSI C function system. +It passes command to be executed by an operating system shell. +Its first result is true +if the command terminated successfully, +or nil otherwise. +After this first result +the function returns a string and a number, +as follows: + +

    + +
  • "exit": +the command terminated normally; +the following number is the exit status of the command. +
  • + +
  • "signal": +the command was terminated by a signal; +the following number is the signal that terminated the command. +
  • + +
+ +

+When called without a command, +os.execute returns a boolean that is true if a shell is available. + + + + +

+


os.exit ([code [, close])

+ + +

+Calls the ANSI C function exit to terminate the host program. +If code is true, +the returned status is EXIT_SUCCESS; +if code is false, +the returned status is EXIT_FAILURE; +if code is a number, +the returned status is this number. +The default value for code is true. + + +

+If the optional second argument close is true, +closes the Lua state before exiting. + + + + +

+


os.getenv (varname)

+ + +

+Returns the value of the process environment variable varname, +or nil if the variable is not defined. + + + + +

+


os.remove (filename)

+ + +

+Deletes the file (or empty directory, on POSIX systems) +with the given name. +If this function fails, it returns nil, +plus a string describing the error and the error code. + + + + +

+


os.rename (oldname, newname)

+ + +

+Renames file or directory named oldname to newname. +If this function fails, it returns nil, +plus a string describing the error and the error code. + + + + +

+


os.setlocale (locale [, category])

+ + +

+Sets the current locale of the program. +locale is a system-dependent string specifying a locale; +category is an optional string describing which category to change: +"all", "collate", "ctype", +"monetary", "numeric", or "time"; +the default category is "all". +The function returns the name of the new locale, +or nil if the request cannot be honored. + + +

+If locale is the empty string, +the current locale is set to an implementation-defined native locale. +If locale is the string "C", +the current locale is set to the standard C locale. + + +

+When called with nil as the first argument, +this function only returns the name of the current locale +for the given category. + + +

+This function may be not thread safe +because of its reliance on C function setlocale. + + + + +

+


os.time ([table])

+ + +

+Returns the current time when called without arguments, +or a time representing the date and time specified by the given table. +This table must have fields year, month, and day, +and may have fields +hour (default is 12), +min (default is 0), +sec (default is 0), +and isdst (default is nil). +For a description of these fields, see the os.date function. + + +

+The returned value is a number, whose meaning depends on your system. +In POSIX, Windows, and some other systems, +this number counts the number +of seconds since some given start time (the "epoch"). +In other systems, the meaning is not specified, +and the number returned by time can be used only as an argument to +os.date and os.difftime. + + + + +

+


os.tmpname ()

+ + +

+Returns a string with a file name that can +be used for a temporary file. +The file must be explicitly opened before its use +and explicitly removed when no longer needed. + + +

+On POSIX systems, +this function also creates a file with that name, +to avoid security risks. +(Someone else might create the file with wrong permissions +in the time between getting the name and creating the file.) +You still have to open the file to use it +and to remove it (even if you do not use it). + + +

+When possible, +you may prefer to use io.tmpfile, +which automatically removes the file when the program ends. + + + + + + + +

6.10 – The Debug Library

+ +

+This library provides +the functionality of the debug interface (§4.9) to Lua programs. +You should exert care when using this library. +Several of its functions +violate basic assumptions about Lua code +(e.g., that variables local to a function +cannot be accessed from outside; +that userdata metatables cannot be changed by Lua code; +that Lua programs do not crash) +and therefore can compromise otherwise secure code. +Moreover, some functions in this library may be slow. + + +

+All functions in this library are provided +inside the debug table. +All functions that operate over a thread +have an optional first argument which is the +thread to operate over. +The default is always the current thread. + + +

+


debug.debug ()

+ + +

+Enters an interactive mode with the user, +running each string that the user enters. +Using simple commands and other debug facilities, +the user can inspect global and local variables, +change their values, evaluate expressions, and so on. +A line containing only the word cont finishes this function, +so that the caller continues its execution. + + +

+Note that commands for debug.debug are not lexically nested +within any function and so have no direct access to local variables. + + + + +

+


debug.gethook ([thread])

+ + +

+Returns the current hook settings of the thread, as three values: +the current hook function, the current hook mask, +and the current hook count +(as set by the debug.sethook function). + + + + +

+


debug.getinfo ([thread,] f [, what])

+ + +

+Returns a table with information about a function. +You can give the function directly +or you can give a number as the value of f, +which means the function running at level f of the call stack +of the given thread: +level 0 is the current function (getinfo itself); +level 1 is the function that called getinfo +(except for tail calls, which do not count on the stack); +and so on. +If f is a number larger than the number of active functions, +then getinfo returns nil. + + +

+The returned table can contain all the fields returned by lua_getinfo, +with the string what describing which fields to fill in. +The default for what is to get all information available, +except the table of valid lines. +If present, +the option 'f' +adds a field named func with the function itself. +If present, +the option 'L' +adds a field named activelines with the table of +valid lines. + + +

+For instance, the expression debug.getinfo(1,"n").name returns +a table with a name for the current function, +if a reasonable name can be found, +and the expression debug.getinfo(print) +returns a table with all available information +about the print function. + + + + +

+


debug.getlocal ([thread,] f, local)

+ + +

+This function returns the name and the value of the local variable +with index local of the function at level f of the stack. +This function accesses not only explicit local variables, +but also parameters, temporaries, etc. + + +

+The first parameter or local variable has index 1, and so on, +until the last active variable. +Negative indices refer to vararg parameters; +-1 is the first vararg parameter. +The function returns nil if there is no variable with the given index, +and raises an error when called with a level out of range. +(You can call debug.getinfo to check whether the level is valid.) + + +

+Variable names starting with '(' (open parenthesis) +represent internal variables +(loop control variables, temporaries, varargs, and C function locals). + + +

+The parameter f may also be a function. +In that case, getlocal returns only the name of function parameters. + + + + +

+


debug.getmetatable (value)

+ + +

+Returns the metatable of the given value +or nil if it does not have a metatable. + + + + +

+


debug.getregistry ()

+ + +

+Returns the registry table (see §4.5). + + + + +

+


debug.getupvalue (f, up)

+ + +

+This function returns the name and the value of the upvalue +with index up of the function f. +The function returns nil if there is no upvalue with the given index. + + + + +

+


debug.getuservalue (u)

+ + +

+Returns the Lua value associated to u. +If u is not a userdata, +returns nil. + + + + +

+


debug.sethook ([thread,] hook, mask [, count])

+ + +

+Sets the given function as a hook. +The string mask and the number count describe +when the hook will be called. +The string mask may have the following characters, +with the given meaning: + +

    +
  • 'c': the hook is called every time Lua calls a function;
  • +
  • 'r': the hook is called every time Lua returns from a function;
  • +
  • 'l': the hook is called every time Lua enters a new line of code.
  • +

+With a count different from zero, +the hook is called after every count instructions. + + +

+When called without arguments, +debug.sethook turns off the hook. + + +

+When the hook is called, its first parameter is a string +describing the event that has triggered its call: +"call" (or "tail call"), +"return", +"line", and "count". +For line events, +the hook also gets the new line number as its second parameter. +Inside a hook, +you can call getinfo with level 2 to get more information about +the running function +(level 0 is the getinfo function, +and level 1 is the hook function). + + + + +

+


debug.setlocal ([thread,] level, local, value)

+ + +

+This function assigns the value value to the local variable +with index local of the function at level level of the stack. +The function returns nil if there is no local +variable with the given index, +and raises an error when called with a level out of range. +(You can call getinfo to check whether the level is valid.) +Otherwise, it returns the name of the local variable. + + +

+See debug.getlocal for more information about +variable indices and names. + + + + +

+


debug.setmetatable (value, table)

+ + +

+Sets the metatable for the given value to the given table +(which can be nil). +Returns value. + + + + +

+


debug.setupvalue (f, up, value)

+ + +

+This function assigns the value value to the upvalue +with index up of the function f. +The function returns nil if there is no upvalue +with the given index. +Otherwise, it returns the name of the upvalue. + + + + +

+


debug.setuservalue (udata, value)

+ + +

+Sets the given value as +the Lua value associated to the given udata. +value must be a table or nil; +udata must be a full userdata. + + +

+Returns udata. + + + + +

+


debug.traceback ([thread,] [message [, level]])

+ + +

+If message is present but is neither a string nor nil, +this function returns message without further processing. +Otherwise, +it returns a string with a traceback of the call stack. +An optional message string is appended +at the beginning of the traceback. +An optional level number tells at which level +to start the traceback +(default is 1, the function calling traceback). + + + + +

+


debug.upvalueid (f, n)

+ + +

+Returns an unique identifier (as a light userdata) +for the upvalue numbered n +from the given function. + + +

+These unique identifiers allow a program to check whether different +closures share upvalues. +Lua closures that share an upvalue +(that is, that access a same external local variable) +will return identical ids for those upvalue indices. + + + + +

+


debug.upvaluejoin (f1, n1, f2, n2)

+ + +

+Make the n1-th upvalue of the Lua closure f1 +refer to the n2-th upvalue of the Lua closure f2. + + + + + + + +

7 – Lua Standalone

+ +

+Although Lua has been designed as an extension language, +to be embedded in a host C program, +it is also frequently used as a standalone language. +An interpreter for Lua as a standalone language, +called simply lua, +is provided with the standard distribution. +The standalone interpreter includes +all standard libraries, including the debug library. +Its usage is: + +

+     lua [options] [script [args]]
+

+The options are: + +

    +
  • -e stat: executes string stat;
  • +
  • -l mod: "requires" mod;
  • +
  • -i: enters interactive mode after running script;
  • +
  • -v: prints version information;
  • +
  • -E: ignores environment variables;
  • +
  • --: stops handling options;
  • +
  • -: executes stdin as a file and stops handling options.
  • +

+After handling its options, lua runs the given script, +passing to it the given args as string arguments. +When called without arguments, +lua behaves as lua -v -i +when the standard input (stdin) is a terminal, +and as lua - otherwise. + + +

+When called without option -E, +the interpreter checks for an environment variable LUA_INIT_5_2 +(or LUA_INIT if it is not defined) +before running any argument. +If the variable content has the format @filename, +then lua executes the file. +Otherwise, lua executes the string itself. + + +

+When called with option -E, +besides ignoring LUA_INIT, +Lua also ignores +the values of LUA_PATH and LUA_CPATH, +setting the values of +package.path and package.cpath +with the default paths defined in luaconf.h. + + +

+All options are handled in order, except -i and -E. +For instance, an invocation like + +

+     $ lua -e'a=1' -e 'print(a)' script.lua
+

+will first set a to 1, then print the value of a, +and finally run the file script.lua with no arguments. +(Here $ is the shell prompt. Your prompt may be different.) + + +

+Before starting to run the script, +lua collects all arguments in the command line +in a global table called arg. +The script name is stored at index 0, +the first argument after the script name goes to index 1, +and so on. +Any arguments before the script name +(that is, the interpreter name plus the options) +go to negative indices. +For instance, in the call + +

+     $ lua -la b.lua t1 t2
+

+the interpreter first runs the file a.lua, +then creates a table + +

+     arg = { [-2] = "lua", [-1] = "-la",
+             [0] = "b.lua",
+             [1] = "t1", [2] = "t2" }
+

+and finally runs the file b.lua. +The script is called with arg[1], arg[2], ... +as arguments; +it can also access these arguments with the vararg expression '...'. + + +

+In interactive mode, +if you write an incomplete statement, +the interpreter waits for its completion +by issuing a different prompt. + + +

+In case of unprotected errors in the script, +the interpreter reports the error to the standard error stream. +If the error object is a string, +the interpreter adds a stack traceback to it. +Otherwise, if the error object has a metamethod __tostring, +the interpreter calls this metamethod to produce the final message. +Finally, if the error object is nil, +the interpreter does not report the error. + + +

+When finishing normally, +the interpreter closes its main Lua state +(see lua_close). +The script can avoid this step by +calling os.exit to terminate. + + +

+To allow the use of Lua as a +script interpreter in Unix systems, +the standalone interpreter skips +the first line of a chunk if it starts with #. +Therefore, Lua scripts can be made into executable programs +by using chmod +x and the #! form, +as in + +

+     #!/usr/local/bin/lua
+

+(Of course, +the location of the Lua interpreter may be different in your machine. +If lua is in your PATH, +then + +

+     #!/usr/bin/env lua
+

+is a more portable solution.) + + + +

8 – Incompatibilities with the Previous Version

+ +

+Here we list the incompatibilities that you may find when moving a program +from Lua 5.1 to Lua 5.2. +You can avoid some incompatibilities by compiling Lua with +appropriate options (see file luaconf.h). +However, +all these compatibility options will be removed in the next version of Lua. +Similarly, +all features marked as deprecated in Lua 5.1 +have been removed in Lua 5.2. + + + +

8.1 – Changes in the Language

+
    + +
  • +The concept of environment changed. +Only Lua functions have environments. +To set the environment of a Lua function, +use the variable _ENV or the function load. + + +

    +C functions no longer have environments. +Use an upvalue with a shared table if you need to keep +shared state among several C functions. +(You may use luaL_setfuncs to open a C library +with all functions sharing a common upvalue.) + + +

    +To manipulate the "environment" of a userdata +(which is now called user value), +use the new functions +lua_getuservalue and lua_setuservalue. +

  • + +
  • +Lua identifiers cannot use locale-dependent letters. +
  • + +
  • +Doing a step or a full collection in the garbage collector +does not restart the collector if it has been stopped. +
  • + +
  • +Weak tables with weak keys now perform like ephemeron tables. +
  • + +
  • +The event tail return in debug hooks was removed. +Instead, tail calls generate a special new event, +tail call, so that the debugger can know that +there will not be a corresponding return event. +
  • + +
  • +Equality between function values has changed. +Now, a function definition may not create a new value; +it may reuse some previous value if there is no +observable difference to the new function. +
  • + +
+ + + + +

8.2 – Changes in the Libraries

+
    + +
  • +Function module is deprecated. +It is easy to set up a module with regular Lua code. +Modules are not expected to set global variables. +
  • + +
  • +Functions setfenv and getfenv were removed, +because of the changes in environments. +
  • + +
  • +Function math.log10 is deprecated. +Use math.log with 10 as its second argument, instead. +
  • + +
  • +Function loadstring is deprecated. +Use load instead; it now accepts string arguments +and are exactly equivalent to loadstring. +
  • + +
  • +Function table.maxn is deprecated. +Write it in Lua if you really need it. +
  • + +
  • +Function os.execute now returns true when command +terminates successfully and nil plus error information +otherwise. +
  • + +
  • +Function unpack was moved into the table library +and therefore must be called as table.unpack. +
  • + +
  • +Character class %z in patterns is deprecated, +as now patterns may contain '\0' as a regular character. +
  • + +
  • +The table package.loaders was renamed package.searchers. +
  • + +
  • +Lua does not have bytecode verification anymore. +So, all functions that load code +(load and loadfile) +are potentially insecure when loading untrusted binary data. +(Actually, those functions were already insecure because +of flaws in the verification algorithm.) +When in doubt, +use the mode argument of those functions +to restrict them to loading textual chunks. +
  • + +
  • +The standard paths in the official distribution may +change between versions. +
  • + +
+ + + + +

8.3 – Changes in the API

+
    + +
  • +Pseudoindex LUA_GLOBALSINDEX was removed. +You must get the global environment from the registry +(see §4.5). +
  • + +
  • +Pseudoindex LUA_ENVIRONINDEX +and functions lua_getfenv/lua_setfenv +were removed, +as C functions no longer have environments. +
  • + +
  • +Function luaL_register is deprecated. +Use luaL_setfuncs so that your module does not create globals. +(Modules are not expected to set global variables anymore.) +
  • + +
  • +The osize argument to the allocation function +may not be zero when creating a new block, +that is, when ptr is NULL +(see lua_Alloc). +Use only the test ptr == NULL to check whether +the block is new. +
  • + +
  • +Finalizers (__gc metamethods) for userdata are called in the +reverse order that they were marked for finalization, +not that they were created (see §2.5.1). +(Most userdata are marked immediately after they are created.) +Moreover, +if the metatable does not have a __gc field when set, +the finalizer will not be called, +even if it is set later. +
  • + +
  • +luaL_typerror was removed. +Write your own version if you need it. +
  • + +
  • +Function lua_cpcall is deprecated. +You can simply push the function with lua_pushcfunction +and call it with lua_pcall. +
  • + +
  • +Functions lua_equal and lua_lessthan are deprecated. +Use the new lua_compare with appropriate options instead. +
  • + +
  • +Function lua_objlen was renamed lua_rawlen. +
  • + +
  • +Function lua_load has an extra parameter, mode. +Pass NULL to simulate the old behavior. +
  • + +
  • +Function lua_resume has an extra parameter, from. +Pass NULL or the thread doing the call. +
  • + +
+ + + + +

9 – The Complete Syntax of Lua

+ +

+Here is the complete syntax of Lua in extended BNF. +(It does not describe operator precedences.) + + + + +

+
+	chunk ::= block
+
+	block ::= {stat} [retstat]
+
+	stat ::=  ‘;’ | 
+		 varlist ‘=’ explist | 
+		 functioncall | 
+		 label | 
+		 break | 
+		 goto Name | 
+		 do block end | 
+		 while exp do block end | 
+		 repeat block until exp | 
+		 if exp then block {elseif exp then block} [else block] end | 
+		 for Name ‘=’ exp ‘,’ exp [‘,’ exp] do block end | 
+		 for namelist in explist do block end | 
+		 function funcname funcbody | 
+		 local function Name funcbody | 
+		 local namelist [‘=’ explist] 
+
+	retstat ::= return [explist] [‘;’]
+
+	label ::= ‘::’ Name ‘::’
+
+	funcname ::= Name {‘.’ Name} [‘:’ Name]
+
+	varlist ::= var {‘,’ var}
+
+	var ::=  Name | prefixexp ‘[’ exp ‘]’ | prefixexp ‘.’ Name 
+
+	namelist ::= Name {‘,’ Name}
+
+	explist ::= exp {‘,’ exp}
+
+	exp ::=  nil | false | true | Number | String | ‘...’ | functiondef | 
+		 prefixexp | tableconstructor | exp binop exp | unop exp 
+
+	prefixexp ::= var | functioncall | ‘(’ exp ‘)’
+
+	functioncall ::=  prefixexp args | prefixexp ‘:’ Name args 
+
+	args ::=  ‘(’ [explist] ‘)’ | tableconstructor | String 
+
+	functiondef ::= function funcbody
+
+	funcbody ::= ‘(’ [parlist] ‘)’ block end
+
+	parlist ::= namelist [‘,’ ‘...’] | ‘...’
+
+	tableconstructor ::= ‘{’ [fieldlist] ‘}’
+
+	fieldlist ::= field {fieldsep field} [fieldsep]
+
+	field ::= ‘[’ exp ‘]’ ‘=’ exp | Name ‘=’ exp | exp
+
+	fieldsep ::= ‘,’ | ‘;’
+
+	binop ::= ‘+’ | ‘-’ | ‘*’ | ‘/’ | ‘^’ | ‘%’ | ‘..’ | 
+		 ‘<’ | ‘<=’ | ‘>’ | ‘>=’ | ‘==’ | ‘~=’ | 
+		 and | or
+
+	unop ::= ‘-’ | not | ‘#’
+
+
+ +

+ + + + + + + +


+ +Last update: +Thu Mar 21 12:58:59 BRT 2013 + + + + + diff --git a/radio/src/lua/doc/osi-certified-72x60.png b/radio/src/lua/doc/osi-certified-72x60.png new file mode 100644 index 000000000..07df5f6ee Binary files /dev/null and b/radio/src/lua/doc/osi-certified-72x60.png differ diff --git a/radio/src/lua/doc/readme.html b/radio/src/lua/doc/readme.html new file mode 100644 index 000000000..5b9e47ecb --- /dev/null +++ b/radio/src/lua/doc/readme.html @@ -0,0 +1,412 @@ + + + +Lua 5.2 readme + + + + + + + +
+

+Lua +Welcome to Lua 5.2 +

+ +

+about +· +installation +· +changes +· +license +· +reference manual + +

About Lua

+ +

+Lua is a powerful, fast, lightweight, embeddable scripting language +developed by a +team +at +PUC-Rio, +the Pontifical Catholic University of Rio de Janeiro in Brazil. +Lua is +free software +used in many products and projects around the world. + +

+Lua's +official web site +provides complete information +about Lua, +including +an +executive summary +and +updated +documentation, +especially the +reference manual, +which may differ slightly from the +local copy +distributed in this package. + +

Installing Lua

+ +

+Lua is distributed in +source +form. +You need to build it before using it. +Building Lua should be straightforward +because +Lua is implemented in pure ANSI C and compiles unmodified in all known +platforms that have an ANSI C compiler. +Lua also compiles unmodified as C++. +The instructions given below for building Lua are for Unix-like platforms. +See also +instructions for other systems +and +customization options. + +

+If you don't have the time or the inclination to compile Lua yourself, +get a binary from +LuaBinaries. +Try also +Lua for Windows, +an easy-to-use distribution of Lua that includes many useful libraries. + +

Building Lua

+ +

+In most Unix-like platforms, simply do "make" with a suitable target. +Here are the details. + +

    +
  1. +Open a terminal window and move to +the top-level directory, which is named lua-5.2.2. +The Makefile there controls both the build process and the installation process. +

    +

  2. + Do "make" and see if your platform is listed. + The platforms currently supported are: +

    +

    + aix ansi bsd freebsd generic linux macosx mingw posix solaris +

    +

    + If your platform is listed, just do "make xxx", where xxx + is your platform name. +

    + If your platform is not listed, try the closest one or posix, generic, + ansi, in this order. +

    +

  3. +The compilation takes only a few moments +and produces three files in the src directory: +lua (the interpreter), +luac (the compiler), +and liblua.a (the library). +

    +

  4. + To check that Lua has been built correctly, do "make test" + after building Lua. This will run the interpreter and print its version string. +
+

+If you're running Linux and get compilation errors, +make sure you have installed the readline development package. +If you get link errors after that, +then try "make linux MYLIBS=-ltermcap". + +

Installing Lua

+

+ Once you have built Lua, you may want to install it in an official + place in your system. In this case, do "make install". The official + place and the way to install files are defined in the Makefile. You'll + probably need the right permissions to install files. + +

+ To build and install Lua in one step, do "make xxx install", + where xxx is your platform name. + +

+ To install Lua locally, do "make local". + This will create a directory install with subdirectories + bin, include, lib, man, + and install Lua as listed below. + + To install Lua locally, but in some other directory, do + "make install INSTALL_TOP=xxx", where xxx is your chosen directory. + +

+
+ bin: +
+ lua luac +
+ include: +
+ lua.h luaconf.h lualib.h lauxlib.h lua.hpp +
+ lib: +
+ liblua.a +
+ man/man1: +
+ lua.1 luac.1 +
+ +

+ These are the only directories you need for development. + If you only want to run Lua programs, + you only need the files in bin and man. + The files in include and lib are needed for + embedding Lua in C or C++ programs. + +

Customization

+

+ Three kinds of things can be customized by editing a file: +

    +
  • Where and how to install Lua — edit Makefile. +
  • How to build Lua — edit src/Makefile. +
  • Lua features — edit src/luaconf.h. +
+ +

+ You don't actually need to edit the Makefiles because you may set the + relevant variables in the command line when invoking make. + Nevertheless, it's probably best to edit and save the Makefiles to + record the changes you need. + +

+ On the other hand, if you need to customize some Lua features, you'll need + to edit src/luaconf.h before building and installing Lua. + The edited file will be the one installed, and + it will be used by any Lua clients that you build, to ensure consistency. + Further customization is available to experts by editing the Lua sources. + +

+ We strongly recommend that you enable dynamic loading in src/luaconf.h. + This is done automatically for all platforms listed above that have + this feature and also for Windows. + +

Building Lua on other systems

+ +

+ If you're not using the usual Unix tools, then the instructions for + building Lua depend on the compiler you use. You'll need to create + projects (or whatever your compiler uses) for building the library, + the interpreter, and the compiler, as follows: + +

+
+library: +
+lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c +lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c +ltm.c lundump.c lvm.c lzio.c +lauxlib.c lbaselib.c lbitlib.c lcorolib.c ldblib.c liolib.c +lmathlib.c loslib.c lstrlib.c ltablib.c loadlib.c linit.c +
+interpreter: +
+ library, lua.c +
+compiler: +
+ library, luac.c +
+ +

+ To use Lua as a library in your own programs you'll need to know how to + create and use libraries with your compiler. Moreover, to dynamically load + C libraries for Lua you'll need to know how to create dynamic libraries + and you'll need to make sure that the Lua API functions are accessible to + those dynamic libraries — but don't link the Lua library + into each dynamic library. For Unix, we recommend that the Lua library + be linked statically into the host program and its symbols exported for + dynamic linking; src/Makefile does this for the Lua interpreter. + For Windows, we recommend that the Lua library be a DLL. + +

+ As mentioned above, you may edit src/luaconf.h to customize + some features before building Lua. + +

Changes since Lua 5.1

+ +

+Here are the main changes introduced in Lua 5.2. +The +reference manual +lists the +incompatibilities that had to be introduced. + +

Main changes

+
    +
  • yieldable pcall and metamethods +
  • new lexical scheme for globals +
  • ephemeron tables +
  • new library for bitwise operations +
  • light C functions +
  • emergency garbage collector +
  • goto statement +
  • finalizers for tables +
+ +Here are the other changes introduced in Lua 5.2: +

Language

+
    +
  • no more fenv for threads or functions +
  • tables honor the __len metamethod +
  • hex and \z escapes in strings +
  • support for hexadecimal floats +
  • order metamethods work for different types +
  • no more verification of opcode consistency +
  • hook event "tail return" replaced by "tail call" +
  • empty statement +
  • break statement may appear in the middle of a block +
+ +

Libraries

+
    +
  • arguments for function called through xpcall +
  • optional 'mode' argument to load and loadfile (to control binary x text) +
  • optional 'env' argument to load and loadfile (environment for loaded chunk) +
  • loadlib may load libraries with global names (RTLD_GLOBAL) +
  • new function package.searchpath +
  • modules receive their paths when loaded +
  • optional base in math.log +
  • optional separator in string.rep +
  • file:write returns file +
  • closing a pipe returns exit status +
  • os.exit may close state +
  • new metamethods __pairs and __ipairs +
  • new option 'isrunning' for collectgarbage and lua_gc +
  • frontier patterns +
  • \0 in patterns +
  • new option *L for io.read +
  • options for io.lines +
  • debug.getlocal can access function varargs +
+ +

C API

+
    +
  • main thread predefined in the registry +
  • new functions +lua_absindex, +lua_arith, +lua_compare, +lua_copy, +lua_len, +lua_rawgetp, +lua_rawsetp, +lua_upvalueid, +lua_upvaluejoin, +lua_version. +
  • new functions +luaL_checkversion, +luaL_setmetatable, +luaL_testudata, +luaL_tolstring. +
  • lua_pushstring and pushlstring return string +
  • nparams and isvararg available in debug API +
  • new lua_Unsigned +
+ +

Implementation

+
    +
  • max constants per function raised to 226 +
  • generational mode for garbage collection (experimental) +
  • NaN trick (experimental) +
  • internal (immutable) version of ctypes +
  • simpler implementation for string buffers +
  • parser uses much less C-stack space (no more auto arrays) +
+ +

Lua standalone interpreter

+
    +
  • new -E option to avoid environment variables +
  • handling of non-string error messages +
+ +

License

+ +[osi certified] + + +

+Lua is free software distributed under the terms of the +MIT license +reproduced below; +it may be used for any purpose, including commercial purposes, +at absolutely no cost without having to ask us. + +The only requirement is that if you do use Lua, +then you should give us credit by including the appropriate copyright notice somewhere in your product or its documentation. + +For details, see +this. + +

+Copyright © 1994–2013 Lua.org, PUC-Rio. + +

+Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +

+The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +

+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +

+

+ +


+ +Last update: +Fri Feb 22 09:24:20 BRT 2013 + + + + + diff --git a/radio/src/lua/src/Makefile b/radio/src/lua/src/Makefile new file mode 100644 index 000000000..fea895bc0 --- /dev/null +++ b/radio/src/lua/src/Makefile @@ -0,0 +1,187 @@ +# Makefile for building Lua +# See ../doc/readme.html for installation and customization instructions. + +# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= + +# Your platform. See PLATS for possible values. +PLAT= none + +CC= gcc +CFLAGS= -O2 -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS) +LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) +LIBS= -lm $(SYSLIBS) $(MYLIBS) + +AR= ar rcu +RANLIB= ranlib +RM= rm -f + +SYSCFLAGS= +SYSLDFLAGS= +SYSLIBS= + +MYCFLAGS= +MYLDFLAGS= +MYLIBS= +MYOBJS= + +# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE ======= + +PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris + +LUA_A= liblua.a +CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \ + lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \ + ltm.o lundump.o lvm.o lzio.o +LIB_O= lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o \ + lmathlib.o loslib.o lstrlib.o ltablib.o loadlib.o linit.o +BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS) + +LUA_T= lua +LUA_O= lua.o + +LUAC_T= luac +LUAC_O= luac.o + +ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) +ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) +ALL_A= $(LUA_A) + +# Targets start here. +default: $(PLAT) + +all: $(ALL_T) + +o: $(ALL_O) + +a: $(ALL_A) + +$(LUA_A): $(BASE_O) + $(AR) $@ $(BASE_O) + $(RANLIB) $@ + +$(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + +$(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) + +clean: + $(RM) $(ALL_T) $(ALL_O) + +depend: + @$(CC) $(CFLAGS) -MM l*.c + +echo: + @echo "PLAT= $(PLAT)" + @echo "CC= $(CC)" + @echo "CFLAGS= $(CFLAGS)" + @echo "LDFLAGS= $(SYSLDFLAGS)" + @echo "LIBS= $(LIBS)" + @echo "AR= $(AR)" + @echo "RANLIB= $(RANLIB)" + @echo "RM= $(RM)" + +# Convenience targets for popular platforms +ALL= all + +none: + @echo "Please do 'make PLATFORM' where PLATFORM is one of these:" + @echo " $(PLATS)" + +aix: + $(MAKE) $(ALL) CC="xlc" CFLAGS="-O2 -DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-ldl" SYSLDFLAGS="-brtl -bexpall" + +ansi: + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_ANSI" + +bsd: + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-Wl,-E" + +freebsd: + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline" + +generic: $(ALL) + +linux: + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline" + +macosx: + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" + +mingw: + $(MAKE) "LUA_A=lua52.dll" "LUA_T=lua.exe" \ + "AR=$(CC) -shared -o" "RANLIB=strip --strip-unneeded" \ + "SYSCFLAGS=-DLUA_BUILD_AS_DLL" "SYSLIBS=" "SYSLDFLAGS=-s" lua.exe + $(MAKE) "LUAC_T=luac.exe" luac.exe + +posix: + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX" + +solaris: + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-ldl" + +# list targets that do not create files (but not all makes understand .PHONY) +.PHONY: all $(PLATS) default o a clean depend echo none + +# DO NOT DELETE + +lapi.o: lapi.c lua.h luaconf.h lapi.h llimits.h lstate.h lobject.h ltm.h \ + lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lstring.h ltable.h lundump.h \ + lvm.h +lauxlib.o: lauxlib.c lua.h luaconf.h lauxlib.h +lbaselib.o: lbaselib.c lua.h luaconf.h lauxlib.h lualib.h +lbitlib.o: lbitlib.c lua.h luaconf.h lauxlib.h lualib.h +lcode.o: lcode.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \ + lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h lgc.h \ + lstring.h ltable.h lvm.h +lcorolib.o: lcorolib.c lua.h luaconf.h lauxlib.h lualib.h +lctype.o: lctype.c lctype.h lua.h luaconf.h llimits.h +ldblib.o: ldblib.c lua.h luaconf.h lauxlib.h lualib.h +ldebug.o: ldebug.c lua.h luaconf.h lapi.h llimits.h lstate.h lobject.h \ + ltm.h lzio.h lmem.h lcode.h llex.h lopcodes.h lparser.h ldebug.h ldo.h \ + lfunc.h lstring.h lgc.h ltable.h lvm.h +ldo.o: ldo.c lua.h luaconf.h lapi.h llimits.h lstate.h lobject.h ltm.h \ + lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lopcodes.h lparser.h \ + lstring.h ltable.h lundump.h lvm.h +ldump.o: ldump.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h \ + lzio.h lmem.h lundump.h +lfunc.o: lfunc.c lua.h luaconf.h lfunc.h lobject.h llimits.h lgc.h \ + lstate.h ltm.h lzio.h lmem.h +lgc.o: lgc.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ + lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h +linit.o: linit.c lua.h luaconf.h lualib.h lauxlib.h +liolib.o: liolib.c lua.h luaconf.h lauxlib.h lualib.h +llex.o: llex.c lua.h luaconf.h lctype.h llimits.h ldo.h lobject.h \ + lstate.h ltm.h lzio.h lmem.h llex.h lparser.h lstring.h lgc.h ltable.h +lmathlib.o: lmathlib.c lua.h luaconf.h lauxlib.h lualib.h +lmem.o: lmem.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \ + ltm.h lzio.h lmem.h ldo.h lgc.h +loadlib.o: loadlib.c lua.h luaconf.h lauxlib.h lualib.h +lobject.o: lobject.c lua.h luaconf.h lctype.h llimits.h ldebug.h lstate.h \ + lobject.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h lvm.h +lopcodes.o: lopcodes.c lopcodes.h llimits.h lua.h luaconf.h +loslib.o: loslib.c lua.h luaconf.h lauxlib.h lualib.h +lparser.o: lparser.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \ + lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h lfunc.h \ + lstring.h lgc.h ltable.h +lstate.o: lstate.c lua.h luaconf.h lapi.h llimits.h lstate.h lobject.h \ + ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h llex.h lstring.h \ + ltable.h +lstring.o: lstring.c lua.h luaconf.h lmem.h llimits.h lobject.h lstate.h \ + ltm.h lzio.h lstring.h lgc.h +lstrlib.o: lstrlib.c lua.h luaconf.h lauxlib.h lualib.h +ltable.o: ltable.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \ + ltm.h lzio.h lmem.h ldo.h lgc.h lstring.h ltable.h lvm.h +ltablib.o: ltablib.c lua.h luaconf.h lauxlib.h lualib.h +ltm.o: ltm.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h lzio.h \ + lmem.h lstring.h lgc.h ltable.h +lua.o: lua.c lua.h luaconf.h lauxlib.h lualib.h +luac.o: luac.c lua.h luaconf.h lauxlib.h lobject.h llimits.h lstate.h \ + ltm.h lzio.h lmem.h lundump.h ldebug.h lopcodes.h +lundump.o: lundump.c lua.h luaconf.h ldebug.h lstate.h lobject.h \ + llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lstring.h lgc.h lundump.h +lvm.o: lvm.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ + lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h ltable.h lvm.h +lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \ + lzio.h + diff --git a/radio/src/lua/src/lapi.c b/radio/src/lua/src/lapi.c new file mode 100644 index 000000000..791d85454 --- /dev/null +++ b/radio/src/lua/src/lapi.c @@ -0,0 +1,1284 @@ +/* +** $Id: lapi.c,v 2.171 2013/03/16 21:10:18 roberto Exp $ +** Lua API +** See Copyright Notice in lua.h +*/ + + +#include +#include + +#define lapi_c +#define LUA_CORE + +#include "lua.h" + +#include "lapi.h" +#include "ldebug.h" +#include "ldo.h" +#include "lfunc.h" +#include "lgc.h" +#include "lmem.h" +#include "lobject.h" +#include "lstate.h" +#include "lstring.h" +#include "ltable.h" +#include "ltm.h" +#include "lundump.h" +#include "lvm.h" + + + +const char lua_ident[] = + "$LuaVersion: " LUA_COPYRIGHT " $" + "$LuaAuthors: " LUA_AUTHORS " $"; + + +/* value at a non-valid index */ +#define NONVALIDVALUE cast(TValue *, luaO_nilobject) + +/* corresponding test */ +#define isvalid(o) ((o) != luaO_nilobject) + +/* test for pseudo index */ +#define ispseudo(i) ((i) <= LUA_REGISTRYINDEX) + +/* test for valid but not pseudo index */ +#define isstackindex(i, o) (isvalid(o) && !ispseudo(i)) + +#define api_checkvalidindex(L, o) api_check(L, isvalid(o), "invalid index") + +#define api_checkstackindex(L, i, o) \ + api_check(L, isstackindex(i, o), "index not in the stack") + + +static TValue *index2addr (lua_State *L, int idx) { + CallInfo *ci = L->ci; + if (idx > 0) { + TValue *o = ci->func + idx; + api_check(L, idx <= ci->top - (ci->func + 1), "unacceptable index"); + if (o >= L->top) return NONVALIDVALUE; + else return o; + } + else if (!ispseudo(idx)) { /* negative index */ + api_check(L, idx != 0 && -idx <= L->top - (ci->func + 1), "invalid index"); + return L->top + idx; + } + else if (idx == LUA_REGISTRYINDEX) + return &G(L)->l_registry; + else { /* upvalues */ + idx = LUA_REGISTRYINDEX - idx; + api_check(L, idx <= MAXUPVAL + 1, "upvalue index too large"); + if (ttislcf(ci->func)) /* light C function? */ + return NONVALIDVALUE; /* it has no upvalues */ + else { + CClosure *func = clCvalue(ci->func); + return (idx <= func->nupvalues) ? &func->upvalue[idx-1] : NONVALIDVALUE; + } + } +} + + +/* +** to be called by 'lua_checkstack' in protected mode, to grow stack +** capturing memory errors +*/ +static void growstack (lua_State *L, void *ud) { + int size = *(int *)ud; + luaD_growstack(L, size); +} + + +LUA_API int lua_checkstack (lua_State *L, int size) { + int res; + CallInfo *ci = L->ci; + lua_lock(L); + if (L->stack_last - L->top > size) /* stack large enough? */ + res = 1; /* yes; check is OK */ + else { /* no; need to grow stack */ + int inuse = cast_int(L->top - L->stack) + EXTRA_STACK; + if (inuse > LUAI_MAXSTACK - size) /* can grow without overflow? */ + res = 0; /* no */ + else /* try to grow stack */ + res = (luaD_rawrunprotected(L, &growstack, &size) == LUA_OK); + } + if (res && ci->top < L->top + size) + ci->top = L->top + size; /* adjust frame top */ + lua_unlock(L); + return res; +} + + +LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) { + int i; + if (from == to) return; + lua_lock(to); + api_checknelems(from, n); + api_check(from, G(from) == G(to), "moving among independent states"); + api_check(from, to->ci->top - to->top >= n, "not enough elements to move"); + from->top -= n; + for (i = 0; i < n; i++) { + setobj2s(to, to->top++, from->top + i); + } + lua_unlock(to); +} + + +LUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf) { + lua_CFunction old; + lua_lock(L); + old = G(L)->panic; + G(L)->panic = panicf; + lua_unlock(L); + return old; +} + + +LUA_API const lua_Number *lua_version (lua_State *L) { + static const lua_Number version = LUA_VERSION_NUM; + if (L == NULL) return &version; + else return G(L)->version; +} + + + +/* +** basic stack manipulation +*/ + + +/* +** convert an acceptable stack index into an absolute index +*/ +LUA_API int lua_absindex (lua_State *L, int idx) { + return (idx > 0 || ispseudo(idx)) + ? idx + : cast_int(L->top - L->ci->func + idx); +} + + +LUA_API int lua_gettop (lua_State *L) { + return cast_int(L->top - (L->ci->func + 1)); +} + + +LUA_API void lua_settop (lua_State *L, int idx) { + StkId func = L->ci->func; + lua_lock(L); + if (idx >= 0) { + api_check(L, idx <= L->stack_last - (func + 1), "new top too large"); + while (L->top < (func + 1) + idx) + setnilvalue(L->top++); + L->top = (func + 1) + idx; + } + else { + api_check(L, -(idx+1) <= (L->top - (func + 1)), "invalid new top"); + L->top += idx+1; /* `subtract' index (index is negative) */ + } + lua_unlock(L); +} + + +LUA_API void lua_remove (lua_State *L, int idx) { + StkId p; + lua_lock(L); + p = index2addr(L, idx); + api_checkstackindex(L, idx, p); + while (++p < L->top) setobjs2s(L, p-1, p); + L->top--; + lua_unlock(L); +} + + +LUA_API void lua_insert (lua_State *L, int idx) { + StkId p; + StkId q; + lua_lock(L); + p = index2addr(L, idx); + api_checkstackindex(L, idx, p); + for (q = L->top; q > p; q--) /* use L->top as a temporary */ + setobjs2s(L, q, q - 1); + setobjs2s(L, p, L->top); + lua_unlock(L); +} + + +static void moveto (lua_State *L, TValue *fr, int idx) { + TValue *to = index2addr(L, idx); + api_checkvalidindex(L, to); + setobj(L, to, fr); + if (idx < LUA_REGISTRYINDEX) /* function upvalue? */ + luaC_barrier(L, clCvalue(L->ci->func), fr); + /* LUA_REGISTRYINDEX does not need gc barrier + (collector revisits it before finishing collection) */ +} + + +LUA_API void lua_replace (lua_State *L, int idx) { + lua_lock(L); + api_checknelems(L, 1); + moveto(L, L->top - 1, idx); + L->top--; + lua_unlock(L); +} + + +LUA_API void lua_copy (lua_State *L, int fromidx, int toidx) { + TValue *fr; + lua_lock(L); + fr = index2addr(L, fromidx); + moveto(L, fr, toidx); + lua_unlock(L); +} + + +LUA_API void lua_pushvalue (lua_State *L, int idx) { + lua_lock(L); + setobj2s(L, L->top, index2addr(L, idx)); + api_incr_top(L); + lua_unlock(L); +} + + + +/* +** access functions (stack -> C) +*/ + + +LUA_API int lua_type (lua_State *L, int idx) { + StkId o = index2addr(L, idx); + return (isvalid(o) ? ttypenv(o) : LUA_TNONE); +} + + +LUA_API const char *lua_typename (lua_State *L, int t) { + UNUSED(L); + return ttypename(t); +} + + +LUA_API int lua_iscfunction (lua_State *L, int idx) { + StkId o = index2addr(L, idx); + return (ttislcf(o) || (ttisCclosure(o))); +} + + +LUA_API int lua_isnumber (lua_State *L, int idx) { + TValue n; + const TValue *o = index2addr(L, idx); + return tonumber(o, &n); +} + + +LUA_API int lua_isstring (lua_State *L, int idx) { + int t = lua_type(L, idx); + return (t == LUA_TSTRING || t == LUA_TNUMBER); +} + + +LUA_API int lua_isuserdata (lua_State *L, int idx) { + const TValue *o = index2addr(L, idx); + return (ttisuserdata(o) || ttislightuserdata(o)); +} + + +LUA_API int lua_rawequal (lua_State *L, int index1, int index2) { + StkId o1 = index2addr(L, index1); + StkId o2 = index2addr(L, index2); + return (isvalid(o1) && isvalid(o2)) ? luaV_rawequalobj(o1, o2) : 0; +} + + +LUA_API void lua_arith (lua_State *L, int op) { + StkId o1; /* 1st operand */ + StkId o2; /* 2nd operand */ + lua_lock(L); + if (op != LUA_OPUNM) /* all other operations expect two operands */ + api_checknelems(L, 2); + else { /* for unary minus, add fake 2nd operand */ + api_checknelems(L, 1); + setobjs2s(L, L->top, L->top - 1); + L->top++; + } + o1 = L->top - 2; + o2 = L->top - 1; + if (ttisnumber(o1) && ttisnumber(o2)) { + setnvalue(o1, luaO_arith(op, nvalue(o1), nvalue(o2))); + } + else + luaV_arith(L, o1, o1, o2, cast(TMS, op - LUA_OPADD + TM_ADD)); + L->top--; + lua_unlock(L); +} + + +LUA_API int lua_compare (lua_State *L, int index1, int index2, int op) { + StkId o1, o2; + int i = 0; + lua_lock(L); /* may call tag method */ + o1 = index2addr(L, index1); + o2 = index2addr(L, index2); + if (isvalid(o1) && isvalid(o2)) { + switch (op) { + case LUA_OPEQ: i = equalobj(L, o1, o2); break; + case LUA_OPLT: i = luaV_lessthan(L, o1, o2); break; + case LUA_OPLE: i = luaV_lessequal(L, o1, o2); break; + default: api_check(L, 0, "invalid option"); + } + } + lua_unlock(L); + return i; +} + + +LUA_API lua_Number lua_tonumberx (lua_State *L, int idx, int *isnum) { + TValue n; + const TValue *o = index2addr(L, idx); + if (tonumber(o, &n)) { + if (isnum) *isnum = 1; + return nvalue(o); + } + else { + if (isnum) *isnum = 0; + return 0; + } +} + + +LUA_API lua_Integer lua_tointegerx (lua_State *L, int idx, int *isnum) { + TValue n; + const TValue *o = index2addr(L, idx); + if (tonumber(o, &n)) { + lua_Integer res; + lua_Number num = nvalue(o); + lua_number2integer(res, num); + if (isnum) *isnum = 1; + return res; + } + else { + if (isnum) *isnum = 0; + return 0; + } +} + + +LUA_API lua_Unsigned lua_tounsignedx (lua_State *L, int idx, int *isnum) { + TValue n; + const TValue *o = index2addr(L, idx); + if (tonumber(o, &n)) { + lua_Unsigned res; + lua_Number num = nvalue(o); + lua_number2unsigned(res, num); + if (isnum) *isnum = 1; + return res; + } + else { + if (isnum) *isnum = 0; + return 0; + } +} + + +LUA_API int lua_toboolean (lua_State *L, int idx) { + const TValue *o = index2addr(L, idx); + return !l_isfalse(o); +} + + +LUA_API const char *lua_tolstring (lua_State *L, int idx, size_t *len) { + StkId o = index2addr(L, idx); + if (!ttisstring(o)) { + lua_lock(L); /* `luaV_tostring' may create a new string */ + if (!luaV_tostring(L, o)) { /* conversion failed? */ + if (len != NULL) *len = 0; + lua_unlock(L); + return NULL; + } + luaC_checkGC(L); + o = index2addr(L, idx); /* previous call may reallocate the stack */ + lua_unlock(L); + } + if (len != NULL) *len = tsvalue(o)->len; + return svalue(o); +} + + +LUA_API size_t lua_rawlen (lua_State *L, int idx) { + StkId o = index2addr(L, idx); + switch (ttypenv(o)) { + case LUA_TSTRING: return tsvalue(o)->len; + case LUA_TUSERDATA: return uvalue(o)->len; + case LUA_TTABLE: return luaH_getn(hvalue(o)); + default: return 0; + } +} + + +LUA_API lua_CFunction lua_tocfunction (lua_State *L, int idx) { + StkId o = index2addr(L, idx); + if (ttislcf(o)) return fvalue(o); + else if (ttisCclosure(o)) + return clCvalue(o)->f; + else return NULL; /* not a C function */ +} + + +LUA_API void *lua_touserdata (lua_State *L, int idx) { + StkId o = index2addr(L, idx); + switch (ttypenv(o)) { + case LUA_TUSERDATA: return (rawuvalue(o) + 1); + case LUA_TLIGHTUSERDATA: return pvalue(o); + default: return NULL; + } +} + + +LUA_API lua_State *lua_tothread (lua_State *L, int idx) { + StkId o = index2addr(L, idx); + return (!ttisthread(o)) ? NULL : thvalue(o); +} + + +LUA_API const void *lua_topointer (lua_State *L, int idx) { + StkId o = index2addr(L, idx); + switch (ttype(o)) { + case LUA_TTABLE: return hvalue(o); + case LUA_TLCL: return clLvalue(o); + case LUA_TCCL: return clCvalue(o); + case LUA_TLCF: return cast(void *, cast(size_t, fvalue(o))); + case LUA_TTHREAD: return thvalue(o); + case LUA_TUSERDATA: + case LUA_TLIGHTUSERDATA: + return lua_touserdata(L, idx); + default: return NULL; + } +} + + + +/* +** push functions (C -> stack) +*/ + + +LUA_API void lua_pushnil (lua_State *L) { + lua_lock(L); + setnilvalue(L->top); + api_incr_top(L); + lua_unlock(L); +} + + +LUA_API void lua_pushnumber (lua_State *L, lua_Number n) { + lua_lock(L); + setnvalue(L->top, n); + luai_checknum(L, L->top, + luaG_runerror(L, "C API - attempt to push a signaling NaN")); + api_incr_top(L); + lua_unlock(L); +} + + +LUA_API void lua_pushinteger (lua_State *L, lua_Integer n) { + lua_lock(L); + setnvalue(L->top, cast_num(n)); + api_incr_top(L); + lua_unlock(L); +} + + +LUA_API void lua_pushunsigned (lua_State *L, lua_Unsigned u) { + lua_Number n; + lua_lock(L); + n = lua_unsigned2number(u); + setnvalue(L->top, n); + api_incr_top(L); + lua_unlock(L); +} + + +LUA_API const char *lua_pushlstring (lua_State *L, const char *s, size_t len) { + TString *ts; + lua_lock(L); + luaC_checkGC(L); + ts = luaS_newlstr(L, s, len); + setsvalue2s(L, L->top, ts); + api_incr_top(L); + lua_unlock(L); + return getstr(ts); +} + + +LUA_API const char *lua_pushstring (lua_State *L, const char *s) { + if (s == NULL) { + lua_pushnil(L); + return NULL; + } + else { + TString *ts; + lua_lock(L); + luaC_checkGC(L); + ts = luaS_new(L, s); + setsvalue2s(L, L->top, ts); + api_incr_top(L); + lua_unlock(L); + return getstr(ts); + } +} + + +LUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt, + va_list argp) { + const char *ret; + lua_lock(L); + luaC_checkGC(L); + ret = luaO_pushvfstring(L, fmt, argp); + lua_unlock(L); + return ret; +} + + +LUA_API const char *lua_pushfstring (lua_State *L, const char *fmt, ...) { + const char *ret; + va_list argp; + lua_lock(L); + luaC_checkGC(L); + va_start(argp, fmt); + ret = luaO_pushvfstring(L, fmt, argp); + va_end(argp); + lua_unlock(L); + return ret; +} + + +LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) { + lua_lock(L); + if (n == 0) { + setfvalue(L->top, fn); + } + else { + Closure *cl; + api_checknelems(L, n); + api_check(L, n <= MAXUPVAL, "upvalue index too large"); + luaC_checkGC(L); + cl = luaF_newCclosure(L, n); + cl->c.f = fn; + L->top -= n; + while (n--) + setobj2n(L, &cl->c.upvalue[n], L->top + n); + setclCvalue(L, L->top, cl); + } + api_incr_top(L); + lua_unlock(L); +} + + +LUA_API void lua_pushboolean (lua_State *L, int b) { + lua_lock(L); + setbvalue(L->top, (b != 0)); /* ensure that true is 1 */ + api_incr_top(L); + lua_unlock(L); +} + + +LUA_API void lua_pushlightuserdata (lua_State *L, void *p) { + lua_lock(L); + setpvalue(L->top, p); + api_incr_top(L); + lua_unlock(L); +} + + +LUA_API int lua_pushthread (lua_State *L) { + lua_lock(L); + setthvalue(L, L->top, L); + api_incr_top(L); + lua_unlock(L); + return (G(L)->mainthread == L); +} + + + +/* +** get functions (Lua -> stack) +*/ + + +LUA_API void lua_getglobal (lua_State *L, const char *var) { + Table *reg = hvalue(&G(L)->l_registry); + const TValue *gt; /* global table */ + lua_lock(L); + gt = luaH_getint(reg, LUA_RIDX_GLOBALS); + setsvalue2s(L, L->top++, luaS_new(L, var)); + luaV_gettable(L, gt, L->top - 1, L->top - 1); + lua_unlock(L); +} + + +LUA_API void lua_gettable (lua_State *L, int idx) { + StkId t; + lua_lock(L); + t = index2addr(L, idx); + luaV_gettable(L, t, L->top - 1, L->top - 1); + lua_unlock(L); +} + + +LUA_API void lua_getfield (lua_State *L, int idx, const char *k) { + StkId t; + lua_lock(L); + t = index2addr(L, idx); + setsvalue2s(L, L->top, luaS_new(L, k)); + api_incr_top(L); + luaV_gettable(L, t, L->top - 1, L->top - 1); + lua_unlock(L); +} + + +LUA_API void lua_rawget (lua_State *L, int idx) { + StkId t; + lua_lock(L); + t = index2addr(L, idx); + api_check(L, ttistable(t), "table expected"); + setobj2s(L, L->top - 1, luaH_get(hvalue(t), L->top - 1)); + lua_unlock(L); +} + + +LUA_API void lua_rawgeti (lua_State *L, int idx, int n) { + StkId t; + lua_lock(L); + t = index2addr(L, idx); + api_check(L, ttistable(t), "table expected"); + setobj2s(L, L->top, luaH_getint(hvalue(t), n)); + api_incr_top(L); + lua_unlock(L); +} + + +LUA_API void lua_rawgetp (lua_State *L, int idx, const void *p) { + StkId t; + TValue k; + lua_lock(L); + t = index2addr(L, idx); + api_check(L, ttistable(t), "table expected"); + setpvalue(&k, cast(void *, p)); + setobj2s(L, L->top, luaH_get(hvalue(t), &k)); + api_incr_top(L); + lua_unlock(L); +} + + +LUA_API void lua_createtable (lua_State *L, int narray, int nrec) { + Table *t; + lua_lock(L); + luaC_checkGC(L); + t = luaH_new(L); + sethvalue(L, L->top, t); + api_incr_top(L); + if (narray > 0 || nrec > 0) + luaH_resize(L, t, narray, nrec); + lua_unlock(L); +} + + +LUA_API int lua_getmetatable (lua_State *L, int objindex) { + const TValue *obj; + Table *mt = NULL; + int res; + lua_lock(L); + obj = index2addr(L, objindex); + switch (ttypenv(obj)) { + case LUA_TTABLE: + mt = hvalue(obj)->metatable; + break; + case LUA_TUSERDATA: + mt = uvalue(obj)->metatable; + break; + default: + mt = G(L)->mt[ttypenv(obj)]; + break; + } + if (mt == NULL) + res = 0; + else { + sethvalue(L, L->top, mt); + api_incr_top(L); + res = 1; + } + lua_unlock(L); + return res; +} + + +LUA_API void lua_getuservalue (lua_State *L, int idx) { + StkId o; + lua_lock(L); + o = index2addr(L, idx); + api_check(L, ttisuserdata(o), "userdata expected"); + if (uvalue(o)->env) { + sethvalue(L, L->top, uvalue(o)->env); + } else + setnilvalue(L->top); + api_incr_top(L); + lua_unlock(L); +} + + +/* +** set functions (stack -> Lua) +*/ + + +LUA_API void lua_setglobal (lua_State *L, const char *var) { + Table *reg = hvalue(&G(L)->l_registry); + const TValue *gt; /* global table */ + lua_lock(L); + api_checknelems(L, 1); + gt = luaH_getint(reg, LUA_RIDX_GLOBALS); + setsvalue2s(L, L->top++, luaS_new(L, var)); + luaV_settable(L, gt, L->top - 1, L->top - 2); + L->top -= 2; /* pop value and key */ + lua_unlock(L); +} + + +LUA_API void lua_settable (lua_State *L, int idx) { + StkId t; + lua_lock(L); + api_checknelems(L, 2); + t = index2addr(L, idx); + luaV_settable(L, t, L->top - 2, L->top - 1); + L->top -= 2; /* pop index and value */ + lua_unlock(L); +} + + +LUA_API void lua_setfield (lua_State *L, int idx, const char *k) { + StkId t; + lua_lock(L); + api_checknelems(L, 1); + t = index2addr(L, idx); + setsvalue2s(L, L->top++, luaS_new(L, k)); + luaV_settable(L, t, L->top - 1, L->top - 2); + L->top -= 2; /* pop value and key */ + lua_unlock(L); +} + + +LUA_API void lua_rawset (lua_State *L, int idx) { + StkId t; + lua_lock(L); + api_checknelems(L, 2); + t = index2addr(L, idx); + api_check(L, ttistable(t), "table expected"); + setobj2t(L, luaH_set(L, hvalue(t), L->top-2), L->top-1); + invalidateTMcache(hvalue(t)); + luaC_barrierback(L, gcvalue(t), L->top-1); + L->top -= 2; + lua_unlock(L); +} + + +LUA_API void lua_rawseti (lua_State *L, int idx, int n) { + StkId t; + lua_lock(L); + api_checknelems(L, 1); + t = index2addr(L, idx); + api_check(L, ttistable(t), "table expected"); + luaH_setint(L, hvalue(t), n, L->top - 1); + luaC_barrierback(L, gcvalue(t), L->top-1); + L->top--; + lua_unlock(L); +} + + +LUA_API void lua_rawsetp (lua_State *L, int idx, const void *p) { + StkId t; + TValue k; + lua_lock(L); + api_checknelems(L, 1); + t = index2addr(L, idx); + api_check(L, ttistable(t), "table expected"); + setpvalue(&k, cast(void *, p)); + setobj2t(L, luaH_set(L, hvalue(t), &k), L->top - 1); + luaC_barrierback(L, gcvalue(t), L->top - 1); + L->top--; + lua_unlock(L); +} + + +LUA_API int lua_setmetatable (lua_State *L, int objindex) { + TValue *obj; + Table *mt; + lua_lock(L); + api_checknelems(L, 1); + obj = index2addr(L, objindex); + if (ttisnil(L->top - 1)) + mt = NULL; + else { + api_check(L, ttistable(L->top - 1), "table expected"); + mt = hvalue(L->top - 1); + } + switch (ttypenv(obj)) { + case LUA_TTABLE: { + hvalue(obj)->metatable = mt; + if (mt) { + luaC_objbarrierback(L, gcvalue(obj), mt); + luaC_checkfinalizer(L, gcvalue(obj), mt); + } + break; + } + case LUA_TUSERDATA: { + uvalue(obj)->metatable = mt; + if (mt) { + luaC_objbarrier(L, rawuvalue(obj), mt); + luaC_checkfinalizer(L, gcvalue(obj), mt); + } + break; + } + default: { + G(L)->mt[ttypenv(obj)] = mt; + break; + } + } + L->top--; + lua_unlock(L); + return 1; +} + + +LUA_API void lua_setuservalue (lua_State *L, int idx) { + StkId o; + lua_lock(L); + api_checknelems(L, 1); + o = index2addr(L, idx); + api_check(L, ttisuserdata(o), "userdata expected"); + if (ttisnil(L->top - 1)) + uvalue(o)->env = NULL; + else { + api_check(L, ttistable(L->top - 1), "table expected"); + uvalue(o)->env = hvalue(L->top - 1); + luaC_objbarrier(L, gcvalue(o), hvalue(L->top - 1)); + } + L->top--; + lua_unlock(L); +} + + +/* +** `load' and `call' functions (run Lua code) +*/ + + +#define checkresults(L,na,nr) \ + api_check(L, (nr) == LUA_MULTRET || (L->ci->top - L->top >= (nr) - (na)), \ + "results from function overflow current stack size") + + +LUA_API int lua_getctx (lua_State *L, int *ctx) { + if (L->ci->callstatus & CIST_YIELDED) { + if (ctx) *ctx = L->ci->u.c.ctx; + return L->ci->u.c.status; + } + else return LUA_OK; +} + + +LUA_API void lua_callk (lua_State *L, int nargs, int nresults, int ctx, + lua_CFunction k) { + StkId func; + lua_lock(L); + api_check(L, k == NULL || !isLua(L->ci), + "cannot use continuations inside hooks"); + api_checknelems(L, nargs+1); + api_check(L, L->status == LUA_OK, "cannot do calls on non-normal thread"); + checkresults(L, nargs, nresults); + func = L->top - (nargs+1); + if (k != NULL && L->nny == 0) { /* need to prepare continuation? */ + L->ci->u.c.k = k; /* save continuation */ + L->ci->u.c.ctx = ctx; /* save context */ + luaD_call(L, func, nresults, 1); /* do the call */ + } + else /* no continuation or no yieldable */ + luaD_call(L, func, nresults, 0); /* just do the call */ + adjustresults(L, nresults); + lua_unlock(L); +} + + + +/* +** Execute a protected call. +*/ +struct CallS { /* data to `f_call' */ + StkId func; + int nresults; +}; + + +static void f_call (lua_State *L, void *ud) { + struct CallS *c = cast(struct CallS *, ud); + luaD_call(L, c->func, c->nresults, 0); +} + + + +LUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc, + int ctx, lua_CFunction k) { + struct CallS c; + int status; + ptrdiff_t func; + lua_lock(L); + api_check(L, k == NULL || !isLua(L->ci), + "cannot use continuations inside hooks"); + api_checknelems(L, nargs+1); + api_check(L, L->status == LUA_OK, "cannot do calls on non-normal thread"); + checkresults(L, nargs, nresults); + if (errfunc == 0) + func = 0; + else { + StkId o = index2addr(L, errfunc); + api_checkstackindex(L, errfunc, o); + func = savestack(L, o); + } + c.func = L->top - (nargs+1); /* function to be called */ + if (k == NULL || L->nny > 0) { /* no continuation or no yieldable? */ + c.nresults = nresults; /* do a 'conventional' protected call */ + status = luaD_pcall(L, f_call, &c, savestack(L, c.func), func); + } + else { /* prepare continuation (call is already protected by 'resume') */ + CallInfo *ci = L->ci; + ci->u.c.k = k; /* save continuation */ + ci->u.c.ctx = ctx; /* save context */ + /* save information for error recovery */ + ci->extra = savestack(L, c.func); + ci->u.c.old_allowhook = L->allowhook; + ci->u.c.old_errfunc = L->errfunc; + L->errfunc = func; + /* mark that function may do error recovery */ + ci->callstatus |= CIST_YPCALL; + luaD_call(L, c.func, nresults, 1); /* do the call */ + ci->callstatus &= ~CIST_YPCALL; + L->errfunc = ci->u.c.old_errfunc; + status = LUA_OK; /* if it is here, there were no errors */ + } + adjustresults(L, nresults); + lua_unlock(L); + return status; +} + + +LUA_API int lua_load (lua_State *L, lua_Reader reader, void *data, + const char *chunkname, const char *mode) { + ZIO z; + int status; + lua_lock(L); + if (!chunkname) chunkname = "?"; + luaZ_init(L, &z, reader, data); + status = luaD_protectedparser(L, &z, chunkname, mode); + if (status == LUA_OK) { /* no errors? */ + LClosure *f = clLvalue(L->top - 1); /* get newly created function */ + if (f->nupvalues == 1) { /* does it have one upvalue? */ + /* get global table from registry */ + Table *reg = hvalue(&G(L)->l_registry); + const TValue *gt = luaH_getint(reg, LUA_RIDX_GLOBALS); + /* set global table as 1st upvalue of 'f' (may be LUA_ENV) */ + setobj(L, f->upvals[0]->v, gt); + luaC_barrier(L, f->upvals[0], gt); + } + } + lua_unlock(L); + return status; +} + + +LUA_API int lua_dump (lua_State *L, lua_Writer writer, void *data) { + int status; + TValue *o; + lua_lock(L); + api_checknelems(L, 1); + o = L->top - 1; + if (isLfunction(o)) + status = luaU_dump(L, getproto(o), writer, data, 0); + else + status = 1; + lua_unlock(L); + return status; +} + + +LUA_API int lua_status (lua_State *L) { + return L->status; +} + + +/* +** Garbage-collection function +*/ + +LUA_API int lua_gc (lua_State *L, int what, int data) { + int res = 0; + global_State *g; + lua_lock(L); + g = G(L); + switch (what) { + case LUA_GCSTOP: { + g->gcrunning = 0; + break; + } + case LUA_GCRESTART: { + luaE_setdebt(g, 0); + g->gcrunning = 1; + break; + } + case LUA_GCCOLLECT: { + luaC_fullgc(L, 0); + break; + } + case LUA_GCCOUNT: { + /* GC values are expressed in Kbytes: #bytes/2^10 */ + res = cast_int(gettotalbytes(g) >> 10); + break; + } + case LUA_GCCOUNTB: { + res = cast_int(gettotalbytes(g) & 0x3ff); + break; + } + case LUA_GCSTEP: { + if (g->gckind == KGC_GEN) { /* generational mode? */ + res = (g->GCestimate == 0); /* true if it will do major collection */ + luaC_forcestep(L); /* do a single step */ + } + else { + lu_mem debt = cast(lu_mem, data) * 1024 - GCSTEPSIZE; + if (g->gcrunning) + debt += g->GCdebt; /* include current debt */ + luaE_setdebt(g, debt); + luaC_forcestep(L); + if (g->gcstate == GCSpause) /* end of cycle? */ + res = 1; /* signal it */ + } + break; + } + case LUA_GCSETPAUSE: { + res = g->gcpause; + g->gcpause = data; + break; + } + case LUA_GCSETMAJORINC: { + res = g->gcmajorinc; + g->gcmajorinc = data; + break; + } + case LUA_GCSETSTEPMUL: { + res = g->gcstepmul; + g->gcstepmul = data; + break; + } + case LUA_GCISRUNNING: { + res = g->gcrunning; + break; + } + case LUA_GCGEN: { /* change collector to generational mode */ + luaC_changemode(L, KGC_GEN); + break; + } + case LUA_GCINC: { /* change collector to incremental mode */ + luaC_changemode(L, KGC_NORMAL); + break; + } + default: res = -1; /* invalid option */ + } + lua_unlock(L); + return res; +} + + + +/* +** miscellaneous functions +*/ + + +LUA_API int lua_error (lua_State *L) { + lua_lock(L); + api_checknelems(L, 1); + luaG_errormsg(L); + /* code unreachable; will unlock when control actually leaves the kernel */ + return 0; /* to avoid warnings */ +} + + +LUA_API int lua_next (lua_State *L, int idx) { + StkId t; + int more; + lua_lock(L); + t = index2addr(L, idx); + api_check(L, ttistable(t), "table expected"); + more = luaH_next(L, hvalue(t), L->top - 1); + if (more) { + api_incr_top(L); + } + else /* no more elements */ + L->top -= 1; /* remove key */ + lua_unlock(L); + return more; +} + + +LUA_API void lua_concat (lua_State *L, int n) { + lua_lock(L); + api_checknelems(L, n); + if (n >= 2) { + luaC_checkGC(L); + luaV_concat(L, n); + } + else if (n == 0) { /* push empty string */ + setsvalue2s(L, L->top, luaS_newlstr(L, "", 0)); + api_incr_top(L); + } + /* else n == 1; nothing to do */ + lua_unlock(L); +} + + +LUA_API void lua_len (lua_State *L, int idx) { + StkId t; + lua_lock(L); + t = index2addr(L, idx); + luaV_objlen(L, L->top, t); + api_incr_top(L); + lua_unlock(L); +} + + +LUA_API lua_Alloc lua_getallocf (lua_State *L, void **ud) { + lua_Alloc f; + lua_lock(L); + if (ud) *ud = G(L)->ud; + f = G(L)->frealloc; + lua_unlock(L); + return f; +} + + +LUA_API void lua_setallocf (lua_State *L, lua_Alloc f, void *ud) { + lua_lock(L); + G(L)->ud = ud; + G(L)->frealloc = f; + lua_unlock(L); +} + + +LUA_API void *lua_newuserdata (lua_State *L, size_t size) { + Udata *u; + lua_lock(L); + luaC_checkGC(L); + u = luaS_newudata(L, size, NULL); + setuvalue(L, L->top, u); + api_incr_top(L); + lua_unlock(L); + return u + 1; +} + + + +static const char *aux_upvalue (StkId fi, int n, TValue **val, + GCObject **owner) { + switch (ttype(fi)) { + case LUA_TCCL: { /* C closure */ + CClosure *f = clCvalue(fi); + if (!(1 <= n && n <= f->nupvalues)) return NULL; + *val = &f->upvalue[n-1]; + if (owner) *owner = obj2gco(f); + return ""; + } + case LUA_TLCL: { /* Lua closure */ + LClosure *f = clLvalue(fi); + TString *name; + Proto *p = f->p; + if (!(1 <= n && n <= p->sizeupvalues)) return NULL; + *val = f->upvals[n-1]->v; + if (owner) *owner = obj2gco(f->upvals[n - 1]); + name = p->upvalues[n-1].name; + return (name == NULL) ? "" : getstr(name); + } + default: return NULL; /* not a closure */ + } +} + + +LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n) { + const char *name; + TValue *val = NULL; /* to avoid warnings */ + lua_lock(L); + name = aux_upvalue(index2addr(L, funcindex), n, &val, NULL); + if (name) { + setobj2s(L, L->top, val); + api_incr_top(L); + } + lua_unlock(L); + return name; +} + + +LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) { + const char *name; + TValue *val = NULL; /* to avoid warnings */ + GCObject *owner = NULL; /* to avoid warnings */ + StkId fi; + lua_lock(L); + fi = index2addr(L, funcindex); + api_checknelems(L, 1); + name = aux_upvalue(fi, n, &val, &owner); + if (name) { + L->top--; + setobj(L, val, L->top); + luaC_barrier(L, owner, L->top); + } + lua_unlock(L); + return name; +} + + +static UpVal **getupvalref (lua_State *L, int fidx, int n, LClosure **pf) { + LClosure *f; + StkId fi = index2addr(L, fidx); + api_check(L, ttisLclosure(fi), "Lua function expected"); + f = clLvalue(fi); + api_check(L, (1 <= n && n <= f->p->sizeupvalues), "invalid upvalue index"); + if (pf) *pf = f; + return &f->upvals[n - 1]; /* get its upvalue pointer */ +} + + +LUA_API void *lua_upvalueid (lua_State *L, int fidx, int n) { + StkId fi = index2addr(L, fidx); + switch (ttype(fi)) { + case LUA_TLCL: { /* lua closure */ + return *getupvalref(L, fidx, n, NULL); + } + case LUA_TCCL: { /* C closure */ + CClosure *f = clCvalue(fi); + api_check(L, 1 <= n && n <= f->nupvalues, "invalid upvalue index"); + return &f->upvalue[n - 1]; + } + default: { + api_check(L, 0, "closure expected"); + return NULL; + } + } +} + + +LUA_API void lua_upvaluejoin (lua_State *L, int fidx1, int n1, + int fidx2, int n2) { + LClosure *f1; + UpVal **up1 = getupvalref(L, fidx1, n1, &f1); + UpVal **up2 = getupvalref(L, fidx2, n2, NULL); + *up1 = *up2; + luaC_objbarrier(L, f1, *up2); +} + diff --git a/radio/src/lua/src/lapi.h b/radio/src/lua/src/lapi.h new file mode 100644 index 000000000..0909a3911 --- /dev/null +++ b/radio/src/lua/src/lapi.h @@ -0,0 +1,24 @@ +/* +** $Id: lapi.h,v 2.7 2009/11/27 15:37:59 roberto Exp $ +** Auxiliary functions from Lua API +** See Copyright Notice in lua.h +*/ + +#ifndef lapi_h +#define lapi_h + + +#include "llimits.h" +#include "lstate.h" + +#define api_incr_top(L) {L->top++; api_check(L, L->top <= L->ci->top, \ + "stack overflow");} + +#define adjustresults(L,nres) \ + { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; } + +#define api_checknelems(L,n) api_check(L, (n) < (L->top - L->ci->func), \ + "not enough elements in the stack") + + +#endif diff --git a/radio/src/lua/src/lauxlib.c b/radio/src/lua/src/lauxlib.c new file mode 100644 index 000000000..1c52b82a6 --- /dev/null +++ b/radio/src/lua/src/lauxlib.c @@ -0,0 +1,997 @@ +/* +** $Id: lauxlib.c,v 1.248 2013/03/21 13:54:57 roberto Exp $ +** Auxiliary functions for building Lua libraries +** See Copyright Notice in lua.h +*/ + + +#include +#include +#include +#include +#include + + +/* This file uses only the official API of Lua. +** Any function declared here could be written as an application function. +*/ + +#define lauxlib_c + +#include "lua.h" + +#include "lauxlib.h" + + +/* +** {====================================================== +** Traceback +** ======================================================= +*/ + + +#define LEVELS1 12 /* size of the first part of the stack */ +#define LEVELS2 10 /* size of the second part of the stack */ + + +#if defined(USE_FATFS) +int lua__getc(FIL *f) +{ + char c; + UINT result; + if (f_read(f, &c, 1, &result) == FR_OK && result == 1) + return c; + else + return -1; +} +#endif + + +/* +** search for 'objidx' in table at index -1. +** return 1 + string at top if find a good name. +*/ +static int findfield (lua_State *L, int objidx, int level) { + if (level == 0 || !lua_istable(L, -1)) + return 0; /* not found */ + lua_pushnil(L); /* start 'next' loop */ + while (lua_next(L, -2)) { /* for each pair in table */ + if (lua_type(L, -2) == LUA_TSTRING) { /* ignore non-string keys */ + if (lua_rawequal(L, objidx, -1)) { /* found object? */ + lua_pop(L, 1); /* remove value (but keep name) */ + return 1; + } + else if (findfield(L, objidx, level - 1)) { /* try recursively */ + lua_remove(L, -2); /* remove table (but keep name) */ + lua_pushliteral(L, "."); + lua_insert(L, -2); /* place '.' between the two names */ + lua_concat(L, 3); + return 1; + } + } + lua_pop(L, 1); /* remove value */ + } + return 0; /* not found */ +} + + +static int pushglobalfuncname (lua_State *L, lua_Debug *ar) { + int top = lua_gettop(L); + lua_getinfo(L, "f", ar); /* push function */ + lua_pushglobaltable(L); + if (findfield(L, top + 1, 2)) { + lua_copy(L, -1, top + 1); /* move name to proper place */ + lua_pop(L, 2); /* remove pushed values */ + return 1; + } + else { + lua_settop(L, top); /* remove function and global table */ + return 0; + } +} + + +static void pushfuncname (lua_State *L, lua_Debug *ar) { + if (*ar->namewhat != '\0') /* is there a name? */ + lua_pushfstring(L, "function " LUA_QS, ar->name); + else if (*ar->what == 'm') /* main? */ + lua_pushliteral(L, "main chunk"); + else if (*ar->what == 'C') { + if (pushglobalfuncname(L, ar)) { + lua_pushfstring(L, "function " LUA_QS, lua_tostring(L, -1)); + lua_remove(L, -2); /* remove name */ + } + else + lua_pushliteral(L, "?"); + } + else + lua_pushfstring(L, "function <%s:%d>", ar->short_src, ar->linedefined); +} + + +static int countlevels (lua_State *L) { + lua_Debug ar; + int li = 1, le = 1; + /* find an upper bound */ + while (lua_getstack(L, le, &ar)) { li = le; le *= 2; } + /* do a binary search */ + while (li < le) { + int m = (li + le)/2; + if (lua_getstack(L, m, &ar)) li = m + 1; + else le = m; + } + return le - 1; +} + + +LUALIB_API void luaL_traceback (lua_State *L, lua_State *L1, + const char *msg, int level) { + lua_Debug ar; + int top = lua_gettop(L); + int numlevels = countlevels(L1); + int mark = (numlevels > LEVELS1 + LEVELS2) ? LEVELS1 : 0; + if (msg) lua_pushfstring(L, "%s\n", msg); + lua_pushliteral(L, "stack traceback:"); + while (lua_getstack(L1, level++, &ar)) { + if (level == mark) { /* too many levels? */ + lua_pushliteral(L, "\n\t..."); /* add a '...' */ + level = numlevels - LEVELS2; /* and skip to last ones */ + } + else { + lua_getinfo(L1, "Slnt", &ar); + lua_pushfstring(L, "\n\t%s:", ar.short_src); + if (ar.currentline > 0) + lua_pushfstring(L, "%d:", ar.currentline); + lua_pushliteral(L, " in "); + pushfuncname(L, &ar); + if (ar.istailcall) + lua_pushliteral(L, "\n\t(...tail calls...)"); + lua_concat(L, lua_gettop(L) - top); + } + } + lua_concat(L, lua_gettop(L) - top); +} + +/* }====================================================== */ + + +/* +** {====================================================== +** Error-report functions +** ======================================================= +*/ + +LUALIB_API int luaL_argerror (lua_State *L, int narg, const char *extramsg) { + lua_Debug ar; + if (!lua_getstack(L, 0, &ar)) /* no stack frame? */ + return luaL_error(L, "bad argument #%d (%s)", narg, extramsg); + lua_getinfo(L, "n", &ar); + if (strcmp(ar.namewhat, "method") == 0) { + narg--; /* do not count `self' */ + if (narg == 0) /* error is in the self argument itself? */ + return luaL_error(L, "calling " LUA_QS " on bad self (%s)", + ar.name, extramsg); + } + if (ar.name == NULL) + ar.name = (pushglobalfuncname(L, &ar)) ? lua_tostring(L, -1) : "?"; + return luaL_error(L, "bad argument #%d to " LUA_QS " (%s)", + narg, ar.name, extramsg); +} + + +static int typeerror (lua_State *L, int narg, const char *tname) { + const char *msg = lua_pushfstring(L, "%s expected, got %s", + tname, luaL_typename(L, narg)); + return luaL_argerror(L, narg, msg); +} + + +static void tag_error (lua_State *L, int narg, int tag) { + typeerror(L, narg, lua_typename(L, tag)); +} + + +LUALIB_API void luaL_where (lua_State *L, int level) { + lua_Debug ar; + if (lua_getstack(L, level, &ar)) { /* check function at level */ + lua_getinfo(L, "Sl", &ar); /* get info about it */ + if (ar.currentline > 0) { /* is there info? */ + lua_pushfstring(L, "%s:%d: ", ar.short_src, ar.currentline); + return; + } + } + lua_pushliteral(L, ""); /* else, no information available... */ +} + + +LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...) { + va_list argp; + va_start(argp, fmt); + luaL_where(L, 1); + lua_pushvfstring(L, fmt, argp); + va_end(argp); + lua_concat(L, 2); + return lua_error(L); +} + + +LUALIB_API int luaL_fileresult (lua_State *L, int stat, const char *fname) { + int en = errno; /* calls to Lua API may change this value */ + if (stat) { + lua_pushboolean(L, 1); + return 1; + } + else { + lua_pushnil(L); + if (fname) + lua_pushfstring(L, "%s: %s", fname, strerror(en)); + else + lua_pushstring(L, strerror(en)); + lua_pushinteger(L, en); + return 3; + } +} + + +#if !defined(inspectstat) /* { */ + +#if defined(LUA_USE_POSIX) + +#include + +/* +** use appropriate macros to interpret 'pclose' return status +*/ +#define inspectstat(stat,what) \ + if (WIFEXITED(stat)) { stat = WEXITSTATUS(stat); } \ + else if (WIFSIGNALED(stat)) { stat = WTERMSIG(stat); what = "signal"; } + +#else + +#define inspectstat(stat,what) /* no op */ + +#endif + +#endif /* } */ + + +LUALIB_API int luaL_execresult (lua_State *L, int stat) { + const char *what = "exit"; /* type of termination */ + if (stat == -1) /* error? */ + return luaL_fileresult(L, 0, NULL); + else { + inspectstat(stat, what); /* interpret result */ + if (*what == 'e' && stat == 0) /* successful termination? */ + lua_pushboolean(L, 1); + else + lua_pushnil(L); + lua_pushstring(L, what); + lua_pushinteger(L, stat); + return 3; /* return true/nil,what,code */ + } +} + +/* }====================================================== */ + + +/* +** {====================================================== +** Userdata's metatable manipulation +** ======================================================= +*/ + +LUALIB_API int luaL_newmetatable (lua_State *L, const char *tname) { + luaL_getmetatable(L, tname); /* try to get metatable */ + if (!lua_isnil(L, -1)) /* name already in use? */ + return 0; /* leave previous value on top, but return 0 */ + lua_pop(L, 1); + lua_newtable(L); /* create metatable */ + lua_pushvalue(L, -1); + lua_setfield(L, LUA_REGISTRYINDEX, tname); /* registry.name = metatable */ + return 1; +} + + +LUALIB_API void luaL_setmetatable (lua_State *L, const char *tname) { + luaL_getmetatable(L, tname); + lua_setmetatable(L, -2); +} + + +LUALIB_API void *luaL_testudata (lua_State *L, int ud, const char *tname) { + void *p = lua_touserdata(L, ud); + if (p != NULL) { /* value is a userdata? */ + if (lua_getmetatable(L, ud)) { /* does it have a metatable? */ + luaL_getmetatable(L, tname); /* get correct metatable */ + if (!lua_rawequal(L, -1, -2)) /* not the same? */ + p = NULL; /* value is a userdata with wrong metatable */ + lua_pop(L, 2); /* remove both metatables */ + return p; + } + } + return NULL; /* value is not a userdata with a metatable */ +} + + +LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname) { + void *p = luaL_testudata(L, ud, tname); + if (p == NULL) typeerror(L, ud, tname); + return p; +} + +/* }====================================================== */ + + +/* +** {====================================================== +** Argument check functions +** ======================================================= +*/ + +LUALIB_API int luaL_checkoption (lua_State *L, int narg, const char *def, + const char *const lst[]) { + const char *name = (def) ? luaL_optstring(L, narg, def) : + luaL_checkstring(L, narg); + int i; + for (i=0; lst[i]; i++) + if (strcmp(lst[i], name) == 0) + return i; + return luaL_argerror(L, narg, + lua_pushfstring(L, "invalid option " LUA_QS, name)); +} + + +LUALIB_API void luaL_checkstack (lua_State *L, int space, const char *msg) { + /* keep some extra space to run error routines, if needed */ + const int extra = LUA_MINSTACK; + if (!lua_checkstack(L, space + extra)) { + if (msg) + luaL_error(L, "stack overflow (%s)", msg); + else + luaL_error(L, "stack overflow"); + } +} + + +LUALIB_API void luaL_checktype (lua_State *L, int narg, int t) { + if (lua_type(L, narg) != t) + tag_error(L, narg, t); +} + + +LUALIB_API void luaL_checkany (lua_State *L, int narg) { + if (lua_type(L, narg) == LUA_TNONE) + luaL_argerror(L, narg, "value expected"); +} + + +LUALIB_API const char *luaL_checklstring (lua_State *L, int narg, size_t *len) { + const char *s = lua_tolstring(L, narg, len); + if (!s) tag_error(L, narg, LUA_TSTRING); + return s; +} + + +LUALIB_API const char *luaL_optlstring (lua_State *L, int narg, + const char *def, size_t *len) { + if (lua_isnoneornil(L, narg)) { + if (len) + *len = (def ? strlen(def) : 0); + return def; + } + else return luaL_checklstring(L, narg, len); +} + + +LUALIB_API lua_Number luaL_checknumber (lua_State *L, int narg) { + int isnum; + lua_Number d = lua_tonumberx(L, narg, &isnum); + if (!isnum) + tag_error(L, narg, LUA_TNUMBER); + return d; +} + + +LUALIB_API lua_Number luaL_optnumber (lua_State *L, int narg, lua_Number def) { + return luaL_opt(L, luaL_checknumber, narg, def); +} + + +LUALIB_API lua_Integer luaL_checkinteger (lua_State *L, int narg) { + int isnum; + lua_Integer d = lua_tointegerx(L, narg, &isnum); + if (!isnum) + tag_error(L, narg, LUA_TNUMBER); + return d; +} + + +LUALIB_API lua_Unsigned luaL_checkunsigned (lua_State *L, int narg) { + int isnum; + lua_Unsigned d = lua_tounsignedx(L, narg, &isnum); + if (!isnum) + tag_error(L, narg, LUA_TNUMBER); + return d; +} + + +LUALIB_API lua_Integer luaL_optinteger (lua_State *L, int narg, + lua_Integer def) { + return luaL_opt(L, luaL_checkinteger, narg, def); +} + + +LUALIB_API lua_Unsigned luaL_optunsigned (lua_State *L, int narg, + lua_Unsigned def) { + return luaL_opt(L, luaL_checkunsigned, narg, def); +} + +/* }====================================================== */ + + +/* +** {====================================================== +** Generic Buffer manipulation +** ======================================================= +*/ + +/* +** check whether buffer is using a userdata on the stack as a temporary +** buffer +*/ +#define buffonstack(B) ((B)->b != (B)->initb) + + +/* +** returns a pointer to a free area with at least 'sz' bytes +*/ +LUALIB_API char *luaL_prepbuffsize (luaL_Buffer *B, size_t sz) { + lua_State *L = B->L; + if (B->size - B->n < sz) { /* not enough space? */ + char *newbuff; + size_t newsize = B->size * 2; /* double buffer size */ + if (newsize - B->n < sz) /* not big enough? */ + newsize = B->n + sz; + if (newsize < B->n || newsize - B->n < sz) + luaL_error(L, "buffer too large"); + /* create larger buffer */ + newbuff = (char *)lua_newuserdata(L, newsize * sizeof(char)); + /* move content to new buffer */ + memcpy(newbuff, B->b, B->n * sizeof(char)); + if (buffonstack(B)) + lua_remove(L, -2); /* remove old buffer */ + B->b = newbuff; + B->size = newsize; + } + return &B->b[B->n]; +} + + +LUALIB_API void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l) { + char *b = luaL_prepbuffsize(B, l); + memcpy(b, s, l * sizeof(char)); + luaL_addsize(B, l); +} + + +LUALIB_API void luaL_addstring (luaL_Buffer *B, const char *s) { + luaL_addlstring(B, s, strlen(s)); +} + + +LUALIB_API void luaL_pushresult (luaL_Buffer *B) { + lua_State *L = B->L; + lua_pushlstring(L, B->b, B->n); + if (buffonstack(B)) + lua_remove(L, -2); /* remove old buffer */ +} + + +LUALIB_API void luaL_pushresultsize (luaL_Buffer *B, size_t sz) { + luaL_addsize(B, sz); + luaL_pushresult(B); +} + + +LUALIB_API void luaL_addvalue (luaL_Buffer *B) { + lua_State *L = B->L; + size_t l; + const char *s = lua_tolstring(L, -1, &l); + if (buffonstack(B)) + lua_insert(L, -2); /* put value below buffer */ + luaL_addlstring(B, s, l); + lua_remove(L, (buffonstack(B)) ? -2 : -1); /* remove value */ +} + + +LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B) { + B->L = L; + B->b = B->initb; + B->n = 0; + B->size = LUAL_BUFFERSIZE; +} + + +LUALIB_API char *luaL_buffinitsize (lua_State *L, luaL_Buffer *B, size_t sz) { + luaL_buffinit(L, B); + return luaL_prepbuffsize(B, sz); +} + +/* }====================================================== */ + + +/* +** {====================================================== +** Reference system +** ======================================================= +*/ + +/* index of free-list header */ +#define freelist 0 + + +LUALIB_API int luaL_ref (lua_State *L, int t) { + int ref; + if (lua_isnil(L, -1)) { + lua_pop(L, 1); /* remove from stack */ + return LUA_REFNIL; /* `nil' has a unique fixed reference */ + } + t = lua_absindex(L, t); + lua_rawgeti(L, t, freelist); /* get first free element */ + ref = (int)lua_tointeger(L, -1); /* ref = t[freelist] */ + lua_pop(L, 1); /* remove it from stack */ + if (ref != 0) { /* any free element? */ + lua_rawgeti(L, t, ref); /* remove it from list */ + lua_rawseti(L, t, freelist); /* (t[freelist] = t[ref]) */ + } + else /* no free elements */ + ref = (int)lua_rawlen(L, t) + 1; /* get a new reference */ + lua_rawseti(L, t, ref); + return ref; +} + + +LUALIB_API void luaL_unref (lua_State *L, int t, int ref) { + if (ref >= 0) { + t = lua_absindex(L, t); + lua_rawgeti(L, t, freelist); + lua_rawseti(L, t, ref); /* t[ref] = t[freelist] */ + lua_pushinteger(L, ref); + lua_rawseti(L, t, freelist); /* t[freelist] = ref */ + } +} + +/* }====================================================== */ + + +/* +** {====================================================== +** Load functions +** ======================================================= +*/ + +typedef struct LoadF { + int n; /* number of pre-read characters */ +#if defined(USE_FATFS) + FIL f; +#else + FILE *f; /* file being read */ +#endif + char buff[LUAL_BUFFERSIZE]; /* area for reading file */ +} LoadF; + + +static const char *getF (lua_State *L, void *ud, size_t *size) { + LoadF *lf = (LoadF *)ud; + (void)L; /* not used */ + if (lf->n > 0) { /* are there pre-read characters to be read? */ + *size = lf->n; /* return them (chars already in buffer) */ + lf->n = 0; /* no more pre-read characters */ + } + else { /* read a block from file */ + /* 'fread' can return > 0 *and* set the EOF flag. If next call to + 'getF' called 'fread', it might still wait for user input. + The next check avoids this problem. */ +#if defined(USE_FATFS) + UINT f_read_size; + FRESULT result = f_read(&lf->f, lf->buff, sizeof(lf->buff), &f_read_size); + if (result != FR_OK || f_read_size == 0) return NULL; + *size = f_read_size; +#else + if (feof(lf->f)) return NULL; + *size = fread(lf->buff, 1, sizeof(lf->buff), lf->f); /* read block */ +#endif + } + return lf->buff; +} + + +static int errfile (lua_State *L, const char *what, int fnameindex) { + const char *serr = strerror(errno); + const char *filename = lua_tostring(L, fnameindex) + 1; + lua_pushfstring(L, "cannot %s %s: %s", what, filename, serr); + lua_remove(L, fnameindex); + return LUA_ERRFILE; +} + + +static int skipBOM (LoadF *lf) { + const char *p = "\xEF\xBB\xBF"; /* Utf8 BOM mark */ + int c; + lf->n = 0; + do { + c = lua_getc(lf->f); + if (c == EOF || c != *(const unsigned char *)p++) return c; + lf->buff[lf->n++] = c; /* to be read by the parser */ + } while (*p != '\0'); + lf->n = 0; /* prefix matched; discard it */ + return lua_getc(lf->f); /* return next character */ +} + + +/* +** reads the first character of file 'f' and skips an optional BOM mark +** in its beginning plus its first line if it starts with '#'. Returns +** true if it skipped the first line. In any case, '*cp' has the +** first "valid" character of the file (after the optional BOM and +** a first-line comment). +*/ +static int skipcomment (LoadF *lf, int *cp) { + int c = *cp = skipBOM(lf); + if (c == '#') { /* first line is a comment (Unix exec. file)? */ + do { /* skip first line */ + c = lua_getc(lf->f); + } while (c != EOF && c != '\n') ; + *cp = lua_getc(lf->f); /* skip end-of-line, if present */ + return 1; /* there was a comment */ + } + else return 0; /* no comment */ +} + + +LUALIB_API int luaL_loadfilex (lua_State *L, const char *filename, + const char *mode) { + LoadF lf; + int status, readstatus; + int c; + int fnameindex = lua_gettop(L) + 1; /* index of filename on the stack */ + if (filename == NULL) { +#if defined(USE_FATFS) + return errfile(L, "open", fnameindex); +#else + lua_pushliteral(L, "=stdin"); + lf.f = stdin; +#endif + } + else { + lua_pushfstring(L, "@%s", filename); +#if defined(USE_FATFS) + FRESULT result = f_open(&lf.f, filename, FA_OPEN_EXISTING | FA_READ); + if (result != FR_OK) return errfile(L, "open", fnameindex); +#else + lf.f = fopen(filename, "r"); + if (lf.f == NULL) return errfile(L, "open", fnameindex); +#endif + } + if (skipcomment(&lf, &c)) /* read initial portion */ + lf.buff[lf.n++] = '\n'; /* add line to correct line numbers */ +#if !defined(USE_FATFS) + if (c == LUA_SIGNATURE[0] && filename) { /* binary file? */ + lf.f = freopen(filename, "rb", lf.f); /* reopen in binary mode */ + if (lf.f == NULL) return errfile(L, "reopen", fnameindex); + skipcomment(&lf, &c); /* re-read initial portion */ + } +#endif + if (c != EOF) + lf.buff[lf.n++] = c; /* 'c' is the first character of the stream */ + status = lua_load(L, getF, &lf, lua_tostring(L, -1), mode); +#if defined(USE_FATFS) + readstatus = 0; + if (filename) f_close(&lf.f); +#else + readstatus = ferror(lf.f); + if (filename) fclose(lf.f); /* close file (even in case of errors) */ +#endif + if (readstatus) { + lua_settop(L, fnameindex); /* ignore results from `lua_load' */ + return errfile(L, "read", fnameindex); + } + lua_remove(L, fnameindex); + return status; +} + + +typedef struct LoadS { + const char *s; + size_t size; +} LoadS; + + +static const char *getS (lua_State *L, void *ud, size_t *size) { + LoadS *ls = (LoadS *)ud; + (void)L; /* not used */ + if (ls->size == 0) return NULL; + *size = ls->size; + ls->size = 0; + return ls->s; +} + + +LUALIB_API int luaL_loadbufferx (lua_State *L, const char *buff, size_t size, + const char *name, const char *mode) { + LoadS ls; + ls.s = buff; + ls.size = size; + return lua_load(L, getS, &ls, name, mode); +} + + +LUALIB_API int luaL_loadstring (lua_State *L, const char *s) { + return luaL_loadbuffer(L, s, strlen(s), s); +} + +/* }====================================================== */ + + + +LUALIB_API int luaL_getmetafield (lua_State *L, int obj, const char *event) { + if (!lua_getmetatable(L, obj)) /* no metatable? */ + return 0; + lua_pushstring(L, event); + lua_rawget(L, -2); + if (lua_isnil(L, -1)) { + lua_pop(L, 2); /* remove metatable and metafield */ + return 0; + } + else { + lua_remove(L, -2); /* remove only metatable */ + return 1; + } +} + + +LUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *event) { + obj = lua_absindex(L, obj); + if (!luaL_getmetafield(L, obj, event)) /* no metafield? */ + return 0; + lua_pushvalue(L, obj); + lua_call(L, 1, 1); + return 1; +} + + +LUALIB_API int luaL_len (lua_State *L, int idx) { + int l; + int isnum; + lua_len(L, idx); + l = (int)lua_tointegerx(L, -1, &isnum); + if (!isnum) + luaL_error(L, "object length is not a number"); + lua_pop(L, 1); /* remove object */ + return l; +} + + +LUALIB_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len) { + if (!luaL_callmeta(L, idx, "__tostring")) { /* no metafield? */ + switch (lua_type(L, idx)) { + case LUA_TNUMBER: + case LUA_TSTRING: + lua_pushvalue(L, idx); + break; + case LUA_TBOOLEAN: + lua_pushstring(L, (lua_toboolean(L, idx) ? "true" : "false")); + break; + case LUA_TNIL: + lua_pushliteral(L, "nil"); + break; + default: + lua_pushfstring(L, "%s: %p", luaL_typename(L, idx), + lua_topointer(L, idx)); + break; + } + } + return lua_tolstring(L, -1, len); +} + + +/* +** {====================================================== +** Compatibility with 5.1 module functions +** ======================================================= +*/ +#if defined(LUA_COMPAT_MODULE) + +static const char *luaL_findtable (lua_State *L, int idx, + const char *fname, int szhint) { + const char *e; + if (idx) lua_pushvalue(L, idx); + do { + e = strchr(fname, '.'); + if (e == NULL) e = fname + strlen(fname); + lua_pushlstring(L, fname, e - fname); + lua_rawget(L, -2); + if (lua_isnil(L, -1)) { /* no such field? */ + lua_pop(L, 1); /* remove this nil */ + lua_createtable(L, 0, (*e == '.' ? 1 : szhint)); /* new table for field */ + lua_pushlstring(L, fname, e - fname); + lua_pushvalue(L, -2); + lua_settable(L, -4); /* set new table into field */ + } + else if (!lua_istable(L, -1)) { /* field has a non-table value? */ + lua_pop(L, 2); /* remove table and value */ + return fname; /* return problematic part of the name */ + } + lua_remove(L, -2); /* remove previous table */ + fname = e + 1; + } while (*e == '.'); + return NULL; +} + + +/* +** Count number of elements in a luaL_Reg list. +*/ +static int libsize (const luaL_Reg *l) { + int size = 0; + for (; l && l->name; l++) size++; + return size; +} + + +/* +** Find or create a module table with a given name. The function +** first looks at the _LOADED table and, if that fails, try a +** global variable with that name. In any case, leaves on the stack +** the module table. +*/ +LUALIB_API void luaL_pushmodule (lua_State *L, const char *modname, + int sizehint) { + luaL_findtable(L, LUA_REGISTRYINDEX, "_LOADED", 1); /* get _LOADED table */ + lua_getfield(L, -1, modname); /* get _LOADED[modname] */ + if (!lua_istable(L, -1)) { /* not found? */ + lua_pop(L, 1); /* remove previous result */ + /* try global variable (and create one if it does not exist) */ + lua_pushglobaltable(L); + if (luaL_findtable(L, 0, modname, sizehint) != NULL) + luaL_error(L, "name conflict for module " LUA_QS, modname); + lua_pushvalue(L, -1); + lua_setfield(L, -3, modname); /* _LOADED[modname] = new table */ + } + lua_remove(L, -2); /* remove _LOADED table */ +} + + +LUALIB_API void luaL_openlib (lua_State *L, const char *libname, + const luaL_Reg *l, int nup) { + luaL_checkversion(L); + if (libname) { + luaL_pushmodule(L, libname, libsize(l)); /* get/create library table */ + lua_insert(L, -(nup + 1)); /* move library table to below upvalues */ + } + if (l) + luaL_setfuncs(L, l, nup); + else + lua_pop(L, nup); /* remove upvalues */ +} + +#endif +/* }====================================================== */ + +/* +** set functions from list 'l' into table at top - 'nup'; each +** function gets the 'nup' elements at the top as upvalues. +** Returns with only the table at the stack. +*/ +LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { + luaL_checkversion(L); + luaL_checkstack(L, nup, "too many upvalues"); + for (; l->name != NULL; l++) { /* fill the table with given functions */ + int i; + for (i = 0; i < nup; i++) /* copy upvalues to the top */ + lua_pushvalue(L, -nup); + lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */ + lua_setfield(L, -(nup + 2), l->name); + } + lua_pop(L, nup); /* remove upvalues */ +} + + +/* +** ensure that stack[idx][fname] has a table and push that table +** into the stack +*/ +LUALIB_API int luaL_getsubtable (lua_State *L, int idx, const char *fname) { + lua_getfield(L, idx, fname); + if (lua_istable(L, -1)) return 1; /* table already there */ + else { + lua_pop(L, 1); /* remove previous result */ + idx = lua_absindex(L, idx); + lua_newtable(L); + lua_pushvalue(L, -1); /* copy to be left at top */ + lua_setfield(L, idx, fname); /* assign new table to field */ + return 0; /* false, because did not find table there */ + } +} + + +/* +** stripped-down 'require'. Calls 'openf' to open a module, +** registers the result in 'package.loaded' table and, if 'glb' +** is true, also registers the result in the global table. +** Leaves resulting module on the top. +*/ +LUALIB_API void luaL_requiref (lua_State *L, const char *modname, + lua_CFunction openf, int glb) { + lua_pushcfunction(L, openf); + lua_pushstring(L, modname); /* argument to open function */ + lua_call(L, 1, 1); /* open module */ + luaL_getsubtable(L, LUA_REGISTRYINDEX, "_LOADED"); + lua_pushvalue(L, -2); /* make copy of module (call result) */ + lua_setfield(L, -2, modname); /* _LOADED[modname] = module */ + lua_pop(L, 1); /* remove _LOADED table */ + if (glb) { + lua_pushvalue(L, -1); /* copy of 'mod' */ + lua_setglobal(L, modname); /* _G[modname] = module */ + } +} + + +LUALIB_API const char *luaL_gsub (lua_State *L, const char *s, const char *p, + const char *r) { + const char *wild; + size_t l = strlen(p); + luaL_Buffer b; + luaL_buffinit(L, &b); + while ((wild = strstr(s, p)) != NULL) { + luaL_addlstring(&b, s, wild - s); /* push prefix */ + luaL_addstring(&b, r); /* push replacement in place of pattern */ + s = wild + l; /* continue after `p' */ + } + luaL_addstring(&b, s); /* push last suffix */ + luaL_pushresult(&b); + return lua_tostring(L, -1); +} + + +static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) { + (void)ud; (void)osize; /* not used */ + if (nsize == 0) { + free(ptr); + return NULL; + } + else + return realloc(ptr, nsize); +} + + +static int panic (lua_State *L) { + luai_writestringerror("PANIC: unprotected error in call to Lua API (%s)\n", + lua_tostring(L, -1)); + return 0; /* return to Lua to abort */ +} + + +LUALIB_API lua_State *luaL_newstate (void) { + lua_State *L = lua_newstate(l_alloc, NULL); + if (L) lua_atpanic(L, &panic); + return L; +} + + +LUALIB_API void luaL_checkversion_ (lua_State *L, lua_Number ver) { + const lua_Number *v = lua_version(L); + if (v != lua_version(NULL)) + luaL_error(L, "multiple Lua VMs detected"); + else if (*v != ver) + luaL_error(L, "version mismatch: app. needs %f, Lua core provides %f", + ver, *v); + /* check conversions number -> integer types */ + lua_pushnumber(L, -(lua_Number)0x1234); + if (lua_tointeger(L, -1) != -0x1234 || + lua_tounsigned(L, -1) != (lua_Unsigned)-0x1234) + luaL_error(L, "bad conversion number->int;" + " must recompile Lua with proper settings"); + lua_pop(L, 1); +} + diff --git a/radio/src/lua/src/lauxlib.h b/radio/src/lua/src/lauxlib.h new file mode 100644 index 000000000..d66471b0b --- /dev/null +++ b/radio/src/lua/src/lauxlib.h @@ -0,0 +1,215 @@ +/* +** $Id: lauxlib.h,v 1.120 2011/11/29 15:55:08 roberto Exp $ +** Auxiliary functions for building Lua libraries +** See Copyright Notice in lua.h +*/ + + +#ifndef lauxlib_h +#define lauxlib_h + + +#include + +#include "lua.h" + + + +/* extra error code for `luaL_load' */ +#define LUA_ERRFILE (LUA_ERRERR+1) + + +typedef struct luaL_Reg { + const char *name; + lua_CFunction func; +} luaL_Reg; + + +LUALIB_API void (luaL_checkversion_) (lua_State *L, lua_Number ver); +#define luaL_checkversion(L) luaL_checkversion_(L, LUA_VERSION_NUM) + +LUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e); +LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e); +LUALIB_API const char *(luaL_tolstring) (lua_State *L, int idx, size_t *len); +LUALIB_API int (luaL_argerror) (lua_State *L, int numarg, const char *extramsg); +LUALIB_API const char *(luaL_checklstring) (lua_State *L, int numArg, + size_t *l); +LUALIB_API const char *(luaL_optlstring) (lua_State *L, int numArg, + const char *def, size_t *l); +LUALIB_API lua_Number (luaL_checknumber) (lua_State *L, int numArg); +LUALIB_API lua_Number (luaL_optnumber) (lua_State *L, int nArg, lua_Number def); + +LUALIB_API lua_Integer (luaL_checkinteger) (lua_State *L, int numArg); +LUALIB_API lua_Integer (luaL_optinteger) (lua_State *L, int nArg, + lua_Integer def); +LUALIB_API lua_Unsigned (luaL_checkunsigned) (lua_State *L, int numArg); +LUALIB_API lua_Unsigned (luaL_optunsigned) (lua_State *L, int numArg, + lua_Unsigned def); + +LUALIB_API void (luaL_checkstack) (lua_State *L, int sz, const char *msg); +LUALIB_API void (luaL_checktype) (lua_State *L, int narg, int t); +LUALIB_API void (luaL_checkany) (lua_State *L, int narg); + +LUALIB_API int (luaL_newmetatable) (lua_State *L, const char *tname); +LUALIB_API void (luaL_setmetatable) (lua_State *L, const char *tname); +LUALIB_API void *(luaL_testudata) (lua_State *L, int ud, const char *tname); +LUALIB_API void *(luaL_checkudata) (lua_State *L, int ud, const char *tname); + +LUALIB_API void (luaL_where) (lua_State *L, int lvl); +LUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...); + +LUALIB_API int (luaL_checkoption) (lua_State *L, int narg, const char *def, + const char *const lst[]); + +LUALIB_API int (luaL_fileresult) (lua_State *L, int stat, const char *fname); +LUALIB_API int (luaL_execresult) (lua_State *L, int stat); + +/* pre-defined references */ +#define LUA_NOREF (-2) +#define LUA_REFNIL (-1) + +LUALIB_API int (luaL_ref) (lua_State *L, int t); +LUALIB_API void (luaL_unref) (lua_State *L, int t, int ref); + +LUALIB_API int (luaL_loadfilex) (lua_State *L, const char *filename, + const char *mode); + +#define luaL_loadfile(L,f) luaL_loadfilex(L,f,NULL) + +LUALIB_API int (luaL_loadbufferx) (lua_State *L, const char *buff, size_t sz, + const char *name, const char *mode); +LUALIB_API int (luaL_loadstring) (lua_State *L, const char *s); + +LUALIB_API lua_State *(luaL_newstate) (void); + +LUALIB_API int (luaL_len) (lua_State *L, int idx); + +LUALIB_API const char *(luaL_gsub) (lua_State *L, const char *s, const char *p, + const char *r); + +LUALIB_API void (luaL_setfuncs) (lua_State *L, const luaL_Reg *l, int nup); + +LUALIB_API int (luaL_getsubtable) (lua_State *L, int idx, const char *fname); + +LUALIB_API void (luaL_traceback) (lua_State *L, lua_State *L1, + const char *msg, int level); + +LUALIB_API void (luaL_requiref) (lua_State *L, const char *modname, + lua_CFunction openf, int glb); + +/* +** =============================================================== +** some useful macros +** =============================================================== +*/ + + +#define luaL_newlibtable(L,l) \ + lua_createtable(L, 0, sizeof(l)/sizeof((l)[0]) - 1) + +#define luaL_newlib(L,l) (luaL_newlibtable(L,l), luaL_setfuncs(L,l,0)) + +#define luaL_argcheck(L, cond,numarg,extramsg) \ + ((void)((cond) || luaL_argerror(L, (numarg), (extramsg)))) +#define luaL_checkstring(L,n) (luaL_checklstring(L, (n), NULL)) +#define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL)) +#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n))) +#define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d))) +#define luaL_checklong(L,n) ((long)luaL_checkinteger(L, (n))) +#define luaL_optlong(L,n,d) ((long)luaL_optinteger(L, (n), (d))) + +#define luaL_typename(L,i) lua_typename(L, lua_type(L,(i))) + +#define luaL_dofile(L, fn) \ + (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0)) + +#define luaL_dostring(L, s) \ + (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0)) + +#define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) + +#define luaL_opt(L,f,n,d) (lua_isnoneornil(L,(n)) ? (d) : f(L,(n))) + +#define luaL_loadbuffer(L,s,sz,n) luaL_loadbufferx(L,s,sz,n,NULL) + + +/* +** {====================================================== +** Generic Buffer manipulation +** ======================================================= +*/ + +typedef struct luaL_Buffer { + char *b; /* buffer address */ + size_t size; /* buffer size */ + size_t n; /* number of characters in buffer */ + lua_State *L; + char initb[LUAL_BUFFERSIZE]; /* initial buffer */ +} luaL_Buffer; + + +#define luaL_addchar(B,c) \ + ((void)((B)->n < (B)->size || luaL_prepbuffsize((B), 1)), \ + ((B)->b[(B)->n++] = (c))) + +#define luaL_addsize(B,s) ((B)->n += (s)) + +LUALIB_API void (luaL_buffinit) (lua_State *L, luaL_Buffer *B); +LUALIB_API char *(luaL_prepbuffsize) (luaL_Buffer *B, size_t sz); +LUALIB_API void (luaL_addlstring) (luaL_Buffer *B, const char *s, size_t l); +LUALIB_API void (luaL_addstring) (luaL_Buffer *B, const char *s); +LUALIB_API void (luaL_addvalue) (luaL_Buffer *B); +LUALIB_API void (luaL_pushresult) (luaL_Buffer *B); +LUALIB_API void (luaL_pushresultsize) (luaL_Buffer *B, size_t sz); +LUALIB_API char *(luaL_buffinitsize) (lua_State *L, luaL_Buffer *B, size_t sz); + +#define luaL_prepbuffer(B) luaL_prepbuffsize(B, LUAL_BUFFERSIZE) + +/* }====================================================== */ + + + +/* +** {====================================================== +** File handles for IO library +** ======================================================= +*/ + +/* +** A file handle is a userdata with metatable 'LUA_FILEHANDLE' and +** initial structure 'luaL_Stream' (it may contain other fields +** after that initial structure). +*/ + +#define LUA_FILEHANDLE "FILE*" + + +typedef struct luaL_Stream { +#if defined(USE_FATFS) + FIL *f; /* stream (NULL for incompletely created streams) */ +#else + FILE *f; /* stream (NULL for incompletely created streams) */ +#endif + lua_CFunction closef; /* to close stream (NULL for closed streams) */ +} luaL_Stream; + +/* }====================================================== */ + + + +/* compatibility with old module system */ +#if defined(LUA_COMPAT_MODULE) + +LUALIB_API void (luaL_pushmodule) (lua_State *L, const char *modname, + int sizehint); +LUALIB_API void (luaL_openlib) (lua_State *L, const char *libname, + const luaL_Reg *l, int nup); + +#define luaL_register(L,n,l) (luaL_openlib(L,(n),(l),0)) + +#endif + + +#endif + + diff --git a/radio/src/lua/src/lbaselib.c b/radio/src/lua/src/lbaselib.c new file mode 100644 index 000000000..a9521e536 --- /dev/null +++ b/radio/src/lua/src/lbaselib.c @@ -0,0 +1,456 @@ +/* +** $Id: lbaselib.c,v 1.276 2013/02/21 13:44:53 roberto Exp $ +** Basic library +** See Copyright Notice in lua.h +*/ + + + +#include +#include +#include + +#define lbaselib_c + +#include "lua.h" + +#include "lauxlib.h" +#include "lualib.h" + + +static int luaB_print (lua_State *L) { + int n = lua_gettop(L); /* number of arguments */ + int i; + lua_getglobal(L, "tostring"); + for (i=1; i<=n; i++) { + const char *s; + size_t l; + lua_pushvalue(L, -1); /* function to be called */ + lua_pushvalue(L, i); /* value to print */ + lua_call(L, 1, 1); + s = lua_tolstring(L, -1, &l); /* get result */ + if (s == NULL) + return luaL_error(L, + LUA_QL("tostring") " must return a string to " LUA_QL("print")); + if (i>1) luai_writestring("\t", 1); + luai_writestring(s, l); + lua_pop(L, 1); /* pop result */ + } + luai_writeline(); + return 0; +} + + +#define SPACECHARS " \f\n\r\t\v" + +static int luaB_tonumber (lua_State *L) { + if (lua_isnoneornil(L, 2)) { /* standard conversion */ + int isnum; + lua_Number n = lua_tonumberx(L, 1, &isnum); + if (isnum) { + lua_pushnumber(L, n); + return 1; + } /* else not a number; must be something */ + luaL_checkany(L, 1); + } + else { + size_t l; + const char *s = luaL_checklstring(L, 1, &l); + const char *e = s + l; /* end point for 's' */ + int base = luaL_checkint(L, 2); + int neg = 0; + luaL_argcheck(L, 2 <= base && base <= 36, 2, "base out of range"); + s += strspn(s, SPACECHARS); /* skip initial spaces */ + if (*s == '-') { s++; neg = 1; } /* handle signal */ + else if (*s == '+') s++; + if (isalnum((unsigned char)*s)) { + lua_Number n = 0; + do { + int digit = (isdigit((unsigned char)*s)) ? *s - '0' + : toupper((unsigned char)*s) - 'A' + 10; + if (digit >= base) break; /* invalid numeral; force a fail */ + n = n * (lua_Number)base + (lua_Number)digit; + s++; + } while (isalnum((unsigned char)*s)); + s += strspn(s, SPACECHARS); /* skip trailing spaces */ + if (s == e) { /* no invalid trailing characters? */ + lua_pushnumber(L, (neg) ? -n : n); + return 1; + } /* else not a number */ + } /* else not a number */ + } + lua_pushnil(L); /* not a number */ + return 1; +} + + +static int luaB_error (lua_State *L) { + int level = luaL_optint(L, 2, 1); + lua_settop(L, 1); + if (lua_isstring(L, 1) && level > 0) { /* add extra information? */ + luaL_where(L, level); + lua_pushvalue(L, 1); + lua_concat(L, 2); + } + return lua_error(L); +} + + +static int luaB_getmetatable (lua_State *L) { + luaL_checkany(L, 1); + if (!lua_getmetatable(L, 1)) { + lua_pushnil(L); + return 1; /* no metatable */ + } + luaL_getmetafield(L, 1, "__metatable"); + return 1; /* returns either __metatable field (if present) or metatable */ +} + + +static int luaB_setmetatable (lua_State *L) { + int t = lua_type(L, 2); + luaL_checktype(L, 1, LUA_TTABLE); + luaL_argcheck(L, t == LUA_TNIL || t == LUA_TTABLE, 2, + "nil or table expected"); + if (luaL_getmetafield(L, 1, "__metatable")) + return luaL_error(L, "cannot change a protected metatable"); + lua_settop(L, 2); + lua_setmetatable(L, 1); + return 1; +} + + +static int luaB_rawequal (lua_State *L) { + luaL_checkany(L, 1); + luaL_checkany(L, 2); + lua_pushboolean(L, lua_rawequal(L, 1, 2)); + return 1; +} + + +static int luaB_rawlen (lua_State *L) { + int t = lua_type(L, 1); + luaL_argcheck(L, t == LUA_TTABLE || t == LUA_TSTRING, 1, + "table or string expected"); + lua_pushinteger(L, lua_rawlen(L, 1)); + return 1; +} + + +static int luaB_rawget (lua_State *L) { + luaL_checktype(L, 1, LUA_TTABLE); + luaL_checkany(L, 2); + lua_settop(L, 2); + lua_rawget(L, 1); + return 1; +} + +static int luaB_rawset (lua_State *L) { + luaL_checktype(L, 1, LUA_TTABLE); + luaL_checkany(L, 2); + luaL_checkany(L, 3); + lua_settop(L, 3); + lua_rawset(L, 1); + return 1; +} + + +static int luaB_collectgarbage (lua_State *L) { + static const char *const opts[] = {"stop", "restart", "collect", + "count", "step", "setpause", "setstepmul", + "setmajorinc", "isrunning", "generational", "incremental", NULL}; + static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT, + LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL, + LUA_GCSETMAJORINC, LUA_GCISRUNNING, LUA_GCGEN, LUA_GCINC}; + int o = optsnum[luaL_checkoption(L, 1, "collect", opts)]; + int ex = luaL_optint(L, 2, 0); + int res = lua_gc(L, o, ex); + switch (o) { + case LUA_GCCOUNT: { + int b = lua_gc(L, LUA_GCCOUNTB, 0); + lua_pushnumber(L, res + ((lua_Number)b/1024)); + lua_pushinteger(L, b); + return 2; + } + case LUA_GCSTEP: case LUA_GCISRUNNING: { + lua_pushboolean(L, res); + return 1; + } + default: { + lua_pushinteger(L, res); + return 1; + } + } +} + + +static int luaB_type (lua_State *L) { + luaL_checkany(L, 1); + lua_pushstring(L, luaL_typename(L, 1)); + return 1; +} + + +static int pairsmeta (lua_State *L, const char *method, int iszero, + lua_CFunction iter) { + if (!luaL_getmetafield(L, 1, method)) { /* no metamethod? */ + luaL_checktype(L, 1, LUA_TTABLE); /* argument must be a table */ + lua_pushcfunction(L, iter); /* will return generator, */ + lua_pushvalue(L, 1); /* state, */ + if (iszero) lua_pushinteger(L, 0); /* and initial value */ + else lua_pushnil(L); + } + else { + lua_pushvalue(L, 1); /* argument 'self' to metamethod */ + lua_call(L, 1, 3); /* get 3 values from metamethod */ + } + return 3; +} + + +static int luaB_next (lua_State *L) { + luaL_checktype(L, 1, LUA_TTABLE); + lua_settop(L, 2); /* create a 2nd argument if there isn't one */ + if (lua_next(L, 1)) + return 2; + else { + lua_pushnil(L); + return 1; + } +} + + +static int luaB_pairs (lua_State *L) { + return pairsmeta(L, "__pairs", 0, luaB_next); +} + + +static int ipairsaux (lua_State *L) { + int i = luaL_checkint(L, 2); + luaL_checktype(L, 1, LUA_TTABLE); + i++; /* next value */ + lua_pushinteger(L, i); + lua_rawgeti(L, 1, i); + return (lua_isnil(L, -1)) ? 1 : 2; +} + + +static int luaB_ipairs (lua_State *L) { + return pairsmeta(L, "__ipairs", 1, ipairsaux); +} + + +static int load_aux (lua_State *L, int status, int envidx) { + if (status == LUA_OK) { + if (envidx != 0) { /* 'env' parameter? */ + lua_pushvalue(L, envidx); /* environment for loaded function */ + if (!lua_setupvalue(L, -2, 1)) /* set it as 1st upvalue */ + lua_pop(L, 1); /* remove 'env' if not used by previous call */ + } + return 1; + } + else { /* error (message is on top of the stack) */ + lua_pushnil(L); + lua_insert(L, -2); /* put before error message */ + return 2; /* return nil plus error message */ + } +} + + +static int luaB_loadfile (lua_State *L) { + const char *fname = luaL_optstring(L, 1, NULL); + const char *mode = luaL_optstring(L, 2, NULL); + int env = (!lua_isnone(L, 3) ? 3 : 0); /* 'env' index or 0 if no 'env' */ + int status = luaL_loadfilex(L, fname, mode); + return load_aux(L, status, env); +} + + +/* +** {====================================================== +** Generic Read function +** ======================================================= +*/ + + +/* +** reserved slot, above all arguments, to hold a copy of the returned +** string to avoid it being collected while parsed. 'load' has four +** optional arguments (chunk, source name, mode, and environment). +*/ +#define RESERVEDSLOT 5 + + +/* +** Reader for generic `load' function: `lua_load' uses the +** stack for internal stuff, so the reader cannot change the +** stack top. Instead, it keeps its resulting string in a +** reserved slot inside the stack. +*/ +static const char *generic_reader (lua_State *L, void *ud, size_t *size) { + (void)(ud); /* not used */ + luaL_checkstack(L, 2, "too many nested functions"); + lua_pushvalue(L, 1); /* get function */ + lua_call(L, 0, 1); /* call it */ + if (lua_isnil(L, -1)) { + lua_pop(L, 1); /* pop result */ + *size = 0; + return NULL; + } + else if (!lua_isstring(L, -1)) + luaL_error(L, "reader function must return a string"); + lua_replace(L, RESERVEDSLOT); /* save string in reserved slot */ + return lua_tolstring(L, RESERVEDSLOT, size); +} + + +static int luaB_load (lua_State *L) { + int status; + size_t l; + const char *s = lua_tolstring(L, 1, &l); + const char *mode = luaL_optstring(L, 3, "bt"); + int env = (!lua_isnone(L, 4) ? 4 : 0); /* 'env' index or 0 if no 'env' */ + if (s != NULL) { /* loading a string? */ + const char *chunkname = luaL_optstring(L, 2, s); + status = luaL_loadbufferx(L, s, l, chunkname, mode); + } + else { /* loading from a reader function */ + const char *chunkname = luaL_optstring(L, 2, "=(load)"); + luaL_checktype(L, 1, LUA_TFUNCTION); + lua_settop(L, RESERVEDSLOT); /* create reserved slot */ + status = lua_load(L, generic_reader, NULL, chunkname, mode); + } + return load_aux(L, status, env); +} + +/* }====================================================== */ + + +static int dofilecont (lua_State *L) { + return lua_gettop(L) - 1; +} + + +static int luaB_dofile (lua_State *L) { + const char *fname = luaL_optstring(L, 1, NULL); + lua_settop(L, 1); + if (luaL_loadfile(L, fname) != LUA_OK) + return lua_error(L); + lua_callk(L, 0, LUA_MULTRET, 0, dofilecont); + return dofilecont(L); +} + + +static int luaB_assert (lua_State *L) { + if (!lua_toboolean(L, 1)) + return luaL_error(L, "%s", luaL_optstring(L, 2, "assertion failed!")); + return lua_gettop(L); +} + + +static int luaB_select (lua_State *L) { + int n = lua_gettop(L); + if (lua_type(L, 1) == LUA_TSTRING && *lua_tostring(L, 1) == '#') { + lua_pushinteger(L, n-1); + return 1; + } + else { + int i = luaL_checkint(L, 1); + if (i < 0) i = n + i; + else if (i > n) i = n; + luaL_argcheck(L, 1 <= i, 1, "index out of range"); + return n - i; + } +} + + +static int finishpcall (lua_State *L, int status) { + if (!lua_checkstack(L, 1)) { /* no space for extra boolean? */ + lua_settop(L, 0); /* create space for return values */ + lua_pushboolean(L, 0); + lua_pushstring(L, "stack overflow"); + return 2; /* return false, msg */ + } + lua_pushboolean(L, status); /* first result (status) */ + lua_replace(L, 1); /* put first result in first slot */ + return lua_gettop(L); +} + + +static int pcallcont (lua_State *L) { + int status = lua_getctx(L, NULL); + return finishpcall(L, (status == LUA_YIELD)); +} + + +static int luaB_pcall (lua_State *L) { + int status; + luaL_checkany(L, 1); + lua_pushnil(L); + lua_insert(L, 1); /* create space for status result */ + status = lua_pcallk(L, lua_gettop(L) - 2, LUA_MULTRET, 0, 0, pcallcont); + return finishpcall(L, (status == LUA_OK)); +} + + +static int luaB_xpcall (lua_State *L) { + int status; + int n = lua_gettop(L); + luaL_argcheck(L, n >= 2, 2, "value expected"); + lua_pushvalue(L, 1); /* exchange function... */ + lua_copy(L, 2, 1); /* ...and error handler */ + lua_replace(L, 2); + status = lua_pcallk(L, n - 2, LUA_MULTRET, 1, 0, pcallcont); + return finishpcall(L, (status == LUA_OK)); +} + + +static int luaB_tostring (lua_State *L) { + luaL_checkany(L, 1); + luaL_tolstring(L, 1, NULL); + return 1; +} + + +static const luaL_Reg base_funcs[] = { + {"assert", luaB_assert}, + {"collectgarbage", luaB_collectgarbage}, + {"dofile", luaB_dofile}, + {"error", luaB_error}, + {"getmetatable", luaB_getmetatable}, + {"ipairs", luaB_ipairs}, + {"loadfile", luaB_loadfile}, + {"load", luaB_load}, +#if defined(LUA_COMPAT_LOADSTRING) + {"loadstring", luaB_load}, +#endif + {"next", luaB_next}, + {"pairs", luaB_pairs}, + {"pcall", luaB_pcall}, + {"print", luaB_print}, + {"rawequal", luaB_rawequal}, + {"rawlen", luaB_rawlen}, + {"rawget", luaB_rawget}, + {"rawset", luaB_rawset}, + {"select", luaB_select}, + {"setmetatable", luaB_setmetatable}, + {"tonumber", luaB_tonumber}, + {"tostring", luaB_tostring}, + {"type", luaB_type}, + {"xpcall", luaB_xpcall}, + {NULL, NULL} +}; + + +LUAMOD_API int luaopen_base (lua_State *L) { + /* set global _G */ + lua_pushglobaltable(L); + lua_pushglobaltable(L); + lua_setfield(L, -2, "_G"); + /* open lib into global table */ + luaL_setfuncs(L, base_funcs, 0); + lua_pushliteral(L, LUA_VERSION); + lua_setfield(L, -2, "_VERSION"); /* set global _VERSION */ + return 1; +} + diff --git a/radio/src/lua/src/lbitlib.c b/radio/src/lua/src/lbitlib.c new file mode 100644 index 000000000..5910f135d --- /dev/null +++ b/radio/src/lua/src/lbitlib.c @@ -0,0 +1,210 @@ +/* +** $Id: lbitlib.c,v 1.18 2013/03/19 13:19:12 roberto Exp $ +** Standard library for bitwise operations +** See Copyright Notice in lua.h +*/ + +#define lbitlib_c + +#include "lua.h" + +#include "lauxlib.h" +#include "lualib.h" + + +/* number of bits to consider in a number */ +#if !defined(LUA_NBITS) +#define LUA_NBITS 32 +#endif + + +#define ALLONES (~(((~(lua_Unsigned)0) << (LUA_NBITS - 1)) << 1)) + +/* macro to trim extra bits */ +#define trim(x) ((x) & ALLONES) + + +/* builds a number with 'n' ones (1 <= n <= LUA_NBITS) */ +#define mask(n) (~((ALLONES << 1) << ((n) - 1))) + + +typedef lua_Unsigned b_uint; + + + +static b_uint andaux (lua_State *L) { + int i, n = lua_gettop(L); + b_uint r = ~(b_uint)0; + for (i = 1; i <= n; i++) + r &= luaL_checkunsigned(L, i); + return trim(r); +} + + +static int b_and (lua_State *L) { + b_uint r = andaux(L); + lua_pushunsigned(L, r); + return 1; +} + + +static int b_test (lua_State *L) { + b_uint r = andaux(L); + lua_pushboolean(L, r != 0); + return 1; +} + + +static int b_or (lua_State *L) { + int i, n = lua_gettop(L); + b_uint r = 0; + for (i = 1; i <= n; i++) + r |= luaL_checkunsigned(L, i); + lua_pushunsigned(L, trim(r)); + return 1; +} + + +static int b_xor (lua_State *L) { + int i, n = lua_gettop(L); + b_uint r = 0; + for (i = 1; i <= n; i++) + r ^= luaL_checkunsigned(L, i); + lua_pushunsigned(L, trim(r)); + return 1; +} + + +static int b_not (lua_State *L) { + b_uint r = ~luaL_checkunsigned(L, 1); + lua_pushunsigned(L, trim(r)); + return 1; +} + + +static int b_shift (lua_State *L, b_uint r, int i) { + if (i < 0) { /* shift right? */ + i = -i; + r = trim(r); + if (i >= LUA_NBITS) r = 0; + else r >>= i; + } + else { /* shift left */ + if (i >= LUA_NBITS) r = 0; + else r <<= i; + r = trim(r); + } + lua_pushunsigned(L, r); + return 1; +} + + +static int b_lshift (lua_State *L) { + return b_shift(L, luaL_checkunsigned(L, 1), luaL_checkint(L, 2)); +} + + +static int b_rshift (lua_State *L) { + return b_shift(L, luaL_checkunsigned(L, 1), -luaL_checkint(L, 2)); +} + + +static int b_arshift (lua_State *L) { + b_uint r = luaL_checkunsigned(L, 1); + int i = luaL_checkint(L, 2); + if (i < 0 || !(r & ((b_uint)1 << (LUA_NBITS - 1)))) + return b_shift(L, r, -i); + else { /* arithmetic shift for 'negative' number */ + if (i >= LUA_NBITS) r = ALLONES; + else + r = trim((r >> i) | ~(~(b_uint)0 >> i)); /* add signal bit */ + lua_pushunsigned(L, r); + return 1; + } +} + + +static int b_rot (lua_State *L, int i) { + b_uint r = luaL_checkunsigned(L, 1); + i &= (LUA_NBITS - 1); /* i = i % NBITS */ + r = trim(r); + r = (r << i) | (r >> (LUA_NBITS - i)); + lua_pushunsigned(L, trim(r)); + return 1; +} + + +static int b_lrot (lua_State *L) { + return b_rot(L, luaL_checkint(L, 2)); +} + + +static int b_rrot (lua_State *L) { + return b_rot(L, -luaL_checkint(L, 2)); +} + + +/* +** get field and width arguments for field-manipulation functions, +** checking whether they are valid. +** ('luaL_error' called without 'return' to avoid later warnings about +** 'width' being used uninitialized.) +*/ +static int fieldargs (lua_State *L, int farg, int *width) { + int f = luaL_checkint(L, farg); + int w = luaL_optint(L, farg + 1, 1); + luaL_argcheck(L, 0 <= f, farg, "field cannot be negative"); + luaL_argcheck(L, 0 < w, farg + 1, "width must be positive"); + if (f + w > LUA_NBITS) + luaL_error(L, "trying to access non-existent bits"); + *width = w; + return f; +} + + +static int b_extract (lua_State *L) { + int w; + b_uint r = luaL_checkunsigned(L, 1); + int f = fieldargs(L, 2, &w); + r = (r >> f) & mask(w); + lua_pushunsigned(L, r); + return 1; +} + + +static int b_replace (lua_State *L) { + int w; + b_uint r = luaL_checkunsigned(L, 1); + b_uint v = luaL_checkunsigned(L, 2); + int f = fieldargs(L, 3, &w); + int m = mask(w); + v &= m; /* erase bits outside given width */ + r = (r & ~(m << f)) | (v << f); + lua_pushunsigned(L, r); + return 1; +} + + +static const luaL_Reg bitlib[] = { + {"arshift", b_arshift}, + {"band", b_and}, + {"bnot", b_not}, + {"bor", b_or}, + {"bxor", b_xor}, + {"btest", b_test}, + {"extract", b_extract}, + {"lrotate", b_lrot}, + {"lshift", b_lshift}, + {"replace", b_replace}, + {"rrotate", b_rrot}, + {"rshift", b_rshift}, + {NULL, NULL} +}; + + + +LUAMOD_API int luaopen_bit32 (lua_State *L) { + luaL_newlib(L, bitlib); + return 1; +} + diff --git a/radio/src/lua/src/lcode.c b/radio/src/lua/src/lcode.c new file mode 100644 index 000000000..56c26ac8a --- /dev/null +++ b/radio/src/lua/src/lcode.c @@ -0,0 +1,881 @@ +/* +** $Id: lcode.c,v 2.62 2012/08/16 17:34:28 roberto Exp $ +** Code generator for Lua +** See Copyright Notice in lua.h +*/ + + +#include + +#define lcode_c +#define LUA_CORE + +#include "lua.h" + +#include "lcode.h" +#include "ldebug.h" +#include "ldo.h" +#include "lgc.h" +#include "llex.h" +#include "lmem.h" +#include "lobject.h" +#include "lopcodes.h" +#include "lparser.h" +#include "lstring.h" +#include "ltable.h" +#include "lvm.h" + + +#define hasjumps(e) ((e)->t != (e)->f) + + +static int isnumeral(expdesc *e) { + return (e->k == VKNUM && e->t == NO_JUMP && e->f == NO_JUMP); +} + + +void luaK_nil (FuncState *fs, int from, int n) { + Instruction *previous; + int l = from + n - 1; /* last register to set nil */ + if (fs->pc > fs->lasttarget) { /* no jumps to current position? */ + previous = &fs->f->code[fs->pc-1]; + if (GET_OPCODE(*previous) == OP_LOADNIL) { + int pfrom = GETARG_A(*previous); + int pl = pfrom + GETARG_B(*previous); + if ((pfrom <= from && from <= pl + 1) || + (from <= pfrom && pfrom <= l + 1)) { /* can connect both? */ + if (pfrom < from) from = pfrom; /* from = min(from, pfrom) */ + if (pl > l) l = pl; /* l = max(l, pl) */ + SETARG_A(*previous, from); + SETARG_B(*previous, l - from); + return; + } + } /* else go through */ + } + luaK_codeABC(fs, OP_LOADNIL, from, n - 1, 0); /* else no optimization */ +} + + +int luaK_jump (FuncState *fs) { + int jpc = fs->jpc; /* save list of jumps to here */ + int j; + fs->jpc = NO_JUMP; + j = luaK_codeAsBx(fs, OP_JMP, 0, NO_JUMP); + luaK_concat(fs, &j, jpc); /* keep them on hold */ + return j; +} + + +void luaK_ret (FuncState *fs, int first, int nret) { + luaK_codeABC(fs, OP_RETURN, first, nret+1, 0); +} + + +static int condjump (FuncState *fs, OpCode op, int A, int B, int C) { + luaK_codeABC(fs, op, A, B, C); + return luaK_jump(fs); +} + + +static void fixjump (FuncState *fs, int pc, int dest) { + Instruction *jmp = &fs->f->code[pc]; + int offset = dest-(pc+1); + lua_assert(dest != NO_JUMP); + if (abs(offset) > MAXARG_sBx) + luaX_syntaxerror(fs->ls, "control structure too long"); + SETARG_sBx(*jmp, offset); +} + + +/* +** returns current `pc' and marks it as a jump target (to avoid wrong +** optimizations with consecutive instructions not in the same basic block). +*/ +int luaK_getlabel (FuncState *fs) { + fs->lasttarget = fs->pc; + return fs->pc; +} + + +static int getjump (FuncState *fs, int pc) { + int offset = GETARG_sBx(fs->f->code[pc]); + if (offset == NO_JUMP) /* point to itself represents end of list */ + return NO_JUMP; /* end of list */ + else + return (pc+1)+offset; /* turn offset into absolute position */ +} + + +static Instruction *getjumpcontrol (FuncState *fs, int pc) { + Instruction *pi = &fs->f->code[pc]; + if (pc >= 1 && testTMode(GET_OPCODE(*(pi-1)))) + return pi-1; + else + return pi; +} + + +/* +** check whether list has any jump that do not produce a value +** (or produce an inverted value) +*/ +static int need_value (FuncState *fs, int list) { + for (; list != NO_JUMP; list = getjump(fs, list)) { + Instruction i = *getjumpcontrol(fs, list); + if (GET_OPCODE(i) != OP_TESTSET) return 1; + } + return 0; /* not found */ +} + + +static int patchtestreg (FuncState *fs, int node, int reg) { + Instruction *i = getjumpcontrol(fs, node); + if (GET_OPCODE(*i) != OP_TESTSET) + return 0; /* cannot patch other instructions */ + if (reg != NO_REG && reg != GETARG_B(*i)) + SETARG_A(*i, reg); + else /* no register to put value or register already has the value */ + *i = CREATE_ABC(OP_TEST, GETARG_B(*i), 0, GETARG_C(*i)); + + return 1; +} + + +static void removevalues (FuncState *fs, int list) { + for (; list != NO_JUMP; list = getjump(fs, list)) + patchtestreg(fs, list, NO_REG); +} + + +static void patchlistaux (FuncState *fs, int list, int vtarget, int reg, + int dtarget) { + while (list != NO_JUMP) { + int next = getjump(fs, list); + if (patchtestreg(fs, list, reg)) + fixjump(fs, list, vtarget); + else + fixjump(fs, list, dtarget); /* jump to default target */ + list = next; + } +} + + +static void dischargejpc (FuncState *fs) { + patchlistaux(fs, fs->jpc, fs->pc, NO_REG, fs->pc); + fs->jpc = NO_JUMP; +} + + +void luaK_patchlist (FuncState *fs, int list, int target) { + if (target == fs->pc) + luaK_patchtohere(fs, list); + else { + lua_assert(target < fs->pc); + patchlistaux(fs, list, target, NO_REG, target); + } +} + + +LUAI_FUNC void luaK_patchclose (FuncState *fs, int list, int level) { + level++; /* argument is +1 to reserve 0 as non-op */ + while (list != NO_JUMP) { + int next = getjump(fs, list); + lua_assert(GET_OPCODE(fs->f->code[list]) == OP_JMP && + (GETARG_A(fs->f->code[list]) == 0 || + GETARG_A(fs->f->code[list]) >= level)); + SETARG_A(fs->f->code[list], level); + list = next; + } +} + + +void luaK_patchtohere (FuncState *fs, int list) { + luaK_getlabel(fs); + luaK_concat(fs, &fs->jpc, list); +} + + +void luaK_concat (FuncState *fs, int *l1, int l2) { + if (l2 == NO_JUMP) return; + else if (*l1 == NO_JUMP) + *l1 = l2; + else { + int list = *l1; + int next; + while ((next = getjump(fs, list)) != NO_JUMP) /* find last element */ + list = next; + fixjump(fs, list, l2); + } +} + + +static int luaK_code (FuncState *fs, Instruction i) { + Proto *f = fs->f; + dischargejpc(fs); /* `pc' will change */ + /* put new instruction in code array */ + luaM_growvector(fs->ls->L, f->code, fs->pc, f->sizecode, Instruction, + MAX_INT, "opcodes"); + f->code[fs->pc] = i; + /* save corresponding line information */ + luaM_growvector(fs->ls->L, f->lineinfo, fs->pc, f->sizelineinfo, int, + MAX_INT, "opcodes"); + f->lineinfo[fs->pc] = fs->ls->lastline; + return fs->pc++; +} + + +int luaK_codeABC (FuncState *fs, OpCode o, int a, int b, int c) { + lua_assert(getOpMode(o) == iABC); + lua_assert(getBMode(o) != OpArgN || b == 0); + lua_assert(getCMode(o) != OpArgN || c == 0); + lua_assert(a <= MAXARG_A && b <= MAXARG_B && c <= MAXARG_C); + return luaK_code(fs, CREATE_ABC(o, a, b, c)); +} + + +int luaK_codeABx (FuncState *fs, OpCode o, int a, unsigned int bc) { + lua_assert(getOpMode(o) == iABx || getOpMode(o) == iAsBx); + lua_assert(getCMode(o) == OpArgN); + lua_assert(a <= MAXARG_A && bc <= MAXARG_Bx); + return luaK_code(fs, CREATE_ABx(o, a, bc)); +} + + +static int codeextraarg (FuncState *fs, int a) { + lua_assert(a <= MAXARG_Ax); + return luaK_code(fs, CREATE_Ax(OP_EXTRAARG, a)); +} + + +int luaK_codek (FuncState *fs, int reg, int k) { + if (k <= MAXARG_Bx) + return luaK_codeABx(fs, OP_LOADK, reg, k); + else { + int p = luaK_codeABx(fs, OP_LOADKX, reg, 0); + codeextraarg(fs, k); + return p; + } +} + + +void luaK_checkstack (FuncState *fs, int n) { + int newstack = fs->freereg + n; + if (newstack > fs->f->maxstacksize) { + if (newstack >= MAXSTACK) + luaX_syntaxerror(fs->ls, "function or expression too complex"); + fs->f->maxstacksize = cast_byte(newstack); + } +} + + +void luaK_reserveregs (FuncState *fs, int n) { + luaK_checkstack(fs, n); + fs->freereg += n; +} + + +static void freereg (FuncState *fs, int reg) { + if (!ISK(reg) && reg >= fs->nactvar) { + fs->freereg--; + lua_assert(reg == fs->freereg); + } +} + + +static void freeexp (FuncState *fs, expdesc *e) { + if (e->k == VNONRELOC) + freereg(fs, e->u.info); +} + + +static int addk (FuncState *fs, TValue *key, TValue *v) { + lua_State *L = fs->ls->L; + TValue *idx = luaH_set(L, fs->h, key); + Proto *f = fs->f; + int k, oldsize; + if (ttisnumber(idx)) { + lua_Number n = nvalue(idx); + lua_number2int(k, n); + if (luaV_rawequalobj(&f->k[k], v)) + return k; + /* else may be a collision (e.g., between 0.0 and "\0\0\0\0\0\0\0\0"); + go through and create a new entry for this value */ + } + /* constant not found; create a new entry */ + oldsize = f->sizek; + k = fs->nk; + /* numerical value does not need GC barrier; + table has no metatable, so it does not need to invalidate cache */ + setnvalue(idx, cast_num(k)); + luaM_growvector(L, f->k, k, f->sizek, TValue, MAXARG_Ax, "constants"); + while (oldsize < f->sizek) setnilvalue(&f->k[oldsize++]); + setobj(L, &f->k[k], v); + fs->nk++; + luaC_barrier(L, f, v); + return k; +} + + +int luaK_stringK (FuncState *fs, TString *s) { + TValue o; + setsvalue(fs->ls->L, &o, s); + return addk(fs, &o, &o); +} + + +int luaK_numberK (FuncState *fs, lua_Number r) { + int n; + lua_State *L = fs->ls->L; + TValue o; + setnvalue(&o, r); + if (r == 0 || luai_numisnan(NULL, r)) { /* handle -0 and NaN */ + /* use raw representation as key to avoid numeric problems */ + setsvalue(L, L->top++, luaS_newlstr(L, (char *)&r, sizeof(r))); + n = addk(fs, L->top - 1, &o); + L->top--; + } + else + n = addk(fs, &o, &o); /* regular case */ + return n; +} + + +static int boolK (FuncState *fs, int b) { + TValue o; + setbvalue(&o, b); + return addk(fs, &o, &o); +} + + +static int nilK (FuncState *fs) { + TValue k, v; + setnilvalue(&v); + /* cannot use nil as key; instead use table itself to represent nil */ + sethvalue(fs->ls->L, &k, fs->h); + return addk(fs, &k, &v); +} + + +void luaK_setreturns (FuncState *fs, expdesc *e, int nresults) { + if (e->k == VCALL) { /* expression is an open function call? */ + SETARG_C(getcode(fs, e), nresults+1); + } + else if (e->k == VVARARG) { + SETARG_B(getcode(fs, e), nresults+1); + SETARG_A(getcode(fs, e), fs->freereg); + luaK_reserveregs(fs, 1); + } +} + + +void luaK_setoneret (FuncState *fs, expdesc *e) { + if (e->k == VCALL) { /* expression is an open function call? */ + e->k = VNONRELOC; + e->u.info = GETARG_A(getcode(fs, e)); + } + else if (e->k == VVARARG) { + SETARG_B(getcode(fs, e), 2); + e->k = VRELOCABLE; /* can relocate its simple result */ + } +} + + +void luaK_dischargevars (FuncState *fs, expdesc *e) { + switch (e->k) { + case VLOCAL: { + e->k = VNONRELOC; + break; + } + case VUPVAL: { + e->u.info = luaK_codeABC(fs, OP_GETUPVAL, 0, e->u.info, 0); + e->k = VRELOCABLE; + break; + } + case VINDEXED: { + OpCode op = OP_GETTABUP; /* assume 't' is in an upvalue */ + freereg(fs, e->u.ind.idx); + if (e->u.ind.vt == VLOCAL) { /* 't' is in a register? */ + freereg(fs, e->u.ind.t); + op = OP_GETTABLE; + } + e->u.info = luaK_codeABC(fs, op, 0, e->u.ind.t, e->u.ind.idx); + e->k = VRELOCABLE; + break; + } + case VVARARG: + case VCALL: { + luaK_setoneret(fs, e); + break; + } + default: break; /* there is one value available (somewhere) */ + } +} + + +static int code_label (FuncState *fs, int A, int b, int jump) { + luaK_getlabel(fs); /* those instructions may be jump targets */ + return luaK_codeABC(fs, OP_LOADBOOL, A, b, jump); +} + + +static void discharge2reg (FuncState *fs, expdesc *e, int reg) { + luaK_dischargevars(fs, e); + switch (e->k) { + case VNIL: { + luaK_nil(fs, reg, 1); + break; + } + case VFALSE: case VTRUE: { + luaK_codeABC(fs, OP_LOADBOOL, reg, e->k == VTRUE, 0); + break; + } + case VK: { + luaK_codek(fs, reg, e->u.info); + break; + } + case VKNUM: { + luaK_codek(fs, reg, luaK_numberK(fs, e->u.nval)); + break; + } + case VRELOCABLE: { + Instruction *pc = &getcode(fs, e); + SETARG_A(*pc, reg); + break; + } + case VNONRELOC: { + if (reg != e->u.info) + luaK_codeABC(fs, OP_MOVE, reg, e->u.info, 0); + break; + } + default: { + lua_assert(e->k == VVOID || e->k == VJMP); + return; /* nothing to do... */ + } + } + e->u.info = reg; + e->k = VNONRELOC; +} + + +static void discharge2anyreg (FuncState *fs, expdesc *e) { + if (e->k != VNONRELOC) { + luaK_reserveregs(fs, 1); + discharge2reg(fs, e, fs->freereg-1); + } +} + + +static void exp2reg (FuncState *fs, expdesc *e, int reg) { + discharge2reg(fs, e, reg); + if (e->k == VJMP) + luaK_concat(fs, &e->t, e->u.info); /* put this jump in `t' list */ + if (hasjumps(e)) { + int final; /* position after whole expression */ + int p_f = NO_JUMP; /* position of an eventual LOAD false */ + int p_t = NO_JUMP; /* position of an eventual LOAD true */ + if (need_value(fs, e->t) || need_value(fs, e->f)) { + int fj = (e->k == VJMP) ? NO_JUMP : luaK_jump(fs); + p_f = code_label(fs, reg, 0, 1); + p_t = code_label(fs, reg, 1, 0); + luaK_patchtohere(fs, fj); + } + final = luaK_getlabel(fs); + patchlistaux(fs, e->f, final, reg, p_f); + patchlistaux(fs, e->t, final, reg, p_t); + } + e->f = e->t = NO_JUMP; + e->u.info = reg; + e->k = VNONRELOC; +} + + +void luaK_exp2nextreg (FuncState *fs, expdesc *e) { + luaK_dischargevars(fs, e); + freeexp(fs, e); + luaK_reserveregs(fs, 1); + exp2reg(fs, e, fs->freereg - 1); +} + + +int luaK_exp2anyreg (FuncState *fs, expdesc *e) { + luaK_dischargevars(fs, e); + if (e->k == VNONRELOC) { + if (!hasjumps(e)) return e->u.info; /* exp is already in a register */ + if (e->u.info >= fs->nactvar) { /* reg. is not a local? */ + exp2reg(fs, e, e->u.info); /* put value on it */ + return e->u.info; + } + } + luaK_exp2nextreg(fs, e); /* default */ + return e->u.info; +} + + +void luaK_exp2anyregup (FuncState *fs, expdesc *e) { + if (e->k != VUPVAL || hasjumps(e)) + luaK_exp2anyreg(fs, e); +} + + +void luaK_exp2val (FuncState *fs, expdesc *e) { + if (hasjumps(e)) + luaK_exp2anyreg(fs, e); + else + luaK_dischargevars(fs, e); +} + + +int luaK_exp2RK (FuncState *fs, expdesc *e) { + luaK_exp2val(fs, e); + switch (e->k) { + case VTRUE: + case VFALSE: + case VNIL: { + if (fs->nk <= MAXINDEXRK) { /* constant fits in RK operand? */ + e->u.info = (e->k == VNIL) ? nilK(fs) : boolK(fs, (e->k == VTRUE)); + e->k = VK; + return RKASK(e->u.info); + } + else break; + } + case VKNUM: { + e->u.info = luaK_numberK(fs, e->u.nval); + e->k = VK; + /* go through */ + } + case VK: { + if (e->u.info <= MAXINDEXRK) /* constant fits in argC? */ + return RKASK(e->u.info); + else break; + } + default: break; + } + /* not a constant in the right range: put it in a register */ + return luaK_exp2anyreg(fs, e); +} + + +void luaK_storevar (FuncState *fs, expdesc *var, expdesc *ex) { + switch (var->k) { + case VLOCAL: { + freeexp(fs, ex); + exp2reg(fs, ex, var->u.info); + return; + } + case VUPVAL: { + int e = luaK_exp2anyreg(fs, ex); + luaK_codeABC(fs, OP_SETUPVAL, e, var->u.info, 0); + break; + } + case VINDEXED: { + OpCode op = (var->u.ind.vt == VLOCAL) ? OP_SETTABLE : OP_SETTABUP; + int e = luaK_exp2RK(fs, ex); + luaK_codeABC(fs, op, var->u.ind.t, var->u.ind.idx, e); + break; + } + default: { + lua_assert(0); /* invalid var kind to store */ + break; + } + } + freeexp(fs, ex); +} + + +void luaK_self (FuncState *fs, expdesc *e, expdesc *key) { + int ereg; + luaK_exp2anyreg(fs, e); + ereg = e->u.info; /* register where 'e' was placed */ + freeexp(fs, e); + e->u.info = fs->freereg; /* base register for op_self */ + e->k = VNONRELOC; + luaK_reserveregs(fs, 2); /* function and 'self' produced by op_self */ + luaK_codeABC(fs, OP_SELF, e->u.info, ereg, luaK_exp2RK(fs, key)); + freeexp(fs, key); +} + + +static void invertjump (FuncState *fs, expdesc *e) { + Instruction *pc = getjumpcontrol(fs, e->u.info); + lua_assert(testTMode(GET_OPCODE(*pc)) && GET_OPCODE(*pc) != OP_TESTSET && + GET_OPCODE(*pc) != OP_TEST); + SETARG_A(*pc, !(GETARG_A(*pc))); +} + + +static int jumponcond (FuncState *fs, expdesc *e, int cond) { + if (e->k == VRELOCABLE) { + Instruction ie = getcode(fs, e); + if (GET_OPCODE(ie) == OP_NOT) { + fs->pc--; /* remove previous OP_NOT */ + return condjump(fs, OP_TEST, GETARG_B(ie), 0, !cond); + } + /* else go through */ + } + discharge2anyreg(fs, e); + freeexp(fs, e); + return condjump(fs, OP_TESTSET, NO_REG, e->u.info, cond); +} + + +void luaK_goiftrue (FuncState *fs, expdesc *e) { + int pc; /* pc of last jump */ + luaK_dischargevars(fs, e); + switch (e->k) { + case VJMP: { + invertjump(fs, e); + pc = e->u.info; + break; + } + case VK: case VKNUM: case VTRUE: { + pc = NO_JUMP; /* always true; do nothing */ + break; + } + default: { + pc = jumponcond(fs, e, 0); + break; + } + } + luaK_concat(fs, &e->f, pc); /* insert last jump in `f' list */ + luaK_patchtohere(fs, e->t); + e->t = NO_JUMP; +} + + +void luaK_goiffalse (FuncState *fs, expdesc *e) { + int pc; /* pc of last jump */ + luaK_dischargevars(fs, e); + switch (e->k) { + case VJMP: { + pc = e->u.info; + break; + } + case VNIL: case VFALSE: { + pc = NO_JUMP; /* always false; do nothing */ + break; + } + default: { + pc = jumponcond(fs, e, 1); + break; + } + } + luaK_concat(fs, &e->t, pc); /* insert last jump in `t' list */ + luaK_patchtohere(fs, e->f); + e->f = NO_JUMP; +} + + +static void codenot (FuncState *fs, expdesc *e) { + luaK_dischargevars(fs, e); + switch (e->k) { + case VNIL: case VFALSE: { + e->k = VTRUE; + break; + } + case VK: case VKNUM: case VTRUE: { + e->k = VFALSE; + break; + } + case VJMP: { + invertjump(fs, e); + break; + } + case VRELOCABLE: + case VNONRELOC: { + discharge2anyreg(fs, e); + freeexp(fs, e); + e->u.info = luaK_codeABC(fs, OP_NOT, 0, e->u.info, 0); + e->k = VRELOCABLE; + break; + } + default: { + lua_assert(0); /* cannot happen */ + break; + } + } + /* interchange true and false lists */ + { int temp = e->f; e->f = e->t; e->t = temp; } + removevalues(fs, e->f); + removevalues(fs, e->t); +} + + +void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) { + lua_assert(!hasjumps(t)); + t->u.ind.t = t->u.info; + t->u.ind.idx = luaK_exp2RK(fs, k); + t->u.ind.vt = (t->k == VUPVAL) ? VUPVAL + : check_exp(vkisinreg(t->k), VLOCAL); + t->k = VINDEXED; +} + + +static int constfolding (OpCode op, expdesc *e1, expdesc *e2) { + lua_Number r; + if (!isnumeral(e1) || !isnumeral(e2)) return 0; + if ((op == OP_DIV || op == OP_MOD) && e2->u.nval == 0) + return 0; /* do not attempt to divide by 0 */ + r = luaO_arith(op - OP_ADD + LUA_OPADD, e1->u.nval, e2->u.nval); + e1->u.nval = r; + return 1; +} + + +static void codearith (FuncState *fs, OpCode op, + expdesc *e1, expdesc *e2, int line) { + if (constfolding(op, e1, e2)) + return; + else { + int o2 = (op != OP_UNM && op != OP_LEN) ? luaK_exp2RK(fs, e2) : 0; + int o1 = luaK_exp2RK(fs, e1); + if (o1 > o2) { + freeexp(fs, e1); + freeexp(fs, e2); + } + else { + freeexp(fs, e2); + freeexp(fs, e1); + } + e1->u.info = luaK_codeABC(fs, op, 0, o1, o2); + e1->k = VRELOCABLE; + luaK_fixline(fs, line); + } +} + + +static void codecomp (FuncState *fs, OpCode op, int cond, expdesc *e1, + expdesc *e2) { + int o1 = luaK_exp2RK(fs, e1); + int o2 = luaK_exp2RK(fs, e2); + freeexp(fs, e2); + freeexp(fs, e1); + if (cond == 0 && op != OP_EQ) { + int temp; /* exchange args to replace by `<' or `<=' */ + temp = o1; o1 = o2; o2 = temp; /* o1 <==> o2 */ + cond = 1; + } + e1->u.info = condjump(fs, op, cond, o1, o2); + e1->k = VJMP; +} + + +void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e, int line) { + expdesc e2; + e2.t = e2.f = NO_JUMP; e2.k = VKNUM; e2.u.nval = 0; + switch (op) { + case OPR_MINUS: { + if (isnumeral(e)) /* minus constant? */ + e->u.nval = luai_numunm(NULL, e->u.nval); /* fold it */ + else { + luaK_exp2anyreg(fs, e); + codearith(fs, OP_UNM, e, &e2, line); + } + break; + } + case OPR_NOT: codenot(fs, e); break; + case OPR_LEN: { + luaK_exp2anyreg(fs, e); /* cannot operate on constants */ + codearith(fs, OP_LEN, e, &e2, line); + break; + } + default: lua_assert(0); + } +} + + +void luaK_infix (FuncState *fs, BinOpr op, expdesc *v) { + switch (op) { + case OPR_AND: { + luaK_goiftrue(fs, v); + break; + } + case OPR_OR: { + luaK_goiffalse(fs, v); + break; + } + case OPR_CONCAT: { + luaK_exp2nextreg(fs, v); /* operand must be on the `stack' */ + break; + } + case OPR_ADD: case OPR_SUB: case OPR_MUL: case OPR_DIV: + case OPR_MOD: case OPR_POW: { + if (!isnumeral(v)) luaK_exp2RK(fs, v); + break; + } + default: { + luaK_exp2RK(fs, v); + break; + } + } +} + + +void luaK_posfix (FuncState *fs, BinOpr op, + expdesc *e1, expdesc *e2, int line) { + switch (op) { + case OPR_AND: { + lua_assert(e1->t == NO_JUMP); /* list must be closed */ + luaK_dischargevars(fs, e2); + luaK_concat(fs, &e2->f, e1->f); + *e1 = *e2; + break; + } + case OPR_OR: { + lua_assert(e1->f == NO_JUMP); /* list must be closed */ + luaK_dischargevars(fs, e2); + luaK_concat(fs, &e2->t, e1->t); + *e1 = *e2; + break; + } + case OPR_CONCAT: { + luaK_exp2val(fs, e2); + if (e2->k == VRELOCABLE && GET_OPCODE(getcode(fs, e2)) == OP_CONCAT) { + lua_assert(e1->u.info == GETARG_B(getcode(fs, e2))-1); + freeexp(fs, e1); + SETARG_B(getcode(fs, e2), e1->u.info); + e1->k = VRELOCABLE; e1->u.info = e2->u.info; + } + else { + luaK_exp2nextreg(fs, e2); /* operand must be on the 'stack' */ + codearith(fs, OP_CONCAT, e1, e2, line); + } + break; + } + case OPR_ADD: case OPR_SUB: case OPR_MUL: case OPR_DIV: + case OPR_MOD: case OPR_POW: { + codearith(fs, cast(OpCode, op - OPR_ADD + OP_ADD), e1, e2, line); + break; + } + case OPR_EQ: case OPR_LT: case OPR_LE: { + codecomp(fs, cast(OpCode, op - OPR_EQ + OP_EQ), 1, e1, e2); + break; + } + case OPR_NE: case OPR_GT: case OPR_GE: { + codecomp(fs, cast(OpCode, op - OPR_NE + OP_EQ), 0, e1, e2); + break; + } + default: lua_assert(0); + } +} + + +void luaK_fixline (FuncState *fs, int line) { + fs->f->lineinfo[fs->pc - 1] = line; +} + + +void luaK_setlist (FuncState *fs, int base, int nelems, int tostore) { + int c = (nelems - 1)/LFIELDS_PER_FLUSH + 1; + int b = (tostore == LUA_MULTRET) ? 0 : tostore; + lua_assert(tostore != 0); + if (c <= MAXARG_C) + luaK_codeABC(fs, OP_SETLIST, base, b, c); + else if (c <= MAXARG_Ax) { + luaK_codeABC(fs, OP_SETLIST, base, b, 0); + codeextraarg(fs, c); + } + else + luaX_syntaxerror(fs->ls, "constructor too long"); + fs->freereg = base + 1; /* free registers with list values */ +} + diff --git a/radio/src/lua/src/lcode.h b/radio/src/lua/src/lcode.h new file mode 100644 index 000000000..5a1fa9fea --- /dev/null +++ b/radio/src/lua/src/lcode.h @@ -0,0 +1,83 @@ +/* +** $Id: lcode.h,v 1.58 2011/08/30 16:26:41 roberto Exp $ +** Code generator for Lua +** See Copyright Notice in lua.h +*/ + +#ifndef lcode_h +#define lcode_h + +#include "llex.h" +#include "lobject.h" +#include "lopcodes.h" +#include "lparser.h" + + +/* +** Marks the end of a patch list. It is an invalid value both as an absolute +** address, and as a list link (would link an element to itself). +*/ +#define NO_JUMP (-1) + + +/* +** grep "ORDER OPR" if you change these enums (ORDER OP) +*/ +typedef enum BinOpr { + OPR_ADD, OPR_SUB, OPR_MUL, OPR_DIV, OPR_MOD, OPR_POW, + OPR_CONCAT, + OPR_EQ, OPR_LT, OPR_LE, + OPR_NE, OPR_GT, OPR_GE, + OPR_AND, OPR_OR, + OPR_NOBINOPR +} BinOpr; + + +typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr; + + +#define getcode(fs,e) ((fs)->f->code[(e)->u.info]) + +#define luaK_codeAsBx(fs,o,A,sBx) luaK_codeABx(fs,o,A,(sBx)+MAXARG_sBx) + +#define luaK_setmultret(fs,e) luaK_setreturns(fs, e, LUA_MULTRET) + +#define luaK_jumpto(fs,t) luaK_patchlist(fs, luaK_jump(fs), t) + +LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx); +LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C); +LUAI_FUNC int luaK_codek (FuncState *fs, int reg, int k); +LUAI_FUNC void luaK_fixline (FuncState *fs, int line); +LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n); +LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n); +LUAI_FUNC void luaK_checkstack (FuncState *fs, int n); +LUAI_FUNC int luaK_stringK (FuncState *fs, TString *s); +LUAI_FUNC int luaK_numberK (FuncState *fs, lua_Number r); +LUAI_FUNC void luaK_dischargevars (FuncState *fs, expdesc *e); +LUAI_FUNC int luaK_exp2anyreg (FuncState *fs, expdesc *e); +LUAI_FUNC void luaK_exp2anyregup (FuncState *fs, expdesc *e); +LUAI_FUNC void luaK_exp2nextreg (FuncState *fs, expdesc *e); +LUAI_FUNC void luaK_exp2val (FuncState *fs, expdesc *e); +LUAI_FUNC int luaK_exp2RK (FuncState *fs, expdesc *e); +LUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key); +LUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k); +LUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e); +LUAI_FUNC void luaK_goiffalse (FuncState *fs, expdesc *e); +LUAI_FUNC void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e); +LUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults); +LUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e); +LUAI_FUNC int luaK_jump (FuncState *fs); +LUAI_FUNC void luaK_ret (FuncState *fs, int first, int nret); +LUAI_FUNC void luaK_patchlist (FuncState *fs, int list, int target); +LUAI_FUNC void luaK_patchtohere (FuncState *fs, int list); +LUAI_FUNC void luaK_patchclose (FuncState *fs, int list, int level); +LUAI_FUNC void luaK_concat (FuncState *fs, int *l1, int l2); +LUAI_FUNC int luaK_getlabel (FuncState *fs); +LUAI_FUNC void luaK_prefix (FuncState *fs, UnOpr op, expdesc *v, int line); +LUAI_FUNC void luaK_infix (FuncState *fs, BinOpr op, expdesc *v); +LUAI_FUNC void luaK_posfix (FuncState *fs, BinOpr op, expdesc *v1, + expdesc *v2, int line); +LUAI_FUNC void luaK_setlist (FuncState *fs, int base, int nelems, int tostore); + + +#endif diff --git a/radio/src/lua/src/lcorolib.c b/radio/src/lua/src/lcorolib.c new file mode 100644 index 000000000..e2f601eb6 --- /dev/null +++ b/radio/src/lua/src/lcorolib.c @@ -0,0 +1,154 @@ +/* +** $Id: lcorolib.c,v 1.5 2013/02/21 13:44:53 roberto Exp $ +** Coroutine Library +** See Copyright Notice in lua.h +*/ + + +#include + + +#define lcorolib_c + +#include "lua.h" + +#include "lauxlib.h" +#include "lualib.h" + + +static int auxresume (lua_State *L, lua_State *co, int narg) { + int status; + if (!lua_checkstack(co, narg)) { + lua_pushliteral(L, "too many arguments to resume"); + return -1; /* error flag */ + } + if (lua_status(co) == LUA_OK && lua_gettop(co) == 0) { + lua_pushliteral(L, "cannot resume dead coroutine"); + return -1; /* error flag */ + } + lua_xmove(L, co, narg); + status = lua_resume(co, L, narg); + if (status == LUA_OK || status == LUA_YIELD) { + int nres = lua_gettop(co); + if (!lua_checkstack(L, nres + 1)) { + lua_pop(co, nres); /* remove results anyway */ + lua_pushliteral(L, "too many results to resume"); + return -1; /* error flag */ + } + lua_xmove(co, L, nres); /* move yielded values */ + return nres; + } + else { + lua_xmove(co, L, 1); /* move error message */ + return -1; /* error flag */ + } +} + + +static int luaB_coresume (lua_State *L) { + lua_State *co = lua_tothread(L, 1); + int r; + luaL_argcheck(L, co, 1, "coroutine expected"); + r = auxresume(L, co, lua_gettop(L) - 1); + if (r < 0) { + lua_pushboolean(L, 0); + lua_insert(L, -2); + return 2; /* return false + error message */ + } + else { + lua_pushboolean(L, 1); + lua_insert(L, -(r + 1)); + return r + 1; /* return true + `resume' returns */ + } +} + + +static int luaB_auxwrap (lua_State *L) { + lua_State *co = lua_tothread(L, lua_upvalueindex(1)); + int r = auxresume(L, co, lua_gettop(L)); + if (r < 0) { + if (lua_isstring(L, -1)) { /* error object is a string? */ + luaL_where(L, 1); /* add extra info */ + lua_insert(L, -2); + lua_concat(L, 2); + } + return lua_error(L); /* propagate error */ + } + return r; +} + + +static int luaB_cocreate (lua_State *L) { + lua_State *NL; + luaL_checktype(L, 1, LUA_TFUNCTION); + NL = lua_newthread(L); + lua_pushvalue(L, 1); /* move function to top */ + lua_xmove(L, NL, 1); /* move function from L to NL */ + return 1; +} + + +static int luaB_cowrap (lua_State *L) { + luaB_cocreate(L); + lua_pushcclosure(L, luaB_auxwrap, 1); + return 1; +} + + +static int luaB_yield (lua_State *L) { + return lua_yield(L, lua_gettop(L)); +} + + +static int luaB_costatus (lua_State *L) { + lua_State *co = lua_tothread(L, 1); + luaL_argcheck(L, co, 1, "coroutine expected"); + if (L == co) lua_pushliteral(L, "running"); + else { + switch (lua_status(co)) { + case LUA_YIELD: + lua_pushliteral(L, "suspended"); + break; + case LUA_OK: { + lua_Debug ar; + if (lua_getstack(co, 0, &ar) > 0) /* does it have frames? */ + lua_pushliteral(L, "normal"); /* it is running */ + else if (lua_gettop(co) == 0) + lua_pushliteral(L, "dead"); + else + lua_pushliteral(L, "suspended"); /* initial state */ + break; + } + default: /* some error occurred */ + lua_pushliteral(L, "dead"); + break; + } + } + return 1; +} + + +static int luaB_corunning (lua_State *L) { + int ismain = lua_pushthread(L); + lua_pushboolean(L, ismain); + return 2; +} + + +static const luaL_Reg co_funcs[] = { + {"create", luaB_cocreate}, + {"resume", luaB_coresume}, + {"running", luaB_corunning}, + {"status", luaB_costatus}, + {"wrap", luaB_cowrap}, + {"yield", luaB_yield}, + {NULL, NULL} +}; + + + +LUAMOD_API int luaopen_coroutine (lua_State *L) { + luaL_newlib(L, co_funcs); + return 1; +} + diff --git a/radio/src/lua/src/lctype.c b/radio/src/lua/src/lctype.c new file mode 100644 index 000000000..55e433a5d --- /dev/null +++ b/radio/src/lua/src/lctype.c @@ -0,0 +1,52 @@ +/* +** $Id: lctype.c,v 1.11 2011/10/03 16:19:23 roberto Exp $ +** 'ctype' functions for Lua +** See Copyright Notice in lua.h +*/ + +#define lctype_c +#define LUA_CORE + +#include "lctype.h" + +#if !LUA_USE_CTYPE /* { */ + +#include + +LUAI_DDEF const lu_byte luai_ctype_[UCHAR_MAX + 2] = { + 0x00, /* EOZ */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0. */ + 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1. */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* 2. */ + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, /* 3. */ + 0x16, 0x16, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05, /* 4. */ + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* 5. */ + 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x05, + 0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05, /* 6. */ + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* 7. */ + 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 8. */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 9. */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* a. */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* b. */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* c. */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* d. */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* e. */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* f. */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +#endif /* } */ diff --git a/radio/src/lua/src/lctype.h b/radio/src/lua/src/lctype.h new file mode 100644 index 000000000..99c7d1223 --- /dev/null +++ b/radio/src/lua/src/lctype.h @@ -0,0 +1,95 @@ +/* +** $Id: lctype.h,v 1.12 2011/07/15 12:50:29 roberto Exp $ +** 'ctype' functions for Lua +** See Copyright Notice in lua.h +*/ + +#ifndef lctype_h +#define lctype_h + +#include "lua.h" + + +/* +** WARNING: the functions defined here do not necessarily correspond +** to the similar functions in the standard C ctype.h. They are +** optimized for the specific needs of Lua +*/ + +#if !defined(LUA_USE_CTYPE) + +#if 'A' == 65 && '0' == 48 +/* ASCII case: can use its own tables; faster and fixed */ +#define LUA_USE_CTYPE 0 +#else +/* must use standard C ctype */ +#define LUA_USE_CTYPE 1 +#endif + +#endif + + +#if !LUA_USE_CTYPE /* { */ + +#include + +#include "llimits.h" + + +#define ALPHABIT 0 +#define DIGITBIT 1 +#define PRINTBIT 2 +#define SPACEBIT 3 +#define XDIGITBIT 4 + + +#define MASK(B) (1 << (B)) + + +/* +** add 1 to char to allow index -1 (EOZ) +*/ +#define testprop(c,p) (luai_ctype_[(c)+1] & (p)) + +/* +** 'lalpha' (Lua alphabetic) and 'lalnum' (Lua alphanumeric) both include '_' +*/ +#define lislalpha(c) testprop(c, MASK(ALPHABIT)) +#define lislalnum(c) testprop(c, (MASK(ALPHABIT) | MASK(DIGITBIT))) +#define lisdigit(c) testprop(c, MASK(DIGITBIT)) +#define lisspace(c) testprop(c, MASK(SPACEBIT)) +#define lisprint(c) testprop(c, MASK(PRINTBIT)) +#define lisxdigit(c) testprop(c, MASK(XDIGITBIT)) + +/* +** this 'ltolower' only works for alphabetic characters +*/ +#define ltolower(c) ((c) | ('A' ^ 'a')) + + +/* two more entries for 0 and -1 (EOZ) */ +LUAI_DDEC const lu_byte luai_ctype_[UCHAR_MAX + 2]; + + +#else /* }{ */ + +/* +** use standard C ctypes +*/ + +#include + + +#define lislalpha(c) (isalpha(c) || (c) == '_') +#define lislalnum(c) (isalnum(c) || (c) == '_') +#define lisdigit(c) (isdigit(c)) +#define lisspace(c) (isspace(c)) +#define lisprint(c) (isprint(c)) +#define lisxdigit(c) (isxdigit(c)) + +#define ltolower(c) (tolower(c)) + +#endif /* } */ + +#endif + diff --git a/radio/src/lua/src/ldblib.c b/radio/src/lua/src/ldblib.c new file mode 100644 index 000000000..596d10d30 --- /dev/null +++ b/radio/src/lua/src/ldblib.c @@ -0,0 +1,396 @@ +/* +** $Id: ldblib.c,v 1.132 2012/01/19 20:14:44 roberto Exp $ +** Interface from Lua to its debug API +** See Copyright Notice in lua.h +*/ + + +#include +#include + +#define ldblib_c + +#include "lua.h" + +#include "lauxlib.h" +#include "lualib.h" + + +#define HOOKKEY "_HKEY" + + + +static int db_getregistry (lua_State *L) { + lua_pushvalue(L, LUA_REGISTRYINDEX); + return 1; +} + + +static int db_getmetatable (lua_State *L) { + luaL_checkany(L, 1); + if (!lua_getmetatable(L, 1)) { + lua_pushnil(L); /* no metatable */ + } + return 1; +} + + +static int db_setmetatable (lua_State *L) { + int t = lua_type(L, 2); + luaL_argcheck(L, t == LUA_TNIL || t == LUA_TTABLE, 2, + "nil or table expected"); + lua_settop(L, 2); + lua_setmetatable(L, 1); + return 1; /* return 1st argument */ +} + + +static int db_getuservalue (lua_State *L) { + if (lua_type(L, 1) != LUA_TUSERDATA) + lua_pushnil(L); + else + lua_getuservalue(L, 1); + return 1; +} + + +static int db_setuservalue (lua_State *L) { + if (lua_type(L, 1) == LUA_TLIGHTUSERDATA) + luaL_argerror(L, 1, "full userdata expected, got light userdata"); + luaL_checktype(L, 1, LUA_TUSERDATA); + if (!lua_isnoneornil(L, 2)) + luaL_checktype(L, 2, LUA_TTABLE); + lua_settop(L, 2); + lua_setuservalue(L, 1); + return 1; +} + + +static void settabss (lua_State *L, const char *i, const char *v) { + lua_pushstring(L, v); + lua_setfield(L, -2, i); +} + + +static void settabsi (lua_State *L, const char *i, int v) { + lua_pushinteger(L, v); + lua_setfield(L, -2, i); +} + + +static void settabsb (lua_State *L, const char *i, int v) { + lua_pushboolean(L, v); + lua_setfield(L, -2, i); +} + + +static lua_State *getthread (lua_State *L, int *arg) { + if (lua_isthread(L, 1)) { + *arg = 1; + return lua_tothread(L, 1); + } + else { + *arg = 0; + return L; + } +} + + +static void treatstackoption (lua_State *L, lua_State *L1, const char *fname) { + if (L == L1) { + lua_pushvalue(L, -2); + lua_remove(L, -3); + } + else + lua_xmove(L1, L, 1); + lua_setfield(L, -2, fname); +} + + +static int db_getinfo (lua_State *L) { + lua_Debug ar; + int arg; + lua_State *L1 = getthread(L, &arg); + const char *options = luaL_optstring(L, arg+2, "flnStu"); + if (lua_isnumber(L, arg+1)) { + if (!lua_getstack(L1, (int)lua_tointeger(L, arg+1), &ar)) { + lua_pushnil(L); /* level out of range */ + return 1; + } + } + else if (lua_isfunction(L, arg+1)) { + lua_pushfstring(L, ">%s", options); + options = lua_tostring(L, -1); + lua_pushvalue(L, arg+1); + lua_xmove(L, L1, 1); + } + else + return luaL_argerror(L, arg+1, "function or level expected"); + if (!lua_getinfo(L1, options, &ar)) + return luaL_argerror(L, arg+2, "invalid option"); + lua_createtable(L, 0, 2); + if (strchr(options, 'S')) { + settabss(L, "source", ar.source); + settabss(L, "short_src", ar.short_src); + settabsi(L, "linedefined", ar.linedefined); + settabsi(L, "lastlinedefined", ar.lastlinedefined); + settabss(L, "what", ar.what); + } + if (strchr(options, 'l')) + settabsi(L, "currentline", ar.currentline); + if (strchr(options, 'u')) { + settabsi(L, "nups", ar.nups); + settabsi(L, "nparams", ar.nparams); + settabsb(L, "isvararg", ar.isvararg); + } + if (strchr(options, 'n')) { + settabss(L, "name", ar.name); + settabss(L, "namewhat", ar.namewhat); + } + if (strchr(options, 't')) + settabsb(L, "istailcall", ar.istailcall); + if (strchr(options, 'L')) + treatstackoption(L, L1, "activelines"); + if (strchr(options, 'f')) + treatstackoption(L, L1, "func"); + return 1; /* return table */ +} + + +static int db_getlocal (lua_State *L) { + int arg; + lua_State *L1 = getthread(L, &arg); + lua_Debug ar; + const char *name; + int nvar = luaL_checkint(L, arg+2); /* local-variable index */ + if (lua_isfunction(L, arg + 1)) { /* function argument? */ + lua_pushvalue(L, arg + 1); /* push function */ + lua_pushstring(L, lua_getlocal(L, NULL, nvar)); /* push local name */ + return 1; + } + else { /* stack-level argument */ + if (!lua_getstack(L1, luaL_checkint(L, arg+1), &ar)) /* out of range? */ + return luaL_argerror(L, arg+1, "level out of range"); + name = lua_getlocal(L1, &ar, nvar); + if (name) { + lua_xmove(L1, L, 1); /* push local value */ + lua_pushstring(L, name); /* push name */ + lua_pushvalue(L, -2); /* re-order */ + return 2; + } + else { + lua_pushnil(L); /* no name (nor value) */ + return 1; + } + } +} + + +static int db_setlocal (lua_State *L) { + int arg; + lua_State *L1 = getthread(L, &arg); + lua_Debug ar; + if (!lua_getstack(L1, luaL_checkint(L, arg+1), &ar)) /* out of range? */ + return luaL_argerror(L, arg+1, "level out of range"); + luaL_checkany(L, arg+3); + lua_settop(L, arg+3); + lua_xmove(L, L1, 1); + lua_pushstring(L, lua_setlocal(L1, &ar, luaL_checkint(L, arg+2))); + return 1; +} + + +static int auxupvalue (lua_State *L, int get) { + const char *name; + int n = luaL_checkint(L, 2); + luaL_checktype(L, 1, LUA_TFUNCTION); + name = get ? lua_getupvalue(L, 1, n) : lua_setupvalue(L, 1, n); + if (name == NULL) return 0; + lua_pushstring(L, name); + lua_insert(L, -(get+1)); + return get + 1; +} + + +static int db_getupvalue (lua_State *L) { + return auxupvalue(L, 1); +} + + +static int db_setupvalue (lua_State *L) { + luaL_checkany(L, 3); + return auxupvalue(L, 0); +} + + +static int checkupval (lua_State *L, int argf, int argnup) { + lua_Debug ar; + int nup = luaL_checkint(L, argnup); + luaL_checktype(L, argf, LUA_TFUNCTION); + lua_pushvalue(L, argf); + lua_getinfo(L, ">u", &ar); + luaL_argcheck(L, 1 <= nup && nup <= ar.nups, argnup, "invalid upvalue index"); + return nup; +} + + +static int db_upvalueid (lua_State *L) { + int n = checkupval(L, 1, 2); + lua_pushlightuserdata(L, lua_upvalueid(L, 1, n)); + return 1; +} + + +static int db_upvaluejoin (lua_State *L) { + int n1 = checkupval(L, 1, 2); + int n2 = checkupval(L, 3, 4); + luaL_argcheck(L, !lua_iscfunction(L, 1), 1, "Lua function expected"); + luaL_argcheck(L, !lua_iscfunction(L, 3), 3, "Lua function expected"); + lua_upvaluejoin(L, 1, n1, 3, n2); + return 0; +} + + +#define gethooktable(L) luaL_getsubtable(L, LUA_REGISTRYINDEX, HOOKKEY) + + +static void hookf (lua_State *L, lua_Debug *ar) { + static const char *const hooknames[] = + {"call", "return", "line", "count", "tail call"}; + gethooktable(L); + lua_pushthread(L); + lua_rawget(L, -2); + if (lua_isfunction(L, -1)) { + lua_pushstring(L, hooknames[(int)ar->event]); + if (ar->currentline >= 0) + lua_pushinteger(L, ar->currentline); + else lua_pushnil(L); + lua_assert(lua_getinfo(L, "lS", ar)); + lua_call(L, 2, 0); + } +} + + +static int makemask (const char *smask, int count) { + int mask = 0; + if (strchr(smask, 'c')) mask |= LUA_MASKCALL; + if (strchr(smask, 'r')) mask |= LUA_MASKRET; + if (strchr(smask, 'l')) mask |= LUA_MASKLINE; + if (count > 0) mask |= LUA_MASKCOUNT; + return mask; +} + + +static char *unmakemask (int mask, char *smask) { + int i = 0; + if (mask & LUA_MASKCALL) smask[i++] = 'c'; + if (mask & LUA_MASKRET) smask[i++] = 'r'; + if (mask & LUA_MASKLINE) smask[i++] = 'l'; + smask[i] = '\0'; + return smask; +} + + +static int db_sethook (lua_State *L) { + int arg, mask, count; + lua_Hook func; + lua_State *L1 = getthread(L, &arg); + if (lua_isnoneornil(L, arg+1)) { + lua_settop(L, arg+1); + func = NULL; mask = 0; count = 0; /* turn off hooks */ + } + else { + const char *smask = luaL_checkstring(L, arg+2); + luaL_checktype(L, arg+1, LUA_TFUNCTION); + count = luaL_optint(L, arg+3, 0); + func = hookf; mask = makemask(smask, count); + } + if (gethooktable(L) == 0) { /* creating hook table? */ + lua_pushstring(L, "k"); + lua_setfield(L, -2, "__mode"); /** hooktable.__mode = "k" */ + lua_pushvalue(L, -1); + lua_setmetatable(L, -2); /* setmetatable(hooktable) = hooktable */ + } + lua_pushthread(L1); lua_xmove(L1, L, 1); + lua_pushvalue(L, arg+1); + lua_rawset(L, -3); /* set new hook */ + lua_sethook(L1, func, mask, count); /* set hooks */ + return 0; +} + + +static int db_gethook (lua_State *L) { + int arg; + lua_State *L1 = getthread(L, &arg); + char buff[5]; + int mask = lua_gethookmask(L1); + lua_Hook hook = lua_gethook(L1); + if (hook != NULL && hook != hookf) /* external hook? */ + lua_pushliteral(L, "external hook"); + else { + gethooktable(L); + lua_pushthread(L1); lua_xmove(L1, L, 1); + lua_rawget(L, -2); /* get hook */ + lua_remove(L, -2); /* remove hook table */ + } + lua_pushstring(L, unmakemask(mask, buff)); + lua_pushinteger(L, lua_gethookcount(L1)); + return 3; +} + + +static int db_debug (lua_State *L) { + for (;;) { + char buffer[250]; + luai_writestringerror("%s", "lua_debug> "); + if (fgets(buffer, sizeof(buffer), stdin) == 0 || + strcmp(buffer, "cont\n") == 0) + return 0; + if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") || + lua_pcall(L, 0, 0, 0)) + luai_writestringerror("%s\n", lua_tostring(L, -1)); + lua_settop(L, 0); /* remove eventual returns */ + } +} + + +static int db_traceback (lua_State *L) { + int arg; + lua_State *L1 = getthread(L, &arg); + const char *msg = lua_tostring(L, arg + 1); + if (msg == NULL && !lua_isnoneornil(L, arg + 1)) /* non-string 'msg'? */ + lua_pushvalue(L, arg + 1); /* return it untouched */ + else { + int level = luaL_optint(L, arg + 2, (L == L1) ? 1 : 0); + luaL_traceback(L, L1, msg, level); + } + return 1; +} + + +static const luaL_Reg dblib[] = { + {"debug", db_debug}, + {"getuservalue", db_getuservalue}, + {"gethook", db_gethook}, + {"getinfo", db_getinfo}, + {"getlocal", db_getlocal}, + {"getregistry", db_getregistry}, + {"getmetatable", db_getmetatable}, + {"getupvalue", db_getupvalue}, + {"upvaluejoin", db_upvaluejoin}, + {"upvalueid", db_upvalueid}, + {"setuservalue", db_setuservalue}, + {"sethook", db_sethook}, + {"setlocal", db_setlocal}, + {"setmetatable", db_setmetatable}, + {"setupvalue", db_setupvalue}, + {"traceback", db_traceback}, + {NULL, NULL} +}; + + +LUAMOD_API int luaopen_debug (lua_State *L) { + luaL_newlib(L, dblib); + return 1; +} + diff --git a/radio/src/lua/src/ldebug.c b/radio/src/lua/src/ldebug.c new file mode 100644 index 000000000..7e04f9d09 --- /dev/null +++ b/radio/src/lua/src/ldebug.c @@ -0,0 +1,580 @@ +/* +** $Id: ldebug.c,v 2.90 2012/08/16 17:34:28 roberto Exp $ +** Debug Interface +** See Copyright Notice in lua.h +*/ + + +#include +#include +#include + + +#define ldebug_c +#define LUA_CORE + +#include "lua.h" + +#include "lapi.h" +#include "lcode.h" +#include "ldebug.h" +#include "ldo.h" +#include "lfunc.h" +#include "lobject.h" +#include "lopcodes.h" +#include "lstate.h" +#include "lstring.h" +#include "ltable.h" +#include "ltm.h" +#include "lvm.h" + + + +#define noLuaClosure(f) ((f) == NULL || (f)->c.tt == LUA_TCCL) + + +static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name); + + +static int currentpc (CallInfo *ci) { + lua_assert(isLua(ci)); + return pcRel(ci->u.l.savedpc, ci_func(ci)->p); +} + + +static int currentline (CallInfo *ci) { + return getfuncline(ci_func(ci)->p, currentpc(ci)); +} + + +/* +** this function can be called asynchronous (e.g. during a signal) +*/ +LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count) { + if (func == NULL || mask == 0) { /* turn off hooks? */ + mask = 0; + func = NULL; + } + if (isLua(L->ci)) + L->oldpc = L->ci->u.l.savedpc; + L->hook = func; + L->basehookcount = count; + resethookcount(L); + L->hookmask = cast_byte(mask); + return 1; +} + + +LUA_API lua_Hook lua_gethook (lua_State *L) { + return L->hook; +} + + +LUA_API int lua_gethookmask (lua_State *L) { + return L->hookmask; +} + + +LUA_API int lua_gethookcount (lua_State *L) { + return L->basehookcount; +} + + +LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) { + int status; + CallInfo *ci; + if (level < 0) return 0; /* invalid (negative) level */ + lua_lock(L); + for (ci = L->ci; level > 0 && ci != &L->base_ci; ci = ci->previous) + level--; + if (level == 0 && ci != &L->base_ci) { /* level found? */ + status = 1; + ar->i_ci = ci; + } + else status = 0; /* no such level */ + lua_unlock(L); + return status; +} + + +static const char *upvalname (Proto *p, int uv) { + TString *s = check_exp(uv < p->sizeupvalues, p->upvalues[uv].name); + if (s == NULL) return "?"; + else return getstr(s); +} + + +static const char *findvararg (CallInfo *ci, int n, StkId *pos) { + int nparams = clLvalue(ci->func)->p->numparams; + if (n >= ci->u.l.base - ci->func - nparams) + return NULL; /* no such vararg */ + else { + *pos = ci->func + nparams + n; + return "(*vararg)"; /* generic name for any vararg */ + } +} + + +static const char *findlocal (lua_State *L, CallInfo *ci, int n, + StkId *pos) { + const char *name = NULL; + StkId base; + if (isLua(ci)) { + if (n < 0) /* access to vararg values? */ + return findvararg(ci, -n, pos); + else { + base = ci->u.l.base; + name = luaF_getlocalname(ci_func(ci)->p, n, currentpc(ci)); + } + } + else + base = ci->func + 1; + if (name == NULL) { /* no 'standard' name? */ + StkId limit = (ci == L->ci) ? L->top : ci->next->func; + if (limit - base >= n && n > 0) /* is 'n' inside 'ci' stack? */ + name = "(*temporary)"; /* generic name for any valid slot */ + else + return NULL; /* no name */ + } + *pos = base + (n - 1); + return name; +} + + +LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n) { + const char *name; + lua_lock(L); + if (ar == NULL) { /* information about non-active function? */ + if (!isLfunction(L->top - 1)) /* not a Lua function? */ + name = NULL; + else /* consider live variables at function start (parameters) */ + name = luaF_getlocalname(clLvalue(L->top - 1)->p, n, 0); + } + else { /* active function; get information through 'ar' */ + StkId pos = 0; /* to avoid warnings */ + name = findlocal(L, ar->i_ci, n, &pos); + if (name) { + setobj2s(L, L->top, pos); + api_incr_top(L); + } + } + lua_unlock(L); + return name; +} + + +LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) { + StkId pos = 0; /* to avoid warnings */ + const char *name = findlocal(L, ar->i_ci, n, &pos); + lua_lock(L); + if (name) + setobjs2s(L, pos, L->top - 1); + L->top--; /* pop value */ + lua_unlock(L); + return name; +} + + +static void funcinfo (lua_Debug *ar, Closure *cl) { + if (noLuaClosure(cl)) { + ar->source = "=[C]"; + ar->linedefined = -1; + ar->lastlinedefined = -1; + ar->what = "C"; + } + else { + Proto *p = cl->l.p; + ar->source = p->source ? getstr(p->source) : "=?"; + ar->linedefined = p->linedefined; + ar->lastlinedefined = p->lastlinedefined; + ar->what = (ar->linedefined == 0) ? "main" : "Lua"; + } + luaO_chunkid(ar->short_src, ar->source, LUA_IDSIZE); +} + + +static void collectvalidlines (lua_State *L, Closure *f) { + if (noLuaClosure(f)) { + setnilvalue(L->top); + api_incr_top(L); + } + else { + int i; + TValue v; + int *lineinfo = f->l.p->lineinfo; + Table *t = luaH_new(L); /* new table to store active lines */ + sethvalue(L, L->top, t); /* push it on stack */ + api_incr_top(L); + setbvalue(&v, 1); /* boolean 'true' to be the value of all indices */ + for (i = 0; i < f->l.p->sizelineinfo; i++) /* for all lines with code */ + luaH_setint(L, t, lineinfo[i], &v); /* table[line] = true */ + } +} + + +static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar, + Closure *f, CallInfo *ci) { + int status = 1; + for (; *what; what++) { + switch (*what) { + case 'S': { + funcinfo(ar, f); + break; + } + case 'l': { + ar->currentline = (ci && isLua(ci)) ? currentline(ci) : -1; + break; + } + case 'u': { + ar->nups = (f == NULL) ? 0 : f->c.nupvalues; + if (noLuaClosure(f)) { + ar->isvararg = 1; + ar->nparams = 0; + } + else { + ar->isvararg = f->l.p->is_vararg; + ar->nparams = f->l.p->numparams; + } + break; + } + case 't': { + ar->istailcall = (ci) ? ci->callstatus & CIST_TAIL : 0; + break; + } + case 'n': { + /* calling function is a known Lua function? */ + if (ci && !(ci->callstatus & CIST_TAIL) && isLua(ci->previous)) + ar->namewhat = getfuncname(L, ci->previous, &ar->name); + else + ar->namewhat = NULL; + if (ar->namewhat == NULL) { + ar->namewhat = ""; /* not found */ + ar->name = NULL; + } + break; + } + case 'L': + case 'f': /* handled by lua_getinfo */ + break; + default: status = 0; /* invalid option */ + } + } + return status; +} + + +LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) { + int status; + Closure *cl; + CallInfo *ci; + StkId func; + lua_lock(L); + if (*what == '>') { + ci = NULL; + func = L->top - 1; + api_check(L, ttisfunction(func), "function expected"); + what++; /* skip the '>' */ + L->top--; /* pop function */ + } + else { + ci = ar->i_ci; + func = ci->func; + lua_assert(ttisfunction(ci->func)); + } + cl = ttisclosure(func) ? clvalue(func) : NULL; + status = auxgetinfo(L, what, ar, cl, ci); + if (strchr(what, 'f')) { + setobjs2s(L, L->top, func); + api_incr_top(L); + } + if (strchr(what, 'L')) + collectvalidlines(L, cl); + lua_unlock(L); + return status; +} + + +/* +** {====================================================== +** Symbolic Execution +** ======================================================= +*/ + +static const char *getobjname (Proto *p, int lastpc, int reg, + const char **name); + + +/* +** find a "name" for the RK value 'c' +*/ +static void kname (Proto *p, int pc, int c, const char **name) { + if (ISK(c)) { /* is 'c' a constant? */ + TValue *kvalue = &p->k[INDEXK(c)]; + if (ttisstring(kvalue)) { /* literal constant? */ + *name = svalue(kvalue); /* it is its own name */ + return; + } + /* else no reasonable name found */ + } + else { /* 'c' is a register */ + const char *what = getobjname(p, pc, c, name); /* search for 'c' */ + if (what && *what == 'c') { /* found a constant name? */ + return; /* 'name' already filled */ + } + /* else no reasonable name found */ + } + *name = "?"; /* no reasonable name found */ +} + + +/* +** try to find last instruction before 'lastpc' that modified register 'reg' +*/ +static int findsetreg (Proto *p, int lastpc, int reg) { + int pc; + int setreg = -1; /* keep last instruction that changed 'reg' */ + for (pc = 0; pc < lastpc; pc++) { + Instruction i = p->code[pc]; + OpCode op = GET_OPCODE(i); + int a = GETARG_A(i); + switch (op) { + case OP_LOADNIL: { + int b = GETARG_B(i); + if (a <= reg && reg <= a + b) /* set registers from 'a' to 'a+b' */ + setreg = pc; + break; + } + case OP_TFORCALL: { + if (reg >= a + 2) setreg = pc; /* affect all regs above its base */ + break; + } + case OP_CALL: + case OP_TAILCALL: { + if (reg >= a) setreg = pc; /* affect all registers above base */ + break; + } + case OP_JMP: { + int b = GETARG_sBx(i); + int dest = pc + 1 + b; + /* jump is forward and do not skip `lastpc'? */ + if (pc < dest && dest <= lastpc) + pc += b; /* do the jump */ + break; + } + case OP_TEST: { + if (reg == a) setreg = pc; /* jumped code can change 'a' */ + break; + } + default: + if (testAMode(op) && reg == a) /* any instruction that set A */ + setreg = pc; + break; + } + } + return setreg; +} + + +static const char *getobjname (Proto *p, int lastpc, int reg, + const char **name) { + int pc; + *name = luaF_getlocalname(p, reg + 1, lastpc); + if (*name) /* is a local? */ + return "local"; + /* else try symbolic execution */ + pc = findsetreg(p, lastpc, reg); + if (pc != -1) { /* could find instruction? */ + Instruction i = p->code[pc]; + OpCode op = GET_OPCODE(i); + switch (op) { + case OP_MOVE: { + int b = GETARG_B(i); /* move from 'b' to 'a' */ + if (b < GETARG_A(i)) + return getobjname(p, pc, b, name); /* get name for 'b' */ + break; + } + case OP_GETTABUP: + case OP_GETTABLE: { + int k = GETARG_C(i); /* key index */ + int t = GETARG_B(i); /* table index */ + const char *vn = (op == OP_GETTABLE) /* name of indexed variable */ + ? luaF_getlocalname(p, t + 1, pc) + : upvalname(p, t); + kname(p, pc, k, name); + return (vn && strcmp(vn, LUA_ENV) == 0) ? "global" : "field"; + } + case OP_GETUPVAL: { + *name = upvalname(p, GETARG_B(i)); + return "upvalue"; + } + case OP_LOADK: + case OP_LOADKX: { + int b = (op == OP_LOADK) ? GETARG_Bx(i) + : GETARG_Ax(p->code[pc + 1]); + if (ttisstring(&p->k[b])) { + *name = svalue(&p->k[b]); + return "constant"; + } + break; + } + case OP_SELF: { + int k = GETARG_C(i); /* key index */ + kname(p, pc, k, name); + return "method"; + } + default: break; /* go through to return NULL */ + } + } + return NULL; /* could not find reasonable name */ +} + + +static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name) { + TMS tm; + Proto *p = ci_func(ci)->p; /* calling function */ + int pc = currentpc(ci); /* calling instruction index */ + Instruction i = p->code[pc]; /* calling instruction */ + switch (GET_OPCODE(i)) { + case OP_CALL: + case OP_TAILCALL: /* get function name */ + return getobjname(p, pc, GETARG_A(i), name); + case OP_TFORCALL: { /* for iterator */ + *name = "for iterator"; + return "for iterator"; + } + /* all other instructions can call only through metamethods */ + case OP_SELF: + case OP_GETTABUP: + case OP_GETTABLE: tm = TM_INDEX; break; + case OP_SETTABUP: + case OP_SETTABLE: tm = TM_NEWINDEX; break; + case OP_EQ: tm = TM_EQ; break; + case OP_ADD: tm = TM_ADD; break; + case OP_SUB: tm = TM_SUB; break; + case OP_MUL: tm = TM_MUL; break; + case OP_DIV: tm = TM_DIV; break; + case OP_MOD: tm = TM_MOD; break; + case OP_POW: tm = TM_POW; break; + case OP_UNM: tm = TM_UNM; break; + case OP_LEN: tm = TM_LEN; break; + case OP_LT: tm = TM_LT; break; + case OP_LE: tm = TM_LE; break; + case OP_CONCAT: tm = TM_CONCAT; break; + default: + return NULL; /* else no useful name can be found */ + } + *name = getstr(G(L)->tmname[tm]); + return "metamethod"; +} + +/* }====================================================== */ + + + +/* +** only ANSI way to check whether a pointer points to an array +** (used only for error messages, so efficiency is not a big concern) +*/ +static int isinstack (CallInfo *ci, const TValue *o) { + StkId p; + for (p = ci->u.l.base; p < ci->top; p++) + if (o == p) return 1; + return 0; +} + + +static const char *getupvalname (CallInfo *ci, const TValue *o, + const char **name) { + LClosure *c = ci_func(ci); + int i; + for (i = 0; i < c->nupvalues; i++) { + if (c->upvals[i]->v == o) { + *name = upvalname(c->p, i); + return "upvalue"; + } + } + return NULL; +} + + +l_noret luaG_typeerror (lua_State *L, const TValue *o, const char *op) { + CallInfo *ci = L->ci; + const char *name = NULL; + const char *t = objtypename(o); + const char *kind = NULL; + if (isLua(ci)) { + kind = getupvalname(ci, o, &name); /* check whether 'o' is an upvalue */ + if (!kind && isinstack(ci, o)) /* no? try a register */ + kind = getobjname(ci_func(ci)->p, currentpc(ci), + cast_int(o - ci->u.l.base), &name); + } + if (kind) + luaG_runerror(L, "attempt to %s %s " LUA_QS " (a %s value)", + op, kind, name, t); + else + luaG_runerror(L, "attempt to %s a %s value", op, t); +} + + +l_noret luaG_concaterror (lua_State *L, StkId p1, StkId p2) { + if (ttisstring(p1) || ttisnumber(p1)) p1 = p2; + lua_assert(!ttisstring(p1) && !ttisnumber(p2)); + luaG_typeerror(L, p1, "concatenate"); +} + + +l_noret luaG_aritherror (lua_State *L, const TValue *p1, const TValue *p2) { + TValue temp; + if (luaV_tonumber(p1, &temp) == NULL) + p2 = p1; /* first operand is wrong */ + luaG_typeerror(L, p2, "perform arithmetic on"); +} + + +l_noret luaG_ordererror (lua_State *L, const TValue *p1, const TValue *p2) { + const char *t1 = objtypename(p1); + const char *t2 = objtypename(p2); + if (t1 == t2) + luaG_runerror(L, "attempt to compare two %s values", t1); + else + luaG_runerror(L, "attempt to compare %s with %s", t1, t2); +} + + +static void addinfo (lua_State *L, const char *msg) { + CallInfo *ci = L->ci; + if (isLua(ci)) { /* is Lua code? */ + char buff[LUA_IDSIZE]; /* add file:line information */ + int line = currentline(ci); + TString *src = ci_func(ci)->p->source; + if (src) + luaO_chunkid(buff, getstr(src), LUA_IDSIZE); + else { /* no source available; use "?" instead */ + buff[0] = '?'; buff[1] = '\0'; + } + luaO_pushfstring(L, "%s:%d: %s", buff, line, msg); + } +} + + +l_noret luaG_errormsg (lua_State *L) { + if (L->errfunc != 0) { /* is there an error handling function? */ + StkId errfunc = restorestack(L, L->errfunc); + if (!ttisfunction(errfunc)) luaD_throw(L, LUA_ERRERR); + setobjs2s(L, L->top, L->top - 1); /* move argument */ + setobjs2s(L, L->top - 1, errfunc); /* push function */ + L->top++; + luaD_call(L, L->top - 2, 1, 0); /* call it */ + } + luaD_throw(L, LUA_ERRRUN); +} + + +l_noret luaG_runerror (lua_State *L, const char *fmt, ...) { + va_list argp; + va_start(argp, fmt); + addinfo(L, luaO_pushvfstring(L, fmt, argp)); + va_end(argp); + luaG_errormsg(L); +} + diff --git a/radio/src/lua/src/ldebug.h b/radio/src/lua/src/ldebug.h new file mode 100644 index 000000000..fe39556b0 --- /dev/null +++ b/radio/src/lua/src/ldebug.h @@ -0,0 +1,34 @@ +/* +** $Id: ldebug.h,v 2.7 2011/10/07 20:45:19 roberto Exp $ +** Auxiliary functions from Debug Interface module +** See Copyright Notice in lua.h +*/ + +#ifndef ldebug_h +#define ldebug_h + + +#include "lstate.h" + + +#define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) + +#define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0) + +#define resethookcount(L) (L->hookcount = L->basehookcount) + +/* Active Lua function (given call info) */ +#define ci_func(ci) (clLvalue((ci)->func)) + + +LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, + const char *opname); +LUAI_FUNC l_noret luaG_concaterror (lua_State *L, StkId p1, StkId p2); +LUAI_FUNC l_noret luaG_aritherror (lua_State *L, const TValue *p1, + const TValue *p2); +LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1, + const TValue *p2); +LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...); +LUAI_FUNC l_noret luaG_errormsg (lua_State *L); + +#endif diff --git a/radio/src/lua/src/ldo.c b/radio/src/lua/src/ldo.c new file mode 100644 index 000000000..aafa3dca2 --- /dev/null +++ b/radio/src/lua/src/ldo.c @@ -0,0 +1,673 @@ +/* +** $Id: ldo.c,v 2.108 2012/10/01 14:05:04 roberto Exp $ +** Stack and Call structure of Lua +** See Copyright Notice in lua.h +*/ + + +#include +#include +#include + +#define ldo_c +#define LUA_CORE + +#include "lua.h" + +#include "lapi.h" +#include "ldebug.h" +#include "ldo.h" +#include "lfunc.h" +#include "lgc.h" +#include "lmem.h" +#include "lobject.h" +#include "lopcodes.h" +#include "lparser.h" +#include "lstate.h" +#include "lstring.h" +#include "ltable.h" +#include "ltm.h" +#include "lundump.h" +#include "lvm.h" +#include "lzio.h" + + + + +/* +** {====================================================== +** Error-recovery functions +** ======================================================= +*/ + +/* +** LUAI_THROW/LUAI_TRY define how Lua does exception handling. By +** default, Lua handles errors with exceptions when compiling as +** C++ code, with _longjmp/_setjmp when asked to use them, and with +** longjmp/setjmp otherwise. +*/ +#if !defined(LUAI_THROW) + +#if defined(__cplusplus) && !defined(LUA_USE_LONGJMP) +/* C++ exceptions */ +#define LUAI_THROW(L,c) throw(c) +#define LUAI_TRY(L,c,a) \ + try { a } catch(...) { if ((c)->status == 0) (c)->status = -1; } +#define luai_jmpbuf int /* dummy variable */ + +#elif defined(LUA_USE_ULONGJMP) +/* in Unix, try _longjmp/_setjmp (more efficient) */ +#define LUAI_THROW(L,c) _longjmp((c)->b, 1) +#define LUAI_TRY(L,c,a) if (_setjmp((c)->b) == 0) { a } +#define luai_jmpbuf jmp_buf + +#else +/* default handling with long jumps */ +#define LUAI_THROW(L,c) longjmp((c)->b, 1) +#define LUAI_TRY(L,c,a) if (setjmp((c)->b) == 0) { a } +#define luai_jmpbuf jmp_buf + +#endif + +#endif + + + +/* chain list of long jump buffers */ +struct lua_longjmp { + struct lua_longjmp *previous; + luai_jmpbuf b; + volatile int status; /* error code */ +}; + + +static void seterrorobj (lua_State *L, int errcode, StkId oldtop) { + switch (errcode) { + case LUA_ERRMEM: { /* memory error? */ + setsvalue2s(L, oldtop, G(L)->memerrmsg); /* reuse preregistered msg. */ + break; + } + case LUA_ERRERR: { + setsvalue2s(L, oldtop, luaS_newliteral(L, "error in error handling")); + break; + } + default: { + setobjs2s(L, oldtop, L->top - 1); /* error message on current top */ + break; + } + } + L->top = oldtop + 1; +} + + +l_noret luaD_throw (lua_State *L, int errcode) { + if (L->errorJmp) { /* thread has an error handler? */ + L->errorJmp->status = errcode; /* set status */ + LUAI_THROW(L, L->errorJmp); /* jump to it */ + } + else { /* thread has no error handler */ + L->status = cast_byte(errcode); /* mark it as dead */ + if (G(L)->mainthread->errorJmp) { /* main thread has a handler? */ + setobjs2s(L, G(L)->mainthread->top++, L->top - 1); /* copy error obj. */ + luaD_throw(G(L)->mainthread, errcode); /* re-throw in main thread */ + } + else { /* no handler at all; abort */ + if (G(L)->panic) { /* panic function? */ + lua_unlock(L); + G(L)->panic(L); /* call it (last chance to jump out) */ + } + abort(); + } + } +} + + +int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) { + unsigned short oldnCcalls = L->nCcalls; + struct lua_longjmp lj; + lj.status = LUA_OK; + lj.previous = L->errorJmp; /* chain new error handler */ + L->errorJmp = &lj; + LUAI_TRY(L, &lj, + (*f)(L, ud); + ); + L->errorJmp = lj.previous; /* restore old error handler */ + L->nCcalls = oldnCcalls; + return lj.status; +} + +/* }====================================================== */ + + +static void correctstack (lua_State *L, TValue *oldstack) { + CallInfo *ci; + GCObject *up; + L->top = (L->top - oldstack) + L->stack; + for (up = L->openupval; up != NULL; up = up->gch.next) + gco2uv(up)->v = (gco2uv(up)->v - oldstack) + L->stack; + for (ci = L->ci; ci != NULL; ci = ci->previous) { + ci->top = (ci->top - oldstack) + L->stack; + ci->func = (ci->func - oldstack) + L->stack; + if (isLua(ci)) + ci->u.l.base = (ci->u.l.base - oldstack) + L->stack; + } +} + + +/* some space for error handling */ +#define ERRORSTACKSIZE (LUAI_MAXSTACK + 200) + + +void luaD_reallocstack (lua_State *L, int newsize) { + TValue *oldstack = L->stack; + int lim = L->stacksize; + lua_assert(newsize <= LUAI_MAXSTACK || newsize == ERRORSTACKSIZE); + lua_assert(L->stack_last - L->stack == L->stacksize - EXTRA_STACK); + luaM_reallocvector(L, L->stack, L->stacksize, newsize, TValue); + for (; lim < newsize; lim++) + setnilvalue(L->stack + lim); /* erase new segment */ + L->stacksize = newsize; + L->stack_last = L->stack + newsize - EXTRA_STACK; + correctstack(L, oldstack); +} + + +void luaD_growstack (lua_State *L, int n) { + int size = L->stacksize; + if (size > LUAI_MAXSTACK) /* error after extra size? */ + luaD_throw(L, LUA_ERRERR); + else { + int needed = cast_int(L->top - L->stack) + n + EXTRA_STACK; + int newsize = 2 * size; + if (newsize > LUAI_MAXSTACK) newsize = LUAI_MAXSTACK; + if (newsize < needed) newsize = needed; + if (newsize > LUAI_MAXSTACK) { /* stack overflow? */ + luaD_reallocstack(L, ERRORSTACKSIZE); + luaG_runerror(L, "stack overflow"); + } + else + luaD_reallocstack(L, newsize); + } +} + + +static int stackinuse (lua_State *L) { + CallInfo *ci; + StkId lim = L->top; + for (ci = L->ci; ci != NULL; ci = ci->previous) { + lua_assert(ci->top <= L->stack_last); + if (lim < ci->top) lim = ci->top; + } + return cast_int(lim - L->stack) + 1; /* part of stack in use */ +} + + +void luaD_shrinkstack (lua_State *L) { + int inuse = stackinuse(L); + int goodsize = inuse + (inuse / 8) + 2*EXTRA_STACK; + if (goodsize > LUAI_MAXSTACK) goodsize = LUAI_MAXSTACK; + if (inuse > LUAI_MAXSTACK || /* handling stack overflow? */ + goodsize >= L->stacksize) /* would grow instead of shrink? */ + condmovestack(L); /* don't change stack (change only for debugging) */ + else + luaD_reallocstack(L, goodsize); /* shrink it */ +} + + +void luaD_hook (lua_State *L, int event, int line) { + lua_Hook hook = L->hook; + if (hook && L->allowhook) { + CallInfo *ci = L->ci; + ptrdiff_t top = savestack(L, L->top); + ptrdiff_t ci_top = savestack(L, ci->top); + lua_Debug ar; + ar.event = event; + ar.currentline = line; + ar.i_ci = ci; + luaD_checkstack(L, LUA_MINSTACK); /* ensure minimum stack size */ + ci->top = L->top + LUA_MINSTACK; + lua_assert(ci->top <= L->stack_last); + L->allowhook = 0; /* cannot call hooks inside a hook */ + ci->callstatus |= CIST_HOOKED; + lua_unlock(L); + (*hook)(L, &ar); + lua_lock(L); + lua_assert(!L->allowhook); + L->allowhook = 1; + ci->top = restorestack(L, ci_top); + L->top = restorestack(L, top); + ci->callstatus &= ~CIST_HOOKED; + } +} + + +static void callhook (lua_State *L, CallInfo *ci) { + int hook = LUA_HOOKCALL; + ci->u.l.savedpc++; /* hooks assume 'pc' is already incremented */ + if (isLua(ci->previous) && + GET_OPCODE(*(ci->previous->u.l.savedpc - 1)) == OP_TAILCALL) { + ci->callstatus |= CIST_TAIL; + hook = LUA_HOOKTAILCALL; + } + luaD_hook(L, hook, -1); + ci->u.l.savedpc--; /* correct 'pc' */ +} + + +static StkId adjust_varargs (lua_State *L, Proto *p, int actual) { + int i; + int nfixargs = p->numparams; + StkId base, fixed; + lua_assert(actual >= nfixargs); + /* move fixed parameters to final position */ + fixed = L->top - actual; /* first fixed argument */ + base = L->top; /* final position of first argument */ + for (i=0; itop++, fixed + i); + setnilvalue(fixed + i); + } + return base; +} + + +static StkId tryfuncTM (lua_State *L, StkId func) { + const TValue *tm = luaT_gettmbyobj(L, func, TM_CALL); + StkId p; + ptrdiff_t funcr = savestack(L, func); + if (!ttisfunction(tm)) + luaG_typeerror(L, func, "call"); + /* Open a hole inside the stack at `func' */ + for (p = L->top; p > func; p--) setobjs2s(L, p, p-1); + incr_top(L); + func = restorestack(L, funcr); /* previous call may change stack */ + setobj2s(L, func, tm); /* tag method is the new function to be called */ + return func; +} + + + +#define next_ci(L) (L->ci = (L->ci->next ? L->ci->next : luaE_extendCI(L))) + + +/* +** returns true if function has been executed (C function) +*/ +int luaD_precall (lua_State *L, StkId func, int nresults) { + lua_CFunction f; + CallInfo *ci; + int n; /* number of arguments (Lua) or returns (C) */ + ptrdiff_t funcr = savestack(L, func); + switch (ttype(func)) { + case LUA_TLCF: /* light C function */ + f = fvalue(func); + goto Cfunc; + case LUA_TCCL: { /* C closure */ + f = clCvalue(func)->f; + Cfunc: + luaD_checkstack(L, LUA_MINSTACK); /* ensure minimum stack size */ + ci = next_ci(L); /* now 'enter' new function */ + ci->nresults = nresults; + ci->func = restorestack(L, funcr); + ci->top = L->top + LUA_MINSTACK; + lua_assert(ci->top <= L->stack_last); + ci->callstatus = 0; + luaC_checkGC(L); /* stack grow uses memory */ + if (L->hookmask & LUA_MASKCALL) + luaD_hook(L, LUA_HOOKCALL, -1); + lua_unlock(L); + n = (*f)(L); /* do the actual call */ + lua_lock(L); + api_checknelems(L, n); + luaD_poscall(L, L->top - n); + return 1; + } + case LUA_TLCL: { /* Lua function: prepare its call */ + StkId base; + Proto *p = clLvalue(func)->p; + luaD_checkstack(L, p->maxstacksize); + func = restorestack(L, funcr); + n = cast_int(L->top - func) - 1; /* number of real arguments */ + for (; n < p->numparams; n++) + setnilvalue(L->top++); /* complete missing arguments */ + base = (!p->is_vararg) ? func + 1 : adjust_varargs(L, p, n); + ci = next_ci(L); /* now 'enter' new function */ + ci->nresults = nresults; + ci->func = func; + ci->u.l.base = base; + ci->top = base + p->maxstacksize; + lua_assert(ci->top <= L->stack_last); + ci->u.l.savedpc = p->code; /* starting point */ + ci->callstatus = CIST_LUA; + L->top = ci->top; + luaC_checkGC(L); /* stack grow uses memory */ + if (L->hookmask & LUA_MASKCALL) + callhook(L, ci); + return 0; + } + default: { /* not a function */ + func = tryfuncTM(L, func); /* retry with 'function' tag method */ + return luaD_precall(L, func, nresults); /* now it must be a function */ + } + } +} + + +int luaD_poscall (lua_State *L, StkId firstResult) { + StkId res; + int wanted, i; + CallInfo *ci = L->ci; + if (L->hookmask & (LUA_MASKRET | LUA_MASKLINE)) { + if (L->hookmask & LUA_MASKRET) { + ptrdiff_t fr = savestack(L, firstResult); /* hook may change stack */ + luaD_hook(L, LUA_HOOKRET, -1); + firstResult = restorestack(L, fr); + } + L->oldpc = ci->previous->u.l.savedpc; /* 'oldpc' for caller function */ + } + res = ci->func; /* res == final position of 1st result */ + wanted = ci->nresults; + L->ci = ci = ci->previous; /* back to caller */ + /* move results to correct place */ + for (i = wanted; i != 0 && firstResult < L->top; i--) + setobjs2s(L, res++, firstResult++); + while (i-- > 0) + setnilvalue(res++); + L->top = res; + return (wanted - LUA_MULTRET); /* 0 iff wanted == LUA_MULTRET */ +} + + +/* +** Call a function (C or Lua). The function to be called is at *func. +** The arguments are on the stack, right after the function. +** When returns, all the results are on the stack, starting at the original +** function position. +*/ +void luaD_call (lua_State *L, StkId func, int nResults, int allowyield) { + if (++L->nCcalls >= LUAI_MAXCCALLS) { + if (L->nCcalls == LUAI_MAXCCALLS) + luaG_runerror(L, "C stack overflow"); + else if (L->nCcalls >= (LUAI_MAXCCALLS + (LUAI_MAXCCALLS>>3))) + luaD_throw(L, LUA_ERRERR); /* error while handing stack error */ + } + if (!allowyield) L->nny++; + if (!luaD_precall(L, func, nResults)) /* is a Lua function? */ + luaV_execute(L); /* call it */ + if (!allowyield) L->nny--; + L->nCcalls--; +} + + +static void finishCcall (lua_State *L) { + CallInfo *ci = L->ci; + int n; + lua_assert(ci->u.c.k != NULL); /* must have a continuation */ + lua_assert(L->nny == 0); + if (ci->callstatus & CIST_YPCALL) { /* was inside a pcall? */ + ci->callstatus &= ~CIST_YPCALL; /* finish 'lua_pcall' */ + L->errfunc = ci->u.c.old_errfunc; + } + /* finish 'lua_callk'/'lua_pcall' */ + adjustresults(L, ci->nresults); + /* call continuation function */ + if (!(ci->callstatus & CIST_STAT)) /* no call status? */ + ci->u.c.status = LUA_YIELD; /* 'default' status */ + lua_assert(ci->u.c.status != LUA_OK); + ci->callstatus = (ci->callstatus & ~(CIST_YPCALL | CIST_STAT)) | CIST_YIELDED; + lua_unlock(L); + n = (*ci->u.c.k)(L); + lua_lock(L); + api_checknelems(L, n); + /* finish 'luaD_precall' */ + luaD_poscall(L, L->top - n); +} + + +static void unroll (lua_State *L, void *ud) { + UNUSED(ud); + for (;;) { + if (L->ci == &L->base_ci) /* stack is empty? */ + return; /* coroutine finished normally */ + if (!isLua(L->ci)) /* C function? */ + finishCcall(L); + else { /* Lua function */ + luaV_finishOp(L); /* finish interrupted instruction */ + luaV_execute(L); /* execute down to higher C 'boundary' */ + } + } +} + + +/* +** check whether thread has a suspended protected call +*/ +static CallInfo *findpcall (lua_State *L) { + CallInfo *ci; + for (ci = L->ci; ci != NULL; ci = ci->previous) { /* search for a pcall */ + if (ci->callstatus & CIST_YPCALL) + return ci; + } + return NULL; /* no pending pcall */ +} + + +static int recover (lua_State *L, int status) { + StkId oldtop; + CallInfo *ci = findpcall(L); + if (ci == NULL) return 0; /* no recovery point */ + /* "finish" luaD_pcall */ + oldtop = restorestack(L, ci->extra); + luaF_close(L, oldtop); + seterrorobj(L, status, oldtop); + L->ci = ci; + L->allowhook = ci->u.c.old_allowhook; + L->nny = 0; /* should be zero to be yieldable */ + luaD_shrinkstack(L); + L->errfunc = ci->u.c.old_errfunc; + ci->callstatus |= CIST_STAT; /* call has error status */ + ci->u.c.status = status; /* (here it is) */ + return 1; /* continue running the coroutine */ +} + + +/* +** signal an error in the call to 'resume', not in the execution of the +** coroutine itself. (Such errors should not be handled by any coroutine +** error handler and should not kill the coroutine.) +*/ +static l_noret resume_error (lua_State *L, const char *msg, StkId firstArg) { + L->top = firstArg; /* remove args from the stack */ + setsvalue2s(L, L->top, luaS_new(L, msg)); /* push error message */ + api_incr_top(L); + luaD_throw(L, -1); /* jump back to 'lua_resume' */ +} + + +/* +** do the work for 'lua_resume' in protected mode +*/ +static void resume (lua_State *L, void *ud) { + int nCcalls = L->nCcalls; + StkId firstArg = cast(StkId, ud); + CallInfo *ci = L->ci; + if (nCcalls >= LUAI_MAXCCALLS) + resume_error(L, "C stack overflow", firstArg); + if (L->status == LUA_OK) { /* may be starting a coroutine */ + if (ci != &L->base_ci) /* not in base level? */ + resume_error(L, "cannot resume non-suspended coroutine", firstArg); + /* coroutine is in base level; start running it */ + if (!luaD_precall(L, firstArg - 1, LUA_MULTRET)) /* Lua function? */ + luaV_execute(L); /* call it */ + } + else if (L->status != LUA_YIELD) + resume_error(L, "cannot resume dead coroutine", firstArg); + else { /* resuming from previous yield */ + L->status = LUA_OK; + ci->func = restorestack(L, ci->extra); + if (isLua(ci)) /* yielded inside a hook? */ + luaV_execute(L); /* just continue running Lua code */ + else { /* 'common' yield */ + if (ci->u.c.k != NULL) { /* does it have a continuation? */ + int n; + ci->u.c.status = LUA_YIELD; /* 'default' status */ + ci->callstatus |= CIST_YIELDED; + lua_unlock(L); + n = (*ci->u.c.k)(L); /* call continuation */ + lua_lock(L); + api_checknelems(L, n); + firstArg = L->top - n; /* yield results come from continuation */ + } + luaD_poscall(L, firstArg); /* finish 'luaD_precall' */ + } + unroll(L, NULL); + } + lua_assert(nCcalls == L->nCcalls); +} + + +LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs) { + int status; + lua_lock(L); + luai_userstateresume(L, nargs); + L->nCcalls = (from) ? from->nCcalls + 1 : 1; + L->nny = 0; /* allow yields */ + api_checknelems(L, (L->status == LUA_OK) ? nargs + 1 : nargs); + status = luaD_rawrunprotected(L, resume, L->top - nargs); + if (status == -1) /* error calling 'lua_resume'? */ + status = LUA_ERRRUN; + else { /* yield or regular error */ + while (status != LUA_OK && status != LUA_YIELD) { /* error? */ + if (recover(L, status)) /* recover point? */ + status = luaD_rawrunprotected(L, unroll, NULL); /* run continuation */ + else { /* unrecoverable error */ + L->status = cast_byte(status); /* mark thread as `dead' */ + seterrorobj(L, status, L->top); + L->ci->top = L->top; + break; + } + } + lua_assert(status == L->status); + } + L->nny = 1; /* do not allow yields */ + L->nCcalls--; + lua_assert(L->nCcalls == ((from) ? from->nCcalls : 0)); + lua_unlock(L); + return status; +} + + +LUA_API int lua_yieldk (lua_State *L, int nresults, int ctx, lua_CFunction k) { + CallInfo *ci = L->ci; + luai_userstateyield(L, nresults); + lua_lock(L); + api_checknelems(L, nresults); + if (L->nny > 0) { + if (L != G(L)->mainthread) + luaG_runerror(L, "attempt to yield across a C-call boundary"); + else + luaG_runerror(L, "attempt to yield from outside a coroutine"); + } + L->status = LUA_YIELD; + ci->extra = savestack(L, ci->func); /* save current 'func' */ + if (isLua(ci)) { /* inside a hook? */ + api_check(L, k == NULL, "hooks cannot continue after yielding"); + } + else { + if ((ci->u.c.k = k) != NULL) /* is there a continuation? */ + ci->u.c.ctx = ctx; /* save context */ + ci->func = L->top - nresults - 1; /* protect stack below results */ + luaD_throw(L, LUA_YIELD); + } + lua_assert(ci->callstatus & CIST_HOOKED); /* must be inside a hook */ + lua_unlock(L); + return 0; /* return to 'luaD_hook' */ +} + + +int luaD_pcall (lua_State *L, Pfunc func, void *u, + ptrdiff_t old_top, ptrdiff_t ef) { + int status; + CallInfo *old_ci = L->ci; + lu_byte old_allowhooks = L->allowhook; + unsigned short old_nny = L->nny; + ptrdiff_t old_errfunc = L->errfunc; + L->errfunc = ef; + status = luaD_rawrunprotected(L, func, u); + if (status != LUA_OK) { /* an error occurred? */ + StkId oldtop = restorestack(L, old_top); + luaF_close(L, oldtop); /* close possible pending closures */ + seterrorobj(L, status, oldtop); + L->ci = old_ci; + L->allowhook = old_allowhooks; + L->nny = old_nny; + luaD_shrinkstack(L); + } + L->errfunc = old_errfunc; + return status; +} + + + +/* +** Execute a protected parser. +*/ +struct SParser { /* data to `f_parser' */ + ZIO *z; + Mbuffer buff; /* dynamic structure used by the scanner */ + Dyndata dyd; /* dynamic structures used by the parser */ + const char *mode; + const char *name; +}; + + +static void checkmode (lua_State *L, const char *mode, const char *x) { + if (mode && strchr(mode, x[0]) == NULL) { + luaO_pushfstring(L, + "attempt to load a %s chunk (mode is " LUA_QS ")", x, mode); + luaD_throw(L, LUA_ERRSYNTAX); + } +} + + +static void f_parser (lua_State *L, void *ud) { + int i; + Closure *cl; + struct SParser *p = cast(struct SParser *, ud); + int c = zgetc(p->z); /* read first character */ + if (c == LUA_SIGNATURE[0]) { + checkmode(L, p->mode, "binary"); + cl = luaU_undump(L, p->z, &p->buff, p->name); + } + else { + checkmode(L, p->mode, "text"); + cl = luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c); + } + lua_assert(cl->l.nupvalues == cl->l.p->sizeupvalues); + for (i = 0; i < cl->l.nupvalues; i++) { /* initialize upvalues */ + UpVal *up = luaF_newupval(L); + cl->l.upvals[i] = up; + luaC_objbarrier(L, cl, up); + } +} + + +int luaD_protectedparser (lua_State *L, ZIO *z, const char *name, + const char *mode) { + struct SParser p; + int status; + L->nny++; /* cannot yield during parsing */ + p.z = z; p.name = name; p.mode = mode; + p.dyd.actvar.arr = NULL; p.dyd.actvar.size = 0; + p.dyd.gt.arr = NULL; p.dyd.gt.size = 0; + p.dyd.label.arr = NULL; p.dyd.label.size = 0; + luaZ_initbuffer(L, &p.buff); + status = luaD_pcall(L, f_parser, &p, savestack(L, L->top), L->errfunc); + luaZ_freebuffer(L, &p.buff); + luaM_freearray(L, p.dyd.actvar.arr, p.dyd.actvar.size); + luaM_freearray(L, p.dyd.gt.arr, p.dyd.gt.size); + luaM_freearray(L, p.dyd.label.arr, p.dyd.label.size); + L->nny--; + return status; +} + + diff --git a/radio/src/lua/src/ldo.h b/radio/src/lua/src/ldo.h new file mode 100644 index 000000000..27b837d99 --- /dev/null +++ b/radio/src/lua/src/ldo.h @@ -0,0 +1,46 @@ +/* +** $Id: ldo.h,v 2.20 2011/11/29 15:55:08 roberto Exp $ +** Stack and Call structure of Lua +** See Copyright Notice in lua.h +*/ + +#ifndef ldo_h +#define ldo_h + + +#include "lobject.h" +#include "lstate.h" +#include "lzio.h" + + +#define luaD_checkstack(L,n) if (L->stack_last - L->top <= (n)) \ + luaD_growstack(L, n); else condmovestack(L); + + +#define incr_top(L) {L->top++; luaD_checkstack(L,0);} + +#define savestack(L,p) ((char *)(p) - (char *)L->stack) +#define restorestack(L,n) ((TValue *)((char *)L->stack + (n))) + + +/* type of protected functions, to be ran by `runprotected' */ +typedef void (*Pfunc) (lua_State *L, void *ud); + +LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name, + const char *mode); +LUAI_FUNC void luaD_hook (lua_State *L, int event, int line); +LUAI_FUNC int luaD_precall (lua_State *L, StkId func, int nresults); +LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults, + int allowyield); +LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u, + ptrdiff_t oldtop, ptrdiff_t ef); +LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult); +LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize); +LUAI_FUNC void luaD_growstack (lua_State *L, int n); +LUAI_FUNC void luaD_shrinkstack (lua_State *L); + +LUAI_FUNC l_noret luaD_throw (lua_State *L, int errcode); +LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud); + +#endif + diff --git a/radio/src/lua/src/ldump.c b/radio/src/lua/src/ldump.c new file mode 100644 index 000000000..d5e6a47cb --- /dev/null +++ b/radio/src/lua/src/ldump.c @@ -0,0 +1,173 @@ +/* +** $Id: ldump.c,v 2.17 2012/01/23 23:02:10 roberto Exp $ +** save precompiled Lua chunks +** See Copyright Notice in lua.h +*/ + +#include + +#define ldump_c +#define LUA_CORE + +#include "lua.h" + +#include "lobject.h" +#include "lstate.h" +#include "lundump.h" + +typedef struct { + lua_State* L; + lua_Writer writer; + void* data; + int strip; + int status; +} DumpState; + +#define DumpMem(b,n,size,D) DumpBlock(b,(n)*(size),D) +#define DumpVar(x,D) DumpMem(&x,1,sizeof(x),D) + +static void DumpBlock(const void* b, size_t size, DumpState* D) +{ + if (D->status==0) + { + lua_unlock(D->L); + D->status=(*D->writer)(D->L,b,size,D->data); + lua_lock(D->L); + } +} + +static void DumpChar(int y, DumpState* D) +{ + char x=(char)y; + DumpVar(x,D); +} + +static void DumpInt(int x, DumpState* D) +{ + DumpVar(x,D); +} + +static void DumpNumber(lua_Number x, DumpState* D) +{ + DumpVar(x,D); +} + +static void DumpVector(const void* b, int n, size_t size, DumpState* D) +{ + DumpInt(n,D); + DumpMem(b,n,size,D); +} + +static void DumpString(const TString* s, DumpState* D) +{ + if (s==NULL) + { + size_t size=0; + DumpVar(size,D); + } + else + { + size_t size=s->tsv.len+1; /* include trailing '\0' */ + DumpVar(size,D); + DumpBlock(getstr(s),size*sizeof(char),D); + } +} + +#define DumpCode(f,D) DumpVector(f->code,f->sizecode,sizeof(Instruction),D) + +static void DumpFunction(const Proto* f, DumpState* D); + +static void DumpConstants(const Proto* f, DumpState* D) +{ + int i,n=f->sizek; + DumpInt(n,D); + for (i=0; ik[i]; + DumpChar(ttypenv(o),D); + switch (ttypenv(o)) + { + case LUA_TNIL: + break; + case LUA_TBOOLEAN: + DumpChar(bvalue(o),D); + break; + case LUA_TNUMBER: + DumpNumber(nvalue(o),D); + break; + case LUA_TSTRING: + DumpString(rawtsvalue(o),D); + break; + default: lua_assert(0); + } + } + n=f->sizep; + DumpInt(n,D); + for (i=0; ip[i],D); +} + +static void DumpUpvalues(const Proto* f, DumpState* D) +{ + int i,n=f->sizeupvalues; + DumpInt(n,D); + for (i=0; iupvalues[i].instack,D); + DumpChar(f->upvalues[i].idx,D); + } +} + +static void DumpDebug(const Proto* f, DumpState* D) +{ + int i,n; + DumpString((D->strip) ? NULL : f->source,D); + n= (D->strip) ? 0 : f->sizelineinfo; + DumpVector(f->lineinfo,n,sizeof(int),D); + n= (D->strip) ? 0 : f->sizelocvars; + DumpInt(n,D); + for (i=0; ilocvars[i].varname,D); + DumpInt(f->locvars[i].startpc,D); + DumpInt(f->locvars[i].endpc,D); + } + n= (D->strip) ? 0 : f->sizeupvalues; + DumpInt(n,D); + for (i=0; iupvalues[i].name,D); +} + +static void DumpFunction(const Proto* f, DumpState* D) +{ + DumpInt(f->linedefined,D); + DumpInt(f->lastlinedefined,D); + DumpChar(f->numparams,D); + DumpChar(f->is_vararg,D); + DumpChar(f->maxstacksize,D); + DumpCode(f,D); + DumpConstants(f,D); + DumpUpvalues(f,D); + DumpDebug(f,D); +} + +static void DumpHeader(DumpState* D) +{ + lu_byte h[LUAC_HEADERSIZE]; + luaU_header(h); + DumpBlock(h,LUAC_HEADERSIZE,D); +} + +/* +** dump Lua function as precompiled chunk +*/ +int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip) +{ + DumpState D; + D.L=L; + D.writer=w; + D.data=data; + D.strip=strip; + D.status=0; + DumpHeader(&D); + DumpFunction(f,&D); + return D.status; +} diff --git a/radio/src/lua/src/lfunc.c b/radio/src/lua/src/lfunc.c new file mode 100644 index 000000000..c2128405b --- /dev/null +++ b/radio/src/lua/src/lfunc.c @@ -0,0 +1,161 @@ +/* +** $Id: lfunc.c,v 2.30 2012/10/03 12:36:46 roberto Exp $ +** Auxiliary functions to manipulate prototypes and closures +** See Copyright Notice in lua.h +*/ + + +#include + +#define lfunc_c +#define LUA_CORE + +#include "lua.h" + +#include "lfunc.h" +#include "lgc.h" +#include "lmem.h" +#include "lobject.h" +#include "lstate.h" + + + +Closure *luaF_newCclosure (lua_State *L, int n) { + Closure *c = &luaC_newobj(L, LUA_TCCL, sizeCclosure(n), NULL, 0)->cl; + c->c.nupvalues = cast_byte(n); + return c; +} + + +Closure *luaF_newLclosure (lua_State *L, int n) { + Closure *c = &luaC_newobj(L, LUA_TLCL, sizeLclosure(n), NULL, 0)->cl; + c->l.p = NULL; + c->l.nupvalues = cast_byte(n); + while (n--) c->l.upvals[n] = NULL; + return c; +} + + +UpVal *luaF_newupval (lua_State *L) { + UpVal *uv = &luaC_newobj(L, LUA_TUPVAL, sizeof(UpVal), NULL, 0)->uv; + uv->v = &uv->u.value; + setnilvalue(uv->v); + return uv; +} + + +UpVal *luaF_findupval (lua_State *L, StkId level) { + global_State *g = G(L); + GCObject **pp = &L->openupval; + UpVal *p; + UpVal *uv; + while (*pp != NULL && (p = gco2uv(*pp))->v >= level) { + GCObject *o = obj2gco(p); + lua_assert(p->v != &p->u.value); + lua_assert(!isold(o) || isold(obj2gco(L))); + if (p->v == level) { /* found a corresponding upvalue? */ + if (isdead(g, o)) /* is it dead? */ + changewhite(o); /* resurrect it */ + return p; + } + pp = &p->next; + } + /* not found: create a new one */ + uv = &luaC_newobj(L, LUA_TUPVAL, sizeof(UpVal), pp, 0)->uv; + uv->v = level; /* current value lives in the stack */ + uv->u.l.prev = &g->uvhead; /* double link it in `uvhead' list */ + uv->u.l.next = g->uvhead.u.l.next; + uv->u.l.next->u.l.prev = uv; + g->uvhead.u.l.next = uv; + lua_assert(uv->u.l.next->u.l.prev == uv && uv->u.l.prev->u.l.next == uv); + return uv; +} + + +static void unlinkupval (UpVal *uv) { + lua_assert(uv->u.l.next->u.l.prev == uv && uv->u.l.prev->u.l.next == uv); + uv->u.l.next->u.l.prev = uv->u.l.prev; /* remove from `uvhead' list */ + uv->u.l.prev->u.l.next = uv->u.l.next; +} + + +void luaF_freeupval (lua_State *L, UpVal *uv) { + if (uv->v != &uv->u.value) /* is it open? */ + unlinkupval(uv); /* remove from open list */ + luaM_free(L, uv); /* free upvalue */ +} + + +void luaF_close (lua_State *L, StkId level) { + UpVal *uv; + global_State *g = G(L); + while (L->openupval != NULL && (uv = gco2uv(L->openupval))->v >= level) { + GCObject *o = obj2gco(uv); + lua_assert(!isblack(o) && uv->v != &uv->u.value); + L->openupval = uv->next; /* remove from `open' list */ + if (isdead(g, o)) + luaF_freeupval(L, uv); /* free upvalue */ + else { + unlinkupval(uv); /* remove upvalue from 'uvhead' list */ + setobj(L, &uv->u.value, uv->v); /* move value to upvalue slot */ + uv->v = &uv->u.value; /* now current value lives here */ + gch(o)->next = g->allgc; /* link upvalue into 'allgc' list */ + g->allgc = o; + luaC_checkupvalcolor(g, uv); + } + } +} + + +Proto *luaF_newproto (lua_State *L) { + Proto *f = &luaC_newobj(L, LUA_TPROTO, sizeof(Proto), NULL, 0)->p; + f->k = NULL; + f->sizek = 0; + f->p = NULL; + f->sizep = 0; + f->code = NULL; + f->cache = NULL; + f->sizecode = 0; + f->lineinfo = NULL; + f->sizelineinfo = 0; + f->upvalues = NULL; + f->sizeupvalues = 0; + f->numparams = 0; + f->is_vararg = 0; + f->maxstacksize = 0; + f->locvars = NULL; + f->sizelocvars = 0; + f->linedefined = 0; + f->lastlinedefined = 0; + f->source = NULL; + return f; +} + + +void luaF_freeproto (lua_State *L, Proto *f) { + luaM_freearray(L, f->code, f->sizecode); + luaM_freearray(L, f->p, f->sizep); + luaM_freearray(L, f->k, f->sizek); + luaM_freearray(L, f->lineinfo, f->sizelineinfo); + luaM_freearray(L, f->locvars, f->sizelocvars); + luaM_freearray(L, f->upvalues, f->sizeupvalues); + luaM_free(L, f); +} + + +/* +** Look for n-th local variable at line `line' in function `func'. +** Returns NULL if not found. +*/ +const char *luaF_getlocalname (const Proto *f, int local_number, int pc) { + int i; + for (i = 0; isizelocvars && f->locvars[i].startpc <= pc; i++) { + if (pc < f->locvars[i].endpc) { /* is variable active? */ + local_number--; + if (local_number == 0) + return getstr(f->locvars[i].varname); + } + } + return NULL; /* not found */ +} + diff --git a/radio/src/lua/src/lfunc.h b/radio/src/lua/src/lfunc.h new file mode 100644 index 000000000..e236a717c --- /dev/null +++ b/radio/src/lua/src/lfunc.h @@ -0,0 +1,33 @@ +/* +** $Id: lfunc.h,v 2.8 2012/05/08 13:53:33 roberto Exp $ +** Auxiliary functions to manipulate prototypes and closures +** See Copyright Notice in lua.h +*/ + +#ifndef lfunc_h +#define lfunc_h + + +#include "lobject.h" + + +#define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ + cast(int, sizeof(TValue)*((n)-1))) + +#define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ + cast(int, sizeof(TValue *)*((n)-1))) + + +LUAI_FUNC Proto *luaF_newproto (lua_State *L); +LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems); +LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems); +LUAI_FUNC UpVal *luaF_newupval (lua_State *L); +LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); +LUAI_FUNC void luaF_close (lua_State *L, StkId level); +LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f); +LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv); +LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number, + int pc); + + +#endif diff --git a/radio/src/lua/src/lgc.c b/radio/src/lua/src/lgc.c new file mode 100644 index 000000000..535e988ae --- /dev/null +++ b/radio/src/lua/src/lgc.c @@ -0,0 +1,1213 @@ +/* +** $Id: lgc.c,v 2.140 2013/03/16 21:10:18 roberto Exp $ +** Garbage Collector +** See Copyright Notice in lua.h +*/ + +#include + +#define lgc_c +#define LUA_CORE + +#include "lua.h" + +#include "ldebug.h" +#include "ldo.h" +#include "lfunc.h" +#include "lgc.h" +#include "lmem.h" +#include "lobject.h" +#include "lstate.h" +#include "lstring.h" +#include "ltable.h" +#include "ltm.h" + + + +/* +** cost of sweeping one element (the size of a small object divided +** by some adjust for the sweep speed) +*/ +#define GCSWEEPCOST ((sizeof(TString) + 4) / 4) + +/* maximum number of elements to sweep in each single step */ +#define GCSWEEPMAX (cast_int((GCSTEPSIZE / GCSWEEPCOST) / 4)) + +/* maximum number of finalizers to call in each GC step */ +#define GCFINALIZENUM 4 + + +/* +** macro to adjust 'stepmul': 'stepmul' is actually used like +** 'stepmul / STEPMULADJ' (value chosen by tests) +*/ +#define STEPMULADJ 200 + + +/* +** macro to adjust 'pause': 'pause' is actually used like +** 'pause / PAUSEADJ' (value chosen by tests) +*/ +#define PAUSEADJ 100 + + +/* +** 'makewhite' erases all color bits plus the old bit and then +** sets only the current white bit +*/ +#define maskcolors (~(bit2mask(BLACKBIT, OLDBIT) | WHITEBITS)) +#define makewhite(g,x) \ + (gch(x)->marked = cast_byte((gch(x)->marked & maskcolors) | luaC_white(g))) + +#define white2gray(x) resetbits(gch(x)->marked, WHITEBITS) +#define black2gray(x) resetbit(gch(x)->marked, BLACKBIT) + + +#define isfinalized(x) testbit(gch(x)->marked, FINALIZEDBIT) + +#define checkdeadkey(n) lua_assert(!ttisdeadkey(gkey(n)) || ttisnil(gval(n))) + + +#define checkconsistency(obj) \ + lua_longassert(!iscollectable(obj) || righttt(obj)) + + +#define markvalue(g,o) { checkconsistency(o); \ + if (valiswhite(o)) reallymarkobject(g,gcvalue(o)); } + +#define markobject(g,t) { if ((t) && iswhite(obj2gco(t))) \ + reallymarkobject(g, obj2gco(t)); } + +static void reallymarkobject (global_State *g, GCObject *o); + + +/* +** {====================================================== +** Generic functions +** ======================================================= +*/ + + +/* +** one after last element in a hash array +*/ +#define gnodelast(h) gnode(h, cast(size_t, sizenode(h))) + + +/* +** link table 'h' into list pointed by 'p' +*/ +#define linktable(h,p) ((h)->gclist = *(p), *(p) = obj2gco(h)) + + +/* +** if key is not marked, mark its entry as dead (therefore removing it +** from the table) +*/ +static void removeentry (Node *n) { + lua_assert(ttisnil(gval(n))); + if (valiswhite(gkey(n))) + setdeadvalue(gkey(n)); /* unused and unmarked key; remove it */ +} + + +/* +** tells whether a key or value can be cleared from a weak +** table. Non-collectable objects are never removed from weak +** tables. Strings behave as `values', so are never removed too. for +** other objects: if really collected, cannot keep them; for objects +** being finalized, keep them in keys, but not in values +*/ +static int iscleared (global_State *g, const TValue *o) { + if (!iscollectable(o)) return 0; + else if (ttisstring(o)) { + markobject(g, rawtsvalue(o)); /* strings are `values', so are never weak */ + return 0; + } + else return iswhite(gcvalue(o)); +} + + +/* +** barrier that moves collector forward, that is, mark the white object +** being pointed by a black object. +*/ +void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) { + global_State *g = G(L); + lua_assert(isblack(o) && iswhite(v) && !isdead(g, v) && !isdead(g, o)); + lua_assert(g->gcstate != GCSpause); + lua_assert(gch(o)->tt != LUA_TTABLE); + if (keepinvariantout(g)) /* must keep invariant? */ + reallymarkobject(g, v); /* restore invariant */ + else { /* sweep phase */ + lua_assert(issweepphase(g)); + makewhite(g, o); /* mark main obj. as white to avoid other barriers */ + } +} + + +/* +** barrier that moves collector backward, that is, mark the black object +** pointing to a white object as gray again. (Current implementation +** only works for tables; access to 'gclist' is not uniform across +** different types.) +*/ +void luaC_barrierback_ (lua_State *L, GCObject *o) { + global_State *g = G(L); + lua_assert(isblack(o) && !isdead(g, o) && gch(o)->tt == LUA_TTABLE); + black2gray(o); /* make object gray (again) */ + gco2t(o)->gclist = g->grayagain; + g->grayagain = o; +} + + +/* +** barrier for prototypes. When creating first closure (cache is +** NULL), use a forward barrier; this may be the only closure of the +** prototype (if it is a "regular" function, with a single instance) +** and the prototype may be big, so it is better to avoid traversing +** it again. Otherwise, use a backward barrier, to avoid marking all +** possible instances. +*/ +LUAI_FUNC void luaC_barrierproto_ (lua_State *L, Proto *p, Closure *c) { + global_State *g = G(L); + lua_assert(isblack(obj2gco(p))); + if (p->cache == NULL) { /* first time? */ + luaC_objbarrier(L, p, c); + } + else { /* use a backward barrier */ + black2gray(obj2gco(p)); /* make prototype gray (again) */ + p->gclist = g->grayagain; + g->grayagain = obj2gco(p); + } +} + + +/* +** check color (and invariants) for an upvalue that was closed, +** i.e., moved into the 'allgc' list +*/ +void luaC_checkupvalcolor (global_State *g, UpVal *uv) { + GCObject *o = obj2gco(uv); + lua_assert(!isblack(o)); /* open upvalues are never black */ + if (isgray(o)) { + if (keepinvariant(g)) { + resetoldbit(o); /* see MOVE OLD rule */ + gray2black(o); /* it is being visited now */ + markvalue(g, uv->v); + } + else { + lua_assert(issweepphase(g)); + makewhite(g, o); + } + } +} + + +/* +** create a new collectable object (with given type and size) and link +** it to '*list'. 'offset' tells how many bytes to allocate before the +** object itself (used only by states). +*/ +GCObject *luaC_newobj (lua_State *L, int tt, size_t sz, GCObject **list, + int offset) { + global_State *g = G(L); + char *raw = cast(char *, luaM_newobject(L, novariant(tt), sz)); + GCObject *o = obj2gco(raw + offset); + if (list == NULL) + list = &g->allgc; /* standard list for collectable objects */ + gch(o)->marked = luaC_white(g); + gch(o)->tt = tt; + gch(o)->next = *list; + *list = o; + return o; +} + +/* }====================================================== */ + + + +/* +** {====================================================== +** Mark functions +** ======================================================= +*/ + + +/* +** mark an object. Userdata, strings, and closed upvalues are visited +** and turned black here. Other objects are marked gray and added +** to appropriate list to be visited (and turned black) later. (Open +** upvalues are already linked in 'headuv' list.) +*/ +static void reallymarkobject (global_State *g, GCObject *o) { + lu_mem size; + white2gray(o); + switch (gch(o)->tt) { + case LUA_TSHRSTR: + case LUA_TLNGSTR: { + size = sizestring(gco2ts(o)); + break; /* nothing else to mark; make it black */ + } + case LUA_TUSERDATA: { + Table *mt = gco2u(o)->metatable; + markobject(g, mt); + markobject(g, gco2u(o)->env); + size = sizeudata(gco2u(o)); + break; + } + case LUA_TUPVAL: { + UpVal *uv = gco2uv(o); + markvalue(g, uv->v); + if (uv->v != &uv->u.value) /* open? */ + return; /* open upvalues remain gray */ + size = sizeof(UpVal); + break; + } + case LUA_TLCL: { + gco2lcl(o)->gclist = g->gray; + g->gray = o; + return; + } + case LUA_TCCL: { + gco2ccl(o)->gclist = g->gray; + g->gray = o; + return; + } + case LUA_TTABLE: { + linktable(gco2t(o), &g->gray); + return; + } + case LUA_TTHREAD: { + gco2th(o)->gclist = g->gray; + g->gray = o; + return; + } + case LUA_TPROTO: { + gco2p(o)->gclist = g->gray; + g->gray = o; + return; + } + default: lua_assert(0); return; + } + gray2black(o); + g->GCmemtrav += size; +} + + +/* +** mark metamethods for basic types +*/ +static void markmt (global_State *g) { + int i; + for (i=0; i < LUA_NUMTAGS; i++) + markobject(g, g->mt[i]); +} + + +/* +** mark all objects in list of being-finalized +*/ +static void markbeingfnz (global_State *g) { + GCObject *o; + for (o = g->tobefnz; o != NULL; o = gch(o)->next) { + makewhite(g, o); + reallymarkobject(g, o); + } +} + + +/* +** mark all values stored in marked open upvalues. (See comment in +** 'lstate.h'.) +*/ +static void remarkupvals (global_State *g) { + UpVal *uv; + for (uv = g->uvhead.u.l.next; uv != &g->uvhead; uv = uv->u.l.next) { + if (isgray(obj2gco(uv))) + markvalue(g, uv->v); + } +} + + +/* +** mark root set and reset all gray lists, to start a new +** incremental (or full) collection +*/ +static void restartcollection (global_State *g) { + g->gray = g->grayagain = NULL; + g->weak = g->allweak = g->ephemeron = NULL; + markobject(g, g->mainthread); + markvalue(g, &g->l_registry); + markmt(g); + markbeingfnz(g); /* mark any finalizing object left from previous cycle */ +} + +/* }====================================================== */ + + +/* +** {====================================================== +** Traverse functions +** ======================================================= +*/ + +static void traverseweakvalue (global_State *g, Table *h) { + Node *n, *limit = gnodelast(h); + /* if there is array part, assume it may have white values (do not + traverse it just to check) */ + int hasclears = (h->sizearray > 0); + for (n = gnode(h, 0); n < limit; n++) { + checkdeadkey(n); + if (ttisnil(gval(n))) /* entry is empty? */ + removeentry(n); /* remove it */ + else { + lua_assert(!ttisnil(gkey(n))); + markvalue(g, gkey(n)); /* mark key */ + if (!hasclears && iscleared(g, gval(n))) /* is there a white value? */ + hasclears = 1; /* table will have to be cleared */ + } + } + if (hasclears) + linktable(h, &g->weak); /* has to be cleared later */ + else /* no white values */ + linktable(h, &g->grayagain); /* no need to clean */ +} + + +static int traverseephemeron (global_State *g, Table *h) { + int marked = 0; /* true if an object is marked in this traversal */ + int hasclears = 0; /* true if table has white keys */ + int prop = 0; /* true if table has entry "white-key -> white-value" */ + Node *n, *limit = gnodelast(h); + int i; + /* traverse array part (numeric keys are 'strong') */ + for (i = 0; i < h->sizearray; i++) { + if (valiswhite(&h->array[i])) { + marked = 1; + reallymarkobject(g, gcvalue(&h->array[i])); + } + } + /* traverse hash part */ + for (n = gnode(h, 0); n < limit; n++) { + checkdeadkey(n); + if (ttisnil(gval(n))) /* entry is empty? */ + removeentry(n); /* remove it */ + else if (iscleared(g, gkey(n))) { /* key is not marked (yet)? */ + hasclears = 1; /* table must be cleared */ + if (valiswhite(gval(n))) /* value not marked yet? */ + prop = 1; /* must propagate again */ + } + else if (valiswhite(gval(n))) { /* value not marked yet? */ + marked = 1; + reallymarkobject(g, gcvalue(gval(n))); /* mark it now */ + } + } + if (prop) + linktable(h, &g->ephemeron); /* have to propagate again */ + else if (hasclears) /* does table have white keys? */ + linktable(h, &g->allweak); /* may have to clean white keys */ + else /* no white keys */ + linktable(h, &g->grayagain); /* no need to clean */ + return marked; +} + + +static void traversestrongtable (global_State *g, Table *h) { + Node *n, *limit = gnodelast(h); + int i; + for (i = 0; i < h->sizearray; i++) /* traverse array part */ + markvalue(g, &h->array[i]); + for (n = gnode(h, 0); n < limit; n++) { /* traverse hash part */ + checkdeadkey(n); + if (ttisnil(gval(n))) /* entry is empty? */ + removeentry(n); /* remove it */ + else { + lua_assert(!ttisnil(gkey(n))); + markvalue(g, gkey(n)); /* mark key */ + markvalue(g, gval(n)); /* mark value */ + } + } +} + + +static lu_mem traversetable (global_State *g, Table *h) { + const char *weakkey, *weakvalue; + const TValue *mode = gfasttm(g, h->metatable, TM_MODE); + markobject(g, h->metatable); + if (mode && ttisstring(mode) && /* is there a weak mode? */ + ((weakkey = strchr(svalue(mode), 'k')), + (weakvalue = strchr(svalue(mode), 'v')), + (weakkey || weakvalue))) { /* is really weak? */ + black2gray(obj2gco(h)); /* keep table gray */ + if (!weakkey) /* strong keys? */ + traverseweakvalue(g, h); + else if (!weakvalue) /* strong values? */ + traverseephemeron(g, h); + else /* all weak */ + linktable(h, &g->allweak); /* nothing to traverse now */ + } + else /* not weak */ + traversestrongtable(g, h); + return sizeof(Table) + sizeof(TValue) * h->sizearray + + sizeof(Node) * cast(size_t, sizenode(h)); +} + + +static int traverseproto (global_State *g, Proto *f) { + int i; + if (f->cache && iswhite(obj2gco(f->cache))) + f->cache = NULL; /* allow cache to be collected */ + markobject(g, f->source); + for (i = 0; i < f->sizek; i++) /* mark literals */ + markvalue(g, &f->k[i]); + for (i = 0; i < f->sizeupvalues; i++) /* mark upvalue names */ + markobject(g, f->upvalues[i].name); + for (i = 0; i < f->sizep; i++) /* mark nested protos */ + markobject(g, f->p[i]); + for (i = 0; i < f->sizelocvars; i++) /* mark local-variable names */ + markobject(g, f->locvars[i].varname); + return sizeof(Proto) + sizeof(Instruction) * f->sizecode + + sizeof(Proto *) * f->sizep + + sizeof(TValue) * f->sizek + + sizeof(int) * f->sizelineinfo + + sizeof(LocVar) * f->sizelocvars + + sizeof(Upvaldesc) * f->sizeupvalues; +} + + +static lu_mem traverseCclosure (global_State *g, CClosure *cl) { + int i; + for (i = 0; i < cl->nupvalues; i++) /* mark its upvalues */ + markvalue(g, &cl->upvalue[i]); + return sizeCclosure(cl->nupvalues); +} + +static lu_mem traverseLclosure (global_State *g, LClosure *cl) { + int i; + markobject(g, cl->p); /* mark its prototype */ + for (i = 0; i < cl->nupvalues; i++) /* mark its upvalues */ + markobject(g, cl->upvals[i]); + return sizeLclosure(cl->nupvalues); +} + + +static lu_mem traversestack (global_State *g, lua_State *th) { + StkId o = th->stack; + if (o == NULL) + return 1; /* stack not completely built yet */ + for (; o < th->top; o++) + markvalue(g, o); + if (g->gcstate == GCSatomic) { /* final traversal? */ + StkId lim = th->stack + th->stacksize; /* real end of stack */ + for (; o < lim; o++) /* clear not-marked stack slice */ + setnilvalue(o); + } + return sizeof(lua_State) + sizeof(TValue) * th->stacksize; +} + + +/* +** traverse one gray object, turning it to black (except for threads, +** which are always gray). +*/ +static void propagatemark (global_State *g) { + lu_mem size; + GCObject *o = g->gray; + lua_assert(isgray(o)); + gray2black(o); + switch (gch(o)->tt) { + case LUA_TTABLE: { + Table *h = gco2t(o); + g->gray = h->gclist; /* remove from 'gray' list */ + size = traversetable(g, h); + break; + } + case LUA_TLCL: { + LClosure *cl = gco2lcl(o); + g->gray = cl->gclist; /* remove from 'gray' list */ + size = traverseLclosure(g, cl); + break; + } + case LUA_TCCL: { + CClosure *cl = gco2ccl(o); + g->gray = cl->gclist; /* remove from 'gray' list */ + size = traverseCclosure(g, cl); + break; + } + case LUA_TTHREAD: { + lua_State *th = gco2th(o); + g->gray = th->gclist; /* remove from 'gray' list */ + th->gclist = g->grayagain; + g->grayagain = o; /* insert into 'grayagain' list */ + black2gray(o); + size = traversestack(g, th); + break; + } + case LUA_TPROTO: { + Proto *p = gco2p(o); + g->gray = p->gclist; /* remove from 'gray' list */ + size = traverseproto(g, p); + break; + } + default: lua_assert(0); return; + } + g->GCmemtrav += size; +} + + +static void propagateall (global_State *g) { + while (g->gray) propagatemark(g); +} + + +static void propagatelist (global_State *g, GCObject *l) { + lua_assert(g->gray == NULL); /* no grays left */ + g->gray = l; + propagateall(g); /* traverse all elements from 'l' */ +} + +/* +** retraverse all gray lists. Because tables may be reinserted in other +** lists when traversed, traverse the original lists to avoid traversing +** twice the same table (which is not wrong, but inefficient) +*/ +static void retraversegrays (global_State *g) { + GCObject *weak = g->weak; /* save original lists */ + GCObject *grayagain = g->grayagain; + GCObject *ephemeron = g->ephemeron; + g->weak = g->grayagain = g->ephemeron = NULL; + propagateall(g); /* traverse main gray list */ + propagatelist(g, grayagain); + propagatelist(g, weak); + propagatelist(g, ephemeron); +} + + +static void convergeephemerons (global_State *g) { + int changed; + do { + GCObject *w; + GCObject *next = g->ephemeron; /* get ephemeron list */ + g->ephemeron = NULL; /* tables will return to this list when traversed */ + changed = 0; + while ((w = next) != NULL) { + next = gco2t(w)->gclist; + if (traverseephemeron(g, gco2t(w))) { /* traverse marked some value? */ + propagateall(g); /* propagate changes */ + changed = 1; /* will have to revisit all ephemeron tables */ + } + } + } while (changed); +} + +/* }====================================================== */ + + +/* +** {====================================================== +** Sweep Functions +** ======================================================= +*/ + + +/* +** clear entries with unmarked keys from all weaktables in list 'l' up +** to element 'f' +*/ +static void clearkeys (global_State *g, GCObject *l, GCObject *f) { + for (; l != f; l = gco2t(l)->gclist) { + Table *h = gco2t(l); + Node *n, *limit = gnodelast(h); + for (n = gnode(h, 0); n < limit; n++) { + if (!ttisnil(gval(n)) && (iscleared(g, gkey(n)))) { + setnilvalue(gval(n)); /* remove value ... */ + removeentry(n); /* and remove entry from table */ + } + } + } +} + + +/* +** clear entries with unmarked values from all weaktables in list 'l' up +** to element 'f' +*/ +static void clearvalues (global_State *g, GCObject *l, GCObject *f) { + for (; l != f; l = gco2t(l)->gclist) { + Table *h = gco2t(l); + Node *n, *limit = gnodelast(h); + int i; + for (i = 0; i < h->sizearray; i++) { + TValue *o = &h->array[i]; + if (iscleared(g, o)) /* value was collected? */ + setnilvalue(o); /* remove value */ + } + for (n = gnode(h, 0); n < limit; n++) { + if (!ttisnil(gval(n)) && iscleared(g, gval(n))) { + setnilvalue(gval(n)); /* remove value ... */ + removeentry(n); /* and remove entry from table */ + } + } + } +} + + +static void freeobj (lua_State *L, GCObject *o) { + switch (gch(o)->tt) { + case LUA_TPROTO: luaF_freeproto(L, gco2p(o)); break; + case LUA_TLCL: { + luaM_freemem(L, o, sizeLclosure(gco2lcl(o)->nupvalues)); + break; + } + case LUA_TCCL: { + luaM_freemem(L, o, sizeCclosure(gco2ccl(o)->nupvalues)); + break; + } + case LUA_TUPVAL: luaF_freeupval(L, gco2uv(o)); break; + case LUA_TTABLE: luaH_free(L, gco2t(o)); break; + case LUA_TTHREAD: luaE_freethread(L, gco2th(o)); break; + case LUA_TUSERDATA: luaM_freemem(L, o, sizeudata(gco2u(o))); break; + case LUA_TSHRSTR: + G(L)->strt.nuse--; + /* go through */ + case LUA_TLNGSTR: { + luaM_freemem(L, o, sizestring(gco2ts(o))); + break; + } + default: lua_assert(0); + } +} + + +#define sweepwholelist(L,p) sweeplist(L,p,MAX_LUMEM) +static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count); + + +/* +** sweep the (open) upvalues of a thread and resize its stack and +** list of call-info structures. +*/ +static void sweepthread (lua_State *L, lua_State *L1) { + if (L1->stack == NULL) return; /* stack not completely built yet */ + sweepwholelist(L, &L1->openupval); /* sweep open upvalues */ + luaE_freeCI(L1); /* free extra CallInfo slots */ + /* should not change the stack during an emergency gc cycle */ + if (G(L)->gckind != KGC_EMERGENCY) + luaD_shrinkstack(L1); +} + + +/* +** sweep at most 'count' elements from a list of GCObjects erasing dead +** objects, where a dead (not alive) object is one marked with the "old" +** (non current) white and not fixed. +** In non-generational mode, change all non-dead objects back to white, +** preparing for next collection cycle. +** In generational mode, keep black objects black, and also mark them as +** old; stop when hitting an old object, as all objects after that +** one will be old too. +** When object is a thread, sweep its list of open upvalues too. +*/ +static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count) { + global_State *g = G(L); + int ow = otherwhite(g); + int toclear, toset; /* bits to clear and to set in all live objects */ + int tostop; /* stop sweep when this is true */ + if (isgenerational(g)) { /* generational mode? */ + toclear = ~0; /* clear nothing */ + toset = bitmask(OLDBIT); /* set the old bit of all surviving objects */ + tostop = bitmask(OLDBIT); /* do not sweep old generation */ + } + else { /* normal mode */ + toclear = maskcolors; /* clear all color bits + old bit */ + toset = luaC_white(g); /* make object white */ + tostop = 0; /* do not stop */ + } + while (*p != NULL && count-- > 0) { + GCObject *curr = *p; + int marked = gch(curr)->marked; + if (isdeadm(ow, marked)) { /* is 'curr' dead? */ + *p = gch(curr)->next; /* remove 'curr' from list */ + freeobj(L, curr); /* erase 'curr' */ + } + else { + if (testbits(marked, tostop)) + return NULL; /* stop sweeping this list */ + if (gch(curr)->tt == LUA_TTHREAD) + sweepthread(L, gco2th(curr)); /* sweep thread's upvalues */ + /* update marks */ + gch(curr)->marked = cast_byte((marked & toclear) | toset); + p = &gch(curr)->next; /* go to next element */ + } + } + return (*p == NULL) ? NULL : p; +} + + +/* +** sweep a list until a live object (or end of list) +*/ +static GCObject **sweeptolive (lua_State *L, GCObject **p, int *n) { + GCObject ** old = p; + int i = 0; + do { + i++; + p = sweeplist(L, p, 1); + } while (p == old); + if (n) *n += i; + return p; +} + +/* }====================================================== */ + + +/* +** {====================================================== +** Finalization +** ======================================================= +*/ + +static void checkSizes (lua_State *L) { + global_State *g = G(L); + if (g->gckind != KGC_EMERGENCY) { /* do not change sizes in emergency */ + int hs = g->strt.size / 2; /* half the size of the string table */ + if (g->strt.nuse < cast(lu_int32, hs)) /* using less than that half? */ + luaS_resize(L, hs); /* halve its size */ + luaZ_freebuffer(L, &g->buff); /* free concatenation buffer */ + } +} + + +static GCObject *udata2finalize (global_State *g) { + GCObject *o = g->tobefnz; /* get first element */ + lua_assert(isfinalized(o)); + g->tobefnz = gch(o)->next; /* remove it from 'tobefnz' list */ + gch(o)->next = g->allgc; /* return it to 'allgc' list */ + g->allgc = o; + resetbit(gch(o)->marked, SEPARATED); /* mark that it is not in 'tobefnz' */ + lua_assert(!isold(o)); /* see MOVE OLD rule */ + if (!keepinvariantout(g)) /* not keeping invariant? */ + makewhite(g, o); /* "sweep" object */ + return o; +} + + +static void dothecall (lua_State *L, void *ud) { + UNUSED(ud); + luaD_call(L, L->top - 2, 0, 0); +} + + +static void GCTM (lua_State *L, int propagateerrors) { + global_State *g = G(L); + const TValue *tm; + TValue v; + setgcovalue(L, &v, udata2finalize(g)); + tm = luaT_gettmbyobj(L, &v, TM_GC); + if (tm != NULL && ttisfunction(tm)) { /* is there a finalizer? */ + int status; + lu_byte oldah = L->allowhook; + int running = g->gcrunning; + L->allowhook = 0; /* stop debug hooks during GC metamethod */ + g->gcrunning = 0; /* avoid GC steps */ + setobj2s(L, L->top, tm); /* push finalizer... */ + setobj2s(L, L->top + 1, &v); /* ... and its argument */ + L->top += 2; /* and (next line) call the finalizer */ + status = luaD_pcall(L, dothecall, NULL, savestack(L, L->top - 2), 0); + L->allowhook = oldah; /* restore hooks */ + g->gcrunning = running; /* restore state */ + if (status != LUA_OK && propagateerrors) { /* error while running __gc? */ + if (status == LUA_ERRRUN) { /* is there an error object? */ + const char *msg = (ttisstring(L->top - 1)) + ? svalue(L->top - 1) + : "no message"; + luaO_pushfstring(L, "error in __gc metamethod (%s)", msg); + status = LUA_ERRGCMM; /* error in __gc metamethod */ + } + luaD_throw(L, status); /* re-throw error */ + } + } +} + + +/* +** move all unreachable objects (or 'all' objects) that need +** finalization from list 'finobj' to list 'tobefnz' (to be finalized) +*/ +static void separatetobefnz (lua_State *L, int all) { + global_State *g = G(L); + GCObject **p = &g->finobj; + GCObject *curr; + GCObject **lastnext = &g->tobefnz; + /* find last 'next' field in 'tobefnz' list (to add elements in its end) */ + while (*lastnext != NULL) + lastnext = &gch(*lastnext)->next; + while ((curr = *p) != NULL) { /* traverse all finalizable objects */ + lua_assert(!isfinalized(curr)); + lua_assert(testbit(gch(curr)->marked, SEPARATED)); + if (!(iswhite(curr) || all)) /* not being collected? */ + p = &gch(curr)->next; /* don't bother with it */ + else { + l_setbit(gch(curr)->marked, FINALIZEDBIT); /* won't be finalized again */ + *p = gch(curr)->next; /* remove 'curr' from 'finobj' list */ + gch(curr)->next = *lastnext; /* link at the end of 'tobefnz' list */ + *lastnext = curr; + lastnext = &gch(curr)->next; + } + } +} + + +/* +** if object 'o' has a finalizer, remove it from 'allgc' list (must +** search the list to find it) and link it in 'finobj' list. +*/ +void luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt) { + global_State *g = G(L); + if (testbit(gch(o)->marked, SEPARATED) || /* obj. is already separated... */ + isfinalized(o) || /* ... or is finalized... */ + gfasttm(g, mt, TM_GC) == NULL) /* or has no finalizer? */ + return; /* nothing to be done */ + else { /* move 'o' to 'finobj' list */ + GCObject **p; + GCheader *ho = gch(o); + if (g->sweepgc == &ho->next) { /* avoid removing current sweep object */ + lua_assert(issweepphase(g)); + g->sweepgc = sweeptolive(L, g->sweepgc, NULL); + } + /* search for pointer pointing to 'o' */ + for (p = &g->allgc; *p != o; p = &gch(*p)->next) { /* empty */ } + *p = ho->next; /* remove 'o' from root list */ + ho->next = g->finobj; /* link it in list 'finobj' */ + g->finobj = o; + l_setbit(ho->marked, SEPARATED); /* mark it as such */ + if (!keepinvariantout(g)) /* not keeping invariant? */ + makewhite(g, o); /* "sweep" object */ + else + resetoldbit(o); /* see MOVE OLD rule */ + } +} + +/* }====================================================== */ + + +/* +** {====================================================== +** GC control +** ======================================================= +*/ + + +/* +** set a reasonable "time" to wait before starting a new GC cycle; +** cycle will start when memory use hits threshold +*/ +static void setpause (global_State *g, l_mem estimate) { + l_mem debt, threshold; + estimate = estimate / PAUSEADJ; /* adjust 'estimate' */ + threshold = (g->gcpause < MAX_LMEM / estimate) /* overflow? */ + ? estimate * g->gcpause /* no overflow */ + : MAX_LMEM; /* overflow; truncate to maximum */ + debt = -cast(l_mem, threshold - gettotalbytes(g)); + luaE_setdebt(g, debt); +} + + +#define sweepphases \ + (bitmask(GCSsweepstring) | bitmask(GCSsweepudata) | bitmask(GCSsweep)) + + +/* +** enter first sweep phase (strings) and prepare pointers for other +** sweep phases. The calls to 'sweeptolive' make pointers point to an +** object inside the list (instead of to the header), so that the real +** sweep do not need to skip objects created between "now" and the start +** of the real sweep. +** Returns how many objects it swept. +*/ +static int entersweep (lua_State *L) { + global_State *g = G(L); + int n = 0; + g->gcstate = GCSsweepstring; + lua_assert(g->sweepgc == NULL && g->sweepfin == NULL); + /* prepare to sweep strings, finalizable objects, and regular objects */ + g->sweepstrgc = 0; + g->sweepfin = sweeptolive(L, &g->finobj, &n); + g->sweepgc = sweeptolive(L, &g->allgc, &n); + return n; +} + + +/* +** change GC mode +*/ +void luaC_changemode (lua_State *L, int mode) { + global_State *g = G(L); + if (mode == g->gckind) return; /* nothing to change */ + if (mode == KGC_GEN) { /* change to generational mode */ + /* make sure gray lists are consistent */ + luaC_runtilstate(L, bitmask(GCSpropagate)); + g->GCestimate = gettotalbytes(g); + g->gckind = KGC_GEN; + } + else { /* change to incremental mode */ + /* sweep all objects to turn them back to white + (as white has not changed, nothing extra will be collected) */ + g->gckind = KGC_NORMAL; + entersweep(L); + luaC_runtilstate(L, ~sweepphases); + } +} + + +/* +** call all pending finalizers +*/ +static void callallpendingfinalizers (lua_State *L, int propagateerrors) { + global_State *g = G(L); + while (g->tobefnz) { + resetoldbit(g->tobefnz); + GCTM(L, propagateerrors); + } +} + + +void luaC_freeallobjects (lua_State *L) { + global_State *g = G(L); + int i; + separatetobefnz(L, 1); /* separate all objects with finalizers */ + lua_assert(g->finobj == NULL); + callallpendingfinalizers(L, 0); + g->currentwhite = WHITEBITS; /* this "white" makes all objects look dead */ + g->gckind = KGC_NORMAL; + sweepwholelist(L, &g->finobj); /* finalizers can create objs. in 'finobj' */ + sweepwholelist(L, &g->allgc); + for (i = 0; i < g->strt.size; i++) /* free all string lists */ + sweepwholelist(L, &g->strt.hash[i]); + lua_assert(g->strt.nuse == 0); +} + + +static l_mem atomic (lua_State *L) { + global_State *g = G(L); + l_mem work = -cast(l_mem, g->GCmemtrav); /* start counting work */ + GCObject *origweak, *origall; + lua_assert(!iswhite(obj2gco(g->mainthread))); + markobject(g, L); /* mark running thread */ + /* registry and global metatables may be changed by API */ + markvalue(g, &g->l_registry); + markmt(g); /* mark basic metatables */ + /* remark occasional upvalues of (maybe) dead threads */ + remarkupvals(g); + propagateall(g); /* propagate changes */ + work += g->GCmemtrav; /* stop counting (do not (re)count grays) */ + /* traverse objects caught by write barrier and by 'remarkupvals' */ + retraversegrays(g); + work -= g->GCmemtrav; /* restart counting */ + convergeephemerons(g); + /* at this point, all strongly accessible objects are marked. */ + /* clear values from weak tables, before checking finalizers */ + clearvalues(g, g->weak, NULL); + clearvalues(g, g->allweak, NULL); + origweak = g->weak; origall = g->allweak; + work += g->GCmemtrav; /* stop counting (objects being finalized) */ + separatetobefnz(L, 0); /* separate objects to be finalized */ + markbeingfnz(g); /* mark objects that will be finalized */ + propagateall(g); /* remark, to propagate `preserveness' */ + work -= g->GCmemtrav; /* restart counting */ + convergeephemerons(g); + /* at this point, all resurrected objects are marked. */ + /* remove dead objects from weak tables */ + clearkeys(g, g->ephemeron, NULL); /* clear keys from all ephemeron tables */ + clearkeys(g, g->allweak, NULL); /* clear keys from all allweak tables */ + /* clear values from resurrected weak tables */ + clearvalues(g, g->weak, origweak); + clearvalues(g, g->allweak, origall); + g->currentwhite = cast_byte(otherwhite(g)); /* flip current white */ + work += g->GCmemtrav; /* complete counting */ + return work; /* estimate of memory marked by 'atomic' */ +} + + +static lu_mem singlestep (lua_State *L) { + global_State *g = G(L); + switch (g->gcstate) { + case GCSpause: { + /* start to count memory traversed */ + g->GCmemtrav = g->strt.size * sizeof(GCObject*); + lua_assert(!isgenerational(g)); + restartcollection(g); + g->gcstate = GCSpropagate; + return g->GCmemtrav; + } + case GCSpropagate: { + if (g->gray) { + lu_mem oldtrav = g->GCmemtrav; + propagatemark(g); + return g->GCmemtrav - oldtrav; /* memory traversed in this step */ + } + else { /* no more `gray' objects */ + lu_mem work; + int sw; + g->gcstate = GCSatomic; /* finish mark phase */ + g->GCestimate = g->GCmemtrav; /* save what was counted */; + work = atomic(L); /* add what was traversed by 'atomic' */ + g->GCestimate += work; /* estimate of total memory traversed */ + sw = entersweep(L); + return work + sw * GCSWEEPCOST; + } + } + case GCSsweepstring: { + int i; + for (i = 0; i < GCSWEEPMAX && g->sweepstrgc + i < g->strt.size; i++) + sweepwholelist(L, &g->strt.hash[g->sweepstrgc + i]); + g->sweepstrgc += i; + if (g->sweepstrgc >= g->strt.size) /* no more strings to sweep? */ + g->gcstate = GCSsweepudata; + return i * GCSWEEPCOST; + } + case GCSsweepudata: { + if (g->sweepfin) { + g->sweepfin = sweeplist(L, g->sweepfin, GCSWEEPMAX); + return GCSWEEPMAX*GCSWEEPCOST; + } + else { + g->gcstate = GCSsweep; + return 0; + } + } + case GCSsweep: { + if (g->sweepgc) { + g->sweepgc = sweeplist(L, g->sweepgc, GCSWEEPMAX); + return GCSWEEPMAX*GCSWEEPCOST; + } + else { + /* sweep main thread */ + GCObject *mt = obj2gco(g->mainthread); + sweeplist(L, &mt, 1); + checkSizes(L); + g->gcstate = GCSpause; /* finish collection */ + return GCSWEEPCOST; + } + } + default: lua_assert(0); return 0; + } +} + + +/* +** advances the garbage collector until it reaches a state allowed +** by 'statemask' +*/ +void luaC_runtilstate (lua_State *L, int statesmask) { + global_State *g = G(L); + while (!testbit(statesmask, g->gcstate)) + singlestep(L); +} + + +static void generationalcollection (lua_State *L) { + global_State *g = G(L); + lua_assert(g->gcstate == GCSpropagate); + if (g->GCestimate == 0) { /* signal for another major collection? */ + luaC_fullgc(L, 0); /* perform a full regular collection */ + g->GCestimate = gettotalbytes(g); /* update control */ + } + else { + lu_mem estimate = g->GCestimate; + luaC_runtilstate(L, bitmask(GCSpause)); /* run complete (minor) cycle */ + g->gcstate = GCSpropagate; /* skip restart */ + if (gettotalbytes(g) > (estimate / 100) * g->gcmajorinc) + g->GCestimate = 0; /* signal for a major collection */ + else + g->GCestimate = estimate; /* keep estimate from last major coll. */ + + } + setpause(g, gettotalbytes(g)); + lua_assert(g->gcstate == GCSpropagate); +} + + +static void incstep (lua_State *L) { + global_State *g = G(L); + l_mem debt = g->GCdebt; + int stepmul = g->gcstepmul; + if (stepmul < 40) stepmul = 40; /* avoid ridiculous low values (and 0) */ + /* convert debt from Kb to 'work units' (avoid zero debt and overflows) */ + debt = (debt / STEPMULADJ) + 1; + debt = (debt < MAX_LMEM / stepmul) ? debt * stepmul : MAX_LMEM; + do { /* always perform at least one single step */ + lu_mem work = singlestep(L); /* do some work */ + debt -= work; + } while (debt > -GCSTEPSIZE && g->gcstate != GCSpause); + if (g->gcstate == GCSpause) + setpause(g, g->GCestimate); /* pause until next cycle */ + else { + debt = (debt / stepmul) * STEPMULADJ; /* convert 'work units' to Kb */ + luaE_setdebt(g, debt); + } +} + + +/* +** performs a basic GC step +*/ +void luaC_forcestep (lua_State *L) { + global_State *g = G(L); + int i; + if (isgenerational(g)) generationalcollection(L); + else incstep(L); + /* run a few finalizers (or all of them at the end of a collect cycle) */ + for (i = 0; g->tobefnz && (i < GCFINALIZENUM || g->gcstate == GCSpause); i++) + GCTM(L, 1); /* call one finalizer */ +} + + +/* +** performs a basic GC step only if collector is running +*/ +void luaC_step (lua_State *L) { + global_State *g = G(L); + if (g->gcrunning) luaC_forcestep(L); + else luaE_setdebt(g, -GCSTEPSIZE); /* avoid being called too often */ +} + + + +/* +** performs a full GC cycle; if "isemergency", does not call +** finalizers (which could change stack positions) +*/ +void luaC_fullgc (lua_State *L, int isemergency) { + global_State *g = G(L); + int origkind = g->gckind; + lua_assert(origkind != KGC_EMERGENCY); + if (isemergency) /* do not run finalizers during emergency GC */ + g->gckind = KGC_EMERGENCY; + else { + g->gckind = KGC_NORMAL; + callallpendingfinalizers(L, 1); + } + if (keepinvariant(g)) { /* may there be some black objects? */ + /* must sweep all objects to turn them back to white + (as white has not changed, nothing will be collected) */ + entersweep(L); + } + /* finish any pending sweep phase to start a new cycle */ + luaC_runtilstate(L, bitmask(GCSpause)); + luaC_runtilstate(L, ~bitmask(GCSpause)); /* start new collection */ + luaC_runtilstate(L, bitmask(GCSpause)); /* run entire collection */ + if (origkind == KGC_GEN) { /* generational mode? */ + /* generational mode must be kept in propagate phase */ + luaC_runtilstate(L, bitmask(GCSpropagate)); + } + g->gckind = origkind; + setpause(g, gettotalbytes(g)); + if (!isemergency) /* do not run finalizers during emergency GC */ + callallpendingfinalizers(L, 1); +} + +/* }====================================================== */ + + diff --git a/radio/src/lua/src/lgc.h b/radio/src/lua/src/lgc.h new file mode 100644 index 000000000..dee270b4d --- /dev/null +++ b/radio/src/lua/src/lgc.h @@ -0,0 +1,157 @@ +/* +** $Id: lgc.h,v 2.58 2012/09/11 12:53:08 roberto Exp $ +** Garbage Collector +** See Copyright Notice in lua.h +*/ + +#ifndef lgc_h +#define lgc_h + + +#include "lobject.h" +#include "lstate.h" + +/* +** Collectable objects may have one of three colors: white, which +** means the object is not marked; gray, which means the +** object is marked, but its references may be not marked; and +** black, which means that the object and all its references are marked. +** The main invariant of the garbage collector, while marking objects, +** is that a black object can never point to a white one. Moreover, +** any gray object must be in a "gray list" (gray, grayagain, weak, +** allweak, ephemeron) so that it can be visited again before finishing +** the collection cycle. These lists have no meaning when the invariant +** is not being enforced (e.g., sweep phase). +*/ + + + +/* how much to allocate before next GC step */ +#if !defined(GCSTEPSIZE) +/* ~100 small strings */ +#define GCSTEPSIZE (cast_int(100 * sizeof(TString))) +#endif + + +/* +** Possible states of the Garbage Collector +*/ +#define GCSpropagate 0 +#define GCSatomic 1 +#define GCSsweepstring 2 +#define GCSsweepudata 3 +#define GCSsweep 4 +#define GCSpause 5 + + +#define issweepphase(g) \ + (GCSsweepstring <= (g)->gcstate && (g)->gcstate <= GCSsweep) + +#define isgenerational(g) ((g)->gckind == KGC_GEN) + +/* +** macros to tell when main invariant (white objects cannot point to black +** ones) must be kept. During a non-generational collection, the sweep +** phase may break the invariant, as objects turned white may point to +** still-black objects. The invariant is restored when sweep ends and +** all objects are white again. During a generational collection, the +** invariant must be kept all times. +*/ + +#define keepinvariant(g) (isgenerational(g) || g->gcstate <= GCSatomic) + + +/* +** Outside the collector, the state in generational mode is kept in +** 'propagate', so 'keepinvariant' is always true. +*/ +#define keepinvariantout(g) \ + check_exp(g->gcstate == GCSpropagate || !isgenerational(g), \ + g->gcstate <= GCSatomic) + + +/* +** some useful bit tricks +*/ +#define resetbits(x,m) ((x) &= cast(lu_byte, ~(m))) +#define setbits(x,m) ((x) |= (m)) +#define testbits(x,m) ((x) & (m)) +#define bitmask(b) (1<<(b)) +#define bit2mask(b1,b2) (bitmask(b1) | bitmask(b2)) +#define l_setbit(x,b) setbits(x, bitmask(b)) +#define resetbit(x,b) resetbits(x, bitmask(b)) +#define testbit(x,b) testbits(x, bitmask(b)) + + +/* Layout for bit use in `marked' field: */ +#define WHITE0BIT 0 /* object is white (type 0) */ +#define WHITE1BIT 1 /* object is white (type 1) */ +#define BLACKBIT 2 /* object is black */ +#define FINALIZEDBIT 3 /* object has been separated for finalization */ +#define SEPARATED 4 /* object is in 'finobj' list or in 'tobefnz' */ +#define FIXEDBIT 5 /* object is fixed (should not be collected) */ +#define OLDBIT 6 /* object is old (only in generational mode) */ +/* bit 7 is currently used by tests (luaL_checkmemory) */ + +#define WHITEBITS bit2mask(WHITE0BIT, WHITE1BIT) + + +#define iswhite(x) testbits((x)->gch.marked, WHITEBITS) +#define isblack(x) testbit((x)->gch.marked, BLACKBIT) +#define isgray(x) /* neither white nor black */ \ + (!testbits((x)->gch.marked, WHITEBITS | bitmask(BLACKBIT))) + +#define isold(x) testbit((x)->gch.marked, OLDBIT) + +/* MOVE OLD rule: whenever an object is moved to the beginning of + a GC list, its old bit must be cleared */ +#define resetoldbit(o) resetbit((o)->gch.marked, OLDBIT) + +#define otherwhite(g) (g->currentwhite ^ WHITEBITS) +#define isdeadm(ow,m) (!(((m) ^ WHITEBITS) & (ow))) +#define isdead(g,v) isdeadm(otherwhite(g), (v)->gch.marked) + +#define changewhite(x) ((x)->gch.marked ^= WHITEBITS) +#define gray2black(x) l_setbit((x)->gch.marked, BLACKBIT) + +#define valiswhite(x) (iscollectable(x) && iswhite(gcvalue(x))) + +#define luaC_white(g) cast(lu_byte, (g)->currentwhite & WHITEBITS) + + +#define luaC_condGC(L,c) \ + {if (G(L)->GCdebt > 0) {c;}; condchangemem(L);} +#define luaC_checkGC(L) luaC_condGC(L, luaC_step(L);) + + +#define luaC_barrier(L,p,v) { if (valiswhite(v) && isblack(obj2gco(p))) \ + luaC_barrier_(L,obj2gco(p),gcvalue(v)); } + +#define luaC_barrierback(L,p,v) { if (valiswhite(v) && isblack(obj2gco(p))) \ + luaC_barrierback_(L,p); } + +#define luaC_objbarrier(L,p,o) \ + { if (iswhite(obj2gco(o)) && isblack(obj2gco(p))) \ + luaC_barrier_(L,obj2gco(p),obj2gco(o)); } + +#define luaC_objbarrierback(L,p,o) \ + { if (iswhite(obj2gco(o)) && isblack(obj2gco(p))) luaC_barrierback_(L,p); } + +#define luaC_barrierproto(L,p,c) \ + { if (isblack(obj2gco(p))) luaC_barrierproto_(L,p,c); } + +LUAI_FUNC void luaC_freeallobjects (lua_State *L); +LUAI_FUNC void luaC_step (lua_State *L); +LUAI_FUNC void luaC_forcestep (lua_State *L); +LUAI_FUNC void luaC_runtilstate (lua_State *L, int statesmask); +LUAI_FUNC void luaC_fullgc (lua_State *L, int isemergency); +LUAI_FUNC GCObject *luaC_newobj (lua_State *L, int tt, size_t sz, + GCObject **list, int offset); +LUAI_FUNC void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v); +LUAI_FUNC void luaC_barrierback_ (lua_State *L, GCObject *o); +LUAI_FUNC void luaC_barrierproto_ (lua_State *L, Proto *p, Closure *c); +LUAI_FUNC void luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt); +LUAI_FUNC void luaC_checkupvalcolor (global_State *g, UpVal *uv); +LUAI_FUNC void luaC_changemode (lua_State *L, int mode); + +#endif diff --git a/radio/src/lua/src/linit.c b/radio/src/lua/src/linit.c new file mode 100644 index 000000000..58e8c1dd9 --- /dev/null +++ b/radio/src/lua/src/linit.c @@ -0,0 +1,66 @@ +/* +** $Id: linit.c,v 1.32 2011/04/08 19:17:36 roberto Exp $ +** Initialization of libraries for lua.c and other clients +** See Copyright Notice in lua.h +*/ + + +/* +** If you embed Lua in your program and need to open the standard +** libraries, call luaL_openlibs in your program. If you need a +** different set of libraries, copy this file to your project and edit +** it to suit your needs. +*/ + + +#define linit_c + +#include "lua.h" + +#include "lualib.h" +#include "lauxlib.h" + + +/* +** these libs are loaded by lua.c and are readily available to any Lua +** program +*/ +static const luaL_Reg loadedlibs[] = { + {"_G", luaopen_base}, + // {LUA_LOADLIBNAME, luaopen_package}, + // {LUA_COLIBNAME, luaopen_coroutine}, + {LUA_TABLIBNAME, luaopen_table}, + // {LUA_IOLIBNAME, luaopen_io}, + // {LUA_OSLIBNAME, luaopen_os}, + // {LUA_STRLIBNAME, luaopen_string}, + // {LUA_BITLIBNAME, luaopen_bit32}, + {LUA_MATHLIBNAME, luaopen_math}, + // {LUA_DBLIBNAME, luaopen_debug}, + {NULL, NULL} +}; + + +/* +** these libs are preloaded and must be required before used +*/ +static const luaL_Reg preloadedlibs[] = { + {NULL, NULL} +}; + + +LUALIB_API void luaL_openlibs (lua_State *L) { + const luaL_Reg *lib; + /* call open functions from 'loadedlibs' and set results to global table */ + for (lib = loadedlibs; lib->func; lib++) { + luaL_requiref(L, lib->name, lib->func, 1); + lua_pop(L, 1); /* remove lib */ + } + /* add open functions from 'preloadedlibs' into 'package.preload' table */ + luaL_getsubtable(L, LUA_REGISTRYINDEX, "_PRELOAD"); + for (lib = preloadedlibs; lib->func; lib++) { + lua_pushcfunction(L, lib->func); + lua_setfield(L, -2, lib->name); + } + lua_pop(L, 1); /* remove _PRELOAD table */ +} + diff --git a/radio/src/lua/src/liolib.c b/radio/src/lua/src/liolib.c new file mode 100644 index 000000000..8d61394da --- /dev/null +++ b/radio/src/lua/src/liolib.c @@ -0,0 +1,663 @@ +/* +** $Id: liolib.c,v 2.111 2013/03/21 13:57:27 roberto Exp $ +** Standard I/O (and system) library +** See Copyright Notice in lua.h +*/ + + +/* +** POSIX idiosyncrasy! +** This definition must come before the inclusion of 'stdio.h'; it +** should not affect non-POSIX systems +*/ +#if !defined(_FILE_OFFSET_BITS) +#define _FILE_OFFSET_BITS 64 +#endif + + +#include +#include +#include + +#define liolib_c + +#include "lua.h" + +#include "lauxlib.h" +#include "lualib.h" + + +#if !defined(lua_checkmode) + +/* +** Check whether 'mode' matches '[rwa]%+?b?'. +** Change this macro to accept other modes for 'fopen' besides +** the standard ones. +*/ +#define lua_checkmode(mode) \ + (*mode != '\0' && strchr("rwa", *(mode++)) != NULL && \ + (*mode != '+' || ++mode) && /* skip if char is '+' */ \ + (*mode != 'b' || ++mode) && /* skip if char is 'b' */ \ + (*mode == '\0')) + +#endif + +/* +** {====================================================== +** lua_popen spawns a new process connected to the current +** one through the file streams. +** ======================================================= +*/ + +#if !defined(lua_popen) /* { */ + +#if defined(LUA_USE_POPEN) /* { */ + +#define lua_popen(L,c,m) ((void)L, fflush(NULL), popen(c,m)) +#define lua_pclose(L,file) ((void)L, pclose(file)) + +#elif defined(LUA_WIN) /* }{ */ + +#define lua_popen(L,c,m) ((void)L, _popen(c,m)) +#define lua_pclose(L,file) ((void)L, _pclose(file)) + + +#else /* }{ */ + +#define lua_popen(L,c,m) ((void)((void)c, m), \ + luaL_error(L, LUA_QL("popen") " not supported"), (FILE*)0) +#define lua_pclose(L,file) ((void)((void)L, file), -1) + + +#endif /* } */ + +#endif /* } */ + +/* }====================================================== */ + + +/* +** {====================================================== +** lua_fseek/lua_ftell: configuration for longer offsets +** ======================================================= +*/ + +#if !defined(lua_fseek) /* { */ + +#if defined(LUA_USE_POSIX) + +#define l_fseek(f,o,w) fseeko(f,o,w) +#define l_ftell(f) ftello(f) +#define l_seeknum off_t + +#elif defined(LUA_WIN) && !defined(_CRTIMP_TYPEINFO) \ + && defined(_MSC_VER) && (_MSC_VER >= 1400) +/* Windows (but not DDK) and Visual C++ 2005 or higher */ + +#define l_fseek(f,o,w) _fseeki64(f,o,w) +#define l_ftell(f) _ftelli64(f) +#define l_seeknum __int64 + +#else + +#define l_fseek(f,o,w) fseek(f,o,w) +#define l_ftell(f) ftell(f) +#define l_seeknum long + +#endif + +#endif /* } */ + +/* }====================================================== */ + + +#define IO_PREFIX "_IO_" +#define IO_INPUT (IO_PREFIX "input") +#define IO_OUTPUT (IO_PREFIX "output") + + +typedef luaL_Stream LStream; + + +#define tolstream(L) ((LStream *)luaL_checkudata(L, 1, LUA_FILEHANDLE)) + +#define isclosed(p) ((p)->closef == NULL) + + +static int io_type (lua_State *L) { + LStream *p; + luaL_checkany(L, 1); + p = (LStream *)luaL_testudata(L, 1, LUA_FILEHANDLE); + if (p == NULL) + lua_pushnil(L); /* not a file */ + else if (isclosed(p)) + lua_pushliteral(L, "closed file"); + else + lua_pushliteral(L, "file"); + return 1; +} + + +static int f_tostring (lua_State *L) { + LStream *p = tolstream(L); + if (isclosed(p)) + lua_pushliteral(L, "file (closed)"); + else + lua_pushfstring(L, "file (%p)", p->f); + return 1; +} + + +static FILE *tofile (lua_State *L) { + LStream *p = tolstream(L); + if (isclosed(p)) + luaL_error(L, "attempt to use a closed file"); + lua_assert(p->f); + return p->f; +} + + +/* +** When creating file handles, always creates a `closed' file handle +** before opening the actual file; so, if there is a memory error, the +** file is not left opened. +*/ +static LStream *newprefile (lua_State *L) { + LStream *p = (LStream *)lua_newuserdata(L, sizeof(LStream)); + p->closef = NULL; /* mark file handle as 'closed' */ + luaL_setmetatable(L, LUA_FILEHANDLE); + return p; +} + + +static int aux_close (lua_State *L) { + LStream *p = tolstream(L); + lua_CFunction cf = p->closef; + p->closef = NULL; /* mark stream as closed */ + return (*cf)(L); /* close it */ +} + + +static int io_close (lua_State *L) { + if (lua_isnone(L, 1)) /* no argument? */ + lua_getfield(L, LUA_REGISTRYINDEX, IO_OUTPUT); /* use standard output */ + tofile(L); /* make sure argument is an open stream */ + return aux_close(L); +} + + +static int f_gc (lua_State *L) { + LStream *p = tolstream(L); + if (!isclosed(p) && p->f != NULL) + aux_close(L); /* ignore closed and incompletely open files */ + return 0; +} + + +/* +** function to close regular files +*/ +static int io_fclose (lua_State *L) { + LStream *p = tolstream(L); + int res = fclose(p->f); + return luaL_fileresult(L, (res == 0), NULL); +} + + +static LStream *newfile (lua_State *L) { + LStream *p = newprefile(L); + p->f = NULL; + p->closef = &io_fclose; + return p; +} + + +static void opencheck (lua_State *L, const char *fname, const char *mode) { + LStream *p = newfile(L); + p->f = fopen(fname, mode); + if (p->f == NULL) + luaL_error(L, "cannot open file " LUA_QS " (%s)", fname, strerror(errno)); +} + + +static int io_open (lua_State *L) { + const char *filename = luaL_checkstring(L, 1); + const char *mode = luaL_optstring(L, 2, "r"); + LStream *p = newfile(L); + const char *md = mode; /* to traverse/check mode */ + luaL_argcheck(L, lua_checkmode(md), 2, "invalid mode"); + p->f = fopen(filename, mode); + return (p->f == NULL) ? luaL_fileresult(L, 0, filename) : 1; +} + + +/* +** function to close 'popen' files +*/ +static int io_pclose (lua_State *L) { + LStream *p = tolstream(L); + return luaL_execresult(L, lua_pclose(L, p->f)); +} + + +static int io_popen (lua_State *L) { + const char *filename = luaL_checkstring(L, 1); + const char *mode = luaL_optstring(L, 2, "r"); + LStream *p = newprefile(L); + p->f = lua_popen(L, filename, mode); + p->closef = &io_pclose; + return (p->f == NULL) ? luaL_fileresult(L, 0, filename) : 1; +} + + +static int io_tmpfile (lua_State *L) { + LStream *p = newfile(L); + p->f = tmpfile(); + return (p->f == NULL) ? luaL_fileresult(L, 0, NULL) : 1; +} + + +static FILE *getiofile (lua_State *L, const char *findex) { + LStream *p; + lua_getfield(L, LUA_REGISTRYINDEX, findex); + p = (LStream *)lua_touserdata(L, -1); + if (isclosed(p)) + luaL_error(L, "standard %s file is closed", findex + strlen(IO_PREFIX)); + return p->f; +} + + +static int g_iofile (lua_State *L, const char *f, const char *mode) { + if (!lua_isnoneornil(L, 1)) { + const char *filename = lua_tostring(L, 1); + if (filename) + opencheck(L, filename, mode); + else { + tofile(L); /* check that it's a valid file handle */ + lua_pushvalue(L, 1); + } + lua_setfield(L, LUA_REGISTRYINDEX, f); + } + /* return current value */ + lua_getfield(L, LUA_REGISTRYINDEX, f); + return 1; +} + + +static int io_input (lua_State *L) { + return g_iofile(L, IO_INPUT, "r"); +} + + +static int io_output (lua_State *L) { + return g_iofile(L, IO_OUTPUT, "w"); +} + + +static int io_readline (lua_State *L); + + +static void aux_lines (lua_State *L, int toclose) { + int i; + int n = lua_gettop(L) - 1; /* number of arguments to read */ + /* ensure that arguments will fit here and into 'io_readline' stack */ + luaL_argcheck(L, n <= LUA_MINSTACK - 3, LUA_MINSTACK - 3, "too many options"); + lua_pushvalue(L, 1); /* file handle */ + lua_pushinteger(L, n); /* number of arguments to read */ + lua_pushboolean(L, toclose); /* close/not close file when finished */ + for (i = 1; i <= n; i++) lua_pushvalue(L, i + 1); /* copy arguments */ + lua_pushcclosure(L, io_readline, 3 + n); +} + + +static int f_lines (lua_State *L) { + tofile(L); /* check that it's a valid file handle */ + aux_lines(L, 0); + return 1; +} + + +static int io_lines (lua_State *L) { + int toclose; + if (lua_isnone(L, 1)) lua_pushnil(L); /* at least one argument */ + if (lua_isnil(L, 1)) { /* no file name? */ + lua_getfield(L, LUA_REGISTRYINDEX, IO_INPUT); /* get default input */ + lua_replace(L, 1); /* put it at index 1 */ + tofile(L); /* check that it's a valid file handle */ + toclose = 0; /* do not close it after iteration */ + } + else { /* open a new file */ + const char *filename = luaL_checkstring(L, 1); + opencheck(L, filename, "r"); + lua_replace(L, 1); /* put file at index 1 */ + toclose = 1; /* close it after iteration */ + } + aux_lines(L, toclose); + return 1; +} + + +/* +** {====================================================== +** READ +** ======================================================= +*/ + + +static int read_number (lua_State *L, FILE *f) { + lua_Number d; + if (fscanf(f, LUA_NUMBER_SCAN, &d) == 1) { + lua_pushnumber(L, d); + return 1; + } + else { + lua_pushnil(L); /* "result" to be removed */ + return 0; /* read fails */ + } +} + + +static int test_eof (lua_State *L, FILE *f) { + int c = lua_getc(f); + ungetc(c, f); + lua_pushlstring(L, NULL, 0); + return (c != EOF); +} + + +static int read_line (lua_State *L, FILE *f, int chop) { + luaL_Buffer b; + luaL_buffinit(L, &b); + for (;;) { + size_t l; + char *p = luaL_prepbuffer(&b); + if (fgets(p, LUAL_BUFFERSIZE, f) == NULL) { /* eof? */ + luaL_pushresult(&b); /* close buffer */ + return (lua_rawlen(L, -1) > 0); /* check whether read something */ + } + l = strlen(p); + if (l == 0 || p[l-1] != '\n') + luaL_addsize(&b, l); + else { + luaL_addsize(&b, l - chop); /* chop 'eol' if needed */ + luaL_pushresult(&b); /* close buffer */ + return 1; /* read at least an `eol' */ + } + } +} + + +#define MAX_SIZE_T (~(size_t)0) + +static void read_all (lua_State *L, FILE *f) { + size_t rlen = LUAL_BUFFERSIZE; /* how much to read in each cycle */ + luaL_Buffer b; + luaL_buffinit(L, &b); + for (;;) { + char *p = luaL_prepbuffsize(&b, rlen); + size_t nr = fread(p, sizeof(char), rlen, f); + luaL_addsize(&b, nr); + if (nr < rlen) break; /* eof? */ + else if (rlen <= (MAX_SIZE_T / 4)) /* avoid buffers too large */ + rlen *= 2; /* double buffer size at each iteration */ + } + luaL_pushresult(&b); /* close buffer */ +} + + +static int read_chars (lua_State *L, FILE *f, size_t n) { + size_t nr; /* number of chars actually read */ + char *p; + luaL_Buffer b; + luaL_buffinit(L, &b); + p = luaL_prepbuffsize(&b, n); /* prepare buffer to read whole block */ + nr = fread(p, sizeof(char), n, f); /* try to read 'n' chars */ + luaL_addsize(&b, nr); + luaL_pushresult(&b); /* close buffer */ + return (nr > 0); /* true iff read something */ +} + + +static int g_read (lua_State *L, FILE *f, int first) { + int nargs = lua_gettop(L) - 1; + int success; + int n; + clearerr(f); + if (nargs == 0) { /* no arguments? */ + success = read_line(L, f, 1); + n = first+1; /* to return 1 result */ + } + else { /* ensure stack space for all results and for auxlib's buffer */ + luaL_checkstack(L, nargs+LUA_MINSTACK, "too many arguments"); + success = 1; + for (n = first; nargs-- && success; n++) { + if (lua_type(L, n) == LUA_TNUMBER) { + size_t l = (size_t)lua_tointeger(L, n); + success = (l == 0) ? test_eof(L, f) : read_chars(L, f, l); + } + else { + const char *p = lua_tostring(L, n); + luaL_argcheck(L, p && p[0] == '*', n, "invalid option"); + switch (p[1]) { + case 'n': /* number */ + success = read_number(L, f); + break; + case 'l': /* line */ + success = read_line(L, f, 1); + break; + case 'L': /* line with end-of-line */ + success = read_line(L, f, 0); + break; + case 'a': /* file */ + read_all(L, f); /* read entire file */ + success = 1; /* always success */ + break; + default: + return luaL_argerror(L, n, "invalid format"); + } + } + } + } + if (ferror(f)) + return luaL_fileresult(L, 0, NULL); + if (!success) { + lua_pop(L, 1); /* remove last result */ + lua_pushnil(L); /* push nil instead */ + } + return n - first; +} + + +static int io_read (lua_State *L) { + return g_read(L, getiofile(L, IO_INPUT), 1); +} + + +static int f_read (lua_State *L) { + return g_read(L, tofile(L), 2); +} + + +static int io_readline (lua_State *L) { + LStream *p = (LStream *)lua_touserdata(L, lua_upvalueindex(1)); + int i; + int n = (int)lua_tointeger(L, lua_upvalueindex(2)); + if (isclosed(p)) /* file is already closed? */ + return luaL_error(L, "file is already closed"); + lua_settop(L , 1); + for (i = 1; i <= n; i++) /* push arguments to 'g_read' */ + lua_pushvalue(L, lua_upvalueindex(3 + i)); + n = g_read(L, p->f, 2); /* 'n' is number of results */ + lua_assert(n > 0); /* should return at least a nil */ + if (!lua_isnil(L, -n)) /* read at least one value? */ + return n; /* return them */ + else { /* first result is nil: EOF or error */ + if (n > 1) { /* is there error information? */ + /* 2nd result is error message */ + return luaL_error(L, "%s", lua_tostring(L, -n + 1)); + } + if (lua_toboolean(L, lua_upvalueindex(3))) { /* generator created file? */ + lua_settop(L, 0); + lua_pushvalue(L, lua_upvalueindex(1)); + aux_close(L); /* close it */ + } + return 0; + } +} + +/* }====================================================== */ + + +static int g_write (lua_State *L, FILE *f, int arg) { + int nargs = lua_gettop(L) - arg; + int status = 1; + for (; nargs--; arg++) { + if (lua_type(L, arg) == LUA_TNUMBER) { + /* optimization: could be done exactly as for strings */ + status = status && + fprintf(f, LUA_NUMBER_FMT, lua_tonumber(L, arg)) > 0; + } + else { + size_t l; + const char *s = luaL_checklstring(L, arg, &l); + status = status && (fwrite(s, sizeof(char), l, f) == l); + } + } + if (status) return 1; /* file handle already on stack top */ + else return luaL_fileresult(L, status, NULL); +} + + +static int io_write (lua_State *L) { + return g_write(L, getiofile(L, IO_OUTPUT), 1); +} + + +static int f_write (lua_State *L) { + FILE *f = tofile(L); + lua_pushvalue(L, 1); /* push file at the stack top (to be returned) */ + return g_write(L, f, 2); +} + + +static int f_seek (lua_State *L) { + static const int mode[] = {SEEK_SET, SEEK_CUR, SEEK_END}; + static const char *const modenames[] = {"set", "cur", "end", NULL}; + FILE *f = tofile(L); + int op = luaL_checkoption(L, 2, "cur", modenames); + lua_Number p3 = luaL_optnumber(L, 3, 0); + l_seeknum offset = (l_seeknum)p3; + luaL_argcheck(L, (lua_Number)offset == p3, 3, + "not an integer in proper range"); + op = l_fseek(f, offset, mode[op]); + if (op) + return luaL_fileresult(L, 0, NULL); /* error */ + else { + lua_pushnumber(L, (lua_Number)l_ftell(f)); + return 1; + } +} + + +static int f_setvbuf (lua_State *L) { + static const int mode[] = {_IONBF, _IOFBF, _IOLBF}; + static const char *const modenames[] = {"no", "full", "line", NULL}; + FILE *f = tofile(L); + int op = luaL_checkoption(L, 2, NULL, modenames); + lua_Integer sz = luaL_optinteger(L, 3, LUAL_BUFFERSIZE); + int res = setvbuf(f, NULL, mode[op], sz); + return luaL_fileresult(L, res == 0, NULL); +} + + + +static int io_flush (lua_State *L) { + return luaL_fileresult(L, fflush(getiofile(L, IO_OUTPUT)) == 0, NULL); +} + + +static int f_flush (lua_State *L) { + return luaL_fileresult(L, fflush(tofile(L)) == 0, NULL); +} + + +/* +** functions for 'io' library +*/ +static const luaL_Reg iolib[] = { + {"close", io_close}, + {"flush", io_flush}, + {"input", io_input}, + {"lines", io_lines}, + {"open", io_open}, + {"output", io_output}, + {"popen", io_popen}, + {"read", io_read}, + {"tmpfile", io_tmpfile}, + {"type", io_type}, + {"write", io_write}, + {NULL, NULL} +}; + + +/* +** methods for file handles +*/ +static const luaL_Reg flib[] = { + {"close", io_close}, + {"flush", f_flush}, + {"lines", f_lines}, + {"read", f_read}, + {"seek", f_seek}, + {"setvbuf", f_setvbuf}, + {"write", f_write}, + {"__gc", f_gc}, + {"__tostring", f_tostring}, + {NULL, NULL} +}; + + +static void createmeta (lua_State *L) { + luaL_newmetatable(L, LUA_FILEHANDLE); /* create metatable for file handles */ + lua_pushvalue(L, -1); /* push metatable */ + lua_setfield(L, -2, "__index"); /* metatable.__index = metatable */ + luaL_setfuncs(L, flib, 0); /* add file methods to new metatable */ + lua_pop(L, 1); /* pop new metatable */ +} + + +/* +** function to (not) close the standard files stdin, stdout, and stderr +*/ +static int io_noclose (lua_State *L) { + LStream *p = tolstream(L); + p->closef = &io_noclose; /* keep file opened */ + lua_pushnil(L); + lua_pushliteral(L, "cannot close standard file"); + return 2; +} + + +static void createstdfile (lua_State *L, FILE *f, const char *k, + const char *fname) { + LStream *p = newprefile(L); + p->f = f; + p->closef = &io_noclose; + if (k != NULL) { + lua_pushvalue(L, -1); + lua_setfield(L, LUA_REGISTRYINDEX, k); /* add file to registry */ + } + lua_setfield(L, -2, fname); /* add file to module */ +} + + +LUAMOD_API int luaopen_io (lua_State *L) { + luaL_newlib(L, iolib); /* new module */ + createmeta(L); + /* create (and set) default files */ + createstdfile(L, stdin, IO_INPUT, "stdin"); + createstdfile(L, stdout, IO_OUTPUT, "stdout"); + createstdfile(L, stderr, NULL, "stderr"); + return 1; +} + diff --git a/radio/src/lua/src/llex.c b/radio/src/lua/src/llex.c new file mode 100644 index 000000000..1a32e348b --- /dev/null +++ b/radio/src/lua/src/llex.c @@ -0,0 +1,527 @@ +/* +** $Id: llex.c,v 2.63 2013/03/16 21:10:18 roberto Exp $ +** Lexical Analyzer +** See Copyright Notice in lua.h +*/ + + +#include +#include + +#define llex_c +#define LUA_CORE + +#include "lua.h" + +#include "lctype.h" +#include "ldo.h" +#include "llex.h" +#include "lobject.h" +#include "lparser.h" +#include "lstate.h" +#include "lstring.h" +#include "ltable.h" +#include "lzio.h" + + + +#define next(ls) (ls->current = zgetc(ls->z)) + + + +#define currIsNewline(ls) (ls->current == '\n' || ls->current == '\r') + + +/* ORDER RESERVED */ +static const char *const luaX_tokens [] = { + "and", "break", "do", "else", "elseif", + "end", "false", "for", "function", "goto", "if", + "in", "local", "nil", "not", "or", "repeat", + "return", "then", "true", "until", "while", + "..", "...", "==", ">=", "<=", "~=", "::", "", + "", "", "" +}; + + +#define save_and_next(ls) (save(ls, ls->current), next(ls)) + + +static l_noret lexerror (LexState *ls, const char *msg, int token); + + +static void save (LexState *ls, int c) { + Mbuffer *b = ls->buff; + if (luaZ_bufflen(b) + 1 > luaZ_sizebuffer(b)) { + size_t newsize; + if (luaZ_sizebuffer(b) >= MAX_SIZET/2) + lexerror(ls, "lexical element too long", 0); + newsize = luaZ_sizebuffer(b) * 2; + luaZ_resizebuffer(ls->L, b, newsize); + } + b->buffer[luaZ_bufflen(b)++] = cast(char, c); +} + + +void luaX_init (lua_State *L) { + int i; + for (i=0; itsv.extra = cast_byte(i+1); /* reserved word */ + } +} + + +const char *luaX_token2str (LexState *ls, int token) { + if (token < FIRST_RESERVED) { /* single-byte symbols? */ + lua_assert(token == cast(unsigned char, token)); + return (lisprint(token)) ? luaO_pushfstring(ls->L, LUA_QL("%c"), token) : + luaO_pushfstring(ls->L, "char(%d)", token); + } + else { + const char *s = luaX_tokens[token - FIRST_RESERVED]; + if (token < TK_EOS) /* fixed format (symbols and reserved words)? */ + return luaO_pushfstring(ls->L, LUA_QS, s); + else /* names, strings, and numerals */ + return s; + } +} + + +static const char *txtToken (LexState *ls, int token) { + switch (token) { + case TK_NAME: + case TK_STRING: + case TK_NUMBER: + save(ls, '\0'); + return luaO_pushfstring(ls->L, LUA_QS, luaZ_buffer(ls->buff)); + default: + return luaX_token2str(ls, token); + } +} + + +static l_noret lexerror (LexState *ls, const char *msg, int token) { + char buff[LUA_IDSIZE]; + luaO_chunkid(buff, getstr(ls->source), LUA_IDSIZE); + msg = luaO_pushfstring(ls->L, "%s:%d: %s", buff, ls->linenumber, msg); + if (token) + luaO_pushfstring(ls->L, "%s near %s", msg, txtToken(ls, token)); + luaD_throw(ls->L, LUA_ERRSYNTAX); +} + + +l_noret luaX_syntaxerror (LexState *ls, const char *msg) { + lexerror(ls, msg, ls->t.token); +} + + +/* +** creates a new string and anchors it in function's table so that +** it will not be collected until the end of the function's compilation +** (by that time it should be anchored in function's prototype) +*/ +TString *luaX_newstring (LexState *ls, const char *str, size_t l) { + lua_State *L = ls->L; + TValue *o; /* entry for `str' */ + TString *ts = luaS_newlstr(L, str, l); /* create new string */ + setsvalue2s(L, L->top++, ts); /* temporarily anchor it in stack */ + o = luaH_set(L, ls->fs->h, L->top - 1); + if (ttisnil(o)) { /* not in use yet? (see 'addK') */ + /* boolean value does not need GC barrier; + table has no metatable, so it does not need to invalidate cache */ + setbvalue(o, 1); /* t[string] = true */ + luaC_checkGC(L); + } + L->top--; /* remove string from stack */ + return ts; +} + + +/* +** increment line number and skips newline sequence (any of +** \n, \r, \n\r, or \r\n) +*/ +static void inclinenumber (LexState *ls) { + int old = ls->current; + lua_assert(currIsNewline(ls)); + next(ls); /* skip `\n' or `\r' */ + if (currIsNewline(ls) && ls->current != old) + next(ls); /* skip `\n\r' or `\r\n' */ + if (++ls->linenumber >= MAX_INT) + luaX_syntaxerror(ls, "chunk has too many lines"); +} + + +void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, TString *source, + int firstchar) { + ls->decpoint = '.'; + ls->L = L; + ls->current = firstchar; + ls->lookahead.token = TK_EOS; /* no look-ahead token */ + ls->z = z; + ls->fs = NULL; + ls->linenumber = 1; + ls->lastline = 1; + ls->source = source; + ls->envn = luaS_new(L, LUA_ENV); /* create env name */ + luaS_fix(ls->envn); /* never collect this name */ + luaZ_resizebuffer(ls->L, ls->buff, LUA_MINBUFFER); /* initialize buffer */ +} + + + +/* +** ======================================================= +** LEXICAL ANALYZER +** ======================================================= +*/ + + + +static int check_next (LexState *ls, const char *set) { + if (ls->current == '\0' || !strchr(set, ls->current)) + return 0; + save_and_next(ls); + return 1; +} + + +/* +** change all characters 'from' in buffer to 'to' +*/ +static void buffreplace (LexState *ls, char from, char to) { + size_t n = luaZ_bufflen(ls->buff); + char *p = luaZ_buffer(ls->buff); + while (n--) + if (p[n] == from) p[n] = to; +} + + +#if !defined(getlocaledecpoint) +#define getlocaledecpoint() (localeconv()->decimal_point[0]) +#endif + + +#define buff2d(b,e) luaO_str2d(luaZ_buffer(b), luaZ_bufflen(b) - 1, e) + +/* +** in case of format error, try to change decimal point separator to +** the one defined in the current locale and check again +*/ +static void trydecpoint (LexState *ls, SemInfo *seminfo) { + char old = ls->decpoint; + ls->decpoint = getlocaledecpoint(); + buffreplace(ls, old, ls->decpoint); /* try new decimal separator */ + if (!buff2d(ls->buff, &seminfo->r)) { + /* format error with correct decimal point: no more options */ + buffreplace(ls, ls->decpoint, '.'); /* undo change (for error message) */ + lexerror(ls, "malformed number", TK_NUMBER); + } +} + + +/* LUA_NUMBER */ +/* +** this function is quite liberal in what it accepts, as 'luaO_str2d' +** will reject ill-formed numerals. +*/ +static void read_numeral (LexState *ls, SemInfo *seminfo) { + const char *expo = "Ee"; + int first = ls->current; + lua_assert(lisdigit(ls->current)); + save_and_next(ls); + if (first == '0' && check_next(ls, "Xx")) /* hexadecimal? */ + expo = "Pp"; + for (;;) { + if (check_next(ls, expo)) /* exponent part? */ + check_next(ls, "+-"); /* optional exponent sign */ + if (lisxdigit(ls->current) || ls->current == '.') + save_and_next(ls); + else break; + } + save(ls, '\0'); + buffreplace(ls, '.', ls->decpoint); /* follow locale for decimal point */ + if (!buff2d(ls->buff, &seminfo->r)) /* format error? */ + trydecpoint(ls, seminfo); /* try to update decimal point separator */ +} + + +/* +** skip a sequence '[=*[' or ']=*]' and return its number of '='s or +** -1 if sequence is malformed +*/ +static int skip_sep (LexState *ls) { + int count = 0; + int s = ls->current; + lua_assert(s == '[' || s == ']'); + save_and_next(ls); + while (ls->current == '=') { + save_and_next(ls); + count++; + } + return (ls->current == s) ? count : (-count) - 1; +} + + +static void read_long_string (LexState *ls, SemInfo *seminfo, int sep) { + save_and_next(ls); /* skip 2nd `[' */ + if (currIsNewline(ls)) /* string starts with a newline? */ + inclinenumber(ls); /* skip it */ + for (;;) { + switch (ls->current) { + case EOZ: + lexerror(ls, (seminfo) ? "unfinished long string" : + "unfinished long comment", TK_EOS); + break; /* to avoid warnings */ + case ']': { + if (skip_sep(ls) == sep) { + save_and_next(ls); /* skip 2nd `]' */ + goto endloop; + } + break; + } + case '\n': case '\r': { + save(ls, '\n'); + inclinenumber(ls); + if (!seminfo) luaZ_resetbuffer(ls->buff); /* avoid wasting space */ + break; + } + default: { + if (seminfo) save_and_next(ls); + else next(ls); + } + } + } endloop: + if (seminfo) + seminfo->ts = luaX_newstring(ls, luaZ_buffer(ls->buff) + (2 + sep), + luaZ_bufflen(ls->buff) - 2*(2 + sep)); +} + + +static void escerror (LexState *ls, int *c, int n, const char *msg) { + int i; + luaZ_resetbuffer(ls->buff); /* prepare error message */ + save(ls, '\\'); + for (i = 0; i < n && c[i] != EOZ; i++) + save(ls, c[i]); + lexerror(ls, msg, TK_STRING); +} + + +static int readhexaesc (LexState *ls) { + int c[3], i; /* keep input for error message */ + int r = 0; /* result accumulator */ + c[0] = 'x'; /* for error message */ + for (i = 1; i < 3; i++) { /* read two hexadecimal digits */ + c[i] = next(ls); + if (!lisxdigit(c[i])) + escerror(ls, c, i + 1, "hexadecimal digit expected"); + r = (r << 4) + luaO_hexavalue(c[i]); + } + return r; +} + + +static int readdecesc (LexState *ls) { + int c[3], i; + int r = 0; /* result accumulator */ + for (i = 0; i < 3 && lisdigit(ls->current); i++) { /* read up to 3 digits */ + c[i] = ls->current; + r = 10*r + c[i] - '0'; + next(ls); + } + if (r > UCHAR_MAX) + escerror(ls, c, i, "decimal escape too large"); + return r; +} + + +static void read_string (LexState *ls, int del, SemInfo *seminfo) { + save_and_next(ls); /* keep delimiter (for error messages) */ + while (ls->current != del) { + switch (ls->current) { + case EOZ: + lexerror(ls, "unfinished string", TK_EOS); + break; /* to avoid warnings */ + case '\n': + case '\r': + lexerror(ls, "unfinished string", TK_STRING); + break; /* to avoid warnings */ + case '\\': { /* escape sequences */ + int c; /* final character to be saved */ + next(ls); /* do not save the `\' */ + switch (ls->current) { + case 'a': c = '\a'; goto read_save; + case 'b': c = '\b'; goto read_save; + case 'f': c = '\f'; goto read_save; + case 'n': c = '\n'; goto read_save; + case 'r': c = '\r'; goto read_save; + case 't': c = '\t'; goto read_save; + case 'v': c = '\v'; goto read_save; + case 'x': c = readhexaesc(ls); goto read_save; + case '\n': case '\r': + inclinenumber(ls); c = '\n'; goto only_save; + case '\\': case '\"': case '\'': + c = ls->current; goto read_save; + case EOZ: goto no_save; /* will raise an error next loop */ + case 'z': { /* zap following span of spaces */ + next(ls); /* skip the 'z' */ + while (lisspace(ls->current)) { + if (currIsNewline(ls)) inclinenumber(ls); + else next(ls); + } + goto no_save; + } + default: { + if (!lisdigit(ls->current)) + escerror(ls, &ls->current, 1, "invalid escape sequence"); + /* digital escape \ddd */ + c = readdecesc(ls); + goto only_save; + } + } + read_save: next(ls); /* read next character */ + only_save: save(ls, c); /* save 'c' */ + no_save: break; + } + default: + save_and_next(ls); + } + } + save_and_next(ls); /* skip delimiter */ + seminfo->ts = luaX_newstring(ls, luaZ_buffer(ls->buff) + 1, + luaZ_bufflen(ls->buff) - 2); +} + + +static int llex (LexState *ls, SemInfo *seminfo) { + luaZ_resetbuffer(ls->buff); + for (;;) { + switch (ls->current) { + case '\n': case '\r': { /* line breaks */ + inclinenumber(ls); + break; + } + case ' ': case '\f': case '\t': case '\v': { /* spaces */ + next(ls); + break; + } + case '-': { /* '-' or '--' (comment) */ + next(ls); + if (ls->current != '-') return '-'; + /* else is a comment */ + next(ls); + if (ls->current == '[') { /* long comment? */ + int sep = skip_sep(ls); + luaZ_resetbuffer(ls->buff); /* `skip_sep' may dirty the buffer */ + if (sep >= 0) { + read_long_string(ls, NULL, sep); /* skip long comment */ + luaZ_resetbuffer(ls->buff); /* previous call may dirty the buff. */ + break; + } + } + /* else short comment */ + while (!currIsNewline(ls) && ls->current != EOZ) + next(ls); /* skip until end of line (or end of file) */ + break; + } + case '[': { /* long string or simply '[' */ + int sep = skip_sep(ls); + if (sep >= 0) { + read_long_string(ls, seminfo, sep); + return TK_STRING; + } + else if (sep == -1) return '['; + else lexerror(ls, "invalid long string delimiter", TK_STRING); + } + case '=': { + next(ls); + if (ls->current != '=') return '='; + else { next(ls); return TK_EQ; } + } + case '<': { + next(ls); + if (ls->current != '=') return '<'; + else { next(ls); return TK_LE; } + } + case '>': { + next(ls); + if (ls->current != '=') return '>'; + else { next(ls); return TK_GE; } + } + case '~': { + next(ls); + if (ls->current != '=') return '~'; + else { next(ls); return TK_NE; } + } + case ':': { + next(ls); + if (ls->current != ':') return ':'; + else { next(ls); return TK_DBCOLON; } + } + case '"': case '\'': { /* short literal strings */ + read_string(ls, ls->current, seminfo); + return TK_STRING; + } + case '.': { /* '.', '..', '...', or number */ + save_and_next(ls); + if (check_next(ls, ".")) { + if (check_next(ls, ".")) + return TK_DOTS; /* '...' */ + else return TK_CONCAT; /* '..' */ + } + else if (!lisdigit(ls->current)) return '.'; + /* else go through */ + } + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': { + read_numeral(ls, seminfo); + return TK_NUMBER; + } + case EOZ: { + return TK_EOS; + } + default: { + if (lislalpha(ls->current)) { /* identifier or reserved word? */ + TString *ts; + do { + save_and_next(ls); + } while (lislalnum(ls->current)); + ts = luaX_newstring(ls, luaZ_buffer(ls->buff), + luaZ_bufflen(ls->buff)); + seminfo->ts = ts; + if (isreserved(ts)) /* reserved word? */ + return ts->tsv.extra - 1 + FIRST_RESERVED; + else { + return TK_NAME; + } + } + else { /* single-char tokens (+ - / ...) */ + int c = ls->current; + next(ls); + return c; + } + } + } + } +} + + +void luaX_next (LexState *ls) { + ls->lastline = ls->linenumber; + if (ls->lookahead.token != TK_EOS) { /* is there a look-ahead token? */ + ls->t = ls->lookahead; /* use this one */ + ls->lookahead.token = TK_EOS; /* and discharge it */ + } + else + ls->t.token = llex(ls, &ls->t.seminfo); /* read next token */ +} + + +int luaX_lookahead (LexState *ls) { + lua_assert(ls->lookahead.token == TK_EOS); + ls->lookahead.token = llex(ls, &ls->lookahead.seminfo); + return ls->lookahead.token; +} + diff --git a/radio/src/lua/src/llex.h b/radio/src/lua/src/llex.h new file mode 100644 index 000000000..9ca8a2994 --- /dev/null +++ b/radio/src/lua/src/llex.h @@ -0,0 +1,78 @@ +/* +** $Id: llex.h,v 1.72 2011/11/30 12:43:51 roberto Exp $ +** Lexical Analyzer +** See Copyright Notice in lua.h +*/ + +#ifndef llex_h +#define llex_h + +#include "lobject.h" +#include "lzio.h" + + +#define FIRST_RESERVED 257 + + + +/* +* WARNING: if you change the order of this enumeration, +* grep "ORDER RESERVED" +*/ +enum RESERVED { + /* terminal symbols denoted by reserved words */ + TK_AND = FIRST_RESERVED, TK_BREAK, + TK_DO, TK_ELSE, TK_ELSEIF, TK_END, TK_FALSE, TK_FOR, TK_FUNCTION, + TK_GOTO, TK_IF, TK_IN, TK_LOCAL, TK_NIL, TK_NOT, TK_OR, TK_REPEAT, + TK_RETURN, TK_THEN, TK_TRUE, TK_UNTIL, TK_WHILE, + /* other terminal symbols */ + TK_CONCAT, TK_DOTS, TK_EQ, TK_GE, TK_LE, TK_NE, TK_DBCOLON, TK_EOS, + TK_NUMBER, TK_NAME, TK_STRING +}; + +/* number of reserved words */ +#define NUM_RESERVED (cast(int, TK_WHILE-FIRST_RESERVED+1)) + + +typedef union { + lua_Number r; + TString *ts; +} SemInfo; /* semantics information */ + + +typedef struct Token { + int token; + SemInfo seminfo; +} Token; + + +/* state of the lexer plus state of the parser when shared by all + functions */ +typedef struct LexState { + int current; /* current character (charint) */ + int linenumber; /* input line counter */ + int lastline; /* line of last token `consumed' */ + Token t; /* current token */ + Token lookahead; /* look ahead token */ + struct FuncState *fs; /* current function (parser) */ + struct lua_State *L; + ZIO *z; /* input stream */ + Mbuffer *buff; /* buffer for tokens */ + struct Dyndata *dyd; /* dynamic structures used by the parser */ + TString *source; /* current source name */ + TString *envn; /* environment variable name */ + char decpoint; /* locale decimal point */ +} LexState; + + +LUAI_FUNC void luaX_init (lua_State *L); +LUAI_FUNC void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, + TString *source, int firstchar); +LUAI_FUNC TString *luaX_newstring (LexState *ls, const char *str, size_t l); +LUAI_FUNC void luaX_next (LexState *ls); +LUAI_FUNC int luaX_lookahead (LexState *ls); +LUAI_FUNC l_noret luaX_syntaxerror (LexState *ls, const char *s); +LUAI_FUNC const char *luaX_token2str (LexState *ls, int token); + + +#endif diff --git a/radio/src/lua/src/llimits.h b/radio/src/lua/src/llimits.h new file mode 100644 index 000000000..b278d4880 --- /dev/null +++ b/radio/src/lua/src/llimits.h @@ -0,0 +1,309 @@ +/* +** $Id: llimits.h,v 1.103 2013/02/20 14:08:56 roberto Exp $ +** Limits, basic types, and some other `installation-dependent' definitions +** See Copyright Notice in lua.h +*/ + +#ifndef llimits_h +#define llimits_h + + +#include +#include + + +#include "lua.h" + + +typedef unsigned LUA_INT32 lu_int32; + +typedef LUAI_UMEM lu_mem; + +typedef LUAI_MEM l_mem; + + + +/* chars used as small naturals (so that `char' is reserved for characters) */ +typedef unsigned char lu_byte; + + +#define MAX_SIZET ((size_t)(~(size_t)0)-2) + +#define MAX_LUMEM ((lu_mem)(~(lu_mem)0)-2) + +#define MAX_LMEM ((l_mem) ((MAX_LUMEM >> 1) - 2)) + + +#define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */ + +/* +** conversion of pointer to integer +** this is for hashing only; there is no problem if the integer +** cannot hold the whole pointer value +*/ +#define IntPoint(p) ((unsigned int)(lu_mem)(p)) + + + +/* type to ensure maximum alignment */ +#if !defined(LUAI_USER_ALIGNMENT_T) +#define LUAI_USER_ALIGNMENT_T union { double u; void *s; long l; } +#endif + +typedef LUAI_USER_ALIGNMENT_T L_Umaxalign; + + +/* result of a `usual argument conversion' over lua_Number */ +typedef LUAI_UACNUMBER l_uacNumber; + + +/* internal assertions for in-house debugging */ +#if defined(lua_assert) +#define check_exp(c,e) (lua_assert(c), (e)) +/* to avoid problems with conditions too long */ +#define lua_longassert(c) { if (!(c)) lua_assert(0); } +#else +#define lua_assert(c) ((void)0) +#define check_exp(c,e) (e) +#define lua_longassert(c) ((void)0) +#endif + +/* +** assertion for checking API calls +*/ +#if !defined(luai_apicheck) + +#if defined(LUA_USE_APICHECK) +#include +#define luai_apicheck(L,e) assert(e) +#else +#define luai_apicheck(L,e) lua_assert(e) +#endif + +#endif + +#define api_check(l,e,msg) luai_apicheck(l,(e) && msg) + + +#if !defined(UNUSED) +#define UNUSED(x) ((void)(x)) /* to avoid warnings */ +#endif + + +#define cast(t, exp) ((t)(exp)) + +#define cast_byte(i) cast(lu_byte, (i)) +#define cast_num(i) cast(lua_Number, (i)) +#define cast_int(i) cast(int, (i)) +#define cast_uchar(i) cast(unsigned char, (i)) + + +/* +** non-return type +*/ +#if defined(__GNUC__) +#define l_noret void __attribute__((noreturn)) +#elif defined(_MSC_VER) +#define l_noret void __declspec(noreturn) +#else +#define l_noret void +#endif + + + +/* +** maximum depth for nested C calls and syntactical nested non-terminals +** in a program. (Value must fit in an unsigned short int.) +*/ +#if !defined(LUAI_MAXCCALLS) +#define LUAI_MAXCCALLS 200 +#endif + +/* +** maximum number of upvalues in a closure (both C and Lua). (Value +** must fit in an unsigned char.) +*/ +#define MAXUPVAL UCHAR_MAX + + +/* +** type for virtual-machine instructions +** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h) +*/ +typedef lu_int32 Instruction; + + + +/* maximum stack for a Lua function */ +#define MAXSTACK 250 + + + +/* minimum size for the string table (must be power of 2) */ +#if !defined(MINSTRTABSIZE) +#define MINSTRTABSIZE 32 +#endif + + +/* minimum size for string buffer */ +#if !defined(LUA_MINBUFFER) +#define LUA_MINBUFFER 32 +#endif + + +#if !defined(lua_lock) +#define lua_lock(L) ((void) 0) +#define lua_unlock(L) ((void) 0) +#endif + +#if !defined(luai_threadyield) +#define luai_threadyield(L) {lua_unlock(L); lua_lock(L);} +#endif + + +/* +** these macros allow user-specific actions on threads when you defined +** LUAI_EXTRASPACE and need to do something extra when a thread is +** created/deleted/resumed/yielded. +*/ +#if !defined(luai_userstateopen) +#define luai_userstateopen(L) ((void)L) +#endif + +#if !defined(luai_userstateclose) +#define luai_userstateclose(L) ((void)L) +#endif + +#if !defined(luai_userstatethread) +#define luai_userstatethread(L,L1) ((void)L) +#endif + +#if !defined(luai_userstatefree) +#define luai_userstatefree(L,L1) ((void)L) +#endif + +#if !defined(luai_userstateresume) +#define luai_userstateresume(L,n) ((void)L) +#endif + +#if !defined(luai_userstateyield) +#define luai_userstateyield(L,n) ((void)L) +#endif + +/* +** lua_number2int is a macro to convert lua_Number to int. +** lua_number2integer is a macro to convert lua_Number to lua_Integer. +** lua_number2unsigned is a macro to convert a lua_Number to a lua_Unsigned. +** lua_unsigned2number is a macro to convert a lua_Unsigned to a lua_Number. +** luai_hashnum is a macro to hash a lua_Number value into an integer. +** The hash must be deterministic and give reasonable values for +** both small and large values (outside the range of integers). +*/ + +#if defined(MS_ASMTRICK) || defined(LUA_MSASMTRICK) /* { */ +/* trick with Microsoft assembler for X86 */ + +#define lua_number2int(i,n) __asm {__asm fld n __asm fistp i} +#define lua_number2integer(i,n) lua_number2int(i, n) +#define lua_number2unsigned(i,n) \ + {__int64 l; __asm {__asm fld n __asm fistp l} i = (unsigned int)l;} + + +#elif defined(LUA_IEEE754TRICK) /* }{ */ +/* the next trick should work on any machine using IEEE754 with + a 32-bit int type */ + +union luai_Cast { double l_d; LUA_INT32 l_p[2]; }; + +#if !defined(LUA_IEEEENDIAN) /* { */ +#define LUAI_EXTRAIEEE \ + static const union luai_Cast ieeeendian = {-(33.0 + 6755399441055744.0)}; +#define LUA_IEEEENDIANLOC (ieeeendian.l_p[1] == 33) +#else +#define LUA_IEEEENDIANLOC LUA_IEEEENDIAN +#define LUAI_EXTRAIEEE /* empty */ +#endif /* } */ + +#define lua_number2int32(i,n,t) \ + { LUAI_EXTRAIEEE \ + volatile union luai_Cast u; u.l_d = (n) + 6755399441055744.0; \ + (i) = (t)u.l_p[LUA_IEEEENDIANLOC]; } + +#define luai_hashnum(i,n) \ + { volatile union luai_Cast u; u.l_d = (n) + 1.0; /* avoid -0 */ \ + (i) = u.l_p[0]; (i) += u.l_p[1]; } /* add double bits for his hash */ + +#define lua_number2int(i,n) lua_number2int32(i, n, int) +#define lua_number2unsigned(i,n) lua_number2int32(i, n, lua_Unsigned) + +/* the trick can be expanded to lua_Integer when it is a 32-bit value */ +#if defined(LUA_IEEELL) +#define lua_number2integer(i,n) lua_number2int32(i, n, lua_Integer) +#endif + +#endif /* } */ + + +/* the following definitions always work, but may be slow */ + +#if !defined(lua_number2int) +#define lua_number2int(i,n) ((i)=(int)(n)) +#endif + +#if !defined(lua_number2integer) +#define lua_number2integer(i,n) ((i)=(lua_Integer)(n)) +#endif + +#if !defined(lua_number2unsigned) /* { */ +/* the following definition assures proper modulo behavior */ +#if defined(LUA_NUMBER_DOUBLE) || defined(LUA_NUMBER_FLOAT) +#include +#define SUPUNSIGNED ((lua_Number)(~(lua_Unsigned)0) + 1) +#define lua_number2unsigned(i,n) \ + ((i)=(lua_Unsigned)((n) - floor((n)/SUPUNSIGNED)*SUPUNSIGNED)) +#else +#define lua_number2unsigned(i,n) ((i)=(lua_Unsigned)(n)) +#endif +#endif /* } */ + + +#if !defined(lua_unsigned2number) +/* on several machines, coercion from unsigned to double is slow, + so it may be worth to avoid */ +#define lua_unsigned2number(u) \ + (((u) <= (lua_Unsigned)INT_MAX) ? (lua_Number)(int)(u) : (lua_Number)(u)) +#endif + + + +#if !defined(luai_hashnum) + +#include +#include + +#define luai_hashnum(i,n) { int e; \ + n = l_mathop(frexp)(n, &e) * (lua_Number)(INT_MAX - DBL_MAX_EXP); \ + lua_number2int(i, n); i += e; } + +#endif + + + +/* +** macro to control inclusion of some hard tests on stack reallocation +*/ +#if !defined(HARDSTACKTESTS) +#define condmovestack(L) ((void)0) +#else +/* realloc stack keeping its size */ +#define condmovestack(L) luaD_reallocstack((L), (L)->stacksize) +#endif + +#if !defined(HARDMEMTESTS) +#define condchangemem(L) condmovestack(L) +#else +#define condchangemem(L) \ + ((void)(!(G(L)->gcrunning) || (luaC_fullgc(L, 0), 1))) +#endif + +#endif diff --git a/radio/src/lua/src/lmathlib.c b/radio/src/lua/src/lmathlib.c new file mode 100644 index 000000000..20292d720 --- /dev/null +++ b/radio/src/lua/src/lmathlib.c @@ -0,0 +1,278 @@ +/* +** $Id: lmathlib.c,v 1.83 2013/03/07 18:21:32 roberto Exp $ +** Standard mathematical library +** See Copyright Notice in lua.h +*/ + + +#include +#include + +#define lmathlib_c + +#include "lua.h" + +#include "lauxlib.h" +#include "lualib.h" + + +#undef PI +#define PI ((lua_Number)(3.1415926535897932384626433832795)) +#define RADIANS_PER_DEGREE ((lua_Number)(PI/180.0)) + + + +static int math_abs (lua_State *L) { + lua_pushnumber(L, l_mathop(fabs)(luaL_checknumber(L, 1))); + return 1; +} + +static int math_sin (lua_State *L) { + lua_pushnumber(L, l_mathop(sin)(luaL_checknumber(L, 1))); + return 1; +} + +static int math_sinh (lua_State *L) { + lua_pushnumber(L, l_mathop(sinh)(luaL_checknumber(L, 1))); + return 1; +} + +static int math_cos (lua_State *L) { + lua_pushnumber(L, l_mathop(cos)(luaL_checknumber(L, 1))); + return 1; +} + +static int math_cosh (lua_State *L) { + lua_pushnumber(L, l_mathop(cosh)(luaL_checknumber(L, 1))); + return 1; +} + +static int math_tan (lua_State *L) { + lua_pushnumber(L, l_mathop(tan)(luaL_checknumber(L, 1))); + return 1; +} + +static int math_tanh (lua_State *L) { + lua_pushnumber(L, l_mathop(tanh)(luaL_checknumber(L, 1))); + return 1; +} + +static int math_asin (lua_State *L) { + lua_pushnumber(L, l_mathop(asin)(luaL_checknumber(L, 1))); + return 1; +} + +static int math_acos (lua_State *L) { + lua_pushnumber(L, l_mathop(acos)(luaL_checknumber(L, 1))); + return 1; +} + +static int math_atan (lua_State *L) { + lua_pushnumber(L, l_mathop(atan)(luaL_checknumber(L, 1))); + return 1; +} + +static int math_atan2 (lua_State *L) { + lua_pushnumber(L, l_mathop(atan2)(luaL_checknumber(L, 1), + luaL_checknumber(L, 2))); + return 1; +} + +static int math_ceil (lua_State *L) { + lua_pushnumber(L, l_mathop(ceil)(luaL_checknumber(L, 1))); + return 1; +} + +static int math_floor (lua_State *L) { + lua_pushnumber(L, l_mathop(floor)(luaL_checknumber(L, 1))); + return 1; +} + +static int math_fmod (lua_State *L) { + lua_pushnumber(L, l_mathop(fmod)(luaL_checknumber(L, 1), + luaL_checknumber(L, 2))); + return 1; +} + +static int math_modf (lua_State *L) { + lua_Number ip; + lua_Number fp = l_mathop(modf)(luaL_checknumber(L, 1), &ip); + lua_pushnumber(L, ip); + lua_pushnumber(L, fp); + return 2; +} + +static int math_sqrt (lua_State *L) { + lua_pushnumber(L, l_mathop(sqrt)(luaL_checknumber(L, 1))); + return 1; +} + +static int math_pow (lua_State *L) { + lua_Number x = luaL_checknumber(L, 1); + lua_Number y = luaL_checknumber(L, 2); + lua_pushnumber(L, l_mathop(pow)(x, y)); + return 1; +} + +static int math_log (lua_State *L) { + lua_Number x = luaL_checknumber(L, 1); + lua_Number res; + if (lua_isnoneornil(L, 2)) + res = l_mathop(log)(x); + else { + lua_Number base = luaL_checknumber(L, 2); + if (base == (lua_Number)10.0) res = l_mathop(log10)(x); + else res = l_mathop(log)(x)/l_mathop(log)(base); + } + lua_pushnumber(L, res); + return 1; +} + +#if defined(LUA_COMPAT_LOG10) +static int math_log10 (lua_State *L) { + lua_pushnumber(L, l_mathop(log10)(luaL_checknumber(L, 1))); + return 1; +} +#endif + +static int math_exp (lua_State *L) { + lua_pushnumber(L, l_mathop(exp)(luaL_checknumber(L, 1))); + return 1; +} + +static int math_deg (lua_State *L) { + lua_pushnumber(L, luaL_checknumber(L, 1)/RADIANS_PER_DEGREE); + return 1; +} + +static int math_rad (lua_State *L) { + lua_pushnumber(L, luaL_checknumber(L, 1)*RADIANS_PER_DEGREE); + return 1; +} + +static int math_frexp (lua_State *L) { + int e; + lua_pushnumber(L, l_mathop(frexp)(luaL_checknumber(L, 1), &e)); + lua_pushinteger(L, e); + return 2; +} + +static int math_ldexp (lua_State *L) { + lua_Number x = luaL_checknumber(L, 1); + int ep = luaL_checkint(L, 2); + lua_pushnumber(L, l_mathop(ldexp)(x, ep)); + return 1; +} + + + +static int math_min (lua_State *L) { + int n = lua_gettop(L); /* number of arguments */ + lua_Number dmin = luaL_checknumber(L, 1); + int i; + for (i=2; i<=n; i++) { + lua_Number d = luaL_checknumber(L, i); + if (d < dmin) + dmin = d; + } + lua_pushnumber(L, dmin); + return 1; +} + + +static int math_max (lua_State *L) { + int n = lua_gettop(L); /* number of arguments */ + lua_Number dmax = luaL_checknumber(L, 1); + int i; + for (i=2; i<=n; i++) { + lua_Number d = luaL_checknumber(L, i); + if (d > dmax) + dmax = d; + } + lua_pushnumber(L, dmax); + return 1; +} + + +static int math_random (lua_State *L) { + /* the `%' avoids the (rare) case of r==1, and is needed also because on + some systems (SunOS!) `rand()' may return a value larger than RAND_MAX */ + lua_Number r = (lua_Number)(rand()%RAND_MAX) / (lua_Number)RAND_MAX; + switch (lua_gettop(L)) { /* check number of arguments */ + case 0: { /* no arguments */ + lua_pushnumber(L, r); /* Number between 0 and 1 */ + break; + } + case 1: { /* only upper limit */ + lua_Number u = luaL_checknumber(L, 1); + luaL_argcheck(L, (lua_Number)1.0 <= u, 1, "interval is empty"); + lua_pushnumber(L, l_mathop(floor)(r*u) + (lua_Number)(1.0)); /* [1, u] */ + break; + } + case 2: { /* lower and upper limits */ + lua_Number l = luaL_checknumber(L, 1); + lua_Number u = luaL_checknumber(L, 2); + luaL_argcheck(L, l <= u, 2, "interval is empty"); + lua_pushnumber(L, l_mathop(floor)(r*(u-l+1)) + l); /* [l, u] */ + break; + } + default: return luaL_error(L, "wrong number of arguments"); + } + return 1; +} + + +static int math_randomseed (lua_State *L) { + srand(luaL_checkunsigned(L, 1)); + (void)rand(); /* discard first value to avoid undesirable correlations */ + return 0; +} + + +static const luaL_Reg mathlib[] = { + {"abs", math_abs}, + {"acos", math_acos}, + {"asin", math_asin}, + {"atan2", math_atan2}, + {"atan", math_atan}, + {"ceil", math_ceil}, + {"cosh", math_cosh}, + {"cos", math_cos}, + {"deg", math_deg}, + {"exp", math_exp}, + {"floor", math_floor}, + {"fmod", math_fmod}, + {"frexp", math_frexp}, + {"ldexp", math_ldexp}, +#if defined(LUA_COMPAT_LOG10) + {"log10", math_log10}, +#endif + {"log", math_log}, + {"max", math_max}, + {"min", math_min}, + {"modf", math_modf}, + {"pow", math_pow}, + {"rad", math_rad}, + {"random", math_random}, + {"randomseed", math_randomseed}, + {"sinh", math_sinh}, + {"sin", math_sin}, + {"sqrt", math_sqrt}, + {"tanh", math_tanh}, + {"tan", math_tan}, + {NULL, NULL} +}; + + +/* +** Open math library +*/ +LUAMOD_API int luaopen_math (lua_State *L) { + luaL_newlib(L, mathlib); + lua_pushnumber(L, PI); + lua_setfield(L, -2, "pi"); + lua_pushnumber(L, HUGE_VAL); + lua_setfield(L, -2, "huge"); + return 1; +} + diff --git a/radio/src/lua/src/lmem.c b/radio/src/lua/src/lmem.c new file mode 100644 index 000000000..83d2349ee --- /dev/null +++ b/radio/src/lua/src/lmem.c @@ -0,0 +1,98 @@ +/* +** $Id: lmem.c,v 1.84 2012/05/23 15:41:53 roberto Exp $ +** Interface to Memory Manager +** See Copyright Notice in lua.h +*/ + + +#include + +#define lmem_c +#define LUA_CORE + +#include "lua.h" + +#include "ldebug.h" +#include "ldo.h" +#include "lgc.h" +#include "lmem.h" +#include "lobject.h" +#include "lstate.h" + + + +/* +** About the realloc function: +** void * frealloc (void *ud, void *ptr, size_t osize, size_t nsize); +** (`osize' is the old size, `nsize' is the new size) +** +** * frealloc(ud, NULL, x, s) creates a new block of size `s' (no +** matter 'x'). +** +** * frealloc(ud, p, x, 0) frees the block `p' +** (in this specific case, frealloc must return NULL); +** particularly, frealloc(ud, NULL, 0, 0) does nothing +** (which is equivalent to free(NULL) in ANSI C) +** +** frealloc returns NULL if it cannot create or reallocate the area +** (any reallocation to an equal or smaller size cannot fail!) +*/ + + + +#define MINSIZEARRAY 4 + +void *luaM_growaux_ (lua_State *L, void *block, int *size, size_t size_elems, + int limit, const char *what) { + void *newblock; + int newsize; + if (*size >= limit/2) { /* cannot double it? */ + if (*size >= limit) /* cannot grow even a little? */ + luaG_runerror(L, "too many %s (limit is %d)", what, limit); + newsize = limit; /* still have at least one free place */ + } + else { + newsize = (*size)*2; + if (newsize < MINSIZEARRAY) + newsize = MINSIZEARRAY; /* minimum size */ + } + newblock = luaM_reallocv(L, block, *size, newsize, size_elems); + *size = newsize; /* update only when everything else is OK */ + return newblock; +} + + +l_noret luaM_toobig (lua_State *L) { + luaG_runerror(L, "memory allocation error: block too big"); +} + + + +/* +** generic allocation routine. +*/ +void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { + void *newblock; + global_State *g = G(L); + size_t realosize = (block) ? osize : 0; + lua_assert((realosize == 0) == (block == NULL)); +#if defined(HARDMEMTESTS) + if (nsize > realosize && g->gcrunning) + luaC_fullgc(L, 1); /* force a GC whenever possible */ +#endif + newblock = (*g->frealloc)(g->ud, block, osize, nsize); + if (newblock == NULL && nsize > 0) { + api_check(L, nsize > realosize, + "realloc cannot fail when shrinking a block"); + if (g->gcrunning) { + luaC_fullgc(L, 1); /* try to free some memory... */ + newblock = (*g->frealloc)(g->ud, block, osize, nsize); /* try again */ + } + if (newblock == NULL) + luaD_throw(L, LUA_ERRMEM); + } + lua_assert((nsize == 0) == (newblock == NULL)); + g->GCdebt = (g->GCdebt + nsize) - realosize; + return newblock; +} + diff --git a/radio/src/lua/src/lmem.h b/radio/src/lua/src/lmem.h new file mode 100644 index 000000000..5f850999a --- /dev/null +++ b/radio/src/lua/src/lmem.h @@ -0,0 +1,57 @@ +/* +** $Id: lmem.h,v 1.40 2013/02/20 14:08:21 roberto Exp $ +** Interface to Memory Manager +** See Copyright Notice in lua.h +*/ + +#ifndef lmem_h +#define lmem_h + + +#include + +#include "llimits.h" +#include "lua.h" + + +/* +** This macro avoids the runtime division MAX_SIZET/(e), as 'e' is +** always constant. +** The macro is somewhat complex to avoid warnings: +** +1 avoids warnings of "comparison has constant result"; +** cast to 'void' avoids warnings of "value unused". +*/ +#define luaM_reallocv(L,b,on,n,e) \ + (cast(void, \ + (cast(size_t, (n)+1) > MAX_SIZET/(e)) ? (luaM_toobig(L), 0) : 0), \ + luaM_realloc_(L, (b), (on)*(e), (n)*(e))) + +#define luaM_freemem(L, b, s) luaM_realloc_(L, (b), (s), 0) +#define luaM_free(L, b) luaM_realloc_(L, (b), sizeof(*(b)), 0) +#define luaM_freearray(L, b, n) luaM_reallocv(L, (b), n, 0, sizeof((b)[0])) + +#define luaM_malloc(L,s) luaM_realloc_(L, NULL, 0, (s)) +#define luaM_new(L,t) cast(t *, luaM_malloc(L, sizeof(t))) +#define luaM_newvector(L,n,t) \ + cast(t *, luaM_reallocv(L, NULL, 0, n, sizeof(t))) + +#define luaM_newobject(L,tag,s) luaM_realloc_(L, NULL, tag, (s)) + +#define luaM_growvector(L,v,nelems,size,t,limit,e) \ + if ((nelems)+1 > (size)) \ + ((v)=cast(t *, luaM_growaux_(L,v,&(size),sizeof(t),limit,e))) + +#define luaM_reallocvector(L, v,oldn,n,t) \ + ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) + +LUAI_FUNC l_noret luaM_toobig (lua_State *L); + +/* not to be called directly */ +LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, + size_t size); +LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, + size_t size_elem, int limit, + const char *what); + +#endif + diff --git a/radio/src/lua/src/loadlib.c b/radio/src/lua/src/loadlib.c new file mode 100644 index 000000000..3849a7859 --- /dev/null +++ b/radio/src/lua/src/loadlib.c @@ -0,0 +1,731 @@ +/* +** $Id: loadlib.c,v 1.111 2012/05/30 12:33:44 roberto Exp $ +** Dynamic library loader for Lua +** See Copyright Notice in lua.h +** +** This module contains an implementation of loadlib for Unix systems +** that have dlfcn, an implementation for Windows, and a stub for other +** systems. +*/ + + +/* +** if needed, includes windows header before everything else +*/ +#if defined(_WIN32) +#include +#endif + + +#include +#include + + +#define loadlib_c + +#include "lua.h" + +#include "lauxlib.h" +#include "lualib.h" + + +/* +** LUA_PATH and LUA_CPATH are the names of the environment +** variables that Lua check to set its paths. +*/ +#if !defined(LUA_PATH) +#define LUA_PATH "LUA_PATH" +#endif + +#if !defined(LUA_CPATH) +#define LUA_CPATH "LUA_CPATH" +#endif + +#define LUA_PATHSUFFIX "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR + +#define LUA_PATHVERSION LUA_PATH LUA_PATHSUFFIX +#define LUA_CPATHVERSION LUA_CPATH LUA_PATHSUFFIX + +/* +** LUA_PATH_SEP is the character that separates templates in a path. +** LUA_PATH_MARK is the string that marks the substitution points in a +** template. +** LUA_EXEC_DIR in a Windows path is replaced by the executable's +** directory. +** LUA_IGMARK is a mark to ignore all before it when building the +** luaopen_ function name. +*/ +#if !defined (LUA_PATH_SEP) +#define LUA_PATH_SEP ";" +#endif +#if !defined (LUA_PATH_MARK) +#define LUA_PATH_MARK "?" +#endif +#if !defined (LUA_EXEC_DIR) +#define LUA_EXEC_DIR "!" +#endif +#if !defined (LUA_IGMARK) +#define LUA_IGMARK "-" +#endif + + +/* +** LUA_CSUBSEP is the character that replaces dots in submodule names +** when searching for a C loader. +** LUA_LSUBSEP is the character that replaces dots in submodule names +** when searching for a Lua loader. +*/ +#if !defined(LUA_CSUBSEP) +#define LUA_CSUBSEP LUA_DIRSEP +#endif + +#if !defined(LUA_LSUBSEP) +#define LUA_LSUBSEP LUA_DIRSEP +#endif + + +/* prefix for open functions in C libraries */ +#define LUA_POF "luaopen_" + +/* separator for open functions in C libraries */ +#define LUA_OFSEP "_" + + +/* table (in the registry) that keeps handles for all loaded C libraries */ +#define CLIBS "_CLIBS" + +#define LIB_FAIL "open" + + +/* error codes for ll_loadfunc */ +#define ERRLIB 1 +#define ERRFUNC 2 + +#define setprogdir(L) ((void)0) + + +/* +** system-dependent functions +*/ +static void ll_unloadlib (void *lib); +static void *ll_load (lua_State *L, const char *path, int seeglb); +static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym); + + + +#if defined(LUA_USE_DLOPEN) +/* +** {======================================================================== +** This is an implementation of loadlib based on the dlfcn interface. +** The dlfcn interface is available in Linux, SunOS, Solaris, IRIX, FreeBSD, +** NetBSD, AIX 4.2, HPUX 11, and probably most other Unix flavors, at least +** as an emulation layer on top of native functions. +** ========================================================================= +*/ + +#include + +static void ll_unloadlib (void *lib) { + dlclose(lib); +} + + +static void *ll_load (lua_State *L, const char *path, int seeglb) { + void *lib = dlopen(path, RTLD_NOW | (seeglb ? RTLD_GLOBAL : RTLD_LOCAL)); + if (lib == NULL) lua_pushstring(L, dlerror()); + return lib; +} + + +static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) { + lua_CFunction f = (lua_CFunction)dlsym(lib, sym); + if (f == NULL) lua_pushstring(L, dlerror()); + return f; +} + +/* }====================================================== */ + + + +#elif defined(LUA_DL_DLL) +/* +** {====================================================================== +** This is an implementation of loadlib for Windows using native functions. +** ======================================================================= +*/ + +#undef setprogdir + +/* +** optional flags for LoadLibraryEx +*/ +#if !defined(LUA_LLE_FLAGS) +#define LUA_LLE_FLAGS 0 +#endif + + +static void setprogdir (lua_State *L) { + char buff[MAX_PATH + 1]; + char *lb; + DWORD nsize = sizeof(buff)/sizeof(char); + DWORD n = GetModuleFileNameA(NULL, buff, nsize); + if (n == 0 || n == nsize || (lb = strrchr(buff, '\\')) == NULL) + luaL_error(L, "unable to get ModuleFileName"); + else { + *lb = '\0'; + luaL_gsub(L, lua_tostring(L, -1), LUA_EXEC_DIR, buff); + lua_remove(L, -2); /* remove original string */ + } +} + + +static void pusherror (lua_State *L) { + int error = GetLastError(); + char buffer[128]; + if (FormatMessageA(FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM, + NULL, error, 0, buffer, sizeof(buffer)/sizeof(char), NULL)) + lua_pushstring(L, buffer); + else + lua_pushfstring(L, "system error %d\n", error); +} + +static void ll_unloadlib (void *lib) { + FreeLibrary((HMODULE)lib); +} + + +static void *ll_load (lua_State *L, const char *path, int seeglb) { + HMODULE lib = LoadLibraryExA(path, NULL, LUA_LLE_FLAGS); + (void)(seeglb); /* not used: symbols are 'global' by default */ + if (lib == NULL) pusherror(L); + return lib; +} + + +static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) { + lua_CFunction f = (lua_CFunction)GetProcAddress((HMODULE)lib, sym); + if (f == NULL) pusherror(L); + return f; +} + +/* }====================================================== */ + + +#else +/* +** {====================================================== +** Fallback for other systems +** ======================================================= +*/ + +#undef LIB_FAIL +#define LIB_FAIL "absent" + + +#define DLMSG "dynamic libraries not enabled; check your Lua installation" + + +static void ll_unloadlib (void *lib) { + (void)(lib); /* not used */ +} + + +static void *ll_load (lua_State *L, const char *path, int seeglb) { + (void)(path); (void)(seeglb); /* not used */ + lua_pushliteral(L, DLMSG); + return NULL; +} + + +static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) { + (void)(lib); (void)(sym); /* not used */ + lua_pushliteral(L, DLMSG); + return NULL; +} + +/* }====================================================== */ +#endif + + +static void *ll_checkclib (lua_State *L, const char *path) { + void *plib; + lua_getfield(L, LUA_REGISTRYINDEX, CLIBS); + lua_getfield(L, -1, path); + plib = lua_touserdata(L, -1); /* plib = CLIBS[path] */ + lua_pop(L, 2); /* pop CLIBS table and 'plib' */ + return plib; +} + + +static void ll_addtoclib (lua_State *L, const char *path, void *plib) { + lua_getfield(L, LUA_REGISTRYINDEX, CLIBS); + lua_pushlightuserdata(L, plib); + lua_pushvalue(L, -1); + lua_setfield(L, -3, path); /* CLIBS[path] = plib */ + lua_rawseti(L, -2, luaL_len(L, -2) + 1); /* CLIBS[#CLIBS + 1] = plib */ + lua_pop(L, 1); /* pop CLIBS table */ +} + + +/* +** __gc tag method for CLIBS table: calls 'll_unloadlib' for all lib +** handles in list CLIBS +*/ +static int gctm (lua_State *L) { + int n = luaL_len(L, 1); + for (; n >= 1; n--) { /* for each handle, in reverse order */ + lua_rawgeti(L, 1, n); /* get handle CLIBS[n] */ + ll_unloadlib(lua_touserdata(L, -1)); + lua_pop(L, 1); /* pop handle */ + } + return 0; +} + + +static int ll_loadfunc (lua_State *L, const char *path, const char *sym) { + void *reg = ll_checkclib(L, path); /* check loaded C libraries */ + if (reg == NULL) { /* must load library? */ + reg = ll_load(L, path, *sym == '*'); + if (reg == NULL) return ERRLIB; /* unable to load library */ + ll_addtoclib(L, path, reg); + } + if (*sym == '*') { /* loading only library (no function)? */ + lua_pushboolean(L, 1); /* return 'true' */ + return 0; /* no errors */ + } + else { + lua_CFunction f = ll_sym(L, reg, sym); + if (f == NULL) + return ERRFUNC; /* unable to find function */ + lua_pushcfunction(L, f); /* else create new function */ + return 0; /* no errors */ + } +} + + +static int ll_loadlib (lua_State *L) { + const char *path = luaL_checkstring(L, 1); + const char *init = luaL_checkstring(L, 2); + int stat = ll_loadfunc(L, path, init); + if (stat == 0) /* no errors? */ + return 1; /* return the loaded function */ + else { /* error; error message is on stack top */ + lua_pushnil(L); + lua_insert(L, -2); + lua_pushstring(L, (stat == ERRLIB) ? LIB_FAIL : "init"); + return 3; /* return nil, error message, and where */ + } +} + + + +/* +** {====================================================== +** 'require' function +** ======================================================= +*/ + + +static int readable (const char *filename) { +#if defined(USE_FATFS) + FIL f; + FRESULT result = f_open(&f, filename, FA_OPEN_EXISTING | FA_READ); + if (result != FR_OK) return 0; + f_close(&f); +#else + FILE *f = fopen(filename, "r"); /* try to open file */ + if (f == NULL) return 0; /* open failed */ + fclose(f); +#endif + return 1; +} + + +static const char *pushnexttemplate (lua_State *L, const char *path) { + const char *l; + while (*path == *LUA_PATH_SEP) path++; /* skip separators */ + if (*path == '\0') return NULL; /* no more templates */ + l = strchr(path, *LUA_PATH_SEP); /* find next separator */ + if (l == NULL) l = path + strlen(path); + lua_pushlstring(L, path, l - path); /* template */ + return l; +} + + +static const char *searchpath (lua_State *L, const char *name, + const char *path, + const char *sep, + const char *dirsep) { + luaL_Buffer msg; /* to build error message */ + luaL_buffinit(L, &msg); + if (*sep != '\0') /* non-empty separator? */ + name = luaL_gsub(L, name, sep, dirsep); /* replace it by 'dirsep' */ + while ((path = pushnexttemplate(L, path)) != NULL) { + const char *filename = luaL_gsub(L, lua_tostring(L, -1), + LUA_PATH_MARK, name); + lua_remove(L, -2); /* remove path template */ + if (readable(filename)) /* does file exist and is readable? */ + return filename; /* return that file name */ + lua_pushfstring(L, "\n\tno file " LUA_QS, filename); + lua_remove(L, -2); /* remove file name */ + luaL_addvalue(&msg); /* concatenate error msg. entry */ + } + luaL_pushresult(&msg); /* create error message */ + return NULL; /* not found */ +} + + +static int ll_searchpath (lua_State *L) { + const char *f = searchpath(L, luaL_checkstring(L, 1), + luaL_checkstring(L, 2), + luaL_optstring(L, 3, "."), + luaL_optstring(L, 4, LUA_DIRSEP)); + if (f != NULL) return 1; + else { /* error message is on top of the stack */ + lua_pushnil(L); + lua_insert(L, -2); + return 2; /* return nil + error message */ + } +} + + +static const char *findfile (lua_State *L, const char *name, + const char *pname, + const char *dirsep) { + const char *path; + lua_getfield(L, lua_upvalueindex(1), pname); + path = lua_tostring(L, -1); + if (path == NULL) + luaL_error(L, LUA_QL("package.%s") " must be a string", pname); + return searchpath(L, name, path, ".", dirsep); +} + + +static int checkload (lua_State *L, int stat, const char *filename) { + if (stat) { /* module loaded successfully? */ + lua_pushstring(L, filename); /* will be 2nd argument to module */ + return 2; /* return open function and file name */ + } + else + return luaL_error(L, "error loading module " LUA_QS + " from file " LUA_QS ":\n\t%s", + lua_tostring(L, 1), filename, lua_tostring(L, -1)); +} + + +static int searcher_Lua (lua_State *L) { + const char *filename; + const char *name = luaL_checkstring(L, 1); + filename = findfile(L, name, "path", LUA_LSUBSEP); + if (filename == NULL) return 1; /* module not found in this path */ + return checkload(L, (luaL_loadfile(L, filename) == LUA_OK), filename); +} + + +static int loadfunc (lua_State *L, const char *filename, const char *modname) { + const char *funcname; + const char *mark; + modname = luaL_gsub(L, modname, ".", LUA_OFSEP); + mark = strchr(modname, *LUA_IGMARK); + if (mark) { + int stat; + funcname = lua_pushlstring(L, modname, mark - modname); + funcname = lua_pushfstring(L, LUA_POF"%s", funcname); + stat = ll_loadfunc(L, filename, funcname); + if (stat != ERRFUNC) return stat; + modname = mark + 1; /* else go ahead and try old-style name */ + } + funcname = lua_pushfstring(L, LUA_POF"%s", modname); + return ll_loadfunc(L, filename, funcname); +} + + +static int searcher_C (lua_State *L) { + const char *name = luaL_checkstring(L, 1); + const char *filename = findfile(L, name, "cpath", LUA_CSUBSEP); + if (filename == NULL) return 1; /* module not found in this path */ + return checkload(L, (loadfunc(L, filename, name) == 0), filename); +} + + +static int searcher_Croot (lua_State *L) { + const char *filename; + const char *name = luaL_checkstring(L, 1); + const char *p = strchr(name, '.'); + int stat; + if (p == NULL) return 0; /* is root */ + lua_pushlstring(L, name, p - name); + filename = findfile(L, lua_tostring(L, -1), "cpath", LUA_CSUBSEP); + if (filename == NULL) return 1; /* root not found */ + if ((stat = loadfunc(L, filename, name)) != 0) { + if (stat != ERRFUNC) + return checkload(L, 0, filename); /* real error */ + else { /* open function not found */ + lua_pushfstring(L, "\n\tno module " LUA_QS " in file " LUA_QS, + name, filename); + return 1; + } + } + lua_pushstring(L, filename); /* will be 2nd argument to module */ + return 2; +} + + +static int searcher_preload (lua_State *L) { + const char *name = luaL_checkstring(L, 1); + lua_getfield(L, LUA_REGISTRYINDEX, "_PRELOAD"); + lua_getfield(L, -1, name); + if (lua_isnil(L, -1)) /* not found? */ + lua_pushfstring(L, "\n\tno field package.preload['%s']", name); + return 1; +} + + +static void findloader (lua_State *L, const char *name) { + int i; + luaL_Buffer msg; /* to build error message */ + luaL_buffinit(L, &msg); + lua_getfield(L, lua_upvalueindex(1), "searchers"); /* will be at index 3 */ + if (!lua_istable(L, 3)) + luaL_error(L, LUA_QL("package.searchers") " must be a table"); + /* iterate over available searchers to find a loader */ + for (i = 1; ; i++) { + lua_rawgeti(L, 3, i); /* get a searcher */ + if (lua_isnil(L, -1)) { /* no more searchers? */ + lua_pop(L, 1); /* remove nil */ + luaL_pushresult(&msg); /* create error message */ + luaL_error(L, "module " LUA_QS " not found:%s", + name, lua_tostring(L, -1)); + } + lua_pushstring(L, name); + lua_call(L, 1, 2); /* call it */ + if (lua_isfunction(L, -2)) /* did it find a loader? */ + return; /* module loader found */ + else if (lua_isstring(L, -2)) { /* searcher returned error message? */ + lua_pop(L, 1); /* remove extra return */ + luaL_addvalue(&msg); /* concatenate error message */ + } + else + lua_pop(L, 2); /* remove both returns */ + } +} + + +static int ll_require (lua_State *L) { + const char *name = luaL_checkstring(L, 1); + lua_settop(L, 1); /* _LOADED table will be at index 2 */ + lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"); + lua_getfield(L, 2, name); /* _LOADED[name] */ + if (lua_toboolean(L, -1)) /* is it there? */ + return 1; /* package is already loaded */ + /* else must load package */ + lua_pop(L, 1); /* remove 'getfield' result */ + findloader(L, name); + lua_pushstring(L, name); /* pass name as argument to module loader */ + lua_insert(L, -2); /* name is 1st argument (before search data) */ + lua_call(L, 2, 1); /* run loader to load module */ + if (!lua_isnil(L, -1)) /* non-nil return? */ + lua_setfield(L, 2, name); /* _LOADED[name] = returned value */ + lua_getfield(L, 2, name); + if (lua_isnil(L, -1)) { /* module did not set a value? */ + lua_pushboolean(L, 1); /* use true as result */ + lua_pushvalue(L, -1); /* extra copy to be returned */ + lua_setfield(L, 2, name); /* _LOADED[name] = true */ + } + return 1; +} + +/* }====================================================== */ + + + +/* +** {====================================================== +** 'module' function +** ======================================================= +*/ +#if defined(LUA_COMPAT_MODULE) + +/* +** changes the environment variable of calling function +*/ +static void set_env (lua_State *L) { + lua_Debug ar; + if (lua_getstack(L, 1, &ar) == 0 || + lua_getinfo(L, "f", &ar) == 0 || /* get calling function */ + lua_iscfunction(L, -1)) + luaL_error(L, LUA_QL("module") " not called from a Lua function"); + lua_pushvalue(L, -2); /* copy new environment table to top */ + lua_setupvalue(L, -2, 1); + lua_pop(L, 1); /* remove function */ +} + + +static void dooptions (lua_State *L, int n) { + int i; + for (i = 2; i <= n; i++) { + if (lua_isfunction(L, i)) { /* avoid 'calling' extra info. */ + lua_pushvalue(L, i); /* get option (a function) */ + lua_pushvalue(L, -2); /* module */ + lua_call(L, 1, 0); + } + } +} + + +static void modinit (lua_State *L, const char *modname) { + const char *dot; + lua_pushvalue(L, -1); + lua_setfield(L, -2, "_M"); /* module._M = module */ + lua_pushstring(L, modname); + lua_setfield(L, -2, "_NAME"); + dot = strrchr(modname, '.'); /* look for last dot in module name */ + if (dot == NULL) dot = modname; + else dot++; + /* set _PACKAGE as package name (full module name minus last part) */ + lua_pushlstring(L, modname, dot - modname); + lua_setfield(L, -2, "_PACKAGE"); +} + + +static int ll_module (lua_State *L) { + const char *modname = luaL_checkstring(L, 1); + int lastarg = lua_gettop(L); /* last parameter */ + luaL_pushmodule(L, modname, 1); /* get/create module table */ + /* check whether table already has a _NAME field */ + lua_getfield(L, -1, "_NAME"); + if (!lua_isnil(L, -1)) /* is table an initialized module? */ + lua_pop(L, 1); + else { /* no; initialize it */ + lua_pop(L, 1); + modinit(L, modname); + } + lua_pushvalue(L, -1); + set_env(L); + dooptions(L, lastarg); + return 1; +} + + +static int ll_seeall (lua_State *L) { + luaL_checktype(L, 1, LUA_TTABLE); + if (!lua_getmetatable(L, 1)) { + lua_createtable(L, 0, 1); /* create new metatable */ + lua_pushvalue(L, -1); + lua_setmetatable(L, 1); + } + lua_pushglobaltable(L); + lua_setfield(L, -2, "__index"); /* mt.__index = _G */ + return 0; +} + +#endif +/* }====================================================== */ + + + +/* auxiliary mark (for internal use) */ +#define AUXMARK "\1" + + +/* +** return registry.LUA_NOENV as a boolean +*/ +static int noenv (lua_State *L) { + int b; + lua_getfield(L, LUA_REGISTRYINDEX, "LUA_NOENV"); + b = lua_toboolean(L, -1); + lua_pop(L, 1); /* remove value */ + return b; +} + + +static void setpath (lua_State *L, const char *fieldname, const char *envname1, + const char *envname2, const char *def) { + const char *path = getenv(envname1); + if (path == NULL) /* no environment variable? */ + path = getenv(envname2); /* try alternative name */ + if (path == NULL || noenv(L)) /* no environment variable? */ + lua_pushstring(L, def); /* use default */ + else { + /* replace ";;" by ";AUXMARK;" and then AUXMARK by default path */ + path = luaL_gsub(L, path, LUA_PATH_SEP LUA_PATH_SEP, + LUA_PATH_SEP AUXMARK LUA_PATH_SEP); + luaL_gsub(L, path, AUXMARK, def); + lua_remove(L, -2); + } + setprogdir(L); + lua_setfield(L, -2, fieldname); +} + + +static const luaL_Reg pk_funcs[] = { + {"loadlib", ll_loadlib}, + {"searchpath", ll_searchpath}, +#if defined(LUA_COMPAT_MODULE) + {"seeall", ll_seeall}, +#endif + {NULL, NULL} +}; + + +static const luaL_Reg ll_funcs[] = { +#if defined(LUA_COMPAT_MODULE) + {"module", ll_module}, +#endif + {"require", ll_require}, + {NULL, NULL} +}; + + +static void createsearcherstable (lua_State *L) { + static const lua_CFunction searchers[] = + {searcher_preload, searcher_Lua, searcher_C, searcher_Croot, NULL}; + int i; + /* create 'searchers' table */ + lua_createtable(L, sizeof(searchers)/sizeof(searchers[0]) - 1, 0); + /* fill it with pre-defined searchers */ + for (i=0; searchers[i] != NULL; i++) { + lua_pushvalue(L, -2); /* set 'package' as upvalue for all searchers */ + lua_pushcclosure(L, searchers[i], 1); + lua_rawseti(L, -2, i+1); + } +} + + +LUAMOD_API int luaopen_package (lua_State *L) { + /* create table CLIBS to keep track of loaded C libraries */ + luaL_getsubtable(L, LUA_REGISTRYINDEX, CLIBS); + lua_createtable(L, 0, 1); /* metatable for CLIBS */ + lua_pushcfunction(L, gctm); + lua_setfield(L, -2, "__gc"); /* set finalizer for CLIBS table */ + lua_setmetatable(L, -2); + /* create `package' table */ + luaL_newlib(L, pk_funcs); + createsearcherstable(L); +#if defined(LUA_COMPAT_LOADERS) + lua_pushvalue(L, -1); /* make a copy of 'searchers' table */ + lua_setfield(L, -3, "loaders"); /* put it in field `loaders' */ +#endif + lua_setfield(L, -2, "searchers"); /* put it in field 'searchers' */ + /* set field 'path' */ + setpath(L, "path", LUA_PATHVERSION, LUA_PATH, LUA_PATH_DEFAULT); + /* set field 'cpath' */ + setpath(L, "cpath", LUA_CPATHVERSION, LUA_CPATH, LUA_CPATH_DEFAULT); + /* store config information */ + lua_pushliteral(L, LUA_DIRSEP "\n" LUA_PATH_SEP "\n" LUA_PATH_MARK "\n" + LUA_EXEC_DIR "\n" LUA_IGMARK "\n"); + lua_setfield(L, -2, "config"); + /* set field `loaded' */ + luaL_getsubtable(L, LUA_REGISTRYINDEX, "_LOADED"); + lua_setfield(L, -2, "loaded"); + /* set field `preload' */ + luaL_getsubtable(L, LUA_REGISTRYINDEX, "_PRELOAD"); + lua_setfield(L, -2, "preload"); + lua_pushglobaltable(L); + lua_pushvalue(L, -2); /* set 'package' as upvalue for next lib */ + luaL_setfuncs(L, ll_funcs, 1); /* open lib into global table */ + lua_pop(L, 1); /* pop global table */ + return 1; /* return 'package' table */ +} + diff --git a/radio/src/lua/src/lobject.c b/radio/src/lua/src/lobject.c new file mode 100644 index 000000000..51eb7f0b9 --- /dev/null +++ b/radio/src/lua/src/lobject.c @@ -0,0 +1,287 @@ +/* +** $Id: lobject.c,v 2.58 2013/02/20 14:08:56 roberto Exp $ +** Some generic functions over Lua objects +** See Copyright Notice in lua.h +*/ + +#include +#include +#include +#include + +#define lobject_c +#define LUA_CORE + +#include "lua.h" + +#include "lctype.h" +#include "ldebug.h" +#include "ldo.h" +#include "lmem.h" +#include "lobject.h" +#include "lstate.h" +#include "lstring.h" +#include "lvm.h" + + + +LUAI_DDEF const TValue luaO_nilobject_ = {NILCONSTANT}; + + +/* +** converts an integer to a "floating point byte", represented as +** (eeeeexxx), where the real value is (1xxx) * 2^(eeeee - 1) if +** eeeee != 0 and (xxx) otherwise. +*/ +int luaO_int2fb (unsigned int x) { + int e = 0; /* exponent */ + if (x < 8) return x; + while (x >= 0x10) { + x = (x+1) >> 1; + e++; + } + return ((e+1) << 3) | (cast_int(x) - 8); +} + + +/* converts back */ +int luaO_fb2int (int x) { + int e = (x >> 3) & 0x1f; + if (e == 0) return x; + else return ((x & 7) + 8) << (e - 1); +} + + +int luaO_ceillog2 (unsigned int x) { + static const lu_byte log_2[256] = { + 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 + }; + int l = 0; + x--; + while (x >= 256) { l += 8; x >>= 8; } + return l + log_2[x]; +} + + +lua_Number luaO_arith (int op, lua_Number v1, lua_Number v2) { + switch (op) { + case LUA_OPADD: return luai_numadd(NULL, v1, v2); + case LUA_OPSUB: return luai_numsub(NULL, v1, v2); + case LUA_OPMUL: return luai_nummul(NULL, v1, v2); + case LUA_OPDIV: return luai_numdiv(NULL, v1, v2); + case LUA_OPMOD: return luai_nummod(NULL, v1, v2); + case LUA_OPPOW: return luai_numpow(NULL, v1, v2); + case LUA_OPUNM: return luai_numunm(NULL, v1); + default: lua_assert(0); return 0; + } +} + + +int luaO_hexavalue (int c) { + if (lisdigit(c)) return c - '0'; + else return ltolower(c) - 'a' + 10; +} + + +#if !defined(lua_strx2number) + +#include + + +static int isneg (const char **s) { + if (**s == '-') { (*s)++; return 1; } + else if (**s == '+') (*s)++; + return 0; +} + + +static lua_Number readhexa (const char **s, lua_Number r, int *count) { + for (; lisxdigit(cast_uchar(**s)); (*s)++) { /* read integer part */ + r = (r * cast_num(16.0)) + cast_num(luaO_hexavalue(cast_uchar(**s))); + (*count)++; + } + return r; +} + + +/* +** convert an hexadecimal numeric string to a number, following +** C99 specification for 'strtod' +*/ +static lua_Number lua_strx2number (const char *s, char **endptr) { + lua_Number r = 0.0; + int e = 0, i = 0; + int neg = 0; /* 1 if number is negative */ + *endptr = cast(char *, s); /* nothing is valid yet */ + while (lisspace(cast_uchar(*s))) s++; /* skip initial spaces */ + neg = isneg(&s); /* check signal */ + if (!(*s == '0' && (*(s + 1) == 'x' || *(s + 1) == 'X'))) /* check '0x' */ + return 0.0; /* invalid format (no '0x') */ + s += 2; /* skip '0x' */ + r = readhexa(&s, r, &i); /* read integer part */ + if (*s == '.') { + s++; /* skip dot */ + r = readhexa(&s, r, &e); /* read fractional part */ + } + if (i == 0 && e == 0) + return 0.0; /* invalid format (no digit) */ + e *= -4; /* each fractional digit divides value by 2^-4 */ + *endptr = cast(char *, s); /* valid up to here */ + if (*s == 'p' || *s == 'P') { /* exponent part? */ + int exp1 = 0; + int neg1; + s++; /* skip 'p' */ + neg1 = isneg(&s); /* signal */ + if (!lisdigit(cast_uchar(*s))) + goto ret; /* must have at least one digit */ + while (lisdigit(cast_uchar(*s))) /* read exponent */ + exp1 = exp1 * 10 + *(s++) - '0'; + if (neg1) exp1 = -exp1; + e += exp1; + } + *endptr = cast(char *, s); /* valid up to here */ + ret: + if (neg) r = -r; + return l_mathop(ldexp)(r, e); +} + +#endif + + +int luaO_str2d (const char *s, size_t len, lua_Number *result) { + char *endptr; + if (strpbrk(s, "nN")) /* reject 'inf' and 'nan' */ + return 0; + else if (strpbrk(s, "xX")) /* hexa? */ + *result = lua_strx2number(s, &endptr); + else + *result = lua_str2number(s, &endptr); + if (endptr == s) return 0; /* nothing recognized */ + while (lisspace(cast_uchar(*endptr))) endptr++; + return (endptr == s + len); /* OK if no trailing characters */ +} + + + +static void pushstr (lua_State *L, const char *str, size_t l) { + setsvalue2s(L, L->top++, luaS_newlstr(L, str, l)); +} + + +/* this function handles only `%d', `%c', %f, %p, and `%s' formats */ +const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) { + int n = 0; + for (;;) { + const char *e = strchr(fmt, '%'); + if (e == NULL) break; + luaD_checkstack(L, 2); /* fmt + item */ + pushstr(L, fmt, e - fmt); + switch (*(e+1)) { + case 's': { + const char *s = va_arg(argp, char *); + if (s == NULL) s = "(null)"; + pushstr(L, s, strlen(s)); + break; + } + case 'c': { + char buff; + buff = cast(char, va_arg(argp, int)); + pushstr(L, &buff, 1); + break; + } + case 'd': { + setnvalue(L->top++, cast_num(va_arg(argp, int))); + break; + } + case 'f': { + setnvalue(L->top++, cast_num(va_arg(argp, l_uacNumber))); + break; + } + case 'p': { + char buff[4*sizeof(void *) + 8]; /* should be enough space for a `%p' */ + int l = sprintf(buff, "%p", va_arg(argp, void *)); + pushstr(L, buff, l); + break; + } + case '%': { + pushstr(L, "%", 1); + break; + } + default: { + luaG_runerror(L, + "invalid option " LUA_QL("%%%c") " to " LUA_QL("lua_pushfstring"), + *(e + 1)); + } + } + n += 2; + fmt = e+2; + } + luaD_checkstack(L, 1); + pushstr(L, fmt, strlen(fmt)); + if (n > 0) luaV_concat(L, n + 1); + return svalue(L->top - 1); +} + + +const char *luaO_pushfstring (lua_State *L, const char *fmt, ...) { + const char *msg; + va_list argp; + va_start(argp, fmt); + msg = luaO_pushvfstring(L, fmt, argp); + va_end(argp); + return msg; +} + + +/* number of chars of a literal string without the ending \0 */ +#define LL(x) (sizeof(x)/sizeof(char) - 1) + +#define RETS "..." +#define PRE "[string \"" +#define POS "\"]" + +#define addstr(a,b,l) ( memcpy(a,b,(l) * sizeof(char)), a += (l) ) + +void luaO_chunkid (char *out, const char *source, size_t bufflen) { + size_t l = strlen(source); + if (*source == '=') { /* 'literal' source */ + if (l <= bufflen) /* small enough? */ + memcpy(out, source + 1, l * sizeof(char)); + else { /* truncate it */ + addstr(out, source + 1, bufflen - 1); + *out = '\0'; + } + } + else if (*source == '@') { /* file name */ + if (l <= bufflen) /* small enough? */ + memcpy(out, source + 1, l * sizeof(char)); + else { /* add '...' before rest of name */ + addstr(out, RETS, LL(RETS)); + bufflen -= LL(RETS); + memcpy(out, source + 1 + l - bufflen, bufflen * sizeof(char)); + } + } + else { /* string; format as [string "source"] */ + const char *nl = strchr(source, '\n'); /* find first new line (if any) */ + addstr(out, PRE, LL(PRE)); /* add prefix */ + bufflen -= LL(PRE RETS POS) + 1; /* save space for prefix+suffix+'\0' */ + if (l < bufflen && nl == NULL) { /* small one-line source? */ + addstr(out, source, l); /* keep it */ + } + else { + if (nl != NULL) l = nl - source; /* stop at first newline */ + if (l > bufflen) l = bufflen; + addstr(out, source, l); + addstr(out, RETS, LL(RETS)); + } + memcpy(out, POS, (LL(POS) + 1) * sizeof(char)); + } +} + diff --git a/radio/src/lua/src/lobject.h b/radio/src/lua/src/lobject.h new file mode 100644 index 000000000..dd23b9143 --- /dev/null +++ b/radio/src/lua/src/lobject.h @@ -0,0 +1,607 @@ +/* +** $Id: lobject.h,v 2.71 2012/09/11 18:21:44 roberto Exp $ +** Type definitions for Lua objects +** See Copyright Notice in lua.h +*/ + + +#ifndef lobject_h +#define lobject_h + + +#include + + +#include "llimits.h" +#include "lua.h" + + +/* +** Extra tags for non-values +*/ +#define LUA_TPROTO LUA_NUMTAGS +#define LUA_TUPVAL (LUA_NUMTAGS+1) +#define LUA_TDEADKEY (LUA_NUMTAGS+2) + +/* +** number of all possible tags (including LUA_TNONE but excluding DEADKEY) +*/ +#define LUA_TOTALTAGS (LUA_TUPVAL+2) + + +/* +** tags for Tagged Values have the following use of bits: +** bits 0-3: actual tag (a LUA_T* value) +** bits 4-5: variant bits +** bit 6: whether value is collectable +*/ + +#define VARBITS (3 << 4) + + +/* +** LUA_TFUNCTION variants: +** 0 - Lua function +** 1 - light C function +** 2 - regular C function (closure) +*/ + +/* Variant tags for functions */ +#define LUA_TLCL (LUA_TFUNCTION | (0 << 4)) /* Lua closure */ +#define LUA_TLCF (LUA_TFUNCTION | (1 << 4)) /* light C function */ +#define LUA_TCCL (LUA_TFUNCTION | (2 << 4)) /* C closure */ + + +/* Variant tags for strings */ +#define LUA_TSHRSTR (LUA_TSTRING | (0 << 4)) /* short strings */ +#define LUA_TLNGSTR (LUA_TSTRING | (1 << 4)) /* long strings */ + + +/* Bit mark for collectable types */ +#define BIT_ISCOLLECTABLE (1 << 6) + +/* mark a tag as collectable */ +#define ctb(t) ((t) | BIT_ISCOLLECTABLE) + + +/* +** Union of all collectable objects +*/ +typedef union GCObject GCObject; + + +/* +** Common Header for all collectable objects (in macro form, to be +** included in other objects) +*/ +#define CommonHeader GCObject *next; lu_byte tt; lu_byte marked + + +/* +** Common header in struct form +*/ +typedef struct GCheader { + CommonHeader; +} GCheader; + + + +/* +** Union of all Lua values +*/ +typedef union Value Value; + + +#define numfield lua_Number n; /* numbers */ + + + +/* +** Tagged Values. This is the basic representation of values in Lua, +** an actual value plus a tag with its type. +*/ + +#define TValuefields Value value_; int tt_ + +typedef struct lua_TValue TValue; + + +/* macro defining a nil value */ +#define NILCONSTANT {NULL}, LUA_TNIL + + +#define val_(o) ((o)->value_) +#define num_(o) (val_(o).n) + + +/* raw type tag of a TValue */ +#define rttype(o) ((o)->tt_) + +/* tag with no variants (bits 0-3) */ +#define novariant(x) ((x) & 0x0F) + +/* type tag of a TValue (bits 0-3 for tags + variant bits 4-5) */ +#define ttype(o) (rttype(o) & 0x3F) + +/* type tag of a TValue with no variants (bits 0-3) */ +#define ttypenv(o) (novariant(rttype(o))) + + +/* Macros to test type */ +#define checktag(o,t) (rttype(o) == (t)) +#define checktype(o,t) (ttypenv(o) == (t)) +#define ttisnumber(o) checktag((o), LUA_TNUMBER) +#define ttisnil(o) checktag((o), LUA_TNIL) +#define ttisboolean(o) checktag((o), LUA_TBOOLEAN) +#define ttislightuserdata(o) checktag((o), LUA_TLIGHTUSERDATA) +#define ttisstring(o) checktype((o), LUA_TSTRING) +#define ttisshrstring(o) checktag((o), ctb(LUA_TSHRSTR)) +#define ttislngstring(o) checktag((o), ctb(LUA_TLNGSTR)) +#define ttistable(o) checktag((o), ctb(LUA_TTABLE)) +#define ttisfunction(o) checktype(o, LUA_TFUNCTION) +#define ttisclosure(o) ((rttype(o) & 0x1F) == LUA_TFUNCTION) +#define ttisCclosure(o) checktag((o), ctb(LUA_TCCL)) +#define ttisLclosure(o) checktag((o), ctb(LUA_TLCL)) +#define ttislcf(o) checktag((o), LUA_TLCF) +#define ttisuserdata(o) checktag((o), ctb(LUA_TUSERDATA)) +#define ttisthread(o) checktag((o), ctb(LUA_TTHREAD)) +#define ttisdeadkey(o) checktag((o), LUA_TDEADKEY) + +#define ttisequal(o1,o2) (rttype(o1) == rttype(o2)) + +/* Macros to access values */ +#define nvalue(o) check_exp(ttisnumber(o), num_(o)) +#define gcvalue(o) check_exp(iscollectable(o), val_(o).gc) +#define pvalue(o) check_exp(ttislightuserdata(o), val_(o).p) +#define rawtsvalue(o) check_exp(ttisstring(o), &val_(o).gc->ts) +#define tsvalue(o) (&rawtsvalue(o)->tsv) +#define rawuvalue(o) check_exp(ttisuserdata(o), &val_(o).gc->u) +#define uvalue(o) (&rawuvalue(o)->uv) +#define clvalue(o) check_exp(ttisclosure(o), &val_(o).gc->cl) +#define clLvalue(o) check_exp(ttisLclosure(o), &val_(o).gc->cl.l) +#define clCvalue(o) check_exp(ttisCclosure(o), &val_(o).gc->cl.c) +#define fvalue(o) check_exp(ttislcf(o), val_(o).f) +#define hvalue(o) check_exp(ttistable(o), &val_(o).gc->h) +#define bvalue(o) check_exp(ttisboolean(o), val_(o).b) +#define thvalue(o) check_exp(ttisthread(o), &val_(o).gc->th) +/* a dead value may get the 'gc' field, but cannot access its contents */ +#define deadvalue(o) check_exp(ttisdeadkey(o), cast(void *, val_(o).gc)) + +#define l_isfalse(o) (ttisnil(o) || (ttisboolean(o) && bvalue(o) == 0)) + + +#define iscollectable(o) (rttype(o) & BIT_ISCOLLECTABLE) + + +/* Macros for internal tests */ +#define righttt(obj) (ttype(obj) == gcvalue(obj)->gch.tt) + +#define checkliveness(g,obj) \ + lua_longassert(!iscollectable(obj) || \ + (righttt(obj) && !isdead(g,gcvalue(obj)))) + + +/* Macros to set values */ +#define settt_(o,t) ((o)->tt_=(t)) + +#define setnvalue(obj,x) \ + { TValue *io=(obj); num_(io)=(x); settt_(io, LUA_TNUMBER); } + +#define setnilvalue(obj) settt_(obj, LUA_TNIL) + +#define setfvalue(obj,x) \ + { TValue *io=(obj); val_(io).f=(x); settt_(io, LUA_TLCF); } + +#define setpvalue(obj,x) \ + { TValue *io=(obj); val_(io).p=(x); settt_(io, LUA_TLIGHTUSERDATA); } + +#define setbvalue(obj,x) \ + { TValue *io=(obj); val_(io).b=(x); settt_(io, LUA_TBOOLEAN); } + +#define setgcovalue(L,obj,x) \ + { TValue *io=(obj); GCObject *i_g=(x); \ + val_(io).gc=i_g; settt_(io, ctb(gch(i_g)->tt)); } + +#define setsvalue(L,obj,x) \ + { TValue *io=(obj); \ + TString *x_ = (x); \ + val_(io).gc=cast(GCObject *, x_); settt_(io, ctb(x_->tsv.tt)); \ + checkliveness(G(L),io); } + +#define setuvalue(L,obj,x) \ + { TValue *io=(obj); \ + val_(io).gc=cast(GCObject *, (x)); settt_(io, ctb(LUA_TUSERDATA)); \ + checkliveness(G(L),io); } + +#define setthvalue(L,obj,x) \ + { TValue *io=(obj); \ + val_(io).gc=cast(GCObject *, (x)); settt_(io, ctb(LUA_TTHREAD)); \ + checkliveness(G(L),io); } + +#define setclLvalue(L,obj,x) \ + { TValue *io=(obj); \ + val_(io).gc=cast(GCObject *, (x)); settt_(io, ctb(LUA_TLCL)); \ + checkliveness(G(L),io); } + +#define setclCvalue(L,obj,x) \ + { TValue *io=(obj); \ + val_(io).gc=cast(GCObject *, (x)); settt_(io, ctb(LUA_TCCL)); \ + checkliveness(G(L),io); } + +#define sethvalue(L,obj,x) \ + { TValue *io=(obj); \ + val_(io).gc=cast(GCObject *, (x)); settt_(io, ctb(LUA_TTABLE)); \ + checkliveness(G(L),io); } + +#define setdeadvalue(obj) settt_(obj, LUA_TDEADKEY) + + + +#define setobj(L,obj1,obj2) \ + { const TValue *io2=(obj2); TValue *io1=(obj1); \ + io1->value_ = io2->value_; io1->tt_ = io2->tt_; \ + checkliveness(G(L),io1); } + + +/* +** different types of assignments, according to destination +*/ + +/* from stack to (same) stack */ +#define setobjs2s setobj +/* to stack (not from same stack) */ +#define setobj2s setobj +#define setsvalue2s setsvalue +#define sethvalue2s sethvalue +#define setptvalue2s setptvalue +/* from table to same table */ +#define setobjt2t setobj +/* to table */ +#define setobj2t setobj +/* to new object */ +#define setobj2n setobj +#define setsvalue2n setsvalue + + +/* check whether a number is valid (useful only for NaN trick) */ +#define luai_checknum(L,o,c) { /* empty */ } + + +/* +** {====================================================== +** NaN Trick +** ======================================================= +*/ +#if defined(LUA_NANTRICK) + +/* +** numbers are represented in the 'd_' field. All other values have the +** value (NNMARK | tag) in 'tt__'. A number with such pattern would be +** a "signaled NaN", which is never generated by regular operations by +** the CPU (nor by 'strtod') +*/ + +/* allows for external implementation for part of the trick */ +#if !defined(NNMARK) /* { */ + + +#if !defined(LUA_IEEEENDIAN) +#error option 'LUA_NANTRICK' needs 'LUA_IEEEENDIAN' +#endif + + +#define NNMARK 0x7FF7A500 +#define NNMASK 0x7FFFFF00 + +#undef TValuefields +#undef NILCONSTANT + +#if (LUA_IEEEENDIAN == 0) /* { */ + +/* little endian */ +#define TValuefields \ + union { struct { Value v__; int tt__; } i; double d__; } u +#define NILCONSTANT {{{NULL}, tag2tt(LUA_TNIL)}} +/* field-access macros */ +#define v_(o) ((o)->u.i.v__) +#define d_(o) ((o)->u.d__) +#define tt_(o) ((o)->u.i.tt__) + +#else /* }{ */ + +/* big endian */ +#define TValuefields \ + union { struct { int tt__; Value v__; } i; double d__; } u +#define NILCONSTANT {{tag2tt(LUA_TNIL), {NULL}}} +/* field-access macros */ +#define v_(o) ((o)->u.i.v__) +#define d_(o) ((o)->u.d__) +#define tt_(o) ((o)->u.i.tt__) + +#endif /* } */ + +#endif /* } */ + + +/* correspondence with standard representation */ +#undef val_ +#define val_(o) v_(o) +#undef num_ +#define num_(o) d_(o) + + +#undef numfield +#define numfield /* no such field; numbers are the entire struct */ + +/* basic check to distinguish numbers from non-numbers */ +#undef ttisnumber +#define ttisnumber(o) ((tt_(o) & NNMASK) != NNMARK) + +#define tag2tt(t) (NNMARK | (t)) + +#undef rttype +#define rttype(o) (ttisnumber(o) ? LUA_TNUMBER : tt_(o) & 0xff) + +#undef settt_ +#define settt_(o,t) (tt_(o) = tag2tt(t)) + +#undef setnvalue +#define setnvalue(obj,x) \ + { TValue *io_=(obj); num_(io_)=(x); lua_assert(ttisnumber(io_)); } + +#undef setobj +#define setobj(L,obj1,obj2) \ + { const TValue *o2_=(obj2); TValue *o1_=(obj1); \ + o1_->u = o2_->u; \ + checkliveness(G(L),o1_); } + + +/* +** these redefinitions are not mandatory, but these forms are more efficient +*/ + +#undef checktag +#undef checktype +#define checktag(o,t) (tt_(o) == tag2tt(t)) +#define checktype(o,t) (ctb(tt_(o) | VARBITS) == ctb(tag2tt(t) | VARBITS)) + +#undef ttisequal +#define ttisequal(o1,o2) \ + (ttisnumber(o1) ? ttisnumber(o2) : (tt_(o1) == tt_(o2))) + + +#undef luai_checknum +#define luai_checknum(L,o,c) { if (!ttisnumber(o)) c; } + +#endif +/* }====================================================== */ + + + +/* +** {====================================================== +** types and prototypes +** ======================================================= +*/ + + +union Value { + GCObject *gc; /* collectable objects */ + void *p; /* light userdata */ + int b; /* booleans */ + lua_CFunction f; /* light C functions */ + numfield /* numbers */ +}; + + +struct lua_TValue { + TValuefields; +}; + + +typedef TValue *StkId; /* index to stack elements */ + + + + +/* +** Header for string value; string bytes follow the end of this structure +*/ +typedef union TString { + L_Umaxalign dummy; /* ensures maximum alignment for strings */ + struct { + CommonHeader; + lu_byte extra; /* reserved words for short strings; "has hash" for longs */ + unsigned int hash; + size_t len; /* number of characters in string */ + } tsv; +} TString; + + +/* get the actual string (array of bytes) from a TString */ +#define getstr(ts) cast(const char *, (ts) + 1) + +/* get the actual string (array of bytes) from a Lua value */ +#define svalue(o) getstr(rawtsvalue(o)) + + +/* +** Header for userdata; memory area follows the end of this structure +*/ +typedef union Udata { + L_Umaxalign dummy; /* ensures maximum alignment for `local' udata */ + struct { + CommonHeader; + struct Table *metatable; + struct Table *env; + size_t len; /* number of bytes */ + } uv; +} Udata; + + + +/* +** Description of an upvalue for function prototypes +*/ +typedef struct Upvaldesc { + TString *name; /* upvalue name (for debug information) */ + lu_byte instack; /* whether it is in stack */ + lu_byte idx; /* index of upvalue (in stack or in outer function's list) */ +} Upvaldesc; + + +/* +** Description of a local variable for function prototypes +** (used for debug information) +*/ +typedef struct LocVar { + TString *varname; + int startpc; /* first point where variable is active */ + int endpc; /* first point where variable is dead */ +} LocVar; + + +/* +** Function Prototypes +*/ +typedef struct Proto { + CommonHeader; + TValue *k; /* constants used by the function */ + Instruction *code; + struct Proto **p; /* functions defined inside the function */ + int *lineinfo; /* map from opcodes to source lines (debug information) */ + LocVar *locvars; /* information about local variables (debug information) */ + Upvaldesc *upvalues; /* upvalue information */ + union Closure *cache; /* last created closure with this prototype */ + TString *source; /* used for debug information */ + int sizeupvalues; /* size of 'upvalues' */ + int sizek; /* size of `k' */ + int sizecode; + int sizelineinfo; + int sizep; /* size of `p' */ + int sizelocvars; + int linedefined; + int lastlinedefined; + GCObject *gclist; + lu_byte numparams; /* number of fixed parameters */ + lu_byte is_vararg; + lu_byte maxstacksize; /* maximum stack used by this function */ +} Proto; + + + +/* +** Lua Upvalues +*/ +typedef struct UpVal { + CommonHeader; + TValue *v; /* points to stack or to its own value */ + union { + TValue value; /* the value (when closed) */ + struct { /* double linked list (when open) */ + struct UpVal *prev; + struct UpVal *next; + } l; + } u; +} UpVal; + + +/* +** Closures +*/ + +#define ClosureHeader \ + CommonHeader; lu_byte nupvalues; GCObject *gclist + +typedef struct CClosure { + ClosureHeader; + lua_CFunction f; + TValue upvalue[1]; /* list of upvalues */ +} CClosure; + + +typedef struct LClosure { + ClosureHeader; + struct Proto *p; + UpVal *upvals[1]; /* list of upvalues */ +} LClosure; + + +typedef union Closure { + CClosure c; + LClosure l; +} Closure; + + +#define isLfunction(o) ttisLclosure(o) + +#define getproto(o) (clLvalue(o)->p) + + +/* +** Tables +*/ + +typedef union TKey { + struct { + TValuefields; + struct Node *next; /* for chaining */ + } nk; + TValue tvk; +} TKey; + + +typedef struct Node { + TValue i_val; + TKey i_key; +} Node; + + +typedef struct Table { + CommonHeader; + lu_byte flags; /* 1<

lsizenode)) + + +/* +** (address of) a fixed nil value +*/ +#define luaO_nilobject (&luaO_nilobject_) + + +LUAI_DDEC const TValue luaO_nilobject_; + + +LUAI_FUNC int luaO_int2fb (unsigned int x); +LUAI_FUNC int luaO_fb2int (int x); +LUAI_FUNC int luaO_ceillog2 (unsigned int x); +LUAI_FUNC lua_Number luaO_arith (int op, lua_Number v1, lua_Number v2); +LUAI_FUNC int luaO_str2d (const char *s, size_t len, lua_Number *result); +LUAI_FUNC int luaO_hexavalue (int c); +LUAI_FUNC const char *luaO_pushvfstring (lua_State *L, const char *fmt, + va_list argp); +LUAI_FUNC const char *luaO_pushfstring (lua_State *L, const char *fmt, ...); +LUAI_FUNC void luaO_chunkid (char *out, const char *source, size_t len); + + +#endif + diff --git a/radio/src/lua/src/lopcodes.c b/radio/src/lua/src/lopcodes.c new file mode 100644 index 000000000..ef7369275 --- /dev/null +++ b/radio/src/lua/src/lopcodes.c @@ -0,0 +1,107 @@ +/* +** $Id: lopcodes.c,v 1.49 2012/05/14 13:34:18 roberto Exp $ +** Opcodes for Lua virtual machine +** See Copyright Notice in lua.h +*/ + + +#define lopcodes_c +#define LUA_CORE + + +#include "lopcodes.h" + + +/* ORDER OP */ + +LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = { + "MOVE", + "LOADK", + "LOADKX", + "LOADBOOL", + "LOADNIL", + "GETUPVAL", + "GETTABUP", + "GETTABLE", + "SETTABUP", + "SETUPVAL", + "SETTABLE", + "NEWTABLE", + "SELF", + "ADD", + "SUB", + "MUL", + "DIV", + "MOD", + "POW", + "UNM", + "NOT", + "LEN", + "CONCAT", + "JMP", + "EQ", + "LT", + "LE", + "TEST", + "TESTSET", + "CALL", + "TAILCALL", + "RETURN", + "FORLOOP", + "FORPREP", + "TFORCALL", + "TFORLOOP", + "SETLIST", + "CLOSURE", + "VARARG", + "EXTRAARG", + NULL +}; + + +#define opmode(t,a,b,c,m) (((t)<<7) | ((a)<<6) | ((b)<<4) | ((c)<<2) | (m)) + +LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = { +/* T A B C mode opcode */ + opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_MOVE */ + ,opmode(0, 1, OpArgK, OpArgN, iABx) /* OP_LOADK */ + ,opmode(0, 1, OpArgN, OpArgN, iABx) /* OP_LOADKX */ + ,opmode(0, 1, OpArgU, OpArgU, iABC) /* OP_LOADBOOL */ + ,opmode(0, 1, OpArgU, OpArgN, iABC) /* OP_LOADNIL */ + ,opmode(0, 1, OpArgU, OpArgN, iABC) /* OP_GETUPVAL */ + ,opmode(0, 1, OpArgU, OpArgK, iABC) /* OP_GETTABUP */ + ,opmode(0, 1, OpArgR, OpArgK, iABC) /* OP_GETTABLE */ + ,opmode(0, 0, OpArgK, OpArgK, iABC) /* OP_SETTABUP */ + ,opmode(0, 0, OpArgU, OpArgN, iABC) /* OP_SETUPVAL */ + ,opmode(0, 0, OpArgK, OpArgK, iABC) /* OP_SETTABLE */ + ,opmode(0, 1, OpArgU, OpArgU, iABC) /* OP_NEWTABLE */ + ,opmode(0, 1, OpArgR, OpArgK, iABC) /* OP_SELF */ + ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_ADD */ + ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_SUB */ + ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_MUL */ + ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_DIV */ + ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_MOD */ + ,opmode(0, 1, OpArgK, OpArgK, iABC) /* OP_POW */ + ,opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_UNM */ + ,opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_NOT */ + ,opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_LEN */ + ,opmode(0, 1, OpArgR, OpArgR, iABC) /* OP_CONCAT */ + ,opmode(0, 0, OpArgR, OpArgN, iAsBx) /* OP_JMP */ + ,opmode(1, 0, OpArgK, OpArgK, iABC) /* OP_EQ */ + ,opmode(1, 0, OpArgK, OpArgK, iABC) /* OP_LT */ + ,opmode(1, 0, OpArgK, OpArgK, iABC) /* OP_LE */ + ,opmode(1, 0, OpArgN, OpArgU, iABC) /* OP_TEST */ + ,opmode(1, 1, OpArgR, OpArgU, iABC) /* OP_TESTSET */ + ,opmode(0, 1, OpArgU, OpArgU, iABC) /* OP_CALL */ + ,opmode(0, 1, OpArgU, OpArgU, iABC) /* OP_TAILCALL */ + ,opmode(0, 0, OpArgU, OpArgN, iABC) /* OP_RETURN */ + ,opmode(0, 1, OpArgR, OpArgN, iAsBx) /* OP_FORLOOP */ + ,opmode(0, 1, OpArgR, OpArgN, iAsBx) /* OP_FORPREP */ + ,opmode(0, 0, OpArgN, OpArgU, iABC) /* OP_TFORCALL */ + ,opmode(0, 1, OpArgR, OpArgN, iAsBx) /* OP_TFORLOOP */ + ,opmode(0, 0, OpArgU, OpArgU, iABC) /* OP_SETLIST */ + ,opmode(0, 1, OpArgU, OpArgN, iABx) /* OP_CLOSURE */ + ,opmode(0, 1, OpArgU, OpArgN, iABC) /* OP_VARARG */ + ,opmode(0, 0, OpArgU, OpArgU, iAx) /* OP_EXTRAARG */ +}; + diff --git a/radio/src/lua/src/lopcodes.h b/radio/src/lua/src/lopcodes.h new file mode 100644 index 000000000..07d2b3f39 --- /dev/null +++ b/radio/src/lua/src/lopcodes.h @@ -0,0 +1,288 @@ +/* +** $Id: lopcodes.h,v 1.142 2011/07/15 12:50:29 roberto Exp $ +** Opcodes for Lua virtual machine +** See Copyright Notice in lua.h +*/ + +#ifndef lopcodes_h +#define lopcodes_h + +#include "llimits.h" + + +/*=========================================================================== + We assume that instructions are unsigned numbers. + All instructions have an opcode in the first 6 bits. + Instructions can have the following fields: + `A' : 8 bits + `B' : 9 bits + `C' : 9 bits + 'Ax' : 26 bits ('A', 'B', and 'C' together) + `Bx' : 18 bits (`B' and `C' together) + `sBx' : signed Bx + + A signed argument is represented in excess K; that is, the number + value is the unsigned value minus K. K is exactly the maximum value + for that argument (so that -max is represented by 0, and +max is + represented by 2*max), which is half the maximum for the corresponding + unsigned argument. +===========================================================================*/ + + +enum OpMode {iABC, iABx, iAsBx, iAx}; /* basic instruction format */ + + +/* +** size and position of opcode arguments. +*/ +#define SIZE_C 9 +#define SIZE_B 9 +#define SIZE_Bx (SIZE_C + SIZE_B) +#define SIZE_A 8 +#define SIZE_Ax (SIZE_C + SIZE_B + SIZE_A) + +#define SIZE_OP 6 + +#define POS_OP 0 +#define POS_A (POS_OP + SIZE_OP) +#define POS_C (POS_A + SIZE_A) +#define POS_B (POS_C + SIZE_C) +#define POS_Bx POS_C +#define POS_Ax POS_A + + +/* +** limits for opcode arguments. +** we use (signed) int to manipulate most arguments, +** so they must fit in LUAI_BITSINT-1 bits (-1 for sign) +*/ +#if SIZE_Bx < LUAI_BITSINT-1 +#define MAXARG_Bx ((1<>1) /* `sBx' is signed */ +#else +#define MAXARG_Bx MAX_INT +#define MAXARG_sBx MAX_INT +#endif + +#if SIZE_Ax < LUAI_BITSINT-1 +#define MAXARG_Ax ((1<>POS_OP) & MASK1(SIZE_OP,0))) +#define SET_OPCODE(i,o) ((i) = (((i)&MASK0(SIZE_OP,POS_OP)) | \ + ((cast(Instruction, o)<>pos) & MASK1(size,0))) +#define setarg(i,v,pos,size) ((i) = (((i)&MASK0(size,pos)) | \ + ((cast(Instruction, v)<= R(A) + 1 */ +OP_EQ,/* A B C if ((RK(B) == RK(C)) ~= A) then pc++ */ +OP_LT,/* A B C if ((RK(B) < RK(C)) ~= A) then pc++ */ +OP_LE,/* A B C if ((RK(B) <= RK(C)) ~= A) then pc++ */ + +OP_TEST,/* A C if not (R(A) <=> C) then pc++ */ +OP_TESTSET,/* A B C if (R(B) <=> C) then R(A) := R(B) else pc++ */ + +OP_CALL,/* A B C R(A), ... ,R(A+C-2) := R(A)(R(A+1), ... ,R(A+B-1)) */ +OP_TAILCALL,/* A B C return R(A)(R(A+1), ... ,R(A+B-1)) */ +OP_RETURN,/* A B return R(A), ... ,R(A+B-2) (see note) */ + +OP_FORLOOP,/* A sBx R(A)+=R(A+2); + if R(A) > 4) & 3)) +#define getCMode(m) (cast(enum OpArgMask, (luaP_opmodes[m] >> 2) & 3)) +#define testAMode(m) (luaP_opmodes[m] & (1 << 6)) +#define testTMode(m) (luaP_opmodes[m] & (1 << 7)) + + +LUAI_DDEC const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */ + + +/* number of list items to accumulate before a SETLIST instruction */ +#define LFIELDS_PER_FLUSH 50 + + +#endif diff --git a/radio/src/lua/src/loslib.c b/radio/src/lua/src/loslib.c new file mode 100644 index 000000000..d991b9deb --- /dev/null +++ b/radio/src/lua/src/loslib.c @@ -0,0 +1,322 @@ +/* +** $Id: loslib.c,v 1.40 2012/10/19 15:54:02 roberto Exp $ +** Standard Operating System library +** See Copyright Notice in lua.h +*/ + + +#include +#include +#include +#include +#include + +#define loslib_c + +#include "lua.h" + +#include "lauxlib.h" +#include "lualib.h" + + +/* +** list of valid conversion specifiers for the 'strftime' function +*/ +#if !defined(LUA_STRFTIMEOPTIONS) + +#if !defined(LUA_USE_POSIX) +#define LUA_STRFTIMEOPTIONS { "aAbBcdHIjmMpSUwWxXyYz%", "" } +#else +#define LUA_STRFTIMEOPTIONS \ + { "aAbBcCdDeFgGhHIjmMnprRStTuUVwWxXyYzZ%", "" \ + "", "E", "cCxXyY", \ + "O", "deHImMSuUVwWy" } +#endif + +#endif + + + +/* +** By default, Lua uses tmpnam except when POSIX is available, where it +** uses mkstemp. +*/ +#if defined(LUA_USE_MKSTEMP) +#include +#define LUA_TMPNAMBUFSIZE 32 +#define lua_tmpnam(b,e) { \ + strcpy(b, "/tmp/lua_XXXXXX"); \ + e = mkstemp(b); \ + if (e != -1) close(e); \ + e = (e == -1); } + +#elif !defined(lua_tmpnam) + +#define LUA_TMPNAMBUFSIZE L_tmpnam +#define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); } + +#endif + + +/* +** By default, Lua uses gmtime/localtime, except when POSIX is available, +** where it uses gmtime_r/localtime_r +*/ +#if defined(LUA_USE_GMTIME_R) + +#define l_gmtime(t,r) gmtime_r(t,r) +#define l_localtime(t,r) localtime_r(t,r) + +#elif !defined(l_gmtime) + +#define l_gmtime(t,r) ((void)r, gmtime(t)) +#define l_localtime(t,r) ((void)r, localtime(t)) + +#endif + + + +static int os_execute (lua_State *L) { + const char *cmd = luaL_optstring(L, 1, NULL); + int stat = system(cmd); + if (cmd != NULL) + return luaL_execresult(L, stat); + else { + lua_pushboolean(L, stat); /* true if there is a shell */ + return 1; + } +} + + +static int os_remove (lua_State *L) { + const char *filename = luaL_checkstring(L, 1); + return luaL_fileresult(L, remove(filename) == 0, filename); +} + + +static int os_rename (lua_State *L) { + const char *fromname = luaL_checkstring(L, 1); + const char *toname = luaL_checkstring(L, 2); + return luaL_fileresult(L, rename(fromname, toname) == 0, NULL); +} + + +static int os_tmpname (lua_State *L) { + char buff[LUA_TMPNAMBUFSIZE]; + int err; + lua_tmpnam(buff, err); + if (err) + return luaL_error(L, "unable to generate a unique filename"); + lua_pushstring(L, buff); + return 1; +} + + +static int os_getenv (lua_State *L) { + lua_pushstring(L, getenv(luaL_checkstring(L, 1))); /* if NULL push nil */ + return 1; +} + + +static int os_clock (lua_State *L) { + lua_pushnumber(L, ((lua_Number)clock())/(lua_Number)CLOCKS_PER_SEC); + return 1; +} + + +/* +** {====================================================== +** Time/Date operations +** { year=%Y, month=%m, day=%d, hour=%H, min=%M, sec=%S, +** wday=%w+1, yday=%j, isdst=? } +** ======================================================= +*/ + +static void setfield (lua_State *L, const char *key, int value) { + lua_pushinteger(L, value); + lua_setfield(L, -2, key); +} + +static void setboolfield (lua_State *L, const char *key, int value) { + if (value < 0) /* undefined? */ + return; /* does not set field */ + lua_pushboolean(L, value); + lua_setfield(L, -2, key); +} + +static int getboolfield (lua_State *L, const char *key) { + int res; + lua_getfield(L, -1, key); + res = lua_isnil(L, -1) ? -1 : lua_toboolean(L, -1); + lua_pop(L, 1); + return res; +} + + +static int getfield (lua_State *L, const char *key, int d) { + int res, isnum; + lua_getfield(L, -1, key); + res = (int)lua_tointegerx(L, -1, &isnum); + if (!isnum) { + if (d < 0) + return luaL_error(L, "field " LUA_QS " missing in date table", key); + res = d; + } + lua_pop(L, 1); + return res; +} + + +static const char *checkoption (lua_State *L, const char *conv, char *buff) { + static const char *const options[] = LUA_STRFTIMEOPTIONS; + unsigned int i; + for (i = 0; i < sizeof(options)/sizeof(options[0]); i += 2) { + if (*conv != '\0' && strchr(options[i], *conv) != NULL) { + buff[1] = *conv; + if (*options[i + 1] == '\0') { /* one-char conversion specifier? */ + buff[2] = '\0'; /* end buffer */ + return conv + 1; + } + else if (*(conv + 1) != '\0' && + strchr(options[i + 1], *(conv + 1)) != NULL) { + buff[2] = *(conv + 1); /* valid two-char conversion specifier */ + buff[3] = '\0'; /* end buffer */ + return conv + 2; + } + } + } + luaL_argerror(L, 1, + lua_pushfstring(L, "invalid conversion specifier '%%%s'", conv)); + return conv; /* to avoid warnings */ +} + + +static int os_date (lua_State *L) { + const char *s = luaL_optstring(L, 1, "%c"); + time_t t = luaL_opt(L, (time_t)luaL_checknumber, 2, time(NULL)); + struct tm tmr, *stm; + if (*s == '!') { /* UTC? */ + stm = l_gmtime(&t, &tmr); + s++; /* skip `!' */ + } + else + stm = l_localtime(&t, &tmr); + if (stm == NULL) /* invalid date? */ + lua_pushnil(L); + else if (strcmp(s, "*t") == 0) { + lua_createtable(L, 0, 9); /* 9 = number of fields */ + setfield(L, "sec", stm->tm_sec); + setfield(L, "min", stm->tm_min); + setfield(L, "hour", stm->tm_hour); + setfield(L, "day", stm->tm_mday); + setfield(L, "month", stm->tm_mon+1); + setfield(L, "year", stm->tm_year+1900); + setfield(L, "wday", stm->tm_wday+1); + setfield(L, "yday", stm->tm_yday+1); + setboolfield(L, "isdst", stm->tm_isdst); + } + else { + char cc[4]; + luaL_Buffer b; + cc[0] = '%'; + luaL_buffinit(L, &b); + while (*s) { + if (*s != '%') /* no conversion specifier? */ + luaL_addchar(&b, *s++); + else { + size_t reslen; + char buff[200]; /* should be big enough for any conversion result */ + s = checkoption(L, s + 1, cc); + reslen = strftime(buff, sizeof(buff), cc, stm); + luaL_addlstring(&b, buff, reslen); + } + } + luaL_pushresult(&b); + } + return 1; +} + + +static int os_time (lua_State *L) { + time_t t; + if (lua_isnoneornil(L, 1)) /* called without args? */ + t = time(NULL); /* get current time */ + else { + struct tm ts; + luaL_checktype(L, 1, LUA_TTABLE); + lua_settop(L, 1); /* make sure table is at the top */ + ts.tm_sec = getfield(L, "sec", 0); + ts.tm_min = getfield(L, "min", 0); + ts.tm_hour = getfield(L, "hour", 12); + ts.tm_mday = getfield(L, "day", -1); + ts.tm_mon = getfield(L, "month", -1) - 1; + ts.tm_year = getfield(L, "year", -1) - 1900; + ts.tm_isdst = getboolfield(L, "isdst"); + t = mktime(&ts); + } + if (t == (time_t)(-1)) + lua_pushnil(L); + else + lua_pushnumber(L, (lua_Number)t); + return 1; +} + + +static int os_difftime (lua_State *L) { + lua_pushnumber(L, difftime((time_t)(luaL_checknumber(L, 1)), + (time_t)(luaL_optnumber(L, 2, 0)))); + return 1; +} + +/* }====================================================== */ + + +static int os_setlocale (lua_State *L) { + static const int cat[] = {LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, + LC_NUMERIC, LC_TIME}; + static const char *const catnames[] = {"all", "collate", "ctype", "monetary", + "numeric", "time", NULL}; + const char *l = luaL_optstring(L, 1, NULL); + int op = luaL_checkoption(L, 2, "all", catnames); + lua_pushstring(L, setlocale(cat[op], l)); + return 1; +} + + +static int os_exit (lua_State *L) { + int status; + if (lua_isboolean(L, 1)) + status = (lua_toboolean(L, 1) ? EXIT_SUCCESS : EXIT_FAILURE); + else + status = luaL_optint(L, 1, EXIT_SUCCESS); + if (lua_toboolean(L, 2)) + lua_close(L); + if (L) exit(status); /* 'if' to avoid warnings for unreachable 'return' */ + return 0; +} + + +static const luaL_Reg syslib[] = { + {"clock", os_clock}, + {"date", os_date}, + {"difftime", os_difftime}, + {"execute", os_execute}, + {"exit", os_exit}, + {"getenv", os_getenv}, + {"remove", os_remove}, + {"rename", os_rename}, + {"setlocale", os_setlocale}, + {"time", os_time}, + {"tmpname", os_tmpname}, + {NULL, NULL} +}; + +/* }====================================================== */ + + + +LUAMOD_API int luaopen_os (lua_State *L) { + luaL_newlib(L, syslib); + return 1; +} + diff --git a/radio/src/lua/src/lparser.c b/radio/src/lua/src/lparser.c new file mode 100644 index 000000000..d8f5b4ffc --- /dev/null +++ b/radio/src/lua/src/lparser.c @@ -0,0 +1,1638 @@ +/* +** $Id: lparser.c,v 2.130 2013/02/06 13:37:39 roberto Exp $ +** Lua Parser +** See Copyright Notice in lua.h +*/ + + +#include + +#define lparser_c +#define LUA_CORE + +#include "lua.h" + +#include "lcode.h" +#include "ldebug.h" +#include "ldo.h" +#include "lfunc.h" +#include "llex.h" +#include "lmem.h" +#include "lobject.h" +#include "lopcodes.h" +#include "lparser.h" +#include "lstate.h" +#include "lstring.h" +#include "ltable.h" + + + +/* maximum number of local variables per function (must be smaller + than 250, due to the bytecode format) */ +#define MAXVARS 200 + + +#define hasmultret(k) ((k) == VCALL || (k) == VVARARG) + + + +/* +** nodes for block list (list of active blocks) +*/ +typedef struct BlockCnt { + struct BlockCnt *previous; /* chain */ + short firstlabel; /* index of first label in this block */ + short firstgoto; /* index of first pending goto in this block */ + lu_byte nactvar; /* # active locals outside the block */ + lu_byte upval; /* true if some variable in the block is an upvalue */ + lu_byte isloop; /* true if `block' is a loop */ +} BlockCnt; + + + +/* +** prototypes for recursive non-terminal functions +*/ +static void statement (LexState *ls); +static void expr (LexState *ls, expdesc *v); + + +static void anchor_token (LexState *ls) { + /* last token from outer function must be EOS */ + lua_assert(ls->fs != NULL || ls->t.token == TK_EOS); + if (ls->t.token == TK_NAME || ls->t.token == TK_STRING) { + TString *ts = ls->t.seminfo.ts; + luaX_newstring(ls, getstr(ts), ts->tsv.len); + } +} + + +/* semantic error */ +static l_noret semerror (LexState *ls, const char *msg) { + ls->t.token = 0; /* remove 'near to' from final message */ + luaX_syntaxerror(ls, msg); +} + + +static l_noret error_expected (LexState *ls, int token) { + luaX_syntaxerror(ls, + luaO_pushfstring(ls->L, "%s expected", luaX_token2str(ls, token))); +} + + +static l_noret errorlimit (FuncState *fs, int limit, const char *what) { + lua_State *L = fs->ls->L; + const char *msg; + int line = fs->f->linedefined; + const char *where = (line == 0) + ? "main function" + : luaO_pushfstring(L, "function at line %d", line); + msg = luaO_pushfstring(L, "too many %s (limit is %d) in %s", + what, limit, where); + luaX_syntaxerror(fs->ls, msg); +} + + +static void checklimit (FuncState *fs, int v, int l, const char *what) { + if (v > l) errorlimit(fs, l, what); +} + + +static int testnext (LexState *ls, int c) { + if (ls->t.token == c) { + luaX_next(ls); + return 1; + } + else return 0; +} + + +static void check (LexState *ls, int c) { + if (ls->t.token != c) + error_expected(ls, c); +} + + +static void checknext (LexState *ls, int c) { + check(ls, c); + luaX_next(ls); +} + + +#define check_condition(ls,c,msg) { if (!(c)) luaX_syntaxerror(ls, msg); } + + + +static void check_match (LexState *ls, int what, int who, int where) { + if (!testnext(ls, what)) { + if (where == ls->linenumber) + error_expected(ls, what); + else { + luaX_syntaxerror(ls, luaO_pushfstring(ls->L, + "%s expected (to close %s at line %d)", + luaX_token2str(ls, what), luaX_token2str(ls, who), where)); + } + } +} + + +static TString *str_checkname (LexState *ls) { + TString *ts; + check(ls, TK_NAME); + ts = ls->t.seminfo.ts; + luaX_next(ls); + return ts; +} + + +static void init_exp (expdesc *e, expkind k, int i) { + e->f = e->t = NO_JUMP; + e->k = k; + e->u.info = i; +} + + +static void codestring (LexState *ls, expdesc *e, TString *s) { + init_exp(e, VK, luaK_stringK(ls->fs, s)); +} + + +static void checkname (LexState *ls, expdesc *e) { + codestring(ls, e, str_checkname(ls)); +} + + +static int registerlocalvar (LexState *ls, TString *varname) { + FuncState *fs = ls->fs; + Proto *f = fs->f; + int oldsize = f->sizelocvars; + luaM_growvector(ls->L, f->locvars, fs->nlocvars, f->sizelocvars, + LocVar, SHRT_MAX, "local variables"); + while (oldsize < f->sizelocvars) f->locvars[oldsize++].varname = NULL; + f->locvars[fs->nlocvars].varname = varname; + luaC_objbarrier(ls->L, f, varname); + return fs->nlocvars++; +} + + +static void new_localvar (LexState *ls, TString *name) { + FuncState *fs = ls->fs; + Dyndata *dyd = ls->dyd; + int reg = registerlocalvar(ls, name); + checklimit(fs, dyd->actvar.n + 1 - fs->firstlocal, + MAXVARS, "local variables"); + luaM_growvector(ls->L, dyd->actvar.arr, dyd->actvar.n + 1, + dyd->actvar.size, Vardesc, MAX_INT, "local variables"); + dyd->actvar.arr[dyd->actvar.n++].idx = cast(short, reg); +} + + +static void new_localvarliteral_ (LexState *ls, const char *name, size_t sz) { + new_localvar(ls, luaX_newstring(ls, name, sz)); +} + +#define new_localvarliteral(ls,v) \ + new_localvarliteral_(ls, "" v, (sizeof(v)/sizeof(char))-1) + + +static LocVar *getlocvar (FuncState *fs, int i) { + int idx = fs->ls->dyd->actvar.arr[fs->firstlocal + i].idx; + lua_assert(idx < fs->nlocvars); + return &fs->f->locvars[idx]; +} + + +static void adjustlocalvars (LexState *ls, int nvars) { + FuncState *fs = ls->fs; + fs->nactvar = cast_byte(fs->nactvar + nvars); + for (; nvars; nvars--) { + getlocvar(fs, fs->nactvar - nvars)->startpc = fs->pc; + } +} + + +static void removevars (FuncState *fs, int tolevel) { + fs->ls->dyd->actvar.n -= (fs->nactvar - tolevel); + while (fs->nactvar > tolevel) + getlocvar(fs, --fs->nactvar)->endpc = fs->pc; +} + + +static int searchupvalue (FuncState *fs, TString *name) { + int i; + Upvaldesc *up = fs->f->upvalues; + for (i = 0; i < fs->nups; i++) { + if (luaS_eqstr(up[i].name, name)) return i; + } + return -1; /* not found */ +} + + +static int newupvalue (FuncState *fs, TString *name, expdesc *v) { + Proto *f = fs->f; + int oldsize = f->sizeupvalues; + checklimit(fs, fs->nups + 1, MAXUPVAL, "upvalues"); + luaM_growvector(fs->ls->L, f->upvalues, fs->nups, f->sizeupvalues, + Upvaldesc, MAXUPVAL, "upvalues"); + while (oldsize < f->sizeupvalues) f->upvalues[oldsize++].name = NULL; + f->upvalues[fs->nups].instack = (v->k == VLOCAL); + f->upvalues[fs->nups].idx = cast_byte(v->u.info); + f->upvalues[fs->nups].name = name; + luaC_objbarrier(fs->ls->L, f, name); + return fs->nups++; +} + + +static int searchvar (FuncState *fs, TString *n) { + int i; + for (i = cast_int(fs->nactvar) - 1; i >= 0; i--) { + if (luaS_eqstr(n, getlocvar(fs, i)->varname)) + return i; + } + return -1; /* not found */ +} + + +/* + Mark block where variable at given level was defined + (to emit close instructions later). +*/ +static void markupval (FuncState *fs, int level) { + BlockCnt *bl = fs->bl; + while (bl->nactvar > level) bl = bl->previous; + bl->upval = 1; +} + + +/* + Find variable with given name 'n'. If it is an upvalue, add this + upvalue into all intermediate functions. +*/ +static int singlevaraux (FuncState *fs, TString *n, expdesc *var, int base) { + if (fs == NULL) /* no more levels? */ + return VVOID; /* default is global */ + else { + int v = searchvar(fs, n); /* look up locals at current level */ + if (v >= 0) { /* found? */ + init_exp(var, VLOCAL, v); /* variable is local */ + if (!base) + markupval(fs, v); /* local will be used as an upval */ + return VLOCAL; + } + else { /* not found as local at current level; try upvalues */ + int idx = searchupvalue(fs, n); /* try existing upvalues */ + if (idx < 0) { /* not found? */ + if (singlevaraux(fs->prev, n, var, 0) == VVOID) /* try upper levels */ + return VVOID; /* not found; is a global */ + /* else was LOCAL or UPVAL */ + idx = newupvalue(fs, n, var); /* will be a new upvalue */ + } + init_exp(var, VUPVAL, idx); + return VUPVAL; + } + } +} + + +static void singlevar (LexState *ls, expdesc *var) { + TString *varname = str_checkname(ls); + FuncState *fs = ls->fs; + if (singlevaraux(fs, varname, var, 1) == VVOID) { /* global name? */ + expdesc key; + singlevaraux(fs, ls->envn, var, 1); /* get environment variable */ + lua_assert(var->k == VLOCAL || var->k == VUPVAL); + codestring(ls, &key, varname); /* key is variable name */ + luaK_indexed(fs, var, &key); /* env[varname] */ + } +} + + +static void adjust_assign (LexState *ls, int nvars, int nexps, expdesc *e) { + FuncState *fs = ls->fs; + int extra = nvars - nexps; + if (hasmultret(e->k)) { + extra++; /* includes call itself */ + if (extra < 0) extra = 0; + luaK_setreturns(fs, e, extra); /* last exp. provides the difference */ + if (extra > 1) luaK_reserveregs(fs, extra-1); + } + else { + if (e->k != VVOID) luaK_exp2nextreg(fs, e); /* close last expression */ + if (extra > 0) { + int reg = fs->freereg; + luaK_reserveregs(fs, extra); + luaK_nil(fs, reg, extra); + } + } +} + + +static void enterlevel (LexState *ls) { + lua_State *L = ls->L; + ++L->nCcalls; + checklimit(ls->fs, L->nCcalls, LUAI_MAXCCALLS, "C levels"); +} + + +#define leavelevel(ls) ((ls)->L->nCcalls--) + + +static void closegoto (LexState *ls, int g, Labeldesc *label) { + int i; + FuncState *fs = ls->fs; + Labellist *gl = &ls->dyd->gt; + Labeldesc *gt = &gl->arr[g]; + lua_assert(luaS_eqstr(gt->name, label->name)); + if (gt->nactvar < label->nactvar) { + TString *vname = getlocvar(fs, gt->nactvar)->varname; + const char *msg = luaO_pushfstring(ls->L, + " at line %d jumps into the scope of local " LUA_QS, + getstr(gt->name), gt->line, getstr(vname)); + semerror(ls, msg); + } + luaK_patchlist(fs, gt->pc, label->pc); + /* remove goto from pending list */ + for (i = g; i < gl->n - 1; i++) + gl->arr[i] = gl->arr[i + 1]; + gl->n--; +} + + +/* +** try to close a goto with existing labels; this solves backward jumps +*/ +static int findlabel (LexState *ls, int g) { + int i; + BlockCnt *bl = ls->fs->bl; + Dyndata *dyd = ls->dyd; + Labeldesc *gt = &dyd->gt.arr[g]; + /* check labels in current block for a match */ + for (i = bl->firstlabel; i < dyd->label.n; i++) { + Labeldesc *lb = &dyd->label.arr[i]; + if (luaS_eqstr(lb->name, gt->name)) { /* correct label? */ + if (gt->nactvar > lb->nactvar && + (bl->upval || dyd->label.n > bl->firstlabel)) + luaK_patchclose(ls->fs, gt->pc, lb->nactvar); + closegoto(ls, g, lb); /* close it */ + return 1; + } + } + return 0; /* label not found; cannot close goto */ +} + + +static int newlabelentry (LexState *ls, Labellist *l, TString *name, + int line, int pc) { + int n = l->n; + luaM_growvector(ls->L, l->arr, n, l->size, + Labeldesc, SHRT_MAX, "labels/gotos"); + l->arr[n].name = name; + l->arr[n].line = line; + l->arr[n].nactvar = ls->fs->nactvar; + l->arr[n].pc = pc; + l->n++; + return n; +} + + +/* +** check whether new label 'lb' matches any pending gotos in current +** block; solves forward jumps +*/ +static void findgotos (LexState *ls, Labeldesc *lb) { + Labellist *gl = &ls->dyd->gt; + int i = ls->fs->bl->firstgoto; + while (i < gl->n) { + if (luaS_eqstr(gl->arr[i].name, lb->name)) + closegoto(ls, i, lb); + else + i++; + } +} + + +/* +** "export" pending gotos to outer level, to check them against +** outer labels; if the block being exited has upvalues, and +** the goto exits the scope of any variable (which can be the +** upvalue), close those variables being exited. +*/ +static void movegotosout (FuncState *fs, BlockCnt *bl) { + int i = bl->firstgoto; + Labellist *gl = &fs->ls->dyd->gt; + /* correct pending gotos to current block and try to close it + with visible labels */ + while (i < gl->n) { + Labeldesc *gt = &gl->arr[i]; + if (gt->nactvar > bl->nactvar) { + if (bl->upval) + luaK_patchclose(fs, gt->pc, bl->nactvar); + gt->nactvar = bl->nactvar; + } + if (!findlabel(fs->ls, i)) + i++; /* move to next one */ + } +} + + +static void enterblock (FuncState *fs, BlockCnt *bl, lu_byte isloop) { + bl->isloop = isloop; + bl->nactvar = fs->nactvar; + bl->firstlabel = fs->ls->dyd->label.n; + bl->firstgoto = fs->ls->dyd->gt.n; + bl->upval = 0; + bl->previous = fs->bl; + fs->bl = bl; + lua_assert(fs->freereg == fs->nactvar); +} + + +/* +** create a label named "break" to resolve break statements +*/ +static void breaklabel (LexState *ls) { + TString *n = luaS_new(ls->L, "break"); + int l = newlabelentry(ls, &ls->dyd->label, n, 0, ls->fs->pc); + findgotos(ls, &ls->dyd->label.arr[l]); +} + +/* +** generates an error for an undefined 'goto'; choose appropriate +** message when label name is a reserved word (which can only be 'break') +*/ +static l_noret undefgoto (LexState *ls, Labeldesc *gt) { + const char *msg = isreserved(gt->name) + ? "<%s> at line %d not inside a loop" + : "no visible label " LUA_QS " for at line %d"; + msg = luaO_pushfstring(ls->L, msg, getstr(gt->name), gt->line); + semerror(ls, msg); +} + + +static void leaveblock (FuncState *fs) { + BlockCnt *bl = fs->bl; + LexState *ls = fs->ls; + if (bl->previous && bl->upval) { + /* create a 'jump to here' to close upvalues */ + int j = luaK_jump(fs); + luaK_patchclose(fs, j, bl->nactvar); + luaK_patchtohere(fs, j); + } + if (bl->isloop) + breaklabel(ls); /* close pending breaks */ + fs->bl = bl->previous; + removevars(fs, bl->nactvar); + lua_assert(bl->nactvar == fs->nactvar); + fs->freereg = fs->nactvar; /* free registers */ + ls->dyd->label.n = bl->firstlabel; /* remove local labels */ + if (bl->previous) /* inner block? */ + movegotosout(fs, bl); /* update pending gotos to outer block */ + else if (bl->firstgoto < ls->dyd->gt.n) /* pending gotos in outer block? */ + undefgoto(ls, &ls->dyd->gt.arr[bl->firstgoto]); /* error */ +} + + +/* +** adds a new prototype into list of prototypes +*/ +static Proto *addprototype (LexState *ls) { + Proto *clp; + lua_State *L = ls->L; + FuncState *fs = ls->fs; + Proto *f = fs->f; /* prototype of current function */ + if (fs->np >= f->sizep) { + int oldsize = f->sizep; + luaM_growvector(L, f->p, fs->np, f->sizep, Proto *, MAXARG_Bx, "functions"); + while (oldsize < f->sizep) f->p[oldsize++] = NULL; + } + f->p[fs->np++] = clp = luaF_newproto(L); + luaC_objbarrier(L, f, clp); + return clp; +} + + +/* +** codes instruction to create new closure in parent function. +** The OP_CLOSURE instruction must use the last available register, +** so that, if it invokes the GC, the GC knows which registers +** are in use at that time. +*/ +static void codeclosure (LexState *ls, expdesc *v) { + FuncState *fs = ls->fs->prev; + init_exp(v, VRELOCABLE, luaK_codeABx(fs, OP_CLOSURE, 0, fs->np - 1)); + luaK_exp2nextreg(fs, v); /* fix it at the last register */ +} + + +static void open_func (LexState *ls, FuncState *fs, BlockCnt *bl) { + lua_State *L = ls->L; + Proto *f; + fs->prev = ls->fs; /* linked list of funcstates */ + fs->ls = ls; + ls->fs = fs; + fs->pc = 0; + fs->lasttarget = 0; + fs->jpc = NO_JUMP; + fs->freereg = 0; + fs->nk = 0; + fs->np = 0; + fs->nups = 0; + fs->nlocvars = 0; + fs->nactvar = 0; + fs->firstlocal = ls->dyd->actvar.n; + fs->bl = NULL; + f = fs->f; + f->source = ls->source; + f->maxstacksize = 2; /* registers 0/1 are always valid */ + fs->h = luaH_new(L); + /* anchor table of constants (to avoid being collected) */ + sethvalue2s(L, L->top, fs->h); + incr_top(L); + enterblock(fs, bl, 0); +} + + +static void close_func (LexState *ls) { + lua_State *L = ls->L; + FuncState *fs = ls->fs; + Proto *f = fs->f; + luaK_ret(fs, 0, 0); /* final return */ + leaveblock(fs); + luaM_reallocvector(L, f->code, f->sizecode, fs->pc, Instruction); + f->sizecode = fs->pc; + luaM_reallocvector(L, f->lineinfo, f->sizelineinfo, fs->pc, int); + f->sizelineinfo = fs->pc; + luaM_reallocvector(L, f->k, f->sizek, fs->nk, TValue); + f->sizek = fs->nk; + luaM_reallocvector(L, f->p, f->sizep, fs->np, Proto *); + f->sizep = fs->np; + luaM_reallocvector(L, f->locvars, f->sizelocvars, fs->nlocvars, LocVar); + f->sizelocvars = fs->nlocvars; + luaM_reallocvector(L, f->upvalues, f->sizeupvalues, fs->nups, Upvaldesc); + f->sizeupvalues = fs->nups; + lua_assert(fs->bl == NULL); + ls->fs = fs->prev; + /* last token read was anchored in defunct function; must re-anchor it */ + anchor_token(ls); + L->top--; /* pop table of constants */ + luaC_checkGC(L); +} + + + +/*============================================================*/ +/* GRAMMAR RULES */ +/*============================================================*/ + + +/* +** check whether current token is in the follow set of a block. +** 'until' closes syntactical blocks, but do not close scope, +** so it handled in separate. +*/ +static int block_follow (LexState *ls, int withuntil) { + switch (ls->t.token) { + case TK_ELSE: case TK_ELSEIF: + case TK_END: case TK_EOS: + return 1; + case TK_UNTIL: return withuntil; + default: return 0; + } +} + + +static void statlist (LexState *ls) { + /* statlist -> { stat [`;'] } */ + while (!block_follow(ls, 1)) { + if (ls->t.token == TK_RETURN) { + statement(ls); + return; /* 'return' must be last statement */ + } + statement(ls); + } +} + + +static void fieldsel (LexState *ls, expdesc *v) { + /* fieldsel -> ['.' | ':'] NAME */ + FuncState *fs = ls->fs; + expdesc key; + luaK_exp2anyregup(fs, v); + luaX_next(ls); /* skip the dot or colon */ + checkname(ls, &key); + luaK_indexed(fs, v, &key); +} + + +static void yindex (LexState *ls, expdesc *v) { + /* index -> '[' expr ']' */ + luaX_next(ls); /* skip the '[' */ + expr(ls, v); + luaK_exp2val(ls->fs, v); + checknext(ls, ']'); +} + + +/* +** {====================================================================== +** Rules for Constructors +** ======================================================================= +*/ + + +struct ConsControl { + expdesc v; /* last list item read */ + expdesc *t; /* table descriptor */ + int nh; /* total number of `record' elements */ + int na; /* total number of array elements */ + int tostore; /* number of array elements pending to be stored */ +}; + + +static void recfield (LexState *ls, struct ConsControl *cc) { + /* recfield -> (NAME | `['exp1`]') = exp1 */ + FuncState *fs = ls->fs; + int reg = ls->fs->freereg; + expdesc key, val; + int rkkey; + if (ls->t.token == TK_NAME) { + checklimit(fs, cc->nh, MAX_INT, "items in a constructor"); + checkname(ls, &key); + } + else /* ls->t.token == '[' */ + yindex(ls, &key); + cc->nh++; + checknext(ls, '='); + rkkey = luaK_exp2RK(fs, &key); + expr(ls, &val); + luaK_codeABC(fs, OP_SETTABLE, cc->t->u.info, rkkey, luaK_exp2RK(fs, &val)); + fs->freereg = reg; /* free registers */ +} + + +static void closelistfield (FuncState *fs, struct ConsControl *cc) { + if (cc->v.k == VVOID) return; /* there is no list item */ + luaK_exp2nextreg(fs, &cc->v); + cc->v.k = VVOID; + if (cc->tostore == LFIELDS_PER_FLUSH) { + luaK_setlist(fs, cc->t->u.info, cc->na, cc->tostore); /* flush */ + cc->tostore = 0; /* no more items pending */ + } +} + + +static void lastlistfield (FuncState *fs, struct ConsControl *cc) { + if (cc->tostore == 0) return; + if (hasmultret(cc->v.k)) { + luaK_setmultret(fs, &cc->v); + luaK_setlist(fs, cc->t->u.info, cc->na, LUA_MULTRET); + cc->na--; /* do not count last expression (unknown number of elements) */ + } + else { + if (cc->v.k != VVOID) + luaK_exp2nextreg(fs, &cc->v); + luaK_setlist(fs, cc->t->u.info, cc->na, cc->tostore); + } +} + + +static void listfield (LexState *ls, struct ConsControl *cc) { + /* listfield -> exp */ + expr(ls, &cc->v); + checklimit(ls->fs, cc->na, MAX_INT, "items in a constructor"); + cc->na++; + cc->tostore++; +} + + +static void field (LexState *ls, struct ConsControl *cc) { + /* field -> listfield | recfield */ + switch(ls->t.token) { + case TK_NAME: { /* may be 'listfield' or 'recfield' */ + if (luaX_lookahead(ls) != '=') /* expression? */ + listfield(ls, cc); + else + recfield(ls, cc); + break; + } + case '[': { + recfield(ls, cc); + break; + } + default: { + listfield(ls, cc); + break; + } + } +} + + +static void constructor (LexState *ls, expdesc *t) { + /* constructor -> '{' [ field { sep field } [sep] ] '}' + sep -> ',' | ';' */ + FuncState *fs = ls->fs; + int line = ls->linenumber; + int pc = luaK_codeABC(fs, OP_NEWTABLE, 0, 0, 0); + struct ConsControl cc; + cc.na = cc.nh = cc.tostore = 0; + cc.t = t; + init_exp(t, VRELOCABLE, pc); + init_exp(&cc.v, VVOID, 0); /* no value (yet) */ + luaK_exp2nextreg(ls->fs, t); /* fix it at stack top */ + checknext(ls, '{'); + do { + lua_assert(cc.v.k == VVOID || cc.tostore > 0); + if (ls->t.token == '}') break; + closelistfield(fs, &cc); + field(ls, &cc); + } while (testnext(ls, ',') || testnext(ls, ';')); + check_match(ls, '}', '{', line); + lastlistfield(fs, &cc); + SETARG_B(fs->f->code[pc], luaO_int2fb(cc.na)); /* set initial array size */ + SETARG_C(fs->f->code[pc], luaO_int2fb(cc.nh)); /* set initial table size */ +} + +/* }====================================================================== */ + + + +static void parlist (LexState *ls) { + /* parlist -> [ param { `,' param } ] */ + FuncState *fs = ls->fs; + Proto *f = fs->f; + int nparams = 0; + f->is_vararg = 0; + if (ls->t.token != ')') { /* is `parlist' not empty? */ + do { + switch (ls->t.token) { + case TK_NAME: { /* param -> NAME */ + new_localvar(ls, str_checkname(ls)); + nparams++; + break; + } + case TK_DOTS: { /* param -> `...' */ + luaX_next(ls); + f->is_vararg = 1; + break; + } + default: luaX_syntaxerror(ls, " or " LUA_QL("...") " expected"); + } + } while (!f->is_vararg && testnext(ls, ',')); + } + adjustlocalvars(ls, nparams); + f->numparams = cast_byte(fs->nactvar); + luaK_reserveregs(fs, fs->nactvar); /* reserve register for parameters */ +} + + +static void body (LexState *ls, expdesc *e, int ismethod, int line) { + /* body -> `(' parlist `)' block END */ + FuncState new_fs; + BlockCnt bl; + new_fs.f = addprototype(ls); + new_fs.f->linedefined = line; + open_func(ls, &new_fs, &bl); + checknext(ls, '('); + if (ismethod) { + new_localvarliteral(ls, "self"); /* create 'self' parameter */ + adjustlocalvars(ls, 1); + } + parlist(ls); + checknext(ls, ')'); + statlist(ls); + new_fs.f->lastlinedefined = ls->linenumber; + check_match(ls, TK_END, TK_FUNCTION, line); + codeclosure(ls, e); + close_func(ls); +} + + +static int explist (LexState *ls, expdesc *v) { + /* explist -> expr { `,' expr } */ + int n = 1; /* at least one expression */ + expr(ls, v); + while (testnext(ls, ',')) { + luaK_exp2nextreg(ls->fs, v); + expr(ls, v); + n++; + } + return n; +} + + +static void funcargs (LexState *ls, expdesc *f, int line) { + FuncState *fs = ls->fs; + expdesc args; + int base, nparams; + switch (ls->t.token) { + case '(': { /* funcargs -> `(' [ explist ] `)' */ + luaX_next(ls); + if (ls->t.token == ')') /* arg list is empty? */ + args.k = VVOID; + else { + explist(ls, &args); + luaK_setmultret(fs, &args); + } + check_match(ls, ')', '(', line); + break; + } + case '{': { /* funcargs -> constructor */ + constructor(ls, &args); + break; + } + case TK_STRING: { /* funcargs -> STRING */ + codestring(ls, &args, ls->t.seminfo.ts); + luaX_next(ls); /* must use `seminfo' before `next' */ + break; + } + default: { + luaX_syntaxerror(ls, "function arguments expected"); + } + } + lua_assert(f->k == VNONRELOC); + base = f->u.info; /* base register for call */ + if (hasmultret(args.k)) + nparams = LUA_MULTRET; /* open call */ + else { + if (args.k != VVOID) + luaK_exp2nextreg(fs, &args); /* close last argument */ + nparams = fs->freereg - (base+1); + } + init_exp(f, VCALL, luaK_codeABC(fs, OP_CALL, base, nparams+1, 2)); + luaK_fixline(fs, line); + fs->freereg = base+1; /* call remove function and arguments and leaves + (unless changed) one result */ +} + + + + +/* +** {====================================================================== +** Expression parsing +** ======================================================================= +*/ + + +static void primaryexp (LexState *ls, expdesc *v) { + /* primaryexp -> NAME | '(' expr ')' */ + switch (ls->t.token) { + case '(': { + int line = ls->linenumber; + luaX_next(ls); + expr(ls, v); + check_match(ls, ')', '(', line); + luaK_dischargevars(ls->fs, v); + return; + } + case TK_NAME: { + singlevar(ls, v); + return; + } + default: { + luaX_syntaxerror(ls, "unexpected symbol"); + } + } +} + + +static void suffixedexp (LexState *ls, expdesc *v) { + /* suffixedexp -> + primaryexp { '.' NAME | '[' exp ']' | ':' NAME funcargs | funcargs } */ + FuncState *fs = ls->fs; + int line = ls->linenumber; + primaryexp(ls, v); + for (;;) { + switch (ls->t.token) { + case '.': { /* fieldsel */ + fieldsel(ls, v); + break; + } + case '[': { /* `[' exp1 `]' */ + expdesc key; + luaK_exp2anyregup(fs, v); + yindex(ls, &key); + luaK_indexed(fs, v, &key); + break; + } + case ':': { /* `:' NAME funcargs */ + expdesc key; + luaX_next(ls); + checkname(ls, &key); + luaK_self(fs, v, &key); + funcargs(ls, v, line); + break; + } + case '(': case TK_STRING: case '{': { /* funcargs */ + luaK_exp2nextreg(fs, v); + funcargs(ls, v, line); + break; + } + default: return; + } + } +} + + +static void simpleexp (LexState *ls, expdesc *v) { + /* simpleexp -> NUMBER | STRING | NIL | TRUE | FALSE | ... | + constructor | FUNCTION body | suffixedexp */ + switch (ls->t.token) { + case TK_NUMBER: { + init_exp(v, VKNUM, 0); + v->u.nval = ls->t.seminfo.r; + break; + } + case TK_STRING: { + codestring(ls, v, ls->t.seminfo.ts); + break; + } + case TK_NIL: { + init_exp(v, VNIL, 0); + break; + } + case TK_TRUE: { + init_exp(v, VTRUE, 0); + break; + } + case TK_FALSE: { + init_exp(v, VFALSE, 0); + break; + } + case TK_DOTS: { /* vararg */ + FuncState *fs = ls->fs; + check_condition(ls, fs->f->is_vararg, + "cannot use " LUA_QL("...") " outside a vararg function"); + init_exp(v, VVARARG, luaK_codeABC(fs, OP_VARARG, 0, 1, 0)); + break; + } + case '{': { /* constructor */ + constructor(ls, v); + return; + } + case TK_FUNCTION: { + luaX_next(ls); + body(ls, v, 0, ls->linenumber); + return; + } + default: { + suffixedexp(ls, v); + return; + } + } + luaX_next(ls); +} + + +static UnOpr getunopr (int op) { + switch (op) { + case TK_NOT: return OPR_NOT; + case '-': return OPR_MINUS; + case '#': return OPR_LEN; + default: return OPR_NOUNOPR; + } +} + + +static BinOpr getbinopr (int op) { + switch (op) { + case '+': return OPR_ADD; + case '-': return OPR_SUB; + case '*': return OPR_MUL; + case '/': return OPR_DIV; + case '%': return OPR_MOD; + case '^': return OPR_POW; + case TK_CONCAT: return OPR_CONCAT; + case TK_NE: return OPR_NE; + case TK_EQ: return OPR_EQ; + case '<': return OPR_LT; + case TK_LE: return OPR_LE; + case '>': return OPR_GT; + case TK_GE: return OPR_GE; + case TK_AND: return OPR_AND; + case TK_OR: return OPR_OR; + default: return OPR_NOBINOPR; + } +} + + +static const struct { + lu_byte left; /* left priority for each binary operator */ + lu_byte right; /* right priority */ +} priority[] = { /* ORDER OPR */ + {6, 6}, {6, 6}, {7, 7}, {7, 7}, {7, 7}, /* `+' `-' `*' `/' `%' */ + {10, 9}, {5, 4}, /* ^, .. (right associative) */ + {3, 3}, {3, 3}, {3, 3}, /* ==, <, <= */ + {3, 3}, {3, 3}, {3, 3}, /* ~=, >, >= */ + {2, 2}, {1, 1} /* and, or */ +}; + +#define UNARY_PRIORITY 8 /* priority for unary operators */ + + +/* +** subexpr -> (simpleexp | unop subexpr) { binop subexpr } +** where `binop' is any binary operator with a priority higher than `limit' +*/ +static BinOpr subexpr (LexState *ls, expdesc *v, int limit) { + BinOpr op; + UnOpr uop; + enterlevel(ls); + uop = getunopr(ls->t.token); + if (uop != OPR_NOUNOPR) { + int line = ls->linenumber; + luaX_next(ls); + subexpr(ls, v, UNARY_PRIORITY); + luaK_prefix(ls->fs, uop, v, line); + } + else simpleexp(ls, v); + /* expand while operators have priorities higher than `limit' */ + op = getbinopr(ls->t.token); + while (op != OPR_NOBINOPR && priority[op].left > limit) { + expdesc v2; + BinOpr nextop; + int line = ls->linenumber; + luaX_next(ls); + luaK_infix(ls->fs, op, v); + /* read sub-expression with higher priority */ + nextop = subexpr(ls, &v2, priority[op].right); + luaK_posfix(ls->fs, op, v, &v2, line); + op = nextop; + } + leavelevel(ls); + return op; /* return first untreated operator */ +} + + +static void expr (LexState *ls, expdesc *v) { + subexpr(ls, v, 0); +} + +/* }==================================================================== */ + + + +/* +** {====================================================================== +** Rules for Statements +** ======================================================================= +*/ + + +static void block (LexState *ls) { + /* block -> statlist */ + FuncState *fs = ls->fs; + BlockCnt bl; + enterblock(fs, &bl, 0); + statlist(ls); + leaveblock(fs); +} + + +/* +** structure to chain all variables in the left-hand side of an +** assignment +*/ +struct LHS_assign { + struct LHS_assign *prev; + expdesc v; /* variable (global, local, upvalue, or indexed) */ +}; + + +/* +** check whether, in an assignment to an upvalue/local variable, the +** upvalue/local variable is begin used in a previous assignment to a +** table. If so, save original upvalue/local value in a safe place and +** use this safe copy in the previous assignment. +*/ +static void check_conflict (LexState *ls, struct LHS_assign *lh, expdesc *v) { + FuncState *fs = ls->fs; + int extra = fs->freereg; /* eventual position to save local variable */ + int conflict = 0; + for (; lh; lh = lh->prev) { /* check all previous assignments */ + if (lh->v.k == VINDEXED) { /* assigning to a table? */ + /* table is the upvalue/local being assigned now? */ + if (lh->v.u.ind.vt == v->k && lh->v.u.ind.t == v->u.info) { + conflict = 1; + lh->v.u.ind.vt = VLOCAL; + lh->v.u.ind.t = extra; /* previous assignment will use safe copy */ + } + /* index is the local being assigned? (index cannot be upvalue) */ + if (v->k == VLOCAL && lh->v.u.ind.idx == v->u.info) { + conflict = 1; + lh->v.u.ind.idx = extra; /* previous assignment will use safe copy */ + } + } + } + if (conflict) { + /* copy upvalue/local value to a temporary (in position 'extra') */ + OpCode op = (v->k == VLOCAL) ? OP_MOVE : OP_GETUPVAL; + luaK_codeABC(fs, op, extra, v->u.info, 0); + luaK_reserveregs(fs, 1); + } +} + + +static void assignment (LexState *ls, struct LHS_assign *lh, int nvars) { + expdesc e; + check_condition(ls, vkisvar(lh->v.k), "syntax error"); + if (testnext(ls, ',')) { /* assignment -> ',' suffixedexp assignment */ + struct LHS_assign nv; + nv.prev = lh; + suffixedexp(ls, &nv.v); + if (nv.v.k != VINDEXED) + check_conflict(ls, lh, &nv.v); + checklimit(ls->fs, nvars + ls->L->nCcalls, LUAI_MAXCCALLS, + "C levels"); + assignment(ls, &nv, nvars+1); + } + else { /* assignment -> `=' explist */ + int nexps; + checknext(ls, '='); + nexps = explist(ls, &e); + if (nexps != nvars) { + adjust_assign(ls, nvars, nexps, &e); + if (nexps > nvars) + ls->fs->freereg -= nexps - nvars; /* remove extra values */ + } + else { + luaK_setoneret(ls->fs, &e); /* close last expression */ + luaK_storevar(ls->fs, &lh->v, &e); + return; /* avoid default */ + } + } + init_exp(&e, VNONRELOC, ls->fs->freereg-1); /* default assignment */ + luaK_storevar(ls->fs, &lh->v, &e); +} + + +static int cond (LexState *ls) { + /* cond -> exp */ + expdesc v; + expr(ls, &v); /* read condition */ + if (v.k == VNIL) v.k = VFALSE; /* `falses' are all equal here */ + luaK_goiftrue(ls->fs, &v); + return v.f; +} + + +static void gotostat (LexState *ls, int pc) { + int line = ls->linenumber; + TString *label; + int g; + if (testnext(ls, TK_GOTO)) + label = str_checkname(ls); + else { + luaX_next(ls); /* skip break */ + label = luaS_new(ls->L, "break"); + } + g = newlabelentry(ls, &ls->dyd->gt, label, line, pc); + findlabel(ls, g); /* close it if label already defined */ +} + + +/* check for repeated labels on the same block */ +static void checkrepeated (FuncState *fs, Labellist *ll, TString *label) { + int i; + for (i = fs->bl->firstlabel; i < ll->n; i++) { + if (luaS_eqstr(label, ll->arr[i].name)) { + const char *msg = luaO_pushfstring(fs->ls->L, + "label " LUA_QS " already defined on line %d", + getstr(label), ll->arr[i].line); + semerror(fs->ls, msg); + } + } +} + + +/* skip no-op statements */ +static void skipnoopstat (LexState *ls) { + while (ls->t.token == ';' || ls->t.token == TK_DBCOLON) + statement(ls); +} + + +static void labelstat (LexState *ls, TString *label, int line) { + /* label -> '::' NAME '::' */ + FuncState *fs = ls->fs; + Labellist *ll = &ls->dyd->label; + int l; /* index of new label being created */ + checkrepeated(fs, ll, label); /* check for repeated labels */ + checknext(ls, TK_DBCOLON); /* skip double colon */ + /* create new entry for this label */ + l = newlabelentry(ls, ll, label, line, fs->pc); + skipnoopstat(ls); /* skip other no-op statements */ + if (block_follow(ls, 0)) { /* label is last no-op statement in the block? */ + /* assume that locals are already out of scope */ + ll->arr[l].nactvar = fs->bl->nactvar; + } + findgotos(ls, &ll->arr[l]); +} + + +static void whilestat (LexState *ls, int line) { + /* whilestat -> WHILE cond DO block END */ + FuncState *fs = ls->fs; + int whileinit; + int condexit; + BlockCnt bl; + luaX_next(ls); /* skip WHILE */ + whileinit = luaK_getlabel(fs); + condexit = cond(ls); + enterblock(fs, &bl, 1); + checknext(ls, TK_DO); + block(ls); + luaK_jumpto(fs, whileinit); + check_match(ls, TK_END, TK_WHILE, line); + leaveblock(fs); + luaK_patchtohere(fs, condexit); /* false conditions finish the loop */ +} + + +static void repeatstat (LexState *ls, int line) { + /* repeatstat -> REPEAT block UNTIL cond */ + int condexit; + FuncState *fs = ls->fs; + int repeat_init = luaK_getlabel(fs); + BlockCnt bl1, bl2; + enterblock(fs, &bl1, 1); /* loop block */ + enterblock(fs, &bl2, 0); /* scope block */ + luaX_next(ls); /* skip REPEAT */ + statlist(ls); + check_match(ls, TK_UNTIL, TK_REPEAT, line); + condexit = cond(ls); /* read condition (inside scope block) */ + if (bl2.upval) /* upvalues? */ + luaK_patchclose(fs, condexit, bl2.nactvar); + leaveblock(fs); /* finish scope */ + luaK_patchlist(fs, condexit, repeat_init); /* close the loop */ + leaveblock(fs); /* finish loop */ +} + + +static int exp1 (LexState *ls) { + expdesc e; + int reg; + expr(ls, &e); + luaK_exp2nextreg(ls->fs, &e); + lua_assert(e.k == VNONRELOC); + reg = e.u.info; + return reg; +} + + +static void forbody (LexState *ls, int base, int line, int nvars, int isnum) { + /* forbody -> DO block */ + BlockCnt bl; + FuncState *fs = ls->fs; + int prep, endfor; + adjustlocalvars(ls, 3); /* control variables */ + checknext(ls, TK_DO); + prep = isnum ? luaK_codeAsBx(fs, OP_FORPREP, base, NO_JUMP) : luaK_jump(fs); + enterblock(fs, &bl, 0); /* scope for declared variables */ + adjustlocalvars(ls, nvars); + luaK_reserveregs(fs, nvars); + block(ls); + leaveblock(fs); /* end of scope for declared variables */ + luaK_patchtohere(fs, prep); + if (isnum) /* numeric for? */ + endfor = luaK_codeAsBx(fs, OP_FORLOOP, base, NO_JUMP); + else { /* generic for */ + luaK_codeABC(fs, OP_TFORCALL, base, 0, nvars); + luaK_fixline(fs, line); + endfor = luaK_codeAsBx(fs, OP_TFORLOOP, base + 2, NO_JUMP); + } + luaK_patchlist(fs, endfor, prep + 1); + luaK_fixline(fs, line); +} + + +static void fornum (LexState *ls, TString *varname, int line) { + /* fornum -> NAME = exp1,exp1[,exp1] forbody */ + FuncState *fs = ls->fs; + int base = fs->freereg; + new_localvarliteral(ls, "(for index)"); + new_localvarliteral(ls, "(for limit)"); + new_localvarliteral(ls, "(for step)"); + new_localvar(ls, varname); + checknext(ls, '='); + exp1(ls); /* initial value */ + checknext(ls, ','); + exp1(ls); /* limit */ + if (testnext(ls, ',')) + exp1(ls); /* optional step */ + else { /* default step = 1 */ + luaK_codek(fs, fs->freereg, luaK_numberK(fs, 1)); + luaK_reserveregs(fs, 1); + } + forbody(ls, base, line, 1, 1); +} + + +static void forlist (LexState *ls, TString *indexname) { + /* forlist -> NAME {,NAME} IN explist forbody */ + FuncState *fs = ls->fs; + expdesc e; + int nvars = 4; /* gen, state, control, plus at least one declared var */ + int line; + int base = fs->freereg; + /* create control variables */ + new_localvarliteral(ls, "(for generator)"); + new_localvarliteral(ls, "(for state)"); + new_localvarliteral(ls, "(for control)"); + /* create declared variables */ + new_localvar(ls, indexname); + while (testnext(ls, ',')) { + new_localvar(ls, str_checkname(ls)); + nvars++; + } + checknext(ls, TK_IN); + line = ls->linenumber; + adjust_assign(ls, 3, explist(ls, &e), &e); + luaK_checkstack(fs, 3); /* extra space to call generator */ + forbody(ls, base, line, nvars - 3, 0); +} + + +static void forstat (LexState *ls, int line) { + /* forstat -> FOR (fornum | forlist) END */ + FuncState *fs = ls->fs; + TString *varname; + BlockCnt bl; + enterblock(fs, &bl, 1); /* scope for loop and control variables */ + luaX_next(ls); /* skip `for' */ + varname = str_checkname(ls); /* first variable name */ + switch (ls->t.token) { + case '=': fornum(ls, varname, line); break; + case ',': case TK_IN: forlist(ls, varname); break; + default: luaX_syntaxerror(ls, LUA_QL("=") " or " LUA_QL("in") " expected"); + } + check_match(ls, TK_END, TK_FOR, line); + leaveblock(fs); /* loop scope (`break' jumps to this point) */ +} + + +static void test_then_block (LexState *ls, int *escapelist) { + /* test_then_block -> [IF | ELSEIF] cond THEN block */ + BlockCnt bl; + FuncState *fs = ls->fs; + expdesc v; + int jf; /* instruction to skip 'then' code (if condition is false) */ + luaX_next(ls); /* skip IF or ELSEIF */ + expr(ls, &v); /* read condition */ + checknext(ls, TK_THEN); + if (ls->t.token == TK_GOTO || ls->t.token == TK_BREAK) { + luaK_goiffalse(ls->fs, &v); /* will jump to label if condition is true */ + enterblock(fs, &bl, 0); /* must enter block before 'goto' */ + gotostat(ls, v.t); /* handle goto/break */ + skipnoopstat(ls); /* skip other no-op statements */ + if (block_follow(ls, 0)) { /* 'goto' is the entire block? */ + leaveblock(fs); + return; /* and that is it */ + } + else /* must skip over 'then' part if condition is false */ + jf = luaK_jump(fs); + } + else { /* regular case (not goto/break) */ + luaK_goiftrue(ls->fs, &v); /* skip over block if condition is false */ + enterblock(fs, &bl, 0); + jf = v.f; + } + statlist(ls); /* `then' part */ + leaveblock(fs); + if (ls->t.token == TK_ELSE || + ls->t.token == TK_ELSEIF) /* followed by 'else'/'elseif'? */ + luaK_concat(fs, escapelist, luaK_jump(fs)); /* must jump over it */ + luaK_patchtohere(fs, jf); +} + + +static void ifstat (LexState *ls, int line) { + /* ifstat -> IF cond THEN block {ELSEIF cond THEN block} [ELSE block] END */ + FuncState *fs = ls->fs; + int escapelist = NO_JUMP; /* exit list for finished parts */ + test_then_block(ls, &escapelist); /* IF cond THEN block */ + while (ls->t.token == TK_ELSEIF) + test_then_block(ls, &escapelist); /* ELSEIF cond THEN block */ + if (testnext(ls, TK_ELSE)) + block(ls); /* `else' part */ + check_match(ls, TK_END, TK_IF, line); + luaK_patchtohere(fs, escapelist); /* patch escape list to 'if' end */ +} + + +static void localfunc (LexState *ls) { + expdesc b; + FuncState *fs = ls->fs; + new_localvar(ls, str_checkname(ls)); /* new local variable */ + adjustlocalvars(ls, 1); /* enter its scope */ + body(ls, &b, 0, ls->linenumber); /* function created in next register */ + /* debug information will only see the variable after this point! */ + getlocvar(fs, b.u.info)->startpc = fs->pc; +} + + +static void localstat (LexState *ls) { + /* stat -> LOCAL NAME {`,' NAME} [`=' explist] */ + int nvars = 0; + int nexps; + expdesc e; + do { + new_localvar(ls, str_checkname(ls)); + nvars++; + } while (testnext(ls, ',')); + if (testnext(ls, '=')) + nexps = explist(ls, &e); + else { + e.k = VVOID; + nexps = 0; + } + adjust_assign(ls, nvars, nexps, &e); + adjustlocalvars(ls, nvars); +} + + +static int funcname (LexState *ls, expdesc *v) { + /* funcname -> NAME {fieldsel} [`:' NAME] */ + int ismethod = 0; + singlevar(ls, v); + while (ls->t.token == '.') + fieldsel(ls, v); + if (ls->t.token == ':') { + ismethod = 1; + fieldsel(ls, v); + } + return ismethod; +} + + +static void funcstat (LexState *ls, int line) { + /* funcstat -> FUNCTION funcname body */ + int ismethod; + expdesc v, b; + luaX_next(ls); /* skip FUNCTION */ + ismethod = funcname(ls, &v); + body(ls, &b, ismethod, line); + luaK_storevar(ls->fs, &v, &b); + luaK_fixline(ls->fs, line); /* definition `happens' in the first line */ +} + + +static void exprstat (LexState *ls) { + /* stat -> func | assignment */ + FuncState *fs = ls->fs; + struct LHS_assign v; + suffixedexp(ls, &v.v); + if (ls->t.token == '=' || ls->t.token == ',') { /* stat -> assignment ? */ + v.prev = NULL; + assignment(ls, &v, 1); + } + else { /* stat -> func */ + check_condition(ls, v.v.k == VCALL, "syntax error"); + SETARG_C(getcode(fs, &v.v), 1); /* call statement uses no results */ + } +} + + +static void retstat (LexState *ls) { + /* stat -> RETURN [explist] [';'] */ + FuncState *fs = ls->fs; + expdesc e; + int first, nret; /* registers with returned values */ + if (block_follow(ls, 1) || ls->t.token == ';') + first = nret = 0; /* return no values */ + else { + nret = explist(ls, &e); /* optional return values */ + if (hasmultret(e.k)) { + luaK_setmultret(fs, &e); + if (e.k == VCALL && nret == 1) { /* tail call? */ + SET_OPCODE(getcode(fs,&e), OP_TAILCALL); + lua_assert(GETARG_A(getcode(fs,&e)) == fs->nactvar); + } + first = fs->nactvar; + nret = LUA_MULTRET; /* return all values */ + } + else { + if (nret == 1) /* only one single value? */ + first = luaK_exp2anyreg(fs, &e); + else { + luaK_exp2nextreg(fs, &e); /* values must go to the `stack' */ + first = fs->nactvar; /* return all `active' values */ + lua_assert(nret == fs->freereg - first); + } + } + } + luaK_ret(fs, first, nret); + testnext(ls, ';'); /* skip optional semicolon */ +} + + +static void statement (LexState *ls) { + int line = ls->linenumber; /* may be needed for error messages */ + enterlevel(ls); + switch (ls->t.token) { + case ';': { /* stat -> ';' (empty statement) */ + luaX_next(ls); /* skip ';' */ + break; + } + case TK_IF: { /* stat -> ifstat */ + ifstat(ls, line); + break; + } + case TK_WHILE: { /* stat -> whilestat */ + whilestat(ls, line); + break; + } + case TK_DO: { /* stat -> DO block END */ + luaX_next(ls); /* skip DO */ + block(ls); + check_match(ls, TK_END, TK_DO, line); + break; + } + case TK_FOR: { /* stat -> forstat */ + forstat(ls, line); + break; + } + case TK_REPEAT: { /* stat -> repeatstat */ + repeatstat(ls, line); + break; + } + case TK_FUNCTION: { /* stat -> funcstat */ + funcstat(ls, line); + break; + } + case TK_LOCAL: { /* stat -> localstat */ + luaX_next(ls); /* skip LOCAL */ + if (testnext(ls, TK_FUNCTION)) /* local function? */ + localfunc(ls); + else + localstat(ls); + break; + } + case TK_DBCOLON: { /* stat -> label */ + luaX_next(ls); /* skip double colon */ + labelstat(ls, str_checkname(ls), line); + break; + } + case TK_RETURN: { /* stat -> retstat */ + luaX_next(ls); /* skip RETURN */ + retstat(ls); + break; + } + case TK_BREAK: /* stat -> breakstat */ + case TK_GOTO: { /* stat -> 'goto' NAME */ + gotostat(ls, luaK_jump(ls->fs)); + break; + } + default: { /* stat -> func | assignment */ + exprstat(ls); + break; + } + } + lua_assert(ls->fs->f->maxstacksize >= ls->fs->freereg && + ls->fs->freereg >= ls->fs->nactvar); + ls->fs->freereg = ls->fs->nactvar; /* free registers */ + leavelevel(ls); +} + +/* }====================================================================== */ + + +/* +** compiles the main function, which is a regular vararg function with an +** upvalue named LUA_ENV +*/ +static void mainfunc (LexState *ls, FuncState *fs) { + BlockCnt bl; + expdesc v; + open_func(ls, fs, &bl); + fs->f->is_vararg = 1; /* main function is always vararg */ + init_exp(&v, VLOCAL, 0); /* create and... */ + newupvalue(fs, ls->envn, &v); /* ...set environment upvalue */ + luaX_next(ls); /* read first token */ + statlist(ls); /* parse main body */ + check(ls, TK_EOS); + close_func(ls); +} + + +Closure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, + Dyndata *dyd, const char *name, int firstchar) { + LexState lexstate; + FuncState funcstate; + Closure *cl = luaF_newLclosure(L, 1); /* create main closure */ + /* anchor closure (to avoid being collected) */ + setclLvalue(L, L->top, cl); + incr_top(L); + funcstate.f = cl->l.p = luaF_newproto(L); + funcstate.f->source = luaS_new(L, name); /* create and anchor TString */ + lexstate.buff = buff; + lexstate.dyd = dyd; + dyd->actvar.n = dyd->gt.n = dyd->label.n = 0; + luaX_setinput(L, &lexstate, z, funcstate.f->source, firstchar); + mainfunc(&lexstate, &funcstate); + lua_assert(!funcstate.prev && funcstate.nups == 1 && !lexstate.fs); + /* all scopes should be correctly finished */ + lua_assert(dyd->actvar.n == 0 && dyd->gt.n == 0 && dyd->label.n == 0); + return cl; /* it's on the stack too */ +} + diff --git a/radio/src/lua/src/lparser.h b/radio/src/lua/src/lparser.h new file mode 100644 index 000000000..301167d4f --- /dev/null +++ b/radio/src/lua/src/lparser.h @@ -0,0 +1,119 @@ +/* +** $Id: lparser.h,v 1.70 2012/05/08 13:53:33 roberto Exp $ +** Lua Parser +** See Copyright Notice in lua.h +*/ + +#ifndef lparser_h +#define lparser_h + +#include "llimits.h" +#include "lobject.h" +#include "lzio.h" + + +/* +** Expression descriptor +*/ + +typedef enum { + VVOID, /* no value */ + VNIL, + VTRUE, + VFALSE, + VK, /* info = index of constant in `k' */ + VKNUM, /* nval = numerical value */ + VNONRELOC, /* info = result register */ + VLOCAL, /* info = local register */ + VUPVAL, /* info = index of upvalue in 'upvalues' */ + VINDEXED, /* t = table register/upvalue; idx = index R/K */ + VJMP, /* info = instruction pc */ + VRELOCABLE, /* info = instruction pc */ + VCALL, /* info = instruction pc */ + VVARARG /* info = instruction pc */ +} expkind; + + +#define vkisvar(k) (VLOCAL <= (k) && (k) <= VINDEXED) +#define vkisinreg(k) ((k) == VNONRELOC || (k) == VLOCAL) + +typedef struct expdesc { + expkind k; + union { + struct { /* for indexed variables (VINDEXED) */ + short idx; /* index (R/K) */ + lu_byte t; /* table (register or upvalue) */ + lu_byte vt; /* whether 't' is register (VLOCAL) or upvalue (VUPVAL) */ + } ind; + int info; /* for generic use */ + lua_Number nval; /* for VKNUM */ + } u; + int t; /* patch list of `exit when true' */ + int f; /* patch list of `exit when false' */ +} expdesc; + + +/* description of active local variable */ +typedef struct Vardesc { + short idx; /* variable index in stack */ +} Vardesc; + + +/* description of pending goto statements and label statements */ +typedef struct Labeldesc { + TString *name; /* label identifier */ + int pc; /* position in code */ + int line; /* line where it appeared */ + lu_byte nactvar; /* local level where it appears in current block */ +} Labeldesc; + + +/* list of labels or gotos */ +typedef struct Labellist { + Labeldesc *arr; /* array */ + int n; /* number of entries in use */ + int size; /* array size */ +} Labellist; + + +/* dynamic structures used by the parser */ +typedef struct Dyndata { + struct { /* list of active local variables */ + Vardesc *arr; + int n; + int size; + } actvar; + Labellist gt; /* list of pending gotos */ + Labellist label; /* list of active labels */ +} Dyndata; + + +/* control of blocks */ +struct BlockCnt; /* defined in lparser.c */ + + +/* state needed to generate code for a given function */ +typedef struct FuncState { + Proto *f; /* current function header */ + Table *h; /* table to find (and reuse) elements in `k' */ + struct FuncState *prev; /* enclosing function */ + struct LexState *ls; /* lexical state */ + struct BlockCnt *bl; /* chain of current blocks */ + int pc; /* next position to code (equivalent to `ncode') */ + int lasttarget; /* 'label' of last 'jump label' */ + int jpc; /* list of pending jumps to `pc' */ + int nk; /* number of elements in `k' */ + int np; /* number of elements in `p' */ + int firstlocal; /* index of first local var (in Dyndata array) */ + short nlocvars; /* number of elements in 'f->locvars' */ + lu_byte nactvar; /* number of active local variables */ + lu_byte nups; /* number of upvalues */ + lu_byte freereg; /* first free register */ +} FuncState; + + +LUAI_FUNC Closure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, + Dyndata *dyd, const char *name, int firstchar); + + +#endif diff --git a/radio/src/lua/src/lstate.c b/radio/src/lua/src/lstate.c new file mode 100644 index 000000000..207a106d5 --- /dev/null +++ b/radio/src/lua/src/lstate.c @@ -0,0 +1,322 @@ +/* +** $Id: lstate.c,v 2.99 2012/10/02 17:40:53 roberto Exp $ +** Global State +** See Copyright Notice in lua.h +*/ + + +#include +#include + +#define lstate_c +#define LUA_CORE + +#include "lua.h" + +#include "lapi.h" +#include "ldebug.h" +#include "ldo.h" +#include "lfunc.h" +#include "lgc.h" +#include "llex.h" +#include "lmem.h" +#include "lstate.h" +#include "lstring.h" +#include "ltable.h" +#include "ltm.h" + + +#if !defined(LUAI_GCPAUSE) +#define LUAI_GCPAUSE 200 /* 200% */ +#endif + +#if !defined(LUAI_GCMAJOR) +#define LUAI_GCMAJOR 200 /* 200% */ +#endif + +#if !defined(LUAI_GCMUL) +#define LUAI_GCMUL 200 /* GC runs 'twice the speed' of memory allocation */ +#endif + + +#define MEMERRMSG "not enough memory" + + +/* +** a macro to help the creation of a unique random seed when a state is +** created; the seed is used to randomize hashes. +*/ +#if !defined(luai_makeseed) +#include +#define luai_makeseed() cast(unsigned int, time(NULL)) +#endif + + + +/* +** thread state + extra space +*/ +typedef struct LX { +#if defined(LUAI_EXTRASPACE) + char buff[LUAI_EXTRASPACE]; +#endif + lua_State l; +} LX; + + +/* +** Main thread combines a thread state and the global state +*/ +typedef struct LG { + LX l; + global_State g; +} LG; + + + +#define fromstate(L) (cast(LX *, cast(lu_byte *, (L)) - offsetof(LX, l))) + + +/* +** Compute an initial seed as random as possible. In ANSI, rely on +** Address Space Layout Randomization (if present) to increase +** randomness.. +*/ +#define addbuff(b,p,e) \ + { size_t t = cast(size_t, e); \ + memcpy(buff + p, &t, sizeof(t)); p += sizeof(t); } + +static unsigned int makeseed (lua_State *L) { + char buff[4 * sizeof(size_t)]; + unsigned int h = luai_makeseed(); + int p = 0; + addbuff(buff, p, L); /* heap variable */ + addbuff(buff, p, &h); /* local variable */ + addbuff(buff, p, luaO_nilobject); /* global variable */ + addbuff(buff, p, &lua_newstate); /* public function */ + lua_assert(p == sizeof(buff)); + return luaS_hash(buff, p, h); +} + + +/* +** set GCdebt to a new value keeping the value (totalbytes + GCdebt) +** invariant +*/ +void luaE_setdebt (global_State *g, l_mem debt) { + g->totalbytes -= (debt - g->GCdebt); + g->GCdebt = debt; +} + + +CallInfo *luaE_extendCI (lua_State *L) { + CallInfo *ci = luaM_new(L, CallInfo); + lua_assert(L->ci->next == NULL); + L->ci->next = ci; + ci->previous = L->ci; + ci->next = NULL; + return ci; +} + + +void luaE_freeCI (lua_State *L) { + CallInfo *ci = L->ci; + CallInfo *next = ci->next; + ci->next = NULL; + while ((ci = next) != NULL) { + next = ci->next; + luaM_free(L, ci); + } +} + + +static void stack_init (lua_State *L1, lua_State *L) { + int i; CallInfo *ci; + /* initialize stack array */ + L1->stack = luaM_newvector(L, BASIC_STACK_SIZE, TValue); + L1->stacksize = BASIC_STACK_SIZE; + for (i = 0; i < BASIC_STACK_SIZE; i++) + setnilvalue(L1->stack + i); /* erase new stack */ + L1->top = L1->stack; + L1->stack_last = L1->stack + L1->stacksize - EXTRA_STACK; + /* initialize first ci */ + ci = &L1->base_ci; + ci->next = ci->previous = NULL; + ci->callstatus = 0; + ci->func = L1->top; + setnilvalue(L1->top++); /* 'function' entry for this 'ci' */ + ci->top = L1->top + LUA_MINSTACK; + L1->ci = ci; +} + + +static void freestack (lua_State *L) { + if (L->stack == NULL) + return; /* stack not completely built yet */ + L->ci = &L->base_ci; /* free the entire 'ci' list */ + luaE_freeCI(L); + luaM_freearray(L, L->stack, L->stacksize); /* free stack array */ +} + + +/* +** Create registry table and its predefined values +*/ +static void init_registry (lua_State *L, global_State *g) { + TValue mt; + /* create registry */ + Table *registry = luaH_new(L); + sethvalue(L, &g->l_registry, registry); + luaH_resize(L, registry, LUA_RIDX_LAST, 0); + /* registry[LUA_RIDX_MAINTHREAD] = L */ + setthvalue(L, &mt, L); + luaH_setint(L, registry, LUA_RIDX_MAINTHREAD, &mt); + /* registry[LUA_RIDX_GLOBALS] = table of globals */ + sethvalue(L, &mt, luaH_new(L)); + luaH_setint(L, registry, LUA_RIDX_GLOBALS, &mt); +} + + +/* +** open parts of the state that may cause memory-allocation errors +*/ +static void f_luaopen (lua_State *L, void *ud) { + global_State *g = G(L); + UNUSED(ud); + stack_init(L, L); /* init stack */ + init_registry(L, g); + luaS_resize(L, MINSTRTABSIZE); /* initial size of string table */ + luaT_init(L); + luaX_init(L); + /* pre-create memory-error message */ + g->memerrmsg = luaS_newliteral(L, MEMERRMSG); + luaS_fix(g->memerrmsg); /* it should never be collected */ + g->gcrunning = 1; /* allow gc */ +} + + +/* +** preinitialize a state with consistent values without allocating +** any memory (to avoid errors) +*/ +static void preinit_state (lua_State *L, global_State *g) { + G(L) = g; + L->stack = NULL; + L->ci = NULL; + L->stacksize = 0; + L->errorJmp = NULL; + L->nCcalls = 0; + L->hook = NULL; + L->hookmask = 0; + L->basehookcount = 0; + L->allowhook = 1; + resethookcount(L); + L->openupval = NULL; + L->nny = 1; + L->status = LUA_OK; + L->errfunc = 0; +} + + +static void close_state (lua_State *L) { + global_State *g = G(L); + luaF_close(L, L->stack); /* close all upvalues for this thread */ + luaC_freeallobjects(L); /* collect all objects */ + luaM_freearray(L, G(L)->strt.hash, G(L)->strt.size); + luaZ_freebuffer(L, &g->buff); + freestack(L); + lua_assert(gettotalbytes(g) == sizeof(LG)); + (*g->frealloc)(g->ud, fromstate(L), sizeof(LG), 0); /* free main block */ +} + + +LUA_API lua_State *lua_newthread (lua_State *L) { + lua_State *L1; + lua_lock(L); + luaC_checkGC(L); + L1 = &luaC_newobj(L, LUA_TTHREAD, sizeof(LX), NULL, offsetof(LX, l))->th; + setthvalue(L, L->top, L1); + api_incr_top(L); + preinit_state(L1, G(L)); + L1->hookmask = L->hookmask; + L1->basehookcount = L->basehookcount; + L1->hook = L->hook; + resethookcount(L1); + luai_userstatethread(L, L1); + stack_init(L1, L); /* init stack */ + lua_unlock(L); + return L1; +} + + +void luaE_freethread (lua_State *L, lua_State *L1) { + LX *l = fromstate(L1); + luaF_close(L1, L1->stack); /* close all upvalues for this thread */ + lua_assert(L1->openupval == NULL); + luai_userstatefree(L, L1); + freestack(L1); + luaM_free(L, l); +} + + +LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { + int i; + lua_State *L; + global_State *g; + LG *l = cast(LG *, (*f)(ud, NULL, LUA_TTHREAD, sizeof(LG))); + if (l == NULL) return NULL; + L = &l->l.l; + g = &l->g; + L->next = NULL; + L->tt = LUA_TTHREAD; + g->currentwhite = bit2mask(WHITE0BIT, FIXEDBIT); + L->marked = luaC_white(g); + g->gckind = KGC_NORMAL; + preinit_state(L, g); + g->frealloc = f; + g->ud = ud; + g->mainthread = L; + g->seed = makeseed(L); + g->uvhead.u.l.prev = &g->uvhead; + g->uvhead.u.l.next = &g->uvhead; + g->gcrunning = 0; /* no GC while building state */ + g->GCestimate = 0; + g->strt.size = 0; + g->strt.nuse = 0; + g->strt.hash = NULL; + setnilvalue(&g->l_registry); + luaZ_initbuffer(L, &g->buff); + g->panic = NULL; + g->version = lua_version(NULL); + g->gcstate = GCSpause; + g->allgc = NULL; + g->finobj = NULL; + g->tobefnz = NULL; + g->sweepgc = g->sweepfin = NULL; + g->gray = g->grayagain = NULL; + g->weak = g->ephemeron = g->allweak = NULL; + g->totalbytes = sizeof(LG); + g->GCdebt = 0; + g->gcpause = LUAI_GCPAUSE; + g->gcmajorinc = LUAI_GCMAJOR; + g->gcstepmul = LUAI_GCMUL; + for (i=0; i < LUA_NUMTAGS; i++) g->mt[i] = NULL; + if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) { + /* memory allocation error: free partial state */ + close_state(L); + L = NULL; + } + else + luai_userstateopen(L); + return L; +} + + +LUA_API void lua_close (lua_State *L) { + L = G(L)->mainthread; /* only the main thread can be closed */ + lua_lock(L); + luai_userstateclose(L); + close_state(L); +} + + diff --git a/radio/src/lua/src/lstate.h b/radio/src/lua/src/lstate.h new file mode 100644 index 000000000..c8a31f5c0 --- /dev/null +++ b/radio/src/lua/src/lstate.h @@ -0,0 +1,228 @@ +/* +** $Id: lstate.h,v 2.82 2012/07/02 13:37:04 roberto Exp $ +** Global State +** See Copyright Notice in lua.h +*/ + +#ifndef lstate_h +#define lstate_h + +#include "lua.h" + +#include "lobject.h" +#include "ltm.h" +#include "lzio.h" + + +/* + +** Some notes about garbage-collected objects: All objects in Lua must +** be kept somehow accessible until being freed. +** +** Lua keeps most objects linked in list g->allgc. The link uses field +** 'next' of the CommonHeader. +** +** Strings are kept in several lists headed by the array g->strt.hash. +** +** Open upvalues are not subject to independent garbage collection. They +** are collected together with their respective threads. Lua keeps a +** double-linked list with all open upvalues (g->uvhead) so that it can +** mark objects referred by them. (They are always gray, so they must +** be remarked in the atomic step. Usually their contents would be marked +** when traversing the respective threads, but the thread may already be +** dead, while the upvalue is still accessible through closures.) +** +** Objects with finalizers are kept in the list g->finobj. +** +** The list g->tobefnz links all objects being finalized. + +*/ + + +struct lua_longjmp; /* defined in ldo.c */ + + + +/* extra stack space to handle TM calls and some other extras */ +#define EXTRA_STACK 5 + + +#define BASIC_STACK_SIZE (2*LUA_MINSTACK) + + +/* kinds of Garbage Collection */ +#define KGC_NORMAL 0 +#define KGC_EMERGENCY 1 /* gc was forced by an allocation failure */ +#define KGC_GEN 2 /* generational collection */ + + +typedef struct stringtable { + GCObject **hash; + lu_int32 nuse; /* number of elements */ + int size; +} stringtable; + + +/* +** information about a call +*/ +typedef struct CallInfo { + StkId func; /* function index in the stack */ + StkId top; /* top for this function */ + struct CallInfo *previous, *next; /* dynamic call link */ + short nresults; /* expected number of results from this function */ + lu_byte callstatus; + ptrdiff_t extra; + union { + struct { /* only for Lua functions */ + StkId base; /* base for this function */ + const Instruction *savedpc; + } l; + struct { /* only for C functions */ + int ctx; /* context info. in case of yields */ + lua_CFunction k; /* continuation in case of yields */ + ptrdiff_t old_errfunc; + lu_byte old_allowhook; + lu_byte status; + } c; + } u; +} CallInfo; + + +/* +** Bits in CallInfo status +*/ +#define CIST_LUA (1<<0) /* call is running a Lua function */ +#define CIST_HOOKED (1<<1) /* call is running a debug hook */ +#define CIST_REENTRY (1<<2) /* call is running on same invocation of + luaV_execute of previous call */ +#define CIST_YIELDED (1<<3) /* call reentered after suspension */ +#define CIST_YPCALL (1<<4) /* call is a yieldable protected call */ +#define CIST_STAT (1<<5) /* call has an error status (pcall) */ +#define CIST_TAIL (1<<6) /* call was tail called */ +#define CIST_HOOKYIELD (1<<7) /* last hook called yielded */ + + +#define isLua(ci) ((ci)->callstatus & CIST_LUA) + + +/* +** `global state', shared by all threads of this state +*/ +typedef struct global_State { + lua_Alloc frealloc; /* function to reallocate memory */ + void *ud; /* auxiliary data to `frealloc' */ + lu_mem totalbytes; /* number of bytes currently allocated - GCdebt */ + l_mem GCdebt; /* bytes allocated not yet compensated by the collector */ + lu_mem GCmemtrav; /* memory traversed by the GC */ + lu_mem GCestimate; /* an estimate of the non-garbage memory in use */ + stringtable strt; /* hash table for strings */ + TValue l_registry; + unsigned int seed; /* randomized seed for hashes */ + lu_byte currentwhite; + lu_byte gcstate; /* state of garbage collector */ + lu_byte gckind; /* kind of GC running */ + lu_byte gcrunning; /* true if GC is running */ + int sweepstrgc; /* position of sweep in `strt' */ + GCObject *allgc; /* list of all collectable objects */ + GCObject *finobj; /* list of collectable objects with finalizers */ + GCObject **sweepgc; /* current position of sweep in list 'allgc' */ + GCObject **sweepfin; /* current position of sweep in list 'finobj' */ + GCObject *gray; /* list of gray objects */ + GCObject *grayagain; /* list of objects to be traversed atomically */ + GCObject *weak; /* list of tables with weak values */ + GCObject *ephemeron; /* list of ephemeron tables (weak keys) */ + GCObject *allweak; /* list of all-weak tables */ + GCObject *tobefnz; /* list of userdata to be GC */ + UpVal uvhead; /* head of double-linked list of all open upvalues */ + Mbuffer buff; /* temporary buffer for string concatenation */ + int gcpause; /* size of pause between successive GCs */ + int gcmajorinc; /* pause between major collections (only in gen. mode) */ + int gcstepmul; /* GC `granularity' */ + lua_CFunction panic; /* to be called in unprotected errors */ + struct lua_State *mainthread; + const lua_Number *version; /* pointer to version number */ + TString *memerrmsg; /* memory-error message */ + TString *tmname[TM_N]; /* array with tag-method names */ + struct Table *mt[LUA_NUMTAGS]; /* metatables for basic types */ +} global_State; + + +/* +** `per thread' state +*/ +struct lua_State { + CommonHeader; + lu_byte status; + StkId top; /* first free slot in the stack */ + global_State *l_G; + CallInfo *ci; /* call info for current function */ + const Instruction *oldpc; /* last pc traced */ + StkId stack_last; /* last free slot in the stack */ + StkId stack; /* stack base */ + int stacksize; + unsigned short nny; /* number of non-yieldable calls in stack */ + unsigned short nCcalls; /* number of nested C calls */ + lu_byte hookmask; + lu_byte allowhook; + int basehookcount; + int hookcount; + lua_Hook hook; + GCObject *openupval; /* list of open upvalues in this stack */ + GCObject *gclist; + struct lua_longjmp *errorJmp; /* current error recover point */ + ptrdiff_t errfunc; /* current error handling function (stack index) */ + CallInfo base_ci; /* CallInfo for first level (C calling Lua) */ +}; + + +#define G(L) (L->l_G) + + +/* +** Union of all collectable objects +*/ +union GCObject { + GCheader gch; /* common header */ + union TString ts; + union Udata u; + union Closure cl; + struct Table h; + struct Proto p; + struct UpVal uv; + struct lua_State th; /* thread */ +}; + + +#define gch(o) (&(o)->gch) + +/* macros to convert a GCObject into a specific value */ +#define rawgco2ts(o) \ + check_exp(novariant((o)->gch.tt) == LUA_TSTRING, &((o)->ts)) +#define gco2ts(o) (&rawgco2ts(o)->tsv) +#define rawgco2u(o) check_exp((o)->gch.tt == LUA_TUSERDATA, &((o)->u)) +#define gco2u(o) (&rawgco2u(o)->uv) +#define gco2lcl(o) check_exp((o)->gch.tt == LUA_TLCL, &((o)->cl.l)) +#define gco2ccl(o) check_exp((o)->gch.tt == LUA_TCCL, &((o)->cl.c)) +#define gco2cl(o) \ + check_exp(novariant((o)->gch.tt) == LUA_TFUNCTION, &((o)->cl)) +#define gco2t(o) check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h)) +#define gco2p(o) check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p)) +#define gco2uv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv)) +#define gco2th(o) check_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th)) + +/* macro to convert any Lua object into a GCObject */ +#define obj2gco(v) (cast(GCObject *, (v))) + + +/* actual number of total bytes allocated */ +#define gettotalbytes(g) ((g)->totalbytes + (g)->GCdebt) + +LUAI_FUNC void luaE_setdebt (global_State *g, l_mem debt); +LUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1); +LUAI_FUNC CallInfo *luaE_extendCI (lua_State *L); +LUAI_FUNC void luaE_freeCI (lua_State *L); + + +#endif + diff --git a/radio/src/lua/src/lstring.c b/radio/src/lua/src/lstring.c new file mode 100644 index 000000000..8b5af0b2e --- /dev/null +++ b/radio/src/lua/src/lstring.c @@ -0,0 +1,185 @@ +/* +** $Id: lstring.c,v 2.26 2013/01/08 13:50:10 roberto Exp $ +** String table (keeps all strings handled by Lua) +** See Copyright Notice in lua.h +*/ + + +#include + +#define lstring_c +#define LUA_CORE + +#include "lua.h" + +#include "lmem.h" +#include "lobject.h" +#include "lstate.h" +#include "lstring.h" + + +/* +** Lua will use at most ~(2^LUAI_HASHLIMIT) bytes from a string to +** compute its hash +*/ +#if !defined(LUAI_HASHLIMIT) +#define LUAI_HASHLIMIT 5 +#endif + + +/* +** equality for long strings +*/ +int luaS_eqlngstr (TString *a, TString *b) { + size_t len = a->tsv.len; + lua_assert(a->tsv.tt == LUA_TLNGSTR && b->tsv.tt == LUA_TLNGSTR); + return (a == b) || /* same instance or... */ + ((len == b->tsv.len) && /* equal length and ... */ + (memcmp(getstr(a), getstr(b), len) == 0)); /* equal contents */ +} + + +/* +** equality for strings +*/ +int luaS_eqstr (TString *a, TString *b) { + return (a->tsv.tt == b->tsv.tt) && + (a->tsv.tt == LUA_TSHRSTR ? eqshrstr(a, b) : luaS_eqlngstr(a, b)); +} + + +unsigned int luaS_hash (const char *str, size_t l, unsigned int seed) { + unsigned int h = seed ^ cast(unsigned int, l); + size_t l1; + size_t step = (l >> LUAI_HASHLIMIT) + 1; + for (l1 = l; l1 >= step; l1 -= step) + h = h ^ ((h<<5) + (h>>2) + cast_byte(str[l1 - 1])); + return h; +} + + +/* +** resizes the string table +*/ +void luaS_resize (lua_State *L, int newsize) { + int i; + stringtable *tb = &G(L)->strt; + /* cannot resize while GC is traversing strings */ + luaC_runtilstate(L, ~bitmask(GCSsweepstring)); + if (newsize > tb->size) { + luaM_reallocvector(L, tb->hash, tb->size, newsize, GCObject *); + for (i = tb->size; i < newsize; i++) tb->hash[i] = NULL; + } + /* rehash */ + for (i=0; isize; i++) { + GCObject *p = tb->hash[i]; + tb->hash[i] = NULL; + while (p) { /* for each node in the list */ + GCObject *next = gch(p)->next; /* save next */ + unsigned int h = lmod(gco2ts(p)->hash, newsize); /* new position */ + gch(p)->next = tb->hash[h]; /* chain it */ + tb->hash[h] = p; + resetoldbit(p); /* see MOVE OLD rule */ + p = next; + } + } + if (newsize < tb->size) { + /* shrinking slice must be empty */ + lua_assert(tb->hash[newsize] == NULL && tb->hash[tb->size - 1] == NULL); + luaM_reallocvector(L, tb->hash, tb->size, newsize, GCObject *); + } + tb->size = newsize; +} + + +/* +** creates a new string object +*/ +static TString *createstrobj (lua_State *L, const char *str, size_t l, + int tag, unsigned int h, GCObject **list) { + TString *ts; + size_t totalsize; /* total size of TString object */ + totalsize = sizeof(TString) + ((l + 1) * sizeof(char)); + ts = &luaC_newobj(L, tag, totalsize, list, 0)->ts; + ts->tsv.len = l; + ts->tsv.hash = h; + ts->tsv.extra = 0; + memcpy(ts+1, str, l*sizeof(char)); + ((char *)(ts+1))[l] = '\0'; /* ending 0 */ + return ts; +} + + +/* +** creates a new short string, inserting it into string table +*/ +static TString *newshrstr (lua_State *L, const char *str, size_t l, + unsigned int h) { + GCObject **list; /* (pointer to) list where it will be inserted */ + stringtable *tb = &G(L)->strt; + TString *s; + if (tb->nuse >= cast(lu_int32, tb->size) && tb->size <= MAX_INT/2) + luaS_resize(L, tb->size*2); /* too crowded */ + list = &tb->hash[lmod(h, tb->size)]; + s = createstrobj(L, str, l, LUA_TSHRSTR, h, list); + tb->nuse++; + return s; +} + + +/* +** checks whether short string exists and reuses it or creates a new one +*/ +static TString *internshrstr (lua_State *L, const char *str, size_t l) { + GCObject *o; + global_State *g = G(L); + unsigned int h = luaS_hash(str, l, g->seed); + for (o = g->strt.hash[lmod(h, g->strt.size)]; + o != NULL; + o = gch(o)->next) { + TString *ts = rawgco2ts(o); + if (h == ts->tsv.hash && + l == ts->tsv.len && + (memcmp(str, getstr(ts), l * sizeof(char)) == 0)) { + if (isdead(G(L), o)) /* string is dead (but was not collected yet)? */ + changewhite(o); /* resurrect it */ + return ts; + } + } + return newshrstr(L, str, l, h); /* not found; create a new string */ +} + + +/* +** new string (with explicit length) +*/ +TString *luaS_newlstr (lua_State *L, const char *str, size_t l) { + if (l <= LUAI_MAXSHORTLEN) /* short string? */ + return internshrstr(L, str, l); + else { + if (l + 1 > (MAX_SIZET - sizeof(TString))/sizeof(char)) + luaM_toobig(L); + return createstrobj(L, str, l, LUA_TLNGSTR, G(L)->seed, NULL); + } +} + + +/* +** new zero-terminated string +*/ +TString *luaS_new (lua_State *L, const char *str) { + return luaS_newlstr(L, str, strlen(str)); +} + + +Udata *luaS_newudata (lua_State *L, size_t s, Table *e) { + Udata *u; + if (s > MAX_SIZET - sizeof(Udata)) + luaM_toobig(L); + u = &luaC_newobj(L, LUA_TUSERDATA, sizeof(Udata) + s, NULL, 0)->u; + u->uv.len = s; + u->uv.metatable = NULL; + u->uv.env = e; + return u; +} + diff --git a/radio/src/lua/src/lstring.h b/radio/src/lua/src/lstring.h new file mode 100644 index 000000000..d312ff3d2 --- /dev/null +++ b/radio/src/lua/src/lstring.h @@ -0,0 +1,46 @@ +/* +** $Id: lstring.h,v 1.49 2012/02/01 21:57:15 roberto Exp $ +** String table (keep all strings handled by Lua) +** See Copyright Notice in lua.h +*/ + +#ifndef lstring_h +#define lstring_h + +#include "lgc.h" +#include "lobject.h" +#include "lstate.h" + + +#define sizestring(s) (sizeof(union TString)+((s)->len+1)*sizeof(char)) + +#define sizeudata(u) (sizeof(union Udata)+(u)->len) + +#define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ + (sizeof(s)/sizeof(char))-1)) + +#define luaS_fix(s) l_setbit((s)->tsv.marked, FIXEDBIT) + + +/* +** test whether a string is a reserved word +*/ +#define isreserved(s) ((s)->tsv.tt == LUA_TSHRSTR && (s)->tsv.extra > 0) + + +/* +** equality for short strings, which are always internalized +*/ +#define eqshrstr(a,b) check_exp((a)->tsv.tt == LUA_TSHRSTR, (a) == (b)) + + +LUAI_FUNC unsigned int luaS_hash (const char *str, size_t l, unsigned int seed); +LUAI_FUNC int luaS_eqlngstr (TString *a, TString *b); +LUAI_FUNC int luaS_eqstr (TString *a, TString *b); +LUAI_FUNC void luaS_resize (lua_State *L, int newsize); +LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); +LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); +LUAI_FUNC TString *luaS_new (lua_State *L, const char *str); + + +#endif diff --git a/radio/src/lua/src/lstrlib.c b/radio/src/lua/src/lstrlib.c new file mode 100644 index 000000000..e60d2ba29 --- /dev/null +++ b/radio/src/lua/src/lstrlib.c @@ -0,0 +1,1017 @@ +/* +** $Id: lstrlib.c,v 1.178 2012/08/14 18:12:34 roberto Exp $ +** Standard library for string operations and pattern-matching +** See Copyright Notice in lua.h +*/ + + +#include +#include +#include +#include + +#define lstrlib_c + +#include "lua.h" + +#include "lauxlib.h" +#include "lualib.h" + + +/* +** maximum number of captures that a pattern can do during +** pattern-matching. This limit is arbitrary. +*/ +#if !defined(LUA_MAXCAPTURES) +#define LUA_MAXCAPTURES 32 +#endif + + +/* macro to `unsign' a character */ +#define uchar(c) ((unsigned char)(c)) + + + +static int str_len (lua_State *L) { + size_t l; + luaL_checklstring(L, 1, &l); + lua_pushinteger(L, (lua_Integer)l); + return 1; +} + + +/* translate a relative string position: negative means back from end */ +static size_t posrelat (ptrdiff_t pos, size_t len) { + if (pos >= 0) return (size_t)pos; + else if (0u - (size_t)pos > len) return 0; + else return len - ((size_t)-pos) + 1; +} + + +static int str_sub (lua_State *L) { + size_t l; + const char *s = luaL_checklstring(L, 1, &l); + size_t start = posrelat(luaL_checkinteger(L, 2), l); + size_t end = posrelat(luaL_optinteger(L, 3, -1), l); + if (start < 1) start = 1; + if (end > l) end = l; + if (start <= end) + lua_pushlstring(L, s + start - 1, end - start + 1); + else lua_pushliteral(L, ""); + return 1; +} + + +static int str_reverse (lua_State *L) { + size_t l, i; + luaL_Buffer b; + const char *s = luaL_checklstring(L, 1, &l); + char *p = luaL_buffinitsize(L, &b, l); + for (i = 0; i < l; i++) + p[i] = s[l - i - 1]; + luaL_pushresultsize(&b, l); + return 1; +} + + +static int str_lower (lua_State *L) { + size_t l; + size_t i; + luaL_Buffer b; + const char *s = luaL_checklstring(L, 1, &l); + char *p = luaL_buffinitsize(L, &b, l); + for (i=0; i> 1) + +static int str_rep (lua_State *L) { + size_t l, lsep; + const char *s = luaL_checklstring(L, 1, &l); + int n = luaL_checkint(L, 2); + const char *sep = luaL_optlstring(L, 3, "", &lsep); + if (n <= 0) lua_pushliteral(L, ""); + else if (l + lsep < l || l + lsep >= MAXSIZE / n) /* may overflow? */ + return luaL_error(L, "resulting string too large"); + else { + size_t totallen = n * l + (n - 1) * lsep; + luaL_Buffer b; + char *p = luaL_buffinitsize(L, &b, totallen); + while (n-- > 1) { /* first n-1 copies (followed by separator) */ + memcpy(p, s, l * sizeof(char)); p += l; + if (lsep > 0) { /* avoid empty 'memcpy' (may be expensive) */ + memcpy(p, sep, lsep * sizeof(char)); p += lsep; + } + } + memcpy(p, s, l * sizeof(char)); /* last copy (not followed by separator) */ + luaL_pushresultsize(&b, totallen); + } + return 1; +} + + +static int str_byte (lua_State *L) { + size_t l; + const char *s = luaL_checklstring(L, 1, &l); + size_t posi = posrelat(luaL_optinteger(L, 2, 1), l); + size_t pose = posrelat(luaL_optinteger(L, 3, posi), l); + int n, i; + if (posi < 1) posi = 1; + if (pose > l) pose = l; + if (posi > pose) return 0; /* empty interval; return no values */ + n = (int)(pose - posi + 1); + if (posi + n <= pose) /* (size_t -> int) overflow? */ + return luaL_error(L, "string slice too long"); + luaL_checkstack(L, n, "string slice too long"); + for (i=0; i= ms->level || ms->capture[l].len == CAP_UNFINISHED) + return luaL_error(ms->L, "invalid capture index %%%d", l + 1); + return l; +} + + +static int capture_to_close (MatchState *ms) { + int level = ms->level; + for (level--; level>=0; level--) + if (ms->capture[level].len == CAP_UNFINISHED) return level; + return luaL_error(ms->L, "invalid pattern capture"); +} + + +static const char *classend (MatchState *ms, const char *p) { + switch (*p++) { + case L_ESC: { + if (p == ms->p_end) + luaL_error(ms->L, "malformed pattern (ends with " LUA_QL("%%") ")"); + return p+1; + } + case '[': { + if (*p == '^') p++; + do { /* look for a `]' */ + if (p == ms->p_end) + luaL_error(ms->L, "malformed pattern (missing " LUA_QL("]") ")"); + if (*(p++) == L_ESC && p < ms->p_end) + p++; /* skip escapes (e.g. `%]') */ + } while (*p != ']'); + return p+1; + } + default: { + return p; + } + } +} + + +static int match_class (int c, int cl) { + int res; + switch (tolower(cl)) { + case 'a' : res = isalpha(c); break; + case 'c' : res = iscntrl(c); break; + case 'd' : res = isdigit(c); break; + case 'g' : res = isgraph(c); break; + case 'l' : res = islower(c); break; + case 'p' : res = ispunct(c); break; + case 's' : res = isspace(c); break; + case 'u' : res = isupper(c); break; + case 'w' : res = isalnum(c); break; + case 'x' : res = isxdigit(c); break; + case 'z' : res = (c == 0); break; /* deprecated option */ + default: return (cl == c); + } + return (islower(cl) ? res : !res); +} + + +static int matchbracketclass (int c, const char *p, const char *ec) { + int sig = 1; + if (*(p+1) == '^') { + sig = 0; + p++; /* skip the `^' */ + } + while (++p < ec) { + if (*p == L_ESC) { + p++; + if (match_class(c, uchar(*p))) + return sig; + } + else if ((*(p+1) == '-') && (p+2 < ec)) { + p+=2; + if (uchar(*(p-2)) <= c && c <= uchar(*p)) + return sig; + } + else if (uchar(*p) == c) return sig; + } + return !sig; +} + + +static int singlematch (MatchState *ms, const char *s, const char *p, + const char *ep) { + if (s >= ms->src_end) + return 0; + else { + int c = uchar(*s); + switch (*p) { + case '.': return 1; /* matches any char */ + case L_ESC: return match_class(c, uchar(*(p+1))); + case '[': return matchbracketclass(c, p, ep-1); + default: return (uchar(*p) == c); + } + } +} + + +static const char *matchbalance (MatchState *ms, const char *s, + const char *p) { + if (p >= ms->p_end - 1) + luaL_error(ms->L, "malformed pattern " + "(missing arguments to " LUA_QL("%%b") ")"); + if (*s != *p) return NULL; + else { + int b = *p; + int e = *(p+1); + int cont = 1; + while (++s < ms->src_end) { + if (*s == e) { + if (--cont == 0) return s+1; + } + else if (*s == b) cont++; + } + } + return NULL; /* string ends out of balance */ +} + + +static const char *max_expand (MatchState *ms, const char *s, + const char *p, const char *ep) { + ptrdiff_t i = 0; /* counts maximum expand for item */ + while (singlematch(ms, s + i, p, ep)) + i++; + /* keeps trying to match with the maximum repetitions */ + while (i>=0) { + const char *res = match(ms, (s+i), ep+1); + if (res) return res; + i--; /* else didn't match; reduce 1 repetition to try again */ + } + return NULL; +} + + +static const char *min_expand (MatchState *ms, const char *s, + const char *p, const char *ep) { + for (;;) { + const char *res = match(ms, s, ep+1); + if (res != NULL) + return res; + else if (singlematch(ms, s, p, ep)) + s++; /* try with one more repetition */ + else return NULL; + } +} + + +static const char *start_capture (MatchState *ms, const char *s, + const char *p, int what) { + const char *res; + int level = ms->level; + if (level >= LUA_MAXCAPTURES) luaL_error(ms->L, "too many captures"); + ms->capture[level].init = s; + ms->capture[level].len = what; + ms->level = level+1; + if ((res=match(ms, s, p)) == NULL) /* match failed? */ + ms->level--; /* undo capture */ + return res; +} + + +static const char *end_capture (MatchState *ms, const char *s, + const char *p) { + int l = capture_to_close(ms); + const char *res; + ms->capture[l].len = s - ms->capture[l].init; /* close capture */ + if ((res = match(ms, s, p)) == NULL) /* match failed? */ + ms->capture[l].len = CAP_UNFINISHED; /* undo capture */ + return res; +} + + +static const char *match_capture (MatchState *ms, const char *s, int l) { + size_t len; + l = check_capture(ms, l); + len = ms->capture[l].len; + if ((size_t)(ms->src_end-s) >= len && + memcmp(ms->capture[l].init, s, len) == 0) + return s+len; + else return NULL; +} + + +static const char *match (MatchState *ms, const char *s, const char *p) { + if (ms->matchdepth-- == 0) + luaL_error(ms->L, "pattern too complex"); + init: /* using goto's to optimize tail recursion */ + if (p != ms->p_end) { /* end of pattern? */ + switch (*p) { + case '(': { /* start capture */ + if (*(p + 1) == ')') /* position capture? */ + s = start_capture(ms, s, p + 2, CAP_POSITION); + else + s = start_capture(ms, s, p + 1, CAP_UNFINISHED); + break; + } + case ')': { /* end capture */ + s = end_capture(ms, s, p + 1); + break; + } + case '$': { + if ((p + 1) != ms->p_end) /* is the `$' the last char in pattern? */ + goto dflt; /* no; go to default */ + s = (s == ms->src_end) ? s : NULL; /* check end of string */ + break; + } + case L_ESC: { /* escaped sequences not in the format class[*+?-]? */ + switch (*(p + 1)) { + case 'b': { /* balanced string? */ + s = matchbalance(ms, s, p + 2); + if (s != NULL) { + p += 4; goto init; /* return match(ms, s, p + 4); */ + } /* else fail (s == NULL) */ + break; + } + case 'f': { /* frontier? */ + const char *ep; char previous; + p += 2; + if (*p != '[') + luaL_error(ms->L, "missing " LUA_QL("[") " after " + LUA_QL("%%f") " in pattern"); + ep = classend(ms, p); /* points to what is next */ + previous = (s == ms->src_init) ? '\0' : *(s - 1); + if (!matchbracketclass(uchar(previous), p, ep - 1) && + matchbracketclass(uchar(*s), p, ep - 1)) { + p = ep; goto init; /* return match(ms, s, ep); */ + } + s = NULL; /* match failed */ + break; + } + case '0': case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + case '8': case '9': { /* capture results (%0-%9)? */ + s = match_capture(ms, s, uchar(*(p + 1))); + if (s != NULL) { + p += 2; goto init; /* return match(ms, s, p + 2) */ + } + break; + } + default: goto dflt; + } + break; + } + default: dflt: { /* pattern class plus optional suffix */ + const char *ep = classend(ms, p); /* points to optional suffix */ + /* does not match at least once? */ + if (!singlematch(ms, s, p, ep)) { + if (*ep == '*' || *ep == '?' || *ep == '-') { /* accept empty? */ + p = ep + 1; goto init; /* return match(ms, s, ep + 1); */ + } + else /* '+' or no suffix */ + s = NULL; /* fail */ + } + else { /* matched once */ + switch (*ep) { /* handle optional suffix */ + case '?': { /* optional */ + const char *res; + if ((res = match(ms, s + 1, ep + 1)) != NULL) + s = res; + else { + p = ep + 1; goto init; /* else return match(ms, s, ep + 1); */ + } + break; + } + case '+': /* 1 or more repetitions */ + s++; /* 1 match already done */ + /* go through */ + case '*': /* 0 or more repetitions */ + s = max_expand(ms, s, p, ep); + break; + case '-': /* 0 or more repetitions (minimum) */ + s = min_expand(ms, s, p, ep); + break; + default: /* no suffix */ + s++; p = ep; goto init; /* return match(ms, s + 1, ep); */ + } + } + break; + } + } + } + ms->matchdepth++; + return s; +} + + + +static const char *lmemfind (const char *s1, size_t l1, + const char *s2, size_t l2) { + if (l2 == 0) return s1; /* empty strings are everywhere */ + else if (l2 > l1) return NULL; /* avoids a negative `l1' */ + else { + const char *init; /* to search for a `*s2' inside `s1' */ + l2--; /* 1st char will be checked by `memchr' */ + l1 = l1-l2; /* `s2' cannot be found after that */ + while (l1 > 0 && (init = (const char *)memchr(s1, *s2, l1)) != NULL) { + init++; /* 1st char is already checked */ + if (memcmp(init, s2+1, l2) == 0) + return init-1; + else { /* correct `l1' and `s1' to try again */ + l1 -= init-s1; + s1 = init; + } + } + return NULL; /* not found */ + } +} + + +static void push_onecapture (MatchState *ms, int i, const char *s, + const char *e) { + if (i >= ms->level) { + if (i == 0) /* ms->level == 0, too */ + lua_pushlstring(ms->L, s, e - s); /* add whole match */ + else + luaL_error(ms->L, "invalid capture index"); + } + else { + ptrdiff_t l = ms->capture[i].len; + if (l == CAP_UNFINISHED) luaL_error(ms->L, "unfinished capture"); + if (l == CAP_POSITION) + lua_pushinteger(ms->L, ms->capture[i].init - ms->src_init + 1); + else + lua_pushlstring(ms->L, ms->capture[i].init, l); + } +} + + +static int push_captures (MatchState *ms, const char *s, const char *e) { + int i; + int nlevels = (ms->level == 0 && s) ? 1 : ms->level; + luaL_checkstack(ms->L, nlevels, "too many captures"); + for (i = 0; i < nlevels; i++) + push_onecapture(ms, i, s, e); + return nlevels; /* number of strings pushed */ +} + + +/* check whether pattern has no special characters */ +static int nospecials (const char *p, size_t l) { + size_t upto = 0; + do { + if (strpbrk(p + upto, SPECIALS)) + return 0; /* pattern has a special character */ + upto += strlen(p + upto) + 1; /* may have more after \0 */ + } while (upto <= l); + return 1; /* no special chars found */ +} + + +static int str_find_aux (lua_State *L, int find) { + size_t ls, lp; + const char *s = luaL_checklstring(L, 1, &ls); + const char *p = luaL_checklstring(L, 2, &lp); + size_t init = posrelat(luaL_optinteger(L, 3, 1), ls); + if (init < 1) init = 1; + else if (init > ls + 1) { /* start after string's end? */ + lua_pushnil(L); /* cannot find anything */ + return 1; + } + /* explicit request or no special characters? */ + if (find && (lua_toboolean(L, 4) || nospecials(p, lp))) { + /* do a plain search */ + const char *s2 = lmemfind(s + init - 1, ls - init + 1, p, lp); + if (s2) { + lua_pushinteger(L, s2 - s + 1); + lua_pushinteger(L, s2 - s + lp); + return 2; + } + } + else { + MatchState ms; + const char *s1 = s + init - 1; + int anchor = (*p == '^'); + if (anchor) { + p++; lp--; /* skip anchor character */ + } + ms.L = L; + ms.matchdepth = MAXCCALLS; + ms.src_init = s; + ms.src_end = s + ls; + ms.p_end = p + lp; + do { + const char *res; + ms.level = 0; + lua_assert(ms.matchdepth == MAXCCALLS); + if ((res=match(&ms, s1, p)) != NULL) { + if (find) { + lua_pushinteger(L, s1 - s + 1); /* start */ + lua_pushinteger(L, res - s); /* end */ + return push_captures(&ms, NULL, 0) + 2; + } + else + return push_captures(&ms, s1, res); + } + } while (s1++ < ms.src_end && !anchor); + } + lua_pushnil(L); /* not found */ + return 1; +} + + +static int str_find (lua_State *L) { + return str_find_aux(L, 1); +} + + +static int str_match (lua_State *L) { + return str_find_aux(L, 0); +} + + +static int gmatch_aux (lua_State *L) { + MatchState ms; + size_t ls, lp; + const char *s = lua_tolstring(L, lua_upvalueindex(1), &ls); + const char *p = lua_tolstring(L, lua_upvalueindex(2), &lp); + const char *src; + ms.L = L; + ms.matchdepth = MAXCCALLS; + ms.src_init = s; + ms.src_end = s+ls; + ms.p_end = p + lp; + for (src = s + (size_t)lua_tointeger(L, lua_upvalueindex(3)); + src <= ms.src_end; + src++) { + const char *e; + ms.level = 0; + lua_assert(ms.matchdepth == MAXCCALLS); + if ((e = match(&ms, src, p)) != NULL) { + lua_Integer newstart = e-s; + if (e == src) newstart++; /* empty match? go at least one position */ + lua_pushinteger(L, newstart); + lua_replace(L, lua_upvalueindex(3)); + return push_captures(&ms, src, e); + } + } + return 0; /* not found */ +} + + +static int gmatch (lua_State *L) { + luaL_checkstring(L, 1); + luaL_checkstring(L, 2); + lua_settop(L, 2); + lua_pushinteger(L, 0); + lua_pushcclosure(L, gmatch_aux, 3); + return 1; +} + + +static void add_s (MatchState *ms, luaL_Buffer *b, const char *s, + const char *e) { + size_t l, i; + const char *news = lua_tolstring(ms->L, 3, &l); + for (i = 0; i < l; i++) { + if (news[i] != L_ESC) + luaL_addchar(b, news[i]); + else { + i++; /* skip ESC */ + if (!isdigit(uchar(news[i]))) { + if (news[i] != L_ESC) + luaL_error(ms->L, "invalid use of " LUA_QL("%c") + " in replacement string", L_ESC); + luaL_addchar(b, news[i]); + } + else if (news[i] == '0') + luaL_addlstring(b, s, e - s); + else { + push_onecapture(ms, news[i] - '1', s, e); + luaL_addvalue(b); /* add capture to accumulated result */ + } + } + } +} + + +static void add_value (MatchState *ms, luaL_Buffer *b, const char *s, + const char *e, int tr) { + lua_State *L = ms->L; + switch (tr) { + case LUA_TFUNCTION: { + int n; + lua_pushvalue(L, 3); + n = push_captures(ms, s, e); + lua_call(L, n, 1); + break; + } + case LUA_TTABLE: { + push_onecapture(ms, 0, s, e); + lua_gettable(L, 3); + break; + } + default: { /* LUA_TNUMBER or LUA_TSTRING */ + add_s(ms, b, s, e); + return; + } + } + if (!lua_toboolean(L, -1)) { /* nil or false? */ + lua_pop(L, 1); + lua_pushlstring(L, s, e - s); /* keep original text */ + } + else if (!lua_isstring(L, -1)) + luaL_error(L, "invalid replacement value (a %s)", luaL_typename(L, -1)); + luaL_addvalue(b); /* add result to accumulator */ +} + + +static int str_gsub (lua_State *L) { + size_t srcl, lp; + const char *src = luaL_checklstring(L, 1, &srcl); + const char *p = luaL_checklstring(L, 2, &lp); + int tr = lua_type(L, 3); + size_t max_s = luaL_optinteger(L, 4, srcl+1); + int anchor = (*p == '^'); + size_t n = 0; + MatchState ms; + luaL_Buffer b; + luaL_argcheck(L, tr == LUA_TNUMBER || tr == LUA_TSTRING || + tr == LUA_TFUNCTION || tr == LUA_TTABLE, 3, + "string/function/table expected"); + luaL_buffinit(L, &b); + if (anchor) { + p++; lp--; /* skip anchor character */ + } + ms.L = L; + ms.matchdepth = MAXCCALLS; + ms.src_init = src; + ms.src_end = src+srcl; + ms.p_end = p + lp; + while (n < max_s) { + const char *e; + ms.level = 0; + lua_assert(ms.matchdepth == MAXCCALLS); + e = match(&ms, src, p); + if (e) { + n++; + add_value(&ms, &b, src, e, tr); + } + if (e && e>src) /* non empty match? */ + src = e; /* skip it */ + else if (src < ms.src_end) + luaL_addchar(&b, *src++); + else break; + if (anchor) break; + } + luaL_addlstring(&b, src, ms.src_end-src); + luaL_pushresult(&b); + lua_pushinteger(L, n); /* number of substitutions */ + return 2; +} + +/* }====================================================== */ + + + +/* +** {====================================================== +** STRING FORMAT +** ======================================================= +*/ + +/* +** LUA_INTFRMLEN is the length modifier for integer conversions in +** 'string.format'; LUA_INTFRM_T is the integer type corresponding to +** the previous length +*/ +#if !defined(LUA_INTFRMLEN) /* { */ +#if defined(LUA_USE_LONGLONG) + +#define LUA_INTFRMLEN "ll" +#define LUA_INTFRM_T long long + +#else + +#define LUA_INTFRMLEN "l" +#define LUA_INTFRM_T long + +#endif +#endif /* } */ + + +/* +** LUA_FLTFRMLEN is the length modifier for float conversions in +** 'string.format'; LUA_FLTFRM_T is the float type corresponding to +** the previous length +*/ +#if !defined(LUA_FLTFRMLEN) + +#define LUA_FLTFRMLEN "" +#define LUA_FLTFRM_T double + +#endif + + +/* maximum size of each formatted item (> len(format('%99.99f', -1e308))) */ +#define MAX_ITEM 512 +/* valid flags in a format specification */ +#define FLAGS "-+ #0" +/* +** maximum size of each format specification (such as '%-099.99d') +** (+10 accounts for %99.99x plus margin of error) +*/ +#define MAX_FORMAT (sizeof(FLAGS) + sizeof(LUA_INTFRMLEN) + 10) + + +static void addquoted (lua_State *L, luaL_Buffer *b, int arg) { + size_t l; + const char *s = luaL_checklstring(L, arg, &l); + luaL_addchar(b, '"'); + while (l--) { + if (*s == '"' || *s == '\\' || *s == '\n') { + luaL_addchar(b, '\\'); + luaL_addchar(b, *s); + } + else if (*s == '\0' || iscntrl(uchar(*s))) { + char buff[10]; + if (!isdigit(uchar(*(s+1)))) + sprintf(buff, "\\%d", (int)uchar(*s)); + else + sprintf(buff, "\\%03d", (int)uchar(*s)); + luaL_addstring(b, buff); + } + else + luaL_addchar(b, *s); + s++; + } + luaL_addchar(b, '"'); +} + +static const char *scanformat (lua_State *L, const char *strfrmt, char *form) { + const char *p = strfrmt; + while (*p != '\0' && strchr(FLAGS, *p) != NULL) p++; /* skip flags */ + if ((size_t)(p - strfrmt) >= sizeof(FLAGS)/sizeof(char)) + luaL_error(L, "invalid format (repeated flags)"); + if (isdigit(uchar(*p))) p++; /* skip width */ + if (isdigit(uchar(*p))) p++; /* (2 digits at most) */ + if (*p == '.') { + p++; + if (isdigit(uchar(*p))) p++; /* skip precision */ + if (isdigit(uchar(*p))) p++; /* (2 digits at most) */ + } + if (isdigit(uchar(*p))) + luaL_error(L, "invalid format (width or precision too long)"); + *(form++) = '%'; + memcpy(form, strfrmt, (p - strfrmt + 1) * sizeof(char)); + form += p - strfrmt + 1; + *form = '\0'; + return p; +} + + +/* +** add length modifier into formats +*/ +static void addlenmod (char *form, const char *lenmod) { + size_t l = strlen(form); + size_t lm = strlen(lenmod); + char spec = form[l - 1]; + strcpy(form + l - 1, lenmod); + form[l + lm - 1] = spec; + form[l + lm] = '\0'; +} + + +static int str_format (lua_State *L) { + int top = lua_gettop(L); + int arg = 1; + size_t sfl; + const char *strfrmt = luaL_checklstring(L, arg, &sfl); + const char *strfrmt_end = strfrmt+sfl; + luaL_Buffer b; + luaL_buffinit(L, &b); + while (strfrmt < strfrmt_end) { + if (*strfrmt != L_ESC) + luaL_addchar(&b, *strfrmt++); + else if (*++strfrmt == L_ESC) + luaL_addchar(&b, *strfrmt++); /* %% */ + else { /* format item */ + char form[MAX_FORMAT]; /* to store the format (`%...') */ + char *buff = luaL_prepbuffsize(&b, MAX_ITEM); /* to put formatted item */ + int nb = 0; /* number of bytes in added item */ + if (++arg > top) + luaL_argerror(L, arg, "no value"); + strfrmt = scanformat(L, strfrmt, form); + switch (*strfrmt++) { + case 'c': { + nb = sprintf(buff, form, luaL_checkint(L, arg)); + break; + } + case 'd': case 'i': { + lua_Number n = luaL_checknumber(L, arg); + LUA_INTFRM_T ni = (LUA_INTFRM_T)n; + lua_Number diff = n - (lua_Number)ni; + luaL_argcheck(L, -1 < diff && diff < 1, arg, + "not a number in proper range"); + addlenmod(form, LUA_INTFRMLEN); + nb = sprintf(buff, form, ni); + break; + } + case 'o': case 'u': case 'x': case 'X': { + lua_Number n = luaL_checknumber(L, arg); + unsigned LUA_INTFRM_T ni = (unsigned LUA_INTFRM_T)n; + lua_Number diff = n - (lua_Number)ni; + luaL_argcheck(L, -1 < diff && diff < 1, arg, + "not a non-negative number in proper range"); + addlenmod(form, LUA_INTFRMLEN); + nb = sprintf(buff, form, ni); + break; + } + case 'e': case 'E': case 'f': +#if defined(LUA_USE_AFORMAT) + case 'a': case 'A': +#endif + case 'g': case 'G': { + addlenmod(form, LUA_FLTFRMLEN); + nb = sprintf(buff, form, (LUA_FLTFRM_T)luaL_checknumber(L, arg)); + break; + } + case 'q': { + addquoted(L, &b, arg); + break; + } + case 's': { + size_t l; + const char *s = luaL_tolstring(L, arg, &l); + if (!strchr(form, '.') && l >= 100) { + /* no precision and string is too long to be formatted; + keep original string */ + luaL_addvalue(&b); + break; + } + else { + nb = sprintf(buff, form, s); + lua_pop(L, 1); /* remove result from 'luaL_tolstring' */ + break; + } + } + default: { /* also treat cases `pnLlh' */ + return luaL_error(L, "invalid option " LUA_QL("%%%c") " to " + LUA_QL("format"), *(strfrmt - 1)); + } + } + luaL_addsize(&b, nb); + } + } + luaL_pushresult(&b); + return 1; +} + +/* }====================================================== */ + + +static const luaL_Reg strlib[] = { + {"byte", str_byte}, + {"char", str_char}, + {"dump", str_dump}, + {"find", str_find}, + {"format", str_format}, + {"gmatch", gmatch}, + {"gsub", str_gsub}, + {"len", str_len}, + {"lower", str_lower}, + {"match", str_match}, + {"rep", str_rep}, + {"reverse", str_reverse}, + {"sub", str_sub}, + {"upper", str_upper}, + {NULL, NULL} +}; + + +static void createmetatable (lua_State *L) { + lua_createtable(L, 0, 1); /* table to be metatable for strings */ + lua_pushliteral(L, ""); /* dummy string */ + lua_pushvalue(L, -2); /* copy table */ + lua_setmetatable(L, -2); /* set table as metatable for strings */ + lua_pop(L, 1); /* pop dummy string */ + lua_pushvalue(L, -2); /* get string library */ + lua_setfield(L, -2, "__index"); /* metatable.__index = string */ + lua_pop(L, 1); /* pop metatable */ +} + + +/* +** Open string library +*/ +LUAMOD_API int luaopen_string (lua_State *L) { + luaL_newlib(L, strlib); + createmetatable(L); + return 1; +} + diff --git a/radio/src/lua/src/ltable.c b/radio/src/lua/src/ltable.c new file mode 100644 index 000000000..305149d6b --- /dev/null +++ b/radio/src/lua/src/ltable.c @@ -0,0 +1,589 @@ +/* +** $Id: ltable.c,v 2.72 2012/09/11 19:37:16 roberto Exp $ +** Lua tables (hash) +** See Copyright Notice in lua.h +*/ + + +/* +** Implementation of tables (aka arrays, objects, or hash tables). +** Tables keep its elements in two parts: an array part and a hash part. +** Non-negative integer keys are all candidates to be kept in the array +** part. The actual size of the array is the largest `n' such that at +** least half the slots between 0 and n are in use. +** Hash uses a mix of chained scatter table with Brent's variation. +** A main invariant of these tables is that, if an element is not +** in its main position (i.e. the `original' position that its hash gives +** to it), then the colliding element is in its own main position. +** Hence even when the load factor reaches 100%, performance remains good. +*/ + +#include + +#define ltable_c +#define LUA_CORE + +#include "lua.h" + +#include "ldebug.h" +#include "ldo.h" +#include "lgc.h" +#include "lmem.h" +#include "lobject.h" +#include "lstate.h" +#include "lstring.h" +#include "ltable.h" +#include "lvm.h" + + +/* +** max size of array part is 2^MAXBITS +*/ +#if LUAI_BITSINT >= 32 +#define MAXBITS 30 +#else +#define MAXBITS (LUAI_BITSINT-2) +#endif + +#define MAXASIZE (1 << MAXBITS) + + +#define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t)))) + +#define hashstr(t,str) hashpow2(t, (str)->tsv.hash) +#define hashboolean(t,p) hashpow2(t, p) + + +/* +** for some types, it is better to avoid modulus by power of 2, as +** they tend to have many 2 factors. +*/ +#define hashmod(t,n) (gnode(t, ((n) % ((sizenode(t)-1)|1)))) + + +#define hashpointer(t,p) hashmod(t, IntPoint(p)) + + +#define dummynode (&dummynode_) + +#define isdummy(n) ((n) == dummynode) + +static const Node dummynode_ = { + {NILCONSTANT}, /* value */ + {{NILCONSTANT, NULL}} /* key */ +}; + + +/* +** hash for lua_Numbers +*/ +static Node *hashnum (const Table *t, lua_Number n) { + int i; + luai_hashnum(i, n); + if (i < 0) { + if (cast(unsigned int, i) == 0u - i) /* use unsigned to avoid overflows */ + i = 0; /* handle INT_MIN */ + i = -i; /* must be a positive value */ + } + return hashmod(t, i); +} + + + +/* +** returns the `main' position of an element in a table (that is, the index +** of its hash value) +*/ +static Node *mainposition (const Table *t, const TValue *key) { + switch (ttype(key)) { + case LUA_TNUMBER: + return hashnum(t, nvalue(key)); + case LUA_TLNGSTR: { + TString *s = rawtsvalue(key); + if (s->tsv.extra == 0) { /* no hash? */ + s->tsv.hash = luaS_hash(getstr(s), s->tsv.len, s->tsv.hash); + s->tsv.extra = 1; /* now it has its hash */ + } + return hashstr(t, rawtsvalue(key)); + } + case LUA_TSHRSTR: + return hashstr(t, rawtsvalue(key)); + case LUA_TBOOLEAN: + return hashboolean(t, bvalue(key)); + case LUA_TLIGHTUSERDATA: + return hashpointer(t, pvalue(key)); + case LUA_TLCF: + return hashpointer(t, fvalue(key)); + default: + return hashpointer(t, gcvalue(key)); + } +} + + +/* +** returns the index for `key' if `key' is an appropriate key to live in +** the array part of the table, -1 otherwise. +*/ +static int arrayindex (const TValue *key) { + if (ttisnumber(key)) { + lua_Number n = nvalue(key); + int k; + lua_number2int(k, n); + if (luai_numeq(cast_num(k), n)) + return k; + } + return -1; /* `key' did not match some condition */ +} + + +/* +** returns the index of a `key' for table traversals. First goes all +** elements in the array part, then elements in the hash part. The +** beginning of a traversal is signaled by -1. +*/ +static int findindex (lua_State *L, Table *t, StkId key) { + int i; + if (ttisnil(key)) return -1; /* first iteration */ + i = arrayindex(key); + if (0 < i && i <= t->sizearray) /* is `key' inside array part? */ + return i-1; /* yes; that's the index (corrected to C) */ + else { + Node *n = mainposition(t, key); + for (;;) { /* check whether `key' is somewhere in the chain */ + /* key may be dead already, but it is ok to use it in `next' */ + if (luaV_rawequalobj(gkey(n), key) || + (ttisdeadkey(gkey(n)) && iscollectable(key) && + deadvalue(gkey(n)) == gcvalue(key))) { + i = cast_int(n - gnode(t, 0)); /* key index in hash table */ + /* hash elements are numbered after array ones */ + return i + t->sizearray; + } + else n = gnext(n); + if (n == NULL) + luaG_runerror(L, "invalid key to " LUA_QL("next")); /* key not found */ + } + } +} + + +int luaH_next (lua_State *L, Table *t, StkId key) { + int i = findindex(L, t, key); /* find original element */ + for (i++; i < t->sizearray; i++) { /* try first array part */ + if (!ttisnil(&t->array[i])) { /* a non-nil value? */ + setnvalue(key, cast_num(i+1)); + setobj2s(L, key+1, &t->array[i]); + return 1; + } + } + for (i -= t->sizearray; i < sizenode(t); i++) { /* then hash part */ + if (!ttisnil(gval(gnode(t, i)))) { /* a non-nil value? */ + setobj2s(L, key, gkey(gnode(t, i))); + setobj2s(L, key+1, gval(gnode(t, i))); + return 1; + } + } + return 0; /* no more elements */ +} + + +/* +** {============================================================= +** Rehash +** ============================================================== +*/ + + +static int computesizes (int nums[], int *narray) { + int i; + int twotoi; /* 2^i */ + int a = 0; /* number of elements smaller than 2^i */ + int na = 0; /* number of elements to go to array part */ + int n = 0; /* optimal size for array part */ + for (i = 0, twotoi = 1; twotoi/2 < *narray; i++, twotoi *= 2) { + if (nums[i] > 0) { + a += nums[i]; + if (a > twotoi/2) { /* more than half elements present? */ + n = twotoi; /* optimal size (till now) */ + na = a; /* all elements smaller than n will go to array part */ + } + } + if (a == *narray) break; /* all elements already counted */ + } + if (n - *narray > 1024) + *narray += 1024; + else + *narray = n; + lua_assert(*narray/2 <= na && na <= *narray); + return na; +} + + +static int countint (const TValue *key, int *nums) { + int k = arrayindex(key); + if (0 < k && k <= MAXASIZE) { /* is `key' an appropriate array index? */ + nums[luaO_ceillog2(k)]++; /* count as such */ + return 1; + } + else + return 0; +} + + +static int numusearray (const Table *t, int *nums) { + int lg; + int ttlg; /* 2^lg */ + int ause = 0; /* summation of `nums' */ + int i = 1; /* count to traverse all array keys */ + for (lg=0, ttlg=1; lg<=MAXBITS; lg++, ttlg*=2) { /* for each slice */ + int lc = 0; /* counter */ + int lim = ttlg; + if (lim > t->sizearray) { + lim = t->sizearray; /* adjust upper limit */ + if (i > lim) + break; /* no more elements to count */ + } + /* count elements in range (2^(lg-1), 2^lg] */ + for (; i <= lim; i++) { + if (!ttisnil(&t->array[i-1])) + lc++; + } + nums[lg] += lc; + ause += lc; + } + return ause; +} + + +static int numusehash (const Table *t, int *nums, int *pnasize) { + int totaluse = 0; /* total number of elements */ + int ause = 0; /* summation of `nums' */ + int i = sizenode(t); + while (i--) { + Node *n = &t->node[i]; + if (!ttisnil(gval(n))) { + ause += countint(gkey(n), nums); + totaluse++; + } + } + *pnasize += ause; + return totaluse; +} + + +static void setarrayvector (lua_State *L, Table *t, int size) { + int i; + luaM_reallocvector(L, t->array, t->sizearray, size, TValue); + for (i=t->sizearray; iarray[i]); + t->sizearray = size; +} + +static void setnodevector (lua_State *L, Table *t, int size) { + int lsize; + if (size == 0) { /* no elements to hash part? */ + t->node = cast(Node *, dummynode); /* use common `dummynode' */ + lsize = 0; + } + else { + int i; + lsize = luaO_ceillog2(size); + if (lsize > MAXBITS) + luaG_runerror(L, "table overflow"); + size = twoto(lsize); + t->node = luaM_newvector(L, size, Node); + for (i=0; ilsizenode = cast_byte(lsize); + t->lastfree = gnode(t, size); /* all positions are free */ +} + +void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize) { + int i; + int oldasize = t->sizearray; + int oldhsize = t->lsizenode; + Node *nold = t->node; /* save old hash ... */ + if (nasize > oldasize) /* array part must grow? */ + setarrayvector(L, t, nasize); + /* create new hash part with appropriate size */ + setnodevector(L, t, nhsize); + if (nasize < oldasize) { /* array part must shrink? */ + t->sizearray = nasize; + /* re-insert elements from vanishing slice */ + for (i=nasize; iarray[i])) + luaH_setint(L, t, i + 1, &t->array[i]); + } + /* shrink array */ + luaM_reallocvector(L, t->array, oldasize, nasize, TValue); + } + /* re-insert elements from hash part */ + for (i = twoto(oldhsize) - 1; i >= 0; i--) { + Node *old = nold+i; + if (!ttisnil(gval(old))) { + /* doesn't need barrier/invalidate cache, as entry was + already present in the table */ + setobjt2t(L, luaH_set(L, t, gkey(old)), gval(old)); + } + } + if (!isdummy(nold)) + luaM_freearray(L, nold, cast(size_t, twoto(oldhsize))); /* free old array */ +} + + +void luaH_resizearray (lua_State *L, Table *t, int nasize) { + int nsize = isdummy(t->node) ? 0 : sizenode(t); + luaH_resize(L, t, nasize, nsize); +} + + +static void rehash (lua_State *L, Table *t, const TValue *ek) { + int nasize, na; + int nums[MAXBITS+1]; /* nums[i] = number of keys with 2^(i-1) < k <= 2^i */ + int i; + int totaluse; + for (i=0; i<=MAXBITS; i++) nums[i] = 0; /* reset counts */ + nasize = numusearray(t, nums); /* count keys in array part */ + totaluse = nasize; /* all those keys are integer keys */ + totaluse += numusehash(t, nums, &nasize); /* count keys in hash part */ + /* count extra key */ + nasize += countint(ek, nums); + totaluse++; + /* compute new size for array part */ + na = computesizes(nums, &nasize); + /* resize the table to new computed sizes */ + luaH_resize(L, t, nasize, totaluse - na); +} + + + +/* +** }============================================================= +*/ + + +Table *luaH_new (lua_State *L) { + Table *t = &luaC_newobj(L, LUA_TTABLE, sizeof(Table), NULL, 0)->h; + t->metatable = NULL; + t->flags = cast_byte(~0); + t->array = NULL; + t->sizearray = 0; + setnodevector(L, t, 0); + return t; +} + + +void luaH_free (lua_State *L, Table *t) { + if (!isdummy(t->node)) + luaM_freearray(L, t->node, cast(size_t, sizenode(t))); + luaM_freearray(L, t->array, t->sizearray); + luaM_free(L, t); +} + + +static Node *getfreepos (Table *t) { + while (t->lastfree > t->node) { + t->lastfree--; + if (ttisnil(gkey(t->lastfree))) + return t->lastfree; + } + return NULL; /* could not find a free place */ +} + + + +/* +** inserts a new key into a hash table; first, check whether key's main +** position is free. If not, check whether colliding node is in its main +** position or not: if it is not, move colliding node to an empty place and +** put new key in its main position; otherwise (colliding node is in its main +** position), new key goes to an empty position. +*/ +TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key) { + Node *mp; + if (ttisnil(key)) luaG_runerror(L, "table index is nil"); + else if (ttisnumber(key) && luai_numisnan(L, nvalue(key))) + luaG_runerror(L, "table index is NaN"); + mp = mainposition(t, key); + if (!ttisnil(gval(mp)) || isdummy(mp)) { /* main position is taken? */ + Node *othern; + Node *n = getfreepos(t); /* get a free place */ + if (n == NULL) { /* cannot find a free place? */ + rehash(L, t, key); /* grow table */ + /* whatever called 'newkey' take care of TM cache and GC barrier */ + return luaH_set(L, t, key); /* insert key into grown table */ + } + lua_assert(!isdummy(n)); + othern = mainposition(t, gkey(mp)); + if (othern != mp) { /* is colliding node out of its main position? */ + /* yes; move colliding node into free position */ + while (gnext(othern) != mp) othern = gnext(othern); /* find previous */ + gnext(othern) = n; /* redo the chain with `n' in place of `mp' */ + *n = *mp; /* copy colliding node into free pos. (mp->next also goes) */ + gnext(mp) = NULL; /* now `mp' is free */ + setnilvalue(gval(mp)); + } + else { /* colliding node is in its own main position */ + /* new node will go into free position */ + gnext(n) = gnext(mp); /* chain new position */ + gnext(mp) = n; + mp = n; + } + } + setobj2t(L, gkey(mp), key); + luaC_barrierback(L, obj2gco(t), key); + lua_assert(ttisnil(gval(mp))); + return gval(mp); +} + + +/* +** search function for integers +*/ +const TValue *luaH_getint (Table *t, int key) { + /* (1 <= key && key <= t->sizearray) */ + if (cast(unsigned int, key-1) < cast(unsigned int, t->sizearray)) + return &t->array[key-1]; + else { + lua_Number nk = cast_num(key); + Node *n = hashnum(t, nk); + do { /* check whether `key' is somewhere in the chain */ + if (ttisnumber(gkey(n)) && luai_numeq(nvalue(gkey(n)), nk)) + return gval(n); /* that's it */ + else n = gnext(n); + } while (n); + return luaO_nilobject; + } +} + + +/* +** search function for short strings +*/ +const TValue *luaH_getstr (Table *t, TString *key) { + Node *n = hashstr(t, key); + lua_assert(key->tsv.tt == LUA_TSHRSTR); + do { /* check whether `key' is somewhere in the chain */ + if (ttisshrstring(gkey(n)) && eqshrstr(rawtsvalue(gkey(n)), key)) + return gval(n); /* that's it */ + else n = gnext(n); + } while (n); + return luaO_nilobject; +} + + +/* +** main search function +*/ +const TValue *luaH_get (Table *t, const TValue *key) { + switch (ttype(key)) { + case LUA_TSHRSTR: return luaH_getstr(t, rawtsvalue(key)); + case LUA_TNIL: return luaO_nilobject; + case LUA_TNUMBER: { + int k; + lua_Number n = nvalue(key); + lua_number2int(k, n); + if (luai_numeq(cast_num(k), n)) /* index is int? */ + return luaH_getint(t, k); /* use specialized version */ + /* else go through */ + } + default: { + Node *n = mainposition(t, key); + do { /* check whether `key' is somewhere in the chain */ + if (luaV_rawequalobj(gkey(n), key)) + return gval(n); /* that's it */ + else n = gnext(n); + } while (n); + return luaO_nilobject; + } + } +} + + +/* +** beware: when using this function you probably need to check a GC +** barrier and invalidate the TM cache. +*/ +TValue *luaH_set (lua_State *L, Table *t, const TValue *key) { + const TValue *p = luaH_get(t, key); + if (p != luaO_nilobject) + return cast(TValue *, p); + else return luaH_newkey(L, t, key); +} + + +void luaH_setint (lua_State *L, Table *t, int key, TValue *value) { + const TValue *p = luaH_getint(t, key); + TValue *cell; + if (p != luaO_nilobject) + cell = cast(TValue *, p); + else { + TValue k; + setnvalue(&k, cast_num(key)); + cell = luaH_newkey(L, t, &k); + } + setobj2t(L, cell, value); +} + + +static int unbound_search (Table *t, unsigned int j) { + unsigned int i = j; /* i is zero or a present index */ + j++; + /* find `i' and `j' such that i is present and j is not */ + while (!ttisnil(luaH_getint(t, j))) { + i = j; + j *= 2; + if (j > cast(unsigned int, MAX_INT)) { /* overflow? */ + /* table was built with bad purposes: resort to linear search */ + i = 1; + while (!ttisnil(luaH_getint(t, i))) i++; + return i - 1; + } + } + /* now do a binary search between them */ + while (j - i > 1) { + unsigned int m = (i+j)/2; + if (ttisnil(luaH_getint(t, m))) j = m; + else i = m; + } + return i; +} + + +/* +** Try to find a boundary in table `t'. A `boundary' is an integer index +** such that t[i] is non-nil and t[i+1] is nil (and 0 if t[1] is nil). +*/ +int luaH_getn (Table *t) { + unsigned int j = t->sizearray; + if (j > 0 && ttisnil(&t->array[j - 1])) { + /* there is a boundary in the array part: (binary) search for it */ + unsigned int i = 0; + while (j - i > 1) { + unsigned int m = (i+j)/2; + if (ttisnil(&t->array[m - 1])) j = m; + else i = m; + } + return i; + } + /* else must find a boundary in hash part */ + else if (isdummy(t->node)) /* hash part is empty? */ + return j; /* that is easy... */ + else return unbound_search(t, j); +} + + + +#if defined(LUA_DEBUG) + +Node *luaH_mainposition (const Table *t, const TValue *key) { + return mainposition(t, key); +} + +int luaH_isdummy (Node *n) { return isdummy(n); } + +#endif diff --git a/radio/src/lua/src/ltable.h b/radio/src/lua/src/ltable.h new file mode 100644 index 000000000..2f6f5c2dc --- /dev/null +++ b/radio/src/lua/src/ltable.h @@ -0,0 +1,41 @@ +/* +** $Id: ltable.h,v 2.16 2011/08/17 20:26:47 roberto Exp $ +** Lua tables (hash) +** See Copyright Notice in lua.h +*/ + +#ifndef ltable_h +#define ltable_h + +#include "lobject.h" + + +#define gnode(t,i) (&(t)->node[i]) +#define gkey(n) (&(n)->i_key.tvk) +#define gval(n) (&(n)->i_val) +#define gnext(n) ((n)->i_key.nk.next) + +#define invalidateTMcache(t) ((t)->flags = 0) + + +LUAI_FUNC const TValue *luaH_getint (Table *t, int key); +LUAI_FUNC void luaH_setint (lua_State *L, Table *t, int key, TValue *value); +LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); +LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); +LUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key); +LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); +LUAI_FUNC Table *luaH_new (lua_State *L); +LUAI_FUNC void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize); +LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize); +LUAI_FUNC void luaH_free (lua_State *L, Table *t); +LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); +LUAI_FUNC int luaH_getn (Table *t); + + +#if defined(LUA_DEBUG) +LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key); +LUAI_FUNC int luaH_isdummy (Node *n); +#endif + + +#endif diff --git a/radio/src/lua/src/ltablib.c b/radio/src/lua/src/ltablib.c new file mode 100644 index 000000000..c61903b08 --- /dev/null +++ b/radio/src/lua/src/ltablib.c @@ -0,0 +1,282 @@ +/* +** $Id: ltablib.c,v 1.65 2013/03/07 18:17:24 roberto Exp $ +** Library for Table Manipulation +** See Copyright Notice in lua.h +*/ + + +#include + +#define ltablib_c + +#include "lua.h" + +#include "lauxlib.h" +#include "lualib.h" + + +#define aux_getn(L,n) (luaL_checktype(L, n, LUA_TTABLE), luaL_len(L, n)) + + + +#if defined(LUA_COMPAT_MAXN) +static int maxn (lua_State *L) { + lua_Number max = 0; + luaL_checktype(L, 1, LUA_TTABLE); + lua_pushnil(L); /* first key */ + while (lua_next(L, 1)) { + lua_pop(L, 1); /* remove value */ + if (lua_type(L, -1) == LUA_TNUMBER) { + lua_Number v = lua_tonumber(L, -1); + if (v > max) max = v; + } + } + lua_pushnumber(L, max); + return 1; +} +#endif + + +static int tinsert (lua_State *L) { + int e = aux_getn(L, 1) + 1; /* first empty element */ + int pos; /* where to insert new element */ + switch (lua_gettop(L)) { + case 2: { /* called with only 2 arguments */ + pos = e; /* insert new element at the end */ + break; + } + case 3: { + int i; + pos = luaL_checkint(L, 2); /* 2nd argument is the position */ + luaL_argcheck(L, 1 <= pos && pos <= e, 2, "position out of bounds"); + for (i = e; i > pos; i--) { /* move up elements */ + lua_rawgeti(L, 1, i-1); + lua_rawseti(L, 1, i); /* t[i] = t[i-1] */ + } + break; + } + default: { + return luaL_error(L, "wrong number of arguments to " LUA_QL("insert")); + } + } + lua_rawseti(L, 1, pos); /* t[pos] = v */ + return 0; +} + + +static int tremove (lua_State *L) { + int size = aux_getn(L, 1); + int pos = luaL_optint(L, 2, size); + if (pos != size) /* validate 'pos' if given */ + luaL_argcheck(L, 1 <= pos && pos <= size + 1, 1, "position out of bounds"); + lua_rawgeti(L, 1, pos); /* result = t[pos] */ + for ( ; pos < size; pos++) { + lua_rawgeti(L, 1, pos+1); + lua_rawseti(L, 1, pos); /* t[pos] = t[pos+1] */ + } + lua_pushnil(L); + lua_rawseti(L, 1, pos); /* t[pos] = nil */ + return 1; +} + + +static void addfield (lua_State *L, luaL_Buffer *b, int i) { + lua_rawgeti(L, 1, i); + if (!lua_isstring(L, -1)) + luaL_error(L, "invalid value (%s) at index %d in table for " + LUA_QL("concat"), luaL_typename(L, -1), i); + luaL_addvalue(b); +} + + +static int tconcat (lua_State *L) { + luaL_Buffer b; + size_t lsep; + int i, last; + const char *sep = luaL_optlstring(L, 2, "", &lsep); + luaL_checktype(L, 1, LUA_TTABLE); + i = luaL_optint(L, 3, 1); + last = luaL_opt(L, luaL_checkint, 4, luaL_len(L, 1)); + luaL_buffinit(L, &b); + for (; i < last; i++) { + addfield(L, &b, i); + luaL_addlstring(&b, sep, lsep); + } + if (i == last) /* add last value (if interval was not empty) */ + addfield(L, &b, i); + luaL_pushresult(&b); + return 1; +} + + +/* +** {====================================================== +** Pack/unpack +** ======================================================= +*/ + +static int pack (lua_State *L) { + int n = lua_gettop(L); /* number of elements to pack */ + lua_createtable(L, n, 1); /* create result table */ + lua_pushinteger(L, n); + lua_setfield(L, -2, "n"); /* t.n = number of elements */ + if (n > 0) { /* at least one element? */ + int i; + lua_pushvalue(L, 1); + lua_rawseti(L, -2, 1); /* insert first element */ + lua_replace(L, 1); /* move table into index 1 */ + for (i = n; i >= 2; i--) /* assign other elements */ + lua_rawseti(L, 1, i); + } + return 1; /* return table */ +} + + +static int unpack (lua_State *L) { + int i, e, n; + luaL_checktype(L, 1, LUA_TTABLE); + i = luaL_optint(L, 2, 1); + e = luaL_opt(L, luaL_checkint, 3, luaL_len(L, 1)); + if (i > e) return 0; /* empty range */ + n = e - i + 1; /* number of elements */ + if (n <= 0 || !lua_checkstack(L, n)) /* n <= 0 means arith. overflow */ + return luaL_error(L, "too many results to unpack"); + lua_rawgeti(L, 1, i); /* push arg[i] (avoiding overflow problems) */ + while (i++ < e) /* push arg[i + 1...e] */ + lua_rawgeti(L, 1, i); + return n; +} + +/* }====================================================== */ + + + +/* +** {====================================================== +** Quicksort +** (based on `Algorithms in MODULA-3', Robert Sedgewick; +** Addison-Wesley, 1993.) +** ======================================================= +*/ + + +static void set2 (lua_State *L, int i, int j) { + lua_rawseti(L, 1, i); + lua_rawseti(L, 1, j); +} + +static int sort_comp (lua_State *L, int a, int b) { + if (!lua_isnil(L, 2)) { /* function? */ + int res; + lua_pushvalue(L, 2); + lua_pushvalue(L, a-1); /* -1 to compensate function */ + lua_pushvalue(L, b-2); /* -2 to compensate function and `a' */ + lua_call(L, 2, 1); + res = lua_toboolean(L, -1); + lua_pop(L, 1); + return res; + } + else /* a < b? */ + return lua_compare(L, a, b, LUA_OPLT); +} + +static void auxsort (lua_State *L, int l, int u) { + while (l < u) { /* for tail recursion */ + int i, j; + /* sort elements a[l], a[(l+u)/2] and a[u] */ + lua_rawgeti(L, 1, l); + lua_rawgeti(L, 1, u); + if (sort_comp(L, -1, -2)) /* a[u] < a[l]? */ + set2(L, l, u); /* swap a[l] - a[u] */ + else + lua_pop(L, 2); + if (u-l == 1) break; /* only 2 elements */ + i = (l+u)/2; + lua_rawgeti(L, 1, i); + lua_rawgeti(L, 1, l); + if (sort_comp(L, -2, -1)) /* a[i]= P */ + while (lua_rawgeti(L, 1, ++i), sort_comp(L, -1, -2)) { + if (i>=u) luaL_error(L, "invalid order function for sorting"); + lua_pop(L, 1); /* remove a[i] */ + } + /* repeat --j until a[j] <= P */ + while (lua_rawgeti(L, 1, --j), sort_comp(L, -3, -1)) { + if (j<=l) luaL_error(L, "invalid order function for sorting"); + lua_pop(L, 1); /* remove a[j] */ + } + if (j + +#define ltm_c +#define LUA_CORE + +#include "lua.h" + +#include "lobject.h" +#include "lstate.h" +#include "lstring.h" +#include "ltable.h" +#include "ltm.h" + + +static const char udatatypename[] = "userdata"; + +LUAI_DDEF const char *const luaT_typenames_[LUA_TOTALTAGS] = { + "no value", + "nil", "boolean", udatatypename, "number", + "string", "table", "function", udatatypename, "thread", + "proto", "upval" /* these last two cases are used for tests only */ +}; + + +void luaT_init (lua_State *L) { + static const char *const luaT_eventname[] = { /* ORDER TM */ + "__index", "__newindex", + "__gc", "__mode", "__len", "__eq", + "__add", "__sub", "__mul", "__div", "__mod", + "__pow", "__unm", "__lt", "__le", + "__concat", "__call" + }; + int i; + for (i=0; itmname[i] = luaS_new(L, luaT_eventname[i]); + luaS_fix(G(L)->tmname[i]); /* never collect these names */ + } +} + + +/* +** function to be used with macro "fasttm": optimized for absence of +** tag methods +*/ +const TValue *luaT_gettm (Table *events, TMS event, TString *ename) { + const TValue *tm = luaH_getstr(events, ename); + lua_assert(event <= TM_EQ); + if (ttisnil(tm)) { /* no tag method? */ + events->flags |= cast_byte(1u<metatable; + break; + case LUA_TUSERDATA: + mt = uvalue(o)->metatable; + break; + default: + mt = G(L)->mt[ttypenv(o)]; + } + return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : luaO_nilobject); +} + diff --git a/radio/src/lua/src/ltm.h b/radio/src/lua/src/ltm.h new file mode 100644 index 000000000..89bdc19a1 --- /dev/null +++ b/radio/src/lua/src/ltm.h @@ -0,0 +1,57 @@ +/* +** $Id: ltm.h,v 2.11 2011/02/28 17:32:10 roberto Exp $ +** Tag methods +** See Copyright Notice in lua.h +*/ + +#ifndef ltm_h +#define ltm_h + + +#include "lobject.h" + + +/* +* WARNING: if you change the order of this enumeration, +* grep "ORDER TM" +*/ +typedef enum { + TM_INDEX, + TM_NEWINDEX, + TM_GC, + TM_MODE, + TM_LEN, + TM_EQ, /* last tag method with `fast' access */ + TM_ADD, + TM_SUB, + TM_MUL, + TM_DIV, + TM_MOD, + TM_POW, + TM_UNM, + TM_LT, + TM_LE, + TM_CONCAT, + TM_CALL, + TM_N /* number of elements in the enum */ +} TMS; + + + +#define gfasttm(g,et,e) ((et) == NULL ? NULL : \ + ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) + +#define fasttm(l,et,e) gfasttm(G(l), et, e) + +#define ttypename(x) luaT_typenames_[(x) + 1] +#define objtypename(x) ttypename(ttypenv(x)) + +LUAI_DDEC const char *const luaT_typenames_[LUA_TOTALTAGS]; + + +LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); +LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, + TMS event); +LUAI_FUNC void luaT_init (lua_State *L); + +#endif diff --git a/radio/src/lua/src/lua.c b/radio/src/lua/src/lua.c new file mode 100644 index 000000000..c2c1e547d --- /dev/null +++ b/radio/src/lua/src/lua.c @@ -0,0 +1,496 @@ +/* +** $Id: lua.c,v 1.206 2012/09/29 20:07:06 roberto Exp $ +** Lua stand-alone interpreter +** See Copyright Notice in lua.h +*/ + + +#include +#include +#include + +#define lua_c + +#include "lua.h" + +#include "lauxlib.h" +#include "lualib.h" + + +#if !defined(LUA_PROMPT) +#define LUA_PROMPT "> " +#define LUA_PROMPT2 ">> " +#endif + +#if !defined(LUA_PROGNAME) +#define LUA_PROGNAME "lua" +#endif + +#if !defined(LUA_MAXINPUT) +#define LUA_MAXINPUT 512 +#endif + +#if !defined(LUA_INIT) +#define LUA_INIT "LUA_INIT" +#endif + +#define LUA_INITVERSION \ + LUA_INIT "_" LUA_VERSION_MAJOR "_" LUA_VERSION_MINOR + + +/* +** lua_stdin_is_tty detects whether the standard input is a 'tty' (that +** is, whether we're running lua interactively). +*/ +#if defined(LUA_USE_ISATTY) +#include +#define lua_stdin_is_tty() isatty(0) +#elif defined(LUA_WIN) +#include +#include +#define lua_stdin_is_tty() _isatty(_fileno(stdin)) +#else +#define lua_stdin_is_tty() 1 /* assume stdin is a tty */ +#endif + + +/* +** lua_readline defines how to show a prompt and then read a line from +** the standard input. +** lua_saveline defines how to "save" a read line in a "history". +** lua_freeline defines how to free a line read by lua_readline. +*/ +#if defined(LUA_USE_READLINE) + +#include +#include +#include +#define lua_readline(L,b,p) ((void)L, ((b)=readline(p)) != NULL) +#define lua_saveline(L,idx) \ + if (lua_rawlen(L,idx) > 0) /* non-empty line? */ \ + add_history(lua_tostring(L, idx)); /* add it to history */ +#define lua_freeline(L,b) ((void)L, free(b)) + +#elif !defined(lua_readline) + +#define lua_readline(L,b,p) \ + ((void)L, fputs(p, stdout), fflush(stdout), /* show prompt */ \ + fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */ +#define lua_saveline(L,idx) { (void)L; (void)idx; } +#define lua_freeline(L,b) { (void)L; (void)b; } + +#endif + + + + +static lua_State *globalL = NULL; + +static const char *progname = LUA_PROGNAME; + + + +static void lstop (lua_State *L, lua_Debug *ar) { + (void)ar; /* unused arg. */ + lua_sethook(L, NULL, 0, 0); + luaL_error(L, "interrupted!"); +} + + +static void laction (int i) { + signal(i, SIG_DFL); /* if another SIGINT happens before lstop, + terminate process (default action) */ + lua_sethook(globalL, lstop, LUA_MASKCALL | LUA_MASKRET | LUA_MASKCOUNT, 1); +} + + +static void print_usage (const char *badoption) { + luai_writestringerror("%s: ", progname); + if (badoption[1] == 'e' || badoption[1] == 'l') + luai_writestringerror("'%s' needs argument\n", badoption); + else + luai_writestringerror("unrecognized option '%s'\n", badoption); + luai_writestringerror( + "usage: %s [options] [script [args]]\n" + "Available options are:\n" + " -e stat execute string " LUA_QL("stat") "\n" + " -i enter interactive mode after executing " LUA_QL("script") "\n" + " -l name require library " LUA_QL("name") "\n" + " -v show version information\n" + " -E ignore environment variables\n" + " -- stop handling options\n" + " - stop handling options and execute stdin\n" + , + progname); +} + + +static void l_message (const char *pname, const char *msg) { + if (pname) luai_writestringerror("%s: ", pname); + luai_writestringerror("%s\n", msg); +} + + +static int report (lua_State *L, int status) { + if (status != LUA_OK && !lua_isnil(L, -1)) { + const char *msg = lua_tostring(L, -1); + if (msg == NULL) msg = "(error object is not a string)"; + l_message(progname, msg); + lua_pop(L, 1); + /* force a complete garbage collection in case of errors */ + lua_gc(L, LUA_GCCOLLECT, 0); + } + return status; +} + + +/* the next function is called unprotected, so it must avoid errors */ +static void finalreport (lua_State *L, int status) { + if (status != LUA_OK) { + const char *msg = (lua_type(L, -1) == LUA_TSTRING) ? lua_tostring(L, -1) + : NULL; + if (msg == NULL) msg = "(error object is not a string)"; + l_message(progname, msg); + lua_pop(L, 1); + } +} + + +static int traceback (lua_State *L) { + const char *msg = lua_tostring(L, 1); + if (msg) + luaL_traceback(L, L, msg, 1); + else if (!lua_isnoneornil(L, 1)) { /* is there an error object? */ + if (!luaL_callmeta(L, 1, "__tostring")) /* try its 'tostring' metamethod */ + lua_pushliteral(L, "(no error message)"); + } + return 1; +} + + +static int docall (lua_State *L, int narg, int nres) { + int status; + int base = lua_gettop(L) - narg; /* function index */ + lua_pushcfunction(L, traceback); /* push traceback function */ + lua_insert(L, base); /* put it under chunk and args */ + globalL = L; /* to be available to 'laction' */ + signal(SIGINT, laction); + status = lua_pcall(L, narg, nres, base); + signal(SIGINT, SIG_DFL); + lua_remove(L, base); /* remove traceback function */ + return status; +} + + +static void print_version (void) { + luai_writestring(LUA_COPYRIGHT, strlen(LUA_COPYRIGHT)); + luai_writeline(); +} + + +static int getargs (lua_State *L, char **argv, int n) { + int narg; + int i; + int argc = 0; + while (argv[argc]) argc++; /* count total number of arguments */ + narg = argc - (n + 1); /* number of arguments to the script */ + luaL_checkstack(L, narg + 3, "too many arguments to script"); + for (i=n+1; i < argc; i++) + lua_pushstring(L, argv[i]); + lua_createtable(L, narg, n + 1); + for (i=0; i < argc; i++) { + lua_pushstring(L, argv[i]); + lua_rawseti(L, -2, i - n); + } + return narg; +} + + +static int dofile (lua_State *L, const char *name) { + int status = luaL_loadfile(L, name); + if (status == LUA_OK) status = docall(L, 0, 0); + return report(L, status); +} + + +static int dostring (lua_State *L, const char *s, const char *name) { + int status = luaL_loadbuffer(L, s, strlen(s), name); + if (status == LUA_OK) status = docall(L, 0, 0); + return report(L, status); +} + + +static int dolibrary (lua_State *L, const char *name) { + int status; + lua_getglobal(L, "require"); + lua_pushstring(L, name); + status = docall(L, 1, 1); /* call 'require(name)' */ + if (status == LUA_OK) + lua_setglobal(L, name); /* global[name] = require return */ + return report(L, status); +} + + +static const char *get_prompt (lua_State *L, int firstline) { + const char *p; + lua_getglobal(L, firstline ? "_PROMPT" : "_PROMPT2"); + p = lua_tostring(L, -1); + if (p == NULL) p = (firstline ? LUA_PROMPT : LUA_PROMPT2); + return p; +} + +/* mark in error messages for incomplete statements */ +#define EOFMARK "" +#define marklen (sizeof(EOFMARK)/sizeof(char) - 1) + +static int incomplete (lua_State *L, int status) { + if (status == LUA_ERRSYNTAX) { + size_t lmsg; + const char *msg = lua_tolstring(L, -1, &lmsg); + if (lmsg >= marklen && strcmp(msg + lmsg - marklen, EOFMARK) == 0) { + lua_pop(L, 1); + return 1; + } + } + return 0; /* else... */ +} + + +static int pushline (lua_State *L, int firstline) { + char buffer[LUA_MAXINPUT]; + char *b = buffer; + size_t l; + const char *prmt = get_prompt(L, firstline); + int readstatus = lua_readline(L, b, prmt); + lua_pop(L, 1); /* remove result from 'get_prompt' */ + if (readstatus == 0) + return 0; /* no input */ + l = strlen(b); + if (l > 0 && b[l-1] == '\n') /* line ends with newline? */ + b[l-1] = '\0'; /* remove it */ + if (firstline && b[0] == '=') /* first line starts with `=' ? */ + lua_pushfstring(L, "return %s", b+1); /* change it to `return' */ + else + lua_pushstring(L, b); + lua_freeline(L, b); + return 1; +} + + +static int loadline (lua_State *L) { + int status; + lua_settop(L, 0); + if (!pushline(L, 1)) + return -1; /* no input */ + for (;;) { /* repeat until gets a complete line */ + size_t l; + const char *line = lua_tolstring(L, 1, &l); + status = luaL_loadbuffer(L, line, l, "=stdin"); + if (!incomplete(L, status)) break; /* cannot try to add lines? */ + if (!pushline(L, 0)) /* no more input? */ + return -1; + lua_pushliteral(L, "\n"); /* add a new line... */ + lua_insert(L, -2); /* ...between the two lines */ + lua_concat(L, 3); /* join them */ + } + lua_saveline(L, 1); + lua_remove(L, 1); /* remove line */ + return status; +} + + +static void dotty (lua_State *L) { + int status; + const char *oldprogname = progname; + progname = NULL; + while ((status = loadline(L)) != -1) { + if (status == LUA_OK) status = docall(L, 0, LUA_MULTRET); + report(L, status); + if (status == LUA_OK && lua_gettop(L) > 0) { /* any result to print? */ + luaL_checkstack(L, LUA_MINSTACK, "too many results to print"); + lua_getglobal(L, "print"); + lua_insert(L, 1); + if (lua_pcall(L, lua_gettop(L)-1, 0, 0) != LUA_OK) + l_message(progname, lua_pushfstring(L, + "error calling " LUA_QL("print") " (%s)", + lua_tostring(L, -1))); + } + } + lua_settop(L, 0); /* clear stack */ + luai_writeline(); + progname = oldprogname; +} + + +static int handle_script (lua_State *L, char **argv, int n) { + int status; + const char *fname; + int narg = getargs(L, argv, n); /* collect arguments */ + lua_setglobal(L, "arg"); + fname = argv[n]; + if (strcmp(fname, "-") == 0 && strcmp(argv[n-1], "--") != 0) + fname = NULL; /* stdin */ + status = luaL_loadfile(L, fname); + lua_insert(L, -(narg+1)); + if (status == LUA_OK) + status = docall(L, narg, LUA_MULTRET); + else + lua_pop(L, narg); + return report(L, status); +} + + +/* check that argument has no extra characters at the end */ +#define noextrachars(x) {if ((x)[2] != '\0') return -1;} + + +/* indices of various argument indicators in array args */ +#define has_i 0 /* -i */ +#define has_v 1 /* -v */ +#define has_e 2 /* -e */ +#define has_E 3 /* -E */ + +#define num_has 4 /* number of 'has_*' */ + + +static int collectargs (char **argv, int *args) { + int i; + for (i = 1; argv[i] != NULL; i++) { + if (argv[i][0] != '-') /* not an option? */ + return i; + switch (argv[i][1]) { /* option */ + case '-': + noextrachars(argv[i]); + return (argv[i+1] != NULL ? i+1 : 0); + case '\0': + return i; + case 'E': + args[has_E] = 1; + break; + case 'i': + noextrachars(argv[i]); + args[has_i] = 1; /* go through */ + case 'v': + noextrachars(argv[i]); + args[has_v] = 1; + break; + case 'e': + args[has_e] = 1; /* go through */ + case 'l': /* both options need an argument */ + if (argv[i][2] == '\0') { /* no concatenated argument? */ + i++; /* try next 'argv' */ + if (argv[i] == NULL || argv[i][0] == '-') + return -(i - 1); /* no next argument or it is another option */ + } + break; + default: /* invalid option; return its index... */ + return -i; /* ...as a negative value */ + } + } + return 0; +} + + +static int runargs (lua_State *L, char **argv, int n) { + int i; + for (i = 1; i < n; i++) { + lua_assert(argv[i][0] == '-'); + switch (argv[i][1]) { /* option */ + case 'e': { + const char *chunk = argv[i] + 2; + if (*chunk == '\0') chunk = argv[++i]; + lua_assert(chunk != NULL); + if (dostring(L, chunk, "=(command line)") != LUA_OK) + return 0; + break; + } + case 'l': { + const char *filename = argv[i] + 2; + if (*filename == '\0') filename = argv[++i]; + lua_assert(filename != NULL); + if (dolibrary(L, filename) != LUA_OK) + return 0; /* stop if file fails */ + break; + } + default: break; + } + } + return 1; +} + + +static int handle_luainit (lua_State *L) { + const char *name = "=" LUA_INITVERSION; + const char *init = getenv(name + 1); + if (init == NULL) { + name = "=" LUA_INIT; + init = getenv(name + 1); /* try alternative name */ + } + if (init == NULL) return LUA_OK; + else if (init[0] == '@') + return dofile(L, init+1); + else + return dostring(L, init, name); +} + + +static int pmain (lua_State *L) { + int argc = (int)lua_tointeger(L, 1); + char **argv = (char **)lua_touserdata(L, 2); + int script; + int args[num_has]; + args[has_i] = args[has_v] = args[has_e] = args[has_E] = 0; + if (argv[0] && argv[0][0]) progname = argv[0]; + script = collectargs(argv, args); + if (script < 0) { /* invalid arg? */ + print_usage(argv[-script]); + return 0; + } + if (args[has_v]) print_version(); + if (args[has_E]) { /* option '-E'? */ + lua_pushboolean(L, 1); /* signal for libraries to ignore env. vars. */ + lua_setfield(L, LUA_REGISTRYINDEX, "LUA_NOENV"); + } + /* open standard libraries */ + luaL_checkversion(L); + lua_gc(L, LUA_GCSTOP, 0); /* stop collector during initialization */ + luaL_openlibs(L); /* open libraries */ + lua_gc(L, LUA_GCRESTART, 0); + if (!args[has_E] && handle_luainit(L) != LUA_OK) + return 0; /* error running LUA_INIT */ + /* execute arguments -e and -l */ + if (!runargs(L, argv, (script > 0) ? script : argc)) return 0; + /* execute main script (if there is one) */ + if (script && handle_script(L, argv, script) != LUA_OK) return 0; + if (args[has_i]) /* -i option? */ + dotty(L); + else if (script == 0 && !args[has_e] && !args[has_v]) { /* no arguments? */ + if (lua_stdin_is_tty()) { + print_version(); + dotty(L); + } + else dofile(L, NULL); /* executes stdin as a file */ + } + lua_pushboolean(L, 1); /* signal no errors */ + return 1; +} + + +int main (int argc, char **argv) { + int status, result; + lua_State *L = luaL_newstate(); /* create state */ + if (L == NULL) { + l_message(argv[0], "cannot create state: not enough memory"); + return EXIT_FAILURE; + } + /* call 'pmain' in protected mode */ + lua_pushcfunction(L, &pmain); + lua_pushinteger(L, argc); /* 1st argument */ + lua_pushlightuserdata(L, argv); /* 2nd argument */ + status = lua_pcall(L, 2, 1, 0); + result = lua_toboolean(L, -1); /* get result */ + finalreport(L, status); + lua_close(L); + return (result && status == LUA_OK) ? EXIT_SUCCESS : EXIT_FAILURE; +} + diff --git a/radio/src/lua/src/lua.h b/radio/src/lua/src/lua.h new file mode 100644 index 000000000..d9ae5c9ea --- /dev/null +++ b/radio/src/lua/src/lua.h @@ -0,0 +1,455 @@ +/* +** $Id: lua.h,v 1.285 2013/03/15 13:04:22 roberto Exp $ +** Lua - A Scripting Language +** Lua.org, PUC-Rio, Brazil (http://www.lua.org) +** See Copyright Notice at the end of this file +*/ + + +#ifndef lua_h +#define lua_h + +#include +#include + + +#include "luaconf.h" + + +#define LUA_VERSION_MAJOR "5" +#define LUA_VERSION_MINOR "2" +#define LUA_VERSION_NUM 502 +#define LUA_VERSION_RELEASE "2" + +#define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR +#define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE +#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2013 Lua.org, PUC-Rio" +#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes" + + +/* mark for precompiled code ('Lua') */ +#define LUA_SIGNATURE "\033Lua" + +/* option for multiple returns in 'lua_pcall' and 'lua_call' */ +#define LUA_MULTRET (-1) + + +/* +** pseudo-indices +*/ +#define LUA_REGISTRYINDEX LUAI_FIRSTPSEUDOIDX +#define lua_upvalueindex(i) (LUA_REGISTRYINDEX - (i)) + + +/* thread status */ +#define LUA_OK 0 +#define LUA_YIELD 1 +#define LUA_ERRRUN 2 +#define LUA_ERRSYNTAX 3 +#define LUA_ERRMEM 4 +#define LUA_ERRGCMM 5 +#define LUA_ERRERR 6 + + +typedef struct lua_State lua_State; + +typedef int (*lua_CFunction) (lua_State *L); + + +/* +** functions that read/write blocks when loading/dumping Lua chunks +*/ +typedef const char * (*lua_Reader) (lua_State *L, void *ud, size_t *sz); + +typedef int (*lua_Writer) (lua_State *L, const void* p, size_t sz, void* ud); + + +/* +** prototype for memory-allocation functions +*/ +typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize); + + +/* +** basic types +*/ +#define LUA_TNONE (-1) + +#define LUA_TNIL 0 +#define LUA_TBOOLEAN 1 +#define LUA_TLIGHTUSERDATA 2 +#define LUA_TNUMBER 3 +#define LUA_TSTRING 4 +#define LUA_TTABLE 5 +#define LUA_TFUNCTION 6 +#define LUA_TUSERDATA 7 +#define LUA_TTHREAD 8 + +#define LUA_NUMTAGS 9 + + + +/* minimum Lua stack available to a C function */ +#define LUA_MINSTACK 20 + + +/* predefined values in the registry */ +#define LUA_RIDX_MAINTHREAD 1 +#define LUA_RIDX_GLOBALS 2 +#define LUA_RIDX_LAST LUA_RIDX_GLOBALS + + +/* type of numbers in Lua */ +typedef LUA_NUMBER lua_Number; + + +/* type for integer functions */ +typedef LUA_INTEGER lua_Integer; + +/* unsigned integer type */ +typedef LUA_UNSIGNED lua_Unsigned; + + + +/* +** generic extra include file +*/ +#if defined(LUA_USER_H) +#include LUA_USER_H +#endif + + +/* +** RCS ident string +*/ +extern const char lua_ident[]; + + +/* +** state manipulation +*/ +LUA_API lua_State *(lua_newstate) (lua_Alloc f, void *ud); +LUA_API void (lua_close) (lua_State *L); +LUA_API lua_State *(lua_newthread) (lua_State *L); + +LUA_API lua_CFunction (lua_atpanic) (lua_State *L, lua_CFunction panicf); + + +LUA_API const lua_Number *(lua_version) (lua_State *L); + + +/* +** basic stack manipulation +*/ +LUA_API int (lua_absindex) (lua_State *L, int idx); +LUA_API int (lua_gettop) (lua_State *L); +LUA_API void (lua_settop) (lua_State *L, int idx); +LUA_API void (lua_pushvalue) (lua_State *L, int idx); +LUA_API void (lua_remove) (lua_State *L, int idx); +LUA_API void (lua_insert) (lua_State *L, int idx); +LUA_API void (lua_replace) (lua_State *L, int idx); +LUA_API void (lua_copy) (lua_State *L, int fromidx, int toidx); +LUA_API int (lua_checkstack) (lua_State *L, int sz); + +LUA_API void (lua_xmove) (lua_State *from, lua_State *to, int n); + + +/* +** access functions (stack -> C) +*/ + +LUA_API int (lua_isnumber) (lua_State *L, int idx); +LUA_API int (lua_isstring) (lua_State *L, int idx); +LUA_API int (lua_iscfunction) (lua_State *L, int idx); +LUA_API int (lua_isuserdata) (lua_State *L, int idx); +LUA_API int (lua_type) (lua_State *L, int idx); +LUA_API const char *(lua_typename) (lua_State *L, int tp); + +LUA_API lua_Number (lua_tonumberx) (lua_State *L, int idx, int *isnum); +LUA_API lua_Integer (lua_tointegerx) (lua_State *L, int idx, int *isnum); +LUA_API lua_Unsigned (lua_tounsignedx) (lua_State *L, int idx, int *isnum); +LUA_API int (lua_toboolean) (lua_State *L, int idx); +LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len); +LUA_API size_t (lua_rawlen) (lua_State *L, int idx); +LUA_API lua_CFunction (lua_tocfunction) (lua_State *L, int idx); +LUA_API void *(lua_touserdata) (lua_State *L, int idx); +LUA_API lua_State *(lua_tothread) (lua_State *L, int idx); +LUA_API const void *(lua_topointer) (lua_State *L, int idx); + + +/* +** Comparison and arithmetic functions +*/ + +#define LUA_OPADD 0 /* ORDER TM */ +#define LUA_OPSUB 1 +#define LUA_OPMUL 2 +#define LUA_OPDIV 3 +#define LUA_OPMOD 4 +#define LUA_OPPOW 5 +#define LUA_OPUNM 6 + +LUA_API void (lua_arith) (lua_State *L, int op); + +#define LUA_OPEQ 0 +#define LUA_OPLT 1 +#define LUA_OPLE 2 + +LUA_API int (lua_rawequal) (lua_State *L, int idx1, int idx2); +LUA_API int (lua_compare) (lua_State *L, int idx1, int idx2, int op); + + +/* +** push functions (C -> stack) +*/ +LUA_API void (lua_pushnil) (lua_State *L); +LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n); +LUA_API void (lua_pushinteger) (lua_State *L, lua_Integer n); +LUA_API void (lua_pushunsigned) (lua_State *L, lua_Unsigned n); +LUA_API const char *(lua_pushlstring) (lua_State *L, const char *s, size_t l); +LUA_API const char *(lua_pushstring) (lua_State *L, const char *s); +LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt, + va_list argp); +LUA_API const char *(lua_pushfstring) (lua_State *L, const char *fmt, ...); +LUA_API void (lua_pushcclosure) (lua_State *L, lua_CFunction fn, int n); +LUA_API void (lua_pushboolean) (lua_State *L, int b); +LUA_API void (lua_pushlightuserdata) (lua_State *L, void *p); +LUA_API int (lua_pushthread) (lua_State *L); + + +/* +** get functions (Lua -> stack) +*/ +LUA_API void (lua_getglobal) (lua_State *L, const char *var); +LUA_API void (lua_gettable) (lua_State *L, int idx); +LUA_API void (lua_getfield) (lua_State *L, int idx, const char *k); +LUA_API void (lua_rawget) (lua_State *L, int idx); +LUA_API void (lua_rawgeti) (lua_State *L, int idx, int n); +LUA_API void (lua_rawgetp) (lua_State *L, int idx, const void *p); +LUA_API void (lua_createtable) (lua_State *L, int narr, int nrec); +LUA_API void *(lua_newuserdata) (lua_State *L, size_t sz); +LUA_API int (lua_getmetatable) (lua_State *L, int objindex); +LUA_API void (lua_getuservalue) (lua_State *L, int idx); + + +/* +** set functions (stack -> Lua) +*/ +LUA_API void (lua_setglobal) (lua_State *L, const char *var); +LUA_API void (lua_settable) (lua_State *L, int idx); +LUA_API void (lua_setfield) (lua_State *L, int idx, const char *k); +LUA_API void (lua_rawset) (lua_State *L, int idx); +LUA_API void (lua_rawseti) (lua_State *L, int idx, int n); +LUA_API void (lua_rawsetp) (lua_State *L, int idx, const void *p); +LUA_API int (lua_setmetatable) (lua_State *L, int objindex); +LUA_API void (lua_setuservalue) (lua_State *L, int idx); + + +/* +** 'load' and 'call' functions (load and run Lua code) +*/ +LUA_API void (lua_callk) (lua_State *L, int nargs, int nresults, int ctx, + lua_CFunction k); +#define lua_call(L,n,r) lua_callk(L, (n), (r), 0, NULL) + +LUA_API int (lua_getctx) (lua_State *L, int *ctx); + +LUA_API int (lua_pcallk) (lua_State *L, int nargs, int nresults, int errfunc, + int ctx, lua_CFunction k); +#define lua_pcall(L,n,r,f) lua_pcallk(L, (n), (r), (f), 0, NULL) + +LUA_API int (lua_load) (lua_State *L, lua_Reader reader, void *dt, + const char *chunkname, + const char *mode); + +LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data); + + +/* +** coroutine functions +*/ +LUA_API int (lua_yieldk) (lua_State *L, int nresults, int ctx, + lua_CFunction k); +#define lua_yield(L,n) lua_yieldk(L, (n), 0, NULL) +LUA_API int (lua_resume) (lua_State *L, lua_State *from, int narg); +LUA_API int (lua_status) (lua_State *L); + +/* +** garbage-collection function and options +*/ + +#define LUA_GCSTOP 0 +#define LUA_GCRESTART 1 +#define LUA_GCCOLLECT 2 +#define LUA_GCCOUNT 3 +#define LUA_GCCOUNTB 4 +#define LUA_GCSTEP 5 +#define LUA_GCSETPAUSE 6 +#define LUA_GCSETSTEPMUL 7 +#define LUA_GCSETMAJORINC 8 +#define LUA_GCISRUNNING 9 +#define LUA_GCGEN 10 +#define LUA_GCINC 11 + +LUA_API int (lua_gc) (lua_State *L, int what, int data); + + +/* +** miscellaneous functions +*/ + +LUA_API int (lua_error) (lua_State *L); + +LUA_API int (lua_next) (lua_State *L, int idx); + +LUA_API void (lua_concat) (lua_State *L, int n); +LUA_API void (lua_len) (lua_State *L, int idx); + +LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud); +LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud); + + + +/* +** =============================================================== +** some useful macros +** =============================================================== +*/ + +#define lua_tonumber(L,i) lua_tonumberx(L,i,NULL) +#define lua_tointeger(L,i) lua_tointegerx(L,i,NULL) +#define lua_tounsigned(L,i) lua_tounsignedx(L,i,NULL) + +#define lua_pop(L,n) lua_settop(L, -(n)-1) + +#define lua_newtable(L) lua_createtable(L, 0, 0) + +#define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n))) + +#define lua_pushcfunction(L,f) lua_pushcclosure(L, (f), 0) + +#define lua_isfunction(L,n) (lua_type(L, (n)) == LUA_TFUNCTION) +#define lua_istable(L,n) (lua_type(L, (n)) == LUA_TTABLE) +#define lua_islightuserdata(L,n) (lua_type(L, (n)) == LUA_TLIGHTUSERDATA) +#define lua_isnil(L,n) (lua_type(L, (n)) == LUA_TNIL) +#define lua_isboolean(L,n) (lua_type(L, (n)) == LUA_TBOOLEAN) +#define lua_isthread(L,n) (lua_type(L, (n)) == LUA_TTHREAD) +#define lua_isnone(L,n) (lua_type(L, (n)) == LUA_TNONE) +#define lua_isnoneornil(L, n) (lua_type(L, (n)) <= 0) + +#define lua_pushliteral(L, s) \ + lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1) + +#define lua_pushglobaltable(L) \ + lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS) + +#define lua_tostring(L,i) lua_tolstring(L, (i), NULL) + + + +/* +** {====================================================================== +** Debug API +** ======================================================================= +*/ + + +/* +** Event codes +*/ +#define LUA_HOOKCALL 0 +#define LUA_HOOKRET 1 +#define LUA_HOOKLINE 2 +#define LUA_HOOKCOUNT 3 +#define LUA_HOOKTAILCALL 4 + + +/* +** Event masks +*/ +#define LUA_MASKCALL (1 << LUA_HOOKCALL) +#define LUA_MASKRET (1 << LUA_HOOKRET) +#define LUA_MASKLINE (1 << LUA_HOOKLINE) +#define LUA_MASKCOUNT (1 << LUA_HOOKCOUNT) + +typedef struct lua_Debug lua_Debug; /* activation record */ + + +/* Functions to be called by the debugger in specific events */ +typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar); + + +LUA_API int (lua_getstack) (lua_State *L, int level, lua_Debug *ar); +LUA_API int (lua_getinfo) (lua_State *L, const char *what, lua_Debug *ar); +LUA_API const char *(lua_getlocal) (lua_State *L, const lua_Debug *ar, int n); +LUA_API const char *(lua_setlocal) (lua_State *L, const lua_Debug *ar, int n); +LUA_API const char *(lua_getupvalue) (lua_State *L, int funcindex, int n); +LUA_API const char *(lua_setupvalue) (lua_State *L, int funcindex, int n); + +LUA_API void *(lua_upvalueid) (lua_State *L, int fidx, int n); +LUA_API void (lua_upvaluejoin) (lua_State *L, int fidx1, int n1, + int fidx2, int n2); + +LUA_API int (lua_sethook) (lua_State *L, lua_Hook func, int mask, int count); +LUA_API lua_Hook (lua_gethook) (lua_State *L); +LUA_API int (lua_gethookmask) (lua_State *L); +LUA_API int (lua_gethookcount) (lua_State *L); + + +struct lua_Debug { + int event; + const char *name; /* (n) */ + const char *namewhat; /* (n) 'global', 'local', 'field', 'method' */ + const char *what; /* (S) 'Lua', 'C', 'main', 'tail' */ + const char *source; /* (S) */ + int currentline; /* (l) */ + int linedefined; /* (S) */ + int lastlinedefined; /* (S) */ + unsigned char nups; /* (u) number of upvalues */ + unsigned char nparams;/* (u) number of parameters */ + char isvararg; /* (u) */ + char istailcall; /* (t) */ + char short_src[LUA_IDSIZE]; /* (S) */ + /* private part */ + struct CallInfo *i_ci; /* active function */ +}; + +#if defined(USE_FATFS) + #include "FatFs/ff.h" + int lua__getc(FIL *f); + #define lua_getc(f) lua__getc(&f) + #define lua_fclose f_close +#else + #include + #define lua_getc getc + #define lua_fclose fclose +#endif + +/* }====================================================================== */ + + +/****************************************************************************** +* Copyright (C) 1994-2013 Lua.org, PUC-Rio. +* +* Permission is hereby granted, free of charge, to any person obtaining +* a copy of this software and associated documentation files (the +* "Software"), to deal in the Software without restriction, including +* without limitation the rights to use, copy, modify, merge, publish, +* distribute, sublicense, and/or sell copies of the Software, and to +* permit persons to whom the Software is furnished to do so, subject to +* the following conditions: +* +* The above copyright notice and this permission notice shall be +* included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +******************************************************************************/ + + +#endif diff --git a/radio/src/lua/src/lua.hpp b/radio/src/lua/src/lua.hpp new file mode 100644 index 000000000..ec417f594 --- /dev/null +++ b/radio/src/lua/src/lua.hpp @@ -0,0 +1,9 @@ +// lua.hpp +// Lua header files for C++ +// <> not supplied automatically because Lua also compiles as C++ + +extern "C" { +#include "lua.h" +#include "lualib.h" +#include "lauxlib.h" +} diff --git a/radio/src/lua/src/luac.c b/radio/src/lua/src/luac.c new file mode 100644 index 000000000..b8e179381 --- /dev/null +++ b/radio/src/lua/src/luac.c @@ -0,0 +1,431 @@ +/* +** $Id: luac.c,v 1.69 2011/11/29 17:46:33 lhf Exp $ +** Lua compiler (saves bytecodes to files; also list bytecodes) +** See Copyright Notice in lua.h +*/ + +#include +#include +#include + +#define luac_c +#define LUA_CORE + +#include "lua.h" +#include "lauxlib.h" + +#include "lobject.h" +#include "lstate.h" +#include "lundump.h" + +static void PrintFunction(const Proto* f, int full); +#define luaU_print PrintFunction + +#define PROGNAME "luac" /* default program name */ +#define OUTPUT PROGNAME ".out" /* default output file */ + +static int listing=0; /* list bytecodes? */ +static int dumping=1; /* dump bytecodes? */ +static int stripping=0; /* strip debug information? */ +static char Output[]={ OUTPUT }; /* default output file name */ +static const char* output=Output; /* actual output file name */ +static const char* progname=PROGNAME; /* actual program name */ + +static void fatal(const char* message) +{ + fprintf(stderr,"%s: %s\n",progname,message); + exit(EXIT_FAILURE); +} + +static void cannot(const char* what) +{ + fprintf(stderr,"%s: cannot %s %s: %s\n",progname,what,output,strerror(errno)); + exit(EXIT_FAILURE); +} + +static void usage(const char* message) +{ + if (*message=='-') + fprintf(stderr,"%s: unrecognized option " LUA_QS "\n",progname,message); + else + fprintf(stderr,"%s: %s\n",progname,message); + fprintf(stderr, + "usage: %s [options] [filenames]\n" + "Available options are:\n" + " -l list (use -l -l for full listing)\n" + " -o name output to file " LUA_QL("name") " (default is \"%s\")\n" + " -p parse only\n" + " -s strip debug information\n" + " -v show version information\n" + " -- stop handling options\n" + " - stop handling options and process stdin\n" + ,progname,Output); + exit(EXIT_FAILURE); +} + +#define IS(s) (strcmp(argv[i],s)==0) + +static int doargs(int argc, char* argv[]) +{ + int i; + int version=0; + if (argv[0]!=NULL && *argv[0]!=0) progname=argv[0]; + for (i=1; itop+(i)) + +static const Proto* combine(lua_State* L, int n) +{ + if (n==1) + return toproto(L,-1); + else + { + Proto* f; + int i=n; + if (lua_load(L,reader,&i,"=(" PROGNAME ")",NULL)!=LUA_OK) fatal(lua_tostring(L,-1)); + f=toproto(L,-1); + for (i=0; ip[i]=toproto(L,i-n-1); + if (f->p[i]->sizeupvalues>0) f->p[i]->upvalues[0].instack=0; + } + f->sizelineinfo=0; + return f; + } +} + +static int writer(lua_State* L, const void* p, size_t size, void* u) +{ + UNUSED(L); + return (fwrite(p,size,1,(FILE*)u)!=1) && (size!=0); +} + +static int pmain(lua_State* L) +{ + int argc=(int)lua_tointeger(L,1); + char** argv=(char**)lua_touserdata(L,2); + const Proto* f; + int i; + if (!lua_checkstack(L,argc)) fatal("too many input files"); + for (i=0; i1); + if (dumping) + { + FILE* D= (output==NULL) ? stdout : fopen(output,"wb"); + if (D==NULL) cannot("open"); + lua_lock(L); + luaU_dump(L,f,writer,D,stripping); + lua_unlock(L); + if (ferror(D)) cannot("write"); + if (fclose(D)) cannot("close"); + } + return 0; +} + +int main(int argc, char* argv[]) +{ + lua_State* L; + int i=doargs(argc,argv); + argc-=i; argv+=i; + if (argc<=0) usage("no input files given"); + L=luaL_newstate(); + if (L==NULL) fatal("cannot create state: not enough memory"); + lua_pushcfunction(L,&pmain); + lua_pushinteger(L,argc); + lua_pushlightuserdata(L,argv); + if (lua_pcall(L,2,0,0)!=LUA_OK) fatal(lua_tostring(L,-1)); + lua_close(L); + return EXIT_SUCCESS; +} + +/* +** $Id: print.c,v 1.68 2011/09/30 10:21:20 lhf Exp $ +** print bytecodes +** See Copyright Notice in lua.h +*/ + +#include +#include + +#define luac_c +#define LUA_CORE + +#include "ldebug.h" +#include "lobject.h" +#include "lopcodes.h" + +#define VOID(p) ((const void*)(p)) + +static void PrintString(const TString* ts) +{ + const char* s=getstr(ts); + size_t i,n=ts->tsv.len; + printf("%c",'"'); + for (i=0; ik[i]; + switch (ttype(o)) + { + case LUA_TNIL: + printf("nil"); + break; + case LUA_TBOOLEAN: + printf(bvalue(o) ? "true" : "false"); + break; + case LUA_TNUMBER: + printf(LUA_NUMBER_FMT,nvalue(o)); + break; + case LUA_TSTRING: + PrintString(rawtsvalue(o)); + break; + default: /* cannot happen */ + printf("? type=%d",ttype(o)); + break; + } +} + +#define UPVALNAME(x) ((f->upvalues[x].name) ? getstr(f->upvalues[x].name) : "-") +#define MYK(x) (-1-(x)) + +static void PrintCode(const Proto* f) +{ + const Instruction* code=f->code; + int pc,n=f->sizecode; + for (pc=0; pc0) printf("[%d]\t",line); else printf("[-]\t"); + printf("%-9s\t",luaP_opnames[o]); + switch (getOpMode(o)) + { + case iABC: + printf("%d",a); + if (getBMode(o)!=OpArgN) printf(" %d",ISK(b) ? (MYK(INDEXK(b))) : b); + if (getCMode(o)!=OpArgN) printf(" %d",ISK(c) ? (MYK(INDEXK(c))) : c); + break; + case iABx: + printf("%d",a); + if (getBMode(o)==OpArgK) printf(" %d",MYK(bx)); + if (getBMode(o)==OpArgU) printf(" %d",bx); + break; + case iAsBx: + printf("%d %d",a,sbx); + break; + case iAx: + printf("%d",MYK(ax)); + break; + } + switch (o) + { + case OP_LOADK: + printf("\t; "); PrintConstant(f,bx); + break; + case OP_GETUPVAL: + case OP_SETUPVAL: + printf("\t; %s",UPVALNAME(b)); + break; + case OP_GETTABUP: + printf("\t; %s",UPVALNAME(b)); + if (ISK(c)) { printf(" "); PrintConstant(f,INDEXK(c)); } + break; + case OP_SETTABUP: + printf("\t; %s",UPVALNAME(a)); + if (ISK(b)) { printf(" "); PrintConstant(f,INDEXK(b)); } + if (ISK(c)) { printf(" "); PrintConstant(f,INDEXK(c)); } + break; + case OP_GETTABLE: + case OP_SELF: + if (ISK(c)) { printf("\t; "); PrintConstant(f,INDEXK(c)); } + break; + case OP_SETTABLE: + case OP_ADD: + case OP_SUB: + case OP_MUL: + case OP_DIV: + case OP_POW: + case OP_EQ: + case OP_LT: + case OP_LE: + if (ISK(b) || ISK(c)) + { + printf("\t; "); + if (ISK(b)) PrintConstant(f,INDEXK(b)); else printf("-"); + printf(" "); + if (ISK(c)) PrintConstant(f,INDEXK(c)); else printf("-"); + } + break; + case OP_JMP: + case OP_FORLOOP: + case OP_FORPREP: + case OP_TFORLOOP: + printf("\t; to %d",sbx+pc+2); + break; + case OP_CLOSURE: + printf("\t; %p",VOID(f->p[bx])); + break; + case OP_SETLIST: + if (c==0) printf("\t; %d",(int)code[++pc]); else printf("\t; %d",c); + break; + case OP_EXTRAARG: + printf("\t; "); PrintConstant(f,ax); + break; + default: + break; + } + printf("\n"); + } +} + +#define SS(x) ((x==1)?"":"s") +#define S(x) (int)(x),SS(x) + +static void PrintHeader(const Proto* f) +{ + const char* s=f->source ? getstr(f->source) : "=?"; + if (*s=='@' || *s=='=') + s++; + else if (*s==LUA_SIGNATURE[0]) + s="(bstring)"; + else + s="(string)"; + printf("\n%s <%s:%d,%d> (%d instruction%s at %p)\n", + (f->linedefined==0)?"main":"function",s, + f->linedefined,f->lastlinedefined, + S(f->sizecode),VOID(f)); + printf("%d%s param%s, %d slot%s, %d upvalue%s, ", + (int)(f->numparams),f->is_vararg?"+":"",SS(f->numparams), + S(f->maxstacksize),S(f->sizeupvalues)); + printf("%d local%s, %d constant%s, %d function%s\n", + S(f->sizelocvars),S(f->sizek),S(f->sizep)); +} + +static void PrintDebug(const Proto* f) +{ + int i,n; + n=f->sizek; + printf("constants (%d) for %p:\n",n,VOID(f)); + for (i=0; isizelocvars; + printf("locals (%d) for %p:\n",n,VOID(f)); + for (i=0; ilocvars[i].varname),f->locvars[i].startpc+1,f->locvars[i].endpc+1); + } + n=f->sizeupvalues; + printf("upvalues (%d) for %p:\n",n,VOID(f)); + for (i=0; iupvalues[i].instack,f->upvalues[i].idx); + } +} + +static void PrintFunction(const Proto* f, int full) +{ + int i,n=f->sizep; + PrintHeader(f); + PrintCode(f); + if (full) PrintDebug(f); + for (i=0; ip[i],full); +} diff --git a/radio/src/lua/src/luaconf.h b/radio/src/lua/src/luaconf.h new file mode 100644 index 000000000..2459e6933 --- /dev/null +++ b/radio/src/lua/src/luaconf.h @@ -0,0 +1,562 @@ +/* +** $Id: luaconf.h,v 1.176 2013/03/16 21:10:18 roberto Exp $ +** Configuration file for Lua +** See Copyright Notice in lua.h +*/ + + +#ifndef lconfig_h +#define lconfig_h + +#include +#include + +#define USE_FATFS + +/* +** ================================================================== +** Search for "@@" to find all configurable definitions. +** =================================================================== +*/ + + +/* +@@ LUA_ANSI controls the use of non-ansi features. +** CHANGE it (define it) if you want Lua to avoid the use of any +** non-ansi feature or library. +*/ +#if !defined(LUA_ANSI) && defined(__STRICT_ANSI__) +#define LUA_ANSI +#endif + + +#if !defined(LUA_ANSI) && defined(_WIN32) && !defined(_WIN32_WCE) +#define LUA_WIN /* enable goodies for regular Windows platforms */ +#endif + +#if defined(LUA_WIN) +#define LUA_DL_DLL +#define LUA_USE_AFORMAT /* assume 'printf' handles 'aA' specifiers */ +#endif + + + +#if defined(LUA_USE_LINUX) +#define LUA_USE_POSIX +#define LUA_USE_DLOPEN /* needs an extra library: -ldl */ +#define LUA_USE_READLINE /* needs some extra libraries */ +#define LUA_USE_STRTODHEX /* assume 'strtod' handles hex formats */ +#define LUA_USE_AFORMAT /* assume 'printf' handles 'aA' specifiers */ +#define LUA_USE_LONGLONG /* assume support for long long */ +#endif + +#if defined(LUA_USE_MACOSX) +#define LUA_USE_POSIX +#define LUA_USE_DLOPEN /* does not need -ldl */ +#define LUA_USE_READLINE /* needs an extra library: -lreadline */ +#define LUA_USE_STRTODHEX /* assume 'strtod' handles hex formats */ +#define LUA_USE_AFORMAT /* assume 'printf' handles 'aA' specifiers */ +#define LUA_USE_LONGLONG /* assume support for long long */ +#endif + + + +/* +@@ LUA_USE_POSIX includes all functionality listed as X/Open System +@* Interfaces Extension (XSI). +** CHANGE it (define it) if your system is XSI compatible. +*/ +#if defined(LUA_USE_POSIX) +#define LUA_USE_MKSTEMP +#define LUA_USE_ISATTY +#define LUA_USE_POPEN +#define LUA_USE_ULONGJMP +#define LUA_USE_GMTIME_R +#endif + + + +/* +@@ LUA_PATH_DEFAULT is the default path that Lua uses to look for +@* Lua libraries. +@@ LUA_CPATH_DEFAULT is the default path that Lua uses to look for +@* C libraries. +** CHANGE them if your machine has a non-conventional directory +** hierarchy or if you want to install your libraries in +** non-conventional directories. +*/ +#if defined(_WIN32) /* { */ +/* +** In Windows, any exclamation mark ('!') in the path is replaced by the +** path of the directory of the executable file of the current process. +*/ +#define LUA_LDIR "!\\lua\\" +#define LUA_CDIR "!\\" +#define LUA_PATH_DEFAULT \ + LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;" \ + LUA_CDIR"?.lua;" LUA_CDIR"?\\init.lua;" ".\\?.lua" +#define LUA_CPATH_DEFAULT \ + LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll;" ".\\?.dll" + +#else /* }{ */ + +#define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/" +#define LUA_ROOT "/usr/local/" +#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR +#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR +#define LUA_PATH_DEFAULT \ + LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ + LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" "./?.lua" +#define LUA_CPATH_DEFAULT \ + LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so" +#endif /* } */ + + +/* +@@ LUA_DIRSEP is the directory separator (for submodules). +** CHANGE it if your machine does not use "/" as the directory separator +** and is not Windows. (On Windows Lua automatically uses "\".) +*/ +#if defined(_WIN32) +#define LUA_DIRSEP "\\" +#else +#define LUA_DIRSEP "/" +#endif + + +/* +@@ LUA_ENV is the name of the variable that holds the current +@@ environment, used to access global names. +** CHANGE it if you do not like this name. +*/ +#define LUA_ENV "_ENV" + + +/* +@@ LUA_API is a mark for all core API functions. +@@ LUALIB_API is a mark for all auxiliary library functions. +@@ LUAMOD_API is a mark for all standard library opening functions. +** CHANGE them if you need to define those functions in some special way. +** For instance, if you want to create one Windows DLL with the core and +** the libraries, you may want to use the following definition (define +** LUA_BUILD_AS_DLL to get it). +*/ +#if defined(LUA_BUILD_AS_DLL) /* { */ + +#if defined(LUA_CORE) || defined(LUA_LIB) /* { */ +#define LUA_API __declspec(dllexport) +#else /* }{ */ +#define LUA_API __declspec(dllimport) +#endif /* } */ + +#else /* }{ */ + +#define LUA_API extern + +#endif /* } */ + + +/* more often than not the libs go together with the core */ +#define LUALIB_API LUA_API +#define LUAMOD_API LUALIB_API + + +/* +@@ LUAI_FUNC is a mark for all extern functions that are not to be +@* exported to outside modules. +@@ LUAI_DDEF and LUAI_DDEC are marks for all extern (const) variables +@* that are not to be exported to outside modules (LUAI_DDEF for +@* definitions and LUAI_DDEC for declarations). +** CHANGE them if you need to mark them in some special way. Elf/gcc +** (versions 3.2 and later) mark them as "hidden" to optimize access +** when Lua is compiled as a shared library. Not all elf targets support +** this attribute. Unfortunately, gcc does not offer a way to check +** whether the target offers that support, and those without support +** give a warning about it. To avoid these warnings, change to the +** default definition. +*/ +#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \ + defined(__ELF__) /* { */ +#define LUAI_FUNC __attribute__((visibility("hidden"))) extern +#define LUAI_DDEC LUAI_FUNC +#define LUAI_DDEF /* empty */ + +#else /* }{ */ +#define LUAI_FUNC extern +#define LUAI_DDEC extern +#define LUAI_DDEF /* empty */ +#endif /* } */ + + + +/* +@@ LUA_QL describes how error messages quote program elements. +** CHANGE it if you want a different appearance. +*/ +#define LUA_QL(x) "'" x "'" +#define LUA_QS LUA_QL("%s") + + +/* +@@ LUA_IDSIZE gives the maximum size for the description of the source +@* of a function in debug information. +** CHANGE it if you want a different size. +*/ +#define LUA_IDSIZE 60 + + +/* +@@ luai_writestring/luai_writeline define how 'print' prints its results. +** They are only used in libraries and the stand-alone program. (The #if +** avoids including 'stdio.h' everywhere.) +*/ + +/* +@@ luai_writestringerror defines how to print error messages. +** (A format string with one argument is enough for Lua...) +*/ + +#if defined(LUA_LIB) || defined(lua_c) +#include +#define luai_writestring(s,l) fwrite((s), sizeof(char), (l), stdout) +#define luai_writeline() (luai_writestring("\n", 1), fflush(stdout)) +#define luai_writestringerror(s,p) \ + (fprintf(stderr, (s), (p)), fflush(stderr)) +#else +#define luai_writestring(s,l) +#define luai_writeline() +#define luai_writestringerror(s,p) +#endif + + + +/* +@@ LUAI_MAXSHORTLEN is the maximum length for short strings, that is, +** strings that are internalized. (Cannot be smaller than reserved words +** or tags for metamethods, as these strings must be internalized; +** #("function") = 8, #("__newindex") = 10.) +*/ +#define LUAI_MAXSHORTLEN 40 + + + +/* +** {================================================================== +** Compatibility with previous versions +** =================================================================== +*/ + +/* +@@ LUA_COMPAT_ALL controls all compatibility options. +** You can define it to get all options, or change specific options +** to fit your specific needs. +*/ +#if defined(LUA_COMPAT_ALL) /* { */ + +/* +@@ LUA_COMPAT_UNPACK controls the presence of global 'unpack'. +** You can replace it with 'table.unpack'. +*/ +#define LUA_COMPAT_UNPACK + +/* +@@ LUA_COMPAT_LOADERS controls the presence of table 'package.loaders'. +** You can replace it with 'package.searchers'. +*/ +#define LUA_COMPAT_LOADERS + +/* +@@ macro 'lua_cpcall' emulates deprecated function lua_cpcall. +** You can call your C function directly (with light C functions). +*/ +#define lua_cpcall(L,f,u) \ + (lua_pushcfunction(L, (f)), \ + lua_pushlightuserdata(L,(u)), \ + lua_pcall(L,1,0,0)) + + +/* +@@ LUA_COMPAT_LOG10 defines the function 'log10' in the math library. +** You can rewrite 'log10(x)' as 'log(x, 10)'. +*/ +#define LUA_COMPAT_LOG10 + +/* +@@ LUA_COMPAT_LOADSTRING defines the function 'loadstring' in the base +** library. You can rewrite 'loadstring(s)' as 'load(s)'. +*/ +#define LUA_COMPAT_LOADSTRING + +/* +@@ LUA_COMPAT_MAXN defines the function 'maxn' in the table library. +*/ +#define LUA_COMPAT_MAXN + +/* +@@ The following macros supply trivial compatibility for some +** changes in the API. The macros themselves document how to +** change your code to avoid using them. +*/ +#define lua_strlen(L,i) lua_rawlen(L, (i)) + +#define lua_objlen(L,i) lua_rawlen(L, (i)) + +#define lua_equal(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPEQ) +#define lua_lessthan(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPLT) + +/* +@@ LUA_COMPAT_MODULE controls compatibility with previous +** module functions 'module' (Lua) and 'luaL_register' (C). +*/ +#define LUA_COMPAT_MODULE + +#endif /* } */ + +/* }================================================================== */ + + + +/* +@@ LUAI_BITSINT defines the number of bits in an int. +** CHANGE here if Lua cannot automatically detect the number of bits of +** your machine. Probably you do not need to change this. +*/ +/* avoid overflows in comparison */ +#if INT_MAX-20 < 32760 /* { */ +#define LUAI_BITSINT 16 +#elif INT_MAX > 2147483640L /* }{ */ +/* int has at least 32 bits */ +#define LUAI_BITSINT 32 +#else /* }{ */ +#error "you must define LUA_BITSINT with number of bits in an integer" +#endif /* } */ + + +/* +@@ LUA_INT32 is an signed integer with exactly 32 bits. +@@ LUAI_UMEM is an unsigned integer big enough to count the total +@* memory used by Lua. +@@ LUAI_MEM is a signed integer big enough to count the total memory +@* used by Lua. +** CHANGE here if for some weird reason the default definitions are not +** good enough for your machine. Probably you do not need to change +** this. +*/ +#if LUAI_BITSINT >= 32 /* { */ +#define LUA_INT32 int +#define LUAI_UMEM size_t +#define LUAI_MEM ptrdiff_t +#else /* }{ */ +/* 16-bit ints */ +#define LUA_INT32 long +#define LUAI_UMEM unsigned long +#define LUAI_MEM long +#endif /* } */ + + +/* +@@ LUAI_MAXSTACK limits the size of the Lua stack. +** CHANGE it if you need a different limit. This limit is arbitrary; +** its only purpose is to stop Lua to consume unlimited stack +** space (and to reserve some numbers for pseudo-indices). +*/ +#if LUAI_BITSINT >= 32 +#define LUAI_MAXSTACK 1000000 +#else +#define LUAI_MAXSTACK 15000 +#endif + +/* reserve some space for error handling */ +#define LUAI_FIRSTPSEUDOIDX (-LUAI_MAXSTACK - 1000) + + + + +/* +@@ LUAL_BUFFERSIZE is the buffer size used by the lauxlib buffer system. +** CHANGE it if it uses too much C-stack space. +*/ +#if defined(USE_FATFS) +#define LUAL_BUFFERSIZE 512 +#else +#define LUAL_BUFFERSIZE BUFSIZ +#endif + + + + +/* +** {================================================================== +@@ LUA_NUMBER is the type of numbers in Lua. +** CHANGE the following definitions only if you want to build Lua +** with a number type different from double. You may also need to +** change lua_number2int & lua_number2integer. +** =================================================================== +*/ + +#define LUA_NUMBER_DOUBLE +#define LUA_NUMBER double + +/* +@@ LUAI_UACNUMBER is the result of an 'usual argument conversion' +@* over a number. +*/ +#define LUAI_UACNUMBER double + + +/* +@@ LUA_NUMBER_SCAN is the format for reading numbers. +@@ LUA_NUMBER_FMT is the format for writing numbers. +@@ lua_number2str converts a number to a string. +@@ LUAI_MAXNUMBER2STR is maximum size of previous conversion. +*/ +#define LUA_NUMBER_SCAN "%lf" +#define LUA_NUMBER_FMT "%.14g" +#define lua_number2str(s,n) sprintf((s), LUA_NUMBER_FMT, (n)) +#define LUAI_MAXNUMBER2STR 32 /* 16 digits, sign, point, and \0 */ + + +/* +@@ l_mathop allows the addition of an 'l' or 'f' to all math operations +*/ +#define l_mathop(x) (x) + + +/* +@@ lua_str2number converts a decimal numeric string to a number. +@@ lua_strx2number converts an hexadecimal numeric string to a number. +** In C99, 'strtod' does both conversions. C89, however, has no function +** to convert floating hexadecimal strings to numbers. For these +** systems, you can leave 'lua_strx2number' undefined and Lua will +** provide its own implementation. +*/ +#define lua_str2number(s,p) strtod((s), (p)) + +#if defined(LUA_USE_STRTODHEX) +#define lua_strx2number(s,p) strtod((s), (p)) +#endif + + +/* +@@ The luai_num* macros define the primitive operations over numbers. +*/ + +/* the following operations need the math library */ +//#if defined(lobject_c) || defined(lvm_c) +#include +#define luai_nummod(L,a,b) ((a) - l_mathop(floor)((a)/(b))*(b)) +#define luai_numpow(L,a,b) (l_mathop(pow)(a,b)) +//#endif + +/* these are quite standard operations */ +// #if defined(LUA_CORE) +#define luai_numadd(L,a,b) ((a)+(b)) +#define luai_numsub(L,a,b) ((a)-(b)) +#define luai_nummul(L,a,b) ((a)*(b)) +#define luai_numdiv(L,a,b) ((a)/(b)) +#define luai_numunm(L,a) (-(a)) +#define luai_numeq(a,b) ((a)==(b)) +#define luai_numlt(L,a,b) ((a)<(b)) +#define luai_numle(L,a,b) ((a)<=(b)) +#define luai_numisnan(L,a) (!luai_numeq((a), (a))) +// #endif + + + +/* +@@ LUA_INTEGER is the integral type used by lua_pushinteger/lua_tointeger. +** CHANGE that if ptrdiff_t is not adequate on your machine. (On most +** machines, ptrdiff_t gives a good choice between int or long.) +*/ +#define LUA_INTEGER int + +/* +@@ LUA_UNSIGNED is the integral type used by lua_pushunsigned/lua_tounsigned. +** It must have at least 32 bits. +*/ +#define LUA_UNSIGNED unsigned LUA_INT32 + + + +/* +** Some tricks with doubles +*/ + +#if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) /* { */ +/* +** The next definitions activate some tricks to speed up the +** conversion from doubles to integer types, mainly to LUA_UNSIGNED. +** +@@ LUA_MSASMTRICK uses Microsoft assembler to avoid clashes with a +** DirectX idiosyncrasy. +** +@@ LUA_IEEE754TRICK uses a trick that should work on any machine +** using IEEE754 with a 32-bit integer type. +** +@@ LUA_IEEELL extends the trick to LUA_INTEGER; should only be +** defined when LUA_INTEGER is a 32-bit integer. +** +@@ LUA_IEEEENDIAN is the endianness of doubles in your machine +** (0 for little endian, 1 for big endian); if not defined, Lua will +** check it dynamically for LUA_IEEE754TRICK (but not for LUA_NANTRICK). +** +@@ LUA_NANTRICK controls the use of a trick to pack all types into +** a single double value, using NaN values to represent non-number +** values. The trick only works on 32-bit machines (ints and pointers +** are 32-bit values) with numbers represented as IEEE 754-2008 doubles +** with conventional endianess (12345678 or 87654321), in CPUs that do +** not produce signaling NaN values (all NaNs are quiet). +*/ + +/* Microsoft compiler on a Pentium (32 bit) ? */ +#if defined(LUA_WIN) && defined(_MSC_VER) && defined(_M_IX86) /* { */ + +#define LUA_MSASMTRICK +#define LUA_IEEEENDIAN 0 +#define LUA_NANTRICK + + +/* pentium 32 bits? */ +#elif defined(__i386__) || defined(__i386) || defined(__X86__) /* }{ */ + +#define LUA_IEEE754TRICK +#define LUA_IEEELL +#define LUA_IEEEENDIAN 0 +#define LUA_NANTRICK + +/* pentium 64 bits? */ +#elif defined(__x86_64) /* }{ */ + +#define LUA_IEEE754TRICK +#define LUA_IEEEENDIAN 0 + +#elif defined(__POWERPC__) || defined(__ppc__) /* }{ */ + +#define LUA_IEEE754TRICK +#define LUA_IEEEENDIAN 1 + +#else /* }{ */ + +/* assume IEEE754 and a 32-bit integer type */ +#define LUA_IEEE754TRICK + +#endif /* } */ + +#endif /* } */ + +/* }================================================================== */ + + + + +/* =================================================================== */ + +/* +** Local configuration. You can use this space to add your redefinitions +** without modifying the main part of the file. +*/ + + + +#endif + diff --git a/radio/src/lua/src/lualib.h b/radio/src/lua/src/lualib.h new file mode 100644 index 000000000..9fd126bf7 --- /dev/null +++ b/radio/src/lua/src/lualib.h @@ -0,0 +1,55 @@ +/* +** $Id: lualib.h,v 1.43 2011/12/08 12:11:37 roberto Exp $ +** Lua standard libraries +** See Copyright Notice in lua.h +*/ + + +#ifndef lualib_h +#define lualib_h + +#include "lua.h" + + + +LUAMOD_API int (luaopen_base) (lua_State *L); + +#define LUA_COLIBNAME "coroutine" +LUAMOD_API int (luaopen_coroutine) (lua_State *L); + +#define LUA_TABLIBNAME "table" +LUAMOD_API int (luaopen_table) (lua_State *L); + +#define LUA_IOLIBNAME "io" +LUAMOD_API int (luaopen_io) (lua_State *L); + +#define LUA_OSLIBNAME "os" +LUAMOD_API int (luaopen_os) (lua_State *L); + +#define LUA_STRLIBNAME "string" +LUAMOD_API int (luaopen_string) (lua_State *L); + +#define LUA_BITLIBNAME "bit32" +LUAMOD_API int (luaopen_bit32) (lua_State *L); + +#define LUA_MATHLIBNAME "math" +LUAMOD_API int (luaopen_math) (lua_State *L); + +#define LUA_DBLIBNAME "debug" +LUAMOD_API int (luaopen_debug) (lua_State *L); + +#define LUA_LOADLIBNAME "package" +LUAMOD_API int (luaopen_package) (lua_State *L); + + +/* open all previous libraries */ +LUALIB_API void (luaL_openlibs) (lua_State *L); + + + +#if !defined(lua_assert) +#define lua_assert(x) ((void)0) +#endif + + +#endif diff --git a/radio/src/lua/src/lundump.c b/radio/src/lua/src/lundump.c new file mode 100644 index 000000000..54de011a4 --- /dev/null +++ b/radio/src/lua/src/lundump.c @@ -0,0 +1,258 @@ +/* +** $Id: lundump.c,v 2.22 2012/05/08 13:53:33 roberto Exp $ +** load precompiled Lua chunks +** See Copyright Notice in lua.h +*/ + +#include + +#define lundump_c +#define LUA_CORE + +#include "lua.h" + +#include "ldebug.h" +#include "ldo.h" +#include "lfunc.h" +#include "lmem.h" +#include "lobject.h" +#include "lstring.h" +#include "lundump.h" +#include "lzio.h" + +typedef struct { + lua_State* L; + ZIO* Z; + Mbuffer* b; + const char* name; +} LoadState; + +static l_noret error(LoadState* S, const char* why) +{ + luaO_pushfstring(S->L,"%s: %s precompiled chunk",S->name,why); + luaD_throw(S->L,LUA_ERRSYNTAX); +} + +#define LoadMem(S,b,n,size) LoadBlock(S,b,(n)*(size)) +#define LoadByte(S) (lu_byte)LoadChar(S) +#define LoadVar(S,x) LoadMem(S,&x,1,sizeof(x)) +#define LoadVector(S,b,n,size) LoadMem(S,b,n,size) + +#if !defined(luai_verifycode) +#define luai_verifycode(L,b,f) /* empty */ +#endif + +static void LoadBlock(LoadState* S, void* b, size_t size) +{ + if (luaZ_read(S->Z,b,size)!=0) error(S,"truncated"); +} + +static int LoadChar(LoadState* S) +{ + char x; + LoadVar(S,x); + return x; +} + +static int LoadInt(LoadState* S) +{ + int x; + LoadVar(S,x); + if (x<0) error(S,"corrupted"); + return x; +} + +static lua_Number LoadNumber(LoadState* S) +{ + lua_Number x; + LoadVar(S,x); + return x; +} + +static TString* LoadString(LoadState* S) +{ + size_t size; + LoadVar(S,size); + if (size==0) + return NULL; + else + { + char* s=luaZ_openspace(S->L,S->b,size); + LoadBlock(S,s,size*sizeof(char)); + return luaS_newlstr(S->L,s,size-1); /* remove trailing '\0' */ + } +} + +static void LoadCode(LoadState* S, Proto* f) +{ + int n=LoadInt(S); + f->code=luaM_newvector(S->L,n,Instruction); + f->sizecode=n; + LoadVector(S,f->code,n,sizeof(Instruction)); +} + +static void LoadFunction(LoadState* S, Proto* f); + +static void LoadConstants(LoadState* S, Proto* f) +{ + int i,n; + n=LoadInt(S); + f->k=luaM_newvector(S->L,n,TValue); + f->sizek=n; + for (i=0; ik[i]); + for (i=0; ik[i]; + int t=LoadChar(S); + switch (t) + { + case LUA_TNIL: + setnilvalue(o); + break; + case LUA_TBOOLEAN: + setbvalue(o,LoadChar(S)); + break; + case LUA_TNUMBER: + setnvalue(o,LoadNumber(S)); + break; + case LUA_TSTRING: + setsvalue2n(S->L,o,LoadString(S)); + break; + default: lua_assert(0); + } + } + n=LoadInt(S); + f->p=luaM_newvector(S->L,n,Proto*); + f->sizep=n; + for (i=0; ip[i]=NULL; + for (i=0; ip[i]=luaF_newproto(S->L); + LoadFunction(S,f->p[i]); + } +} + +static void LoadUpvalues(LoadState* S, Proto* f) +{ + int i,n; + n=LoadInt(S); + f->upvalues=luaM_newvector(S->L,n,Upvaldesc); + f->sizeupvalues=n; + for (i=0; iupvalues[i].name=NULL; + for (i=0; iupvalues[i].instack=LoadByte(S); + f->upvalues[i].idx=LoadByte(S); + } +} + +static void LoadDebug(LoadState* S, Proto* f) +{ + int i,n; + f->source=LoadString(S); + n=LoadInt(S); + f->lineinfo=luaM_newvector(S->L,n,int); + f->sizelineinfo=n; + LoadVector(S,f->lineinfo,n,sizeof(int)); + n=LoadInt(S); + f->locvars=luaM_newvector(S->L,n,LocVar); + f->sizelocvars=n; + for (i=0; ilocvars[i].varname=NULL; + for (i=0; ilocvars[i].varname=LoadString(S); + f->locvars[i].startpc=LoadInt(S); + f->locvars[i].endpc=LoadInt(S); + } + n=LoadInt(S); + for (i=0; iupvalues[i].name=LoadString(S); +} + +static void LoadFunction(LoadState* S, Proto* f) +{ + f->linedefined=LoadInt(S); + f->lastlinedefined=LoadInt(S); + f->numparams=LoadByte(S); + f->is_vararg=LoadByte(S); + f->maxstacksize=LoadByte(S); + LoadCode(S,f); + LoadConstants(S,f); + LoadUpvalues(S,f); + LoadDebug(S,f); +} + +/* the code below must be consistent with the code in luaU_header */ +#define N0 LUAC_HEADERSIZE +#define N1 (sizeof(LUA_SIGNATURE)-sizeof(char)) +#define N2 N1+2 +#define N3 N2+6 + +static void LoadHeader(LoadState* S) +{ + lu_byte h[LUAC_HEADERSIZE]; + lu_byte s[LUAC_HEADERSIZE]; + luaU_header(h); + memcpy(s,h,sizeof(char)); /* first char already read */ + LoadBlock(S,s+sizeof(char),LUAC_HEADERSIZE-sizeof(char)); + if (memcmp(h,s,N0)==0) return; + if (memcmp(h,s,N1)!=0) error(S,"not a"); + if (memcmp(h,s,N2)!=0) error(S,"version mismatch in"); + if (memcmp(h,s,N3)!=0) error(S,"incompatible"); else error(S,"corrupted"); +} + +/* +** load precompiled chunk +*/ +Closure* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name) +{ + LoadState S; + Closure* cl; + if (*name=='@' || *name=='=') + S.name=name+1; + else if (*name==LUA_SIGNATURE[0]) + S.name="binary string"; + else + S.name=name; + S.L=L; + S.Z=Z; + S.b=buff; + LoadHeader(&S); + cl=luaF_newLclosure(L,1); + setclLvalue(L,L->top,cl); incr_top(L); + cl->l.p=luaF_newproto(L); + LoadFunction(&S,cl->l.p); + if (cl->l.p->sizeupvalues != 1) + { + Proto* p=cl->l.p; + cl=luaF_newLclosure(L,cl->l.p->sizeupvalues); + cl->l.p=p; + setclLvalue(L,L->top-1,cl); + } + luai_verifycode(L,buff,cl->l.p); + return cl; +} + +#define MYINT(s) (s[0]-'0') +#define VERSION MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR) +#define FORMAT 0 /* this is the official format */ + +/* +* make header for precompiled chunks +* if you change the code below be sure to update LoadHeader and FORMAT above +* and LUAC_HEADERSIZE in lundump.h +*/ +void luaU_header (lu_byte* h) +{ + int x=1; + memcpy(h,LUA_SIGNATURE,sizeof(LUA_SIGNATURE)-sizeof(char)); + h+=sizeof(LUA_SIGNATURE)-sizeof(char); + *h++=cast_byte(VERSION); + *h++=cast_byte(FORMAT); + *h++=cast_byte(*(char*)&x); /* endianness */ + *h++=cast_byte(sizeof(int)); + *h++=cast_byte(sizeof(size_t)); + *h++=cast_byte(sizeof(Instruction)); + *h++=cast_byte(sizeof(lua_Number)); + *h++=cast_byte(((lua_Number)0.5)==0); /* is lua_Number integral? */ + memcpy(h,LUAC_TAIL,sizeof(LUAC_TAIL)-sizeof(char)); +} diff --git a/radio/src/lua/src/lundump.h b/radio/src/lua/src/lundump.h new file mode 100644 index 000000000..2b8accecb --- /dev/null +++ b/radio/src/lua/src/lundump.h @@ -0,0 +1,28 @@ +/* +** $Id: lundump.h,v 1.39 2012/05/08 13:53:33 roberto Exp $ +** load precompiled Lua chunks +** See Copyright Notice in lua.h +*/ + +#ifndef lundump_h +#define lundump_h + +#include "lobject.h" +#include "lzio.h" + +/* load one chunk; from lundump.c */ +LUAI_FUNC Closure* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name); + +/* make header; from lundump.c */ +LUAI_FUNC void luaU_header (lu_byte* h); + +/* dump one chunk; from ldump.c */ +LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); + +/* data to catch conversion errors */ +#define LUAC_TAIL "\x19\x93\r\n\x1a\n" + +/* size in bytes of header of binary files */ +#define LUAC_HEADERSIZE (sizeof(LUA_SIGNATURE)-sizeof(char)+2+6+sizeof(LUAC_TAIL)-sizeof(char)) + +#endif diff --git a/radio/src/lua/src/lvm.c b/radio/src/lua/src/lvm.c new file mode 100644 index 000000000..657d5c456 --- /dev/null +++ b/radio/src/lua/src/lvm.c @@ -0,0 +1,867 @@ +/* +** $Id: lvm.c,v 2.155 2013/03/16 21:10:18 roberto Exp $ +** Lua virtual machine +** See Copyright Notice in lua.h +*/ + + +#include +#include +#include + +#define lvm_c +#define LUA_CORE + +#include "lua.h" + +#include "ldebug.h" +#include "ldo.h" +#include "lfunc.h" +#include "lgc.h" +#include "lobject.h" +#include "lopcodes.h" +#include "lstate.h" +#include "lstring.h" +#include "ltable.h" +#include "ltm.h" +#include "lvm.h" + + + +/* limit for table tag-method chains (to avoid loops) */ +#define MAXTAGLOOP 100 + + +const TValue *luaV_tonumber (const TValue *obj, TValue *n) { + lua_Number num; + if (ttisnumber(obj)) return obj; + if (ttisstring(obj) && luaO_str2d(svalue(obj), tsvalue(obj)->len, &num)) { + setnvalue(n, num); + return n; + } + else + return NULL; +} + + +int luaV_tostring (lua_State *L, StkId obj) { + if (!ttisnumber(obj)) + return 0; + else { + char s[LUAI_MAXNUMBER2STR]; + lua_Number n = nvalue(obj); + int l = lua_number2str(s, n); + setsvalue2s(L, obj, luaS_newlstr(L, s, l)); + return 1; + } +} + + +static void traceexec (lua_State *L) { + CallInfo *ci = L->ci; + lu_byte mask = L->hookmask; + int counthook = ((mask & LUA_MASKCOUNT) && L->hookcount == 0); + if (counthook) + resethookcount(L); /* reset count */ + if (ci->callstatus & CIST_HOOKYIELD) { /* called hook last time? */ + ci->callstatus &= ~CIST_HOOKYIELD; /* erase mark */ + return; /* do not call hook again (VM yielded, so it did not move) */ + } + if (counthook) + luaD_hook(L, LUA_HOOKCOUNT, -1); /* call count hook */ + if (mask & LUA_MASKLINE) { + Proto *p = ci_func(ci)->p; + int npc = pcRel(ci->u.l.savedpc, p); + int newline = getfuncline(p, npc); + if (npc == 0 || /* call linehook when enter a new function, */ + ci->u.l.savedpc <= L->oldpc || /* when jump back (loop), or when */ + newline != getfuncline(p, pcRel(L->oldpc, p))) /* enter a new line */ + luaD_hook(L, LUA_HOOKLINE, newline); /* call line hook */ + } + L->oldpc = ci->u.l.savedpc; + if (L->status == LUA_YIELD) { /* did hook yield? */ + if (counthook) + L->hookcount = 1; /* undo decrement to zero */ + ci->u.l.savedpc--; /* undo increment (resume will increment it again) */ + ci->callstatus |= CIST_HOOKYIELD; /* mark that it yielded */ + ci->func = L->top - 1; /* protect stack below results */ + luaD_throw(L, LUA_YIELD); + } +} + + +static void callTM (lua_State *L, const TValue *f, const TValue *p1, + const TValue *p2, TValue *p3, int hasres) { + ptrdiff_t result = savestack(L, p3); + setobj2s(L, L->top++, f); /* push function */ + setobj2s(L, L->top++, p1); /* 1st argument */ + setobj2s(L, L->top++, p2); /* 2nd argument */ + if (!hasres) /* no result? 'p3' is third argument */ + setobj2s(L, L->top++, p3); /* 3rd argument */ + /* metamethod may yield only when called from Lua code */ + luaD_call(L, L->top - (4 - hasres), hasres, isLua(L->ci)); + if (hasres) { /* if has result, move it to its place */ + p3 = restorestack(L, result); + setobjs2s(L, p3, --L->top); + } +} + + +void luaV_gettable (lua_State *L, const TValue *t, TValue *key, StkId val) { + int loop; + for (loop = 0; loop < MAXTAGLOOP; loop++) { + const TValue *tm; + if (ttistable(t)) { /* `t' is a table? */ + Table *h = hvalue(t); + const TValue *res = luaH_get(h, key); /* do a primitive get */ + if (!ttisnil(res) || /* result is not nil? */ + (tm = fasttm(L, h->metatable, TM_INDEX)) == NULL) { /* or no TM? */ + setobj2s(L, val, res); + return; + } + /* else will try the tag method */ + } + else if (ttisnil(tm = luaT_gettmbyobj(L, t, TM_INDEX))) + luaG_typeerror(L, t, "index"); + if (ttisfunction(tm)) { + callTM(L, tm, t, key, val, 1); + return; + } + t = tm; /* else repeat with 'tm' */ + } + luaG_runerror(L, "loop in gettable"); +} + + +void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) { + int loop; + for (loop = 0; loop < MAXTAGLOOP; loop++) { + const TValue *tm; + if (ttistable(t)) { /* `t' is a table? */ + Table *h = hvalue(t); + TValue *oldval = cast(TValue *, luaH_get(h, key)); + /* if previous value is not nil, there must be a previous entry + in the table; moreover, a metamethod has no relevance */ + if (!ttisnil(oldval) || + /* previous value is nil; must check the metamethod */ + ((tm = fasttm(L, h->metatable, TM_NEWINDEX)) == NULL && + /* no metamethod; is there a previous entry in the table? */ + (oldval != luaO_nilobject || + /* no previous entry; must create one. (The next test is + always true; we only need the assignment.) */ + (oldval = luaH_newkey(L, h, key), 1)))) { + /* no metamethod and (now) there is an entry with given key */ + setobj2t(L, oldval, val); /* assign new value to that entry */ + invalidateTMcache(h); + luaC_barrierback(L, obj2gco(h), val); + return; + } + /* else will try the metamethod */ + } + else /* not a table; check metamethod */ + if (ttisnil(tm = luaT_gettmbyobj(L, t, TM_NEWINDEX))) + luaG_typeerror(L, t, "index"); + /* there is a metamethod */ + if (ttisfunction(tm)) { + callTM(L, tm, t, key, val, 0); + return; + } + t = tm; /* else repeat with 'tm' */ + } + luaG_runerror(L, "loop in settable"); +} + + +static int call_binTM (lua_State *L, const TValue *p1, const TValue *p2, + StkId res, TMS event) { + const TValue *tm = luaT_gettmbyobj(L, p1, event); /* try first operand */ + if (ttisnil(tm)) + tm = luaT_gettmbyobj(L, p2, event); /* try second operand */ + if (ttisnil(tm)) return 0; + callTM(L, tm, p1, p2, res, 1); + return 1; +} + + +static const TValue *get_equalTM (lua_State *L, Table *mt1, Table *mt2, + TMS event) { + const TValue *tm1 = fasttm(L, mt1, event); + const TValue *tm2; + if (tm1 == NULL) return NULL; /* no metamethod */ + if (mt1 == mt2) return tm1; /* same metatables => same metamethods */ + tm2 = fasttm(L, mt2, event); + if (tm2 == NULL) return NULL; /* no metamethod */ + if (luaV_rawequalobj(tm1, tm2)) /* same metamethods? */ + return tm1; + return NULL; +} + + +static int call_orderTM (lua_State *L, const TValue *p1, const TValue *p2, + TMS event) { + if (!call_binTM(L, p1, p2, L->top, event)) + return -1; /* no metamethod */ + else + return !l_isfalse(L->top); +} + + +static int l_strcmp (const TString *ls, const TString *rs) { + const char *l = getstr(ls); + size_t ll = ls->tsv.len; + const char *r = getstr(rs); + size_t lr = rs->tsv.len; + for (;;) { + int temp = strcoll(l, r); + if (temp != 0) return temp; + else { /* strings are equal up to a `\0' */ + size_t len = strlen(l); /* index of first `\0' in both strings */ + if (len == lr) /* r is finished? */ + return (len == ll) ? 0 : 1; + else if (len == ll) /* l is finished? */ + return -1; /* l is smaller than r (because r is not finished) */ + /* both strings longer than `len'; go on comparing (after the `\0') */ + len++; + l += len; ll -= len; r += len; lr -= len; + } + } +} + + +int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r) { + int res; + if (ttisnumber(l) && ttisnumber(r)) + return luai_numlt(L, nvalue(l), nvalue(r)); + else if (ttisstring(l) && ttisstring(r)) + return l_strcmp(rawtsvalue(l), rawtsvalue(r)) < 0; + else if ((res = call_orderTM(L, l, r, TM_LT)) < 0) + luaG_ordererror(L, l, r); + return res; +} + + +int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r) { + int res; + if (ttisnumber(l) && ttisnumber(r)) + return luai_numle(L, nvalue(l), nvalue(r)); + else if (ttisstring(l) && ttisstring(r)) + return l_strcmp(rawtsvalue(l), rawtsvalue(r)) <= 0; + else if ((res = call_orderTM(L, l, r, TM_LE)) >= 0) /* first try `le' */ + return res; + else if ((res = call_orderTM(L, r, l, TM_LT)) < 0) /* else try `lt' */ + luaG_ordererror(L, l, r); + return !res; +} + + +/* +** equality of Lua values. L == NULL means raw equality (no metamethods) +*/ +int luaV_equalobj_ (lua_State *L, const TValue *t1, const TValue *t2) { + const TValue *tm; + lua_assert(ttisequal(t1, t2)); + switch (ttype(t1)) { + case LUA_TNIL: return 1; + case LUA_TNUMBER: return luai_numeq(nvalue(t1), nvalue(t2)); + case LUA_TBOOLEAN: return bvalue(t1) == bvalue(t2); /* true must be 1 !! */ + case LUA_TLIGHTUSERDATA: return pvalue(t1) == pvalue(t2); + case LUA_TLCF: return fvalue(t1) == fvalue(t2); + case LUA_TSHRSTR: return eqshrstr(rawtsvalue(t1), rawtsvalue(t2)); + case LUA_TLNGSTR: return luaS_eqlngstr(rawtsvalue(t1), rawtsvalue(t2)); + case LUA_TUSERDATA: { + if (uvalue(t1) == uvalue(t2)) return 1; + else if (L == NULL) return 0; + tm = get_equalTM(L, uvalue(t1)->metatable, uvalue(t2)->metatable, TM_EQ); + break; /* will try TM */ + } + case LUA_TTABLE: { + if (hvalue(t1) == hvalue(t2)) return 1; + else if (L == NULL) return 0; + tm = get_equalTM(L, hvalue(t1)->metatable, hvalue(t2)->metatable, TM_EQ); + break; /* will try TM */ + } + default: + lua_assert(iscollectable(t1)); + return gcvalue(t1) == gcvalue(t2); + } + if (tm == NULL) return 0; /* no TM? */ + callTM(L, tm, t1, t2, L->top, 1); /* call TM */ + return !l_isfalse(L->top); +} + + +void luaV_concat (lua_State *L, int total) { + lua_assert(total >= 2); + do { + StkId top = L->top; + int n = 2; /* number of elements handled in this pass (at least 2) */ + if (!(ttisstring(top-2) || ttisnumber(top-2)) || !tostring(L, top-1)) { + if (!call_binTM(L, top-2, top-1, top-2, TM_CONCAT)) + luaG_concaterror(L, top-2, top-1); + } + else if (tsvalue(top-1)->len == 0) /* second operand is empty? */ + (void)tostring(L, top - 2); /* result is first operand */ + else if (ttisstring(top-2) && tsvalue(top-2)->len == 0) { + setobjs2s(L, top - 2, top - 1); /* result is second op. */ + } + else { + /* at least two non-empty string values; get as many as possible */ + size_t tl = tsvalue(top-1)->len; + char *buffer; + int i; + /* collect total length */ + for (i = 1; i < total && tostring(L, top-i-1); i++) { + size_t l = tsvalue(top-i-1)->len; + if (l >= (MAX_SIZET/sizeof(char)) - tl) + luaG_runerror(L, "string length overflow"); + tl += l; + } + buffer = luaZ_openspace(L, &G(L)->buff, tl); + tl = 0; + n = i; + do { /* concat all strings */ + size_t l = tsvalue(top-i)->len; + memcpy(buffer+tl, svalue(top-i), l * sizeof(char)); + tl += l; + } while (--i > 0); + setsvalue2s(L, top-n, luaS_newlstr(L, buffer, tl)); + } + total -= n-1; /* got 'n' strings to create 1 new */ + L->top -= n-1; /* popped 'n' strings and pushed one */ + } while (total > 1); /* repeat until only 1 result left */ +} + + +void luaV_objlen (lua_State *L, StkId ra, const TValue *rb) { + const TValue *tm; + switch (ttypenv(rb)) { + case LUA_TTABLE: { + Table *h = hvalue(rb); + tm = fasttm(L, h->metatable, TM_LEN); + if (tm) break; /* metamethod? break switch to call it */ + setnvalue(ra, cast_num(luaH_getn(h))); /* else primitive len */ + return; + } + case LUA_TSTRING: { + setnvalue(ra, cast_num(tsvalue(rb)->len)); + return; + } + default: { /* try metamethod */ + tm = luaT_gettmbyobj(L, rb, TM_LEN); + if (ttisnil(tm)) /* no metamethod? */ + luaG_typeerror(L, rb, "get length of"); + break; + } + } + callTM(L, tm, rb, rb, ra, 1); +} + + +void luaV_arith (lua_State *L, StkId ra, const TValue *rb, + const TValue *rc, TMS op) { + TValue tempb, tempc; + const TValue *b, *c; + if ((b = luaV_tonumber(rb, &tempb)) != NULL && + (c = luaV_tonumber(rc, &tempc)) != NULL) { + lua_Number res = luaO_arith(op - TM_ADD + LUA_OPADD, nvalue(b), nvalue(c)); + setnvalue(ra, res); + } + else if (!call_binTM(L, rb, rc, ra, op)) + luaG_aritherror(L, rb, rc); +} + + +/* +** check whether cached closure in prototype 'p' may be reused, that is, +** whether there is a cached closure with the same upvalues needed by +** new closure to be created. +*/ +static Closure *getcached (Proto *p, UpVal **encup, StkId base) { + Closure *c = p->cache; + if (c != NULL) { /* is there a cached closure? */ + int nup = p->sizeupvalues; + Upvaldesc *uv = p->upvalues; + int i; + for (i = 0; i < nup; i++) { /* check whether it has right upvalues */ + TValue *v = uv[i].instack ? base + uv[i].idx : encup[uv[i].idx]->v; + if (c->l.upvals[i]->v != v) + return NULL; /* wrong upvalue; cannot reuse closure */ + } + } + return c; /* return cached closure (or NULL if no cached closure) */ +} + + +/* +** create a new Lua closure, push it in the stack, and initialize +** its upvalues. Note that the call to 'luaC_barrierproto' must come +** before the assignment to 'p->cache', as the function needs the +** original value of that field. +*/ +static void pushclosure (lua_State *L, Proto *p, UpVal **encup, StkId base, + StkId ra) { + int nup = p->sizeupvalues; + Upvaldesc *uv = p->upvalues; + int i; + Closure *ncl = luaF_newLclosure(L, nup); + ncl->l.p = p; + setclLvalue(L, ra, ncl); /* anchor new closure in stack */ + for (i = 0; i < nup; i++) { /* fill in its upvalues */ + if (uv[i].instack) /* upvalue refers to local variable? */ + ncl->l.upvals[i] = luaF_findupval(L, base + uv[i].idx); + else /* get upvalue from enclosing function */ + ncl->l.upvals[i] = encup[uv[i].idx]; + } + luaC_barrierproto(L, p, ncl); + p->cache = ncl; /* save it on cache for reuse */ +} + + +/* +** finish execution of an opcode interrupted by an yield +*/ +void luaV_finishOp (lua_State *L) { + CallInfo *ci = L->ci; + StkId base = ci->u.l.base; + Instruction inst = *(ci->u.l.savedpc - 1); /* interrupted instruction */ + OpCode op = GET_OPCODE(inst); + switch (op) { /* finish its execution */ + case OP_ADD: case OP_SUB: case OP_MUL: case OP_DIV: + case OP_MOD: case OP_POW: case OP_UNM: case OP_LEN: + case OP_GETTABUP: case OP_GETTABLE: case OP_SELF: { + setobjs2s(L, base + GETARG_A(inst), --L->top); + break; + } + case OP_LE: case OP_LT: case OP_EQ: { + int res = !l_isfalse(L->top - 1); + L->top--; + /* metamethod should not be called when operand is K */ + lua_assert(!ISK(GETARG_B(inst))); + if (op == OP_LE && /* "<=" using "<" instead? */ + ttisnil(luaT_gettmbyobj(L, base + GETARG_B(inst), TM_LE))) + res = !res; /* invert result */ + lua_assert(GET_OPCODE(*ci->u.l.savedpc) == OP_JMP); + if (res != GETARG_A(inst)) /* condition failed? */ + ci->u.l.savedpc++; /* skip jump instruction */ + break; + } + case OP_CONCAT: { + StkId top = L->top - 1; /* top when 'call_binTM' was called */ + int b = GETARG_B(inst); /* first element to concatenate */ + int total = cast_int(top - 1 - (base + b)); /* yet to concatenate */ + setobj2s(L, top - 2, top); /* put TM result in proper position */ + if (total > 1) { /* are there elements to concat? */ + L->top = top - 1; /* top is one after last element (at top-2) */ + luaV_concat(L, total); /* concat them (may yield again) */ + } + /* move final result to final position */ + setobj2s(L, ci->u.l.base + GETARG_A(inst), L->top - 1); + L->top = ci->top; /* restore top */ + break; + } + case OP_TFORCALL: { + lua_assert(GET_OPCODE(*ci->u.l.savedpc) == OP_TFORLOOP); + L->top = ci->top; /* correct top */ + break; + } + case OP_CALL: { + if (GETARG_C(inst) - 1 >= 0) /* nresults >= 0? */ + L->top = ci->top; /* adjust results */ + break; + } + case OP_TAILCALL: case OP_SETTABUP: case OP_SETTABLE: + break; + default: lua_assert(0); + } +} + + + +/* +** some macros for common tasks in `luaV_execute' +*/ + +#if !defined luai_runtimecheck +#define luai_runtimecheck(L, c) /* void */ +#endif + + +#define RA(i) (base+GETARG_A(i)) +/* to be used after possible stack reallocation */ +#define RB(i) check_exp(getBMode(GET_OPCODE(i)) == OpArgR, base+GETARG_B(i)) +#define RC(i) check_exp(getCMode(GET_OPCODE(i)) == OpArgR, base+GETARG_C(i)) +#define RKB(i) check_exp(getBMode(GET_OPCODE(i)) == OpArgK, \ + ISK(GETARG_B(i)) ? k+INDEXK(GETARG_B(i)) : base+GETARG_B(i)) +#define RKC(i) check_exp(getCMode(GET_OPCODE(i)) == OpArgK, \ + ISK(GETARG_C(i)) ? k+INDEXK(GETARG_C(i)) : base+GETARG_C(i)) +#define KBx(i) \ + (k + (GETARG_Bx(i) != 0 ? GETARG_Bx(i) - 1 : GETARG_Ax(*ci->u.l.savedpc++))) + + +/* execute a jump instruction */ +#define dojump(ci,i,e) \ + { int a = GETARG_A(i); \ + if (a > 0) luaF_close(L, ci->u.l.base + a - 1); \ + ci->u.l.savedpc += GETARG_sBx(i) + e; } + +/* for test instructions, execute the jump instruction that follows it */ +#define donextjump(ci) { i = *ci->u.l.savedpc; dojump(ci, i, 1); } + + +#define Protect(x) { {x;}; base = ci->u.l.base; } + +#define checkGC(L,c) \ + Protect( luaC_condGC(L,{L->top = (c); /* limit of live values */ \ + luaC_step(L); \ + L->top = ci->top;}) /* restore top */ \ + luai_threadyield(L); ) + + +#define arith_op(op,tm) { \ + TValue *rb = RKB(i); \ + TValue *rc = RKC(i); \ + if (ttisnumber(rb) && ttisnumber(rc)) { \ + lua_Number nb = nvalue(rb), nc = nvalue(rc); \ + setnvalue(ra, op(L, nb, nc)); \ + } \ + else { Protect(luaV_arith(L, ra, rb, rc, tm)); } } + + +#define vmdispatch(o) switch(o) +#define vmcase(l,b) case l: {b} break; +#define vmcasenb(l,b) case l: {b} /* nb = no break */ + +void luaV_execute (lua_State *L) { + CallInfo *ci = L->ci; + LClosure *cl; + TValue *k; + StkId base; + newframe: /* reentry point when frame changes (call/return) */ + lua_assert(ci == L->ci); + cl = clLvalue(ci->func); + k = cl->p->k; + base = ci->u.l.base; + /* main loop of interpreter */ + for (;;) { + Instruction i = *(ci->u.l.savedpc++); + StkId ra; + if ((L->hookmask & (LUA_MASKLINE | LUA_MASKCOUNT)) && + (--L->hookcount == 0 || L->hookmask & LUA_MASKLINE)) { + Protect(traceexec(L)); + } + /* WARNING: several calls may realloc the stack and invalidate `ra' */ + ra = RA(i); + lua_assert(base == ci->u.l.base); + lua_assert(base <= L->top && L->top < L->stack + L->stacksize); + vmdispatch (GET_OPCODE(i)) { + vmcase(OP_MOVE, + setobjs2s(L, ra, RB(i)); + ) + vmcase(OP_LOADK, + TValue *rb = k + GETARG_Bx(i); + setobj2s(L, ra, rb); + ) + vmcase(OP_LOADKX, + TValue *rb; + lua_assert(GET_OPCODE(*ci->u.l.savedpc) == OP_EXTRAARG); + rb = k + GETARG_Ax(*ci->u.l.savedpc++); + setobj2s(L, ra, rb); + ) + vmcase(OP_LOADBOOL, + setbvalue(ra, GETARG_B(i)); + if (GETARG_C(i)) ci->u.l.savedpc++; /* skip next instruction (if C) */ + ) + vmcase(OP_LOADNIL, + int b = GETARG_B(i); + do { + setnilvalue(ra++); + } while (b--); + ) + vmcase(OP_GETUPVAL, + int b = GETARG_B(i); + setobj2s(L, ra, cl->upvals[b]->v); + ) + vmcase(OP_GETTABUP, + int b = GETARG_B(i); + Protect(luaV_gettable(L, cl->upvals[b]->v, RKC(i), ra)); + ) + vmcase(OP_GETTABLE, + Protect(luaV_gettable(L, RB(i), RKC(i), ra)); + ) + vmcase(OP_SETTABUP, + int a = GETARG_A(i); + Protect(luaV_settable(L, cl->upvals[a]->v, RKB(i), RKC(i))); + ) + vmcase(OP_SETUPVAL, + UpVal *uv = cl->upvals[GETARG_B(i)]; + setobj(L, uv->v, ra); + luaC_barrier(L, uv, ra); + ) + vmcase(OP_SETTABLE, + Protect(luaV_settable(L, ra, RKB(i), RKC(i))); + ) + vmcase(OP_NEWTABLE, + int b = GETARG_B(i); + int c = GETARG_C(i); + Table *t = luaH_new(L); + sethvalue(L, ra, t); + if (b != 0 || c != 0) + luaH_resize(L, t, luaO_fb2int(b), luaO_fb2int(c)); + checkGC(L, ra + 1); + ) + vmcase(OP_SELF, + StkId rb = RB(i); + setobjs2s(L, ra+1, rb); + Protect(luaV_gettable(L, rb, RKC(i), ra)); + ) + vmcase(OP_ADD, + arith_op(luai_numadd, TM_ADD); + ) + vmcase(OP_SUB, + arith_op(luai_numsub, TM_SUB); + ) + vmcase(OP_MUL, + arith_op(luai_nummul, TM_MUL); + ) + vmcase(OP_DIV, + arith_op(luai_numdiv, TM_DIV); + ) + vmcase(OP_MOD, + arith_op(luai_nummod, TM_MOD); + ) + vmcase(OP_POW, + arith_op(luai_numpow, TM_POW); + ) + vmcase(OP_UNM, + TValue *rb = RB(i); + if (ttisnumber(rb)) { + lua_Number nb = nvalue(rb); + setnvalue(ra, luai_numunm(L, nb)); + } + else { + Protect(luaV_arith(L, ra, rb, rb, TM_UNM)); + } + ) + vmcase(OP_NOT, + TValue *rb = RB(i); + int res = l_isfalse(rb); /* next assignment may change this value */ + setbvalue(ra, res); + ) + vmcase(OP_LEN, + Protect(luaV_objlen(L, ra, RB(i))); + ) + vmcase(OP_CONCAT, + int b = GETARG_B(i); + int c = GETARG_C(i); + StkId rb; + L->top = base + c + 1; /* mark the end of concat operands */ + Protect(luaV_concat(L, c - b + 1)); + ra = RA(i); /* 'luav_concat' may invoke TMs and move the stack */ + rb = b + base; + setobjs2s(L, ra, rb); + checkGC(L, (ra >= rb ? ra + 1 : rb)); + L->top = ci->top; /* restore top */ + ) + vmcase(OP_JMP, + dojump(ci, i, 0); + ) + vmcase(OP_EQ, + TValue *rb = RKB(i); + TValue *rc = RKC(i); + Protect( + if (cast_int(equalobj(L, rb, rc)) != GETARG_A(i)) + ci->u.l.savedpc++; + else + donextjump(ci); + ) + ) + vmcase(OP_LT, + Protect( + if (luaV_lessthan(L, RKB(i), RKC(i)) != GETARG_A(i)) + ci->u.l.savedpc++; + else + donextjump(ci); + ) + ) + vmcase(OP_LE, + Protect( + if (luaV_lessequal(L, RKB(i), RKC(i)) != GETARG_A(i)) + ci->u.l.savedpc++; + else + donextjump(ci); + ) + ) + vmcase(OP_TEST, + if (GETARG_C(i) ? l_isfalse(ra) : !l_isfalse(ra)) + ci->u.l.savedpc++; + else + donextjump(ci); + ) + vmcase(OP_TESTSET, + TValue *rb = RB(i); + if (GETARG_C(i) ? l_isfalse(rb) : !l_isfalse(rb)) + ci->u.l.savedpc++; + else { + setobjs2s(L, ra, rb); + donextjump(ci); + } + ) + vmcase(OP_CALL, + int b = GETARG_B(i); + int nresults = GETARG_C(i) - 1; + if (b != 0) L->top = ra+b; /* else previous instruction set top */ + if (luaD_precall(L, ra, nresults)) { /* C function? */ + if (nresults >= 0) L->top = ci->top; /* adjust results */ + base = ci->u.l.base; + } + else { /* Lua function */ + ci = L->ci; + ci->callstatus |= CIST_REENTRY; + goto newframe; /* restart luaV_execute over new Lua function */ + } + ) + vmcase(OP_TAILCALL, + int b = GETARG_B(i); + if (b != 0) L->top = ra+b; /* else previous instruction set top */ + lua_assert(GETARG_C(i) - 1 == LUA_MULTRET); + if (luaD_precall(L, ra, LUA_MULTRET)) /* C function? */ + base = ci->u.l.base; + else { + /* tail call: put called frame (n) in place of caller one (o) */ + CallInfo *nci = L->ci; /* called frame */ + CallInfo *oci = nci->previous; /* caller frame */ + StkId nfunc = nci->func; /* called function */ + StkId ofunc = oci->func; /* caller function */ + /* last stack slot filled by 'precall' */ + StkId lim = nci->u.l.base + getproto(nfunc)->numparams; + int aux; + /* close all upvalues from previous call */ + if (cl->p->sizep > 0) luaF_close(L, oci->u.l.base); + /* move new frame into old one */ + for (aux = 0; nfunc + aux < lim; aux++) + setobjs2s(L, ofunc + aux, nfunc + aux); + oci->u.l.base = ofunc + (nci->u.l.base - nfunc); /* correct base */ + oci->top = L->top = ofunc + (L->top - nfunc); /* correct top */ + oci->u.l.savedpc = nci->u.l.savedpc; + oci->callstatus |= CIST_TAIL; /* function was tail called */ + ci = L->ci = oci; /* remove new frame */ + lua_assert(L->top == oci->u.l.base + getproto(ofunc)->maxstacksize); + goto newframe; /* restart luaV_execute over new Lua function */ + } + ) + vmcasenb(OP_RETURN, + int b = GETARG_B(i); + if (b != 0) L->top = ra+b-1; + if (cl->p->sizep > 0) luaF_close(L, base); + b = luaD_poscall(L, ra); + if (!(ci->callstatus & CIST_REENTRY)) /* 'ci' still the called one */ + return; /* external invocation: return */ + else { /* invocation via reentry: continue execution */ + ci = L->ci; + if (b) L->top = ci->top; + lua_assert(isLua(ci)); + lua_assert(GET_OPCODE(*((ci)->u.l.savedpc - 1)) == OP_CALL); + goto newframe; /* restart luaV_execute over new Lua function */ + } + ) + vmcase(OP_FORLOOP, + lua_Number step = nvalue(ra+2); + lua_Number idx = luai_numadd(L, nvalue(ra), step); /* increment index */ + lua_Number limit = nvalue(ra+1); + if (luai_numlt(L, 0, step) ? luai_numle(L, idx, limit) + : luai_numle(L, limit, idx)) { + ci->u.l.savedpc += GETARG_sBx(i); /* jump back */ + setnvalue(ra, idx); /* update internal index... */ + setnvalue(ra+3, idx); /* ...and external index */ + } + ) + vmcase(OP_FORPREP, + const TValue *init = ra; + const TValue *plimit = ra+1; + const TValue *pstep = ra+2; + if (!tonumber(init, ra)) + luaG_runerror(L, LUA_QL("for") " initial value must be a number"); + else if (!tonumber(plimit, ra+1)) + luaG_runerror(L, LUA_QL("for") " limit must be a number"); + else if (!tonumber(pstep, ra+2)) + luaG_runerror(L, LUA_QL("for") " step must be a number"); + setnvalue(ra, luai_numsub(L, nvalue(ra), nvalue(pstep))); + ci->u.l.savedpc += GETARG_sBx(i); + ) + vmcasenb(OP_TFORCALL, + StkId cb = ra + 3; /* call base */ + setobjs2s(L, cb+2, ra+2); + setobjs2s(L, cb+1, ra+1); + setobjs2s(L, cb, ra); + L->top = cb + 3; /* func. + 2 args (state and index) */ + Protect(luaD_call(L, cb, GETARG_C(i), 1)); + L->top = ci->top; + i = *(ci->u.l.savedpc++); /* go to next instruction */ + ra = RA(i); + lua_assert(GET_OPCODE(i) == OP_TFORLOOP); + goto l_tforloop; + ) + vmcase(OP_TFORLOOP, + l_tforloop: + if (!ttisnil(ra + 1)) { /* continue loop? */ + setobjs2s(L, ra, ra + 1); /* save control variable */ + ci->u.l.savedpc += GETARG_sBx(i); /* jump back */ + } + ) + vmcase(OP_SETLIST, + int n = GETARG_B(i); + int c = GETARG_C(i); + int last; + Table *h; + if (n == 0) n = cast_int(L->top - ra) - 1; + if (c == 0) { + lua_assert(GET_OPCODE(*ci->u.l.savedpc) == OP_EXTRAARG); + c = GETARG_Ax(*ci->u.l.savedpc++); + } + luai_runtimecheck(L, ttistable(ra)); + h = hvalue(ra); + last = ((c-1)*LFIELDS_PER_FLUSH) + n; + if (last > h->sizearray) /* needs more space? */ + luaH_resizearray(L, h, last); /* pre-allocate it at once */ + for (; n > 0; n--) { + TValue *val = ra+n; + luaH_setint(L, h, last--, val); + luaC_barrierback(L, obj2gco(h), val); + } + L->top = ci->top; /* correct top (in case of previous open call) */ + ) + vmcase(OP_CLOSURE, + Proto *p = cl->p->p[GETARG_Bx(i)]; + Closure *ncl = getcached(p, cl->upvals, base); /* cached closure */ + if (ncl == NULL) /* no match? */ + pushclosure(L, p, cl->upvals, base, ra); /* create a new one */ + else + setclLvalue(L, ra, ncl); /* push cashed closure */ + checkGC(L, ra + 1); + ) + vmcase(OP_VARARG, + int b = GETARG_B(i) - 1; + int j; + int n = cast_int(base - ci->func) - cl->p->numparams - 1; + if (b < 0) { /* B == 0? */ + b = n; /* get all var. arguments */ + Protect(luaD_checkstack(L, n)); + ra = RA(i); /* previous call may change the stack */ + L->top = ra + n; + } + for (j = 0; j < b; j++) { + if (j < n) { + setobjs2s(L, ra + j, base - n + j); + } + else { + setnilvalue(ra + j); + } + } + ) + vmcase(OP_EXTRAARG, + lua_assert(0); + ) + } + } +} + diff --git a/radio/src/lua/src/lvm.h b/radio/src/lua/src/lvm.h new file mode 100644 index 000000000..07e25f9c6 --- /dev/null +++ b/radio/src/lua/src/lvm.h @@ -0,0 +1,44 @@ +/* +** $Id: lvm.h,v 2.18 2013/01/08 14:06:55 roberto Exp $ +** Lua virtual machine +** See Copyright Notice in lua.h +*/ + +#ifndef lvm_h +#define lvm_h + + +#include "ldo.h" +#include "lobject.h" +#include "ltm.h" + + +#define tostring(L,o) (ttisstring(o) || (luaV_tostring(L, o))) + +#define tonumber(o,n) (ttisnumber(o) || (((o) = luaV_tonumber(o,n)) != NULL)) + +#define equalobj(L,o1,o2) (ttisequal(o1, o2) && luaV_equalobj_(L, o1, o2)) + +#define luaV_rawequalobj(o1,o2) equalobj(NULL,o1,o2) + + +/* not to called directly */ +LUAI_FUNC int luaV_equalobj_ (lua_State *L, const TValue *t1, const TValue *t2); + + +LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r); +LUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r); +LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n); +LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj); +LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key, + StkId val); +LUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key, + StkId val); +LUAI_FUNC void luaV_finishOp (lua_State *L); +LUAI_FUNC void luaV_execute (lua_State *L); +LUAI_FUNC void luaV_concat (lua_State *L, int total); +LUAI_FUNC void luaV_arith (lua_State *L, StkId ra, const TValue *rb, + const TValue *rc, TMS op); +LUAI_FUNC void luaV_objlen (lua_State *L, StkId ra, const TValue *rb); + +#endif diff --git a/radio/src/lua/src/lzio.c b/radio/src/lua/src/lzio.c new file mode 100644 index 000000000..8b77054e0 --- /dev/null +++ b/radio/src/lua/src/lzio.c @@ -0,0 +1,76 @@ +/* +** $Id: lzio.c,v 1.35 2012/05/14 13:34:18 roberto Exp $ +** Buffered streams +** See Copyright Notice in lua.h +*/ + + +#include + +#define lzio_c +#define LUA_CORE + +#include "lua.h" + +#include "llimits.h" +#include "lmem.h" +#include "lstate.h" +#include "lzio.h" + + +int luaZ_fill (ZIO *z) { + size_t size; + lua_State *L = z->L; + const char *buff; + lua_unlock(L); + buff = z->reader(L, z->data, &size); + lua_lock(L); + if (buff == NULL || size == 0) + return EOZ; + z->n = size - 1; /* discount char being returned */ + z->p = buff; + return cast_uchar(*(z->p++)); +} + + +void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, void *data) { + z->L = L; + z->reader = reader; + z->data = data; + z->n = 0; + z->p = NULL; +} + + +/* --------------------------------------------------------------- read --- */ +size_t luaZ_read (ZIO *z, void *b, size_t n) { + while (n) { + size_t m; + if (z->n == 0) { /* no bytes in buffer? */ + if (luaZ_fill(z) == EOZ) /* try to read more */ + return n; /* no more input; return number of missing bytes */ + else { + z->n++; /* luaZ_fill consumed first byte; put it back */ + z->p--; + } + } + m = (n <= z->n) ? n : z->n; /* min. between n and z->n */ + memcpy(b, z->p, m); + z->n -= m; + z->p += m; + b = (char *)b + m; + n -= m; + } + return 0; +} + +/* ------------------------------------------------------------------------ */ +char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n) { + if (n > buff->buffsize) { + if (n < LUA_MINBUFFER) n = LUA_MINBUFFER; + luaZ_resizebuffer(L, buff, n); + } + return buff->buffer; +} + + diff --git a/radio/src/lua/src/lzio.h b/radio/src/lua/src/lzio.h new file mode 100644 index 000000000..08682301e --- /dev/null +++ b/radio/src/lua/src/lzio.h @@ -0,0 +1,65 @@ +/* +** $Id: lzio.h,v 1.26 2011/07/15 12:48:03 roberto Exp $ +** Buffered streams +** See Copyright Notice in lua.h +*/ + + +#ifndef lzio_h +#define lzio_h + +#include "lua.h" + +#include "lmem.h" + + +#define EOZ (-1) /* end of stream */ + +typedef struct Zio ZIO; + +#define zgetc(z) (((z)->n--)>0 ? cast_uchar(*(z)->p++) : luaZ_fill(z)) + + +typedef struct Mbuffer { + char *buffer; + size_t n; + size_t buffsize; +} Mbuffer; + +#define luaZ_initbuffer(L, buff) ((buff)->buffer = NULL, (buff)->buffsize = 0) + +#define luaZ_buffer(buff) ((buff)->buffer) +#define luaZ_sizebuffer(buff) ((buff)->buffsize) +#define luaZ_bufflen(buff) ((buff)->n) + +#define luaZ_resetbuffer(buff) ((buff)->n = 0) + + +#define luaZ_resizebuffer(L, buff, size) \ + (luaM_reallocvector(L, (buff)->buffer, (buff)->buffsize, size, char), \ + (buff)->buffsize = size) + +#define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0) + + +LUAI_FUNC char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n); +LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, + void *data); +LUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */ + + + +/* --------- Private Part ------------------ */ + +struct Zio { + size_t n; /* bytes still unread */ + const char *p; /* current position in buffer */ + lua_Reader reader; /* reader function */ + void* data; /* additional data */ + lua_State *L; /* Lua state (for reader) */ +}; + + +LUAI_FUNC int luaZ_fill (ZIO *z); + +#endif diff --git a/radio/src/maths.cpp b/radio/src/maths.cpp index 6cee8d2d7..66ccea7a4 100644 --- a/radio/src/maths.cpp +++ b/radio/src/maths.cpp @@ -105,7 +105,7 @@ void getGpsDistance() dist = frskyData.hub.distFromEarthAxis * angle / 1000000; result += dist*dist; - dist = abs(frskyData.hub.baroAltitudeOffset ? TELEMETRY_ALT_BP : TELEMETRY_GPS_ALT_BP); + dist = abs(TELEMETRY_BARO_ALT_AVAILABLE() ? TELEMETRY_RELATIVE_BARO_ALT_BP : TELEMETRY_RELATIVE_GPS_ALT_BP); result += dist*dist; frskyData.hub.gpsDistance = isqrt32(result); @@ -114,13 +114,61 @@ void getGpsDistance() } #endif -#if defined(FRSKY) && defined(VARIO) +#if defined(CPUARM) + +void varioWakeup() +{ + if (isFunctionActive(FUNCTION_VARIO)) { + int varioFreq, varioDuration, varioPause=0; + uint8_t varioFlags; + + int verticalSpeed = frskyData.hub.varioSpeed; + +#if 0 + if (g_model.frsky.varioSource == VARIO_SOURCE_DTE) { + #warning "Ele stick for vario tests" + verticalSpeed = getValue(MIXSRC_Ele); + } +#endif + + int varioCenterMin = (int)g_model.frsky.varioCenterMin * 10 - 50; + int varioCenterMax = (int)g_model.frsky.varioCenterMax * 10 + 50; + int varioMax = (10+(int)g_model.frsky.varioMax) * 100; + int varioMin = (-10+(int)g_model.frsky.varioMin) * 100; + + if (verticalSpeed > varioMax) + verticalSpeed = varioMax; + else if (verticalSpeed < varioMin) + verticalSpeed = varioMin; + + if (verticalSpeed > varioCenterMin) { + varioFreq = VARIO_FREQUENCY_ZERO + (g_eeGeneral.varioPitch*10) + (((VARIO_FREQUENCY_RANGE+(g_eeGeneral.varioRange*10)) * (verticalSpeed-varioCenterMin)) / varioMax); + int varioPeriod = VARIO_REPEAT_MAX + ((VARIO_REPEAT_ZERO+(g_eeGeneral.varioRepeat*10)-VARIO_REPEAT_MAX) * (varioMax-verticalSpeed) * (varioMax-verticalSpeed)) / ((varioMax-varioCenterMin) * (varioMax-varioCenterMin)); + if (verticalSpeed >= varioCenterMax || varioCenterMin == varioCenterMax) + varioDuration = varioPeriod / 5; + else + varioDuration = varioPeriod * (85 - (((verticalSpeed-varioCenterMin) * 25) / (varioCenterMax-varioCenterMin))) / 100; + varioPause = varioPeriod - varioDuration; + varioFlags = PLAY_BACKGROUND; + } + else { + varioFreq = VARIO_FREQUENCY_ZERO + (g_eeGeneral.varioPitch*10) - (((VARIO_FREQUENCY_ZERO+(g_eeGeneral.varioPitch*10)-((VARIO_FREQUENCY_ZERO + (g_eeGeneral.varioPitch*10))/2)) * (verticalSpeed-varioCenterMin)) / varioMin); + varioDuration = 80; // continuous beep: we will enter again here before the tone ends + varioFlags = PLAY_BACKGROUND|PLAY_NOW; + } + + AUDIO_VARIO(varioFreq, varioDuration, varioPause, varioFlags); + } +} + +#elif defined(FRSKY) && defined(VARIO) + void varioWakeup() { static tmr10ms_t s_varioTmr; tmr10ms_t tmr10ms = get_tmr10ms(); - if (isFunctionActive(FUNC_VARIO)) { + if (isFunctionActive(FUNCTION_VARIO)) { #if defined(AUDIO) cli(); int16_t verticalSpeed = frskyData.hub.varioSpeed; @@ -135,64 +183,35 @@ void varioWakeup() verticalSpeed = (verticalSpeed * 10) / ((varioMax-varioCenterMax) / 100); if ((int16_t)(s_varioTmr-tmr10ms) < 0) { - uint8_t SoundVarioBeepTime = (1600 - verticalSpeed) / 100; - uint8_t SoundVarioBeepFreq = (verticalSpeed * 10 + 16000) >> 8; - s_varioTmr = tmr10ms + (SoundVarioBeepTime*2); - AUDIO_VARIO(SoundVarioBeepFreq, SoundVarioBeepTime); + uint8_t varioFreq = (verticalSpeed * 10 + 16000) >> 8; + uint8_t varioDuration = (1600 - verticalSpeed) / 100; + s_varioTmr = tmr10ms + (varioDuration*2); + AUDIO_VARIO(varioFreq, varioDuration); } } #else - int16_t varioCenterMax = (int16_t)g_model.frsky.varioCenterMax * 10 + 50; - if (verticalSpeed >= varioCenterMax) { - verticalSpeed = verticalSpeed - varioCenterMax; - int16_t varioMax = (10+(int16_t)g_model.frsky.varioMax) * 100; - if (verticalSpeed > varioMax) verticalSpeed = varioMax; - verticalSpeed = (verticalSpeed * 10) / ((varioMax-varioCenterMax) / 100); - } - else { - int16_t varioCenterMin = (int16_t)g_model.frsky.varioCenterMin * 10 - 50; - if (verticalSpeed <= varioCenterMin) { - verticalSpeed = verticalSpeed - varioCenterMin; - int16_t varioMin = (-10+(int16_t)g_model.frsky.varioMin) * 100; - if (verticalSpeed < varioMin) verticalSpeed = varioMin; - verticalSpeed = (verticalSpeed * 10) / ((varioCenterMin-varioMin) / 100); - } - else { - return; - } - } + int varioCenterMin = (int)g_model.frsky.varioCenterMin * 10 - 50; + int varioCenterMax = (int)g_model.frsky.varioCenterMax * 10 + 50; + int varioMax = (10+(int)g_model.frsky.varioMax) * 100; + int varioMin = (-10+(int)g_model.frsky.varioMin) * 100; - if (verticalSpeed < 0 || (int16_t)(s_varioTmr-tmr10ms) < 0) { -#if defined(CPUARM) - uint16_t SoundVarioBeepTime; - uint16_t SoundVarioBeepFreq; + if (verticalSpeed < varioCenterMin || (verticalSpeed > varioCenterMax && (int16_t)(s_varioTmr - tmr10ms) < 0)) { + if (verticalSpeed > varioMax) + verticalSpeed = varioMax; + else if (verticalSpeed < varioMin) + verticalSpeed = varioMin; + + uint8_t varioFreq, varioDuration; if (verticalSpeed > 0) { - if (verticalSpeed > 1276) { - SoundVarioBeepTime=5; - } else { - SoundVarioBeepTime = 320 - (verticalSpeed >> 2); - } - SoundVarioBeepFreq = 1000 + verticalSpeed; + varioFreq = (verticalSpeed * 4 + 8000) >> 7; + varioDuration = (8000 - verticalSpeed * 5) / 100; } else { - SoundVarioBeepTime = 80; - SoundVarioBeepFreq = (verticalSpeed * 3 + 8000) >> 3; + varioFreq = (verticalSpeed * 3 + 8000) >> 7; + varioDuration = 20; } - s_varioTmr = tmr10ms + (SoundVarioBeepTime/5); -#else - uint8_t SoundVarioBeepTime; - uint8_t SoundVarioBeepFreq; - if (verticalSpeed > 0) { - SoundVarioBeepTime = (8000 - verticalSpeed * 5) / 100; - SoundVarioBeepFreq = (verticalSpeed * 4 + 8000) >> 7; - } - else { - SoundVarioBeepTime = 20; - SoundVarioBeepFreq = (verticalSpeed * 3 + 8000) >> 7; - } - s_varioTmr = tmr10ms + (SoundVarioBeepTime/2); -#endif - AUDIO_VARIO(SoundVarioBeepFreq, SoundVarioBeepTime); + s_varioTmr = tmr10ms + (varioDuration/2); + AUDIO_VARIO(varioFreq, varioDuration); } #endif @@ -224,4 +243,5 @@ void varioWakeup() s_varioTmr = tmr10ms; } } + #endif diff --git a/radio/src/myeeprom.h b/radio/src/myeeprom.h index bbf184de6..ba722512f 100644 --- a/radio/src/myeeprom.h +++ b/radio/src/myeeprom.h @@ -68,50 +68,67 @@ #endif #if defined(PCBTARANIS) - #define MAX_MODELS 60 - #define NUM_CHNOUT 32 // number of real output channels CH1-CH32 - #define MAX_PHASES 9 - #define MAX_MIXERS 64 - #define MAX_EXPOS 64 - #define NUM_CSW 32 // number of custom switches - #define NUM_CFN 32 // number of functions assigned to switches - #define MAX_SCRIPTS 3 - #define MAX_INPUTS 32 + #define MAX_MODELS 60 + #define NUM_CHNOUT 32 // number of real output channels CH1-CH32 + #define MAX_PHASES 9 + #define MAX_MIXERS 64 + #define MAX_EXPOS 64 + #define NUM_CSW 32 // number of custom switches + #define NUM_CFN 64 // number of functions assigned to switches + #define MAX_SCRIPTS 7 + #define MAX_INPUTS 32 + #define NUM_PPM 16 + #define NUM_POTS 5 + #define NUM_XPOTS 3 #elif defined(CPUARM) - #define MAX_MODELS 60 - #define NUM_CHNOUT 32 // number of real output channels CH1-CH32 - #define MAX_PHASES 9 - #define MAX_MIXERS 64 - #define MAX_EXPOS 32 - #define NUM_CSW 32 // number of custom switches - #define NUM_CFN 32 // number of functions assigned to switches + #define MAX_MODELS 60 + #define NUM_CHNOUT 32 // number of real output channels CH1-CH32 + #define MAX_PHASES 9 + #define MAX_MIXERS 64 + #define MAX_EXPOS 32 + #define NUM_CSW 32 // number of custom switches + #define NUM_CFN 64 // number of functions assigned to switches + #define NUM_PPM 16 + #define NUM_POTS 3 + #define NUM_XPOTS 0 #elif defined(CPUM2560) || defined(CPUM2561) - #define MAX_MODELS 30 - #define NUM_CHNOUT 16 // number of real output channels CH1-CH16 - #define MAX_PHASES 6 - #define MAX_MIXERS 32 - #define MAX_EXPOS 16 - #define NUM_CSW 15 // number of custom switches - #define NUM_CFN 24 // number of functions assigned to switches + #define MAX_MODELS 30 + #define NUM_CHNOUT 16 // number of real output channels CH1-CH16 + #define MAX_PHASES 6 + #define MAX_MIXERS 32 + #define MAX_EXPOS 16 + #define NUM_CSW 15 // number of custom switches + #define NUM_CFN 24 // number of functions assigned to switches + #define NUM_PPM 8 + #define NUM_POTS 3 + #define NUM_XPOTS 0 #elif defined(CPUM128) - #define MAX_MODELS 30 - #define NUM_CHNOUT 16 // number of real output channels CH1-CH16 - #define MAX_PHASES 5 - #define MAX_MIXERS 32 - #define MAX_EXPOS 14 - #define NUM_CSW 15 // number of custom switches - #define NUM_CFN 24 // number of functions assigned to switches + #define MAX_MODELS 30 + #define NUM_CHNOUT 16 // number of real output channels CH1-CH16 + #define MAX_PHASES 5 + #define MAX_MIXERS 32 + #define MAX_EXPOS 14 + #define NUM_CSW 15 // number of custom switches + #define NUM_CFN 24 // number of functions assigned to switches + #define NUM_PPM 8 + #define NUM_POTS 3 + #define NUM_XPOTS 0 #else - #define MAX_MODELS 16 - #define NUM_CHNOUT 16 // number of real output channels CH1-CH16 - #define MAX_PHASES 5 - #define MAX_MIXERS 32 - #define MAX_EXPOS 14 - #define NUM_CSW 12 // number of custom switches - #define NUM_CFN 16 // number of functions assigned to switches + #define MAX_MODELS 16 + #define NUM_CHNOUT 16 // number of real output channels CH1-CH16 + #define MAX_PHASES 5 + #define MAX_MIXERS 32 + #define MAX_EXPOS 14 + #define NUM_CSW 12 // number of custom switches + #define NUM_CFN 16 // number of functions assigned to switches + #define NUM_PPM 8 + #define NUM_POTS 3 + #define NUM_XPOTS 0 #endif #define MAX_TIMERS 2 +#define NUM_CYC 3 +#define NUM_CAL_PPM 4 #if defined(PCBTARANIS) enum CurveType { @@ -221,7 +238,7 @@ enum BeeperMode { }; #if defined(CPUARM) - #define EXTRA_GENERAL_FIELDS \ + #define EXTRA_GENERAL_FIELDS_ARM \ uint8_t backlightBright; \ int8_t currentCalib; \ int8_t temperatureWarn; \ @@ -239,7 +256,30 @@ enum BeeperMode { int8_t beepVolume; \ int8_t wavVolume; \ int8_t varioVolume; \ + int8_t varioPitch; \ + int8_t varioRange; \ + int8_t varioRepeat; \ int8_t backgroundVolume; +#endif + +#if defined(PCBTARANIS) +enum uartModes { + UART_MODE_NONE, + UART_MODE_SPORT, +// UART_MODE_VIRTUAL_SP2UART, +#if defined(DEBUG) + UART_MODE_DEBUG, +#endif + UART_MODE_COUNT, + UART_MODE_MAX = UART_MODE_COUNT-1 +}; + +#define EXTRA_GENERAL_FIELDS \ + EXTRA_GENERAL_FIELDS_ARM \ + uint8_t uart3Mode; \ + uint8_t potsType; +#elif defined(CPUARM) + #define EXTRA_GENERAL_FIELDS EXTRA_GENERAL_FIELDS_ARM #elif defined(PXX) #define EXTRA_GENERAL_FIELDS uint8_t countryCode; #else @@ -274,17 +314,17 @@ 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]; + #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 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]; + #define MODELDATA_EXTRA ModuleData moduleData[NUM_MODULES]; uint8_t nPotsToWarn; int8_t potPosition[NUM_POTS]; #define LIMITDATA_EXTRA #define swstate_t uint8_t #else #define MODELDATA_BITMAP - #define MODELDATA_EXTRA + #define MODELDATA_EXTRA #define LIMITDATA_EXTRA #define swstate_t uint8_t #endif @@ -303,13 +343,26 @@ enum BacklightMode { #define SPLASH_MODE uint8_t splashMode:1; uint8_t spare4:2 #endif +#define XPOTS_MULTIPOS_COUNT 6 + +#if defined(PCBTARANIS) +PACK(typedef struct { + uint8_t count; + uint8_t steps[XPOTS_MULTIPOS_COUNT-1]; +}) StepsCalibData; +#endif + +PACK(typedef struct { + int16_t mid; + int16_t spanNeg; + int16_t spanPos; +}) CalibData; + #define ALTERNATE_VIEW 0x10 PACK(typedef struct t_EEGeneral { uint8_t version; uint16_t variant; - int16_t calibMid[NUM_STICKS+NUM_POTS]; - int16_t calibSpanNeg[NUM_STICKS+NUM_POTS]; - int16_t calibSpanPos[NUM_STICKS+NUM_POTS]; + CalibData calib[NUM_STICKS+NUM_POTS]; uint16_t chkSum; int8_t currModel; uint8_t contrast; @@ -487,6 +540,16 @@ PACK(typedef struct t_LimitData { #define MLTPX_REP 2 #if defined(CPUARM) +// highest bit used for small values in mix 128 --> 8 bit is enough +#define GV1_SMALL 128 +// highest bit used for large values in mix 4096 --> 12 bits is used (type for weight and offset has even 16 bits) +#define GV1_LARGE 4096 +// the define GV1_LARGE marks the highest bit value used for this variables +// because this would give too big numbers for ARM, we limit it further for offset and weight +// must be smaller than GV1_LARGE - RESERVE_RANGE_FOR_GVARS -1 +#define GV_RANGE_WEIGHT 500 +#define GV_RANGE_OFFSET 500 + #define DELAY_STEP 10 #define SLOW_STEP 10 #define DELAY_MAX (25*DELAY_STEP) /* 25 seconds */ @@ -552,6 +615,12 @@ PACK( union u_int8int16_t { // #define MD_SETOFFSET(md, val) md->offset = val #else + +// highest bit used for small values in mix 128 --> 8 bit is enough +#define GV1_SMALL 128 +// highest bit used for large values in mix 256 --> 9 bits is used (8 bits + 1 extra bit from weightMode/offsetMode) +#define GV1_LARGE 256 + #define DELAY_STEP 2 #define SLOW_STEP 2 #define DELAY_MAX 15 /* 7.5 seconds */ @@ -636,88 +705,125 @@ PACK( union u_int8int16_t { #endif +enum LogicalSwitchesFunctions { + LS_FUNC_NONE, #if defined(CPUARM) -#define MAX_CSW_DURATION 120 /*60s*/ -#define MAX_CSW_DELAY 120 /*60s*/ -#define MAX_CSW_ANDSW MAX_SWITCH -typedef int16_t csw_telemetry_value_t; -PACK(typedef struct t_CustomSwData { // Custom Switches data - int16_t v1; + LS_FUNC_VEQUAL, // v==offset +#endif + LS_FUNC_VALMOSTEQUAL, // v~=offset + LS_FUNC_VPOS, // v>offset + LS_FUNC_VNEG, // voffset + LS_FUNC_ANEG, // |v|= FUNC_ADJUST_GV1 && CFN_FUNC(sd) <= FUNC_ADJUST_GVLAST) +#define HAS_ENABLE_PARAM(func) (func < FUNC_FIRST_WITHOUT_ENABLE) + +#if defined(CPUARM) + #define IS_PLAY_BOTH_FUNC(func) (0) + #define IS_VOLUME_FUNC(func) (func == FUNC_VOLUME) #else - #define IS_ADJUST_GV_FUNCTION(sd) (0) + #define IS_PLAY_BOTH_FUNC(func) (func == FUNC_PLAY_BOTH) + #define IS_VOLUME_FUNC(func) (0) +#endif + +#if defined(GVARS) + #define IS_ADJUST_GV_FUNC(func) (func == FUNC_ADJUST_GVAR) +#else + #define IS_ADJUST_GV_FUNC(func) (0) #endif #if defined(VOICE) - #define HAS_REPEAT_PARAM(sd) (CFN_FUNC(sd) == FUNC_PLAY_SOUND || (CFN_FUNC(sd) >= FUNC_PLAY_TRACK && CFN_FUNC(sd) <= FUNC_PLAY_VALUE)) + #define HAS_REPEAT_PARAM(func) (func == FUNC_PLAY_SOUND || (func >= FUNC_PLAY_TRACK && func <= FUNC_PLAY_VALUE)) #else - #define HAS_REPEAT_PARAM(sd) (CFN_FUNC(sd) == FUNC_PLAY_SOUND) + #define HAS_REPEAT_PARAM(func) (func == FUNC_PLAY_SOUND) #endif enum ResetFunctionParam { @@ -746,64 +852,78 @@ enum AdjustGvarFunctionParam { #if defined(CPUARM) #if defined(PCBTARANIS) - #define LEN_CFN_NAME 10 + #define LEN_CFN_NAME 8 #else - #define LEN_CFN_NAME 6 + #define LEN_CFN_NAME 6 #endif PACK(typedef struct t_CustomFnData { // Function Switches data int8_t swtch; uint8_t func; PACK(union { - char name[LEN_CFN_NAME]; + struct { + char name[LEN_CFN_NAME]; + } play; + struct { int16_t val; - int16_t ext1; - int16_t ext2; - } composite; - }) param; - uint8_t mode:2; - uint8_t active:6; + uint8_t mode; + uint8_t param; + int16_t spare2; + } all; + + struct { + int32_t val1; + int16_t val2; + } clear; + }); + uint8_t active; }) CustomFnData; #define CFN_EMPTY(p) (!(p)->swtch) +#define CFN_SWITCH(p) ((p)->swtch) #define CFN_FUNC(p) ((p)->func) #define CFN_ACTIVE(p) ((p)->active) -#define CFN_CH_NUMBER(p) (CFN_FUNC(p)) +#define CFN_CH_INDEX(p) ((p)->all.param) +#define CFN_GVAR_INDEX(p) ((p)->all.param) +#define CFN_TIMER_INDEX(p) ((p)->all.param) #define CFN_PLAY_REPEAT(p) ((p)->active) #define CFN_PLAY_REPEAT_MUL 1 #define CFN_PLAY_REPEAT_NOSTART 0x3F -#define CFN_GVAR_MODE(p) ((p)->mode) -#define CFN_PARAM(p) ((p)->param.composite.val) -#define CFN_RESET(p) (p->active = 0, memset(&(p)->param, 0, sizeof((p)->param))) +#define CFN_GVAR_MODE(p) ((p)->all.mode) +#define CFN_PARAM(p) ((p)->all.val) +#define CFN_RESET(p) ((p)->active=0, (p)->clear.val1=0, (p)->clear.val2=0) #else PACK(typedef struct t_CustomFnData { - int8_t swtch; // input - union { + PACK(union { struct { - uint8_t param:3; - uint8_t func:5; - } func_param; + int8_t swtch:6; + uint16_t func:4; + uint8_t mode:2; + uint8_t param:3; + uint8_t active:1; + } gvar; struct { - uint8_t active:1; - uint8_t param:2; - uint8_t func:5; - } func_param_enable; + int8_t swtch:6; + uint16_t func:4; + uint8_t param:4; + uint8_t spare:1; + uint8_t active:1; + } all; + }); - struct { - uint8_t active:1; - uint8_t func:7; - } func_safety; - } internal; - uint8_t param; + uint8_t value; }) CustomFnData; -#define CFN_FUNC(p) ((p)->internal.func_param.func) -#define CFN_ACTIVE(p) ((p)->internal.func_param_enable.active) -#define CFN_CH_NUMBER(p) ((p)->internal.func_safety.func) -#define CFN_PLAY_REPEAT(p) ((p)->internal.func_param.param) +#define CFN_SWITCH(p) ((p)->all.swtch) +#define CFN_FUNC(p) ((p)->all.func) +#define CFN_ACTIVE(p) ((p)->all.active) +#define CFN_CH_INDEX(p) ((p)->all.param) +#define CFN_TIMER_INDEX(p) ((p)->all.param) +#define CFN_GVAR_INDEX(p) ((p)->gvar.param) +#define CFN_PLAY_REPEAT(p) ((p)->all.param) #define CFN_PLAY_REPEAT_MUL 10 -#define CFN_GVAR_MODE(p) ((p)->internal.func_param_enable.param) -#define CFN_PARAM(p) ((p)->param) -#define CFN_RESET(p) ((p)->internal.func_param_enable.active = 0, CFN_PARAM(p) = 0) +#define CFN_GVAR_MODE(p) ((p)->gvar.mode) +#define CFN_PARAM(p) ((p)->value) +#define CFN_RESET(p) ((p)->all.active = 0, CFN_PARAM(p) = 0) #endif enum TelemetryUnit { @@ -811,9 +931,9 @@ enum TelemetryUnit { UNIT_AMPS, UNIT_METERS_PER_SECOND, UNIT_RAW, - UNIT_KMH, - UNIT_METERS, - UNIT_DEGREES, + UNIT_SPEED, + UNIT_DIST, + UNIT_TEMPERATURE, UNIT_PERCENT, UNIT_MILLIAMPS, UNIT_A1A2_MAX = UNIT_MILLIAMPS, @@ -827,6 +947,7 @@ enum TelemetryUnit { UNIT_SECONDS, UNIT_RPMS, UNIT_G, + UNIT_HDG, }; #if defined(CPUARM) @@ -857,10 +978,20 @@ enum TelemetrySource { TELEM_TX_VOLTAGE, TELEM_TM1, TELEM_TM2, +#if defined(CPUARM) + TELEM_SWR, +#endif TELEM_RSSI_TX, TELEM_RSSI_RX, +#if defined(CPUARM) + TELEM_RX_VOLTAGE, +#endif TELEM_A1, TELEM_A2, +#if defined(CPUARM) + TELEM_A3, + TELEM_A4, +#endif TELEM_ALT, TELEM_RPM, TELEM_FUEL, @@ -880,8 +1011,21 @@ enum TelemetrySource { TELEM_ACCz, TELEM_HDG, TELEM_VSPD, + TELEM_ASPD, + TELEM_DTE, +#if defined(CPUARM) + TELEM_RESERVE1, + TELEM_RESERVE2, + TELEM_RESERVE3, + TELEM_RESERVE4, + TELEM_RESERVE5, +#endif TELEM_MIN_A1, TELEM_MIN_A2, +#if defined(CPUARM) + TELEM_MIN_A3, + TELEM_MIN_A4, +#endif TELEM_MIN_ALT, TELEM_MAX_ALT, TELEM_MAX_RPM, @@ -889,13 +1033,21 @@ enum TelemetrySource { TELEM_MAX_T2, TELEM_MAX_SPEED, TELEM_MAX_DIST, - // TODO TELEM_MIN_CELL, - // TODO TELEM_MIN_VFAS, + TELEM_MIN_CELL, + TELEM_MIN_CELLS_SUM, + TELEM_MIN_VFAS, TELEM_MAX_CURRENT, TELEM_MAX_POWER, +#if defined(CPUARM) + TELEM_RESERVE6, + TELEM_RESERVE7, + TELEM_RESERVE8, + TELEM_RESERVE9, + TELEM_RESERVE10, +#endif TELEM_ACC, TELEM_GPS_TIME, - TELEM_CSW_MAX = TELEM_POWER, + TELEM_CSW_MAX = TELEM_MAX_POWER, TELEM_NOUSR_MAX = TELEM_A2, #if defined(FRSKY) TELEM_DISPLAY_MAX = TELEM_MAX_POWER, @@ -903,12 +1055,7 @@ enum TelemetrySource { TELEM_DISPLAY_MAX = TELEM_TM2, // because used also in PlayValue #endif TELEM_STATUS_MAX = TELEM_GPS_TIME, -#if defined(FRSKY_SPORT) - TELEM_SWR = TELEM_RSSI_TX, - TELEM_FIRST_STREAMED_VALUE = TELEM_RSSI_RX, -#else TELEM_FIRST_STREAMED_VALUE = TELEM_RSSI_TX, -#endif }; enum VarioSource { @@ -919,7 +1066,11 @@ enum VarioSource { VARIO_SOURCE_VARIO, VARIO_SOURCE_A1, VARIO_SOURCE_A2, - VARIO_SOURCE_LAST = VARIO_SOURCE_A2 +#if defined(FRSKY_SPORT) + VARIO_SOURCE_DTE, +#endif + VARIO_SOURCE_COUNT, + VARIO_SOURCE_LAST = VARIO_SOURCE_COUNT-1 }; #if defined(FRSKY_HUB) @@ -976,7 +1127,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]; @@ -990,12 +1141,14 @@ PACK(typedef struct t_FrSkyData { uint16_t storedMah:15; 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; @@ -1008,6 +1161,8 @@ PACK(typedef struct t_FrSkyData { int8_t varioCenterMax:5; int8_t fasOffset; }) FrSkyData; +#define MIN_BLADES 0 // 2 blades +#define MAX_BLADES 3 // 5 blades #endif #if defined(MAVLINK) @@ -1019,6 +1174,14 @@ PACK(typedef struct t_MavlinkData { }) MavlinkData; #endif +enum SwashType { + SWASH_TYPE_120, + SWASH_TYPE_120X, + SWASH_TYPE_140, + SWASH_TYPE_90, + SWASH_TYPE_MAX = SWASH_TYPE_90 +}; + PACK(typedef struct t_SwashRingData { // Swash Ring data uint8_t invertELE:1; uint8_t invertAIL:1; @@ -1065,8 +1228,18 @@ PACK(typedef struct t_SwashRingData { // Swash Ring data #if defined(PCBSTD) #define TRIMS_ARRAY int8_t trim[4]; int8_t trim_ext:8 #define TRIMS_ARRAY_SIZE 5 + #define trim_t int16_t #else - #define TRIMS_ARRAY int16_t trim[4] + #if defined(PCBTARANIS) + PACK(typedef struct { + int16_t value:11; + uint16_t mode:5; + }) trim_t; + #define TRIM_MODE_NONE 0x1F // 0b11111 + #else + #define trim_t int16_t + #endif + #define TRIMS_ARRAY trim_t trim[4] #define TRIMS_ARRAY_SIZE 8 #endif @@ -1120,6 +1293,7 @@ enum SwitchSources { SWSRC_SG2, SWSRC_SH0, SWSRC_SH2, + SWSRC_TRAINER = SWSRC_SH2, #else SWSRC_ID0 = SWSRC_FIRST_SWITCH, SWSRC_ID1, @@ -1135,6 +1309,32 @@ enum SwitchSources { SWSRC_AIL, SWSRC_GEA, SWSRC_TRN, + SWSRC_TRAINER = SWSRC_TRN, +#endif + + SWSRC_LAST_SWITCH = SWSRC_TRAINER, + +#if defined(PCBTARANIS) + SWSRC_FIRST_MULTIPOS_SWITCH, + SWSRC_LAST_MULTIPOS_SWITCH = SWSRC_FIRST_MULTIPOS_SWITCH + (NUM_XPOTS*XPOTS_MULTIPOS_COUNT) - 1, +#endif + + SWSRC_FIRST_TRIM, + SWSRC_TrimRudLeft = SWSRC_FIRST_TRIM, + SWSRC_TrimRudRight, + SWSRC_TrimEleDown, + SWSRC_TrimEleUp, + SWSRC_TrimThrDown, + SWSRC_TrimThrUp, + SWSRC_TrimAilLeft, + SWSRC_TrimAilRight, + SWSRC_LAST_TRIM = SWSRC_TrimAilRight, + +#if defined(PCBSKY9X) + SWSRC_REa, +#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560) + SWSRC_REa, + SWSRC_REb, #endif SWSRC_FIRST_CSW, @@ -1153,26 +1353,10 @@ enum SwitchSources { SWSRC_LAST_CSW = SWSRC_SW1+NUM_CSW-1, SWSRC_ON, - - SWSRC_FIRST_MOMENT_SWITCH, - SWSRC_LAST_MOMENT_SWITCH = SWSRC_FIRST_MOMENT_SWITCH+SWSRC_ON-1, - -#if !defined(PCBSTD) - SWSRC_TRAINER_SHORT, - SWSRC_TRAINER_LONG, -#endif - -#if ROTARY_ENCODERS > 0 - SWSRC_FIRST_ROTENC_SWITCH, - SWSRC_LAST_ROTENC_SWITCH = SWSRC_FIRST_ROTENC_SWITCH+(2*ROTARY_ENCODERS)-1, -#endif - - SWSRC_COUNT, - SWSRC_FIRST = -SWSRC_LAST_MOMENT_SWITCH, - SWSRC_LAST = SWSRC_COUNT-1, - SWSRC_OFF = -SWSRC_ON, - SWSRC_TRAINER = SWSRC_SW1-1, + + SWSRC_FIRST = SWSRC_OFF, + SWSRC_LAST = SWSRC_ON }; enum MixSources { @@ -1193,11 +1377,12 @@ enum MixSources { MIXSRC_FIRST_POT, #if defined(PCBTARANIS) - MIXSRC_S1 = MIXSRC_FIRST_POT, - MIXSRC_S2, - MIXSRC_S3, - MIXSRC_S4, - MIXSRC_LAST_POT = MIXSRC_S4, + MIXSRC_POT1 = MIXSRC_FIRST_POT, + MIXSRC_POT2, + MIXSRC_POT3, + MIXSRC_SLIDER1, + MIXSRC_SLIDER2, + MIXSRC_LAST_POT = MIXSRC_SLIDER2, #else MIXSRC_P1 = MIXSRC_FIRST_POT, MIXSRC_P2, @@ -1267,7 +1452,7 @@ enum MixSources { MIXSRC_LAST_CSW = MIXSRC_FIRST_CSW+NUM_CSW-1, MIXSRC_FIRST_PPM, - MIXSRC_LAST_PPM = MIXSRC_FIRST_PPM + 7, + MIXSRC_LAST_PPM = MIXSRC_FIRST_PPM+NUM_PPM-1, MIXSRC_FIRST_CH, MIXSRC_CH1 = MIXSRC_FIRST_CH, @@ -1303,11 +1488,14 @@ enum MixSources { #define MIN_POINTS 3 #define MAX_POINTS 17 -#define TMRMODE_NONE 0 -#define TMRMODE_ABS 1 -#define TMRMODE_THR 2 -#define TMRMODE_THR_REL 3 -#define TMRMODE_THR_TRG 4 +enum TimerModes { + TMRMODE_NONE, + TMRMODE_ABS, + TMRMODE_THR, + TMRMODE_THR_REL, + TMRMODE_THR_TRG, + TMRMODE_FIRST_SWITCH +}; #define COUNTDOWN_SILENT 0 #define COUNTDOWN_BEEPS 1 @@ -1403,7 +1591,7 @@ enum FailsafeModes { #define BeepANACenter uint8_t #endif -PACK(typedef struct t_ModelHeader { +PACK(typedef struct { char name[LEN_MODEL_NAME]; // must be first for eeLoadModelName uint8_t modelId; MODELDATA_BITMAP @@ -1424,7 +1612,7 @@ PACK(typedef struct t_ModelData { uint8_t thrTrim:1; // Enable Throttle Trim AVR_FIELD(int8_t ppmNCH:4) ARM_FIELD(int8_t spare2:4) - uint8_t trimInc:3; // Trim Increments + int8_t trimInc:3; // Trim Increments uint8_t disableThrottleWarning:1; ARM_FIELD(uint8_t displayText:1) AVR_FIELD(uint8_t pulsePol:1) @@ -1440,7 +1628,7 @@ PACK(typedef struct t_ModelData { CURVDATA curves[MAX_CURVES]; int8_t points[NUM_POINTS]; - CustomSwData customSw[NUM_CSW]; + LogicalSwitchData customSw[NUM_CSW]; CustomFnData funcSw[NUM_CFN]; SwashRingData swashR; PhaseData phaseData[MAX_PHASES]; @@ -1449,6 +1637,7 @@ PACK(typedef struct t_ModelData { 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 ee634a7d2..a8090a9aa 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -51,6 +51,9 @@ int24_t act [MAX_MIXERS] = {0}; SwOn swOn [MAX_MIXERS]; // TODO better name later... uint8_t mixWarning; +#if defined(MODULE_ALWAYS_SEND_PULSES) + uint8_t startupWarningState; +#endif #if defined(CPUARM) #define MENUS_STACK_SIZE 2000 @@ -198,7 +201,7 @@ char idx2char(int8_t idx) return ' '; } -#if defined(PCBTARANIS) +#if defined(CPUARM) int8_t char2idx(char c) { if (c == '_') return 37; @@ -441,17 +444,30 @@ CurveInfo curveInfo(uint8_t idx) } #endif -CustomSwData *cswAddress(uint8_t idx) +LogicalSwitchData *cswAddress(uint8_t idx) { return &g_model.customSw[idx]; } uint8_t cswFamily(uint8_t func) { - return (funcsrcRaw = i+1; - if (!isSourceAvailable(mix->srcRaw)) { - mix->srcRaw = MIXSRC_Rud - 1 + stick_index; - } #else mix->srcRaw = MIXSRC_Rud - 1 + channel_order(i+1); #endif } eeDirty(EE_MODEL); } +#endif #if defined(PXX) && defined(CPUARM) void checkModelIdUnique(uint8_t id) @@ -566,9 +586,9 @@ void modelDefault(uint8_t id) g_model.frsky.channels[0].ratio = 132; #endif -#ifdef MAVLINK - g_model.mavlink.rc_rssi_scale = 15; - g_model.mavlink.pc_rssi_en = 1; +#if defined(MAVLINK) + g_model.mavlink.rc_rssi_scale = 15; + g_model.mavlink.pc_rssi_en = 1; #endif } @@ -1228,14 +1248,16 @@ getvalue_t getValue(uint8_t i) else if (i==MIXSRC_SF) return (switchState(SW_SF0) ? -1024 : 1024); else if (i==MIXSRC_SG) return (switchState(SW_SG0) ? -1024 : (switchState(SW_SG1) ? 0 : 1024)); else if (i==MIXSRC_SH) return (switchState(SW_SH0) ? -1024 : 1024); -#else - else if (i==MIXSRC_3POS) return (switchState(SW_ID0) ? -1024 : (switchState(SW_ID1) ? 0 : 1024)); -#if defined(EXTRA_3POS) - else if (i==MIXSRC_3POS2) return (switchState(SW_ID3) ? -1024 : (switchState(SW_ID4) ? 0 : 1024)); -#endif -#endif - else if (i<=MIXSRC_LAST_CSW) return getSwitch(SWSRC_FIRST_CSW+i-MIXSRC_FIRST_CSW) ? 1024 : -1024; +#else + else if (i==MIXSRC_3POS) return (getSwitch(SW_ID0-SW_BASE+1) ? -1024 : (getSwitch(SW_ID1-SW_BASE+1) ? 0 : 1024)); + // don't use switchState directly to give getSwitch possibility to hack values if needed for switch warning +#if defined(EXTRA_3POS) + else if (i==MIXSRC_3POS2) return (getSwitch(SW_ID3-SW_BASE+1) ? -1024 : (getSwitch(SW_ID4-SW_BASE+1) ? 0 : 1024)); + // don't use switchState directly to give getSwitch possibility to hack values if needed for switch warning +#endif + else if (i<=MIXSRC_LAST_CSW) return getSwitch(SWSRC_THR+i-MIXSRC_THR) ? 1024 : -1024; +#endif else if (i<=MIXSRC_LAST_PPM) { int16_t x = g_ppmIns[i-MIXSRC_FIRST_PPM]; if (i DELAY_SWITCH_3POS)) { \ - newPos |= (1 << (sw ## 0 - SW_SA0 + 1)); \ - switchesMidposStart[idx] = 0; \ - } \ - else { \ - if (!switchesMidposStart[idx]) { \ - switchesMidposStart[idx] = get_tmr10ms(); \ - } \ - newPos |= (switchesPos & (0x7 << (sw ## 0 - SW_SA0))); \ - } -#define SWITCH_POSITION(sw) (switchesPos & (1<<(sw))) -void get3POSSwitchesPosition() +uint32_t check3PosSwitchPosition(uint8_t idx, EnumKeys sw, bool startup) +{ + uint32_t result; + uint32_t index; + + if (switchState(sw)) { + index = sw - SW_SA0; + result = (1 << index); + switchesMidposStart[idx] = 0; + } + else if (switchState(EnumKeys(sw+2))) { + index = sw - SW_SA0 + 2; + result = (1 << index); + switchesMidposStart[idx] = 0; + } + else if (startup || (switchesPos & (1 << (sw - SW_SA0 + 1))) || (switchesMidposStart[idx] && (tmr10ms_t)(get_tmr10ms() - switchesMidposStart[idx]) > DELAY_SWITCH_3POS)) { + index = sw - SW_SA0 + 1; + result = (1 << index); + switchesMidposStart[idx] = 0; + } + else { + index = sw - SW_SA0 + 1; + if (!switchesMidposStart[idx]) { + switchesMidposStart[idx] = get_tmr10ms(); + } + result = (switchesPos & (0x7 << (sw - SW_SA0))); + } + + if (!(switchesPos & result)) { + PLAY_SWITCH_MOVED(index); + } + + return result; +} + +#define CHECK_2POS(sw) newPos |= check2PosSwitchPosition(sw ## 0) +#define CHECK_3POS(idx, sw) newPos |= check3PosSwitchPosition(idx, sw ## 0, startup) + +void getSwitchesPosition(bool startup) { uint32_t newPos = 0; CHECK_3POS(0, SW_SA); @@ -1334,13 +1400,40 @@ void get3POSSwitchesPosition() CHECK_3POS(5, SW_SG); CHECK_2POS(SW_SH); switchesPos = newPos; + + for (int i=0; icount>0 && calib->countcount); + uint8_t previousPos = potsPos[i] >> 4; + uint8_t previousStoredPos = potsPos[i] & 0x0F; + if (pos != previousPos) { + potsLastposStart[i] = get_tmr10ms(); + potsPos[i] = (pos << 4) | previousStoredPos; + } + else if (startup || (tmr10ms_t)(get_tmr10ms() - potsLastposStart[i]) > DELAY_SWITCH_3POS) { + potsLastposStart[i] = 0; + potsPos[i] = (pos << 4) | pos; + if (previousStoredPos != pos) { + PLAY_SWITCH_MOVED(SWSRC_LAST_SWITCH+i*XPOTS_MULTIPOS_COUNT+pos); + } + } + } + } + } } +#define SWITCH_POSITION(sw) (switchesPos & (1<<(sw))) +#define POT_POSITION(sw) ((potsPos[(sw)/XPOTS_MULTIPOS_COUNT] & 0x0f) == ((sw) % XPOTS_MULTIPOS_COUNT)) #else -#define get3POSSwitchesPosition() +#define getSwitchesPosition(...) +#define SWITCH_POSITION(idx) switchState((EnumKeys)(SW_BASE+(idx))) #endif int16_t csLastValue[NUM_CSW]; #define CS_LAST_VALUE_INIT -32768 + +/* recursive function. stack as of today (16/03/2012) grows by 8bytes at each call, which is ok! */ bool getSwitch(int8_t swtch) { bool result; @@ -1353,15 +1446,43 @@ bool getSwitch(int8_t swtch) if (cs_idx == SWSRC_ON) { result = true; } - else if (cs_idx <= MAX_PSWITCH) { -#if defined(PCBTARANIS) - result = SWITCH_POSITION(cs_idx-SWSRC_SA0); -#else - result = switchState((EnumKeys)(SW_BASE+cs_idx-1)); + else if (cs_idx <= SWSRC_LAST_SWITCH) { + result = SWITCH_POSITION(cs_idx-SWSRC_FIRST_SWITCH); +#if defined(MODULE_ALWAYS_SEND_PULSES) + if (startupWarningState < STARTUP_WARNING_DONE) { + // if throttle or switch warning is currently active, ignore actual stick position and use wanted values + if (cs_idx <= 3) { + if (!(g_model.nSwToWarn&1)) { // ID1 to ID3 is just one bit in nSwToWarn + result = (cs_idx)==((g_model.switchWarningStates&3)+1); // overwrite result with desired value + } + } + else if (!(g_model.nSwToWarn & (1<<(cs_idx-3)))) { + // current switch should not be ignored for warning + result = g_model.switchWarningStates & (1<<(cs_idx-2)); // overwrite result with desired value + } + } #endif } +#if defined(PCBTARANIS) + else if (cs_idx <= SWSRC_LAST_MULTIPOS_SWITCH) { + result = POT_POSITION(cs_idx-SWSRC_FIRST_MULTIPOS_SWITCH); + } +#endif + else if (cs_idx <= SWSRC_LAST_TRIM) { + result = trimDown(cs_idx-SWSRC_FIRST_TRIM); + } +#if ROTARY_ENCODERS > 0 + else if (cs_idx == SWSRC_REa) { + result = REA_DOWN(); + } +#endif +#if ROTARY_ENCODERS > 1 + else if (cs_idx == SWSRC_REb) { + result = REB_DOWN(); + } +#endif else { - cs_idx -= MAX_PSWITCH+1; + cs_idx -= SWSRC_FIRST_CSW; GETSWITCH_RECURSIVE_TYPE mask = ((GETSWITCH_RECURSIVE_TYPE)1 << cs_idx); if (s_last_switch_used & mask) { @@ -1370,42 +1491,57 @@ bool getSwitch(int8_t swtch) else { s_last_switch_used |= mask; - CustomSwData * cs = cswAddress(cs_idx); + LogicalSwitchData * cs = cswAddress(cs_idx); +#if defined(CPUARM) + int8_t s = cs->andsw; +#else uint8_t s = cs->andsw; - if (cs->func == CS_OFF || (s && !getSwitch(s))) { + if (s > SWSRC_LAST_SWITCH) { + s += SWSRC_SW1-SWSRC_LAST_SWITCH-1; + } +#endif + if (cs->func == LS_FUNC_NONE || (s && !getSwitch(s))) { csLastValue[cs_idx] = CS_LAST_VALUE_INIT; result = false; } - else if ((s=cswFamily(cs->func)) == CS_VBOOL) { + else if ((s=cswFamily(cs->func)) == LS_FAMILY_BOOL) { bool res1 = getSwitch(cs->v1); bool res2 = getSwitch(cs->v2); switch (cs->func) { - case CS_AND: + case LS_FUNC_AND: result = (res1 && res2); break; - case CS_OR: + case LS_FUNC_OR: result = (res1 || res2); break; - // case CS_XOR: + // case LS_FUNC_XOR: default: result = (res1 ^ res2); break; } } - else if (s == CS_VTIMER) { - result = csLastValue[cs_idx] <= 0; + else if (s == LS_FAMILY_TIMER) { + result = (csLastValue[cs_idx] <= 0); } + else if (s == LS_FAMILY_STICKY) { + result = (csLastValue[cs_idx] & (1<<0)); + } +#if defined(CPUARM) + else if (s == LS_FAMILY_STAY) { + result = (csLastValue[cs_idx] & (1<<0)); + } +#endif else { getvalue_t x = getValue(cs->v1); getvalue_t y; - if (s == CS_VCOMP) { + if (s == LS_FAMILY_COMP) { y = getValue(cs->v2); switch (cs->func) { - case CS_EQUAL: + case LS_FUNC_EQUAL: result = (x==y); break; - case CS_GREATER: + case LS_FUNC_GREATER: result = (x>y); break; default: @@ -1414,17 +1550,18 @@ bool getSwitch(int8_t swtch) } } else { + uint8_t v1 = cs->v1; #if defined(FRSKY) // Telemetry - if (cs->v1 >= MIXSRC_FIRST_TELEM) { - if ((!TELEMETRY_STREAMING() && cs->v1 >= MIXSRC_FIRST_TELEM+TELEM_FIRST_STREAMED_VALUE-1) || IS_FAI_FORBIDDEN(cs->v1-1)) + if (v1 >= MIXSRC_FIRST_TELEM) { + if ((!TELEMETRY_STREAMING() && v1 >= MIXSRC_FIRST_TELEM+TELEM_FIRST_STREAMED_VALUE-1) || IS_FAI_FORBIDDEN(v1-1)) return swtch > 0 ? false : true; y = convertCswTelemValue(cs); #if defined(FRSKY_HUB) && defined(GAUGES) - if (s == CS_VOFS) { - uint8_t idx = cs->v1-MIXSRC_FIRST_TELEM+1-TELEM_ALT; + if (s == LS_FAMILY_OFS) { + uint8_t idx = v1-MIXSRC_FIRST_TELEM+1-TELEM_ALT; if (idx < THLD_MAX) { // Fill the threshold array barsThresholds[idx] = 128 + cs->v2; @@ -1432,17 +1569,17 @@ bool getSwitch(int8_t swtch) } #endif } - else if (cs->v1 >= MIXSRC_GVAR1) { + else if (v1 >= MIXSRC_GVAR1) { y = cs->v2; } else { y = calc100toRESX(cs->v2); } #else - if (cs->v1 >= MIXSRC_FIRST_TELEM) { + if (v1 >= MIXSRC_FIRST_TELEM) { y = (int16_t)3 * (128+cs->v2); // it's a Timer } - else if (cs->v1 >= MIXSRC_GVAR1) { + else if (v1 >= MIXSRC_GVAR1) { y = cs->v2; // it's a GVAR } else { @@ -1451,24 +1588,29 @@ bool getSwitch(int8_t swtch) #endif switch (cs->func) { - case CS_VEQUAL: +#if defined(CPUARM) + case LS_FUNC_VEQUAL: + result = (x==y); + break; +#endif + case LS_FUNC_VALMOSTEQUAL: #if defined(GVARS) - if (cs->v1 >= MIXSRC_GVAR1 && cs->v1 <= MIXSRC_LAST_GVAR) + if (v1 >= MIXSRC_GVAR1 && v1 <= MIXSRC_LAST_GVAR) result = (x==y); else #endif result = (abs(x-y) < (1024 / STICK_TOLERANCE)); break; - case CS_VPOS: + case LS_FUNC_VPOS: result = (x>y); break; - case CS_VNEG: + case LS_FUNC_VNEG: result = (xy); break; - case CS_ANEG: + case LS_FUNC_ANEG: result = (abs(x)func == CS_DIFFEGREATER) + if (cs->func == LS_FUNC_DIFFEGREATER) result = (y >= 0 ? (diff >= y) : (diff <= y)); else result = (abs(diff) >= y); @@ -1495,26 +1637,35 @@ bool getSwitch(int8_t swtch) result = false; } else { - cswDelays[cs_idx] = get_tmr10ms() + (cs->delay*50); + cswDelays[cs_idx] = get_tmr10ms() + (cs->delay*10); } } + if (cs->duration) { - if (result && !cswStates[cs_idx]) - cswDurations[cs_idx] = get_tmr10ms() + (cs->duration*50); + if (result && !cswStates[cs_idx]) { + cswDurations[cs_idx] = get_tmr10ms() + (cs->duration*10); + } cswStates[cs_idx] = result; + result = false; if (cswDurations[cs_idx] > get_tmr10ms()) { result = true; - if (cs->delay) cswDelays[cs_idx] = get_tmr10ms() + (cs->delay*50); + } + else if (s == LS_FAMILY_STICKY) { + csLastValue[cs_idx] &= ~(1<<0); } } #endif - if (result) + if (result) { + if (!(s_last_switch_value&mask)) PLAY_LOGICAL_SWITCH_ON(cs_idx); s_last_switch_value |= mask; - else + } + else { + if (s_last_switch_value&mask) PLAY_LOGICAL_SWITCH_OFF(cs_idx); s_last_switch_value &= ~mask; + } } } @@ -1545,26 +1696,23 @@ int8_t getMovedSwitch() } } #else - for (uint8_t i=MAX_PSWITCH; i>0; i--) { + // return delivers 1 to 3 for ID1 to ID3 + // 4..8 for all other switches if changed to true + // -4..-8 for all other switches if changed to false + // 9 for Trainer switch if changed to true; Change to false is ignored + swstate_t mask = 0x80; + for (uint8_t i=NUM_PSWITCH; i>1; i--) { bool prev; - swstate_t mask = 0; - if (i <= 3) { - prev = ((switches_states & 0x03) == (i-1)); - } - else { - mask = (1<<(i-2)); - prev = (switches_states & mask); - } - bool next = getSwitch(i); + prev = (switches_states & mask); + // don't use getSwitch here to always get the proper value, even getSwitch manipulates + bool next = switchState((EnumKeys)(SW_BASE+i-1)); if (prev != next) { - if (i!=MAX_PSWITCH || next==true) + if (((i3)) || next==true) result = next ? i : -i; - if (mask) - switches_states ^= mask; - else { - switches_states = (switches_states & 0xFC) | (i-1); - } + if (i<=3 && result==0) result = 1; + switches_states ^= mask; } + mask >>= 1; } #endif @@ -1633,38 +1781,82 @@ uint8_t getFlightPhase() } #endif -int16_t getRawTrimValue(uint8_t phase, uint8_t idx) +trim_t getRawTrimValue(uint8_t phase, uint8_t idx) { PhaseData *p = phaseAddress(phase); #if defined(PCBSTD) - return (((int16_t)p->trim[idx]) << 2) + ((p->trim_ext >> (2*idx)) & 0x03); + return (((trim_t)p->trim[idx]) << 2) + ((p->trim_ext >> (2*idx)) & 0x03); #else return p->trim[idx]; #endif } -int16_t getTrimValue(uint8_t phase, uint8_t idx) +int getTrimValue(uint8_t phase, uint8_t idx) { +#if defined(PCBTARANIS) + int result = 0; + for (uint8_t i=0; i> 1; + if (p == phase || phase == 0) { + return result + v.value; + } + else { + phase = p; + if (v.mode % 2 != 0) { + result += v.value; + } + } + } + } + return 0; +#else return getRawTrimValue(getTrimFlightPhase(phase, idx), idx); +#endif } -void setTrimValue(uint8_t phase, uint8_t idx, int16_t trim) +void setTrimValue(uint8_t phase, uint8_t idx, int trim) { +#if defined(PCBTARANIS) + for (uint8_t i=0; itrim[idx]; + if (v.mode < 0) + return; + unsigned int p = v.mode >> 1; + if (p == phase || phase == 0) { + v.value = trim; + break;; + } + else if (v.mode % 2 == 0) { + phase = p; + } + else { + v.value = limit(TRIM_EXTENDED_MIN, trim - getTrimValue(p, idx), TRIM_EXTENDED_MAX); + break; + } + } +#elif defined(PCBSTD) PhaseData *p = phaseAddress(phase); -#if defined(PCBSTD) p->trim[idx] = (int8_t)(trim >> 2); - p->trim_ext = (p->trim_ext & ~(0x03 << (2*idx))) + (((trim & 0x03) << (2*idx))); + idx <<= 1; + p->trim_ext = (p->trim_ext & ~(0x03 << idx)) + (((trim & 0x03) << idx)); #else + PhaseData *p = phaseAddress(phase); p->trim[idx] = trim; #endif eeDirty(EE_MODEL); } +#if !defined(PCBTARANIS) uint8_t getTrimFlightPhase(uint8_t phase, uint8_t idx) { for (uint8_t i=0; i= phase) result++; @@ -1672,6 +1864,7 @@ uint8_t getTrimFlightPhase(uint8_t phase, uint8_t idx) } return 0; } +#endif #if defined(ROTARY_ENCODERS) uint8_t getRotaryEncoderFlightPhase(uint8_t idx) @@ -1807,10 +2000,13 @@ void setGVarValue(uint8_t idx, int16_t value, int8_t phase) #endif #if defined(FRSKY) -csw_telemetry_value_t minTelemValue(uint8_t channel) +ls_telemetry_value_t minTelemValue(uint8_t channel) { switch (channel) { case TELEM_FUEL: +#if defined(CPUARM) + case TELEM_SWR: +#endif case TELEM_RSSI_TX: case TELEM_RSSI_RX: return 0; @@ -1826,10 +2022,13 @@ csw_telemetry_value_t minTelemValue(uint8_t channel) } } -csw_telemetry_value_t maxTelemValue(uint8_t channel) +ls_telemetry_value_t maxTelemValue(uint8_t channel) { switch (channel) { case TELEM_FUEL: +#if defined(CPUARM) + case TELEM_SWR: +#endif case TELEM_RSSI_TX: case TELEM_RSSI_RX: return 100; @@ -1847,7 +2046,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, ls_telemetry_value_t value) { getvalue_t result; switch (channel) { @@ -1860,17 +2059,27 @@ 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) + +ls_telemetry_value_t max8bitsTelemValue(uint8_t channel) +{ + return min(255, maxTelemValue(channel)); +} +#endif + +getvalue_t convert8bitsTelemValue(uint8_t channel, ls_telemetry_value_t value) { getvalue_t result; switch (channel) { case TELEM_TM1: case TELEM_TM2: - result = value * 3; + result = value * 5; 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: @@ -1908,18 +2117,17 @@ getvalue_t convertTelemValue(uint8_t channel, csw_telemetry_value_t value) } return result; } -#endif -getvalue_t convertCswTelemValue(CustomSwData * cs) +getvalue_t convertCswTelemValue(LogicalSwitchData * 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); + if (cswFamily(cs->func)==LS_FAMILY_OFS) + 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; } @@ -1928,29 +2136,35 @@ getvalue_t convertCswTelemValue(CustomSwData * cs) FORCEINLINE void convertUnit(getvalue_t & val, uint8_t & unit) { if (IS_IMPERIAL_ENABLE()) { - if (unit == UNIT_DEGREES) { + if (unit == UNIT_TEMPERATURE) { val += 18; val *= 115; val >>= 6; } - if (unit == UNIT_METERS) { + if (unit == UNIT_DIST) { // m to ft *105/32 val = val * 3 + (val >> 2) + (val >> 5); } if (unit == UNIT_FEET) { - unit = UNIT_METERS; + unit = UNIT_DIST; } if (unit == UNIT_KTS) { - unit = UNIT_KMH; + // kts to mph + unit = UNIT_SPEED; + val = (val * 31) / 27; } } else { if (unit == UNIT_KTS) { // kts to km/h - unit = UNIT_KMH; - val = (val * 46) / 25; + unit = UNIT_SPEED; + val = (val * 50) / 27; } } + + if (unit == UNIT_HDG) { + unit = UNIT_TEMPERATURE; + } } #endif @@ -1989,7 +2203,7 @@ void checkBacklight() backlightOn(); } - bool backlightOn = (g_eeGeneral.backlightMode == e_backlight_mode_on || lightOffCounter || isFunctionActive(FUNC_BACKLIGHT)); + bool backlightOn = (g_eeGeneral.backlightMode == e_backlight_mode_on || lightOffCounter || isFunctionActive(FUNCTION_BACKLIGHT)); if (flashCounter) backlightOn = !backlightOn; if (backlightOn) BACKLIGHT_ON(); @@ -2107,11 +2321,39 @@ void checkAll() checkLowEEPROM(); #endif +#if defined(MODULE_ALWAYS_SEND_PULSES) + startupWarningState = STARTUP_WARNING_THROTTLE; +#else checkTHR(); checkSwitches(); +#endif + +#if defined(PCBTARANIS) + if (modelHasNotes() && g_model.displayText) { + char filename[sizeof(MODELS_PATH)+1+sizeof(g_model.header.name)+sizeof(TEXT_EXT)] = MODELS_PATH "/"; + char *buf = strcat_modelname(&filename[sizeof(MODELS_PATH)], g_eeGeneral.currModel); + strcpy(buf, TEXT_EXT); + pushMenuTextView(filename); + } +#endif + clearKeyEvents(); + + SKIP_AUTOMATIC_PROMPTS(); } +#if defined(MODULE_ALWAYS_SEND_PULSES) +void checkStartupWarnings() +{ + if (startupWarningState < STARTUP_WARNING_DONE) { + if (startupWarningState == STARTUP_WARNING_THROTTLE) + checkTHR(); + else + checkSwitches(); + } +} +#endif + #if !defined(PCBSKY9X) void checkLowEEPROM() { @@ -2124,92 +2366,191 @@ void checkLowEEPROM() void checkTHR() { - if (g_model.disableThrottleWarning) return; + uint8_t thrchn = ((g_model.thrTraceSrc==0) || (g_model.thrTraceSrc>NUM_POTS)) ? THR_STICK : g_model.thrTraceSrc+NUM_STICKS-1; + // throttle channel is either the stick according stick mode (already handled in evalInputs) + // or P1 to P3; + // in case an output channel is choosen as throttle source (thrTraceSrc>NUM_POTS) we assume the throttle stick is the input + // no other information available at the moment, and good enough to my option (otherwise too much exceptions...) - uint8_t thrchn = (2-(stickMode&1)); //stickMode=0123 -> thr=2121 - -#ifdef SIMU - int16_t lowLim = THRCHK_DEADBAND - 1024 ; -#else - getADC(); // if thr is down - do not display warning at all - int16_t lowLim = g_eeGeneral.calibMid[thrchn]; - lowLim = (g_model.throttleReversed ? - lowLim - g_eeGeneral.calibSpanPos[thrchn] : lowLim - g_eeGeneral.calibSpanNeg[thrchn]); - lowLim += THRCHK_DEADBAND; -#endif - int16_t v = thrAnaIn(thrchn); - - if (v<=lowLim) return; - - // first - display warning - MESSAGE(STR_THROTTLEWARN, STR_THROTTLENOTIDLE, STR_PRESSANYKEYTOSKIP, AU_THROTTLE_ALERT); - - while (1) - { - SIMU_SLEEP(1); - - getADC(); - - int16_t v = thrAnaIn(thrchn); - - if (pwrCheck()==e_power_off || keyDown() || v<=lowLim) - break; - - checkBacklight(); - - wdt_reset(); +#if defined(MODULE_ALWAYS_SEND_PULSES) + int16_t v = calibratedStick[thrchn]; + if (v<=THRCHK_DEADBAND-1024 || g_model.disableThrottleWarning || pwrCheck()==e_power_off || keyDown()) { + startupWarningState = STARTUP_WARNING_THROTTLE+1; } + else { + calibratedStick[thrchn] = -1024; +#if !defined(PCBTARANIS) + rawAnas[thrchn] = anas[thrchn] = calibratedStick[thrchn]; +#endif + MESSAGE(STR_THROTTLEWARN, STR_THROTTLENOTIDLE, STR_PRESSANYKEYTOSKIP, AU_THROTTLE_ALERT); + } +#else + if (g_model.disableThrottleWarning) return; + getADC(); + evalInputs(e_perout_mode_notrainer); // let do evalInputs do the job + + int16_t v = calibratedStick[thrchn]; + if (v<=(THRCHK_DEADBAND-1024)) return; // prevent warning if throttle input OK + + // first - display warning; also deletes inputs if any have been before + MESSAGE(STR_THROTTLEWARN, STR_THROTTLENOTIDLE, STR_PRESSANYKEYTOSKIP, AU_THROTTLE_ALERT); + + while (1) { + + SIMU_SLEEP(1); + + getADC(); + + evalInputs(e_perout_mode_notrainer); // let do evalInputs do the job + v = calibratedStick[thrchn]; + + if (pwrCheck()==e_power_off || keyDown() || v<=(THRCHK_DEADBAND-1024)) + break; + + checkBacklight(); + + wdt_reset(); + } +#endif } void checkAlarm() // added by Gohst { - if (g_eeGeneral.disableAlarmWarning) return; - if (IS_SOUND_OFF()) ALERT(STR_ALARMSWARN, STR_ALARMSDISABLED, AU_ERROR); + if (g_eeGeneral.disableAlarmWarning) + return; + + if (IS_SOUND_OFF()) + ALERT(STR_ALARMSWARN, STR_ALARMSDISABLED, AU_ERROR); } void checkSwitches() { +#if defined(MODULE_ALWAYS_SEND_PULSES) + static swstate_t last_bad_switches = 0xff; +#else swstate_t last_bad_switches = 0xff; +#endif swstate_t states = g_model.switchWarningStates; - - while (1) { - -#if defined(TELEMETRY_MOD_14051) - getADC(); + +#if defined(PCBTARANIS) + uint8_t bad_pots = 0, last_bad_pots = 0xff; #endif +#if !defined(MODULE_ALWAYS_SEND_PULSES) + while (1) { + +#if defined(TELEMETRY_MOD_14051) || defined(PCBTARANIS) + getADC(); +#endif +#endif // !defined(MODULE_ALWAYS_SEND_PULSES) + getMovedSwitch(); + + bool warn = false; +#if defined(PCBTARANIS) + for (uint8_t i=0; i> 6; + if (potMode) { + perOut(e_perout_mode_normal, 0); + bad_pots = 0; + for (uint8_t i=0; i> 3)) > 2)) { + warn = true; + bad_pots |= (1<> (i*2)]; + lcd_putcAtt(60+i*(2*FW+FW/2), 4*FH+3, 'A'+i, attr); + lcd_putcAtt(60+i*(2*FW+FW/2)+FW, 4*FH+3, c, attr); + } + } + if (potMode) { + for (uint8_t i=0; i> 3)) > 2) { + switch (i) { + case 0: + case 1: + lcd_putc(60+i*(5*FW)+2*FW+2, 6*FH-2, g_model.potPosition[i] > (getValue(MIXSRC_FIRST_POT+i) >> 3) ? 126 : 127); + break; + case 2: + case 3: + lcd_putc(60+i*(5*FW)+2*FW+2, 6*FH-2, g_model.potPosition[i] > (getValue(MIXSRC_FIRST_POT+i) >> 3) ? '\300' : '\301'); + break; + } + flags = INVERS; + } + lcd_putsiAtt(60+i*(5*FW), 6*FH-2, STR_VSRCRAW, NUM_STICKS+1+i, flags); + } + } + } + last_bad_pots = bad_pots; +#else if (last_bad_switches != switches_states) { MESSAGE(STR_SWITCHWARN, NULL, STR_PRESSANYKEYTOSKIP, last_bad_switches == 0xff ? AU_SWITCH_ALERT : AU_NONE); -#if defined(PCBTARANIS) - for (uint8_t i=0; i> (1+i*2)]; - lcd_putcAtt(60+i*(2*FW+FW/2), 5*FH, 'A'+i, attr); - lcd_putcAtt(60+i*(2*FW+FW/2)+FW, 5*FH, c, attr); - } -#else uint8_t x = 2; - for (uint8_t i=1; i2?(i+1):1+((states>>1)&0x3)), attr); - if (i == 1 && attr) i++; - if (i != 1) x += 3*FW+FW/2; + for (uint8_t i=0; i0?(i+3):(states&0x3)+1), attr); + x += 3*FW+FW/2; } #endif lcdRefresh(); last_bad_switches = switches_states; } - if (pwrCheck()==e_power_off || keyDown()) return; // Usb on or power off +#if defined(MODULE_ALWAYS_SEND_PULSES) + if (pwrCheck()==e_power_off || keyDown()) { + startupWarningState = STARTUP_WARNING_SWITCHES+1; + last_bad_switches = 0xff; + } +#else + if (pwrCheck()==e_power_off || keyDown()) return; checkBacklight(); @@ -2217,6 +2558,7 @@ void checkSwitches() SIMU_SLEEP(1); } +#endif } void alert(const pm_char * t, const pm_char *s MESSAGE_SOUND_ARG) @@ -2293,18 +2635,16 @@ 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 uint8_t idx = CONVERT_MODE((uint8_t)k/2); uint8_t phase; - int16_t before; + int before; bool thro; #if defined(GVARS) @@ -2320,16 +2660,25 @@ uint8_t checkTrim(uint8_t event) } else { phase = getTrimFlightPhase(s_perout_flight_phase, idx); +#if defined(PCBTARANIS) + before = getTrimValue(phase, idx); +#else before = getRawTrimValue(phase, idx); +#endif thro = (idx==THR_STICK && g_model.thrTrim); } #else #define TRIM_REUSED() 0 phase = getTrimFlightPhase(s_perout_flight_phase, idx); +#if defined(PCBTARANIS) + before = getTrimValue(phase, idx); +#else before = getRawTrimValue(phase, idx); +#endif 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); // TODO flash saving if (trimInc < 0) 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) @@ -2431,12 +2780,6 @@ uint16_t BandGap = 2040 ; uint16_t BandGap ; #endif -int16_t thrAnaIn(uint8_t chan) -{ - int16_t v = anaIn(chan); - return (g_model.throttleReversed) ? -v : v; -} - #if !defined(SIMU) uint16_t anaIn(uint8_t chan) { @@ -2468,10 +2811,29 @@ void getADC() for (uint32_t x=0; x> 3; + uint16_t v = temp[x] >> 3; +#if defined(PCBTARANIS) + if (s_noScroll) v = temp[x] >> 1; + StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[x]; + if (!s_noScroll && IS_POT_MULTIPOS(x) && calib->count>0 && calib->count> 4); + s_anaFilt[x] = 2*RESX; + for (int i=0; icount; i++) { + if (vShifted < calib->steps[i]) { + s_anaFilt[x] = i*2*RESX/calib->count; + break; + } + } + } + else +#endif + s_anaFilt[x] = v; } } #else @@ -2633,11 +2995,14 @@ void resetAll() #if defined(FRSKY) resetTelemetry(); #endif - for (uint8_t i=0; i0 ? - g_eeGeneral.calibSpanPos[i] : - g_eeGeneral.calibSpanNeg[i]))); + if (IS_POT_MULTIPOS(i)) { + v -= RESX; + } + else { + CalibData * calib = &g_eeGeneral.calib[i]; + v -= calib->mid; + v = v * (int32_t)RESX / (max((int16_t)100, (v>0 ? calib->spanPos : calib->spanNeg))); + } } #endif @@ -2776,7 +3145,7 @@ void evalInputs(uint8_t mode) } if (ch < NUM_STICKS) { //only do this for sticks - if (mode <= e_perout_mode_inactive_phase && (isFunctionActive(FUNC_TRAINER) || isFunctionActive(FUNC_TRAINER_RUD+ch))) { + if (mode <= e_perout_mode_inactive_phase && isFunctionActive(FUNCTION_TRAINER+ch)) { // trainer mode TrainerMix* td = &g_eeGeneral.trainer.mix[ch]; if (td->mode) { @@ -2834,7 +3203,6 @@ void testFunc() #endif MASK_FUNC_TYPE activeFunctions = 0; -MASK_CFN_TYPE activeSwitches = 0; MASK_CFN_TYPE activeFnSwitches = 0; tmr10ms_t lastFunctionTime[NUM_CFN] = { 0 }; @@ -2854,13 +3222,13 @@ PLAY_FUNCTION(playValue, uint8_t idx) case MIXSRC_FIRST_TELEM+TELEM_TM2-1: PLAY_DURATION(val); break; -#if defined(FRSKY) - case MIXSRC_FIRST_TELEM+TELEM_RSSI_TX-1: -#if defined(PCBTARANIS) - // On Taranis RSSI_TX is used for SWR +#if defined(CPUARM) + case MIXSRC_FIRST_TELEM+TELEM_SWR-1: PLAY_NUMBER(val, 0, 0); break; #endif +#if defined(FRSKY) + case MIXSRC_FIRST_TELEM+TELEM_RSSI_TX-1: case MIXSRC_FIRST_TELEM+TELEM_RSSI_RX-1: PLAY_NUMBER(val, 1+UNIT_DBM, 0); break; @@ -2885,11 +3253,14 @@ PLAY_FUNCTION(playValue, uint8_t idx) } case MIXSRC_FIRST_TELEM+TELEM_CELL-1: + case MIXSRC_FIRST_TELEM+TELEM_MIN_CELL-1: PLAY_NUMBER(val/10, 1+UNIT_VOLTS, PREC1); break; case MIXSRC_FIRST_TELEM+TELEM_VFAS-1: case MIXSRC_FIRST_TELEM+TELEM_CELLS_SUM-1: + case MIXSRC_FIRST_TELEM+TELEM_MIN_CELLS_SUM-1: + case MIXSRC_FIRST_TELEM+TELEM_MIN_VFAS-1: PLAY_NUMBER(val, 1+UNIT_VOLTS, PREC1); break; @@ -2905,6 +3276,7 @@ PLAY_FUNCTION(playValue, uint8_t idx) break; case MIXSRC_FIRST_TELEM+TELEM_VSPD-1: + case MIXSRC_FIRST_TELEM+TELEM_ASPD-1: PLAY_NUMBER(val/10, 1+UNIT_METERS_PER_SECOND, PREC1); break; @@ -2918,7 +3290,7 @@ PLAY_FUNCTION(playValue, uint8_t idx) case MIXSRC_FIRST_TELEM+TELEM_ALT-1: #if defined(PCBTARANIS) - PLAY_NUMBER(val/10, 1+UNIT_METERS, PREC1); + PLAY_NUMBER(val/10, 1+UNIT_DIST, PREC1); break; #endif case MIXSRC_FIRST_TELEM+TELEM_MIN_ALT-1: @@ -2928,7 +3300,7 @@ PLAY_FUNCTION(playValue, uint8_t idx) PLAY_NUMBER(val, 1+UNIT_FEET, 0); else #endif - PLAY_NUMBER(val, 1+UNIT_METERS, 0); + PLAY_NUMBER(val, 1+UNIT_DIST, 0); break; case MIXSRC_FIRST_TELEM+TELEM_RPM-1: @@ -2937,7 +3309,7 @@ PLAY_FUNCTION(playValue, uint8_t idx) break; case MIXSRC_FIRST_TELEM+TELEM_HDG-1: - PLAY_NUMBER(val, 1+UNIT_DEGREES, 0); + PLAY_NUMBER(val, 1+UNIT_HDG, 0); break; default: @@ -2971,16 +3343,18 @@ uint8_t mSwitchDuration[1+NUM_ROTARY_ENCODERS] = { 0 }; #endif #if defined(CPUARM) +#define VOLUME_HYSTERESIS 10 // how much must a input value change to actually be considered for new volume setting uint8_t currentSpeakerVolume = 255; uint8_t requiredSpeakerVolume; +getvalue_t requiredSpeakerVolumeRawLast = 1024 + 1; //initial value must be outside normal range uint8_t fnSwitchDuration[NUM_CFN] = { 0 }; inline void playCustomFunctionFile(CustomFnData *sd, uint8_t id) { - char filename[sizeof(SOUNDS_PATH)+sizeof(sd->param.name)+sizeof(SOUNDS_EXT)] = SOUNDS_PATH "/"; + char filename[sizeof(SOUNDS_PATH)+sizeof(sd->play.name)+sizeof(SOUNDS_EXT)] = SOUNDS_PATH "/"; strncpy(filename+SOUNDS_PATH_LNG_OFS, currentLanguagePack->id, 2); - strncpy(filename+sizeof(SOUNDS_PATH), sd->param.name, sizeof(sd->param.name)); - filename[sizeof(SOUNDS_PATH)+sizeof(sd->param.name)] = '\0'; + strncpy(filename+sizeof(SOUNDS_PATH), sd->play.name, sizeof(sd->play.name)); + filename[sizeof(SOUNDS_PATH)+sizeof(sd->play.name)] = '\0'; strcat(filename+sizeof(SOUNDS_PATH), SOUNDS_EXT); PLAY_FILE(filename, sd->func==FUNC_BACKGND_MUSIC ? PLAY_BACKGROUND : 0, id); } @@ -2993,317 +3367,268 @@ bool evalFunctionsFirstTime = true; void evalFunctions() { MASK_FUNC_TYPE newActiveFunctions = 0; - MASK_CFN_TYPE newActiveSwitches = 0; MASK_CFN_TYPE newActiveFnSwitches = 0; #if defined(ROTARY_ENCODERS) && defined(GVARS) static rotenc_t rePreviousValues[ROTARY_ENCODERS]; #endif - for (uint8_t i=0; iswtch; + int8_t swtch = CFN_SWITCH(sd); if (swtch) { - MASK_FUNC_TYPE function_mask = (CFN_FUNC(sd) >= FUNC_TRAINER ? ((MASK_FUNC_TYPE)1 << (CFN_FUNC(sd)-FUNC_TRAINER)) : 0); MASK_CFN_TYPE switch_mask = ((MASK_CFN_TYPE)1 << i); - uint8_t momentary = 0; - -#if !defined(PCBSTD) - - #define MOMENTARY_START_TEST() ( (momentary && !(activeSwitches & switch_mask) && active) || \ - (short_long==1 && !active && mSwitchDuration[mswitch]>0 && mSwitchDuration[mswitch] MAX_SWITCH+1) { - momentary = 1; - swtch -= MAX_SWITCH+1; - } - if (swtch < -MAX_SWITCH-1) { - momentary = 1; - swtch += MAX_SWITCH+1; - } bool active = getSwitch(swtch); - if (active) newActiveSwitches |= switch_mask; - if (momentary || short_long) { -#if !defined(PCBSTD) - bool swState = active; -#endif - - if (MOMENTARY_START_TEST()) { - - if (short_long) { - active = false; - momentary = true; - } - else { - active = !(activeFnSwitches & switch_mask); -#if !defined(CPUARM) - if (CFN_FUNC(sd) == FUNC_PLAY_BOTH && !active) { - momentary = true; - } - else -#endif - { - momentary = false; - } - } - } - else if (swtch == SWSRC_ON) { - active = false; - momentary = false; - } - else { - active = (activeFnSwitches & switch_mask); - momentary = false; - } -#if !defined(PCBSTD) - if (short_long && !(mSwitchDurationIncremented & (1< 0) { + mask = (1<<(CFN_CH_INDEX(sd)-1)); + } + newActiveFunctions |= mask; + break; } - if (!(activeFunctions & function_mask)) { - if (CFN_FUNC(sd) == FUNC_INSTANT_TRIM) { + case FUNC_INSTANT_TRIM: + if (!isFunctionActive(FUNCTION_INSTANT_TRIM)) { + newActiveFunctions |= (1 << FUNCTION_INSTANT_TRIM); if (g_menuStack[0] == menuMainView #if defined(FRSKY) || g_menuStack[0] == menuTelemetryFrsky #endif - ) + ) instantTrim(); } - } - } - else if (CFN_FUNC(sd) <= FUNC_INSTANT_TRIM) { - active = false; - } + break; - if (CFN_FUNC(sd) == FUNC_RESET) { - switch (CFN_PARAM(sd)) { - case FUNC_RESET_TIMER1: - case FUNC_RESET_TIMER2: - resetTimer(CFN_PARAM(sd)); - break; - case FUNC_RESET_ALL: - resetAll(); - break; + case FUNC_RESET: + switch (CFN_PARAM(sd)) { + case FUNC_RESET_TIMER1: + case FUNC_RESET_TIMER2: + resetTimer(CFN_PARAM(sd)); + break; + case FUNC_RESET_ALL: + resetAll(); + break; #if defined(FRSKY) - case FUNC_RESET_TELEMETRY: - resetTelemetry(); - break; + case FUNC_RESET_TELEMETRY: + resetTelemetry(); + break; #endif #if ROTARY_ENCODERS > 0 - case FUNC_RESET_ROTENC1: + case FUNC_RESET_ROTENC1: #if ROTARY_ENCODERS > 1 - case FUNC_RESET_ROTENC2: + case FUNC_RESET_ROTENC2: #endif - g_rotenc[CFN_PARAM(sd)-FUNC_RESET_ROTENC1] = 0; - break; + g_rotenc[CFN_PARAM(sd)-FUNC_RESET_ROTENC1] = 0; + break; #endif - } - } - -#if defined(SDCARD) - else if (CFN_FUNC(sd) == FUNC_LOGS) { - logDelay = CFN_PARAM(sd); - } -#endif - -#if defined(HAPTIC) - else if (CFN_FUNC(sd) == FUNC_HAPTIC) { - haptic.event(AU_FRSKY_LAST+CFN_PARAM(sd)); - } -#endif - -#if defined(CPUARM) && defined(SDCARD) - else if (CFN_FUNC(sd) == FUNC_PLAY_SOUND || CFN_FUNC(sd) == FUNC_PLAY_TRACK || CFN_FUNC(sd) == FUNC_PLAY_VALUE) { - tmr10ms_t tmr10ms = get_tmr10ms(); - uint8_t repeatParam = CFN_PLAY_REPEAT(sd); - if (evalFunctionsFirstTime && repeatParam == CFN_PLAY_REPEAT_NOSTART) - lastFunctionTime[i] = tmr10ms; - if (!lastFunctionTime[i] || (repeatParam && repeatParam!=CFN_PLAY_REPEAT_NOSTART && (signed)(tmr10ms-lastFunctionTime[i])>=100*repeatParam)) { - if (!IS_PLAYING(i+1)) { - lastFunctionTime[i] = tmr10ms; - if (CFN_FUNC(sd) == FUNC_PLAY_SOUND) { - AUDIO_PLAY(AU_FRSKY_FIRST+CFN_PARAM(sd)); - } - else if (CFN_FUNC(sd) == FUNC_PLAY_VALUE) { - PLAY_VALUE(CFN_PARAM(sd), i+1); - } - else { - playCustomFunctionFile(sd, i+1); - } } - } - } - else if (CFN_FUNC(sd) == FUNC_BACKGND_MUSIC) { - if (!IS_PLAYING(i+1)) { - playCustomFunctionFile(sd, i+1); - } - } - else if (CFN_FUNC(sd) == FUNC_VOLUME) { - if (CFN_ACTIVE(sd)) { - requiredSpeakerVolume = ((1024 + getValue(CFN_PARAM(sd))) * VOLUME_LEVEL_MAX) / 2048; - } - else { - active = false; - } - } -#elif defined(VOICE) - else if (CFN_FUNC(sd) == FUNC_PLAY_SOUND || CFN_FUNC(sd) == FUNC_PLAY_TRACK || CFN_FUNC(sd) == FUNC_PLAY_BOTH || CFN_FUNC(sd) == FUNC_PLAY_VALUE) { - tmr10ms_t tmr10ms = get_tmr10ms(); - uint8_t repeatParam = CFN_PLAY_REPEAT(sd); - if (!lastFunctionTime[i] || (CFN_FUNC(sd)==FUNC_PLAY_BOTH && active!=(bool)(activeFnSwitches&switch_mask)) || (repeatParam && (signed)(tmr10ms-lastFunctionTime[i])>=1000*repeatParam)) { - lastFunctionTime[i] = tmr10ms; - uint8_t param = CFN_PARAM(sd); - if (CFN_FUNC(sd) == FUNC_PLAY_SOUND) { - AUDIO_PLAY(AU_FRSKY_FIRST+param); - } - else if (CFN_FUNC(sd) == FUNC_PLAY_VALUE) { - PLAY_VALUE(param, i+1); - } - else { -#if defined(GVARS) - if (CFN_FUNC(sd) == FUNC_PLAY_TRACK && param > 250) - param = GVAR_VALUE(param-251, getGVarFlightPhase(s_perout_flight_phase, param-251)); -#endif - PUSH_CUSTOM_PROMPT(active ? param : param+1, i+1); - } - } - } -#else - else if (CFN_FUNC(sd) == FUNC_PLAY_SOUND) { - tmr10ms_t tmr10ms = get_tmr10ms(); - uint8_t repeatParam = CFN_PLAY_REPEAT(sd); - if (!lastFunctionTime[i] || (repeatParam && (signed)(tmr10ms-lastFunctionTime[i])>=1000*repeatParam)) { - lastFunctionTime[i] = tmr10ms; - AUDIO_PLAY(AU_FRSKY_FIRST+CFN_PARAM(sd)); - } - } -#endif + break; -#if defined(DEBUG) - else if (CFN_FUNC(sd) == FUNC_TEST) { - testFunc(); - } +#if defined(CPUARM) + case FUNC_SET_TIMER: + { + TimerState & timerState = timersStates[CFN_TIMER_INDEX(sd)]; + timerState.state = TMR_OFF; // is changed to RUNNING dep from mode + timerState.val = CFN_PARAM(sd); + timerState.val_10ms = 0 ; + break; + } #endif #if defined(GVARS) - else if (CFN_FUNC(sd) >= FUNC_ADJUST_GV1) { - if (CFN_ACTIVE(sd)) { + case FUNC_ADJUST_GVAR: if (CFN_GVAR_MODE(sd) == 0) { - SET_GVAR(CFN_FUNC(sd)-FUNC_ADJUST_GV1, CFN_PARAM(sd), s_perout_flight_phase); + SET_GVAR(CFN_GVAR_INDEX(sd), CFN_PARAM(sd), s_perout_flight_phase); } else if (CFN_GVAR_MODE(sd) == 2) { - SET_GVAR(CFN_FUNC(sd)-FUNC_ADJUST_GV1, GVAR_VALUE(CFN_PARAM(sd), s_perout_flight_phase), s_perout_flight_phase); + SET_GVAR(CFN_GVAR_INDEX(sd), GVAR_VALUE(CFN_PARAM(sd), s_perout_flight_phase), s_perout_flight_phase); } else if (CFN_GVAR_MODE(sd) == 3) { if (!(activeFnSwitches & switch_mask)) { - SET_GVAR(CFN_FUNC(sd)-FUNC_ADJUST_GV1, GVAR_VALUE(CFN_FUNC(sd)-FUNC_ADJUST_GV1, getGVarFlightPhase(s_perout_flight_phase, CFN_FUNC(sd)-FUNC_ADJUST_GV1)) + (CFN_PARAM(sd) ? +1 : -1), s_perout_flight_phase); + SET_GVAR(CFN_GVAR_INDEX(sd), GVAR_VALUE(CFN_GVAR_INDEX(sd), getGVarFlightPhase(s_perout_flight_phase, CFN_GVAR_INDEX(sd))) + (CFN_PARAM(sd) ? +1 : -1), s_perout_flight_phase); } } else if (CFN_PARAM(sd) >= MIXSRC_TrimRud && CFN_PARAM(sd) <= MIXSRC_TrimAil) { - trimGvar[CFN_PARAM(sd)-MIXSRC_TrimRud] = CFN_FUNC(sd)-FUNC_ADJUST_GV1; + trimGvar[CFN_PARAM(sd)-MIXSRC_TrimRud] = CFN_GVAR_INDEX(sd); } #if defined(ROTARY_ENCODERS) else if (CFN_PARAM(sd) >= MIXSRC_REa && CFN_PARAM(sd) < MIXSRC_TrimRud) { int8_t scroll = rePreviousValues[CFN_PARAM(sd)-MIXSRC_REa] - (g_rotenc[CFN_PARAM(sd)-MIXSRC_REa] / ROTARY_ENCODER_GRANULARITY); if (scroll) { - SET_GVAR(CFN_FUNC(sd)-FUNC_ADJUST_GV1, GVAR_VALUE(CFN_FUNC(sd)-FUNC_ADJUST_GV1, getGVarFlightPhase(s_perout_flight_phase, CFN_FUNC(sd)-FUNC_ADJUST_GV1)) + scroll, s_perout_flight_phase); + SET_GVAR(CFN_GVAR_INDEX(sd), GVAR_VALUE(CFN_GVAR_INDEX(sd), getGVarFlightPhase(s_perout_flight_phase, CFN_GVAR_INDEX(sd))) + scroll, s_perout_flight_phase); } } #endif else { - SET_GVAR(CFN_FUNC(sd)-FUNC_ADJUST_GV1, limit((getvalue_t)-1250, getValue(CFN_PARAM(sd)), (getvalue_t)1250) / 10, s_perout_flight_phase); + SET_GVAR(CFN_GVAR_INDEX(sd), limit((getvalue_t)-1250, getValue(CFN_PARAM(sd)), (getvalue_t)1250) / 10, s_perout_flight_phase); } - } - else { - active = false; - } - } + break; #endif - if (active) { - newActiveFnSwitches |= switch_mask; - newActiveFunctions |= function_mask; +#if defined(CPUARM) && defined(SDCARD) + case FUNC_VOLUME: + { + getvalue_t raw = getValue(CFN_PARAM(sd)); + //only set volume if input changed more than hysteresis + if (abs(requiredSpeakerVolumeRawLast - raw) > VOLUME_HYSTERESIS) { + requiredSpeakerVolumeRawLast = raw; + } + requiredSpeakerVolume = ((1024 + requiredSpeakerVolumeRawLast) * VOLUME_LEVEL_MAX) / 2048; + break; + } +#endif + +#if defined(CPUARM) && defined(SDCARD) + case FUNC_PLAY_SOUND: + case FUNC_PLAY_TRACK: + case FUNC_PLAY_VALUE: + { + tmr10ms_t tmr10ms = get_tmr10ms(); + uint8_t repeatParam = CFN_PLAY_REPEAT(sd); + if (evalFunctionsFirstTime && repeatParam == CFN_PLAY_REPEAT_NOSTART) + lastFunctionTime[i] = tmr10ms; + if (!lastFunctionTime[i] || (repeatParam && repeatParam!=CFN_PLAY_REPEAT_NOSTART && (signed)(tmr10ms-lastFunctionTime[i])>=100*repeatParam)) { + if (!IS_PLAYING(i+1)) { + lastFunctionTime[i] = tmr10ms; + if (CFN_FUNC(sd) == FUNC_PLAY_SOUND) { + AUDIO_PLAY(AU_FRSKY_FIRST+CFN_PARAM(sd)); + } + else if (CFN_FUNC(sd) == FUNC_PLAY_VALUE) { + PLAY_VALUE(CFN_PARAM(sd), i+1); + } + else { + playCustomFunctionFile(sd, i+1); + } + } + } + break; + } + + case FUNC_BACKGND_MUSIC: + newActiveFunctions |= (1 << FUNCTION_BACKGND_MUSIC); + if (!IS_PLAYING(i+1)) { + playCustomFunctionFile(sd, i+1); + } + break; + + case FUNC_BACKGND_MUSIC_PAUSE: + newActiveFunctions |= (1 << FUNCTION_BACKGND_MUSIC_PAUSE); + break; + +#elif defined(VOICE) + case FUNC_PLAY_SOUND: + case FUNC_PLAY_TRACK: + case FUNC_PLAY_BOTH: + case FUNC_PLAY_VALUE: + { + tmr10ms_t tmr10ms = get_tmr10ms(); + uint8_t repeatParam = CFN_PLAY_REPEAT(sd); + if (!lastFunctionTime[i] || (CFN_FUNC(sd)==FUNC_PLAY_BOTH && active!=(bool)(activeFnSwitches&switch_mask)) || (repeatParam && (signed)(tmr10ms-lastFunctionTime[i])>=1000*repeatParam)) { + lastFunctionTime[i] = tmr10ms; + uint8_t param = CFN_PARAM(sd); + if (CFN_FUNC(sd) == FUNC_PLAY_SOUND) { + AUDIO_PLAY(AU_FRSKY_FIRST+param); + } + else if (CFN_FUNC(sd) == FUNC_PLAY_VALUE) { + PLAY_VALUE(param, i+1); + } + else { +#if defined(GVARS) + if (CFN_FUNC(sd) == FUNC_PLAY_TRACK && param > 250) + param = GVAR_VALUE(param-251, getGVarFlightPhase(s_perout_flight_phase, param-251)); +#endif + PUSH_CUSTOM_PROMPT(active ? param : param+1, i+1); + } + } + break; + } +#else + case FUNC_PLAY_SOUND: + { + tmr10ms_t tmr10ms = get_tmr10ms(); + uint8_t repeatParam = CFN_PLAY_REPEAT(sd); + if (!lastFunctionTime[i] || (repeatParam && (signed)(tmr10ms-lastFunctionTime[i])>=1000*repeatParam)) { + lastFunctionTime[i] = tmr10ms; + AUDIO_PLAY(AU_FRSKY_FIRST+CFN_PARAM(sd)); + } + break; + } +#endif + +#if defined(FRSKY) && defined(VARIO) + case FUNC_VARIO: + newActiveFunctions |= (1 << FUNCTION_VARIO); + break; +#endif + +#if defined(HAPTIC) + case FUNC_HAPTIC: + haptic.event(AU_FRSKY_LAST+CFN_PARAM(sd)); + break; +#endif + +#if defined(SDCARD) + case FUNC_LOGS: + newActiveFunctions |= (1 << FUNCTION_LOGS); + logDelay = CFN_PARAM(sd); + break; +#endif + + case FUNC_BACKLIGHT: + newActiveFunctions |= (1 << FUNCTION_BACKLIGHT); + break; + +#if defined(DEBUG) + case FUNC_TEST: + testFunc(); + break; +#endif } + + newActiveFnSwitches |= switch_mask; } else { lastFunctionTime[i] = 0; #if defined(CPUARM) fnSwitchDuration[i] = 0; -#endif -#if defined(CPUARM) && defined(SDCARD) - if (CFN_FUNC(sd) == FUNC_BACKGND_MUSIC && isFunctionActive(FUNC_BACKGND_MUSIC)) { - STOP_PLAY(i+1); - } #endif } } } - activeSwitches = newActiveSwitches; activeFnSwitches = newActiveFnSwitches; activeFunctions = newActiveFunctions; #if defined(ROTARY_ENCODERS) && defined(GVARS) - for (uint8_t i=0; isrcRaw == 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) @@ -3415,7 +3744,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)) { @@ -3433,12 +3761,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) { @@ -3466,7 +3796,7 @@ void perOut(uint8_t mode, uint8_t tick10ms) continue; } else if (!mixEnabled) { - if (md->speedDown && md->mltpx!=MLTPX_REP) { + if ((md->speedDown || md->speedUp) && md->mltpx!=MLTPX_REP) { if (mixCondition) { v = (md->mltpx == MLTPX_ADD ? 0 : RESX); apply_offset_and_curve = false; @@ -3511,6 +3841,7 @@ void perOut(uint8_t mode, uint8_t tick10ms) //========== SPEED =============== // now its on input side, but without weight compensation. More like other remote controls // lower weight causes slower movement + if (mode <= e_perout_mode_inactive_phase && (md->speedUp || md->speedDown)) { // there are delay values #define DEL_MULT_SHIFT 8 // we recale to a mult 256 higher value for calculation @@ -3671,18 +4002,26 @@ void doMixerCalculations() PORTH |= 0x40; // PORTH:6 LOW->HIGH signals start of mixer interrupt #endif - static tmr10ms_t lastTMR; + static tmr10ms_t lastTMR = 0; tmr10ms_t tmr10ms = get_tmr10ms(); - uint8_t tick10ms = (tmr10ms >= lastTMR ? tmr10ms - lastTMR : 1); // handle tick10ms overrun - //@@@ open.20.fsguruh: correct overflow handling costs a lot of code; happens only each 11 min; + uint8_t tick10ms = (tmr10ms >= lastTMR ? tmr10ms - lastTMR : 1); + // handle tick10ms overrun + // correct overflow handling costs a lot of code; happens only each 11 min; // therefore forget the exact calculation and use only 1 instead; good compromise - lastTMR = tmr10ms; - get3POSSwitchesPosition(); +#if !defined(CPUARM) + lastTMR = tmr10ms; +#endif getADC(); + getSwitchesPosition(lastTMR == 0); + +#if defined(CPUARM) + lastTMR = tmr10ms; +#endif + #if defined(PCBSKY9X) && !defined(REVA) && !defined(SIMU) Current_analogue = (Current_analogue*31 + s_anaFilt[8] ) >> 5 ; if (Current_analogue > Current_max) @@ -3728,15 +4067,6 @@ void doMixerCalculations() s_last_phase = phase; } - if (tick10ms) { -#if defined(CPUARM) - requiredSpeakerVolume = g_eeGeneral.speakerVolume + VOLUME_LEVEL_DEF; -#endif - - // the reason this needs to be done before limits is the applyLimit function; it checks for safety switches which would be not initialized otherwise - evalFunctions(); - } - int32_t weight = 0; if (s_fade_flight_phases) { memclear(sum_chans512, sizeof(sum_chans512)); @@ -3744,7 +4074,7 @@ void doMixerCalculations() s_last_switch_used = 0; if (s_fade_flight_phases & ((ACTIVE_PHASES_TYPE)1 << p)) { s_perout_flight_phase = p; - perOut(p==phase?e_perout_mode_normal:e_perout_mode_inactive_phase, p==phase?tick10ms:0); + perOut(p==phase ? e_perout_mode_normal : e_perout_mode_inactive_phase, p==phase ? tick10ms : 0); for (uint8_t i=0; i> 4) * fp_act[p]; weight += fp_act[p]; @@ -3758,7 +4088,17 @@ void doMixerCalculations() s_perout_flight_phase = phase; perOut(e_perout_mode_normal, tick10ms); } - + + //========== FUNCTIONS =============== + // must be done after mixing because some functions use the inputs/channels values + // must be done before limits because of the applyLimit function: it checks for safety switches which would be not initialized otherwise + if (tick10ms) { +#if defined(CPUARM) + requiredSpeakerVolume = g_eeGeneral.speakerVolume + VOLUME_LEVEL_DEF; +#endif + evalFunctions(); + } + //========== LIMITS =============== for (uint8_t i=0; i 1024*256 @@ -3857,34 +4197,25 @@ void doMixerCalculations() timerState->sum = 0; } - uint8_t atm = (tm >= 0 ? tm : TMR_VAROFS-tm-1); - // value for time described in timer->mode // OFFABSTHsTH%THt - if (atm == TMRMODE_THR_REL) { + if (tm == TMRMODE_THR_REL) { timerState->cnt++; timerState->sum+=val; } - if (atm>=(TMR_VAROFS+MAX_SWITCH)){ // toggeled switch - if(!(timerState->toggled | timerState->sum | timerState->cnt | timerState->lastPos)) { timerState->lastPos = tm < 0; timerState->sum = 1; } // if initializing then init the lastPos - uint8_t swPos = getSwitch(tm>0 ? tm-(TMR_VAROFS+MAX_SWITCH-1) : tm+MAX_SWITCH); - if (swPos && !timerState->lastPos) timerState->toggled = !timerState->toggled; // if switch is flipped first time -> change counter state - timerState->lastPos = swPos; - } - if ((timerState->val_10ms += tick10ms) >= 100) { timerState->val_10ms -= 100 ; int16_t newTimerVal = timerState->val; if (tv) newTimerVal = tv - newTimerVal; - if (atm==TMRMODE_ABS) { + if (tm == TMRMODE_ABS) { newTimerVal++; } - else if (atm==TMRMODE_THR) { + else if (tm == TMRMODE_THR) { if (val) newTimerVal++; } - else if (atm==TMRMODE_THR_REL) { + else if (tm == TMRMODE_THR_REL) { // @@@ open.20.fsguruh: why so complicated? we have already a s_sum field; use it for the half seconds (not showable) as well // check for s_cnt[i]==0 is not needed because we are shure it is at least 1 #if defined(ACCURAT_THROTTLE_TIMER) @@ -3900,21 +4231,22 @@ void doMixerCalculations() #endif timerState->cnt=0; } - else if (atm==TMRMODE_THR_TRG) { + else if (tm == TMRMODE_THR_TRG) { if (val || newTimerVal > 0) newTimerVal++; } else { - if (atm<(TMR_VAROFS+MAX_SWITCH)) - timerState->toggled = tm>0 ? getSwitch(tm-(TMR_VAROFS-1)) : !getSwitch(-tm); // normal switch - if (timerState->toggled) + if (tm > 0) tm -= (TMR_VAROFS-1); + if (getSwitch(tm)) newTimerVal++; } - switch(timerState->state) - { + switch (timerState->state) { case TMR_RUNNING: - if (tv && newTimerVal>=(int16_t)tv) timerState->state = TMR_NEGATIVE; + if (tv && newTimerVal>=(int16_t)tv) { + AUDIO_TIMER_00(g_model.timers[i].countdownBeep); + timerState->state = TMR_NEGATIVE; + } break; case TMR_NEGATIVE: if (newTimerVal >= (int16_t)tv + MAX_ALERT_TIME) timerState->state = TMR_STOPPED; @@ -3929,7 +4261,6 @@ void doMixerCalculations() if (g_model.timers[i].countdownBeep && g_model.timers[i].start) { if (newTimerVal==30) AUDIO_TIMER_30(); if (newTimerVal==20) AUDIO_TIMER_20(); - if (newTimerVal==00) AUDIO_TIMER_00(g_model.timers[i].countdownBeep); if (newTimerVal<=10) AUDIO_TIMER_LT10(g_model.timers[i].countdownBeep, newTimerVal); } if (g_model.timers[i].minuteBeep && (newTimerVal % 60)==0) { @@ -3954,8 +4285,8 @@ void doMixerCalculations() s_cnt_1s += 1; for (uint8_t i=0; ifunc == CS_TIMER) { + LogicalSwitchData * cs = cswAddress(i); + if (cs->func == LS_FUNC_TIMER) { int16_t *lastValue = &csLastValue[i]; if (*lastValue == 0 || *lastValue == CS_LAST_VALUE_INIT) { *lastValue = -cswTimerValue(cs->v1); @@ -3968,6 +4299,55 @@ void doMixerCalculations() *lastValue -= 1; } } + else if (cs->func == LS_FUNC_STICKY) { + PACK(typedef struct { + bool state; + bool last; + }) cs_sticky_struct; + cs_sticky_struct & lastValue = (cs_sticky_struct &)csLastValue[i]; + bool before = lastValue.last & 0x01; + if (lastValue.state) { + bool now = getSwitch(cs->v2); + if (now != before) { + lastValue.last ^= true; + if (!before) { + lastValue.state = false; + } + } + } + else { + bool now = getSwitch(cs->v1); + if (before != now) { + lastValue.last ^= true; + if (!before) { + lastValue.state = true; + } + } + } + } +#if defined(CPUARM) + else if (cs->func == LS_FUNC_STAY) { + PACK(typedef struct { + uint8_t state:1; + uint16_t duration:15; + }) cs_stay_struct; + + cs_stay_struct & lastValue = (cs_stay_struct &)csLastValue[i]; + lastValue.state = false; + bool state = getSwitch(cs->v1); + if (state) { + if (cs->v3 == 0 && lastValue.duration == cswTimerValue(cs->v2)) + lastValue.state = true; + if (lastValue.duration < 1000) + lastValue.duration++; + } + else { + if (lastValue.duration > cswTimerValue(cs->v2) && lastValue.duration <= cswTimerValue(cs->v2+cs->v3)) + lastValue.state = true; + lastValue.duration = 0; + } + } +#endif } if (s_cnt_1s >= 10) { // 1sec @@ -4137,8 +4517,10 @@ void opentxClose() hapticOff(); #endif -#if defined(CPUARM) - if((g_model.frsky.mAhPersistent) && (g_model.frsky.storedMah != frskyData.hub.currentConsumption)) { + saveTimers(); + +#if defined(CPUARM) && defined(FRSKY) + if ((g_model.frsky.mAhPersistent) && (g_model.frsky.storedMah != frskyData.hub.currentConsumption)) { g_model.frsky.storedMah = frskyData.hub.currentConsumption; eeDirty(EE_MODEL); } @@ -4148,20 +4530,24 @@ void opentxClose() } #endif - saveTimers(); - #if defined(PCBSKY9X) uint32_t mAhUsed = g_eeGeneral.mAhUsed + Current_used * (488 + g_eeGeneral.currentCalib) / 8192 / 36; - if (g_eeGeneral.mAhUsed != mAhUsed) + if (g_eeGeneral.mAhUsed != mAhUsed) { g_eeGeneral.mAhUsed = mAhUsed; + } #endif -#if defined(CPUARM) && !defined(REVA) - if (sessionTimer > 0) - g_eeGeneral.globalTimer += sessionTimer; +#if defined(PCBTARANIS) + if ((g_model.nPotsToWarn >> 6) == 2) { + for (uint8_t i=0; i> 3; + eeDirty(EE_MODEL); + } #endif g_eeGeneral.unexpectedShutdown = 0; + eeDirty(EE_GENERAL); eeCheck(true); } @@ -4248,6 +4634,13 @@ void perMain() } #endif +#if defined(MODULE_ALWAYS_SEND_PULSES) + if (startupWarningState < STARTUP_WARNING_DONE) { + // don't do menu's until throttle and switch warnings are handled + return; + } +#endif + if (!usbPlugged()) { // TODO merge these 2 branches #if defined(PCBSKY9X) @@ -4290,7 +4683,7 @@ void perMain() checkBacklight(); -#if defined(FRSKY) || defined(MAVLINK) +#if !defined(CPUARM) && (defined(FRSKY) || defined(MAVLINK)) telemetryWakeup(); #endif @@ -4488,10 +4881,10 @@ void perMain() #endif } } -} //endfunc void perMain() +} -int16_t g_ppmIns[8]; -uint8_t ppmInState = 0; //0=unsync 1..8= wait for value i-1 +int16_t g_ppmIns[NUM_PPM]; +uint8_t ppmInState = 0; // 0=unsync 1..8= wait for value i-1 #if !defined(SIMU) && !defined(CPUARM) @@ -4662,7 +5055,7 @@ void instantTrim() if (i!=THR_STICK) { // don't instant trim the throttle stick uint8_t trim_phase = getTrimFlightPhase(s_perout_flight_phase, i); - int16_t trim = limit((int16_t)TRIM_EXTENDED_MIN, (int16_t)((anas[i] + trims[i]) / 2), (int16_t)TRIM_EXTENDED_MAX); + int16_t trim = limit(TRIM_EXTENDED_MIN, (anas[i] + trims[i]) / 2, TRIM_EXTENDED_MAX); setTrimValue(trim_phase, i, trim); } } @@ -4720,9 +5113,16 @@ void moveTrimsToOffsets() // copy state of 3 primary to subtrim if (i!=THR_STICK || !g_model.thrTrim) { int16_t original_trim = getTrimValue(s_perout_flight_phase, i); for (uint8_t phase=0; phase 0) { + g_eeGeneral.globalTimer += sessionTimer; + } +#endif } #endif @@ -4807,8 +5213,9 @@ void stack_paint() p = (unsigned char *) STACKPTR ; q = &__bss_end ; p -= 2 ; - while ( p > q ) + while ( p > q ) { *p-- = 0x55 ; + } } uint16_t stack_free() @@ -4816,10 +5223,7 @@ uint16_t stack_free() unsigned char *p ; p = &__bss_end + 1 ; - while ( *p == 0x55 ) - { - p+= 1 ; - } + while ( *p++ == 0x55 ); return p - &__bss_end ; } #endif @@ -4905,11 +5309,17 @@ inline void opentxInit(OPENTX_INIT_ARGS) lcdSetContrast(); backlightOn(); +#if defined(PCBTARANIS) + uart3Init(g_eeGeneral.uart3Mode); +#endif + #if defined(CPUARM) init_trainer_capture(); #endif +#if !defined(CPUARM) doMixerCalculations(); +#endif startPulses(); @@ -4931,6 +5341,10 @@ void mixerTask(void * pdata) CoLeaveMutexSection(mixerMutex); if (tick10ms) checkTrims(); +#if defined(FRSKY) || defined(MAVLINK) + telemetryWakeup(); +#endif + if (heartbeat == HEART_WDT_CHECK) { wdt_reset(); heartbeat = 0; diff --git a/radio/src/opentx.h b/radio/src/opentx.h index 1ce0294b7..5c86d0dd3 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -45,9 +45,11 @@ // TODO change all IF_xxx by CASE_xxx when used with a comma! #if defined(PCBSKY9X) -#define IF_PCBSKY9X(x) x, +#define IS_PCBSKY9X true +#define CASE_PCBSKY9X(x) x, #else -#define IF_PCBSKY9X(x) +#define IS_PCBSKY9X false +#define CASE_PCBSKY9X(x) #endif #if defined(PCBTARANIS) @@ -376,8 +378,6 @@ enum EnumKeys { #if defined(PCBTARANIS) #define NUM_SWITCHES 8 #define IS_3POS(sw) ((sw) != 5 && (sw) != 7) - #define MAX_PSWITCH (SW_SH2-SW_SA0+1) - #define NUM_POTS 4 #define NUM_SW_SRCRAW 8 #define SWSRC_THR SWSRC_SF2 #define SWSRC_GEA SWSRC_SG2 @@ -389,27 +389,41 @@ enum EnumKeys { #define NUM_SWITCHES 7 #define IS_3POS(sw) ((sw) == 0) #define IS_MOMENTARY(sw) (sw == SWSRC_TRN) - #define MAX_PSWITCH (SW_TRN-SW_ID0+1) // 9 physical switches - #define NUM_POTS 3 #define NUM_SW_SRCRAW 1 #define SW_DSM2_BIND SW_TRN #endif -#define MAX_SWITCH (MAX_PSWITCH+NUM_CSW) +#define NUM_PSWITCH (SWSRC_LAST_SWITCH-SWSRC_FIRST_SWITCH+1) +#define NUM_POTSSW (NUM_XPOTS*6) #if defined(PCBTARANIS) -#define KEY_RIGHT KEY_PLUS -#define KEY_LEFT KEY_MINUS -#define KEY_UP KEY_PLUS -#define KEY_DOWN KEY_MINUS + #define KEY_RIGHT KEY_PLUS + #define KEY_LEFT KEY_MINUS + #define KEY_UP KEY_PLUS + #define KEY_DOWN KEY_MINUS #else -#define KEY_ENTER KEY_MENU -#define KEY_PLUS KEY_RIGHT -#define KEY_MINUS KEY_LEFT + #define KEY_ENTER KEY_MENU + #define KEY_PLUS KEY_RIGHT + #define KEY_MINUS KEY_LEFT #endif #include "myeeprom.h" +enum PotType { + POT_TYPE_NONE, + POT_TYPE_POT, + POT_TYPE_MULTIPOS, + POT_TYPE_MAX=POT_TYPE_MULTIPOS +}; + +#if defined(PCBTARANIS) + #define IS_POT_AVAILABLE(x) ((x)!=POT3 || (g_eeGeneral.potsType & (0x03 << (2*((x)-POT1))))!=POT_TYPE_NONE) + #define IS_POT_MULTIPOS(x) ((x)>=POT1 && (x)<=POT_LAST && ((g_eeGeneral.potsType>>(2*((x)-POT1)))&0x03)==POT_TYPE_MULTIPOS) +#else + #define IS_POT_AVAILABLE(x) (true) + #define IS_POT_MULTIPOS(x) (false) +#endif + #if ROTARY_ENCODERS > 0 #define IF_ROTARY_ENCODERS(x) x, #else @@ -576,24 +590,28 @@ extern uint8_t channel_order(uint8_t x); class Key { #define FILTERBITS 4 + #ifdef SIMU -#define FFVAL 1 + #define FFVAL 1 #else -#define FFVAL ((1< 0; } - void pauseEvents() { m_state = KSTATE_PAUSE; m_cnt = 0; } - void killEvents() { m_state = KSTATE_KILLED; } + + private: + uint8_t m_vals; // key debounce? 4 = 40ms + uint8_t m_cnt; + uint8_t m_state; + public: + void input(bool val, EnumKeys enuk); + bool state() { return m_vals > 0; } + void pauseEvents() { m_state = KSTATE_PAUSE; m_cnt = 0; } + void killEvents() { m_state = KSTATE_KILLED; } }; extern Key keys[NUM_KEYS]; @@ -609,43 +627,6 @@ enum BaseCurves { CURVE_BASE }; -#define SWASH_TYPE_120 1 -#define SWASH_TYPE_120X 2 -#define SWASH_TYPE_140 3 -#define SWASH_TYPE_90 4 -#define SWASH_TYPE_NUM 4 - -enum CswFunctions { - CS_OFF, - CS_VEQUAL, // v==offset - CS_VPOS, // v>offset - CS_VNEG, // voffset - CS_ANEG, // |v|=GV_RANGESMALL_NEG) ? GV1_SMALL : GV1_LARGE ) #define GV_INDEX_CALCULATION(x,max) ( (max<=GV_RANGESMALL && min>=GV_RANGESMALL_NEG) ? (uint8_t) x-GV1_SMALL : ((x&(GV1_LARGE*2-1))-GV1_LARGE) ) #else - #define GV1_SMALL 128 - #define GV1_LARGE 256 #define GV_GET_GV1_VALUE(max) ( (max<=GV_RANGESMALL) ? GV1_SMALL : GV1_LARGE ) #define GV_INDEX_CALCULATION(x,max) ( (max<=GV1_SMALL) ? (uint8_t) x-GV1_SMALL : ((x&(GV1_LARGE*2-1))-GV1_LARGE) ) #endif @@ -927,16 +922,29 @@ extern void setTrimValue(uint8_t phase, uint8_t idx, int16_t trim); #define GV_RANGESMALL_NEG (-GV1_SMALL + (RESERVE_RANGE_FOR_GVARS+1)) #define GV_RANGELARGE (GV1_LARGE - (RESERVE_RANGE_FOR_GVARS+1)) #define GV_RANGELARGE_NEG (-GV1_LARGE + (RESERVE_RANGE_FOR_GVARS+1)) +#if defined(CPUARM) + // the define GV1_LARGE marks the highest bit value used for this variables + // because this would give too big numbers for ARM, we limit it further for + // offset and weight + #define GV_RANGELARGE_WEIGHT (GV_RANGE_WEIGHT) + #define GV_RANGELARGE_WEIGHT_NEG (-GV_RANGE_WEIGHT) + #define GV_RANGELARGE_OFFSET (GV_RANGE_OFFSET) + #define GV_RANGELARGE_OFFSET_NEG (-GV_RANGE_OFFSET) +#else + // for stock we just use as much as possible + #define GV_RANGELARGE_WEIGHT GV_RANGELARGE + #define GV_RANGELARGE_WEIGHT_NEG GV_RANGELARGE_NEG + #define GV_RANGELARGE_OFFSET GV_RANGELARGE + #define GV_RANGELARGE_OFFSET_NEG GV_RANGELARGE_NEG +#endif extern uint16_t s_timeCumTot; extern uint16_t s_timeCumThr; extern uint16_t s_timeCum16ThrP; struct TimerState { - uint8_t lastPos; uint16_t cnt; uint16_t sum; - uint8_t toggled; uint8_t state; int16_t val; uint8_t val_10ms; @@ -1041,12 +1049,15 @@ enum Analogs { #if defined(PCBTARANIS) POT1, POT2, + POT3, + POT_LAST = POT3, SLIDER1, SLIDER2, #else POT1, POT2, POT3, + POT_LAST = POT3, #endif TX_VOLTAGE, #if defined(PCBSKY9X) && !defined(REVA) @@ -1094,6 +1105,7 @@ template FORCEINLINE t min(t a, t b) { return a FORCEINLINE t max(t a, t b) { return a>b?a:b; } template FORCEINLINE t sgn(t a) { return a>0 ? 1 : (a < 0 ? -1 : 0); } template FORCEINLINE t limit(t mi, t x, t ma) { return min(max(mi,x),ma); } +template void swap(t & a, t & b) { t tmp = b; b = a; a = tmp; } #if defined(HELI) || defined(FRSKY_HUB) uint16_t isqrt32(uint32_t n); @@ -1181,10 +1193,7 @@ extern int8_t calcRESXto100(int16_t x); #define TMR_VAROFS 5 -extern const char stamp1[]; -extern const char stamp2[]; -extern const char stamp3[]; -extern const char eeprom_stamp[]; +extern const char vers_stamp[]; extern uint8_t g_vbat100mV; #define g_blinkTmr10ms (*(uint8_t*)&g_tmr10ms) @@ -1192,7 +1201,7 @@ extern uint8_t g_beepCnt; extern uint8_t g_beepVal[5]; extern uint8_t ppmInState; //0=unsync 1..8= wait for value i-1 -extern int16_t g_ppmIns[8]; +extern int16_t g_ppmIns[NUM_PPM]; extern int32_t chans[NUM_CHNOUT]; extern int16_t ex_chans[NUM_CHNOUT]; // Outputs (before LIMITS) of the last perMain extern int16_t channelOutputs[NUM_CHNOUT]; @@ -1225,8 +1234,8 @@ int applyCurve(int x, int8_t idx); void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS_INC); int16_t applyLimits(uint8_t channel, int32_t value); +void evalInputs(uint8_t mode); uint16_t anaIn(uint8_t chan); -int16_t thrAnaIn(uint8_t chan); extern int16_t calibratedStick[NUM_STICKS+NUM_POTS]; #define FLASH_DURATION 20 /*200ms*/ @@ -1241,7 +1250,7 @@ ExpoData *expoAddress(uint8_t idx); MixData *mixAddress(uint8_t idx); LimitData *limitAddress(uint8_t idx); int8_t *curveAddress(uint8_t idx); -CustomSwData *cswAddress(uint8_t idx); +LogicalSwitchData *cswAddress(uint8_t idx); #if !defined(PCBTARANIS) struct CurveInfo { @@ -1305,20 +1314,53 @@ extern int24_t act [MAX_MIXERS]; #define isMixActive(x) false #endif +enum CswFunctionFamilies { + LS_FAMILY_OFS, + LS_FAMILY_BOOL, + LS_FAMILY_COMP, + LS_FAMILY_DIFF, + LS_FAMILY_TIMER, + LS_FAMILY_STICKY, + LS_FAMILY_RANGE, + LS_FAMILY_STAY +}; + +uint8_t cswFamily(uint8_t func); +int16_t cswTimerValue(delayval_t val); + #if defined(CPUARM) - #define MASK_CFN_TYPE uint32_t // current max = 32 function switches - #define MASK_FUNC_TYPE uint32_t // current max = 32 functions + #define MASK_CFN_TYPE uint32_t // current max = 32 function switches + #define MASK_FUNC_TYPE uint32_t // current max = 32 functions + #elif defined(CPUM64) - #define MASK_CFN_TYPE uint16_t // current max = 16 function switches - #define MASK_FUNC_TYPE uint16_t // current max = 16 functions + #define MASK_CFN_TYPE uint16_t // current max = 16 function switches + #define MASK_FUNC_TYPE uint8_t // current max = 8 functions #else - #define MASK_CFN_TYPE uint32_t // current max = 32 function switches - #define MASK_FUNC_TYPE uint16_t // current max = 16 functions + #define MASK_CFN_TYPE uint32_t // current max = 32 function switches + #define MASK_FUNC_TYPE uint8_t // current max = 8 functions #endif -extern MASK_CFN_TYPE activeSwitches; -extern MASK_CFN_TYPE activeFnSwitches; +enum FunctionsActive { + FUNCTION_TRAINER, + FUNCTION_INSTANT_TRIM = FUNCTION_TRAINER+4, + FUNCTION_VARIO, + FUNCTION_BACKLIGHT, +#if defined(SDCARD) + FUNCTION_LOGS, +#endif +#if defined(CPUARM) + FUNCTION_BACKGND_MUSIC, + FUNCTION_BACKGND_MUSIC_PAUSE, +#endif +}; + +#define VARIO_FREQUENCY_ZERO 700/*Hz*/ +#define VARIO_FREQUENCY_RANGE 1000/*Hz*/ +#define VARIO_REPEAT_ZERO 500/*ms*/ +#define VARIO_REPEAT_MAX 80/*ms*/ + extern MASK_FUNC_TYPE activeFunctions; +extern MASK_CFN_TYPE activeFnSwitches; extern tmr10ms_t lastFunctionTime[NUM_CFN]; #if defined(CPUARM) @@ -1327,7 +1369,7 @@ extern bool evalFunctionsFirstTime; inline bool isFunctionActive(uint8_t func) { - return activeFunctions & ((MASK_FUNC_TYPE)1 << (func-FUNC_TRAINER)); + return activeFunctions & ((uint8_t)1 << func); } #if defined(ROTARY_ENCODERS) @@ -1564,6 +1606,14 @@ union ReusableBuffer int16_t loVals[NUM_STICKS+NUM_POTS]; int16_t hiVals[NUM_STICKS+NUM_POTS]; uint8_t state; +#if defined(PCBTARANIS) + struct { + uint8_t stepsCount; + int16_t steps[XPOTS_MULTIPOS_COUNT]; + uint8_t lastCount; + int16_t lastPosition; + } xpotsCalib[NUM_XPOTS]; +#endif } calib; #if defined(SDCARD) @@ -1593,8 +1643,7 @@ uint8_t zlen(const char *str, uint8_t size); bool zexist(const char *str, uint8_t size); char * strcat_zchar(char * dest, char * name, uint8_t size, const char *defaultName, uint8_t defaultNameSize, uint8_t defaultIdx); #define strcat_modelname(dest, idx) strcat_zchar(dest, modelHeaders[idx].name, LEN_MODEL_NAME, STR_MODEL, PSIZE(TR_MODEL), idx+1) -#define strcat_phasename(dest, idx) strcat_zchar(dest, g_model.phaseData[idx].name, LEN_FP_NAME, NULL, 0, 0) -#define strcat_mixername(dest, idx) strcat_zchar(dest, g_model.mixData[idx].name, LEN_EXPOMIX_NAME, NULL, 0, 0) +#define strcat_phasename(dest, idx) strcat_zchar(dest, g_model.phaseData[idx].name, LEN_FP_NAME, STR_FP, PSIZE(TR_FP), idx+1) #define ZLEN(s) zlen(s, sizeof(s)) #define ZEXIST(s) zexist(s, sizeof(s)) #endif @@ -1625,15 +1674,30 @@ extern uint8_t barsThresholds[THLD_MAX]; #endif #if defined(FRSKY) - csw_telemetry_value_t minTelemValue(uint8_t channel); - csw_telemetry_value_t maxTelemValue(uint8_t channel); + ls_telemetry_value_t minTelemValue(uint8_t channel); + ls_telemetry_value_t maxTelemValue(uint8_t channel); #else #define minTelemValue(channel) 255 #define maxTelemValue(channel) 255 #endif -getvalue_t convertTelemValue(uint8_t channel, csw_telemetry_value_t value); -getvalue_t convertCswTelemValue(CustomSwData * cs); +#if defined(CPUARM) +getvalue_t convert16bitsTelemValue(uint8_t channel, ls_telemetry_value_t value); +ls_telemetry_value_t max8bitsTelemValue(uint8_t channel); +#endif + +getvalue_t convert8bitsTelemValue(uint8_t channel, ls_telemetry_value_t value); +getvalue_t convertCswTelemValue(LogicalSwitchData * 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); diff --git a/radio/src/rtc.cpp b/radio/src/rtc.cpp index 1dad84604..a13d9696e 100644 --- a/radio/src/rtc.cpp +++ b/radio/src/rtc.cpp @@ -51,10 +51,7 @@ extern void rtcdriver_settime(struct gtm * t); implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift right in the usual way when A < 0, so SHR falls back on division if ordinary A >> B doesn't seem to be the usual signed shift. */ -#define SHR(a, b) \ - (-1 >> 1 == -1 \ - ? (a) >> (b) \ - : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) +#define SHR(a, b) (-1 >> 1 == -1 ? (a) >> (b) : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) /* The extra casts in the following macros work around compiler bugs, e.g., in Cray C 5.0.3.0. */ @@ -487,7 +484,7 @@ __mktime_internal (struct gtm *tp, gtime_t gmktime (struct gtm *tp) { - // no time zone stuff. Just do the math ;) + // no time zone stuff. Just do the math ;) static gtime_t localtime_offset; return __mktime_internal (tp, __localtime_r, &localtime_offset); } diff --git a/radio/src/sdcard.h b/radio/src/sdcard.h index 4e6c446d7..ccbad5fa6 100644 --- a/radio/src/sdcard.h +++ b/radio/src/sdcard.h @@ -44,7 +44,7 @@ #define LOGS_PATH ROOT_PATH "LOGS" // no trailing slash = important #define SOUNDS_PATH ROOT_PATH "SOUNDS/en" // no trailing slash = important #define SOUNDS_PATH_LNG_OFS (sizeof(SOUNDS_PATH)-3) -#define SYSTEM_SOUNDS_PATH SOUNDS_PATH "/SYSTEM" // no trailing slash = important +#define SYSTEM_SUBDIR "SYSTEM" // no trailing slash = important #define BITMAPS_PATH ROOT_PATH "BMP" #define SCRIPTS_PATH ROOT_PATH "SCRIPTS" @@ -53,7 +53,6 @@ #define SOUNDS_EXT ".wav" #define BITMAPS_EXT ".bmp" #define SCRIPTS_EXT ".lua" -#define MIXES_EXT ".mix" #define TEXT_EXT ".txt" extern FATFS g_FATFS_Obj; diff --git a/radio/src/simpgmspace.cpp b/radio/src/simpgmspace.cpp index 10c7abd4a..b00c96be7 100644 --- a/radio/src/simpgmspace.cpp +++ b/radio/src/simpgmspace.cpp @@ -300,7 +300,7 @@ void *main_thread(void *) eeReadAll(); // load general setup and selected model #if defined(CPUARM) && defined(SDCARD) - refreshSystemAudioFiles(); + referenceSystemAudioFiles(); #endif if (g_eeGeneral.backlightMode != e_backlight_mode_off) backlightOn(); // on Tx start turn the light on @@ -365,9 +365,9 @@ void StartEepromThread(const char *filename) { eepromFile = filename; if (eepromFile) { - fp = fopen(eepromFile, "r+"); + fp = fopen(eepromFile, "rb+"); if (!fp) - fp = fopen(eepromFile, "w+"); + fp = fopen(eepromFile, "wb+"); if (!fp) perror("error in fopen"); } #ifdef __APPLE__ @@ -473,9 +473,10 @@ char *convertSimuPath(const char *path) FRESULT f_stat (const TCHAR * name, FILINFO *) { + char *path = convertSimuPath(name); struct stat tmp; - // printf("f_stat(%s)\n", path); fflush(stdout); - return stat(convertSimuPath(name), &tmp) ? FR_INVALID_NAME : FR_OK; + TRACE("f_stat(%s)", path); + return stat(path, &tmp) ? FR_INVALID_NAME : FR_OK; } FRESULT f_mount (BYTE, FATFS*) @@ -495,7 +496,7 @@ FRESULT f_open (FIL * fil, const TCHAR *name, BYTE flag) return FR_INVALID_NAME; fil->fsize = tmp.st_size; } - fil->fs = (FATFS*)fopen(path, (flag & FA_WRITE) ? "w+" : "r+"); + fil->fs = (FATFS*)fopen(path, (flag & FA_WRITE) ? "wb+" : "rb+"); return FR_OK; } @@ -534,7 +535,9 @@ FRESULT f_chdir (const TCHAR *name) FRESULT f_opendir (DIR * rep, const TCHAR * name) { - rep->fs = (FATFS *)simu::opendir(convertSimuPath(name)); + char *path = convertSimuPath(name); + TRACE("f_opendir(%s)", path); + rep->fs = (FATFS *)simu::opendir(path); return FR_OK; } @@ -548,9 +551,11 @@ FRESULT f_readdir (DIR * rep, FILINFO * fil) fil->fattrib = (ent->d_type == DT_DIR ? AM_DIR : 0); #else if (ent->d_type == simu::DT_UNKNOWN) { + fil->fattrib = 0; struct stat buf; - lstat(ent->d_name, &buf); - fil->fattrib = (S_ISDIR(buf.st_mode) ? AM_DIR : 0); + if (stat(ent->d_name, &buf) == 0) { + fil->fattrib = (S_ISDIR(buf.st_mode) ? AM_DIR : 0); + } } else { fil->fattrib = (ent->d_type == simu::DT_DIR ? AM_DIR : 0); @@ -561,6 +566,7 @@ FRESULT f_readdir (DIR * rep, FILINFO * fil) memset(fil->lfname, 0, SD_SCREEN_FILE_LENGTH); strncpy(fil->fname, ent->d_name, 13-1); strcpy(fil->lfname, ent->d_name); + // TRACE("f_readdir(): %s", fil->fname); return FR_OK; } @@ -632,6 +638,7 @@ void lcdRefresh() #if defined(PCBTARANIS) void usbStart() { } +void USART_DeInit(USART_TypeDef* ) { } ErrorStatus RTC_SetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct) { return SUCCESS; } ErrorStatus RTC_SetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct) { return SUCCESS; } void RTC_GetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct) { } diff --git a/radio/src/simpgmspace.h b/radio/src/simpgmspace.h index cda058487..d3684200f 100644 --- a/radio/src/simpgmspace.h +++ b/radio/src/simpgmspace.h @@ -359,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 @@ -404,4 +406,5 @@ extern char simuSdDirectory[1024]; #define SD_GET_SIZE_MB() (0) #define SD_GET_SPEED() (0) + #endif diff --git a/radio/src/simu.cpp b/radio/src/simu.cpp index 37aad7040..abe3bd6d4 100644 --- a/radio/src/simu.cpp +++ b/radio/src/simu.cpp @@ -51,23 +51,24 @@ int g_snapshot_idx = 0; class Open9xSim: public FXMainWindow { FXDECLARE(Open9xSim) -public: - Open9xSim(){}; - Open9xSim(FXApp* a); - long onKeypress(FXObject*,FXSelector,void*); - long onTimeout(FXObject*,FXSelector,void*); - void makeSnapshot(const FXDrawable* drawable); - void doEvents(); - void refreshDiplay(); -private: - FXImage *bmp; - FXImageFrame *bmf; - bool firstTime; + public: + Open9xSim(){}; + Open9xSim(FXApp* a); + long onKeypress(FXObject*,FXSelector,void*); + long onTimeout(FXObject*,FXSelector,void*); + void makeSnapshot(const FXDrawable* drawable); + void doEvents(); + void refreshDiplay(); -public: - FXSlider *sliders[8]; - FXKnob *knobs[NUM_POTS]; + private: + FXImage *bmp; + FXImageFrame *bmf; + bool firstTime; + + public: + FXSlider *sliders[8]; + FXKnob *knobs[NUM_POTS]; }; // Message Map FXDEFMAP(Open9xSim) Open9xSimMap[]={ @@ -79,8 +80,8 @@ FXDEFMAP(Open9xSim) Open9xSimMap[]={ FXIMPLEMENT(Open9xSim,FXMainWindow,Open9xSimMap,ARRAYNUMBER(Open9xSimMap)) -Open9xSim::Open9xSim(FXApp* a) -:FXMainWindow(a,"OpenTXSimu",NULL,NULL,DECOR_ALL,20,90,0,0) +Open9xSim::Open9xSim(FXApp* a): + FXMainWindow(a, "OpenTX Simu", NULL, NULL, DECOR_ALL, 20, 90, 0, 0) { firstTime=true; for(int i=0; i<(LCD_W*LCD_H/8); i++) displayBuf[i]=0;//rand(); @@ -406,18 +407,18 @@ uint16_t anaIn(uint8_t chan) else if (chanknobs[chan-NUM_STICKS]->getValue(); #if defined(PCBTARANIS) - else if (chan == 8) + else if (chan == TX_VOLTAGE) return 1000; #elif defined(PCBSKY9X) - else if (chan == 7) + else if (chan == TX_VOLTAGE) return 1500; - else if (chan == 8) + else if (chan == TX_CURRENT) return 100; #elif defined(PCBGRUVIN9X) - else if (chan == 7) + else if (chan == TX_VOLTAGE) return 150; #else - else if (chan == 7) + else if (chan == TX_VOLTAGE) return 1500; #endif else diff --git a/radio/src/stamp.cpp b/radio/src/stamp.cpp index 7200b60b9..cce6febc4 100644 --- a/radio/src/stamp.cpp +++ b/radio/src/stamp.cpp @@ -40,11 +40,8 @@ #define STR2(s) #s #define DEFNUMSTR(s) STR2(s) -const pm_char stamp1[] PROGMEM = " SVN: " SVN_STR; -const pm_char stamp2[] PROGMEM = "DATE: " DATE_STR; -const pm_char stamp3[] PROGMEM = "TIME: " TIME_STR; #if defined(PCBSTD) -const pm_char eeprom_stamp[] PROGMEM = "EEPR: " DEFNUMSTR(EEPROM_VER) "-" DEFNUMSTR(EEPROM_VARIANT); +const pm_char vers_stamp[] PROGMEM = "VERS\037\033: " VERS_STR "\036DATE\037\033: " DATE_STR"\036TIME\037\033: " TIME_STR "\036EEPR\037\033: " DEFNUMSTR(EEPROM_VER) "-" DEFNUMSTR(EEPROM_VARIANT); #else -const pm_char eeprom_stamp[] PROGMEM = "EEPR: " DEFNUMSTR(EEPROM_VER); +const pm_char vers_stamp[] PROGMEM = "VERS\037\033: " VERS_STR "\036DATE\037\033: " DATE_STR"\036TIME\037\033: " TIME_STR "\036EEPR\037\033: " DEFNUMSTR(EEPROM_VER); #endif diff --git a/radio/src/targets/gruvin9x/board_gruvin9x.cpp b/radio/src/targets/gruvin9x/board_gruvin9x.cpp index a65fefa4b..97ac9a5d9 100644 --- a/radio/src/targets/gruvin9x/board_gruvin9x.cpp +++ b/radio/src/targets/gruvin9x/board_gruvin9x.cpp @@ -182,12 +182,6 @@ void pwrOff() #endif } -#if ROTARY_ENCODERS <= 2 -#define ROTENC_DOWN() ((~PIND & 0x20) || (~PIND & 0x10)) -#else -#define ROTENC_DOWN() (0) -#endif - FORCEINLINE uint8_t keyDown() { return ((~PINL) & 0x3F) || ROTENC_DOWN(); @@ -261,59 +255,50 @@ bool switchState(EnumKeys enuk) return result; } +static const pm_uchar crossTrim[] PROGMEM = { + 1<> 3; - - for (int i=1; i<7; i++) - { - //INP_B_KEY_MEN 1 .. INP_B_KEY_LFT 6 - keys[enuk].input(in & (1<4000 && val<19000) { // G: Prioritize reset pulse. (Needed when less than 8 incoming pulses) + if (val>4000 && val<19000) { // G: Prioritize reset pulse. (Needed when less than 16 incoming pulses) ppmInState = 1; // triggered } else { - if (ppmInState && ppmInState<=8) + if (ppmInState && ppmInState<=16) { if (val>800 && val<2200) // if valid pulse-width range { diff --git a/radio/src/targets/sky9x/board_sky9x.h b/radio/src/targets/sky9x/board_sky9x.h index 873d3e7e5..59ad8f145 100644 --- a/radio/src/targets/sky9x/board_sky9x.h +++ b/radio/src/targets/sky9x/board_sky9x.h @@ -253,9 +253,12 @@ void rotencInit(); void rotencEnd(); #if ROTARY_ENCODERS > 0 - #define rotencDown() (!(PIOB->PIO_PDSR & 0x40)) + #define REA_DOWN() (!(PIOB->PIO_PDSR & 0x40)) #else - #define rotencDown() 0 + #define REA_DOWN() (0) #endif +// Debug driver +void debugPutc(const char c); + #endif diff --git a/radio/src/targets/sky9x/diskio.cpp b/radio/src/targets/sky9x/diskio.cpp index d7f60e900..8d9ff5cfc 100644 --- a/radio/src/targets/sky9x/diskio.cpp +++ b/radio/src/targets/sky9x/diskio.cpp @@ -1014,7 +1014,7 @@ void sdMountPoll() case SD_ST_DATA: if (!usbPlugged() && f_mount(0, &g_FATFS_Obj) == FR_OK) { - refreshSystemAudioFiles(); + referenceSystemAudioFiles(); Card_state = SD_ST_MOUNTED; } break; @@ -1082,7 +1082,7 @@ void sdInit() Card_state = SD_ST_DATA; if (f_mount(0, &g_FATFS_Obj) == FR_OK) { - refreshSystemAudioFiles(); + referenceSystemAudioFiles(); Card_state = SD_ST_MOUNTED; } diff --git a/radio/src/targets/sky9x/keys_driver.cpp b/radio/src/targets/sky9x/keys_driver.cpp index 604db4f8b..7851a447e 100644 --- a/radio/src/targets/sky9x/keys_driver.cpp +++ b/radio/src/targets/sky9x/keys_driver.cpp @@ -113,9 +113,14 @@ uint32_t readTrims() return result; } +uint8_t trimDown(uint8_t idx) +{ + return readTrims() & (1 << idx); +} + uint8_t keyDown() { - return (~readKeys() & 0x7E) || rotencDown(); + return (~readKeys() & 0x7E) || REA_DOWN(); } void readKeysAndTrims() @@ -123,7 +128,7 @@ void readKeysAndTrims() register uint32_t i; #if ROTARY_ENCODERS > 0 - keys[BTN_REa].input(rotencDown(), BTN_REa); + keys[BTN_REa].input(REA_DOWN(), BTN_REa); #endif uint8_t enuk = KEY_MENU; diff --git a/radio/src/targets/stock/board_stock.cpp b/radio/src/targets/stock/board_stock.cpp index 8f1fd72eb..eaf5f2201 100644 --- a/radio/src/targets/stock/board_stock.cpp +++ b/radio/src/targets/stock/board_stock.cpp @@ -234,37 +234,38 @@ bool switchState(EnumKeys enuk) return result; } -#ifndef SIMU -FORCEINLINE -#endif -void readKeysAndTrims() +// Trim switches ... +static const pm_uchar crossTrim[] PROGMEM ={ + 1<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) | @@ -383,7 +383,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/adc_driver.cpp b/radio/src/targets/taranis/adc_driver.cpp index a57e300bd..12aaea7c9 100644 --- a/radio/src/targets/taranis/adc_driver.cpp +++ b/radio/src/targets/taranis/adc_driver.cpp @@ -60,9 +60,9 @@ volatile uint16_t Analog_values[NUMBER_ANALOG]; #if defined(REV4a) -const char ana_direction[NUMBER_ANALOG] = {0,1,0,1, 1,1,1,0, 0}; +const char ana_direction[NUMBER_ANALOG] = {0,1,0,1, 1,1,0,1,0, 0}; #elif !defined(REV3) -const char ana_direction[NUMBER_ANALOG] = {0,1,0,1, 1,0,1,0, 0}; +const char ana_direction[NUMBER_ANALOG] = {0,1,0,1, 1,0,0,1,0, 0}; #endif void adcInit() @@ -88,7 +88,7 @@ void adcInit() ADC1->CR1 = ADC_CR1_SCAN ; ADC1->CR2 = ADC_CR2_ADON | ADC_CR2_DMA | ADC_CR2_DDS ; ADC1->SQR1 = (NUMBER_ANALOG-1) << 20 ; // NUMBER_ANALOG Channels - ADC1->SQR2 = SLIDE_L + (SLIDE_R<<5) + (BATTERY<<10) ; + ADC1->SQR2 = (SLIDE_L<<5) + (SLIDE_R<<10) + (BATTERY<<15) ; ADC1->SQR3 = STICK_LH + (STICK_LV<<5) + (STICK_RV<<10) + (STICK_RH<<15) + (POT_L<<20) + (POT_R<<25) ; ADC1->SMPR1 = SAMPTIME + (SAMPTIME<<3) + (SAMPTIME<<6) + (SAMPTIME<<9) + (SAMPTIME<<12) + (SAMPTIME<<15) + (SAMPTIME<<18) + (SAMPTIME<<21) + (SAMPTIME<<24) ; @@ -120,7 +120,6 @@ void adcRead() } } DMA2_Stream0->CR &= ~DMA_SxCR_EN ; // Disable DMA - // return ( i < 10000 ) ? 1 : 0 ; #if !defined(REV3) // adc direction correct @@ -136,9 +135,3 @@ void adcRead() void adcStop() { } - - - - - - diff --git a/radio/src/targets/taranis/board_taranis.cpp b/radio/src/targets/taranis/board_taranis.cpp index 36987fab9..754f6e6c1 100644 --- a/radio/src/targets/taranis/board_taranis.cpp +++ b/radio/src/targets/taranis/board_taranis.cpp @@ -192,9 +192,6 @@ void boardInit() adcInit(); delaysInit(); audioInit(); -#if defined(DEBUG) - uartInit(DEBUG_UART_BAUDRATE); -#endif init5msTimer(); __enable_irq(); eepromInit(); diff --git a/radio/src/targets/taranis/board_taranis.h b/radio/src/targets/taranis/board_taranis.h index 9c492c32d..4bbd2fde0 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() @@ -77,11 +77,11 @@ extern uint16_t sessionTimer; void delaysInit(); -#define DEBUG_UART_BAUDRATE 115200 +#define DEBUG_BAUDRATE 115200 #define SPORT_BAUDRATE 57600 -void uartInit(uint32_t baudrate); -void uartPutc(const char c); +void uart3Init(unsigned int mode); +void uart3Putc(const char c); void sportInit(void); @@ -183,6 +183,8 @@ bool usbPlugged(void); void eeWriteBlockCmp(const void *pointer_ram, uint16_t pointer_eeprom, size_t size); #endif +// Debug driver +void debugPutc(const char c); extern uint8_t currentTrainerMode; diff --git a/radio/src/targets/taranis/diskio.cpp b/radio/src/targets/taranis/diskio.cpp index b1d2dea7e..d9586804f 100644 --- a/radio/src/targets/taranis/diskio.cpp +++ b/radio/src/targets/taranis/diskio.cpp @@ -969,7 +969,7 @@ FIL g_telemetryFile = {0}; void sdInit() { if (f_mount(0, &g_FATFS_Obj) == FR_OK) { - refreshSystemAudioFiles(); + referenceSystemAudioFiles(); #if defined(DEBUG) f_open(&g_telemetryFile, LOGS_PATH "/sport.log", FA_OPEN_ALWAYS | FA_WRITE); diff --git a/radio/src/targets/taranis/keys_driver.cpp b/radio/src/targets/taranis/keys_driver.cpp index 069e70da8..d8e97524b 100644 --- a/radio/src/targets/taranis/keys_driver.cpp +++ b/radio/src/targets/taranis/keys_driver.cpp @@ -92,6 +92,11 @@ uint32_t readTrims() return result; } +uint8_t trimDown(uint8_t idx) +{ + return readTrims() & (1 << idx); +} + uint8_t keyDown() { return ~readKeys() & 0x7E ; diff --git a/radio/src/targets/taranis/trainer_driver.cpp b/radio/src/targets/taranis/trainer_driver.cpp index 9319cc18b..5e453d215 100644 --- a/radio/src/targets/taranis/trainer_driver.cpp +++ b/radio/src/targets/taranis/trainer_driver.cpp @@ -124,13 +124,13 @@ extern "C" void TIM3_IRQHandler() val = (uint16_t)(capture - lastCapt) / 2 ; lastCapt = capture; - // We prcoess g_ppmInsright here to make servo movement as smooth as possible + // We process g_ppmInsright here to make servo movement as smooth as possible // while under trainee control - if ((val>4000) && (val < 19000)) { // G: Prioritize reset pulse. (Needed when less than 8 incoming pulses) + if ((val>4000) && (val < 19000)) { // G: Prioritize reset pulse. (Needed when less than 16 incoming pulses) ppmInState = 1; // triggered } else { - if (ppmInState && (ppmInState<=8)) { + if (ppmInState && (ppmInState<=16)) { if ((val>800) && (val<2200)) { g_ppmIns[ppmInState++ - 1] = (int16_t)(val - 1500)*(g_eeGeneral.PPM_Multiplier+10)/10; //+-500 != 512, but close enough. } diff --git a/radio/src/targets/taranis/uart_driver.cpp b/radio/src/targets/taranis/uart3_driver.cpp similarity index 81% rename from radio/src/targets/taranis/uart_driver.cpp rename to radio/src/targets/taranis/uart3_driver.cpp index f084ae8fb..00a0d8891 100644 --- a/radio/src/targets/taranis/uart_driver.cpp +++ b/radio/src/targets/taranis/uart3_driver.cpp @@ -36,7 +36,7 @@ #include "../../opentx.h" -void uartInit(uint32_t baudrate) +void uart3Setup(unsigned int baudrate) { USART_InitTypeDef USART_InitStructure; GPIO_InitTypeDef GPIO_InitStructure; @@ -69,22 +69,47 @@ void uartInit(uint32_t baudrate) USART_ITConfig(UART3, USART_IT_TXE, DISABLE); NVIC_EnableIRQ(USART3_IRQn); - NVIC_SetPriority(USART3_IRQn, 8); + NVIC_SetPriority(USART3_IRQn, 7); +} + +void uart3Init(unsigned int mode) +{ + USART_DeInit(USART3); + + switch(mode) { + case UART_MODE_SPORT: + uart3Setup(SPORT_BAUDRATE); + break; +#if defined(DEBUG) + case UART_MODE_DEBUG: + uart3Setup(DEBUG_BAUDRATE); + break; +#endif + } +} + +Fifo<512> uart3TxFifo; + +void uart3Putc(const char c) +{ + uart3TxFifo.push(c); + USART_ITConfig(UART3, USART_IT_TXE, ENABLE); } #if defined(DEBUG) -Fifo<512> debugTxFifo; void debugPutc(const char c) { - debugTxFifo.push(c); - USART_ITConfig(UART3, USART_IT_TXE, ENABLE); + if (g_eeGeneral.uart3Mode == UART_MODE_DEBUG) { + uart3Putc(c); + } } +#endif extern "C" void USART3_IRQHandler(void) { if (USART_GetITStatus(UART3, USART_IT_TXE) != RESET) { uint8_t txchar; - if (debugTxFifo.pop(txchar)) { + if (uart3TxFifo.pop(txchar)) { /* Write one byte to the transmit data register */ USART_SendData(UART3, txchar); } @@ -93,4 +118,3 @@ extern "C" void USART3_IRQHandler(void) } } } -#endif diff --git a/radio/src/telemetry/frsky.cpp b/radio/src/telemetry/frsky.cpp index f2e7f7905..408fa43cd 100644 --- a/radio/src/telemetry/frsky.cpp +++ b/radio/src/telemetry/frsky.cpp @@ -71,10 +71,10 @@ FrskyData frskyData; #if defined(FRSKY_HUB) || defined(WS_HOW_HIGH) void checkMinMaxAltitude() { - if (TELEMETRY_ALT_BP > frskyData.hub.maxAltitude) - frskyData.hub.maxAltitude = TELEMETRY_ALT_BP; - if (TELEMETRY_ALT_BP < frskyData.hub.minAltitude) - frskyData.hub.minAltitude = TELEMETRY_ALT_BP; + if (TELEMETRY_RELATIVE_BARO_ALT_BP > frskyData.hub.maxAltitude) + frskyData.hub.maxAltitude = TELEMETRY_RELATIVE_BARO_ALT_BP; + if (TELEMETRY_RELATIVE_BARO_ALT_BP < frskyData.hub.minAltitude) + frskyData.hub.minAltitude = TELEMETRY_RELATIVE_BARO_ALT_BP; } #endif @@ -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; @@ -694,6 +700,9 @@ void telemetryInterrupt10ms() voltage += frskyData.hub.cellVolts[i]; voltage /= 5; frskyData.hub.cellsSum = voltage; + if (frskyData.hub.cellsSum < frskyData.hub.minCells) { + frskyData.hub.minCells = frskyData.hub.cellsSum; + } #endif if (TELEMETRY_STREAMING()) { diff --git a/radio/src/telemetry/frsky.h b/radio/src/telemetry/frsky.h index 5446787f4..9e97989e0 100644 --- a/radio/src/telemetry/frsky.h +++ b/radio/src/telemetry/frsky.h @@ -124,7 +124,7 @@ PACK(struct FrskySerialData { uint16_t currentConsumption; // 0x35 openXsensor only! Otherwise calculated by the Tx from current uint16_t currentPrescale; uint16_t power; // 0x37 openXsensor only! Otherwise calculated by the Tx from current and voltage - int16_t spare2; + int16_t airSpeed; uint16_t vfas; // 0x39 Added to FrSky protocol for home made sensors with a better precision uint16_t volts_bp; // 0x3A @@ -139,9 +139,14 @@ PACK(struct FrskySerialData { int16_t maxTemperature2; uint16_t maxGpsSpeed; uint16_t maxGpsDistance; + int16_t minCell; + int16_t minCells; + int16_t minVfas; uint16_t maxCurrent; uint16_t maxPower; /* end */ + + int16_t dTE; }); #elif defined(WS_HOW_HIGH) PACK(struct FrskySerialData { @@ -183,6 +188,9 @@ PACK(struct FrskySerialData { struct FrskyData { FrskyValueWithMinMax analog[2]; FrskyValueWithMin rssi[2]; +#if defined(CPUARM) + FrskyValueWithMinMax swr; +#endif FrskySerialData hub; }; @@ -217,29 +225,41 @@ bool FRSKY_alarmRaised(uint8_t idx); void resetTelemetry(); -#define TELEMETRY_ALT_BP frskyData.hub.baroAltitude_bp -#define TELEMETRY_ALT_AP frskyData.hub.baroAltitude_ap -#define TELEMETRY_GPS_SPEED_BP frskyData.hub.gpsSpeed_bp -#define TELEMETRY_GPS_SPEED_AP frskyData.hub.gpsSpeed_ap -#define TELEMETRY_GPS_ALT_AP frskyData.hub.gpsAltitude_ap -#define TELEMETRY_GPS_ALT_BP frskyData.hub.gpsAltitude_bp -#define TELEMETRY_ALT frskyData.hub.baroAltitude_bp, frskyData.hub.baroAltitude_ap -#define TELEMETRY_ALT_FORMAT "%d.%02d," -#define TELEMETRY_CELLS frskyData.hub.cellsSum / 10, frskyData.hub.cellsSum % 10, frskyData.hub.cellVolts[0]*2/100, frskyData.hub.cellVolts[0]*2%100, frskyData.hub.cellVolts[1]*2/100, frskyData.hub.cellVolts[1]*2%100, frskyData.hub.cellVolts[2]*2/100, frskyData.hub.cellVolts[2]*2%100, frskyData.hub.cellVolts[3]*2/100, frskyData.hub.cellVolts[3]*2%100, frskyData.hub.cellVolts[4]*2/100, frskyData.hub.cellVolts[4]*2%100, frskyData.hub.cellVolts[5]*2/100, frskyData.hub.cellVolts[5]*2%100 -#define TELEMETRY_CELLS_FORMAT "%d.%d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d," -#define TELEMETRY_CURRENT frskyData.hub.current / 100, frskyData.hub.current % 100 -#define TELEMETRY_CURRENT_FORMAT "%d.%02d," -#define TELEMETRY_VFAS frskyData.hub.vfas / 10, frskyData.hub.vfas % 10 -#define TELEMETRY_VFAS_FORMAT "%d.%d," -#define TELEMETRY_VSPEED frskyData.hub.varioSpeed < 0 ? '-' : ' ', frskyData.hub.varioSpeed / 100, frskyData.hub.varioSpeed % 100 -#define TELEMETRY_VSPEED_FORMAT "%c%d.%02d," +#define TELEMETRY_STREAMING() (frskyStreaming > 0) -#define TELEMETRY_STREAMING() (frskyStreaming > 0) +#define TELEMETRY_CELL_VOLTAGE(k) (frskyData.hub.cellVolts[k] * 2) +#define TELEMETRY_MIN_CELL_VOLTAGE (frskyData.hub.minCellVolts * 2) + +#define TELEMETRY_BARO_ALT_AVAILABLE() (frskyData.hub.baroAltitudeOffset) +#define TELEMETRY_BARO_ALT_UNIT (IS_IMPERIAL_ENABLE() ? LENGTH_UNIT_IMP : LENGTH_UNIT_METR) + +#define TELEMETRY_RELATIVE_BARO_ALT_BP frskyData.hub.baroAltitude_bp +#define TELEMETRY_RELATIVE_BARO_ALT_AP frskyData.hub.baroAltitude_ap +#define TELEMETRY_RELATIVE_GPS_ALT_BP frskyData.hub.gpsAltitude_bp +#define TELEMETRY_GPS_SPEED_BP frskyData.hub.gpsSpeed_bp +#define TELEMETRY_GPS_SPEED_AP frskyData.hub.gpsSpeed_ap + +#define TELEMETRY_BARO_ALT_PREPARE() +#define TELEMETRY_BARO_ALT_FORMAT "%d," +#define TELEMETRY_BARO_ALT_ARGS frskyData.hub.baroAltitude_bp, +#define TELEMETRY_GPS_ALT_FORMAT "%d," +#define TELEMETRY_GPS_ALT_ARGS frskyData.hub.gpsAltitude_bp, +#define TELEMETRY_GPS_SPEED_UNIT (IS_IMPERIAL_ENABLE() ? SPEED_UNIT_IMP : SPEED_UNIT_METR) +#define TELEMETRY_GPS_SPEED_FORMAT "%d," +#define TELEMETRY_GPS_SPEED_ARGS getConvertedTelemetryValue(frskyData.hub.gpsSpeed_bp, UNIT_KTS), +#define TELEMETRY_CELLS_FORMAT "%d.%d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d," +#define TELEMETRY_CELLS_ARGS frskyData.hub.cellsSum / 10, frskyData.hub.cellsSum % 10, frskyData.hub.cellVolts[0]*2/100, frskyData.hub.cellVolts[0]*2%100, frskyData.hub.cellVolts[1]*2/100, frskyData.hub.cellVolts[1]*2%100, frskyData.hub.cellVolts[2]*2/100, frskyData.hub.cellVolts[2]*2%100, frskyData.hub.cellVolts[3]*2/100, frskyData.hub.cellVolts[3]*2%100, frskyData.hub.cellVolts[4]*2/100, frskyData.hub.cellVolts[4]*2%100, frskyData.hub.cellVolts[5]*2/100, frskyData.hub.cellVolts[5]*2%100, +#define TELEMETRY_CURRENT_FORMAT "%d.%02d," +#define TELEMETRY_CURRENT_ARGS frskyData.hub.current / 100, frskyData.hub.current % 100, +#define TELEMETRY_VFAS_FORMAT "%d.%d," +#define TELEMETRY_VFAS_ARGS frskyData.hub.vfas / 10, frskyData.hub.vfas % 10, +#define TELEMETRY_VSPEED_FORMAT "%c%d.%02d," +#define TELEMETRY_VSPEED_ARGS frskyData.hub.varioSpeed < 0 ? '-' : ' ', frskyData.hub.varioSpeed / 100, frskyData.hub.varioSpeed % 100, #if defined(FRSKY_HUB) - #define TELEMETRY_OPENXSENSOR() (frskyData.hub.openXsensor) + #define TELEMETRY_OPENXSENSOR() (frskyData.hub.openXsensor) #else - #define TELEMETRY_OPENXSENSOR() (0) + #define TELEMETRY_OPENXSENSOR() (0) #endif #endif diff --git a/radio/src/telemetry/frsky_sport.cpp b/radio/src/telemetry/frsky_sport.cpp index 8499cb5f8..8ac5a0801 100644 --- a/radio/src/telemetry/frsky_sport.cpp +++ b/radio/src/telemetry/frsky_sport.cpp @@ -36,46 +36,46 @@ #include "../opentx.h" -#define START_STOP 0x7e -#define BYTESTUFF 0x7d -#define STUFF_MASK 0x20 +#define START_STOP 0x7e +#define BYTESTUFF 0x7d +#define STUFF_MASK 0x20 // FrSky PRIM IDs (1 byte) -#define DATA_FRAME 0x10 +#define DATA_FRAME 0x10 // FrSky old DATA IDs (1 byte) -#define GPS_ALT_BP_ID 0x01 -#define TEMP1_ID 0x02 -#define RPM_ID 0x03 -#define FUEL_ID 0x04 -#define TEMP2_ID 0x05 -#define VOLTS_ID 0x06 -#define GPS_ALT_AP_ID 0x09 -#define BARO_ALT_BP_ID 0x10 -#define GPS_SPEED_BP_ID 0x11 -#define GPS_LONG_BP_ID 0x12 -#define GPS_LAT_BP_ID 0x13 -#define GPS_COURS_BP_ID 0x14 -#define GPS_DAY_MONTH_ID 0x15 -#define GPS_YEAR_ID 0x16 -#define GPS_HOUR_MIN_ID 0x17 -#define GPS_SEC_ID 0x18 -#define GPS_SPEED_AP_ID 0x19 -#define GPS_LONG_AP_ID 0x1A -#define GPS_LAT_AP_ID 0x1B -#define GPS_COURS_AP_ID 0x1C -#define BARO_ALT_AP_ID 0x21 -#define GPS_LONG_EW_ID 0x22 -#define GPS_LAT_NS_ID 0x23 -#define ACCEL_X_ID 0x24 -#define ACCEL_Y_ID 0x25 -#define ACCEL_Z_ID 0x26 -#define CURRENT_ID 0x28 -#define VARIO_ID 0x30 -#define VFAS_ID 0x39 -#define VOLTS_BP_ID 0x3A -#define VOLTS_AP_ID 0x3B -#define FRSKY_LAST_ID 0x3F +#define GPS_ALT_BP_ID 0x01 +#define TEMP1_ID 0x02 +#define RPM_ID 0x03 +#define FUEL_ID 0x04 +#define TEMP2_ID 0x05 +#define VOLTS_ID 0x06 +#define GPS_ALT_AP_ID 0x09 +#define BARO_ALT_BP_ID 0x10 +#define GPS_SPEED_BP_ID 0x11 +#define GPS_LONG_BP_ID 0x12 +#define GPS_LAT_BP_ID 0x13 +#define GPS_COURS_BP_ID 0x14 +#define GPS_DAY_MONTH_ID 0x15 +#define GPS_YEAR_ID 0x16 +#define GPS_HOUR_MIN_ID 0x17 +#define GPS_SEC_ID 0x18 +#define GPS_SPEED_AP_ID 0x19 +#define GPS_LONG_AP_ID 0x1A +#define GPS_LAT_AP_ID 0x1B +#define GPS_COURS_AP_ID 0x1C +#define BARO_ALT_AP_ID 0x21 +#define GPS_LONG_EW_ID 0x22 +#define GPS_LAT_NS_ID 0x23 +#define ACCEL_X_ID 0x24 +#define ACCEL_Y_ID 0x25 +#define ACCEL_Z_ID 0x26 +#define CURRENT_ID 0x28 +#define VARIO_ID 0x30 +#define VFAS_ID 0x39 +#define VOLTS_BP_ID 0x3A +#define VOLTS_AP_ID 0x3B +#define FRSKY_LAST_ID 0x3F // FrSky new DATA IDs (2 bytes) #define RSSI_ID 0xf101 @@ -119,8 +119,8 @@ #define GPS_TIME_DATE_LAST_ID 0x085f // FrSky wrong IDs ? -#define BETA_VARIO_ID 0x8030 -#define BETA_BARO_ALT_ID 0x8010 +#define BETA_VARIO_ID 0x8030 +#define BETA_BARO_ALT_ID 0x8010 uint8_t telemetryState = TELEMETRY_INIT; @@ -187,8 +187,7 @@ void processHubPacket(uint8_t id, uint16_t value) if (frskyData.hub.rpm > frskyData.hub.maxRpm) frskyData.hub.maxRpm = frskyData.hub.rpm; break; -//case GPS_COURS_BP_ID: - //frskyData.hub.gpsCourse_bp = value; + case TEMP1_ID: if (frskyData.hub.temperature1 > frskyData.hub.maxTemperature1) frskyData.hub.maxTemperature1 = frskyData.hub.temperature1; @@ -200,6 +199,10 @@ void processHubPacket(uint8_t id, uint16_t value) break; case CURRENT_ID: + if ((int16_t)frskyData.hub.current > 0 && ((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; @@ -210,8 +213,8 @@ void processHubPacket(uint8_t id, uint16_t value) #else frskyData.hub.vfas = ((frskyData.hub.volts_bp * 100 + frskyData.hub.volts_ap * 10) * 21) / 110; #endif - /* TODO later if (!frskyData.hub.minVfas || frskyData.hub.minVfas > frskyData.hub.vfas) - frskyData.hub.minVfas = frskyData.hub.vfas; */ + if (!frskyData.hub.minVfas || frskyData.hub.vfas < frskyData.hub.minVfas) + frskyData.hub.minVfas = frskyData.hub.vfas; break; case BARO_ALT_AP_ID: @@ -223,17 +226,17 @@ void processHubPacket(uint8_t id, uint16_t value) break; case GPS_ALT_AP_ID: - frskyData.hub.gpsAltitude_bp = frskyData.hub.gpsAltitude_bp*100; + { + frskyData.hub.gpsAltitude = (frskyData.hub.gpsAltitude_bp * 100) + frskyData.hub.gpsAltitude_ap; if (!frskyData.hub.gpsAltitudeOffset) - frskyData.hub.gpsAltitudeOffset = -frskyData.hub.gpsAltitude_bp; - frskyData.hub.gpsAltitude_bp += frskyData.hub.gpsAltitudeOffset; + frskyData.hub.gpsAltitudeOffset = -frskyData.hub.gpsAltitude; if (!frskyData.hub.baroAltitudeOffset) { - if (frskyData.hub.gpsAltitude_bp > frskyData.hub.maxAltitude*100) - frskyData.hub.maxAltitude = frskyData.hub.gpsAltitude_bp/100; - if (frskyData.hub.gpsAltitude_bp < frskyData.hub.minAltitude*100) - frskyData.hub.minAltitude = frskyData.hub.gpsAltitude_bp/100; + int altitude = TELEMETRY_RELATIVE_GPS_ALT_BP; + if (altitude > frskyData.hub.maxAltitude) + frskyData.hub.maxAltitude = altitude; + if (altitude < frskyData.hub.minAltitude) + frskyData.hub.minAltitude = altitude; } - if (!frskyData.hub.pilotLatitude && !frskyData.hub.pilotLongitude) { // First received GPS position => Pilot GPS position getGpsPilotPosition(); @@ -242,6 +245,7 @@ void processHubPacket(uint8_t id, uint16_t value) getGpsDistance(); } break; + } case GPS_SPEED_BP_ID: // Speed => Max speed @@ -251,19 +255,20 @@ void processHubPacket(uint8_t id, uint16_t value) break; case VOLTS_ID: - // Voltage => Cell number + Cell voltage { + // Voltage => Cell number + Cell voltage uint8_t battnumber = ((frskyData.hub.volts & 0x00F0) >> 4); if (battnumber < 12) { if (frskyData.hub.cellsCount < battnumber+1) { frskyData.hub.cellsCount = battnumber+1; } - // TODO precision could be 0.01V instead of 0.02V - uint8_t cellVolts = (uint8_t)(((((frskyData.hub.volts & 0xFF00) >> 8) + ((frskyData.hub.volts & 0x000F) << 8)))/10); + uint16_t cellVolts = (uint16_t)(((((frskyData.hub.volts & 0xFF00) >> 8) + ((frskyData.hub.volts & 0x000F) << 8))) / 5); frskyData.hub.cellVolts[battnumber] = cellVolts; - if (!frskyData.hub.minCellVolts || cellVolts < frskyData.hub.minCellVolts || battnumber==frskyData.hub.minCellIdx) { + if (!frskyData.hub.minCellVolts || cellVolts= 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; } @@ -390,91 +399,87 @@ void processSportPacket(uint8_t *packet) } else if (appId >= GPS_SPEED_FIRST_ID && appId <= GPS_SPEED_LAST_ID) { frskyData.hub.gpsSpeed_bp = SPORT_DATA_U32(packet); - frskyData.hub.gpsSpeed_bp = (frskyData.hub.gpsSpeed_bp * 46) / 25/1000; + frskyData.hub.gpsSpeed_bp = (frskyData.hub.gpsSpeed_bp * 46) / 25 / 1000; if (frskyData.hub.gpsSpeed_bp > frskyData.hub.maxGpsSpeed) frskyData.hub.maxGpsSpeed = frskyData.hub.gpsSpeed_bp; } - else if(appId>=GPS_TIME_DATE_FIRST_ID && appId<=GPS_TIME_DATE_LAST_ID) { - uint32_t gps_time_date = SPORT_DATA_U32(packet); - if(gps_time_date & 0x000000ff) { - frskyData.hub.year = (uint16_t)((gps_time_date & 0xff000000)>>24); - frskyData.hub.month =(uint8_t)((gps_time_date & 0x00ff0000)>>16); - frskyData.hub.day = (uint8_t)((gps_time_date & 0x0000ff00)>>8); - } - else { - frskyData.hub.hour =(uint8_t) ((gps_time_date & 0xff000000)>>24); - frskyData.hub.min = (uint8_t)((gps_time_date & 0x00ff0000)>>16); - frskyData.hub.sec =(uint16_t) ((gps_time_date & 0x0000ff00)>>8); - frskyData.hub.hour = ((uint8_t)(frskyData.hub.hour + g_eeGeneral.timezone + 24)) % 24; - } - } - else if(appId>=GPS_COURS_FIRST_ID && appId<=GPS_COURS_LAST_ID) { - uint32_t course = SPORT_DATA_U32(packet); - frskyData.hub.gpsCourse_bp = course/100; - frskyData.hub.gpsCourse_ap = course%100; - } - else if (appId>=GPS_ALT_FIRST_ID && appId<=GPS_ALT_LAST_ID) { - int32_t gps_altitude; - gps_altitude = SPORT_DATA_S32(packet); - frskyData.hub.gpsAltitude_bp = gps_altitude; - - if (!frskyData.hub.gpsAltitudeOffset) - frskyData.hub.gpsAltitudeOffset = -frskyData.hub.gpsAltitude_bp; - - frskyData.hub.gpsAltitude_bp += frskyData.hub.gpsAltitudeOffset; + else if (appId >= GPS_TIME_DATE_FIRST_ID && appId <= GPS_TIME_DATE_LAST_ID) { + uint32_t gps_time_date = SPORT_DATA_U32(packet); + if (gps_time_date & 0x000000ff) { + frskyData.hub.year = (uint16_t) ((gps_time_date & 0xff000000) >> 24); + frskyData.hub.month = (uint8_t) ((gps_time_date & 0x00ff0000) >> 16); + frskyData.hub.day = (uint8_t) ((gps_time_date & 0x0000ff00) >> 8); + } + else { + frskyData.hub.hour = (uint8_t) ((gps_time_date & 0xff000000) >> 24); + frskyData.hub.min = (uint8_t) ((gps_time_date & 0x00ff0000) >> 16); + frskyData.hub.sec = (uint16_t) ((gps_time_date & 0x0000ff00) >> 8); + frskyData.hub.hour = ((uint8_t) (frskyData.hub.hour + g_eeGeneral.timezone + 24)) % 24; + } + } + else if (appId >= GPS_COURS_FIRST_ID && appId <= GPS_COURS_LAST_ID) { + uint32_t course = SPORT_DATA_U32(packet); + frskyData.hub.gpsCourse_bp = course / 100; + frskyData.hub.gpsCourse_ap = course % 100; + } + else if (appId >= GPS_ALT_FIRST_ID && appId <= GPS_ALT_LAST_ID) { + frskyData.hub.gpsAltitude = SPORT_DATA_S32(packet); + + if (!frskyData.hub.gpsAltitudeOffset) + frskyData.hub.gpsAltitudeOffset = -frskyData.hub.gpsAltitude; - if (!frskyData.hub.baroAltitudeOffset) { - if (frskyData.hub.gpsAltitude_bp > frskyData.hub.maxAltitude*100) - frskyData.hub.maxAltitude = frskyData.hub.gpsAltitude_bp/100; - - if (frskyData.hub.gpsAltitude_bp < frskyData.hub.minAltitude*100) - frskyData.hub.minAltitude = frskyData.hub.gpsAltitude_bp/100; - } - - if (!frskyData.hub.pilotLatitude && !frskyData.hub.pilotLongitude) { - // First received GPS position => Pilot GPS position - if(t_coor) - getGpsPilotPosition(); - } - else if (frskyData.hub.gpsDistNeeded || g_menuStack[g_menuStackPtr] == menuTelemetryFrsky) { - getGpsDistance(); - } - } - else if(appId>=GPS_LONG_LATI_FIRST_ID && appId<=GPS_LONG_LATI_LAST_ID) { - uint32_t gps_long_lati_data = SPORT_DATA_U32(packet); - if (gps_long_lati_data) - { - frskyData.hub.gpsFix = 1; - t_coor = 1; - } - - uint32_t gps_long_lati_b1w,gps_long_lati_a1w; - gps_long_lati_b1w = (gps_long_lati_data&0x3fffffff)/10000; - gps_long_lati_a1w = (gps_long_lati_data&0x3fffffff)%10000; - switch ((gps_long_lati_data & 0xc0000000)>>30) { - case 0: { - frskyData.hub.gpsLatitude_bp = (gps_long_lati_b1w/60*100)+(gps_long_lati_b1w%60); - frskyData.hub.gpsLatitude_ap = gps_long_lati_a1w; - frskyData.hub.gpsLatitudeNS = 'N'; - }break; - case 1: { - frskyData.hub.gpsLatitude_bp = (gps_long_lati_b1w/60*100) + (gps_long_lati_b1w%60); - frskyData.hub.gpsLatitude_ap = gps_long_lati_a1w; - frskyData.hub.gpsLatitudeNS = 'S'; }break; - case 2: { - frskyData.hub.gpsLongitude_bp = (gps_long_lati_b1w/60*100) +(gps_long_lati_b1w%60); - frskyData.hub.gpsLongitude_ap = gps_long_lati_a1w; - frskyData.hub.gpsLongitudeEW = 'E'; }break; - case 3: { - frskyData.hub.gpsLongitude_bp = (gps_long_lati_b1w/60*100) +(gps_long_lati_b1w%60); - frskyData.hub.gpsLongitude_ap = gps_long_lati_a1w; - frskyData.hub.gpsLongitudeEW = 'W';}break; - } - if (frskyData.hub.gpsFix > 0 && frskyData.hub.gpsLatitude_bp > 1) - frskyData.hub.gpsFix = 0; - if (frskyData.hub.gpsFix > 0 && frskyData.hub.gpsLongitude_bp > 1) - frskyData.hub.gpsFix = 0; - } + if (!frskyData.hub.baroAltitudeOffset) { + int altitude = TELEMETRY_RELATIVE_GPS_ALT_BP; + if (altitude > frskyData.hub.maxAltitude) + frskyData.hub.maxAltitude = altitude; + if (altitude < frskyData.hub.minAltitude) + frskyData.hub.minAltitude = altitude; + } + + if (frskyData.hub.gpsFix > 0) { + if (!frskyData.hub.pilotLatitude && !frskyData.hub.pilotLongitude) { + // First received GPS position => Pilot GPS position + getGpsPilotPosition(); + } + else if (frskyData.hub.gpsDistNeeded || g_menuStack[g_menuStackPtr] == menuTelemetryFrsky) { + getGpsDistance(); + } + } + } + else if (appId >= GPS_LONG_LATI_FIRST_ID && appId <= GPS_LONG_LATI_LAST_ID) { + uint32_t gps_long_lati_data = SPORT_DATA_U32(packet); + uint32_t gps_long_lati_b1w, gps_long_lati_a1w; + gps_long_lati_b1w = (gps_long_lati_data & 0x3fffffff) / 10000; + gps_long_lati_a1w = (gps_long_lati_data & 0x3fffffff) % 10000; + switch ((gps_long_lati_data & 0xc0000000) >> 30) { + case 0: + frskyData.hub.gpsLatitude_bp = (gps_long_lati_b1w / 60 * 100) + (gps_long_lati_b1w % 60); + frskyData.hub.gpsLatitude_ap = gps_long_lati_a1w; + frskyData.hub.gpsLatitudeNS = 'N'; + break; + case 1: + frskyData.hub.gpsLatitude_bp = (gps_long_lati_b1w / 60 * 100) + (gps_long_lati_b1w % 60); + frskyData.hub.gpsLatitude_ap = gps_long_lati_a1w; + frskyData.hub.gpsLatitudeNS = 'S'; + break; + case 2: + frskyData.hub.gpsLongitude_bp = (gps_long_lati_b1w / 60 * 100) + (gps_long_lati_b1w % 60); + frskyData.hub.gpsLongitude_ap = gps_long_lati_a1w; + frskyData.hub.gpsLongitudeEW = 'E'; + break; + case 3: + frskyData.hub.gpsLongitude_bp = (gps_long_lati_b1w / 60 * 100) + (gps_long_lati_b1w % 60); + frskyData.hub.gpsLongitude_ap = gps_long_lati_a1w; + frskyData.hub.gpsLongitudeEW = 'W'; + break; + } + if (frskyData.hub.gpsLongitudeEW && frskyData.hub.gpsLatitudeNS) { + frskyData.hub.gpsFix = 1; + } + else if (frskyData.hub.gpsFix > 0) { + frskyData.hub.gpsFix = 0; + } + } else if (appId >= CELLS_FIRST_ID && appId <= CELLS_LAST_ID) { uint32_t cells = SPORT_DATA_U32(packet); @@ -482,8 +487,8 @@ void processSportPacket(uint8_t *packet) uint32_t minCell, minCellNum; //TODO: Use reported total voltages (bits 4-7)? - frskyData.hub.cellVolts[battnumber] = ((cells & 0x000FFF00) >> 8) / 10; - frskyData.hub.cellVolts[battnumber+1] = ((cells & 0xFFF00000) >> 20) / 10; + frskyData.hub.cellVolts[battnumber] = ((cells & 0x000FFF00) >> 8) / 5; + frskyData.hub.cellVolts[battnumber+1] = ((cells & 0xFFF00000) >> 20) / 5; if (frskyData.hub.cellsCount < battnumber+2) frskyData.hub.cellsCount = battnumber+2; @@ -526,6 +531,10 @@ void processSerialData(uint8_t data) btPushByte(data); #endif + if (g_eeGeneral.uart3Mode == UART_MODE_SPORT) { + uart3Putc(data); + } + if (data == START_STOP) { dataState = STATE_DATA_IN_FRAME; numPktBytes = 0; @@ -562,8 +571,11 @@ void telemetryInterrupt10ms() #if defined(FRSKY_HUB) for (uint8_t i=0; i 0x33) { + if ((IS_MODULE_XJT(0) || IS_MODULE_XJT(1)) && frskyData.swr.value > 0x33) { AUDIO_SWR_RED(); s_global_warning = STR_ANTENNAPROBLEM; alarmsCheckTime = get_tmr10ms() + 300; /* next check in 3seconds */ @@ -746,9 +759,11 @@ void resetTelemetry() frskyData.analog[0].set(120); frskyData.analog[1].set(240); frskyData.rssi[0].value = 75; - frskyData.rssi[1].value = 30; + frskyData.swr.value = 30; frskyData.hub.fuelLevel = 75; frskyData.hub.rpm = 12000; + frskyData.hub.vfas = 100; + frskyData.hub.minVfas = 90; frskyData.hub.gpsFix = 1; frskyData.hub.gpsLatitude_bp = 4401; @@ -763,6 +778,9 @@ void resetTelemetry() frskyData.hub.gpsLongitude_ap = 9533; getGpsDistance(); + frskyData.hub.gpsSpeed_bp = 100; + frskyData.hub.gpsSpeed_ap = 50; + frskyData.hub.cellsCount = 6; frskyData.hub.baroAltitudeOffset = 500 * 100; diff --git a/radio/src/telemetry/frsky_sport.h b/radio/src/telemetry/frsky_sport.h index ac1dd94d9..9cdabee42 100644 --- a/radio/src/telemetry/frsky_sport.h +++ b/radio/src/telemetry/frsky_sport.h @@ -123,10 +123,14 @@ PACK(struct FrskySerialData { int16_t maxTemperature2; uint16_t maxGpsSpeed; uint16_t maxGpsDistance; + int16_t minCell; + int16_t minCells; + int16_t minVfas; uint16_t maxCurrent; uint16_t maxPower; /* end */ + int32_t gpsAltitude; uint8_t gpsDistNeeded; int8_t gpsFix; // -1=never fixed, 0=fix lost, 1=fixed @@ -141,11 +145,14 @@ PACK(struct FrskySerialData { uint16_t minCellVolts; bool varioHighPrecision; + int16_t airSpeed; + int16_t dTE; }); struct FrskyData { FrskyValueWithMinMax analog[2]; FrskyValueWithMinMax rssi[2]; + FrskyValueWithMinMax swr; FrskySerialData hub; }; @@ -173,41 +180,40 @@ bool FRSKY_alarmRaised(uint8_t idx); void resetTelemetry(); -#define TELEMETRY_GPS_SPEED_BP frskyData.hub.gpsSpeed_bp -#define TELEMETRY_GPS_SPEED_AP frskyData.hub.gpsSpeed_ap -#define TELEMETRY_GPS_SPEED_LOG frskyData.hub.gpsSpeed_bp<0?'-':' ',abs(frskyData.hub.gpsSpeed_bp/1000),abs(frskyData.hub.gpsSpeed_bp%1000) - -#define TELEMETRY_GPS_ALT_AP (frskyData.hub.gpsAltitude_bp%100) -#define TELEMETRY_GPS_ALT_BP (frskyData.hub.gpsAltitude_bp/100) -#define TELEMETRY_GPS_ALT_LOG frskyData.hub.gpsAltitude_bp < 0 ? '-':' ',abs(frskyData.hub.gpsAltitude_bp/100),abs(frskyData.hub.gpsAltitude_bp%100) - -#define TELEMETRY_ALT_BP (frskyData.hub.baroAltitude / 100) -#define TELEMETRY_ALT_AP (frskyData.hub.baroAltitude % 100) -#define TELEMETRY_ALT frskyData.hub.baroAltitude < 0 ? '-' : ' ', abs(frskyData.hub.baroAltitude / 100), abs(frskyData.hub.baroAltitude % 100) -#define TELEMETRY_ALT_FORMAT "%c%d.%02d," -#define TELEMETRY_CELLS frskyData.hub.cellsSum / 10, frskyData.hub.cellsSum % 10, frskyData.hub.cellVolts[0]*2/100, frskyData.hub.cellVolts[0]*2%100, frskyData.hub.cellVolts[1]*2/100, frskyData.hub.cellVolts[1]*2%100, frskyData.hub.cellVolts[2]*2/100, frskyData.hub.cellVolts[2]*2%100, frskyData.hub.cellVolts[3]*2/100, frskyData.hub.cellVolts[3]*2%100, frskyData.hub.cellVolts[4]*2/100, frskyData.hub.cellVolts[4]*2%100, frskyData.hub.cellVolts[5]*2/100, frskyData.hub.cellVolts[5]*2%100 -#define TELEMETRY_CELLS_FORMAT "%d.%d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d," -#define TELEMETRY_CURRENT frskyData.hub.current / 10, frskyData.hub.current % 10 -#define TELEMETRY_CURRENT_FORMAT "%d.%d," -#define TELEMETRY_VFAS frskyData.hub.vfas / 10, frskyData.hub.vfas % 10 -#define TELEMETRY_VFAS_FORMAT "%d.%d," -#define TELEMETRY_VSPEED frskyData.hub.varioSpeed < 0 ? '-' : ' ', abs(frskyData.hub.varioSpeed / 100), abs(frskyData.hub.varioSpeed % 100) -#define TELEMETRY_VSPEED_FORMAT "%c%d.%02d," +#define TELEMETRY_STREAMING() (frskyData.rssi[0].value > 0) -/* Would be great, but f_printf() doesn't take floats... -#define TELEMETRY_ALT float(frskyData.hub.baroAltitude)/100 -#define TELEMETRY_ALT_FORMAT "%.2f," -#define TELEMETRY_CELLS float(frskyData.hub.cellsSum)/10, float(frskyData.hub.cellVolts[0])/100, float(frskyData.hub.cellVolts[1])/100, float(frskyData.hub.cellVolts[2])/100, float(frskyData.hub.cellVolts[3])/100, float(frskyData.hub.cellVolts[4])/100, float(frskyData.hub.cellVolts[5])/100 -#define TELEMETRY_CELLS_FORMAT "%.1f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f," -#define TELEMETRY_CURRENT float(frskyData.hub.current)/100 -#define TELEMETRY_CURRENT_FORMAT "%.2f," -#define TELEMETRY_VFAS float(frskyData.hub.vfas)/10 -#define TELEMETRY_VFAS_FORMAT "%.1f," -#define TELEMETRY_VSPEED float(frskyData.hub.varioSpeed)/100 -#define TELEMETRY_VSPEED_FORMAT "%.2f," -*/ +#define TELEMETRY_CELL_VOLTAGE(k) frskyData.hub.cellVolts[k] +#define TELEMETRY_MIN_CELL_VOLTAGE frskyData.hub.minCellVolts -#define TELEMETRY_STREAMING() (frskyData.rssi[0].value > 0) +#define TELEMETRY_BARO_ALT_AVAILABLE() (frskyData.hub.baroAltitudeOffset) +#define TELEMETRY_BARO_ALT_UNIT (IS_IMPERIAL_ENABLE() ? LENGTH_UNIT_IMP : LENGTH_UNIT_METR) + +#define TELEMETRY_GPS_SPEED_BP frskyData.hub.gpsSpeed_bp +#define TELEMETRY_GPS_SPEED_AP frskyData.hub.gpsSpeed_ap + +#define TELEMETRY_ABSOLUTE_GPS_ALT (frskyData.hub.gpsAltitude) +#define TELEMETRY_RELATIVE_GPS_ALT (frskyData.hub.gpsAltitude + frskyData.hub.gpsAltitudeOffset) +#define TELEMETRY_RELATIVE_GPS_ALT_BP (TELEMETRY_RELATIVE_GPS_ALT / 100) + +#define TELEMETRY_RELATIVE_BARO_ALT_BP (frskyData.hub.baroAltitude / 100) +#define TELEMETRY_RELATIVE_BARO_ALT_AP (frskyData.hub.baroAltitude % 100) + +#define TELEMETRY_BARO_ALT_PREPARE() div_t baroAltitudeDivision = div(getConvertedTelemetryValue(frskyData.hub.baroAltitude, UNIT_DIST), 100) +#define TELEMETRY_BARO_ALT_FORMAT "%c%d.%02d," +#define TELEMETRY_BARO_ALT_ARGS frskyData.hub.baroAltitude < 0 ? '-' : ' ', abs(baroAltitudeDivision.quot), abs(baroAltitudeDivision.rem), +#define TELEMETRY_GPS_ALT_FORMAT "%c%d.%02d," +#define TELEMETRY_GPS_ALT_ARGS frskyData.hub.gpsAltitude < 0 ? '-' : ' ', abs(frskyData.hub.gpsAltitude / 100), abs(frskyData.hub.gpsAltitude % 100), +#define TELEMETRY_GPS_SPEED_UNIT (IS_IMPERIAL_ENABLE() ? SPEED_UNIT_IMP : SPEED_UNIT_METR) +#define TELEMETRY_GPS_SPEED_FORMAT "%d," +#define TELEMETRY_GPS_SPEED_ARGS getConvertedTelemetryValue(frskyData.hub.gpsSpeed_bp, UNIT_KTS), +#define TELEMETRY_CELLS_FORMAT "%d.%d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d,%d.%02d," +#define TELEMETRY_CELLS_ARGS frskyData.hub.cellsSum / 10, frskyData.hub.cellsSum % 10, TELEMETRY_CELL_VOLTAGE(0)/100, TELEMETRY_CELL_VOLTAGE(0)%100, TELEMETRY_CELL_VOLTAGE(1)/100, TELEMETRY_CELL_VOLTAGE(1)%100, TELEMETRY_CELL_VOLTAGE(2)/100, TELEMETRY_CELL_VOLTAGE(2)%100, TELEMETRY_CELL_VOLTAGE(3)/100, TELEMETRY_CELL_VOLTAGE(3)%100, TELEMETRY_CELL_VOLTAGE(4)/100, TELEMETRY_CELL_VOLTAGE(4)%100, TELEMETRY_CELL_VOLTAGE(5)/100, TELEMETRY_CELL_VOLTAGE(5)%100, +#define TELEMETRY_CURRENT_FORMAT "%d.%d," +#define TELEMETRY_CURRENT_ARGS frskyData.hub.current / 10, frskyData.hub.current % 10, +#define TELEMETRY_VFAS_FORMAT "%d.%d," +#define TELEMETRY_VFAS_ARGS frskyData.hub.vfas / 10, frskyData.hub.vfas % 10, +#define TELEMETRY_VSPEED_FORMAT "%c%d.%02d," +#define TELEMETRY_VSPEED_ARGS frskyData.hub.varioSpeed < 0 ? '-' : ' ', abs(frskyData.hub.varioSpeed / 100), abs(frskyData.hub.varioSpeed % 100), #endif 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..1b2e59a10 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); @@ -141,7 +146,7 @@ void setCurve(uint8_t c, const pm_int8_t ar[]) void setSwitch(uint8_t idx, uint8_t func, int8_t v1, int8_t v2) { - CustomSwData *cs = cswAddress(idx-1); + LogicalSwitchData *cs = cswAddress(idx-1); cs->func = func; cs->v1 = v1; cs->v2 = v2; @@ -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 @@ -187,8 +198,8 @@ void applyTemplate(uint8_t idx) md=setDest(13, MIXSRC_CH14); // md->weight= 100; done by setDest anyway md=setDest(13, MIXSRC_MAX); mixSetWeight(md, -100); md->swtch=SWSRC_SWB; md->mltpx=MLTPX_REP; md=setDest(13, MIXSRC_MAX); /* md->weight= 100;*/ md->swtch=SWSRC_THR; md->mltpx=MLTPX_REP; - setSwitch(11, CS_VNEG, STK_THR, -99); - setSwitch(12, CS_VPOS, MIXSRC_CH14, 0); + setSwitch(11, LS_FUNC_VNEG, STK_THR, -99); + setSwitch(12, LS_FUNC_VPOS, MIXSRC_CH14, 0); break; // V-Tail @@ -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); @@ -275,7 +283,7 @@ void applyTemplate(uint8_t idx) // Servo Test case TMPL_SERVO_TEST: md=setDest(NUM_CHNOUT-1, MIXSRC_SW1, true); md->weight=110; md->mltpx=MLTPX_ADD; md->delayUp = 6; md->delayDown = 6; md->speedUp = 8; md->speedDown = 8; - setSwitch(1, CS_VNEG, MIXSRC_LAST_CH, 0); + setSwitch(1, LS_FUNC_VNEG, MIXSRC_LAST_CH, 0); break; default: diff --git a/radio/src/templates.h b/radio/src/templates.h index 2ac2cac71..4de55eddf 100644 --- a/radio/src/templates.h +++ b/radio/src/templates.h @@ -53,8 +53,8 @@ * */ -#ifndef TEMPLATES_H -#define TEMPLATES_H +#ifndef TEMPLATES_H_ +#define TEMPLATES_H_ #include diff --git a/radio/src/translations.cpp b/radio/src/translations.cpp index 98d62ab7b..b003a4336 100644 --- a/radio/src/translations.cpp +++ b/radio/src/translations.cpp @@ -55,6 +55,10 @@ const pm_char STR_OPEN9X[] PROGMEM = #endif ISTR(TRNMODE) ISTR(TRNCHN) +#if defined(PCBTARANIS) + ISTR(UART3MODES) + ISTR(POTTYPES) +#endif ISTR(VTRIMINC) ISTR(RETA123) ISTR(VPROTOS) @@ -72,7 +76,7 @@ const pm_char STR_OPEN9X[] PROGMEM = #if defined(FRSKY) || defined(CPUARM) #if defined(CPUARM) ISTR(VTELEMUNIT_IMP) - ISTR(VTELEMUNIT_NORM) + ISTR(VTELEMUNIT_METR) #else ISTR(VTELEMUNIT) #endif @@ -241,9 +245,7 @@ const pm_char STR_RXBATT[] PROGMEM = TR_RXBATT; const pm_char STR_TX[] PROGMEM = TR_TXnRX; const pm_char STR_ACCEL[] PROGMEM = TR_ACCEL; const pm_char STR_NODATA[] PROGMEM = TR_NODATA; -const pm_char STR_TM1TM2[] PROGMEM = TR_TM1TM2; -const pm_char STR_THRTHP[] PROGMEM = TR_THRTHP; -const pm_char STR_TOT[] PROGMEM = TR_TOT; +const pm_char STR_TOTTM1TM2THRTHP[] PROGMEM = TR_TOTTM1TM2THRTHP; const pm_char STR_TMR1LATMAXUS[] PROGMEM = TR_TMR1LATMAXUS; const pm_char STR_TMR1LATMINUS[] PROGMEM = TR_TMR1LATMINUS; const pm_char STR_TMR1JITTERUS[] PROGMEM = TR_TMR1JITTERUS; @@ -267,6 +269,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 @@ -290,8 +296,8 @@ const pm_char STR_MENUINPUTS[] PROGMEM = TR_MENUINPUTS; const pm_char STR_MENULIMITS[] PROGMEM = TR_MENULIMITS; const pm_char STR_MENUCURVES[] PROGMEM = TR_MENUCURVES; const pm_char STR_MENUCURVE[] PROGMEM = TR_MENUCURVE; -const pm_char STR_MENUCUSTOMSWITCH[] PROGMEM = TR_MENUCUSTOMSWITCH; -const pm_char STR_MENUCUSTOMSWITCHES[] PROGMEM = TR_MENUCUSTOMSWITCHES; +const pm_char STR_MENULOGICALSWITCH[] PROGMEM = TR_MENULOGICALSWITCH; +const pm_char STR_MENULOGICALSWITCHES[] PROGMEM = TR_MENULOGICALSWITCHES; const pm_char STR_MENUCUSTOMFUNC[] PROGMEM = TR_MENUCUSTOMFUNC; #if defined(LUA) @@ -443,6 +449,7 @@ const pm_char STR_SD_SECTORS[] PROGMEM = TR_SD_SECTORS; const pm_char STR_SD_SIZE[] PROGMEM = TR_SD_SIZE; const pm_char STR_TYPE[] PROGMEM = TR_TYPE; const pm_char STR_GLOBAL_VARS[] PROGMEM = TR_GLOBAL_VARS; +const pm_char STR_GLOBAL_V[] PROGMEM = TR_GLOBAL_V; const pm_char STR_GLOBAL_VAR[] PROGMEM = TR_GLOBAL_VAR; const pm_char STR_OWN[] PROGMEM = TR_OWN; const pm_char STR_ROTARY_ENCODER[] PROGMEM = TR_ROTARY_ENCODER; @@ -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,14 @@ 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_POTWARNING[] PROGMEM = TR_POTWARNING; + const pm_char STR_CHECKLIST[] PROGMEM = TR_CHECKLIST; + const pm_char STR_UART3MODE[] PROGMEM = TR_UART3MODE; #endif #if MENUS_LOCK == 1 @@ -566,13 +577,19 @@ const pm_char STR_VIEW_TEXT[] PROGMEM = "View text"; #endif const pm_uchar font_5x7[] PROGMEM = { +#if defined (CPUARM) #include "font_05x07.lbm" +#else +#include "font_05x07_avr.lbm" +#endif #if defined(TRANSLATIONS_DE) #include "font_de_05x07.lbm" #elif defined(TRANSLATIONS_CZ) #include "font_cz_05x07.lbm" #elif defined(TRANSLATIONS_ES) #include "font_es_05x07.lbm" +#elif defined(TRANSLATIONS_FI) +#include "font_fi_05x07.lbm" #elif defined(TRANSLATIONS_FR) #include "font_fr_05x07.lbm" #elif defined(TRANSLATIONS_IT) @@ -586,6 +603,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) @@ -595,6 +618,8 @@ const pm_uchar font_10x14[] PROGMEM = { #include "font_cz_10x14.lbm" #elif defined(TRANSLATIONS_ES) #include "font_es_10x14.lbm" + #elif defined(TRANSLATIONS_FI) + #include "font_fi_10x14.lbm" #elif defined(TRANSLATIONS_FR) #include "font_fr_10x14.lbm" #elif defined(TRANSLATIONS_IT) @@ -622,6 +647,8 @@ const pm_uchar font_4x6[] PROGMEM = { #include "font_cz_04x06.lbm" #elif defined(TRANSLATIONS_ES) #include "font_es_04x06.lbm" +#elif defined(TRANSLATIONS_FI) +#include "font_fi_04x06.lbm" #elif defined(TRANSLATIONS_FR) #include "font_fr_04x06.lbm" #elif defined(TRANSLATIONS_IT) @@ -643,6 +670,8 @@ const pm_uchar font_8x10[] PROGMEM = { #include "font_cz_08x10.lbm" #elif defined(TRANSLATIONS_ES) #include "font_es_08x10.lbm" +#elif defined(TRANSLATIONS_FI) +#include "font_fi_08x10.lbm" #elif defined(TRANSLATIONS_FR) #include "font_fr_08x10.lbm" #elif defined(TRANSLATIONS_IT) diff --git a/radio/src/translations.h b/radio/src/translations.h index 4a3e0600a..1f46fcb0a 100644 --- a/radio/src/translations.h +++ b/radio/src/translations.h @@ -46,6 +46,9 @@ #elif defined(TRANSLATIONS_SE) #include "translations/se.h" #define LEN_SPECIAL_CHARS 6 +#elif defined(TRANSLATIONS_FI) +#include "translations/fi.h" +#define LEN_SPECIAL_CHARS 6 #elif defined(TRANSLATIONS_DE) #include "translations/de.h" #define LEN_SPECIAL_CHARS 6 @@ -99,7 +102,13 @@ extern const pm_char STR_OPEN9X[]; #define OFS_TRNMODE (OFS_VBEEPMODE + sizeof(TR_VBEEPMODE)) #endif #define OFS_TRNCHN (OFS_TRNMODE + sizeof(TR_TRNMODE)) -#define OFS_VTRIMINC (OFS_TRNCHN + sizeof(TR_TRNCHN)) +#if defined(PCBTARANIS) + #define OFS_UART3MODES (OFS_TRNCHN + sizeof(TR_TRNCHN)) + #define OFS_POTTYPES (OFS_UART3MODES + sizeof(TR_UART3MODES)) + #define OFS_VTRIMINC (OFS_POTTYPES + sizeof(TR_POTTYPES)) +#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)) @@ -115,12 +124,12 @@ extern const pm_char STR_OPEN9X[]; #define OFS_VTELEMCHNS (OFS_FUNCSOUNDS + sizeof(TR_FUNCSOUNDS)) #if defined(FRSKY) || defined(CPUARM) #if defined(CPUARM) - #define OFS_VTELEMUNIT_IMP (OFS_VTELEMCHNS + sizeof(TR_VTELEMCHNS)) - #define OFS_VTELEMUNIT_NORM (OFS_VTELEMUNIT_IMP + sizeof(TR_VTELEMUNIT_IMP)) - #define OFS_VALARM (OFS_VTELEMUNIT_NORM + sizeof(TR_VTELEMUNIT_NORM)) + #define OFS_VTELEMUNIT_IMP (OFS_VTELEMCHNS + sizeof(TR_VTELEMCHNS)) + #define OFS_VTELEMUNIT_METR (OFS_VTELEMUNIT_IMP + sizeof(TR_VTELEMUNIT_IMP)) + #define OFS_VALARM (OFS_VTELEMUNIT_METR + sizeof(TR_VTELEMUNIT_METR)) #else - #define OFS_VTELEMUNIT (OFS_VTELEMCHNS + sizeof(TR_VTELEMCHNS)) - #define OFS_VALARM (OFS_VTELEMUNIT + sizeof(TR_VTELEMUNIT)) + #define OFS_VTELEMUNIT (OFS_VTELEMCHNS + sizeof(TR_VTELEMCHNS)) + #define OFS_VALARM (OFS_VTELEMUNIT + sizeof(TR_VTELEMUNIT)) #endif #define OFS_VALARMFN (OFS_VALARM + sizeof(TR_VALARM)) #define OFS_VTELPROTO (OFS_VALARMFN + sizeof(TR_VALARMFN)) @@ -190,6 +199,8 @@ 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_POTTYPES (STR_OPEN9X + OFS_POTTYPES) #define STR_VTRIMINC (STR_OPEN9X + OFS_VTRIMINC) #define STR_RETA123 (STR_OPEN9X + OFS_RETA123) #define STR_VPROTOS (STR_OPEN9X + OFS_VPROTOS) @@ -209,7 +220,7 @@ extern const pm_char STR_OPEN9X[]; #if defined(FRSKY) || defined(CPUARM) #if defined(CPUARM) - #define STR_VTELEMUNIT (STR_OPEN9X + (g_eeGeneral.imperial ? OFS_VTELEMUNIT_IMP : OFS_VTELEMUNIT_NORM)) + #define STR_VTELEMUNIT (STR_OPEN9X + (g_eeGeneral.imperial ? OFS_VTELEMUNIT_IMP : OFS_VTELEMUNIT_METR)) #else #define STR_VTELEMUNIT (STR_OPEN9X + OFS_VTELEMUNIT) #endif @@ -391,9 +402,7 @@ extern const pm_char STR_TX[]; #define STR_RX (STR_TX+OFS_RX) extern const pm_char STR_ACCEL[]; extern const pm_char STR_NODATA[]; -extern const pm_char STR_TM1TM2[]; -extern const pm_char STR_THRTHP[]; -extern const pm_char STR_TOT[]; +extern const pm_char STR_TOTTM1TM2THRTHP[]; extern const pm_char STR_TMR1LATMAXUS[]; extern const pm_char STR_TMR1LATMINUS[]; extern const pm_char STR_TMR1JITTERUS[]; @@ -434,8 +443,8 @@ extern const pm_char STR_MENUINPUTS[]; extern const pm_char STR_MENULIMITS[]; extern const pm_char STR_MENUCURVES[]; extern const pm_char STR_MENUCURVE[]; -extern const pm_char STR_MENUCUSTOMSWITCH[]; -extern const pm_char STR_MENUCUSTOMSWITCHES[]; +extern const pm_char STR_MENULOGICALSWITCH[]; +extern const pm_char STR_MENULOGICALSWITCHES[]; extern const pm_char STR_MENUCUSTOMFUNC[]; extern const pm_char STR_MENUCUSTOMSCRIPTS[]; extern const pm_char STR_MENUCUSTOMSCRIPT[]; @@ -448,6 +457,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 +549,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[]; @@ -595,6 +611,7 @@ extern const pm_char STR_SD_SECTORS[]; extern const pm_char STR_SD_SIZE[]; extern const pm_char STR_TYPE[]; extern const pm_char STR_GLOBAL_VARS[]; +extern const pm_char STR_GLOBAL_V[]; extern const pm_char STR_GLOBAL_VAR[]; extern const pm_char STR_OWN[]; extern const pm_char STR_ROTARY_ENCODER[]; @@ -631,6 +648,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 +686,9 @@ 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_POTWARNING[]; + extern const pm_char STR_CHECKLIST[]; + extern const pm_char STR_UART3MODE[]; #endif #if MENUS_LOCK == 1 @@ -750,5 +771,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/.gitignore b/radio/src/translations/.gitignore index 60fa00cb3..f1029c186 100644 --- a/radio/src/translations/.gitignore +++ b/radio/src/translations/.gitignore @@ -1,6 +1,8 @@ +/en.h /cz.h /de.h /es.h +/fi.h /fr.h /it.h /pl.h diff --git a/radio/src/translations/cz.h.txt b/radio/src/translations/cz.h.txt index 145783ff3..96504d9a1 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 + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string */ // NON ZERO TERMINATED STRINGS @@ -62,6 +68,12 @@ #define LEN_TRNCHN "\003" #define TR_TRNCHN "CH1CH2CH3CH4" +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "OFF\0 ""S-Port Mirror\0 ""Debug\0 " + +#define LEN_POTTYPES "\017" +#define TR_POTTYPES "Pot\0 ""Multipos Switch" + #define LEN_DATETIME "\006" #define TR_DATETIME "DATUM:""ČAS: " @@ -138,8 +150,35 @@ #define LEN_VMIXTRIMS "\004" #define TR_VMIXTRIMS "VYP\0""ZAP\0""Směr""Výšk""Plyn""Křid" +#if defined(PCBTARANIS) + #define TR_CSWTIMER "Timer" + #define TR_CSWSTICKY "Stcky" + #define TR_CSWRANGE "Range" + #define TR_CSWSTAY "Edge\0" +#else + #define TR_CSWTIMER "Tim\0 " + #define TR_CSWSTICKY "Glue\0" + #if defined(CPUARM) + #define TR_CSWRANGE "Rnge\0" + #define TR_CSWSTAY "Edge\0" + #else + #define TR_CSWRANGE + #define TR_CSWSTAY + #endif +#endif + +#if defined(CPUARM) + #define TR_CSWEQUAL "a=x\0 " +#else + #define TR_CSWEQUAL +#endif + #define LEN_VCSWFUNC "\005" -#define TR_VCSWFUNC "---\0 ""a{x\0 ""a>x\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""a 2 - #define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd " -#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS <= 2 - #define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb " -#else - #define TR_ROTARY_ENCODERS_VSRCRAW + #define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW #endif #if defined(HELI) @@ -343,7 +390,7 @@ #define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]" #endif -#define TR_VSRCRAW "---\0""Směr""Výšk""Plyn""Křid" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS_VSRCRAW "MAX\0" TR_CYC_VSRCRAW "TrmS" "TrmV" "TrmP" "TrmK" TR_SW_VSRCRAW +#define TR_VSRCRAW "---\0""Směr""Výšk""Plyn""Křid" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmS" "TrmV" "TrmP" "TrmK" TR_SW_VSRCRAW #define LEN_VTMRMODES "\003" #define TR_VTMRMODES "VYP""ABS""THs""TH%""THt" @@ -355,12 +402,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 @@ -384,11 +431,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") @@ -468,6 +520,7 @@ #define TR_SPLASHSCREEN "úvodníLogo" #define TR_THROTTLEWARNING "(\043)Plyn" #define TR_SWITCHWARNING "(\043)Spínače" +#define TR_POTWARNING TR("Pot Warn.","Pot Warning") #define TR_TIMEZONE "časové pásmo" #define TR_RXCHANNELORD TR("Pořadí kanálů", "Výchozí pořadí kanálů") #define TR_SLAVE "Podřízený" @@ -476,30 +529,28 @@ #define TR_CAL "Kal." #define TR_VTRIM "Trim- +" #define TR_BG "BG:" -#define TR_MENUTOSTART CENTER "\007" TR_ENTER " = START" -#define TR_SETMIDPOINT TR(CENTER "\001Nastav páky na střed", CENTER "\002Nastav páky na střed") -#define TR_MOVESTICKSPOTS TR(CENTER "\004Hýbej pákami/poty", "\007Hýbej pákami i potenciometry") +#define TR_MENUTOSTART CENTER "\010" TR_ENTER " = START" +#define TR_SETMIDPOINT TR(CENTER "\003Nastav páky na střed", CENTER "\004Nastav páky na střed") +#define TR_MOVESTICKSPOTS TR(CENTER "\005Hýbej pákami/poty", "\010Hýbej pákami i potenciometry") #define TR_RXBATT "Rx Bat.:" #define TR_TXnRX "Tx:\0Rx:" #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_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_TOTTM1TM2THRTHP "\037\146TOT\036TM1\037\146TM2\036THR\037\146TH%" +#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" @@ -529,18 +580,21 @@ #define TR_MENUFLIGHTPHASES "LETOVÉ REŽIMY" #define TR_MENUHELISETUP "HELI" - -// Alignment - - -#define TR_MENUINPUTS "DR/EXPO" -#define TR_MENULIMITS "LIMITY" - +#if defined(PCBTARANIS) + #define TR_MENUINPUTS "INPUTS" + #define TR_MENULIMITS "SERVOS" +#elif defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_LIMITS_SYMETRICAL) // The right menu titles for the gurus ... + #define TR_MENUINPUTS "STICKS" + #define TR_MENULIMITS "SERVOS" +#else + #define TR_MENUINPUTS "DR/EXPO" + #define TR_MENULIMITS "LIMITY" +#endif #define TR_MENUCURVES "KŘIVKY" #define TR_MENUCURVE "\002k" -#define TR_MENUCUSTOMSWITCH "VIRT. SPÍNAč" -#define TR_MENUCUSTOMSWITCHES "VIRTUÁLNÍ SPÍNAčE" +#define TR_MENULOGICALSWITCH "VIRT. SPÍNAč" +#define TR_MENULOGICALSWITCHES "VIRTUÁLNÍ SPÍNAčE" #define TR_MENUCUSTOMFUNC "FUNKCE" #define TR_MENUTELEMETRY "TELEMETRIE" #define TR_MENUTEMPLATES "ŠABLONY" @@ -616,6 +670,7 @@ #define TR_SD_SIZE "Velikost:" #define TR_TYPE TR_SD_TYPE #define TR_GLOBAL_VARS "Globální proměnné" +#define TR_GLOBAL_V "GLOBAL V." #define TR_GLOBAL_VAR "Global Variable" #define TR_MENUGLOBALVARS "GLOBÁLNÍ PROMěNNÉ" #define TR_OWN " \043 " @@ -660,6 +715,9 @@ #define TR_LOWALARM INDENT "Nízký Alarm" #define TR_CRITICALALARM INDENT "Kritický Alarm" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" +#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" @@ -690,7 +748,7 @@ // Taranis column headers #define TR_PHASES_HEADERS { " Jméno ", " Spínač ", " Trimy ", " Přechod Zap ", " Přechod Vyp " } #define TR_LIMITS_HEADERS { " Jméno ", " Subtrim ", " Min ", " Max ", " Směr ", " Křivka ", " Střed PPM ", " Symetrické " } -#define TR_CSW_HEADERS { " Funkce ", " Hodnota 1 ", " Hodnota 2 ", " AND Spínač ", " Trvání ", " Zpoždění " } +#define TR_CSW_HEADERS { " Funkce ", " Hodnota 1 ", " Hodnota 2 ", " Hodnota 2 ", " AND Spínač ", " Trvání ", " Zpoždění " } //Taranis About screen #define TR_ABOUTUS TR(" O nás ", "O nás") @@ -743,8 +801,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 8023eaf06..10706d1bc 100644 --- a/radio/src/translations/de.h.txt +++ b/radio/src/translations/de.h.txt @@ -1,11 +1,8 @@ -/* +/* German checked 28.02.2014 kleine Änderungen * Authors (alphabetical order) * - Bertrand Songis * - Bernet Andre * - Helle - * - Kjell Kernen - * - Martin Hotar - * - Romolo Manfredini * * opentx is based on code named * gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/, @@ -23,6 +20,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 +30,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 + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ // NON ZERO TERMINATED STRINGS #define LEN_OFFON "\003" @@ -62,6 +65,12 @@ #define LEN_TRNCHN "\003" #define TR_TRNCHN "CH1CH2CH3CH4" +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "AUS\0 ""S-Port Data Out\0""Debug\0 " + +#define LEN_POTTYPES "\017" +#define TR_POTTYPES "Poti\0 ""Stufen-Schalter " + #define LEN_DATETIME "\005" #define TR_DATETIME "DATE:""ZEIT:" @@ -72,7 +81,7 @@ #define TR_COUNTRYCODES TR("US""JP""EU", "Amerika""Japan\0 ""Europa\0") #define LEN_VTRIMINC TR("\006","\013") -#define TR_VTRIMINC TR("Expo ""ExFein""Fein ""Mittel""Grob ","Exponential""Extra Fein ""Fein ""Mittel ""Grob ") +#define TR_VTRIMINC TR("Expo ""ExFein""Fein ""Mittel""Grob ","Exponential""Extra Fein ""Fein ""Mittel ""Grob ") #define LEN_VBEEPCOUNTDOWN "\006" #define TR_VBEEPCOUNTDOWN "Kein\0 Pieps\0Stimme" @@ -136,10 +145,37 @@ #define TR_VMLTPX2 "+=""*="":=" #define LEN_VMIXTRIMS "\003" -#define TR_VMIXTRIMS "AUS""EIN""Sei""H\203e""Gas""Que" //Mixer Trim Werte +#define TR_VMIXTRIMS "AUS""EIN""Sei""Höh""Gas""Que" //Mixer Trim Werte + +#if defined(PCBTARANIS) + #define TR_CSWTIMER "Timer" + #define TR_CSWSTICKY "Stcky" + #define TR_CSWRANGE "Range" + #define TR_CSWSTAY "Edge\0" +#else + #define TR_CSWTIMER "Tim\0 " + #define TR_CSWSTICKY "Glue\0" + #if defined(CPUARM) + #define TR_CSWRANGE "Rnge\0" + #define TR_CSWSTAY "Edge\0" + #else + #define TR_CSWRANGE + #define TR_CSWSTAY + #endif +#endif + +#if defined(CPUARM) +#define TR_CSWEQUAL "a=x\0 " +#else +#define TR_CSWEQUAL +#endif #define LEN_VCSWFUNC "\005" -#define TR_VCSWFUNC "---\0 ""a{x\0 ""a>x\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""a 2 - #define TR_ROTARY_ENCODERS_VSRCRAW "DGa ""DGb ""DGc ""DGd " -#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS <= 2 - #define TR_ROTARY_ENCODERS_VSRCRAW "DGa ""DGb " -#else - #define TR_ROTARY_ENCODERS_VSRCRAW + #define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_CUSTOMSW #endif #if defined(HELI) @@ -343,24 +392,24 @@ #define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]" #endif -#define TR_VSRCRAW "---\0""Sei\0""H\203h\0""Gas\0""Que\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS_VSRCRAW "MAX\0" TR_CYC_VSRCRAW "TrmS" "TrmH" "TrmG" "TrmQ" TR_SW_VSRCRAW +#define TR_VSRCRAW "---\0""Sei\0""Höh\0""Gas\0""Que\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmS" "TrmH" "TrmG" "TrmQ" TR_SW_VSRCRAW #define LEN_VTMRMODES "\003" #define TR_VTMRMODES "AUS""ABS""GSs""GS%""GSt" #define LEN_VTRAINERMODES "\007" // "\006" -#define TR_VTRAINERMODES "Lehrer\0""Sch\205ler\0" // "Master""Slave\0" +#define TR_VTRAINERMODES "Lehrer\0""Schüler\0" // "Master""Slave\0" #define LEN_VFAILSAFE "\011" #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 @@ -377,9 +426,9 @@ #define TR_POPUPS TR_ENTER"\010[EXIT]" #define OFS_EXIT sizeof(TR_ENTER) -#define TR_MENUWHENDONE CENTER"\006"TR_ENTER" > Weiter" +#define TR_MENUWHENDONE CENTER"\010"TR_ENTER" > Weiter" #define TR_FREE "frei" -#define TR_DELETEMODEL "Modell l\203schen?" +#define TR_DELETEMODEL "Modell löschen?" #define TR_COPYINGMODEL "Kopiere Modell" #define TR_MOVINGMODEL "Schiebe Modell" #define TR_LOADINGMODEL "Lade Modell..." @@ -387,13 +436,18 @@ #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_TIMER TR("Timer","Timer ") #define TR_ELIMITS TR("Erw.Limit","Erweit. Limits") #define TR_ETRIMS TR("Erw.Trims","Erweit. Trimmung") #define TR_TRIMINC TR("Trim Schr.","Trimm Schritte") -#define TR_TTRACE TR("Gasquelle","Gas Quelle") +#define TR_TTRACE TR("Gasquelle","Gas Verfolgung") #define TR_TTRIM TR("Gastrim","Gas Trimmung") #define TR_BEEPCTR TR("Mitt.Piep","Mittelst. Pieps") #define TR_PROTO TR(INDENT"Proto.",INDENT"Protokoll") @@ -404,14 +458,14 @@ #define TR_FADEIN "Langs. Ein" #define TR_FADEOUT "Langs. Aus" #define TR_DEFAULT "(Normal)" -#define TR_CHECKTRIMS "\006Trims\012Pr\205fen" +#define TR_CHECKTRIMS "\006Trims\012Prüfen" #define OFS_CHECKTRIMS (9*FW) #define TR_SWASHTYPE TR("Typ Taumelsch","Typ Taumelscheibe") #define TR_COLLECTIVE TR("Kollekt.Pitch","Kollekt. Pitch Kanal") #define TR_SWASHRING TR("Zykl. Begrenz","Zyklische Begrenzung") -#define TR_ELEDIRECTION TR("Nick Richtung"," Nick Servo Richtung") -#define TR_AILDIRECTION TR("Roll Richtung"," Roll Servo Richtung") -#define TR_COLDIRECTION TR("Pit. Richtung","Pitch Servo Richtung") +#define TR_ELEDIRECTION TR("Nick Richtung"," Nick Servo Richtung") +#define TR_AILDIRECTION TR("Roll Richtung"," Roll Servo Richtung") +#define TR_COLDIRECTION TR("Pit. Richtung"," Pitch Servo Richtung") #define TR_MODE INDENT"Modus" #define TR_NOFREEEXPO "Expos voll!" #define TR_NOFREEMIXER "Mischer voll!" @@ -442,18 +496,18 @@ #define TR_BAR "Streifen" #define TR_ALARM INDENT"Alarm" #define TR_USRDATA "Daten" -#define TR_BLADES INDENT"Bl\201tter" +#define TR_BLADES INDENT"Blätter" #define TR_SCREEN "Bild " -#define TR_SOUND_LABEL "T\203ne" -#define TR_LENGTH INDENT"Dauer" -#define TR_SPKRPITCH INDENT"Tonh\203he" +#define TR_SOUND_LABEL "----Töne---------" +#define TR_LENGTH INDENT"Dauer" +#define TR_SPKRPITCH INDENT"Tonhöhe" #define TR_HAPTIC_LABEL "Vibration" -#define TR_HAPTICSTRENGTH INDENT"St\201rke" -#define TR_CONTRAST "Kontrast" -#define TR_ALARMS_LABEL "Alarm wenn" +#define TR_HAPTICSTRENGTH INDENT"Stärke" +#define TR_CONTRAST "LCD Kontrast" +#define TR_ALARMS_LABEL "----Alarm wenn---" #define TR_BATTERY_RANGE TR("Akku Bereich","Akku Spg-Bereich") // Symbol Akku Ladezustand -#define TR_BATTERYWARNING INDENT"Akku Spg kl." -#define TR_INACTIVITYALARM INDENT"Inaktivit\201t " +#define TR_BATTERYWARNING INDENT"Akku Spg kleiner" +#define TR_INACTIVITYALARM INDENT"Inaktivität " #define TR_MEMORYWARNING INDENT"Speicher voll" #define TR_ALARMWARNING INDENT"Ton aus" #define TR_RENAVIG "Drehgeb. Navig." @@ -461,46 +515,45 @@ #define TR_MINUTEBEEP TR(INDENT"Minute",INDENT"Jede Minute") #define TR_BEEPCOUNTDOWN INDENT"Countdown" #define TR_PERSISTENT TR(INDENT"M-Zeit",INDENT"Modell Zeit") -#define TR_BACKLIGHT_LABEL "LCD Licht an" +#define TR_BACKLIGHT_LABEL "----LCD Licht----" #define TR_BLDELAY INDENT"Dauer" #define TR_BLONBRIGHTNESS INDENT"An Helligkeit" #define TR_BLOFFBRIGHTNESS INDENT"Aus Helligkeit" #define TR_SPLASHSCREEN "Startbild" #define TR_THROTTLEWARNING "Gas Alarm" #define TR_SWITCHWARNING TR("Sch. Alarm","Schalter Alarm") +#define TR_POTWARNING TR("Pot Warn.","Poti Warnung") #define TR_TIMEZONE TR("Zeitzone","GPS Zeit Zone") #define TR_RXCHANNELORD TR("Kanalanordnung","Kanalvoreinstellung") -#define TR_SLAVE "Sch\205ler PPM1-8 als Ausgang" +#define TR_SLAVE "Schüler PPM1-8 als Ausgang" #define TR_MODESRC " Modus\002% Quelle" #define TR_MULTIPLIER "Multiplikator" #define TR_CAL "Kal." #define TR_VTRIM "Trim- +" #define TR_BG "BG:" -#define TR_MENUTOSTART CENTER"\006"TR_ENTER" zum Start" -#define TR_SETMIDPOINT CENTER"Sticks+Potis auf Mitte" -#define TR_MOVESTICKSPOTS CENTER"Sticks+Potis bewegen" +#define TR_MENUTOSTART CENTER"\007"TR_ENTER" zum Start" +#define TR_SETMIDPOINT CENTER"\002Sticks+Potis auf Mitte" +#define TR_MOVESTICKSPOTS CENTER"\003Sticks+Potis bewegen" #define TR_RXBATT "Rx Batt:" #define TR_TXnRX "Tx:\0Rx:" #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_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_TOTTM1TM2THRTHP "\037\146TOT\036TM1\037\146TM2\036THR\037\146TH%" +#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_MENUTORESET CENTER TR_ENTER" für Reset" #define TR_PPM "PPM" #define TR_CH "CH" #define TR_MODEL "MODELL" @@ -508,33 +561,33 @@ #define TR_MIX "MIX" #define TR_EEPROMLOWMEM "EEPROM voll" #define TR_ALERT "WARNUNG" -#define TR_PRESSANYKEYTOSKIP "Taste dr\205cken" +#define TR_PRESSANYKEYTOSKIP "Taste drücken" #define TR_THROTTLENOTIDLE "Gas nicht Null!" #define TR_ALARMSDISABLED "Alarme ausgeschaltet" -#define TR_PRESSANYKEY TR("Taste dr\205cken",CENTER"Taste dr\205cken") -#define TR_BADEEPROMDATA "EEPROM ung\205ltig" +#define TR_PRESSANYKEY TR("Taste drücken",CENTER"Taste drücken") +#define TR_BADEEPROMDATA "EEPROM ungültig" #define TR_EEPROMFORMATTING "EEPROM Initialisieren" -#define TR_EEPROMOVERFLOW "EEPROM \204berlauf" +#define TR_EEPROMOVERFLOW "EEPROM Überlauf" #define TR_MENURADIOSETUP TR("SENDER EINST.","SENDER GRUNGEINSTELLUNGEN") #define TR_MENUDATEANDTIME "DATUM UND ZEIT" -#define TR_MENUTRAINER TR("Lehr./Sch\204l.","LEHRER/SCH\204LER") +#define TR_MENUTRAINER TR("Lehr./Schül.","LEHRER/SCHÜLER") #define TR_MENUVERSION "VERSION" #define TR_MENUDIAG TR("Schalt.","Schalter Test") #define TR_MENUANA "Analog Test" #define TR_MENUCALIBRATION TR("KALIB. ANALOG","KALIBRIERUNG STICKS+POTIS") #define TR_TRIMS2OFFSETS "\006Trims => Offset" -#define TR_MENUMODELSEL TR("MODELLE","MODELL W\200HLEN") +#define TR_MENUMODELSEL TR("MODELLE","MODELL WÄHLEN") #define TR_MENUSETUP TR("KONF.","MODELL EINSTELLUNGEN") #define TR_MENUFLIGHTPHASE "FLUGPHASE" #define TR_MENUFLIGHTPHASES "FLUGPHASEN" #define TR_MENUHELISETUP "HUBSCHRAUBER" #if defined(PCBTARANIS) - #define TR_MENUINPUTS "EING\200NGE" - #define TR_MENULIMITS "AUSG\200NGE" -#elif defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_LIMITS_SYMETRICAL) // The right menu titles for the gurus ... #define TR_MENUDREXPO "KN\204PPEL" - #define TR_MENUINPUTS "EING\200NGE" - #define TR_MENULIMITS "AUSG\200NGE" + #define TR_MENUINPUTS "INPUTS" + #define TR_MENULIMITS "AUSGÄNGE" +#elif defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_LIMITS_SYMETRICAL) // The right menu titles for the gurus ... #define TR_MENUDREXPO "KNÜPPEL" + #define TR_MENUINPUTS "INPUTS" + #define TR_MENULIMITS "AUSGÄNGE" #else #define TR_MENUINPUTS TR("DR/EXPO","DUALRATE/EXPO") #define TR_MENULIMITS TR("GRENZEN","SERVO WEG") @@ -542,32 +595,32 @@ #define TR_MENUCURVES "KURVEN" #define TR_MENUCURVE "KURVE" -#define TR_MENUCUSTOMSWITCH "PROG.SCHALTER" -#define TR_MENUCUSTOMSWITCHES TR_MENUCUSTOMSWITCH +#define TR_MENULOGICALSWITCH "LOGIK SCHALTER" +#define TR_MENULOGICALSWITCHES "LOGIK SCHALTER" #define TR_MENUCUSTOMFUNC "SPEZ. FUNKTIONEN" #define TR_MENUTELEMETRY "TELEMETRIE" #define TR_MENUTEMPLATES "VORLAGEN" #define TR_MENUSTAT "STAT" #define TR_MENUDEBUG "DEBUG" -#define TR_RXNUM TR("Rx Nummer",INDENT"Empf\201nger Nr.") +#define TR_RXNUM TR("Rx Nummer",INDENT"Empfänger Nr.") #define TR_SYNCMENU "Sync [MENU]" -#define TR_LIMIT INDENT"Limite" +#define TR_LIMIT INDENT"Grenzen" #define TR_MINRSSI "Min. RSSI" #define TR_LATITUDE "Breite:" -#define TR_LONGITUDE "L\201nge:" +#define TR_LONGITUDE "Länge:" #define TR_GPSCOORD TR("Gps Koord.","GPS Koordinaten Format") -#define TR_VARIO TR("Vario","Variometer") +#define TR_VARIO TR("Vario","----Variometer----") #define TR_SHUTDOWN "Herunterfahren" #define TR_BATT_CALIB "Akku. Kalib." #define TR_CURRENT_CALIB "Stromkalib." #define TR_VOLTAGE INDENT"Spann." #define TR_CURRENT INDENT"Strom" -#define TR_SELECT_MODEL "Modell W\201hlen" +#define TR_SELECT_MODEL "Modell Wählen" #define TR_CREATE_MODEL "Neues Modell" #define TR_COPY_MODEL "Kopiere Modell" #define TR_MOVE_MODEL "Verschiebe Modell" #define TR_BACKUP_MODEL "Modell Backup" -#define TR_DELETE_MODEL "Modell L\203schen" // TODO merged into DELETEMODEL? +#define TR_DELETE_MODEL "Modell Löschen" // TODO merged into DELETEMODEL? #define TR_RESTORE_MODEL "Modell Restore" #define TR_SDCARD_ERROR "SDcard Fehler" #define TR_NO_SDCARD "Keine SDcard" @@ -577,8 +630,8 @@ #define TR_THROTTLEWARN "GAS" #define TR_ALARMSWARN "ALARM" #define TR_SWITCHWARN "SCHALTER" -#define TR_INVERT_THR TR("Gas umkehren?","Vollgas hinten?") //\200nderung wg Th9x -#define TR_SPEAKER_VOLUME INDENT "Lautst\201rke" +#define TR_INVERT_THR TR("Gas umkehren?","Vollgas hinten?") //Änderung wg Th9x +#define TR_SPEAKER_VOLUME INDENT "Lautstärke" #define TR_LCD "Bildschirm" #define TR_BRIGHTNESS INDENT "Helligkeit" #define TR_CPU_TEMP "CPU Temp.\016>" @@ -587,27 +640,27 @@ #define TR_COPROC "CoProz." #define TR_COPROC_TEMP "MB Temp. \016>" #define TR_CAPAWARNING INDENT "Kapaz. niedrig" -#define TR_TEMPWARNING INDENT "Temperatur gr\203er" +#define TR_TEMPWARNING INDENT "Temperatur größer" #define TR_FUNC "Funktion" #define TR_V1 "V1" #define TR_V2 "V2" #define TR_DURATION "Dauer" -#define TR_DELAY "Verz\203g." +#define TR_DELAY "Verzög." #define TR_SD_CARD "SD Karte" #define TR_SDHC_CARD "SD-HC Karte" -#define TR_NO_SOUNDS_ON_SD "Keine T\203ne auf SD" +#define TR_NO_SOUNDS_ON_SD "Keine Töne auf SD" #define TR_NO_MODELS_ON_SD "Keine Modelle auf SD" #define TR_NO_BITMAPS_ON_SD "Keine Bitmaps auf SD" #define TR_PLAY_FILE "Spielen" -#define TR_DELETE_FILE "L\203schen" +#define TR_DELETE_FILE "Löschen" #define TR_COPY_FILE "Kopieren" #define TR_RENAME_FILE "Umbenennen" #define TR_ASSIGN_BITMAP "Assign Bitmap" -#define TR_REMOVED " gel\203scht" +#define TR_REMOVED " gelöscht" #define TR_SD_INFO "Information" #define TR_SD_FORMAT "Formattieren" -#define TR_NA "N/V" //NV=Nicht Verf\205gbar Kurz-Meldung -#define TR_HARDWARE "Hardware" +#define TR_NA "N/V" //NV=Nicht Verfügbar Kurz-Meldung +#define TR_HARDWARE "Hardware einstellen" #define TR_FORMATTING "Formattierung..." #define TR_TEMP_CALIB "Temp. Kalib." #define TR_TIME "Uhrzeit:" @@ -616,9 +669,10 @@ #define TR_SD_TYPE "Typ:" #define TR_SD_SPEED "Geschw:" #define TR_SD_SECTORS "Sektoren:" -#define TR_SD_SIZE "Gr\203\206e:" +#define TR_SD_SIZE "Größe:" #define TR_TYPE "Typ" #define TR_GLOBAL_VARS "Globale Variablen" +#define TR_GLOBAL_V "GLOBAL V." #define TR_GLOBAL_VAR "Global Variable" #define TR_MENUGLOBALVARS "GLOBALE VARIABLEN" #define TR_OWN "Eigen" @@ -659,10 +713,13 @@ #define TR_ANTENNAPROBLEM CENTER "TX Antennen Problem!" #define TR_MODELIDUSED TR("ID schon benutzt","Modell ID schon benutzt") #define TR_MODULE INDENT "Modul-Typ" -#define TR_CHANNELRANGE INDENT "Ausgangs Kan\201le" +#define TR_CHANNELRANGE INDENT "Ausgangs Kanäle" #define TR_LOWALARM INDENT "Low Alarm" #define TR_CRITICALALARM INDENT "Kritisch Alarm" -#define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_PERSISTENT_MAH INDENT "Speichern mAh" +#define TR_CHECKLIST "Display Checklist" +#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" @@ -690,10 +747,10 @@ #define TR_MAVLINK_LON "LON" #endif -// Taranis column headers -#define TR_PHASES_HEADERS { " Name ", " Schalter ", " Trimmung ", " Fade In ", " Fade Out " } +// Taranis Info Zeile Anzeigen +#define TR_PHASES_HEADERS { " Name ", " Schalter ", " Seite Trim ", " Höhe Trim ", " Gas Trim ", " Quer Trim ", " Fade In ", " Fade Out " } #define TR_LIMITS_HEADERS { " Name ", " Subtrim ", " Min ", " Max ", " Richtung ", " Kurve ", " PPM Mitte ", " Subtrim Mode " } -#define TR_CSW_HEADERS { " Funktion ", " Var1 ", " Var2 ", " UND Schalter ", " Dauer ", " Delay " } +#define TR_CSW_HEADERS { " Funktion ", " Var1 ", " Var2 ", " Var2 ", " UND Schalter ", " Dauer ", " Delay " } //Taranis About screen #define TR_ABOUTUS "Über OpenTx" @@ -733,7 +790,7 @@ #define TR_ABOUT_HARDWARE_3 "Firmware Vertrieb" #else #define TR_ABOUT_HARDWARE_1 "Brent Nelson" - #define TR_ABOUT_HARDWARE_2 "Sky9x Design/produktion" + #define TR_ABOUT_HARDWARE_2 "Sky9x Design/Produktion" #define TR_ABOUT_HARDWARE_3 "" #endif @@ -742,12 +799,18 @@ #define TR_ABOUT_PARENTS_3 "ER9X (Erez Raviv)" #define TR_ABOUT_PARENTS_4 "TH9X (Thomas Husterer)" -#define TR_CHR_SHORT 's' //Taste short -#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_SHORT 's' // Taste short +#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_BEEP_VOLUME "Beep Lautst" +#define TR_WAV_VOLUME "Wav Lautst" #define TR_VARIO_VOLUME "Vario Lautst" -#define TR_BG_VOLUME "Bg Lautst" +#define TR_BG_VOLUME "Bg Lautst" + +#define TR_TOP_BAR "Info Zeile" +#define TR_ALTITUDE INDENT "Höhe" +#define TR_MODS_FORBIDDEN "Veränderungen verboten!" +#define TR_UNLOCKED "Entsperrt" diff --git a/radio/src/translations/en.h.txt b/radio/src/translations/en.h.txt new file mode 100644 index 000000000..e99c62650 --- /dev/null +++ b/radio/src/translations/en.h.txt @@ -0,0 +1,824 @@ +/* + * Authors (alphabetical order) + * - Andre Bernet + * - Andreas Weitl + * - Bertrand Songis + * - Bryan J. Rentoul (Gruvin) + * - Cameron Weeks + * - Erez Raviv + * - Gabriel Birkus + * - Jean-Pierre Parisy + * - Karl Szmutny + * - Michael Blandford + * - Michal Hlavinka + * - Pat Mackenzie + * - Philip Moss + * - Rob Thomson + * - Romolo Manfredini + * - Thomas Husterer + * + * opentx is based on code named + * gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/, + * er9x by Erez Raviv: http://code.google.com/p/er9x/, + * and the original (and ongoing) project by + * Thomas Husterer, th9x: http://code.google.com/p/th9x/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + /* Formatting octal codes available in TR_ strings: + * \037\x -sets LCD x-coord (x value in octal) + * \036 -newline + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ + +// NON ZERO TERMINATED STRINGS +#define LEN_OFFON "\003" +#define TR_OFFON "OFF""ON\0" + +#define LEN_MMMINV "\003" +#define TR_MMMINV "---""INV" + +#define LEN_NCHANNELS "\004" +#define TR_NCHANNELS "\0014CH\0016CH\0018CH10CH12CH14CH16CH" + +#define LEN_VBEEPMODE "\005" +#define TR_VBEEPMODE "Quiet""Alarm""NoKey""All " + +#define LEN_VBEEPLEN "\005" +#define TR_VBEEPLEN "0====""=0===""==0==""===0=""====0" + +#define LEN_VRENAVIG "\003" +#define TR_VRENAVIG "No REaREb" + +#define LEN_VBLMODE TR("\004", "\010") +#define TR_VBLMODE TR("OFF\0""Keys""Ctrl""Both""ON\0 ", "OFF\0 ""Keys\0 ""Controls""Both\0 ""ON\0 ") + +#define LEN_TRNMODE "\003" +#define TR_TRNMODE "OFF"" +="" :=" + +#define LEN_TRNCHN "\003" +#define TR_TRNCHN "CH1CH2CH3CH4" + +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "OFF\0 ""S-Port Mirror\0 ""Debug\0 " + +#define LEN_POTTYPES "\017" +#define TR_POTTYPES "None\0 ""Pot\0 ""Multipos Switch" + +#define LEN_DATETIME "\005" +#define TR_DATETIME "DATE:""TIME:" + +#define LEN_VLCD "\006" +#define TR_VLCD "NormalOptrex" + +#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\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" + +#define LEN_RETA123 "\001" + +#if defined(PCBGRUVIN9X) + #if ROTARY_ENCODERS > 2 + #define TR_RETA123 "RETA123abcd" + #else + #define TR_RETA123 "RETA123ab" + #endif +#elif defined(PCBTARANIS) + #define TR_RETA123 "RETA12LR" +#else + #define TR_RETA123 "RETA123" +#endif + +#define LEN_VPROTOS "\006" + +#if defined(PXX) + #define TR_PXX "PXX\0 " +#elif defined(DSM2) || defined(IRPROTOS) + #define TR_PXX "[PXX]\0" +#else + #define TR_PXX +#endif + +#if defined(DSM2) + #define TR_DSM2 "LP45\0 ""DSM2\0 ""DSMX\0 " +#elif defined(IRPROTOS) + #define TR_DSM2 "[LP45]""[DSM2]""[DSMX]" +#else + #define TR_DSM2 +#endif + +#if defined(IRPROTOS) + #define TR_IRPROTOS "SILV TRAC09PICZ SWIFT\0" +#else + #define TR_IRPROTOS +#endif + +#if defined(CPUARM) + #define TR_XPPM +#else + #define TR_XPPM "PPM16\0""PPMsim" +#endif + +#define TR_VPROTOS "PPM\0 " TR_XPPM TR_PXX TR_DSM2 TR_IRPROTOS + +#define LEN_POSNEG "\003" +#define TR_POSNEG "POS""NEG" + +#define LEN_VCURVEFUNC "\003" +#define TR_VCURVEFUNC "---""x>0""x<0""|x|""f>0""f<0""|f|" + +#define LEN_VMLTPX "\010" +#define TR_VMLTPX "Add\0 ""Multiply""Replace\0" + +#define LEN_VMLTPX2 "\002" +#define TR_VMLTPX2 "+=""*="":=" + +#define LEN_VMIXTRIMS "\003" +#define TR_VMIXTRIMS "OFF""ON\0""Rud""Ele""Thr""Ail" + +#if defined(PCBTARANIS) + #define TR_CSWTIMER "Timer" + #define TR_CSWSTICKY "Stcky" + #define TR_CSWRANGE "Range" + #define TR_CSWSTAY "Edge\0" +#else + #define TR_CSWTIMER "Tim\0 " + #define TR_CSWSTICKY "Glue\0" + #if defined(CPUARM) + #define TR_CSWRANGE "Rnge\0" + #define TR_CSWSTAY "Edge\0" + #else + #define TR_CSWRANGE + #define TR_CSWSTAY + #endif +#endif + +#if defined(CPUARM) + #define TR_CSWEQUAL "a=x\0 " +#else + #define TR_CSWEQUAL +#endif + +#define LEN_VCSWFUNC "\005" +#if defined(CPUARM) +#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a{x\0 ""a>x\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""a" + +#define LEN_VTELPROTO "\007" +#define TR_VTELPROTO "None\0 ""Hub\0 ""WSHHigh" + +#define LEN_VOLTSRC "\003" +#define TR_VOLTSRC "---""A1\0""A2\0""FAS""Cel" + +#define LEN_VARIOSRC "\004" +#if defined(FRSKY_SPORT) + #define TR_VARIOSRC "VSpd""A1\0 ""A2\0 ""dTE\0" +#else + #define TR_VARIOSRC "Alt\0""Alt+""VSpd""A1\0 ""A2\0" +#endif + +#define LEN_VSCREEN "\004" +#define TR_VSCREEN "Nums""Bars" + +#define LEN_GPSFORMAT "\004" +#define TR_GPSFORMAT "HMS NMEA" + +#define LEN2_VTEMPLATES 13 +#define LEN_VTEMPLATES "\015" +#define TR_VTEMPLATES "Clear Mixes\0\0""Simple 4-CH \0""Sticky-T-Cut\0""V-Tail \0""Elevon\\Delta\0""eCCPM \0""Heli Setup \0""Servo Test \0" + +#define LEN_VSWASHTYPE "\004" +#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0" + +#define LEN_VKEYS "\005" +#define TR_VKEYS TR("Menu\0""Exit\0""Down\0""Up\0 ""Right""Left\0", "Menu\0""Exit\0""Enter""Page\0""Plus\0""Minus") + +#define LEN_VRENCODERS "\003" +#define TR_VRENCODERS "REa""REb" + +#define LEN_VSWITCHES "\003" +#define LEN_VSRCRAW "\004" + +#if defined(PCBTARANIS) + #define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""LS\0 ""RS\0 " + #define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 " +#elif defined(EXTRA_3POS) + #define TR_POTS_VSRCRAW "P1\0 ""P2\0 " + #define TR_SW_VSRCRAW "3P1\0""3P2\0" + #define TR_9X_3POS_SWITCHES "ID0""ID1""ID2""ID3""ID4""ID5" +#else + #define TR_POTS_VSRCRAW "P1\0 ""P2\0 ""P3\0 " + #define TR_SW_VSRCRAW "3POS" + #define TR_9X_3POS_SWITCHES "ID0""ID1""ID2" +#endif + +#if defined(CPUARM) + #define TR_LOGICALSW "LS1""LS2""LS3""LS4""LS5""LS6""LS7""LS8""LS9""LSA""LSB""LSC""LSD""LSE""LSF""LSG""LSH""LSI""LSJ""LSK""LSL""LSM""LSN""LSO""LSP""LSQ""LSR""LSS""LST""LSU""LSV""LSW" +#elif defined(PCBGRUVIN9X) || defined(CPUM2561) || defined(CPUM128) + #define TR_LOGICALSW "LS1""LS2""LS3""LS4""LS5""LS6""LS7""LS8""LS9""LSA""LSB""LSC""LSD""LSE""LSF" +#else + #define TR_LOGICALSW "LS1""LS2""LS3""LS4""LS5""LS6""LS7""LS8""LS9""LSA""LSB""LSC" +#endif + +#define TR_TRIMS_SWITCHES "tRl""tRr""tEd""tEu""tTd""tTu""tAl""tAr" + +#if defined(PCBSKY9X) + #define TR_ROTARY_ENCODERS "REa\0" + #define TR_ROTENC_SWITCHES "REa" +#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560) + #define TR_ROTARY_ENCODERS "REa\0""REb\0" + #define TR_ROTENC_SWITCHES "REa""REb" +#else + #define TR_ROTARY_ENCODERS + #define TR_ROTENC_SWITCHES +#endif + +#if defined(PCBTARANIS) + #define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36" + #define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW +#elif defined(CPUARM) + #define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW +#else + #define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW +#endif + +#if defined(HELI) + #define TR_CYC_VSRCRAW "CYC1""CYC2""CYC3" +#else + #define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]" +#endif + +#define TR_VSRCRAW "---\0""Rud\0""Ele\0""Thr\0""Ail\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmR" "TrmE" "TrmT" "TrmA" TR_SW_VSRCRAW + +#define LEN_VTMRMODES "\003" +#define TR_VTMRMODES "OFF""ABS""THs""TH%""THt" + +#define LEN_VTRAINERMODES "\006" +#define TR_VTRAINERMODES "Master""Slave\0" + +#define LEN_VFAILSAFE "\011" +#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 " +#endif + +// ZERO TERMINATED STRINGS +#define INDENT "\001" +#define LEN_INDENT 1 +#define INDENT_WIDTH (FW/2) + +#if defined(PCBTARANIS) + #define TR_ENTER "[ENTER]" +#else + #define TR_ENTER "[MENU]" +#endif + +#define TR_POPUPS TR_ENTER "\010[EXIT]" +#define OFS_EXIT sizeof(TR_ENTER) + +#define TR_MENUWHENDONE CENTER "\006" TR_ENTER " WHEN DONE" +#define TR_FREE "free" +#define TR_DELETEMODEL "DELETE MODEL" +#define TR_COPYINGMODEL "Copying model..." +#define TR_MOVINGMODEL "Moving model..." +#define TR_LOADINGMODEL "Loading model..." +#define TR_NAME "Name" +#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 + #define TR_EXPONAME "Expo Name" +#endif +#define TR_BITMAP "Model Image" +#define TR_TIMER TR("Timer", "Timer ") +#define TR_ELIMITS TR("E.Limits", "Extended Limits") +#define TR_ETRIMS TR("E.Trims", "Extended Trims") +#define TR_TRIMINC "Trim Step" +#define TR_TTRACE TR("T-Source", "Throttle Source") +#define TR_TTRIM TR("T-Trim", "Throttle Trim") +#define TR_BEEPCTR TR("Ctr Beep", "Center Beep") +#define TR_PROTO TR(INDENT "Proto", INDENT "Protocol") +#define TR_PPMFRAME TR("PPM frame", INDENT "PPM frame") +#define TR_MS "ms" +#define TR_SWITCH "Switch" +#define TR_TRIMS "Trims" +#define TR_FADEIN "Fade In" +#define TR_FADEOUT "Fade Out" +#define TR_DEFAULT "(default)" +#define TR_CHECKTRIMS CENTER "\006Check\012Trims" +#define OFS_CHECKTRIMS CENTER_OFS+(9*FW) +#define TR_SWASHTYPE "Swash Type" +#define TR_COLLECTIVE TR("Collective","Collective source") +#define TR_SWASHRING "Swash Ring" +#define TR_ELEDIRECTION TR("ELE Direction","Long. cyc. direction") +#define TR_AILDIRECTION TR("AIL Direction","Lateral cyc. direction") +#define TR_COLDIRECTION TR("PIT Direction","Coll. pitch direction") +#define TR_MODE INDENT"Mode" +#define TR_NOFREEEXPO "No free expo!" +#define TR_NOFREEMIXER "No free mixer!" +#define TR_INSERTMIX "INSERT MIX " +#define TR_EDITMIX "EDIT MIX " +#define TR_SOURCE INDENT"Source" +#define TR_WEIGHT "Weight" +#define TR_EXPO TR("Expo","Exponential") +#define TR_SIDE "Side" +#define TR_DIFFERENTIAL "Differ" +#define TR_OFFSET INDENT"Offset" +#define TR_TRIM "Trim" +#define TR_DREX "DRex" +#define TR_CURVE "Curve" +#define TR_FLMODE TR("Mode","Modes") +#define TR_MIXWARNING "Warning" +#define TR_OFF "OFF" +#define TR_MULTPX "Multpx" +#define TR_DELAYDOWN "Delay Dn" +#define TR_DELAYUP "Delay Up" +#define TR_SLOWDOWN "Slow Dn" +#define TR_SLOWUP "Slow Up" +#define TR_MIXER "MIXER" +#define TR_CV "CV" +#define TR_GV "GV" +#define TR_ACHANNEL "A\004channel" +#define TR_RANGE INDENT"Range" +#define TR_BAR "Bar" +#define TR_ALARM INDENT"Alarm" +#define TR_USRDATA "UsrData" +#define TR_BLADES INDENT"Blades" +#define TR_SCREEN "Screen " +#define TR_SOUND_LABEL "Sound" +#define TR_LENGTH INDENT"Length" +#define TR_SPKRPITCH INDENT"Pitch" +#define TR_HAPTIC_LABEL "Haptic" +#define TR_HAPTICSTRENGTH INDENT"Strength" +#define TR_CONTRAST "Contrast" +#define TR_ALARMS_LABEL "Alarms" +#define TR_BATTERY_RANGE TR("Battery range","Battery meter range") +#define TR_BATTERYWARNING INDENT"Battery Low" +#define TR_INACTIVITYALARM INDENT"Inactivity" +#define TR_MEMORYWARNING INDENT"Memory Low" +#define TR_ALARMWARNING INDENT"Sound Off" +#define TR_RENAVIG "RotEnc Navig" +#define TR_THROTTLEREVERSE TR("T-Reverse", "Throttle reverse") +#define TR_MINUTEBEEP TR(INDENT"Minute",INDENT"Minute call") +#define TR_BEEPCOUNTDOWN INDENT"Countdown" +#define TR_PERSISTENT TR(INDENT"Persist.",INDENT"Persistent") +#define TR_BACKLIGHT_LABEL "Backlight" +#define TR_BLDELAY INDENT"Duration" +#define TR_BLONBRIGHTNESS INDENT"ON Brightness" +#define TR_BLOFFBRIGHTNESS INDENT"OFF Brightness" +#define TR_SPLASHSCREEN "Splash screen" +#define TR_THROTTLEWARNING TR("T-Warning","Throttle Warning") +#define TR_SWITCHWARNING TR("S-Warning","Switch Warning") +#define TR_POTWARNING TR("Pot Warn.","Pot Warning") +#define TR_TIMEZONE TR("Time Zone","GPS Time zone") +#define TR_RXCHANNELORD TR("Rx Channel Ord","Default channel order") +#define TR_SLAVE "Slave" +#define TR_MODESRC "Mode\006% Source" +#define TR_MULTIPLIER "Multiplier" +#define TR_CAL "Cal" +#define TR_VTRIM "Trim- +" +#define TR_BG "BG:" +#define TR_MENUTOSTART CENTER "\010" TR_ENTER " TO START" +#define TR_SETMIDPOINT TR(CENTER "\004SET STICKS MIDPOINT",CENTER "\004CENTER STICKS/SLIDERS") +#define TR_MOVESTICKSPOTS CENTER "\006MOVE STICKS/POTS" +#define TR_RXBATT "Rx Batt:" +#define TR_TXnRX "Tx:\0Rx:" +#define OFS_RX 4 +#define TR_ACCEL "Acc:" +#define TR_NODATA CENTER "NO DATA" +#define TR_TOTTM1TM2THRTHP "\037\146TOT\036TM1\037\146TM2\036THR\037\146TH%" +#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\037\124ms" + #define TR_FREESTACKMINB "Free Stack\037\124b" +#endif + +#define TR_MENUTORESET CENTER TR_ENTER " to reset" +#define TR_PPM "PPM" +#define TR_CH "CH" +#define TR_MODEL "MODEL" +#define TR_FP "FM" +#define TR_MIX "MIX" +#define TR_EEPROMLOWMEM "EEPROM low mem" +#define TR_ALERT "\016ALERT" +#define TR_PRESSANYKEYTOSKIP "Press any key to skip" +#define TR_THROTTLENOTIDLE "Throttle not idle" +#define TR_ALARMSDISABLED "Alarms Disabled" +#define TR_PRESSANYKEY TR("\010Press any Key", "Press any Key") +#define TR_BADEEPROMDATA "Bad EEprom Data" +#define TR_EEPROMFORMATTING "Formatting EEPROM" +#define TR_EEPROMOVERFLOW "EEPROM overflow" +#define TR_MENURADIOSETUP "RADIO SETUP" +#define TR_MENUDATEANDTIME "DATE AND TIME" +#define TR_MENUTRAINER "TRAINER" +#define TR_MENUVERSION "VERSION" +#define TR_MENUDIAG TR("SWITCHES","SWITCH TEST") +#define TR_MENUANA TR("ANAS","ANALOG INPUTS") +#define TR_MENUCALIBRATION "CALIBRATION" +#define TR_TRIMS2OFFSETS "\006Trims => Offsets" +#define TR_MENUMODELSEL TR("MODELSEL","MODEL SELECTION") +#define TR_MENUSETUP TR("SETUP","MODEL SETUP") +#define TR_MENUFLIGHTPHASE "FLIGHT MODE" +#define TR_MENUFLIGHTPHASES "FLIGHT MODES" +#define TR_MENUHELISETUP "HELI SETUP" + +#if defined(PCBTARANIS) + #define TR_MENUINPUTS "INPUTS" + #define TR_MENULIMITS "SERVOS" +#elif defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_LIMITS_SYMETRICAL) // The right menu titles for the gurus ... + #define TR_MENUINPUTS "STICKS" + #define TR_MENULIMITS "SERVOS" +#else + #define TR_MENUINPUTS "DR/EXPO" + #define TR_MENULIMITS "LIMITS" +#endif + +#define TR_MENUCURVES "CURVES" +#define TR_MENUCURVE "CURVE" +#define TR_MENULOGICALSWITCH "LOGICAL SWITCH" +#define TR_MENULOGICALSWITCHES "LOGICAL SWITCHES" +#define TR_MENUCUSTOMFUNC "CUSTOM FUNCTIONS" +#define TR_MENUTELEMETRY "TELEMETRY" +#define TR_MENUTEMPLATES "TEMPLATES" +#define TR_MENUSTAT "STATS" +#define TR_MENUDEBUG "DEBUG" +#define TR_RXNUM TR("RxNum", INDENT"Receiver No.") +#define TR_SYNCMENU "[Sync]" +#define TR_LIMIT INDENT"Limit" +#define TR_MINRSSI "Min Rssi" +#define TR_LATITUDE "Latitude" +#define TR_LONGITUDE "Longitude" +#define TR_GPSCOORD TR("GPS Coords", "GPS coordinate format") +#define TR_VARIO TR("Vario", "Variometer") +#define TR_SHUTDOWN "SHUTTING DOWN" +#define TR_BATT_CALIB "Battery Calib" +#define TR_CURRENT_CALIB "Current Calib" +#define TR_VOLTAGE INDENT"Voltage" +#define TR_CURRENT INDENT"Current" +#define TR_SELECT_MODEL "Select Model" +#define TR_CREATE_MODEL "Create Model" +#define TR_COPY_MODEL "Copy Model" +#define TR_MOVE_MODEL "Move Model" +#define TR_BACKUP_MODEL "Backup Model" +#define TR_DELETE_MODEL "Delete Model" +#define TR_RESTORE_MODEL "Restore Model" +#define TR_SDCARD_ERROR "SDCARD Error" +#define TR_NO_SDCARD "No SDCARD" +#define TR_INCOMPATIBLE "Incompatible" +#define TR_WARNING "WARNING" +#define TR_EEPROMWARN "EEPROM" +#define TR_THROTTLEWARN "THROTTLE" +#define TR_ALARMSWARN "ALARMS" +#define TR_SWITCHWARN TR("SWITCH","CONTROL") +#define TR_INVERT_THR TR("Invert Thr?","Invert Throttle?") +#define TR_SPEAKER_VOLUME INDENT "Volume" // TODO could be TR_VOLUME ? +#define TR_LCD "LCD" +#define TR_BRIGHTNESS INDENT "Brightness" +#define TR_CPU_TEMP "CPU Temp.\016>" +#define TR_CPU_CURRENT "Current\022>" +#define TR_CPU_MAH "Consumpt." +#define TR_COPROC "CoProc." +#define TR_COPROC_TEMP "MB Temp. \016>" +#define TR_CAPAWARNING INDENT "Capacity Low" +#define TR_TEMPWARNING INDENT "Overheat" +#define TR_FUNC "Func" +#define TR_V1 "V1" +#define TR_V2 "V2" +#define TR_DURATION "Duration" +#define TR_DELAY "Delay" +#define TR_SD_CARD "SD CARD" +#define TR_SDHC_CARD "SD-HC CARD" +#define TR_NO_SOUNDS_ON_SD "No Sounds on SD" +#define TR_NO_MODELS_ON_SD "No Models on SD" +#define TR_NO_BITMAPS_ON_SD "No Bitmaps on SD" +#define TR_PLAY_FILE "Play" +#define TR_DELETE_FILE "Delete" +#define TR_COPY_FILE "Copy" +#define TR_RENAME_FILE "Rename" +#define TR_ASSIGN_BITMAP "Assign Bitmap" +#define TR_REMOVED " removed" +#define TR_SD_INFO "Information" +#define TR_SD_FORMAT "Format" +#define TR_NA "N/A" +#define TR_HARDWARE "HARDWARE" +#define TR_FORMATTING "Formatting..." +#define TR_TEMP_CALIB "Temp. Calib" +#define TR_TIME "Time" +#define TR_BAUDRATE "BT Baudrate" +#define TR_SD_INFO_TITLE "SD INFO" +#define TR_SD_TYPE "Type:" +#define TR_SD_SPEED "Speed:" +#define TR_SD_SECTORS "Sectors:" +#define TR_SD_SIZE "Size:" +#define TR_TYPE "Type" +#define TR_GLOBAL_VARS "Global Variables" +#define TR_GLOBAL_V "GLOBAL V." +#define TR_GLOBAL_VAR "Global Variable" +#define TR_MENUGLOBALVARS "GLOBAL VARIABLES" +#define TR_OWN "Own" +#define TR_DATE "Date" +#define TR_ROTARY_ENCODER "R.Encs" +#define TR_CHANNELS_MONITOR "CHANNEL MONITOR" +#define TR_INTERNALRF "Internal RF" +#define TR_EXTERNALRF "External RF" +#define TR_FAILSAFE INDENT "Failsafe mode" +#define TR_FAILSAFESET "FAILSAFE SETTINGS" +#define TR_COUNTRYCODE "Country Code" +#define TR_VOICELANG "Voice Language" +#define TR_UNITSSYSTEM "Units" +#define TR_EDIT "Edit" +#define TR_INSERT_BEFORE "Insert Before" +#define TR_INSERT_AFTER "Insert After" +#define TR_COPY "Copy" +#define TR_MOVE "Move" +#define TR_PASTE "Paste" +#define TR_DELETE "Delete" +#define TR_INSERT "Insert" +#define TR_RESET_FLIGHT "Reset Flight" +#define TR_RESET_TIMER1 "Reset Timer1" +#define TR_RESET_TIMER2 "Reset Timer2" +#define TR_RESET_TELEMETRY "Reset Telemetry" +#define TR_STATISTICS "Statistics" +#define TR_ABOUT_US "About" +#define TR_AND_SWITCH "AND Switch" +#define TR_CF "CF" +#define TR_SPEAKER INDENT"Speaker" +#define TR_BUZZER INDENT"Buzzer" +#define TR_BYTES "bytes" +#define TR_MODULE_BIND "[Bind]" +#define TR_MODULE_RANGE "[Range]" +#define TR_RESET_BTN "[Reset]" +#define TR_SET "[Set]" +#define TR_TRAINER "Trainer" +#define TR_ANTENNAPROBLEM CENTER "TX Antenna problem!" +#define TR_MODELIDUSED TR("ID already used","Model ID already used") +#define TR_MODULE INDENT "Module" +#define TR_CHANNELRANGE INDENT "Channel Range" +#define TR_LOWALARM INDENT "Low Alarm" +#define TR_CRITICALALARM INDENT "Critical Alarm" +#define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" +#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" +#endif + +// Taranis column headers +#define TR_PHASES_HEADERS { " Name ", " Switch ", " Rudder Trim ", " Elevator Trim ", " Throttle Trim ", " Aileron Trim ", " Fade In ", " Fade Out " } +#define TR_LIMITS_HEADERS { " Name ", " Subtrim ", " Min ", " Max ", " Direction ", " Curve ", " PPM Center ", " Subtrim mode " } +#define TR_CSW_HEADERS { " Function ", " V1 ", " V2 ", " V2 ", " AND Switch ", " Duration ", " Delay " } + +// About screen +#define TR_ABOUTUS TR(" ABOUT ", "ABOUT") + +#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") +#define TR_ABOUT_OPENTX_3 TR("It\001was\001developed\001for\001free.", "warranties. It was developed") +#define TR_ABOUT_OPENTX_4 TR("Support through donations", "for free. Support through") +#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_MIKE_1 "Mike Blandford" +#define TR_ABOUT_MIKE_2 "Code and drivers guru" +#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_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_ROB_1 "Rob Thomson" +#define TR_ABOUT_ROB_2 "openrcforums webmaster" + +#define TR_ABOUT_MARTIN_1 "Martin Hotar" +#define TR_ABOUT_MARTIN_2 "Graphics designer" + +#if defined(PCBTARANIS) + #define TR_ABOUT_HARDWARE_1 "FrSky" + #define TR_ABOUT_HARDWARE_2 "Hardware designer/producer" + #define TR_ABOUT_HARDWARE_3 "Firmware contributor" +#else + #define TR_ABOUT_HARDWARE_1 "Brent Nelson" + #define TR_ABOUT_HARDWARE_2 "Sky9x designer/producer" + #define TR_ABOUT_HARDWARE_3 "" +#endif + +#define TR_ABOUT_PARENTS_1 "Parent projects" +#define TR_ABOUT_PARENTS_2 TR("Ersky9x (Mike Blandford)", "Ersky9x (Mike Blandford)") +#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_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" // TODO may be removed +#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/es.h.txt b/radio/src/translations/es.h.txt index 11f626168..d0a5630cc 100644 --- a/radio/src/translations/es.h.txt +++ b/radio/src/translations/es.h.txt @@ -1,751 +1,814 @@ -/* - * Authors (alphabetical order) - * - Bertrand Songis - * - Bernet Andre - * - Jose Moreno - * - Kjell Kernen - * - 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/, - * and the original (and ongoing) project by - * Thomas Husterer, th9x: http://code.google.com/p/th9x/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * - * !!!!! DO NOT EDIT es.h - EDIT es.h.txt INSTEAD !!!!!!! - * - * In order to make translations easier es.h.txt is parsed and national - * characters are replaced by bitmap codes. The result is es.h. - * - * See translate.py in the util catalog for the list of character codes - * - * !!!!! DO NOT EDIT es.h - EDIT es.h.txt INSTEAD !!!!!!! - */ - - -// NON ZERO TERMINATED STRINGS -#define LEN_OFFON "\003" -#define TR_OFFON "OFF""ON\0" - -#define LEN_MMMINV "\003" -#define TR_MMMINV "---""INV" - -#define LEN_NCHANNELS "\004" -#define TR_NCHANNELS "\0014CH\0016CH\0018CH10CH12CH14CH16CH" - -#define LEN_VBEEPMODE "\005" -#define TR_VBEEPMODE "Mudo ""Alarm""NoKey""Todo " - -#define LEN_VBEEPLEN "\005" -#define TR_VBEEPLEN "0====""=0===""==0==""===0=""====0" - -#define LEN_VRENAVIG "\003" -#define TR_VRENAVIG "No REaREb" - -#define LEN_VBLMODE "\004" -#define TR_VBLMODE "OFF ""Keys""Stks""Both""ON\0" - -#define LEN_TRNMODE "\003" -#define TR_TRNMODE "OFF"" +="" :=" - -#define LEN_TRNCHN "\003" -#define TR_TRNCHN "CH1CH2CH3CH4" - -#define LEN_DATETIME "\005" -#define TR_DATETIME "DATA:""HORA:" - -#define LEN_VLCD "\006" -#define TR_VLCD "NormalOptrex" - -#define LEN_COUNTRYCODES TR("\002", "\007") -#define TR_COUNTRYCODES TR("US""JP""EU", "America""Japon\0 ""Europa\0") - -#define LEN_VTRIMINC TR("\006", "\013") -#define TR_VTRIMINC TR("Expo ""ExFino""Fino ""Medio ""Grueso", "Exponencial""Extra Fino ""Fino ""Medio ""Grueso ") - -#define LEN_VBEEPCOUNTDOWN "\006" -#define TR_VBEEPCOUNTDOWN "SilentBeeps\0Voz\0" - -#define LEN_RETA123 "\001" - -#if defined(PCBGRUVIN9X) - #if ROTARY_ENCODERS > 2 - #define TR_RETA123 "RETA123abcd" - #else - #define TR_RETA123 "RETA123ab" - #endif -#elif defined(PCBTARANIS) - #define TR_RETA123 "RETA12LR" -#else - #define TR_RETA123 "RETA123" -#endif - -#define LEN_VPROTOS "\006" - -#if defined(PXX) - #define TR_PXX "PXX\0 " -#elif defined(DSM2) || defined(IRPROTOS) - #define TR_PXX "[PXX]\0" -#else - #define TR_PXX -#endif - -#if defined(DSM2) - #define TR_DSM2 "LP45\0 ""DSM2\0 ""DSMX\0 " -#elif defined(IRPROTOS) - #define TR_DSM2 "[LP45]""[DSM2]""[DSMX]" -#else - #define TR_DSM2 -#endif - -#if defined(IRPROTOS) - #define TR_IRPROTOS "SILV TRAC09PICZ SWIFT\0" -#else - #define TR_IRPROTOS -#endif - -#if defined(CPUARM) - #define TR_XPPM -#else - #define TR_XPPM "PPM16\0""PPMsim" -#endif - -#define TR_VPROTOS "PPM\0 " TR_XPPM TR_PXX TR_DSM2 TR_IRPROTOS - -#define LEN_POSNEG "\003" -#define TR_POSNEG "POS""NEG" - -#define LEN_VCURVEFUNC "\003" -#define TR_VCURVEFUNC "---""x>0""x<0""|x|""f>0""f<0""|f|" - -#define LEN_VMLTPX "\010" -#define TR_VMLTPX "A\201adir ""Multipl.""Cambiar\0" - -#define LEN_VMLTPX2 "\002" -#define TR_VMLTPX2 "+=""*="":=" - -#define LEN_VMIXTRIMS "\003" -#define TR_VMIXTRIMS "OFF""ON\0""Dir""Ele""Ace""Ale" - -#define LEN_VCSWFUNC "\005" -#define TR_VCSWFUNC "---\0 ""a{x\0 ""a>x\0 ""ax""|a|b\0 ""a" - -#define LEN_VTELPROTO "\007" -#define TR_VTELPROTO "Nada\0 ""Hub\0 ""WSHHigh" - -#define LEN_VOLTSRC "\003" -#define TR_VOLTSRC "---""A1\0""A2\0""FAS""Cel" - -#define LEN_VARIOSRC "\005" -#if defined(FRSKY_SPORT) - #define TR_VARIOSRC "Vario""A1\0 ""A2\0" -#else - #define TR_VARIOSRC "Alti\0""Alti+""Vario""A1\0 ""A2\0" -#endif - -#define LEN_VSCREEN "\004" -#define TR_VSCREEN "Nums""Bars" - -#define LEN_GPSFORMAT "\004" -#define TR_GPSFORMAT "HMS NMEA" - -#define LEN2_VTEMPLATES 13 -#define LEN_VTEMPLATES "\015" -#define TR_VTEMPLATES "Elim Mezcla\0\0""Simple 4-CH \0""Anular Motor\0""Cola en V \0""Elevon\\Delta\0""eCCPM \0""Heli Setup \0""Servo Test \0" - -#define LEN_VSWASHTYPE "\004" -#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0" - -#define LEN_VKEYS "\005" -#define TR_VKEYS TR(" Menu""Salir""Abajo""Arrib""Dcha.""Izqd.", " Menu""Salir""Enter""Pgna.""Mas ""Menos") - -#define LEN_VRENCODERS "\003" -#define TR_VRENCODERS "REa""REb" - -#define LEN_VSWITCHES "\003" -#define LEN_VSRCRAW "\004" - -#if defined(PCBTARANIS) - #define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""LS\0 ""RS\0 " - #define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 " -#elif defined(EXTRA_3POS) - #define TR_POTS_VSRCRAW "P1\0 ""P2\0 " - #define TR_SW_VSRCRAW "3P1\0""3P2\0" - #define TR_9X_3POS_SWITCHES "ID0""ID1""ID2""ID3""ID4""ID5" -#else - #define TR_POTS_VSRCRAW "P1\0 ""P2\0 ""P3\0 " - #define TR_SW_VSRCRAW "3POS" - #define TR_9X_3POS_SWITCHES "ID0""ID1""ID2" -#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" -#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" -#else - #define TR_CUSTOMSW "CS1""CS2""CS3""CS4""CS5""CS6""CS7""CS8""CS9""CSA""CSB""CSC" -#endif - -#if defined(PCBTARANIS) - #define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_CUSTOMSW "Uno" -#else - #define TR_VSWITCHES TR_9X_3POS_SWITCHES "ACE""DIR""ELE""ALE""GEA""TRN" TR_CUSTOMSW "Uno" -#endif - -#if defined(PCBSKY9X) - #define TR_ROTARY_ENCODERS_VSRCRAW "REnc" -#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS > 2 - #define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd " -#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS <= 2 - #define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb " -#else - #define TR_ROTARY_ENCODERS_VSRCRAW -#endif - -#if defined(HELI) - #define TR_CYC_VSRCRAW "CYC1""CYC2""CYC3" -#else - #define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]" -#endif - -#define TR_VSRCRAW "---\0""Dir\0""Ele\0""Thr\0""Ale\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS_VSRCRAW "MAX\0" TR_CYC_VSRCRAW "TrmR" "TrmE" "TrmT" "TrmA" TR_SW_VSRCRAW - -#define LEN_VTMRMODES "\003" -#define TR_VTMRMODES "OFF""ABS""THs""TH%""THt" - -#define LEN_VTRAINERMODES "\006" -#define TR_VTRAINERMODES "Master""Esclav" - -#define LEN_VFAILSAFE "\011" -#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 " -#endif - -// ZERO TERMINATED STRINGS -#define INDENT "\001" -#define LEN_INDENT 1 -#define INDENT_WIDTH (FW/2) - -#if defined(PCBTARANIS) - #define TR_ENTER "[ENTER]" -#else - #define TR_ENTER "[MENU]" -#endif - -#define TR_POPUPS TR_ENTER "\010[SALIR]" -#define OFS_EXIT sizeof(TR_ENTER) - -#define TR_MENUWHENDONE CENTER "\006" TR_ENTER "AL ACABAR " -#define TR_FREE "libre" -#define TR_DELETEMODEL "BORRAR MODELO" -#define TR_COPYINGMODEL "Copiando modelo.." -#define TR_MOVINGMODEL "Mover modelo..." -#define TR_LOADINGMODEL "Cargar modelo..." -#define TR_NAME "Nom." -#define TR_MODELNAME "Nom.Modelo" -#define TR_PHASENAME "Nom.Fase " -#define TR_MIXNAME "Nom.Mezcla" -#define TR_EXPONAME "Nom. Expo" -#define TR_BITMAP "Imagen Modelo" -#define TR_TIMER TR("Reloj","Reloj ") -#define TR_ELIMITS TR("E.Limite","Ampliar Limites") -#define TR_ETRIMS TR("E.Trims","Ampliar Trims") -#define TR_TRIMINC "Paso Trim" -#define TR_TTRACE TR("Fuente-A","Fuente Acelerad") -#define TR_TTRIM TR("Trim-A","Trim Acelerad") -#define TR_BEEPCTR TR("Ctr Beep","Center Beep") -#define TR_PROTO TR(INDENT"Proto",INDENT"Protocol") -#define TR_PPMFRAME "Trama PPM" -#define TR_MS "ms" -#define TR_SWITCH "Interr" -#define TR_TRIMS "Trims" -#define TR_FADEIN "Inicio" -#define TR_FADEOUT "Final" -#define TR_DEFAULT "(defecto)" -#define TR_CHECKTRIMS CENTER "\006Check\012Trims" -#define OFS_CHECKTRIMS CENTER_OFS+(9*FW) -#define TR_SWASHTYPE "Tipo ciclico" -#define TR_COLLECTIVE TR("Colectivo","Fuente Colectivo") -#define TR_SWASHRING "Ciclico" -#define TR_ELEDIRECTION TR("ELE Direccion","Largo cyc. direccion") -#define TR_AILDIRECTION TR("AIL Direccion","Lateral cyc. direccion") -#define TR_COLDIRECTION TR("PIT Direccion","Coll. pitch direccion") -#define TR_MODE INDENT"Modo" -#define TR_NOFREEEXPO "No expo libre!" -#define TR_NOFREEMIXER "No mezcla lib!" -#define TR_INSERTMIX "INSERTAR MIX" -#define TR_EDITMIX "EDITAR MIX " -#define TR_SOURCE INDENT"Fuente" -#define TR_WEIGHT "Cantidad" -#define TR_EXPO TR("Expo","Exponencial") -#define TR_SIDE "Lado" -#define TR_DIFFERENTIAL "Diferenc" -#define TR_OFFSET INDENT"Offset" -#define TR_TRIM "Trim" -#define TR_DREX "DRex" -#define TR_CURVE "Curva" -#define TR_FLMODE TR("Modo","Modos") -#define TR_MIXWARNING "Aviso" -#define TR_OFF "OFF" -#define TR_MULTPX "Multpx" -#define TR_DELAYDOWN "Delay Dn" -#define TR_DELAYUP "Delay Up" -#define TR_SLOWDOWN "Slow Dn" -#define TR_SLOWUP "Slow Up" -#define TR_MIXER "Mezclas" -#define TR_CV "CV" -#define TR_GV "GV" -#define TR_ACHANNEL "A\004canal" -#define TR_RANGE INDENT"Alcance" -#define TR_BAR "Bar" -#define TR_ALARM INDENT"Alarma" -#define TR_USRDATA "UsrData" -#define TR_BLADES INDENT"Palas" -#define TR_SCREEN "Pantalla" -#define TR_SOUND_LABEL "Sonido" -#define TR_LENGTH INDENT"Longitud" -#define TR_SPKRPITCH INDENT"Tono" -#define TR_HAPTIC_LABEL "Tactil" -#define TR_HAPTICSTRENGTH INDENT"Intensidad" -#define TR_CONTRAST "Contraste" -#define TR_ALARMS_LABEL "Alarmas" -#define TR_BATTERY_RANGE TR("Rango bateria","Rango medidor Bater") -#define TR_BATTERYWARNING INDENT"Bateria Baja" -#define TR_INACTIVITYALARM INDENT"Inactividad" -#define TR_MEMORYWARNING INDENT"Memoria Baja" -#define TR_ALARMWARNING INDENT"Sin Sonido" -#define TR_RENAVIG "RotEnc Navig" -#define TR_THROTTLEREVERSE TR("Invert_Acel", "Invertir Acel.") -#define TR_MINUTEBEEP TR(INDENT"Minuto",INDENT"Cada Minuto") -#define TR_BEEPCOUNTDOWN INDENT"Cuentaatras" -#define TR_PERSISTENT TR(INDENT"Persist.",INDENT"Persistente") -#define TR_BACKLIGHT_LABEL "Luz Fondo" -#define TR_BLDELAY INDENT"Duracion" -#define TR_BLONBRIGHTNESS INDENT"MAS Brillo" -#define TR_BLOFFBRIGHTNESS INDENT"MENOS Brillo" -#define TR_SPLASHSCREEN "Ptalla.inicio" -#define TR_THROTTLEWARNING TR("Aviso-A", "Aviso Acelerador") -#define TR_SWITCHWARNING TR("Aviso-I", "Aviso Intrptor") -#define TR_TIMEZONE TR("Zona Hora", "GPS Zona Hora") -#define TR_RXCHANNELORD TR("Rx Orden canal", "Orden habitual canales") -#define TR_SLAVE "Esclavo" -#define TR_MODESRC "Modo\006% Fuente" -#define TR_MULTIPLIER "Multiplicar" -#define TR_CAL "Cal" -#define TR_VTRIM "Trim- +" -#define TR_BG "BG:" -#define TR_MENUTOSTART CENTER "\006" TR_ENTER "EMPEZAR" -#define TR_SETMIDPOINT CENTER "\003STICKS AL CENTRO" -#define TR_MOVESTICKSPOTS CENTER "\006MOVER STICKS/POTS" -#define TR_RXBATT "Rx Batt:" -#define TR_TXnRX "Tx:\0Rx:" -#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_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" - -#if defined(CPUARM) - #define TR_TMIXMAXMS "Tmix max\012ms" -#else - #define TR_TMIXMAXMS "Tmix max\014ms" -#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" -#define TR_MODEL "MODELO" -#define TR_FP "FM" -#define TR_MIX "MIX" -#define TR_EEPROMLOWMEM "EEPROM mem.baja" -#define TR_ALERT "\016ALERTA" -#define TR_PRESSANYKEYTOSKIP "Pulsar tecla omitir" -#define TR_THROTTLENOTIDLE "Aceler.Activado" -#define TR_ALARMSDISABLED "Alarmas Desact." -#define TR_PRESSANYKEY TR("\010Pulsa una Tecla", "Pulsa una Tecla") -#define TR_BADEEPROMDATA "Datos EEprom mal" -#define TR_EEPROMFORMATTING "Formateo EEPROM" -#define TR_EEPROMOVERFLOW "Desborde EEPROM" -#define TR_MENURADIOSETUP "CONFIGURACION" -#define TR_MENUDATEANDTIME "FECHA Y HORA" -#define TR_MENUTRAINER "APRENDIZ" -#define TR_MENUVERSION "VERSION" -#define TR_MENUDIAG TR("INTERUPTS", "TEST INTERUP.") -#define TR_MENUANA TR("ANAS", "ENTRADAS ANALOG") -#define TR_MENUCALIBRATION "CALIBRACION" -#define TR_TRIMS2OFFSETS "\006Trims => Offsets" -#define TR_MENUMODELSEL TR("MODELSEL", "SELECCION MODELO") -#define TR_MENUSETUP TR("CONF.", "CONF.MODELO") -#define TR_MENUFLIGHTPHASE "MODO VUELO" -#define TR_MENUFLIGHTPHASES "MODOS VUELO" -#define TR_MENUHELISETUP "CONF. HELI" - -#if defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_LIMITS_SYMETRICAL) // The right menu titles for the gurus ... - #define TR_MENUINPUTS "STICKS" - #define TR_MENULIMITS "SERVOS" -#else - #define TR_MENUINPUTS "DR/EXPO" - #define TR_MENULIMITS "LIMITES" -#endif - -#define TR_MENUCURVES "CURVAS" -#define TR_MENUCURVE "CURVA" -#define TR_MENUCUSTOMSWITCH "AJTE.INTERUP." -#define TR_MENUCUSTOMSWITCHES "AJTE.INTERUPTS." -#define TR_MENUCUSTOMFUNC "AJTE. FUNCIONES" -#define TR_MENUTELEMETRY "TELEMETRIA" -#define TR_MENUTEMPLATES "PLANTILLAS" -#define TR_MENUSTAT "STATS" -#define TR_MENUDEBUG "DEBUG" -#define TR_RXNUM TR("RxNum", INDENT"Receptor No.") -#define TR_SYNCMENU "Sync "TR_ENTER -#define TR_LIMIT INDENT"Limite" -#define TR_MINRSSI "Min Rssi" -#define TR_LATITUDE "Latitud" -#define TR_LONGITUDE "Longitud" -#define TR_GPSCOORD TR("GPS Coords", "GPS formato coordenadas") -#define TR_VARIO TR("Vario", "Variometro") -#define TR_SHUTDOWN "APAGANDO" -#define TR_BATT_CALIB "Calib.bateria" -#define TR_CURRENT_CALIB "Calib. actual" -#define TR_VOLTAGE INDENT"Voltaje" -#define TR_CURRENT INDENT"Actual" -#define TR_SELECT_MODEL "Selec Modelo" -#define TR_CREATE_MODEL "Crear Modelo" -#define TR_COPY_MODEL "Copiar Modelo" -#define TR_MOVE_MODEL "Mover Modelo" -#define TR_BACKUP_MODEL "Copia Sgdad Mod." -#define TR_DELETE_MODEL "Borrar Modelo" -#define TR_RESTORE_MODEL "Restaurar Modelo" -#define TR_SDCARD_ERROR "SDCARD Error" -#define TR_NO_SDCARD "No SDCARD" -#define TR_INCOMPATIBLE "Incompatible" -#define TR_WARNING "AVISO" -#define TR_EEPROMWARN "EEPROM" -#define TR_THROTTLEWARN "ACELERADOR" -#define TR_ALARMSWARN "ALARMAS" -#define TR_SWITCHWARN "INTERPTOR" -#define TR_INVERT_THR TR("Invertir Acel?", "Invertir Acel.?") -#define TR_SPEAKER_VOLUME INDENT "Volumen" -#define TR_LCD "LCD" -#define TR_BRIGHTNESS INDENT "Brillo" -#define TR_CPU_TEMP "CPU Temp.\016>" -#define TR_CPU_CURRENT "Actual\022>" -#define TR_CPU_MAH "Consumo" -#define TR_COPROC "CoProc." -#define TR_COPROC_TEMP "MB Temp. \016>" -#define TR_CAPAWARNING INDENT "Capacidad Baja" -#define TR_TEMPWARNING INDENT "Sobrecalent" -#define TR_FUNC "Func" -#define TR_V1 "V1" -#define TR_V2 "V2" -#define TR_DURATION "Duracion" -#define TR_DELAY "Atraso" -#define TR_SD_CARD "SD CARD" -#define TR_SDHC_CARD "SD-HC CARD" -#define TR_NO_SOUNDS_ON_SD "Sin sonidos en SD" -#define TR_NO_MODELS_ON_SD "Sin Modelos en SD" -#define TR_NO_BITMAPS_ON_SD "Sin imagenes en SD" -#define TR_PLAY_FILE "Play" -#define TR_DELETE_FILE "Borrar" -#define TR_COPY_FILE "Copiar" -#define TR_RENAME_FILE "Renombrar" -#define TR_ASSIGN_BITMAP "Asignar Imagen" -#define TR_REMOVED "Borrado" -#define TR_SD_INFO "Informacion" -#define TR_SD_FORMAT "Formatear" -#define TR_NA "N/A" -#define TR_HARDWARE "COMPONENTES" -#define TR_FORMATTING "Formateando.." -#define TR_TEMP_CALIB "Temp. Calib" -#define TR_TIME "Hora" -#define TR_BAUDRATE "BT Baudrate" -#define TR_SD_INFO_TITLE "SD INFO" -#define TR_SD_TYPE "Tipo:" -#define TR_SD_SPEED "Velocidad:" -#define TR_SD_SECTORS "Sectores:" -#define TR_SD_SIZE "Tamaño:" -#define TR_TYPE "Tipo" -#define TR_GLOBAL_VARS "Global Variables" -#define TR_GLOBAL_VAR "Global Variable" -#define TR_MENUGLOBALVARS "GLOBAL VARIABLES" -#define TR_OWN "Propio" -#define TR_DATE "Fecha" -#define TR_ROTARY_ENCODER "R.Encs" -#define TR_CHANNELS_MONITOR "MONITOR CANALES" -#define TR_INTERNALRF "Interna RF" -#define TR_EXTERNALRF "Externa RF" -#define TR_FAILSAFE INDENT"Modo sgdad." -#define TR_FAILSAFESET "AJUSTES SGDAD." -#define TR_COUNTRYCODE "Codigo Pais" -#define TR_VOICELANG "Idioma voces" -#define TR_UNITSSYSTEM "Unidades" -#define TR_EDIT "Editar" -#define TR_INSERT_BEFORE "Insertar antes" -#define TR_INSERT_AFTER "Insertar despues" -#define TR_COPY "Copiar" -#define TR_MOVE "Mover" -#define TR_PASTE "Pegar" -#define TR_DELETE "Borrar" -#define TR_INSERT "Insertar" -#define TR_RESET_FLIGHT "Reset Vuelo" -#define TR_RESET_TIMER1 "Reset Reloj1" -#define TR_RESET_TIMER2 "Reset Reloj2" -#define TR_RESET_TELEMETRY "Reset Telemetria" -#define TR_STATISTICS "Estadisticas" -#define TR_ABOUT_US "Nosotros" -#define TR_AND_SWITCH "AND Inter." -#define TR_CF "CF" -#define TR_SPEAKER INDENT"Altavoz" -#define TR_BUZZER INDENT"Zumbador" -#define TR_BYTES "bytes" -#define TR_MODULE_BIND "[Enlace]" -#define TR_MODULE_RANGE "[Limites]" -#define TR_RESET_BTN "[Reset]" -#define TR_SET "[Ajuste]" -#define TR_TRAINER "Aprendiz" -#define TR_ANTENNAPROBLEM CENTER "¡Problema antena TX!" -#define TR_MODELIDUSED TR("ID en uso", "ID modelo en uso") -#define TR_MODULE INDENT "Modulo" -#define TR_CHANNELRANGE INDENT "Gama de canales" -#define TR_LOWALARM INDENT "Alarma baja" -#define TR_CRITICALALARM INDENT "Alarma Critica" -#define TR_PERSISTENT_MAH INDENT "Valor mAh" -#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset") - -#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" -#endif - -// Taranis column headers -#define TR_PHASES_HEADERS { " Nombre ", " Interrup.", " Trims ", " Aparecer ", " Desparecer " } -#define TR_LIMITS_HEADERS { " Nombre ", " Compensacion", " Min ", " Max ", " Direccion ", " Curve ", " Centrado PPM ", " Simetrica " } -#define TR_CSW_HEADERS { " Funcion ", " V1 ", " V2 ", " AND Interrup. ", " Duracion ", " Retardo " } - -//Taranis About screen -#define TR_ABOUTUS "Nosotros" - -#define TR_ABOUT_OPENTX_1 "OpenTX es open source, no-" -#define TR_ABOUT_OPENTX_2 "comercial y viene sin " -#define TR_ABOUT_OPENTX_3 "garantias. Fue desarrollado" -#define TR_ABOUT_OPENTX_4 "libremente. Ayudas a traves" -#define TR_ABOUT_OPENTX_5 "de donaciones son bienvenidas!" - -#define TR_ABOUT_BERTRAND_1 "Bertrand Songis" -#define TR_ABOUT_BERTRAND_2 "Autor principal OpenTX" -#define TR_ABOUT_BERTRAND_3 "Companion9x codesarrollador" - -#define TR_ABOUT_MIKE_1 "Mike Blandford" -#define TR_ABOUT_MIKE_2 "Guru de codigo y drivers" -#define TR_ABOUT_MIKE_3 "Seguramente uno de los" -#define TR_ABOUT_MIKE_4 "mejores inspiradores" - -#define TR_ABOUT_ROMOLO_1 "Romolo Manfredini" -#define TR_ABOUT_ROMOLO_2 "Desarrollador principal" -#define TR_ABOUT_ROMOLO_3 "Companion9x" - -#define TR_ABOUT_ANDRE_1 "Andre Bernet" -#define TR_ABOUT_ANDRE_2 "Funcionalidad, usabilidad," -#define TR_ABOUT_ANDRE_3 "depurado, documentacion" - -#define TR_ABOUT_ROB_1 "Rob Thomson" -#define TR_ABOUT_ROB_2 "openrcforums webmaster" - -#define TR_ABOUT_MARTIN_1 "Martin Hotar" -#define TR_ABOUT_MARTIN_2 "Dise\201o grafico" - -#if defined(PCBTARANIS) - #define TR_ABOUT_HARDWARE_1 "FrSky" - #define TR_ABOUT_HARDWARE_2 "Productor dise\201o de hardware" - #define TR_ABOUT_HARDWARE_3 "Firmware contributor" -#else - #define TR_ABOUT_HARDWARE_1 "Brent Nelson" - #define TR_ABOUT_HARDWARE_2 "Sky9x dise\201ador/productor" - #define TR_ABOUT_HARDWARE_3 "" -#endif - -#define TR_ABOUT_PARENTS_1 "Padres del proyecto" -#define TR_ABOUT_PARENTS_2 "ersky9x (Mike Blandford)" -#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_BEEP_VOLUME "Volumen Beep" -#define TR_WAV_VOLUME "Volumen Wav" -#define TR_VARIO_VOLUME "Volumen Vario" -#define TR_BG_VOLUME "Volumen Bg" +/* + * Authors (alphabetical order) + * - Bertrand Songis + * - Bernet Andre + * - Jose Moreno + * - Kjell Kernen + * - 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/, + * and the original (and ongoing) project by + * Thomas Husterer, th9x: http://code.google.com/p/th9x/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * + * + * !!!!! DO NOT EDIT es.h - EDIT es.h.txt INSTEAD !!!!!!! + * + * In order to make translations easier es.h.txt is parsed and national + * characters are replaced by bitmap codes. The result is es.h. + * + * See translate.py in the util catalog for the list of character codes + * + * !!!!! 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 + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ + +// NON ZERO TERMINATED STRINGS +#define LEN_OFFON "\003" +#define TR_OFFON "OFF""ON\0" + +#define LEN_MMMINV "\003" +#define TR_MMMINV "---""INV" + +#define LEN_NCHANNELS "\004" +#define TR_NCHANNELS "\0014CH\0016CH\0018CH10CH12CH14CH16CH" + +#define LEN_VBEEPMODE "\005" +#define TR_VBEEPMODE "Mudo ""Alarm""NoKey""Todo " + +#define LEN_VBEEPLEN "\005" +#define TR_VBEEPLEN "0====""=0===""==0==""===0=""====0" + +#define LEN_VRENAVIG "\003" +#define TR_VRENAVIG "No REaREb" + +#define LEN_VBLMODE "\004" +#define TR_VBLMODE "OFF ""Keys""Stks""Both""ON\0" + +#define LEN_TRNMODE "\003" +#define TR_TRNMODE "OFF"" +="" :=" + +#define LEN_TRNCHN "\003" +#define TR_TRNCHN "CH1CH2CH3CH4" + +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "OFF\0 ""S-Port Mirror\0 ""Debug\0 " + +#define LEN_POTTYPES "\017" +#define TR_POTTYPES "Pot\0 ""Multipos Switch" + +#define LEN_DATETIME "\005" +#define TR_DATETIME "DATA:""HORA:" + +#define LEN_VLCD "\006" +#define TR_VLCD "NormalOptrex" + +#define LEN_COUNTRYCODES TR("\002", "\007") +#define TR_COUNTRYCODES TR("US""JP""EU", "America""Japon\0 ""Europa\0") + +#define LEN_VTRIMINC TR("\006", "\013") +#define TR_VTRIMINC TR("Expo ""ExFino""Fino ""Medio ""Grueso", "Exponencial""Extra Fino ""Fino ""Medio ""Grueso ") + +#define LEN_VBEEPCOUNTDOWN "\006" +#define TR_VBEEPCOUNTDOWN "SilentBeeps\0Voz\0" + +#define LEN_RETA123 "\001" + +#if defined(PCBGRUVIN9X) + #if ROTARY_ENCODERS > 2 + #define TR_RETA123 "RETA123abcd" + #else + #define TR_RETA123 "RETA123ab" + #endif +#elif defined(PCBTARANIS) + #define TR_RETA123 "RETA12LR" +#else + #define TR_RETA123 "RETA123" +#endif + +#define LEN_VPROTOS "\006" + +#if defined(PXX) + #define TR_PXX "PXX\0 " +#elif defined(DSM2) || defined(IRPROTOS) + #define TR_PXX "[PXX]\0" +#else + #define TR_PXX +#endif + +#if defined(DSM2) + #define TR_DSM2 "LP45\0 ""DSM2\0 ""DSMX\0 " +#elif defined(IRPROTOS) + #define TR_DSM2 "[LP45]""[DSM2]""[DSMX]" +#else + #define TR_DSM2 +#endif + +#if defined(IRPROTOS) + #define TR_IRPROTOS "SILV TRAC09PICZ SWIFT\0" +#else + #define TR_IRPROTOS +#endif + +#if defined(CPUARM) + #define TR_XPPM +#else + #define TR_XPPM "PPM16\0""PPMsim" +#endif + +#define TR_VPROTOS "PPM\0 " TR_XPPM TR_PXX TR_DSM2 TR_IRPROTOS + +#define LEN_POSNEG "\003" +#define TR_POSNEG "POS""NEG" + +#define LEN_VCURVEFUNC "\003" +#define TR_VCURVEFUNC "---""x>0""x<0""|x|""f>0""f<0""|f|" + +#define LEN_VMLTPX "\010" +#define TR_VMLTPX "A\201adir ""Multipl.""Cambiar\0" + +#define LEN_VMLTPX2 "\002" +#define TR_VMLTPX2 "+=""*="":=" + +#define LEN_VMIXTRIMS "\003" +#define TR_VMIXTRIMS "OFF""ON\0""Dir""Ele""Ace""Ale" + +#if defined(PCBTARANIS) + #define TR_CSWTIMER "Timer" + #define TR_CSWSTICKY "Stcky" + #define TR_CSWRANGE "Range" + #define TR_CSWSTAY "Edge\0" +#else + #define TR_CSWTIMER "Tim\0 " + #define TR_CSWSTICKY "Glue\0" + #if defined(CPUARM) + #define TR_CSWRANGE "Rnge\0" + #define TR_CSWSTAY "Edge\0" + #else + #define TR_CSWRANGE + #define TR_CSWSTAY + #endif +#endif + +#if defined(CPUARM) + #define TR_CSWEQUAL "a=x\0 " +#else + #define TR_CSWEQUAL +#endif + +#define LEN_VCSWFUNC "\005" +#if defined(CPUARM) +#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a{x\0 ""a>x\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""a" + +#define LEN_VTELPROTO "\007" +#define TR_VTELPROTO "Nada\0 ""Hub\0 ""WSHHigh" + +#define LEN_VOLTSRC "\003" +#define TR_VOLTSRC "---""A1\0""A2\0""FAS""Cel" + +#define LEN_VARIOSRC "\005" +#if defined(FRSKY_SPORT) + #define TR_VARIOSRC "Vario""A1\0 ""A2\0" +#else + #define TR_VARIOSRC "Alti\0""Alti+""Vario""A1\0 ""A2\0" +#endif + +#define LEN_VSCREEN "\004" +#define TR_VSCREEN "Nums""Bars" + +#define LEN_GPSFORMAT "\004" +#define TR_GPSFORMAT "HMS NMEA" + +#define LEN2_VTEMPLATES 13 +#define LEN_VTEMPLATES "\015" +#define TR_VTEMPLATES "Elim Mezcla\0\0""Simple 4-CH \0""Anular Motor\0""Cola en V \0""Elevon\\Delta\0""eCCPM \0""Heli Setup \0""Servo Test \0" + +#define LEN_VSWASHTYPE "\004" +#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0" + +#define LEN_VKEYS "\005" +#define TR_VKEYS TR("Menu\0""Salir""Abajo""Arrib""Dcha.""Izqd.", "Menu\0""Salir""Enter""Pgna.""Mas\0 ""Menos") + +#define LEN_VRENCODERS "\003" +#define TR_VRENCODERS "REa""REb" + +#define LEN_VSWITCHES "\003" +#define LEN_VSRCRAW "\004" + +#if defined(PCBTARANIS) + #define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""LS\0 ""RS\0 " + #define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 " +#elif defined(EXTRA_3POS) + #define TR_POTS_VSRCRAW "P1\0 ""P2\0 " + #define TR_SW_VSRCRAW "3P1\0""3P2\0" + #define TR_9X_3POS_SWITCHES "ID0""ID1""ID2""ID3""ID4""ID5" +#else + #define TR_POTS_VSRCRAW "P1\0 ""P2\0 ""P3\0 " + #define TR_SW_VSRCRAW "3POS" + #define TR_9X_3POS_SWITCHES "ID0""ID1""ID2" +#endif + +#if defined(CPUARM) + #define TR_LOGICALSW "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" +#elif defined(PCBGRUVIN9X) || defined(CPUM2561) || defined(CPUM128) + #define TR_LOGICALSW "CS1""CS2""CS3""CS4""CS5""CS6""CS7""CS8""CS9""CSA""CSB""CSC""CSD""CSE""CSF" +#else + #define TR_LOGICALSW "CS1""CS2""CS3""CS4""CS5""CS6""CS7""CS8""CS9""CSA""CSB""CSC" +#endif + +#define TR_TRIMS_SWITCHES "tRl""tRr""tEd""tEu""tTd""tTu""tAl""tAr" + +#if defined(PCBSKY9X) + #define TR_ROTARY_ENCODERS "REa\0" + #define TR_ROTENC_SWITCHES "REa" +#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560) + #define TR_ROTARY_ENCODERS "REa\0""REb\0" + #define TR_ROTENC_SWITCHES "REa""REb" +#else + #define TR_ROTARY_ENCODERS + #define TR_ROTENC_SWITCHES +#endif + +#if defined(PCBTARANIS) + #define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36" + #define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW +#elif defined(CPUARM) + #define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW +#else + #define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW +#endif + +#if defined(HELI) + #define TR_CYC_VSRCRAW "CYC1""CYC2""CYC3" +#else + #define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]" +#endif + +#define TR_VSRCRAW "---\0""Dir\0""Ele\0""Thr\0""Ale\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmR" "TrmE" "TrmT" "TrmA" TR_SW_VSRCRAW + +#define LEN_VTMRMODES "\003" +#define TR_VTMRMODES "OFF""ABS""THs""TH%""THt" + +#define LEN_VTRAINERMODES "\006" +#define TR_VTRAINERMODES "Master""Esclav" + +#define LEN_VFAILSAFE "\011" +#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 " +#endif + +// ZERO TERMINATED STRINGS +#define INDENT "\001" +#define LEN_INDENT 1 +#define INDENT_WIDTH (FW/2) + +#if defined(PCBTARANIS) + #define TR_ENTER "[ENTER]" +#else + #define TR_ENTER "[MENU]" +#endif + +#define TR_POPUPS TR_ENTER "\010[SALIR]" +#define OFS_EXIT sizeof(TR_ENTER) + +#define TR_MENUWHENDONE CENTER "\007" TR_ENTER " AL ACABAR " +#define TR_FREE "libre" +#define TR_DELETEMODEL "BORRAR MODELO" +#define TR_COPYINGMODEL "Copiando modelo.." +#define TR_MOVINGMODEL "Mover modelo..." +#define TR_LOADINGMODEL "Cargar modelo..." +#define TR_NAME "Nom." +#define TR_MODELNAME "Nom.Modelo" +#define TR_PHASENAME "Nom.Fase " +#define TR_MIXNAME "Nom.Mezcla" +#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") +#define TR_ETRIMS TR("E.Trims","Ampliar Trims") +#define TR_TRIMINC "Paso Trim" +#define TR_TTRACE TR("Fuente-A","Fuente Acelerad") +#define TR_TTRIM TR("Trim-A","Trim Acelerad") +#define TR_BEEPCTR TR("Ctr Beep","Center Beep") +#define TR_PROTO TR(INDENT"Proto",INDENT"Protocol") +#define TR_PPMFRAME "Trama PPM" +#define TR_MS "ms" +#define TR_SWITCH "Interr" +#define TR_TRIMS "Trims" +#define TR_FADEIN "Inicio" +#define TR_FADEOUT "Final" +#define TR_DEFAULT "(defecto)" +#define TR_CHECKTRIMS CENTER "\006Check\012Trims" +#define OFS_CHECKTRIMS CENTER_OFS+(9*FW) +#define TR_SWASHTYPE "Tipo ciclico" +#define TR_COLLECTIVE TR("Colectivo","Fuente Colectivo") +#define TR_SWASHRING "Ciclico" +#define TR_ELEDIRECTION TR("ELE Direccion","Largo cyc. direccion") +#define TR_AILDIRECTION TR("AIL Direccion","Lateral cyc. direccion") +#define TR_COLDIRECTION TR("PIT Direccion","Coll. pitch direccion") +#define TR_MODE INDENT"Modo" +#define TR_NOFREEEXPO "No expo libre!" +#define TR_NOFREEMIXER "No mezcla lib!" +#define TR_INSERTMIX "INSERTAR MIX" +#define TR_EDITMIX "EDITAR MIX " +#define TR_SOURCE INDENT"Fuente" +#define TR_WEIGHT "Cantidad" +#define TR_EXPO TR("Expo","Exponencial") +#define TR_SIDE "Lado" +#define TR_DIFFERENTIAL "Diferenc" +#define TR_OFFSET INDENT"Offset" +#define TR_TRIM "Trim" +#define TR_DREX "DRex" +#define TR_CURVE "Curva" +#define TR_FLMODE TR("Modo","Modos") +#define TR_MIXWARNING "Aviso" +#define TR_OFF "OFF" +#define TR_MULTPX "Multpx" +#define TR_DELAYDOWN "Delay Dn" +#define TR_DELAYUP "Delay Up" +#define TR_SLOWDOWN "Slow Dn" +#define TR_SLOWUP "Slow Up" +#define TR_MIXER "Mezclas" +#define TR_CV "CV" +#define TR_GV "GV" +#define TR_ACHANNEL "A\004canal" +#define TR_RANGE INDENT"Alcance" +#define TR_BAR "Bar" +#define TR_ALARM INDENT"Alarma" +#define TR_USRDATA "UsrData" +#define TR_BLADES INDENT"Palas" +#define TR_SCREEN "Pantalla" +#define TR_SOUND_LABEL "Sonido" +#define TR_LENGTH INDENT"Longitud" +#define TR_SPKRPITCH INDENT"Tono" +#define TR_HAPTIC_LABEL "Tactil" +#define TR_HAPTICSTRENGTH INDENT"Intensidad" +#define TR_CONTRAST "Contraste" +#define TR_ALARMS_LABEL "Alarmas" +#define TR_BATTERY_RANGE TR("Rango bateria","Rango medidor Bater") +#define TR_BATTERYWARNING INDENT"Bateria Baja" +#define TR_INACTIVITYALARM INDENT"Inactividad" +#define TR_MEMORYWARNING INDENT"Memoria Baja" +#define TR_ALARMWARNING INDENT"Sin Sonido" +#define TR_RENAVIG "RotEnc Navig" +#define TR_THROTTLEREVERSE TR("Invert_Acel", "Invertir Acel.") +#define TR_MINUTEBEEP TR(INDENT"Minuto",INDENT"Cada Minuto") +#define TR_BEEPCOUNTDOWN INDENT"Cuentaatras" +#define TR_PERSISTENT TR(INDENT"Persist.",INDENT"Persistente") +#define TR_BACKLIGHT_LABEL "Luz Fondo" +#define TR_BLDELAY INDENT"Duracion" +#define TR_BLONBRIGHTNESS INDENT"MAS Brillo" +#define TR_BLOFFBRIGHTNESS INDENT"MENOS Brillo" +#define TR_SPLASHSCREEN "Ptalla.inicio" +#define TR_THROTTLEWARNING TR("Aviso-A", "Aviso Acelerador") +#define TR_SWITCHWARNING TR("Aviso-I", "Aviso Intrptor") +#define TR_POTWARNING TR("Pot Warn.","Pot Warning") +#define TR_TIMEZONE TR("Zona Hora", "GPS Zona Hora") +#define TR_RXCHANNELORD TR("Rx Orden canal", "Orden habitual canales") +#define TR_SLAVE "Esclavo" +#define TR_MODESRC "Modo\006% Fuente" +#define TR_MULTIPLIER "Multiplicar" +#define TR_CAL "Cal" +#define TR_VTRIM "Trim- +" +#define TR_BG "BG:" +#define TR_MENUTOSTART CENTER "\010" TR_ENTER " EMPEZAR" +#define TR_SETMIDPOINT TR(CENTER "\007STICKS AL CENTRO",CENTER "\010STICKS AL CENTRO") +#define TR_MOVESTICKSPOTS CENTER "\006MOVER STICKS/POTS" +#define TR_RXBATT "Rx Batt:" +#define TR_TXnRX "Tx:\0Rx:" +#define OFS_RX 4 +#define TR_ACCEL "Acc:" +#define TR_NODATA CENTER "SIN DATOS" +#define TR_TOTTM1TM2THRTHP "\037\146TOT\036TM1\037\146TM2\036THR\037\146TH%" +#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\037\124ms" + #define TR_FREESTACKMINB "Pila LIbre\037\124b" +#endif + +#define TR_MENUTORESET CENTER TR_ENTER "Resetear" +#define TR_PPM "PPM" +#define TR_CH "CH" +#define TR_MODEL "MODELO" +#define TR_FP "FM" +#define TR_MIX "MIX" +#define TR_EEPROMLOWMEM "EEPROM mem.baja" +#define TR_ALERT "\016ALERTA" +#define TR_PRESSANYKEYTOSKIP "Pulsar tecla omitir" +#define TR_THROTTLENOTIDLE "Aceler. Activado" +#define TR_ALARMSDISABLED "Alarmas Desact." +#define TR_PRESSANYKEY TR("\010Pulsa una Tecla", "Pulsa una Tecla") +#define TR_BADEEPROMDATA "Datos EEprom mal" +#define TR_EEPROMFORMATTING "Formateo EEPROM" +#define TR_EEPROMOVERFLOW "Desborde EEPROM" +#define TR_MENURADIOSETUP "CONFIGURACION" +#define TR_MENUDATEANDTIME "FECHA Y HORA" +#define TR_MENUTRAINER "APRENDIZ" +#define TR_MENUVERSION "VERSION" +#define TR_MENUDIAG TR("INTERUPTS", "TEST INTERUP.") +#define TR_MENUANA TR("ANAS", "ENTRADAS ANALOG") +#define TR_MENUCALIBRATION "CALIBRACION" +#define TR_TRIMS2OFFSETS "\006Trims => Offsets" +#define TR_MENUMODELSEL TR("MODELSEL", "SELECCION MODELO") +#define TR_MENUSETUP TR("CONF.", "CONF.MODELO") +#define TR_MENUFLIGHTPHASE "MODO VUELO" +#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" +#else + #define TR_MENUINPUTS "DR/EXPO" + #define TR_MENULIMITS "LIMITES" +#endif + +#define TR_MENUCURVES "CURVAS" +#define TR_MENUCURVE "CURVA" +#define TR_MENULOGICALSWITCH "AJTE.INTERUP." +#define TR_MENULOGICALSWITCHES "AJTE.INTERUPTS." +#define TR_MENUCUSTOMFUNC "AJTE. FUNCIONES" +#define TR_MENUTELEMETRY "TELEMETRIA" +#define TR_MENUTEMPLATES "PLANTILLAS" +#define TR_MENUSTAT "STATS" +#define TR_MENUDEBUG "DEBUG" +#define TR_RXNUM TR("RxNum", INDENT"Receptor No.") +#define TR_SYNCMENU "Sync "TR_ENTER +#define TR_LIMIT INDENT"Limite" +#define TR_MINRSSI "Min Rssi" +#define TR_LATITUDE "Latitud" +#define TR_LONGITUDE "Longitud" +#define TR_GPSCOORD TR("GPS Coords", "GPS formato coordenadas") +#define TR_VARIO TR("Vario", "Variometro") +#define TR_SHUTDOWN "APAGANDO" +#define TR_BATT_CALIB "Calib.bateria" +#define TR_CURRENT_CALIB "Calib. actual" +#define TR_VOLTAGE INDENT"Voltaje" +#define TR_CURRENT INDENT"Actual" +#define TR_SELECT_MODEL "Selec Modelo" +#define TR_CREATE_MODEL "Crear Modelo" +#define TR_COPY_MODEL "Copiar Modelo" +#define TR_MOVE_MODEL "Mover Modelo" +#define TR_BACKUP_MODEL "Copia Sgdad Mod." +#define TR_DELETE_MODEL "Borrar Modelo" +#define TR_RESTORE_MODEL "Restaurar Modelo" +#define TR_SDCARD_ERROR "SDCARD Error" +#define TR_NO_SDCARD "No SDCARD" +#define TR_INCOMPATIBLE "Incompatible" +#define TR_WARNING "AVISO" +#define TR_EEPROMWARN "EEPROM" +#define TR_THROTTLEWARN "ACELERADOR" +#define TR_ALARMSWARN "ALARMAS" +#define TR_SWITCHWARN "INTERPTOR" +#define TR_INVERT_THR TR("Invertir Acel?", "Invertir Acel.?") +#define TR_SPEAKER_VOLUME INDENT "Volumen" +#define TR_LCD "LCD" +#define TR_BRIGHTNESS INDENT "Brillo" +#define TR_CPU_TEMP "CPU Temp.\016>" +#define TR_CPU_CURRENT "Actual\022>" +#define TR_CPU_MAH "Consumo" +#define TR_COPROC "CoProc." +#define TR_COPROC_TEMP "MB Temp. \016>" +#define TR_CAPAWARNING INDENT "Capacidad Baja" +#define TR_TEMPWARNING INDENT "Sobrecalent" +#define TR_FUNC "Func" +#define TR_V1 "V1" +#define TR_V2 "V2" +#define TR_DURATION "Duracion" +#define TR_DELAY "Atraso" +#define TR_SD_CARD "SD CARD" +#define TR_SDHC_CARD "SD-HC CARD" +#define TR_NO_SOUNDS_ON_SD "Sin sonidos en SD" +#define TR_NO_MODELS_ON_SD "Sin Modelos en SD" +#define TR_NO_BITMAPS_ON_SD "Sin imagenes en SD" +#define TR_PLAY_FILE "Play" +#define TR_DELETE_FILE "Borrar" +#define TR_COPY_FILE "Copiar" +#define TR_RENAME_FILE "Renombrar" +#define TR_ASSIGN_BITMAP "Asignar Imagen" +#define TR_REMOVED "Borrado" +#define TR_SD_INFO "Informacion" +#define TR_SD_FORMAT "Formatear" +#define TR_NA "N/A" +#define TR_HARDWARE "COMPONENTES" +#define TR_FORMATTING "Formateando.." +#define TR_TEMP_CALIB "Temp. Calib" +#define TR_TIME "Hora" +#define TR_BAUDRATE "BT Baudrate" +#define TR_SD_INFO_TITLE "SD INFO" +#define TR_SD_TYPE "Tipo:" +#define TR_SD_SPEED "Velocidad:" +#define TR_SD_SECTORS "Sectores:" +#define TR_SD_SIZE "Tamaño:" +#define TR_TYPE "Tipo" +#define TR_GLOBAL_VARS "Global Variables" +#define TR_GLOBAL_V "GLOBAL V." +#define TR_GLOBAL_VAR "Global Variable" +#define TR_MENUGLOBALVARS "GLOBAL VARIABLES" +#define TR_OWN "Propio" +#define TR_DATE "Fecha" +#define TR_ROTARY_ENCODER "R.Encs" +#define TR_CHANNELS_MONITOR "MONITOR CANALES" +#define TR_INTERNALRF "Interna RF" +#define TR_EXTERNALRF "Externa RF" +#define TR_FAILSAFE INDENT"Modo sgdad." +#define TR_FAILSAFESET "AJUSTES SGDAD." +#define TR_COUNTRYCODE "Codigo Pais" +#define TR_VOICELANG "Idioma voces" +#define TR_UNITSSYSTEM "Unidades" +#define TR_EDIT "Editar" +#define TR_INSERT_BEFORE "Insertar antes" +#define TR_INSERT_AFTER "Insertar despues" +#define TR_COPY "Copiar" +#define TR_MOVE "Mover" +#define TR_PASTE "Pegar" +#define TR_DELETE "Borrar" +#define TR_INSERT "Insertar" +#define TR_RESET_FLIGHT "Reset Vuelo" +#define TR_RESET_TIMER1 "Reset Reloj1" +#define TR_RESET_TIMER2 "Reset Reloj2" +#define TR_RESET_TELEMETRY "Reset Telemetria" +#define TR_STATISTICS "Estadisticas" +#define TR_ABOUT_US "Nosotros" +#define TR_AND_SWITCH "AND Inter." +#define TR_CF "CF" +#define TR_SPEAKER INDENT"Altavoz" +#define TR_BUZZER INDENT"Zumbador" +#define TR_BYTES "bytes" +#define TR_MODULE_BIND "[Enlace]" +#define TR_MODULE_RANGE "[Limites]" +#define TR_RESET_BTN "[Reset]" +#define TR_SET "[Ajuste]" +#define TR_TRAINER "Aprendiz" +#define TR_ANTENNAPROBLEM CENTER "¡Problema antena TX!" +#define TR_MODELIDUSED TR("ID en uso", "ID modelo en uso") +#define TR_MODULE INDENT "Modulo" +#define TR_CHANNELRANGE INDENT "Gama de canales" +#define TR_LOWALARM INDENT "Alarma baja" +#define TR_CRITICALALARM INDENT "Alarma Critica" +#define TR_PERSISTENT_MAH INDENT "Valor mAh" +#define TR_CHECKLIST "Display Checklist" +#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" +#endif + +// Taranis column headers +#define TR_PHASES_HEADERS { " Nombre ", " Interrup.", " Trims ", " Aparecer ", " Desparecer " } +#define TR_LIMITS_HEADERS { " Nombre ", " Compensacion", " Min ", " Max ", " Direccion ", " Curve ", " Centrado PPM ", " Simetrica " } +#define TR_CSW_HEADERS { " Funcion ", " V1 ", " V2 ", " V2 ", " AND Interrup. ", " Duracion ", " Retardo " } + +//Taranis About screen +#define TR_ABOUTUS "Nosotros" + +#define TR_ABOUT_OPENTX_1 "OpenTX es open source, no-" +#define TR_ABOUT_OPENTX_2 "comercial y viene sin " +#define TR_ABOUT_OPENTX_3 "garantias. Fue desarrollado" +#define TR_ABOUT_OPENTX_4 "libremente. Ayudas a traves" +#define TR_ABOUT_OPENTX_5 "de donaciones son bienvenidas!" + +#define TR_ABOUT_BERTRAND_1 "Bertrand Songis" +#define TR_ABOUT_BERTRAND_2 "Autor principal OpenTX" +#define TR_ABOUT_BERTRAND_3 "Companion9x codesarrollador" + +#define TR_ABOUT_MIKE_1 "Mike Blandford" +#define TR_ABOUT_MIKE_2 "Guru de codigo y drivers" +#define TR_ABOUT_MIKE_3 "Seguramente uno de los" +#define TR_ABOUT_MIKE_4 "mejores inspiradores" + +#define TR_ABOUT_ROMOLO_1 "Romolo Manfredini" +#define TR_ABOUT_ROMOLO_2 "Desarrollador principal" +#define TR_ABOUT_ROMOLO_3 "Companion9x" + +#define TR_ABOUT_ANDRE_1 "Andre Bernet" +#define TR_ABOUT_ANDRE_2 "Funcionalidad, usabilidad," +#define TR_ABOUT_ANDRE_3 "depurado, documentacion" + +#define TR_ABOUT_ROB_1 "Rob Thomson" +#define TR_ABOUT_ROB_2 "openrcforums webmaster" + +#define TR_ABOUT_MARTIN_1 "Martin Hotar" +#define TR_ABOUT_MARTIN_2 "Dise\201o grafico" + +#if defined(PCBTARANIS) + #define TR_ABOUT_HARDWARE_1 "FrSky" + #define TR_ABOUT_HARDWARE_2 "Productor dise\201o de hardware" + #define TR_ABOUT_HARDWARE_3 "Firmware contributor" +#else + #define TR_ABOUT_HARDWARE_1 "Brent Nelson" + #define TR_ABOUT_HARDWARE_2 "Sky9x dise\201ador/productor" + #define TR_ABOUT_HARDWARE_3 "" +#endif + +#define TR_ABOUT_PARENTS_1 "Padres del proyecto" +#define TR_ABOUT_PARENTS_2 "ersky9x (Mike Blandford)" +#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_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/en.h b/radio/src/translations/fi.h.txt similarity index 73% rename from radio/src/translations/en.h rename to radio/src/translations/fi.h.txt index 62876daf9..fca9d388e 100644 --- a/radio/src/translations/en.h +++ b/radio/src/translations/fi.h.txt @@ -1,21 +1,10 @@ /* * Authors (alphabetical order) - * - Andre Bernet - * - Andreas Weitl * - Bertrand Songis - * - Bryan J. Rentoul (Gruvin) - * - Cameron Weeks - * - Erez Raviv - * - Gabriel Birkus - * - Jean-Pierre Parisy - * - Karl Szmutny - * - Michael Blandford - * - Michal Hlavinka - * - Pat Mackenzie - * - Philip Moss - * - Rob Thomson + * - Bernet Andre + * - Kjell Kernen + * - Martin Hotar * - Romolo Manfredini - * - Thomas Husterer * * opentx is based on code named * gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/, @@ -32,8 +21,25 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * + * + * + * + * !!!!! DO NOT EDIT fi.h - EDIT fi.h.txt INSTEAD !!!!!!! + * + * In order to make translations easier se.h.txt is parsed and national + * characters are replaced by bitmap codes. The result is se.h. + * + * See translate.py in the util catalog for the list of character codes + * + * !!!!! DO NOT EDIT fi.h - EDIT fi.h.txt INSTEAD !!!!!!! */ - + /* Formatting octal codes available in TR_ strings: + * \037\x -sets LCD x-coord (x value in octal) + * \036 -newline + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ + // NON ZERO TERMINATED STRINGS #define LEN_OFFON "\003" #define TR_OFFON "OFF""ON\0" @@ -62,6 +68,12 @@ #define LEN_TRNCHN "\003" #define TR_TRNCHN "CH1CH2CH3CH4" +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "OFF\0 ""S-Port Mirror\0 ""Debug\0 " + +#define LEN_POTTYPES "\017" +#define TR_POTTYPES "Pot\0 ""Multipos Switch" + #define LEN_DATETIME "\005" #define TR_DATETIME "DATE:""TIME:" @@ -71,8 +83,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" @@ -138,8 +150,35 @@ #define LEN_VMIXTRIMS "\003" #define TR_VMIXTRIMS "OFF""ON\0""Rud""Ele""Thr""Ail" +#if defined(PCBTARANIS) + #define TR_CSWTIMER "Timer" + #define TR_CSWSTICKY "Stcky" + #define TR_CSWRANGE "Range" + #define TR_CSWSTAY "Edge\0" +#else + #define TR_CSWTIMER "Tim\0 " + #define TR_CSWSTICKY "Glue\0" + #if defined(CPUARM) + #define TR_CSWRANGE "Rnge\0" + #define TR_CSWSTAY "Edge\0" + #else + #define TR_CSWRANGE + #define TR_CSWSTAY + #endif +#endif + +#if defined(CPUARM) + #define TR_CSWEQUAL "a=x\0 " +#else + #define TR_CSWEQUAL +#endif + #define LEN_VCSWFUNC "\005" -#define TR_VCSWFUNC "---\0 ""a{x\0 ""a>x\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""a 2 - #define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd " -#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS <= 2 - #define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb " -#else - #define TR_ROTARY_ENCODERS_VSRCRAW + #define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW #endif #if defined(HELI) @@ -343,7 +390,7 @@ #define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]" #endif -#define TR_VSRCRAW "---\0""Rud\0""Ele\0""Thr\0""Ail\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS_VSRCRAW "MAX\0" TR_CYC_VSRCRAW "TrmR" "TrmE" "TrmT" "TrmA" TR_SW_VSRCRAW +#define TR_VSRCRAW "---\0""Rud\0""Ele\0""Thr\0""Ail\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmR" "TrmE" "TrmT" "TrmA" TR_SW_VSRCRAW #define LEN_VTMRMODES "\003" #define TR_VTMRMODES "OFF""ABS""THs""TH%""THt" @@ -355,12 +402,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 @@ -387,19 +434,20 @@ #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 #define TR_EXPONAME "Expo Name" #endif #define TR_BITMAP "Model Image" -#define TR_TIMER TR("Timer","Timer ") -#define TR_ELIMITS TR("E.Limits","Extended Limits") -#define TR_ETRIMS TR("E.Trims","Extended Trims") +#define TR_TIMER TR("Timer", "Timer ") +#define TR_ELIMITS TR("E.Limits", "Extended Limits") +#define TR_ETRIMS TR("E.Trims", "Extended Trims") #define TR_TRIMINC "Trim Step" -#define TR_TTRACE TR("T-Source","Throttle Source") -#define TR_TTRIM TR("T-Trim","Throttle Trim") -#define TR_BEEPCTR TR("Ctr Beep","Center Beep") +#define TR_TTRACE TR("T-Source", "Throttle Source") +#define TR_TTRIM TR("T-Trim", "Throttle Trim") +#define TR_BEEPCTR TR("Ctr Beep", "Center Beep") #define TR_PROTO TR(INDENT "Proto", INDENT "Protocol") #define TR_PPMFRAME TR("PPM frame", INDENT "PPM frame") #define TR_MS "ms" @@ -472,6 +520,7 @@ #define TR_SPLASHSCREEN "Splash screen" #define TR_THROTTLEWARNING TR("T-Warning","Throttle Warning") #define TR_SWITCHWARNING TR("S-Warning","Switch Warning") +#define TR_POTWARNING TR("Pot Warn.","Pot Warning") #define TR_TIMEZONE TR("Time Zone","GPS Time zone") #define TR_RXCHANNELORD TR("Rx Channel Ord","Default channel order") #define TR_SLAVE "Slave" @@ -480,28 +529,26 @@ #define TR_CAL "Cal" #define TR_VTRIM "Trim- +" #define TR_BG "BG:" -#define TR_MENUTOSTART CENTER "\006" TR_ENTER " TO START" -#define TR_SETMIDPOINT TR(CENTER "\003SET STICKS MIDPOINT",CENTER "\003CENTER STICKS/SLIDERS") +#define TR_MENUTOSTART CENTER "\010" TR_ENTER " TO START" +#define TR_SETMIDPOINT TR(CENTER "\004SET STICKS MIDPOINT",CENTER "\004CENTER STICKS/SLIDERS") #define TR_MOVESTICKSPOTS CENTER "\006MOVE STICKS/POTS" #define TR_RXBATT "Rx Batt:" #define TR_TXnRX "Tx:\0Rx:" #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_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_TOTTM1TM2THRTHP "\037\146TOT\036TM1\037\146TM2\036THR\037\146TH%" +#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" @@ -510,15 +557,15 @@ #define TR_MODEL "MODEL" #define TR_FP "FM" #define TR_MIX "MIX" -#define TR_EEPROMLOWMEM "EEPROM low mem" +#define TR_EEPROMLOWMEM "FINSKA low mem" #define TR_ALERT "\016ALERT" #define TR_PRESSANYKEYTOSKIP "Press any key to skip" #define TR_THROTTLENOTIDLE "Throttle not idle" #define TR_ALARMSDISABLED "Alarms Disabled" #define TR_PRESSANYKEY TR("\010Press any Key", "Press any Key") -#define TR_BADEEPROMDATA "Bad EEprom Data" -#define TR_EEPROMFORMATTING "Formatting EEPROM" -#define TR_EEPROMOVERFLOW "EEPROM overflow" +#define TR_BADEEPROMDATA "Bad FINSKA Data" +#define TR_EEPROMFORMATTING "Formatting FINSKA" +#define TR_EEPROMOVERFLOW "FINSKA overflow" #define TR_MENURADIOSETUP "RADIO SETUP" #define TR_MENUDATEANDTIME "DATE AND TIME" #define TR_MENUTRAINER "TRAINER" @@ -546,8 +593,8 @@ #define TR_MENUCURVES "CURVES" #define TR_MENUCURVE "CURVE" -#define TR_MENUCUSTOMSWITCH "CUSTOM SWITCH" -#define TR_MENUCUSTOMSWITCHES "CUSTOM SWITCHES" +#define TR_MENULOGICALSWITCH "CUSTOM SWITCH" +#define TR_MENULOGICALSWITCHES "CUSTOM SWITCHES" #define TR_MENUCUSTOMFUNC "CUSTOM FUNCTIONS" #define TR_MENUTELEMETRY "TELEMETRY" #define TR_MENUTEMPLATES "TEMPLATES" @@ -577,10 +624,10 @@ #define TR_NO_SDCARD "No SDCARD" #define TR_INCOMPATIBLE "Incompatible" #define TR_WARNING "WARNING" -#define TR_EEPROMWARN "EEPROM" +#define TR_EEPROMWARN "FINSKA" #define TR_THROTTLEWARN "THROTTLE" #define TR_ALARMSWARN "ALARMS" -#define TR_SWITCHWARN "SWITCH" +#define TR_SWITCHWARN TR("SWITCH","CONTROL") #define TR_INVERT_THR TR("Invert Thr?","Invert Throttle?") #define TR_SPEAKER_VOLUME INDENT "Volume" #define TR_LCD "LCD" @@ -623,6 +670,7 @@ #define TR_SD_SIZE "Size:" #define TR_TYPE "Type" #define TR_GLOBAL_VARS "Global Variables" +#define TR_GLOBAL_V "GLOBAL V." #define TR_GLOBAL_VAR "Global Variable" #define TR_MENUGLOBALVARS "GLOBAL VARIABLES" #define TR_OWN "Own" @@ -667,39 +715,40 @@ #define TR_LOWALARM INDENT "Low Alarm" #define TR_CRITICALALARM INDENT "Critical Alarm" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" +#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_PHASES_HEADERS { " Name ", " Switch ", " Rudder Trim ", " Elevator Trim ", " Throttle Trim ", " Aileron Trim ", " Fade In ", " Fade Out " } #define TR_LIMITS_HEADERS { " Name ", " Subtrim ", " Min ", " Max ", " Direction ", " Curve ", " PPM Center ", " Subtrim mode " } -#define TR_CSW_HEADERS { " Function ", " V1 ", " V2 ", " AND Switch ", " Duration ", " Delay " } +#define TR_CSW_HEADERS { " Function ", " V1 ", " V2 ", " V2 ", " AND Switch ", " Duration ", " Delay " } // About screen #define TR_ABOUTUS TR(" ABOUT ", "ABOUT") @@ -752,6 +801,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" @@ -762,4 +812,3 @@ #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 652776e6e..d1762df32 100644 --- a/radio/src/translations/fr.h.txt +++ b/radio/src/translations/fr.h.txt @@ -1,750 +1,814 @@ -/* - * Authors (alphabetical order) - * - Bertrand Songis - * - Bernet Andre - * - Kjell Kernen - * - 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/, - * and the original (and ongoing) project by - * Thomas Husterer, th9x: http://code.google.com/p/th9x/ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * - * - * !!!!! DO NOT EDIT fr.h - EDIT fr.h.txt INSTEAD !!!!!!! - * - * In order to make translations easier fr.h.txt is parsed and national - * characters are replaced by bitmap codes. The result is fr.h. - * - * See translate.py in the util catalog for the list of character codes - * - * !!!!! DO NOT EDIT fr.h - EDIT fr.h.txt INSTEAD !!!!!!! - */ - - -// NON ZERO TERMINATED STRINGS -#define LEN_OFFON "\003" -#define TR_OFFON "OFF""ON\0" - -#define LEN_MMMINV "\003" -#define TR_MMMINV "---""INV" - -#define LEN_NCHANNELS "\004" -#define TR_NCHANNELS "\0014CH\0016CH\0018CH10CH12CH14CH16CH" - -#define LEN_VBEEPMODE "\005" -#define TR_VBEEPMODE "Aucun""Alarm""NoKey""Tout\0" - -#define LEN_VBEEPLEN "\005" -#define TR_VBEEPLEN "0====""=0===""==0==""===0=""====0" - -#define LEN_VRENAVIG "\003" -#define TR_VRENAVIG "NonREaREb" - -#define LEN_VBLMODE TR("\004","\011") -#define TR_VBLMODE TR("OFF\0""Btns""Ctrl""Tous""ON\0","OFF\0 ""Touches\0 ""Controles""Tous\0 ""ON\0 ") - -#define LEN_TRNMODE "\003" -#define TR_TRNMODE "OFF"" +="" :=" - -#define LEN_TRNCHN "\003" -#define TR_TRNCHN "CH1CH2CH3CH4" - -#define LEN_DATETIME "\005" -#define TR_DATETIME "DATE:""HEURE" - -#define LEN_VLCD "\006" -#define TR_VLCD "NormalOptrex" - -#define LEN_COUNTRYCODES TR("\002", "\006") -#define TR_COUNTRYCODES TR("US""JP""EU", "USA\0 ""Japon\0""Europe") - -#define LEN_VTRIMINC TR("\006","\013") -#define TR_VTRIMINC TR("Expo\0 ""ExFin\0""Fin\0 ""Moyen\0""Gros\0 ","Exponentiel""Extra Fin\0 ""Fin\0 ""Moyen\0 ""Grossier\0 ") - -#define LEN_VBEEPCOUNTDOWN "\006" -#define TR_VBEEPCOUNTDOWN "SilentBeeps\0Voice\0" - -#define LEN_RETA123 "\001" - -#if defined(PCBGRUVIN9X) - #if ROTARY_ENCODERS > 2 - #define TR_RETA123 "DPGA123abcd" - #else - #define TR_RETA123 "DPGA123ab" - #endif -#elif defined(PCBTARANIS) - #define TR_RETA123 "DPGA12LR" -#else - #define TR_RETA123 "DPGA123" -#endif - -#define LEN_VPROTOS "\006" - -#if defined(PXX) - #define TR_PXX "PXX\0 " -#elif defined(DSM2) || defined(IRPROTOS) - #define TR_PXX "[PXX]\0" -#else - #define TR_PXX -#endif - -#if defined(DSM2) - #define TR_DSM2 "LP45\0 ""DSM2\0 ""DSMX\0 " -#elif defined(IRPROTOS) - #define TR_DSM2 "[LP45]""[DSM2]""[DSMX]" -#else - #define TR_DSM2 -#endif - -#if defined(IRPROTOS) - #define TR_IRPROTOS "SILV TRAC09PICZ SWIFT\0" -#else - #define TR_IRPROTOS -#endif - -#if defined(CPUARM) - #define TR_XPPM -#else - #define TR_XPPM "PPM16\0""PPMsim" -#endif - -#define TR_VPROTOS "PPM\0 " TR_XPPM TR_PXX TR_DSM2 TR_IRPROTOS - -#define LEN_POSNEG "\003" -#define TR_POSNEG "POS""NEG" - -#define LEN_VCURVEFUNC "\003" -#define TR_VCURVEFUNC "---""x>0""x<0""|x|""f>0""f<0""|f|" - -#define LEN_VMLTPX TR("\010","\013") -#define TR_VMLTPX TR("Ajoute\0 ""Multipl.""Remplace","Additionner""Multiplier\0""Remplacer\0 ") - -#define LEN_VMLTPX2 "\002" -#define TR_VMLTPX2 "+=""*="":=" - -#define LEN_VMIXTRIMS "\003" -#define TR_VMIXTRIMS "OFF""ON\0""Dir""Prf""Gaz""Ail" - -#define LEN_VCSWFUNC "\005" -#define TR_VCSWFUNC "---\0 ""a{x\0 ""a>x\0 ""ax""|a|b\0 ""a" - -#define LEN_VTELPROTO "\007" -#define TR_VTELPROTO "Aucun ""Hub\0 ""WSHHigh""Halcyon" - -#define LEN_VOLTSRC "\003" -#define TR_VOLTSRC "---""A1\0""A2\0""FAS""Cel" - -#define LEN_VARIOSRC "\005" -#if defined(FRSKY_SPORT) - #define TR_VARIOSRC "Vario""A1\0 ""A2\0" -#else - #define TR_VARIOSRC "Alti\0""Alti+""Vario""A1\0 ""A2\0" -#endif - -#define LEN_VSCREEN TR("\004","\007") -#define TR_VSCREEN TR("Val.""Bars","Valeurs""Barres\0") - -#define LEN_GPSFORMAT "\004" -#define TR_GPSFORMAT "DMS\0NMEA" - -#define LEN2_VTEMPLATES 15 -#define LEN_VTEMPLATES "\017" -#define TR_VTEMPLATES "Suppr Mixages\0 ""4 Voies simple\0""Coupure Gaz\0 ""Empennage V\0 ""Elevon\\Delta\0 ""eCCPM\0 ""Conf. Hélico\0 ""Test Servo\0 " - -#define LEN_VSWASHTYPE "\004" -#define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90\0" - -#define LEN_VKEYS "\005" -#define TR_VKEYS TR(" Menu"" Exit"" Bas"" Haut""Droit""Gauch", " Menu"" Exit""Enter"" Page"" Plus""Minus") - -#define LEN_VRENCODERS "\003" -#define TR_VRENCODERS "REa""REb" - -#define LEN_VSWITCHES "\003" -#define LEN_VSRCRAW "\004" - -#if defined(PCBTARANIS) - #define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""LS\0 ""RS\0 " - #define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 " -#elif defined(EXTRA_3POS) - #define TR_POTS_VSRCRAW "P1\0 ""P2\0 " - #define TR_SW_VSRCRAW "3P1\0""3P2\0" - #define TR_9X_3POS_SWITCHES "ID0""ID1""ID2""ID3""ID4""ID5" -#else - #define TR_POTS_VSRCRAW "P1\0 ""P2\0 ""P3\0 " - #define TR_SW_VSRCRAW "3POS" - #define TR_9X_3POS_SWITCHES "ID0""ID1""ID2" -#endif - -#if defined(CPUARM) - #define TR_CUSTOMSW "IP1""IP2""IP3""IP4""IP5""IP6""IP7""IP8""IP9""IPA""IPB""IPC""IPD""IPE""IPF""IPG""IPH""IPI""IPJ""IPK""IPL""IPM""IPN""IPO""IPP""IPQ""IPR""IPS""IPT""IPU""IPV""IPW" -#elif defined(PCBGRUVIN9X) || defined(CPUM2561) || defined(CPUM128) - #define TR_CUSTOMSW "IP1""IP2""IP3""IP4""IP5""IP6""IP7""IP8""IP9""IPA""IPB""IPC""IPD""IPE""IPF" -#else - #define TR_CUSTOMSW "IP1""IP2""IP3""IP4""IP5""IP6""IP7""IP8""IP9""IPA""IPB""IPC" -#endif - -#if defined(PCBTARANIS) - #define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_CUSTOMSW "1*\0" -#else - #define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_CUSTOMSW "1*\0" -#endif - -#if defined(PCBSKY9X) - #define TR_ROTARY_ENCODERS_VSRCRAW "REnc" -#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS > 2 - #define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd " -#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS <= 2 - #define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb " -#else - #define TR_ROTARY_ENCODERS_VSRCRAW -#endif - -#if defined(HELI) -#define TR_CYC_VSRCRAW "CYC1""CYC2""CYC3" -#else -#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]" -#endif - -#define TR_VSRCRAW "---\0""Dir\0""Prf\0""Gaz\0""Ail\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS_VSRCRAW "MAX\0" TR_CYC_VSRCRAW "TrmD" "TrmP" "TrmG" "TrmA" TR_SW_VSRCRAW - -#define LEN_VTMRMODES "\003" -#define TR_VTMRMODES "OFF""ABS""GZs""GZ%""GZt" - -#define LEN_VTRAINERMODES "\006" -#define TR_VTRAINERMODES "Maître""Elève\0" - -#define LEN_VFAILSAFE "\011" -#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 " -#endif - -// ZERO TERMINATED STRINGS -#define INDENT "\001" -#define LEN_INDENT 1 -#define INDENT_WIDTH (FW/2) - -#if defined(PCBTARANIS) - #define TR_ENTER "[ENTER]" -#else - #define TR_ENTER "[MENU]" -#endif - -#define TR_POPUPS TR_ENTER"\010[EXIT]" -#define OFS_EXIT sizeof(TR_ENTER) - -#define TR_MENUWHENDONE CENTER"\006"TR_ENTER" QUAND PRET" -#define TR_FREE "disp" -#define TR_DELETEMODEL "SUPPRIMER MODELE" -#define TR_COPYINGMODEL "Copie..." -#define TR_MOVINGMODEL "Déplacement..." -#define TR_LOADINGMODEL "Chargement..." -#define TR_NAME "Nom" -#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_BITMAP "Image du modèle" -#define TR_TIMER "Chrono " -#define TR_ELIMITS TR("Limites ét","Limites étendues") -#define TR_ETRIMS TR("Trims ét.","Trims étendus") -#define TR_TRIMINC TR("Pas Trim","Pas des trims") -#define TR_TTRACE "Source gaz" -#define TR_TTRIM "Trim gaz" -#define TR_BEEPCTR TR("Bips centr","Bips centrage") -#define TR_PROTO TR(INDENT"Proto.",INDENT"Protocole") -#define TR_PPMFRAME INDENT"Trame PPM" -#define TR_MS "ms" -#define TR_SWITCH TR("Inter","Interrupteur") -#define TR_TRIMS "Trims" -#define TR_FADEIN "Fondu ON" -#define TR_FADEOUT "Fondu OFF" -#define TR_DEFAULT "(défaut)" -#define TR_CHECKTRIMS "\006Vérif\012Trims" -#define OFS_CHECKTRIMS (9*FW) -#define TR_SWASHTYPE TR("Type de Plat.","Type de plateau") -#define TR_COLLECTIVE TR("Collectif","Voie du pas collectif") -#define TR_SWASHRING TR("Limite Cycl.","Limite du cyclique") -#define TR_ELEDIRECTION TR("Inv. longitud.","Inversion longitudinal") -#define TR_AILDIRECTION TR("Inv. latéral","Inversion latéral") -#define TR_COLDIRECTION TR("Inv. collectif","Inversion collectif") -#define TR_MODE INDENT"Mode" -#define TR_NOFREEEXPO "Max expos atteint!" -#define TR_NOFREEMIXER "Max mixages atteint!" -#define TR_INSERTMIX "INSERER MIXAGE" -#define TR_EDITMIX "EDITER MIXAGE" -#define TR_SOURCE INDENT"Source" -#define TR_WEIGHT "Ratio" -#define TR_EXPO TR("Expo","Exponentiel") -#define TR_SIDE "Coté" -#define TR_DIFFERENTIAL "Différentiel" -#define TR_OFFSET INDENT"Décalage" -#define TR_TRIM "Trim" -#define TR_DREX "DRex" -#define TR_CURVE "Courbe" -#define TR_FLMODE TR("Phase","Phases") -#define TR_MIXWARNING "Alerte" -#define TR_OFF "OFF" -#define TR_MULTPX "Opération" -#define TR_DELAYDOWN "Retard bas" -#define TR_DELAYUP "Retard haut" -#define TR_SLOWDOWN "Ralenti bas" -#define TR_SLOWUP "Ralenti haut" -#define TR_MIXER "MIXEUR" -#define TR_CV "CB" -#define TR_GV "VG" -#define TR_ACHANNEL "A" -#define TR_RANGE INDENT"Plage" -#define TR_BAR "Barre" -#define TR_ALARM INDENT"Alarme" -#define TR_USRDATA "Données" -#define TR_BLADES INDENT"Pales" -#define TR_SCREEN "Ecran " -#define TR_SOUND_LABEL "Son" -#define TR_LENGTH INDENT"Durée" -#define TR_SPKRPITCH INDENT"Tonalité" -#define TR_HAPTIC_LABEL "Vibreur" -#define TR_HAPTICSTRENGTH INDENT"Force" -#define TR_CONTRAST "Contraste" -#define TR_ALARMS_LABEL "Alarmes" -#define TR_BATTERY_RANGE "Plage batterie" -#define TR_BATTERYWARNING TR(INDENT"Batterie",INDENT"Batterie faible") -#define TR_INACTIVITYALARM INDENT"Inactivité" -#define TR_MEMORYWARNING INDENT"Mémoire pleine" -#define TR_ALARMWARNING TR(INDENT"Silence",INDENT"Sons désactivés") -#define TR_RENAVIG "Navig EncRot" -#define TR_THROTTLEREVERSE TR("Inv. gaz","Inversion gaz") -#define TR_MINUTEBEEP TR(INDENT"Bip min.",INDENT"Annonces minutes") -#define TR_BEEPCOUNTDOWN TR(INDENT"Bip fin",INDENT"Compte à rebours") -#define TR_PERSISTENT TR(INDENT"Persist.",INDENT"Persistant") -#define TR_BACKLIGHT_LABEL "Rétroéclairage" -#define TR_BLDELAY INDENT"Durée" -#define TR_BLONBRIGHTNESS INDENT"Luminosité ON" -#define TR_BLOFFBRIGHTNESS INDENT"Luminosité OFF" -#define TR_SPLASHSCREEN "Logo d'accueil" -#define TR_THROTTLEWARNING "Alerte gaz" -#define TR_SWITCHWARNING TR("Alerte int","Alerte interrupt.") -#define TR_TIMEZONE "Fuseau horaire" -#define TR_RXCHANNELORD TR("Ordre voies RX","Ordre des voies préféré") -#define TR_SLAVE "Elève" -#define TR_MODESRC "Mode\006% Source" -#define TR_MULTIPLIER "Multiplieur" -#define TR_CAL "Cal" -#define TR_VTRIM "Trim- +" -#define TR_BG "BG:" -#define TR_MENUTOSTART CENTER"\006" TR_ENTER " POUR DEBUT" -#define TR_SETMIDPOINT CENTER"\010REGLER NEUTRES" -#define TR_MOVESTICKSPOTS CENTER"\004BOUGER STICKS/POTS" -#define TR_RXBATT "Batt.RX" -#define TR_TXnRX "Tx:\0Rx:" -#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_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" - -#if defined(CPUARM) - #define TR_TMIXMAXMS "Tmix max\012ms" -#else - #define TR_TMIXMAXMS "Tmix max\014ms" -#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" -#define TR_MODEL "MODELE" -#define TR_FP "PV" -#define TR_MIX "MIX" -#define TR_EEPROMLOWMEM "EEPROM pleine!" -#define TR_ALERT "\014ALERTE" -#define TR_PRESSANYKEYTOSKIP "Touche pour ignorer" -#define TR_THROTTLENOTIDLE "Gaz pas à zéro" -#define TR_ALARMSDISABLED "Alarmes Désactivées" -#define TR_PRESSANYKEY TR("Touche pour continuer","Touche pour continuer") -#define TR_BADEEPROMDATA "EEPROM corrompue" -#define TR_EEPROMFORMATTING "Formatage EEPROM" -#define TR_EEPROMOVERFLOW "Dépassement EEPROM" -#define TR_MENURADIOSETUP "CONFIG RADIO" -#define TR_MENUDATEANDTIME "DATE ET HEURE" -#define TR_MENUTRAINER "ECOLAGE" -#define TR_MENUVERSION "VERSION" -#define TR_MENUDIAG TR("INTERS","TEST INTERRUPTEURS") -#define TR_MENUANA TR("ANAS","ENTREES ANALOGIQUES") -#define TR_MENUCALIBRATION "CALIBRATION" -#define TR_TRIMS2OFFSETS "\006Trims => Offsets" -#define TR_MENUMODELSEL "MODELES" -#define TR_MENUSETUP TR("CONF. MODELE","CONFIGURATION") -#define TR_MENUFLIGHTPHASE "PHASE DE VOL" -#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 ... - #define TR_MENUINPUTS "MANCHES" - #define TR_MENULIMITS "SORTIES" -#else - #define TR_MENUINPUTS "DR/EXPO" - #define TR_MENULIMITS "LIMITES" -#endif - -#define TR_MENUCURVES "COURBES" -#define TR_MENUCURVE "COURBE" -#define TR_MENUCUSTOMSWITCH "INTER PERS." -#define TR_MENUCUSTOMSWITCHES "INTERS PERS." -#define TR_MENUCUSTOMFUNC TR("FONCTIONS SPEC.","FONCTIONS SPECIALES") -#define TR_MENUTELEMETRY "TELEMESURE" -#define TR_MENUTEMPLATES "GABARITS" -#define TR_MENUSTAT TR("STATS","STATISTIQUES") -#define TR_MENUDEBUG "DEBUG" -#define TR_RXNUM TR(INDENT"NumRx",INDENT"No. récepteur") -#define TR_SYNCMENU "Sync [MENU]" -#define TR_LIMIT INDENT"Limite" -#define TR_MINRSSI "RSSI Min." -#define TR_LATITUDE "Latitude" -#define TR_LONGITUDE "Longitude" -#define TR_GPSCOORD TR("Coordonnées","Coordonnées GPS") -#define TR_VARIO TR("Vario","Variomètre") -#define TR_SHUTDOWN "ARRET EN COURS" -#define TR_BATT_CALIB "Calib. Batterie" -#define TR_CURRENT_CALIB "Calib. Courant" -#define TR_VOLTAGE INDENT"Tension" -#define TR_CURRENT INDENT"Courant" -#define TR_SELECT_MODEL "Sélect. Modèle" -#define TR_CREATE_MODEL "Créer Modèle" -#define TR_COPY_MODEL "Copier Modèle" -#define TR_MOVE_MODEL "Déplacer Modèle" -#define TR_BACKUP_MODEL "Archiver Modèle" -#define TR_DELETE_MODEL "Supprimer Modèle" -#define TR_RESTORE_MODEL "Restaurer Modèle" -#define TR_SDCARD_ERROR "Erreur carte SD" -#define TR_NO_SDCARD "Pas de carte SD" -#define TR_INCOMPATIBLE "Incompatible" -#define TR_WARNING "ALERTE" -#define TR_EEPROMWARN "EEPROM" -#define TR_THROTTLEWARN "GAZ" -#define TR_ALARMSWARN "SON" -#define TR_SWITCHWARN "INTERS" -#define TR_INVERT_THR "Inverser Gaz?" -#define TR_SPEAKER_VOLUME INDENT "Volume" -#define TR_LCD "Afficheur" -#define TR_BRIGHTNESS INDENT "Luminosité" -#define TR_CPU_TEMP "Temp. CPU\016>" -#define TR_CPU_CURRENT "Courant\022>" -#define TR_CPU_MAH "Consomm." -#define TR_COPROC "CoProc." -#define TR_COPROC_TEMP "Temp. MB \016>" -#define TR_CAPAWARNING INDENT "Capacité Basse" -#define TR_TEMPWARNING INDENT "Surchauffe" -#define TR_FUNC TR("Fonc", "Fonction") -#define TR_V1 "V1" -#define TR_V2 "V2" -#define TR_DURATION "Durée" -#define TR_DELAY "Délai" -#define TR_SD_CARD "Carte SD" -#define TR_SDHC_CARD "Carte SD-HC" -#define TR_NO_SOUNDS_ON_SD "Aucun son sur SD" -#define TR_NO_MODELS_ON_SD "Aucun modèle SD" -#define TR_NO_BITMAPS_ON_SD "Aucun Bitmap SD" -#define TR_PLAY_FILE "Lire" -#define TR_DELETE_FILE "Supprimer" -#define TR_COPY_FILE "Copier" -#define TR_RENAME_FILE "Renommer" -#define TR_ASSIGN_BITMAP "Sélectionner image" -#define TR_REMOVED " supprimé" -#define TR_SD_INFO "Information" -#define TR_SD_FORMAT "Formater" -#define TR_NA "N/D" -#define TR_HARDWARE "MATERIEL" -#define TR_FORMATTING "Formatage..." -#define TR_TEMP_CALIB "Calib. temp" -#define TR_TIME "Heure" -#define TR_BAUDRATE "Baudrate BT" -#define TR_SD_INFO_TITLE "INFO SD" -#define TR_SD_TYPE "Type:" -#define TR_SD_SPEED "Vitesse:" -#define TR_SD_SECTORS "Secteurs:" -#define TR_SD_SIZE "Taille:" -#define TR_TYPE "Type" -#define TR_GLOBAL_VARS "Variables Globales" -#define TR_GLOBAL_VAR "Variable globale" -#define TR_MENUGLOBALVARS "VARIABLES GLOBALES" -#define TR_OWN "Pers" -#define TR_DATE "Date" -#define TR_ROTARY_ENCODER "Enc.Rot." -#define TR_CHANNELS_MONITOR "MONITEUR CANAUX" -#define TR_INTERNALRF "HF interne" -#define TR_EXTERNALRF "HF externe" -#define TR_FAILSAFE INDENT"Type failsafe" -#define TR_FAILSAFESET "REGLAGES FAILSAFE" -#define TR_COUNTRYCODE "Zone géo." -#define TR_VOICELANG TR("Langue voix","Langue annonces vocales") -#define TR_UNITSSYSTEM "Unités" -#define TR_EDIT "Editer" -#define TR_INSERT_BEFORE "Insérer avant" -#define TR_INSERT_AFTER "Insérer après" -#define TR_COPY "Copier" -#define TR_MOVE "Déplacer" -#define TR_PASTE "Coller" -#define TR_DELETE "Effacer" -#define TR_INSERT "Insérer" -#define TR_RESET_FLIGHT TR("Réinit. vol","Réinitialiser vol") -#define TR_RESET_TIMER1 TR("Réinit. Timer1","Réinitialiser Timer1") -#define TR_RESET_TIMER2 TR("Réinit. Timer2","Réinitialiser Timer2") -#define TR_RESET_TELEMETRY TR("Réinit. Télém.","Réinit. Télémesure") -#define TR_STATISTICS "Statistiques" -#define TR_ABOUT_US "A propos" -#define TR_AND_SWITCH "ET suppl." -#define TR_CF "FS" -#define TR_SPEAKER INDENT"Haut-p." -#define TR_BUZZER INDENT"Bipeur" -#define TR_BYTES "bytes" -#define TR_MODULE_BIND "[Bind]" -#define TR_MODULE_RANGE "[Port.]" -#define TR_RESET_BTN "[RAZ]" -#define TR_SET "[Déf.]" -#define TR_TRAINER "Ecolage" -#define TR_ANTENNAPROBLEM CENTER "Antenne radio défectueuse!" -#define TR_MODELIDUSED TR("ID déjà affecté","No de modèle déjà utilisé") -#define TR_MODULE INDENT "Type de module" -#define TR_CHANNELRANGE INDENT "Plage de canaux" -#define TR_LOWALARM INDENT "Alarme basse" -#define TR_CRITICALALARM INDENT "Alarme critique" -#define TR_PERSISTENT_MAH TR(INDENT "Enr. mAh",INDENT "Enregistrer mAh") - -#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" -#endif - -// Taranis column headers -#define TR_PHASES_HEADERS { " Nom ", " Inter ", " Trims ", " Fondu ON ", " Fondu OFF " } -#define TR_LIMITS_HEADERS { " Nom ", " Subtrim ", " Min ", " Max ", " Direction ", " Curve ", " Neutre PPM ", " Mode subtrim " } -#define TR_CSW_HEADERS { " Fonction ", " V1 ", " V2 ", " ET suppl. ", " Durée ", " Délai " } - -//Taranis About screen -#define TR_ABOUTUS TR(" A PROPOS ","A PROPOS") - -#define TR_ABOUT_OPENTX_1 TR("OpenTX\001est\001libre,\001non-","OpenTX est libre, non-") -#define TR_ABOUT_OPENTX_2 TR("commercial,\001et\001offert\001sans","commercial et n'offre aucune") -#define TR_ABOUT_OPENTX_3 TR("garantie.\001Il\001est\001développé","garantie. Il a été développé") -#define TR_ABOUT_OPENTX_4 TR("gratuitement.\001Donations","gratuitement. Vos donations") -#define TR_ABOUT_OPENTX_5 TR("bienvenues!","sont bienvenues!") - -#define TR_ABOUT_BERTRAND_1 "Bertrand Songis" -#define TR_ABOUT_BERTRAND_2 TR("Auteur\001principal\001d'openTx","Auteur principal d'openTx") -#define TR_ABOUT_BERTRAND_3 TR("Codéveloppeur\001de\001C9X","Codéveloppeur de Companion9x") - -#define TR_ABOUT_MIKE_1 "Mike Blandford" -#define TR_ABOUT_MIKE_2 "Maître du code et des" -#define TR_ABOUT_MIKE_3 "drivers" -#define TR_ABOUT_MIKE_4 "" - -#define TR_ABOUT_ROMOLO_1 "Romolo Manfredini" -#define TR_ABOUT_ROMOLO_2 "Développeur principal de" -#define TR_ABOUT_ROMOLO_3 "Companion9x" - -#define TR_ABOUT_ANDRE_1 "André Bernet" -#define TR_ABOUT_ANDRE_2 TR("Fonctionsé,\001usabilité,","Fonctionnalités, usabilité,") -#define TR_ABOUT_ANDRE_3 TR("débogage,\001documentation","débogage, documentation") - -#define TR_ABOUT_ROB_1 "Rob Thomson" -#define TR_ABOUT_ROB_2 "Webmaster d'openrcforums" - -#define TR_ABOUT_MARTIN_1 "Martin Hotar" -#define TR_ABOUT_MARTIN_2 "Design graphique" - -#if defined(PCBTARANIS) - #define TR_ABOUT_HARDWARE_1 "FrSky" - #define TR_ABOUT_HARDWARE_2 "Développeur/fabricant" - #define TR_ABOUT_HARDWARE_3 "du matériel" -#else - #define TR_ABOUT_HARDWARE_1 "Brent Nelson" - #define TR_ABOUT_HARDWARE_2 "Développeur/fabricant" - #define TR_ABOUT_HARDWARE_3 "de la carte Sky9x" -#endif - -#define TR_ABOUT_PARENTS_1 "Projets parents" -#define TR_ABOUT_PARENTS_2 "ersky9x (Mike Blandford)" -#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_BEEP_VOLUME "Beep Volume" -#define TR_WAV_VOLUME "Wav Volume" -#define TR_VARIO_VOLUME "Vario Volume" -#define TR_BG_VOLUME "Bg Volume" +/* + * Authors (alphabetical order) + * - Bertrand Songis + * - Bernet Andre + * - Kjell Kernen + * - 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/, + * and the original (and ongoing) project by + * Thomas Husterer, th9x: http://code.google.com/p/th9x/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * + * + * + * !!!!! DO NOT EDIT fr.h - EDIT fr.h.txt INSTEAD !!!!!!! + * + * In order to make translations easier fr.h.txt is parsed and national + * characters are replaced by bitmap codes. The result is fr.h. + * + * See translate.py in the util catalog for the list of character codes + * + * !!!!! 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 + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ + +// NON ZERO TERMINATED STRINGS +#define LEN_OFFON "\003" +#define TR_OFFON "OFF""ON\0" + +#define LEN_MMMINV "\003" +#define TR_MMMINV "---""INV" + +#define LEN_NCHANNELS "\004" +#define TR_NCHANNELS "\0014CH\0016CH\0018CH10CH12CH14CH16CH" + +#define LEN_VBEEPMODE "\005" +#define TR_VBEEPMODE "Aucun""Alarm""NoKey""Tout\0" + +#define LEN_VBEEPLEN "\005" +#define TR_VBEEPLEN "0====""=0===""==0==""===0=""====0" + +#define LEN_VRENAVIG "\003" +#define TR_VRENAVIG "NonREaREb" + +#define LEN_VBLMODE TR("\004","\011") +#define TR_VBLMODE TR("OFF\0""Btns""Ctrl""Tous""ON\0","OFF\0 ""Touches\0 ""Controles""Tous\0 ""ON\0 ") + +#define LEN_TRNMODE "\003" +#define TR_TRNMODE "OFF"" +="" :=" + +#define LEN_TRNCHN "\003" +#define TR_TRNCHN "CH1CH2CH3CH4" + +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "OFF\0 ""Recopie S-Port\0""Debug\0 " + +#define LEN_POTTYPES "\017" +#define TR_POTTYPES "Potentiomètre\0 ""Inter multi-pos" + +#define LEN_DATETIME "\005" +#define TR_DATETIME "DATE:""HEURE" + +#define LEN_VLCD "\006" +#define TR_VLCD "NormalOptrex" + +#define LEN_COUNTRYCODES TR("\002", "\006") +#define TR_COUNTRYCODES TR("US""JP""EU", "USA\0 ""Japon\0""Europe") + +#define LEN_VTRIMINC TR("\006","\013") +#define TR_VTRIMINC TR("Expo\0 ""ExFin\0""Fin\0 ""Moyen\0""Gros\0 ","Exponentiel""Extra Fin\0 ""Fin\0 ""Moyen\0 ""Grossier\0 ") + +#define LEN_VBEEPCOUNTDOWN "\006" +#define TR_VBEEPCOUNTDOWN "SilentBeeps\0Voice\0" + +#define LEN_RETA123 "\001" + +#if defined(PCBGRUVIN9X) + #if ROTARY_ENCODERS > 2 + #define TR_RETA123 "DPGA123abcd" + #else + #define TR_RETA123 "DPGA123ab" + #endif +#elif defined(PCBTARANIS) + #define TR_RETA123 "DPGA12LR" +#else + #define TR_RETA123 "DPGA123" +#endif + +#define LEN_VPROTOS "\006" + +#if defined(PXX) + #define TR_PXX "PXX\0 " +#elif defined(DSM2) || defined(IRPROTOS) + #define TR_PXX "[PXX]\0" +#else + #define TR_PXX +#endif + +#if defined(DSM2) + #define TR_DSM2 "LP45\0 ""DSM2\0 ""DSMX\0 " +#elif defined(IRPROTOS) + #define TR_DSM2 "[LP45]""[DSM2]""[DSMX]" +#else + #define TR_DSM2 +#endif + +#if defined(IRPROTOS) + #define TR_IRPROTOS "SILV TRAC09PICZ SWIFT\0" +#else + #define TR_IRPROTOS +#endif + +#if defined(CPUARM) + #define TR_XPPM +#else + #define TR_XPPM "PPM16\0""PPMsim" +#endif + +#define TR_VPROTOS "PPM\0 " TR_XPPM TR_PXX TR_DSM2 TR_IRPROTOS + +#define LEN_POSNEG "\003" +#define TR_POSNEG "POS""NEG" + +#define LEN_VCURVEFUNC "\003" +#define TR_VCURVEFUNC "---""x>0""x<0""|x|""f>0""f<0""|f|" + +#define LEN_VMLTPX TR("\010","\013") +#define TR_VMLTPX TR("Ajoute\0 ""Multipl.""Remplace","Additionner""Multiplier\0""Remplacer\0 ") + +#define LEN_VMLTPX2 "\002" +#define TR_VMLTPX2 "+=""*="":=" + +#define LEN_VMIXTRIMS "\003" +#define TR_VMIXTRIMS "OFF""ON\0""Dir""Prf""Gaz""Ail" + +#if defined(PCBTARANIS) + #define TR_CSWTIMER "Tempo" + #define TR_CSWSTICKY "Bist." + #define TR_CSWRANGE "Plage" + #define TR_CSWSTAY "Flanc" +#else + #define TR_CSWTIMER "Temp\0" + #define TR_CSWSTICKY "Bist\0" + #if defined(CPUARM) + #define TR_CSWRANGE "Zone\0" + #define TR_CSWSTAY "Flnc\0" + #else + #define TR_CSWRANGE + #define TR_CSWSTAY + #endif +#endif + +#if defined(CPUARM) + #define TR_CSWEQUAL "a=x\0 " +#else + #define TR_CSWEQUAL +#endif + +#define LEN_VCSWFUNC "\005" +#if defined(CPUARM) +#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a{x\0 ""a>x\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""a" + +#define LEN_VTELPROTO "\007" +#define TR_VTELPROTO "Aucun ""Hub\0 ""WSHHigh""Halcyon" + +#define LEN_VOLTSRC "\003" +#define TR_VOLTSRC "---""A1\0""A2\0""FAS""Cel" + +#define LEN_VARIOSRC "\005" +#if defined(FRSKY_SPORT) + #define TR_VARIOSRC "Vario""A1\0 ""A2\0" +#else + #define TR_VARIOSRC "Alti\0""Alti+""Vario""A1\0 ""A2\0" +#endif + +#define LEN_VSCREEN TR("\004","\007") +#define TR_VSCREEN TR("Val.""Bars","Valeurs""Barres\0") + +#define LEN_GPSFORMAT "\004" +#define TR_GPSFORMAT "DMS\0NMEA" + +#define LEN2_VTEMPLATES 15 +#define LEN_VTEMPLATES "\017" +#define TR_VTEMPLATES "Suppr Mixages\0 ""4 Voies simple\0""Coupure Gaz\0 ""Empennage V\0 ""Elevon\\Delta\0 ""eCCPM\0 ""Conf. Hélico\0 ""Test Servo\0 " + +#define LEN_VSWASHTYPE "\004" +#define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90\0" + +#define LEN_VKEYS "\005" +#define TR_VKEYS TR("Menu\0""Exit\0""Bas\0 ""Haut\0""Droit""Gauch", "Menu\0""Exit\0""Enter""Page\0""Plus\0""Minus") + +#define LEN_VRENCODERS "\003" +#define TR_VRENCODERS "REa""REb" + +#define LEN_VSWITCHES "\003" +#define LEN_VSRCRAW "\004" + +#if defined(PCBTARANIS) + #define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""LS\0 ""RS\0 " + #define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 " +#elif defined(EXTRA_3POS) + #define TR_POTS_VSRCRAW "P1\0 ""P2\0 " + #define TR_SW_VSRCRAW "3P1\0""3P2\0" + #define TR_9X_3POS_SWITCHES "ID0""ID1""ID2""ID3""ID4""ID5" +#else + #define TR_POTS_VSRCRAW "P1\0 ""P2\0 ""P3\0 " + #define TR_SW_VSRCRAW "3POS" + #define TR_9X_3POS_SWITCHES "ID0""ID1""ID2" +#endif + +#if defined(CPUARM) + #define TR_LOGICALSW "IL1""IL2""IL3""IL4""IL5""IL6""IL7""IL8""IL9""ILA""ILB""ILC""ILD""ILE""ILF""ILG""ILH""ILI""ILJ""ILK""ILL""ILM""ILN""ILO""ILP""ILQ""ILR""ILS""ILT""ILU""ILV""ILW" +#elif defined(PCBGRUVIN9X) || defined(CPUM2561) || defined(CPUM128) + #define TR_LOGICALSW "IL1""IL2""IL3""IL4""IL5""IL6""IL7""IL8""IL9""ILA""ILB""ILC""ILD""ILE""ILF" +#else + #define TR_LOGICALSW "IL1""IL2""IL3""IL4""IL5""IL6""IL7""IL8""IL9""ILA""ILB""ILC" +#endif + +#define TR_TRIMS_SWITCHES "tDg""tDd""tPb""tPh""tGb""tGh""tAg""tAd" + +#if defined(PCBSKY9X) + #define TR_ROTARY_ENCODERS "REa\0" + #define TR_ROTENC_SWITCHES "REa" +#elif defined(PCBGRUVIN9X) || defined(PCBMEGA2560) + #define TR_ROTARY_ENCODERS "REa\0""REb\0" + #define TR_ROTENC_SWITCHES "REa""REb" +#else + #define TR_ROTARY_ENCODERS + #define TR_ROTENC_SWITCHES +#endif + +#if defined(PCBTARANIS) + #define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36" + #define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW +#elif defined(CPUARM) + #define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW +#else + #define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW +#endif + +#if defined(HELI) +#define TR_CYC_VSRCRAW "CYC1""CYC2""CYC3" +#else +#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]" +#endif + +#define TR_VSRCRAW "---\0""Dir\0""Prf\0""Gaz\0""Ail\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmD" "TrmP" "TrmG" "TrmA" TR_SW_VSRCRAW + +#define LEN_VTMRMODES "\003" +#define TR_VTMRMODES "OFF""ABS""GZs""GZ%""GZt" + +#define LEN_VTRAINERMODES "\006" +#define TR_VTRAINERMODES "Maître""Elève\0" + +#define LEN_VFAILSAFE "\011" +#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 " +#endif + +// ZERO TERMINATED STRINGS +#define INDENT "\001" +#define LEN_INDENT 1 +#define INDENT_WIDTH (FW/2) + +#if defined(PCBTARANIS) + #define TR_ENTER "[ENTER]" +#else + #define TR_ENTER "[MENU]" +#endif + +#define TR_POPUPS TR_ENTER"\010[EXIT]" +#define OFS_EXIT sizeof(TR_ENTER) + +#define TR_MENUWHENDONE CENTER"\006"TR_ENTER" QUAND PRET" +#define TR_FREE "disp" +#define TR_DELETEMODEL "SUPPRIMER MODELE" +#define TR_COPYINGMODEL "Copie..." +#define TR_MOVINGMODEL "Déplacement..." +#define TR_LOADINGMODEL "Chargement..." +#define TR_NAME "Nom" +#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_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") +#define TR_ETRIMS TR("Trims ét.","Trims étendus") +#define TR_TRIMINC TR("Pas Trim","Pas des trims") +#define TR_TTRACE "Source gaz" +#define TR_TTRIM "Trim gaz" +#define TR_BEEPCTR TR("Bips centr","Bips centrage") +#define TR_PROTO TR(INDENT"Proto.",INDENT"Protocole") +#define TR_PPMFRAME INDENT"Trame PPM" +#define TR_MS "ms" +#define TR_SWITCH TR("Inter","Interrupteur") +#define TR_TRIMS "Trims" +#define TR_FADEIN "Fondu ON" +#define TR_FADEOUT "Fondu OFF" +#define TR_DEFAULT "(défaut)" +#define TR_CHECKTRIMS "\006Vérif\012Trims" +#define OFS_CHECKTRIMS (9*FW) +#define TR_SWASHTYPE TR("Type de Plat.","Type de plateau") +#define TR_COLLECTIVE TR("Collectif","Voie du pas collectif") +#define TR_SWASHRING TR("Limite Cycl.","Limite du cyclique") +#define TR_ELEDIRECTION TR("Inv. longitud.","Inversion longitudinal") +#define TR_AILDIRECTION TR("Inv. latéral","Inversion latéral") +#define TR_COLDIRECTION TR("Inv. collectif","Inversion collectif") +#define TR_MODE INDENT"Mode" +#define TR_NOFREEEXPO "Max expos atteint!" +#define TR_NOFREEMIXER "Max mixages atteint!" +#define TR_INSERTMIX "INSERER MIXAGE" +#define TR_EDITMIX "EDITER MIXAGE" +#define TR_SOURCE INDENT"Source" +#define TR_WEIGHT "Ratio" +#define TR_EXPO TR("Expo","Exponentiel") +#define TR_SIDE "Coté" +#define TR_DIFFERENTIAL "Différentiel" +#define TR_OFFSET INDENT"Décalage" +#define TR_TRIM "Trim" +#define TR_DREX "DRex" +#define TR_CURVE "Courbe" +#define TR_FLMODE TR("Phase","Phases") +#define TR_MIXWARNING "Alerte" +#define TR_OFF "OFF" +#define TR_MULTPX "Opération" +#define TR_DELAYDOWN "Retard bas" +#define TR_DELAYUP "Retard haut" +#define TR_SLOWDOWN "Ralenti bas" +#define TR_SLOWUP "Ralenti haut" +#define TR_MIXER "MIXEUR" +#define TR_CV "CB" +#define TR_GV "VG" +#define TR_ACHANNEL "A" +#define TR_RANGE INDENT"Plage" +#define TR_BAR "Barre" +#define TR_ALARM INDENT"Alarme" +#define TR_USRDATA "Données" +#define TR_BLADES INDENT"Pales" +#define TR_SCREEN "Ecran " +#define TR_SOUND_LABEL "Son" +#define TR_LENGTH INDENT"Durée" +#define TR_SPKRPITCH INDENT"Tonalité" +#define TR_HAPTIC_LABEL "Vibreur" +#define TR_HAPTICSTRENGTH INDENT"Force" +#define TR_CONTRAST "Contraste" +#define TR_ALARMS_LABEL "Alarmes" +#define TR_BATTERY_RANGE "Plage batterie" +#define TR_BATTERYWARNING TR(INDENT"Batterie",INDENT"Batterie faible") +#define TR_INACTIVITYALARM INDENT"Inactivité" +#define TR_MEMORYWARNING INDENT"Mémoire pleine" +#define TR_ALARMWARNING TR(INDENT"Silence",INDENT"Sons désactivés") +#define TR_RENAVIG "Navig EncRot" +#define TR_THROTTLEREVERSE TR("Inv. gaz","Inversion gaz") +#define TR_MINUTEBEEP TR(INDENT"Bip min.",INDENT"Annonces minutes") +#define TR_BEEPCOUNTDOWN TR(INDENT"Bip fin",INDENT"Compte à rebours") +#define TR_PERSISTENT TR(INDENT"Persist.",INDENT"Persistant") +#define TR_BACKLIGHT_LABEL "Rétroéclairage" +#define TR_BLDELAY INDENT"Durée" +#define TR_BLONBRIGHTNESS INDENT"Luminosité ON" +#define TR_BLOFFBRIGHTNESS INDENT"Luminosité OFF" +#define TR_SPLASHSCREEN "Logo d'accueil" +#define TR_THROTTLEWARNING "Alerte gaz" +#define TR_SWITCHWARNING TR("Alerte int","Alerte interrupt.") +#define TR_POTWARNING TR("Alerte pot","Alerte potentiom.") +#define TR_TIMEZONE "Fuseau horaire" +#define TR_RXCHANNELORD TR("Ordre voies RX","Ordre des voies préféré") +#define TR_SLAVE "Elève" +#define TR_MODESRC "Mode\006% Source" +#define TR_MULTIPLIER "Multiplieur" +#define TR_CAL "Cal" +#define TR_VTRIM "Trim- +" +#define TR_BG "BG:" +#define TR_MENUTOSTART CENTER"\006" TR_ENTER " POUR DEBUT" +#define TR_SETMIDPOINT CENTER"\010REGLER NEUTRES" +#define TR_MOVESTICKSPOTS CENTER"\004BOUGER STICKS/POTS" +#define TR_RXBATT "Batt.RX" +#define TR_TXnRX "Tx:\0Rx:" +#define OFS_RX 4 +#define TR_ACCEL "Acc:" +#define TR_NODATA "NO DATA" +#define TR_TOTTM1TM2THRTHP "\037\146TOT\036TM1\037\146TM2\036THR\037\146TH%" +#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\037\124ms" + #define TR_FREESTACKMINB "Free Stack\037\124b" +#endif + +#define TR_MENUTORESET CENTER TR_ENTER" pour reset" +#define TR_PPM "PPM" +#define TR_CH "CH" +#define TR_MODEL "MODELE" +#define TR_FP "PV" +#define TR_MIX "MIX" +#define TR_EEPROMLOWMEM "EEPROM pleine!" +#define TR_ALERT "\014ALERTE" +#define TR_PRESSANYKEYTOSKIP "Touche pour ignorer" +#define TR_THROTTLENOTIDLE "Gaz pas à zéro" +#define TR_ALARMSDISABLED "Alarmes Désactivées" +#define TR_PRESSANYKEY TR("Touche pour continuer","Touche pour continuer") +#define TR_BADEEPROMDATA "EEPROM corrompue" +#define TR_EEPROMFORMATTING "Formatage EEPROM" +#define TR_EEPROMOVERFLOW "Dépassement EEPROM" +#define TR_MENURADIOSETUP "CONFIG RADIO" +#define TR_MENUDATEANDTIME "DATE ET HEURE" +#define TR_MENUTRAINER "ECOLAGE" +#define TR_MENUVERSION "VERSION" +#define TR_MENUDIAG TR("INTERS","TEST INTERRUPTEURS") +#define TR_MENUANA TR("ANAS","ENTREES ANALOGIQUES") +#define TR_MENUCALIBRATION "CALIBRATION" +#define TR_TRIMS2OFFSETS "\006Trims => Offsets" +#define TR_MENUMODELSEL "MODELES" +#define TR_MENUSETUP TR("CONF. MODELE","CONFIGURATION") +#define TR_MENUFLIGHTPHASE "PHASE DE VOL" +#define TR_MENUFLIGHTPHASES "PHASES DE VOL" +#define TR_MENUHELISETUP TR("CONF.HELI","CONFIGURATION HELICO") + +#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 + #define TR_MENUINPUTS "DR/EXPO" + #define TR_MENULIMITS "LIMITES" +#endif + +#define TR_MENUCURVES "COURBES" +#define TR_MENUCURVE "COURBE" +#define TR_MENULOGICALSWITCH "INTER LOG." +#define TR_MENULOGICALSWITCHES TR("INTERS LOG.","INTERS LOGIQUES") +#define TR_MENUCUSTOMFUNC TR("FONCTIONS SPEC.","FONCTIONS SPECIALES") +#define TR_MENUTELEMETRY "TELEMESURE" +#define TR_MENUTEMPLATES "GABARITS" +#define TR_MENUSTAT TR("STATS","STATISTIQUES") +#define TR_MENUDEBUG "DEBUG" +#define TR_RXNUM TR(INDENT"NumRx",INDENT"No. récepteur") +#define TR_SYNCMENU "Sync [MENU]" +#define TR_LIMIT INDENT"Limite" +#define TR_MINRSSI "RSSI Min." +#define TR_LATITUDE "Latitude" +#define TR_LONGITUDE "Longitude" +#define TR_GPSCOORD TR("Coordonnées","Coordonnées GPS") +#define TR_VARIO TR("Vario","Variomètre") +#define TR_SHUTDOWN "ARRET EN COURS" +#define TR_BATT_CALIB "Calib. Batterie" +#define TR_CURRENT_CALIB "Calib. Courant" +#define TR_VOLTAGE INDENT"Tension" +#define TR_CURRENT INDENT"Courant" +#define TR_SELECT_MODEL "Sélect. Modèle" +#define TR_CREATE_MODEL "Créer Modèle" +#define TR_COPY_MODEL "Copier Modèle" +#define TR_MOVE_MODEL "Déplacer Modèle" +#define TR_BACKUP_MODEL "Archiver Modèle" +#define TR_DELETE_MODEL "Supprimer Modèle" +#define TR_RESTORE_MODEL "Restaurer Modèle" +#define TR_SDCARD_ERROR "Erreur carte SD" +#define TR_NO_SDCARD "Pas de carte SD" +#define TR_INCOMPATIBLE "Incompatible" +#define TR_WARNING "ALERTE" +#define TR_EEPROMWARN "EEPROM" +#define TR_THROTTLEWARN "GAZ" +#define TR_ALARMSWARN "SON" +#define TR_SWITCHWARN TR("INTERS","CONTROLES") +#define TR_INVERT_THR "Inverser Gaz?" +#define TR_SPEAKER_VOLUME INDENT "Volume" +#define TR_LCD "Afficheur" +#define TR_BRIGHTNESS INDENT "Luminosité" +#define TR_CPU_TEMP "Temp. CPU\016>" +#define TR_CPU_CURRENT "Courant\022>" +#define TR_CPU_MAH "Consomm." +#define TR_COPROC "CoProc." +#define TR_COPROC_TEMP "Temp. MB \016>" +#define TR_CAPAWARNING INDENT "Capacité Basse" +#define TR_TEMPWARNING INDENT "Surchauffe" +#define TR_FUNC TR("Fonc", "Fonction") +#define TR_V1 "V1" +#define TR_V2 "V2" +#define TR_DURATION "Durée" +#define TR_DELAY "Délai" +#define TR_SD_CARD "Carte SD" +#define TR_SDHC_CARD "Carte SD-HC" +#define TR_NO_SOUNDS_ON_SD "Aucun son sur SD" +#define TR_NO_MODELS_ON_SD "Aucun modèle SD" +#define TR_NO_BITMAPS_ON_SD "Aucun Bitmap SD" +#define TR_PLAY_FILE "Lire" +#define TR_DELETE_FILE "Supprimer" +#define TR_COPY_FILE "Copier" +#define TR_RENAME_FILE "Renommer" +#define TR_ASSIGN_BITMAP "Sélectionner image" +#define TR_REMOVED " supprimé" +#define TR_SD_INFO "Information" +#define TR_SD_FORMAT "Formater" +#define TR_NA "N/D" +#define TR_HARDWARE "MATERIEL" +#define TR_FORMATTING "Formatage..." +#define TR_TEMP_CALIB "Calib. temp" +#define TR_TIME "Heure" +#define TR_BAUDRATE "Baudrate BT" +#define TR_SD_INFO_TITLE "INFO SD" +#define TR_SD_TYPE "Type:" +#define TR_SD_SPEED "Vitesse:" +#define TR_SD_SECTORS "Secteurs:" +#define TR_SD_SIZE "Taille:" +#define TR_TYPE "Type" +#define TR_GLOBAL_VARS "Variables Globales" +#define TR_GLOBAL_V "V. GLOBALES" +#define TR_GLOBAL_VAR "Variable globale" +#define TR_MENUGLOBALVARS "VARIABLES GLOBALES" +#define TR_OWN "Pers" +#define TR_DATE "Date" +#define TR_ROTARY_ENCODER "Enc.Rot." +#define TR_CHANNELS_MONITOR "MONITEUR CANAUX" +#define TR_INTERNALRF "HF interne" +#define TR_EXTERNALRF "HF externe" +#define TR_FAILSAFE INDENT"Type failsafe" +#define TR_FAILSAFESET "REGLAGES FAILSAFE" +#define TR_COUNTRYCODE "Zone géo." +#define TR_VOICELANG TR("Langue voix","Langue annonces vocales") +#define TR_UNITSSYSTEM "Unités" +#define TR_EDIT "Editer" +#define TR_INSERT_BEFORE "Insérer avant" +#define TR_INSERT_AFTER "Insérer après" +#define TR_COPY "Copier" +#define TR_MOVE "Déplacer" +#define TR_PASTE "Coller" +#define TR_DELETE "Effacer" +#define TR_INSERT "Insérer" +#define TR_RESET_FLIGHT TR("Réinit. vol","Réinitialiser vol") +#define TR_RESET_TIMER1 TR("Réinit. Timer1","Réinitialiser Timer1") +#define TR_RESET_TIMER2 TR("Réinit. Timer2","Réinitialiser Timer2") +#define TR_RESET_TELEMETRY TR("Réinit. Télém.","Réinit. Télémesure") +#define TR_STATISTICS "Statistiques" +#define TR_ABOUT_US "A propos" +#define TR_AND_SWITCH "ET suppl." +#define TR_CF "FS" +#define TR_SPEAKER INDENT"Haut-p." +#define TR_BUZZER INDENT"Bipeur" +#define TR_BYTES "bytes" +#define TR_MODULE_BIND "[Bind]" +#define TR_MODULE_RANGE "[Port.]" +#define TR_RESET_BTN "[RAZ]" +#define TR_SET "[Déf.]" +#define TR_TRAINER "Ecolage" +#define TR_ANTENNAPROBLEM CENTER "Antenne radio défectueuse!" +#define TR_MODELIDUSED TR("ID déjà affecté","No de modèle déjà utilisé") +#define TR_MODULE INDENT "Type de module" +#define TR_CHANNELRANGE INDENT "Plage de canaux" +#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_CHECKLIST "Afficher notes" +#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 "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 +#define TR_PHASES_HEADERS { " Nom ", " Inter ", " Trims ", " Fondu ON ", " Fondu OFF " } +#define TR_LIMITS_HEADERS { " Nom ", " Subtrim ", " Min ", " Max ", " Direction ", " Curve ", " Neutre PPM ", " Mode subtrim " } +#define TR_CSW_HEADERS { " Fonction ", " V1 ", " V2 ", " V2 ", " ET suppl. ", " Durée ", " Délai " } + +//Taranis About screen +#define TR_ABOUTUS TR(" A PROPOS ","A PROPOS") + +#define TR_ABOUT_OPENTX_1 TR("OpenTX\001est\001libre,\001non-","OpenTX est libre, non-") +#define TR_ABOUT_OPENTX_2 TR("commercial,\001et\001offert\001sans","commercial et n'offre aucune") +#define TR_ABOUT_OPENTX_3 TR("garantie.\001Il\001est\001développé","garantie. Il a été développé") +#define TR_ABOUT_OPENTX_4 TR("gratuitement.\001Donations","gratuitement. Vos donations") +#define TR_ABOUT_OPENTX_5 TR("bienvenues!","sont bienvenues!") + +#define TR_ABOUT_BERTRAND_1 "Bertrand Songis" +#define TR_ABOUT_BERTRAND_2 TR("Auteur\001principal\001d'OpenTX","Auteur principal d'OpenTX") +#define TR_ABOUT_BERTRAND_3 TR("Codéveloppeur\001de\001C9X","Codéveloppeur de Companion9x") + +#define TR_ABOUT_MIKE_1 "Mike Blandford" +#define TR_ABOUT_MIKE_2 "Maître du code et des" +#define TR_ABOUT_MIKE_3 "drivers" +#define TR_ABOUT_MIKE_4 "" + +#define TR_ABOUT_ROMOLO_1 "Romolo Manfredini" +#define TR_ABOUT_ROMOLO_2 "Développeur principal de" +#define TR_ABOUT_ROMOLO_3 "Companion9x" + +#define TR_ABOUT_ANDRE_1 "André Bernet" +#define TR_ABOUT_ANDRE_2 TR("Fonctionsé,\001usabilité,","Fonctionnalités, usabilité,") +#define TR_ABOUT_ANDRE_3 TR("débogage,\001documentation","débogage, documentation") + +#define TR_ABOUT_ROB_1 "Rob Thomson" +#define TR_ABOUT_ROB_2 "Webmaster d'openrcforums" + +#define TR_ABOUT_MARTIN_1 "Martin Hotar" +#define TR_ABOUT_MARTIN_2 "Design graphique" + +#if defined(PCBTARANIS) + #define TR_ABOUT_HARDWARE_1 "FrSky" + #define TR_ABOUT_HARDWARE_2 "Développeur/fabricant" + #define TR_ABOUT_HARDWARE_3 "du matériel" +#else + #define TR_ABOUT_HARDWARE_1 "Brent Nelson" + #define TR_ABOUT_HARDWARE_2 "Développeur/fabricant" + #define TR_ABOUT_HARDWARE_3 "de la carte Sky9x" +#endif + +#define TR_ABOUT_PARENTS_1 "Projets parents" +#define TR_ABOUT_PARENTS_2 "ersky9x (Mike Blandford)" +#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_INPUT 'E' // 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 3a2c62fca..dea57bbe9 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 + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ // NON ZERO TERMINATED STRINGS #define LEN_OFFON "\003" @@ -62,14 +68,20 @@ #define LEN_TRNCHN "\003" #define TR_TRNCHN "ch1ch2ch3ch4" +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "OFF\0 ""S-Port Mirror\0 ""Debug\0 " + +#define LEN_POTTYPES "\017" +#define TR_POTTYPES "Pot\0 ""Multipos Switch" + #define LEN_DATETIME "\005" #define TR_DATETIME "DATA:""ORA :" #define LEN_VLCD "\006" #define TR_VLCD "NormalOptrex" -#define LEN_COUNTRYCODES TR("\002", "\007") -#define TR_COUNTRYCODES TR("US""JP""EU", "America""Japan\0 ""Europe\0") +#define LEN_COUNTRYCODES TR("\002", "\007") +#define TR_COUNTRYCODES TR("US""JP""EU", "America""Japan\0 ""Europe\0") #define LEN_VTRIMINC "\006" #define TR_VTRIMINC "Exp ""ExFine""Fine ""Medio ""Ampio " @@ -138,8 +150,35 @@ #define LEN_VMIXTRIMS "\003" #define TR_VMIXTRIMS "OFF""ON ""Rud""Ele""Thr""Ail" +#if defined(PCBTARANIS) + #define TR_CSWTIMER "Timer" + #define TR_CSWSTICKY "Stcky" + #define TR_CSWRANGE "Range" + #define TR_CSWSTAY "Edge\0" +#else + #define TR_CSWTIMER "Tim\0 " + #define TR_CSWSTICKY "Glue\0" + #if defined(CPUARM) + #define TR_CSWRANGE "Rnge\0" + #define TR_CSWSTAY "Edge\0" + #else + #define TR_CSWRANGE + #define TR_CSWSTAY + #endif +#endif + +#if defined(CPUARM) + #define TR_CSWEQUAL "a=x\0 " +#else + #define TR_CSWEQUAL +#endif + #define LEN_VCSWFUNC "\005" -#define TR_VCSWFUNC "---\0 ""a{x\0 ""a>x\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""a 2 -#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd " -#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS <= 2 -#define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb " -#else -#define TR_ROTARY_ENCODERS_VSRCRAW + #define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW #endif #if defined(HELI) @@ -343,7 +390,7 @@ #define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]" #endif -#define TR_VSRCRAW "---\0""Rud\0""Ele\0""Thr\0""Ail\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS_VSRCRAW "MAX\0" TR_CYC_VSRCRAW "TrmR" "TrmE" "TrmT" "TrmA" TR_SW_VSRCRAW +#define TR_VSRCRAW "---\0""Rud\0""Ele\0""Thr\0""Ail\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmR" "TrmE" "TrmT" "TrmA" TR_SW_VSRCRAW #define LEN_VTMRMODES "\003" #define TR_VTMRMODES "OFF""ABS""THs""TH%""THt" @@ -355,12 +402,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 @@ -377,7 +424,7 @@ #define TR_POPUPS TR_ENTER"\004[EXIT]" #define OFS_EXIT sizeof(TR_ENTER) -#define TR_MENUWHENDONE CENTER"\006"TR_ENTER" Conferma" +#define TR_MENUWHENDONE CENTER"\007"TR_ENTER" Conferma" #define TR_FREE " Disp." #define TR_DELETEMODEL "Elimina modello?" #define TR_COPYINGMODEL "Copia in corso.." @@ -387,7 +434,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") @@ -468,6 +520,7 @@ #define TR_SPLASHSCREEN TR("Schermo avvio", "Schermata di avvio") #define TR_THROTTLEWARNING TR("All. Thr", "Allarme Throttle") #define TR_SWITCHWARNING TR("Avv. Int.", "Avviso Interr.") +#define TR_POTWARNING TR("Pot Warn.","Pot Warning") #define TR_TIMEZONE "Ora locale" #define TR_RXCHANNELORD "Ordine ch RX" #define TR_SLAVE "Allievo" @@ -476,30 +529,28 @@ #define TR_CAL "Cal" #define TR_VTRIM "Trim- +" #define TR_BG "BG:" -#define TR_MENUTOSTART CENTER"\006" TR_ENTER " per Cal." -#define TR_SETMIDPOINT CENTER"\011SETTA CENTRO" -#define TR_MOVESTICKSPOTS CENTER"\006MUOVI STICK/POT" +#define TR_MENUTOSTART CENTER"\011" TR_ENTER " per Cal." +#define TR_SETMIDPOINT CENTER"\012SETTA CENTRO" +#define TR_MOVESTICKSPOTS CENTER"\010MUOVI STICK/POT" #define TR_RXBATT "Rx Batt:" #define TR_TXnRX "Tx:\0Rx:" #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_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_TOTTM1TM2THRTHP "\037\146TOT\036TM1\037\146TM2\036THR\037\146TH%" +#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" @@ -529,6 +580,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" @@ -539,8 +593,8 @@ #define TR_MENUCURVES "CURVE" #define TR_MENUCURVE "CURVA" -#define TR_MENUCUSTOMSWITCH "SWITCH PERSON." -#define TR_MENUCUSTOMSWITCHES TR("SWITCH PERSON.","SWITCH PERSONALIZZATI") +#define TR_MENULOGICALSWITCH "SWITCH PERSON." +#define TR_MENULOGICALSWITCHES TR("SWITCH PERSON.","SWITCH PERSONALIZZATI") #define TR_MENUCUSTOMFUNC TR("FUNZ. PERSON.","FUNZIONI PERSONALIZZATE") #define TR_MENUTELEMETRY "TELEMETRIA" #define TR_MENUTEMPLATES "ESEMPI GUIDA" @@ -616,6 +670,7 @@ #define TR_SD_SIZE "Dimens:" #define TR_TYPE "Tipo" #define TR_GLOBAL_VARS "Variabili Globali" +#define TR_GLOBAL_V "GLOBAL V." #define TR_GLOBAL_VAR "Variabile globale" #define TR_MENUGLOBALVARS "VARIABILI GLOBALI" #define TR_OWN "Fase" @@ -660,37 +715,40 @@ #define TR_LOWALARM INDENT "Allarme Basso" #define TR_CRITICALALARM INDENT "Allarme Critico" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" +#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 { " Nome ", " Switch ", " Trims ", " Fade In ", " Fade Out " } #define TR_LIMITS_HEADERS { " Nome ", " Offset ", " Min ", " Max ", " Direzione ", " Curve ", " Centro PPM ", " Simmetria " } -#define TR_CSW_HEADERS { " Funzione ", " V1 ", " V2 ", " AND Switch ", " Durata ", " Ritardo " } +#define TR_CSW_HEADERS { " Funzione ", " V1 ", " V2 ", " V2 ", " AND Switch ", " Durata ", " Ritardo " } //Taranis About screen #define TR_ABOUTUS "Info su" @@ -743,8 +801,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 5525754ed..e6a3608ba 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,16 +33,22 @@ * !!!!! 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 + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ // NON ZERO TERMINATED STRINGS #define LEN_OFFON "\003" #define TR_OFFON "WYŁ""ZAŁ" #define LEN_MMMINV "\003" -#define TR_MMMINV "---""INV" +#define TR_MMMINV "---""REV" #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 ") @@ -55,16 +60,22 @@ #define TR_VRENAVIG "Ne REaREb" #define LEN_VBLMODE TR("\006", "\011") -#define TR_VBLMODE TR("Wył\0 ""Przyc.""Drążki""Oba\0 ""Zał\0 ", "Wyłaczone""Przyciski""Drązki\0 ""Oba\0 ""Włączyć\0 ") +#define TR_VBLMODE TR("Wył\0 ""Przyc.""Drążki""Oba\0 ""Zał\0 ", "Wyłączone""Przyciski""Drązki\0 ""Oba\0 ""Włączyć\0 ") #define LEN_TRNMODE "\003" #define TR_TRNMODE " X "" +="" :=" #define LEN_TRNCHN "\003" -#define TR_TRNCHN "CH1CH2CH3CH4" +#define TR_TRNCHN "KN1KN2KN3KN4" + +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "Wyłącz\0 ""S-Port Mirror\0 ""Debug\0 " + +#define LEN_POTTYPES "\017" +#define TR_POTTYPES "Potencjometr\0 ""Przeł.Wielopoz." #define LEN_DATETIME "\006" -#define TR_DATETIME "DANA:""Czas:\0 " +#define TR_DATETIME "DATA:\0""CZAS:\0" #define LEN_VLCD "\006" #define TR_VLCD "Normal""Optrex" @@ -137,10 +148,37 @@ #define TR_VMLTPX2 "+=""*="":=" #define LEN_VMIXTRIMS "\004" -#define TR_VMIXTRIMS "WYł\0""ZAŁ\0""SK\0 ""SW\0 ""GAZ\0""Lotk" +#define TR_VMIXTRIMS "WYŁ\0""ZAŁ\0""SK\0 ""SW\0 ""GAZ\0""Lotk" + +#if defined(PCBTARANIS) + #define TR_CSWTIMER "Timer" + #define TR_CSWSTICKY "Stcky" + #define TR_CSWRANGE "Range" + #define TR_CSWSTAY "Edge\0" +#else + #define TR_CSWTIMER "Tim\0 " + #define TR_CSWSTICKY "Glue\0" + #if defined(CPUARM) + #define TR_CSWRANGE "Rnge\0" + #define TR_CSWSTAY "Edge\0" + #else + #define TR_CSWRANGE + #define TR_CSWSTAY + #endif +#endif + +#if defined(CPUARM) + #define TR_CSWEQUAL "a=x\0 " +#else + #define TR_CSWEQUAL +#endif #define LEN_VCSWFUNC "\005" -#define TR_VCSWFUNC "---\0 ""a{x\0 ""a>x\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""a 2 - #define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd " -#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS <= 2 - #define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb " -#else - #define TR_ROTARY_ENCODERS_VSRCRAW + #define TR_VSWITCHES TR_9X_3POS_SWITCHES "GAZ""SK""SW""LOT""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW #endif #if defined(HELI) @@ -344,7 +390,7 @@ #define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]" #endif -#define TR_VSRCRAW "---\0""SK\0 ""SW\0 ""Gaz\0""Lotk" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS_VSRCRAW "MAX\0" TR_CYC_VSRCRAW "TrmK" "TrmW" "TrmG" "TrmL" TR_SW_VSRCRAW +#define TR_VSRCRAW "---\0""SK\0 ""SW\0 ""Gaz\0""Lotk" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmK" "TrmW" "TrmG" "TrmL" TR_SW_VSRCRAW #define LEN_VTMRMODES "\003" #define TR_VTMRMODES "WYŁ""ABS""THs""TH%""THt" @@ -356,12 +402,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 @@ -375,10 +421,10 @@ #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" +#define TR_MENUWHENDONE CENTER "\012"TR_ENTER" > DALEJ" #define TR_FREE TR("wolne:", "wolne") #define TR_DELETEMODEL "SKASUJ MODEL" #define TR_COPYINGMODEL "Kopiuj model.." @@ -388,7 +434,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%") @@ -398,21 +449,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!" @@ -424,7 +475,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" @@ -469,41 +520,40 @@ #define TR_SPLASHSCREEN "Logo ekranu" #define TR_THROTTLEWARNING "(\043)Gaz" #define TR_SWITCHWARNING "(\043)Przełącznik" +#define TR_POTWARNING TR("Pot Warn.","Pot Warning") #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") -#define TR_MOVESTICKSPOTS TR(CENTER "\004Poruszaj drążkami i potenc.","\010Poruszaj drążkami i potenc.") +#define TR_MENUTOSTART CENTER "\011" TR_ENTER " = START" +#define TR_SETMIDPOINT TR(CENTER "\002Ustaw drążki/potencj","\010Ustaw drązki/potencj na środku") +#define TR_MOVESTICKSPOTS TR(CENTER "Poruszaj drążkami i pot","\014Poruszaj drążkami i potenc.") #define TR_RXBATT "Rx Bat.:" #define TR_TXnRX "Tx:\0Rx:" #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_TOT "TOT" -#define TR_TMR1LATMAXUS "Tmr1Lat max\006us" +#define TR_NODATA CENTER "BRAK DANYCH" +#define TR_TOTTM1TM2THRTHP "\037\146TOT\036TM1\037\146TM2\036THR\037\146TH%" +#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 maks" + #define TR_FREESTACKMINB "Wolny stos" #else - #define TR_TMIXMAXMS "Tmix max\014ms" + #define TR_TMIXMAXMS "Tmix maks\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" @@ -530,18 +580,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_MENULOGICALSWITCH "PRZEŁ. LOGICZNY" +#define TR_MENULOGICALSWITCHES TR("PRZEŁ. LOG.", "PRZEŁ. LOGICZNE") #define TR_MENUCUSTOMFUNC "FUNKCJE SPECJALNE" #define TR_MENUTELEMETRY "TELEMETRIA" #define TR_MENUTEMPLATES "SZABLONY" @@ -617,9 +670,10 @@ #define TR_SD_SIZE "Wielkość:" #define TR_TYPE TR_SD_TYPE #define TR_GLOBAL_VARS "Zmienne globalne" +#define TR_GLOBAL_V "GLOBAL V." #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" @@ -650,51 +704,54 @@ #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_CHECKLIST "Display Checklist" +#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 "Maks RSSI" + #define TR_MAVLINK_PC_RSSI_EN_LABEL "PC RSSI EN" + #define TR_MAVMENUSETUP_TITLE "Ustawienia Mavlink" + #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 "Aktywny" + #define TR_MAVLINK_BAT_MENU_TITLE "BAT RSSI" + #define TR_MAVLINK_BATTERY_LABEL "Status bateri" + #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 #define TR_PHASES_HEADERS { " Nazwa ", " Przełącznik ", " Trymery ", " Pojawianie się ", " Zanikanie " } #define TR_LIMITS_HEADERS { " Nazwa ", " Subtrim ", " Min ", " Max ", " Kierunek ", " Krzywa ", " Środek PPM ", " Tryb subtrim " } -#define TR_CSW_HEADERS { " Funkcja ", " Param. 1 ", " Param 2 ", " AND Przełącznik ", " Czas trwania ", " Opóźnienie " } +#define TR_CSW_HEADERS { " Funkcja ", " Param. 1 ", " Param 2 ", " 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") @@ -703,21 +760,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" @@ -731,7 +788,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 @@ -744,8 +801,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_BG_VOLUME "Głośność 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 691c840af..aba6456dd 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 + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ // NON ZERO TERMINATED STRINGS #define LEN_OFFON "\003" @@ -62,6 +68,12 @@ #define LEN_TRNCHN "\003" #define TR_TRNCHN "CH1CH2CH3CH4" +#define LEN_UART3MODES "\017" +#define TR_UART3MODES "OFF\0 ""S-Port Mirror\0 ""Debug\0 " + +#define LEN_POTTYPES "\017" +#define TR_POTTYPES "Pot\0 ""Multipos Switch" + #define LEN_DATETIME "\005" #define TR_DATETIME "DATA:""HORA:" @@ -138,8 +150,35 @@ #define LEN_VMIXTRIMS "\003" #define TR_VMIXTRIMS "OFF""ON\0""Lem""Pfd""Mot""Ail" +#if defined(PCBTARANIS) + #define TR_CSWTIMER "Timer" + #define TR_CSWSTICKY "Stcky" + #define TR_CSWRANGE "Range" + #define TR_CSWSTAY "Edge\0" +#else + #define TR_CSWTIMER "Tim\0 " + #define TR_CSWSTICKY "Glue\0" + #if defined(CPUARM) + #define TR_CSWRANGE "Rnge\0" + #define TR_CSWSTAY "Edge\0" + #else + #define TR_CSWRANGE + #define TR_CSWSTAY + #endif +#endif + +#if defined(CPUARM) + #define TR_CSWEQUAL "a=x\0 " +#else + #define TR_CSWEQUAL +#endif + #define LEN_VCSWFUNC "\005" -#define TR_VCSWFUNC "---\0 ""a{x\0 ""a>x\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""a 2 - #define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd " -#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS <= 2 - #define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb " -#else - #define TR_ROTARY_ENCODERS_VSRCRAW + #define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW #endif #if defined(HELI) @@ -343,7 +390,7 @@ #define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]" #endif -#define TR_VSRCRAW "---\0""Lem\0""Pfd\0""Mot\0""Ail\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS_VSRCRAW "MAX\0" TR_CYC_VSRCRAW "TrmL" "TrmP" "TrmM" "TrmA" TR_SW_VSRCRAW +#define TR_VSRCRAW "---\0""Lem\0""Pfd\0""Mot\0""Ail\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmL" "TrmP" "TrmM" "TrmA" TR_SW_VSRCRAW #define LEN_VTMRMODES "\003" #define TR_VTMRMODES "OFF""ABS""MTs""MT%""MTt" @@ -355,12 +402,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 @@ -387,7 +434,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" @@ -468,6 +520,7 @@ #define TR_SPLASHSCREEN "Splash screen" #define TR_THROTTLEWARNING "Avisa Acel" #define TR_SWITCHWARNING "Avisa Chav" +#define TR_POTWARNING TR("Pot Warn.","Pot Warning") #define TR_TIMEZONE "Time Zone" #define TR_RXCHANNELORD "Ordem Canal RX" #define TR_SLAVE "Escravo" @@ -476,30 +529,28 @@ #define TR_CAL "Cal" #define TR_VTRIM "Trim- +" #define TR_BG "BG:" -#define TR_MENUTOSTART CENTER"\006" TR_ENTER " INICIAR" -#define TR_SETMIDPOINT CENTER"\005CENTRAR STICK/POT" -#define TR_MOVESTICKSPOTS CENTER"\005MOVER STICKS/POTs" +#define TR_MENUTOSTART CENTER"\011" TR_ENTER " INICIAR" +#define TR_SETMIDPOINT TR(CENTER"\005CENTRAR STICK/POT",CENTER"\006CENTRAR STICK/POT") +#define TR_MOVESTICKSPOTS TR(CENTER"\005MOVER STICKS/POTs",CENTER"\006MOVER STICKS/POTs") #define TR_RXBATT "Rx Batt:" #define TR_TXnRX "Tx:\0Rx:" #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_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_TOTTM1TM2THRTHP "\037\146TOT\036TM1\037\146TM2\036THR\037\146TH%" +#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" @@ -529,6 +580,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" @@ -539,8 +593,8 @@ #define TR_MENUCURVES "CURVAS" #define TR_MENUCURVE "CURVA" -#define TR_MENUCUSTOMSWITCH "CHAVE ESPECIAL" -#define TR_MENUCUSTOMSWITCHES "CHAVES ESPECIAIS" +#define TR_MENULOGICALSWITCH "CHAVE ESPECIAL" +#define TR_MENULOGICALSWITCHES "CHAVES ESPECIAIS" #define TR_MENUCUSTOMFUNC "FUNCAO ESPECIAL" #define TR_MENUTELEMETRY "TELEMETRIA" #define TR_MENUTEMPLATES "MODELOS" @@ -616,6 +670,7 @@ #define TR_SD_SIZE "Tamanho" #define TR_TYPE "Tipe" #define TR_GLOBAL_VARS "Variaveis" +#define TR_GLOBAL_V "GLOBAL V." #define TR_GLOBAL_VAR "Global Variable" #define TR_MENUGLOBALVARS "VARIAVEIS" #define TR_OWN "Propr." @@ -660,37 +715,40 @@ #define TR_LOWALARM INDENT "Low Alarm" #define TR_CRITICALALARM INDENT "Critical Alarm" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" +#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 ", " Offset ", " Min ", " Max ", " Direction ", " Curve ", " PPM Center ", " Symmetrical " } -#define TR_CSW_HEADERS { " Function ", " V1 ", " V2 ", " AND Switch ", " Duration ", " Delay " } +#define TR_CSW_HEADERS { " Function ", " V1 ", " V2 ", " V2 ", " AND Switch ", " Duration ", " Delay " } //Taranis About screen #define TR_ABOUTUS "ABOUT US" @@ -743,8 +801,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 68de29549..e559b277f 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 + * \001 to \035 -extended spacing (value * FW/2) + * \0 -ends actual string + */ // NON ZERO TERMINATED STRINGS #define LEN_OFFON "\003" @@ -62,6 +68,12 @@ #define LEN_TRNCHN "\003" #define TR_TRNCHN "KN1KN2KN3KN4" +#define LEN_UART3MODES "\022" +#define TR_UART3MODES "Av\0 ""Spegling av S-Port""Debug\0 " + +#define LEN_POTTYPES "\020" +#define TR_POTTYPES "Potentiometer\0 ""Flerlägesväljare" + #define LEN_DATETIME "\005" #define TR_DATETIME "DAG: ""TID: " @@ -138,8 +150,35 @@ #define LEN_VMIXTRIMS "\003" #define TR_VMIXTRIMS "Av\0""På\0""Rod""Hjd""Gas""Ske" +#if defined(PCBTARANIS) + #define TR_CSWTIMER "Timer" + #define TR_CSWSTICKY "Stcky" + #define TR_CSWRANGE "Range" + #define TR_CSWSTAY "Edge\0" +#else + #define TR_CSWTIMER "Tim\0 " + #define TR_CSWSTICKY "Glue\0" + #if defined(CPUARM) + #define TR_CSWRANGE "Rnge\0" + #define TR_CSWSTAY "Edge\0" + #else + #define TR_CSWRANGE + #define TR_CSWSTAY + #endif +#endif + +#if defined(CPUARM) + #define TR_CSWEQUAL "a=x\0 " +#else + #define TR_CSWEQUAL +#endif + #define LEN_VCSWFUNC "\005" -#define TR_VCSWFUNC "---\0 ""a{x\0 ""a>x\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""ax\0 ""ax""|a|b\0 ""a 2 - #define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb ""REc ""REd " -#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS <= 2 - #define TR_ROTARY_ENCODERS_VSRCRAW "REa ""REb " -#else - #define TR_ROTARY_ENCODERS_VSRCRAW + #define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW #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 +#define TR_VSRCRAW "---\0""Rod\0""Höj\0""Gas\0""Ske\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODER "MAX " TR_CYC_VSRCRAW "TrmR" "TrmH" "TrmG" "TrmS" TR_SW_VSRCRAW #define LEN_VTMRMODES "\003" #define TR_VTMRMODES "Av\0""ABS""GAs""GA%""GAt" #define LEN_VTRAINERMODES "\006" -#define TR_VTRAINERMODES "Master""Slav\0." +#define TR_VTRAINERMODES "Lärare""Elev\0." #define LEN_VFAILSAFE "\011" #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 @@ -377,7 +424,7 @@ #define TR_POPUPS TR_ENTER"\010[EXIT]" #define OFS_EXIT sizeof(TR_ENTER) -#define TR_MENUWHENDONE CENTER "\006" TR_ENTER " Avslutar " +#define TR_MENUWHENDONE CENTER "\011" TR_ENTER " Avslutar " #define TR_FREE "kvar" #define TR_DELETEMODEL "Radera Modell" #define TR_COPYINGMODEL "Kopierar Modell " @@ -385,9 +432,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") @@ -468,53 +520,52 @@ #define TR_SPLASHSCREEN "Startbild" #define TR_THROTTLEWARNING "Gasvarning" #define TR_SWITCHWARNING TR("Bryt.varn.","Brytarvarning") +#define TR_POTWARNING TR("Pot Warn.","Pot Warning") #define TR_TIMEZONE TR("Tidszon","GPS Tidszon") #define TR_RXCHANNELORD "Kanaler i RX" -#define TR_SLAVE "Slav" +#define TR_SLAVE "Elev" #define TR_MODESRC " Läge\004% Källa" #define TR_MULTIPLIER "Styrka" #define TR_CAL "Kalib." #define TR_VTRIM "Trim- +" #define TR_BG "BG:" -#define TR_MENUTOSTART CENTER "\006" TR_ENTER " Startar " -#define TR_SETMIDPOINT CENTER "\010Centrera Allt" -#define TR_MOVESTICKSPOTS CENTER "\004Rör Rattar/Spakar" +#define TR_MENUTOSTART CENTER "\011" TR_ENTER " Startar " +#define TR_SETMIDPOINT TR(CENTER "\012Centrera Allt",CENTER "\013Centrera Allt") +#define TR_MOVESTICKSPOTS TR(CENTER "\005Rör Rattar/Spakar",CENTER "\006Rör Rattar/Spakar") #define TR_RXBATT "Rx Batt:" #define TR_TXnRX "Tx:\0Rx:" #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_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_TOTTM1TM2THRTHP "\037\146TOT\036TM1\037\146TM2\036THR\037\146TH%" +#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" #define TR_MODEL "Modell" #define TR_FP "FL" #define TR_MIX "MIX" -#define TR_EEPROMLOWMEM "EEPROM low mem" +#define TR_EEPROMLOWMEM "Minnesbrist" #define TR_ALERT "\016OBS" #define TR_PRESSANYKEYTOSKIP "Tryck ned en knapp" #define TR_THROTTLENOTIDLE "Gasen är påslagen!" #define TR_ALARMSDISABLED "Alarmen Avstängda!" -#define TR_PRESSANYKEY TR("Tryck ned en knapp", "Tryck ned en knapp") -#define TR_BADEEPROMDATA "EEprom Datafel " -#define TR_EEPROMFORMATTING "Formaterar EEprom" -#define TR_EEPROMOVERFLOW "Fel i EEprom" +#define TR_PRESSANYKEY "Tryck ned en knapp" +#define TR_BADEEPROMDATA "Minnet kan inte tolkas" +#define TR_EEPROMFORMATTING "Minnet Nollställs" +#define TR_EEPROMOVERFLOW "Minnesfel" #define TR_MENURADIOSETUP "Inställningar" #define TR_MENUDATEANDTIME "Dag och Tid" #define TR_MENUTRAINER "Trainer (PPM in)" @@ -530,7 +581,7 @@ #define TR_MENUHELISETUP "Helikopter" #if defined(PCBTARANIS) - #define TR_MENUINPUTS "INPUTS" + #define TR_MENUINPUTS TR("Filter","Filtrerad Insignal") #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" @@ -542,8 +593,8 @@ #define TR_MENUCURVES "Kurvor" #define TR_MENUCURVE "Kurva" -#define TR_MENUCUSTOMSWITCH "Logisk Brytare" -#define TR_MENUCUSTOMSWITCHES "Logiska Brytare" +#define TR_MENULOGICALSWITCH "Logisk Brytare" +#define TR_MENULOGICALSWITCHES "Logiska Brytare" #define TR_MENUCUSTOMFUNC "BrytarFunktioner" #define TR_MENUTELEMETRY "Telemetri" #define TR_MENUTEMPLATES "Mallar" @@ -619,6 +670,7 @@ #define TR_SD_SIZE "Strl:" #define TR_TYPE "Typ " #define TR_GLOBAL_VARS "Globala Variabler" +#define TR_GLOBAL_V "GLOBAL V." #define TR_GLOBAL_VAR "Global Variabel" #define TR_MENUGLOBALVARS "Globala Variabler" #define TR_OWN "Egen" @@ -663,39 +715,40 @@ #define TR_LOWALARM INDENT "Låg-alarm" #define TR_CRITICALALARM INDENT "Kritiskt alarm" #define TR_PERSISTENT_MAH INDENT "Store mAh" +#define TR_CHECKLIST "Display Checklist" +#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset") +#define TR_UART3MODE "Serieporten" #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 "EJ Lås" + #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 " } -#define TR_CSW_HEADERS { " Funktion ", " V1 ", " V2 ", " AND Brytare ", " Tidslängd ", " Fördröj " } +#define TR_CSW_HEADERS { " Funktion ", " V1 ", " V2 ", " V2 ", " AND Brytare ", " Tidslängd ", " Fördröj " } // About screen #define TR_ABOUTUS "Om Oss" @@ -744,12 +797,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" diff --git a/radio/src/translations/tts_cz.cpp b/radio/src/translations/tts_cz.cpp index c2bbe6037..fb45783ab 100644 --- a/radio/src/translations/tts_cz.cpp +++ b/radio/src/translations/tts_cz.cpp @@ -41,9 +41,9 @@ enum CzechPrompts { CZ_PROMPT_AMPS = CZ_PROMPT_UNITS_BASE+(UNIT_AMPS*4), CZ_PROMPT_METERS_PER_SECOND = CZ_PROMPT_UNITS_BASE+(UNIT_METERS_PER_SECOND*4), CZ_PROMPT_SPARE1 = CZ_PROMPT_UNITS_BASE+(UNIT_RAW*4), - CZ_PROMPT_KMH = CZ_PROMPT_UNITS_BASE+(UNIT_KMH*4), - CZ_PROMPT_METERS = CZ_PROMPT_UNITS_BASE+(UNIT_METERS*4), - CZ_PROMPT_DEGREES = CZ_PROMPT_UNITS_BASE+(UNIT_DEGREES*4), + CZ_PROMPT_KMH = CZ_PROMPT_UNITS_BASE+(UNIT_SPEED*4), + CZ_PROMPT_METERS = CZ_PROMPT_UNITS_BASE+(UNIT_DIST*4), + CZ_PROMPT_DEGREES = CZ_PROMPT_UNITS_BASE+(UNIT_TEMPERATURE*4), CZ_PROMPT_PERCENT = CZ_PROMPT_UNITS_BASE+(UNIT_PERCENT*4), CZ_PROMPT_MILLIAMPS = CZ_PROMPT_UNITS_BASE+(UNIT_MILLIAMPS*4), CZ_PROMPT_MAH = CZ_PROMPT_UNITS_BASE+(UNIT_MAH*4), @@ -120,12 +120,15 @@ I18N_PLAY_FUNCTION(cz, playNumber, getvalue_t number, uint8_t unit, uint8_t att) unit--; convertUnit(number, unit); if (IS_IMPERIAL_ENABLE()) { - if (unit == UNIT_METERS) { + if (unit == UNIT_DIST) { unit = UNIT_FEET; } + if (unit == UNIT_SPEED) { + unit = UNIT_KTS; + } } #if defined(CPUARM) - if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_METERS && number >= 100))) { + if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) { number /= 10; att -= PREC1; } diff --git a/radio/src/translations/tts_de.cpp b/radio/src/translations/tts_de.cpp index 1afadbf4e..af09eeb53 100644 --- a/radio/src/translations/tts_de.cpp +++ b/radio/src/translations/tts_de.cpp @@ -43,9 +43,9 @@ enum GermanPrompts { DE_PROMPT_AMPS = DE_PROMPT_UNITS_BASE+UNIT_AMPS, DE_PROMPT_METERS_PER_SECOND = DE_PROMPT_UNITS_BASE+UNIT_METERS_PER_SECOND, DE_PROMPT_SPARE1 = DE_PROMPT_UNITS_BASE+UNIT_RAW, - DE_PROMPT_KMH = DE_PROMPT_UNITS_BASE+UNIT_KMH, - DE_PROMPT_METERS = DE_PROMPT_UNITS_BASE+UNIT_METERS, - DE_PROMPT_DEGREES = DE_PROMPT_UNITS_BASE+UNIT_DEGREES, + DE_PROMPT_KMH = DE_PROMPT_UNITS_BASE+UNIT_SPEED, + DE_PROMPT_METERS = DE_PROMPT_UNITS_BASE+UNIT_DIST, + DE_PROMPT_DEGREES = DE_PROMPT_UNITS_BASE+UNIT_TEMPERATURE, DE_PROMPT_PERCENT = DE_PROMPT_UNITS_BASE+UNIT_PERCENT, DE_PROMPT_MILLIAMPS = DE_PROMPT_UNITS_BASE+UNIT_MILLIAMPS, DE_PROMPT_MAH = DE_PROMPT_UNITS_BASE+UNIT_MAH, @@ -110,12 +110,15 @@ I18N_PLAY_FUNCTION(de, playNumber, getvalue_t number, uint8_t unit, uint8_t att) unit--; convertUnit(number, unit); if (IS_IMPERIAL_ENABLE()) { - if (unit == UNIT_METERS) { + if (unit == UNIT_DIST) { unit = UNIT_FEET; } + if (unit == UNIT_SPEED) { + unit = UNIT_KTS; + } } #if defined(CPUARM) - if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_METERS && number >= 100))) { + if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) { number /= 10; att -= PREC1; } diff --git a/radio/src/translations/tts_en.cpp b/radio/src/translations/tts_en.cpp index 1f874f305..c7cfcb79f 100644 --- a/radio/src/translations/tts_en.cpp +++ b/radio/src/translations/tts_en.cpp @@ -50,16 +50,16 @@ enum EnglishPrompts { EN_PROMPT_AMPS = EN_PROMPT_UNITS_BASE+(UNIT_AMPS*2), EN_PROMPT_METERS_PER_SECOND = EN_PROMPT_UNITS_BASE+(UNIT_METERS_PER_SECOND*2), EN_PROMPT_SPARE1 = EN_PROMPT_UNITS_BASE+(UNIT_RAW*2), - EN_PROMPT_KMH = EN_PROMPT_UNITS_BASE+(UNIT_KMH*2), - EN_PROMPT_METERS = EN_PROMPT_UNITS_BASE+(UNIT_METERS*2), - EN_PROMPT_DEGREES = EN_PROMPT_UNITS_BASE+(UNIT_DEGREES*2), + EN_PROMPT_KMH = EN_PROMPT_UNITS_BASE+(UNIT_SPEED*2), + EN_PROMPT_METERS = EN_PROMPT_UNITS_BASE+(UNIT_DIST*2), + EN_PROMPT_DEGREES = EN_PROMPT_UNITS_BASE+(UNIT_TEMPERATURE*2), EN_PROMPT_PERCENT = EN_PROMPT_UNITS_BASE+(UNIT_PERCENT*2), EN_PROMPT_MILLIAMPS = EN_PROMPT_UNITS_BASE+(UNIT_MILLIAMPS*2), EN_PROMPT_MAH = EN_PROMPT_UNITS_BASE+(UNIT_MAH*2), EN_PROMPT_WATTS = EN_PROMPT_UNITS_BASE+(UNIT_WATTS*2), EN_PROMPT_DB = EN_PROMPT_UNITS_BASE+(UNIT_DBM*2), EN_PROMPT_FEET = EN_PROMPT_UNITS_BASE+(UNIT_FEET*2), - EN_PROMPT_KTS = EN_PROMPT_UNITS_BASE+(UNIT_KTS*2), + EN_PROMPT_MPH = EN_PROMPT_UNITS_BASE+(UNIT_KTS*2), EN_PROMPT_HOURS = EN_PROMPT_UNITS_BASE+(UNIT_HOURS*2), EN_PROMPT_MINUTES = EN_PROMPT_UNITS_BASE+(UNIT_MINUTES*2), EN_PROMPT_SECONDS = EN_PROMPT_UNITS_BASE+(UNIT_SECONDS*2), @@ -97,12 +97,15 @@ I18N_PLAY_FUNCTION(en, playNumber, getvalue_t number, uint8_t unit, uint8_t att) unit--; convertUnit(number, unit); if (IS_IMPERIAL_ENABLE()) { - if (unit == UNIT_METERS) { + if (unit == UNIT_DIST) { unit = UNIT_FEET; } + if (unit == UNIT_SPEED) { + unit = UNIT_KTS; + } } #if defined(CPUARM) - if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_METERS && number >= 100))) { + if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_SPEED && number >= 100))) { number /= 10; att -= PREC1; } diff --git a/radio/src/translations/tts_es.cpp b/radio/src/translations/tts_es.cpp index 928abf46b..9a9b7ca74 100644 --- a/radio/src/translations/tts_es.cpp +++ b/radio/src/translations/tts_es.cpp @@ -67,9 +67,9 @@ enum SpanishPrompts { ES_PROMPT_AMPS = ES_PROMPT_UNITS_BASE+UNIT_AMPS, ES_PROMPT_METERS_PER_SECOND = ES_PROMPT_UNITS_BASE+UNIT_METERS_PER_SECOND, ES_PROMPT_SPARE1 = ES_PROMPT_UNITS_BASE+UNIT_RAW, - ES_PROMPT_KMH = ES_PROMPT_UNITS_BASE+UNIT_KMH, - ES_PROMPT_METERS = ES_PROMPT_UNITS_BASE+UNIT_METERS, - ES_PROMPT_DEGREES = ES_PROMPT_UNITS_BASE+UNIT_DEGREES, + ES_PROMPT_KMH = ES_PROMPT_UNITS_BASE+UNIT_SPEED, + ES_PROMPT_METERS = ES_PROMPT_UNITS_BASE+UNIT_DIST, + ES_PROMPT_DEGREES = ES_PROMPT_UNITS_BASE+UNIT_TEMPERATURE, ES_PROMPT_PERCENT = ES_PROMPT_UNITS_BASE+UNIT_PERCENT, ES_PROMPT_MILLIAMPS = ES_PROMPT_UNITS_BASE+UNIT_MILLIAMPS, ES_PROMPT_MAH = ES_PROMPT_UNITS_BASE+UNIT_MAH, @@ -134,12 +134,15 @@ I18N_PLAY_FUNCTION(es, playNumber, getvalue_t number, uint8_t unit, uint8_t att) unit--; convertUnit(number, unit); if (IS_IMPERIAL_ENABLE()) { - if (unit == UNIT_METERS) { + if (unit == UNIT_DIST) { unit = UNIT_FEET; } + if (unit == UNIT_SPEED) { + unit = UNIT_KTS; + } } #if defined(CPUARM) - if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_METERS && number >= 100))) { + if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) { number /= 10; att -= PREC1; } diff --git a/radio/src/translations/tts_fr.cpp b/radio/src/translations/tts_fr.cpp index a377be4b6..a5eca4723 100644 --- a/radio/src/translations/tts_fr.cpp +++ b/radio/src/translations/tts_fr.cpp @@ -48,9 +48,9 @@ enum FrenchPrompts { FR_PROMPT_AMPS = FR_PROMPT_UNITS_BASE+UNIT_AMPS, FR_PROMPT_METERS_PER_SECOND = FR_PROMPT_UNITS_BASE+UNIT_METERS_PER_SECOND, FR_PROMPT_SPARE1 = FR_PROMPT_UNITS_BASE+UNIT_RAW, - FR_PROMPT_KMH = FR_PROMPT_UNITS_BASE+UNIT_KMH, - FR_PROMPT_METERS = FR_PROMPT_UNITS_BASE+UNIT_METERS, - FR_PROMPT_DEGREES = FR_PROMPT_UNITS_BASE+UNIT_DEGREES, + FR_PROMPT_KMH = FR_PROMPT_UNITS_BASE+UNIT_SPEED, + FR_PROMPT_METERS = FR_PROMPT_UNITS_BASE+UNIT_DIST, + FR_PROMPT_DEGREES = FR_PROMPT_UNITS_BASE+UNIT_TEMPERATURE, FR_PROMPT_PERCENT = FR_PROMPT_UNITS_BASE+UNIT_PERCENT, FR_PROMPT_MILLIAMPS = FR_PROMPT_UNITS_BASE+UNIT_MILLIAMPS, FR_PROMPT_MAH = FR_PROMPT_UNITS_BASE+UNIT_MAH, @@ -116,12 +116,15 @@ I18N_PLAY_FUNCTION(fr, playNumber, getvalue_t number, uint8_t unit, uint8_t att) unit--; convertUnit(number, unit); if (IS_IMPERIAL_ENABLE()) { - if (unit == UNIT_METERS) { + if (unit == UNIT_DIST) { unit = UNIT_FEET; } + if (unit == UNIT_SPEED) { + unit = UNIT_KTS; + } } #if defined(CPUARM) - if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_METERS && number >= 100))) { + if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) { number /= 10; att -= PREC1; } diff --git a/radio/src/translations/tts_it.cpp b/radio/src/translations/tts_it.cpp index 77dd000f3..080b6ae10 100644 --- a/radio/src/translations/tts_it.cpp +++ b/radio/src/translations/tts_it.cpp @@ -44,9 +44,9 @@ enum ItalianPrompts { IT_PROMPT_AMPS = IT_PROMPT_UNITS_BASE+UNIT_AMPS, IT_PROMPT_METERS_PER_SECOND = IT_PROMPT_UNITS_BASE+UNIT_METERS_PER_SECOND, IT_PROMPT_SPARE1 = IT_PROMPT_UNITS_BASE+UNIT_RAW, - IT_PROMPT_KMH = IT_PROMPT_UNITS_BASE+UNIT_KMH, - IT_PROMPT_METERS = IT_PROMPT_UNITS_BASE+UNIT_METERS, - IT_PROMPT_DEGREES = IT_PROMPT_UNITS_BASE+UNIT_DEGREES, + IT_PROMPT_KMH = IT_PROMPT_UNITS_BASE+UNIT_SPEED, + IT_PROMPT_METERS = IT_PROMPT_UNITS_BASE+UNIT_DIST, + IT_PROMPT_DEGREES = IT_PROMPT_UNITS_BASE+UNIT_TEMPERATURE, IT_PROMPT_PERCENT = IT_PROMPT_UNITS_BASE+UNIT_PERCENT, IT_PROMPT_MILLIAMPS = IT_PROMPT_UNITS_BASE+UNIT_MILLIAMPS, IT_PROMPT_MAH = IT_PROMPT_UNITS_BASE+UNIT_MAH, @@ -106,12 +106,15 @@ I18N_PLAY_FUNCTION(it, playNumber, getvalue_t number, uint8_t unit, uint8_t att) unit--; convertUnit(number, unit); if (IS_IMPERIAL_ENABLE()) { - if (unit == UNIT_METERS) { + if (unit == UNIT_DIST) { unit = UNIT_FEET; } + if (unit == UNIT_SPEED) { + unit = UNIT_KTS; + } } #if defined(CPUARM) - if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_METERS && number >= 100))) { + if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) { number /= 10; att -= PREC1; } diff --git a/radio/src/translations/tts_pl.cpp b/radio/src/translations/tts_pl.cpp index 5a6ec0ebf..3772c6054 100644 --- a/radio/src/translations/tts_pl.cpp +++ b/radio/src/translations/tts_pl.cpp @@ -42,9 +42,9 @@ enum PolishPrompts { PL_PROMPT_AMPS = PL_PROMPT_UNITS_BASE+(UNIT_AMPS*4), PL_PROMPT_METERS_PER_SECOND = PL_PROMPT_UNITS_BASE+(UNIT_METERS_PER_SECOND*4), PL_PROMPT_SPARE1 = PL_PROMPT_UNITS_BASE+(UNIT_RAW*4), - PL_PROMPT_KMH = PL_PROMPT_UNITS_BASE+(UNIT_KMH*4), - PL_PROMPT_METERS = PL_PROMPT_UNITS_BASE+(UNIT_METERS*4), - PL_PROMPT_DEGREES = PL_PROMPT_UNITS_BASE+(UNIT_DEGREES*4), + PL_PROMPT_KMH = PL_PROMPT_UNITS_BASE+(UNIT_SPEED*4), + PL_PROMPT_METERS = PL_PROMPT_UNITS_BASE+(UNIT_DIST*4), + PL_PROMPT_DEGREES = PL_PROMPT_UNITS_BASE+(UNIT_TEMPERATURE*4), PL_PROMPT_PERCENT = PL_PROMPT_UNITS_BASE+(UNIT_PERCENT*4), PL_PROMPT_MILLIAMPS = PL_PROMPT_UNITS_BASE+(UNIT_MILLIAMPS*4), PL_PROMPT_MAH = PL_PROMPT_UNITS_BASE+(UNIT_MAH*4), @@ -129,12 +129,15 @@ I18N_PLAY_FUNCTION(pl, playNumber, getvalue_t number, uint8_t unit, uint8_t att) unit--; convertUnit(number, unit); if (IS_IMPERIAL_ENABLE()) { - if (unit == UNIT_METERS) { + if (unit == UNIT_DIST) { unit = UNIT_FEET; } + if (unit == UNIT_SPEED) { + unit = UNIT_KTS; + } } #if defined(CPUARM) - if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_METERS && number >= 100))) { + if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) { number /= 10; att -= PREC1; } diff --git a/radio/src/translations/tts_pt.cpp b/radio/src/translations/tts_pt.cpp index affb4e17a..0744cefd3 100644 --- a/radio/src/translations/tts_pt.cpp +++ b/radio/src/translations/tts_pt.cpp @@ -67,9 +67,9 @@ enum PortuguesePrompts { PT_PROMPT_AMPS = PT_PROMPT_UNITS_BASE+UNIT_AMPS, PT_PROMPT_METERS_PER_SECOND = PT_PROMPT_UNITS_BASE+UNIT_METERS_PER_SECOND, PT_PROMPT_SPARE1 = PT_PROMPT_UNITS_BASE+UNIT_RAW, - PT_PROMPT_KMH = PT_PROMPT_UNITS_BASE+UNIT_KMH, - PT_PROMPT_METERS = PT_PROMPT_UNITS_BASE+UNIT_METERS, - PT_PROMPT_DEGREES = PT_PROMPT_UNITS_BASE+UNIT_DEGREES, + PT_PROMPT_KMH = PT_PROMPT_UNITS_BASE+UNIT_SPEED, + PT_PROMPT_METERS = PT_PROMPT_UNITS_BASE+UNIT_DIST, + PT_PROMPT_DEGREES = PT_PROMPT_UNITS_BASE+UNIT_TEMPERATURE, PT_PROMPT_PERCENT = PT_PROMPT_UNITS_BASE+UNIT_PERCENT, PT_PROMPT_MILLIAMPS = PT_PROMPT_UNITS_BASE+UNIT_MILLIAMPS, PT_PROMPT_MAH = PT_PROMPT_UNITS_BASE+UNIT_MAH, @@ -119,12 +119,15 @@ I18N_PLAY_FUNCTION(pt, playNumber, getvalue_t number, uint8_t unit, uint8_t att) unit--; convertUnit(number, unit); if (IS_IMPERIAL_ENABLE()) { - if (unit == UNIT_METERS) { + if (unit == UNIT_DIST) { unit = UNIT_FEET; } + if (unit == UNIT_SPEED) { + unit = UNIT_KTS; + } } #if defined(CPUARM) - if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_METERS && number >= 100))) { + if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) { number /= 10; att -= PREC1; } diff --git a/radio/src/translations/tts_se.cpp b/radio/src/translations/tts_se.cpp index 97e81cb05..c4c10c548 100644 --- a/radio/src/translations/tts_se.cpp +++ b/radio/src/translations/tts_se.cpp @@ -51,9 +51,9 @@ enum SwedishPrompts { SE_PROMPT_AMPS = SE_PROMPT_UNITS_BASE+(UNIT_AMPS*2), SE_PROMPT_METERS_PER_SECOND = SE_PROMPT_UNITS_BASE+(UNIT_METERS_PER_SECOND*2), SE_PROMPT_SPARE1 = SE_PROMPT_UNITS_BASE+(UNIT_RAW*2), - SE_PROMPT_KMH = SE_PROMPT_UNITS_BASE+(UNIT_KMH*2), - SE_PROMPT_METERS = SE_PROMPT_UNITS_BASE+(UNIT_METERS*2), - SE_PROMPT_DEGREES = SE_PROMPT_UNITS_BASE+(UNIT_DEGREES*2), + SE_PROMPT_KMH = SE_PROMPT_UNITS_BASE+(UNIT_SPEED*2), + SE_PROMPT_METERS = SE_PROMPT_UNITS_BASE+(UNIT_DIST*2), + SE_PROMPT_DEGREES = SE_PROMPT_UNITS_BASE+(UNIT_TEMPERATURE*2), SE_PROMPT_PERCENT = SE_PROMPT_UNITS_BASE+(UNIT_PERCENT*2), SE_PROMPT_MILLIAMPS = SE_PROMPT_UNITS_BASE+(UNIT_MILLIAMPS*2), SE_PROMPT_MAH = SE_PROMPT_UNITS_BASE+(UNIT_MAH*2), @@ -84,12 +84,15 @@ I18N_PLAY_FUNCTION(se, playNumber, getvalue_t number, uint8_t unit, uint8_t att) unit--; convertUnit(number, unit); if (IS_IMPERIAL_ENABLE()) { - if (unit == UNIT_METERS) { + if (unit == UNIT_DIST) { unit = UNIT_FEET; } + if (unit == UNIT_SPEED) { + unit = UNIT_KTS; + } } #if defined(CPUARM) - if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_METERS && number >= 100))) { + if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) { number /= 10; att -= PREC1; } diff --git a/radio/src/translations/tts_sk.cpp b/radio/src/translations/tts_sk.cpp index a2935a7ea..1e10bddef 100644 --- a/radio/src/translations/tts_sk.cpp +++ b/radio/src/translations/tts_sk.cpp @@ -56,9 +56,9 @@ enum SlovakPrompts { SK_PROMPT_AMPS = SK_PROMPT_UNITS_BASE+(UNIT_AMPS*4), SK_PROMPT_METERS_PER_SECOND = SK_PROMPT_UNITS_BASE+(UNIT_METERS_PER_SECOND*4), SK_PROMPT_SPARE1 = SK_PROMPT_UNITS_BASE+(UNIT_RAW*4), - SK_PROMPT_KMH = SK_PROMPT_UNITS_BASE+(UNIT_KMH*4), - SK_PROMPT_METERS = SK_PROMPT_UNITS_BASE+(UNIT_METERS*4), - SK_PROMPT_DEGREES = SK_PROMPT_UNITS_BASE+(UNIT_DEGREES*4), + SK_PROMPT_KMH = SK_PROMPT_UNITS_BASE+(UNIT_SPEED*4), + SK_PROMPT_METERS = SK_PROMPT_UNITS_BASE+(UNIT_DIST*4), + SK_PROMPT_DEGREES = SK_PROMPT_UNITS_BASE+(UNIT_TEMPERATURE*4), SK_PROMPT_PERCENT = SK_PROMPT_UNITS_BASE+(UNIT_PERCENT*4), SK_PROMPT_MILLIAMPS = SK_PROMPT_UNITS_BASE+(UNIT_MILLIAMPS*4), SK_PROMPT_MAH = SK_PROMPT_UNITS_BASE+(UNIT_MAH*4), @@ -135,12 +135,15 @@ I18N_PLAY_FUNCTION(sk, playNumber, getvalue_t number, uint8_t unit, uint8_t att) unit--; convertUnit(number, unit); if (IS_IMPERIAL_ENABLE()) { - if (unit == UNIT_METERS) { + if (unit == UNIT_DIST) { unit = UNIT_FEET; } + if (unit == UNIT_SPEED) { + unit = UNIT_KTS; + } } #if defined(CPUARM) - if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_METERS && number >= 100))) { + if ((att & PREC1) && (unit == UNIT_FEET || (unit == UNIT_DIST && number >= 100))) { number /= 10; att -= PREC1; } diff --git a/radio/util/addtr.py b/radio/util/addtr.py new file mode 100644 index 000000000..2c4a45858 --- /dev/null +++ b/radio/util/addtr.py @@ -0,0 +1,36 @@ +#!/bin/env python + +import sys, glob + +string = sys.argv[1] +translation = sys.argv[2] +after = sys.argv[3] + +def addLine(filename, newline): + print filename, newline + lines = file(filename, 'r').readlines() + for i, line in enumerate(lines): + if after in line: + lines.insert(i+1, newline + '\n') + break + file(filename, 'w').writelines(lines) + +def modifyTranslations(): + for filename in ['translations/en.h'] + glob.glob('translations/*.h.txt'): + newline = "#define " + string + " "*(23-len(string)) + '"' + translation + '"' + addLine(filename, newline) + +def modifyDeclaration(): + newline = "extern const pm_char S" + string + "[];" + filename = "translations.h" + addLine(filename, newline) + +def modifyDefinition(): + newline = "const pm_char S" + string + "[] PROGMEM = " + string + ";" + filename = "translations.cpp" + addLine(filename, newline) + +modifyTranslations() +modifyDeclaration() +modifyDefinition() + diff --git a/radio/util/codecs.py b/radio/util/codecs.py new file mode 100644 index 000000000..4c75a6ed6 --- /dev/null +++ b/radio/util/codecs.py @@ -0,0 +1,51 @@ +#!/bin/env python + +SIGN_BIT = (0x80) # Sign bit for a A-law byte. +QUANT_MASK = (0xf) # Quantization field mask. +SEG_SHIFT = (4) # Left shift for segment number. +SEG_MASK = (0x70) # Segment field mask. +BIAS = (0x84) # Bias for linear code. + +def alaw2linear(a_val): + a_val ^= 0x55 + + t = a_val & QUANT_MASK + seg = (a_val & SEG_MASK) >> SEG_SHIFT + if (seg): + t = (t + t + 1 + 32) << (seg + 2) + else: + t = (t + t + 1 ) << 3 + + if a_val & SIGN_BIT: + return t + else: + return -t + +def ulaw2linear(u_val): + # Complement to obtain normal u-law value. + u_val = ~u_val + + # Extract and bias the quantization bits. Then + # shift up by the segment number and subtract out the bias. + t = ((u_val & QUANT_MASK) << 3) + BIAS + t <<= (u_val & SEG_MASK) >> SEG_SHIFT + + if u_val & SIGN_BIT: + return (BIAS - t) + else: + return (t - BIAS) + +def pcmTable(fn): + result = [] + for i in range(256): + result.append(fn(i)) + return result + +def tableToString(name, table): + result = 'const int16_t ' + name + '[256] = { ' + result += ', '.join([str(i) for i in table]) + result += ' };' + return result + +print tableToString('alawTable', pcmTable(alaw2linear)) +print tableToString('ulawTable', pcmTable(ulaw2linear)) diff --git a/radio/util/sinus.py b/radio/util/sinus.py new file mode 100644 index 000000000..727090e49 --- /dev/null +++ b/radio/util/sinus.py @@ -0,0 +1,29 @@ +#!/bin/env python + +import math + +samples = 1024 +amplitudes = (32000, 0, 4000, 0, 4000) + +max = 0 +min = 0 + +for i in range(samples): + sample = 0.0 + for harmonic, amplitude in enumerate(amplitudes): + sample += math.sin(math.pi*2*i*(harmonic+1)/samples) * amplitude / 2 + sample = int(sample) + if sample > max: + max = sample + elif sample < min: + min = sample + print "%d," % sample, + if i % 10 == 9: + print + +print +print 'Range is:', min, max + +if max > 32767 or min < -32768: + print "Invalid range!" + diff --git a/radio/util/translate.py b/radio/util/translate.py index a0535537f..99f9468b8 100644 --- a/radio/util/translate.py +++ b/radio/util/translate.py @@ -40,6 +40,13 @@ translations = {'cz': [('\\200', u'á'), 'es': [('\\200', u'Ñ'), ('\\201', u'ñ')], + 'fi': [('\\200', u'å'), + ('\\201', u'ä'), + ('\\202', u'ö'), + ('\\203', u'Å'), + ('\\204', u'Ä'), + ('\\205', u'Ö')], + 'fr': [('\\200', u'é'), ('\\201', u'è'), ('\\202', u'à'), @@ -99,6 +106,11 @@ translations = {'cz': [('\\200', u'á'), ('\\203', u'Å'), ('\\204', u'Ä'), ('\\205', u'Ö')], + + 'en': [], + + 'all': [('\\306', u'Δ')], + } # Take care of command line options @@ -112,7 +124,7 @@ args = parser.parse_args() if args.language not in translations: parser.error(args.language + ' is not a supported language. Try one of the supported ones: ' + str(translations.keys())) system.exit() - + # Read the input file into a buffer in_file = codecs.open( args.input, "r", "utf-8" ) text = in_file.read() @@ -124,7 +136,13 @@ for before, after in translations[args.language]: text = text.replace(before, after) else: text = text.replace(after, before) - + +for before, after in translations["all"]: + if args.reverse: + text = text.replace(before, after) + else: + text = text.replace(after, before) + # Write the result to a temporary file out_file = codecs.open(args.output, 'w', 'utf-8') out_file.write( text ) diff --git a/radio/util/tts.py b/radio/util/tts.py index 8375be05c..17aca7b60 100644 --- a/radio/util/tts.py +++ b/radio/util/tts.py @@ -137,7 +137,7 @@ def ttsEn(): "amp", "amps", "meter per second", "meters per second", "", "", - "kilometer per hour","kilometers per hour", + "kilometer per hour", "kilometers per hour", "meter", "meters", "degree", "degrees", "percent", "percent", @@ -146,7 +146,7 @@ def ttsEn(): "watt", "watts", "db", "db", "foot", "feet", - "knot", "knots", + "mile per hour", "miles per hour", "hour", "hours", "minute", "minutes", "second", "seconds",