diff --git a/DONATIONS.txt b/DONATIONS.txt
index ad2efa2db..3ceef39f1 100644
--- a/DONATIONS.txt
+++ b/DONATIONS.txt
@@ -318,3 +318,9 @@ Robert Miller
Aviomotive - www.aviomotive.com
Mark Gaskievicz
Roland Müller
+Frank Gewalt
+Remi Viard
+Leonard MacKey
+Reginald H Millsom
+Emanuel Stassar
+Pierluigi Sommaruga
diff --git a/companion/src/CMakeLists.txt b/companion/src/CMakeLists.txt
index 6356ce744..8efcf0ab4 100644
--- a/companion/src/CMakeLists.txt
+++ b/companion/src/CMakeLists.txt
@@ -72,50 +72,9 @@ ELSE( )
LINK_DIRECTORIES( /usr/local/lib )
ENDIF( )
-INCLUDE_DIRECTORIES( ${XSD_INCLUDE_DIR} )
-
-FIND_PACKAGE( Subversion )
-SET( C9X_WC_REVISION 0 )
-IF( Subversion_FOUND )
- # Subversion_WC_INFO( ${PROJECT_SOURCE_DIR} C9X )
-ENDIF( )
-
set(RADIO_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/../../radio/src)
-
-include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- ${RADIO_SRC_DIRECTORY}/../..
- ${RADIO_SRC_DIRECTORY}
- ${RADIO_SRC_DIRECTORY}/fonts/std
- ${RADIO_SRC_DIRECTORY}/lua/src
-)
-
-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_SRC_DIRECTORY ${PROJECT_SOURCE_DIR}/simulation)
+set(COMPANION_SRC_DIRECTORY ${PROJECT_SOURCE_DIR})
add_custom_command(
OUTPUT ${RADIO_SRC_DIRECTORY}/bitmaps/sticks.lbm
@@ -124,7 +83,18 @@ add_custom_command(
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
+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
@@ -135,10 +105,8 @@ SET( companion_SRCS
${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
@@ -153,7 +121,6 @@ SET( companion_SRCS
firmwares/opentx/opentxsimulator.cpp
firmwares/ersky9x/ersky9xeeprom.cpp
firmwares/ersky9x/ersky9xinterface.cpp
- ${ERSKY9X_CHECKOUT_DIRECTORY}/ersky9xsimulator.cpp
${RADIO_SRC_DIRECTORY}/bitmaps/sticks.lbm
helpers.cpp
mdichild.cpp
@@ -172,8 +139,6 @@ SET( companion_SRCS
fusesdialog.cpp
logsdialog.cpp
downloaddialog.cpp
- simulatordialog.cpp
- xsimulatordialog.cpp
splashlibrary.cpp
mainwindow.cpp
main.cpp
@@ -196,17 +161,10 @@ SET( companion_MOC_HDRS
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
@@ -220,8 +178,6 @@ SET( companion_UIS
logsdialog.ui
apppreferencesdialog.ui
fwpreferencesdialog.ui
- simulatordialog.ui
- xsimulatordialog.ui
burnconfigdialog.ui
downloaddialog.ui
generaledit.ui
@@ -233,25 +189,6 @@ SET( companion_UIS
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
@@ -292,8 +229,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 )
@@ -322,7 +257,87 @@ 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
+ file.cpp # TODO not needed
+ modeledit/node.cpp
+ modeledit/edge.cpp # TODO not needed
+ simulation/main.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 )
@@ -366,7 +381,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 )
diff --git a/companion/src/companion.qrc b/companion/src/companion.qrc
index 832e5ef2f..1c4550d1a 100644
--- a/companion/src/companion.qrc
+++ b/companion/src/companion.qrc
@@ -981,177 +981,177 @@
themes/monowhite/48/contributors.png
themes/monowhite/48/stop.png
themes/monowhite/48/write_eeprom.png
- themes/new/16/paintbrush.png
- themes/new/16/open.png
- themes/new/16/edit.png
- themes/new/16/information.png
- themes/new/16/configure.png
- themes/new/16/list.png
- themes/new/16/wizard.png
- themes/new/16/logs.png
- themes/new/16/new.png
- themes/new/16/save.png
- themes/new/16/recentdocument.png
- themes/new/16/simulate.png
- themes/new/16/changelog.png
- themes/new/16/copy.png
- themes/new/16/write_flash.png
- themes/new/16/read_eeprom_file.png
- themes/new/16/clear.png
- themes/new/16/play.png
- themes/new/16/fuses.png
- themes/new/16/arrow-right.png
- themes/new/16/exit.png
- themes/new/16/moveup.png
- themes/new/16/read_eeprom.png
- themes/new/16/cut.png
- themes/new/16/arrow-left.png
- themes/new/16/write_eeprom_file.png
- themes/new/16/library.png
- themes/new/16/profiles.png
- themes/new/16/paste.png
- themes/new/16/print.png
- themes/new/16/compare.png
- themes/new/16/saveas.png
- themes/new/16/apppreferences.png
- themes/new/16/fwpreferences.png
- themes/new/16/movedown.png
- themes/new/16/currentmodel.png
- themes/new/16/read_flash.png
- themes/new/16/duplicate.png
- themes/new/16/add.png
- themes/new/16/update.png
- themes/new/16/contributors.png
- themes/new/16/stop.png
- themes/new/16/write_eeprom.png
- themes/new/24/paintbrush.png
- themes/new/24/open.png
- themes/new/24/edit.png
- themes/new/24/information.png
- themes/new/24/configure.png
- themes/new/24/list.png
- themes/new/24/wizard.png
- themes/new/24/logs.png
- themes/new/24/new.png
- themes/new/24/save.png
- themes/new/24/recentdocument.png
- themes/new/24/simulate.png
- themes/new/24/changelog.png
- themes/new/24/copy.png
- themes/new/24/write_flash.png
- themes/new/24/read_eeprom_file.png
- themes/new/24/clear.png
- themes/new/24/play.png
- themes/new/24/fuses.png
- themes/new/24/arrow-right.png
- themes/new/24/exit.png
- themes/new/24/moveup.png
- themes/new/24/read_eeprom.png
- themes/new/24/cut.png
- themes/new/24/arrow-left.png
- themes/new/24/write_eeprom_file.png
- themes/new/24/library.png
- themes/new/24/profiles.png
- themes/new/24/paste.png
- themes/new/24/print.png
- themes/new/24/compare.png
- themes/new/24/saveas.png
- themes/new/24/apppreferences.png
- themes/new/24/fwpreferences.png
- themes/new/24/movedown.png
- themes/new/24/currentmodel.png
- themes/new/24/read_flash.png
- themes/new/24/duplicate.png
- themes/new/24/add.png
- themes/new/24/update.png
- themes/new/24/contributors.png
- themes/new/24/stop.png
- themes/new/24/write_eeprom.png
- themes/new/32/paintbrush.png
- themes/new/32/open.png
- themes/new/32/edit.png
- themes/new/32/information.png
- themes/new/32/configure.png
- themes/new/32/list.png
- themes/new/32/wizard.png
- themes/new/32/logs.png
- themes/new/32/new.png
- themes/new/32/save.png
- themes/new/32/recentdocument.png
- themes/new/32/simulate.png
- themes/new/32/changelog.png
- themes/new/32/copy.png
- themes/new/32/write_flash.png
- themes/new/32/read_eeprom_file.png
- themes/new/32/clear.png
- themes/new/32/play.png
- themes/new/32/fuses.png
- themes/new/32/arrow-right.png
- themes/new/32/exit.png
- themes/new/32/moveup.png
- themes/new/32/read_eeprom.png
- themes/new/32/cut.png
- themes/new/32/arrow-left.png
- themes/new/32/write_eeprom_file.png
- themes/new/32/library.png
- themes/new/32/profiles.png
- themes/new/32/paste.png
- themes/new/32/print.png
- themes/new/32/compare.png
- themes/new/32/saveas.png
- themes/new/32/apppreferences.png
- themes/new/32/fwpreferences.png
- themes/new/32/movedown.png
- themes/new/32/currentmodel.png
- themes/new/32/read_flash.png
- themes/new/32/duplicate.png
- themes/new/32/add.png
- themes/new/32/update.png
- themes/new/32/contributors.png
- themes/new/32/stop.png
- themes/new/32/write_eeprom.png
- themes/new/48/paintbrush.png
- themes/new/48/open.png
- themes/new/48/edit.png
- themes/new/48/information.png
- themes/new/48/configure.png
- themes/new/48/list.png
- themes/new/48/wizard.png
- themes/new/48/logs.png
- themes/new/48/new.png
- themes/new/48/save.png
- themes/new/48/recentdocument.png
- themes/new/48/simulate.png
- themes/new/48/changelog.png
- themes/new/48/copy.png
- themes/new/48/write_flash.png
- themes/new/48/read_eeprom_file.png
- themes/new/48/clear.png
- themes/new/48/play.png
- themes/new/48/fuses.png
- themes/new/48/arrow-right.png
- themes/new/48/exit.png
- themes/new/48/moveup.png
- themes/new/48/read_eeprom.png
- themes/new/48/cut.png
- themes/new/48/arrow-left.png
- themes/new/48/write_eeprom_file.png
- themes/new/48/library.png
- themes/new/48/profiles.png
- themes/new/48/paste.png
- themes/new/48/print.png
- themes/new/48/compare.png
- themes/new/48/saveas.png
- themes/new/48/apppreferences.png
- themes/new/48/fwpreferences.png
- themes/new/48/movedown.png
- themes/new/48/currentmodel.png
- themes/new/48/read_flash.png
- themes/new/48/duplicate.png
- themes/new/48/add.png
- themes/new/48/update.png
- themes/new/48/contributors.png
- themes/new/48/stop.png
- themes/new/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 1309857c4..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;
diff --git a/companion/src/comparedialog.ui b/companion/src/comparedialog.ui
index 6f11bf138..4a26482b0 100644
--- a/companion/src/comparedialog.ui
+++ b/companion/src/comparedialog.ui
@@ -26,11 +26,7 @@
false
- Dialog
-
-
-
- :/icon.png:/icon.png
+ Compare Models
-
diff --git a/companion/src/contributorsdialog.cpp b/companion/src/contributorsdialog.cpp
index 54d32f9f7..8aefa222b 100644
--- a/companion/src/contributorsdialog.cpp
+++ b/companion/src/contributorsdialog.cpp
@@ -1,6 +1,7 @@
#include "contributorsdialog.h"
#include "ui_contributorsdialog.h"
#include
+#include "helpers.h"
contributorsDialog::contributorsDialog(QWidget *parent, int contest, QString rnurl) :
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
@@ -10,6 +11,7 @@ contributorsDialog::contributorsDialog(QWidget *parent, int contest, QString rnu
switch (contest) {
case 0:
{
+ this->setWindowIcon(CompanionIcon("contributors.png"));
QFile file(":/DONATIONS.txt");
QString str;
str.append("");
@@ -79,6 +81,7 @@ contributorsDialog::contributorsDialog(QWidget *parent, int contest, QString rnu
case 1:
{
+ this->setWindowIcon(CompanionIcon("changelog.png"));
QFile file(":/releasenotes.txt");
if(file.open( QIODevice::ReadOnly | QIODevice::Text ) ) {
ui->textEditor->setHtml(file.readAll());
@@ -91,6 +94,7 @@ contributorsDialog::contributorsDialog(QWidget *parent, int contest, QString rnu
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*)));
diff --git a/companion/src/contributorsdialog.ui b/companion/src/contributorsdialog.ui
index 6ae7866c8..5d7d670c1 100644
--- a/companion/src/contributorsdialog.ui
+++ b/companion/src/contributorsdialog.ui
@@ -13,10 +13,6 @@
Dialog
-
-
- :/icon.png:/icon.png
-
-
diff --git a/companion/src/customizesplashdialog.cpp b/companion/src/customizesplashdialog.cpp
index 420266b7a..bd284a3d6 100644
--- a/companion/src/customizesplashdialog.cpp
+++ b/companion/src/customizesplashdialog.cpp
@@ -143,6 +143,7 @@ customizeSplashDialog::customizeSplashDialog(QWidget *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"));
diff --git a/companion/src/customizesplashdialog.ui b/companion/src/customizesplashdialog.ui
index fa6c57d9f..de4d68f24 100644
--- a/companion/src/customizesplashdialog.ui
+++ b/companion/src/customizesplashdialog.ui
@@ -9,7 +9,7 @@
0
0
- 1086
+ 1087
285
@@ -22,10 +22,6 @@
Transmitter Splash Screen Editor
-
-
- :/icon.png:/icon.png
-
6
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/eeprominterface.cpp b/companion/src/eeprominterface.cpp
index bb2861cf8..d127bb04a 100644
--- a/companion/src/eeprominterface.cpp
+++ b/companion/src/eeprominterface.cpp
@@ -37,6 +37,47 @@ void getEEPROMString(char *dst, const char *src, int size)
}
}
+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);
+}
+
+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;
@@ -992,13 +1033,13 @@ void RegisterEepromInterfaces()
{
QSettings settings;
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));
+ 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 (rev4a)
- eepromInterfaces.push_back(new Open9xInterface(BOARD_TARANIS_REV4a));
+ 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());
@@ -1010,26 +1051,11 @@ 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-9x-heli-templates-en");
-
+ current_firmware_variant = default_firmware_variant;
RegisterEepromInterfaces();
}
@@ -1070,7 +1096,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 13b68339e..a6f1075b2 100644
--- a/companion/src/eeprominterface.h
+++ b/companion/src/eeprominterface.h
@@ -953,7 +953,6 @@ enum Capability {
FlightPhases,
FlightModesName,
FlightPhasesHaveFades,
- SimulatorType,
Mixes,
MixesWithoutExpo,
Timers,
@@ -1062,15 +1061,8 @@ enum Capability {
HasFasOffset,
HasMahPersistent,
MultiposPots,
- MultiposPotsPositions
-};
-
-enum UseContext {
- DefaultContext,
- TimerContext,
- FlightPhaseContext,
- MixerContext,
- ExpoContext,
+ MultiposPotsPositions,
+ SimulatorVariant,
};
class SimulatorInterface;
@@ -1105,7 +1097,7 @@ class EEPROMInterface
virtual int isAvailable(Protocol proto, int port=0) = 0;
- virtual SimulatorInterface * getSimulator() = 0;
+ virtual SimulatorInterface * getSimulator() { return NULL; }
virtual const int getEEpromSize() = 0;
@@ -1127,6 +1119,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) {
diff --git a/companion/src/firmwares/er9x/er9xinterface.cpp b/companion/src/firmwares/er9x/er9xinterface.cpp
index d28b472b2..90df5e51b 100644
--- a/companion/src/firmwares/er9x/er9xinterface.cpp
+++ b/companion/src/firmwares/er9x/er9xinterface.cpp
@@ -303,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/ersky9x/ersky9xinterface.cpp b/companion/src/firmwares/ersky9x/ersky9xinterface.cpp
index dd65c0c92..97ed8fd5b 100644
--- a/companion/src/firmwares/ersky9x/ersky9xinterface.cpp
+++ b/companion/src/firmwares/ersky9x/ersky9xinterface.cpp
@@ -343,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/opentx/opentxGruvin9xsimulator.cpp b/companion/src/firmwares/opentx/opentxGruvin9xsimulator.cpp
index 0d2f07771..fb101b359 100644
--- a/companion/src/firmwares/opentx/opentxGruvin9xsimulator.cpp
+++ b/companion/src/firmwares/opentx/opentxGruvin9xsimulator.cpp
@@ -105,7 +105,7 @@ uint8_t getStickMode()
using namespace Open9xGruvin9x;
-Open9xGruvin9xSimulator::Open9xGruvin9xSimulator(Open9xInterface * open9xInterface):
+Open9xGruvin9xSimulator::Open9xGruvin9xSimulator(OpenTxInterface * open9xInterface):
open9xInterface(open9xInterface)
{
}
@@ -128,15 +128,23 @@ bool Open9xGruvin9xSimulator::lcdChanged(bool & lightEnable)
#include "simulatorimport.h"
}
-void Open9xGruvin9xSimulator::start(RadioData &radioData, bool tests)
+void Open9xGruvin9xSimulator::start(QByteArray & eeprom, bool tests)
{
g_rotenc[0] = 0;
g_rotenc[1] = 0;
- open9xInterface->save(&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 b9f5f294e..dbe13b6d8 100644
--- a/companion/src/firmwares/opentx/opentxSky9xsimulator.cpp
+++ b/companion/src/firmwares/opentx/opentxSky9xsimulator.cpp
@@ -132,7 +132,7 @@ uint8_t getStickMode()
using namespace Open9xSky9x;
-Open9xSky9xSimulator::Open9xSky9xSimulator(Open9xInterface * open9xInterface):
+Open9xSky9xSimulator::Open9xSky9xSimulator(OpenTxInterface * open9xInterface):
open9xInterface(open9xInterface)
{
QSettings settings;
@@ -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 266dd8c7f..4ce1bed6e 100644
--- a/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp
+++ b/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp
@@ -177,7 +177,7 @@ void resetTrims()
using namespace Open9xX9D;
-OpentxTaranisSimulator::OpentxTaranisSimulator(Open9xInterface * open9xInterface):
+OpentxTaranisSimulator::OpentxTaranisSimulator(OpenTxInterface * open9xInterface):
open9xInterface(open9xInterface)
{
taranisSimulatorBoard = GetEepromInterface()->getBoard();
@@ -208,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.h b/companion/src/firmwares/opentx/opentxeeprom.h
index 50421ea0f..3a5f3ffa0 100644
--- a/companion/src/firmwares/opentx/opentxeeprom.h
+++ b/companion/src/firmwares/opentx/opentxeeprom.h
@@ -30,8 +30,6 @@
#define SIMU_STOCK_VARIANTS (GVARS_VARIANT|FRSKY_VARIANT)
#define SIMU_M128_VARIANTS (M128_VARIANT|SIMU_STOCK_VARIANTS)
-#define SIMU_GRUVIN9X_VARIANTS (0)
-#define SIMU_ARM_VARIANTS (0)
#define O9X_MAX_TIMERS 2
#define O9X_MAX_PHASES 5
diff --git a/companion/src/firmwares/opentx/opentxinterface.cpp b/companion/src/firmwares/opentx/opentxinterface.cpp
index 16dbfeca9..420127df4 100644
--- a/companion/src/firmwares/opentx/opentxinterface.cpp
+++ b/companion/src/firmwares/opentx/opentxinterface.cpp
@@ -42,18 +42,18 @@ size_t SizeOfArray( T(&)[ N ] )
return N;
}
-Open9xInterface::Open9xInterface(BoardEnum board):
+OpenTxInterface::OpenTxInterface(BoardEnum board):
EEPROMInterface(board),
efile(new EFile())
{
}
-Open9xInterface::~Open9xInterface()
+OpenTxInterface::~OpenTxInterface()
{
delete efile;
}
-const char * Open9xInterface::getName()
+const char * OpenTxInterface::getName()
{
switch (board) {
case BOARD_STOCK:
@@ -73,7 +73,7 @@ const char * Open9xInterface::getName()
}
}
-const int Open9xInterface::getEEpromSize()
+const int OpenTxInterface::getEEpromSize()
{
switch (board) {
case BOARD_STOCK:
@@ -93,7 +93,7 @@ const int Open9xInterface::getEEpromSize()
}
}
-const int Open9xInterface::getMaxModels()
+const int OpenTxInterface::getMaxModels()
{
if (IS_ARM(board))
return 60;
@@ -106,7 +106,7 @@ const int Open9xInterface::getMaxModels()
}
template
-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;
@@ -139,7 +139,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);
@@ -166,7 +166,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);
@@ -247,7 +247,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);
@@ -263,7 +263,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();
@@ -274,7 +274,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();
@@ -284,12 +284,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, uint8_t *eeprom, int size)
{
std::cout << "trying " << getName() << " import...";
@@ -350,7 +350,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();
@@ -403,7 +403,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;
@@ -426,7 +426,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;
@@ -446,7 +446,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:
@@ -456,11 +456,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;
@@ -687,12 +682,19 @@ int Open9xInterface::getCapability(const Capability capability)
return IS_TARANIS(board) ? 2 : 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) {
@@ -777,7 +779,7 @@ int Open9xInterface::isAvailable(Protocol proto, int port)
}
}
-SimulatorInterface * Open9xInterface::getSimulator()
+SimulatorInterface * OpenTxInterface::getSimulator()
{
switch (board) {
case BOARD_STOCK:
@@ -789,7 +791,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:
@@ -802,7 +803,7 @@ size_t getSizeA(T (&)[SIZE]) {
return SIZE;
}
-bool Open9xInterface::checkVersion(unsigned int version)
+bool OpenTxInterface::checkVersion(unsigned int version)
{
switch(version) {
case 201:
@@ -868,7 +869,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) {
@@ -890,7 +891,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...";
@@ -1015,7 +1016,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-9x", 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"));
@@ -1052,7 +1053,7 @@ void RegisterOpen9xFirmwares()
firmwares.push_back(open9x);
/* 9x board with M128 chip */
- open9x = new Open9xFirmware("opentx-9x128", QObject::tr("OpenTX for M128 / 9X board"), new Open9xInterface(BOARD_M128), geturl(BOARD_M128), getstamp(BOARD_M128),getrnurl(BOARD_M128), false);
+ open9x = 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"));
@@ -1084,7 +1085,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"));
@@ -1118,7 +1119,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"));
@@ -1148,7 +1149,7 @@ void RegisterOpen9xFirmwares()
firmwares.push_back(open9x);
/* Gruvin9x board */
- open9x = new Open9xFirmware("opentx-gruvin9x", QObject::tr("OpenTX for Gruvin9x board / 9X"), new Open9xInterface(BOARD_GRUVIN9X), geturl(BOARD_GRUVIN9X), getstamp(BOARD_GRUVIN9X),getrnurl(BOARD_GRUVIN9X), false);
+ open9x = 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"));
@@ -1178,7 +1179,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"));
@@ -1203,7 +1204,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"));
@@ -1215,7 +1216,7 @@ void RegisterOpen9xFirmwares()
QSettings settings;
int rev4a = settings.value("rev4asupport",0).toInt();
if (rev4a) {
- open9x = new Open9xFirmware("opentx-taranisrev4a", QObject::tr("OpenTX for FrSky Taranis Rev4a"), new Open9xInterface(BOARD_TARANIS_REV4a), geturl(BOARD_TARANIS_REV4a), getstamp(BOARD_TARANIS_REV4a),getrnurl(BOARD_TARANIS), true);
+ 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 fb7f3df5c..aef381164 100644
--- a/companion/src/firmwares/opentx/opentxinterface.h
+++ b/companion/src/firmwares/opentx/opentxinterface.h
@@ -23,13 +23,13 @@
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();
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/th9x/th9xinterface.cpp b/companion/src/firmwares/th9x/th9xinterface.cpp
index 8e3e36ab6..306d83797 100644
--- a/companion/src/firmwares/th9x/th9xinterface.cpp
+++ b/companion/src/firmwares/th9x/th9xinterface.cpp
@@ -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/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 1a32ff96c..f4ffe20bb 100644
--- a/companion/src/fusesdialog.ui
+++ b/companion/src/fusesdialog.ui
@@ -13,10 +13,6 @@
Fuses
-
-
- :/icon.png:/icon.png
-
-
diff --git a/companion/src/generaledit.cpp b/companion/src/generaledit.cpp
index f197eb7b1..ebd443e6b 100644
--- a/companion/src/generaledit.cpp
+++ b/companion/src/generaledit.cpp
@@ -18,7 +18,7 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
g_eeGeneral(radioData.generalSettings)
{
ui->setupUi(this);
- this->setWindowIcon(QIcon(":/icon.png"));
+ this->setWindowIcon(CompanionIcon("open.png"));
QSettings settings;
QString firmware_id = settings.value("firmware", default_firmware_variant.id).toString();
diff --git a/companion/src/generaledit.ui b/companion/src/generaledit.ui
index 5de0449aa..8f66dcab1 100644
--- a/companion/src/generaledit.ui
+++ b/companion/src/generaledit.ui
@@ -19,10 +19,6 @@
General Edit
-
-
- :/icon.png:/icon.png
-
true
@@ -1559,10 +1555,10 @@ Acceptable values are 5v..10v
QLayout::SetMinimumSize
-
+
0
-
+
0
-
diff --git a/companion/src/helpers.cpp b/companion/src/helpers.cpp
index 9a9f2caf4..6b3a54220 100644
--- a/companion/src/helpers.cpp
+++ b/companion/src/helpers.cpp
@@ -1,5 +1,6 @@
#include
#include "helpers.h"
+#include "simulatordialog.h"
QString getPhaseName(int val, char * phasename)
{
@@ -635,24 +636,6 @@ void populateSourceCB(QComboBox *b, const RawSource & source, const ModelData &
b->setMaxVisibleItems(10);
}
-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[] = {
@@ -694,27 +677,6 @@ void populateCSWCB(QComboBox *b, int value)
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())
@@ -930,7 +892,7 @@ QString getTheme()
Theme="monoblue";
break;
default:
- Theme="new";
+ Theme="yerico";
break;
}
return Theme;
@@ -945,3 +907,34 @@ CompanionIcon::CompanionIcon(QString baseimage)
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"));
+ }
+}
diff --git a/companion/src/helpers.h b/companion/src/helpers.h
index ad22a4e7c..fdebcb170 100644
--- a/companion/src/helpers.h
+++ b/companion/src/helpers.h
@@ -109,8 +109,6 @@ void populateSourceCB(QComboBox *b, const RawSource &source, const ModelData & m
void populateCSWCB(QComboBox *b, int value);
QString getPhaseName(int val, char * phasename=NULL);
QString getInputStr(ModelData & model, int index);
-QString getSignedStr(int value);
-QString getGVarString(int16_t val, bool sign=false);
QString image2qstring(QImage image);
QImage qstring2image(QString imagestr);
int findmult(float value, float base);
@@ -128,7 +126,6 @@ QString getFrSkyProtocol(int protocol);
QString getFrSkyMeasure(int units);
QString getFrSkySrc(int index);
-float ValToTim(int value);
-int TimToVal(float value);
+void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx);
#endif // HELPERS_H
diff --git a/companion/src/images/originals/icons New/apppreferences.png b/companion/src/images/originals/icons New/apppreferences.png
deleted file mode 100644
index 597a9f68d..000000000
Binary files a/companion/src/images/originals/icons New/apppreferences.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/compare.png b/companion/src/images/originals/icons New/compare.png
deleted file mode 100644
index 5b7e41c4f..000000000
Binary files a/companion/src/images/originals/icons New/compare.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/configure.png b/companion/src/images/originals/icons New/configure.png
deleted file mode 100644
index ec6fad759..000000000
Binary files a/companion/src/images/originals/icons New/configure.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/copy.png b/companion/src/images/originals/icons New/copy.png
deleted file mode 100644
index 49e9835c0..000000000
Binary files a/companion/src/images/originals/icons New/copy.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/cut.png b/companion/src/images/originals/icons New/cut.png
deleted file mode 100644
index 910dff020..000000000
Binary files a/companion/src/images/originals/icons New/cut.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/fwpreferences.png b/companion/src/images/originals/icons New/fwpreferences.png
deleted file mode 100644
index 7574da86a..000000000
Binary files a/companion/src/images/originals/icons New/fwpreferences.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/information.png b/companion/src/images/originals/icons New/information.png
deleted file mode 100644
index 44c08b858..000000000
Binary files a/companion/src/images/originals/icons New/information.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/logs.png b/companion/src/images/originals/icons New/logs.png
deleted file mode 100644
index 8dc7ce194..000000000
Binary files a/companion/src/images/originals/icons New/logs.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/new.png b/companion/src/images/originals/icons New/new.png
deleted file mode 100644
index 53dd74e30..000000000
Binary files a/companion/src/images/originals/icons New/new.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/open.png b/companion/src/images/originals/icons New/open.png
deleted file mode 100644
index 4bf67c1b0..000000000
Binary files a/companion/src/images/originals/icons New/open.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/paintbrush.png b/companion/src/images/originals/icons New/paintbrush.png
deleted file mode 100644
index 814fdb47e..000000000
Binary files a/companion/src/images/originals/icons New/paintbrush.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/paste.png b/companion/src/images/originals/icons New/paste.png
deleted file mode 100644
index 2198b77c0..000000000
Binary files a/companion/src/images/originals/icons New/paste.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/print.png b/companion/src/images/originals/icons New/print.png
deleted file mode 100644
index 62d994f9e..000000000
Binary files a/companion/src/images/originals/icons New/print.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/profiles.png b/companion/src/images/originals/icons New/profiles.png
deleted file mode 100644
index bfa571cff..000000000
Binary files a/companion/src/images/originals/icons New/profiles.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/read_eeprom.png b/companion/src/images/originals/icons New/read_eeprom.png
deleted file mode 100644
index 08e861b31..000000000
Binary files a/companion/src/images/originals/icons New/read_eeprom.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/read_eeprom_file.png b/companion/src/images/originals/icons New/read_eeprom_file.png
deleted file mode 100644
index 67a41176b..000000000
Binary files a/companion/src/images/originals/icons New/read_eeprom_file.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/read_flash.png b/companion/src/images/originals/icons New/read_flash.png
deleted file mode 100644
index c9065819b..000000000
Binary files a/companion/src/images/originals/icons New/read_flash.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/recentdocument.png b/companion/src/images/originals/icons New/recentdocument.png
deleted file mode 100644
index 87ef05d0e..000000000
Binary files a/companion/src/images/originals/icons New/recentdocument.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/save.png b/companion/src/images/originals/icons New/save.png
deleted file mode 100644
index 20352a4f9..000000000
Binary files a/companion/src/images/originals/icons New/save.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/saveas.png b/companion/src/images/originals/icons New/saveas.png
deleted file mode 100644
index a7d234b20..000000000
Binary files a/companion/src/images/originals/icons New/saveas.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/simulate.png b/companion/src/images/originals/icons New/simulate.png
deleted file mode 100644
index 429e12b9a..000000000
Binary files a/companion/src/images/originals/icons New/simulate.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/update.png b/companion/src/images/originals/icons New/update.png
deleted file mode 100644
index 034ee58e8..000000000
Binary files a/companion/src/images/originals/icons New/update.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/write_eeprom.png b/companion/src/images/originals/icons New/write_eeprom.png
deleted file mode 100644
index 15e58d0a3..000000000
Binary files a/companion/src/images/originals/icons New/write_eeprom.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/write_eeprom_file.png b/companion/src/images/originals/icons New/write_eeprom_file.png
deleted file mode 100644
index 60d7c312e..000000000
Binary files a/companion/src/images/originals/icons New/write_eeprom_file.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/write_flash.png b/companion/src/images/originals/icons New/write_flash.png
deleted file mode 100644
index 1664cb228..000000000
Binary files a/companion/src/images/originals/icons New/write_flash.png and /dev/null differ
diff --git a/companion/src/images/originals/icons New/add.png b/companion/src/images/originals/icons Yerico/add.png
similarity index 100%
rename from companion/src/images/originals/icons New/add.png
rename to companion/src/images/originals/icons Yerico/add.png
diff --git a/companion/src/images/originals/icons New/arrow-left.png b/companion/src/images/originals/icons Yerico/arrow-left.png
similarity index 100%
rename from companion/src/images/originals/icons New/arrow-left.png
rename to companion/src/images/originals/icons Yerico/arrow-left.png
diff --git a/companion/src/images/originals/icons New/arrow-right.png b/companion/src/images/originals/icons Yerico/arrow-right.png
similarity index 100%
rename from companion/src/images/originals/icons New/arrow-right.png
rename to companion/src/images/originals/icons Yerico/arrow-right.png
diff --git a/companion/src/images/originals/icons New/changelog.png b/companion/src/images/originals/icons Yerico/changelog.png
similarity index 100%
rename from companion/src/images/originals/icons New/changelog.png
rename to companion/src/images/originals/icons Yerico/changelog.png
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 New/contributors.png b/companion/src/images/originals/icons Yerico/contributors.png
similarity index 100%
rename from companion/src/images/originals/icons New/contributors.png
rename to companion/src/images/originals/icons Yerico/contributors.png
diff --git a/companion/src/images/originals/icons New/currentmodel.png b/companion/src/images/originals/icons Yerico/currentmodel.png
similarity index 100%
rename from companion/src/images/originals/icons New/currentmodel.png
rename to companion/src/images/originals/icons Yerico/currentmodel.png
diff --git a/companion/src/images/originals/icons New/duplicate.png b/companion/src/images/originals/icons Yerico/duplicate.png
similarity index 100%
rename from companion/src/images/originals/icons New/duplicate.png
rename to companion/src/images/originals/icons Yerico/duplicate.png
diff --git a/companion/src/images/originals/icons New/edit.png b/companion/src/images/originals/icons Yerico/edit.png
similarity index 100%
rename from companion/src/images/originals/icons New/edit.png
rename to companion/src/images/originals/icons Yerico/edit.png
diff --git a/companion/src/images/originals/icons New/exit.png b/companion/src/images/originals/icons Yerico/exit.png
similarity index 100%
rename from companion/src/images/originals/icons New/exit.png
rename to companion/src/images/originals/icons Yerico/exit.png
diff --git a/companion/src/images/originals/icons New/fuses.png b/companion/src/images/originals/icons Yerico/fuses.png
similarity index 100%
rename from companion/src/images/originals/icons New/fuses.png
rename to companion/src/images/originals/icons Yerico/fuses.png
diff --git a/companion/src/images/originals/icons New/library.png b/companion/src/images/originals/icons Yerico/library.png
similarity index 100%
rename from companion/src/images/originals/icons New/library.png
rename to companion/src/images/originals/icons Yerico/library.png
diff --git a/companion/src/images/originals/icons New/list.png b/companion/src/images/originals/icons Yerico/list.png
similarity index 100%
rename from companion/src/images/originals/icons New/list.png
rename to companion/src/images/originals/icons Yerico/list.png
diff --git a/companion/src/images/originals/icons New/movedown.png b/companion/src/images/originals/icons Yerico/movedown.png
similarity index 100%
rename from companion/src/images/originals/icons New/movedown.png
rename to companion/src/images/originals/icons Yerico/movedown.png
diff --git a/companion/src/images/originals/icons New/moveup.png b/companion/src/images/originals/icons Yerico/moveup.png
similarity index 100%
rename from companion/src/images/originals/icons New/moveup.png
rename to companion/src/images/originals/icons Yerico/moveup.png
diff --git a/companion/src/images/originals/icons New/play.png b/companion/src/images/originals/icons Yerico/play.png
similarity index 100%
rename from companion/src/images/originals/icons New/play.png
rename to companion/src/images/originals/icons Yerico/play.png
diff --git a/companion/src/images/originals/icons New/stop.png b/companion/src/images/originals/icons Yerico/stop.png
similarity index 100%
rename from companion/src/images/originals/icons New/stop.png
rename to companion/src/images/originals/icons Yerico/stop.png
diff --git a/companion/src/images/originals/icons New/switch_dir.png b/companion/src/images/originals/icons Yerico/switch_dir.png
similarity index 100%
rename from companion/src/images/originals/icons New/switch_dir.png
rename to companion/src/images/originals/icons Yerico/switch_dir.png
diff --git a/companion/src/images/originals/icons New/wizard.png b/companion/src/images/originals/icons Yerico/wizard.png
similarity index 100%
rename from companion/src/images/originals/icons New/wizard.png
rename to companion/src/images/originals/icons Yerico/wizard.png
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 @@
+
+
+
+
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 @@
+
+
+
+
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 @@
+
+
+
+
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 @@
+
+
+
+
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 @@
+
+
+
+
diff --git a/companion/src/logsdialog.cpp b/companion/src/logsdialog.cpp
index 0c9702239..fe7137506 100644
--- a/companion/src/logsdialog.cpp
+++ b/companion/src/logsdialog.cpp
@@ -1,6 +1,7 @@
#include "logsdialog.h"
#include "ui_logsdialog.h"
#include "qcustomplot.h"
+#include "helpers.h"
#if defined WIN32 || !defined __GNUC__
#include
#else
@@ -14,6 +15,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++)
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 991861451..b553bdb8a 100644
--- a/companion/src/mainwindow.cpp
+++ b/companion/src/mainwindow.cpp
@@ -672,7 +672,7 @@ void MainWindow::openDocURL()
void MainWindow::openFile()
{
QSettings settings;
- 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"), settings.value("lastDir").toString(),tr(EEPROM_FILES_FILTER));
if (!fileName.isEmpty()) {
settings.setValue("lastDir", QFileInfo(fileName).dir().absolutePath());
@@ -1551,6 +1551,7 @@ void MainWindow::about()
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();
@@ -1658,7 +1659,7 @@ void MainWindow::createActions()
QActionGroup *themeAlignGroup = new QActionGroup(this);
classicThemeAct = addAct( themeAlignGroup, tr("Classical"), tr("The classical Companion icon theme"), SLOT(setClassicTheme()));
- newThemeAct = addAct( themeAlignGroup, tr("New"), tr("The new Companion 2 icon theme"), SLOT(setNewTheme()));
+ 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()));
@@ -1763,7 +1764,7 @@ void MainWindow::createMenus()
settingsMenu->addMenu(themeMenu);
themeMenu->addAction(classicThemeAct);
- themeMenu->addAction(newThemeAct);
+ themeMenu->addAction(yericoThemeAct);
themeMenu->addAction(monoThemeAct);
themeMenu->addAction(monoBlueAct);
themeMenu->addAction(monoWhiteAct);
@@ -2026,7 +2027,7 @@ void MainWindow::updateIconThemeActions()
int size = settings.value("theme","1").toInt();
switch (size){
case 0: classicThemeAct->setChecked(true); break;
- case 1: newThemeAct->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;
diff --git a/companion/src/mainwindow.h b/companion/src/mainwindow.h
index 505878ef2..2688a4b62 100644
--- a/companion/src/mainwindow.h
+++ b/companion/src/mainwindow.h
@@ -99,7 +99,7 @@ private slots:
void setTheme(int index);
void setClassicTheme() {setTheme(0);};
- void setNewTheme() {setTheme(1);};
+ void setYericoTheme() {setTheme(1);};
void setMonoWhiteTheme() {setTheme(2);};
void setMonochromeTheme(){setTheme(3);};
void setMonoBlueTheme() {setTheme(4);};
@@ -260,7 +260,7 @@ private:
QAction *profileActs[MAX_PROFILES];
QAction *createProfileAct;
QAction *classicThemeAct;
- QAction *newThemeAct;
+ QAction *yericoThemeAct;
QAction *monoThemeAct;
QAction *monoBlueAct;
QAction *monoWhiteAct;
diff --git a/companion/src/mdichild.cpp b/companion/src/mdichild.cpp
index 97d737d09..69a0a318e 100644
--- a/companion/src/mdichild.cpp
+++ b/companion/src/mdichild.cpp
@@ -48,8 +48,6 @@
#include "generaledit.h"
#include "avroutputdialog.h"
#include "burnconfigdialog.h"
-#include "simulatordialog.h"
-#include "xsimulatordialog.h"
#include "printdialog.h"
#include "burndialog.h"
#include "helpers.h"
@@ -69,6 +67,7 @@ MdiChild::MdiChild():
fileChanged(false)
{
ui->setupUi(this);
+ this->setWindowIcon(CompanionIcon("open.png"));
ui->SimulateTxButton->setIcon(CompanionIcon("simulate.png"));
setAttribute(Qt::WA_DeleteOnClose);
@@ -142,25 +141,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)
@@ -647,22 +628,9 @@ void MdiChild::writeEeprom() // write to Tx
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)
diff --git a/companion/src/mdichild.ui b/companion/src/mdichild.ui
index b2fb21e2f..538e36b74 100644
--- a/companion/src/mdichild.ui
+++ b/companion/src/mdichild.ui
@@ -13,10 +13,6 @@
-
-
- :/icon.png:/icon.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 f9c7abba6..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
-
-
- :/icon.png:/icon.png
-
-
diff --git a/companion/src/modeledit/modeledit.cpp b/companion/src/modeledit/modeledit.cpp
index 9336f913b..0013877c5 100644
--- a/companion/src/modeledit/modeledit.cpp
+++ b/companion/src/modeledit/modeledit.cpp
@@ -107,35 +107,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 = new xsimulatorDialog(this);
- sd->loadParams(*simuData, modelId);
- sd->exec();
- delete sd;
- }
- else {
- simulatorDialog *sd = new simulatorDialog(this);
- sd->loadParams(*simuData, modelId);
- sd->exec();
- delete sd;
- }
- delete simuData;
- }
- else {
- QMessageBox::warning(NULL,
- QObject::tr("Warning"),
- QObject::tr("Simulator for this firmware is not yet available"));
- }
+ RadioData *simuData = new RadioData();
+ simuData->generalSettings = generalSettings;
+ simuData->models[0] = model;
+ startSimulation(this, *simuData, 0);
+ delete simuData;
}
diff --git a/companion/src/printdialog.cpp b/companion/src/printdialog.cpp
index aecd4c088..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;
diff --git a/companion/src/printdialog.ui b/companion/src/printdialog.ui
index 169c33103..c041efd7c 100644
--- a/companion/src/printdialog.ui
+++ b/companion/src/printdialog.ui
@@ -25,10 +25,6 @@
Dialog
-
-
- :/icon.png:/icon.png
-
-
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 100%
rename from companion/src/joystickdialog.cpp
rename to companion/src/simulation/joystickdialog.cpp
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 100%
rename from companion/src/lcdwidget.h
rename to companion/src/simulation/lcdwidget.h
diff --git a/companion/src/simulation/main.cpp b/companion/src/simulation/main.cpp
new file mode 100644
index 000000000..163542a1c
--- /dev/null
+++ b/companion/src/simulation/main.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/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
+
+
+
+
+ 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
+
+ 1
+
+
+ cursorWidget
+ QWidget
+
+ 1
+
+
+ menuWidget
+ QWidget
+
+ 1
+
+
+ mySlider
+ QSlider
+
+
+
+
+
+
+
+
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
+
+
+
+
+ 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
+
+ 1
+
+
+ mySlider
+ QSlider
+
+
+
+ xcursorWidget
+ QWidget
+
+ 1
+
+
+ xmenuWidget
+ QWidget
+
+ 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/simulatordialog.cpp b/companion/src/simulatordialog.cpp
deleted file mode 100644
index 8a26c0ecb..000000000
--- a/companion/src/simulatordialog.cpp
+++ /dev/null
@@ -1,744 +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;
- 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;
- 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(LogicalSwitches);
- 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);
- Trims trims;
- simulator->getTrims(trims);
-
- 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+trims.values[0]/5, 2, 'f', 0));
- ui->leftYPerc->setText(QString("Y %1%").arg((qreal)nodeLeft->getY()*-100+trims.values[1]/5, 2, 'f', 0));
-
- ui->rightXPerc->setText(QString("X %1%").arg((qreal)nodeRight->getX()*100+trims.values[2]/5, 2, 'f', 0));
- ui->rightYPerc->setText(QString("Y %1%").arg((qreal)nodeRight->getY()*-100+trims.values[3]/5, 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 06fc4655e..000000000
--- a/companion/src/simulatordialog.ui
+++ /dev/null
@@ -1,3716 +0,0 @@
-
-
- simulatorDialog
-
-
-
- 0
- 0
- 653
- 590
-
-
-
-
- 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
-
-
-
-
- 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
-
-
-
-
-
- LS1
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS2
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS3
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS4
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS5
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS6
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS7
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS8
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS9
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSA
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSB
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSC
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSD
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSE
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSF
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSG
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSH
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSI
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSJ
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSK
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSL
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSM
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSN
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSO
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSP
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSQ
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSR
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSS
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LST
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSU
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSV
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSW
-
-
- 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
-
- 1
-
-
- cursorWidget
- QWidget
-
- 1
-
-
- menuWidget
- QWidget
-
- 1
-
-
- mySlider
- QSlider
-
-
-
-
-
-
-
-
diff --git a/companion/src/splashlibrary.cpp b/companion/src/splashlibrary.cpp
index 49aef10e4..fe1585236 100644
--- a/companion/src/splashlibrary.cpp
+++ b/companion/src/splashlibrary.cpp
@@ -5,10 +5,12 @@
#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;
diff --git a/companion/src/splashlibrary.ui b/companion/src/splashlibrary.ui
index 9507a2d08..15e1b54a0 100644
--- a/companion/src/splashlibrary.ui
+++ b/companion/src/splashlibrary.ui
@@ -25,10 +25,6 @@
-
-
- :/icon.png:/icon.png
-
-
diff --git a/companion/src/themes/new/16/apppreferences.png b/companion/src/themes/new/16/apppreferences.png
deleted file mode 100644
index a39e89ef9..000000000
Binary files a/companion/src/themes/new/16/apppreferences.png and /dev/null differ
diff --git a/companion/src/themes/new/16/clear.png b/companion/src/themes/new/16/clear.png
deleted file mode 100644
index 7bdad0013..000000000
Binary files a/companion/src/themes/new/16/clear.png and /dev/null differ
diff --git a/companion/src/themes/new/16/compare.png b/companion/src/themes/new/16/compare.png
deleted file mode 100644
index eda5f13b9..000000000
Binary files a/companion/src/themes/new/16/compare.png and /dev/null differ
diff --git a/companion/src/themes/new/16/configure.png b/companion/src/themes/new/16/configure.png
deleted file mode 100644
index a627160f9..000000000
Binary files a/companion/src/themes/new/16/configure.png and /dev/null differ
diff --git a/companion/src/themes/new/16/copy.png b/companion/src/themes/new/16/copy.png
deleted file mode 100644
index 799b8c317..000000000
Binary files a/companion/src/themes/new/16/copy.png and /dev/null differ
diff --git a/companion/src/themes/new/16/cut.png b/companion/src/themes/new/16/cut.png
deleted file mode 100644
index 2701f6896..000000000
Binary files a/companion/src/themes/new/16/cut.png and /dev/null differ
diff --git a/companion/src/themes/new/16/exit.png b/companion/src/themes/new/16/exit.png
deleted file mode 100644
index 47f127f76..000000000
Binary files a/companion/src/themes/new/16/exit.png and /dev/null differ
diff --git a/companion/src/themes/new/16/fuses.png b/companion/src/themes/new/16/fuses.png
deleted file mode 100644
index fea12cc6d..000000000
Binary files a/companion/src/themes/new/16/fuses.png and /dev/null differ
diff --git a/companion/src/themes/new/16/fwpreferences.png b/companion/src/themes/new/16/fwpreferences.png
deleted file mode 100644
index e7a8ea790..000000000
Binary files a/companion/src/themes/new/16/fwpreferences.png and /dev/null differ
diff --git a/companion/src/themes/new/16/information.png b/companion/src/themes/new/16/information.png
deleted file mode 100644
index 1a3cfc535..000000000
Binary files a/companion/src/themes/new/16/information.png and /dev/null differ
diff --git a/companion/src/themes/new/16/logs.png b/companion/src/themes/new/16/logs.png
deleted file mode 100644
index 880923fb6..000000000
Binary files a/companion/src/themes/new/16/logs.png and /dev/null differ
diff --git a/companion/src/themes/new/16/movedown.png b/companion/src/themes/new/16/movedown.png
deleted file mode 100644
index 0c1e7b2bb..000000000
Binary files a/companion/src/themes/new/16/movedown.png and /dev/null differ
diff --git a/companion/src/themes/new/16/moveup.png b/companion/src/themes/new/16/moveup.png
deleted file mode 100644
index 322ed7606..000000000
Binary files a/companion/src/themes/new/16/moveup.png and /dev/null differ
diff --git a/companion/src/themes/new/16/new.png b/companion/src/themes/new/16/new.png
deleted file mode 100644
index d3661a194..000000000
Binary files a/companion/src/themes/new/16/new.png and /dev/null differ
diff --git a/companion/src/themes/new/16/open.png b/companion/src/themes/new/16/open.png
deleted file mode 100644
index 508be299e..000000000
Binary files a/companion/src/themes/new/16/open.png and /dev/null differ
diff --git a/companion/src/themes/new/16/paintbrush.png b/companion/src/themes/new/16/paintbrush.png
deleted file mode 100644
index fc99fd5f2..000000000
Binary files a/companion/src/themes/new/16/paintbrush.png and /dev/null differ
diff --git a/companion/src/themes/new/16/paste.png b/companion/src/themes/new/16/paste.png
deleted file mode 100644
index b434f103c..000000000
Binary files a/companion/src/themes/new/16/paste.png and /dev/null differ
diff --git a/companion/src/themes/new/16/print.png b/companion/src/themes/new/16/print.png
deleted file mode 100644
index 7041c1d4b..000000000
Binary files a/companion/src/themes/new/16/print.png and /dev/null differ
diff --git a/companion/src/themes/new/16/profiles.png b/companion/src/themes/new/16/profiles.png
deleted file mode 100644
index 8343cc5c1..000000000
Binary files a/companion/src/themes/new/16/profiles.png and /dev/null differ
diff --git a/companion/src/themes/new/16/read_eeprom.png b/companion/src/themes/new/16/read_eeprom.png
deleted file mode 100644
index c9ef59ca4..000000000
Binary files a/companion/src/themes/new/16/read_eeprom.png and /dev/null differ
diff --git a/companion/src/themes/new/16/read_eeprom_file.png b/companion/src/themes/new/16/read_eeprom_file.png
deleted file mode 100644
index 7617c17ba..000000000
Binary files a/companion/src/themes/new/16/read_eeprom_file.png and /dev/null differ
diff --git a/companion/src/themes/new/16/read_flash.png b/companion/src/themes/new/16/read_flash.png
deleted file mode 100644
index 3591516de..000000000
Binary files a/companion/src/themes/new/16/read_flash.png and /dev/null differ
diff --git a/companion/src/themes/new/16/recentdocument.png b/companion/src/themes/new/16/recentdocument.png
deleted file mode 100644
index 47cb004d3..000000000
Binary files a/companion/src/themes/new/16/recentdocument.png and /dev/null differ
diff --git a/companion/src/themes/new/16/save.png b/companion/src/themes/new/16/save.png
deleted file mode 100644
index cd0162b61..000000000
Binary files a/companion/src/themes/new/16/save.png and /dev/null differ
diff --git a/companion/src/themes/new/16/saveas.png b/companion/src/themes/new/16/saveas.png
deleted file mode 100644
index 3c3045a47..000000000
Binary files a/companion/src/themes/new/16/saveas.png and /dev/null differ
diff --git a/companion/src/themes/new/16/simulate.png b/companion/src/themes/new/16/simulate.png
deleted file mode 100644
index 94a8a4003..000000000
Binary files a/companion/src/themes/new/16/simulate.png and /dev/null differ
diff --git a/companion/src/themes/new/16/update.png b/companion/src/themes/new/16/update.png
deleted file mode 100644
index 0af079b3f..000000000
Binary files a/companion/src/themes/new/16/update.png and /dev/null differ
diff --git a/companion/src/themes/new/16/write_eeprom.png b/companion/src/themes/new/16/write_eeprom.png
deleted file mode 100644
index 3dd15566a..000000000
Binary files a/companion/src/themes/new/16/write_eeprom.png and /dev/null differ
diff --git a/companion/src/themes/new/16/write_eeprom_file.png b/companion/src/themes/new/16/write_eeprom_file.png
deleted file mode 100644
index efbce2843..000000000
Binary files a/companion/src/themes/new/16/write_eeprom_file.png and /dev/null differ
diff --git a/companion/src/themes/new/16/write_flash.png b/companion/src/themes/new/16/write_flash.png
deleted file mode 100644
index c82b8c9e8..000000000
Binary files a/companion/src/themes/new/16/write_flash.png and /dev/null differ
diff --git a/companion/src/themes/new/24/apppreferences.png b/companion/src/themes/new/24/apppreferences.png
deleted file mode 100644
index 8d81a5191..000000000
Binary files a/companion/src/themes/new/24/apppreferences.png and /dev/null differ
diff --git a/companion/src/themes/new/24/compare.png b/companion/src/themes/new/24/compare.png
deleted file mode 100644
index 2d9e035d8..000000000
Binary files a/companion/src/themes/new/24/compare.png and /dev/null differ
diff --git a/companion/src/themes/new/24/configure.png b/companion/src/themes/new/24/configure.png
deleted file mode 100644
index f3972b18f..000000000
Binary files a/companion/src/themes/new/24/configure.png and /dev/null differ
diff --git a/companion/src/themes/new/24/copy.png b/companion/src/themes/new/24/copy.png
deleted file mode 100644
index b9d6c8c26..000000000
Binary files a/companion/src/themes/new/24/copy.png and /dev/null differ
diff --git a/companion/src/themes/new/24/cut.png b/companion/src/themes/new/24/cut.png
deleted file mode 100644
index 29ca2122f..000000000
Binary files a/companion/src/themes/new/24/cut.png and /dev/null differ
diff --git a/companion/src/themes/new/24/fuses.png b/companion/src/themes/new/24/fuses.png
deleted file mode 100644
index 2620abd66..000000000
Binary files a/companion/src/themes/new/24/fuses.png and /dev/null differ
diff --git a/companion/src/themes/new/24/fwpreferences.png b/companion/src/themes/new/24/fwpreferences.png
deleted file mode 100644
index e62900a4a..000000000
Binary files a/companion/src/themes/new/24/fwpreferences.png and /dev/null differ
diff --git a/companion/src/themes/new/24/information.png b/companion/src/themes/new/24/information.png
deleted file mode 100644
index f94c8d7c1..000000000
Binary files a/companion/src/themes/new/24/information.png and /dev/null differ
diff --git a/companion/src/themes/new/24/logs.png b/companion/src/themes/new/24/logs.png
deleted file mode 100644
index a9c247b27..000000000
Binary files a/companion/src/themes/new/24/logs.png and /dev/null differ
diff --git a/companion/src/themes/new/24/new.png b/companion/src/themes/new/24/new.png
deleted file mode 100644
index 5e419a3b4..000000000
Binary files a/companion/src/themes/new/24/new.png and /dev/null differ
diff --git a/companion/src/themes/new/24/open.png b/companion/src/themes/new/24/open.png
deleted file mode 100644
index 824b3febb..000000000
Binary files a/companion/src/themes/new/24/open.png and /dev/null differ
diff --git a/companion/src/themes/new/24/paintbrush.png b/companion/src/themes/new/24/paintbrush.png
deleted file mode 100644
index de9e1806f..000000000
Binary files a/companion/src/themes/new/24/paintbrush.png and /dev/null differ
diff --git a/companion/src/themes/new/24/paste.png b/companion/src/themes/new/24/paste.png
deleted file mode 100644
index c5444dd67..000000000
Binary files a/companion/src/themes/new/24/paste.png and /dev/null differ
diff --git a/companion/src/themes/new/24/print.png b/companion/src/themes/new/24/print.png
deleted file mode 100644
index d7e15e59c..000000000
Binary files a/companion/src/themes/new/24/print.png and /dev/null differ
diff --git a/companion/src/themes/new/24/profiles.png b/companion/src/themes/new/24/profiles.png
deleted file mode 100644
index 394e8079f..000000000
Binary files a/companion/src/themes/new/24/profiles.png and /dev/null differ
diff --git a/companion/src/themes/new/24/read_eeprom.png b/companion/src/themes/new/24/read_eeprom.png
deleted file mode 100644
index 9a0bbd6b7..000000000
Binary files a/companion/src/themes/new/24/read_eeprom.png and /dev/null differ
diff --git a/companion/src/themes/new/24/read_eeprom_file.png b/companion/src/themes/new/24/read_eeprom_file.png
deleted file mode 100644
index 9f557a3c7..000000000
Binary files a/companion/src/themes/new/24/read_eeprom_file.png and /dev/null differ
diff --git a/companion/src/themes/new/24/read_flash.png b/companion/src/themes/new/24/read_flash.png
deleted file mode 100644
index ed77ff739..000000000
Binary files a/companion/src/themes/new/24/read_flash.png and /dev/null differ
diff --git a/companion/src/themes/new/24/recentdocument.png b/companion/src/themes/new/24/recentdocument.png
deleted file mode 100644
index 26075e8b9..000000000
Binary files a/companion/src/themes/new/24/recentdocument.png and /dev/null differ
diff --git a/companion/src/themes/new/24/save.png b/companion/src/themes/new/24/save.png
deleted file mode 100644
index 173dc986d..000000000
Binary files a/companion/src/themes/new/24/save.png and /dev/null differ
diff --git a/companion/src/themes/new/24/saveas.png b/companion/src/themes/new/24/saveas.png
deleted file mode 100644
index 478c4d2cb..000000000
Binary files a/companion/src/themes/new/24/saveas.png and /dev/null differ
diff --git a/companion/src/themes/new/24/simulate.png b/companion/src/themes/new/24/simulate.png
deleted file mode 100644
index 8bc4db398..000000000
Binary files a/companion/src/themes/new/24/simulate.png and /dev/null differ
diff --git a/companion/src/themes/new/24/update.png b/companion/src/themes/new/24/update.png
deleted file mode 100644
index f50b423b9..000000000
Binary files a/companion/src/themes/new/24/update.png and /dev/null differ
diff --git a/companion/src/themes/new/24/write_eeprom.png b/companion/src/themes/new/24/write_eeprom.png
deleted file mode 100644
index 8591f6f70..000000000
Binary files a/companion/src/themes/new/24/write_eeprom.png and /dev/null differ
diff --git a/companion/src/themes/new/24/write_eeprom_file.png b/companion/src/themes/new/24/write_eeprom_file.png
deleted file mode 100644
index a3cd7898c..000000000
Binary files a/companion/src/themes/new/24/write_eeprom_file.png and /dev/null differ
diff --git a/companion/src/themes/new/24/write_flash.png b/companion/src/themes/new/24/write_flash.png
deleted file mode 100644
index 8ef65965f..000000000
Binary files a/companion/src/themes/new/24/write_flash.png and /dev/null differ
diff --git a/companion/src/themes/new/32/apppreferences.png b/companion/src/themes/new/32/apppreferences.png
deleted file mode 100644
index 13fd76086..000000000
Binary files a/companion/src/themes/new/32/apppreferences.png and /dev/null differ
diff --git a/companion/src/themes/new/32/compare.png b/companion/src/themes/new/32/compare.png
deleted file mode 100644
index 4cf84e940..000000000
Binary files a/companion/src/themes/new/32/compare.png and /dev/null differ
diff --git a/companion/src/themes/new/32/configure.png b/companion/src/themes/new/32/configure.png
deleted file mode 100644
index 9fd4c2cd9..000000000
Binary files a/companion/src/themes/new/32/configure.png and /dev/null differ
diff --git a/companion/src/themes/new/32/copy.png b/companion/src/themes/new/32/copy.png
deleted file mode 100644
index ab899087c..000000000
Binary files a/companion/src/themes/new/32/copy.png and /dev/null differ
diff --git a/companion/src/themes/new/32/cut.png b/companion/src/themes/new/32/cut.png
deleted file mode 100644
index 89ce23045..000000000
Binary files a/companion/src/themes/new/32/cut.png and /dev/null differ
diff --git a/companion/src/themes/new/32/fuses.png b/companion/src/themes/new/32/fuses.png
deleted file mode 100644
index e229989bb..000000000
Binary files a/companion/src/themes/new/32/fuses.png and /dev/null differ
diff --git a/companion/src/themes/new/32/fwpreferences.png b/companion/src/themes/new/32/fwpreferences.png
deleted file mode 100644
index 42e933b33..000000000
Binary files a/companion/src/themes/new/32/fwpreferences.png and /dev/null differ
diff --git a/companion/src/themes/new/32/information.png b/companion/src/themes/new/32/information.png
deleted file mode 100644
index 48bf9f6f3..000000000
Binary files a/companion/src/themes/new/32/information.png and /dev/null differ
diff --git a/companion/src/themes/new/32/logs.png b/companion/src/themes/new/32/logs.png
deleted file mode 100644
index 11af72b25..000000000
Binary files a/companion/src/themes/new/32/logs.png and /dev/null differ
diff --git a/companion/src/themes/new/32/new.png b/companion/src/themes/new/32/new.png
deleted file mode 100644
index ee5d22a8c..000000000
Binary files a/companion/src/themes/new/32/new.png and /dev/null differ
diff --git a/companion/src/themes/new/32/open.png b/companion/src/themes/new/32/open.png
deleted file mode 100644
index 04914678f..000000000
Binary files a/companion/src/themes/new/32/open.png and /dev/null differ
diff --git a/companion/src/themes/new/32/paintbrush.png b/companion/src/themes/new/32/paintbrush.png
deleted file mode 100644
index 33d2249c0..000000000
Binary files a/companion/src/themes/new/32/paintbrush.png and /dev/null differ
diff --git a/companion/src/themes/new/32/paste.png b/companion/src/themes/new/32/paste.png
deleted file mode 100644
index c89889787..000000000
Binary files a/companion/src/themes/new/32/paste.png and /dev/null differ
diff --git a/companion/src/themes/new/32/print.png b/companion/src/themes/new/32/print.png
deleted file mode 100644
index ad2b82844..000000000
Binary files a/companion/src/themes/new/32/print.png and /dev/null differ
diff --git a/companion/src/themes/new/32/profiles.png b/companion/src/themes/new/32/profiles.png
deleted file mode 100644
index 03fab9601..000000000
Binary files a/companion/src/themes/new/32/profiles.png and /dev/null differ
diff --git a/companion/src/themes/new/32/read_eeprom.png b/companion/src/themes/new/32/read_eeprom.png
deleted file mode 100644
index 9e1aa0e2a..000000000
Binary files a/companion/src/themes/new/32/read_eeprom.png and /dev/null differ
diff --git a/companion/src/themes/new/32/read_eeprom_file.png b/companion/src/themes/new/32/read_eeprom_file.png
deleted file mode 100644
index 6c6997046..000000000
Binary files a/companion/src/themes/new/32/read_eeprom_file.png and /dev/null differ
diff --git a/companion/src/themes/new/32/read_flash.png b/companion/src/themes/new/32/read_flash.png
deleted file mode 100644
index 2ebd0f34b..000000000
Binary files a/companion/src/themes/new/32/read_flash.png and /dev/null differ
diff --git a/companion/src/themes/new/32/recentdocument.png b/companion/src/themes/new/32/recentdocument.png
deleted file mode 100644
index 3f43a784e..000000000
Binary files a/companion/src/themes/new/32/recentdocument.png and /dev/null differ
diff --git a/companion/src/themes/new/32/save.png b/companion/src/themes/new/32/save.png
deleted file mode 100644
index 05137c83f..000000000
Binary files a/companion/src/themes/new/32/save.png and /dev/null differ
diff --git a/companion/src/themes/new/32/saveas.png b/companion/src/themes/new/32/saveas.png
deleted file mode 100644
index 03c953632..000000000
Binary files a/companion/src/themes/new/32/saveas.png and /dev/null differ
diff --git a/companion/src/themes/new/32/simulate.png b/companion/src/themes/new/32/simulate.png
deleted file mode 100644
index c67e7cb99..000000000
Binary files a/companion/src/themes/new/32/simulate.png and /dev/null differ
diff --git a/companion/src/themes/new/32/update.png b/companion/src/themes/new/32/update.png
deleted file mode 100644
index 9f57be2d7..000000000
Binary files a/companion/src/themes/new/32/update.png and /dev/null differ
diff --git a/companion/src/themes/new/32/write_eeprom.png b/companion/src/themes/new/32/write_eeprom.png
deleted file mode 100644
index 005766b0b..000000000
Binary files a/companion/src/themes/new/32/write_eeprom.png and /dev/null differ
diff --git a/companion/src/themes/new/32/write_eeprom_file.png b/companion/src/themes/new/32/write_eeprom_file.png
deleted file mode 100644
index 1ead1095b..000000000
Binary files a/companion/src/themes/new/32/write_eeprom_file.png and /dev/null differ
diff --git a/companion/src/themes/new/32/write_flash.png b/companion/src/themes/new/32/write_flash.png
deleted file mode 100644
index 231b72041..000000000
Binary files a/companion/src/themes/new/32/write_flash.png and /dev/null differ
diff --git a/companion/src/themes/new/48/apppreferences.png b/companion/src/themes/new/48/apppreferences.png
deleted file mode 100644
index be06b9a3f..000000000
Binary files a/companion/src/themes/new/48/apppreferences.png and /dev/null differ
diff --git a/companion/src/themes/new/48/clear.png b/companion/src/themes/new/48/clear.png
deleted file mode 100644
index 445702cc8..000000000
Binary files a/companion/src/themes/new/48/clear.png and /dev/null differ
diff --git a/companion/src/themes/new/48/compare.png b/companion/src/themes/new/48/compare.png
deleted file mode 100644
index 499c40192..000000000
Binary files a/companion/src/themes/new/48/compare.png and /dev/null differ
diff --git a/companion/src/themes/new/48/configure.png b/companion/src/themes/new/48/configure.png
deleted file mode 100644
index 9b0506ed5..000000000
Binary files a/companion/src/themes/new/48/configure.png and /dev/null differ
diff --git a/companion/src/themes/new/48/copy.png b/companion/src/themes/new/48/copy.png
deleted file mode 100644
index 49e9835c0..000000000
Binary files a/companion/src/themes/new/48/copy.png and /dev/null differ
diff --git a/companion/src/themes/new/48/cut.png b/companion/src/themes/new/48/cut.png
deleted file mode 100644
index e8c987802..000000000
Binary files a/companion/src/themes/new/48/cut.png and /dev/null differ
diff --git a/companion/src/themes/new/48/fuses.png b/companion/src/themes/new/48/fuses.png
deleted file mode 100644
index f5cf7e680..000000000
Binary files a/companion/src/themes/new/48/fuses.png and /dev/null differ
diff --git a/companion/src/themes/new/48/fwpreferences.png b/companion/src/themes/new/48/fwpreferences.png
deleted file mode 100644
index 4198f7553..000000000
Binary files a/companion/src/themes/new/48/fwpreferences.png and /dev/null differ
diff --git a/companion/src/themes/new/48/information.png b/companion/src/themes/new/48/information.png
deleted file mode 100644
index d7cb2c224..000000000
Binary files a/companion/src/themes/new/48/information.png and /dev/null differ
diff --git a/companion/src/themes/new/48/logs.png b/companion/src/themes/new/48/logs.png
deleted file mode 100644
index 55c6f8d0b..000000000
Binary files a/companion/src/themes/new/48/logs.png and /dev/null differ
diff --git a/companion/src/themes/new/48/new.png b/companion/src/themes/new/48/new.png
deleted file mode 100644
index 53dd74e30..000000000
Binary files a/companion/src/themes/new/48/new.png and /dev/null differ
diff --git a/companion/src/themes/new/48/open.png b/companion/src/themes/new/48/open.png
deleted file mode 100644
index 590e37acf..000000000
Binary files a/companion/src/themes/new/48/open.png and /dev/null differ
diff --git a/companion/src/themes/new/48/paintbrush.png b/companion/src/themes/new/48/paintbrush.png
deleted file mode 100644
index 8f90906c7..000000000
Binary files a/companion/src/themes/new/48/paintbrush.png and /dev/null differ
diff --git a/companion/src/themes/new/48/paste.png b/companion/src/themes/new/48/paste.png
deleted file mode 100644
index 2198b77c0..000000000
Binary files a/companion/src/themes/new/48/paste.png and /dev/null differ
diff --git a/companion/src/themes/new/48/print.png b/companion/src/themes/new/48/print.png
deleted file mode 100644
index 5586786e2..000000000
Binary files a/companion/src/themes/new/48/print.png and /dev/null differ
diff --git a/companion/src/themes/new/48/profiles.png b/companion/src/themes/new/48/profiles.png
deleted file mode 100644
index 52721bd5f..000000000
Binary files a/companion/src/themes/new/48/profiles.png and /dev/null differ
diff --git a/companion/src/themes/new/48/read_eeprom.png b/companion/src/themes/new/48/read_eeprom.png
deleted file mode 100644
index a7ef5d2c0..000000000
Binary files a/companion/src/themes/new/48/read_eeprom.png and /dev/null differ
diff --git a/companion/src/themes/new/48/read_eeprom_file.png b/companion/src/themes/new/48/read_eeprom_file.png
deleted file mode 100644
index fdd2e5588..000000000
Binary files a/companion/src/themes/new/48/read_eeprom_file.png and /dev/null differ
diff --git a/companion/src/themes/new/48/read_flash.png b/companion/src/themes/new/48/read_flash.png
deleted file mode 100644
index 0b5440588..000000000
Binary files a/companion/src/themes/new/48/read_flash.png and /dev/null differ
diff --git a/companion/src/themes/new/48/recentdocument.png b/companion/src/themes/new/48/recentdocument.png
deleted file mode 100644
index 95510e14f..000000000
Binary files a/companion/src/themes/new/48/recentdocument.png and /dev/null differ
diff --git a/companion/src/themes/new/48/save.png b/companion/src/themes/new/48/save.png
deleted file mode 100644
index 20352a4f9..000000000
Binary files a/companion/src/themes/new/48/save.png and /dev/null differ
diff --git a/companion/src/themes/new/48/saveas.png b/companion/src/themes/new/48/saveas.png
deleted file mode 100644
index f44fdb0b7..000000000
Binary files a/companion/src/themes/new/48/saveas.png and /dev/null differ
diff --git a/companion/src/themes/new/48/simulate.png b/companion/src/themes/new/48/simulate.png
deleted file mode 100644
index e9c338619..000000000
Binary files a/companion/src/themes/new/48/simulate.png and /dev/null differ
diff --git a/companion/src/themes/new/48/update.png b/companion/src/themes/new/48/update.png
deleted file mode 100644
index 27112e871..000000000
Binary files a/companion/src/themes/new/48/update.png and /dev/null differ
diff --git a/companion/src/themes/new/48/write_eeprom.png b/companion/src/themes/new/48/write_eeprom.png
deleted file mode 100644
index 1c873f8e0..000000000
Binary files a/companion/src/themes/new/48/write_eeprom.png and /dev/null differ
diff --git a/companion/src/themes/new/48/write_eeprom_file.png b/companion/src/themes/new/48/write_eeprom_file.png
deleted file mode 100644
index 57804bd68..000000000
Binary files a/companion/src/themes/new/48/write_eeprom_file.png and /dev/null differ
diff --git a/companion/src/themes/new/48/write_flash.png b/companion/src/themes/new/48/write_flash.png
deleted file mode 100644
index 3600b5e37..000000000
Binary files a/companion/src/themes/new/48/write_flash.png and /dev/null differ
diff --git a/companion/src/themes/new/16/add.png b/companion/src/themes/yerico/16/add.png
similarity index 100%
rename from companion/src/themes/new/16/add.png
rename to companion/src/themes/yerico/16/add.png
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/new/16/arrow-left.png b/companion/src/themes/yerico/16/arrow-left.png
similarity index 100%
rename from companion/src/themes/new/16/arrow-left.png
rename to companion/src/themes/yerico/16/arrow-left.png
diff --git a/companion/src/themes/new/16/arrow-right.png b/companion/src/themes/yerico/16/arrow-right.png
similarity index 100%
rename from companion/src/themes/new/16/arrow-right.png
rename to companion/src/themes/yerico/16/arrow-right.png
diff --git a/companion/src/themes/new/16/changelog.png b/companion/src/themes/yerico/16/changelog.png
similarity index 100%
rename from companion/src/themes/new/16/changelog.png
rename to companion/src/themes/yerico/16/changelog.png
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/new/16/contributors.png b/companion/src/themes/yerico/16/contributors.png
similarity index 100%
rename from companion/src/themes/new/16/contributors.png
rename to companion/src/themes/yerico/16/contributors.png
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/new/16/currentmodel.png b/companion/src/themes/yerico/16/currentmodel.png
similarity index 100%
rename from companion/src/themes/new/16/currentmodel.png
rename to companion/src/themes/yerico/16/currentmodel.png
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/new/16/duplicate.png b/companion/src/themes/yerico/16/duplicate.png
similarity index 100%
rename from companion/src/themes/new/16/duplicate.png
rename to companion/src/themes/yerico/16/duplicate.png
diff --git a/companion/src/themes/new/16/edit.png b/companion/src/themes/yerico/16/edit.png
similarity index 100%
rename from companion/src/themes/new/16/edit.png
rename to companion/src/themes/yerico/16/edit.png
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/new/16/library.png b/companion/src/themes/yerico/16/library.png
similarity index 100%
rename from companion/src/themes/new/16/library.png
rename to companion/src/themes/yerico/16/library.png
diff --git a/companion/src/themes/new/16/list.png b/companion/src/themes/yerico/16/list.png
similarity index 100%
rename from companion/src/themes/new/16/list.png
rename to companion/src/themes/yerico/16/list.png
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/new/16/play.png b/companion/src/themes/yerico/16/play.png
similarity index 100%
rename from companion/src/themes/new/16/play.png
rename to companion/src/themes/yerico/16/play.png
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/new/16/stop.png b/companion/src/themes/yerico/16/stop.png
similarity index 100%
rename from companion/src/themes/new/16/stop.png
rename to companion/src/themes/yerico/16/stop.png
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/new/16/wizard.png b/companion/src/themes/yerico/16/wizard.png
similarity index 100%
rename from companion/src/themes/new/16/wizard.png
rename to companion/src/themes/yerico/16/wizard.png
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/new/24/add.png b/companion/src/themes/yerico/24/add.png
similarity index 100%
rename from companion/src/themes/new/24/add.png
rename to companion/src/themes/yerico/24/add.png
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/new/24/arrow-left.png b/companion/src/themes/yerico/24/arrow-left.png
similarity index 100%
rename from companion/src/themes/new/24/arrow-left.png
rename to companion/src/themes/yerico/24/arrow-left.png
diff --git a/companion/src/themes/new/24/arrow-right.png b/companion/src/themes/yerico/24/arrow-right.png
similarity index 100%
rename from companion/src/themes/new/24/arrow-right.png
rename to companion/src/themes/yerico/24/arrow-right.png
diff --git a/companion/src/themes/new/24/changelog.png b/companion/src/themes/yerico/24/changelog.png
similarity index 100%
rename from companion/src/themes/new/24/changelog.png
rename to companion/src/themes/yerico/24/changelog.png
diff --git a/companion/src/themes/new/24/clear.png b/companion/src/themes/yerico/24/clear.png
similarity index 100%
rename from companion/src/themes/new/24/clear.png
rename to companion/src/themes/yerico/24/clear.png
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/new/24/contributors.png b/companion/src/themes/yerico/24/contributors.png
similarity index 100%
rename from companion/src/themes/new/24/contributors.png
rename to companion/src/themes/yerico/24/contributors.png
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/new/24/currentmodel.png b/companion/src/themes/yerico/24/currentmodel.png
similarity index 100%
rename from companion/src/themes/new/24/currentmodel.png
rename to companion/src/themes/yerico/24/currentmodel.png
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/new/24/duplicate.png b/companion/src/themes/yerico/24/duplicate.png
similarity index 100%
rename from companion/src/themes/new/24/duplicate.png
rename to companion/src/themes/yerico/24/duplicate.png
diff --git a/companion/src/themes/new/24/edit.png b/companion/src/themes/yerico/24/edit.png
similarity index 100%
rename from companion/src/themes/new/24/edit.png
rename to companion/src/themes/yerico/24/edit.png
diff --git a/companion/src/themes/new/24/exit.png b/companion/src/themes/yerico/24/exit.png
similarity index 100%
rename from companion/src/themes/new/24/exit.png
rename to companion/src/themes/yerico/24/exit.png
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/new/24/library.png b/companion/src/themes/yerico/24/library.png
similarity index 100%
rename from companion/src/themes/new/24/library.png
rename to companion/src/themes/yerico/24/library.png
diff --git a/companion/src/themes/new/24/list.png b/companion/src/themes/yerico/24/list.png
similarity index 100%
rename from companion/src/themes/new/24/list.png
rename to companion/src/themes/yerico/24/list.png
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/new/24/movedown.png b/companion/src/themes/yerico/24/movedown.png
similarity index 100%
rename from companion/src/themes/new/24/movedown.png
rename to companion/src/themes/yerico/24/movedown.png
diff --git a/companion/src/themes/new/24/moveup.png b/companion/src/themes/yerico/24/moveup.png
similarity index 100%
rename from companion/src/themes/new/24/moveup.png
rename to companion/src/themes/yerico/24/moveup.png
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/new/24/play.png b/companion/src/themes/yerico/24/play.png
similarity index 100%
rename from companion/src/themes/new/24/play.png
rename to companion/src/themes/yerico/24/play.png
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/new/24/stop.png b/companion/src/themes/yerico/24/stop.png
similarity index 100%
rename from companion/src/themes/new/24/stop.png
rename to companion/src/themes/yerico/24/stop.png
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/new/24/wizard.png b/companion/src/themes/yerico/24/wizard.png
similarity index 100%
rename from companion/src/themes/new/24/wizard.png
rename to companion/src/themes/yerico/24/wizard.png
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/new/32/add.png b/companion/src/themes/yerico/32/add.png
similarity index 100%
rename from companion/src/themes/new/32/add.png
rename to companion/src/themes/yerico/32/add.png
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/new/32/arrow-left.png b/companion/src/themes/yerico/32/arrow-left.png
similarity index 100%
rename from companion/src/themes/new/32/arrow-left.png
rename to companion/src/themes/yerico/32/arrow-left.png
diff --git a/companion/src/themes/new/32/arrow-right.png b/companion/src/themes/yerico/32/arrow-right.png
similarity index 100%
rename from companion/src/themes/new/32/arrow-right.png
rename to companion/src/themes/yerico/32/arrow-right.png
diff --git a/companion/src/themes/new/32/changelog.png b/companion/src/themes/yerico/32/changelog.png
similarity index 100%
rename from companion/src/themes/new/32/changelog.png
rename to companion/src/themes/yerico/32/changelog.png
diff --git a/companion/src/themes/new/32/clear.png b/companion/src/themes/yerico/32/clear.png
similarity index 100%
rename from companion/src/themes/new/32/clear.png
rename to companion/src/themes/yerico/32/clear.png
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/new/32/contributors.png b/companion/src/themes/yerico/32/contributors.png
similarity index 100%
rename from companion/src/themes/new/32/contributors.png
rename to companion/src/themes/yerico/32/contributors.png
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/new/32/currentmodel.png b/companion/src/themes/yerico/32/currentmodel.png
similarity index 100%
rename from companion/src/themes/new/32/currentmodel.png
rename to companion/src/themes/yerico/32/currentmodel.png
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/new/32/duplicate.png b/companion/src/themes/yerico/32/duplicate.png
similarity index 100%
rename from companion/src/themes/new/32/duplicate.png
rename to companion/src/themes/yerico/32/duplicate.png
diff --git a/companion/src/themes/new/32/edit.png b/companion/src/themes/yerico/32/edit.png
similarity index 100%
rename from companion/src/themes/new/32/edit.png
rename to companion/src/themes/yerico/32/edit.png
diff --git a/companion/src/themes/new/32/exit.png b/companion/src/themes/yerico/32/exit.png
similarity index 100%
rename from companion/src/themes/new/32/exit.png
rename to companion/src/themes/yerico/32/exit.png
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/new/32/library.png b/companion/src/themes/yerico/32/library.png
similarity index 100%
rename from companion/src/themes/new/32/library.png
rename to companion/src/themes/yerico/32/library.png
diff --git a/companion/src/themes/new/32/list.png b/companion/src/themes/yerico/32/list.png
similarity index 100%
rename from companion/src/themes/new/32/list.png
rename to companion/src/themes/yerico/32/list.png
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/new/32/movedown.png b/companion/src/themes/yerico/32/movedown.png
similarity index 100%
rename from companion/src/themes/new/32/movedown.png
rename to companion/src/themes/yerico/32/movedown.png
diff --git a/companion/src/themes/new/32/moveup.png b/companion/src/themes/yerico/32/moveup.png
similarity index 100%
rename from companion/src/themes/new/32/moveup.png
rename to companion/src/themes/yerico/32/moveup.png
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/new/32/play.png b/companion/src/themes/yerico/32/play.png
similarity index 100%
rename from companion/src/themes/new/32/play.png
rename to companion/src/themes/yerico/32/play.png
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/new/32/stop.png b/companion/src/themes/yerico/32/stop.png
similarity index 100%
rename from companion/src/themes/new/32/stop.png
rename to companion/src/themes/yerico/32/stop.png
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/new/32/wizard.png b/companion/src/themes/yerico/32/wizard.png
similarity index 100%
rename from companion/src/themes/new/32/wizard.png
rename to companion/src/themes/yerico/32/wizard.png
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/new/48/add.png b/companion/src/themes/yerico/48/add.png
similarity index 100%
rename from companion/src/themes/new/48/add.png
rename to companion/src/themes/yerico/48/add.png
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/new/48/arrow-left.png b/companion/src/themes/yerico/48/arrow-left.png
similarity index 100%
rename from companion/src/themes/new/48/arrow-left.png
rename to companion/src/themes/yerico/48/arrow-left.png
diff --git a/companion/src/themes/new/48/arrow-right.png b/companion/src/themes/yerico/48/arrow-right.png
similarity index 100%
rename from companion/src/themes/new/48/arrow-right.png
rename to companion/src/themes/yerico/48/arrow-right.png
diff --git a/companion/src/themes/new/48/changelog.png b/companion/src/themes/yerico/48/changelog.png
similarity index 100%
rename from companion/src/themes/new/48/changelog.png
rename to companion/src/themes/yerico/48/changelog.png
diff --git a/companion/src/images/originals/icons New/clear.png b/companion/src/themes/yerico/48/clear.png
similarity index 100%
rename from companion/src/images/originals/icons New/clear.png
rename to companion/src/themes/yerico/48/clear.png
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/new/48/contributors.png b/companion/src/themes/yerico/48/contributors.png
similarity index 100%
rename from companion/src/themes/new/48/contributors.png
rename to companion/src/themes/yerico/48/contributors.png
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/new/48/currentmodel.png b/companion/src/themes/yerico/48/currentmodel.png
similarity index 100%
rename from companion/src/themes/new/48/currentmodel.png
rename to companion/src/themes/yerico/48/currentmodel.png
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/new/48/duplicate.png b/companion/src/themes/yerico/48/duplicate.png
similarity index 100%
rename from companion/src/themes/new/48/duplicate.png
rename to companion/src/themes/yerico/48/duplicate.png
diff --git a/companion/src/themes/new/48/edit.png b/companion/src/themes/yerico/48/edit.png
similarity index 100%
rename from companion/src/themes/new/48/edit.png
rename to companion/src/themes/yerico/48/edit.png
diff --git a/companion/src/themes/new/48/exit.png b/companion/src/themes/yerico/48/exit.png
similarity index 100%
rename from companion/src/themes/new/48/exit.png
rename to companion/src/themes/yerico/48/exit.png
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/new/48/library.png b/companion/src/themes/yerico/48/library.png
similarity index 100%
rename from companion/src/themes/new/48/library.png
rename to companion/src/themes/yerico/48/library.png
diff --git a/companion/src/themes/new/48/list.png b/companion/src/themes/yerico/48/list.png
similarity index 100%
rename from companion/src/themes/new/48/list.png
rename to companion/src/themes/yerico/48/list.png
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/new/48/movedown.png b/companion/src/themes/yerico/48/movedown.png
similarity index 100%
rename from companion/src/themes/new/48/movedown.png
rename to companion/src/themes/yerico/48/movedown.png
diff --git a/companion/src/themes/new/48/moveup.png b/companion/src/themes/yerico/48/moveup.png
similarity index 100%
rename from companion/src/themes/new/48/moveup.png
rename to companion/src/themes/yerico/48/moveup.png
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/new/48/play.png b/companion/src/themes/yerico/48/play.png
similarity index 100%
rename from companion/src/themes/new/48/play.png
rename to companion/src/themes/yerico/48/play.png
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/new/48/stop.png b/companion/src/themes/yerico/48/stop.png
similarity index 100%
rename from companion/src/themes/new/48/stop.png
rename to companion/src/themes/yerico/48/stop.png
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/new/48/wizard.png b/companion/src/themes/yerico/48/wizard.png
similarity index 100%
rename from companion/src/themes/new/48/wizard.png
rename to companion/src/themes/yerico/48/wizard.png
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/xsimulatordialog.cpp b/companion/src/xsimulatordialog.cpp
deleted file mode 100644
index 07524bb04..000000000
--- a/companion/src/xsimulatordialog.cpp
+++ /dev/null
@@ -1,638 +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;
- 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;
- 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);
-
- Trims trims;
- simulator->getTrims(trims);
-
- 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+trims.values[0]/5, 2, 'f', 0));
- ui->leftYPerc->setText(QString("Y %1%").arg((qreal)nodeLeft->getY()*-100+trims.values[1]/5, 2, 'f', 0));
-
- ui->rightXPerc->setText(QString("X %1%").arg((qreal)nodeRight->getX()*100+trims.values[2]/5, 2, 'f', 0));
- ui->rightYPerc->setText(QString("Y %1%").arg((qreal)nodeRight->getY()*-100+trims.values[3]/5, 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 b1b5b4859..000000000
--- a/companion/src/xsimulatordialog.ui
+++ /dev/null
@@ -1,3907 +0,0 @@
-
-
- xsimulatorDialog
-
-
-
- 0
- 0
- 705
- 665
-
-
-
-
- 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
-
-
-
-
- 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
-
-
-
-
-
- LSK
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSC
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSD
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS7
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSL
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSB
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS1
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSH
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSG
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSE
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSF
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS8
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS9
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSA
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSM
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSJ
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSI
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS4
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS5
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS2
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS3
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LS6
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSN
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSO
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSP
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSQ
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSR
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSS
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LST
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSU
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSV
-
-
- Qt::AlignCenter
-
-
-
-
-
-
- -
-
-
- true
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- 2
-
-
-
- 2
-
-
-
-
-
- LSW
-
-
- Qt::AlignCenter
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- mySlider
- QSlider
-
-
-
- xcursorWidget
- QWidget
-
- 1
-
-
- xmenuWidget
- QWidget
-
- 1
-
-
- lcdWidget
- QWidget
-
- 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/src/audio_avr.h b/radio/src/audio_avr.h
index ba5e9653a..6302c13f4 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))
diff --git a/radio/src/buzzer.h b/radio/src/buzzer.h
index 4f89e78cb..cbb4d5717 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)
diff --git a/radio/src/gui/menu_model.cpp b/radio/src/gui/menu_model.cpp
index 5834962fd..fb944f588 100644
--- a/radio/src/gui/menu_model.cpp
+++ b/radio/src/gui/menu_model.cpp
@@ -5181,7 +5181,7 @@ 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);
@@ -5669,7 +5669,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;
@@ -5680,7 +5680,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;
diff --git a/radio/src/gui/view_telemetry.cpp b/radio/src/gui/view_telemetry.cpp
index 9e9c100c6..bc6faba85 100644
--- a/radio/src/gui/view_telemetry.cpp
+++ b/radio/src/gui/view_telemetry.cpp
@@ -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/maths.cpp b/radio/src/maths.cpp
index 1b87e4437..7010444a5 100644
--- a/radio/src/maths.cpp
+++ b/radio/src/maths.cpp
@@ -171,7 +171,7 @@ void varioWakeup()
if (isFunctionActive(FUNCTION_VARIO)) {
#if defined(AUDIO)
cli();
- int verticalSpeed = frskyData.hub.varioSpeed;
+ int16_t verticalSpeed = frskyData.hub.varioSpeed;
sei();
#if defined(PCBSTD)
diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp
index 1ddbbf449..3fbd2d5e6 100644
--- a/radio/src/opentx.cpp
+++ b/radio/src/opentx.cpp
@@ -1280,7 +1280,7 @@ getvalue_t getValue(uint8_t i)
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_SPEED) return TELEMETRY_GPS_SPEED_BP;
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_DIST) return frskyData.hub.gpsDistance;
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_GPSALT) return TELEMETRY_GPS_ALT_BP;
- else if (i==MIXSRC_FIRST_TELEM-1+TELEM_CELL) return (int16_t)frskyData.hub.minCellVolts * 2;
+ else if (i==MIXSRC_FIRST_TELEM-1+TELEM_CELL) return (int16_t)TELEMETRY_MIN_CELL_VOLTAGE;
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_CELLS_SUM) return (int16_t)frskyData.hub.cellsSum;
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_VFAS) return (int16_t)frskyData.hub.vfas;
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_CURRENT) return (int16_t)frskyData.hub.current;
@@ -3254,7 +3254,7 @@ void evalFunctions()
bool active = getSwitch(swtch);
if (HAS_ENABLE_PARAM(CFN_FUNC(sd))) {
- active &= CFN_ACTIVE(sd);
+ active &= (bool)CFN_ACTIVE(sd);
}
if (active || IS_PLAY_BOTH_FUNC(CFN_FUNC(sd))) {
diff --git a/radio/src/simpgmspace.cpp b/radio/src/simpgmspace.cpp
index cd3fb4803..b8e57a5ba 100644
--- a/radio/src/simpgmspace.cpp
+++ b/radio/src/simpgmspace.cpp
@@ -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__
@@ -495,7 +495,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;
}
diff --git a/radio/src/telemetry/frsky.h b/radio/src/telemetry/frsky.h
index 440e2b0e5..5acce01ac 100644
--- a/radio/src/telemetry/frsky.h
+++ b/radio/src/telemetry/frsky.h
@@ -221,29 +221,31 @@ 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_CELL_VOLTAGE(k) (frskyData.hub.cellVolts[k] * 2)
+#define TELEMETRY_MIN_CELL_VOLTAGE (frskyData.hub.minCellVolts * 2)
+#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, 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_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)
#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 66eef97d6..beb852cdf 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;
@@ -255,17 +255,16 @@ 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> 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;
@@ -576,7 +575,7 @@ void telemetryInterrupt10ms()
#if defined(FRSKY_HUB)
for (uint8_t i=0; i 0)
+#define TELEMETRY_STREAMING() (frskyData.rssi[0].value > 0)
#endif